##// END OF EJS Templates
jupyter-rendering: add required packaging to handle rendering of jupyter notebooks....
marcink -
r1488:0c731082 default
parent child Browse files
Show More
@@ -1,261 +1,268 b''
1 1 # Overrides for the generated python-packages.nix
2 2 #
3 3 # This function is intended to be used as an extension to the generated file
4 4 # python-packages.nix. The main objective is to add needed dependencies of C
5 5 # libraries and tweak the build instructions where needed.
6 6
7 7 { pkgs, basePythonPackages }:
8 8
9 9 let
10 10 sed = "sed -i";
11 11 localLicenses = {
12 12 repoze = {
13 13 fullName = "Repoze License";
14 14 url = http://www.repoze.org/LICENSE.txt;
15 15 };
16 16 };
17 17
18 18 in
19 19
20 20 self: super: {
21 21
22 22 appenlight-client = super.appenlight-client.override (attrs: {
23 23 meta = {
24 24 license = [ pkgs.lib.licenses.bsdOriginal ];
25 25 };
26 26 });
27 27
28 28 future = super.future.override (attrs: {
29 29 meta = {
30 30 license = [ pkgs.lib.licenses.mit ];
31 31 };
32 32 });
33 33
34 34 gnureadline = super.gnureadline.override (attrs: {
35 35 buildInputs = attrs.buildInputs ++ [
36 36 pkgs.ncurses
37 37 ];
38 38 patchPhase = ''
39 39 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
40 40 '';
41 41 });
42 42
43 43 gunicorn = super.gunicorn.override (attrs: {
44 44 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
45 45 # johbo: futures is needed as long as we are on Python 2, otherwise
46 46 # gunicorn explodes if used with multiple threads per worker.
47 47 self.futures
48 48 ];
49 49 });
50 50
51 nbconvert = super.nbconvert.override (attrs: {
52 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
53 # marcink: plug in jupyter-client for notebook rendering
54 self.jupyter-client
55 ];
56 });
57
51 58 ipython = super.ipython.override (attrs: {
52 59 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
53 60 self.gnureadline
54 61 ];
55 62 });
56 63
57 64 kombu = super.kombu.override (attrs: {
58 65 # The current version of kombu needs some patching to work with the
59 66 # other libs. Should be removed once we update celery and kombu.
60 67 patches = [
61 68 ./patch-kombu-py-2-7-11.diff
62 69 ./patch-kombu-msgpack.diff
63 70 ];
64 71 });
65 72
66 73 lxml = super.lxml.override (attrs: {
67 74 # johbo: On 16.09 we need this to compile on darwin, otherwise compilation
68 75 # fails on Darwin.
69 76 hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null;
70 77 buildInputs = with self; [
71 78 pkgs.libxml2
72 79 pkgs.libxslt
73 80 ];
74 81 });
75 82
76 83 MySQL-python = super.MySQL-python.override (attrs: {
77 84 buildInputs = attrs.buildInputs ++ [
78 85 pkgs.openssl
79 86 ];
80 87 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
81 88 pkgs.mysql.lib
82 89 pkgs.zlib
83 90 ];
84 91 });
85 92
86 93 psutil = super.psutil.override (attrs: {
87 94 buildInputs = attrs.buildInputs ++
88 95 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
89 96 });
90 97
91 98 psycopg2 = super.psycopg2.override (attrs: {
92 99 buildInputs = attrs.buildInputs ++
93 100 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
94 101 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
95 102 pkgs.postgresql
96 103 ];
97 104 meta = {
98 105 license = pkgs.lib.licenses.lgpl3Plus;
99 106 };
100 107 });
101 108
102 109 py-gfm = super.py-gfm.override {
103 110 name = "py-gfm-0.1.3.rhodecode-upstream1";
104 111 };
105 112
106 113 pycurl = super.pycurl.override (attrs: {
107 114 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
108 115 pkgs.curl
109 116 pkgs.openssl
110 117 ];
111 118 preConfigure = ''
112 119 substituteInPlace setup.py --replace '--static-libs' '--libs'
113 120 export PYCURL_SSL_LIBRARY=openssl
114 121 '';
115 122 meta = {
116 123 # TODO: It is LGPL and MIT
117 124 license = pkgs.lib.licenses.mit;
118 125 };
119 126 });
120 127
121 128 Pylons = super.Pylons.override (attrs: {
122 129 name = "Pylons-1.0.2.rhodecode-patch1";
123 130 });
124 131
125 132 pyramid = super.pyramid.override (attrs: {
126 133 postFixup = ''
127 134 wrapPythonPrograms
128 135 # TODO: johbo: "wrapPython" adds this magic line which
129 136 # confuses pserve.
130 137 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
131 138 '';
132 139 meta = {
133 140 license = localLicenses.repoze;
134 141 };
135 142 });
136 143
137 144 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
138 145 meta = {
139 146 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
140 147 };
141 148 });
142 149
143 150 pysqlite = super.pysqlite.override (attrs: {
144 151 propagatedBuildInputs = [
145 152 pkgs.sqlite
146 153 ];
147 154 meta = {
148 155 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
149 156 };
150 157 });
151 158
152 159 pytest-runner = super.pytest-runner.override (attrs: {
153 160 propagatedBuildInputs = [
154 161 self.setuptools-scm
155 162 ];
156 163 });
157 164
158 165 python-ldap = super.python-ldap.override (attrs: {
159 166 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
160 167 pkgs.cyrus_sasl
161 168 pkgs.openldap
162 169 pkgs.openssl
163 170 ];
164 171 # TODO: johbo: Remove the "or" once we drop 16.03 support.
165 172 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl";
166 173 });
167 174
168 175 python-pam = super.python-pam.override (attrs:
169 176 let
170 177 includeLibPam = pkgs.stdenv.isLinux;
171 178 in {
172 179 # TODO: johbo: Move the option up into the default.nix, we should
173 180 # include python-pam only on supported platforms.
174 181 propagatedBuildInputs = attrs.propagatedBuildInputs ++
175 182 pkgs.lib.optional includeLibPam [
176 183 pkgs.pam
177 184 ];
178 185 # TODO: johbo: Check if this can be avoided, or transform into
179 186 # a real patch
180 187 patchPhase = pkgs.lib.optionals includeLibPam ''
181 188 substituteInPlace pam.py \
182 189 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
183 190 '';
184 191 });
185 192
186 193 URLObject = super.URLObject.override (attrs: {
187 194 meta = {
188 195 license = {
189 196 spdxId = "Unlicense";
190 197 fullName = "The Unlicense";
191 198 url = http://unlicense.org/;
192 199 };
193 200 };
194 201 });
195 202
196 203 amqplib = super.amqplib.override (attrs: {
197 204 meta = {
198 205 license = pkgs.lib.licenses.lgpl3;
199 206 };
200 207 });
201 208
202 209 docutils = super.docutils.override (attrs: {
203 210 meta = {
204 211 license = pkgs.lib.licenses.bsd2;
205 212 };
206 213 });
207 214
208 215 colander = super.colander.override (attrs: {
209 216 meta = {
210 217 license = localLicenses.repoze;
211 218 };
212 219 });
213 220
214 221 pyramid-beaker = super.pyramid-beaker.override (attrs: {
215 222 meta = {
216 223 license = localLicenses.repoze;
217 224 };
218 225 });
219 226
220 227 pyramid-mako = super.pyramid-mako.override (attrs: {
221 228 meta = {
222 229 license = localLicenses.repoze;
223 230 };
224 231 });
225 232
226 233 repoze.lru = super.repoze.lru.override (attrs: {
227 234 meta = {
228 235 license = localLicenses.repoze;
229 236 };
230 237 });
231 238
232 239 recaptcha-client = super.recaptcha-client.override (attrs: {
233 240 meta = {
234 241 # TODO: It is MIT/X11
235 242 license = pkgs.lib.licenses.mit;
236 243 };
237 244 });
238 245
239 246 python-editor = super.python-editor.override (attrs: {
240 247 meta = {
241 248 license = pkgs.lib.licenses.asl20;
242 249 };
243 250 });
244 251
245 252 translationstring = super.translationstring.override (attrs: {
246 253 meta = {
247 254 license = localLicenses.repoze;
248 255 };
249 256 });
250 257
251 258 venusian = super.venusian.override (attrs: {
252 259 meta = {
253 260 license = localLicenses.repoze;
254 261 };
255 262 });
256 263
257 264 # Avoid that setuptools is replaced, this leads to trouble
258 265 # with buildPythonPackage.
259 266 setuptools = basePythonPackages.setuptools;
260 267
261 268 }
@@ -1,1826 +1,1995 b''
1 1 # Generated by pip2nix 0.4.0
2 2 # See https://github.com/johbo/pip2nix
3 3
4 4 {
5 5 Babel = super.buildPythonPackage {
6 6 name = "Babel-1.3";
7 7 buildInputs = with self; [];
8 8 doCheck = false;
9 9 propagatedBuildInputs = with self; [pytz];
10 10 src = fetchurl {
11 11 url = "https://pypi.python.org/packages/33/27/e3978243a03a76398c384c83f7ca879bc6e8f1511233a621fcada135606e/Babel-1.3.tar.gz";
12 12 md5 = "5264ceb02717843cbc9ffce8e6e06bdb";
13 13 };
14 14 meta = {
15 15 license = [ pkgs.lib.licenses.bsdOriginal ];
16 16 };
17 17 };
18 18 Beaker = super.buildPythonPackage {
19 19 name = "Beaker-1.7.0";
20 20 buildInputs = with self; [];
21 21 doCheck = false;
22 22 propagatedBuildInputs = with self; [];
23 23 src = fetchurl {
24 24 url = "https://pypi.python.org/packages/97/8e/409d2e7c009b8aa803dc9e6f239f1db7c3cdf578249087a404e7c27a505d/Beaker-1.7.0.tar.gz";
25 25 md5 = "386be3f7fe427358881eee4622b428b3";
26 26 };
27 27 meta = {
28 28 license = [ pkgs.lib.licenses.bsdOriginal ];
29 29 };
30 30 };
31 31 CProfileV = super.buildPythonPackage {
32 32 name = "CProfileV-1.0.6";
33 33 buildInputs = with self; [];
34 34 doCheck = false;
35 35 propagatedBuildInputs = with self; [bottle];
36 36 src = fetchurl {
37 37 url = "https://pypi.python.org/packages/eb/df/983a0b6cfd3ac94abf023f5011cb04f33613ace196e33f53c86cf91850d5/CProfileV-1.0.6.tar.gz";
38 38 md5 = "08c7c242b6e64237bc53c5d13537e03d";
39 39 };
40 40 meta = {
41 41 license = [ pkgs.lib.licenses.mit ];
42 42 };
43 43 };
44 44 Chameleon = super.buildPythonPackage {
45 45 name = "Chameleon-2.24";
46 46 buildInputs = with self; [];
47 47 doCheck = false;
48 48 propagatedBuildInputs = with self; [];
49 49 src = fetchurl {
50 50 url = "https://pypi.python.org/packages/5a/9e/637379ffa13c5172b5c0e704833ffea6bf51cec7567f93fd6e903d53ed74/Chameleon-2.24.tar.gz";
51 51 md5 = "1b01f1f6533a8a11d0d2f2366dec5342";
52 52 };
53 53 meta = {
54 54 license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ];
55 55 };
56 56 };
57 57 FormEncode = super.buildPythonPackage {
58 58 name = "FormEncode-1.2.4";
59 59 buildInputs = with self; [];
60 60 doCheck = false;
61 61 propagatedBuildInputs = with self; [];
62 62 src = fetchurl {
63 63 url = "https://pypi.python.org/packages/8e/59/0174271a6f004512e0201188593e6d319db139d14cb7490e488bbb078015/FormEncode-1.2.4.tar.gz";
64 64 md5 = "6bc17fb9aed8aea198975e888e2077f4";
65 65 };
66 66 meta = {
67 67 license = [ pkgs.lib.licenses.psfl ];
68 68 };
69 69 };
70 70 Jinja2 = super.buildPythonPackage {
71 71 name = "Jinja2-2.7.3";
72 72 buildInputs = with self; [];
73 73 doCheck = false;
74 74 propagatedBuildInputs = with self; [MarkupSafe];
75 75 src = fetchurl {
76 76 url = "https://pypi.python.org/packages/b0/73/eab0bca302d6d6a0b5c402f47ad1760dc9cb2dd14bbc1873ad48db258e4d/Jinja2-2.7.3.tar.gz";
77 77 md5 = "b9dffd2f3b43d673802fe857c8445b1a";
78 78 };
79 79 meta = {
80 80 license = [ pkgs.lib.licenses.bsdOriginal ];
81 81 };
82 82 };
83 83 Mako = super.buildPythonPackage {
84 84 name = "Mako-1.0.6";
85 85 buildInputs = with self; [];
86 86 doCheck = false;
87 87 propagatedBuildInputs = with self; [MarkupSafe];
88 88 src = fetchurl {
89 89 url = "https://pypi.python.org/packages/56/4b/cb75836863a6382199aefb3d3809937e21fa4cb0db15a4f4ba0ecc2e7e8e/Mako-1.0.6.tar.gz";
90 90 md5 = "a28e22a339080316b2acc352b9ee631c";
91 91 };
92 92 meta = {
93 93 license = [ pkgs.lib.licenses.mit ];
94 94 };
95 95 };
96 96 Markdown = super.buildPythonPackage {
97 97 name = "Markdown-2.6.7";
98 98 buildInputs = with self; [];
99 99 doCheck = false;
100 100 propagatedBuildInputs = with self; [];
101 101 src = fetchurl {
102 102 url = "https://pypi.python.org/packages/48/a4/fc6b002789c2239ac620ca963694c95b8f74e4747769cdf6021276939e74/Markdown-2.6.7.zip";
103 103 md5 = "632710a7474bbb74a82084392251061f";
104 104 };
105 105 meta = {
106 106 license = [ pkgs.lib.licenses.bsdOriginal ];
107 107 };
108 108 };
109 109 MarkupSafe = super.buildPythonPackage {
110 110 name = "MarkupSafe-0.23";
111 111 buildInputs = with self; [];
112 112 doCheck = false;
113 113 propagatedBuildInputs = with self; [];
114 114 src = fetchurl {
115 115 url = "https://pypi.python.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-0.23.tar.gz";
116 116 md5 = "f5ab3deee4c37cd6a922fb81e730da6e";
117 117 };
118 118 meta = {
119 119 license = [ pkgs.lib.licenses.bsdOriginal ];
120 120 };
121 121 };
122 122 MySQL-python = super.buildPythonPackage {
123 123 name = "MySQL-python-1.2.5";
124 124 buildInputs = with self; [];
125 125 doCheck = false;
126 126 propagatedBuildInputs = with self; [];
127 127 src = fetchurl {
128 128 url = "https://pypi.python.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip";
129 129 md5 = "654f75b302db6ed8dc5a898c625e030c";
130 130 };
131 131 meta = {
132 132 license = [ pkgs.lib.licenses.gpl1 ];
133 133 };
134 134 };
135 135 Paste = super.buildPythonPackage {
136 136 name = "Paste-2.0.3";
137 137 buildInputs = with self; [];
138 138 doCheck = false;
139 139 propagatedBuildInputs = with self; [six];
140 140 src = fetchurl {
141 141 url = "https://pypi.python.org/packages/30/c3/5c2f7c7a02e4f58d4454353fa1c32c94f79fa4e36d07a67c0ac295ea369e/Paste-2.0.3.tar.gz";
142 142 md5 = "1231e14eae62fa7ed76e9130b04bc61e";
143 143 };
144 144 meta = {
145 145 license = [ pkgs.lib.licenses.mit ];
146 146 };
147 147 };
148 148 PasteDeploy = super.buildPythonPackage {
149 149 name = "PasteDeploy-1.5.2";
150 150 buildInputs = with self; [];
151 151 doCheck = false;
152 152 propagatedBuildInputs = with self; [];
153 153 src = fetchurl {
154 154 url = "https://pypi.python.org/packages/0f/90/8e20cdae206c543ea10793cbf4136eb9a8b3f417e04e40a29d72d9922cbd/PasteDeploy-1.5.2.tar.gz";
155 155 md5 = "352b7205c78c8de4987578d19431af3b";
156 156 };
157 157 meta = {
158 158 license = [ pkgs.lib.licenses.mit ];
159 159 };
160 160 };
161 161 PasteScript = super.buildPythonPackage {
162 162 name = "PasteScript-1.7.5";
163 163 buildInputs = with self; [];
164 164 doCheck = false;
165 165 propagatedBuildInputs = with self; [Paste PasteDeploy];
166 166 src = fetchurl {
167 167 url = "https://pypi.python.org/packages/a5/05/fc60efa7c2f17a1dbaeccb2a903a1e90902d92b9d00eebabe3095829d806/PasteScript-1.7.5.tar.gz";
168 168 md5 = "4c72d78dcb6bb993f30536842c16af4d";
169 169 };
170 170 meta = {
171 171 license = [ pkgs.lib.licenses.mit ];
172 172 };
173 173 };
174 174 Pygments = super.buildPythonPackage {
175 175 name = "Pygments-2.2.0";
176 176 buildInputs = with self; [];
177 177 doCheck = false;
178 178 propagatedBuildInputs = with self; [];
179 179 src = fetchurl {
180 180 url = "https://pypi.python.org/packages/71/2a/2e4e77803a8bd6408a2903340ac498cb0a2181811af7c9ec92cb70b0308a/Pygments-2.2.0.tar.gz";
181 181 md5 = "13037baca42f16917cbd5ad2fab50844";
182 182 };
183 183 meta = {
184 184 license = [ pkgs.lib.licenses.bsdOriginal ];
185 185 };
186 186 };
187 187 Pylons = super.buildPythonPackage {
188 188 name = "Pylons-1.0.2.dev20170205";
189 189 buildInputs = with self; [];
190 190 doCheck = false;
191 191 propagatedBuildInputs = with self; [Routes WebHelpers Beaker Paste PasteDeploy PasteScript FormEncode simplejson decorator nose Mako WebError WebTest Tempita MarkupSafe WebOb];
192 192 src = fetchurl {
193 193 url = "https://code.rhodecode.com/upstream/pylons/archive/707354ee4261b9c10450404fc9852ccea4fd667d.tar.gz?md5=f26633726fa2cd3a340316ee6a5d218f";
194 194 md5 = "f26633726fa2cd3a340316ee6a5d218f";
195 195 };
196 196 meta = {
197 197 license = [ pkgs.lib.licenses.bsdOriginal ];
198 198 };
199 199 };
200 200 Routes = super.buildPythonPackage {
201 201 name = "Routes-1.13";
202 202 buildInputs = with self; [];
203 203 doCheck = false;
204 204 propagatedBuildInputs = with self; [repoze.lru];
205 205 src = fetchurl {
206 206 url = "https://pypi.python.org/packages/88/d3/259c3b3cde8837eb9441ab5f574a660e8a4acea8f54a078441d4d2acac1c/Routes-1.13.tar.gz";
207 207 md5 = "d527b0ab7dd9172b1275a41f97448783";
208 208 };
209 209 meta = {
210 210 license = [ pkgs.lib.licenses.bsdOriginal ];
211 211 };
212 212 };
213 213 SQLAlchemy = super.buildPythonPackage {
214 214 name = "SQLAlchemy-0.9.9";
215 215 buildInputs = with self; [];
216 216 doCheck = false;
217 217 propagatedBuildInputs = with self; [];
218 218 src = fetchurl {
219 219 url = "https://pypi.python.org/packages/28/f7/1bbfd0d8597e8c358d5e15a166a486ad82fc5579b4e67b6ef7c05b1d182b/SQLAlchemy-0.9.9.tar.gz";
220 220 md5 = "8a10a9bd13ed3336ef7333ac2cc679ff";
221 221 };
222 222 meta = {
223 223 license = [ pkgs.lib.licenses.mit ];
224 224 };
225 225 };
226 226 Sphinx = super.buildPythonPackage {
227 227 name = "Sphinx-1.2.2";
228 228 buildInputs = with self; [];
229 229 doCheck = false;
230 230 propagatedBuildInputs = with self; [Pygments docutils Jinja2];
231 231 src = fetchurl {
232 232 url = "https://pypi.python.org/packages/0a/50/34017e6efcd372893a416aba14b84a1a149fc7074537b0e9cb6ca7b7abe9/Sphinx-1.2.2.tar.gz";
233 233 md5 = "3dc73ccaa8d0bfb2d62fb671b1f7e8a4";
234 234 };
235 235 meta = {
236 236 license = [ pkgs.lib.licenses.bsdOriginal ];
237 237 };
238 238 };
239 239 Tempita = super.buildPythonPackage {
240 240 name = "Tempita-0.5.2";
241 241 buildInputs = with self; [];
242 242 doCheck = false;
243 243 propagatedBuildInputs = with self; [];
244 244 src = fetchurl {
245 245 url = "https://pypi.python.org/packages/56/c8/8ed6eee83dbddf7b0fc64dd5d4454bc05e6ccaafff47991f73f2894d9ff4/Tempita-0.5.2.tar.gz";
246 246 md5 = "4c2f17bb9d481821c41b6fbee904cea1";
247 247 };
248 248 meta = {
249 249 license = [ pkgs.lib.licenses.mit ];
250 250 };
251 251 };
252 252 URLObject = super.buildPythonPackage {
253 253 name = "URLObject-2.4.0";
254 254 buildInputs = with self; [];
255 255 doCheck = false;
256 256 propagatedBuildInputs = with self; [];
257 257 src = fetchurl {
258 258 url = "https://pypi.python.org/packages/cb/b6/e25e58500f9caef85d664bec71ec67c116897bfebf8622c32cb75d1ca199/URLObject-2.4.0.tar.gz";
259 259 md5 = "2ed819738a9f0a3051f31dc9924e3065";
260 260 };
261 261 meta = {
262 262 license = [ ];
263 263 };
264 264 };
265 265 WebError = super.buildPythonPackage {
266 266 name = "WebError-0.10.3";
267 267 buildInputs = with self; [];
268 268 doCheck = false;
269 269 propagatedBuildInputs = with self; [WebOb Tempita Pygments Paste];
270 270 src = fetchurl {
271 271 url = "https://pypi.python.org/packages/35/76/e7e5c2ce7e9c7f31b54c1ff295a495886d1279a002557d74dd8957346a79/WebError-0.10.3.tar.gz";
272 272 md5 = "84b9990b0baae6fd440b1e60cdd06f9a";
273 273 };
274 274 meta = {
275 275 license = [ pkgs.lib.licenses.mit ];
276 276 };
277 277 };
278 278 WebHelpers = super.buildPythonPackage {
279 279 name = "WebHelpers-1.3";
280 280 buildInputs = with self; [];
281 281 doCheck = false;
282 282 propagatedBuildInputs = with self; [MarkupSafe];
283 283 src = fetchurl {
284 284 url = "https://pypi.python.org/packages/ee/68/4d07672821d514184357f1552f2dad923324f597e722de3b016ca4f7844f/WebHelpers-1.3.tar.gz";
285 285 md5 = "32749ffadfc40fea51075a7def32588b";
286 286 };
287 287 meta = {
288 288 license = [ pkgs.lib.licenses.bsdOriginal ];
289 289 };
290 290 };
291 291 WebHelpers2 = super.buildPythonPackage {
292 292 name = "WebHelpers2-2.0";
293 293 buildInputs = with self; [];
294 294 doCheck = false;
295 295 propagatedBuildInputs = with self; [MarkupSafe six];
296 296 src = fetchurl {
297 297 url = "https://pypi.python.org/packages/ff/30/56342c6ea522439e3662427c8d7b5e5b390dff4ff2dc92d8afcb8ab68b75/WebHelpers2-2.0.tar.gz";
298 298 md5 = "0f6b68d70c12ee0aed48c00b24da13d3";
299 299 };
300 300 meta = {
301 301 license = [ pkgs.lib.licenses.mit ];
302 302 };
303 303 };
304 304 WebOb = super.buildPythonPackage {
305 305 name = "WebOb-1.3.1";
306 306 buildInputs = with self; [];
307 307 doCheck = false;
308 308 propagatedBuildInputs = with self; [];
309 309 src = fetchurl {
310 310 url = "https://pypi.python.org/packages/16/78/adfc0380b8a0d75b2d543fa7085ba98a573b1ae486d9def88d172b81b9fa/WebOb-1.3.1.tar.gz";
311 311 md5 = "20918251c5726956ba8fef22d1556177";
312 312 };
313 313 meta = {
314 314 license = [ pkgs.lib.licenses.mit ];
315 315 };
316 316 };
317 317 WebTest = super.buildPythonPackage {
318 318 name = "WebTest-1.4.3";
319 319 buildInputs = with self; [];
320 320 doCheck = false;
321 321 propagatedBuildInputs = with self; [WebOb];
322 322 src = fetchurl {
323 323 url = "https://pypi.python.org/packages/51/3d/84fd0f628df10b30c7db87895f56d0158e5411206b721ca903cb51bfd948/WebTest-1.4.3.zip";
324 324 md5 = "631ce728bed92c681a4020a36adbc353";
325 325 };
326 326 meta = {
327 327 license = [ pkgs.lib.licenses.mit ];
328 328 };
329 329 };
330 330 Whoosh = super.buildPythonPackage {
331 331 name = "Whoosh-2.7.4";
332 332 buildInputs = with self; [];
333 333 doCheck = false;
334 334 propagatedBuildInputs = with self; [];
335 335 src = fetchurl {
336 336 url = "https://pypi.python.org/packages/25/2b/6beed2107b148edc1321da0d489afc4617b9ed317ef7b72d4993cad9b684/Whoosh-2.7.4.tar.gz";
337 337 md5 = "c2710105f20b3e29936bd2357383c325";
338 338 };
339 339 meta = {
340 340 license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.bsd2 ];
341 341 };
342 342 };
343 343 alembic = super.buildPythonPackage {
344 344 name = "alembic-0.8.4";
345 345 buildInputs = with self; [];
346 346 doCheck = false;
347 347 propagatedBuildInputs = with self; [SQLAlchemy Mako python-editor];
348 348 src = fetchurl {
349 349 url = "https://pypi.python.org/packages/ca/7e/299b4499b5c75e5a38c5845145ad24755bebfb8eec07a2e1c366b7181eeb/alembic-0.8.4.tar.gz";
350 350 md5 = "5f95d8ee62b443f9b37eb5bee76c582d";
351 351 };
352 352 meta = {
353 353 license = [ pkgs.lib.licenses.mit ];
354 354 };
355 355 };
356 356 amqplib = super.buildPythonPackage {
357 357 name = "amqplib-1.0.2";
358 358 buildInputs = with self; [];
359 359 doCheck = false;
360 360 propagatedBuildInputs = with self; [];
361 361 src = fetchurl {
362 362 url = "https://pypi.python.org/packages/75/b7/8c2429bf8d92354a0118614f9a4d15e53bc69ebedce534284111de5a0102/amqplib-1.0.2.tgz";
363 363 md5 = "5c92f17fbedd99b2b4a836d4352d1e2f";
364 364 };
365 365 meta = {
366 366 license = [ { fullName = "LGPL"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ];
367 367 };
368 368 };
369 369 anyjson = super.buildPythonPackage {
370 370 name = "anyjson-0.3.3";
371 371 buildInputs = with self; [];
372 372 doCheck = false;
373 373 propagatedBuildInputs = with self; [];
374 374 src = fetchurl {
375 375 url = "https://pypi.python.org/packages/c3/4d/d4089e1a3dd25b46bebdb55a992b0797cff657b4477bc32ce28038fdecbc/anyjson-0.3.3.tar.gz";
376 376 md5 = "2ea28d6ec311aeeebaf993cb3008b27c";
377 377 };
378 378 meta = {
379 379 license = [ pkgs.lib.licenses.bsdOriginal ];
380 380 };
381 381 };
382 382 appenlight-client = super.buildPythonPackage {
383 383 name = "appenlight-client-0.6.14";
384 384 buildInputs = with self; [];
385 385 doCheck = false;
386 386 propagatedBuildInputs = with self; [WebOb requests];
387 387 src = fetchurl {
388 388 url = "https://pypi.python.org/packages/4d/e0/23fee3ebada8143f707e65c06bcb82992040ee64ea8355e044ed55ebf0c1/appenlight_client-0.6.14.tar.gz";
389 389 md5 = "578c69b09f4356d898fff1199b98a95c";
390 390 };
391 391 meta = {
392 392 license = [ pkgs.lib.licenses.bsdOriginal { fullName = "DFSG approved"; } ];
393 393 };
394 394 };
395 395 authomatic = super.buildPythonPackage {
396 396 name = "authomatic-0.1.0.post1";
397 397 buildInputs = with self; [];
398 398 doCheck = false;
399 399 propagatedBuildInputs = with self; [];
400 400 src = fetchurl {
401 401 url = "https://pypi.python.org/packages/08/1a/8a930461e604c2d5a7a871e1ac59fa82ccf994c32e807230c8d2fb07815a/Authomatic-0.1.0.post1.tar.gz";
402 402 md5 = "be3f3ce08747d776aae6d6cc8dcb49a9";
403 403 };
404 404 meta = {
405 405 license = [ pkgs.lib.licenses.mit ];
406 406 };
407 407 };
408 408 backport-ipaddress = super.buildPythonPackage {
409 409 name = "backport-ipaddress-0.1";
410 410 buildInputs = with self; [];
411 411 doCheck = false;
412 412 propagatedBuildInputs = with self; [];
413 413 src = fetchurl {
414 414 url = "https://pypi.python.org/packages/d3/30/54c6dab05a4dec44db25ff309f1fbb6b7a8bde3f2bade38bb9da67bbab8f/backport_ipaddress-0.1.tar.gz";
415 415 md5 = "9c1f45f4361f71b124d7293a60006c05";
416 416 };
417 417 meta = {
418 418 license = [ pkgs.lib.licenses.psfl ];
419 419 };
420 420 };
421 421 backports.shutil-get-terminal-size = super.buildPythonPackage {
422 422 name = "backports.shutil-get-terminal-size-1.0.0";
423 423 buildInputs = with self; [];
424 424 doCheck = false;
425 425 propagatedBuildInputs = with self; [];
426 426 src = fetchurl {
427 427 url = "https://pypi.python.org/packages/ec/9c/368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/backports.shutil_get_terminal_size-1.0.0.tar.gz";
428 428 md5 = "03267762480bd86b50580dc19dff3c66";
429 429 };
430 430 meta = {
431 431 license = [ pkgs.lib.licenses.mit ];
432 432 };
433 433 };
434 bleach = super.buildPythonPackage {
435 name = "bleach-1.5.0";
436 buildInputs = with self; [];
437 doCheck = false;
438 propagatedBuildInputs = with self; [six html5lib];
439 src = fetchurl {
440 url = "https://pypi.python.org/packages/99/00/25a8fce4de102bf6e3cc76bc4ea60685b2fee33bde1b34830c70cacc26a7/bleach-1.5.0.tar.gz";
441 md5 = "b663300efdf421b3b727b19d7be9c7e7";
442 };
443 meta = {
444 license = [ pkgs.lib.licenses.asl20 ];
445 };
446 };
434 447 bottle = super.buildPythonPackage {
435 448 name = "bottle-0.12.8";
436 449 buildInputs = with self; [];
437 450 doCheck = false;
438 451 propagatedBuildInputs = with self; [];
439 452 src = fetchurl {
440 453 url = "https://pypi.python.org/packages/52/df/e4a408f3a7af396d186d4ecd3b389dd764f0f943b4fa8d257bfe7b49d343/bottle-0.12.8.tar.gz";
441 454 md5 = "13132c0a8f607bf860810a6ee9064c5b";
442 455 };
443 456 meta = {
444 457 license = [ pkgs.lib.licenses.mit ];
445 458 };
446 459 };
447 460 bumpversion = super.buildPythonPackage {
448 461 name = "bumpversion-0.5.3";
449 462 buildInputs = with self; [];
450 463 doCheck = false;
451 464 propagatedBuildInputs = with self; [];
452 465 src = fetchurl {
453 466 url = "https://pypi.python.org/packages/14/41/8c9da3549f8e00c84f0432c3a8cf8ed6898374714676aab91501d48760db/bumpversion-0.5.3.tar.gz";
454 467 md5 = "c66a3492eafcf5ad4b024be9fca29820";
455 468 };
456 469 meta = {
457 470 license = [ pkgs.lib.licenses.mit ];
458 471 };
459 472 };
460 473 celery = super.buildPythonPackage {
461 474 name = "celery-2.2.10";
462 475 buildInputs = with self; [];
463 476 doCheck = false;
464 477 propagatedBuildInputs = with self; [python-dateutil anyjson kombu pyparsing];
465 478 src = fetchurl {
466 479 url = "https://pypi.python.org/packages/b1/64/860fd50e45844c83442e7953effcddeff66b2851d90b2d784f7201c111b8/celery-2.2.10.tar.gz";
467 480 md5 = "898bc87e54f278055b561316ba73e222";
468 481 };
469 482 meta = {
470 483 license = [ pkgs.lib.licenses.bsdOriginal ];
471 484 };
472 485 };
473 486 channelstream = super.buildPythonPackage {
474 487 name = "channelstream-0.5.2";
475 488 buildInputs = with self; [];
476 489 doCheck = false;
477 490 propagatedBuildInputs = with self; [gevent ws4py pyramid pyramid-jinja2 itsdangerous requests six];
478 491 src = fetchurl {
479 492 url = "https://pypi.python.org/packages/2b/31/29a8e085cf5bf97fa88e7b947adabfc581a18a3463adf77fb6dada34a65f/channelstream-0.5.2.tar.gz";
480 493 md5 = "1c5eb2a8a405be6f1073da94da6d81d3";
481 494 };
482 495 meta = {
483 496 license = [ pkgs.lib.licenses.bsdOriginal ];
484 497 };
485 498 };
486 499 click = super.buildPythonPackage {
487 500 name = "click-5.1";
488 501 buildInputs = with self; [];
489 502 doCheck = false;
490 503 propagatedBuildInputs = with self; [];
491 504 src = fetchurl {
492 505 url = "https://pypi.python.org/packages/b7/34/a496632c4fb6c1ee76efedf77bb8d28b29363d839953d95095b12defe791/click-5.1.tar.gz";
493 506 md5 = "9c5323008cccfe232a8b161fc8196d41";
494 507 };
495 508 meta = {
496 509 license = [ pkgs.lib.licenses.bsdOriginal ];
497 510 };
498 511 };
499 512 colander = super.buildPythonPackage {
500 513 name = "colander-1.2";
501 514 buildInputs = with self; [];
502 515 doCheck = false;
503 516 propagatedBuildInputs = with self; [translationstring iso8601];
504 517 src = fetchurl {
505 518 url = "https://pypi.python.org/packages/14/23/c9ceba07a6a1dc0eefbb215fc0dc64aabc2b22ee756bc0f0c13278fa0887/colander-1.2.tar.gz";
506 519 md5 = "83db21b07936a0726e588dae1914b9ed";
507 520 };
508 521 meta = {
509 522 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
510 523 };
511 524 };
512 525 configobj = super.buildPythonPackage {
513 526 name = "configobj-5.0.6";
514 527 buildInputs = with self; [];
515 528 doCheck = false;
516 529 propagatedBuildInputs = with self; [six];
517 530 src = fetchurl {
518 531 url = "https://pypi.python.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz";
519 532 md5 = "e472a3a1c2a67bb0ec9b5d54c13a47d6";
520 533 };
521 534 meta = {
522 535 license = [ pkgs.lib.licenses.bsdOriginal ];
523 536 };
524 537 };
538 configparser = super.buildPythonPackage {
539 name = "configparser-3.5.0";
540 buildInputs = with self; [];
541 doCheck = false;
542 propagatedBuildInputs = with self; [];
543 src = fetchurl {
544 url = "https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz";
545 md5 = "cfdd915a5b7a6c09917a64a573140538";
546 };
547 meta = {
548 license = [ pkgs.lib.licenses.mit ];
549 };
550 };
525 551 cov-core = super.buildPythonPackage {
526 552 name = "cov-core-1.15.0";
527 553 buildInputs = with self; [];
528 554 doCheck = false;
529 555 propagatedBuildInputs = with self; [coverage];
530 556 src = fetchurl {
531 557 url = "https://pypi.python.org/packages/4b/87/13e75a47b4ba1be06f29f6d807ca99638bedc6b57fa491cd3de891ca2923/cov-core-1.15.0.tar.gz";
532 558 md5 = "f519d4cb4c4e52856afb14af52919fe6";
533 559 };
534 560 meta = {
535 561 license = [ pkgs.lib.licenses.mit ];
536 562 };
537 563 };
538 564 coverage = super.buildPythonPackage {
539 565 name = "coverage-3.7.1";
540 566 buildInputs = with self; [];
541 567 doCheck = false;
542 568 propagatedBuildInputs = with self; [];
543 569 src = fetchurl {
544 570 url = "https://pypi.python.org/packages/09/4f/89b06c7fdc09687bca507dc411c342556ef9c5a3b26756137a4878ff19bf/coverage-3.7.1.tar.gz";
545 571 md5 = "c47b36ceb17eaff3ecfab3bcd347d0df";
546 572 };
547 573 meta = {
548 574 license = [ pkgs.lib.licenses.bsdOriginal ];
549 575 };
550 576 };
551 577 cssselect = super.buildPythonPackage {
552 578 name = "cssselect-0.9.1";
553 579 buildInputs = with self; [];
554 580 doCheck = false;
555 581 propagatedBuildInputs = with self; [];
556 582 src = fetchurl {
557 583 url = "https://pypi.python.org/packages/aa/e5/9ee1460d485b94a6d55732eb7ad5b6c084caf73dd6f9cb0bb7d2a78fafe8/cssselect-0.9.1.tar.gz";
558 584 md5 = "c74f45966277dc7a0f768b9b0f3522ac";
559 585 };
560 586 meta = {
561 587 license = [ pkgs.lib.licenses.bsdOriginal ];
562 588 };
563 589 };
564 590 decorator = super.buildPythonPackage {
565 591 name = "decorator-3.4.2";
566 592 buildInputs = with self; [];
567 593 doCheck = false;
568 594 propagatedBuildInputs = with self; [];
569 595 src = fetchurl {
570 596 url = "https://pypi.python.org/packages/35/3a/42566eb7a2cbac774399871af04e11d7ae3fc2579e7dae85213b8d1d1c57/decorator-3.4.2.tar.gz";
571 597 md5 = "9e0536870d2b83ae27d58dbf22582f4d";
572 598 };
573 599 meta = {
574 600 license = [ pkgs.lib.licenses.bsdOriginal ];
575 601 };
576 602 };
577 603 deform = super.buildPythonPackage {
578 604 name = "deform-2.0a2";
579 605 buildInputs = with self; [];
580 606 doCheck = false;
581 607 propagatedBuildInputs = with self; [Chameleon colander peppercorn translationstring zope.deprecation];
582 608 src = fetchurl {
583 609 url = "https://pypi.python.org/packages/8d/b3/aab57e81da974a806dc9c5fa024a6404720f890a6dcf2e80885e3cb4609a/deform-2.0a2.tar.gz";
584 610 md5 = "7a90d41f7fbc18002ce74f39bd90a5e4";
585 611 };
586 612 meta = {
587 613 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
588 614 };
589 615 };
590 616 docutils = super.buildPythonPackage {
591 617 name = "docutils-0.12";
592 618 buildInputs = with self; [];
593 619 doCheck = false;
594 620 propagatedBuildInputs = with self; [];
595 621 src = fetchurl {
596 622 url = "https://pypi.python.org/packages/37/38/ceda70135b9144d84884ae2fc5886c6baac4edea39550f28bcd144c1234d/docutils-0.12.tar.gz";
597 623 md5 = "4622263b62c5c771c03502afa3157768";
598 624 };
599 625 meta = {
600 626 license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.publicDomain pkgs.lib.licenses.gpl1 { fullName = "public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)"; } pkgs.lib.licenses.psfl ];
601 627 };
602 628 };
603 629 dogpile.cache = super.buildPythonPackage {
604 630 name = "dogpile.cache-0.6.1";
605 631 buildInputs = with self; [];
606 632 doCheck = false;
607 633 propagatedBuildInputs = with self; [];
608 634 src = fetchurl {
609 635 url = "https://pypi.python.org/packages/f6/a0/6f2142c58c6588d17c734265b103ae1cd0741e1681dd9483a63f22033375/dogpile.cache-0.6.1.tar.gz";
610 636 md5 = "35d7fb30f22bbd0685763d894dd079a9";
611 637 };
612 638 meta = {
613 639 license = [ pkgs.lib.licenses.bsdOriginal ];
614 640 };
615 641 };
616 642 dogpile.core = super.buildPythonPackage {
617 643 name = "dogpile.core-0.4.1";
618 644 buildInputs = with self; [];
619 645 doCheck = false;
620 646 propagatedBuildInputs = with self; [];
621 647 src = fetchurl {
622 648 url = "https://pypi.python.org/packages/0e/77/e72abc04c22aedf874301861e5c1e761231c288b5de369c18be8f4b5c9bb/dogpile.core-0.4.1.tar.gz";
623 649 md5 = "01cb19f52bba3e95c9b560f39341f045";
624 650 };
625 651 meta = {
626 652 license = [ pkgs.lib.licenses.bsdOriginal ];
627 653 };
628 654 };
629 655 ecdsa = super.buildPythonPackage {
630 656 name = "ecdsa-0.11";
631 657 buildInputs = with self; [];
632 658 doCheck = false;
633 659 propagatedBuildInputs = with self; [];
634 660 src = fetchurl {
635 661 url = "https://pypi.python.org/packages/6c/3f/92fe5dcdcaa7bd117be21e5520c9a54375112b66ec000d209e9e9519fad1/ecdsa-0.11.tar.gz";
636 662 md5 = "8ef586fe4dbb156697d756900cb41d7c";
637 663 };
638 664 meta = {
639 665 license = [ pkgs.lib.licenses.mit ];
640 666 };
641 667 };
642 668 elasticsearch = super.buildPythonPackage {
643 669 name = "elasticsearch-2.3.0";
644 670 buildInputs = with self; [];
645 671 doCheck = false;
646 672 propagatedBuildInputs = with self; [urllib3];
647 673 src = fetchurl {
648 674 url = "https://pypi.python.org/packages/10/35/5fd52c5f0b0ee405ed4b5195e8bce44c5e041787680dc7b94b8071cac600/elasticsearch-2.3.0.tar.gz";
649 675 md5 = "2550f3b51629cf1ef9636608af92c340";
650 676 };
651 677 meta = {
652 678 license = [ pkgs.lib.licenses.asl20 ];
653 679 };
654 680 };
655 681 elasticsearch-dsl = super.buildPythonPackage {
656 682 name = "elasticsearch-dsl-2.2.0";
657 683 buildInputs = with self; [];
658 684 doCheck = false;
659 685 propagatedBuildInputs = with self; [six python-dateutil elasticsearch];
660 686 src = fetchurl {
661 687 url = "https://pypi.python.org/packages/66/2f/52a086968788e58461641570f45c3207a52d46ebbe9b77dc22b6a8ffda66/elasticsearch-dsl-2.2.0.tar.gz";
662 688 md5 = "fa6bd3c87ea3caa8f0f051bc37c53221";
663 689 };
664 690 meta = {
665 691 license = [ pkgs.lib.licenses.asl20 ];
666 692 };
667 693 };
694 entrypoints = super.buildPythonPackage {
695 name = "entrypoints-0.2.2";
696 buildInputs = with self; [];
697 doCheck = false;
698 propagatedBuildInputs = with self; [configparser];
699 src = fetchurl {
700 url = "https://code.rhodecode.com/upstream/entrypoints/archive/96e6d645684e1af3d7df5b5272f3fe85a546b233.tar.gz?md5=7db37771aea9ac9fefe093e5d6987313";
701 md5 = "7db37771aea9ac9fefe093e5d6987313";
702 };
703 meta = {
704 license = [ pkgs.lib.licenses.mit ];
705 };
706 };
668 707 enum34 = super.buildPythonPackage {
669 708 name = "enum34-1.1.6";
670 709 buildInputs = with self; [];
671 710 doCheck = false;
672 711 propagatedBuildInputs = with self; [];
673 712 src = fetchurl {
674 713 url = "https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz";
675 714 md5 = "5f13a0841a61f7fc295c514490d120d0";
676 715 };
677 716 meta = {
678 717 license = [ pkgs.lib.licenses.bsdOriginal ];
679 718 };
680 719 };
720 functools32 = super.buildPythonPackage {
721 name = "functools32-3.2.3.post2";
722 buildInputs = with self; [];
723 doCheck = false;
724 propagatedBuildInputs = with self; [];
725 src = fetchurl {
726 url = "https://pypi.python.org/packages/5e/1a/0aa2c8195a204a9f51284018562dea77e25511f02fe924fac202fc012172/functools32-3.2.3-2.zip";
727 md5 = "d55232eb132ec779e6893c902a0bc5ad";
728 };
729 meta = {
730 license = [ pkgs.lib.licenses.psfl ];
731 };
732 };
681 733 future = super.buildPythonPackage {
682 734 name = "future-0.14.3";
683 735 buildInputs = with self; [];
684 736 doCheck = false;
685 737 propagatedBuildInputs = with self; [];
686 738 src = fetchurl {
687 739 url = "https://pypi.python.org/packages/83/80/8ef3a11a15f8eaafafa0937b20c1b3f73527e69ab6b3fa1cf94a5a96aabb/future-0.14.3.tar.gz";
688 740 md5 = "e94079b0bd1fc054929e8769fc0f6083";
689 741 };
690 742 meta = {
691 743 license = [ { fullName = "OSI Approved"; } pkgs.lib.licenses.mit ];
692 744 };
693 745 };
694 746 futures = super.buildPythonPackage {
695 747 name = "futures-3.0.2";
696 748 buildInputs = with self; [];
697 749 doCheck = false;
698 750 propagatedBuildInputs = with self; [];
699 751 src = fetchurl {
700 752 url = "https://pypi.python.org/packages/f8/e7/fc0fcbeb9193ba2d4de00b065e7fd5aecd0679e93ce95a07322b2b1434f4/futures-3.0.2.tar.gz";
701 753 md5 = "42aaf1e4de48d6e871d77dc1f9d96d5a";
702 754 };
703 755 meta = {
704 756 license = [ pkgs.lib.licenses.bsdOriginal ];
705 757 };
706 758 };
707 759 gevent = super.buildPythonPackage {
708 760 name = "gevent-1.1.2";
709 761 buildInputs = with self; [];
710 762 doCheck = false;
711 763 propagatedBuildInputs = with self; [greenlet];
712 764 src = fetchurl {
713 765 url = "https://pypi.python.org/packages/43/8f/cb3224a0e6ab663547f45c10d0651cfd52633fde4283bf68d627084df8cc/gevent-1.1.2.tar.gz";
714 766 md5 = "bb32a2f852a4997138014d5007215c6e";
715 767 };
716 768 meta = {
717 769 license = [ pkgs.lib.licenses.mit ];
718 770 };
719 771 };
720 772 gnureadline = super.buildPythonPackage {
721 773 name = "gnureadline-6.3.3";
722 774 buildInputs = with self; [];
723 775 doCheck = false;
724 776 propagatedBuildInputs = with self; [];
725 777 src = fetchurl {
726 778 url = "https://pypi.python.org/packages/3a/ee/2c3f568b0a74974791ac590ec742ef6133e2fbd287a074ba72a53fa5e97c/gnureadline-6.3.3.tar.gz";
727 779 md5 = "c4af83c9a3fbeac8f2da9b5a7c60e51c";
728 780 };
729 781 meta = {
730 782 license = [ pkgs.lib.licenses.gpl1 ];
731 783 };
732 784 };
733 785 gprof2dot = super.buildPythonPackage {
734 786 name = "gprof2dot-2016.10.13";
735 787 buildInputs = with self; [];
736 788 doCheck = false;
737 789 propagatedBuildInputs = with self; [];
738 790 src = fetchurl {
739 791 url = "https://pypi.python.org/packages/a0/e0/73c71baed306f0402a00a94ffc7b2be94ad1296dfcb8b46912655b93154c/gprof2dot-2016.10.13.tar.gz";
740 792 md5 = "0125401f15fd2afe1df686a76c64a4fd";
741 793 };
742 794 meta = {
743 795 license = [ { fullName = "LGPL"; } ];
744 796 };
745 797 };
746 798 greenlet = super.buildPythonPackage {
747 799 name = "greenlet-0.4.10";
748 800 buildInputs = with self; [];
749 801 doCheck = false;
750 802 propagatedBuildInputs = with self; [];
751 803 src = fetchurl {
752 804 url = "https://pypi.python.org/packages/67/62/ca2a95648666eaa2ffeb6a9b3964f21d419ae27f82f2e66b53da5b943fc4/greenlet-0.4.10.zip";
753 805 md5 = "bed0c4b3b896702131f4d5c72f87c41d";
754 806 };
755 807 meta = {
756 808 license = [ pkgs.lib.licenses.mit ];
757 809 };
758 810 };
759 811 gunicorn = super.buildPythonPackage {
760 812 name = "gunicorn-19.6.0";
761 813 buildInputs = with self; [];
762 814 doCheck = false;
763 815 propagatedBuildInputs = with self; [];
764 816 src = fetchurl {
765 817 url = "https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/gunicorn-19.6.0.tar.gz";
766 818 md5 = "338e5e8a83ea0f0625f768dba4597530";
767 819 };
768 820 meta = {
769 821 license = [ pkgs.lib.licenses.mit ];
770 822 };
771 823 };
824 html5lib = super.buildPythonPackage {
825 name = "html5lib-0.9999999";
826 buildInputs = with self; [];
827 doCheck = false;
828 propagatedBuildInputs = with self; [six];
829 src = fetchurl {
830 url = "https://pypi.python.org/packages/ae/ae/bcb60402c60932b32dfaf19bb53870b29eda2cd17551ba5639219fb5ebf9/html5lib-0.9999999.tar.gz";
831 md5 = "ef43cb05e9e799f25d65d1135838a96f";
832 };
833 meta = {
834 license = [ pkgs.lib.licenses.mit ];
835 };
836 };
772 837 infrae.cache = super.buildPythonPackage {
773 838 name = "infrae.cache-1.0.1";
774 839 buildInputs = with self; [];
775 840 doCheck = false;
776 841 propagatedBuildInputs = with self; [Beaker repoze.lru];
777 842 src = fetchurl {
778 843 url = "https://pypi.python.org/packages/bb/f0/e7d5e984cf6592fd2807dc7bc44a93f9d18e04e6a61f87fdfb2622422d74/infrae.cache-1.0.1.tar.gz";
779 844 md5 = "b09076a766747e6ed2a755cc62088e32";
780 845 };
781 846 meta = {
782 847 license = [ pkgs.lib.licenses.zpt21 ];
783 848 };
784 849 };
785 850 invoke = super.buildPythonPackage {
786 851 name = "invoke-0.13.0";
787 852 buildInputs = with self; [];
788 853 doCheck = false;
789 854 propagatedBuildInputs = with self; [];
790 855 src = fetchurl {
791 856 url = "https://pypi.python.org/packages/47/bf/d07ef52fa1ac645468858bbac7cb95b246a972a045e821493d17d89c81be/invoke-0.13.0.tar.gz";
792 857 md5 = "c0d1ed4bfb34eaab551662d8cfee6540";
793 858 };
794 859 meta = {
795 860 license = [ pkgs.lib.licenses.bsdOriginal ];
796 861 };
797 862 };
798 863 ipdb = super.buildPythonPackage {
799 864 name = "ipdb-0.10.1";
800 865 buildInputs = with self; [];
801 866 doCheck = false;
802 867 propagatedBuildInputs = with self; [ipython setuptools];
803 868 src = fetchurl {
804 869 url = "https://pypi.python.org/packages/eb/0a/0a37dc19572580336ad3813792c0d18c8d7117c2d66fc63c501f13a7a8f8/ipdb-0.10.1.tar.gz";
805 870 md5 = "4aeab65f633ddc98ebdb5eebf08dc713";
806 871 };
807 872 meta = {
808 873 license = [ pkgs.lib.licenses.bsdOriginal ];
809 874 };
810 875 };
811 876 ipython = super.buildPythonPackage {
812 877 name = "ipython-5.1.0";
813 878 buildInputs = with self; [];
814 879 doCheck = false;
815 880 propagatedBuildInputs = with self; [setuptools decorator pickleshare simplegeneric traitlets prompt-toolkit Pygments pexpect backports.shutil-get-terminal-size pathlib2 pexpect];
816 881 src = fetchurl {
817 882 url = "https://pypi.python.org/packages/89/63/a9292f7cd9d0090a0f995e1167f3f17d5889dcbc9a175261719c513b9848/ipython-5.1.0.tar.gz";
818 883 md5 = "47c8122420f65b58784cb4b9b4af35e3";
819 884 };
820 885 meta = {
821 886 license = [ pkgs.lib.licenses.bsdOriginal ];
822 887 };
823 888 };
824 889 ipython-genutils = super.buildPythonPackage {
825 890 name = "ipython-genutils-0.1.0";
826 891 buildInputs = with self; [];
827 892 doCheck = false;
828 893 propagatedBuildInputs = with self; [];
829 894 src = fetchurl {
830 895 url = "https://pypi.python.org/packages/71/b7/a64c71578521606edbbce15151358598f3dfb72a3431763edc2baf19e71f/ipython_genutils-0.1.0.tar.gz";
831 896 md5 = "9a8afbe0978adbcbfcb3b35b2d015a56";
832 897 };
833 898 meta = {
834 899 license = [ pkgs.lib.licenses.bsdOriginal ];
835 900 };
836 901 };
837 902 iso8601 = super.buildPythonPackage {
838 903 name = "iso8601-0.1.11";
839 904 buildInputs = with self; [];
840 905 doCheck = false;
841 906 propagatedBuildInputs = with self; [];
842 907 src = fetchurl {
843 908 url = "https://pypi.python.org/packages/c0/75/c9209ee4d1b5975eb8c2cba4428bde6b61bd55664a98290dd015cdb18e98/iso8601-0.1.11.tar.gz";
844 909 md5 = "b06d11cd14a64096f907086044f0fe38";
845 910 };
846 911 meta = {
847 912 license = [ pkgs.lib.licenses.mit ];
848 913 };
849 914 };
850 915 itsdangerous = super.buildPythonPackage {
851 916 name = "itsdangerous-0.24";
852 917 buildInputs = with self; [];
853 918 doCheck = false;
854 919 propagatedBuildInputs = with self; [];
855 920 src = fetchurl {
856 921 url = "https://pypi.python.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz";
857 922 md5 = "a3d55aa79369aef5345c036a8a26307f";
858 923 };
859 924 meta = {
860 925 license = [ pkgs.lib.licenses.bsdOriginal ];
861 926 };
862 927 };
928 jsonschema = super.buildPythonPackage {
929 name = "jsonschema-2.6.0";
930 buildInputs = with self; [];
931 doCheck = false;
932 propagatedBuildInputs = with self; [functools32];
933 src = fetchurl {
934 url = "https://pypi.python.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz";
935 md5 = "50c6b69a373a8b55ff1e0ec6e78f13f4";
936 };
937 meta = {
938 license = [ pkgs.lib.licenses.mit ];
939 };
940 };
941 jupyter-client = super.buildPythonPackage {
942 name = "jupyter-client-5.0.0";
943 buildInputs = with self; [];
944 doCheck = false;
945 propagatedBuildInputs = with self; [traitlets jupyter-core pyzmq python-dateutil];
946 src = fetchurl {
947 url = "https://pypi.python.org/packages/e5/6f/65412ed462202b90134b7e761b0b7e7f949e07a549c1755475333727b3d0/jupyter_client-5.0.0.tar.gz";
948 md5 = "1acd331b5c9fb4d79dae9939e79f2426";
949 };
950 meta = {
951 license = [ pkgs.lib.licenses.bsdOriginal ];
952 };
953 };
954 jupyter-core = super.buildPythonPackage {
955 name = "jupyter-core-4.3.0";
956 buildInputs = with self; [];
957 doCheck = false;
958 propagatedBuildInputs = with self; [traitlets];
959 src = fetchurl {
960 url = "https://pypi.python.org/packages/2f/39/5138f975100ce14d150938df48a83cd852a3fd8e24b1244f4113848e69e2/jupyter_core-4.3.0.tar.gz";
961 md5 = "18819511a809afdeed9a995a9c27bcfb";
962 };
963 meta = {
964 license = [ pkgs.lib.licenses.bsdOriginal ];
965 };
966 };
863 967 kombu = super.buildPythonPackage {
864 968 name = "kombu-1.5.1";
865 969 buildInputs = with self; [];
866 970 doCheck = false;
867 971 propagatedBuildInputs = with self; [anyjson amqplib];
868 972 src = fetchurl {
869 973 url = "https://pypi.python.org/packages/19/53/74bf2a624644b45f0850a638752514fc10a8e1cbd738f10804951a6df3f5/kombu-1.5.1.tar.gz";
870 974 md5 = "50662f3c7e9395b3d0721fb75d100b63";
871 975 };
872 976 meta = {
873 977 license = [ pkgs.lib.licenses.bsdOriginal ];
874 978 };
875 979 };
876 980 lxml = super.buildPythonPackage {
877 981 name = "lxml-3.4.4";
878 982 buildInputs = with self; [];
879 983 doCheck = false;
880 984 propagatedBuildInputs = with self; [];
881 985 src = fetchurl {
882 986 url = "https://pypi.python.org/packages/63/c7/4f2a2a4ad6c6fa99b14be6b3c1cece9142e2d915aa7c43c908677afc8fa4/lxml-3.4.4.tar.gz";
883 987 md5 = "a9a65972afc173ec7a39c585f4eea69c";
884 988 };
885 989 meta = {
886 990 license = [ pkgs.lib.licenses.bsdOriginal ];
887 991 };
888 992 };
889 993 meld3 = super.buildPythonPackage {
890 994 name = "meld3-1.0.2";
891 995 buildInputs = with self; [];
892 996 doCheck = false;
893 997 propagatedBuildInputs = with self; [];
894 998 src = fetchurl {
895 999 url = "https://pypi.python.org/packages/45/a0/317c6422b26c12fe0161e936fc35f36552069ba8e6f7ecbd99bbffe32a5f/meld3-1.0.2.tar.gz";
896 1000 md5 = "3ccc78cd79cffd63a751ad7684c02c91";
897 1001 };
898 1002 meta = {
899 1003 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
900 1004 };
901 1005 };
1006 mistune = super.buildPythonPackage {
1007 name = "mistune-0.7.3";
1008 buildInputs = with self; [];
1009 doCheck = false;
1010 propagatedBuildInputs = with self; [];
1011 src = fetchurl {
1012 url = "https://pypi.python.org/packages/88/1e/be99791262b3a794332fda598a07c2749a433b9378586361ba9d8e824607/mistune-0.7.3.tar.gz";
1013 md5 = "4eba50bd121b83716fa4be6a4049004b";
1014 };
1015 meta = {
1016 license = [ pkgs.lib.licenses.bsdOriginal ];
1017 };
1018 };
902 1019 mock = super.buildPythonPackage {
903 1020 name = "mock-1.0.1";
904 1021 buildInputs = with self; [];
905 1022 doCheck = false;
906 1023 propagatedBuildInputs = with self; [];
907 1024 src = fetchurl {
908 1025 url = "https://pypi.python.org/packages/15/45/30273ee91feb60dabb8fbb2da7868520525f02cf910279b3047182feed80/mock-1.0.1.zip";
909 1026 md5 = "869f08d003c289a97c1a6610faf5e913";
910 1027 };
911 1028 meta = {
912 1029 license = [ pkgs.lib.licenses.bsdOriginal ];
913 1030 };
914 1031 };
915 1032 msgpack-python = super.buildPythonPackage {
916 1033 name = "msgpack-python-0.4.8";
917 1034 buildInputs = with self; [];
918 1035 doCheck = false;
919 1036 propagatedBuildInputs = with self; [];
920 1037 src = fetchurl {
921 1038 url = "https://pypi.python.org/packages/21/27/8a1d82041c7a2a51fcc73675875a5f9ea06c2663e02fcfeb708be1d081a0/msgpack-python-0.4.8.tar.gz";
922 1039 md5 = "dcd854fb41ee7584ebbf35e049e6be98";
923 1040 };
924 1041 meta = {
925 1042 license = [ pkgs.lib.licenses.asl20 ];
926 1043 };
927 1044 };
1045 nbconvert = super.buildPythonPackage {
1046 name = "nbconvert-5.1.1";
1047 buildInputs = with self; [];
1048 doCheck = false;
1049 propagatedBuildInputs = with self; [mistune Jinja2 Pygments traitlets jupyter-core nbformat entrypoints bleach pandocfilters testpath];
1050 src = fetchurl {
1051 url = "https://pypi.python.org/packages/95/58/df1c91f1658ee5df19097f915a1e71c91fc824a708d82d2b2e35f8b80e9a/nbconvert-5.1.1.tar.gz";
1052 md5 = "d0263fb03a44db2f94eea09a608ed813";
1053 };
1054 meta = {
1055 license = [ pkgs.lib.licenses.bsdOriginal ];
1056 };
1057 };
1058 nbformat = super.buildPythonPackage {
1059 name = "nbformat-4.3.0";
1060 buildInputs = with self; [];
1061 doCheck = false;
1062 propagatedBuildInputs = with self; [ipython-genutils traitlets jsonschema jupyter-core];
1063 src = fetchurl {
1064 url = "https://pypi.python.org/packages/f9/c5/89df4abf906f766727f976e170caa85b4f1c1d1feb1f45d716016e68e19f/nbformat-4.3.0.tar.gz";
1065 md5 = "9a00d20425914cd5ba5f97769d9963ca";
1066 };
1067 meta = {
1068 license = [ pkgs.lib.licenses.bsdOriginal ];
1069 };
1070 };
928 1071 nose = super.buildPythonPackage {
929 1072 name = "nose-1.3.6";
930 1073 buildInputs = with self; [];
931 1074 doCheck = false;
932 1075 propagatedBuildInputs = with self; [];
933 1076 src = fetchurl {
934 1077 url = "https://pypi.python.org/packages/70/c7/469e68148d17a0d3db5ed49150242fd70a74a8147b8f3f8b87776e028d99/nose-1.3.6.tar.gz";
935 1078 md5 = "0ca546d81ca8309080fc80cb389e7a16";
936 1079 };
937 1080 meta = {
938 1081 license = [ { fullName = "GNU Library or Lesser General Public License (LGPL)"; } { fullName = "GNU LGPL"; } ];
939 1082 };
940 1083 };
941 1084 objgraph = super.buildPythonPackage {
942 1085 name = "objgraph-2.0.0";
943 1086 buildInputs = with self; [];
944 1087 doCheck = false;
945 1088 propagatedBuildInputs = with self; [];
946 1089 src = fetchurl {
947 1090 url = "https://pypi.python.org/packages/d7/33/ace750b59247496ed769b170586c5def7202683f3d98e737b75b767ff29e/objgraph-2.0.0.tar.gz";
948 1091 md5 = "25b0d5e5adc74aa63ead15699614159c";
949 1092 };
950 1093 meta = {
951 1094 license = [ pkgs.lib.licenses.mit ];
952 1095 };
953 1096 };
954 1097 packaging = super.buildPythonPackage {
955 1098 name = "packaging-15.2";
956 1099 buildInputs = with self; [];
957 1100 doCheck = false;
958 1101 propagatedBuildInputs = with self; [];
959 1102 src = fetchurl {
960 1103 url = "https://pypi.python.org/packages/24/c4/185da1304f07047dc9e0c46c31db75c0351bd73458ac3efad7da3dbcfbe1/packaging-15.2.tar.gz";
961 1104 md5 = "c16093476f6ced42128bf610e5db3784";
962 1105 };
963 1106 meta = {
964 1107 license = [ pkgs.lib.licenses.asl20 ];
965 1108 };
966 1109 };
1110 pandocfilters = super.buildPythonPackage {
1111 name = "pandocfilters-1.4.1";
1112 buildInputs = with self; [];
1113 doCheck = false;
1114 propagatedBuildInputs = with self; [];
1115 src = fetchurl {
1116 url = "https://pypi.python.org/packages/e3/1f/21d1b7e8ca571e80b796c758d361fdf5554335ff138158654684bc5401d8/pandocfilters-1.4.1.tar.gz";
1117 md5 = "7680d9f9ec07397dd17f380ee3818b9d";
1118 };
1119 meta = {
1120 license = [ pkgs.lib.licenses.bsdOriginal ];
1121 };
1122 };
967 1123 paramiko = super.buildPythonPackage {
968 1124 name = "paramiko-1.15.1";
969 1125 buildInputs = with self; [];
970 1126 doCheck = false;
971 1127 propagatedBuildInputs = with self; [pycrypto ecdsa];
972 1128 src = fetchurl {
973 1129 url = "https://pypi.python.org/packages/04/2b/a22d2a560c1951abbbf95a0628e245945565f70dc082d9e784666887222c/paramiko-1.15.1.tar.gz";
974 1130 md5 = "48c274c3f9b1282932567b21f6acf3b5";
975 1131 };
976 1132 meta = {
977 1133 license = [ { fullName = "LGPL"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ];
978 1134 };
979 1135 };
980 1136 pathlib2 = super.buildPythonPackage {
981 1137 name = "pathlib2-2.1.0";
982 1138 buildInputs = with self; [];
983 1139 doCheck = false;
984 1140 propagatedBuildInputs = with self; [six];
985 1141 src = fetchurl {
986 1142 url = "https://pypi.python.org/packages/c9/27/8448b10d8440c08efeff0794adf7d0ed27adb98372c70c7b38f3947d4749/pathlib2-2.1.0.tar.gz";
987 1143 md5 = "38e4f58b4d69dfcb9edb49a54a8b28d2";
988 1144 };
989 1145 meta = {
990 1146 license = [ pkgs.lib.licenses.mit ];
991 1147 };
992 1148 };
993 1149 peppercorn = super.buildPythonPackage {
994 1150 name = "peppercorn-0.5";
995 1151 buildInputs = with self; [];
996 1152 doCheck = false;
997 1153 propagatedBuildInputs = with self; [];
998 1154 src = fetchurl {
999 1155 url = "https://pypi.python.org/packages/45/ec/a62ec317d1324a01567c5221b420742f094f05ee48097e5157d32be3755c/peppercorn-0.5.tar.gz";
1000 1156 md5 = "f08efbca5790019ab45d76b7244abd40";
1001 1157 };
1002 1158 meta = {
1003 1159 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1004 1160 };
1005 1161 };
1006 1162 pexpect = super.buildPythonPackage {
1007 1163 name = "pexpect-4.2.1";
1008 1164 buildInputs = with self; [];
1009 1165 doCheck = false;
1010 1166 propagatedBuildInputs = with self; [ptyprocess];
1011 1167 src = fetchurl {
1012 1168 url = "https://pypi.python.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz";
1013 1169 md5 = "3694410001a99dff83f0b500a1ca1c95";
1014 1170 };
1015 1171 meta = {
1016 1172 license = [ pkgs.lib.licenses.isc { fullName = "ISC License (ISCL)"; } ];
1017 1173 };
1018 1174 };
1019 1175 pickleshare = super.buildPythonPackage {
1020 1176 name = "pickleshare-0.7.4";
1021 1177 buildInputs = with self; [];
1022 1178 doCheck = false;
1023 1179 propagatedBuildInputs = with self; [pathlib2];
1024 1180 src = fetchurl {
1025 1181 url = "https://pypi.python.org/packages/69/fe/dd137d84daa0fd13a709e448138e310d9ea93070620c9db5454e234af525/pickleshare-0.7.4.tar.gz";
1026 1182 md5 = "6a9e5dd8dfc023031f6b7b3f824cab12";
1027 1183 };
1028 1184 meta = {
1029 1185 license = [ pkgs.lib.licenses.mit ];
1030 1186 };
1031 1187 };
1032 1188 prompt-toolkit = super.buildPythonPackage {
1033 name = "prompt-toolkit-1.0.9";
1189 name = "prompt-toolkit-1.0.13";
1034 1190 buildInputs = with self; [];
1035 1191 doCheck = false;
1036 1192 propagatedBuildInputs = with self; [six wcwidth];
1037 1193 src = fetchurl {
1038 url = "https://pypi.python.org/packages/83/14/5ac258da6c530eca02852ee25c7a9ff3ca78287bb4c198d0d0055845d856/prompt_toolkit-1.0.9.tar.gz";
1039 md5 = "a39f91a54308fb7446b1a421c11f227c";
1194 url = "https://pypi.python.org/packages/23/be/4876b52d5cc159cbd4b0ff6e7aa419a26470849a43a8f647857a4a24467b/prompt_toolkit-1.0.13.tar.gz";
1195 md5 = "427b496d2c147bd3819bc3a7f6e0d493";
1040 1196 };
1041 1197 meta = {
1042 1198 license = [ pkgs.lib.licenses.bsdOriginal ];
1043 1199 };
1044 1200 };
1045 1201 psutil = super.buildPythonPackage {
1046 1202 name = "psutil-4.3.1";
1047 1203 buildInputs = with self; [];
1048 1204 doCheck = false;
1049 1205 propagatedBuildInputs = with self; [];
1050 1206 src = fetchurl {
1051 1207 url = "https://pypi.python.org/packages/78/cc/f267a1371f229bf16db6a4e604428c3b032b823b83155bd33cef45e49a53/psutil-4.3.1.tar.gz";
1052 1208 md5 = "199a366dba829c88bddaf5b41d19ddc0";
1053 1209 };
1054 1210 meta = {
1055 1211 license = [ pkgs.lib.licenses.bsdOriginal ];
1056 1212 };
1057 1213 };
1058 1214 psycopg2 = super.buildPythonPackage {
1059 1215 name = "psycopg2-2.6.1";
1060 1216 buildInputs = with self; [];
1061 1217 doCheck = false;
1062 1218 propagatedBuildInputs = with self; [];
1063 1219 src = fetchurl {
1064 1220 url = "https://pypi.python.org/packages/86/fd/cc8315be63a41fe000cce20482a917e874cdc1151e62cb0141f5e55f711e/psycopg2-2.6.1.tar.gz";
1065 1221 md5 = "842b44f8c95517ed5b792081a2370da1";
1066 1222 };
1067 1223 meta = {
1068 1224 license = [ pkgs.lib.licenses.zpt21 { fullName = "GNU Library or Lesser General Public License (LGPL)"; } { fullName = "LGPL with exceptions or ZPL"; } ];
1069 1225 };
1070 1226 };
1071 1227 ptyprocess = super.buildPythonPackage {
1072 1228 name = "ptyprocess-0.5.1";
1073 1229 buildInputs = with self; [];
1074 1230 doCheck = false;
1075 1231 propagatedBuildInputs = with self; [];
1076 1232 src = fetchurl {
1077 1233 url = "https://pypi.python.org/packages/db/d7/b465161910f3d1cef593c5e002bff67e0384898f597f1a7fdc8db4c02bf6/ptyprocess-0.5.1.tar.gz";
1078 1234 md5 = "94e537122914cc9ec9c1eadcd36e73a1";
1079 1235 };
1080 1236 meta = {
1081 1237 license = [ ];
1082 1238 };
1083 1239 };
1084 1240 py = super.buildPythonPackage {
1085 1241 name = "py-1.4.31";
1086 1242 buildInputs = with self; [];
1087 1243 doCheck = false;
1088 1244 propagatedBuildInputs = with self; [];
1089 1245 src = fetchurl {
1090 1246 url = "https://pypi.python.org/packages/f4/9a/8dfda23f36600dd701c6722316ba8a3ab4b990261f83e7d3ffc6dfedf7ef/py-1.4.31.tar.gz";
1091 1247 md5 = "5d2c63c56dc3f2115ec35c066ecd582b";
1092 1248 };
1093 1249 meta = {
1094 1250 license = [ pkgs.lib.licenses.mit ];
1095 1251 };
1096 1252 };
1097 1253 py-bcrypt = super.buildPythonPackage {
1098 1254 name = "py-bcrypt-0.4";
1099 1255 buildInputs = with self; [];
1100 1256 doCheck = false;
1101 1257 propagatedBuildInputs = with self; [];
1102 1258 src = fetchurl {
1103 1259 url = "https://pypi.python.org/packages/68/b1/1c3068c5c4d2e35c48b38dcc865301ebfdf45f54507086ac65ced1fd3b3d/py-bcrypt-0.4.tar.gz";
1104 1260 md5 = "dd8b367d6b716a2ea2e72392525f4e36";
1105 1261 };
1106 1262 meta = {
1107 1263 license = [ pkgs.lib.licenses.bsdOriginal ];
1108 1264 };
1109 1265 };
1110 1266 py-gfm = super.buildPythonPackage {
1111 1267 name = "py-gfm-0.1.3";
1112 1268 buildInputs = with self; [];
1113 1269 doCheck = false;
1114 1270 propagatedBuildInputs = with self; [setuptools Markdown];
1115 1271 src = fetchurl {
1116 1272 url = "https://code.rhodecode.com/upstream/py-gfm/archive/0d66a19bc16e3d49de273c0f797d4e4781e8c0f2.tar.gz?md5=0d0d5385bfb629eea636a80b9c2bfd16";
1117 1273 md5 = "0d0d5385bfb629eea636a80b9c2bfd16";
1118 1274 };
1119 1275 meta = {
1120 1276 license = [ pkgs.lib.licenses.bsdOriginal ];
1121 1277 };
1122 1278 };
1123 1279 pycrypto = super.buildPythonPackage {
1124 1280 name = "pycrypto-2.6.1";
1125 1281 buildInputs = with self; [];
1126 1282 doCheck = false;
1127 1283 propagatedBuildInputs = with self; [];
1128 1284 src = fetchurl {
1129 1285 url = "https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz";
1130 1286 md5 = "55a61a054aa66812daf5161a0d5d7eda";
1131 1287 };
1132 1288 meta = {
1133 1289 license = [ pkgs.lib.licenses.publicDomain ];
1134 1290 };
1135 1291 };
1136 1292 pycurl = super.buildPythonPackage {
1137 1293 name = "pycurl-7.19.5";
1138 1294 buildInputs = with self; [];
1139 1295 doCheck = false;
1140 1296 propagatedBuildInputs = with self; [];
1141 1297 src = fetchurl {
1142 1298 url = "https://pypi.python.org/packages/6c/48/13bad289ef6f4869b1d8fc11ae54de8cfb3cc4a2eb9f7419c506f763be46/pycurl-7.19.5.tar.gz";
1143 1299 md5 = "47b4eac84118e2606658122104e62072";
1144 1300 };
1145 1301 meta = {
1146 1302 license = [ pkgs.lib.licenses.mit { fullName = "LGPL/MIT"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ];
1147 1303 };
1148 1304 };
1149 1305 pyflakes = super.buildPythonPackage {
1150 1306 name = "pyflakes-0.8.1";
1151 1307 buildInputs = with self; [];
1152 1308 doCheck = false;
1153 1309 propagatedBuildInputs = with self; [];
1154 1310 src = fetchurl {
1155 1311 url = "https://pypi.python.org/packages/75/22/a90ec0252f4f87f3ffb6336504de71fe16a49d69c4538dae2f12b9360a38/pyflakes-0.8.1.tar.gz";
1156 1312 md5 = "905fe91ad14b912807e8fdc2ac2e2c23";
1157 1313 };
1158 1314 meta = {
1159 1315 license = [ pkgs.lib.licenses.mit ];
1160 1316 };
1161 1317 };
1162 1318 pygments-markdown-lexer = super.buildPythonPackage {
1163 1319 name = "pygments-markdown-lexer-0.1.0.dev39";
1164 1320 buildInputs = with self; [];
1165 1321 doCheck = false;
1166 1322 propagatedBuildInputs = with self; [Pygments];
1167 1323 src = fetchurl {
1168 1324 url = "https://pypi.python.org/packages/c3/12/674cdee66635d638cedb2c5d9c85ce507b7b2f91bdba29e482f1b1160ff6/pygments-markdown-lexer-0.1.0.dev39.zip";
1169 1325 md5 = "6360fe0f6d1f896e35b7a0142ce6459c";
1170 1326 };
1171 1327 meta = {
1172 1328 license = [ pkgs.lib.licenses.asl20 ];
1173 1329 };
1174 1330 };
1175 1331 pyparsing = super.buildPythonPackage {
1176 1332 name = "pyparsing-1.5.7";
1177 1333 buildInputs = with self; [];
1178 1334 doCheck = false;
1179 1335 propagatedBuildInputs = with self; [];
1180 1336 src = fetchurl {
1181 1337 url = "https://pypi.python.org/packages/2e/26/e8fb5b4256a5f5036be7ce115ef8db8d06bc537becfbdc46c6af008314ee/pyparsing-1.5.7.zip";
1182 1338 md5 = "b86854857a368d6ccb4d5b6e76d0637f";
1183 1339 };
1184 1340 meta = {
1185 1341 license = [ pkgs.lib.licenses.mit ];
1186 1342 };
1187 1343 };
1188 1344 pyramid = super.buildPythonPackage {
1189 1345 name = "pyramid-1.7.4";
1190 1346 buildInputs = with self; [];
1191 1347 doCheck = false;
1192 1348 propagatedBuildInputs = with self; [setuptools WebOb repoze.lru zope.interface zope.deprecation venusian translationstring PasteDeploy];
1193 1349 src = fetchurl {
1194 1350 url = "https://pypi.python.org/packages/33/91/55f5c661f8923902cd1f68d75f2b937c45e7682857356cf18f0be5493899/pyramid-1.7.4.tar.gz";
1195 1351 md5 = "6ef1dfdcff9136d04490410757c4c446";
1196 1352 };
1197 1353 meta = {
1198 1354 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1199 1355 };
1200 1356 };
1201 1357 pyramid-beaker = super.buildPythonPackage {
1202 1358 name = "pyramid-beaker-0.8";
1203 1359 buildInputs = with self; [];
1204 1360 doCheck = false;
1205 1361 propagatedBuildInputs = with self; [pyramid Beaker];
1206 1362 src = fetchurl {
1207 1363 url = "https://pypi.python.org/packages/d9/6e/b85426e00fd3d57f4545f74e1c3828552d8700f13ededeef9233f7bca8be/pyramid_beaker-0.8.tar.gz";
1208 1364 md5 = "22f14be31b06549f80890e2c63a93834";
1209 1365 };
1210 1366 meta = {
1211 1367 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1212 1368 };
1213 1369 };
1214 1370 pyramid-debugtoolbar = super.buildPythonPackage {
1215 1371 name = "pyramid-debugtoolbar-3.0.5";
1216 1372 buildInputs = with self; [];
1217 1373 doCheck = false;
1218 1374 propagatedBuildInputs = with self; [pyramid pyramid-mako repoze.lru Pygments];
1219 1375 src = fetchurl {
1220 1376 url = "https://pypi.python.org/packages/64/0e/df00bfb55605900e7a2f7e4a18dd83575a6651688e297d5a0aa4c208fd7d/pyramid_debugtoolbar-3.0.5.tar.gz";
1221 1377 md5 = "aebab8c3bfdc6f89e4d3adc1d126538e";
1222 1378 };
1223 1379 meta = {
1224 1380 license = [ { fullName = "Repoze Public License"; } pkgs.lib.licenses.bsdOriginal ];
1225 1381 };
1226 1382 };
1227 1383 pyramid-jinja2 = super.buildPythonPackage {
1228 1384 name = "pyramid-jinja2-2.5";
1229 1385 buildInputs = with self; [];
1230 1386 doCheck = false;
1231 1387 propagatedBuildInputs = with self; [pyramid zope.deprecation Jinja2 MarkupSafe];
1232 1388 src = fetchurl {
1233 1389 url = "https://pypi.python.org/packages/a1/80/595e26ffab7deba7208676b6936b7e5a721875710f982e59899013cae1ed/pyramid_jinja2-2.5.tar.gz";
1234 1390 md5 = "07cb6547204ac5e6f0b22a954ccee928";
1235 1391 };
1236 1392 meta = {
1237 1393 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1238 1394 };
1239 1395 };
1240 1396 pyramid-mako = super.buildPythonPackage {
1241 1397 name = "pyramid-mako-1.0.2";
1242 1398 buildInputs = with self; [];
1243 1399 doCheck = false;
1244 1400 propagatedBuildInputs = with self; [pyramid Mako];
1245 1401 src = fetchurl {
1246 1402 url = "https://pypi.python.org/packages/f1/92/7e69bcf09676d286a71cb3bbb887b16595b96f9ba7adbdc239ffdd4b1eb9/pyramid_mako-1.0.2.tar.gz";
1247 1403 md5 = "ee25343a97eb76bd90abdc2a774eb48a";
1248 1404 };
1249 1405 meta = {
1250 1406 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1251 1407 };
1252 1408 };
1253 1409 pysqlite = super.buildPythonPackage {
1254 1410 name = "pysqlite-2.6.3";
1255 1411 buildInputs = with self; [];
1256 1412 doCheck = false;
1257 1413 propagatedBuildInputs = with self; [];
1258 1414 src = fetchurl {
1259 1415 url = "https://pypi.python.org/packages/5c/a6/1c429cd4c8069cf4bfbd0eb4d592b3f4042155a8202df83d7e9b93aa3dc2/pysqlite-2.6.3.tar.gz";
1260 1416 md5 = "7ff1cedee74646b50117acff87aa1cfa";
1261 1417 };
1262 1418 meta = {
1263 1419 license = [ { fullName = "zlib/libpng License"; } { fullName = "zlib/libpng license"; } ];
1264 1420 };
1265 1421 };
1266 1422 pytest = super.buildPythonPackage {
1267 1423 name = "pytest-3.0.5";
1268 1424 buildInputs = with self; [];
1269 1425 doCheck = false;
1270 1426 propagatedBuildInputs = with self; [py];
1271 1427 src = fetchurl {
1272 1428 url = "https://pypi.python.org/packages/a8/87/b7ca49efe52d2b4169f2bfc49aa5e384173c4619ea8e635f123a0dac5b75/pytest-3.0.5.tar.gz";
1273 1429 md5 = "cefd527b59332688bf5db4a10aa8a7cb";
1274 1430 };
1275 1431 meta = {
1276 1432 license = [ pkgs.lib.licenses.mit ];
1277 1433 };
1278 1434 };
1279 1435 pytest-catchlog = super.buildPythonPackage {
1280 1436 name = "pytest-catchlog-1.2.2";
1281 1437 buildInputs = with self; [];
1282 1438 doCheck = false;
1283 1439 propagatedBuildInputs = with self; [py pytest];
1284 1440 src = fetchurl {
1285 1441 url = "https://pypi.python.org/packages/f2/2b/2faccdb1a978fab9dd0bf31cca9f6847fbe9184a0bdcc3011ac41dd44191/pytest-catchlog-1.2.2.zip";
1286 1442 md5 = "09d890c54c7456c818102b7ff8c182c8";
1287 1443 };
1288 1444 meta = {
1289 1445 license = [ pkgs.lib.licenses.mit ];
1290 1446 };
1291 1447 };
1292 1448 pytest-cov = super.buildPythonPackage {
1293 1449 name = "pytest-cov-2.4.0";
1294 1450 buildInputs = with self; [];
1295 1451 doCheck = false;
1296 1452 propagatedBuildInputs = with self; [pytest coverage];
1297 1453 src = fetchurl {
1298 1454 url = "https://pypi.python.org/packages/00/c0/2bfd1fcdb9d407b8ac8185b1cb5ff458105c6b207a9a7f0e13032de9828f/pytest-cov-2.4.0.tar.gz";
1299 1455 md5 = "2fda09677d232acc99ec1b3c5831e33f";
1300 1456 };
1301 1457 meta = {
1302 1458 license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.mit ];
1303 1459 };
1304 1460 };
1305 1461 pytest-profiling = super.buildPythonPackage {
1306 1462 name = "pytest-profiling-1.2.2";
1307 1463 buildInputs = with self; [];
1308 1464 doCheck = false;
1309 1465 propagatedBuildInputs = with self; [six pytest gprof2dot];
1310 1466 src = fetchurl {
1311 1467 url = "https://pypi.python.org/packages/73/e8/804681323bac0bc45c520ec34185ba8469008942266d0074699b204835c1/pytest-profiling-1.2.2.tar.gz";
1312 1468 md5 = "0a16d7dda2d23b91e9730fa4558cf728";
1313 1469 };
1314 1470 meta = {
1315 1471 license = [ pkgs.lib.licenses.mit ];
1316 1472 };
1317 1473 };
1318 1474 pytest-runner = super.buildPythonPackage {
1319 1475 name = "pytest-runner-2.9";
1320 1476 buildInputs = with self; [];
1321 1477 doCheck = false;
1322 1478 propagatedBuildInputs = with self; [];
1323 1479 src = fetchurl {
1324 1480 url = "https://pypi.python.org/packages/11/d4/c335ddf94463e451109e3494e909765c3e5205787b772e3b25ee8601b86a/pytest-runner-2.9.tar.gz";
1325 1481 md5 = "2212a2e34404b0960b2fdc2c469247b2";
1326 1482 };
1327 1483 meta = {
1328 1484 license = [ pkgs.lib.licenses.mit ];
1329 1485 };
1330 1486 };
1331 1487 pytest-sugar = super.buildPythonPackage {
1332 1488 name = "pytest-sugar-0.7.1";
1333 1489 buildInputs = with self; [];
1334 1490 doCheck = false;
1335 1491 propagatedBuildInputs = with self; [pytest termcolor];
1336 1492 src = fetchurl {
1337 1493 url = "https://pypi.python.org/packages/03/97/05d988b4fa870e7373e8ee4582408543b9ca2bd35c3c67b569369c6f9c49/pytest-sugar-0.7.1.tar.gz";
1338 1494 md5 = "7400f7c11f3d572b2c2a3b60352d35fe";
1339 1495 };
1340 1496 meta = {
1341 1497 license = [ pkgs.lib.licenses.bsdOriginal ];
1342 1498 };
1343 1499 };
1344 1500 pytest-timeout = super.buildPythonPackage {
1345 1501 name = "pytest-timeout-1.2.0";
1346 1502 buildInputs = with self; [];
1347 1503 doCheck = false;
1348 1504 propagatedBuildInputs = with self; [pytest];
1349 1505 src = fetchurl {
1350 1506 url = "https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz";
1351 1507 md5 = "83607d91aa163562c7ee835da57d061d";
1352 1508 };
1353 1509 meta = {
1354 1510 license = [ pkgs.lib.licenses.mit { fullName = "DFSG approved"; } ];
1355 1511 };
1356 1512 };
1357 1513 python-dateutil = super.buildPythonPackage {
1358 name = "python-dateutil-1.5";
1514 name = "python-dateutil-2.1";
1359 1515 buildInputs = with self; [];
1360 1516 doCheck = false;
1361 propagatedBuildInputs = with self; [];
1517 propagatedBuildInputs = with self; [six];
1362 1518 src = fetchurl {
1363 url = "https://pypi.python.org/packages/b4/7c/df59c89a753eb33c7c44e1dd42de0e9bc2ccdd5a4d576e0bfad97cc280cb/python-dateutil-1.5.tar.gz";
1364 md5 = "0dcb1de5e5cad69490a3b6ab63f0cfa5";
1519 url = "https://pypi.python.org/packages/65/52/9c18dac21f174ad31b65e22d24297864a954e6fe65876eba3f5773d2da43/python-dateutil-2.1.tar.gz";
1520 md5 = "1534bb15cf311f07afaa3aacba1c028b";
1365 1521 };
1366 1522 meta = {
1367 license = [ pkgs.lib.licenses.psfl ];
1523 license = [ { fullName = "Simplified BSD"; } ];
1368 1524 };
1369 1525 };
1370 1526 python-editor = super.buildPythonPackage {
1371 1527 name = "python-editor-1.0.3";
1372 1528 buildInputs = with self; [];
1373 1529 doCheck = false;
1374 1530 propagatedBuildInputs = with self; [];
1375 1531 src = fetchurl {
1376 1532 url = "https://pypi.python.org/packages/65/1e/adf6e000ea5dc909aa420352d6ba37f16434c8a3c2fa030445411a1ed545/python-editor-1.0.3.tar.gz";
1377 1533 md5 = "0aca5f2ef176ce68e98a5b7e31372835";
1378 1534 };
1379 1535 meta = {
1380 1536 license = [ pkgs.lib.licenses.asl20 { fullName = "Apache"; } ];
1381 1537 };
1382 1538 };
1383 1539 python-ldap = super.buildPythonPackage {
1384 1540 name = "python-ldap-2.4.19";
1385 1541 buildInputs = with self; [];
1386 1542 doCheck = false;
1387 1543 propagatedBuildInputs = with self; [setuptools];
1388 1544 src = fetchurl {
1389 1545 url = "https://pypi.python.org/packages/42/81/1b64838c82e64f14d4e246ff00b52e650a35c012551b891ada2b85d40737/python-ldap-2.4.19.tar.gz";
1390 1546 md5 = "b941bf31d09739492aa19ef679e94ae3";
1391 1547 };
1392 1548 meta = {
1393 1549 license = [ pkgs.lib.licenses.psfl ];
1394 1550 };
1395 1551 };
1396 1552 python-memcached = super.buildPythonPackage {
1397 1553 name = "python-memcached-1.57";
1398 1554 buildInputs = with self; [];
1399 1555 doCheck = false;
1400 1556 propagatedBuildInputs = with self; [six];
1401 1557 src = fetchurl {
1402 1558 url = "https://pypi.python.org/packages/52/9d/eebc0dcbc5c7c66840ad207dfc1baa376dadb74912484bff73819cce01e6/python-memcached-1.57.tar.gz";
1403 1559 md5 = "de21f64b42b2d961f3d4ad7beb5468a1";
1404 1560 };
1405 1561 meta = {
1406 1562 license = [ pkgs.lib.licenses.psfl ];
1407 1563 };
1408 1564 };
1409 1565 python-pam = super.buildPythonPackage {
1410 1566 name = "python-pam-1.8.2";
1411 1567 buildInputs = with self; [];
1412 1568 doCheck = false;
1413 1569 propagatedBuildInputs = with self; [];
1414 1570 src = fetchurl {
1415 1571 url = "https://pypi.python.org/packages/de/8c/f8f5d38b4f26893af267ea0b39023d4951705ab0413a39e0cf7cf4900505/python-pam-1.8.2.tar.gz";
1416 1572 md5 = "db71b6b999246fb05d78ecfbe166629d";
1417 1573 };
1418 1574 meta = {
1419 1575 license = [ { fullName = "License :: OSI Approved :: MIT License"; } pkgs.lib.licenses.mit ];
1420 1576 };
1421 1577 };
1422 1578 pytz = super.buildPythonPackage {
1423 1579 name = "pytz-2015.4";
1424 1580 buildInputs = with self; [];
1425 1581 doCheck = false;
1426 1582 propagatedBuildInputs = with self; [];
1427 1583 src = fetchurl {
1428 1584 url = "https://pypi.python.org/packages/7e/1a/f43b5c92df7b156822030fed151327ea096bcf417e45acc23bd1df43472f/pytz-2015.4.zip";
1429 1585 md5 = "233f2a2b370d03f9b5911700cc9ebf3c";
1430 1586 };
1431 1587 meta = {
1432 1588 license = [ pkgs.lib.licenses.mit ];
1433 1589 };
1434 1590 };
1435 1591 pyzmq = super.buildPythonPackage {
1436 1592 name = "pyzmq-14.6.0";
1437 1593 buildInputs = with self; [];
1438 1594 doCheck = false;
1439 1595 propagatedBuildInputs = with self; [];
1440 1596 src = fetchurl {
1441 1597 url = "https://pypi.python.org/packages/8a/3b/5463d5a9d712cd8bbdac335daece0d69f6a6792da4e3dd89956c0db4e4e6/pyzmq-14.6.0.tar.gz";
1442 1598 md5 = "395b5de95a931afa5b14c9349a5b8024";
1443 1599 };
1444 1600 meta = {
1445 1601 license = [ pkgs.lib.licenses.bsdOriginal { fullName = "LGPL+BSD"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ];
1446 1602 };
1447 1603 };
1448 1604 recaptcha-client = super.buildPythonPackage {
1449 1605 name = "recaptcha-client-1.0.6";
1450 1606 buildInputs = with self; [];
1451 1607 doCheck = false;
1452 1608 propagatedBuildInputs = with self; [];
1453 1609 src = fetchurl {
1454 1610 url = "https://pypi.python.org/packages/0a/ea/5f2fbbfd894bdac1c68ef8d92019066cfcf9fbff5fe3d728d2b5c25c8db4/recaptcha-client-1.0.6.tar.gz";
1455 1611 md5 = "74228180f7e1fb76c4d7089160b0d919";
1456 1612 };
1457 1613 meta = {
1458 1614 license = [ { fullName = "MIT/X11"; } ];
1459 1615 };
1460 1616 };
1461 1617 repoze.lru = super.buildPythonPackage {
1462 1618 name = "repoze.lru-0.6";
1463 1619 buildInputs = with self; [];
1464 1620 doCheck = false;
1465 1621 propagatedBuildInputs = with self; [];
1466 1622 src = fetchurl {
1467 1623 url = "https://pypi.python.org/packages/6e/1e/aa15cc90217e086dc8769872c8778b409812ff036bf021b15795638939e4/repoze.lru-0.6.tar.gz";
1468 1624 md5 = "2c3b64b17a8e18b405f55d46173e14dd";
1469 1625 };
1470 1626 meta = {
1471 1627 license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1472 1628 };
1473 1629 };
1474 1630 requests = super.buildPythonPackage {
1475 1631 name = "requests-2.9.1";
1476 1632 buildInputs = with self; [];
1477 1633 doCheck = false;
1478 1634 propagatedBuildInputs = with self; [];
1479 1635 src = fetchurl {
1480 1636 url = "https://pypi.python.org/packages/f9/6d/07c44fb1ebe04d069459a189e7dab9e4abfe9432adcd4477367c25332748/requests-2.9.1.tar.gz";
1481 1637 md5 = "0b7f480d19012ec52bab78292efd976d";
1482 1638 };
1483 1639 meta = {
1484 1640 license = [ pkgs.lib.licenses.asl20 ];
1485 1641 };
1486 1642 };
1487 1643 rhodecode-enterprise-ce = super.buildPythonPackage {
1488 1644 name = "rhodecode-enterprise-ce-4.7.0";
1489 1645 buildInputs = with self; [pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage cssselect lxml configobj];
1490 1646 doCheck = true;
1491 propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments pygments-markdown-lexer Pylons Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson subprocess32 waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt];
1647 propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments pygments-markdown-lexer Pylons Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python nbconvert packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson subprocess32 waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt];
1492 1648 src = ./.;
1493 1649 meta = {
1494 1650 license = [ { fullName = "Affero GNU General Public License v3 or later (AGPLv3+)"; } { fullName = "AGPLv3, and Commercial License"; } ];
1495 1651 };
1496 1652 };
1497 1653 rhodecode-tools = super.buildPythonPackage {
1498 1654 name = "rhodecode-tools-0.11.0";
1499 1655 buildInputs = with self; [];
1500 1656 doCheck = false;
1501 1657 propagatedBuildInputs = with self; [click future six Mako MarkupSafe requests elasticsearch elasticsearch-dsl urllib3 Whoosh];
1502 1658 src = fetchurl {
1503 1659 url = "https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.11.0.tar.gz?md5=e5fd0a8363af08a0ced71b50ca9cce15";
1504 1660 md5 = "e5fd0a8363af08a0ced71b50ca9cce15";
1505 1661 };
1506 1662 meta = {
1507 1663 license = [ { fullName = "AGPLv3 and Proprietary"; } ];
1508 1664 };
1509 1665 };
1510 1666 setproctitle = super.buildPythonPackage {
1511 1667 name = "setproctitle-1.1.8";
1512 1668 buildInputs = with self; [];
1513 1669 doCheck = false;
1514 1670 propagatedBuildInputs = with self; [];
1515 1671 src = fetchurl {
1516 1672 url = "https://pypi.python.org/packages/33/c3/ad367a4f4f1ca90468863ae727ac62f6edb558fc09a003d344a02cfc6ea6/setproctitle-1.1.8.tar.gz";
1517 1673 md5 = "728f4c8c6031bbe56083a48594027edd";
1518 1674 };
1519 1675 meta = {
1520 1676 license = [ pkgs.lib.licenses.bsdOriginal ];
1521 1677 };
1522 1678 };
1523 1679 setuptools = super.buildPythonPackage {
1524 1680 name = "setuptools-30.1.0";
1525 1681 buildInputs = with self; [];
1526 1682 doCheck = false;
1527 1683 propagatedBuildInputs = with self; [];
1528 1684 src = fetchurl {
1529 1685 url = "https://pypi.python.org/packages/1e/43/002c8616db9a3e7be23c2556e39b90a32bb40ba0dc652de1999d5334d372/setuptools-30.1.0.tar.gz";
1530 1686 md5 = "cac497f42e5096ac8df29e38d3f81c3e";
1531 1687 };
1532 1688 meta = {
1533 1689 license = [ pkgs.lib.licenses.mit ];
1534 1690 };
1535 1691 };
1536 1692 setuptools-scm = super.buildPythonPackage {
1537 1693 name = "setuptools-scm-1.15.0";
1538 1694 buildInputs = with self; [];
1539 1695 doCheck = false;
1540 1696 propagatedBuildInputs = with self; [];
1541 1697 src = fetchurl {
1542 1698 url = "https://pypi.python.org/packages/80/b7/31b6ae5fcb188e37f7e31abe75f9be90490a5456a72860fa6e643f8a3cbc/setuptools_scm-1.15.0.tar.gz";
1543 1699 md5 = "b6916c78ed6253d6602444fad4279c5b";
1544 1700 };
1545 1701 meta = {
1546 1702 license = [ pkgs.lib.licenses.mit ];
1547 1703 };
1548 1704 };
1549 1705 simplegeneric = super.buildPythonPackage {
1550 1706 name = "simplegeneric-0.8.1";
1551 1707 buildInputs = with self; [];
1552 1708 doCheck = false;
1553 1709 propagatedBuildInputs = with self; [];
1554 1710 src = fetchurl {
1555 1711 url = "https://pypi.python.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip";
1556 1712 md5 = "f9c1fab00fd981be588fc32759f474e3";
1557 1713 };
1558 1714 meta = {
1559 1715 license = [ pkgs.lib.licenses.zpt21 ];
1560 1716 };
1561 1717 };
1562 1718 simplejson = super.buildPythonPackage {
1563 1719 name = "simplejson-3.7.2";
1564 1720 buildInputs = with self; [];
1565 1721 doCheck = false;
1566 1722 propagatedBuildInputs = with self; [];
1567 1723 src = fetchurl {
1568 1724 url = "https://pypi.python.org/packages/6d/89/7f13f099344eea9d6722779a1f165087cb559598107844b1ac5dbd831fb1/simplejson-3.7.2.tar.gz";
1569 1725 md5 = "a5fc7d05d4cb38492285553def5d4b46";
1570 1726 };
1571 1727 meta = {
1572 1728 license = [ { fullName = "Academic Free License (AFL)"; } pkgs.lib.licenses.mit ];
1573 1729 };
1574 1730 };
1575 1731 six = super.buildPythonPackage {
1576 1732 name = "six-1.9.0";
1577 1733 buildInputs = with self; [];
1578 1734 doCheck = false;
1579 1735 propagatedBuildInputs = with self; [];
1580 1736 src = fetchurl {
1581 1737 url = "https://pypi.python.org/packages/16/64/1dc5e5976b17466fd7d712e59cbe9fb1e18bec153109e5ba3ed6c9102f1a/six-1.9.0.tar.gz";
1582 1738 md5 = "476881ef4012262dfc8adc645ee786c4";
1583 1739 };
1584 1740 meta = {
1585 1741 license = [ pkgs.lib.licenses.mit ];
1586 1742 };
1587 1743 };
1588 1744 subprocess32 = super.buildPythonPackage {
1589 1745 name = "subprocess32-3.2.6";
1590 1746 buildInputs = with self; [];
1591 1747 doCheck = false;
1592 1748 propagatedBuildInputs = with self; [];
1593 1749 src = fetchurl {
1594 1750 url = "https://pypi.python.org/packages/28/8d/33ccbff51053f59ae6c357310cac0e79246bbed1d345ecc6188b176d72c3/subprocess32-3.2.6.tar.gz";
1595 1751 md5 = "754c5ab9f533e764f931136974b618f1";
1596 1752 };
1597 1753 meta = {
1598 1754 license = [ pkgs.lib.licenses.psfl ];
1599 1755 };
1600 1756 };
1601 1757 supervisor = super.buildPythonPackage {
1602 1758 name = "supervisor-3.3.1";
1603 1759 buildInputs = with self; [];
1604 1760 doCheck = false;
1605 1761 propagatedBuildInputs = with self; [meld3];
1606 1762 src = fetchurl {
1607 1763 url = "https://pypi.python.org/packages/80/37/964c0d53cbd328796b1aeb7abea4c0f7b0e8c7197ea9b0b9967b7d004def/supervisor-3.3.1.tar.gz";
1608 1764 md5 = "202f760f9bf4930ec06557bac73e5cf2";
1609 1765 };
1610 1766 meta = {
1611 1767 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1612 1768 };
1613 1769 };
1614 1770 termcolor = super.buildPythonPackage {
1615 1771 name = "termcolor-1.1.0";
1616 1772 buildInputs = with self; [];
1617 1773 doCheck = false;
1618 1774 propagatedBuildInputs = with self; [];
1619 1775 src = fetchurl {
1620 1776 url = "https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz";
1621 1777 md5 = "043e89644f8909d462fbbfa511c768df";
1622 1778 };
1623 1779 meta = {
1624 1780 license = [ pkgs.lib.licenses.mit ];
1625 1781 };
1626 1782 };
1783 testpath = super.buildPythonPackage {
1784 name = "testpath-0.1";
1785 buildInputs = with self; [];
1786 doCheck = false;
1787 propagatedBuildInputs = with self; [];
1788 src = fetchurl {
1789 url = "https://pypi.python.org/packages/f9/c4/c0b22f35138bc26a6058c39cb61db1e8977e5e9550b12cd2cb02ef56fc51/testpath-0.1.tar.gz";
1790 md5 = "401918bcd0b0e5b71a9b909835117bc6";
1791 };
1792 meta = {
1793 license = [ pkgs.lib.licenses.mit ];
1794 };
1795 };
1627 1796 traitlets = super.buildPythonPackage {
1628 name = "traitlets-4.3.1";
1797 name = "traitlets-4.3.2";
1629 1798 buildInputs = with self; [];
1630 1799 doCheck = false;
1631 1800 propagatedBuildInputs = with self; [ipython-genutils six decorator enum34];
1632 1801 src = fetchurl {
1633 url = "https://pypi.python.org/packages/b1/d6/5b5aa6d5c474691909b91493da1e8972e309c9f01ecfe4aeafd272eb3234/traitlets-4.3.1.tar.gz";
1634 md5 = "dd0b1b6e5d31ce446d55a4b5e5083c98";
1802 url = "https://pypi.python.org/packages/a5/98/7f5ef2fe9e9e071813aaf9cb91d1a732e0a68b6c44a32b38cb8e14c3f069/traitlets-4.3.2.tar.gz";
1803 md5 = "3068663f2f38fd939a9eb3a500ccc154";
1635 1804 };
1636 1805 meta = {
1637 1806 license = [ pkgs.lib.licenses.bsdOriginal ];
1638 1807 };
1639 1808 };
1640 1809 transifex-client = super.buildPythonPackage {
1641 1810 name = "transifex-client-0.10";
1642 1811 buildInputs = with self; [];
1643 1812 doCheck = false;
1644 1813 propagatedBuildInputs = with self; [];
1645 1814 src = fetchurl {
1646 1815 url = "https://pypi.python.org/packages/f3/4e/7b925192aee656fb3e04fa6381c8b3dc40198047c3b4a356f6cfd642c809/transifex-client-0.10.tar.gz";
1647 1816 md5 = "5549538d84b8eede6b254cd81ae024fa";
1648 1817 };
1649 1818 meta = {
1650 1819 license = [ pkgs.lib.licenses.gpl2 ];
1651 1820 };
1652 1821 };
1653 1822 translationstring = super.buildPythonPackage {
1654 1823 name = "translationstring-1.3";
1655 1824 buildInputs = with self; [];
1656 1825 doCheck = false;
1657 1826 propagatedBuildInputs = with self; [];
1658 1827 src = fetchurl {
1659 1828 url = "https://pypi.python.org/packages/5e/eb/bee578cc150b44c653b63f5ebe258b5d0d812ddac12497e5f80fcad5d0b4/translationstring-1.3.tar.gz";
1660 1829 md5 = "a4b62e0f3c189c783a1685b3027f7c90";
1661 1830 };
1662 1831 meta = {
1663 1832 license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ];
1664 1833 };
1665 1834 };
1666 1835 trollius = super.buildPythonPackage {
1667 1836 name = "trollius-1.0.4";
1668 1837 buildInputs = with self; [];
1669 1838 doCheck = false;
1670 1839 propagatedBuildInputs = with self; [futures];
1671 1840 src = fetchurl {
1672 1841 url = "https://pypi.python.org/packages/aa/e6/4141db437f55e6ee7a3fb69663239e3fde7841a811b4bef293145ad6c836/trollius-1.0.4.tar.gz";
1673 1842 md5 = "3631a464d49d0cbfd30ab2918ef2b783";
1674 1843 };
1675 1844 meta = {
1676 1845 license = [ pkgs.lib.licenses.asl20 ];
1677 1846 };
1678 1847 };
1679 1848 uWSGI = super.buildPythonPackage {
1680 1849 name = "uWSGI-2.0.11.2";
1681 1850 buildInputs = with self; [];
1682 1851 doCheck = false;
1683 1852 propagatedBuildInputs = with self; [];
1684 1853 src = fetchurl {
1685 1854 url = "https://pypi.python.org/packages/9b/78/918db0cfab0546afa580c1e565209c49aaf1476bbfe491314eadbe47c556/uwsgi-2.0.11.2.tar.gz";
1686 1855 md5 = "1f02dcbee7f6f61de4b1fd68350cf16f";
1687 1856 };
1688 1857 meta = {
1689 1858 license = [ pkgs.lib.licenses.gpl2 ];
1690 1859 };
1691 1860 };
1692 1861 urllib3 = super.buildPythonPackage {
1693 1862 name = "urllib3-1.16";
1694 1863 buildInputs = with self; [];
1695 1864 doCheck = false;
1696 1865 propagatedBuildInputs = with self; [];
1697 1866 src = fetchurl {
1698 1867 url = "https://pypi.python.org/packages/3b/f0/e763169124e3f5db0926bc3dbfcd580a105f9ca44cf5d8e6c7a803c9f6b5/urllib3-1.16.tar.gz";
1699 1868 md5 = "fcaab1c5385c57deeb7053d3d7d81d59";
1700 1869 };
1701 1870 meta = {
1702 1871 license = [ pkgs.lib.licenses.mit ];
1703 1872 };
1704 1873 };
1705 1874 venusian = super.buildPythonPackage {
1706 1875 name = "venusian-1.0";
1707 1876 buildInputs = with self; [];
1708 1877 doCheck = false;
1709 1878 propagatedBuildInputs = with self; [];
1710 1879 src = fetchurl {
1711 1880 url = "https://pypi.python.org/packages/86/20/1948e0dfc4930ddde3da8c33612f6a5717c0b4bc28f591a5c5cf014dd390/venusian-1.0.tar.gz";
1712 1881 md5 = "dccf2eafb7113759d60c86faf5538756";
1713 1882 };
1714 1883 meta = {
1715 1884 license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ];
1716 1885 };
1717 1886 };
1718 1887 waitress = super.buildPythonPackage {
1719 1888 name = "waitress-1.0.1";
1720 1889 buildInputs = with self; [];
1721 1890 doCheck = false;
1722 1891 propagatedBuildInputs = with self; [];
1723 1892 src = fetchurl {
1724 1893 url = "https://pypi.python.org/packages/78/7d/84d11b96c3f60164dec3bef4a859a03aeae0231aa93f57fbe0d05fa4ff36/waitress-1.0.1.tar.gz";
1725 1894 md5 = "dda92358a7569669086155923a46e57c";
1726 1895 };
1727 1896 meta = {
1728 1897 license = [ pkgs.lib.licenses.zpt21 ];
1729 1898 };
1730 1899 };
1731 1900 wcwidth = super.buildPythonPackage {
1732 1901 name = "wcwidth-0.1.7";
1733 1902 buildInputs = with self; [];
1734 1903 doCheck = false;
1735 1904 propagatedBuildInputs = with self; [];
1736 1905 src = fetchurl {
1737 1906 url = "https://pypi.python.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz";
1738 1907 md5 = "b3b6a0a08f0c8a34d1de8cf44150a4ad";
1739 1908 };
1740 1909 meta = {
1741 1910 license = [ pkgs.lib.licenses.mit ];
1742 1911 };
1743 1912 };
1744 1913 ws4py = super.buildPythonPackage {
1745 1914 name = "ws4py-0.3.5";
1746 1915 buildInputs = with self; [];
1747 1916 doCheck = false;
1748 1917 propagatedBuildInputs = with self; [];
1749 1918 src = fetchurl {
1750 1919 url = "https://pypi.python.org/packages/b6/4f/34af703be86939629479e74d6e650e39f3bd73b3b09212c34e5125764cbc/ws4py-0.3.5.zip";
1751 1920 md5 = "a261b75c20b980e55ce7451a3576a867";
1752 1921 };
1753 1922 meta = {
1754 1923 license = [ pkgs.lib.licenses.bsdOriginal ];
1755 1924 };
1756 1925 };
1757 1926 wsgiref = super.buildPythonPackage {
1758 1927 name = "wsgiref-0.1.2";
1759 1928 buildInputs = with self; [];
1760 1929 doCheck = false;
1761 1930 propagatedBuildInputs = with self; [];
1762 1931 src = fetchurl {
1763 1932 url = "https://pypi.python.org/packages/41/9e/309259ce8dff8c596e8c26df86dbc4e848b9249fd36797fd60be456f03fc/wsgiref-0.1.2.zip";
1764 1933 md5 = "29b146e6ebd0f9fb119fe321f7bcf6cb";
1765 1934 };
1766 1935 meta = {
1767 1936 license = [ { fullName = "PSF or ZPL"; } ];
1768 1937 };
1769 1938 };
1770 1939 zope.cachedescriptors = super.buildPythonPackage {
1771 1940 name = "zope.cachedescriptors-4.0.0";
1772 1941 buildInputs = with self; [];
1773 1942 doCheck = false;
1774 1943 propagatedBuildInputs = with self; [setuptools];
1775 1944 src = fetchurl {
1776 1945 url = "https://pypi.python.org/packages/40/33/694b6644c37f28553f4b9f20b3c3a20fb709a22574dff20b5bdffb09ecd5/zope.cachedescriptors-4.0.0.tar.gz";
1777 1946 md5 = "8d308de8c936792c8e758058fcb7d0f0";
1778 1947 };
1779 1948 meta = {
1780 1949 license = [ pkgs.lib.licenses.zpt21 ];
1781 1950 };
1782 1951 };
1783 1952 zope.deprecation = super.buildPythonPackage {
1784 1953 name = "zope.deprecation-4.1.2";
1785 1954 buildInputs = with self; [];
1786 1955 doCheck = false;
1787 1956 propagatedBuildInputs = with self; [setuptools];
1788 1957 src = fetchurl {
1789 1958 url = "https://pypi.python.org/packages/c1/d3/3919492d5e57d8dd01b36f30b34fc8404a30577392b1eb817c303499ad20/zope.deprecation-4.1.2.tar.gz";
1790 1959 md5 = "e9a663ded58f4f9f7881beb56cae2782";
1791 1960 };
1792 1961 meta = {
1793 1962 license = [ pkgs.lib.licenses.zpt21 ];
1794 1963 };
1795 1964 };
1796 1965 zope.event = super.buildPythonPackage {
1797 1966 name = "zope.event-4.0.3";
1798 1967 buildInputs = with self; [];
1799 1968 doCheck = false;
1800 1969 propagatedBuildInputs = with self; [setuptools];
1801 1970 src = fetchurl {
1802 1971 url = "https://pypi.python.org/packages/c1/29/91ba884d7d6d96691df592e9e9c2bfa57a47040ec1ff47eff18c85137152/zope.event-4.0.3.tar.gz";
1803 1972 md5 = "9a3780916332b18b8b85f522bcc3e249";
1804 1973 };
1805 1974 meta = {
1806 1975 license = [ pkgs.lib.licenses.zpt21 ];
1807 1976 };
1808 1977 };
1809 1978 zope.interface = super.buildPythonPackage {
1810 1979 name = "zope.interface-4.1.3";
1811 1980 buildInputs = with self; [];
1812 1981 doCheck = false;
1813 1982 propagatedBuildInputs = with self; [setuptools];
1814 1983 src = fetchurl {
1815 1984 url = "https://pypi.python.org/packages/9d/81/2509ca3c6f59080123c1a8a97125eb48414022618cec0e64eb1313727bfe/zope.interface-4.1.3.tar.gz";
1816 1985 md5 = "9ae3d24c0c7415deb249dd1a132f0f79";
1817 1986 };
1818 1987 meta = {
1819 1988 license = [ pkgs.lib.licenses.zpt21 ];
1820 1989 };
1821 1990 };
1822 1991
1823 1992 ### Test requirements
1824 1993
1825 1994
1826 1995 }
@@ -1,127 +1,134 b''
1 1 ## core
2 2 setuptools==30.1.0
3 3 setuptools-scm==1.15.0
4 4
5 5 amqplib==1.0.2
6 6 anyjson==0.3.3
7 7 authomatic==0.1.0.post1
8 8 Babel==1.3
9 9 backport-ipaddress==0.1
10 10 Beaker==1.7.0
11 11 celery==2.2.10
12 12 Chameleon==2.24
13 13 channelstream==0.5.2
14 14 click==5.1
15 15 colander==1.2
16 16 configobj==5.0.6
17 17 decorator==3.4.2
18 18 deform==2.0a2
19 19 docutils==0.12
20 20 dogpile.cache==0.6.1
21 21 dogpile.core==0.4.1
22 22 ecdsa==0.11
23 23 FormEncode==1.2.4
24 24 future==0.14.3
25 25 futures==3.0.2
26 26 gnureadline==6.3.3
27 27 infrae.cache==1.0.1
28 28 iso8601==0.1.11
29 29 itsdangerous==0.24
30 30 Jinja2==2.7.3
31 31 kombu==1.5.1
32 32 Mako==1.0.6
33 33 Markdown==2.6.7
34 34 MarkupSafe==0.23
35 35 meld3==1.0.2
36 36 msgpack-python==0.4.8
37 37 MySQL-python==1.2.5
38 38 nose==1.3.6
39 39 objgraph==2.0.0
40 40 packaging==15.2
41 41 paramiko==1.15.1
42 42 Paste==2.0.3
43 43 PasteDeploy==1.5.2
44 44 PasteScript==1.7.5
45 pathlib2==2.1.0
45 46 psutil==4.3.1
46 47 psycopg2==2.6.1
47 48 py-bcrypt==0.4
48 49 pycrypto==2.6.1
49 50 pycurl==7.19.5
50 51 pyflakes==0.8.1
51 52 pygments-markdown-lexer==0.1.0.dev39
52 53 Pygments==2.2.0
53 54 pyparsing==1.5.7
54 55 pyramid-beaker==0.8
55 56 pyramid-debugtoolbar==3.0.5
56 57 pyramid-jinja2==2.5
57 58 pyramid-mako==1.0.2
58 59 pyramid==1.7.4
59 60 pysqlite==2.6.3
60 python-dateutil==1.5
61 python-dateutil==2.1
61 62 python-ldap==2.4.19
62 63 python-memcached==1.57
63 64 python-pam==1.8.2
64 65 pytz==2015.4
65 66 pyzmq==14.6.0
66 67 recaptcha-client==1.0.6
67 68 repoze.lru==0.6
68 69 requests==2.9.1
69 70 Routes==1.13
70 71 setproctitle==1.1.8
71 72 simplejson==3.7.2
72 73 six==1.9.0
73 74 Sphinx==1.2.2
74 75 SQLAlchemy==0.9.9
75 76 subprocess32==3.2.6
76 77 supervisor==3.3.1
77 78 Tempita==0.5.2
78 79 translationstring==1.3
79 80 trollius==1.0.4
80 81 urllib3==1.16
81 82 URLObject==2.4.0
82 83 venusian==1.0
83 84 WebError==0.10.3
84 85 WebHelpers2==2.0
85 86 WebHelpers==1.3
86 87 WebOb==1.3.1
87 88 Whoosh==2.7.4
88 89 wsgiref==0.1.2
89 90 zope.cachedescriptors==4.0.0
90 91 zope.deprecation==4.1.2
91 92 zope.event==4.0.3
92 93 zope.interface==4.1.3
93 94
94 95 ## customized/patched libs
95 96 # our patched version of Pylons==1.0.2
96 97 https://code.rhodecode.com/upstream/pylons/archive/707354ee4261b9c10450404fc9852ccea4fd667d.tar.gz?md5=f26633726fa2cd3a340316ee6a5d218f#egg=Pylons==1.0.2.rhodecode-patch-1
97 98 # not released py-gfm==0.1.3
98 99 https://code.rhodecode.com/upstream/py-gfm/archive/0d66a19bc16e3d49de273c0f797d4e4781e8c0f2.tar.gz?md5=0d0d5385bfb629eea636a80b9c2bfd16#egg=py-gfm==0.1.3.rhodecode-upstream1
99 100
101 # IPYTHON RENDERING
102 # entrypoints backport, pypi version doesn't support egg installs
103 https://code.rhodecode.com/upstream/entrypoints/archive/96e6d645684e1af3d7df5b5272f3fe85a546b233.tar.gz?md5=7db37771aea9ac9fefe093e5d6987313#egg=entrypoints==0.2.2.rhodecode-upstream1
104 nbconvert==5.1.1
105 nbformat==4.3.0
106 jupyter_client==5.0.0
100 107
101 108 ## cli tools
102 109 alembic==0.8.4
103 110 invoke==0.13.0
104 111 bumpversion==0.5.3
105 112 transifex-client==0.10
106 113
107 114 ## http servers
108 115 gevent==1.1.2
109 116 greenlet==0.4.10
110 117 gunicorn==19.6.0
111 118 waitress==1.0.1
112 119 uWSGI==2.0.11.2
113 120
114 121 ## debug
115 122 ipdb==0.10.1
116 123 ipython==5.1.0
117 124 CProfileV==1.0.6
118 125 bottle==0.12.8
119 126
120 127 ## rhodecode-tools, special case
121 128 https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.11.0.tar.gz?md5=e5fd0a8363af08a0ced71b50ca9cce15#egg=rhodecode-tools==0.11.0
122 129
123 130 ## appenlight
124 131 appenlight-client==0.6.14
125 132
126 133 ## test related requirements
127 134 -r requirements_test.txt
@@ -1,2005 +1,2038 b''
1 1 # -*- coding: utf-8 -*-
2 2
3 3 # Copyright (C) 2010-2017 RhodeCode GmbH
4 4 #
5 5 # This program is free software: you can redistribute it and/or modify
6 6 # it under the terms of the GNU Affero General Public License, version 3
7 7 # (only), as published by the Free Software Foundation.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU Affero General Public License
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16 #
17 17 # This program is dual-licensed. If you wish to learn more about the
18 18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 20
21 21 """
22 22 Helper functions
23 23
24 24 Consists of functions to typically be used within templates, but also
25 25 available to Controllers. This module is available to both as 'h'.
26 26 """
27 27
28 28 import random
29 29 import hashlib
30 30 import StringIO
31 31 import urllib
32 32 import math
33 33 import logging
34 34 import re
35 35 import urlparse
36 36 import time
37 37 import string
38 38 import hashlib
39 39 import pygments
40 40 import itertools
41 41
42 42 from datetime import datetime
43 43 from functools import partial
44 44 from pygments.formatters.html import HtmlFormatter
45 45 from pygments import highlight as code_highlight
46 46 from pygments.lexers import (
47 47 get_lexer_by_name, get_lexer_for_filename, get_lexer_for_mimetype)
48 48 from pylons import url as pylons_url
49 49 from pylons.i18n.translation import _, ungettext
50 50 from pyramid.threadlocal import get_current_request
51 51
52 52 from webhelpers.html import literal, HTML, escape
53 53 from webhelpers.html.tools import *
54 54 from webhelpers.html.builder import make_tag
55 55 from webhelpers.html.tags import auto_discovery_link, checkbox, css_classes, \
56 56 end_form, file, form as wh_form, hidden, image, javascript_link, link_to, \
57 57 link_to_if, link_to_unless, ol, required_legend, select, stylesheet_link, \
58 58 submit, text, password, textarea, title, ul, xml_declaration, radio
59 59 from webhelpers.html.tools import auto_link, button_to, highlight, \
60 60 js_obfuscate, mail_to, strip_links, strip_tags, tag_re
61 61 from webhelpers.pylonslib import Flash as _Flash
62 62 from webhelpers.text import chop_at, collapse, convert_accented_entities, \
63 63 convert_misc_entities, lchop, plural, rchop, remove_formatting, \
64 64 replace_whitespace, urlify, truncate, wrap_paragraphs
65 65 from webhelpers.date import time_ago_in_words
66 66 from webhelpers.paginate import Page as _Page
67 67 from webhelpers.html.tags import _set_input_attrs, _set_id_attr, \
68 68 convert_boolean_attrs, NotGiven, _make_safe_id_component
69 69 from webhelpers2.number import format_byte_size
70 70
71 71 from rhodecode.lib.action_parser import action_parser
72 72 from rhodecode.lib.ext_json import json
73 73 from rhodecode.lib.utils import repo_name_slug, get_custom_lexer
74 74 from rhodecode.lib.utils2 import str2bool, safe_unicode, safe_str, \
75 75 get_commit_safe, datetime_to_time, time_to_datetime, time_to_utcdatetime, \
76 76 AttributeDict, safe_int, md5, md5_safe
77 77 from rhodecode.lib.markup_renderer import MarkupRenderer
78 78 from rhodecode.lib.vcs.exceptions import CommitDoesNotExistError
79 79 from rhodecode.lib.vcs.backends.base import BaseChangeset, EmptyCommit
80 80 from rhodecode.config.conf import DATE_FORMAT, DATETIME_FORMAT
81 81 from rhodecode.model.changeset_status import ChangesetStatusModel
82 82 from rhodecode.model.db import Permission, User, Repository
83 83 from rhodecode.model.repo_group import RepoGroupModel
84 84 from rhodecode.model.settings import IssueTrackerSettingsModel
85 85
86 86 log = logging.getLogger(__name__)
87 87
88 88
89 89 DEFAULT_USER = User.DEFAULT_USER
90 90 DEFAULT_USER_EMAIL = User.DEFAULT_USER_EMAIL
91 91
92 92
93 93 def url(*args, **kw):
94 94 return pylons_url(*args, **kw)
95 95
96 96
97 97 def pylons_url_current(*args, **kw):
98 98 """
99 99 This function overrides pylons.url.current() which returns the current
100 100 path so that it will also work from a pyramid only context. This
101 101 should be removed once port to pyramid is complete.
102 102 """
103 103 if not args and not kw:
104 104 request = get_current_request()
105 105 return request.path
106 106 return pylons_url.current(*args, **kw)
107 107
108 108 url.current = pylons_url_current
109 109
110 110
111 111 def url_replace(**qargs):
112 112 """ Returns the current request url while replacing query string args """
113 113
114 114 request = get_current_request()
115 115 new_args = request.GET.mixed()
116 116 new_args.update(qargs)
117 117 return url('', **new_args)
118 118
119 119
120 120 def asset(path, ver=None, **kwargs):
121 121 """
122 122 Helper to generate a static asset file path for rhodecode assets
123 123
124 124 eg. h.asset('images/image.png', ver='3923')
125 125
126 126 :param path: path of asset
127 127 :param ver: optional version query param to append as ?ver=
128 128 """
129 129 request = get_current_request()
130 130 query = {}
131 131 query.update(kwargs)
132 132 if ver:
133 133 query = {'ver': ver}
134 134 return request.static_path(
135 135 'rhodecode:public/{}'.format(path), _query=query)
136 136
137 137
138 138 default_html_escape_table = {
139 139 ord('&'): u'&amp;',
140 140 ord('<'): u'&lt;',
141 141 ord('>'): u'&gt;',
142 142 ord('"'): u'&quot;',
143 143 ord("'"): u'&#39;',
144 144 }
145 145
146 146
147 147 def html_escape(text, html_escape_table=default_html_escape_table):
148 148 """Produce entities within text."""
149 149 return text.translate(html_escape_table)
150 150
151 151
152 152 def chop_at_smart(s, sub, inclusive=False, suffix_if_chopped=None):
153 153 """
154 154 Truncate string ``s`` at the first occurrence of ``sub``.
155 155
156 156 If ``inclusive`` is true, truncate just after ``sub`` rather than at it.
157 157 """
158 158 suffix_if_chopped = suffix_if_chopped or ''
159 159 pos = s.find(sub)
160 160 if pos == -1:
161 161 return s
162 162
163 163 if inclusive:
164 164 pos += len(sub)
165 165
166 166 chopped = s[:pos]
167 167 left = s[pos:].strip()
168 168
169 169 if left and suffix_if_chopped:
170 170 chopped += suffix_if_chopped
171 171
172 172 return chopped
173 173
174 174
175 175 def shorter(text, size=20):
176 176 postfix = '...'
177 177 if len(text) > size:
178 178 return text[:size - len(postfix)] + postfix
179 179 return text
180 180
181 181
182 182 def _reset(name, value=None, id=NotGiven, type="reset", **attrs):
183 183 """
184 184 Reset button
185 185 """
186 186 _set_input_attrs(attrs, type, name, value)
187 187 _set_id_attr(attrs, id, name)
188 188 convert_boolean_attrs(attrs, ["disabled"])
189 189 return HTML.input(**attrs)
190 190
191 191 reset = _reset
192 192 safeid = _make_safe_id_component
193 193
194 194
195 195 def branding(name, length=40):
196 196 return truncate(name, length, indicator="")
197 197
198 198
199 199 def FID(raw_id, path):
200 200 """
201 201 Creates a unique ID for filenode based on it's hash of path and commit
202 202 it's safe to use in urls
203 203
204 204 :param raw_id:
205 205 :param path:
206 206 """
207 207
208 208 return 'c-%s-%s' % (short_id(raw_id), md5_safe(path)[:12])
209 209
210 210
211 211 class _GetError(object):
212 212 """Get error from form_errors, and represent it as span wrapped error
213 213 message
214 214
215 215 :param field_name: field to fetch errors for
216 216 :param form_errors: form errors dict
217 217 """
218 218
219 219 def __call__(self, field_name, form_errors):
220 220 tmpl = """<span class="error_msg">%s</span>"""
221 221 if form_errors and field_name in form_errors:
222 222 return literal(tmpl % form_errors.get(field_name))
223 223
224 224 get_error = _GetError()
225 225
226 226
227 227 class _ToolTip(object):
228 228
229 229 def __call__(self, tooltip_title, trim_at=50):
230 230 """
231 231 Special function just to wrap our text into nice formatted
232 232 autowrapped text
233 233
234 234 :param tooltip_title:
235 235 """
236 236 tooltip_title = escape(tooltip_title)
237 237 tooltip_title = tooltip_title.replace('<', '&lt;').replace('>', '&gt;')
238 238 return tooltip_title
239 239 tooltip = _ToolTip()
240 240
241 241
242 242 def files_breadcrumbs(repo_name, commit_id, file_path):
243 243 if isinstance(file_path, str):
244 244 file_path = safe_unicode(file_path)
245 245
246 246 # TODO: johbo: Is this always a url like path, or is this operating
247 247 # system dependent?
248 248 path_segments = file_path.split('/')
249 249
250 250 repo_name_html = escape(repo_name)
251 251 if len(path_segments) == 1 and path_segments[0] == '':
252 252 url_segments = [repo_name_html]
253 253 else:
254 254 url_segments = [
255 255 link_to(
256 256 repo_name_html,
257 257 url('files_home',
258 258 repo_name=repo_name,
259 259 revision=commit_id,
260 260 f_path=''),
261 261 class_='pjax-link')]
262 262
263 263 last_cnt = len(path_segments) - 1
264 264 for cnt, segment in enumerate(path_segments):
265 265 if not segment:
266 266 continue
267 267 segment_html = escape(segment)
268 268
269 269 if cnt != last_cnt:
270 270 url_segments.append(
271 271 link_to(
272 272 segment_html,
273 273 url('files_home',
274 274 repo_name=repo_name,
275 275 revision=commit_id,
276 276 f_path='/'.join(path_segments[:cnt + 1])),
277 277 class_='pjax-link'))
278 278 else:
279 279 url_segments.append(segment_html)
280 280
281 281 return literal('/'.join(url_segments))
282 282
283 283
284 284 class CodeHtmlFormatter(HtmlFormatter):
285 285 """
286 286 My code Html Formatter for source codes
287 287 """
288 288
289 289 def wrap(self, source, outfile):
290 290 return self._wrap_div(self._wrap_pre(self._wrap_code(source)))
291 291
292 292 def _wrap_code(self, source):
293 293 for cnt, it in enumerate(source):
294 294 i, t = it
295 295 t = '<div id="L%s">%s</div>' % (cnt + 1, t)
296 296 yield i, t
297 297
298 298 def _wrap_tablelinenos(self, inner):
299 299 dummyoutfile = StringIO.StringIO()
300 300 lncount = 0
301 301 for t, line in inner:
302 302 if t:
303 303 lncount += 1
304 304 dummyoutfile.write(line)
305 305
306 306 fl = self.linenostart
307 307 mw = len(str(lncount + fl - 1))
308 308 sp = self.linenospecial
309 309 st = self.linenostep
310 310 la = self.lineanchors
311 311 aln = self.anchorlinenos
312 312 nocls = self.noclasses
313 313 if sp:
314 314 lines = []
315 315
316 316 for i in range(fl, fl + lncount):
317 317 if i % st == 0:
318 318 if i % sp == 0:
319 319 if aln:
320 320 lines.append('<a href="#%s%d" class="special">%*d</a>' %
321 321 (la, i, mw, i))
322 322 else:
323 323 lines.append('<span class="special">%*d</span>' % (mw, i))
324 324 else:
325 325 if aln:
326 326 lines.append('<a href="#%s%d">%*d</a>' % (la, i, mw, i))
327 327 else:
328 328 lines.append('%*d' % (mw, i))
329 329 else:
330 330 lines.append('')
331 331 ls = '\n'.join(lines)
332 332 else:
333 333 lines = []
334 334 for i in range(fl, fl + lncount):
335 335 if i % st == 0:
336 336 if aln:
337 337 lines.append('<a href="#%s%d">%*d</a>' % (la, i, mw, i))
338 338 else:
339 339 lines.append('%*d' % (mw, i))
340 340 else:
341 341 lines.append('')
342 342 ls = '\n'.join(lines)
343 343
344 344 # in case you wonder about the seemingly redundant <div> here: since the
345 345 # content in the other cell also is wrapped in a div, some browsers in
346 346 # some configurations seem to mess up the formatting...
347 347 if nocls:
348 348 yield 0, ('<table class="%stable">' % self.cssclass +
349 349 '<tr><td><div class="linenodiv" '
350 350 'style="background-color: #f0f0f0; padding-right: 10px">'
351 351 '<pre style="line-height: 125%">' +
352 352 ls + '</pre></div></td><td id="hlcode" class="code">')
353 353 else:
354 354 yield 0, ('<table class="%stable">' % self.cssclass +
355 355 '<tr><td class="linenos"><div class="linenodiv"><pre>' +
356 356 ls + '</pre></div></td><td id="hlcode" class="code">')
357 357 yield 0, dummyoutfile.getvalue()
358 358 yield 0, '</td></tr></table>'
359 359
360 360
361 361 class SearchContentCodeHtmlFormatter(CodeHtmlFormatter):
362 362 def __init__(self, **kw):
363 363 # only show these line numbers if set
364 364 self.only_lines = kw.pop('only_line_numbers', [])
365 365 self.query_terms = kw.pop('query_terms', [])
366 366 self.max_lines = kw.pop('max_lines', 5)
367 367 self.line_context = kw.pop('line_context', 3)
368 368 self.url = kw.pop('url', None)
369 369
370 370 super(CodeHtmlFormatter, self).__init__(**kw)
371 371
372 372 def _wrap_code(self, source):
373 373 for cnt, it in enumerate(source):
374 374 i, t = it
375 375 t = '<pre>%s</pre>' % t
376 376 yield i, t
377 377
378 378 def _wrap_tablelinenos(self, inner):
379 379 yield 0, '<table class="code-highlight %stable">' % self.cssclass
380 380
381 381 last_shown_line_number = 0
382 382 current_line_number = 1
383 383
384 384 for t, line in inner:
385 385 if not t:
386 386 yield t, line
387 387 continue
388 388
389 389 if current_line_number in self.only_lines:
390 390 if last_shown_line_number + 1 != current_line_number:
391 391 yield 0, '<tr>'
392 392 yield 0, '<td class="line">...</td>'
393 393 yield 0, '<td id="hlcode" class="code"></td>'
394 394 yield 0, '</tr>'
395 395
396 396 yield 0, '<tr>'
397 397 if self.url:
398 398 yield 0, '<td class="line"><a href="%s#L%i">%i</a></td>' % (
399 399 self.url, current_line_number, current_line_number)
400 400 else:
401 401 yield 0, '<td class="line"><a href="">%i</a></td>' % (
402 402 current_line_number)
403 403 yield 0, '<td id="hlcode" class="code">' + line + '</td>'
404 404 yield 0, '</tr>'
405 405
406 406 last_shown_line_number = current_line_number
407 407
408 408 current_line_number += 1
409 409
410 410
411 411 yield 0, '</table>'
412 412
413 413
414 414 def extract_phrases(text_query):
415 415 """
416 416 Extracts phrases from search term string making sure phrases
417 417 contained in double quotes are kept together - and discarding empty values
418 418 or fully whitespace values eg.
419 419
420 420 'some text "a phrase" more' => ['some', 'text', 'a phrase', 'more']
421 421
422 422 """
423 423
424 424 in_phrase = False
425 425 buf = ''
426 426 phrases = []
427 427 for char in text_query:
428 428 if in_phrase:
429 429 if char == '"': # end phrase
430 430 phrases.append(buf)
431 431 buf = ''
432 432 in_phrase = False
433 433 continue
434 434 else:
435 435 buf += char
436 436 continue
437 437 else:
438 438 if char == '"': # start phrase
439 439 in_phrase = True
440 440 phrases.append(buf)
441 441 buf = ''
442 442 continue
443 443 elif char == ' ':
444 444 phrases.append(buf)
445 445 buf = ''
446 446 continue
447 447 else:
448 448 buf += char
449 449
450 450 phrases.append(buf)
451 451 phrases = [phrase.strip() for phrase in phrases if phrase.strip()]
452 452 return phrases
453 453
454 454
455 455 def get_matching_offsets(text, phrases):
456 456 """
457 457 Returns a list of string offsets in `text` that the list of `terms` match
458 458
459 459 >>> get_matching_offsets('some text here', ['some', 'here'])
460 460 [(0, 4), (10, 14)]
461 461
462 462 """
463 463 offsets = []
464 464 for phrase in phrases:
465 465 for match in re.finditer(phrase, text):
466 466 offsets.append((match.start(), match.end()))
467 467
468 468 return offsets
469 469
470 470
471 471 def normalize_text_for_matching(x):
472 472 """
473 473 Replaces all non alnum characters to spaces and lower cases the string,
474 474 useful for comparing two text strings without punctuation
475 475 """
476 476 return re.sub(r'[^\w]', ' ', x.lower())
477 477
478 478
479 479 def get_matching_line_offsets(lines, terms):
480 480 """ Return a set of `lines` indices (starting from 1) matching a
481 481 text search query, along with `context` lines above/below matching lines
482 482
483 483 :param lines: list of strings representing lines
484 484 :param terms: search term string to match in lines eg. 'some text'
485 485 :param context: number of lines above/below a matching line to add to result
486 486 :param max_lines: cut off for lines of interest
487 487 eg.
488 488
489 489 text = '''
490 490 words words words
491 491 words words words
492 492 some text some
493 493 words words words
494 494 words words words
495 495 text here what
496 496 '''
497 497 get_matching_line_offsets(text, 'text', context=1)
498 498 {3: [(5, 9)], 6: [(0, 4)]]
499 499
500 500 """
501 501 matching_lines = {}
502 502 phrases = [normalize_text_for_matching(phrase)
503 503 for phrase in extract_phrases(terms)]
504 504
505 505 for line_index, line in enumerate(lines, start=1):
506 506 match_offsets = get_matching_offsets(
507 507 normalize_text_for_matching(line), phrases)
508 508 if match_offsets:
509 509 matching_lines[line_index] = match_offsets
510 510
511 511 return matching_lines
512 512
513 513
514 514 def hsv_to_rgb(h, s, v):
515 515 """ Convert hsv color values to rgb """
516 516
517 517 if s == 0.0:
518 518 return v, v, v
519 519 i = int(h * 6.0) # XXX assume int() truncates!
520 520 f = (h * 6.0) - i
521 521 p = v * (1.0 - s)
522 522 q = v * (1.0 - s * f)
523 523 t = v * (1.0 - s * (1.0 - f))
524 524 i = i % 6
525 525 if i == 0:
526 526 return v, t, p
527 527 if i == 1:
528 528 return q, v, p
529 529 if i == 2:
530 530 return p, v, t
531 531 if i == 3:
532 532 return p, q, v
533 533 if i == 4:
534 534 return t, p, v
535 535 if i == 5:
536 536 return v, p, q
537 537
538 538
539 539 def unique_color_generator(n=10000, saturation=0.10, lightness=0.95):
540 540 """
541 541 Generator for getting n of evenly distributed colors using
542 542 hsv color and golden ratio. It always return same order of colors
543 543
544 544 :param n: number of colors to generate
545 545 :param saturation: saturation of returned colors
546 546 :param lightness: lightness of returned colors
547 547 :returns: RGB tuple
548 548 """
549 549
550 550 golden_ratio = 0.618033988749895
551 551 h = 0.22717784590367374
552 552
553 553 for _ in xrange(n):
554 554 h += golden_ratio
555 555 h %= 1
556 556 HSV_tuple = [h, saturation, lightness]
557 557 RGB_tuple = hsv_to_rgb(*HSV_tuple)
558 558 yield map(lambda x: str(int(x * 256)), RGB_tuple)
559 559
560 560
561 561 def color_hasher(n=10000, saturation=0.10, lightness=0.95):
562 562 """
563 563 Returns a function which when called with an argument returns a unique
564 564 color for that argument, eg.
565 565
566 566 :param n: number of colors to generate
567 567 :param saturation: saturation of returned colors
568 568 :param lightness: lightness of returned colors
569 569 :returns: css RGB string
570 570
571 571 >>> color_hash = color_hasher()
572 572 >>> color_hash('hello')
573 573 'rgb(34, 12, 59)'
574 574 >>> color_hash('hello')
575 575 'rgb(34, 12, 59)'
576 576 >>> color_hash('other')
577 577 'rgb(90, 224, 159)'
578 578 """
579 579
580 580 color_dict = {}
581 581 cgenerator = unique_color_generator(
582 582 saturation=saturation, lightness=lightness)
583 583
584 584 def get_color_string(thing):
585 585 if thing in color_dict:
586 586 col = color_dict[thing]
587 587 else:
588 588 col = color_dict[thing] = cgenerator.next()
589 589 return "rgb(%s)" % (', '.join(col))
590 590
591 591 return get_color_string
592 592
593 593
594 594 def get_lexer_safe(mimetype=None, filepath=None):
595 595 """
596 596 Tries to return a relevant pygments lexer using mimetype/filepath name,
597 597 defaulting to plain text if none could be found
598 598 """
599 599 lexer = None
600 600 try:
601 601 if mimetype:
602 602 lexer = get_lexer_for_mimetype(mimetype)
603 603 if not lexer:
604 604 lexer = get_lexer_for_filename(filepath)
605 605 except pygments.util.ClassNotFound:
606 606 pass
607 607
608 608 if not lexer:
609 609 lexer = get_lexer_by_name('text')
610 610
611 611 return lexer
612 612
613 613
614 614 def get_lexer_for_filenode(filenode):
615 615 lexer = get_custom_lexer(filenode.extension) or filenode.lexer
616 616 return lexer
617 617
618 618
619 619 def pygmentize(filenode, **kwargs):
620 620 """
621 621 pygmentize function using pygments
622 622
623 623 :param filenode:
624 624 """
625 625 lexer = get_lexer_for_filenode(filenode)
626 626 return literal(code_highlight(filenode.content, lexer,
627 627 CodeHtmlFormatter(**kwargs)))
628 628
629 629
630 630 def is_following_repo(repo_name, user_id):
631 631 from rhodecode.model.scm import ScmModel
632 632 return ScmModel().is_following_repo(repo_name, user_id)
633 633
634 634
635 635 class _Message(object):
636 636 """A message returned by ``Flash.pop_messages()``.
637 637
638 638 Converting the message to a string returns the message text. Instances
639 639 also have the following attributes:
640 640
641 641 * ``message``: the message text.
642 642 * ``category``: the category specified when the message was created.
643 643 """
644 644
645 645 def __init__(self, category, message):
646 646 self.category = category
647 647 self.message = message
648 648
649 649 def __str__(self):
650 650 return self.message
651 651
652 652 __unicode__ = __str__
653 653
654 654 def __html__(self):
655 655 return escape(safe_unicode(self.message))
656 656
657 657
658 658 class Flash(_Flash):
659 659
660 660 def pop_messages(self):
661 661 """Return all accumulated messages and delete them from the session.
662 662
663 663 The return value is a list of ``Message`` objects.
664 664 """
665 665 from pylons import session
666 666
667 667 messages = []
668 668
669 669 # Pop the 'old' pylons flash messages. They are tuples of the form
670 670 # (category, message)
671 671 for cat, msg in session.pop(self.session_key, []):
672 672 messages.append(_Message(cat, msg))
673 673
674 674 # Pop the 'new' pyramid flash messages for each category as list
675 675 # of strings.
676 676 for cat in self.categories:
677 677 for msg in session.pop_flash(queue=cat):
678 678 messages.append(_Message(cat, msg))
679 679 # Map messages from the default queue to the 'notice' category.
680 680 for msg in session.pop_flash():
681 681 messages.append(_Message('notice', msg))
682 682
683 683 session.save()
684 684 return messages
685 685
686 686 def json_alerts(self):
687 687 payloads = []
688 688 messages = flash.pop_messages()
689 689 if messages:
690 690 for message in messages:
691 691 subdata = {}
692 692 if hasattr(message.message, 'rsplit'):
693 693 flash_data = message.message.rsplit('|DELIM|', 1)
694 694 org_message = flash_data[0]
695 695 if len(flash_data) > 1:
696 696 subdata = json.loads(flash_data[1])
697 697 else:
698 698 org_message = message.message
699 699 payloads.append({
700 700 'message': {
701 701 'message': u'{}'.format(org_message),
702 702 'level': message.category,
703 703 'force': True,
704 704 'subdata': subdata
705 705 }
706 706 })
707 707 return json.dumps(payloads)
708 708
709 709 flash = Flash()
710 710
711 711 #==============================================================================
712 712 # SCM FILTERS available via h.
713 713 #==============================================================================
714 714 from rhodecode.lib.vcs.utils import author_name, author_email
715 715 from rhodecode.lib.utils2 import credentials_filter, age as _age
716 716 from rhodecode.model.db import User, ChangesetStatus
717 717
718 718 age = _age
719 719 capitalize = lambda x: x.capitalize()
720 720 email = author_email
721 721 short_id = lambda x: x[:12]
722 722 hide_credentials = lambda x: ''.join(credentials_filter(x))
723 723
724 724
725 725 def age_component(datetime_iso, value=None, time_is_local=False):
726 726 title = value or format_date(datetime_iso)
727 727 tzinfo = '+00:00'
728 728
729 729 # detect if we have a timezone info, otherwise, add it
730 730 if isinstance(datetime_iso, datetime) and not datetime_iso.tzinfo:
731 731 if time_is_local:
732 732 tzinfo = time.strftime("+%H:%M",
733 733 time.gmtime(
734 734 (datetime.now() - datetime.utcnow()).seconds + 1
735 735 )
736 736 )
737 737
738 738 return literal(
739 739 '<time class="timeago tooltip" '
740 740 'title="{1}{2}" datetime="{0}{2}">{1}</time>'.format(
741 741 datetime_iso, title, tzinfo))
742 742
743 743
744 744 def _shorten_commit_id(commit_id):
745 745 from rhodecode import CONFIG
746 746 def_len = safe_int(CONFIG.get('rhodecode_show_sha_length', 12))
747 747 return commit_id[:def_len]
748 748
749 749
750 750 def show_id(commit):
751 751 """
752 752 Configurable function that shows ID
753 753 by default it's r123:fffeeefffeee
754 754
755 755 :param commit: commit instance
756 756 """
757 757 from rhodecode import CONFIG
758 758 show_idx = str2bool(CONFIG.get('rhodecode_show_revision_number', True))
759 759
760 760 raw_id = _shorten_commit_id(commit.raw_id)
761 761 if show_idx:
762 762 return 'r%s:%s' % (commit.idx, raw_id)
763 763 else:
764 764 return '%s' % (raw_id, )
765 765
766 766
767 767 def format_date(date):
768 768 """
769 769 use a standardized formatting for dates used in RhodeCode
770 770
771 771 :param date: date/datetime object
772 772 :return: formatted date
773 773 """
774 774
775 775 if date:
776 776 _fmt = "%a, %d %b %Y %H:%M:%S"
777 777 return safe_unicode(date.strftime(_fmt))
778 778
779 779 return u""
780 780
781 781
782 782 class _RepoChecker(object):
783 783
784 784 def __init__(self, backend_alias):
785 785 self._backend_alias = backend_alias
786 786
787 787 def __call__(self, repository):
788 788 if hasattr(repository, 'alias'):
789 789 _type = repository.alias
790 790 elif hasattr(repository, 'repo_type'):
791 791 _type = repository.repo_type
792 792 else:
793 793 _type = repository
794 794 return _type == self._backend_alias
795 795
796 796 is_git = _RepoChecker('git')
797 797 is_hg = _RepoChecker('hg')
798 798 is_svn = _RepoChecker('svn')
799 799
800 800
801 801 def get_repo_type_by_name(repo_name):
802 802 repo = Repository.get_by_repo_name(repo_name)
803 803 return repo.repo_type
804 804
805 805
806 806 def is_svn_without_proxy(repository):
807 807 if is_svn(repository):
808 808 from rhodecode.model.settings import VcsSettingsModel
809 809 conf = VcsSettingsModel().get_ui_settings_as_config_obj()
810 810 return not str2bool(conf.get('vcs_svn_proxy', 'http_requests_enabled'))
811 811 return False
812 812
813 813
814 814 def discover_user(author):
815 815 """
816 816 Tries to discover RhodeCode User based on the autho string. Author string
817 817 is typically `FirstName LastName <email@address.com>`
818 818 """
819 819
820 820 # if author is already an instance use it for extraction
821 821 if isinstance(author, User):
822 822 return author
823 823
824 824 # Valid email in the attribute passed, see if they're in the system
825 825 _email = author_email(author)
826 826 if _email != '':
827 827 user = User.get_by_email(_email, case_insensitive=True, cache=True)
828 828 if user is not None:
829 829 return user
830 830
831 831 # Maybe it's a username, we try to extract it and fetch by username ?
832 832 _author = author_name(author)
833 833 user = User.get_by_username(_author, case_insensitive=True, cache=True)
834 834 if user is not None:
835 835 return user
836 836
837 837 return None
838 838
839 839
840 840 def email_or_none(author):
841 841 # extract email from the commit string
842 842 _email = author_email(author)
843 843
844 844 # If we have an email, use it, otherwise
845 845 # see if it contains a username we can get an email from
846 846 if _email != '':
847 847 return _email
848 848 else:
849 849 user = User.get_by_username(
850 850 author_name(author), case_insensitive=True, cache=True)
851 851
852 852 if user is not None:
853 853 return user.email
854 854
855 855 # No valid email, not a valid user in the system, none!
856 856 return None
857 857
858 858
859 859 def link_to_user(author, length=0, **kwargs):
860 860 user = discover_user(author)
861 861 # user can be None, but if we have it already it means we can re-use it
862 862 # in the person() function, so we save 1 intensive-query
863 863 if user:
864 864 author = user
865 865
866 866 display_person = person(author, 'username_or_name_or_email')
867 867 if length:
868 868 display_person = shorter(display_person, length)
869 869
870 870 if user:
871 871 return link_to(
872 872 escape(display_person),
873 873 url('user_profile', username=user.username),
874 874 **kwargs)
875 875 else:
876 876 return escape(display_person)
877 877
878 878
879 879 def person(author, show_attr="username_and_name"):
880 880 user = discover_user(author)
881 881 if user:
882 882 return getattr(user, show_attr)
883 883 else:
884 884 _author = author_name(author)
885 885 _email = email(author)
886 886 return _author or _email
887 887
888 888
889 889 def author_string(email):
890 890 if email:
891 891 user = User.get_by_email(email, case_insensitive=True, cache=True)
892 892 if user:
893 893 if user.firstname or user.lastname:
894 894 return '%s %s &lt;%s&gt;' % (user.firstname, user.lastname, email)
895 895 else:
896 896 return email
897 897 else:
898 898 return email
899 899 else:
900 900 return None
901 901
902 902
903 903 def person_by_id(id_, show_attr="username_and_name"):
904 904 # attr to return from fetched user
905 905 person_getter = lambda usr: getattr(usr, show_attr)
906 906
907 907 #maybe it's an ID ?
908 908 if str(id_).isdigit() or isinstance(id_, int):
909 909 id_ = int(id_)
910 910 user = User.get(id_)
911 911 if user is not None:
912 912 return person_getter(user)
913 913 return id_
914 914
915 915
916 916 def gravatar_with_user(author, show_disabled=False):
917 917 from rhodecode.lib.utils import PartialRenderer
918 918 _render = PartialRenderer('base/base.mako')
919 919 return _render('gravatar_with_user', author, show_disabled=show_disabled)
920 920
921 921
922 922 def desc_stylize(value):
923 923 """
924 924 converts tags from value into html equivalent
925 925
926 926 :param value:
927 927 """
928 928 if not value:
929 929 return ''
930 930
931 931 value = re.sub(r'\[see\ \=\>\ *([a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\]',
932 932 '<div class="metatag" tag="see">see =&gt; \\1 </div>', value)
933 933 value = re.sub(r'\[license\ \=\>\ *([a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\]',
934 934 '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/\\1">\\1</a></div>', value)
935 935 value = re.sub(r'\[(requires|recommends|conflicts|base)\ \=\>\ *([a-zA-Z0-9\-\/]*)\]',
936 936 '<div class="metatag" tag="\\1">\\1 =&gt; <a href="/\\2">\\2</a></div>', value)
937 937 value = re.sub(r'\[(lang|language)\ \=\>\ *([a-zA-Z\-\/\#\+]*)\]',
938 938 '<div class="metatag" tag="lang">\\2</div>', value)
939 939 value = re.sub(r'\[([a-z]+)\]',
940 940 '<div class="metatag" tag="\\1">\\1</div>', value)
941 941
942 942 return value
943 943
944 944
945 945 def escaped_stylize(value):
946 946 """
947 947 converts tags from value into html equivalent, but escaping its value first
948 948 """
949 949 if not value:
950 950 return ''
951 951
952 952 # Using default webhelper escape method, but has to force it as a
953 953 # plain unicode instead of a markup tag to be used in regex expressions
954 954 value = unicode(escape(safe_unicode(value)))
955 955
956 956 value = re.sub(r'\[see\ \=\&gt;\ *([a-zA-Z0-9\/\=\?\&amp;\ \:\/\.\-]*)\]',
957 957 '<div class="metatag" tag="see">see =&gt; \\1 </div>', value)
958 958 value = re.sub(r'\[license\ \=\&gt;\ *([a-zA-Z0-9\/\=\?\&amp;\ \:\/\.\-]*)\]',
959 959 '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/\\1">\\1</a></div>', value)
960 960 value = re.sub(r'\[(requires|recommends|conflicts|base)\ \=\&gt;\ *([a-zA-Z0-9\-\/]*)\]',
961 961 '<div class="metatag" tag="\\1">\\1 =&gt; <a href="/\\2">\\2</a></div>', value)
962 962 value = re.sub(r'\[(lang|language)\ \=\&gt;\ *([a-zA-Z\-\/\#\+]*)\]',
963 963 '<div class="metatag" tag="lang">\\2</div>', value)
964 964 value = re.sub(r'\[([a-z]+)\]',
965 965 '<div class="metatag" tag="\\1">\\1</div>', value)
966 966
967 967 return value
968 968
969 969
970 970 def bool2icon(value):
971 971 """
972 972 Returns boolean value of a given value, represented as html element with
973 973 classes that will represent icons
974 974
975 975 :param value: given value to convert to html node
976 976 """
977 977
978 978 if value: # does bool conversion
979 979 return HTML.tag('i', class_="icon-true")
980 980 else: # not true as bool
981 981 return HTML.tag('i', class_="icon-false")
982 982
983 983
984 984 #==============================================================================
985 985 # PERMS
986 986 #==============================================================================
987 987 from rhodecode.lib.auth import HasPermissionAny, HasPermissionAll, \
988 988 HasRepoPermissionAny, HasRepoPermissionAll, HasRepoGroupPermissionAll, \
989 989 HasRepoGroupPermissionAny, HasRepoPermissionAnyApi, get_csrf_token, \
990 990 csrf_token_key
991 991
992 992
993 993 #==============================================================================
994 994 # GRAVATAR URL
995 995 #==============================================================================
996 996 class InitialsGravatar(object):
997 997 def __init__(self, email_address, first_name, last_name, size=30,
998 998 background=None, text_color='#fff'):
999 999 self.size = size
1000 1000 self.first_name = first_name
1001 1001 self.last_name = last_name
1002 1002 self.email_address = email_address
1003 1003 self.background = background or self.str2color(email_address)
1004 1004 self.text_color = text_color
1005 1005
1006 1006 def get_color_bank(self):
1007 1007 """
1008 1008 returns a predefined list of colors that gravatars can use.
1009 1009 Those are randomized distinct colors that guarantee readability and
1010 1010 uniqueness.
1011 1011
1012 1012 generated with: http://phrogz.net/css/distinct-colors.html
1013 1013 """
1014 1014 return [
1015 1015 '#bf3030', '#a67f53', '#00ff00', '#5989b3', '#392040', '#d90000',
1016 1016 '#402910', '#204020', '#79baf2', '#a700b3', '#bf6060', '#7f5320',
1017 1017 '#008000', '#003059', '#ee00ff', '#ff0000', '#8c4b00', '#007300',
1018 1018 '#005fb3', '#de73e6', '#ff4040', '#ffaa00', '#3df255', '#203140',
1019 1019 '#47004d', '#591616', '#664400', '#59b365', '#0d2133', '#83008c',
1020 1020 '#592d2d', '#bf9f60', '#73e682', '#1d3f73', '#73006b', '#402020',
1021 1021 '#b2862d', '#397341', '#597db3', '#e600d6', '#a60000', '#736039',
1022 1022 '#00b318', '#79aaf2', '#330d30', '#ff8080', '#403010', '#16591f',
1023 1023 '#002459', '#8c4688', '#e50000', '#ffbf40', '#00732e', '#102340',
1024 1024 '#bf60ac', '#8c4646', '#cc8800', '#00a642', '#1d3473', '#b32d98',
1025 1025 '#660e00', '#ffd580', '#80ffb2', '#7391e6', '#733967', '#d97b6c',
1026 1026 '#8c5e00', '#59b389', '#3967e6', '#590047', '#73281d', '#665200',
1027 1027 '#00e67a', '#2d50b3', '#8c2377', '#734139', '#b2982d', '#16593a',
1028 1028 '#001859', '#ff00aa', '#a65e53', '#ffcc00', '#0d3321', '#2d3959',
1029 1029 '#731d56', '#401610', '#4c3d00', '#468c6c', '#002ca6', '#d936a3',
1030 1030 '#d94c36', '#403920', '#36d9a3', '#0d1733', '#592d4a', '#993626',
1031 1031 '#cca300', '#00734d', '#46598c', '#8c005e', '#7f1100', '#8c7000',
1032 1032 '#00a66f', '#7382e6', '#b32d74', '#d9896c', '#ffe680', '#1d7362',
1033 1033 '#364cd9', '#73003d', '#d93a00', '#998a4d', '#59b3a1', '#5965b3',
1034 1034 '#e5007a', '#73341d', '#665f00', '#00b38f', '#0018b3', '#59163a',
1035 1035 '#b2502d', '#bfb960', '#00ffcc', '#23318c', '#a6537f', '#734939',
1036 1036 '#b2a700', '#104036', '#3d3df2', '#402031', '#e56739', '#736f39',
1037 1037 '#79f2ea', '#000059', '#401029', '#4c1400', '#ffee00', '#005953',
1038 1038 '#101040', '#990052', '#402820', '#403d10', '#00ffee', '#0000d9',
1039 1039 '#ff80c4', '#a66953', '#eeff00', '#00ccbe', '#8080ff', '#e673a1',
1040 1040 '#a62c00', '#474d00', '#1a3331', '#46468c', '#733950', '#662900',
1041 1041 '#858c23', '#238c85', '#0f0073', '#b20047', '#d9986c', '#becc00',
1042 1042 '#396f73', '#281d73', '#ff0066', '#ff6600', '#dee673', '#59adb3',
1043 1043 '#6559b3', '#590024', '#b2622d', '#98b32d', '#36ced9', '#332d59',
1044 1044 '#40001a', '#733f1d', '#526600', '#005359', '#242040', '#bf6079',
1045 1045 '#735039', '#cef23d', '#007780', '#5630bf', '#66001b', '#b24700',
1046 1046 '#acbf60', '#1d6273', '#25008c', '#731d34', '#a67453', '#50592d',
1047 1047 '#00ccff', '#6600ff', '#ff0044', '#4c1f00', '#8a994d', '#79daf2',
1048 1048 '#a173e6', '#d93662', '#402310', '#aaff00', '#2d98b3', '#8c40ff',
1049 1049 '#592d39', '#ff8c40', '#354020', '#103640', '#1a0040', '#331a20',
1050 1050 '#331400', '#334d00', '#1d5673', '#583973', '#7f0022', '#4c3626',
1051 1051 '#88cc00', '#36a3d9', '#3d0073', '#d9364c', '#33241a', '#698c23',
1052 1052 '#5995b3', '#300059', '#e57382', '#7f3300', '#366600', '#00aaff',
1053 1053 '#3a1659', '#733941', '#663600', '#74b32d', '#003c59', '#7f53a6',
1054 1054 '#73000f', '#ff8800', '#baf279', '#79caf2', '#291040', '#a6293a',
1055 1055 '#b2742d', '#587339', '#0077b3', '#632699', '#400009', '#d9a66c',
1056 1056 '#294010', '#2d4a59', '#aa00ff', '#4c131b', '#b25f00', '#5ce600',
1057 1057 '#267399', '#a336d9', '#990014', '#664e33', '#86bf60', '#0088ff',
1058 1058 '#7700b3', '#593a16', '#073300', '#1d4b73', '#ac60bf', '#e59539',
1059 1059 '#4f8c46', '#368dd9', '#5c0073'
1060 1060 ]
1061 1061
1062 1062 def rgb_to_hex_color(self, rgb_tuple):
1063 1063 """
1064 1064 Converts an rgb_tuple passed to an hex color.
1065 1065
1066 1066 :param rgb_tuple: tuple with 3 ints represents rgb color space
1067 1067 """
1068 1068 return '#' + ("".join(map(chr, rgb_tuple)).encode('hex'))
1069 1069
1070 1070 def email_to_int_list(self, email_str):
1071 1071 """
1072 1072 Get every byte of the hex digest value of email and turn it to integer.
1073 1073 It's going to be always between 0-255
1074 1074 """
1075 1075 digest = md5_safe(email_str.lower())
1076 1076 return [int(digest[i * 2:i * 2 + 2], 16) for i in range(16)]
1077 1077
1078 1078 def pick_color_bank_index(self, email_str, color_bank):
1079 1079 return self.email_to_int_list(email_str)[0] % len(color_bank)
1080 1080
1081 1081 def str2color(self, email_str):
1082 1082 """
1083 1083 Tries to map in a stable algorithm an email to color
1084 1084
1085 1085 :param email_str:
1086 1086 """
1087 1087 color_bank = self.get_color_bank()
1088 1088 # pick position (module it's length so we always find it in the
1089 1089 # bank even if it's smaller than 256 values
1090 1090 pos = self.pick_color_bank_index(email_str, color_bank)
1091 1091 return color_bank[pos]
1092 1092
1093 1093 def normalize_email(self, email_address):
1094 1094 import unicodedata
1095 1095 # default host used to fill in the fake/missing email
1096 1096 default_host = u'localhost'
1097 1097
1098 1098 if not email_address:
1099 1099 email_address = u'%s@%s' % (User.DEFAULT_USER, default_host)
1100 1100
1101 1101 email_address = safe_unicode(email_address)
1102 1102
1103 1103 if u'@' not in email_address:
1104 1104 email_address = u'%s@%s' % (email_address, default_host)
1105 1105
1106 1106 if email_address.endswith(u'@'):
1107 1107 email_address = u'%s%s' % (email_address, default_host)
1108 1108
1109 1109 email_address = unicodedata.normalize('NFKD', email_address)\
1110 1110 .encode('ascii', 'ignore')
1111 1111 return email_address
1112 1112
1113 1113 def get_initials(self):
1114 1114 """
1115 1115 Returns 2 letter initials calculated based on the input.
1116 1116 The algorithm picks first given email address, and takes first letter
1117 1117 of part before @, and then the first letter of server name. In case
1118 1118 the part before @ is in a format of `somestring.somestring2` it replaces
1119 1119 the server letter with first letter of somestring2
1120 1120
1121 1121 In case function was initialized with both first and lastname, this
1122 1122 overrides the extraction from email by first letter of the first and
1123 1123 last name. We add special logic to that functionality, In case Full name
1124 1124 is compound, like Guido Von Rossum, we use last part of the last name
1125 1125 (Von Rossum) picking `R`.
1126 1126
1127 1127 Function also normalizes the non-ascii characters to they ascii
1128 1128 representation, eg Δ„ => A
1129 1129 """
1130 1130 import unicodedata
1131 1131 # replace non-ascii to ascii
1132 1132 first_name = unicodedata.normalize(
1133 1133 'NFKD', safe_unicode(self.first_name)).encode('ascii', 'ignore')
1134 1134 last_name = unicodedata.normalize(
1135 1135 'NFKD', safe_unicode(self.last_name)).encode('ascii', 'ignore')
1136 1136
1137 1137 # do NFKD encoding, and also make sure email has proper format
1138 1138 email_address = self.normalize_email(self.email_address)
1139 1139
1140 1140 # first push the email initials
1141 1141 prefix, server = email_address.split('@', 1)
1142 1142
1143 1143 # check if prefix is maybe a 'firstname.lastname' syntax
1144 1144 _dot_split = prefix.rsplit('.', 1)
1145 1145 if len(_dot_split) == 2:
1146 1146 initials = [_dot_split[0][0], _dot_split[1][0]]
1147 1147 else:
1148 1148 initials = [prefix[0], server[0]]
1149 1149
1150 1150 # then try to replace either firtname or lastname
1151 1151 fn_letter = (first_name or " ")[0].strip()
1152 1152 ln_letter = (last_name.split(' ', 1)[-1] or " ")[0].strip()
1153 1153
1154 1154 if fn_letter:
1155 1155 initials[0] = fn_letter
1156 1156
1157 1157 if ln_letter:
1158 1158 initials[1] = ln_letter
1159 1159
1160 1160 return ''.join(initials).upper()
1161 1161
1162 1162 def get_img_data_by_type(self, font_family, img_type):
1163 1163 default_user = """
1164 1164 <svg xmlns="http://www.w3.org/2000/svg"
1165 1165 version="1.1" x="0px" y="0px" width="{size}" height="{size}"
1166 1166 viewBox="-15 -10 439.165 429.164"
1167 1167
1168 1168 xml:space="preserve"
1169 1169 style="background:{background};" >
1170 1170
1171 1171 <path d="M204.583,216.671c50.664,0,91.74-48.075,
1172 1172 91.74-107.378c0-82.237-41.074-107.377-91.74-107.377
1173 1173 c-50.668,0-91.74,25.14-91.74,107.377C112.844,
1174 1174 168.596,153.916,216.671,
1175 1175 204.583,216.671z" fill="{text_color}"/>
1176 1176 <path d="M407.164,374.717L360.88,
1177 1177 270.454c-2.117-4.771-5.836-8.728-10.465-11.138l-71.83-37.392
1178 1178 c-1.584-0.823-3.502-0.663-4.926,0.415c-20.316,
1179 1179 15.366-44.203,23.488-69.076,23.488c-24.877,
1180 1180 0-48.762-8.122-69.078-23.488
1181 1181 c-1.428-1.078-3.346-1.238-4.93-0.415L58.75,
1182 1182 259.316c-4.631,2.41-8.346,6.365-10.465,11.138L2.001,374.717
1183 1183 c-3.191,7.188-2.537,15.412,1.75,22.005c4.285,
1184 1184 6.592,11.537,10.526,19.4,10.526h362.861c7.863,0,15.117-3.936,
1185 1185 19.402-10.527 C409.699,390.129,
1186 1186 410.355,381.902,407.164,374.717z" fill="{text_color}"/>
1187 1187 </svg>""".format(
1188 1188 size=self.size,
1189 1189 background='#979797', # @grey4
1190 1190 text_color=self.text_color,
1191 1191 font_family=font_family)
1192 1192
1193 1193 return {
1194 1194 "default_user": default_user
1195 1195 }[img_type]
1196 1196
1197 1197 def get_img_data(self, svg_type=None):
1198 1198 """
1199 1199 generates the svg metadata for image
1200 1200 """
1201 1201
1202 1202 font_family = ','.join([
1203 1203 'proximanovaregular',
1204 1204 'Proxima Nova Regular',
1205 1205 'Proxima Nova',
1206 1206 'Arial',
1207 1207 'Lucida Grande',
1208 1208 'sans-serif'
1209 1209 ])
1210 1210 if svg_type:
1211 1211 return self.get_img_data_by_type(font_family, svg_type)
1212 1212
1213 1213 initials = self.get_initials()
1214 1214 img_data = """
1215 1215 <svg xmlns="http://www.w3.org/2000/svg" pointer-events="none"
1216 1216 width="{size}" height="{size}"
1217 1217 style="width: 100%; height: 100%; background-color: {background}"
1218 1218 viewBox="0 0 {size} {size}">
1219 1219 <text text-anchor="middle" y="50%" x="50%" dy="0.35em"
1220 1220 pointer-events="auto" fill="{text_color}"
1221 1221 font-family="{font_family}"
1222 1222 style="font-weight: 400; font-size: {f_size}px;">{text}
1223 1223 </text>
1224 1224 </svg>""".format(
1225 1225 size=self.size,
1226 1226 f_size=self.size/1.85, # scale the text inside the box nicely
1227 1227 background=self.background,
1228 1228 text_color=self.text_color,
1229 1229 text=initials.upper(),
1230 1230 font_family=font_family)
1231 1231
1232 1232 return img_data
1233 1233
1234 1234 def generate_svg(self, svg_type=None):
1235 1235 img_data = self.get_img_data(svg_type)
1236 1236 return "data:image/svg+xml;base64,%s" % img_data.encode('base64')
1237 1237
1238 1238
1239 1239 def initials_gravatar(email_address, first_name, last_name, size=30):
1240 1240 svg_type = None
1241 1241 if email_address == User.DEFAULT_USER_EMAIL:
1242 1242 svg_type = 'default_user'
1243 1243 klass = InitialsGravatar(email_address, first_name, last_name, size)
1244 1244 return klass.generate_svg(svg_type=svg_type)
1245 1245
1246 1246
1247 1247 def gravatar_url(email_address, size=30):
1248 1248 # doh, we need to re-import those to mock it later
1249 1249 from pylons import tmpl_context as c
1250 1250
1251 1251 _use_gravatar = c.visual.use_gravatar
1252 1252 _gravatar_url = c.visual.gravatar_url or User.DEFAULT_GRAVATAR_URL
1253 1253
1254 1254 email_address = email_address or User.DEFAULT_USER_EMAIL
1255 1255 if isinstance(email_address, unicode):
1256 1256 # hashlib crashes on unicode items
1257 1257 email_address = safe_str(email_address)
1258 1258
1259 1259 # empty email or default user
1260 1260 if not email_address or email_address == User.DEFAULT_USER_EMAIL:
1261 1261 return initials_gravatar(User.DEFAULT_USER_EMAIL, '', '', size=size)
1262 1262
1263 1263 if _use_gravatar:
1264 1264 # TODO: Disuse pyramid thread locals. Think about another solution to
1265 1265 # get the host and schema here.
1266 1266 request = get_current_request()
1267 1267 tmpl = safe_str(_gravatar_url)
1268 1268 tmpl = tmpl.replace('{email}', email_address)\
1269 1269 .replace('{md5email}', md5_safe(email_address.lower())) \
1270 1270 .replace('{netloc}', request.host)\
1271 1271 .replace('{scheme}', request.scheme)\
1272 1272 .replace('{size}', safe_str(size))
1273 1273 return tmpl
1274 1274 else:
1275 1275 return initials_gravatar(email_address, '', '', size=size)
1276 1276
1277 1277
1278 1278 class Page(_Page):
1279 1279 """
1280 1280 Custom pager to match rendering style with paginator
1281 1281 """
1282 1282
1283 1283 def _get_pos(self, cur_page, max_page, items):
1284 1284 edge = (items / 2) + 1
1285 1285 if (cur_page <= edge):
1286 1286 radius = max(items / 2, items - cur_page)
1287 1287 elif (max_page - cur_page) < edge:
1288 1288 radius = (items - 1) - (max_page - cur_page)
1289 1289 else:
1290 1290 radius = items / 2
1291 1291
1292 1292 left = max(1, (cur_page - (radius)))
1293 1293 right = min(max_page, cur_page + (radius))
1294 1294 return left, cur_page, right
1295 1295
1296 1296 def _range(self, regexp_match):
1297 1297 """
1298 1298 Return range of linked pages (e.g. '1 2 [3] 4 5 6 7 8').
1299 1299
1300 1300 Arguments:
1301 1301
1302 1302 regexp_match
1303 1303 A "re" (regular expressions) match object containing the
1304 1304 radius of linked pages around the current page in
1305 1305 regexp_match.group(1) as a string
1306 1306
1307 1307 This function is supposed to be called as a callable in
1308 1308 re.sub.
1309 1309
1310 1310 """
1311 1311 radius = int(regexp_match.group(1))
1312 1312
1313 1313 # Compute the first and last page number within the radius
1314 1314 # e.g. '1 .. 5 6 [7] 8 9 .. 12'
1315 1315 # -> leftmost_page = 5
1316 1316 # -> rightmost_page = 9
1317 1317 leftmost_page, _cur, rightmost_page = self._get_pos(self.page,
1318 1318 self.last_page,
1319 1319 (radius * 2) + 1)
1320 1320 nav_items = []
1321 1321
1322 1322 # Create a link to the first page (unless we are on the first page
1323 1323 # or there would be no need to insert '..' spacers)
1324 1324 if self.page != self.first_page and self.first_page < leftmost_page:
1325 1325 nav_items.append(self._pagerlink(self.first_page, self.first_page))
1326 1326
1327 1327 # Insert dots if there are pages between the first page
1328 1328 # and the currently displayed page range
1329 1329 if leftmost_page - self.first_page > 1:
1330 1330 # Wrap in a SPAN tag if nolink_attr is set
1331 1331 text = '..'
1332 1332 if self.dotdot_attr:
1333 1333 text = HTML.span(c=text, **self.dotdot_attr)
1334 1334 nav_items.append(text)
1335 1335
1336 1336 for thispage in xrange(leftmost_page, rightmost_page + 1):
1337 1337 # Hilight the current page number and do not use a link
1338 1338 if thispage == self.page:
1339 1339 text = '%s' % (thispage,)
1340 1340 # Wrap in a SPAN tag if nolink_attr is set
1341 1341 if self.curpage_attr:
1342 1342 text = HTML.span(c=text, **self.curpage_attr)
1343 1343 nav_items.append(text)
1344 1344 # Otherwise create just a link to that page
1345 1345 else:
1346 1346 text = '%s' % (thispage,)
1347 1347 nav_items.append(self._pagerlink(thispage, text))
1348 1348
1349 1349 # Insert dots if there are pages between the displayed
1350 1350 # page numbers and the end of the page range
1351 1351 if self.last_page - rightmost_page > 1:
1352 1352 text = '..'
1353 1353 # Wrap in a SPAN tag if nolink_attr is set
1354 1354 if self.dotdot_attr:
1355 1355 text = HTML.span(c=text, **self.dotdot_attr)
1356 1356 nav_items.append(text)
1357 1357
1358 1358 # Create a link to the very last page (unless we are on the last
1359 1359 # page or there would be no need to insert '..' spacers)
1360 1360 if self.page != self.last_page and rightmost_page < self.last_page:
1361 1361 nav_items.append(self._pagerlink(self.last_page, self.last_page))
1362 1362
1363 1363 ## prerender links
1364 1364 #_page_link = url.current()
1365 1365 #nav_items.append(literal('<link rel="prerender" href="%s?page=%s">' % (_page_link, str(int(self.page)+1))))
1366 1366 #nav_items.append(literal('<link rel="prefetch" href="%s?page=%s">' % (_page_link, str(int(self.page)+1))))
1367 1367 return self.separator.join(nav_items)
1368 1368
1369 1369 def pager(self, format='~2~', page_param='page', partial_param='partial',
1370 1370 show_if_single_page=False, separator=' ', onclick=None,
1371 1371 symbol_first='<<', symbol_last='>>',
1372 1372 symbol_previous='<', symbol_next='>',
1373 1373 link_attr={'class': 'pager_link', 'rel': 'prerender'},
1374 1374 curpage_attr={'class': 'pager_curpage'},
1375 1375 dotdot_attr={'class': 'pager_dotdot'}, **kwargs):
1376 1376
1377 1377 self.curpage_attr = curpage_attr
1378 1378 self.separator = separator
1379 1379 self.pager_kwargs = kwargs
1380 1380 self.page_param = page_param
1381 1381 self.partial_param = partial_param
1382 1382 self.onclick = onclick
1383 1383 self.link_attr = link_attr
1384 1384 self.dotdot_attr = dotdot_attr
1385 1385
1386 1386 # Don't show navigator if there is no more than one page
1387 1387 if self.page_count == 0 or (self.page_count == 1 and not show_if_single_page):
1388 1388 return ''
1389 1389
1390 1390 from string import Template
1391 1391 # Replace ~...~ in token format by range of pages
1392 1392 result = re.sub(r'~(\d+)~', self._range, format)
1393 1393
1394 1394 # Interpolate '%' variables
1395 1395 result = Template(result).safe_substitute({
1396 1396 'first_page': self.first_page,
1397 1397 'last_page': self.last_page,
1398 1398 'page': self.page,
1399 1399 'page_count': self.page_count,
1400 1400 'items_per_page': self.items_per_page,
1401 1401 'first_item': self.first_item,
1402 1402 'last_item': self.last_item,
1403 1403 'item_count': self.item_count,
1404 1404 'link_first': self.page > self.first_page and \
1405 1405 self._pagerlink(self.first_page, symbol_first) or '',
1406 1406 'link_last': self.page < self.last_page and \
1407 1407 self._pagerlink(self.last_page, symbol_last) or '',
1408 1408 'link_previous': self.previous_page and \
1409 1409 self._pagerlink(self.previous_page, symbol_previous) \
1410 1410 or HTML.span(symbol_previous, class_="pg-previous disabled"),
1411 1411 'link_next': self.next_page and \
1412 1412 self._pagerlink(self.next_page, symbol_next) \
1413 1413 or HTML.span(symbol_next, class_="pg-next disabled")
1414 1414 })
1415 1415
1416 1416 return literal(result)
1417 1417
1418 1418
1419 1419 #==============================================================================
1420 1420 # REPO PAGER, PAGER FOR REPOSITORY
1421 1421 #==============================================================================
1422 1422 class RepoPage(Page):
1423 1423
1424 1424 def __init__(self, collection, page=1, items_per_page=20,
1425 1425 item_count=None, url=None, **kwargs):
1426 1426
1427 1427 """Create a "RepoPage" instance. special pager for paging
1428 1428 repository
1429 1429 """
1430 1430 self._url_generator = url
1431 1431
1432 1432 # Safe the kwargs class-wide so they can be used in the pager() method
1433 1433 self.kwargs = kwargs
1434 1434
1435 1435 # Save a reference to the collection
1436 1436 self.original_collection = collection
1437 1437
1438 1438 self.collection = collection
1439 1439
1440 1440 # The self.page is the number of the current page.
1441 1441 # The first page has the number 1!
1442 1442 try:
1443 1443 self.page = int(page) # make it int() if we get it as a string
1444 1444 except (ValueError, TypeError):
1445 1445 self.page = 1
1446 1446
1447 1447 self.items_per_page = items_per_page
1448 1448
1449 1449 # Unless the user tells us how many items the collections has
1450 1450 # we calculate that ourselves.
1451 1451 if item_count is not None:
1452 1452 self.item_count = item_count
1453 1453 else:
1454 1454 self.item_count = len(self.collection)
1455 1455
1456 1456 # Compute the number of the first and last available page
1457 1457 if self.item_count > 0:
1458 1458 self.first_page = 1
1459 1459 self.page_count = int(math.ceil(float(self.item_count) /
1460 1460 self.items_per_page))
1461 1461 self.last_page = self.first_page + self.page_count - 1
1462 1462
1463 1463 # Make sure that the requested page number is the range of
1464 1464 # valid pages
1465 1465 if self.page > self.last_page:
1466 1466 self.page = self.last_page
1467 1467 elif self.page < self.first_page:
1468 1468 self.page = self.first_page
1469 1469
1470 1470 # Note: the number of items on this page can be less than
1471 1471 # items_per_page if the last page is not full
1472 1472 self.first_item = max(0, (self.item_count) - (self.page *
1473 1473 items_per_page))
1474 1474 self.last_item = ((self.item_count - 1) - items_per_page *
1475 1475 (self.page - 1))
1476 1476
1477 1477 self.items = list(self.collection[self.first_item:self.last_item + 1])
1478 1478
1479 1479 # Links to previous and next page
1480 1480 if self.page > self.first_page:
1481 1481 self.previous_page = self.page - 1
1482 1482 else:
1483 1483 self.previous_page = None
1484 1484
1485 1485 if self.page < self.last_page:
1486 1486 self.next_page = self.page + 1
1487 1487 else:
1488 1488 self.next_page = None
1489 1489
1490 1490 # No items available
1491 1491 else:
1492 1492 self.first_page = None
1493 1493 self.page_count = 0
1494 1494 self.last_page = None
1495 1495 self.first_item = None
1496 1496 self.last_item = None
1497 1497 self.previous_page = None
1498 1498 self.next_page = None
1499 1499 self.items = []
1500 1500
1501 1501 # This is a subclass of the 'list' type. Initialise the list now.
1502 1502 list.__init__(self, reversed(self.items))
1503 1503
1504 1504
1505 1505 def changed_tooltip(nodes):
1506 1506 """
1507 1507 Generates a html string for changed nodes in commit page.
1508 1508 It limits the output to 30 entries
1509 1509
1510 1510 :param nodes: LazyNodesGenerator
1511 1511 """
1512 1512 if nodes:
1513 1513 pref = ': <br/> '
1514 1514 suf = ''
1515 1515 if len(nodes) > 30:
1516 1516 suf = '<br/>' + _(' and %s more') % (len(nodes) - 30)
1517 1517 return literal(pref + '<br/> '.join([safe_unicode(x.path)
1518 1518 for x in nodes[:30]]) + suf)
1519 1519 else:
1520 1520 return ': ' + _('No Files')
1521 1521
1522 1522
1523 1523 def breadcrumb_repo_link(repo):
1524 1524 """
1525 1525 Makes a breadcrumbs path link to repo
1526 1526
1527 1527 ex::
1528 1528 group >> subgroup >> repo
1529 1529
1530 1530 :param repo: a Repository instance
1531 1531 """
1532 1532
1533 1533 path = [
1534 1534 link_to(group.name, url('repo_group_home', group_name=group.group_name))
1535 1535 for group in repo.groups_with_parents
1536 1536 ] + [
1537 1537 link_to(repo.just_name, url('summary_home', repo_name=repo.repo_name))
1538 1538 ]
1539 1539
1540 1540 return literal(' &raquo; '.join(path))
1541 1541
1542 1542
1543 1543 def format_byte_size_binary(file_size):
1544 1544 """
1545 1545 Formats file/folder sizes to standard.
1546 1546 """
1547 1547 formatted_size = format_byte_size(file_size, binary=True)
1548 1548 return formatted_size
1549 1549
1550 1550
1551 1551 def fancy_file_stats(stats):
1552 1552 """
1553 1553 Displays a fancy two colored bar for number of added/deleted
1554 1554 lines of code on file
1555 1555
1556 1556 :param stats: two element list of added/deleted lines of code
1557 1557 """
1558 1558 from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
1559 1559 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE
1560 1560
1561 1561 def cgen(l_type, a_v, d_v):
1562 1562 mapping = {'tr': 'top-right-rounded-corner-mid',
1563 1563 'tl': 'top-left-rounded-corner-mid',
1564 1564 'br': 'bottom-right-rounded-corner-mid',
1565 1565 'bl': 'bottom-left-rounded-corner-mid'}
1566 1566 map_getter = lambda x: mapping[x]
1567 1567
1568 1568 if l_type == 'a' and d_v:
1569 1569 #case when added and deleted are present
1570 1570 return ' '.join(map(map_getter, ['tl', 'bl']))
1571 1571
1572 1572 if l_type == 'a' and not d_v:
1573 1573 return ' '.join(map(map_getter, ['tr', 'br', 'tl', 'bl']))
1574 1574
1575 1575 if l_type == 'd' and a_v:
1576 1576 return ' '.join(map(map_getter, ['tr', 'br']))
1577 1577
1578 1578 if l_type == 'd' and not a_v:
1579 1579 return ' '.join(map(map_getter, ['tr', 'br', 'tl', 'bl']))
1580 1580
1581 1581 a, d = stats['added'], stats['deleted']
1582 1582 width = 100
1583 1583
1584 1584 if stats['binary']: # binary operations like chmod/rename etc
1585 1585 lbl = []
1586 1586 bin_op = 0 # undefined
1587 1587
1588 1588 # prefix with bin for binary files
1589 1589 if BIN_FILENODE in stats['ops']:
1590 1590 lbl += ['bin']
1591 1591
1592 1592 if NEW_FILENODE in stats['ops']:
1593 1593 lbl += [_('new file')]
1594 1594 bin_op = NEW_FILENODE
1595 1595 elif MOD_FILENODE in stats['ops']:
1596 1596 lbl += [_('mod')]
1597 1597 bin_op = MOD_FILENODE
1598 1598 elif DEL_FILENODE in stats['ops']:
1599 1599 lbl += [_('del')]
1600 1600 bin_op = DEL_FILENODE
1601 1601 elif RENAMED_FILENODE in stats['ops']:
1602 1602 lbl += [_('rename')]
1603 1603 bin_op = RENAMED_FILENODE
1604 1604
1605 1605 # chmod can go with other operations, so we add a + to lbl if needed
1606 1606 if CHMOD_FILENODE in stats['ops']:
1607 1607 lbl += [_('chmod')]
1608 1608 if bin_op == 0:
1609 1609 bin_op = CHMOD_FILENODE
1610 1610
1611 1611 lbl = '+'.join(lbl)
1612 1612 b_a = '<div class="bin bin%s %s" style="width:100%%">%s</div>' \
1613 1613 % (bin_op, cgen('a', a_v='', d_v=0), lbl)
1614 1614 b_d = '<div class="bin bin1" style="width:0%%"></div>'
1615 1615 return literal('<div style="width:%spx">%s%s</div>' % (width, b_a, b_d))
1616 1616
1617 1617 t = stats['added'] + stats['deleted']
1618 1618 unit = float(width) / (t or 1)
1619 1619
1620 1620 # needs > 9% of width to be visible or 0 to be hidden
1621 1621 a_p = max(9, unit * a) if a > 0 else 0
1622 1622 d_p = max(9, unit * d) if d > 0 else 0
1623 1623 p_sum = a_p + d_p
1624 1624
1625 1625 if p_sum > width:
1626 1626 #adjust the percentage to be == 100% since we adjusted to 9
1627 1627 if a_p > d_p:
1628 1628 a_p = a_p - (p_sum - width)
1629 1629 else:
1630 1630 d_p = d_p - (p_sum - width)
1631 1631
1632 1632 a_v = a if a > 0 else ''
1633 1633 d_v = d if d > 0 else ''
1634 1634
1635 1635 d_a = '<div class="added %s" style="width:%s%%">%s</div>' % (
1636 1636 cgen('a', a_v, d_v), a_p, a_v
1637 1637 )
1638 1638 d_d = '<div class="deleted %s" style="width:%s%%">%s</div>' % (
1639 1639 cgen('d', a_v, d_v), d_p, d_v
1640 1640 )
1641 1641 return literal('<div style="width:%spx">%s%s</div>' % (width, d_a, d_d))
1642 1642
1643 1643
1644 1644 def urlify_text(text_, safe=True):
1645 1645 """
1646 1646 Extrac urls from text and make html links out of them
1647 1647
1648 1648 :param text_:
1649 1649 """
1650 1650
1651 1651 url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@#.&+]'''
1652 1652 '''|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)''')
1653 1653
1654 1654 def url_func(match_obj):
1655 1655 url_full = match_obj.groups()[0]
1656 1656 return '<a href="%(url)s">%(url)s</a>' % ({'url': url_full})
1657 1657 _newtext = url_pat.sub(url_func, text_)
1658 1658 if safe:
1659 1659 return literal(_newtext)
1660 1660 return _newtext
1661 1661
1662 1662
1663 1663 def urlify_commits(text_, repository):
1664 1664 """
1665 1665 Extract commit ids from text and make link from them
1666 1666
1667 1667 :param text_:
1668 1668 :param repository: repo name to build the URL with
1669 1669 """
1670 1670 from pylons import url # doh, we need to re-import url to mock it later
1671 1671 URL_PAT = re.compile(r'(^|\s)([0-9a-fA-F]{12,40})($|\s)')
1672 1672
1673 1673 def url_func(match_obj):
1674 1674 commit_id = match_obj.groups()[1]
1675 1675 pref = match_obj.groups()[0]
1676 1676 suf = match_obj.groups()[2]
1677 1677
1678 1678 tmpl = (
1679 1679 '%(pref)s<a class="%(cls)s" href="%(url)s">'
1680 1680 '%(commit_id)s</a>%(suf)s'
1681 1681 )
1682 1682 return tmpl % {
1683 1683 'pref': pref,
1684 1684 'cls': 'revision-link',
1685 1685 'url': url('changeset_home', repo_name=repository,
1686 1686 revision=commit_id, qualified=True),
1687 1687 'commit_id': commit_id,
1688 1688 'suf': suf
1689 1689 }
1690 1690
1691 1691 newtext = URL_PAT.sub(url_func, text_)
1692 1692
1693 1693 return newtext
1694 1694
1695 1695
1696 1696 def _process_url_func(match_obj, repo_name, uid, entry,
1697 1697 return_raw_data=False):
1698 1698 pref = ''
1699 1699 if match_obj.group().startswith(' '):
1700 1700 pref = ' '
1701 1701
1702 1702 issue_id = ''.join(match_obj.groups())
1703 1703 tmpl = (
1704 1704 '%(pref)s<a class="%(cls)s" href="%(url)s">'
1705 1705 '%(issue-prefix)s%(id-repr)s'
1706 1706 '</a>')
1707 1707
1708 1708 (repo_name_cleaned,
1709 1709 parent_group_name) = RepoGroupModel().\
1710 1710 _get_group_name_and_parent(repo_name)
1711 1711
1712 1712 # variables replacement
1713 1713 named_vars = {
1714 1714 'id': issue_id,
1715 1715 'repo': repo_name,
1716 1716 'repo_name': repo_name_cleaned,
1717 1717 'group_name': parent_group_name
1718 1718 }
1719 1719 # named regex variables
1720 1720 named_vars.update(match_obj.groupdict())
1721 1721 _url = string.Template(entry['url']).safe_substitute(**named_vars)
1722 1722
1723 1723 data = {
1724 1724 'pref': pref,
1725 1725 'cls': 'issue-tracker-link',
1726 1726 'url': _url,
1727 1727 'id-repr': issue_id,
1728 1728 'issue-prefix': entry['pref'],
1729 1729 'serv': entry['url'],
1730 1730 }
1731 1731 if return_raw_data:
1732 1732 return {
1733 1733 'id': issue_id,
1734 1734 'url': _url
1735 1735 }
1736 1736 return tmpl % data
1737 1737
1738 1738
1739 1739 def process_patterns(text_string, repo_name, config=None):
1740 1740 repo = None
1741 1741 if repo_name:
1742 1742 # Retrieving repo_name to avoid invalid repo_name to explode on
1743 1743 # IssueTrackerSettingsModel but still passing invalid name further down
1744 1744 repo = Repository.get_by_repo_name(repo_name, cache=True)
1745 1745
1746 1746 settings_model = IssueTrackerSettingsModel(repo=repo)
1747 1747 active_entries = settings_model.get_settings(cache=True)
1748 1748
1749 1749 issues_data = []
1750 1750 newtext = text_string
1751 1751 for uid, entry in active_entries.items():
1752 1752 log.debug('found issue tracker entry with uid %s' % (uid,))
1753 1753
1754 1754 if not (entry['pat'] and entry['url']):
1755 1755 log.debug('skipping due to missing data')
1756 1756 continue
1757 1757
1758 1758 log.debug('issue tracker entry: uid: `%s` PAT:%s URL:%s PREFIX:%s'
1759 1759 % (uid, entry['pat'], entry['url'], entry['pref']))
1760 1760
1761 1761 try:
1762 1762 pattern = re.compile(r'%s' % entry['pat'])
1763 1763 except re.error:
1764 1764 log.exception(
1765 1765 'issue tracker pattern: `%s` failed to compile',
1766 1766 entry['pat'])
1767 1767 continue
1768 1768
1769 1769 data_func = partial(
1770 1770 _process_url_func, repo_name=repo_name, entry=entry, uid=uid,
1771 1771 return_raw_data=True)
1772 1772
1773 1773 for match_obj in pattern.finditer(text_string):
1774 1774 issues_data.append(data_func(match_obj))
1775 1775
1776 1776 url_func = partial(
1777 1777 _process_url_func, repo_name=repo_name, entry=entry, uid=uid)
1778 1778
1779 1779 newtext = pattern.sub(url_func, newtext)
1780 1780 log.debug('processed prefix:uid `%s`' % (uid,))
1781 1781
1782 1782 return newtext, issues_data
1783 1783
1784 1784
1785 1785 def urlify_commit_message(commit_text, repository=None):
1786 1786 """
1787 1787 Parses given text message and makes proper links.
1788 1788 issues are linked to given issue-server, and rest is a commit link
1789 1789
1790 1790 :param commit_text:
1791 1791 :param repository:
1792 1792 """
1793 1793 from pylons import url # doh, we need to re-import url to mock it later
1794 1794
1795 1795 def escaper(string):
1796 1796 return string.replace('<', '&lt;').replace('>', '&gt;')
1797 1797
1798 1798 newtext = escaper(commit_text)
1799 1799
1800 1800 # extract http/https links and make them real urls
1801 1801 newtext = urlify_text(newtext, safe=False)
1802 1802
1803 1803 # urlify commits - extract commit ids and make link out of them, if we have
1804 1804 # the scope of repository present.
1805 1805 if repository:
1806 1806 newtext = urlify_commits(newtext, repository)
1807 1807
1808 1808 # process issue tracker patterns
1809 1809 newtext, issues = process_patterns(newtext, repository or '')
1810 1810
1811 1811 return literal(newtext)
1812 1812
1813 1813
1814 1814 def rst(source, mentions=False):
1815 1815 return literal('<div class="rst-block">%s</div>' %
1816 1816 MarkupRenderer.rst(source, mentions=mentions))
1817 1817
1818 1818
1819 1819 def markdown(source, mentions=False):
1820 1820 return literal('<div class="markdown-block">%s</div>' %
1821 1821 MarkupRenderer.markdown(source, flavored=True,
1822 1822 mentions=mentions))
1823 1823
1824
1824 1825 def renderer_from_filename(filename, exclude=None):
1825 return MarkupRenderer.renderer_from_filename(filename, exclude=exclude)
1826 """
1827 choose a renderer based on filename
1828 """
1829
1830 # images
1831
1832 # ipython
1833 if filename.endswith('.ipynb'):
1834 return 'ipython'
1835
1836 is_markup = MarkupRenderer.renderer_from_filename(filename, exclude=exclude)
1837 if is_markup:
1838 return is_markup
1839 return None
1826 1840
1827 1841
1828 1842 def render(source, renderer='rst', mentions=False):
1829 1843 if renderer == 'rst':
1830 1844 return rst(source, mentions=mentions)
1831 if renderer == 'markdown':
1845 elif renderer == 'markdown':
1832 1846 return markdown(source, mentions=mentions)
1847 elif renderer == 'ipython':
1848 def ipython_renderer(source):
1849 import nbformat
1850 from nbconvert import HTMLExporter
1851 notebook = nbformat.reads(source, as_version=4)
1852
1853 # 2. Instantiate the exporter. We use the `basic` template for now; we'll get into more details
1854 # later about how to customize the exporter further.
1855 html_exporter = HTMLExporter()
1856 html_exporter.template_file = 'basic'
1857
1858 # 3. Process the notebook we loaded earlier
1859 (body, resources) = html_exporter.from_notebook_node(notebook)
1860
1861 return body
1862
1863 return ipython_renderer(source)
1864 # None means just show the file-source
1865 return None
1833 1866
1834 1867
1835 1868 def commit_status(repo, commit_id):
1836 1869 return ChangesetStatusModel().get_status(repo, commit_id)
1837 1870
1838 1871
1839 1872 def commit_status_lbl(commit_status):
1840 1873 return dict(ChangesetStatus.STATUSES).get(commit_status)
1841 1874
1842 1875
1843 1876 def commit_time(repo_name, commit_id):
1844 1877 repo = Repository.get_by_repo_name(repo_name)
1845 1878 commit = repo.get_commit(commit_id=commit_id)
1846 1879 return commit.date
1847 1880
1848 1881
1849 1882 def get_permission_name(key):
1850 1883 return dict(Permission.PERMS).get(key)
1851 1884
1852 1885
1853 1886 def journal_filter_help():
1854 1887 return _(
1855 1888 'Example filter terms:\n' +
1856 1889 ' repository:vcs\n' +
1857 1890 ' username:marcin\n' +
1858 1891 ' action:*push*\n' +
1859 1892 ' ip:127.0.0.1\n' +
1860 1893 ' date:20120101\n' +
1861 1894 ' date:[20120101100000 TO 20120102]\n' +
1862 1895 '\n' +
1863 1896 'Generate wildcards using \'*\' character:\n' +
1864 1897 ' "repository:vcs*" - search everything starting with \'vcs\'\n' +
1865 1898 ' "repository:*vcs*" - search for repository containing \'vcs\'\n' +
1866 1899 '\n' +
1867 1900 'Optional AND / OR operators in queries\n' +
1868 1901 ' "repository:vcs OR repository:test"\n' +
1869 1902 ' "username:test AND repository:test*"\n'
1870 1903 )
1871 1904
1872 1905
1873 1906 def not_mapped_error(repo_name):
1874 1907 flash(_('%s repository is not mapped to db perhaps'
1875 1908 ' it was created or renamed from the filesystem'
1876 1909 ' please run the application again'
1877 1910 ' in order to rescan repositories') % repo_name, category='error')
1878 1911
1879 1912
1880 1913 def ip_range(ip_addr):
1881 1914 from rhodecode.model.db import UserIpMap
1882 1915 s, e = UserIpMap._get_ip_range(ip_addr)
1883 1916 return '%s - %s' % (s, e)
1884 1917
1885 1918
1886 1919 def form(url, method='post', needs_csrf_token=True, **attrs):
1887 1920 """Wrapper around webhelpers.tags.form to prevent CSRF attacks."""
1888 1921 if method.lower() != 'get' and needs_csrf_token:
1889 1922 raise Exception(
1890 1923 'Forms to POST/PUT/DELETE endpoints should have (in general) a ' +
1891 1924 'CSRF token. If the endpoint does not require such token you can ' +
1892 1925 'explicitly set the parameter needs_csrf_token to false.')
1893 1926
1894 1927 return wh_form(url, method=method, **attrs)
1895 1928
1896 1929
1897 1930 def secure_form(url, method="POST", multipart=False, **attrs):
1898 1931 """Start a form tag that points the action to an url. This
1899 1932 form tag will also include the hidden field containing
1900 1933 the auth token.
1901 1934
1902 1935 The url options should be given either as a string, or as a
1903 1936 ``url()`` function. The method for the form defaults to POST.
1904 1937
1905 1938 Options:
1906 1939
1907 1940 ``multipart``
1908 1941 If set to True, the enctype is set to "multipart/form-data".
1909 1942 ``method``
1910 1943 The method to use when submitting the form, usually either
1911 1944 "GET" or "POST". If "PUT", "DELETE", or another verb is used, a
1912 1945 hidden input with name _method is added to simulate the verb
1913 1946 over POST.
1914 1947
1915 1948 """
1916 1949 from webhelpers.pylonslib.secure_form import insecure_form
1917 1950 form = insecure_form(url, method, multipart, **attrs)
1918 1951 token = csrf_input()
1919 1952 return literal("%s\n%s" % (form, token))
1920 1953
1921 1954 def csrf_input():
1922 1955 return literal(
1923 1956 '<input type="hidden" id="{}" name="{}" value="{}">'.format(
1924 1957 csrf_token_key, csrf_token_key, get_csrf_token()))
1925 1958
1926 1959 def dropdownmenu(name, selected, options, enable_filter=False, **attrs):
1927 1960 select_html = select(name, selected, options, **attrs)
1928 1961 select2 = """
1929 1962 <script>
1930 1963 $(document).ready(function() {
1931 1964 $('#%s').select2({
1932 1965 containerCssClass: 'drop-menu',
1933 1966 dropdownCssClass: 'drop-menu-dropdown',
1934 1967 dropdownAutoWidth: true%s
1935 1968 });
1936 1969 });
1937 1970 </script>
1938 1971 """
1939 1972 filter_option = """,
1940 1973 minimumResultsForSearch: -1
1941 1974 """
1942 1975 input_id = attrs.get('id') or name
1943 1976 filter_enabled = "" if enable_filter else filter_option
1944 1977 select_script = literal(select2 % (input_id, filter_enabled))
1945 1978
1946 1979 return literal(select_html+select_script)
1947 1980
1948 1981
1949 1982 def get_visual_attr(tmpl_context_var, attr_name):
1950 1983 """
1951 1984 A safe way to get a variable from visual variable of template context
1952 1985
1953 1986 :param tmpl_context_var: instance of tmpl_context, usually present as `c`
1954 1987 :param attr_name: name of the attribute we fetch from the c.visual
1955 1988 """
1956 1989 visual = getattr(tmpl_context_var, 'visual', None)
1957 1990 if not visual:
1958 1991 return
1959 1992 else:
1960 1993 return getattr(visual, attr_name, None)
1961 1994
1962 1995
1963 1996 def get_last_path_part(file_node):
1964 1997 if not file_node.path:
1965 1998 return u''
1966 1999
1967 2000 path = safe_unicode(file_node.path.split('/')[-1])
1968 2001 return u'../' + path
1969 2002
1970 2003
1971 2004 def route_path(*args, **kwds):
1972 2005 """
1973 2006 Wrapper around pyramids `route_path` function. It is used to generate
1974 2007 URLs from within pylons views or templates. This will be removed when
1975 2008 pyramid migration if finished.
1976 2009 """
1977 2010 req = get_current_request()
1978 2011 return req.route_path(*args, **kwds)
1979 2012
1980 2013
1981 2014 def route_path_or_none(*args, **kwargs):
1982 2015 try:
1983 2016 return route_path(*args, **kwargs)
1984 2017 except KeyError:
1985 2018 return None
1986 2019
1987 2020
1988 2021 def static_url(*args, **kwds):
1989 2022 """
1990 2023 Wrapper around pyramids `route_path` function. It is used to generate
1991 2024 URLs from within pylons views or templates. This will be removed when
1992 2025 pyramid migration if finished.
1993 2026 """
1994 2027 req = get_current_request()
1995 2028 return req.static_url(*args, **kwds)
1996 2029
1997 2030
1998 2031 def resource_path(*args, **kwds):
1999 2032 """
2000 2033 Wrapper around pyramids `route_path` function. It is used to generate
2001 2034 URLs from within pylons views or templates. This will be removed when
2002 2035 pyramid migration if finished.
2003 2036 """
2004 2037 req = get_current_request()
2005 2038 return req.resource_path(*args, **kwds)
@@ -1,254 +1,255 b''
1 1 # -*- coding: utf-8 -*-
2 2
3 3 # Copyright (C) 2010-2017 RhodeCode GmbH
4 4 #
5 5 # This program is free software: you can redistribute it and/or modify
6 6 # it under the terms of the GNU Affero General Public License, version 3
7 7 # (only), as published by the Free Software Foundation.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU Affero General Public License
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16 #
17 17 # This program is dual-licensed. If you wish to learn more about the
18 18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 20
21 21 # Import early to make sure things are patched up properly
22 22 from setuptools import setup, find_packages
23 23
24 24 import os
25 25 import sys
26 26 import pkgutil
27 27 import platform
28 28
29 29 from pip.download import PipSession
30 30 from pip.req import parse_requirements
31 31
32 32 from codecs import open
33 33
34 34
35 35 if sys.version_info < (2, 7):
36 36 raise Exception('RhodeCode requires Python 2.7 or later')
37 37
38 38 here = os.path.abspath(os.path.dirname(__file__))
39 39
40 40 # defines current platform
41 41 __platform__ = platform.system()
42 42 __license__ = 'AGPLv3, and Commercial License'
43 43 __author__ = 'RhodeCode GmbH'
44 44 __url__ = 'https://code.rhodecode.com'
45 45 is_windows = __platform__ in ('Windows',)
46 46
47 47
48 48 def _get_requirements(req_filename, exclude=None, extras=None):
49 49 extras = extras or []
50 50 exclude = exclude or []
51 51
52 52 try:
53 53 parsed = parse_requirements(
54 54 os.path.join(here, req_filename), session=PipSession())
55 55 except TypeError:
56 56 # try pip < 6.0.0, that doesn't support session
57 57 parsed = parse_requirements(os.path.join(here, req_filename))
58 58
59 59 requirements = []
60 60 for ir in parsed:
61 61 if ir.req and ir.name not in exclude:
62 62 requirements.append(str(ir.req))
63 63 return requirements + extras
64 64
65 65
66 66 # requirements extract
67 67 setup_requirements = ['PasteScript', 'pytest-runner']
68 68 install_requirements = _get_requirements(
69 69 'requirements.txt', exclude=['setuptools'])
70 70 test_requirements = _get_requirements(
71 71 'requirements_test.txt', extras=['configobj'])
72 72
73 73 install_requirements = [
74 74 'Babel',
75 75 'Beaker',
76 76 'FormEncode',
77 77 'Mako',
78 78 'Markdown',
79 79 'MarkupSafe',
80 80 'MySQL-python',
81 81 'Paste',
82 82 'PasteDeploy',
83 83 'PasteScript',
84 84 'Pygments',
85 85 'pygments-markdown-lexer',
86 86 'Pylons',
87 87 'Routes',
88 88 'SQLAlchemy',
89 89 'Tempita',
90 90 'URLObject',
91 91 'WebError',
92 92 'WebHelpers',
93 93 'WebHelpers2',
94 94 'WebOb',
95 95 'WebTest',
96 96 'Whoosh',
97 97 'alembic',
98 98 'amqplib',
99 99 'anyjson',
100 100 'appenlight-client',
101 101 'authomatic',
102 102 'backport_ipaddress',
103 103 'celery',
104 104 'channelstream',
105 105 'colander',
106 106 'decorator',
107 107 'deform',
108 108 'docutils',
109 109 'gevent',
110 110 'gunicorn',
111 111 'infrae.cache',
112 112 'ipython',
113 113 'iso8601',
114 114 'kombu',
115 115 'msgpack-python',
116 'nbconvert',
116 117 'packaging',
117 118 'psycopg2',
118 119 'py-gfm',
119 120 'pycrypto',
120 121 'pycurl',
121 122 'pyparsing',
122 123 'pyramid',
123 124 'pyramid-debugtoolbar',
124 125 'pyramid-mako',
125 126 'pyramid-beaker',
126 127 'pysqlite',
127 128 'python-dateutil',
128 129 'python-ldap',
129 130 'python-memcached',
130 131 'python-pam',
131 132 'recaptcha-client',
132 133 'repoze.lru',
133 134 'requests',
134 135 'simplejson',
135 136 'subprocess32',
136 137 'waitress',
137 138 'zope.cachedescriptors',
138 139 'dogpile.cache',
139 140 'dogpile.core',
140 141 'psutil',
141 142 'py-bcrypt',
142 143 ]
143 144
144 145
145 146 def get_version():
146 147 version = pkgutil.get_data('rhodecode', 'VERSION')
147 148 return version.strip()
148 149
149 150
150 151 # additional files that goes into package itself
151 152 package_data = {
152 153 '': ['*.txt', '*.rst'],
153 154 'configs': ['*.ini'],
154 155 'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ],
155 156 }
156 157
157 158 description = 'Source Code Management Platform'
158 159 keywords = ' '.join([
159 160 'rhodecode', 'mercurial', 'git', 'svn',
160 161 'code review',
161 162 'repo groups', 'ldap', 'repository management', 'hgweb',
162 163 'hgwebdir', 'gitweb', 'serving hgweb',
163 164 ])
164 165
165 166
166 167 # README/DESCRIPTION generation
167 168 readme_file = 'README.rst'
168 169 changelog_file = 'CHANGES.rst'
169 170 try:
170 171 long_description = open(readme_file).read() + '\n\n' + \
171 172 open(changelog_file).read()
172 173 except IOError as err:
173 174 sys.stderr.write(
174 175 "[WARNING] Cannot find file specified as long_description (%s)\n "
175 176 "or changelog (%s) skipping that file" % (readme_file, changelog_file))
176 177 long_description = description
177 178
178 179
179 180 setup(
180 181 name='rhodecode-enterprise-ce',
181 182 version=get_version(),
182 183 description=description,
183 184 long_description=long_description,
184 185 keywords=keywords,
185 186 license=__license__,
186 187 author=__author__,
187 188 author_email='marcin@rhodecode.com',
188 189 url=__url__,
189 190 setup_requires=setup_requirements,
190 191 install_requires=install_requirements,
191 192 tests_require=test_requirements,
192 193 zip_safe=False,
193 194 packages=find_packages(exclude=["docs", "tests*"]),
194 195 package_data=package_data,
195 196 include_package_data=True,
196 197 classifiers=[
197 198 'Development Status :: 6 - Mature',
198 199 'Environment :: Web Environment',
199 200 'Intended Audience :: Developers',
200 201 'Operating System :: OS Independent',
201 202 'Topic :: Software Development :: Version Control',
202 203 'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)',
203 204 'Programming Language :: Python :: 2.7',
204 205 ],
205 206 message_extractors={
206 207 'rhodecode': [
207 208 ('**.py', 'python', None),
208 209 ('**.js', 'javascript', None),
209 210 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
210 211 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
211 212 ('public/**', 'ignore', None),
212 213 ]
213 214 },
214 215 paster_plugins=['PasteScript', 'Pylons'],
215 216 entry_points={
216 217 'enterprise.plugins1': [
217 218 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory',
218 219 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory',
219 220 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory',
220 221 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory',
221 222 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory',
222 223 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory',
223 224 'token=rhodecode.authentication.plugins.auth_token:plugin_factory',
224 225 ],
225 226 'paste.app_factory': [
226 227 'main=rhodecode.config.middleware:make_pyramid_app',
227 228 'pylons=rhodecode.config.middleware:make_app',
228 229 ],
229 230 'paste.app_install': [
230 231 'main=pylons.util:PylonsInstaller',
231 232 'pylons=pylons.util:PylonsInstaller',
232 233 ],
233 234 'paste.global_paster_command': [
234 235 'make-config=rhodecode.lib.paster_commands.make_config:Command',
235 236 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command',
236 237 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command',
237 238 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command',
238 239 'ishell=rhodecode.lib.paster_commands.ishell:Command',
239 240 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb',
240 241 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand',
241 242 ],
242 243 'pytest11': [
243 244 'pylons=rhodecode.tests.pylons_plugin',
244 245 'enterprise=rhodecode.tests.plugin',
245 246 ],
246 247 'console_scripts': [
247 248 'rcserver=rhodecode.rcserver:main',
248 249 ],
249 250 'beaker.backends': [
250 251 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase',
251 252 'memorylru_debug=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerDebug'
252 253 ]
253 254 },
254 255 )
General Comments 0
You need to be logged in to leave comments. Login now