Show More
@@ -1,2086 +1,2099 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.9.1"; |
|
20 | 20 | buildInputs = with self; []; |
|
21 | 21 | doCheck = false; |
|
22 | 22 | propagatedBuildInputs = with self; [funcsigs]; |
|
23 | 23 | src = fetchurl { |
|
24 | 24 | url = "https://pypi.python.org/packages/ca/14/a626188d0d0c7b55dd7cf1902046c2743bd392a7078bb53073e13280eb1e/Beaker-1.9.1.tar.gz"; |
|
25 | 25 | md5 = "46fda0a164e2b0d24ccbda51a2310301"; |
|
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.7"; |
|
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/df/50/d8c1ada7d537c64b0f76453fa31dedb6af6e27b82fcf0331e5f71a4cf98b/CProfileV-1.0.7.tar.gz"; |
|
38 | 38 | md5 = "db4c7640438aa3d8887e194c81c7a019"; |
|
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.9.6"; |
|
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/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/Jinja2-2.9.6.tar.gz"; |
|
77 | 77 | md5 = "6411537324b4dba0956aaa8109f3c77b"; |
|
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.7"; |
|
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/eb/f3/67579bb486517c0d49547f9697e36582cd19dafb5df9e687ed8e22de57fa/Mako-1.0.7.tar.gz"; |
|
90 | 90 | md5 = "5836cc997b1b773ef389bf6629c30e65"; |
|
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.11"; |
|
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/b3/73/fc5c850f44af5889192dff783b7b0d8f3fe8d30b65c8e3f78f8f0265fecf/Markdown-2.6.11.tar.gz"; |
|
103 | 103 | md5 = "a67c1b2914f7d74eeede2ebe0fdae470"; |
|
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-1.0"; |
|
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/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz"; |
|
116 | 116 | md5 = "2fcedc9284d50e577b5192e8e3578355"; |
|
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-2.0.2"; |
|
163 | 163 | buildInputs = with self; []; |
|
164 | 164 | doCheck = false; |
|
165 | 165 | propagatedBuildInputs = with self; [Paste PasteDeploy six]; |
|
166 | 166 | src = fetchurl { |
|
167 | 167 | url = "https://pypi.python.org/packages/e5/f0/78e766c3dcc61a4f3a6f71dd8c95168ae9c7a31722b5663d19c1fdf62cb6/PasteScript-2.0.2.tar.gz"; |
|
168 | 168 | md5 = "ccb3045445097192ca71a13b746c77b2"; |
|
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 | Routes = super.buildPythonPackage { |
|
188 | 188 | name = "Routes-2.4.1"; |
|
189 | 189 | buildInputs = with self; []; |
|
190 | 190 | doCheck = false; |
|
191 | 191 | propagatedBuildInputs = with self; [six repoze.lru]; |
|
192 | 192 | src = fetchurl { |
|
193 | 193 | url = "https://pypi.python.org/packages/33/38/ea827837e68d9c7dde4cff7ec122a93c319f0effc08ce92a17095576603f/Routes-2.4.1.tar.gz"; |
|
194 | 194 | md5 = "c058dff6832941dec47e0d0052548ad8"; |
|
195 | 195 | }; |
|
196 | 196 | meta = { |
|
197 | 197 | license = [ pkgs.lib.licenses.mit ]; |
|
198 | 198 | }; |
|
199 | 199 | }; |
|
200 | 200 | SQLAlchemy = super.buildPythonPackage { |
|
201 | 201 | name = "SQLAlchemy-1.1.15"; |
|
202 | 202 | buildInputs = with self; []; |
|
203 | 203 | doCheck = false; |
|
204 | 204 | propagatedBuildInputs = with self; []; |
|
205 | 205 | src = fetchurl { |
|
206 | 206 | url = "https://pypi.python.org/packages/c2/f6/11fcc1ce19a7cb81b1c9377f4e27ce3813265611922e355905e57c44d164/SQLAlchemy-1.1.15.tar.gz"; |
|
207 | 207 | md5 = "077f9bd3339957f53068b5572a152674"; |
|
208 | 208 | }; |
|
209 | 209 | meta = { |
|
210 | 210 | license = [ pkgs.lib.licenses.mit ]; |
|
211 | 211 | }; |
|
212 | 212 | }; |
|
213 | 213 | Tempita = super.buildPythonPackage { |
|
214 | 214 | name = "Tempita-0.5.2"; |
|
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/56/c8/8ed6eee83dbddf7b0fc64dd5d4454bc05e6ccaafff47991f73f2894d9ff4/Tempita-0.5.2.tar.gz"; |
|
220 | 220 | md5 = "4c2f17bb9d481821c41b6fbee904cea1"; |
|
221 | 221 | }; |
|
222 | 222 | meta = { |
|
223 | 223 | license = [ pkgs.lib.licenses.mit ]; |
|
224 | 224 | }; |
|
225 | 225 | }; |
|
226 | 226 | URLObject = super.buildPythonPackage { |
|
227 | 227 | name = "URLObject-2.4.0"; |
|
228 | 228 | buildInputs = with self; []; |
|
229 | 229 | doCheck = false; |
|
230 | 230 | propagatedBuildInputs = with self; []; |
|
231 | 231 | src = fetchurl { |
|
232 | 232 | url = "https://pypi.python.org/packages/cb/b6/e25e58500f9caef85d664bec71ec67c116897bfebf8622c32cb75d1ca199/URLObject-2.4.0.tar.gz"; |
|
233 | 233 | md5 = "2ed819738a9f0a3051f31dc9924e3065"; |
|
234 | 234 | }; |
|
235 | 235 | meta = { |
|
236 | 236 | license = [ ]; |
|
237 | 237 | }; |
|
238 | 238 | }; |
|
239 | 239 | WebError = super.buildPythonPackage { |
|
240 | 240 | name = "WebError-0.10.3"; |
|
241 | 241 | buildInputs = with self; []; |
|
242 | 242 | doCheck = false; |
|
243 | 243 | propagatedBuildInputs = with self; [WebOb Tempita Pygments Paste]; |
|
244 | 244 | src = fetchurl { |
|
245 | 245 | url = "https://pypi.python.org/packages/35/76/e7e5c2ce7e9c7f31b54c1ff295a495886d1279a002557d74dd8957346a79/WebError-0.10.3.tar.gz"; |
|
246 | 246 | md5 = "84b9990b0baae6fd440b1e60cdd06f9a"; |
|
247 | 247 | }; |
|
248 | 248 | meta = { |
|
249 | 249 | license = [ pkgs.lib.licenses.mit ]; |
|
250 | 250 | }; |
|
251 | 251 | }; |
|
252 | 252 | WebHelpers = super.buildPythonPackage { |
|
253 | 253 | name = "WebHelpers-1.3"; |
|
254 | 254 | buildInputs = with self; []; |
|
255 | 255 | doCheck = false; |
|
256 | 256 | propagatedBuildInputs = with self; [MarkupSafe]; |
|
257 | 257 | src = fetchurl { |
|
258 | 258 | url = "https://pypi.python.org/packages/ee/68/4d07672821d514184357f1552f2dad923324f597e722de3b016ca4f7844f/WebHelpers-1.3.tar.gz"; |
|
259 | 259 | md5 = "32749ffadfc40fea51075a7def32588b"; |
|
260 | 260 | }; |
|
261 | 261 | meta = { |
|
262 | 262 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
263 | 263 | }; |
|
264 | 264 | }; |
|
265 | 265 | WebHelpers2 = super.buildPythonPackage { |
|
266 | 266 | name = "WebHelpers2-2.0"; |
|
267 | 267 | buildInputs = with self; []; |
|
268 | 268 | doCheck = false; |
|
269 | 269 | propagatedBuildInputs = with self; [MarkupSafe six]; |
|
270 | 270 | src = fetchurl { |
|
271 | 271 | url = "https://pypi.python.org/packages/ff/30/56342c6ea522439e3662427c8d7b5e5b390dff4ff2dc92d8afcb8ab68b75/WebHelpers2-2.0.tar.gz"; |
|
272 | 272 | md5 = "0f6b68d70c12ee0aed48c00b24da13d3"; |
|
273 | 273 | }; |
|
274 | 274 | meta = { |
|
275 | 275 | license = [ pkgs.lib.licenses.mit ]; |
|
276 | 276 | }; |
|
277 | 277 | }; |
|
278 | 278 | WebOb = super.buildPythonPackage { |
|
279 | 279 | name = "WebOb-1.7.4"; |
|
280 | 280 | buildInputs = with self; []; |
|
281 | 281 | doCheck = false; |
|
282 | 282 | propagatedBuildInputs = with self; []; |
|
283 | 283 | src = fetchurl { |
|
284 | 284 | url = "https://pypi.python.org/packages/75/34/731e23f52371852dfe7490a61644826ba7fe70fd52a377aaca0f4956ba7f/WebOb-1.7.4.tar.gz"; |
|
285 | 285 | md5 = "397e46892d7f199b1a07eb20a2d3d9bd"; |
|
286 | 286 | }; |
|
287 | 287 | meta = { |
|
288 | 288 | license = [ pkgs.lib.licenses.mit ]; |
|
289 | 289 | }; |
|
290 | 290 | }; |
|
291 | 291 | WebTest = super.buildPythonPackage { |
|
292 | 292 | name = "WebTest-2.0.29"; |
|
293 | 293 | buildInputs = with self; []; |
|
294 | 294 | doCheck = false; |
|
295 | 295 | propagatedBuildInputs = with self; [six WebOb waitress beautifulsoup4]; |
|
296 | 296 | src = fetchurl { |
|
297 | 297 | url = "https://pypi.python.org/packages/94/de/8f94738be649997da99c47b104aa3c3984ecec51a1d8153ed09638253d56/WebTest-2.0.29.tar.gz"; |
|
298 | 298 | md5 = "30b4cf0d340b9a5335fac4389e6f84fc"; |
|
299 | 299 | }; |
|
300 | 300 | meta = { |
|
301 | 301 | license = [ pkgs.lib.licenses.mit ]; |
|
302 | 302 | }; |
|
303 | 303 | }; |
|
304 | 304 | Whoosh = super.buildPythonPackage { |
|
305 | 305 | name = "Whoosh-2.7.4"; |
|
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/25/2b/6beed2107b148edc1321da0d489afc4617b9ed317ef7b72d4993cad9b684/Whoosh-2.7.4.tar.gz"; |
|
311 | 311 | md5 = "c2710105f20b3e29936bd2357383c325"; |
|
312 | 312 | }; |
|
313 | 313 | meta = { |
|
314 | 314 | license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.bsd2 ]; |
|
315 | 315 | }; |
|
316 | 316 | }; |
|
317 | 317 | alembic = super.buildPythonPackage { |
|
318 | 318 | name = "alembic-0.9.8"; |
|
319 | 319 | buildInputs = with self; []; |
|
320 | 320 | doCheck = false; |
|
321 | 321 | propagatedBuildInputs = with self; [SQLAlchemy Mako python-editor python-dateutil]; |
|
322 | 322 | src = fetchurl { |
|
323 | 323 | url = "https://pypi.python.org/packages/a1/95/2252783859df9ec76b9a25d968c2827ed75a43ba34c6e8d38f87a5c0fb26/alembic-0.9.8.tar.gz"; |
|
324 | 324 | md5 = "5cfef58641c9a94d4a5d547e951a7dda"; |
|
325 | 325 | }; |
|
326 | 326 | meta = { |
|
327 | 327 | license = [ pkgs.lib.licenses.mit ]; |
|
328 | 328 | }; |
|
329 | 329 | }; |
|
330 | 330 | amqp = super.buildPythonPackage { |
|
331 | 331 | name = "amqp-2.2.2"; |
|
332 | 332 | buildInputs = with self; []; |
|
333 | 333 | doCheck = false; |
|
334 | 334 | propagatedBuildInputs = with self; [vine]; |
|
335 | 335 | src = fetchurl { |
|
336 | 336 | url = "https://pypi.python.org/packages/e0/70/9ab9ccd8247fb7d2adb717e9f6a0ed358c9e1ab2c349048b0352f9e80ee2/amqp-2.2.2.tar.gz"; |
|
337 | 337 | md5 = "0971a3fd2d635ded45c349cfc17106bd"; |
|
338 | 338 | }; |
|
339 | 339 | meta = { |
|
340 | 340 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
341 | 341 | }; |
|
342 | 342 | }; |
|
343 | 343 | appenlight-client = super.buildPythonPackage { |
|
344 | 344 | name = "appenlight-client-0.6.25"; |
|
345 | 345 | buildInputs = with self; []; |
|
346 | 346 | doCheck = false; |
|
347 | 347 | propagatedBuildInputs = with self; [WebOb requests six]; |
|
348 | 348 | src = fetchurl { |
|
349 | 349 | url = "https://pypi.python.org/packages/fa/44/2911ef85ea4f4fe65058fd22959d8dad598fab6a3c84e5bcb569d15c8783/appenlight_client-0.6.25.tar.gz"; |
|
350 | 350 | md5 = "76dd2f9d42659fae8f290982078dc880"; |
|
351 | 351 | }; |
|
352 | 352 | meta = { |
|
353 | 353 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
354 | 354 | }; |
|
355 | 355 | }; |
|
356 | 356 | authomatic = super.buildPythonPackage { |
|
357 | 357 | name = "authomatic-0.1.0.post1"; |
|
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/08/1a/8a930461e604c2d5a7a871e1ac59fa82ccf994c32e807230c8d2fb07815a/Authomatic-0.1.0.post1.tar.gz"; |
|
363 | 363 | md5 = "be3f3ce08747d776aae6d6cc8dcb49a9"; |
|
364 | 364 | }; |
|
365 | 365 | meta = { |
|
366 | 366 | license = [ pkgs.lib.licenses.mit ]; |
|
367 | 367 | }; |
|
368 | 368 | }; |
|
369 | 369 | backports.shutil-get-terminal-size = super.buildPythonPackage { |
|
370 | 370 | name = "backports.shutil-get-terminal-size-1.0.0"; |
|
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/ec/9c/368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/backports.shutil_get_terminal_size-1.0.0.tar.gz"; |
|
376 | 376 | md5 = "03267762480bd86b50580dc19dff3c66"; |
|
377 | 377 | }; |
|
378 | 378 | meta = { |
|
379 | 379 | license = [ pkgs.lib.licenses.mit ]; |
|
380 | 380 | }; |
|
381 | 381 | }; |
|
382 | 382 | beautifulsoup4 = super.buildPythonPackage { |
|
383 | 383 | name = "beautifulsoup4-4.6.0"; |
|
384 | 384 | buildInputs = with self; []; |
|
385 | 385 | doCheck = false; |
|
386 | 386 | propagatedBuildInputs = with self; []; |
|
387 | 387 | src = fetchurl { |
|
388 | 388 | url = "https://pypi.python.org/packages/fa/8d/1d14391fdaed5abada4e0f63543fef49b8331a34ca60c88bd521bcf7f782/beautifulsoup4-4.6.0.tar.gz"; |
|
389 | 389 | md5 = "c17714d0f91a23b708a592cb3c697728"; |
|
390 | 390 | }; |
|
391 | 391 | meta = { |
|
392 | 392 | license = [ pkgs.lib.licenses.mit ]; |
|
393 | 393 | }; |
|
394 | 394 | }; |
|
395 | 395 | billiard = super.buildPythonPackage { |
|
396 | 396 | name = "billiard-3.5.0.3"; |
|
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/39/ac/f5571210cca2e4f4532e38aaff242f26c8654c5e2436bee966c230647ccc/billiard-3.5.0.3.tar.gz"; |
|
402 | 402 | md5 = "113ba481e48400adbf6fbbf59a2f8554"; |
|
403 | 403 | }; |
|
404 | 404 | meta = { |
|
405 | 405 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
406 | 406 | }; |
|
407 | 407 | }; |
|
408 | 408 | bleach = super.buildPythonPackage { |
|
409 | 409 | name = "bleach-2.1.2"; |
|
410 | 410 | buildInputs = with self; []; |
|
411 | 411 | doCheck = false; |
|
412 | 412 | propagatedBuildInputs = with self; [six html5lib]; |
|
413 | 413 | src = fetchurl { |
|
414 | 414 | url = "https://pypi.python.org/packages/b3/5f/0da670d30d3ffbc57cc97fa82947f81bbe3eab8d441e2d42e661f215baf2/bleach-2.1.2.tar.gz"; |
|
415 | 415 | md5 = "d0b14ae43a437ee0c650e04c6063eedd"; |
|
416 | 416 | }; |
|
417 | 417 | meta = { |
|
418 | 418 | license = [ pkgs.lib.licenses.asl20 ]; |
|
419 | 419 | }; |
|
420 | 420 | }; |
|
421 | 421 | bottle = super.buildPythonPackage { |
|
422 | 422 | name = "bottle-0.12.13"; |
|
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/bd/99/04dc59ced52a8261ee0f965a8968717a255ea84a36013e527944dbf3468c/bottle-0.12.13.tar.gz"; |
|
428 | 428 | md5 = "d2fe1b48c1d49217e78bf326b1cad437"; |
|
429 | 429 | }; |
|
430 | 430 | meta = { |
|
431 | 431 | license = [ pkgs.lib.licenses.mit ]; |
|
432 | 432 | }; |
|
433 | 433 | }; |
|
434 | 434 | bumpversion = super.buildPythonPackage { |
|
435 | 435 | name = "bumpversion-0.5.3"; |
|
436 | 436 | buildInputs = with self; []; |
|
437 | 437 | doCheck = false; |
|
438 | 438 | propagatedBuildInputs = with self; []; |
|
439 | 439 | src = fetchurl { |
|
440 | 440 | url = "https://pypi.python.org/packages/14/41/8c9da3549f8e00c84f0432c3a8cf8ed6898374714676aab91501d48760db/bumpversion-0.5.3.tar.gz"; |
|
441 | 441 | md5 = "c66a3492eafcf5ad4b024be9fca29820"; |
|
442 | 442 | }; |
|
443 | 443 | meta = { |
|
444 | 444 | license = [ pkgs.lib.licenses.mit ]; |
|
445 | 445 | }; |
|
446 | 446 | }; |
|
447 | 447 | celery = super.buildPythonPackage { |
|
448 | 448 | name = "celery-4.1.0"; |
|
449 | 449 | buildInputs = with self; []; |
|
450 | 450 | doCheck = false; |
|
451 | 451 | propagatedBuildInputs = with self; [pytz billiard kombu]; |
|
452 | 452 | src = fetchurl { |
|
453 | 453 | url = "https://pypi.python.org/packages/07/65/88a2a45fc80f487872c93121a701a53bbbc3d3d832016876fac84fc8d46a/celery-4.1.0.tar.gz"; |
|
454 | 454 | md5 = "db91e1d26936381127f01e150fe3054a"; |
|
455 | 455 | }; |
|
456 | 456 | meta = { |
|
457 | 457 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
458 | 458 | }; |
|
459 | 459 | }; |
|
460 | 460 | channelstream = super.buildPythonPackage { |
|
461 | 461 | name = "channelstream-0.5.2"; |
|
462 | 462 | buildInputs = with self; []; |
|
463 | 463 | doCheck = false; |
|
464 | 464 | propagatedBuildInputs = with self; [gevent ws4py pyramid pyramid-jinja2 itsdangerous requests six]; |
|
465 | 465 | src = fetchurl { |
|
466 | 466 | url = "https://pypi.python.org/packages/2b/31/29a8e085cf5bf97fa88e7b947adabfc581a18a3463adf77fb6dada34a65f/channelstream-0.5.2.tar.gz"; |
|
467 | 467 | md5 = "1c5eb2a8a405be6f1073da94da6d81d3"; |
|
468 | 468 | }; |
|
469 | 469 | meta = { |
|
470 | 470 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
471 | 471 | }; |
|
472 | 472 | }; |
|
473 | 473 | click = super.buildPythonPackage { |
|
474 | 474 | name = "click-6.6"; |
|
475 | 475 | buildInputs = with self; []; |
|
476 | 476 | doCheck = false; |
|
477 | 477 | propagatedBuildInputs = with self; []; |
|
478 | 478 | src = fetchurl { |
|
479 | 479 | url = "https://pypi.python.org/packages/7a/00/c14926d8232b36b08218067bcd5853caefb4737cda3f0a47437151344792/click-6.6.tar.gz"; |
|
480 | 480 | md5 = "d0b09582123605220ad6977175f3e51d"; |
|
481 | 481 | }; |
|
482 | 482 | meta = { |
|
483 | 483 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
484 | 484 | }; |
|
485 | 485 | }; |
|
486 | 486 | colander = super.buildPythonPackage { |
|
487 | 487 | name = "colander-1.4"; |
|
488 | 488 | buildInputs = with self; []; |
|
489 | 489 | doCheck = false; |
|
490 | 490 | propagatedBuildInputs = with self; [translationstring iso8601]; |
|
491 | 491 | src = fetchurl { |
|
492 | 492 | url = "https://pypi.python.org/packages/cc/e2/c4e716ac4a426d8ad4dfe306c34f0018a22275d2420815784005bf771c84/colander-1.4.tar.gz"; |
|
493 | 493 | md5 = "cbb8e403c2ba05aeaa419d51fdb93736"; |
|
494 | 494 | }; |
|
495 | 495 | meta = { |
|
496 | 496 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
497 | 497 | }; |
|
498 | 498 | }; |
|
499 | 499 | configobj = super.buildPythonPackage { |
|
500 | 500 | name = "configobj-5.0.6"; |
|
501 | 501 | buildInputs = with self; []; |
|
502 | 502 | doCheck = false; |
|
503 | 503 | propagatedBuildInputs = with self; [six]; |
|
504 | 504 | src = fetchurl { |
|
505 | 505 | url = "https://pypi.python.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz"; |
|
506 | 506 | md5 = "e472a3a1c2a67bb0ec9b5d54c13a47d6"; |
|
507 | 507 | }; |
|
508 | 508 | meta = { |
|
509 | 509 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
510 | 510 | }; |
|
511 | 511 | }; |
|
512 | 512 | configparser = super.buildPythonPackage { |
|
513 | 513 | name = "configparser-3.5.0"; |
|
514 | 514 | buildInputs = with self; []; |
|
515 | 515 | doCheck = false; |
|
516 | 516 | propagatedBuildInputs = with self; []; |
|
517 | 517 | src = fetchurl { |
|
518 | 518 | url = "https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz"; |
|
519 | 519 | md5 = "cfdd915a5b7a6c09917a64a573140538"; |
|
520 | 520 | }; |
|
521 | 521 | meta = { |
|
522 | 522 | license = [ pkgs.lib.licenses.mit ]; |
|
523 | 523 | }; |
|
524 | 524 | }; |
|
525 | 525 | cov-core = super.buildPythonPackage { |
|
526 | 526 | name = "cov-core-1.15.0"; |
|
527 | 527 | buildInputs = with self; []; |
|
528 | 528 | doCheck = false; |
|
529 | 529 | propagatedBuildInputs = with self; [coverage]; |
|
530 | 530 | src = fetchurl { |
|
531 | 531 | url = "https://pypi.python.org/packages/4b/87/13e75a47b4ba1be06f29f6d807ca99638bedc6b57fa491cd3de891ca2923/cov-core-1.15.0.tar.gz"; |
|
532 | 532 | md5 = "f519d4cb4c4e52856afb14af52919fe6"; |
|
533 | 533 | }; |
|
534 | 534 | meta = { |
|
535 | 535 | license = [ pkgs.lib.licenses.mit ]; |
|
536 | 536 | }; |
|
537 | 537 | }; |
|
538 | 538 | coverage = super.buildPythonPackage { |
|
539 | 539 | name = "coverage-3.7.1"; |
|
540 | 540 | buildInputs = with self; []; |
|
541 | 541 | doCheck = false; |
|
542 | 542 | propagatedBuildInputs = with self; []; |
|
543 | 543 | src = fetchurl { |
|
544 | 544 | url = "https://pypi.python.org/packages/09/4f/89b06c7fdc09687bca507dc411c342556ef9c5a3b26756137a4878ff19bf/coverage-3.7.1.tar.gz"; |
|
545 | 545 | md5 = "c47b36ceb17eaff3ecfab3bcd347d0df"; |
|
546 | 546 | }; |
|
547 | 547 | meta = { |
|
548 | 548 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
549 | 549 | }; |
|
550 | 550 | }; |
|
551 | 551 | cssselect = super.buildPythonPackage { |
|
552 | 552 | name = "cssselect-1.0.1"; |
|
553 | 553 | buildInputs = with self; []; |
|
554 | 554 | doCheck = false; |
|
555 | 555 | propagatedBuildInputs = with self; []; |
|
556 | 556 | src = fetchurl { |
|
557 | 557 | url = "https://pypi.python.org/packages/77/ff/9c865275cd19290feba56344eba570e719efb7ca5b34d67ed12b22ebbb0d/cssselect-1.0.1.tar.gz"; |
|
558 | 558 | md5 = "3fa03bf82a9f0b1223c0f1eb1369e139"; |
|
559 | 559 | }; |
|
560 | 560 | meta = { |
|
561 | 561 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
562 | 562 | }; |
|
563 | 563 | }; |
|
564 | 564 | decorator = super.buildPythonPackage { |
|
565 | 565 | name = "decorator-4.1.2"; |
|
566 | 566 | buildInputs = with self; []; |
|
567 | 567 | doCheck = false; |
|
568 | 568 | propagatedBuildInputs = with self; []; |
|
569 | 569 | src = fetchurl { |
|
570 | 570 | url = "https://pypi.python.org/packages/bb/e0/f6e41e9091e130bf16d4437dabbac3993908e4d6485ecbc985ef1352db94/decorator-4.1.2.tar.gz"; |
|
571 | 571 | md5 = "a0f7f4fe00ae2dde93494d90c192cf8c"; |
|
572 | 572 | }; |
|
573 | 573 | meta = { |
|
574 | 574 | license = [ pkgs.lib.licenses.bsdOriginal { fullName = "new BSD License"; } ]; |
|
575 | 575 | }; |
|
576 | 576 | }; |
|
577 | 577 | deform = super.buildPythonPackage { |
|
578 | 578 | name = "deform-2.0.4"; |
|
579 | 579 | buildInputs = with self; []; |
|
580 | 580 | doCheck = false; |
|
581 | 581 | propagatedBuildInputs = with self; [Chameleon colander iso8601 peppercorn translationstring zope.deprecation]; |
|
582 | 582 | src = fetchurl { |
|
583 | 583 | url = "https://pypi.python.org/packages/66/3b/eefcb07abcab7a97f6665aa2d0cf1af741d9d6e78a2e4657fd2b89f89880/deform-2.0.4.tar.gz"; |
|
584 | 584 | md5 = "34756e42cf50dd4b4430809116c4ec0a"; |
|
585 | 585 | }; |
|
586 | 586 | meta = { |
|
587 | 587 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
588 | 588 | }; |
|
589 | 589 | }; |
|
590 | 590 | docutils = super.buildPythonPackage { |
|
591 | 591 | name = "docutils-0.14"; |
|
592 | 592 | buildInputs = with self; []; |
|
593 | 593 | doCheck = false; |
|
594 | 594 | propagatedBuildInputs = with self; []; |
|
595 | 595 | src = fetchurl { |
|
596 | 596 | url = "https://pypi.python.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz"; |
|
597 | 597 | md5 = "c53768d63db3873b7d452833553469de"; |
|
598 | 598 | }; |
|
599 | 599 | meta = { |
|
600 | 600 | 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 | 601 | }; |
|
602 | 602 | }; |
|
603 | 603 | dogpile.cache = super.buildPythonPackage { |
|
604 | 604 | name = "dogpile.cache-0.6.4"; |
|
605 | 605 | buildInputs = with self; []; |
|
606 | 606 | doCheck = false; |
|
607 | 607 | propagatedBuildInputs = with self; []; |
|
608 | 608 | src = fetchurl { |
|
609 | 609 | url = "https://pypi.python.org/packages/b6/3d/35c05ca01c070bb70d9d422f2c4858ecb021b05b21af438fec5ccd7b945c/dogpile.cache-0.6.4.tar.gz"; |
|
610 | 610 | md5 = "66e0a6cae6c08cb1ea25f89d0eadfeb0"; |
|
611 | 611 | }; |
|
612 | 612 | meta = { |
|
613 | 613 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
614 | 614 | }; |
|
615 | 615 | }; |
|
616 | 616 | dogpile.core = super.buildPythonPackage { |
|
617 | 617 | name = "dogpile.core-0.4.1"; |
|
618 | 618 | buildInputs = with self; []; |
|
619 | 619 | doCheck = false; |
|
620 | 620 | propagatedBuildInputs = with self; []; |
|
621 | 621 | src = fetchurl { |
|
622 | 622 | url = "https://pypi.python.org/packages/0e/77/e72abc04c22aedf874301861e5c1e761231c288b5de369c18be8f4b5c9bb/dogpile.core-0.4.1.tar.gz"; |
|
623 | 623 | md5 = "01cb19f52bba3e95c9b560f39341f045"; |
|
624 | 624 | }; |
|
625 | 625 | meta = { |
|
626 | 626 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
627 | 627 | }; |
|
628 | 628 | }; |
|
629 | 629 | ecdsa = super.buildPythonPackage { |
|
630 | 630 | name = "ecdsa-0.13"; |
|
631 | 631 | buildInputs = with self; []; |
|
632 | 632 | doCheck = false; |
|
633 | 633 | propagatedBuildInputs = with self; []; |
|
634 | 634 | src = fetchurl { |
|
635 | 635 | url = "https://pypi.python.org/packages/f9/e5/99ebb176e47f150ac115ffeda5fedb6a3dbb3c00c74a59fd84ddf12f5857/ecdsa-0.13.tar.gz"; |
|
636 | 636 | md5 = "1f60eda9cb5c46722856db41a3ae6670"; |
|
637 | 637 | }; |
|
638 | 638 | meta = { |
|
639 | 639 | license = [ pkgs.lib.licenses.mit ]; |
|
640 | 640 | }; |
|
641 | 641 | }; |
|
642 | 642 | elasticsearch = super.buildPythonPackage { |
|
643 | 643 | name = "elasticsearch-2.3.0"; |
|
644 | 644 | buildInputs = with self; []; |
|
645 | 645 | doCheck = false; |
|
646 | 646 | propagatedBuildInputs = with self; [urllib3]; |
|
647 | 647 | src = fetchurl { |
|
648 | 648 | url = "https://pypi.python.org/packages/10/35/5fd52c5f0b0ee405ed4b5195e8bce44c5e041787680dc7b94b8071cac600/elasticsearch-2.3.0.tar.gz"; |
|
649 | 649 | md5 = "2550f3b51629cf1ef9636608af92c340"; |
|
650 | 650 | }; |
|
651 | 651 | meta = { |
|
652 | 652 | license = [ pkgs.lib.licenses.asl20 ]; |
|
653 | 653 | }; |
|
654 | 654 | }; |
|
655 | 655 | elasticsearch-dsl = super.buildPythonPackage { |
|
656 | 656 | name = "elasticsearch-dsl-2.2.0"; |
|
657 | 657 | buildInputs = with self; []; |
|
658 | 658 | doCheck = false; |
|
659 | 659 | propagatedBuildInputs = with self; [six python-dateutil elasticsearch]; |
|
660 | 660 | src = fetchurl { |
|
661 | 661 | url = "https://pypi.python.org/packages/66/2f/52a086968788e58461641570f45c3207a52d46ebbe9b77dc22b6a8ffda66/elasticsearch-dsl-2.2.0.tar.gz"; |
|
662 | 662 | md5 = "fa6bd3c87ea3caa8f0f051bc37c53221"; |
|
663 | 663 | }; |
|
664 | 664 | meta = { |
|
665 | 665 | license = [ pkgs.lib.licenses.asl20 ]; |
|
666 | 666 | }; |
|
667 | 667 | }; |
|
668 | 668 | entrypoints = super.buildPythonPackage { |
|
669 | 669 | name = "entrypoints-0.2.2"; |
|
670 | 670 | buildInputs = with self; []; |
|
671 | 671 | doCheck = false; |
|
672 | 672 | propagatedBuildInputs = with self; [configparser]; |
|
673 | 673 | src = fetchurl { |
|
674 | 674 | url = "https://code.rhodecode.com/upstream/entrypoints/archive/96e6d645684e1af3d7df5b5272f3fe85a546b233.tar.gz?md5=7db37771aea9ac9fefe093e5d6987313"; |
|
675 | 675 | md5 = "7db37771aea9ac9fefe093e5d6987313"; |
|
676 | 676 | }; |
|
677 | 677 | meta = { |
|
678 | 678 | license = [ pkgs.lib.licenses.mit ]; |
|
679 | 679 | }; |
|
680 | 680 | }; |
|
681 | 681 | enum34 = super.buildPythonPackage { |
|
682 | 682 | name = "enum34-1.1.6"; |
|
683 | 683 | buildInputs = with self; []; |
|
684 | 684 | doCheck = false; |
|
685 | 685 | propagatedBuildInputs = with self; []; |
|
686 | 686 | src = fetchurl { |
|
687 | 687 | url = "https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"; |
|
688 | 688 | md5 = "5f13a0841a61f7fc295c514490d120d0"; |
|
689 | 689 | }; |
|
690 | 690 | meta = { |
|
691 | 691 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
692 | 692 | }; |
|
693 | 693 | }; |
|
694 | 694 | funcsigs = super.buildPythonPackage { |
|
695 | 695 | name = "funcsigs-1.0.2"; |
|
696 | 696 | buildInputs = with self; []; |
|
697 | 697 | doCheck = false; |
|
698 | 698 | propagatedBuildInputs = with self; []; |
|
699 | 699 | src = fetchurl { |
|
700 | 700 | url = "https://pypi.python.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz"; |
|
701 | 701 | md5 = "7e583285b1fb8a76305d6d68f4ccc14e"; |
|
702 | 702 | }; |
|
703 | 703 | meta = { |
|
704 | 704 | license = [ { fullName = "ASL"; } pkgs.lib.licenses.asl20 ]; |
|
705 | 705 | }; |
|
706 | 706 | }; |
|
707 | 707 | functools32 = super.buildPythonPackage { |
|
708 | 708 | name = "functools32-3.2.3.post2"; |
|
709 | 709 | buildInputs = with self; []; |
|
710 | 710 | doCheck = false; |
|
711 | 711 | propagatedBuildInputs = with self; []; |
|
712 | 712 | src = fetchurl { |
|
713 | 713 | url = "https://pypi.python.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz"; |
|
714 | 714 | md5 = "09f24ffd9af9f6cd0f63cb9f4e23d4b2"; |
|
715 | 715 | }; |
|
716 | 716 | meta = { |
|
717 | 717 | license = [ pkgs.lib.licenses.psfl ]; |
|
718 | 718 | }; |
|
719 | 719 | }; |
|
720 | 720 | future = super.buildPythonPackage { |
|
721 | 721 | name = "future-0.14.3"; |
|
722 | 722 | buildInputs = with self; []; |
|
723 | 723 | doCheck = false; |
|
724 | 724 | propagatedBuildInputs = with self; []; |
|
725 | 725 | src = fetchurl { |
|
726 | 726 | url = "https://pypi.python.org/packages/83/80/8ef3a11a15f8eaafafa0937b20c1b3f73527e69ab6b3fa1cf94a5a96aabb/future-0.14.3.tar.gz"; |
|
727 | 727 | md5 = "e94079b0bd1fc054929e8769fc0f6083"; |
|
728 | 728 | }; |
|
729 | 729 | meta = { |
|
730 | 730 | license = [ { fullName = "OSI Approved"; } pkgs.lib.licenses.mit ]; |
|
731 | 731 | }; |
|
732 | 732 | }; |
|
733 | 733 | futures = super.buildPythonPackage { |
|
734 | 734 | name = "futures-3.0.2"; |
|
735 | 735 | buildInputs = with self; []; |
|
736 | 736 | doCheck = false; |
|
737 | 737 | propagatedBuildInputs = with self; []; |
|
738 | 738 | src = fetchurl { |
|
739 | 739 | url = "https://pypi.python.org/packages/f8/e7/fc0fcbeb9193ba2d4de00b065e7fd5aecd0679e93ce95a07322b2b1434f4/futures-3.0.2.tar.gz"; |
|
740 | 740 | md5 = "42aaf1e4de48d6e871d77dc1f9d96d5a"; |
|
741 | 741 | }; |
|
742 | 742 | meta = { |
|
743 | 743 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
744 | 744 | }; |
|
745 | 745 | }; |
|
746 | 746 | gevent = super.buildPythonPackage { |
|
747 | 747 | name = "gevent-1.2.2"; |
|
748 | 748 | buildInputs = with self; []; |
|
749 | 749 | doCheck = false; |
|
750 | 750 | propagatedBuildInputs = with self; [greenlet]; |
|
751 | 751 | src = fetchurl { |
|
752 | 752 | url = "https://pypi.python.org/packages/1b/92/b111f76e54d2be11375b47b213b56687214f258fd9dae703546d30b837be/gevent-1.2.2.tar.gz"; |
|
753 | 753 | md5 = "7f0baf355384fe5ff2ecf66853422554"; |
|
754 | 754 | }; |
|
755 | 755 | meta = { |
|
756 | 756 | license = [ pkgs.lib.licenses.mit ]; |
|
757 | 757 | }; |
|
758 | 758 | }; |
|
759 | 759 | gnureadline = super.buildPythonPackage { |
|
760 | 760 | name = "gnureadline-6.3.8"; |
|
761 | 761 | buildInputs = with self; []; |
|
762 | 762 | doCheck = false; |
|
763 | 763 | propagatedBuildInputs = with self; []; |
|
764 | 764 | src = fetchurl { |
|
765 | 765 | url = "https://pypi.python.org/packages/50/64/86085c823cd78f9df9d8e33dce0baa71618016f8860460b82cf6610e1eb3/gnureadline-6.3.8.tar.gz"; |
|
766 | 766 | md5 = "ba341f4b907250bd1f47dbc06290604f"; |
|
767 | 767 | }; |
|
768 | 768 | meta = { |
|
769 | 769 | license = [ { fullName = "GNU General Public License v3 (GPLv3)"; } pkgs.lib.licenses.gpl1 ]; |
|
770 | 770 | }; |
|
771 | 771 | }; |
|
772 | 772 | gprof2dot = super.buildPythonPackage { |
|
773 | 773 | name = "gprof2dot-2017.9.19"; |
|
774 | 774 | buildInputs = with self; []; |
|
775 | 775 | doCheck = false; |
|
776 | 776 | propagatedBuildInputs = with self; []; |
|
777 | 777 | src = fetchurl { |
|
778 | 778 | url = "https://pypi.python.org/packages/9d/36/f977122502979f3dfb50704979c9ed70e6b620787942b089bf1af15f5aba/gprof2dot-2017.9.19.tar.gz"; |
|
779 | 779 | md5 = "cda2d552bb0d0b9f16e6824a9aabd225"; |
|
780 | 780 | }; |
|
781 | 781 | meta = { |
|
782 | 782 | license = [ { fullName = "GNU Lesser General Public License v3 or later (LGPLv3+)"; } { fullName = "LGPL"; } ]; |
|
783 | 783 | }; |
|
784 | 784 | }; |
|
785 | 785 | graphviz = super.buildPythonPackage { |
|
786 | 786 | name = "graphviz-0.8.2"; |
|
787 | 787 | buildInputs = with self; []; |
|
788 | 788 | doCheck = false; |
|
789 | 789 | propagatedBuildInputs = with self; []; |
|
790 | 790 | src = fetchurl { |
|
791 | 791 | url = "https://pypi.python.org/packages/fa/d1/63b62dee9e55368f60b5ea445e6afb361bb47e692fc27553f3672e16efb8/graphviz-0.8.2.zip"; |
|
792 | 792 | md5 = "50866e780f43e1cb0d073c70424fcaff"; |
|
793 | 793 | }; |
|
794 | 794 | meta = { |
|
795 | 795 | license = [ pkgs.lib.licenses.mit ]; |
|
796 | 796 | }; |
|
797 | 797 | }; |
|
798 | 798 | greenlet = super.buildPythonPackage { |
|
799 | 799 | name = "greenlet-0.4.13"; |
|
800 | 800 | buildInputs = with self; []; |
|
801 | 801 | doCheck = false; |
|
802 | 802 | propagatedBuildInputs = with self; []; |
|
803 | 803 | src = fetchurl { |
|
804 | 804 | url = "https://pypi.python.org/packages/13/de/ba92335e9e76040ca7274224942282a80d54f85e342a5e33c5277c7f87eb/greenlet-0.4.13.tar.gz"; |
|
805 | 805 | md5 = "6e0b9dd5385f81d478451ec8ed1d62b3"; |
|
806 | 806 | }; |
|
807 | 807 | meta = { |
|
808 | 808 | license = [ pkgs.lib.licenses.mit ]; |
|
809 | 809 | }; |
|
810 | 810 | }; |
|
811 | 811 | gunicorn = super.buildPythonPackage { |
|
812 | 812 | name = "gunicorn-19.7.1"; |
|
813 | 813 | buildInputs = with self; []; |
|
814 | 814 | doCheck = false; |
|
815 | 815 | propagatedBuildInputs = with self; []; |
|
816 | 816 | src = fetchurl { |
|
817 | 817 | url = "https://pypi.python.org/packages/30/3a/10bb213cede0cc4d13ac2263316c872a64bf4c819000c8ccd801f1d5f822/gunicorn-19.7.1.tar.gz"; |
|
818 | 818 | md5 = "174d3c3cd670a5be0404d84c484e590c"; |
|
819 | 819 | }; |
|
820 | 820 | meta = { |
|
821 | 821 | license = [ pkgs.lib.licenses.mit ]; |
|
822 | 822 | }; |
|
823 | 823 | }; |
|
824 | 824 | html5lib = super.buildPythonPackage { |
|
825 | 825 | name = "html5lib-1.0.1"; |
|
826 | 826 | buildInputs = with self; []; |
|
827 | 827 | doCheck = false; |
|
828 | 828 | propagatedBuildInputs = with self; [six webencodings]; |
|
829 | 829 | src = fetchurl { |
|
830 | 830 | url = "https://pypi.python.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz"; |
|
831 | 831 | md5 = "942a0688d6bdf20d087c9805c40182ad"; |
|
832 | 832 | }; |
|
833 | 833 | meta = { |
|
834 | 834 | license = [ pkgs.lib.licenses.mit ]; |
|
835 | 835 | }; |
|
836 | 836 | }; |
|
837 | 837 | hupper = super.buildPythonPackage { |
|
838 | 838 | name = "hupper-1.0"; |
|
839 | 839 | buildInputs = with self; []; |
|
840 | 840 | doCheck = false; |
|
841 | 841 | propagatedBuildInputs = with self; []; |
|
842 | 842 | src = fetchurl { |
|
843 | 843 | url = "https://pypi.python.org/packages/2e/07/df892c564dc09bb3cf6f6deb976c26adf9117db75ba218cb4353dbc9d826/hupper-1.0.tar.gz"; |
|
844 | 844 | md5 = "26e77da7d5ac5858f59af050d1a6eb5a"; |
|
845 | 845 | }; |
|
846 | 846 | meta = { |
|
847 | 847 | license = [ pkgs.lib.licenses.mit ]; |
|
848 | 848 | }; |
|
849 | 849 | }; |
|
850 | 850 | infrae.cache = super.buildPythonPackage { |
|
851 | 851 | name = "infrae.cache-1.0.1"; |
|
852 | 852 | buildInputs = with self; []; |
|
853 | 853 | doCheck = false; |
|
854 | 854 | propagatedBuildInputs = with self; [Beaker repoze.lru]; |
|
855 | 855 | src = fetchurl { |
|
856 | 856 | url = "https://pypi.python.org/packages/bb/f0/e7d5e984cf6592fd2807dc7bc44a93f9d18e04e6a61f87fdfb2622422d74/infrae.cache-1.0.1.tar.gz"; |
|
857 | 857 | md5 = "b09076a766747e6ed2a755cc62088e32"; |
|
858 | 858 | }; |
|
859 | 859 | meta = { |
|
860 | 860 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
861 | 861 | }; |
|
862 | 862 | }; |
|
863 | 863 | invoke = super.buildPythonPackage { |
|
864 | 864 | name = "invoke-0.13.0"; |
|
865 | 865 | buildInputs = with self; []; |
|
866 | 866 | doCheck = false; |
|
867 | 867 | propagatedBuildInputs = with self; []; |
|
868 | 868 | src = fetchurl { |
|
869 | 869 | url = "https://pypi.python.org/packages/47/bf/d07ef52fa1ac645468858bbac7cb95b246a972a045e821493d17d89c81be/invoke-0.13.0.tar.gz"; |
|
870 | 870 | md5 = "c0d1ed4bfb34eaab551662d8cfee6540"; |
|
871 | 871 | }; |
|
872 | 872 | meta = { |
|
873 | 873 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
874 | 874 | }; |
|
875 | 875 | }; |
|
876 | 876 | ipaddress = super.buildPythonPackage { |
|
877 | 877 | name = "ipaddress-1.0.19"; |
|
878 | 878 | buildInputs = with self; []; |
|
879 | 879 | doCheck = false; |
|
880 | 880 | propagatedBuildInputs = with self; []; |
|
881 | 881 | src = fetchurl { |
|
882 | 882 | url = "https://pypi.python.org/packages/f0/ba/860a4a3e283456d6b7e2ab39ce5cf11a3490ee1a363652ac50abf9f0f5df/ipaddress-1.0.19.tar.gz"; |
|
883 | 883 | md5 = "d0687efaf93a32476d81e90ba0609c57"; |
|
884 | 884 | }; |
|
885 | 885 | meta = { |
|
886 | 886 | license = [ pkgs.lib.licenses.psfl ]; |
|
887 | 887 | }; |
|
888 | 888 | }; |
|
889 | 889 | ipdb = super.buildPythonPackage { |
|
890 | 890 | name = "ipdb-0.10.3"; |
|
891 | 891 | buildInputs = with self; []; |
|
892 | 892 | doCheck = false; |
|
893 | 893 | propagatedBuildInputs = with self; [setuptools ipython]; |
|
894 | 894 | src = fetchurl { |
|
895 | 895 | url = "https://pypi.python.org/packages/ad/cc/0e7298e1fbf2efd52667c9354a12aa69fb6f796ce230cca03525051718ef/ipdb-0.10.3.tar.gz"; |
|
896 | 896 | md5 = "def1f6ac075d54bdee07e6501263d4fa"; |
|
897 | 897 | }; |
|
898 | 898 | meta = { |
|
899 | 899 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
900 | 900 | }; |
|
901 | 901 | }; |
|
902 | 902 | ipython = super.buildPythonPackage { |
|
903 | 903 | name = "ipython-5.1.0"; |
|
904 | 904 | buildInputs = with self; []; |
|
905 | 905 | doCheck = false; |
|
906 | 906 | propagatedBuildInputs = with self; [setuptools decorator pickleshare simplegeneric traitlets prompt-toolkit Pygments pexpect backports.shutil-get-terminal-size pathlib2 pexpect]; |
|
907 | 907 | src = fetchurl { |
|
908 | 908 | url = "https://pypi.python.org/packages/89/63/a9292f7cd9d0090a0f995e1167f3f17d5889dcbc9a175261719c513b9848/ipython-5.1.0.tar.gz"; |
|
909 | 909 | md5 = "47c8122420f65b58784cb4b9b4af35e3"; |
|
910 | 910 | }; |
|
911 | 911 | meta = { |
|
912 | 912 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
913 | 913 | }; |
|
914 | 914 | }; |
|
915 | 915 | ipython-genutils = super.buildPythonPackage { |
|
916 | 916 | name = "ipython-genutils-0.2.0"; |
|
917 | 917 | buildInputs = with self; []; |
|
918 | 918 | doCheck = false; |
|
919 | 919 | propagatedBuildInputs = with self; []; |
|
920 | 920 | src = fetchurl { |
|
921 | 921 | url = "https://pypi.python.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz"; |
|
922 | 922 | md5 = "5a4f9781f78466da0ea1a648f3e1f79f"; |
|
923 | 923 | }; |
|
924 | 924 | meta = { |
|
925 | 925 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
926 | 926 | }; |
|
927 | 927 | }; |
|
928 | 928 | iso8601 = super.buildPythonPackage { |
|
929 | 929 | name = "iso8601-0.1.12"; |
|
930 | 930 | buildInputs = with self; []; |
|
931 | 931 | doCheck = false; |
|
932 | 932 | propagatedBuildInputs = with self; []; |
|
933 | 933 | src = fetchurl { |
|
934 | 934 | url = "https://pypi.python.org/packages/45/13/3db24895497345fb44c4248c08b16da34a9eb02643cea2754b21b5ed08b0/iso8601-0.1.12.tar.gz"; |
|
935 | 935 | md5 = "4de940f691c5ea759fb254384c8ddcf6"; |
|
936 | 936 | }; |
|
937 | 937 | meta = { |
|
938 | 938 | license = [ pkgs.lib.licenses.mit ]; |
|
939 | 939 | }; |
|
940 | 940 | }; |
|
941 | 941 | itsdangerous = super.buildPythonPackage { |
|
942 | 942 | name = "itsdangerous-0.24"; |
|
943 | 943 | buildInputs = with self; []; |
|
944 | 944 | doCheck = false; |
|
945 | 945 | propagatedBuildInputs = with self; []; |
|
946 | 946 | src = fetchurl { |
|
947 | 947 | url = "https://pypi.python.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz"; |
|
948 | 948 | md5 = "a3d55aa79369aef5345c036a8a26307f"; |
|
949 | 949 | }; |
|
950 | 950 | meta = { |
|
951 | 951 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
952 | 952 | }; |
|
953 | 953 | }; |
|
954 | 954 | jsonschema = super.buildPythonPackage { |
|
955 | 955 | name = "jsonschema-2.6.0"; |
|
956 | 956 | buildInputs = with self; []; |
|
957 | 957 | doCheck = false; |
|
958 | 958 | propagatedBuildInputs = with self; [functools32]; |
|
959 | 959 | src = fetchurl { |
|
960 | 960 | url = "https://pypi.python.org/packages/58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298/jsonschema-2.6.0.tar.gz"; |
|
961 | 961 | md5 = "50c6b69a373a8b55ff1e0ec6e78f13f4"; |
|
962 | 962 | }; |
|
963 | 963 | meta = { |
|
964 | 964 | license = [ pkgs.lib.licenses.mit ]; |
|
965 | 965 | }; |
|
966 | 966 | }; |
|
967 | 967 | jupyter-client = super.buildPythonPackage { |
|
968 | 968 | name = "jupyter-client-5.0.0"; |
|
969 | 969 | buildInputs = with self; []; |
|
970 | 970 | doCheck = false; |
|
971 | 971 | propagatedBuildInputs = with self; [traitlets jupyter-core pyzmq python-dateutil]; |
|
972 | 972 | src = fetchurl { |
|
973 | 973 | url = "https://pypi.python.org/packages/e5/6f/65412ed462202b90134b7e761b0b7e7f949e07a549c1755475333727b3d0/jupyter_client-5.0.0.tar.gz"; |
|
974 | 974 | md5 = "1acd331b5c9fb4d79dae9939e79f2426"; |
|
975 | 975 | }; |
|
976 | 976 | meta = { |
|
977 | 977 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
978 | 978 | }; |
|
979 | 979 | }; |
|
980 | 980 | jupyter-core = super.buildPythonPackage { |
|
981 | 981 | name = "jupyter-core-4.4.0"; |
|
982 | 982 | buildInputs = with self; []; |
|
983 | 983 | doCheck = false; |
|
984 | 984 | propagatedBuildInputs = with self; [traitlets]; |
|
985 | 985 | src = fetchurl { |
|
986 | 986 | url = "https://pypi.python.org/packages/b6/2d/2804f4de3a95583f65e5dcb4d7c8c7183124882323758996e867f47e72af/jupyter_core-4.4.0.tar.gz"; |
|
987 | 987 | md5 = "7829fc07884ed98459e170f217e2a5ba"; |
|
988 | 988 | }; |
|
989 | 989 | meta = { |
|
990 | 990 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
991 | 991 | }; |
|
992 | 992 | }; |
|
993 | 993 | kombu = super.buildPythonPackage { |
|
994 | 994 | name = "kombu-4.1.0"; |
|
995 | 995 | buildInputs = with self; []; |
|
996 | 996 | doCheck = false; |
|
997 | 997 | propagatedBuildInputs = with self; [amqp]; |
|
998 | 998 | src = fetchurl { |
|
999 | 999 | url = "https://pypi.python.org/packages/03/5e/1a47d1e543d4943d65330af4e4406049f443878818fb65bfdc651bb93a96/kombu-4.1.0.tar.gz"; |
|
1000 | 1000 | md5 = "2fb2be9fec0e6514231bba23a3779439"; |
|
1001 | 1001 | }; |
|
1002 | 1002 | meta = { |
|
1003 | 1003 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1004 | 1004 | }; |
|
1005 | 1005 | }; |
|
1006 | 1006 | lxml = super.buildPythonPackage { |
|
1007 | 1007 | name = "lxml-3.7.3"; |
|
1008 | 1008 | buildInputs = with self; []; |
|
1009 | 1009 | doCheck = false; |
|
1010 | 1010 | propagatedBuildInputs = with self; []; |
|
1011 | 1011 | src = fetchurl { |
|
1012 | 1012 | url = "https://pypi.python.org/packages/39/e8/a8e0b1fa65dd021d48fe21464f71783655f39a41f218293c1c590d54eb82/lxml-3.7.3.tar.gz"; |
|
1013 | 1013 | md5 = "075692ce442e69bbd604d44e21c02753"; |
|
1014 | 1014 | }; |
|
1015 | 1015 | meta = { |
|
1016 | 1016 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1017 | 1017 | }; |
|
1018 | 1018 | }; |
|
1019 | 1019 | meld3 = super.buildPythonPackage { |
|
1020 | 1020 | name = "meld3-1.0.2"; |
|
1021 | 1021 | buildInputs = with self; []; |
|
1022 | 1022 | doCheck = false; |
|
1023 | 1023 | propagatedBuildInputs = with self; []; |
|
1024 | 1024 | src = fetchurl { |
|
1025 | 1025 | url = "https://pypi.python.org/packages/45/a0/317c6422b26c12fe0161e936fc35f36552069ba8e6f7ecbd99bbffe32a5f/meld3-1.0.2.tar.gz"; |
|
1026 | 1026 | md5 = "3ccc78cd79cffd63a751ad7684c02c91"; |
|
1027 | 1027 | }; |
|
1028 | 1028 | meta = { |
|
1029 | 1029 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1030 | 1030 | }; |
|
1031 | 1031 | }; |
|
1032 | 1032 | mistune = super.buildPythonPackage { |
|
1033 | 1033 | name = "mistune-0.8.3"; |
|
1034 | 1034 | buildInputs = with self; []; |
|
1035 | 1035 | doCheck = false; |
|
1036 | 1036 | propagatedBuildInputs = with self; []; |
|
1037 | 1037 | src = fetchurl { |
|
1038 | 1038 | url = "https://pypi.python.org/packages/9d/be/e06d4346cc608a01dec6bf770d7d0303a4fd6db588b318ced18f5f257145/mistune-0.8.3.tar.gz"; |
|
1039 | 1039 | md5 = "a5e4043e93fb8f9082e27f29eeb5e054"; |
|
1040 | 1040 | }; |
|
1041 | 1041 | meta = { |
|
1042 | 1042 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1043 | 1043 | }; |
|
1044 | 1044 | }; |
|
1045 | 1045 | mock = super.buildPythonPackage { |
|
1046 | 1046 | name = "mock-1.0.1"; |
|
1047 | 1047 | buildInputs = with self; []; |
|
1048 | 1048 | doCheck = false; |
|
1049 | 1049 | propagatedBuildInputs = with self; []; |
|
1050 | 1050 | src = fetchurl { |
|
1051 | 1051 | url = "https://pypi.python.org/packages/a2/52/7edcd94f0afb721a2d559a5b9aae8af4f8f2c79bc63fdbe8a8a6c9b23bbe/mock-1.0.1.tar.gz"; |
|
1052 | 1052 | md5 = "c3971991738caa55ec7c356bbc154ee2"; |
|
1053 | 1053 | }; |
|
1054 | 1054 | meta = { |
|
1055 | 1055 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1056 | 1056 | }; |
|
1057 | 1057 | }; |
|
1058 | 1058 | msgpack-python = super.buildPythonPackage { |
|
1059 | 1059 | name = "msgpack-python-0.4.8"; |
|
1060 | 1060 | buildInputs = with self; []; |
|
1061 | 1061 | doCheck = false; |
|
1062 | 1062 | propagatedBuildInputs = with self; []; |
|
1063 | 1063 | src = fetchurl { |
|
1064 | 1064 | url = "https://pypi.python.org/packages/21/27/8a1d82041c7a2a51fcc73675875a5f9ea06c2663e02fcfeb708be1d081a0/msgpack-python-0.4.8.tar.gz"; |
|
1065 | 1065 | md5 = "dcd854fb41ee7584ebbf35e049e6be98"; |
|
1066 | 1066 | }; |
|
1067 | 1067 | meta = { |
|
1068 | 1068 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1069 | 1069 | }; |
|
1070 | 1070 | }; |
|
1071 | 1071 | nbconvert = super.buildPythonPackage { |
|
1072 | 1072 | name = "nbconvert-5.3.1"; |
|
1073 | 1073 | buildInputs = with self; []; |
|
1074 | 1074 | doCheck = false; |
|
1075 | 1075 | propagatedBuildInputs = with self; [mistune Jinja2 Pygments traitlets jupyter-core nbformat entrypoints bleach pandocfilters testpath]; |
|
1076 | 1076 | src = fetchurl { |
|
1077 | 1077 | url = "https://pypi.python.org/packages/b9/a4/d0a0938ad6f5eeb4dea4e73d255c617ef94b0b2849d51194c9bbdb838412/nbconvert-5.3.1.tar.gz"; |
|
1078 | 1078 | md5 = "c128d0d93d02f70a85429a383dae96d2"; |
|
1079 | 1079 | }; |
|
1080 | 1080 | meta = { |
|
1081 | 1081 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1082 | 1082 | }; |
|
1083 | 1083 | }; |
|
1084 | 1084 | nbformat = super.buildPythonPackage { |
|
1085 | 1085 | name = "nbformat-4.4.0"; |
|
1086 | 1086 | buildInputs = with self; []; |
|
1087 | 1087 | doCheck = false; |
|
1088 | 1088 | propagatedBuildInputs = with self; [ipython-genutils traitlets jsonschema jupyter-core]; |
|
1089 | 1089 | src = fetchurl { |
|
1090 | 1090 | url = "https://pypi.python.org/packages/6e/0e/160754f7ae3e984863f585a3743b0ed1702043a81245907c8fae2d537155/nbformat-4.4.0.tar.gz"; |
|
1091 | 1091 | md5 = "2d5f873138d9fbc2a3f9eaaebca3b8a1"; |
|
1092 | 1092 | }; |
|
1093 | 1093 | meta = { |
|
1094 | 1094 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1095 | 1095 | }; |
|
1096 | 1096 | }; |
|
1097 | 1097 | objgraph = super.buildPythonPackage { |
|
1098 | 1098 | name = "objgraph-3.1.1"; |
|
1099 | 1099 | buildInputs = with self; []; |
|
1100 | 1100 | doCheck = false; |
|
1101 | 1101 | propagatedBuildInputs = with self; [graphviz]; |
|
1102 | 1102 | src = fetchurl { |
|
1103 | 1103 | url = "https://pypi.python.org/packages/be/58/9ca81a20cc837054e94866df1475d899caaa94f3732b8a46006858b015f7/objgraph-3.1.1.tar.gz"; |
|
1104 | 1104 | md5 = "253af9944763377877c3678d8aaebb8b"; |
|
1105 | 1105 | }; |
|
1106 | 1106 | meta = { |
|
1107 | 1107 | license = [ pkgs.lib.licenses.mit ]; |
|
1108 | 1108 | }; |
|
1109 | 1109 | }; |
|
1110 | 1110 | packaging = super.buildPythonPackage { |
|
1111 | 1111 | name = "packaging-15.2"; |
|
1112 | 1112 | buildInputs = with self; []; |
|
1113 | 1113 | doCheck = false; |
|
1114 | 1114 | propagatedBuildInputs = with self; []; |
|
1115 | 1115 | src = fetchurl { |
|
1116 | 1116 | url = "https://pypi.python.org/packages/24/c4/185da1304f07047dc9e0c46c31db75c0351bd73458ac3efad7da3dbcfbe1/packaging-15.2.tar.gz"; |
|
1117 | 1117 | md5 = "c16093476f6ced42128bf610e5db3784"; |
|
1118 | 1118 | }; |
|
1119 | 1119 | meta = { |
|
1120 | 1120 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1121 | 1121 | }; |
|
1122 | 1122 | }; |
|
1123 | 1123 | pandocfilters = super.buildPythonPackage { |
|
1124 | 1124 | name = "pandocfilters-1.4.2"; |
|
1125 | 1125 | buildInputs = with self; []; |
|
1126 | 1126 | doCheck = false; |
|
1127 | 1127 | propagatedBuildInputs = with self; []; |
|
1128 | 1128 | src = fetchurl { |
|
1129 | 1129 | url = "https://pypi.python.org/packages/4c/ea/236e2584af67bb6df960832731a6e5325fd4441de001767da328c33368ce/pandocfilters-1.4.2.tar.gz"; |
|
1130 | 1130 | md5 = "dc391791ef54c7de1572d7b46b63361f"; |
|
1131 | 1131 | }; |
|
1132 | 1132 | meta = { |
|
1133 | 1133 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1134 | 1134 | }; |
|
1135 | 1135 | }; |
|
1136 | 1136 | pathlib2 = super.buildPythonPackage { |
|
1137 | 1137 | name = "pathlib2-2.3.0"; |
|
1138 | 1138 | buildInputs = with self; []; |
|
1139 | 1139 | doCheck = false; |
|
1140 | 1140 | propagatedBuildInputs = with self; [six scandir]; |
|
1141 | 1141 | src = fetchurl { |
|
1142 | 1142 | url = "https://pypi.python.org/packages/a1/14/df0deb867c2733f7d857523c10942b3d6612a1b222502fdffa9439943dfb/pathlib2-2.3.0.tar.gz"; |
|
1143 | 1143 | md5 = "89c90409d11fd5947966b6a30a47d18c"; |
|
1144 | 1144 | }; |
|
1145 | 1145 | meta = { |
|
1146 | 1146 | license = [ pkgs.lib.licenses.mit ]; |
|
1147 | 1147 | }; |
|
1148 | 1148 | }; |
|
1149 | 1149 | peppercorn = super.buildPythonPackage { |
|
1150 | 1150 | name = "peppercorn-0.5"; |
|
1151 | 1151 | buildInputs = with self; []; |
|
1152 | 1152 | doCheck = false; |
|
1153 | 1153 | propagatedBuildInputs = with self; []; |
|
1154 | 1154 | src = fetchurl { |
|
1155 | 1155 | url = "https://pypi.python.org/packages/45/ec/a62ec317d1324a01567c5221b420742f094f05ee48097e5157d32be3755c/peppercorn-0.5.tar.gz"; |
|
1156 | 1156 | md5 = "f08efbca5790019ab45d76b7244abd40"; |
|
1157 | 1157 | }; |
|
1158 | 1158 | meta = { |
|
1159 | 1159 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1160 | 1160 | }; |
|
1161 | 1161 | }; |
|
1162 | 1162 | pexpect = super.buildPythonPackage { |
|
1163 | 1163 | name = "pexpect-4.4.0"; |
|
1164 | 1164 | buildInputs = with self; []; |
|
1165 | 1165 | doCheck = false; |
|
1166 | 1166 | propagatedBuildInputs = with self; [ptyprocess]; |
|
1167 | 1167 | src = fetchurl { |
|
1168 | 1168 | url = "https://pypi.python.org/packages/fa/c3/60c0cbf96f242d0b47a82e9ca634dcd6dcb043832cf05e17540812e1c707/pexpect-4.4.0.tar.gz"; |
|
1169 | 1169 | md5 = "e9b07f0765df8245ac72201d757baaef"; |
|
1170 | 1170 | }; |
|
1171 | 1171 | meta = { |
|
1172 | 1172 | license = [ pkgs.lib.licenses.isc { fullName = "ISC License (ISCL)"; } ]; |
|
1173 | 1173 | }; |
|
1174 | 1174 | }; |
|
1175 | 1175 | pickleshare = super.buildPythonPackage { |
|
1176 | 1176 | name = "pickleshare-0.7.4"; |
|
1177 | 1177 | buildInputs = with self; []; |
|
1178 | 1178 | doCheck = false; |
|
1179 | 1179 | propagatedBuildInputs = with self; [pathlib2]; |
|
1180 | 1180 | src = fetchurl { |
|
1181 | 1181 | url = "https://pypi.python.org/packages/69/fe/dd137d84daa0fd13a709e448138e310d9ea93070620c9db5454e234af525/pickleshare-0.7.4.tar.gz"; |
|
1182 | 1182 | md5 = "6a9e5dd8dfc023031f6b7b3f824cab12"; |
|
1183 | 1183 | }; |
|
1184 | 1184 | meta = { |
|
1185 | 1185 | license = [ pkgs.lib.licenses.mit ]; |
|
1186 | 1186 | }; |
|
1187 | 1187 | }; |
|
1188 | 1188 | plaster = super.buildPythonPackage { |
|
1189 | 1189 | name = "plaster-1.0"; |
|
1190 | 1190 | buildInputs = with self; []; |
|
1191 | 1191 | doCheck = false; |
|
1192 | 1192 | propagatedBuildInputs = with self; [setuptools]; |
|
1193 | 1193 | src = fetchurl { |
|
1194 | 1194 | url = "https://pypi.python.org/packages/37/e1/56d04382d718d32751017d32f351214384e529b794084eee20bb52405563/plaster-1.0.tar.gz"; |
|
1195 | 1195 | md5 = "80e6beb4760c16fea31754babcc0576e"; |
|
1196 | 1196 | }; |
|
1197 | 1197 | meta = { |
|
1198 | 1198 | license = [ pkgs.lib.licenses.mit ]; |
|
1199 | 1199 | }; |
|
1200 | 1200 | }; |
|
1201 | 1201 | plaster-pastedeploy = super.buildPythonPackage { |
|
1202 | 1202 | name = "plaster-pastedeploy-0.4.2"; |
|
1203 | 1203 | buildInputs = with self; []; |
|
1204 | 1204 | doCheck = false; |
|
1205 | 1205 | propagatedBuildInputs = with self; [PasteDeploy plaster]; |
|
1206 | 1206 | src = fetchurl { |
|
1207 | 1207 | url = "https://pypi.python.org/packages/2c/62/0daf9c0be958e785023e583e51baac15863699e956bfb3d448898d80edd8/plaster_pastedeploy-0.4.2.tar.gz"; |
|
1208 | 1208 | md5 = "58fd7852002909378e818c9d5b71e90a"; |
|
1209 | 1209 | }; |
|
1210 | 1210 | meta = { |
|
1211 | 1211 | license = [ pkgs.lib.licenses.mit ]; |
|
1212 | 1212 | }; |
|
1213 | 1213 | }; |
|
1214 | 1214 | prompt-toolkit = super.buildPythonPackage { |
|
1215 | 1215 | name = "prompt-toolkit-1.0.15"; |
|
1216 | 1216 | buildInputs = with self; []; |
|
1217 | 1217 | doCheck = false; |
|
1218 | 1218 | propagatedBuildInputs = with self; [six wcwidth]; |
|
1219 | 1219 | src = fetchurl { |
|
1220 | 1220 | url = "https://pypi.python.org/packages/8a/ad/cf6b128866e78ad6d7f1dc5b7f99885fb813393d9860778b2984582e81b5/prompt_toolkit-1.0.15.tar.gz"; |
|
1221 | 1221 | md5 = "8fe70295006dbc8afedd43e5eba99032"; |
|
1222 | 1222 | }; |
|
1223 | 1223 | meta = { |
|
1224 | 1224 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1225 | 1225 | }; |
|
1226 | 1226 | }; |
|
1227 | 1227 | psutil = super.buildPythonPackage { |
|
1228 | 1228 | name = "psutil-5.4.3"; |
|
1229 | 1229 | buildInputs = with self; []; |
|
1230 | 1230 | doCheck = false; |
|
1231 | 1231 | propagatedBuildInputs = with self; []; |
|
1232 | 1232 | src = fetchurl { |
|
1233 | 1233 | url = "https://pypi.python.org/packages/e2/e1/600326635f97fee89bf8426fef14c5c29f4849c79f68fd79f433d8c1bd96/psutil-5.4.3.tar.gz"; |
|
1234 | 1234 | md5 = "3b291833dbea631db9d271aa602a169a"; |
|
1235 | 1235 | }; |
|
1236 | 1236 | meta = { |
|
1237 | 1237 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1238 | 1238 | }; |
|
1239 | 1239 | }; |
|
1240 | 1240 | psycopg2 = super.buildPythonPackage { |
|
1241 | 1241 | name = "psycopg2-2.7.3.2"; |
|
1242 | 1242 | buildInputs = with self; []; |
|
1243 | 1243 | doCheck = false; |
|
1244 | 1244 | propagatedBuildInputs = with self; []; |
|
1245 | 1245 | src = fetchurl { |
|
1246 | 1246 | url = "https://pypi.python.org/packages/dd/47/000b405d73ca22980684fd7bd3318690cc03cfa3b2ae1c5b7fff8050b28a/psycopg2-2.7.3.2.tar.gz"; |
|
1247 | 1247 | md5 = "8114e672d5f23fa5329874a4314fbd6f"; |
|
1248 | 1248 | }; |
|
1249 | 1249 | meta = { |
|
1250 | 1250 | license = [ pkgs.lib.licenses.zpt21 { fullName = "GNU Library or Lesser General Public License (LGPL)"; } { fullName = "LGPL with exceptions or ZPL"; } ]; |
|
1251 | 1251 | }; |
|
1252 | 1252 | }; |
|
1253 | 1253 | ptyprocess = super.buildPythonPackage { |
|
1254 | 1254 | name = "ptyprocess-0.5.2"; |
|
1255 | 1255 | buildInputs = with self; []; |
|
1256 | 1256 | doCheck = false; |
|
1257 | 1257 | propagatedBuildInputs = with self; []; |
|
1258 | 1258 | src = fetchurl { |
|
1259 | 1259 | url = "https://pypi.python.org/packages/51/83/5d07dc35534640b06f9d9f1a1d2bc2513fb9cc7595a1b0e28ae5477056ce/ptyprocess-0.5.2.tar.gz"; |
|
1260 | 1260 | md5 = "d3b8febae1b8c53b054bd818d0bb8665"; |
|
1261 | 1261 | }; |
|
1262 | 1262 | meta = { |
|
1263 | 1263 | license = [ ]; |
|
1264 | 1264 | }; |
|
1265 | 1265 | }; |
|
1266 | 1266 | py = super.buildPythonPackage { |
|
1267 | 1267 | name = "py-1.5.2"; |
|
1268 | 1268 | buildInputs = with self; []; |
|
1269 | 1269 | doCheck = false; |
|
1270 | 1270 | propagatedBuildInputs = with self; []; |
|
1271 | 1271 | src = fetchurl { |
|
1272 | 1272 | url = "https://pypi.python.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz"; |
|
1273 | 1273 | md5 = "279ca69c632069e1b71e11b14641ca28"; |
|
1274 | 1274 | }; |
|
1275 | 1275 | meta = { |
|
1276 | 1276 | license = [ pkgs.lib.licenses.mit ]; |
|
1277 | 1277 | }; |
|
1278 | 1278 | }; |
|
1279 | 1279 | py-bcrypt = super.buildPythonPackage { |
|
1280 | 1280 | name = "py-bcrypt-0.4"; |
|
1281 | 1281 | buildInputs = with self; []; |
|
1282 | 1282 | doCheck = false; |
|
1283 | 1283 | propagatedBuildInputs = with self; []; |
|
1284 | 1284 | src = fetchurl { |
|
1285 | 1285 | url = "https://pypi.python.org/packages/68/b1/1c3068c5c4d2e35c48b38dcc865301ebfdf45f54507086ac65ced1fd3b3d/py-bcrypt-0.4.tar.gz"; |
|
1286 | 1286 | md5 = "dd8b367d6b716a2ea2e72392525f4e36"; |
|
1287 | 1287 | }; |
|
1288 | 1288 | meta = { |
|
1289 | 1289 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1290 | 1290 | }; |
|
1291 | 1291 | }; |
|
1292 | 1292 | py-gfm = super.buildPythonPackage { |
|
1293 | 1293 | name = "py-gfm-0.1.3"; |
|
1294 | 1294 | buildInputs = with self; []; |
|
1295 | 1295 | doCheck = false; |
|
1296 | 1296 | propagatedBuildInputs = with self; [setuptools Markdown]; |
|
1297 | 1297 | src = fetchurl { |
|
1298 | 1298 | url = "https://pypi.python.org/packages/12/e4/6b3d8678da04f97d7490d8264d8de51c2dc9fb91209ccee9c515c95e14c5/py-gfm-0.1.3.tar.gz"; |
|
1299 | 1299 | md5 = "e588d9e69640a241b97e2c59c22527a6"; |
|
1300 | 1300 | }; |
|
1301 | 1301 | meta = { |
|
1302 | 1302 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1303 | 1303 | }; |
|
1304 | 1304 | }; |
|
1305 | 1305 | pycrypto = super.buildPythonPackage { |
|
1306 | 1306 | name = "pycrypto-2.6.1"; |
|
1307 | 1307 | buildInputs = with self; []; |
|
1308 | 1308 | doCheck = false; |
|
1309 | 1309 | propagatedBuildInputs = with self; []; |
|
1310 | 1310 | src = fetchurl { |
|
1311 | 1311 | url = "https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz"; |
|
1312 | 1312 | md5 = "55a61a054aa66812daf5161a0d5d7eda"; |
|
1313 | 1313 | }; |
|
1314 | 1314 | meta = { |
|
1315 | 1315 | license = [ pkgs.lib.licenses.publicDomain ]; |
|
1316 | 1316 | }; |
|
1317 | 1317 | }; |
|
1318 | 1318 | pycurl = super.buildPythonPackage { |
|
1319 | 1319 | name = "pycurl-7.19.5"; |
|
1320 | 1320 | buildInputs = with self; []; |
|
1321 | 1321 | doCheck = false; |
|
1322 | 1322 | propagatedBuildInputs = with self; []; |
|
1323 | 1323 | src = fetchurl { |
|
1324 | 1324 | url = "https://pypi.python.org/packages/6c/48/13bad289ef6f4869b1d8fc11ae54de8cfb3cc4a2eb9f7419c506f763be46/pycurl-7.19.5.tar.gz"; |
|
1325 | 1325 | md5 = "47b4eac84118e2606658122104e62072"; |
|
1326 | 1326 | }; |
|
1327 | 1327 | meta = { |
|
1328 | 1328 | license = [ pkgs.lib.licenses.mit { fullName = "LGPL/MIT"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; |
|
1329 | 1329 | }; |
|
1330 | 1330 | }; |
|
1331 | 1331 | pyflakes = super.buildPythonPackage { |
|
1332 | 1332 | name = "pyflakes-0.8.1"; |
|
1333 | 1333 | buildInputs = with self; []; |
|
1334 | 1334 | doCheck = false; |
|
1335 | 1335 | propagatedBuildInputs = with self; []; |
|
1336 | 1336 | src = fetchurl { |
|
1337 | 1337 | url = "https://pypi.python.org/packages/75/22/a90ec0252f4f87f3ffb6336504de71fe16a49d69c4538dae2f12b9360a38/pyflakes-0.8.1.tar.gz"; |
|
1338 | 1338 | md5 = "905fe91ad14b912807e8fdc2ac2e2c23"; |
|
1339 | 1339 | }; |
|
1340 | 1340 | meta = { |
|
1341 | 1341 | license = [ pkgs.lib.licenses.mit ]; |
|
1342 | 1342 | }; |
|
1343 | 1343 | }; |
|
1344 | 1344 | pygments-markdown-lexer = super.buildPythonPackage { |
|
1345 | 1345 | name = "pygments-markdown-lexer-0.1.0.dev39"; |
|
1346 | 1346 | buildInputs = with self; []; |
|
1347 | 1347 | doCheck = false; |
|
1348 | 1348 | propagatedBuildInputs = with self; [Pygments]; |
|
1349 | 1349 | src = fetchurl { |
|
1350 | 1350 | url = "https://pypi.python.org/packages/c3/12/674cdee66635d638cedb2c5d9c85ce507b7b2f91bdba29e482f1b1160ff6/pygments-markdown-lexer-0.1.0.dev39.zip"; |
|
1351 | 1351 | md5 = "6360fe0f6d1f896e35b7a0142ce6459c"; |
|
1352 | 1352 | }; |
|
1353 | 1353 | meta = { |
|
1354 | 1354 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1355 | 1355 | }; |
|
1356 | 1356 | }; |
|
1357 | 1357 | pyparsing = super.buildPythonPackage { |
|
1358 | 1358 | name = "pyparsing-1.5.7"; |
|
1359 | 1359 | buildInputs = with self; []; |
|
1360 | 1360 | doCheck = false; |
|
1361 | 1361 | propagatedBuildInputs = with self; []; |
|
1362 | 1362 | src = fetchurl { |
|
1363 | 1363 | url = "https://pypi.python.org/packages/6f/2c/47457771c02a8ff0f302b695e094ec309e30452232bd79198ee94fda689f/pyparsing-1.5.7.tar.gz"; |
|
1364 | 1364 | md5 = "9be0fcdcc595199c646ab317c1d9a709"; |
|
1365 | 1365 | }; |
|
1366 | 1366 | meta = { |
|
1367 | 1367 | license = [ pkgs.lib.licenses.mit ]; |
|
1368 | 1368 | }; |
|
1369 | 1369 | }; |
|
1370 | 1370 | pyramid = super.buildPythonPackage { |
|
1371 | 1371 | name = "pyramid-1.9.1"; |
|
1372 | 1372 | buildInputs = with self; []; |
|
1373 | 1373 | doCheck = false; |
|
1374 | 1374 | propagatedBuildInputs = with self; [setuptools WebOb repoze.lru zope.interface zope.deprecation venusian translationstring PasteDeploy plaster plaster-pastedeploy hupper]; |
|
1375 | 1375 | src = fetchurl { |
|
1376 | 1376 | url = "https://pypi.python.org/packages/9a/57/73447be9e7d0512d601e3f0a1fb9d7d1efb941911f49efdfe036d2826507/pyramid-1.9.1.tar.gz"; |
|
1377 | 1377 | md5 = "0163e19c58c2d12976a3b6fdb57e052d"; |
|
1378 | 1378 | }; |
|
1379 | 1379 | meta = { |
|
1380 | 1380 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1381 | 1381 | }; |
|
1382 | 1382 | }; |
|
1383 | 1383 | pyramid-beaker = super.buildPythonPackage { |
|
1384 | 1384 | name = "pyramid-beaker-0.8"; |
|
1385 | 1385 | buildInputs = with self; []; |
|
1386 | 1386 | doCheck = false; |
|
1387 | 1387 | propagatedBuildInputs = with self; [pyramid Beaker]; |
|
1388 | 1388 | src = fetchurl { |
|
1389 | 1389 | url = "https://pypi.python.org/packages/d9/6e/b85426e00fd3d57f4545f74e1c3828552d8700f13ededeef9233f7bca8be/pyramid_beaker-0.8.tar.gz"; |
|
1390 | 1390 | md5 = "22f14be31b06549f80890e2c63a93834"; |
|
1391 | 1391 | }; |
|
1392 | 1392 | meta = { |
|
1393 | 1393 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1394 | 1394 | }; |
|
1395 | 1395 | }; |
|
1396 | 1396 | pyramid-debugtoolbar = super.buildPythonPackage { |
|
1397 | 1397 | name = "pyramid-debugtoolbar-4.3"; |
|
1398 | 1398 | buildInputs = with self; []; |
|
1399 | 1399 | doCheck = false; |
|
1400 | 1400 | propagatedBuildInputs = with self; [pyramid pyramid-mako repoze.lru Pygments ipaddress]; |
|
1401 | 1401 | src = fetchurl { |
|
1402 | 1402 | url = "https://pypi.python.org/packages/a4/40/f09d8800bfc3c09bdb6c95f37bb61c890dc62c19c4e7caa304da7aa77403/pyramid_debugtoolbar-4.3.tar.gz"; |
|
1403 | 1403 | md5 = "9c49029e9f0695130499ef6416ffaaf8"; |
|
1404 | 1404 | }; |
|
1405 | 1405 | meta = { |
|
1406 | 1406 | license = [ { fullName = "Repoze Public License"; } pkgs.lib.licenses.bsdOriginal ]; |
|
1407 | 1407 | }; |
|
1408 | 1408 | }; |
|
1409 | 1409 | pyramid-jinja2 = super.buildPythonPackage { |
|
1410 | 1410 | name = "pyramid-jinja2-2.7"; |
|
1411 | 1411 | buildInputs = with self; []; |
|
1412 | 1412 | doCheck = false; |
|
1413 | 1413 | propagatedBuildInputs = with self; [pyramid zope.deprecation Jinja2 MarkupSafe]; |
|
1414 | 1414 | src = fetchurl { |
|
1415 | 1415 | url = "https://pypi.python.org/packages/d8/80/d60a7233823de22ce77bd864a8a83736a1fe8b49884b08303a2e68b2c853/pyramid_jinja2-2.7.tar.gz"; |
|
1416 | 1416 | md5 = "c2f8b2cd7b73a6f1d9a311fcfaf4fb92"; |
|
1417 | 1417 | }; |
|
1418 | 1418 | meta = { |
|
1419 | 1419 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1420 | 1420 | }; |
|
1421 | 1421 | }; |
|
1422 | 1422 | pyramid-mako = super.buildPythonPackage { |
|
1423 | 1423 | name = "pyramid-mako-1.0.2"; |
|
1424 | 1424 | buildInputs = with self; []; |
|
1425 | 1425 | doCheck = false; |
|
1426 | 1426 | propagatedBuildInputs = with self; [pyramid Mako]; |
|
1427 | 1427 | src = fetchurl { |
|
1428 | 1428 | url = "https://pypi.python.org/packages/f1/92/7e69bcf09676d286a71cb3bbb887b16595b96f9ba7adbdc239ffdd4b1eb9/pyramid_mako-1.0.2.tar.gz"; |
|
1429 | 1429 | md5 = "ee25343a97eb76bd90abdc2a774eb48a"; |
|
1430 | 1430 | }; |
|
1431 | 1431 | meta = { |
|
1432 | 1432 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1433 | 1433 | }; |
|
1434 | 1434 | }; |
|
1435 | 1435 | pysqlite = super.buildPythonPackage { |
|
1436 | 1436 | name = "pysqlite-2.8.3"; |
|
1437 | 1437 | buildInputs = with self; []; |
|
1438 | 1438 | doCheck = false; |
|
1439 | 1439 | propagatedBuildInputs = with self; []; |
|
1440 | 1440 | src = fetchurl { |
|
1441 | 1441 | url = "https://pypi.python.org/packages/42/02/981b6703e3c83c5b25a829c6e77aad059f9481b0bbacb47e6e8ca12bd731/pysqlite-2.8.3.tar.gz"; |
|
1442 | 1442 | md5 = "033f17b8644577715aee55e8832ac9fc"; |
|
1443 | 1443 | }; |
|
1444 | 1444 | meta = { |
|
1445 | 1445 | license = [ { fullName = "zlib/libpng License"; } { fullName = "zlib/libpng license"; } ]; |
|
1446 | 1446 | }; |
|
1447 | 1447 | }; |
|
1448 | 1448 | pytest = super.buildPythonPackage { |
|
1449 | 1449 | name = "pytest-3.2.5"; |
|
1450 | 1450 | buildInputs = with self; []; |
|
1451 | 1451 | doCheck = false; |
|
1452 | 1452 | propagatedBuildInputs = with self; [py setuptools]; |
|
1453 | 1453 | src = fetchurl { |
|
1454 | 1454 | url = "https://pypi.python.org/packages/1f/f8/8cd74c16952163ce0db0bd95fdd8810cbf093c08be00e6e665ebf0dc3138/pytest-3.2.5.tar.gz"; |
|
1455 | 1455 | md5 = "6dbe9bb093883f75394a689a1426ac6f"; |
|
1456 | 1456 | }; |
|
1457 | 1457 | meta = { |
|
1458 | 1458 | license = [ pkgs.lib.licenses.mit ]; |
|
1459 | 1459 | }; |
|
1460 | 1460 | }; |
|
1461 | 1461 | pytest-catchlog = super.buildPythonPackage { |
|
1462 | 1462 | name = "pytest-catchlog-1.2.2"; |
|
1463 | 1463 | buildInputs = with self; []; |
|
1464 | 1464 | doCheck = false; |
|
1465 | 1465 | propagatedBuildInputs = with self; [py pytest]; |
|
1466 | 1466 | src = fetchurl { |
|
1467 | 1467 | url = "https://pypi.python.org/packages/f2/2b/2faccdb1a978fab9dd0bf31cca9f6847fbe9184a0bdcc3011ac41dd44191/pytest-catchlog-1.2.2.zip"; |
|
1468 | 1468 | md5 = "09d890c54c7456c818102b7ff8c182c8"; |
|
1469 | 1469 | }; |
|
1470 | 1470 | meta = { |
|
1471 | 1471 | license = [ pkgs.lib.licenses.mit ]; |
|
1472 | 1472 | }; |
|
1473 | 1473 | }; |
|
1474 | 1474 | pytest-cov = super.buildPythonPackage { |
|
1475 | 1475 | name = "pytest-cov-2.5.1"; |
|
1476 | 1476 | buildInputs = with self; []; |
|
1477 | 1477 | doCheck = false; |
|
1478 | 1478 | propagatedBuildInputs = with self; [pytest coverage]; |
|
1479 | 1479 | src = fetchurl { |
|
1480 | 1480 | url = "https://pypi.python.org/packages/24/b4/7290d65b2f3633db51393bdf8ae66309b37620bc3ec116c5e357e3e37238/pytest-cov-2.5.1.tar.gz"; |
|
1481 | 1481 | md5 = "5acf38d4909e19819eb5c1754fbfc0ac"; |
|
1482 | 1482 | }; |
|
1483 | 1483 | meta = { |
|
1484 | 1484 | license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.mit ]; |
|
1485 | 1485 | }; |
|
1486 | 1486 | }; |
|
1487 | 1487 | pytest-profiling = super.buildPythonPackage { |
|
1488 | 1488 | name = "pytest-profiling-1.2.11"; |
|
1489 | 1489 | buildInputs = with self; []; |
|
1490 | 1490 | doCheck = false; |
|
1491 | 1491 | propagatedBuildInputs = with self; [six pytest gprof2dot]; |
|
1492 | 1492 | src = fetchurl { |
|
1493 | 1493 | url = "https://pypi.python.org/packages/c0/4a/b4aa786e93c07a86f1f87c581a36bf355a9e06a9da7e00dbd05047626bd2/pytest-profiling-1.2.11.tar.gz"; |
|
1494 | 1494 | md5 = "9ef6b60248731be5d44477980408e8f7"; |
|
1495 | 1495 | }; |
|
1496 | 1496 | meta = { |
|
1497 | 1497 | license = [ pkgs.lib.licenses.mit ]; |
|
1498 | 1498 | }; |
|
1499 | 1499 | }; |
|
1500 | 1500 | pytest-runner = super.buildPythonPackage { |
|
1501 | 1501 | name = "pytest-runner-3.0"; |
|
1502 | 1502 | buildInputs = with self; []; |
|
1503 | 1503 | doCheck = false; |
|
1504 | 1504 | propagatedBuildInputs = with self; []; |
|
1505 | 1505 | src = fetchurl { |
|
1506 | 1506 | url = "https://pypi.python.org/packages/65/b4/ae89338cd2d81e2cc54bd6db2e962bfe948f612303610d68ab24539ac2d1/pytest-runner-3.0.tar.gz"; |
|
1507 | 1507 | md5 = "8f8363a52bbabc4cedd5e239beb2ba11"; |
|
1508 | 1508 | }; |
|
1509 | 1509 | meta = { |
|
1510 | 1510 | license = [ pkgs.lib.licenses.mit ]; |
|
1511 | 1511 | }; |
|
1512 | 1512 | }; |
|
1513 | 1513 | pytest-sugar = super.buildPythonPackage { |
|
1514 | 1514 | name = "pytest-sugar-0.9.0"; |
|
1515 | 1515 | buildInputs = with self; []; |
|
1516 | 1516 | doCheck = false; |
|
1517 | 1517 | propagatedBuildInputs = with self; [pytest termcolor]; |
|
1518 | 1518 | src = fetchurl { |
|
1519 | 1519 | url = "https://pypi.python.org/packages/49/d8/c5ff6cca3ce2ebd8b73eec89779bf6b4a7737456a70e8ea4d44c1ff90f71/pytest-sugar-0.9.0.tar.gz"; |
|
1520 | 1520 | md5 = "89fbff17277fa6a95a560a04b68cb9f9"; |
|
1521 | 1521 | }; |
|
1522 | 1522 | meta = { |
|
1523 | 1523 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1524 | 1524 | }; |
|
1525 | 1525 | }; |
|
1526 | 1526 | pytest-timeout = super.buildPythonPackage { |
|
1527 | 1527 | name = "pytest-timeout-1.2.0"; |
|
1528 | 1528 | buildInputs = with self; []; |
|
1529 | 1529 | doCheck = false; |
|
1530 | 1530 | propagatedBuildInputs = with self; [pytest]; |
|
1531 | 1531 | src = fetchurl { |
|
1532 | 1532 | url = "https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz"; |
|
1533 | 1533 | md5 = "83607d91aa163562c7ee835da57d061d"; |
|
1534 | 1534 | }; |
|
1535 | 1535 | meta = { |
|
1536 | 1536 | license = [ pkgs.lib.licenses.mit { fullName = "DFSG approved"; } ]; |
|
1537 | 1537 | }; |
|
1538 | 1538 | }; |
|
1539 | 1539 | python-dateutil = super.buildPythonPackage { |
|
1540 | 1540 | name = "python-dateutil-2.6.1"; |
|
1541 | 1541 | buildInputs = with self; []; |
|
1542 | 1542 | doCheck = false; |
|
1543 | 1543 | propagatedBuildInputs = with self; [six]; |
|
1544 | 1544 | src = fetchurl { |
|
1545 | 1545 | url = "https://pypi.python.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-2.6.1.tar.gz"; |
|
1546 | 1546 | md5 = "db38f6b4511cefd76014745bb0cc45a4"; |
|
1547 | 1547 | }; |
|
1548 | 1548 | meta = { |
|
1549 | 1549 | license = [ pkgs.lib.licenses.bsdOriginal { fullName = "Simplified BSD"; } ]; |
|
1550 | 1550 | }; |
|
1551 | 1551 | }; |
|
1552 | 1552 | python-editor = super.buildPythonPackage { |
|
1553 | 1553 | name = "python-editor-1.0.3"; |
|
1554 | 1554 | buildInputs = with self; []; |
|
1555 | 1555 | doCheck = false; |
|
1556 | 1556 | propagatedBuildInputs = with self; []; |
|
1557 | 1557 | src = fetchurl { |
|
1558 | 1558 | url = "https://pypi.python.org/packages/65/1e/adf6e000ea5dc909aa420352d6ba37f16434c8a3c2fa030445411a1ed545/python-editor-1.0.3.tar.gz"; |
|
1559 | 1559 | md5 = "0aca5f2ef176ce68e98a5b7e31372835"; |
|
1560 | 1560 | }; |
|
1561 | 1561 | meta = { |
|
1562 | 1562 | license = [ pkgs.lib.licenses.asl20 { fullName = "Apache"; } ]; |
|
1563 | 1563 | }; |
|
1564 | 1564 | }; |
|
1565 | 1565 | python-ldap = super.buildPythonPackage { |
|
1566 | 1566 | name = "python-ldap-2.4.45"; |
|
1567 | 1567 | buildInputs = with self; []; |
|
1568 | 1568 | doCheck = false; |
|
1569 | 1569 | propagatedBuildInputs = with self; [setuptools]; |
|
1570 | 1570 | src = fetchurl { |
|
1571 | 1571 | url = "https://pypi.python.org/packages/ce/52/6b5372d0166820f4a4b0a88ed73dc7504219355049fc1d266d8ccdb7942e/python-ldap-2.4.45.tar.gz"; |
|
1572 | 1572 | md5 = "6108e189a44eea8bc7d1cc281c222978"; |
|
1573 | 1573 | }; |
|
1574 | 1574 | meta = { |
|
1575 | 1575 | license = [ pkgs.lib.licenses.psfl ]; |
|
1576 | 1576 | }; |
|
1577 | 1577 | }; |
|
1578 | 1578 | python-memcached = super.buildPythonPackage { |
|
1579 | 1579 | name = "python-memcached-1.58"; |
|
1580 | 1580 | buildInputs = with self; []; |
|
1581 | 1581 | doCheck = false; |
|
1582 | 1582 | propagatedBuildInputs = with self; [six]; |
|
1583 | 1583 | src = fetchurl { |
|
1584 | 1584 | url = "https://pypi.python.org/packages/f7/62/14b2448cfb04427366f24104c9da97cf8ea380d7258a3233f066a951a8d8/python-memcached-1.58.tar.gz"; |
|
1585 | 1585 | md5 = "23b258105013d14d899828d334e6b044"; |
|
1586 | 1586 | }; |
|
1587 | 1587 | meta = { |
|
1588 | 1588 | license = [ pkgs.lib.licenses.psfl ]; |
|
1589 | 1589 | }; |
|
1590 | 1590 | }; |
|
1591 | 1591 | python-pam = super.buildPythonPackage { |
|
1592 | 1592 | name = "python-pam-1.8.2"; |
|
1593 | 1593 | buildInputs = with self; []; |
|
1594 | 1594 | doCheck = false; |
|
1595 | 1595 | propagatedBuildInputs = with self; []; |
|
1596 | 1596 | src = fetchurl { |
|
1597 | 1597 | url = "https://pypi.python.org/packages/de/8c/f8f5d38b4f26893af267ea0b39023d4951705ab0413a39e0cf7cf4900505/python-pam-1.8.2.tar.gz"; |
|
1598 | 1598 | md5 = "db71b6b999246fb05d78ecfbe166629d"; |
|
1599 | 1599 | }; |
|
1600 | 1600 | meta = { |
|
1601 | 1601 | license = [ { fullName = "License :: OSI Approved :: MIT License"; } pkgs.lib.licenses.mit ]; |
|
1602 | 1602 | }; |
|
1603 | 1603 | }; |
|
1604 | 1604 | pytz = super.buildPythonPackage { |
|
1605 |
name = "pytz-201 |
|
|
1605 | name = "pytz-2018.3"; | |
|
1606 | 1606 | buildInputs = with self; []; |
|
1607 | 1607 | doCheck = false; |
|
1608 | 1608 | propagatedBuildInputs = with self; []; |
|
1609 | 1609 | src = fetchurl { |
|
1610 | url = "https://pypi.python.org/packages/60/88/d3152c234da4b2a1f7a989f89609ea488225eaea015bc16fbde2b3fdfefa/pytz-2017.3.zip"; | |
|
1611 | md5 = "7006b56c0d68a162d9fe57d4249c3171"; | |
|
1610 | url = "https://pypi.python.org/packages/1b/50/4cdc62fc0753595fc16c8f722a89740f487c6e5670c644eb8983946777be/pytz-2018.3.tar.gz"; | |
|
1611 | md5 = "abb07c09c79f78d7c04f222a550c99ef"; | |
|
1612 | 1612 | }; |
|
1613 | 1613 | meta = { |
|
1614 | 1614 | license = [ pkgs.lib.licenses.mit ]; |
|
1615 | 1615 | }; |
|
1616 | 1616 | }; |
|
1617 | 1617 | pyzmq = super.buildPythonPackage { |
|
1618 | 1618 | name = "pyzmq-14.6.0"; |
|
1619 | 1619 | buildInputs = with self; []; |
|
1620 | 1620 | doCheck = false; |
|
1621 | 1621 | propagatedBuildInputs = with self; []; |
|
1622 | 1622 | src = fetchurl { |
|
1623 | 1623 | url = "https://pypi.python.org/packages/8a/3b/5463d5a9d712cd8bbdac335daece0d69f6a6792da4e3dd89956c0db4e4e6/pyzmq-14.6.0.tar.gz"; |
|
1624 | 1624 | md5 = "395b5de95a931afa5b14c9349a5b8024"; |
|
1625 | 1625 | }; |
|
1626 | 1626 | meta = { |
|
1627 | 1627 | license = [ pkgs.lib.licenses.bsdOriginal { fullName = "LGPL+BSD"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; |
|
1628 | 1628 | }; |
|
1629 | 1629 | }; |
|
1630 | 1630 | recaptcha-client = super.buildPythonPackage { |
|
1631 | 1631 | name = "recaptcha-client-1.0.6"; |
|
1632 | 1632 | buildInputs = with self; []; |
|
1633 | 1633 | doCheck = false; |
|
1634 | 1634 | propagatedBuildInputs = with self; []; |
|
1635 | 1635 | src = fetchurl { |
|
1636 | 1636 | url = "https://pypi.python.org/packages/0a/ea/5f2fbbfd894bdac1c68ef8d92019066cfcf9fbff5fe3d728d2b5c25c8db4/recaptcha-client-1.0.6.tar.gz"; |
|
1637 | 1637 | md5 = "74228180f7e1fb76c4d7089160b0d919"; |
|
1638 | 1638 | }; |
|
1639 | 1639 | meta = { |
|
1640 | 1640 | license = [ { fullName = "MIT/X11"; } ]; |
|
1641 | 1641 | }; |
|
1642 | 1642 | }; |
|
1643 | 1643 | redis = super.buildPythonPackage { |
|
1644 | 1644 | name = "redis-2.10.6"; |
|
1645 | 1645 | buildInputs = with self; []; |
|
1646 | 1646 | doCheck = false; |
|
1647 | 1647 | propagatedBuildInputs = with self; []; |
|
1648 | 1648 | src = fetchurl { |
|
1649 | 1649 | url = "https://pypi.python.org/packages/09/8d/6d34b75326bf96d4139a2ddd8e74b80840f800a0a79f9294399e212cb9a7/redis-2.10.6.tar.gz"; |
|
1650 | 1650 | md5 = "048348d8cfe0b5d0bba2f4d835005c3b"; |
|
1651 | 1651 | }; |
|
1652 | 1652 | meta = { |
|
1653 | 1653 | license = [ pkgs.lib.licenses.mit ]; |
|
1654 | 1654 | }; |
|
1655 | 1655 | }; |
|
1656 | 1656 | repoze.lru = super.buildPythonPackage { |
|
1657 | 1657 | name = "repoze.lru-0.7"; |
|
1658 | 1658 | buildInputs = with self; []; |
|
1659 | 1659 | doCheck = false; |
|
1660 | 1660 | propagatedBuildInputs = with self; []; |
|
1661 | 1661 | src = fetchurl { |
|
1662 | 1662 | url = "https://pypi.python.org/packages/12/bc/595a77c4b5e204847fdf19268314ef59c85193a9dc9f83630fc459c0fee5/repoze.lru-0.7.tar.gz"; |
|
1663 | 1663 | md5 = "c08cc030387e0b1fc53c5c7d964b35e2"; |
|
1664 | 1664 | }; |
|
1665 | 1665 | meta = { |
|
1666 | 1666 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1667 | 1667 | }; |
|
1668 | 1668 | }; |
|
1669 | 1669 | requests = super.buildPythonPackage { |
|
1670 | 1670 | name = "requests-2.9.1"; |
|
1671 | 1671 | buildInputs = with self; []; |
|
1672 | 1672 | doCheck = false; |
|
1673 | 1673 | propagatedBuildInputs = with self; []; |
|
1674 | 1674 | src = fetchurl { |
|
1675 | 1675 | url = "https://pypi.python.org/packages/f9/6d/07c44fb1ebe04d069459a189e7dab9e4abfe9432adcd4477367c25332748/requests-2.9.1.tar.gz"; |
|
1676 | 1676 | md5 = "0b7f480d19012ec52bab78292efd976d"; |
|
1677 | 1677 | }; |
|
1678 | 1678 | meta = { |
|
1679 | 1679 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1680 | 1680 | }; |
|
1681 | 1681 | }; |
|
1682 | 1682 | rhodecode-enterprise-ce = super.buildPythonPackage { |
|
1683 | 1683 | name = "rhodecode-enterprise-ce-4.12.0"; |
|
1684 | 1684 | buildInputs = with self; [pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage configobj]; |
|
1685 | 1685 | doCheck = true; |
|
1686 | propagatedBuildInputs = with self; [setuptools-scm amqp authomatic Babel Beaker celery Chameleon channelstream click colander configobj cssselect decorator deform docutils dogpile.cache dogpile.core ecdsa FormEncode future futures gnureadline infrae.cache iso8601 itsdangerous Jinja2 billiard kombu lxml Mako Markdown MarkupSafe msgpack-python MySQL-python objgraph packaging Paste PasteDeploy PasteScript pathlib2 peppercorn psutil psycopg2 py-bcrypt pycrypto pycurl pyflakes pygments-markdown-lexer Pygments pyparsing pyramid-beaker pyramid-debugtoolbar pyramid-jinja2 pyramid-mako pyramid pysqlite python-dateutil python-ldap python-memcached python-pam pytz pyzmq py-gfm recaptcha-client redis repoze.lru requests Routes setproctitle simplejson six SQLAlchemy sshpubkeys subprocess32 supervisor Tempita translationstring trollius urllib3 URLObject venusian WebError WebHelpers2 WebHelpers WebOb Whoosh wsgiref zope.cachedescriptors zope.deprecation zope.event zope.interface nbconvert bleach nbformat jupyter-client alembic invoke bumpversion transifex-client gevent greenlet gunicorn waitress uWSGI ipdb ipython CProfileV bottle rhodecode-tools appenlight-client pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage]; | |
|
1686 | propagatedBuildInputs = with self; [setuptools-scm amqp authomatic Babel Beaker celery Chameleon channelstream click colander configobj cssselect decorator deform docutils dogpile.cache dogpile.core ecdsa FormEncode future futures gnureadline infrae.cache iso8601 itsdangerous Jinja2 billiard kombu lxml Mako Markdown MarkupSafe msgpack-python MySQL-python objgraph packaging Paste PasteDeploy PasteScript pathlib2 peppercorn psutil psycopg2 py-bcrypt pycrypto pycurl pyflakes pygments-markdown-lexer Pygments pyparsing pyramid-beaker pyramid-debugtoolbar pyramid-jinja2 pyramid-mako pyramid pysqlite python-dateutil python-ldap python-memcached python-pam pytz tzlocal pyzmq py-gfm recaptcha-client redis repoze.lru requests Routes setproctitle simplejson six SQLAlchemy sshpubkeys subprocess32 supervisor Tempita translationstring trollius urllib3 URLObject venusian WebError WebHelpers2 WebHelpers WebOb Whoosh wsgiref zope.cachedescriptors zope.deprecation zope.event zope.interface nbconvert bleach nbformat jupyter-client alembic invoke bumpversion transifex-client gevent greenlet gunicorn waitress uWSGI ipdb ipython CProfileV bottle rhodecode-tools appenlight-client pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage]; | |
|
1687 | 1687 | src = ./.; |
|
1688 | 1688 | meta = { |
|
1689 | 1689 | license = [ { fullName = "Affero GNU General Public License v3 or later (AGPLv3+)"; } { fullName = "AGPLv3, and Commercial License"; } ]; |
|
1690 | 1690 | }; |
|
1691 | 1691 | }; |
|
1692 | 1692 | rhodecode-tools = super.buildPythonPackage { |
|
1693 | 1693 | name = "rhodecode-tools-0.14.1"; |
|
1694 | 1694 | buildInputs = with self; []; |
|
1695 | 1695 | doCheck = false; |
|
1696 | 1696 | propagatedBuildInputs = with self; [click future six Mako MarkupSafe requests elasticsearch elasticsearch-dsl urllib3 Whoosh]; |
|
1697 | 1697 | src = fetchurl { |
|
1698 | 1698 | url = "https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.14.1.tar.gz?md5=0b9c2caad160b68889f8172ea54af7b2"; |
|
1699 | 1699 | md5 = "0b9c2caad160b68889f8172ea54af7b2"; |
|
1700 | 1700 | }; |
|
1701 | 1701 | meta = { |
|
1702 | 1702 | license = [ { fullName = "AGPLv3 and Proprietary"; } ]; |
|
1703 | 1703 | }; |
|
1704 | 1704 | }; |
|
1705 | 1705 | scandir = super.buildPythonPackage { |
|
1706 | 1706 | name = "scandir-1.7"; |
|
1707 | 1707 | buildInputs = with self; []; |
|
1708 | 1708 | doCheck = false; |
|
1709 | 1709 | propagatedBuildInputs = with self; []; |
|
1710 | 1710 | src = fetchurl { |
|
1711 | 1711 | url = "https://pypi.python.org/packages/13/bb/e541b74230bbf7a20a3949a2ee6631be299378a784f5445aa5d0047c192b/scandir-1.7.tar.gz"; |
|
1712 | 1712 | md5 = "037e5f24d1a0e78b17faca72dea9555f"; |
|
1713 | 1713 | }; |
|
1714 | 1714 | meta = { |
|
1715 | 1715 | license = [ pkgs.lib.licenses.bsdOriginal { fullName = "New BSD License"; } ]; |
|
1716 | 1716 | }; |
|
1717 | 1717 | }; |
|
1718 | 1718 | setproctitle = super.buildPythonPackage { |
|
1719 | 1719 | name = "setproctitle-1.1.10"; |
|
1720 | 1720 | buildInputs = with self; []; |
|
1721 | 1721 | doCheck = false; |
|
1722 | 1722 | propagatedBuildInputs = with self; []; |
|
1723 | 1723 | src = fetchurl { |
|
1724 | 1724 | url = "https://pypi.python.org/packages/5a/0d/dc0d2234aacba6cf1a729964383e3452c52096dc695581248b548786f2b3/setproctitle-1.1.10.tar.gz"; |
|
1725 | 1725 | md5 = "2dcdd1b761700a5a13252fea3dfd1977"; |
|
1726 | 1726 | }; |
|
1727 | 1727 | meta = { |
|
1728 | 1728 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1729 | 1729 | }; |
|
1730 | 1730 | }; |
|
1731 | 1731 | setuptools = super.buildPythonPackage { |
|
1732 | 1732 | name = "setuptools-30.1.0"; |
|
1733 | 1733 | buildInputs = with self; []; |
|
1734 | 1734 | doCheck = false; |
|
1735 | 1735 | propagatedBuildInputs = with self; []; |
|
1736 | 1736 | src = fetchurl { |
|
1737 | 1737 | url = "https://pypi.python.org/packages/1e/43/002c8616db9a3e7be23c2556e39b90a32bb40ba0dc652de1999d5334d372/setuptools-30.1.0.tar.gz"; |
|
1738 | 1738 | md5 = "cac497f42e5096ac8df29e38d3f81c3e"; |
|
1739 | 1739 | }; |
|
1740 | 1740 | meta = { |
|
1741 | 1741 | license = [ pkgs.lib.licenses.mit ]; |
|
1742 | 1742 | }; |
|
1743 | 1743 | }; |
|
1744 | 1744 | setuptools-scm = super.buildPythonPackage { |
|
1745 | 1745 | name = "setuptools-scm-1.15.6"; |
|
1746 | 1746 | buildInputs = with self; []; |
|
1747 | 1747 | doCheck = false; |
|
1748 | 1748 | propagatedBuildInputs = with self; []; |
|
1749 | 1749 | src = fetchurl { |
|
1750 | 1750 | url = "https://pypi.python.org/packages/03/6d/aafdd01edd227ee879b691455bf19895091872af7e48192bea1758c82032/setuptools_scm-1.15.6.tar.gz"; |
|
1751 | 1751 | md5 = "f17493d53f0d842bb0152f214775640b"; |
|
1752 | 1752 | }; |
|
1753 | 1753 | meta = { |
|
1754 | 1754 | license = [ pkgs.lib.licenses.mit ]; |
|
1755 | 1755 | }; |
|
1756 | 1756 | }; |
|
1757 | 1757 | simplegeneric = super.buildPythonPackage { |
|
1758 | 1758 | name = "simplegeneric-0.8.1"; |
|
1759 | 1759 | buildInputs = with self; []; |
|
1760 | 1760 | doCheck = false; |
|
1761 | 1761 | propagatedBuildInputs = with self; []; |
|
1762 | 1762 | src = fetchurl { |
|
1763 | 1763 | url = "https://pypi.python.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip"; |
|
1764 | 1764 | md5 = "f9c1fab00fd981be588fc32759f474e3"; |
|
1765 | 1765 | }; |
|
1766 | 1766 | meta = { |
|
1767 | 1767 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1768 | 1768 | }; |
|
1769 | 1769 | }; |
|
1770 | 1770 | simplejson = super.buildPythonPackage { |
|
1771 | 1771 | name = "simplejson-3.11.1"; |
|
1772 | 1772 | buildInputs = with self; []; |
|
1773 | 1773 | doCheck = false; |
|
1774 | 1774 | propagatedBuildInputs = with self; []; |
|
1775 | 1775 | src = fetchurl { |
|
1776 | 1776 | url = "https://pypi.python.org/packages/08/48/c97b668d6da7d7bebe7ea1817a6f76394b0ec959cb04214ca833c34359df/simplejson-3.11.1.tar.gz"; |
|
1777 | 1777 | md5 = "6e2f1bd5fb0a926facf5d89d217a7183"; |
|
1778 | 1778 | }; |
|
1779 | 1779 | meta = { |
|
1780 | 1780 | license = [ { fullName = "Academic Free License (AFL)"; } pkgs.lib.licenses.mit ]; |
|
1781 | 1781 | }; |
|
1782 | 1782 | }; |
|
1783 | 1783 | six = super.buildPythonPackage { |
|
1784 | 1784 | name = "six-1.11.0"; |
|
1785 | 1785 | buildInputs = with self; []; |
|
1786 | 1786 | doCheck = false; |
|
1787 | 1787 | propagatedBuildInputs = with self; []; |
|
1788 | 1788 | src = fetchurl { |
|
1789 | 1789 | url = "https://pypi.python.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"; |
|
1790 | 1790 | md5 = "d12789f9baf7e9fb2524c0c64f1773f8"; |
|
1791 | 1791 | }; |
|
1792 | 1792 | meta = { |
|
1793 | 1793 | license = [ pkgs.lib.licenses.mit ]; |
|
1794 | 1794 | }; |
|
1795 | 1795 | }; |
|
1796 | 1796 | sshpubkeys = super.buildPythonPackage { |
|
1797 | 1797 | name = "sshpubkeys-2.2.0"; |
|
1798 | 1798 | buildInputs = with self; []; |
|
1799 | 1799 | doCheck = false; |
|
1800 | 1800 | propagatedBuildInputs = with self; [pycrypto ecdsa]; |
|
1801 | 1801 | src = fetchurl { |
|
1802 | 1802 | url = "https://pypi.python.org/packages/27/da/337fabeb3dca6b62039a93ceaa636f25065e0ae92b575b1235342076cf0a/sshpubkeys-2.2.0.tar.gz"; |
|
1803 | 1803 | md5 = "458e45f6b92b1afa84f0ffe1f1c90935"; |
|
1804 | 1804 | }; |
|
1805 | 1805 | meta = { |
|
1806 | 1806 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1807 | 1807 | }; |
|
1808 | 1808 | }; |
|
1809 | 1809 | subprocess32 = super.buildPythonPackage { |
|
1810 | 1810 | name = "subprocess32-3.2.7"; |
|
1811 | 1811 | buildInputs = with self; []; |
|
1812 | 1812 | doCheck = false; |
|
1813 | 1813 | propagatedBuildInputs = with self; []; |
|
1814 | 1814 | src = fetchurl { |
|
1815 | 1815 | url = "https://pypi.python.org/packages/b8/2f/49e53b0d0e94611a2dc624a1ad24d41b6d94d0f1b0a078443407ea2214c2/subprocess32-3.2.7.tar.gz"; |
|
1816 | 1816 | md5 = "824c801e479d3e916879aae3e9c15e16"; |
|
1817 | 1817 | }; |
|
1818 | 1818 | meta = { |
|
1819 | 1819 | license = [ pkgs.lib.licenses.psfl ]; |
|
1820 | 1820 | }; |
|
1821 | 1821 | }; |
|
1822 | 1822 | supervisor = super.buildPythonPackage { |
|
1823 | 1823 | name = "supervisor-3.3.4"; |
|
1824 | 1824 | buildInputs = with self; []; |
|
1825 | 1825 | doCheck = false; |
|
1826 | 1826 | propagatedBuildInputs = with self; [meld3]; |
|
1827 | 1827 | src = fetchurl { |
|
1828 | 1828 | url = "https://pypi.python.org/packages/44/60/698e54b4a4a9b956b2d709b4b7b676119c833d811d53ee2500f1b5e96dc3/supervisor-3.3.4.tar.gz"; |
|
1829 | 1829 | md5 = "f1814d71d820ddfa8c86d46a72314cec"; |
|
1830 | 1830 | }; |
|
1831 | 1831 | meta = { |
|
1832 | 1832 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1833 | 1833 | }; |
|
1834 | 1834 | }; |
|
1835 | 1835 | termcolor = super.buildPythonPackage { |
|
1836 | 1836 | name = "termcolor-1.1.0"; |
|
1837 | 1837 | buildInputs = with self; []; |
|
1838 | 1838 | doCheck = false; |
|
1839 | 1839 | propagatedBuildInputs = with self; []; |
|
1840 | 1840 | src = fetchurl { |
|
1841 | 1841 | url = "https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz"; |
|
1842 | 1842 | md5 = "043e89644f8909d462fbbfa511c768df"; |
|
1843 | 1843 | }; |
|
1844 | 1844 | meta = { |
|
1845 | 1845 | license = [ pkgs.lib.licenses.mit ]; |
|
1846 | 1846 | }; |
|
1847 | 1847 | }; |
|
1848 | 1848 | testpath = super.buildPythonPackage { |
|
1849 | 1849 | name = "testpath-0.3.1"; |
|
1850 | 1850 | buildInputs = with self; []; |
|
1851 | 1851 | doCheck = false; |
|
1852 | 1852 | propagatedBuildInputs = with self; []; |
|
1853 | 1853 | src = fetchurl { |
|
1854 | 1854 | url = "https://pypi.python.org/packages/f4/8b/b71e9ee10e5f751e9d959bc750ab122ba04187f5aa52aabdc4e63b0e31a7/testpath-0.3.1.tar.gz"; |
|
1855 | 1855 | md5 = "2cd5ed5522fda781bb497c9d80ae2fc9"; |
|
1856 | 1856 | }; |
|
1857 | 1857 | meta = { |
|
1858 | 1858 | license = [ pkgs.lib.licenses.mit ]; |
|
1859 | 1859 | }; |
|
1860 | 1860 | }; |
|
1861 | 1861 | traitlets = super.buildPythonPackage { |
|
1862 | 1862 | name = "traitlets-4.3.2"; |
|
1863 | 1863 | buildInputs = with self; []; |
|
1864 | 1864 | doCheck = false; |
|
1865 | 1865 | propagatedBuildInputs = with self; [ipython-genutils six decorator enum34]; |
|
1866 | 1866 | src = fetchurl { |
|
1867 | 1867 | url = "https://pypi.python.org/packages/a5/98/7f5ef2fe9e9e071813aaf9cb91d1a732e0a68b6c44a32b38cb8e14c3f069/traitlets-4.3.2.tar.gz"; |
|
1868 | 1868 | md5 = "3068663f2f38fd939a9eb3a500ccc154"; |
|
1869 | 1869 | }; |
|
1870 | 1870 | meta = { |
|
1871 | 1871 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1872 | 1872 | }; |
|
1873 | 1873 | }; |
|
1874 | 1874 | transifex-client = super.buildPythonPackage { |
|
1875 | 1875 | name = "transifex-client-0.12.5"; |
|
1876 | 1876 | buildInputs = with self; []; |
|
1877 | 1877 | doCheck = false; |
|
1878 | 1878 | propagatedBuildInputs = with self; [urllib3 six]; |
|
1879 | 1879 | src = fetchurl { |
|
1880 | 1880 | url = "https://pypi.python.org/packages/7b/86/60f31a0c9b8d0b1266ce15b6c80b55f88522140c8acfc395d5aec5e23475/transifex-client-0.12.5.tar.gz"; |
|
1881 | 1881 | md5 = "e6e278117b23f60702c06e203b7e51ae"; |
|
1882 | 1882 | }; |
|
1883 | 1883 | meta = { |
|
1884 | 1884 | license = [ pkgs.lib.licenses.gpl2 ]; |
|
1885 | 1885 | }; |
|
1886 | 1886 | }; |
|
1887 | 1887 | translationstring = super.buildPythonPackage { |
|
1888 | 1888 | name = "translationstring-1.3"; |
|
1889 | 1889 | buildInputs = with self; []; |
|
1890 | 1890 | doCheck = false; |
|
1891 | 1891 | propagatedBuildInputs = with self; []; |
|
1892 | 1892 | src = fetchurl { |
|
1893 | 1893 | url = "https://pypi.python.org/packages/5e/eb/bee578cc150b44c653b63f5ebe258b5d0d812ddac12497e5f80fcad5d0b4/translationstring-1.3.tar.gz"; |
|
1894 | 1894 | md5 = "a4b62e0f3c189c783a1685b3027f7c90"; |
|
1895 | 1895 | }; |
|
1896 | 1896 | meta = { |
|
1897 | 1897 | license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ]; |
|
1898 | 1898 | }; |
|
1899 | 1899 | }; |
|
1900 | 1900 | trollius = super.buildPythonPackage { |
|
1901 | 1901 | name = "trollius-1.0.4"; |
|
1902 | 1902 | buildInputs = with self; []; |
|
1903 | 1903 | doCheck = false; |
|
1904 | 1904 | propagatedBuildInputs = with self; [futures]; |
|
1905 | 1905 | src = fetchurl { |
|
1906 | 1906 | url = "https://pypi.python.org/packages/aa/e6/4141db437f55e6ee7a3fb69663239e3fde7841a811b4bef293145ad6c836/trollius-1.0.4.tar.gz"; |
|
1907 | 1907 | md5 = "3631a464d49d0cbfd30ab2918ef2b783"; |
|
1908 | 1908 | }; |
|
1909 | 1909 | meta = { |
|
1910 | 1910 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1911 | 1911 | }; |
|
1912 | 1912 | }; |
|
1913 | tzlocal = super.buildPythonPackage { | |
|
1914 | name = "tzlocal-1.5.1"; | |
|
1915 | buildInputs = with self; []; | |
|
1916 | doCheck = false; | |
|
1917 | propagatedBuildInputs = with self; [pytz]; | |
|
1918 | src = fetchurl { | |
|
1919 | url = "https://pypi.python.org/packages/cb/89/e3687d3ed99bc882793f82634e9824e62499fdfdc4b1ae39e211c5b05017/tzlocal-1.5.1.tar.gz"; | |
|
1920 | md5 = "4553be891efa0812c4adfb0c6e818eec"; | |
|
1921 | }; | |
|
1922 | meta = { | |
|
1923 | license = [ pkgs.lib.licenses.mit ]; | |
|
1924 | }; | |
|
1925 | }; | |
|
1913 | 1926 | uWSGI = super.buildPythonPackage { |
|
1914 | 1927 | name = "uWSGI-2.0.15"; |
|
1915 | 1928 | buildInputs = with self; []; |
|
1916 | 1929 | doCheck = false; |
|
1917 | 1930 | propagatedBuildInputs = with self; []; |
|
1918 | 1931 | src = fetchurl { |
|
1919 | 1932 | url = "https://pypi.python.org/packages/bb/0a/45e5aa80dc135889594bb371c082d20fb7ee7303b174874c996888cc8511/uwsgi-2.0.15.tar.gz"; |
|
1920 | 1933 | md5 = "fc50bd9e83b7602fa474b032167010a7"; |
|
1921 | 1934 | }; |
|
1922 | 1935 | meta = { |
|
1923 | 1936 | license = [ pkgs.lib.licenses.gpl2 ]; |
|
1924 | 1937 | }; |
|
1925 | 1938 | }; |
|
1926 | 1939 | urllib3 = super.buildPythonPackage { |
|
1927 | 1940 | name = "urllib3-1.16"; |
|
1928 | 1941 | buildInputs = with self; []; |
|
1929 | 1942 | doCheck = false; |
|
1930 | 1943 | propagatedBuildInputs = with self; []; |
|
1931 | 1944 | src = fetchurl { |
|
1932 | 1945 | url = "https://pypi.python.org/packages/3b/f0/e763169124e3f5db0926bc3dbfcd580a105f9ca44cf5d8e6c7a803c9f6b5/urllib3-1.16.tar.gz"; |
|
1933 | 1946 | md5 = "fcaab1c5385c57deeb7053d3d7d81d59"; |
|
1934 | 1947 | }; |
|
1935 | 1948 | meta = { |
|
1936 | 1949 | license = [ pkgs.lib.licenses.mit ]; |
|
1937 | 1950 | }; |
|
1938 | 1951 | }; |
|
1939 | 1952 | venusian = super.buildPythonPackage { |
|
1940 | 1953 | name = "venusian-1.1.0"; |
|
1941 | 1954 | buildInputs = with self; []; |
|
1942 | 1955 | doCheck = false; |
|
1943 | 1956 | propagatedBuildInputs = with self; []; |
|
1944 | 1957 | src = fetchurl { |
|
1945 | 1958 | url = "https://pypi.python.org/packages/38/24/b4b470ab9e0a2e2e9b9030c7735828c8934b4c6b45befd1bb713ec2aeb2d/venusian-1.1.0.tar.gz"; |
|
1946 | 1959 | md5 = "56bc5e6756e4bda37bcdb94f74a72b8f"; |
|
1947 | 1960 | }; |
|
1948 | 1961 | meta = { |
|
1949 | 1962 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1950 | 1963 | }; |
|
1951 | 1964 | }; |
|
1952 | 1965 | vine = super.buildPythonPackage { |
|
1953 | 1966 | name = "vine-1.1.4"; |
|
1954 | 1967 | buildInputs = with self; []; |
|
1955 | 1968 | doCheck = false; |
|
1956 | 1969 | propagatedBuildInputs = with self; []; |
|
1957 | 1970 | src = fetchurl { |
|
1958 | 1971 | url = "https://pypi.python.org/packages/32/23/36284986e011f3c130d802c3c66abd8f1aef371eae110ddf80c5ae22e1ff/vine-1.1.4.tar.gz"; |
|
1959 | 1972 | md5 = "9fdb971e7fd15b181b84f3bfcf20d11c"; |
|
1960 | 1973 | }; |
|
1961 | 1974 | meta = { |
|
1962 | 1975 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1963 | 1976 | }; |
|
1964 | 1977 | }; |
|
1965 | 1978 | waitress = super.buildPythonPackage { |
|
1966 | 1979 | name = "waitress-1.1.0"; |
|
1967 | 1980 | buildInputs = with self; []; |
|
1968 | 1981 | doCheck = false; |
|
1969 | 1982 | propagatedBuildInputs = with self; []; |
|
1970 | 1983 | src = fetchurl { |
|
1971 | 1984 | url = "https://pypi.python.org/packages/3c/68/1c10dd5c556872ceebe88483b0436140048d39de83a84a06a8baa8136f4f/waitress-1.1.0.tar.gz"; |
|
1972 | 1985 | md5 = "0f1eb7fdfdbf2e6d18decbda1733045c"; |
|
1973 | 1986 | }; |
|
1974 | 1987 | meta = { |
|
1975 | 1988 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1976 | 1989 | }; |
|
1977 | 1990 | }; |
|
1978 | 1991 | wcwidth = super.buildPythonPackage { |
|
1979 | 1992 | name = "wcwidth-0.1.7"; |
|
1980 | 1993 | buildInputs = with self; []; |
|
1981 | 1994 | doCheck = false; |
|
1982 | 1995 | propagatedBuildInputs = with self; []; |
|
1983 | 1996 | src = fetchurl { |
|
1984 | 1997 | url = "https://pypi.python.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz"; |
|
1985 | 1998 | md5 = "b3b6a0a08f0c8a34d1de8cf44150a4ad"; |
|
1986 | 1999 | }; |
|
1987 | 2000 | meta = { |
|
1988 | 2001 | license = [ pkgs.lib.licenses.mit ]; |
|
1989 | 2002 | }; |
|
1990 | 2003 | }; |
|
1991 | 2004 | webencodings = super.buildPythonPackage { |
|
1992 | 2005 | name = "webencodings-0.5.1"; |
|
1993 | 2006 | buildInputs = with self; []; |
|
1994 | 2007 | doCheck = false; |
|
1995 | 2008 | propagatedBuildInputs = with self; []; |
|
1996 | 2009 | src = fetchurl { |
|
1997 | 2010 | url = "https://pypi.python.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz"; |
|
1998 | 2011 | md5 = "32f6e261d52e57bf7e1c4d41546d15b8"; |
|
1999 | 2012 | }; |
|
2000 | 2013 | meta = { |
|
2001 | 2014 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
2002 | 2015 | }; |
|
2003 | 2016 | }; |
|
2004 | 2017 | ws4py = super.buildPythonPackage { |
|
2005 | 2018 | name = "ws4py-0.4.3"; |
|
2006 | 2019 | buildInputs = with self; []; |
|
2007 | 2020 | doCheck = false; |
|
2008 | 2021 | propagatedBuildInputs = with self; []; |
|
2009 | 2022 | src = fetchurl { |
|
2010 | 2023 | url = "https://pypi.python.org/packages/fa/a1/33c43a4304ac3b4dc81deb93cbd329de9297dd034d75c47cce64fda806bc/ws4py-0.4.3.tar.gz"; |
|
2011 | 2024 | md5 = "d5834cf7d3965bb0da31bbb02bd8513a"; |
|
2012 | 2025 | }; |
|
2013 | 2026 | meta = { |
|
2014 | 2027 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
2015 | 2028 | }; |
|
2016 | 2029 | }; |
|
2017 | 2030 | wsgiref = super.buildPythonPackage { |
|
2018 | 2031 | name = "wsgiref-0.1.2"; |
|
2019 | 2032 | buildInputs = with self; []; |
|
2020 | 2033 | doCheck = false; |
|
2021 | 2034 | propagatedBuildInputs = with self; []; |
|
2022 | 2035 | src = fetchurl { |
|
2023 | 2036 | url = "https://pypi.python.org/packages/41/9e/309259ce8dff8c596e8c26df86dbc4e848b9249fd36797fd60be456f03fc/wsgiref-0.1.2.zip"; |
|
2024 | 2037 | md5 = "29b146e6ebd0f9fb119fe321f7bcf6cb"; |
|
2025 | 2038 | }; |
|
2026 | 2039 | meta = { |
|
2027 | 2040 | license = [ { fullName = "PSF or ZPL"; } ]; |
|
2028 | 2041 | }; |
|
2029 | 2042 | }; |
|
2030 | 2043 | zope.cachedescriptors = super.buildPythonPackage { |
|
2031 | 2044 | name = "zope.cachedescriptors-4.3.1"; |
|
2032 | 2045 | buildInputs = with self; []; |
|
2033 | 2046 | doCheck = false; |
|
2034 | 2047 | propagatedBuildInputs = with self; [setuptools]; |
|
2035 | 2048 | src = fetchurl { |
|
2036 | 2049 | url = "https://pypi.python.org/packages/2f/89/ebe1890cc6d3291ebc935558fa764d5fffe571018dbbee200e9db78762cb/zope.cachedescriptors-4.3.1.tar.gz"; |
|
2037 | 2050 | md5 = "42f3693f43bc93f3b1eb86940f58acf3"; |
|
2038 | 2051 | }; |
|
2039 | 2052 | meta = { |
|
2040 | 2053 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
2041 | 2054 | }; |
|
2042 | 2055 | }; |
|
2043 | 2056 | zope.deprecation = super.buildPythonPackage { |
|
2044 | 2057 | name = "zope.deprecation-4.3.0"; |
|
2045 | 2058 | buildInputs = with self; []; |
|
2046 | 2059 | doCheck = false; |
|
2047 | 2060 | propagatedBuildInputs = with self; [setuptools]; |
|
2048 | 2061 | src = fetchurl { |
|
2049 | 2062 | url = "https://pypi.python.org/packages/a1/18/2dc5e6bfe64fdc3b79411b67464c55bb0b43b127051a20f7f492ab767758/zope.deprecation-4.3.0.tar.gz"; |
|
2050 | 2063 | md5 = "2166b2cb7e0e96a21104e6f8f9b696bb"; |
|
2051 | 2064 | }; |
|
2052 | 2065 | meta = { |
|
2053 | 2066 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
2054 | 2067 | }; |
|
2055 | 2068 | }; |
|
2056 | 2069 | zope.event = super.buildPythonPackage { |
|
2057 | 2070 | name = "zope.event-4.3.0"; |
|
2058 | 2071 | buildInputs = with self; []; |
|
2059 | 2072 | doCheck = false; |
|
2060 | 2073 | propagatedBuildInputs = with self; [setuptools]; |
|
2061 | 2074 | src = fetchurl { |
|
2062 | 2075 | url = "https://pypi.python.org/packages/9e/d0/54ba59f19a0635f6591b74be259cf6fbf67e73f4edda27b5cd0cf4d26efa/zope.event-4.3.0.tar.gz"; |
|
2063 | 2076 | md5 = "8ca737960741c6fd112972f3313303bd"; |
|
2064 | 2077 | }; |
|
2065 | 2078 | meta = { |
|
2066 | 2079 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
2067 | 2080 | }; |
|
2068 | 2081 | }; |
|
2069 | 2082 | zope.interface = super.buildPythonPackage { |
|
2070 | 2083 | name = "zope.interface-4.4.3"; |
|
2071 | 2084 | buildInputs = with self; []; |
|
2072 | 2085 | doCheck = false; |
|
2073 | 2086 | propagatedBuildInputs = with self; [setuptools]; |
|
2074 | 2087 | src = fetchurl { |
|
2075 | 2088 | url = "https://pypi.python.org/packages/bd/d2/25349ed41f9dcff7b3baf87bd88a4c82396cf6e02f1f42bb68657a3132af/zope.interface-4.4.3.tar.gz"; |
|
2076 | 2089 | md5 = "8700a4f527c1203b34b10c2b4e7a6912"; |
|
2077 | 2090 | }; |
|
2078 | 2091 | meta = { |
|
2079 | 2092 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
2080 | 2093 | }; |
|
2081 | 2094 | }; |
|
2082 | 2095 | |
|
2083 | 2096 | ### Test requirements |
|
2084 | 2097 | |
|
2085 | 2098 | |
|
2086 | 2099 | } |
@@ -1,131 +1,132 b'' | |||
|
1 | 1 | ## core |
|
2 | 2 | setuptools==30.1.0 |
|
3 | 3 | setuptools-scm==1.15.6 |
|
4 | 4 | |
|
5 | 5 | amqp==2.2.2 |
|
6 | 6 | authomatic==0.1.0.post1 |
|
7 | 7 | Babel==1.3 |
|
8 | 8 | Beaker==1.9.1 |
|
9 | 9 | celery==4.1.0 |
|
10 | 10 | Chameleon==2.24 |
|
11 | 11 | channelstream==0.5.2 |
|
12 | 12 | click==6.6 |
|
13 | 13 | colander==1.4.0 |
|
14 | 14 | configobj==5.0.6 |
|
15 | 15 | cssselect==1.0.1 |
|
16 | 16 | decorator==4.1.2 |
|
17 | 17 | deform==2.0.4 |
|
18 | 18 | docutils==0.14.0 |
|
19 | 19 | dogpile.cache==0.6.4 |
|
20 | 20 | dogpile.core==0.4.1 |
|
21 | 21 | ecdsa==0.13 |
|
22 | 22 | FormEncode==1.2.4 |
|
23 | 23 | future==0.14.3 |
|
24 | 24 | futures==3.0.2 |
|
25 | 25 | gnureadline==6.3.8 |
|
26 | 26 | infrae.cache==1.0.1 |
|
27 | 27 | iso8601==0.1.12 |
|
28 | 28 | itsdangerous==0.24 |
|
29 | 29 | Jinja2==2.9.6 |
|
30 | 30 | billiard==3.5.0.3 |
|
31 | 31 | kombu==4.1.0 |
|
32 | 32 | lxml==3.7.3 |
|
33 | 33 | Mako==1.0.7 |
|
34 | 34 | Markdown==2.6.11 |
|
35 | 35 | MarkupSafe==1.0.0 |
|
36 | 36 | msgpack-python==0.4.8 |
|
37 | 37 | MySQL-python==1.2.5 |
|
38 | 38 | objgraph==3.1.1 |
|
39 | 39 | packaging==15.2 |
|
40 | 40 | Paste==2.0.3 |
|
41 | 41 | PasteDeploy==1.5.2 |
|
42 | 42 | PasteScript==2.0.2 |
|
43 | 43 | pathlib2==2.3.0 |
|
44 | 44 | peppercorn==0.5 |
|
45 | 45 | psutil==5.4.3 |
|
46 | 46 | psycopg2==2.7.3.2 |
|
47 | 47 | py-bcrypt==0.4 |
|
48 | 48 | pycrypto==2.6.1 |
|
49 | 49 | pycurl==7.19.5 |
|
50 | 50 | pyflakes==0.8.1 |
|
51 | 51 | pygments-markdown-lexer==0.1.0.dev39 |
|
52 | 52 | Pygments==2.2.0 |
|
53 | 53 | pyparsing==1.5.7 |
|
54 | 54 | pyramid-beaker==0.8 |
|
55 | 55 | pyramid-debugtoolbar==4.3.0 |
|
56 | 56 | pyramid-jinja2==2.7 |
|
57 | 57 | pyramid-mako==1.0.2 |
|
58 | 58 | pyramid==1.9.1 |
|
59 | 59 | pysqlite==2.8.3 |
|
60 | 60 | python-dateutil |
|
61 | 61 | python-ldap==2.4.45 |
|
62 | 62 | python-memcached==1.58 |
|
63 | 63 | python-pam==1.8.2 |
|
64 |
pytz==201 |
|
|
64 | pytz==2018.3 | |
|
65 | tzlocal==1.5.1 | |
|
65 | 66 | pyzmq==14.6.0 |
|
66 | 67 | py-gfm==0.1.3 |
|
67 | 68 | recaptcha-client==1.0.6 |
|
68 | 69 | redis==2.10.6 |
|
69 | 70 | repoze.lru==0.7 |
|
70 | 71 | requests==2.9.1 |
|
71 | 72 | Routes==2.4.1 |
|
72 | 73 | setproctitle==1.1.10 |
|
73 | 74 | simplejson==3.11.1 |
|
74 | 75 | six==1.11.0 |
|
75 | 76 | SQLAlchemy==1.1.15 |
|
76 | 77 | sshpubkeys==2.2.0 |
|
77 | 78 | subprocess32==3.2.7 |
|
78 | 79 | supervisor==3.3.4 |
|
79 | 80 | Tempita==0.5.2 |
|
80 | 81 | translationstring==1.3 |
|
81 | 82 | trollius==1.0.4 |
|
82 | 83 | urllib3==1.16 |
|
83 | 84 | URLObject==2.4.0 |
|
84 | 85 | venusian==1.1.0 |
|
85 | 86 | WebError==0.10.3 |
|
86 | 87 | WebHelpers2==2.0 |
|
87 | 88 | WebHelpers==1.3 |
|
88 | 89 | WebOb==1.7.4 |
|
89 | 90 | Whoosh==2.7.4 |
|
90 | 91 | wsgiref==0.1.2 |
|
91 | 92 | zope.cachedescriptors==4.3.1 |
|
92 | 93 | zope.deprecation==4.3.0 |
|
93 | 94 | zope.event==4.3.0 |
|
94 | 95 | zope.interface==4.4.3 |
|
95 | 96 | |
|
96 | 97 | |
|
97 | 98 | # IPYTHON RENDERING |
|
98 | 99 | # entrypoints backport, pypi version doesn't support egg installs |
|
99 | 100 | https://code.rhodecode.com/upstream/entrypoints/archive/96e6d645684e1af3d7df5b5272f3fe85a546b233.tar.gz?md5=7db37771aea9ac9fefe093e5d6987313#egg=entrypoints==0.2.2.rhodecode-upstream1 |
|
100 | 101 | nbconvert==5.3.1 |
|
101 | 102 | bleach==2.1.2 |
|
102 | 103 | nbformat==4.4.0 |
|
103 | 104 | jupyter_client==5.0.0 |
|
104 | 105 | |
|
105 | 106 | ## cli tools |
|
106 | 107 | alembic==0.9.8 |
|
107 | 108 | invoke==0.13.0 |
|
108 | 109 | bumpversion==0.5.3 |
|
109 | 110 | transifex-client==0.12.5 |
|
110 | 111 | |
|
111 | 112 | ## http servers |
|
112 | 113 | gevent==1.2.2 |
|
113 | 114 | greenlet==0.4.13 |
|
114 | 115 | gunicorn==19.7.1 |
|
115 | 116 | waitress==1.1.0 |
|
116 | 117 | uWSGI==2.0.15 |
|
117 | 118 | |
|
118 | 119 | ## debug |
|
119 | 120 | ipdb==0.10.3 |
|
120 | 121 | ipython==5.1.0 |
|
121 | 122 | CProfileV==1.0.7 |
|
122 | 123 | bottle==0.12.13 |
|
123 | 124 | |
|
124 | 125 | ## rhodecode-tools, special case |
|
125 | 126 | https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.14.1.tar.gz?md5=0b9c2caad160b68889f8172ea54af7b2#egg=rhodecode-tools==0.14.1 |
|
126 | 127 | |
|
127 | 128 | ## appenlight |
|
128 | 129 | appenlight-client==0.6.25 |
|
129 | 130 | |
|
130 | 131 | ## test related requirements |
|
131 | 132 | -r requirements_test.txt |
@@ -1,2084 +1,2090 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2018 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 | import os | |
|
28 | 29 | import random |
|
29 | 30 | import hashlib |
|
30 | 31 | import StringIO |
|
31 | 32 | import urllib |
|
32 | 33 | import math |
|
33 | 34 | import logging |
|
34 | 35 | import re |
|
35 | 36 | import urlparse |
|
36 | 37 | import time |
|
37 | 38 | import string |
|
38 | 39 | import hashlib |
|
39 | 40 | from collections import OrderedDict |
|
40 | 41 | |
|
41 | 42 | import pygments |
|
42 | 43 | import itertools |
|
43 | 44 | import fnmatch |
|
44 | 45 | |
|
45 | 46 | from datetime import datetime |
|
46 | 47 | from functools import partial |
|
47 | 48 | from pygments.formatters.html import HtmlFormatter |
|
48 | 49 | from pygments import highlight as code_highlight |
|
49 | 50 | from pygments.lexers import ( |
|
50 | 51 | get_lexer_by_name, get_lexer_for_filename, get_lexer_for_mimetype) |
|
51 | 52 | |
|
52 | 53 | from pyramid.threadlocal import get_current_request |
|
53 | 54 | |
|
54 | 55 | from webhelpers.html import literal, HTML, escape |
|
55 | 56 | from webhelpers.html.tools import * |
|
56 | 57 | from webhelpers.html.builder import make_tag |
|
57 | 58 | from webhelpers.html.tags import auto_discovery_link, checkbox, css_classes, \ |
|
58 | 59 | end_form, file, form as wh_form, hidden, image, javascript_link, link_to, \ |
|
59 | 60 | link_to_if, link_to_unless, ol, required_legend, select, stylesheet_link, \ |
|
60 | 61 | submit, text, password, textarea, title, ul, xml_declaration, radio |
|
61 | 62 | from webhelpers.html.tools import auto_link, button_to, highlight, \ |
|
62 | 63 | js_obfuscate, mail_to, strip_links, strip_tags, tag_re |
|
63 | 64 | from webhelpers.text import chop_at, collapse, convert_accented_entities, \ |
|
64 | 65 | convert_misc_entities, lchop, plural, rchop, remove_formatting, \ |
|
65 | 66 | replace_whitespace, urlify, truncate, wrap_paragraphs |
|
66 | 67 | from webhelpers.date import time_ago_in_words |
|
67 | 68 | from webhelpers.paginate import Page as _Page |
|
68 | 69 | from webhelpers.html.tags import _set_input_attrs, _set_id_attr, \ |
|
69 | 70 | convert_boolean_attrs, NotGiven, _make_safe_id_component |
|
70 | 71 | from webhelpers2.number import format_byte_size |
|
71 | 72 | |
|
72 | 73 | from rhodecode.lib.action_parser import action_parser |
|
73 | 74 | from rhodecode.lib.ext_json import json |
|
74 | 75 | from rhodecode.lib.utils import repo_name_slug, get_custom_lexer |
|
75 | 76 | from rhodecode.lib.utils2 import str2bool, safe_unicode, safe_str, \ |
|
76 | 77 | get_commit_safe, datetime_to_time, time_to_datetime, time_to_utcdatetime, \ |
|
77 | 78 | AttributeDict, safe_int, md5, md5_safe |
|
78 | 79 | from rhodecode.lib.markup_renderer import MarkupRenderer, relative_links |
|
79 | 80 | from rhodecode.lib.vcs.exceptions import CommitDoesNotExistError |
|
80 | 81 | from rhodecode.lib.vcs.backends.base import BaseChangeset, EmptyCommit |
|
81 | 82 | from rhodecode.config.conf import DATE_FORMAT, DATETIME_FORMAT |
|
82 | 83 | from rhodecode.model.changeset_status import ChangesetStatusModel |
|
83 | 84 | from rhodecode.model.db import Permission, User, Repository |
|
84 | 85 | from rhodecode.model.repo_group import RepoGroupModel |
|
85 | 86 | from rhodecode.model.settings import IssueTrackerSettingsModel |
|
86 | 87 | |
|
87 | 88 | log = logging.getLogger(__name__) |
|
88 | 89 | |
|
89 | 90 | |
|
90 | 91 | DEFAULT_USER = User.DEFAULT_USER |
|
91 | 92 | DEFAULT_USER_EMAIL = User.DEFAULT_USER_EMAIL |
|
92 | 93 | |
|
93 | 94 | |
|
94 | 95 | def asset(path, ver=None, **kwargs): |
|
95 | 96 | """ |
|
96 | 97 | Helper to generate a static asset file path for rhodecode assets |
|
97 | 98 | |
|
98 | 99 | eg. h.asset('images/image.png', ver='3923') |
|
99 | 100 | |
|
100 | 101 | :param path: path of asset |
|
101 | 102 | :param ver: optional version query param to append as ?ver= |
|
102 | 103 | """ |
|
103 | 104 | request = get_current_request() |
|
104 | 105 | query = {} |
|
105 | 106 | query.update(kwargs) |
|
106 | 107 | if ver: |
|
107 | 108 | query = {'ver': ver} |
|
108 | 109 | return request.static_path( |
|
109 | 110 | 'rhodecode:public/{}'.format(path), _query=query) |
|
110 | 111 | |
|
111 | 112 | |
|
112 | 113 | default_html_escape_table = { |
|
113 | 114 | ord('&'): u'&', |
|
114 | 115 | ord('<'): u'<', |
|
115 | 116 | ord('>'): u'>', |
|
116 | 117 | ord('"'): u'"', |
|
117 | 118 | ord("'"): u''', |
|
118 | 119 | } |
|
119 | 120 | |
|
120 | 121 | |
|
121 | 122 | def html_escape(text, html_escape_table=default_html_escape_table): |
|
122 | 123 | """Produce entities within text.""" |
|
123 | 124 | return text.translate(html_escape_table) |
|
124 | 125 | |
|
125 | 126 | |
|
126 | 127 | def chop_at_smart(s, sub, inclusive=False, suffix_if_chopped=None): |
|
127 | 128 | """ |
|
128 | 129 | Truncate string ``s`` at the first occurrence of ``sub``. |
|
129 | 130 | |
|
130 | 131 | If ``inclusive`` is true, truncate just after ``sub`` rather than at it. |
|
131 | 132 | """ |
|
132 | 133 | suffix_if_chopped = suffix_if_chopped or '' |
|
133 | 134 | pos = s.find(sub) |
|
134 | 135 | if pos == -1: |
|
135 | 136 | return s |
|
136 | 137 | |
|
137 | 138 | if inclusive: |
|
138 | 139 | pos += len(sub) |
|
139 | 140 | |
|
140 | 141 | chopped = s[:pos] |
|
141 | 142 | left = s[pos:].strip() |
|
142 | 143 | |
|
143 | 144 | if left and suffix_if_chopped: |
|
144 | 145 | chopped += suffix_if_chopped |
|
145 | 146 | |
|
146 | 147 | return chopped |
|
147 | 148 | |
|
148 | 149 | |
|
149 | 150 | def shorter(text, size=20): |
|
150 | 151 | postfix = '...' |
|
151 | 152 | if len(text) > size: |
|
152 | 153 | return text[:size - len(postfix)] + postfix |
|
153 | 154 | return text |
|
154 | 155 | |
|
155 | 156 | |
|
156 | 157 | def _reset(name, value=None, id=NotGiven, type="reset", **attrs): |
|
157 | 158 | """ |
|
158 | 159 | Reset button |
|
159 | 160 | """ |
|
160 | 161 | _set_input_attrs(attrs, type, name, value) |
|
161 | 162 | _set_id_attr(attrs, id, name) |
|
162 | 163 | convert_boolean_attrs(attrs, ["disabled"]) |
|
163 | 164 | return HTML.input(**attrs) |
|
164 | 165 | |
|
165 | 166 | reset = _reset |
|
166 | 167 | safeid = _make_safe_id_component |
|
167 | 168 | |
|
168 | 169 | |
|
169 | 170 | def branding(name, length=40): |
|
170 | 171 | return truncate(name, length, indicator="") |
|
171 | 172 | |
|
172 | 173 | |
|
173 | 174 | def FID(raw_id, path): |
|
174 | 175 | """ |
|
175 | 176 | Creates a unique ID for filenode based on it's hash of path and commit |
|
176 | 177 | it's safe to use in urls |
|
177 | 178 | |
|
178 | 179 | :param raw_id: |
|
179 | 180 | :param path: |
|
180 | 181 | """ |
|
181 | 182 | |
|
182 | 183 | return 'c-%s-%s' % (short_id(raw_id), md5_safe(path)[:12]) |
|
183 | 184 | |
|
184 | 185 | |
|
185 | 186 | class _GetError(object): |
|
186 | 187 | """Get error from form_errors, and represent it as span wrapped error |
|
187 | 188 | message |
|
188 | 189 | |
|
189 | 190 | :param field_name: field to fetch errors for |
|
190 | 191 | :param form_errors: form errors dict |
|
191 | 192 | """ |
|
192 | 193 | |
|
193 | 194 | def __call__(self, field_name, form_errors): |
|
194 | 195 | tmpl = """<span class="error_msg">%s</span>""" |
|
195 | 196 | if form_errors and field_name in form_errors: |
|
196 | 197 | return literal(tmpl % form_errors.get(field_name)) |
|
197 | 198 | |
|
198 | 199 | get_error = _GetError() |
|
199 | 200 | |
|
200 | 201 | |
|
201 | 202 | class _ToolTip(object): |
|
202 | 203 | |
|
203 | 204 | def __call__(self, tooltip_title, trim_at=50): |
|
204 | 205 | """ |
|
205 | 206 | Special function just to wrap our text into nice formatted |
|
206 | 207 | autowrapped text |
|
207 | 208 | |
|
208 | 209 | :param tooltip_title: |
|
209 | 210 | """ |
|
210 | 211 | tooltip_title = escape(tooltip_title) |
|
211 | 212 | tooltip_title = tooltip_title.replace('<', '<').replace('>', '>') |
|
212 | 213 | return tooltip_title |
|
213 | 214 | tooltip = _ToolTip() |
|
214 | 215 | |
|
215 | 216 | |
|
216 | 217 | def files_breadcrumbs(repo_name, commit_id, file_path): |
|
217 | 218 | if isinstance(file_path, str): |
|
218 | 219 | file_path = safe_unicode(file_path) |
|
219 | 220 | |
|
220 | 221 | # TODO: johbo: Is this always a url like path, or is this operating |
|
221 | 222 | # system dependent? |
|
222 | 223 | path_segments = file_path.split('/') |
|
223 | 224 | |
|
224 | 225 | repo_name_html = escape(repo_name) |
|
225 | 226 | if len(path_segments) == 1 and path_segments[0] == '': |
|
226 | 227 | url_segments = [repo_name_html] |
|
227 | 228 | else: |
|
228 | 229 | url_segments = [ |
|
229 | 230 | link_to( |
|
230 | 231 | repo_name_html, |
|
231 | 232 | route_path( |
|
232 | 233 | 'repo_files', |
|
233 | 234 | repo_name=repo_name, |
|
234 | 235 | commit_id=commit_id, |
|
235 | 236 | f_path=''), |
|
236 | 237 | class_='pjax-link')] |
|
237 | 238 | |
|
238 | 239 | last_cnt = len(path_segments) - 1 |
|
239 | 240 | for cnt, segment in enumerate(path_segments): |
|
240 | 241 | if not segment: |
|
241 | 242 | continue |
|
242 | 243 | segment_html = escape(segment) |
|
243 | 244 | |
|
244 | 245 | if cnt != last_cnt: |
|
245 | 246 | url_segments.append( |
|
246 | 247 | link_to( |
|
247 | 248 | segment_html, |
|
248 | 249 | route_path( |
|
249 | 250 | 'repo_files', |
|
250 | 251 | repo_name=repo_name, |
|
251 | 252 | commit_id=commit_id, |
|
252 | 253 | f_path='/'.join(path_segments[:cnt + 1])), |
|
253 | 254 | class_='pjax-link')) |
|
254 | 255 | else: |
|
255 | 256 | url_segments.append(segment_html) |
|
256 | 257 | |
|
257 | 258 | return literal('/'.join(url_segments)) |
|
258 | 259 | |
|
259 | 260 | |
|
260 | 261 | class CodeHtmlFormatter(HtmlFormatter): |
|
261 | 262 | """ |
|
262 | 263 | My code Html Formatter for source codes |
|
263 | 264 | """ |
|
264 | 265 | |
|
265 | 266 | def wrap(self, source, outfile): |
|
266 | 267 | return self._wrap_div(self._wrap_pre(self._wrap_code(source))) |
|
267 | 268 | |
|
268 | 269 | def _wrap_code(self, source): |
|
269 | 270 | for cnt, it in enumerate(source): |
|
270 | 271 | i, t = it |
|
271 | 272 | t = '<div id="L%s">%s</div>' % (cnt + 1, t) |
|
272 | 273 | yield i, t |
|
273 | 274 | |
|
274 | 275 | def _wrap_tablelinenos(self, inner): |
|
275 | 276 | dummyoutfile = StringIO.StringIO() |
|
276 | 277 | lncount = 0 |
|
277 | 278 | for t, line in inner: |
|
278 | 279 | if t: |
|
279 | 280 | lncount += 1 |
|
280 | 281 | dummyoutfile.write(line) |
|
281 | 282 | |
|
282 | 283 | fl = self.linenostart |
|
283 | 284 | mw = len(str(lncount + fl - 1)) |
|
284 | 285 | sp = self.linenospecial |
|
285 | 286 | st = self.linenostep |
|
286 | 287 | la = self.lineanchors |
|
287 | 288 | aln = self.anchorlinenos |
|
288 | 289 | nocls = self.noclasses |
|
289 | 290 | if sp: |
|
290 | 291 | lines = [] |
|
291 | 292 | |
|
292 | 293 | for i in range(fl, fl + lncount): |
|
293 | 294 | if i % st == 0: |
|
294 | 295 | if i % sp == 0: |
|
295 | 296 | if aln: |
|
296 | 297 | lines.append('<a href="#%s%d" class="special">%*d</a>' % |
|
297 | 298 | (la, i, mw, i)) |
|
298 | 299 | else: |
|
299 | 300 | lines.append('<span class="special">%*d</span>' % (mw, i)) |
|
300 | 301 | else: |
|
301 | 302 | if aln: |
|
302 | 303 | lines.append('<a href="#%s%d">%*d</a>' % (la, i, mw, i)) |
|
303 | 304 | else: |
|
304 | 305 | lines.append('%*d' % (mw, i)) |
|
305 | 306 | else: |
|
306 | 307 | lines.append('') |
|
307 | 308 | ls = '\n'.join(lines) |
|
308 | 309 | else: |
|
309 | 310 | lines = [] |
|
310 | 311 | for i in range(fl, fl + lncount): |
|
311 | 312 | if i % st == 0: |
|
312 | 313 | if aln: |
|
313 | 314 | lines.append('<a href="#%s%d">%*d</a>' % (la, i, mw, i)) |
|
314 | 315 | else: |
|
315 | 316 | lines.append('%*d' % (mw, i)) |
|
316 | 317 | else: |
|
317 | 318 | lines.append('') |
|
318 | 319 | ls = '\n'.join(lines) |
|
319 | 320 | |
|
320 | 321 | # in case you wonder about the seemingly redundant <div> here: since the |
|
321 | 322 | # content in the other cell also is wrapped in a div, some browsers in |
|
322 | 323 | # some configurations seem to mess up the formatting... |
|
323 | 324 | if nocls: |
|
324 | 325 | yield 0, ('<table class="%stable">' % self.cssclass + |
|
325 | 326 | '<tr><td><div class="linenodiv" ' |
|
326 | 327 | 'style="background-color: #f0f0f0; padding-right: 10px">' |
|
327 | 328 | '<pre style="line-height: 125%">' + |
|
328 | 329 | ls + '</pre></div></td><td id="hlcode" class="code">') |
|
329 | 330 | else: |
|
330 | 331 | yield 0, ('<table class="%stable">' % self.cssclass + |
|
331 | 332 | '<tr><td class="linenos"><div class="linenodiv"><pre>' + |
|
332 | 333 | ls + '</pre></div></td><td id="hlcode" class="code">') |
|
333 | 334 | yield 0, dummyoutfile.getvalue() |
|
334 | 335 | yield 0, '</td></tr></table>' |
|
335 | 336 | |
|
336 | 337 | |
|
337 | 338 | class SearchContentCodeHtmlFormatter(CodeHtmlFormatter): |
|
338 | 339 | def __init__(self, **kw): |
|
339 | 340 | # only show these line numbers if set |
|
340 | 341 | self.only_lines = kw.pop('only_line_numbers', []) |
|
341 | 342 | self.query_terms = kw.pop('query_terms', []) |
|
342 | 343 | self.max_lines = kw.pop('max_lines', 5) |
|
343 | 344 | self.line_context = kw.pop('line_context', 3) |
|
344 | 345 | self.url = kw.pop('url', None) |
|
345 | 346 | |
|
346 | 347 | super(CodeHtmlFormatter, self).__init__(**kw) |
|
347 | 348 | |
|
348 | 349 | def _wrap_code(self, source): |
|
349 | 350 | for cnt, it in enumerate(source): |
|
350 | 351 | i, t = it |
|
351 | 352 | t = '<pre>%s</pre>' % t |
|
352 | 353 | yield i, t |
|
353 | 354 | |
|
354 | 355 | def _wrap_tablelinenos(self, inner): |
|
355 | 356 | yield 0, '<table class="code-highlight %stable">' % self.cssclass |
|
356 | 357 | |
|
357 | 358 | last_shown_line_number = 0 |
|
358 | 359 | current_line_number = 1 |
|
359 | 360 | |
|
360 | 361 | for t, line in inner: |
|
361 | 362 | if not t: |
|
362 | 363 | yield t, line |
|
363 | 364 | continue |
|
364 | 365 | |
|
365 | 366 | if current_line_number in self.only_lines: |
|
366 | 367 | if last_shown_line_number + 1 != current_line_number: |
|
367 | 368 | yield 0, '<tr>' |
|
368 | 369 | yield 0, '<td class="line">...</td>' |
|
369 | 370 | yield 0, '<td id="hlcode" class="code"></td>' |
|
370 | 371 | yield 0, '</tr>' |
|
371 | 372 | |
|
372 | 373 | yield 0, '<tr>' |
|
373 | 374 | if self.url: |
|
374 | 375 | yield 0, '<td class="line"><a href="%s#L%i">%i</a></td>' % ( |
|
375 | 376 | self.url, current_line_number, current_line_number) |
|
376 | 377 | else: |
|
377 | 378 | yield 0, '<td class="line"><a href="">%i</a></td>' % ( |
|
378 | 379 | current_line_number) |
|
379 | 380 | yield 0, '<td id="hlcode" class="code">' + line + '</td>' |
|
380 | 381 | yield 0, '</tr>' |
|
381 | 382 | |
|
382 | 383 | last_shown_line_number = current_line_number |
|
383 | 384 | |
|
384 | 385 | current_line_number += 1 |
|
385 | 386 | |
|
386 | 387 | |
|
387 | 388 | yield 0, '</table>' |
|
388 | 389 | |
|
389 | 390 | |
|
390 | 391 | def extract_phrases(text_query): |
|
391 | 392 | """ |
|
392 | 393 | Extracts phrases from search term string making sure phrases |
|
393 | 394 | contained in double quotes are kept together - and discarding empty values |
|
394 | 395 | or fully whitespace values eg. |
|
395 | 396 | |
|
396 | 397 | 'some text "a phrase" more' => ['some', 'text', 'a phrase', 'more'] |
|
397 | 398 | |
|
398 | 399 | """ |
|
399 | 400 | |
|
400 | 401 | in_phrase = False |
|
401 | 402 | buf = '' |
|
402 | 403 | phrases = [] |
|
403 | 404 | for char in text_query: |
|
404 | 405 | if in_phrase: |
|
405 | 406 | if char == '"': # end phrase |
|
406 | 407 | phrases.append(buf) |
|
407 | 408 | buf = '' |
|
408 | 409 | in_phrase = False |
|
409 | 410 | continue |
|
410 | 411 | else: |
|
411 | 412 | buf += char |
|
412 | 413 | continue |
|
413 | 414 | else: |
|
414 | 415 | if char == '"': # start phrase |
|
415 | 416 | in_phrase = True |
|
416 | 417 | phrases.append(buf) |
|
417 | 418 | buf = '' |
|
418 | 419 | continue |
|
419 | 420 | elif char == ' ': |
|
420 | 421 | phrases.append(buf) |
|
421 | 422 | buf = '' |
|
422 | 423 | continue |
|
423 | 424 | else: |
|
424 | 425 | buf += char |
|
425 | 426 | |
|
426 | 427 | phrases.append(buf) |
|
427 | 428 | phrases = [phrase.strip() for phrase in phrases if phrase.strip()] |
|
428 | 429 | return phrases |
|
429 | 430 | |
|
430 | 431 | |
|
431 | 432 | def get_matching_offsets(text, phrases): |
|
432 | 433 | """ |
|
433 | 434 | Returns a list of string offsets in `text` that the list of `terms` match |
|
434 | 435 | |
|
435 | 436 | >>> get_matching_offsets('some text here', ['some', 'here']) |
|
436 | 437 | [(0, 4), (10, 14)] |
|
437 | 438 | |
|
438 | 439 | """ |
|
439 | 440 | offsets = [] |
|
440 | 441 | for phrase in phrases: |
|
441 | 442 | for match in re.finditer(phrase, text): |
|
442 | 443 | offsets.append((match.start(), match.end())) |
|
443 | 444 | |
|
444 | 445 | return offsets |
|
445 | 446 | |
|
446 | 447 | |
|
447 | 448 | def normalize_text_for_matching(x): |
|
448 | 449 | """ |
|
449 | 450 | Replaces all non alnum characters to spaces and lower cases the string, |
|
450 | 451 | useful for comparing two text strings without punctuation |
|
451 | 452 | """ |
|
452 | 453 | return re.sub(r'[^\w]', ' ', x.lower()) |
|
453 | 454 | |
|
454 | 455 | |
|
455 | 456 | def get_matching_line_offsets(lines, terms): |
|
456 | 457 | """ Return a set of `lines` indices (starting from 1) matching a |
|
457 | 458 | text search query, along with `context` lines above/below matching lines |
|
458 | 459 | |
|
459 | 460 | :param lines: list of strings representing lines |
|
460 | 461 | :param terms: search term string to match in lines eg. 'some text' |
|
461 | 462 | :param context: number of lines above/below a matching line to add to result |
|
462 | 463 | :param max_lines: cut off for lines of interest |
|
463 | 464 | eg. |
|
464 | 465 | |
|
465 | 466 | text = ''' |
|
466 | 467 | words words words |
|
467 | 468 | words words words |
|
468 | 469 | some text some |
|
469 | 470 | words words words |
|
470 | 471 | words words words |
|
471 | 472 | text here what |
|
472 | 473 | ''' |
|
473 | 474 | get_matching_line_offsets(text, 'text', context=1) |
|
474 | 475 | {3: [(5, 9)], 6: [(0, 4)]] |
|
475 | 476 | |
|
476 | 477 | """ |
|
477 | 478 | matching_lines = {} |
|
478 | 479 | phrases = [normalize_text_for_matching(phrase) |
|
479 | 480 | for phrase in extract_phrases(terms)] |
|
480 | 481 | |
|
481 | 482 | for line_index, line in enumerate(lines, start=1): |
|
482 | 483 | match_offsets = get_matching_offsets( |
|
483 | 484 | normalize_text_for_matching(line), phrases) |
|
484 | 485 | if match_offsets: |
|
485 | 486 | matching_lines[line_index] = match_offsets |
|
486 | 487 | |
|
487 | 488 | return matching_lines |
|
488 | 489 | |
|
489 | 490 | |
|
490 | 491 | def hsv_to_rgb(h, s, v): |
|
491 | 492 | """ Convert hsv color values to rgb """ |
|
492 | 493 | |
|
493 | 494 | if s == 0.0: |
|
494 | 495 | return v, v, v |
|
495 | 496 | i = int(h * 6.0) # XXX assume int() truncates! |
|
496 | 497 | f = (h * 6.0) - i |
|
497 | 498 | p = v * (1.0 - s) |
|
498 | 499 | q = v * (1.0 - s * f) |
|
499 | 500 | t = v * (1.0 - s * (1.0 - f)) |
|
500 | 501 | i = i % 6 |
|
501 | 502 | if i == 0: |
|
502 | 503 | return v, t, p |
|
503 | 504 | if i == 1: |
|
504 | 505 | return q, v, p |
|
505 | 506 | if i == 2: |
|
506 | 507 | return p, v, t |
|
507 | 508 | if i == 3: |
|
508 | 509 | return p, q, v |
|
509 | 510 | if i == 4: |
|
510 | 511 | return t, p, v |
|
511 | 512 | if i == 5: |
|
512 | 513 | return v, p, q |
|
513 | 514 | |
|
514 | 515 | |
|
515 | 516 | def unique_color_generator(n=10000, saturation=0.10, lightness=0.95): |
|
516 | 517 | """ |
|
517 | 518 | Generator for getting n of evenly distributed colors using |
|
518 | 519 | hsv color and golden ratio. It always return same order of colors |
|
519 | 520 | |
|
520 | 521 | :param n: number of colors to generate |
|
521 | 522 | :param saturation: saturation of returned colors |
|
522 | 523 | :param lightness: lightness of returned colors |
|
523 | 524 | :returns: RGB tuple |
|
524 | 525 | """ |
|
525 | 526 | |
|
526 | 527 | golden_ratio = 0.618033988749895 |
|
527 | 528 | h = 0.22717784590367374 |
|
528 | 529 | |
|
529 | 530 | for _ in xrange(n): |
|
530 | 531 | h += golden_ratio |
|
531 | 532 | h %= 1 |
|
532 | 533 | HSV_tuple = [h, saturation, lightness] |
|
533 | 534 | RGB_tuple = hsv_to_rgb(*HSV_tuple) |
|
534 | 535 | yield map(lambda x: str(int(x * 256)), RGB_tuple) |
|
535 | 536 | |
|
536 | 537 | |
|
537 | 538 | def color_hasher(n=10000, saturation=0.10, lightness=0.95): |
|
538 | 539 | """ |
|
539 | 540 | Returns a function which when called with an argument returns a unique |
|
540 | 541 | color for that argument, eg. |
|
541 | 542 | |
|
542 | 543 | :param n: number of colors to generate |
|
543 | 544 | :param saturation: saturation of returned colors |
|
544 | 545 | :param lightness: lightness of returned colors |
|
545 | 546 | :returns: css RGB string |
|
546 | 547 | |
|
547 | 548 | >>> color_hash = color_hasher() |
|
548 | 549 | >>> color_hash('hello') |
|
549 | 550 | 'rgb(34, 12, 59)' |
|
550 | 551 | >>> color_hash('hello') |
|
551 | 552 | 'rgb(34, 12, 59)' |
|
552 | 553 | >>> color_hash('other') |
|
553 | 554 | 'rgb(90, 224, 159)' |
|
554 | 555 | """ |
|
555 | 556 | |
|
556 | 557 | color_dict = {} |
|
557 | 558 | cgenerator = unique_color_generator( |
|
558 | 559 | saturation=saturation, lightness=lightness) |
|
559 | 560 | |
|
560 | 561 | def get_color_string(thing): |
|
561 | 562 | if thing in color_dict: |
|
562 | 563 | col = color_dict[thing] |
|
563 | 564 | else: |
|
564 | 565 | col = color_dict[thing] = cgenerator.next() |
|
565 | 566 | return "rgb(%s)" % (', '.join(col)) |
|
566 | 567 | |
|
567 | 568 | return get_color_string |
|
568 | 569 | |
|
569 | 570 | |
|
570 | 571 | def get_lexer_safe(mimetype=None, filepath=None): |
|
571 | 572 | """ |
|
572 | 573 | Tries to return a relevant pygments lexer using mimetype/filepath name, |
|
573 | 574 | defaulting to plain text if none could be found |
|
574 | 575 | """ |
|
575 | 576 | lexer = None |
|
576 | 577 | try: |
|
577 | 578 | if mimetype: |
|
578 | 579 | lexer = get_lexer_for_mimetype(mimetype) |
|
579 | 580 | if not lexer: |
|
580 | 581 | lexer = get_lexer_for_filename(filepath) |
|
581 | 582 | except pygments.util.ClassNotFound: |
|
582 | 583 | pass |
|
583 | 584 | |
|
584 | 585 | if not lexer: |
|
585 | 586 | lexer = get_lexer_by_name('text') |
|
586 | 587 | |
|
587 | 588 | return lexer |
|
588 | 589 | |
|
589 | 590 | |
|
590 | 591 | def get_lexer_for_filenode(filenode): |
|
591 | 592 | lexer = get_custom_lexer(filenode.extension) or filenode.lexer |
|
592 | 593 | return lexer |
|
593 | 594 | |
|
594 | 595 | |
|
595 | 596 | def pygmentize(filenode, **kwargs): |
|
596 | 597 | """ |
|
597 | 598 | pygmentize function using pygments |
|
598 | 599 | |
|
599 | 600 | :param filenode: |
|
600 | 601 | """ |
|
601 | 602 | lexer = get_lexer_for_filenode(filenode) |
|
602 | 603 | return literal(code_highlight(filenode.content, lexer, |
|
603 | 604 | CodeHtmlFormatter(**kwargs))) |
|
604 | 605 | |
|
605 | 606 | |
|
606 | 607 | def is_following_repo(repo_name, user_id): |
|
607 | 608 | from rhodecode.model.scm import ScmModel |
|
608 | 609 | return ScmModel().is_following_repo(repo_name, user_id) |
|
609 | 610 | |
|
610 | 611 | |
|
611 | 612 | class _Message(object): |
|
612 | 613 | """A message returned by ``Flash.pop_messages()``. |
|
613 | 614 | |
|
614 | 615 | Converting the message to a string returns the message text. Instances |
|
615 | 616 | also have the following attributes: |
|
616 | 617 | |
|
617 | 618 | * ``message``: the message text. |
|
618 | 619 | * ``category``: the category specified when the message was created. |
|
619 | 620 | """ |
|
620 | 621 | |
|
621 | 622 | def __init__(self, category, message): |
|
622 | 623 | self.category = category |
|
623 | 624 | self.message = message |
|
624 | 625 | |
|
625 | 626 | def __str__(self): |
|
626 | 627 | return self.message |
|
627 | 628 | |
|
628 | 629 | __unicode__ = __str__ |
|
629 | 630 | |
|
630 | 631 | def __html__(self): |
|
631 | 632 | return escape(safe_unicode(self.message)) |
|
632 | 633 | |
|
633 | 634 | |
|
634 | 635 | class Flash(object): |
|
635 | 636 | # List of allowed categories. If None, allow any category. |
|
636 | 637 | categories = ["warning", "notice", "error", "success"] |
|
637 | 638 | |
|
638 | 639 | # Default category if none is specified. |
|
639 | 640 | default_category = "notice" |
|
640 | 641 | |
|
641 | 642 | def __init__(self, session_key="flash", categories=None, |
|
642 | 643 | default_category=None): |
|
643 | 644 | """ |
|
644 | 645 | Instantiate a ``Flash`` object. |
|
645 | 646 | |
|
646 | 647 | ``session_key`` is the key to save the messages under in the user's |
|
647 | 648 | session. |
|
648 | 649 | |
|
649 | 650 | ``categories`` is an optional list which overrides the default list |
|
650 | 651 | of categories. |
|
651 | 652 | |
|
652 | 653 | ``default_category`` overrides the default category used for messages |
|
653 | 654 | when none is specified. |
|
654 | 655 | """ |
|
655 | 656 | self.session_key = session_key |
|
656 | 657 | if categories is not None: |
|
657 | 658 | self.categories = categories |
|
658 | 659 | if default_category is not None: |
|
659 | 660 | self.default_category = default_category |
|
660 | 661 | if self.categories and self.default_category not in self.categories: |
|
661 | 662 | raise ValueError( |
|
662 | 663 | "unrecognized default category %r" % (self.default_category,)) |
|
663 | 664 | |
|
664 | 665 | def pop_messages(self, session=None, request=None): |
|
665 | 666 | """ |
|
666 | 667 | Return all accumulated messages and delete them from the session. |
|
667 | 668 | |
|
668 | 669 | The return value is a list of ``Message`` objects. |
|
669 | 670 | """ |
|
670 | 671 | messages = [] |
|
671 | 672 | |
|
672 | 673 | if not session: |
|
673 | 674 | if not request: |
|
674 | 675 | request = get_current_request() |
|
675 | 676 | session = request.session |
|
676 | 677 | |
|
677 | 678 | # Pop the 'old' pylons flash messages. They are tuples of the form |
|
678 | 679 | # (category, message) |
|
679 | 680 | for cat, msg in session.pop(self.session_key, []): |
|
680 | 681 | messages.append(_Message(cat, msg)) |
|
681 | 682 | |
|
682 | 683 | # Pop the 'new' pyramid flash messages for each category as list |
|
683 | 684 | # of strings. |
|
684 | 685 | for cat in self.categories: |
|
685 | 686 | for msg in session.pop_flash(queue=cat): |
|
686 | 687 | messages.append(_Message(cat, msg)) |
|
687 | 688 | # Map messages from the default queue to the 'notice' category. |
|
688 | 689 | for msg in session.pop_flash(): |
|
689 | 690 | messages.append(_Message('notice', msg)) |
|
690 | 691 | |
|
691 | 692 | session.save() |
|
692 | 693 | return messages |
|
693 | 694 | |
|
694 | 695 | def json_alerts(self, session=None, request=None): |
|
695 | 696 | payloads = [] |
|
696 | 697 | messages = flash.pop_messages(session=session, request=request) |
|
697 | 698 | if messages: |
|
698 | 699 | for message in messages: |
|
699 | 700 | subdata = {} |
|
700 | 701 | if hasattr(message.message, 'rsplit'): |
|
701 | 702 | flash_data = message.message.rsplit('|DELIM|', 1) |
|
702 | 703 | org_message = flash_data[0] |
|
703 | 704 | if len(flash_data) > 1: |
|
704 | 705 | subdata = json.loads(flash_data[1]) |
|
705 | 706 | else: |
|
706 | 707 | org_message = message.message |
|
707 | 708 | payloads.append({ |
|
708 | 709 | 'message': { |
|
709 | 710 | 'message': u'{}'.format(org_message), |
|
710 | 711 | 'level': message.category, |
|
711 | 712 | 'force': True, |
|
712 | 713 | 'subdata': subdata |
|
713 | 714 | } |
|
714 | 715 | }) |
|
715 | 716 | return json.dumps(payloads) |
|
716 | 717 | |
|
717 | 718 | def __call__(self, message, category=None, ignore_duplicate=False, |
|
718 | 719 | session=None, request=None): |
|
719 | 720 | |
|
720 | 721 | if not session: |
|
721 | 722 | if not request: |
|
722 | 723 | request = get_current_request() |
|
723 | 724 | session = request.session |
|
724 | 725 | |
|
725 | 726 | session.flash( |
|
726 | 727 | message, queue=category, allow_duplicate=not ignore_duplicate) |
|
727 | 728 | |
|
728 | 729 | |
|
729 | 730 | flash = Flash() |
|
730 | 731 | |
|
731 | 732 | #============================================================================== |
|
732 | 733 | # SCM FILTERS available via h. |
|
733 | 734 | #============================================================================== |
|
734 | 735 | from rhodecode.lib.vcs.utils import author_name, author_email |
|
735 | 736 | from rhodecode.lib.utils2 import credentials_filter, age as _age |
|
736 | 737 | from rhodecode.model.db import User, ChangesetStatus |
|
737 | 738 | |
|
738 | 739 | age = _age |
|
739 | 740 | capitalize = lambda x: x.capitalize() |
|
740 | 741 | email = author_email |
|
741 | 742 | short_id = lambda x: x[:12] |
|
742 | 743 | hide_credentials = lambda x: ''.join(credentials_filter(x)) |
|
743 | 744 | |
|
744 | 745 | |
|
746 | import pytz | |
|
747 | import tzlocal | |
|
748 | local_timezone = tzlocal.get_localzone() | |
|
749 | ||
|
750 | ||
|
745 | 751 | def age_component(datetime_iso, value=None, time_is_local=False): |
|
746 | 752 | title = value or format_date(datetime_iso) |
|
747 | 753 | tzinfo = '+00:00' |
|
748 | 754 | |
|
749 | 755 | # detect if we have a timezone info, otherwise, add it |
|
750 | if isinstance(datetime_iso, datetime) and not datetime_iso.tzinfo: | |
|
751 | if time_is_local: | |
|
752 | tzinfo = time.strftime("+%H:%M", | |
|
753 | time.gmtime( | |
|
754 | (datetime.now() - datetime.utcnow()).seconds + 1 | |
|
755 | ) | |
|
756 | ) | |
|
756 | if time_is_local and isinstance(datetime_iso, datetime) and not datetime_iso.tzinfo: | |
|
757 | force_timezone = os.environ.get('RC_TIMEZONE', '') | |
|
758 | if force_timezone: | |
|
759 | force_timezone = pytz.timezone(force_timezone) | |
|
760 | timezone = force_timezone or local_timezone | |
|
761 | offset = timezone.localize(datetime_iso).strftime('%z') | |
|
762 | tzinfo = '{}:{}'.format(offset[:-2], offset[-2:]) | |
|
757 | 763 | |
|
758 | 764 | return literal( |
|
759 | 765 | '<time class="timeago tooltip" ' |
|
760 | 766 | 'title="{1}{2}" datetime="{0}{2}">{1}</time>'.format( |
|
761 | 767 | datetime_iso, title, tzinfo)) |
|
762 | 768 | |
|
763 | 769 | |
|
764 | 770 | def _shorten_commit_id(commit_id): |
|
765 | 771 | from rhodecode import CONFIG |
|
766 | 772 | def_len = safe_int(CONFIG.get('rhodecode_show_sha_length', 12)) |
|
767 | 773 | return commit_id[:def_len] |
|
768 | 774 | |
|
769 | 775 | |
|
770 | 776 | def show_id(commit): |
|
771 | 777 | """ |
|
772 | 778 | Configurable function that shows ID |
|
773 | 779 | by default it's r123:fffeeefffeee |
|
774 | 780 | |
|
775 | 781 | :param commit: commit instance |
|
776 | 782 | """ |
|
777 | 783 | from rhodecode import CONFIG |
|
778 | 784 | show_idx = str2bool(CONFIG.get('rhodecode_show_revision_number', True)) |
|
779 | 785 | |
|
780 | 786 | raw_id = _shorten_commit_id(commit.raw_id) |
|
781 | 787 | if show_idx: |
|
782 | 788 | return 'r%s:%s' % (commit.idx, raw_id) |
|
783 | 789 | else: |
|
784 | 790 | return '%s' % (raw_id, ) |
|
785 | 791 | |
|
786 | 792 | |
|
787 | 793 | def format_date(date): |
|
788 | 794 | """ |
|
789 | 795 | use a standardized formatting for dates used in RhodeCode |
|
790 | 796 | |
|
791 | 797 | :param date: date/datetime object |
|
792 | 798 | :return: formatted date |
|
793 | 799 | """ |
|
794 | 800 | |
|
795 | 801 | if date: |
|
796 | 802 | _fmt = "%a, %d %b %Y %H:%M:%S" |
|
797 | 803 | return safe_unicode(date.strftime(_fmt)) |
|
798 | 804 | |
|
799 | 805 | return u"" |
|
800 | 806 | |
|
801 | 807 | |
|
802 | 808 | class _RepoChecker(object): |
|
803 | 809 | |
|
804 | 810 | def __init__(self, backend_alias): |
|
805 | 811 | self._backend_alias = backend_alias |
|
806 | 812 | |
|
807 | 813 | def __call__(self, repository): |
|
808 | 814 | if hasattr(repository, 'alias'): |
|
809 | 815 | _type = repository.alias |
|
810 | 816 | elif hasattr(repository, 'repo_type'): |
|
811 | 817 | _type = repository.repo_type |
|
812 | 818 | else: |
|
813 | 819 | _type = repository |
|
814 | 820 | return _type == self._backend_alias |
|
815 | 821 | |
|
816 | 822 | is_git = _RepoChecker('git') |
|
817 | 823 | is_hg = _RepoChecker('hg') |
|
818 | 824 | is_svn = _RepoChecker('svn') |
|
819 | 825 | |
|
820 | 826 | |
|
821 | 827 | def get_repo_type_by_name(repo_name): |
|
822 | 828 | repo = Repository.get_by_repo_name(repo_name) |
|
823 | 829 | return repo.repo_type |
|
824 | 830 | |
|
825 | 831 | |
|
826 | 832 | def is_svn_without_proxy(repository): |
|
827 | 833 | if is_svn(repository): |
|
828 | 834 | from rhodecode.model.settings import VcsSettingsModel |
|
829 | 835 | conf = VcsSettingsModel().get_ui_settings_as_config_obj() |
|
830 | 836 | return not str2bool(conf.get('vcs_svn_proxy', 'http_requests_enabled')) |
|
831 | 837 | return False |
|
832 | 838 | |
|
833 | 839 | |
|
834 | 840 | def discover_user(author): |
|
835 | 841 | """ |
|
836 | 842 | Tries to discover RhodeCode User based on the autho string. Author string |
|
837 | 843 | is typically `FirstName LastName <email@address.com>` |
|
838 | 844 | """ |
|
839 | 845 | |
|
840 | 846 | # if author is already an instance use it for extraction |
|
841 | 847 | if isinstance(author, User): |
|
842 | 848 | return author |
|
843 | 849 | |
|
844 | 850 | # Valid email in the attribute passed, see if they're in the system |
|
845 | 851 | _email = author_email(author) |
|
846 | 852 | if _email != '': |
|
847 | 853 | user = User.get_by_email(_email, case_insensitive=True, cache=True) |
|
848 | 854 | if user is not None: |
|
849 | 855 | return user |
|
850 | 856 | |
|
851 | 857 | # Maybe it's a username, we try to extract it and fetch by username ? |
|
852 | 858 | _author = author_name(author) |
|
853 | 859 | user = User.get_by_username(_author, case_insensitive=True, cache=True) |
|
854 | 860 | if user is not None: |
|
855 | 861 | return user |
|
856 | 862 | |
|
857 | 863 | return None |
|
858 | 864 | |
|
859 | 865 | |
|
860 | 866 | def email_or_none(author): |
|
861 | 867 | # extract email from the commit string |
|
862 | 868 | _email = author_email(author) |
|
863 | 869 | |
|
864 | 870 | # If we have an email, use it, otherwise |
|
865 | 871 | # see if it contains a username we can get an email from |
|
866 | 872 | if _email != '': |
|
867 | 873 | return _email |
|
868 | 874 | else: |
|
869 | 875 | user = User.get_by_username( |
|
870 | 876 | author_name(author), case_insensitive=True, cache=True) |
|
871 | 877 | |
|
872 | 878 | if user is not None: |
|
873 | 879 | return user.email |
|
874 | 880 | |
|
875 | 881 | # No valid email, not a valid user in the system, none! |
|
876 | 882 | return None |
|
877 | 883 | |
|
878 | 884 | |
|
879 | 885 | def link_to_user(author, length=0, **kwargs): |
|
880 | 886 | user = discover_user(author) |
|
881 | 887 | # user can be None, but if we have it already it means we can re-use it |
|
882 | 888 | # in the person() function, so we save 1 intensive-query |
|
883 | 889 | if user: |
|
884 | 890 | author = user |
|
885 | 891 | |
|
886 | 892 | display_person = person(author, 'username_or_name_or_email') |
|
887 | 893 | if length: |
|
888 | 894 | display_person = shorter(display_person, length) |
|
889 | 895 | |
|
890 | 896 | if user: |
|
891 | 897 | return link_to( |
|
892 | 898 | escape(display_person), |
|
893 | 899 | route_path('user_profile', username=user.username), |
|
894 | 900 | **kwargs) |
|
895 | 901 | else: |
|
896 | 902 | return escape(display_person) |
|
897 | 903 | |
|
898 | 904 | |
|
899 | 905 | def link_to_group(users_group_name, **kwargs): |
|
900 | 906 | return link_to( |
|
901 | 907 | escape(users_group_name), |
|
902 | 908 | route_path('user_group_profile', user_group_name=users_group_name), |
|
903 | 909 | **kwargs) |
|
904 | 910 | |
|
905 | 911 | |
|
906 | 912 | def person(author, show_attr="username_and_name"): |
|
907 | 913 | user = discover_user(author) |
|
908 | 914 | if user: |
|
909 | 915 | return getattr(user, show_attr) |
|
910 | 916 | else: |
|
911 | 917 | _author = author_name(author) |
|
912 | 918 | _email = email(author) |
|
913 | 919 | return _author or _email |
|
914 | 920 | |
|
915 | 921 | |
|
916 | 922 | def author_string(email): |
|
917 | 923 | if email: |
|
918 | 924 | user = User.get_by_email(email, case_insensitive=True, cache=True) |
|
919 | 925 | if user: |
|
920 | 926 | if user.first_name or user.last_name: |
|
921 | 927 | return '%s %s <%s>' % ( |
|
922 | 928 | user.first_name, user.last_name, email) |
|
923 | 929 | else: |
|
924 | 930 | return email |
|
925 | 931 | else: |
|
926 | 932 | return email |
|
927 | 933 | else: |
|
928 | 934 | return None |
|
929 | 935 | |
|
930 | 936 | |
|
931 | 937 | def person_by_id(id_, show_attr="username_and_name"): |
|
932 | 938 | # attr to return from fetched user |
|
933 | 939 | person_getter = lambda usr: getattr(usr, show_attr) |
|
934 | 940 | |
|
935 | 941 | #maybe it's an ID ? |
|
936 | 942 | if str(id_).isdigit() or isinstance(id_, int): |
|
937 | 943 | id_ = int(id_) |
|
938 | 944 | user = User.get(id_) |
|
939 | 945 | if user is not None: |
|
940 | 946 | return person_getter(user) |
|
941 | 947 | return id_ |
|
942 | 948 | |
|
943 | 949 | |
|
944 | 950 | def gravatar_with_user(request, author, show_disabled=False): |
|
945 | 951 | _render = request.get_partial_renderer( |
|
946 | 952 | 'rhodecode:templates/base/base.mako') |
|
947 | 953 | return _render('gravatar_with_user', author, show_disabled=show_disabled) |
|
948 | 954 | |
|
949 | 955 | |
|
950 | 956 | tags_paterns = OrderedDict(( |
|
951 | 957 | ('lang', (re.compile(r'\[(lang|language)\ \=\>\ *([a-zA-Z\-\/\#\+\.]*)\]'), |
|
952 | 958 | '<div class="metatag" tag="lang">\\2</div>')), |
|
953 | 959 | |
|
954 | 960 | ('see', (re.compile(r'\[see\ \=\>\ *([a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\]'), |
|
955 | 961 | '<div class="metatag" tag="see">see: \\1 </div>')), |
|
956 | 962 | |
|
957 | 963 | ('url', (re.compile(r'\[url\ \=\>\ \[([a-zA-Z0-9\ \.\-\_]+)\]\((http://|https://|/)(.*?)\)\]'), |
|
958 | 964 | '<div class="metatag" tag="url"> <a href="\\2\\3">\\1</a> </div>')), |
|
959 | 965 | |
|
960 | 966 | ('license', (re.compile(r'\[license\ \=\>\ *([a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\]'), |
|
961 | 967 | '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/\\1">\\1</a></div>')), |
|
962 | 968 | |
|
963 | 969 | ('ref', (re.compile(r'\[(requires|recommends|conflicts|base)\ \=\>\ *([a-zA-Z0-9\-\/]*)\]'), |
|
964 | 970 | '<div class="metatag" tag="ref \\1">\\1: <a href="/\\2">\\2</a></div>')), |
|
965 | 971 | |
|
966 | 972 | ('state', (re.compile(r'\[(stable|featured|stale|dead|dev|deprecated)\]'), |
|
967 | 973 | '<div class="metatag" tag="state \\1">\\1</div>')), |
|
968 | 974 | |
|
969 | 975 | # label in grey |
|
970 | 976 | ('label', (re.compile(r'\[([a-z]+)\]'), |
|
971 | 977 | '<div class="metatag" tag="label">\\1</div>')), |
|
972 | 978 | |
|
973 | 979 | # generic catch all in grey |
|
974 | 980 | ('generic', (re.compile(r'\[([a-zA-Z0-9\.\-\_]+)\]'), |
|
975 | 981 | '<div class="metatag" tag="generic">\\1</div>')), |
|
976 | 982 | )) |
|
977 | 983 | |
|
978 | 984 | |
|
979 | 985 | def extract_metatags(value): |
|
980 | 986 | """ |
|
981 | 987 | Extract supported meta-tags from given text value |
|
982 | 988 | """ |
|
983 | 989 | tags = [] |
|
984 | 990 | if not value: |
|
985 | 991 | return tags, '' |
|
986 | 992 | |
|
987 | 993 | for key, val in tags_paterns.items(): |
|
988 | 994 | pat, replace_html = val |
|
989 | 995 | tags.extend([(key, x.group()) for x in pat.finditer(value)]) |
|
990 | 996 | value = pat.sub('', value) |
|
991 | 997 | |
|
992 | 998 | return tags, value |
|
993 | 999 | |
|
994 | 1000 | |
|
995 | 1001 | def style_metatag(tag_type, value): |
|
996 | 1002 | """ |
|
997 | 1003 | converts tags from value into html equivalent |
|
998 | 1004 | """ |
|
999 | 1005 | if not value: |
|
1000 | 1006 | return '' |
|
1001 | 1007 | |
|
1002 | 1008 | html_value = value |
|
1003 | 1009 | tag_data = tags_paterns.get(tag_type) |
|
1004 | 1010 | if tag_data: |
|
1005 | 1011 | pat, replace_html = tag_data |
|
1006 | 1012 | # convert to plain `unicode` instead of a markup tag to be used in |
|
1007 | 1013 | # regex expressions. safe_unicode doesn't work here |
|
1008 | 1014 | html_value = pat.sub(replace_html, unicode(value)) |
|
1009 | 1015 | |
|
1010 | 1016 | return html_value |
|
1011 | 1017 | |
|
1012 | 1018 | |
|
1013 | 1019 | def bool2icon(value): |
|
1014 | 1020 | """ |
|
1015 | 1021 | Returns boolean value of a given value, represented as html element with |
|
1016 | 1022 | classes that will represent icons |
|
1017 | 1023 | |
|
1018 | 1024 | :param value: given value to convert to html node |
|
1019 | 1025 | """ |
|
1020 | 1026 | |
|
1021 | 1027 | if value: # does bool conversion |
|
1022 | 1028 | return HTML.tag('i', class_="icon-true") |
|
1023 | 1029 | else: # not true as bool |
|
1024 | 1030 | return HTML.tag('i', class_="icon-false") |
|
1025 | 1031 | |
|
1026 | 1032 | |
|
1027 | 1033 | #============================================================================== |
|
1028 | 1034 | # PERMS |
|
1029 | 1035 | #============================================================================== |
|
1030 | 1036 | from rhodecode.lib.auth import HasPermissionAny, HasPermissionAll, \ |
|
1031 | 1037 | HasRepoPermissionAny, HasRepoPermissionAll, HasRepoGroupPermissionAll, \ |
|
1032 | 1038 | HasRepoGroupPermissionAny, HasRepoPermissionAnyApi, get_csrf_token, \ |
|
1033 | 1039 | csrf_token_key |
|
1034 | 1040 | |
|
1035 | 1041 | |
|
1036 | 1042 | #============================================================================== |
|
1037 | 1043 | # GRAVATAR URL |
|
1038 | 1044 | #============================================================================== |
|
1039 | 1045 | class InitialsGravatar(object): |
|
1040 | 1046 | def __init__(self, email_address, first_name, last_name, size=30, |
|
1041 | 1047 | background=None, text_color='#fff'): |
|
1042 | 1048 | self.size = size |
|
1043 | 1049 | self.first_name = first_name |
|
1044 | 1050 | self.last_name = last_name |
|
1045 | 1051 | self.email_address = email_address |
|
1046 | 1052 | self.background = background or self.str2color(email_address) |
|
1047 | 1053 | self.text_color = text_color |
|
1048 | 1054 | |
|
1049 | 1055 | def get_color_bank(self): |
|
1050 | 1056 | """ |
|
1051 | 1057 | returns a predefined list of colors that gravatars can use. |
|
1052 | 1058 | Those are randomized distinct colors that guarantee readability and |
|
1053 | 1059 | uniqueness. |
|
1054 | 1060 | |
|
1055 | 1061 | generated with: http://phrogz.net/css/distinct-colors.html |
|
1056 | 1062 | """ |
|
1057 | 1063 | return [ |
|
1058 | 1064 | '#bf3030', '#a67f53', '#00ff00', '#5989b3', '#392040', '#d90000', |
|
1059 | 1065 | '#402910', '#204020', '#79baf2', '#a700b3', '#bf6060', '#7f5320', |
|
1060 | 1066 | '#008000', '#003059', '#ee00ff', '#ff0000', '#8c4b00', '#007300', |
|
1061 | 1067 | '#005fb3', '#de73e6', '#ff4040', '#ffaa00', '#3df255', '#203140', |
|
1062 | 1068 | '#47004d', '#591616', '#664400', '#59b365', '#0d2133', '#83008c', |
|
1063 | 1069 | '#592d2d', '#bf9f60', '#73e682', '#1d3f73', '#73006b', '#402020', |
|
1064 | 1070 | '#b2862d', '#397341', '#597db3', '#e600d6', '#a60000', '#736039', |
|
1065 | 1071 | '#00b318', '#79aaf2', '#330d30', '#ff8080', '#403010', '#16591f', |
|
1066 | 1072 | '#002459', '#8c4688', '#e50000', '#ffbf40', '#00732e', '#102340', |
|
1067 | 1073 | '#bf60ac', '#8c4646', '#cc8800', '#00a642', '#1d3473', '#b32d98', |
|
1068 | 1074 | '#660e00', '#ffd580', '#80ffb2', '#7391e6', '#733967', '#d97b6c', |
|
1069 | 1075 | '#8c5e00', '#59b389', '#3967e6', '#590047', '#73281d', '#665200', |
|
1070 | 1076 | '#00e67a', '#2d50b3', '#8c2377', '#734139', '#b2982d', '#16593a', |
|
1071 | 1077 | '#001859', '#ff00aa', '#a65e53', '#ffcc00', '#0d3321', '#2d3959', |
|
1072 | 1078 | '#731d56', '#401610', '#4c3d00', '#468c6c', '#002ca6', '#d936a3', |
|
1073 | 1079 | '#d94c36', '#403920', '#36d9a3', '#0d1733', '#592d4a', '#993626', |
|
1074 | 1080 | '#cca300', '#00734d', '#46598c', '#8c005e', '#7f1100', '#8c7000', |
|
1075 | 1081 | '#00a66f', '#7382e6', '#b32d74', '#d9896c', '#ffe680', '#1d7362', |
|
1076 | 1082 | '#364cd9', '#73003d', '#d93a00', '#998a4d', '#59b3a1', '#5965b3', |
|
1077 | 1083 | '#e5007a', '#73341d', '#665f00', '#00b38f', '#0018b3', '#59163a', |
|
1078 | 1084 | '#b2502d', '#bfb960', '#00ffcc', '#23318c', '#a6537f', '#734939', |
|
1079 | 1085 | '#b2a700', '#104036', '#3d3df2', '#402031', '#e56739', '#736f39', |
|
1080 | 1086 | '#79f2ea', '#000059', '#401029', '#4c1400', '#ffee00', '#005953', |
|
1081 | 1087 | '#101040', '#990052', '#402820', '#403d10', '#00ffee', '#0000d9', |
|
1082 | 1088 | '#ff80c4', '#a66953', '#eeff00', '#00ccbe', '#8080ff', '#e673a1', |
|
1083 | 1089 | '#a62c00', '#474d00', '#1a3331', '#46468c', '#733950', '#662900', |
|
1084 | 1090 | '#858c23', '#238c85', '#0f0073', '#b20047', '#d9986c', '#becc00', |
|
1085 | 1091 | '#396f73', '#281d73', '#ff0066', '#ff6600', '#dee673', '#59adb3', |
|
1086 | 1092 | '#6559b3', '#590024', '#b2622d', '#98b32d', '#36ced9', '#332d59', |
|
1087 | 1093 | '#40001a', '#733f1d', '#526600', '#005359', '#242040', '#bf6079', |
|
1088 | 1094 | '#735039', '#cef23d', '#007780', '#5630bf', '#66001b', '#b24700', |
|
1089 | 1095 | '#acbf60', '#1d6273', '#25008c', '#731d34', '#a67453', '#50592d', |
|
1090 | 1096 | '#00ccff', '#6600ff', '#ff0044', '#4c1f00', '#8a994d', '#79daf2', |
|
1091 | 1097 | '#a173e6', '#d93662', '#402310', '#aaff00', '#2d98b3', '#8c40ff', |
|
1092 | 1098 | '#592d39', '#ff8c40', '#354020', '#103640', '#1a0040', '#331a20', |
|
1093 | 1099 | '#331400', '#334d00', '#1d5673', '#583973', '#7f0022', '#4c3626', |
|
1094 | 1100 | '#88cc00', '#36a3d9', '#3d0073', '#d9364c', '#33241a', '#698c23', |
|
1095 | 1101 | '#5995b3', '#300059', '#e57382', '#7f3300', '#366600', '#00aaff', |
|
1096 | 1102 | '#3a1659', '#733941', '#663600', '#74b32d', '#003c59', '#7f53a6', |
|
1097 | 1103 | '#73000f', '#ff8800', '#baf279', '#79caf2', '#291040', '#a6293a', |
|
1098 | 1104 | '#b2742d', '#587339', '#0077b3', '#632699', '#400009', '#d9a66c', |
|
1099 | 1105 | '#294010', '#2d4a59', '#aa00ff', '#4c131b', '#b25f00', '#5ce600', |
|
1100 | 1106 | '#267399', '#a336d9', '#990014', '#664e33', '#86bf60', '#0088ff', |
|
1101 | 1107 | '#7700b3', '#593a16', '#073300', '#1d4b73', '#ac60bf', '#e59539', |
|
1102 | 1108 | '#4f8c46', '#368dd9', '#5c0073' |
|
1103 | 1109 | ] |
|
1104 | 1110 | |
|
1105 | 1111 | def rgb_to_hex_color(self, rgb_tuple): |
|
1106 | 1112 | """ |
|
1107 | 1113 | Converts an rgb_tuple passed to an hex color. |
|
1108 | 1114 | |
|
1109 | 1115 | :param rgb_tuple: tuple with 3 ints represents rgb color space |
|
1110 | 1116 | """ |
|
1111 | 1117 | return '#' + ("".join(map(chr, rgb_tuple)).encode('hex')) |
|
1112 | 1118 | |
|
1113 | 1119 | def email_to_int_list(self, email_str): |
|
1114 | 1120 | """ |
|
1115 | 1121 | Get every byte of the hex digest value of email and turn it to integer. |
|
1116 | 1122 | It's going to be always between 0-255 |
|
1117 | 1123 | """ |
|
1118 | 1124 | digest = md5_safe(email_str.lower()) |
|
1119 | 1125 | return [int(digest[i * 2:i * 2 + 2], 16) for i in range(16)] |
|
1120 | 1126 | |
|
1121 | 1127 | def pick_color_bank_index(self, email_str, color_bank): |
|
1122 | 1128 | return self.email_to_int_list(email_str)[0] % len(color_bank) |
|
1123 | 1129 | |
|
1124 | 1130 | def str2color(self, email_str): |
|
1125 | 1131 | """ |
|
1126 | 1132 | Tries to map in a stable algorithm an email to color |
|
1127 | 1133 | |
|
1128 | 1134 | :param email_str: |
|
1129 | 1135 | """ |
|
1130 | 1136 | color_bank = self.get_color_bank() |
|
1131 | 1137 | # pick position (module it's length so we always find it in the |
|
1132 | 1138 | # bank even if it's smaller than 256 values |
|
1133 | 1139 | pos = self.pick_color_bank_index(email_str, color_bank) |
|
1134 | 1140 | return color_bank[pos] |
|
1135 | 1141 | |
|
1136 | 1142 | def normalize_email(self, email_address): |
|
1137 | 1143 | import unicodedata |
|
1138 | 1144 | # default host used to fill in the fake/missing email |
|
1139 | 1145 | default_host = u'localhost' |
|
1140 | 1146 | |
|
1141 | 1147 | if not email_address: |
|
1142 | 1148 | email_address = u'%s@%s' % (User.DEFAULT_USER, default_host) |
|
1143 | 1149 | |
|
1144 | 1150 | email_address = safe_unicode(email_address) |
|
1145 | 1151 | |
|
1146 | 1152 | if u'@' not in email_address: |
|
1147 | 1153 | email_address = u'%s@%s' % (email_address, default_host) |
|
1148 | 1154 | |
|
1149 | 1155 | if email_address.endswith(u'@'): |
|
1150 | 1156 | email_address = u'%s%s' % (email_address, default_host) |
|
1151 | 1157 | |
|
1152 | 1158 | email_address = unicodedata.normalize('NFKD', email_address)\ |
|
1153 | 1159 | .encode('ascii', 'ignore') |
|
1154 | 1160 | return email_address |
|
1155 | 1161 | |
|
1156 | 1162 | def get_initials(self): |
|
1157 | 1163 | """ |
|
1158 | 1164 | Returns 2 letter initials calculated based on the input. |
|
1159 | 1165 | The algorithm picks first given email address, and takes first letter |
|
1160 | 1166 | of part before @, and then the first letter of server name. In case |
|
1161 | 1167 | the part before @ is in a format of `somestring.somestring2` it replaces |
|
1162 | 1168 | the server letter with first letter of somestring2 |
|
1163 | 1169 | |
|
1164 | 1170 | In case function was initialized with both first and lastname, this |
|
1165 | 1171 | overrides the extraction from email by first letter of the first and |
|
1166 | 1172 | last name. We add special logic to that functionality, In case Full name |
|
1167 | 1173 | is compound, like Guido Von Rossum, we use last part of the last name |
|
1168 | 1174 | (Von Rossum) picking `R`. |
|
1169 | 1175 | |
|
1170 | 1176 | Function also normalizes the non-ascii characters to they ascii |
|
1171 | 1177 | representation, eg Δ => A |
|
1172 | 1178 | """ |
|
1173 | 1179 | import unicodedata |
|
1174 | 1180 | # replace non-ascii to ascii |
|
1175 | 1181 | first_name = unicodedata.normalize( |
|
1176 | 1182 | 'NFKD', safe_unicode(self.first_name)).encode('ascii', 'ignore') |
|
1177 | 1183 | last_name = unicodedata.normalize( |
|
1178 | 1184 | 'NFKD', safe_unicode(self.last_name)).encode('ascii', 'ignore') |
|
1179 | 1185 | |
|
1180 | 1186 | # do NFKD encoding, and also make sure email has proper format |
|
1181 | 1187 | email_address = self.normalize_email(self.email_address) |
|
1182 | 1188 | |
|
1183 | 1189 | # first push the email initials |
|
1184 | 1190 | prefix, server = email_address.split('@', 1) |
|
1185 | 1191 | |
|
1186 | 1192 | # check if prefix is maybe a 'first_name.last_name' syntax |
|
1187 | 1193 | _dot_split = prefix.rsplit('.', 1) |
|
1188 | 1194 | if len(_dot_split) == 2 and _dot_split[1]: |
|
1189 | 1195 | initials = [_dot_split[0][0], _dot_split[1][0]] |
|
1190 | 1196 | else: |
|
1191 | 1197 | initials = [prefix[0], server[0]] |
|
1192 | 1198 | |
|
1193 | 1199 | # then try to replace either first_name or last_name |
|
1194 | 1200 | fn_letter = (first_name or " ")[0].strip() |
|
1195 | 1201 | ln_letter = (last_name.split(' ', 1)[-1] or " ")[0].strip() |
|
1196 | 1202 | |
|
1197 | 1203 | if fn_letter: |
|
1198 | 1204 | initials[0] = fn_letter |
|
1199 | 1205 | |
|
1200 | 1206 | if ln_letter: |
|
1201 | 1207 | initials[1] = ln_letter |
|
1202 | 1208 | |
|
1203 | 1209 | return ''.join(initials).upper() |
|
1204 | 1210 | |
|
1205 | 1211 | def get_img_data_by_type(self, font_family, img_type): |
|
1206 | 1212 | default_user = """ |
|
1207 | 1213 | <svg xmlns="http://www.w3.org/2000/svg" |
|
1208 | 1214 | version="1.1" x="0px" y="0px" width="{size}" height="{size}" |
|
1209 | 1215 | viewBox="-15 -10 439.165 429.164" |
|
1210 | 1216 | |
|
1211 | 1217 | xml:space="preserve" |
|
1212 | 1218 | style="background:{background};" > |
|
1213 | 1219 | |
|
1214 | 1220 | <path d="M204.583,216.671c50.664,0,91.74-48.075, |
|
1215 | 1221 | 91.74-107.378c0-82.237-41.074-107.377-91.74-107.377 |
|
1216 | 1222 | c-50.668,0-91.74,25.14-91.74,107.377C112.844, |
|
1217 | 1223 | 168.596,153.916,216.671, |
|
1218 | 1224 | 204.583,216.671z" fill="{text_color}"/> |
|
1219 | 1225 | <path d="M407.164,374.717L360.88, |
|
1220 | 1226 | 270.454c-2.117-4.771-5.836-8.728-10.465-11.138l-71.83-37.392 |
|
1221 | 1227 | c-1.584-0.823-3.502-0.663-4.926,0.415c-20.316, |
|
1222 | 1228 | 15.366-44.203,23.488-69.076,23.488c-24.877, |
|
1223 | 1229 | 0-48.762-8.122-69.078-23.488 |
|
1224 | 1230 | c-1.428-1.078-3.346-1.238-4.93-0.415L58.75, |
|
1225 | 1231 | 259.316c-4.631,2.41-8.346,6.365-10.465,11.138L2.001,374.717 |
|
1226 | 1232 | c-3.191,7.188-2.537,15.412,1.75,22.005c4.285, |
|
1227 | 1233 | 6.592,11.537,10.526,19.4,10.526h362.861c7.863,0,15.117-3.936, |
|
1228 | 1234 | 19.402-10.527 C409.699,390.129, |
|
1229 | 1235 | 410.355,381.902,407.164,374.717z" fill="{text_color}"/> |
|
1230 | 1236 | </svg>""".format( |
|
1231 | 1237 | size=self.size, |
|
1232 | 1238 | background='#979797', # @grey4 |
|
1233 | 1239 | text_color=self.text_color, |
|
1234 | 1240 | font_family=font_family) |
|
1235 | 1241 | |
|
1236 | 1242 | return { |
|
1237 | 1243 | "default_user": default_user |
|
1238 | 1244 | }[img_type] |
|
1239 | 1245 | |
|
1240 | 1246 | def get_img_data(self, svg_type=None): |
|
1241 | 1247 | """ |
|
1242 | 1248 | generates the svg metadata for image |
|
1243 | 1249 | """ |
|
1244 | 1250 | |
|
1245 | 1251 | font_family = ','.join([ |
|
1246 | 1252 | 'proximanovaregular', |
|
1247 | 1253 | 'Proxima Nova Regular', |
|
1248 | 1254 | 'Proxima Nova', |
|
1249 | 1255 | 'Arial', |
|
1250 | 1256 | 'Lucida Grande', |
|
1251 | 1257 | 'sans-serif' |
|
1252 | 1258 | ]) |
|
1253 | 1259 | if svg_type: |
|
1254 | 1260 | return self.get_img_data_by_type(font_family, svg_type) |
|
1255 | 1261 | |
|
1256 | 1262 | initials = self.get_initials() |
|
1257 | 1263 | img_data = """ |
|
1258 | 1264 | <svg xmlns="http://www.w3.org/2000/svg" pointer-events="none" |
|
1259 | 1265 | width="{size}" height="{size}" |
|
1260 | 1266 | style="width: 100%; height: 100%; background-color: {background}" |
|
1261 | 1267 | viewBox="0 0 {size} {size}"> |
|
1262 | 1268 | <text text-anchor="middle" y="50%" x="50%" dy="0.35em" |
|
1263 | 1269 | pointer-events="auto" fill="{text_color}" |
|
1264 | 1270 | font-family="{font_family}" |
|
1265 | 1271 | style="font-weight: 400; font-size: {f_size}px;">{text} |
|
1266 | 1272 | </text> |
|
1267 | 1273 | </svg>""".format( |
|
1268 | 1274 | size=self.size, |
|
1269 | 1275 | f_size=self.size/1.85, # scale the text inside the box nicely |
|
1270 | 1276 | background=self.background, |
|
1271 | 1277 | text_color=self.text_color, |
|
1272 | 1278 | text=initials.upper(), |
|
1273 | 1279 | font_family=font_family) |
|
1274 | 1280 | |
|
1275 | 1281 | return img_data |
|
1276 | 1282 | |
|
1277 | 1283 | def generate_svg(self, svg_type=None): |
|
1278 | 1284 | img_data = self.get_img_data(svg_type) |
|
1279 | 1285 | return "data:image/svg+xml;base64,%s" % img_data.encode('base64') |
|
1280 | 1286 | |
|
1281 | 1287 | |
|
1282 | 1288 | def initials_gravatar(email_address, first_name, last_name, size=30): |
|
1283 | 1289 | svg_type = None |
|
1284 | 1290 | if email_address == User.DEFAULT_USER_EMAIL: |
|
1285 | 1291 | svg_type = 'default_user' |
|
1286 | 1292 | klass = InitialsGravatar(email_address, first_name, last_name, size) |
|
1287 | 1293 | return klass.generate_svg(svg_type=svg_type) |
|
1288 | 1294 | |
|
1289 | 1295 | |
|
1290 | 1296 | def gravatar_url(email_address, size=30, request=None): |
|
1291 | 1297 | request = get_current_request() |
|
1292 | 1298 | _use_gravatar = request.call_context.visual.use_gravatar |
|
1293 | 1299 | _gravatar_url = request.call_context.visual.gravatar_url |
|
1294 | 1300 | |
|
1295 | 1301 | _gravatar_url = _gravatar_url or User.DEFAULT_GRAVATAR_URL |
|
1296 | 1302 | |
|
1297 | 1303 | email_address = email_address or User.DEFAULT_USER_EMAIL |
|
1298 | 1304 | if isinstance(email_address, unicode): |
|
1299 | 1305 | # hashlib crashes on unicode items |
|
1300 | 1306 | email_address = safe_str(email_address) |
|
1301 | 1307 | |
|
1302 | 1308 | # empty email or default user |
|
1303 | 1309 | if not email_address or email_address == User.DEFAULT_USER_EMAIL: |
|
1304 | 1310 | return initials_gravatar(User.DEFAULT_USER_EMAIL, '', '', size=size) |
|
1305 | 1311 | |
|
1306 | 1312 | if _use_gravatar: |
|
1307 | 1313 | # TODO: Disuse pyramid thread locals. Think about another solution to |
|
1308 | 1314 | # get the host and schema here. |
|
1309 | 1315 | request = get_current_request() |
|
1310 | 1316 | tmpl = safe_str(_gravatar_url) |
|
1311 | 1317 | tmpl = tmpl.replace('{email}', email_address)\ |
|
1312 | 1318 | .replace('{md5email}', md5_safe(email_address.lower())) \ |
|
1313 | 1319 | .replace('{netloc}', request.host)\ |
|
1314 | 1320 | .replace('{scheme}', request.scheme)\ |
|
1315 | 1321 | .replace('{size}', safe_str(size)) |
|
1316 | 1322 | return tmpl |
|
1317 | 1323 | else: |
|
1318 | 1324 | return initials_gravatar(email_address, '', '', size=size) |
|
1319 | 1325 | |
|
1320 | 1326 | |
|
1321 | 1327 | class Page(_Page): |
|
1322 | 1328 | """ |
|
1323 | 1329 | Custom pager to match rendering style with paginator |
|
1324 | 1330 | """ |
|
1325 | 1331 | |
|
1326 | 1332 | def _get_pos(self, cur_page, max_page, items): |
|
1327 | 1333 | edge = (items / 2) + 1 |
|
1328 | 1334 | if (cur_page <= edge): |
|
1329 | 1335 | radius = max(items / 2, items - cur_page) |
|
1330 | 1336 | elif (max_page - cur_page) < edge: |
|
1331 | 1337 | radius = (items - 1) - (max_page - cur_page) |
|
1332 | 1338 | else: |
|
1333 | 1339 | radius = items / 2 |
|
1334 | 1340 | |
|
1335 | 1341 | left = max(1, (cur_page - (radius))) |
|
1336 | 1342 | right = min(max_page, cur_page + (radius)) |
|
1337 | 1343 | return left, cur_page, right |
|
1338 | 1344 | |
|
1339 | 1345 | def _range(self, regexp_match): |
|
1340 | 1346 | """ |
|
1341 | 1347 | Return range of linked pages (e.g. '1 2 [3] 4 5 6 7 8'). |
|
1342 | 1348 | |
|
1343 | 1349 | Arguments: |
|
1344 | 1350 | |
|
1345 | 1351 | regexp_match |
|
1346 | 1352 | A "re" (regular expressions) match object containing the |
|
1347 | 1353 | radius of linked pages around the current page in |
|
1348 | 1354 | regexp_match.group(1) as a string |
|
1349 | 1355 | |
|
1350 | 1356 | This function is supposed to be called as a callable in |
|
1351 | 1357 | re.sub. |
|
1352 | 1358 | |
|
1353 | 1359 | """ |
|
1354 | 1360 | radius = int(regexp_match.group(1)) |
|
1355 | 1361 | |
|
1356 | 1362 | # Compute the first and last page number within the radius |
|
1357 | 1363 | # e.g. '1 .. 5 6 [7] 8 9 .. 12' |
|
1358 | 1364 | # -> leftmost_page = 5 |
|
1359 | 1365 | # -> rightmost_page = 9 |
|
1360 | 1366 | leftmost_page, _cur, rightmost_page = self._get_pos(self.page, |
|
1361 | 1367 | self.last_page, |
|
1362 | 1368 | (radius * 2) + 1) |
|
1363 | 1369 | nav_items = [] |
|
1364 | 1370 | |
|
1365 | 1371 | # Create a link to the first page (unless we are on the first page |
|
1366 | 1372 | # or there would be no need to insert '..' spacers) |
|
1367 | 1373 | if self.page != self.first_page and self.first_page < leftmost_page: |
|
1368 | 1374 | nav_items.append(self._pagerlink(self.first_page, self.first_page)) |
|
1369 | 1375 | |
|
1370 | 1376 | # Insert dots if there are pages between the first page |
|
1371 | 1377 | # and the currently displayed page range |
|
1372 | 1378 | if leftmost_page - self.first_page > 1: |
|
1373 | 1379 | # Wrap in a SPAN tag if nolink_attr is set |
|
1374 | 1380 | text = '..' |
|
1375 | 1381 | if self.dotdot_attr: |
|
1376 | 1382 | text = HTML.span(c=text, **self.dotdot_attr) |
|
1377 | 1383 | nav_items.append(text) |
|
1378 | 1384 | |
|
1379 | 1385 | for thispage in xrange(leftmost_page, rightmost_page + 1): |
|
1380 | 1386 | # Hilight the current page number and do not use a link |
|
1381 | 1387 | if thispage == self.page: |
|
1382 | 1388 | text = '%s' % (thispage,) |
|
1383 | 1389 | # Wrap in a SPAN tag if nolink_attr is set |
|
1384 | 1390 | if self.curpage_attr: |
|
1385 | 1391 | text = HTML.span(c=text, **self.curpage_attr) |
|
1386 | 1392 | nav_items.append(text) |
|
1387 | 1393 | # Otherwise create just a link to that page |
|
1388 | 1394 | else: |
|
1389 | 1395 | text = '%s' % (thispage,) |
|
1390 | 1396 | nav_items.append(self._pagerlink(thispage, text)) |
|
1391 | 1397 | |
|
1392 | 1398 | # Insert dots if there are pages between the displayed |
|
1393 | 1399 | # page numbers and the end of the page range |
|
1394 | 1400 | if self.last_page - rightmost_page > 1: |
|
1395 | 1401 | text = '..' |
|
1396 | 1402 | # Wrap in a SPAN tag if nolink_attr is set |
|
1397 | 1403 | if self.dotdot_attr: |
|
1398 | 1404 | text = HTML.span(c=text, **self.dotdot_attr) |
|
1399 | 1405 | nav_items.append(text) |
|
1400 | 1406 | |
|
1401 | 1407 | # Create a link to the very last page (unless we are on the last |
|
1402 | 1408 | # page or there would be no need to insert '..' spacers) |
|
1403 | 1409 | if self.page != self.last_page and rightmost_page < self.last_page: |
|
1404 | 1410 | nav_items.append(self._pagerlink(self.last_page, self.last_page)) |
|
1405 | 1411 | |
|
1406 | 1412 | ## prerender links |
|
1407 | 1413 | #_page_link = url.current() |
|
1408 | 1414 | #nav_items.append(literal('<link rel="prerender" href="%s?page=%s">' % (_page_link, str(int(self.page)+1)))) |
|
1409 | 1415 | #nav_items.append(literal('<link rel="prefetch" href="%s?page=%s">' % (_page_link, str(int(self.page)+1)))) |
|
1410 | 1416 | return self.separator.join(nav_items) |
|
1411 | 1417 | |
|
1412 | 1418 | def pager(self, format='~2~', page_param='page', partial_param='partial', |
|
1413 | 1419 | show_if_single_page=False, separator=' ', onclick=None, |
|
1414 | 1420 | symbol_first='<<', symbol_last='>>', |
|
1415 | 1421 | symbol_previous='<', symbol_next='>', |
|
1416 | 1422 | link_attr={'class': 'pager_link', 'rel': 'prerender'}, |
|
1417 | 1423 | curpage_attr={'class': 'pager_curpage'}, |
|
1418 | 1424 | dotdot_attr={'class': 'pager_dotdot'}, **kwargs): |
|
1419 | 1425 | |
|
1420 | 1426 | self.curpage_attr = curpage_attr |
|
1421 | 1427 | self.separator = separator |
|
1422 | 1428 | self.pager_kwargs = kwargs |
|
1423 | 1429 | self.page_param = page_param |
|
1424 | 1430 | self.partial_param = partial_param |
|
1425 | 1431 | self.onclick = onclick |
|
1426 | 1432 | self.link_attr = link_attr |
|
1427 | 1433 | self.dotdot_attr = dotdot_attr |
|
1428 | 1434 | |
|
1429 | 1435 | # Don't show navigator if there is no more than one page |
|
1430 | 1436 | if self.page_count == 0 or (self.page_count == 1 and not show_if_single_page): |
|
1431 | 1437 | return '' |
|
1432 | 1438 | |
|
1433 | 1439 | from string import Template |
|
1434 | 1440 | # Replace ~...~ in token format by range of pages |
|
1435 | 1441 | result = re.sub(r'~(\d+)~', self._range, format) |
|
1436 | 1442 | |
|
1437 | 1443 | # Interpolate '%' variables |
|
1438 | 1444 | result = Template(result).safe_substitute({ |
|
1439 | 1445 | 'first_page': self.first_page, |
|
1440 | 1446 | 'last_page': self.last_page, |
|
1441 | 1447 | 'page': self.page, |
|
1442 | 1448 | 'page_count': self.page_count, |
|
1443 | 1449 | 'items_per_page': self.items_per_page, |
|
1444 | 1450 | 'first_item': self.first_item, |
|
1445 | 1451 | 'last_item': self.last_item, |
|
1446 | 1452 | 'item_count': self.item_count, |
|
1447 | 1453 | 'link_first': self.page > self.first_page and \ |
|
1448 | 1454 | self._pagerlink(self.first_page, symbol_first) or '', |
|
1449 | 1455 | 'link_last': self.page < self.last_page and \ |
|
1450 | 1456 | self._pagerlink(self.last_page, symbol_last) or '', |
|
1451 | 1457 | 'link_previous': self.previous_page and \ |
|
1452 | 1458 | self._pagerlink(self.previous_page, symbol_previous) \ |
|
1453 | 1459 | or HTML.span(symbol_previous, class_="pg-previous disabled"), |
|
1454 | 1460 | 'link_next': self.next_page and \ |
|
1455 | 1461 | self._pagerlink(self.next_page, symbol_next) \ |
|
1456 | 1462 | or HTML.span(symbol_next, class_="pg-next disabled") |
|
1457 | 1463 | }) |
|
1458 | 1464 | |
|
1459 | 1465 | return literal(result) |
|
1460 | 1466 | |
|
1461 | 1467 | |
|
1462 | 1468 | #============================================================================== |
|
1463 | 1469 | # REPO PAGER, PAGER FOR REPOSITORY |
|
1464 | 1470 | #============================================================================== |
|
1465 | 1471 | class RepoPage(Page): |
|
1466 | 1472 | |
|
1467 | 1473 | def __init__(self, collection, page=1, items_per_page=20, |
|
1468 | 1474 | item_count=None, url=None, **kwargs): |
|
1469 | 1475 | |
|
1470 | 1476 | """Create a "RepoPage" instance. special pager for paging |
|
1471 | 1477 | repository |
|
1472 | 1478 | """ |
|
1473 | 1479 | self._url_generator = url |
|
1474 | 1480 | |
|
1475 | 1481 | # Safe the kwargs class-wide so they can be used in the pager() method |
|
1476 | 1482 | self.kwargs = kwargs |
|
1477 | 1483 | |
|
1478 | 1484 | # Save a reference to the collection |
|
1479 | 1485 | self.original_collection = collection |
|
1480 | 1486 | |
|
1481 | 1487 | self.collection = collection |
|
1482 | 1488 | |
|
1483 | 1489 | # The self.page is the number of the current page. |
|
1484 | 1490 | # The first page has the number 1! |
|
1485 | 1491 | try: |
|
1486 | 1492 | self.page = int(page) # make it int() if we get it as a string |
|
1487 | 1493 | except (ValueError, TypeError): |
|
1488 | 1494 | self.page = 1 |
|
1489 | 1495 | |
|
1490 | 1496 | self.items_per_page = items_per_page |
|
1491 | 1497 | |
|
1492 | 1498 | # Unless the user tells us how many items the collections has |
|
1493 | 1499 | # we calculate that ourselves. |
|
1494 | 1500 | if item_count is not None: |
|
1495 | 1501 | self.item_count = item_count |
|
1496 | 1502 | else: |
|
1497 | 1503 | self.item_count = len(self.collection) |
|
1498 | 1504 | |
|
1499 | 1505 | # Compute the number of the first and last available page |
|
1500 | 1506 | if self.item_count > 0: |
|
1501 | 1507 | self.first_page = 1 |
|
1502 | 1508 | self.page_count = int(math.ceil(float(self.item_count) / |
|
1503 | 1509 | self.items_per_page)) |
|
1504 | 1510 | self.last_page = self.first_page + self.page_count - 1 |
|
1505 | 1511 | |
|
1506 | 1512 | # Make sure that the requested page number is the range of |
|
1507 | 1513 | # valid pages |
|
1508 | 1514 | if self.page > self.last_page: |
|
1509 | 1515 | self.page = self.last_page |
|
1510 | 1516 | elif self.page < self.first_page: |
|
1511 | 1517 | self.page = self.first_page |
|
1512 | 1518 | |
|
1513 | 1519 | # Note: the number of items on this page can be less than |
|
1514 | 1520 | # items_per_page if the last page is not full |
|
1515 | 1521 | self.first_item = max(0, (self.item_count) - (self.page * |
|
1516 | 1522 | items_per_page)) |
|
1517 | 1523 | self.last_item = ((self.item_count - 1) - items_per_page * |
|
1518 | 1524 | (self.page - 1)) |
|
1519 | 1525 | |
|
1520 | 1526 | self.items = list(self.collection[self.first_item:self.last_item + 1]) |
|
1521 | 1527 | |
|
1522 | 1528 | # Links to previous and next page |
|
1523 | 1529 | if self.page > self.first_page: |
|
1524 | 1530 | self.previous_page = self.page - 1 |
|
1525 | 1531 | else: |
|
1526 | 1532 | self.previous_page = None |
|
1527 | 1533 | |
|
1528 | 1534 | if self.page < self.last_page: |
|
1529 | 1535 | self.next_page = self.page + 1 |
|
1530 | 1536 | else: |
|
1531 | 1537 | self.next_page = None |
|
1532 | 1538 | |
|
1533 | 1539 | # No items available |
|
1534 | 1540 | else: |
|
1535 | 1541 | self.first_page = None |
|
1536 | 1542 | self.page_count = 0 |
|
1537 | 1543 | self.last_page = None |
|
1538 | 1544 | self.first_item = None |
|
1539 | 1545 | self.last_item = None |
|
1540 | 1546 | self.previous_page = None |
|
1541 | 1547 | self.next_page = None |
|
1542 | 1548 | self.items = [] |
|
1543 | 1549 | |
|
1544 | 1550 | # This is a subclass of the 'list' type. Initialise the list now. |
|
1545 | 1551 | list.__init__(self, reversed(self.items)) |
|
1546 | 1552 | |
|
1547 | 1553 | |
|
1548 | 1554 | def breadcrumb_repo_link(repo): |
|
1549 | 1555 | """ |
|
1550 | 1556 | Makes a breadcrumbs path link to repo |
|
1551 | 1557 | |
|
1552 | 1558 | ex:: |
|
1553 | 1559 | group >> subgroup >> repo |
|
1554 | 1560 | |
|
1555 | 1561 | :param repo: a Repository instance |
|
1556 | 1562 | """ |
|
1557 | 1563 | |
|
1558 | 1564 | path = [ |
|
1559 | 1565 | link_to(group.name, route_path('repo_group_home', repo_group_name=group.group_name)) |
|
1560 | 1566 | for group in repo.groups_with_parents |
|
1561 | 1567 | ] + [ |
|
1562 | 1568 | link_to(repo.just_name, route_path('repo_summary', repo_name=repo.repo_name)) |
|
1563 | 1569 | ] |
|
1564 | 1570 | |
|
1565 | 1571 | return literal(' » '.join(path)) |
|
1566 | 1572 | |
|
1567 | 1573 | |
|
1568 | 1574 | def format_byte_size_binary(file_size): |
|
1569 | 1575 | """ |
|
1570 | 1576 | Formats file/folder sizes to standard. |
|
1571 | 1577 | """ |
|
1572 | 1578 | if file_size is None: |
|
1573 | 1579 | file_size = 0 |
|
1574 | 1580 | |
|
1575 | 1581 | formatted_size = format_byte_size(file_size, binary=True) |
|
1576 | 1582 | return formatted_size |
|
1577 | 1583 | |
|
1578 | 1584 | |
|
1579 | 1585 | def urlify_text(text_, safe=True): |
|
1580 | 1586 | """ |
|
1581 | 1587 | Extrac urls from text and make html links out of them |
|
1582 | 1588 | |
|
1583 | 1589 | :param text_: |
|
1584 | 1590 | """ |
|
1585 | 1591 | |
|
1586 | 1592 | url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@#.&+]''' |
|
1587 | 1593 | '''|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)''') |
|
1588 | 1594 | |
|
1589 | 1595 | def url_func(match_obj): |
|
1590 | 1596 | url_full = match_obj.groups()[0] |
|
1591 | 1597 | return '<a href="%(url)s">%(url)s</a>' % ({'url': url_full}) |
|
1592 | 1598 | _newtext = url_pat.sub(url_func, text_) |
|
1593 | 1599 | if safe: |
|
1594 | 1600 | return literal(_newtext) |
|
1595 | 1601 | return _newtext |
|
1596 | 1602 | |
|
1597 | 1603 | |
|
1598 | 1604 | def urlify_commits(text_, repository): |
|
1599 | 1605 | """ |
|
1600 | 1606 | Extract commit ids from text and make link from them |
|
1601 | 1607 | |
|
1602 | 1608 | :param text_: |
|
1603 | 1609 | :param repository: repo name to build the URL with |
|
1604 | 1610 | """ |
|
1605 | 1611 | |
|
1606 | 1612 | URL_PAT = re.compile(r'(^|\s)([0-9a-fA-F]{12,40})($|\s)') |
|
1607 | 1613 | |
|
1608 | 1614 | def url_func(match_obj): |
|
1609 | 1615 | commit_id = match_obj.groups()[1] |
|
1610 | 1616 | pref = match_obj.groups()[0] |
|
1611 | 1617 | suf = match_obj.groups()[2] |
|
1612 | 1618 | |
|
1613 | 1619 | tmpl = ( |
|
1614 | 1620 | '%(pref)s<a class="%(cls)s" href="%(url)s">' |
|
1615 | 1621 | '%(commit_id)s</a>%(suf)s' |
|
1616 | 1622 | ) |
|
1617 | 1623 | return tmpl % { |
|
1618 | 1624 | 'pref': pref, |
|
1619 | 1625 | 'cls': 'revision-link', |
|
1620 | 1626 | 'url': route_url('repo_commit', repo_name=repository, |
|
1621 | 1627 | commit_id=commit_id), |
|
1622 | 1628 | 'commit_id': commit_id, |
|
1623 | 1629 | 'suf': suf |
|
1624 | 1630 | } |
|
1625 | 1631 | |
|
1626 | 1632 | newtext = URL_PAT.sub(url_func, text_) |
|
1627 | 1633 | |
|
1628 | 1634 | return newtext |
|
1629 | 1635 | |
|
1630 | 1636 | |
|
1631 | 1637 | def _process_url_func(match_obj, repo_name, uid, entry, |
|
1632 | 1638 | return_raw_data=False, link_format='html'): |
|
1633 | 1639 | pref = '' |
|
1634 | 1640 | if match_obj.group().startswith(' '): |
|
1635 | 1641 | pref = ' ' |
|
1636 | 1642 | |
|
1637 | 1643 | issue_id = ''.join(match_obj.groups()) |
|
1638 | 1644 | |
|
1639 | 1645 | if link_format == 'html': |
|
1640 | 1646 | tmpl = ( |
|
1641 | 1647 | '%(pref)s<a class="%(cls)s" href="%(url)s">' |
|
1642 | 1648 | '%(issue-prefix)s%(id-repr)s' |
|
1643 | 1649 | '</a>') |
|
1644 | 1650 | elif link_format == 'rst': |
|
1645 | 1651 | tmpl = '`%(issue-prefix)s%(id-repr)s <%(url)s>`_' |
|
1646 | 1652 | elif link_format == 'markdown': |
|
1647 | 1653 | tmpl = '[%(issue-prefix)s%(id-repr)s](%(url)s)' |
|
1648 | 1654 | else: |
|
1649 | 1655 | raise ValueError('Bad link_format:{}'.format(link_format)) |
|
1650 | 1656 | |
|
1651 | 1657 | (repo_name_cleaned, |
|
1652 | 1658 | parent_group_name) = RepoGroupModel().\ |
|
1653 | 1659 | _get_group_name_and_parent(repo_name) |
|
1654 | 1660 | |
|
1655 | 1661 | # variables replacement |
|
1656 | 1662 | named_vars = { |
|
1657 | 1663 | 'id': issue_id, |
|
1658 | 1664 | 'repo': repo_name, |
|
1659 | 1665 | 'repo_name': repo_name_cleaned, |
|
1660 | 1666 | 'group_name': parent_group_name |
|
1661 | 1667 | } |
|
1662 | 1668 | # named regex variables |
|
1663 | 1669 | named_vars.update(match_obj.groupdict()) |
|
1664 | 1670 | _url = string.Template(entry['url']).safe_substitute(**named_vars) |
|
1665 | 1671 | |
|
1666 | 1672 | data = { |
|
1667 | 1673 | 'pref': pref, |
|
1668 | 1674 | 'cls': 'issue-tracker-link', |
|
1669 | 1675 | 'url': _url, |
|
1670 | 1676 | 'id-repr': issue_id, |
|
1671 | 1677 | 'issue-prefix': entry['pref'], |
|
1672 | 1678 | 'serv': entry['url'], |
|
1673 | 1679 | } |
|
1674 | 1680 | if return_raw_data: |
|
1675 | 1681 | return { |
|
1676 | 1682 | 'id': issue_id, |
|
1677 | 1683 | 'url': _url |
|
1678 | 1684 | } |
|
1679 | 1685 | return tmpl % data |
|
1680 | 1686 | |
|
1681 | 1687 | |
|
1682 | 1688 | def get_active_pattern_entries(repo_name): |
|
1683 | 1689 | repo = None |
|
1684 | 1690 | if repo_name: |
|
1685 | 1691 | # Retrieving repo_name to avoid invalid repo_name to explode on |
|
1686 | 1692 | # IssueTrackerSettingsModel but still passing invalid name further down |
|
1687 | 1693 | repo = Repository.get_by_repo_name(repo_name, cache=True) |
|
1688 | 1694 | |
|
1689 | 1695 | settings_model = IssueTrackerSettingsModel(repo=repo) |
|
1690 | 1696 | active_entries = settings_model.get_settings(cache=True) |
|
1691 | 1697 | return active_entries |
|
1692 | 1698 | |
|
1693 | 1699 | |
|
1694 | 1700 | def process_patterns(text_string, repo_name, link_format='html', |
|
1695 | 1701 | active_entries=None): |
|
1696 | 1702 | |
|
1697 | 1703 | allowed_formats = ['html', 'rst', 'markdown'] |
|
1698 | 1704 | if link_format not in allowed_formats: |
|
1699 | 1705 | raise ValueError('Link format can be only one of:{} got {}'.format( |
|
1700 | 1706 | allowed_formats, link_format)) |
|
1701 | 1707 | |
|
1702 | 1708 | active_entries = active_entries or get_active_pattern_entries(repo_name) |
|
1703 | 1709 | issues_data = [] |
|
1704 | 1710 | newtext = text_string |
|
1705 | 1711 | |
|
1706 | 1712 | for uid, entry in active_entries.items(): |
|
1707 | 1713 | log.debug('found issue tracker entry with uid %s' % (uid,)) |
|
1708 | 1714 | |
|
1709 | 1715 | if not (entry['pat'] and entry['url']): |
|
1710 | 1716 | log.debug('skipping due to missing data') |
|
1711 | 1717 | continue |
|
1712 | 1718 | |
|
1713 | 1719 | log.debug('issue tracker entry: uid: `%s` PAT:%s URL:%s PREFIX:%s' |
|
1714 | 1720 | % (uid, entry['pat'], entry['url'], entry['pref'])) |
|
1715 | 1721 | |
|
1716 | 1722 | try: |
|
1717 | 1723 | pattern = re.compile(r'%s' % entry['pat']) |
|
1718 | 1724 | except re.error: |
|
1719 | 1725 | log.exception( |
|
1720 | 1726 | 'issue tracker pattern: `%s` failed to compile', |
|
1721 | 1727 | entry['pat']) |
|
1722 | 1728 | continue |
|
1723 | 1729 | |
|
1724 | 1730 | data_func = partial( |
|
1725 | 1731 | _process_url_func, repo_name=repo_name, entry=entry, uid=uid, |
|
1726 | 1732 | return_raw_data=True) |
|
1727 | 1733 | |
|
1728 | 1734 | for match_obj in pattern.finditer(text_string): |
|
1729 | 1735 | issues_data.append(data_func(match_obj)) |
|
1730 | 1736 | |
|
1731 | 1737 | url_func = partial( |
|
1732 | 1738 | _process_url_func, repo_name=repo_name, entry=entry, uid=uid, |
|
1733 | 1739 | link_format=link_format) |
|
1734 | 1740 | |
|
1735 | 1741 | newtext = pattern.sub(url_func, newtext) |
|
1736 | 1742 | log.debug('processed prefix:uid `%s`' % (uid,)) |
|
1737 | 1743 | |
|
1738 | 1744 | return newtext, issues_data |
|
1739 | 1745 | |
|
1740 | 1746 | |
|
1741 | 1747 | def urlify_commit_message(commit_text, repository=None, |
|
1742 | 1748 | active_pattern_entries=None): |
|
1743 | 1749 | """ |
|
1744 | 1750 | Parses given text message and makes proper links. |
|
1745 | 1751 | issues are linked to given issue-server, and rest is a commit link |
|
1746 | 1752 | |
|
1747 | 1753 | :param commit_text: |
|
1748 | 1754 | :param repository: |
|
1749 | 1755 | """ |
|
1750 | 1756 | def escaper(string): |
|
1751 | 1757 | return string.replace('<', '<').replace('>', '>') |
|
1752 | 1758 | |
|
1753 | 1759 | newtext = escaper(commit_text) |
|
1754 | 1760 | |
|
1755 | 1761 | # extract http/https links and make them real urls |
|
1756 | 1762 | newtext = urlify_text(newtext, safe=False) |
|
1757 | 1763 | |
|
1758 | 1764 | # urlify commits - extract commit ids and make link out of them, if we have |
|
1759 | 1765 | # the scope of repository present. |
|
1760 | 1766 | if repository: |
|
1761 | 1767 | newtext = urlify_commits(newtext, repository) |
|
1762 | 1768 | |
|
1763 | 1769 | # process issue tracker patterns |
|
1764 | 1770 | newtext, issues = process_patterns(newtext, repository or '', |
|
1765 | 1771 | active_entries=active_pattern_entries) |
|
1766 | 1772 | |
|
1767 | 1773 | return literal(newtext) |
|
1768 | 1774 | |
|
1769 | 1775 | |
|
1770 | 1776 | def render_binary(repo_name, file_obj): |
|
1771 | 1777 | """ |
|
1772 | 1778 | Choose how to render a binary file |
|
1773 | 1779 | """ |
|
1774 | 1780 | filename = file_obj.name |
|
1775 | 1781 | |
|
1776 | 1782 | # images |
|
1777 | 1783 | for ext in ['*.png', '*.jpg', '*.ico', '*.gif']: |
|
1778 | 1784 | if fnmatch.fnmatch(filename, pat=ext): |
|
1779 | 1785 | alt = filename |
|
1780 | 1786 | src = route_path( |
|
1781 | 1787 | 'repo_file_raw', repo_name=repo_name, |
|
1782 | 1788 | commit_id=file_obj.commit.raw_id, f_path=file_obj.path) |
|
1783 | 1789 | return literal('<img class="rendered-binary" alt="{}" src="{}">'.format(alt, src)) |
|
1784 | 1790 | |
|
1785 | 1791 | |
|
1786 | 1792 | def renderer_from_filename(filename, exclude=None): |
|
1787 | 1793 | """ |
|
1788 | 1794 | choose a renderer based on filename, this works only for text based files |
|
1789 | 1795 | """ |
|
1790 | 1796 | |
|
1791 | 1797 | # ipython |
|
1792 | 1798 | for ext in ['*.ipynb']: |
|
1793 | 1799 | if fnmatch.fnmatch(filename, pat=ext): |
|
1794 | 1800 | return 'jupyter' |
|
1795 | 1801 | |
|
1796 | 1802 | is_markup = MarkupRenderer.renderer_from_filename(filename, exclude=exclude) |
|
1797 | 1803 | if is_markup: |
|
1798 | 1804 | return is_markup |
|
1799 | 1805 | return None |
|
1800 | 1806 | |
|
1801 | 1807 | |
|
1802 | 1808 | def render(source, renderer='rst', mentions=False, relative_urls=None, |
|
1803 | 1809 | repo_name=None): |
|
1804 | 1810 | |
|
1805 | 1811 | def maybe_convert_relative_links(html_source): |
|
1806 | 1812 | if relative_urls: |
|
1807 | 1813 | return relative_links(html_source, relative_urls) |
|
1808 | 1814 | return html_source |
|
1809 | 1815 | |
|
1810 | 1816 | if renderer == 'rst': |
|
1811 | 1817 | if repo_name: |
|
1812 | 1818 | # process patterns on comments if we pass in repo name |
|
1813 | 1819 | source, issues = process_patterns( |
|
1814 | 1820 | source, repo_name, link_format='rst') |
|
1815 | 1821 | |
|
1816 | 1822 | return literal( |
|
1817 | 1823 | '<div class="rst-block">%s</div>' % |
|
1818 | 1824 | maybe_convert_relative_links( |
|
1819 | 1825 | MarkupRenderer.rst(source, mentions=mentions))) |
|
1820 | 1826 | elif renderer == 'markdown': |
|
1821 | 1827 | if repo_name: |
|
1822 | 1828 | # process patterns on comments if we pass in repo name |
|
1823 | 1829 | source, issues = process_patterns( |
|
1824 | 1830 | source, repo_name, link_format='markdown') |
|
1825 | 1831 | |
|
1826 | 1832 | return literal( |
|
1827 | 1833 | '<div class="markdown-block">%s</div>' % |
|
1828 | 1834 | maybe_convert_relative_links( |
|
1829 | 1835 | MarkupRenderer.markdown(source, flavored=True, |
|
1830 | 1836 | mentions=mentions))) |
|
1831 | 1837 | elif renderer == 'jupyter': |
|
1832 | 1838 | return literal( |
|
1833 | 1839 | '<div class="ipynb">%s</div>' % |
|
1834 | 1840 | maybe_convert_relative_links( |
|
1835 | 1841 | MarkupRenderer.jupyter(source))) |
|
1836 | 1842 | |
|
1837 | 1843 | # None means just show the file-source |
|
1838 | 1844 | return None |
|
1839 | 1845 | |
|
1840 | 1846 | |
|
1841 | 1847 | def commit_status(repo, commit_id): |
|
1842 | 1848 | return ChangesetStatusModel().get_status(repo, commit_id) |
|
1843 | 1849 | |
|
1844 | 1850 | |
|
1845 | 1851 | def commit_status_lbl(commit_status): |
|
1846 | 1852 | return dict(ChangesetStatus.STATUSES).get(commit_status) |
|
1847 | 1853 | |
|
1848 | 1854 | |
|
1849 | 1855 | def commit_time(repo_name, commit_id): |
|
1850 | 1856 | repo = Repository.get_by_repo_name(repo_name) |
|
1851 | 1857 | commit = repo.get_commit(commit_id=commit_id) |
|
1852 | 1858 | return commit.date |
|
1853 | 1859 | |
|
1854 | 1860 | |
|
1855 | 1861 | def get_permission_name(key): |
|
1856 | 1862 | return dict(Permission.PERMS).get(key) |
|
1857 | 1863 | |
|
1858 | 1864 | |
|
1859 | 1865 | def journal_filter_help(request): |
|
1860 | 1866 | _ = request.translate |
|
1861 | 1867 | |
|
1862 | 1868 | return _( |
|
1863 | 1869 | 'Example filter terms:\n' + |
|
1864 | 1870 | ' repository:vcs\n' + |
|
1865 | 1871 | ' username:marcin\n' + |
|
1866 | 1872 | ' username:(NOT marcin)\n' + |
|
1867 | 1873 | ' action:*push*\n' + |
|
1868 | 1874 | ' ip:127.0.0.1\n' + |
|
1869 | 1875 | ' date:20120101\n' + |
|
1870 | 1876 | ' date:[20120101100000 TO 20120102]\n' + |
|
1871 | 1877 | '\n' + |
|
1872 | 1878 | 'Generate wildcards using \'*\' character:\n' + |
|
1873 | 1879 | ' "repository:vcs*" - search everything starting with \'vcs\'\n' + |
|
1874 | 1880 | ' "repository:*vcs*" - search for repository containing \'vcs\'\n' + |
|
1875 | 1881 | '\n' + |
|
1876 | 1882 | 'Optional AND / OR operators in queries\n' + |
|
1877 | 1883 | ' "repository:vcs OR repository:test"\n' + |
|
1878 | 1884 | ' "username:test AND repository:test*"\n' |
|
1879 | 1885 | ) |
|
1880 | 1886 | |
|
1881 | 1887 | |
|
1882 | 1888 | def search_filter_help(searcher, request): |
|
1883 | 1889 | _ = request.translate |
|
1884 | 1890 | |
|
1885 | 1891 | terms = '' |
|
1886 | 1892 | return _( |
|
1887 | 1893 | 'Example filter terms for `{searcher}` search:\n' + |
|
1888 | 1894 | '{terms}\n' + |
|
1889 | 1895 | 'Generate wildcards using \'*\' character:\n' + |
|
1890 | 1896 | ' "repo_name:vcs*" - search everything starting with \'vcs\'\n' + |
|
1891 | 1897 | ' "repo_name:*vcs*" - search for repository containing \'vcs\'\n' + |
|
1892 | 1898 | '\n' + |
|
1893 | 1899 | 'Optional AND / OR operators in queries\n' + |
|
1894 | 1900 | ' "repo_name:vcs OR repo_name:test"\n' + |
|
1895 | 1901 | ' "owner:test AND repo_name:test*"\n' + |
|
1896 | 1902 | 'More: {search_doc}' |
|
1897 | 1903 | ).format(searcher=searcher.name, |
|
1898 | 1904 | terms=terms, search_doc=searcher.query_lang_doc) |
|
1899 | 1905 | |
|
1900 | 1906 | |
|
1901 | 1907 | def not_mapped_error(repo_name): |
|
1902 | 1908 | from rhodecode.translation import _ |
|
1903 | 1909 | flash(_('%s repository is not mapped to db perhaps' |
|
1904 | 1910 | ' it was created or renamed from the filesystem' |
|
1905 | 1911 | ' please run the application again' |
|
1906 | 1912 | ' in order to rescan repositories') % repo_name, category='error') |
|
1907 | 1913 | |
|
1908 | 1914 | |
|
1909 | 1915 | def ip_range(ip_addr): |
|
1910 | 1916 | from rhodecode.model.db import UserIpMap |
|
1911 | 1917 | s, e = UserIpMap._get_ip_range(ip_addr) |
|
1912 | 1918 | return '%s - %s' % (s, e) |
|
1913 | 1919 | |
|
1914 | 1920 | |
|
1915 | 1921 | def form(url, method='post', needs_csrf_token=True, **attrs): |
|
1916 | 1922 | """Wrapper around webhelpers.tags.form to prevent CSRF attacks.""" |
|
1917 | 1923 | if method.lower() != 'get' and needs_csrf_token: |
|
1918 | 1924 | raise Exception( |
|
1919 | 1925 | 'Forms to POST/PUT/DELETE endpoints should have (in general) a ' + |
|
1920 | 1926 | 'CSRF token. If the endpoint does not require such token you can ' + |
|
1921 | 1927 | 'explicitly set the parameter needs_csrf_token to false.') |
|
1922 | 1928 | |
|
1923 | 1929 | return wh_form(url, method=method, **attrs) |
|
1924 | 1930 | |
|
1925 | 1931 | |
|
1926 | 1932 | def secure_form(form_url, method="POST", multipart=False, **attrs): |
|
1927 | 1933 | """Start a form tag that points the action to an url. This |
|
1928 | 1934 | form tag will also include the hidden field containing |
|
1929 | 1935 | the auth token. |
|
1930 | 1936 | |
|
1931 | 1937 | The url options should be given either as a string, or as a |
|
1932 | 1938 | ``url()`` function. The method for the form defaults to POST. |
|
1933 | 1939 | |
|
1934 | 1940 | Options: |
|
1935 | 1941 | |
|
1936 | 1942 | ``multipart`` |
|
1937 | 1943 | If set to True, the enctype is set to "multipart/form-data". |
|
1938 | 1944 | ``method`` |
|
1939 | 1945 | The method to use when submitting the form, usually either |
|
1940 | 1946 | "GET" or "POST". If "PUT", "DELETE", or another verb is used, a |
|
1941 | 1947 | hidden input with name _method is added to simulate the verb |
|
1942 | 1948 | over POST. |
|
1943 | 1949 | |
|
1944 | 1950 | """ |
|
1945 | 1951 | from webhelpers.pylonslib.secure_form import insecure_form |
|
1946 | 1952 | |
|
1947 | 1953 | if 'request' in attrs: |
|
1948 | 1954 | session = attrs['request'].session |
|
1949 | 1955 | del attrs['request'] |
|
1950 | 1956 | else: |
|
1951 | 1957 | raise ValueError( |
|
1952 | 1958 | 'Calling this form requires request= to be passed as argument') |
|
1953 | 1959 | |
|
1954 | 1960 | form = insecure_form(form_url, method, multipart, **attrs) |
|
1955 | 1961 | token = literal( |
|
1956 | 1962 | '<input type="hidden" id="{}" name="{}" value="{}">'.format( |
|
1957 | 1963 | csrf_token_key, csrf_token_key, get_csrf_token(session))) |
|
1958 | 1964 | |
|
1959 | 1965 | return literal("%s\n%s" % (form, token)) |
|
1960 | 1966 | |
|
1961 | 1967 | |
|
1962 | 1968 | def dropdownmenu(name, selected, options, enable_filter=False, **attrs): |
|
1963 | 1969 | select_html = select(name, selected, options, **attrs) |
|
1964 | 1970 | select2 = """ |
|
1965 | 1971 | <script> |
|
1966 | 1972 | $(document).ready(function() { |
|
1967 | 1973 | $('#%s').select2({ |
|
1968 | 1974 | containerCssClass: 'drop-menu', |
|
1969 | 1975 | dropdownCssClass: 'drop-menu-dropdown', |
|
1970 | 1976 | dropdownAutoWidth: true%s |
|
1971 | 1977 | }); |
|
1972 | 1978 | }); |
|
1973 | 1979 | </script> |
|
1974 | 1980 | """ |
|
1975 | 1981 | filter_option = """, |
|
1976 | 1982 | minimumResultsForSearch: -1 |
|
1977 | 1983 | """ |
|
1978 | 1984 | input_id = attrs.get('id') or name |
|
1979 | 1985 | filter_enabled = "" if enable_filter else filter_option |
|
1980 | 1986 | select_script = literal(select2 % (input_id, filter_enabled)) |
|
1981 | 1987 | |
|
1982 | 1988 | return literal(select_html+select_script) |
|
1983 | 1989 | |
|
1984 | 1990 | |
|
1985 | 1991 | def get_visual_attr(tmpl_context_var, attr_name): |
|
1986 | 1992 | """ |
|
1987 | 1993 | A safe way to get a variable from visual variable of template context |
|
1988 | 1994 | |
|
1989 | 1995 | :param tmpl_context_var: instance of tmpl_context, usually present as `c` |
|
1990 | 1996 | :param attr_name: name of the attribute we fetch from the c.visual |
|
1991 | 1997 | """ |
|
1992 | 1998 | visual = getattr(tmpl_context_var, 'visual', None) |
|
1993 | 1999 | if not visual: |
|
1994 | 2000 | return |
|
1995 | 2001 | else: |
|
1996 | 2002 | return getattr(visual, attr_name, None) |
|
1997 | 2003 | |
|
1998 | 2004 | |
|
1999 | 2005 | def get_last_path_part(file_node): |
|
2000 | 2006 | if not file_node.path: |
|
2001 | 2007 | return u'' |
|
2002 | 2008 | |
|
2003 | 2009 | path = safe_unicode(file_node.path.split('/')[-1]) |
|
2004 | 2010 | return u'../' + path |
|
2005 | 2011 | |
|
2006 | 2012 | |
|
2007 | 2013 | def route_url(*args, **kwargs): |
|
2008 | 2014 | """ |
|
2009 | 2015 | Wrapper around pyramids `route_url` (fully qualified url) function. |
|
2010 | 2016 | """ |
|
2011 | 2017 | req = get_current_request() |
|
2012 | 2018 | return req.route_url(*args, **kwargs) |
|
2013 | 2019 | |
|
2014 | 2020 | |
|
2015 | 2021 | def route_path(*args, **kwargs): |
|
2016 | 2022 | """ |
|
2017 | 2023 | Wrapper around pyramids `route_path` function. |
|
2018 | 2024 | """ |
|
2019 | 2025 | req = get_current_request() |
|
2020 | 2026 | return req.route_path(*args, **kwargs) |
|
2021 | 2027 | |
|
2022 | 2028 | |
|
2023 | 2029 | def route_path_or_none(*args, **kwargs): |
|
2024 | 2030 | try: |
|
2025 | 2031 | return route_path(*args, **kwargs) |
|
2026 | 2032 | except KeyError: |
|
2027 | 2033 | return None |
|
2028 | 2034 | |
|
2029 | 2035 | |
|
2030 | 2036 | def current_route_path(request, **kw): |
|
2031 | 2037 | new_args = request.GET.mixed() |
|
2032 | 2038 | new_args.update(kw) |
|
2033 | 2039 | return request.current_route_path(_query=new_args) |
|
2034 | 2040 | |
|
2035 | 2041 | |
|
2036 | 2042 | def api_call_example(method, args): |
|
2037 | 2043 | """ |
|
2038 | 2044 | Generates an API call example via CURL |
|
2039 | 2045 | """ |
|
2040 | 2046 | args_json = json.dumps(OrderedDict([ |
|
2041 | 2047 | ('id', 1), |
|
2042 | 2048 | ('auth_token', 'SECRET'), |
|
2043 | 2049 | ('method', method), |
|
2044 | 2050 | ('args', args) |
|
2045 | 2051 | ])) |
|
2046 | 2052 | return literal( |
|
2047 | 2053 | "curl {api_url} -X POST -H 'content-type:text/plain' --data-binary '{data}'" |
|
2048 | 2054 | "<br/><br/>SECRET can be found in <a href=\"{token_url}\">auth-tokens</a> page, " |
|
2049 | 2055 | "and needs to be of `api calls` role." |
|
2050 | 2056 | .format( |
|
2051 | 2057 | api_url=route_url('apiv2'), |
|
2052 | 2058 | token_url=route_url('my_account_auth_tokens'), |
|
2053 | 2059 | data=args_json)) |
|
2054 | 2060 | |
|
2055 | 2061 | |
|
2056 | 2062 | def notification_description(notification, request): |
|
2057 | 2063 | """ |
|
2058 | 2064 | Generate notification human readable description based on notification type |
|
2059 | 2065 | """ |
|
2060 | 2066 | from rhodecode.model.notification import NotificationModel |
|
2061 | 2067 | return NotificationModel().make_description( |
|
2062 | 2068 | notification, translate=request.translate) |
|
2063 | 2069 | |
|
2064 | 2070 | |
|
2065 | 2071 | def go_import_header(request, db_repo=None): |
|
2066 | 2072 | """ |
|
2067 | 2073 | Creates a header for go-import functionality in Go Lang |
|
2068 | 2074 | """ |
|
2069 | 2075 | |
|
2070 | 2076 | if not db_repo: |
|
2071 | 2077 | return |
|
2072 | 2078 | if 'go-get' not in request.GET: |
|
2073 | 2079 | return |
|
2074 | 2080 | |
|
2075 | 2081 | clone_url = db_repo.clone_url() |
|
2076 | 2082 | prefix = re.split(r'^https?:\/\/', clone_url)[-1] |
|
2077 | 2083 | # we have a repo and go-get flag, |
|
2078 | 2084 | return literal('<meta name="go-import" content="{} {} {}">'.format( |
|
2079 | 2085 | prefix, db_repo.repo_type, clone_url)) |
|
2080 | 2086 | |
|
2081 | 2087 | |
|
2082 | 2088 | def reviewer_as_json(*args, **kwargs): |
|
2083 | 2089 | from rhodecode.apps.repository.utils import reviewer_as_json as _reviewer_as_json |
|
2084 | 2090 | return _reviewer_as_json(*args, **kwargs) |
General Comments 0
You need to be logged in to leave comments.
Login now