Commit | Line | Data |
---|---|---|
a01b6da7 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
da6dd842 | 3 | ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
03411993 | 4 | ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr> |
e99f4211 | 5 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
a480bc41 | 6 | ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> |
da6ce3f1 | 7 | ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch> |
e99f4211 | 8 | ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> |
d95a56c6 | 9 | ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> |
ad320b20 | 10 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> |
f4de5b3b | 11 | ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org> |
345f0611 | 12 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> |
89b2e0b0 | 13 | ;;; Copyright © 2015 Leo Famulari <leo@famulari.name> |
a01b6da7 NK |
14 | ;;; |
15 | ;;; This file is part of GNU Guix. | |
16 | ;;; | |
17 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
18 | ;;; under the terms of the GNU General Public License as published by | |
19 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
20 | ;;; your option) any later version. | |
21 | ;;; | |
22 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
23 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;;; GNU General Public License for more details. | |
26 | ;;; | |
27 | ;;; You should have received a copy of the GNU General Public License | |
28 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
29 | ||
1ffa7090 | 30 | (define-module (gnu packages python) |
011b18c3 | 31 | #:use-module ((guix licenses) |
45203542 | 32 | #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style |
b8050e71 | 33 | gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+ |
feb0d9c3 | 34 | isc psfl public-domain x11-style)) |
bd3fa666 | 35 | #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) |
3fdc99da | 36 | #:use-module (gnu packages) |
89b2e0b0 | 37 | #:use-module (gnu packages attr) |
1ffa7090 | 38 | #:use-module (gnu packages compression) |
4ed20663 | 39 | #:use-module (gnu packages databases) |
4ed20663 | 40 | #:use-module (gnu packages fontutils) |
3fdc99da | 41 | #:use-module (gnu packages gdbm) |
4ed20663 AE |
42 | #:use-module (gnu packages gcc) |
43 | #:use-module (gnu packages ghostscript) | |
44 | #:use-module (gnu packages glib) | |
45 | #:use-module (gnu packages gtk) | |
421a80a2 | 46 | #:use-module (gnu packages icu4c) |
c937562e | 47 | #:use-module (gnu packages image) |
4ed20663 | 48 | #:use-module (gnu packages imagemagick) |
b10ab723 | 49 | #:use-module (gnu packages libffi) |
89b2e0b0 | 50 | #:use-module (gnu packages linux) |
0da98533 | 51 | #:use-module (gnu packages maths) |
4ed20663 | 52 | #:use-module (gnu packages multiprecision) |
45203542 | 53 | #:use-module (gnu packages networking) |
be7134bf | 54 | #:use-module (gnu packages ncurses) |
c9b1b4f9 | 55 | #:use-module (gnu packages pcre) |
4ed20663 | 56 | #:use-module (gnu packages perl) |
b10ab723 | 57 | #:use-module (gnu packages pkg-config) |
4ed20663 | 58 | #:use-module (gnu packages readline) |
c9b1b4f9 | 59 | #:use-module (gnu packages statistics) |
1c65314c FB |
60 | #:use-module (gnu packages texlive) |
61 | #:use-module (gnu packages texinfo) | |
cc2b77df | 62 | #:use-module (gnu packages tls) |
8d12be1e | 63 | #:use-module (gnu packages web) |
ce0614dd | 64 | #:use-module (gnu packages base) |
26b307e2 | 65 | #:use-module (gnu packages xml) |
6fa14469 | 66 | #:use-module (gnu packages xorg) |
4ed20663 | 67 | #:use-module (gnu packages zip) |
a01b6da7 NK |
68 | #:use-module (guix packages) |
69 | #:use-module (guix download) | |
ea5456c8 | 70 | #:use-module (guix git-download) |
11bb85a1 | 71 | #:use-module (guix utils) |
acc26ff1 | 72 | #:use-module (guix build-system gnu) |
898238b9 | 73 | #:use-module (guix build-system python) |
1c65314c FB |
74 | #:use-module (guix build-system trivial) |
75 | #:use-module (srfi srfi-1)) | |
a01b6da7 | 76 | |
b24d1cfc | 77 | (define-public python-2 |
a01b6da7 NK |
78 | (package |
79 | (name "python") | |
ff6f33cf | 80 | (version "2.7.10") |
a01b6da7 NK |
81 | (source |
82 | (origin | |
83 | (method url-fetch) | |
9b43a0ff | 84 | (uri (string-append "https://www.python.org/ftp/python/" |
a01b6da7 NK |
85 | version "/Python-" version ".tar.xz")) |
86 | (sha256 | |
87 | (base32 | |
ff6f33cf | 88 | "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw")))) |
a01b6da7 | 89 | (build-system gnu-build-system) |
3fdc99da | 90 | (arguments |
af807dea | 91 | `(#:tests? #f |
ff6f33cf ED |
92 | ;; 268 tests OK. |
93 | ;; 103 tests failed: | |
94 | ;; test_distutils test_shutil test_signal test_site test_slice | |
95 | ;; test_smtplib test_smtpnet test_socket test_socketserver | |
96 | ;; test_softspace test_sort test_spwd test_sqlite test_ssl | |
97 | ;; test_startfile test_stat test_str test_strftime test_string | |
98 | ;; test_stringprep test_strop test_strptime test_strtod test_struct | |
99 | ;; test_structmembers test_structseq test_subprocess test_sunau | |
100 | ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys | |
101 | ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile | |
102 | ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread | |
103 | ;; test_threaded_import test_threadedtempfile test_threading | |
104 | ;; test_threading_local test_threadsignals test_time test_timeit | |
105 | ;; test_timeout test_tk test_tokenize test_tools test_trace | |
106 | ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly | |
107 | ;; test_tuple test_typechecks test_ucn test_unary | |
108 | ;; test_undocumented_details test_unicode test_unicode_file | |
109 | ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack | |
110 | ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net | |
111 | ;; test_urllibnet test_urlparse test_userdict test_userlist | |
112 | ;; test_userstring test_uu test_uuid test_wait3 test_wait4 | |
113 | ;; test_warnings test_wave test_weakref test_weakset test_whichdb | |
114 | ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib | |
115 | ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc | |
116 | ;; test_xpickle test_xrange test_zipfile test_zipfile64 | |
117 | ;; test_zipimport test_zipimport_support test_zlib | |
118 | ;; 30 tests skipped: | |
119 | ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185 | |
120 | ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk | |
121 | ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt | |
122 | ;; test_curses test_dl test_gdb test_gl test_idle test_imageop | |
123 | ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos | |
124 | ;; test_macostools test_msilib test_nis test_ossaudiodev | |
125 | ;; test_scriptpackages | |
126 | ;; 6 skips unexpected on linux2: | |
127 | ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl | |
128 | ;; One of the typical errors: | |
129 | ;; test_unicode | |
130 | ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No | |
131 | ;; such file or directory | |
af807dea | 132 | #:test-target "test" |
3fdc99da CR |
133 | #:configure-flags |
134 | (let ((bz2 (assoc-ref %build-inputs "bzip2")) | |
135 | (gdbm (assoc-ref %build-inputs "gdbm")) | |
b10ab723 | 136 | (libffi (assoc-ref %build-inputs "libffi")) |
b88e1b0a | 137 | (sqlite (assoc-ref %build-inputs "sqlite")) |
3fdc99da CR |
138 | (openssl (assoc-ref %build-inputs "openssl")) |
139 | (readline (assoc-ref %build-inputs "readline")) | |
1f434457 MW |
140 | (zlib (assoc-ref %build-inputs "zlib")) |
141 | (out (assoc-ref %outputs "out"))) | |
fd982732 | 142 | (list "--enable-shared" ; allow embedding |
b10ab723 | 143 | "--with-system-ffi" ; build ctypes |
fd982732 | 144 | (string-append "CPPFLAGS=" |
3fdc99da CR |
145 | "-I" bz2 "/include " |
146 | "-I" gdbm "/include " | |
b88e1b0a | 147 | "-I" sqlite "/include " |
3fdc99da CR |
148 | "-I" openssl "/include " |
149 | "-I" readline "/include " | |
150 | "-I" zlib "/include") | |
151 | (string-append "LDFLAGS=" | |
152 | "-L" bz2 "/lib " | |
153 | "-L" gdbm "/lib " | |
b10ab723 | 154 | "-L" libffi "/lib " |
b88e1b0a | 155 | "-L" sqlite "/lib " |
3fdc99da CR |
156 | "-L" openssl "/lib " |
157 | "-L" readline "/lib " | |
1f434457 MW |
158 | "-L" zlib "/lib " |
159 | "-Wl,-rpath=" out "/lib"))) | |
fd982732 | 160 | |
46472ecd MW |
161 | #:modules ((ice-9 ftw) |
162 | ,@%gnu-build-system-modules) | |
fd982732 | 163 | #:phases |
46472ecd MW |
164 | (modify-phases %standard-phases |
165 | (add-before | |
166 | 'configure 'patch-lib-shells | |
167 | (lambda _ | |
168 | ;; Filter for existing files, since some may not exist in all | |
169 | ;; versions of python that are built with this recipe. | |
170 | (substitute* (filter file-exists? | |
171 | '("Lib/subprocess.py" | |
172 | "Lib/popen2.py" | |
173 | "Lib/distutils/tests/test_spawn.py" | |
174 | "Lib/test/test_subprocess.py")) | |
175 | (("/bin/sh") (which "sh"))) | |
176 | #t)) | |
14f8dae6 LC |
177 | (add-before |
178 | 'install 'do-not-record-configure-flags | |
179 | (lambda _ | |
180 | ;; Remove configure flags from '_sysconfigdata.py' so we don't | |
181 | ;; end up keeping references to the build tools. | |
182 | (substitute* (find-files "." "sysconfigdata\\.py$") | |
183 | (("'CONFIG_ARGS':.*") | |
184 | "'CONFIG_ARGS': \"\",\n")) | |
185 | #t)) | |
186 | (add-after | |
187 | 'install 'do-not-record-configure-flags-in-makefile | |
188 | (lambda* (#:key outputs #:allow-other-keys) | |
189 | ;; Likewise. | |
190 | (let ((out (assoc-ref outputs "out"))) | |
191 | (substitute* (find-files out "^Makefile$") | |
192 | (("^CONFIG_ARGS[[:blank:]]*=.*$") | |
193 | "CONFIG_ARGS =\n")) | |
194 | #t))) | |
46472ecd MW |
195 | (add-before |
196 | 'check 'pre-check | |
197 | (lambda _ | |
198 | ;; 'Lib/test/test_site.py' needs a valid $HOME | |
199 | (setenv "HOME" (getcwd)) | |
200 | #t)) | |
201 | (add-after | |
202 | 'unpack 'set-source-file-times-to-1980 | |
203 | ;; XXX One of the tests uses a ZIP library to pack up some of the | |
204 | ;; source tree, and fails with "ZIP does not support timestamps | |
205 | ;; before 1980". Work around this by setting the file times in the | |
206 | ;; source tree to sometime in early 1980. | |
207 | (lambda _ | |
208 | (let ((circa-1980 (* 10 366 24 60 60))) | |
209 | (ftw "." (lambda (file stat flag) | |
210 | (utime file circa-1980 circa-1980) | |
211 | #t)) | |
212 | #t)))))) | |
a01b6da7 | 213 | (inputs |
3fdc99da CR |
214 | `(("bzip2" ,bzip2) |
215 | ("gdbm" ,gdbm) | |
b10ab723 | 216 | ("libffi" ,libffi) ; for ctypes |
b88e1b0a | 217 | ("sqlite" ,sqlite) ; for sqlite extension |
a01b6da7 | 218 | ("openssl" ,openssl) |
3fdc99da | 219 | ("readline" ,readline) |
1f434457 | 220 | ("zlib" ,zlib))) |
b10ab723 CR |
221 | (native-inputs |
222 | `(("pkg-config" ,pkg-config))) | |
9be8d7c8 LC |
223 | (native-search-paths |
224 | (list (search-path-specification | |
225 | (variable "PYTHONPATH") | |
af070955 | 226 | (files '("lib/python2.7/site-packages"))))) |
a01b6da7 NK |
227 | (home-page "http://python.org") |
228 | (synopsis | |
35b9e423 | 229 | "High-level, dynamically-typed programming language") |
a01b6da7 NK |
230 | (description |
231 | "Python is a remarkably powerful dynamic programming language that | |
232 | is used in a wide variety of application domains. Some of its key | |
233 | distinguishing features include: clear, readable syntax; strong | |
234 | introspection capabilities; intuitive object orientation; natural | |
235 | expression of procedural code; full modularity, supporting hierarchical | |
236 | packages; exception-based error handling; and very high level dynamic | |
237 | data types.") | |
238 | (license psfl))) | |
acc26ff1 | 239 | |
b24d1cfc AE |
240 | (define-public python |
241 | (package (inherit python-2) | |
08c04509 | 242 | (version "3.4.3") |
717003e3 LC |
243 | (source (origin |
244 | (method url-fetch) | |
245 | (uri (string-append "https://www.python.org/ftp/python/" | |
246 | version "/Python-" version ".tar.xz")) | |
4c50e5ab MW |
247 | (patches (list (search-patch "python-fix-tests.patch") |
248 | ;; XXX Try removing this patch for python > 3.4.3 | |
249 | (search-patch "python-disable-ssl-test.patch"))) | |
717003e3 LC |
250 | (patch-flags '("-p0")) |
251 | (sha256 | |
252 | (base32 | |
08c04509 | 253 | "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm")))) |
1f434457 MW |
254 | (arguments (substitute-keyword-arguments (package-arguments python-2) |
255 | ((#:tests? _) #t))) | |
1aebc0cb AE |
256 | (native-search-paths |
257 | (list (search-path-specification | |
258 | (variable "PYTHONPATH") | |
0e05d01e SB |
259 | (files (list (string-append "lib/python" |
260 | (version-major+minor version) | |
261 | "/site-packages")))))))) | |
f26a77ff | 262 | |
898238b9 AE |
263 | (define-public python-wrapper |
264 | (package (inherit python) | |
265 | (name "python-wrapper") | |
266 | (source #f) | |
267 | (build-system trivial-build-system) | |
3c0f2329 | 268 | (propagated-inputs `(("python" ,python))) |
898238b9 AE |
269 | (arguments |
270 | `(#:modules ((guix build utils)) | |
271 | #:builder | |
272 | (begin | |
273 | (use-modules (guix build utils)) | |
274 | (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
275 | (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) | |
276 | (mkdir-p bin) | |
277 | (for-each | |
278 | (lambda (old new) | |
279 | (symlink (string-append python old) | |
280 | (string-append bin "/" new))) | |
281 | `("python3", "pydoc3", "idle3") | |
282 | `("python", "pydoc", "idle")))))) | |
0d56e3e1 LC |
283 | (synopsis "Wrapper for the Python 3 commands") |
284 | (description | |
285 | "This package provides wrappers for the commands of Python@tie{}3.x such | |
286 | that they can be invoked under their usual name---e.g., @command{python} | |
287 | instead of @command{python3}."))) | |
288 | ||
898238b9 | 289 | |
aaf625b8 RW |
290 | (define-public python-psutil |
291 | (package | |
292 | (name "python-psutil") | |
293 | (version "3.0.1") | |
294 | (source | |
295 | (origin | |
296 | (method url-fetch) | |
297 | (uri (string-append | |
298 | "https://pypi.python.org/packages/source/p/psutil/psutil-" | |
299 | version ".tar.gz")) | |
300 | (sha256 | |
301 | (base32 | |
302 | "00c8h1mzqysih99z8pnbmdv117d2naldf11yjy50dhykxsf3n89z")))) | |
303 | (build-system python-build-system) | |
304 | (native-inputs | |
305 | `(("python-setuptools" ,python-setuptools))) | |
306 | (home-page "https://pypi.python.org/pypi/psutil/") | |
307 | (synopsis "Library for retrieving information on running processes") | |
308 | (description | |
309 | "psutil (Python system and process utilities) is a library for retrieving | |
310 | information on running processes and system utilization (CPU, memory, disks, | |
311 | network) in Python. It is useful mainly for system monitoring, profiling and | |
312 | limiting process resources and management of running processes. It implements | |
313 | many functionalities offered by command line tools such as: ps, top, lsof, | |
314 | netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, | |
315 | pidof, tty, taskset, pmap.") | |
316 | (license bsd-3))) | |
317 | ||
318 | (define-public python2-psutil | |
319 | (package-with-python2 python-psutil)) | |
898238b9 | 320 | |
f9da1d8a ED |
321 | (define-public python-passlib |
322 | (package | |
323 | (name "python-passlib") | |
324 | (version "1.6.2") | |
325 | (source | |
326 | (origin | |
327 | (method url-fetch) | |
328 | (uri (string-append | |
329 | "https://pypi.python.org/packages/source/p/passlib/passlib-" | |
330 | version | |
331 | ".tar.gz")) | |
332 | (sha256 | |
333 | (base32 | |
334 | "0b9rd161b3mmiwd7nx1v599yh9sp07mlfwac65sjy9qn1l0gd1z9")))) | |
335 | (build-system python-build-system) | |
336 | (native-inputs | |
337 | `(("python-nose" ,python-nose) | |
338 | ("python-setuptools" ,python-setuptools))) | |
339 | (inputs | |
340 | `(("python-py-bcrypt" ,python-py-bcrypt))) | |
341 | (arguments | |
342 | `(#:phases | |
343 | (alist-cons-before | |
344 | 'check 'set-PYTHON_EGG_CACHE | |
345 | ;; some tests require access to "$HOME/.cython" | |
346 | (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp")) | |
347 | %standard-phases))) | |
348 | (home-page "https://bitbucket.org/ecollins/passlib") | |
349 | (synopsis | |
350 | "Comprehensive password hashing framework") | |
351 | (description | |
352 | "Passlib is a password hashing library for Python 2 & 3, which provides | |
353 | cross-platform implementations of over 30 password hashing algorithms, as well | |
354 | as a framework for managing existing password hashes. It's designed to be | |
355 | useful for a wide range of tasks, from verifying a hash found in /etc/shadow, | |
356 | to providing full-strength password hashing for multi-user application.") | |
357 | (license bsd-3))) | |
358 | ||
359 | (define-public python2-passlib | |
360 | (package-with-python2 python-passlib)) | |
361 | ||
feb0d9c3 ED |
362 | (define-public python-py-bcrypt |
363 | (package | |
364 | (name "python-py-bcrypt") | |
365 | (version "0.4") | |
366 | (source | |
367 | (origin | |
368 | (method url-fetch) | |
369 | (uri (string-append | |
370 | "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-" | |
371 | version | |
372 | ".tar.gz")) | |
373 | (sha256 | |
374 | (base32 | |
375 | "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az")))) | |
376 | (build-system python-build-system) | |
377 | (native-inputs | |
378 | `(("python-setuptools" ,python-setuptools))) | |
379 | (home-page "https://code.google.com/p/py-bcrypt") | |
380 | (synopsis | |
381 | "Bcrypt password hashing and key derivation") | |
382 | (description | |
383 | "A python wrapper of OpenBSD's Blowfish password hashing code. This | |
384 | system hashes passwords using a version of Bruce Schneier's Blowfish block | |
385 | cipher with modifications designed to raise the cost of off-line password | |
386 | cracking and frustrate fast hardware implementation. The computation cost of | |
387 | the algorithm is parametised, so it can be increased as computers get faster. | |
388 | The intent is to make a compromise of a password database less likely to | |
389 | result in an attacker gaining knowledge of the plaintext passwords (e.g. using | |
390 | John the Ripper).") | |
391 | ;; "sha2.c" is under BSD-3; | |
392 | ;; "blowfish.c" and "bcrypt.c" are under BSD-4; | |
393 | ;; the rest is under ISC. | |
394 | (license (list isc bsd-3 bsd-4)))) | |
395 | ||
396 | (define-public python2-py-bcrypt | |
397 | (package-with-python2 python-py-bcrypt)) | |
398 | ||
399 | ||
429fdea1 ED |
400 | (define-public python-paramiko |
401 | (package | |
402 | (name "python-paramiko") | |
403 | (version "1.15.2") | |
404 | (source | |
405 | (origin | |
406 | (method url-fetch) | |
407 | (uri (string-append | |
408 | "https://pypi.python.org/packages/source/p/paramiko/paramiko-" | |
409 | version | |
410 | ".tar.gz")) | |
411 | (sha256 | |
412 | (base32 | |
413 | "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg")))) | |
414 | (build-system python-build-system) | |
415 | (native-inputs | |
416 | `(("python-setuptools" ,python-setuptools))) | |
417 | (inputs | |
418 | `(("python-ecdsa" ,python-ecdsa) | |
419 | ("python-pycrypto" ,python-pycrypto))) | |
420 | (home-page "http://www.paramiko.org/") | |
421 | (synopsis "SSHv2 protocol library") | |
422 | (description "Paramiko is a python implementation of the SSHv2 protocol, | |
423 | providing both client and server functionality. While it leverages a Python C | |
424 | extension for low level cryptography (PyCrypto), Paramiko itself is a pure | |
425 | Python interface around SSH networking concepts.") | |
426 | (license lgpl2.1+))) | |
427 | ||
428 | (define-public python2-paramiko | |
429 | (package-with-python2 python-paramiko)) | |
430 | ||
431 | ||
de73dbf6 ED |
432 | (define-public python-httplib2 |
433 | (package | |
434 | (name "python-httplib2") | |
435 | (version "0.9.1") | |
436 | (source | |
437 | (origin | |
438 | (method url-fetch) | |
439 | (uri (string-append | |
440 | "https://pypi.python.org/packages/source/h/httplib2/httplib2-" | |
441 | version | |
442 | ".tar.gz")) | |
443 | (sha256 | |
444 | (base32 | |
445 | "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw")))) | |
446 | (build-system python-build-system) | |
447 | (native-inputs | |
448 | `(("python-setuptools" ,python-setuptools))) | |
449 | (home-page | |
450 | "https://github.com/jcgregorio/httplib2") | |
451 | (synopsis "Comprehensive HTTP client library") | |
452 | (description | |
453 | "A comprehensive HTTP client library supporting many features left out of | |
454 | other HTTP libraries.") | |
455 | (license license:expat))) | |
456 | ||
457 | (define-public python2-httplib2 | |
458 | (package-with-python2 python-httplib2)) | |
459 | ||
67039875 ED |
460 | (define-public python-ecdsa |
461 | (package | |
462 | (name "python-ecdsa") | |
463 | (version "0.13") | |
464 | (source | |
465 | (origin | |
466 | (method url-fetch) | |
467 | (uri (string-append | |
468 | "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-" | |
469 | version | |
470 | ".tar.gz")) | |
471 | (sha256 | |
472 | (base32 | |
473 | "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4")))) | |
474 | (build-system python-build-system) | |
475 | (native-inputs | |
476 | `(("python-setuptools" ,python-setuptools))) | |
477 | (inputs | |
478 | `(("openssl" ,openssl))) | |
479 | (home-page | |
480 | "http://github.com/warner/python-ecdsa") | |
481 | (synopsis | |
482 | "ECDSA cryptographic signature library (pure python)") | |
483 | (description | |
484 | "This is an easy-to-use implementation of ECDSA cryptography (Elliptic | |
485 | Curve Digital Signature Algorithm), implemented purely in Python. With this | |
486 | library, you can quickly create keypairs (signing key and verifying key), sign | |
487 | messages, and verify the signatures. The keys and signatures are very short, | |
488 | making them easy to handle and incorporate into other protocols.") | |
489 | (license license:expat))) | |
490 | ||
491 | (define-public python2-ecdsa | |
492 | (package-with-python2 python-ecdsa)) | |
493 | ||
52323f32 ED |
494 | (define-public python-ccm |
495 | (package | |
496 | (name "python-ccm") | |
497 | (version "2.0.4.1") | |
498 | (source | |
499 | (origin | |
500 | (method url-fetch) | |
501 | (uri (string-append | |
502 | "https://pypi.python.org/packages/source/c/ccm/ccm-" | |
503 | version | |
504 | ".tar.gz")) | |
505 | (sha256 | |
506 | (base32 | |
507 | "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9")))) | |
508 | (build-system python-build-system) | |
509 | (native-inputs | |
510 | `(("python-setuptools" ,python-setuptools))) | |
511 | (inputs | |
512 | `(("python-pyyaml" ,python-pyyaml) | |
513 | ("python-six" ,python-six))) | |
514 | (home-page "https://github.com/pcmanus/ccm") | |
515 | (synopsis "Cassandra Cluster Manager") | |
516 | (description "A script/library to create, launch and remove an Apache | |
517 | Cassandra cluster on localhost.") | |
518 | (license asl2.0))) | |
519 | ||
520 | (define-public python2-ccm | |
521 | (package-with-python2 python-ccm)) | |
522 | ||
89114f39 | 523 | (define-public python-pytz |
acc26ff1 | 524 | (package |
89114f39 | 525 | (name "python-pytz") |
acc26ff1 CR |
526 | (version "2013b") |
527 | (source | |
528 | (origin | |
529 | (method url-fetch) | |
530 | (uri (string-append "https://launchpad.net/pytz/main/" version | |
531 | "/+download/pytz-" version ".tar.bz2")) | |
532 | (sha256 | |
533 | (base32 | |
534 | "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5")))) | |
535 | (build-system python-build-system) | |
8498b8cf | 536 | (arguments `(#:tests? #f)) ; no test target |
acc26ff1 | 537 | (home-page "https://launchpad.net/pytz") |
9e771e3b | 538 | (synopsis "Python timezone library") |
acc26ff1 CR |
539 | (description |
540 | "This library allows accurate and cross platform timezone calculations | |
541 | using Python 2.4 or higher and provides access to the Olson timezone database.") | |
542 | (license x11))) | |
5ace6e2f | 543 | |
89114f39 | 544 | (define-public python2-pytz |
11bb85a1 | 545 | (package-with-python2 python-pytz)) |
89114f39 | 546 | |
fc50e9c6 | 547 | |
89114f39 | 548 | (define-public python-babel |
5ace6e2f | 549 | (package |
89114f39 | 550 | (name "python-babel") |
e1804763 | 551 | (version "1.3") |
5ace6e2f CR |
552 | (source |
553 | (origin | |
554 | (method url-fetch) | |
e1804763 | 555 | (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-" |
5ace6e2f CR |
556 | version ".tar.gz")) |
557 | (sha256 | |
558 | (base32 | |
e1804763 | 559 | "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz")))) |
5ace6e2f CR |
560 | (build-system python-build-system) |
561 | (inputs | |
e1804763 AE |
562 | `(("python-pytz" ,python-pytz) |
563 | ("python-setuptools" ,python-setuptools))) | |
8498b8cf | 564 | (arguments `(#:tests? #f)) ; no test target |
e1804763 | 565 | (home-page "http://babel.pocoo.org/") |
5ace6e2f CR |
566 | (synopsis |
567 | "Tools for internationalizing Python applications") | |
568 | (description | |
569 | "Babel is composed of two major parts: | |
570 | - tools to build and work with gettext message catalogs | |
571 | - a Python interface to the CLDR (Common Locale Data Repository), providing | |
572 | access to various locale display names, localized number and date formatting, | |
573 | etc. ") | |
574 | (license bsd-3))) | |
89114f39 AE |
575 | |
576 | (define-public python2-babel | |
11bb85a1 | 577 | (package-with-python2 python-babel)) |
73adf220 | 578 | |
ed377cc6 RW |
579 | (define-public python2-backport-ssl-match-hostname |
580 | (package | |
581 | (name "python2-backport-ssl-match-hostname") | |
582 | (version "3.4.0.2") | |
583 | (source | |
584 | (origin | |
585 | (method url-fetch) | |
586 | (uri (string-append | |
587 | "https://pypi.python.org/packages/source/b/" | |
588 | "backports.ssl_match_hostname/backports.ssl_match_hostname-" | |
589 | version ".tar.gz")) | |
590 | (sha256 | |
591 | (base32 | |
592 | "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87")))) | |
593 | (build-system python-build-system) | |
594 | (arguments `(#:python ,python-2)) | |
595 | (inputs | |
596 | `(("python2-setuptools" ,python2-setuptools))) | |
597 | (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname") | |
598 | (synopsis "Backport of ssl.match_hostname() function from Python 3.4") | |
599 | (description | |
600 | "This backport brings the ssl.match_hostname() function to users of | |
601 | earlier versions of Python. The function checks the hostname in the | |
602 | certificate returned by the server to which a connection has been established, | |
603 | and verifies that it matches the intended target hostname.") | |
604 | (license psfl))) | |
605 | ||
ef5cbf9b RW |
606 | (define-public python-h5py |
607 | (package | |
608 | (name "python-h5py") | |
609 | (version "2.4.0") | |
610 | (source | |
611 | (origin | |
612 | (method url-fetch) | |
613 | (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-" | |
614 | version ".tar.gz")) | |
615 | (sha256 | |
616 | (base32 | |
617 | "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps")))) | |
618 | (build-system python-build-system) | |
619 | (inputs | |
620 | `(("python-cython" ,python-cython) | |
621 | ("python-numpy" ,python-numpy) | |
622 | ("hdf5" ,hdf5))) | |
623 | (native-inputs | |
624 | `(("python-setuptools" ,python-setuptools))) | |
625 | (arguments `(#:tests? #f)) ; no test target | |
626 | (home-page "http://www.h5py.org/") | |
627 | (synopsis "Read and write HDF5 files from Python") | |
628 | (description | |
629 | "The h5py package provides both a high- and low-level interface to the | |
630 | HDF5 library from Python. The low-level interface is intended to be a | |
631 | complete wrapping of the HDF5 API, while the high-level component supports | |
632 | access to HDF5 files, datasets and groups using established Python and NumPy | |
633 | concepts.") | |
634 | (license bsd-3))) | |
635 | ||
636 | (define-public python2-h5py | |
637 | (let ((h5py (package-with-python2 python-h5py))) | |
638 | (package (inherit h5py) | |
639 | (inputs | |
640 | `(("python2-numpy" ,python2-numpy) | |
641 | ,@(alist-delete | |
642 | "python-numpy" | |
643 | (package-inputs h5py))))))) | |
644 | ||
c1448c69 EB |
645 | (define-public python-lockfile |
646 | (package | |
647 | (name "python-lockfile") | |
648 | (version "0.9.1") | |
649 | (source | |
650 | (origin | |
651 | (method url-fetch) | |
652 | (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/" | |
653 | "lockfile-" version ".tar.gz")) | |
654 | (sha256 | |
655 | (base32 | |
656 | "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3")))) | |
657 | (build-system python-build-system) | |
658 | (arguments '(#:test-target "check")) | |
659 | (home-page "http://code.google.com/p/pylockfile/") | |
660 | (synopsis "Platform-independent file locking module") | |
661 | (description | |
662 | "The lockfile package exports a LockFile class which provides a simple | |
663 | API for locking files.") | |
bd3fa666 | 664 | (license license:expat))) |
c1448c69 EB |
665 | |
666 | (define-public python2-lockfile | |
667 | (package-with-python2 python-lockfile)) | |
668 | ||
5a1a4bf6 EB |
669 | (define-public python-mock |
670 | (package | |
671 | (name "python-mock") | |
672 | (version "1.0.1") | |
673 | (source | |
674 | (origin | |
675 | (method url-fetch) | |
676 | (uri (string-append "https://pypi.python.org/packages/source/m/mock/" | |
677 | "mock-" version ".tar.gz")) | |
678 | (sha256 | |
679 | (base32 | |
680 | "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq")))) | |
681 | (build-system python-build-system) | |
682 | (arguments '(#:test-target "check")) | |
07af3e5e | 683 | (home-page "http://code.google.com/p/mock/") |
9e771e3b | 684 | (synopsis "Python mocking and patching library for testing") |
5a1a4bf6 EB |
685 | (description |
686 | "Mock is a library for testing in Python. It allows you to replace parts | |
687 | of your system under test with mock objects and make assertions about how they | |
688 | have been used.") | |
bd3fa666 | 689 | (license license:expat))) |
5a1a4bf6 EB |
690 | |
691 | (define-public python2-mock | |
692 | (package-with-python2 python-mock)) | |
693 | ||
fc50e9c6 | 694 | |
73adf220 AE |
695 | (define-public python-setuptools |
696 | (package | |
697 | (name "python-setuptools") | |
62a9a23b | 698 | (version "18.3.1") |
73adf220 AE |
699 | (source |
700 | (origin | |
701 | (method url-fetch) | |
702 | (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-" | |
703 | version ".tar.gz")) | |
704 | (sha256 | |
705 | (base32 | |
62a9a23b | 706 | "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig")))) |
73adf220 | 707 | (build-system python-build-system) |
d3d656c5 AE |
708 | ;; FIXME: Tests require pytest, which itself relies on setuptools. |
709 | ;; One could bootstrap with an internal untested setuptools. | |
73adf220 | 710 | (arguments |
824af8ca | 711 | `(#:tests? #f)) |
73adf220 AE |
712 | (home-page "https://pypi.python.org/pypi/setuptools") |
713 | (synopsis | |
714 | "Library designed to facilitate packaging Python projects") | |
715 | (description | |
716 | "Setuptools is a fully-featured, stable library designed to facilitate | |
717 | packaging Python projects, where packaging includes: | |
718 | Python package and module definitions, | |
719 | distribution package metadata, | |
720 | test hooks, | |
721 | project installation, | |
722 | platform-specific details, | |
723 | Python 3 support.") | |
724 | (license psfl))) | |
725 | ||
726 | (define-public python2-setuptools | |
727 | (package-with-python2 python-setuptools)) | |
fc50e9c6 AE |
728 | |
729 | ||
cafc3f5a EB |
730 | (define-public python-pycrypto |
731 | (package | |
732 | (name "python-pycrypto") | |
733 | (version "2.6.1") | |
734 | (source | |
735 | (origin | |
736 | (method url-fetch) | |
737 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
738 | "pycrypto/pycrypto-" version ".tar.gz")) | |
739 | (sha256 | |
740 | (base32 | |
741 | "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj")))) | |
742 | (build-system python-build-system) | |
743 | (native-inputs | |
744 | `(("python-setuptools" ,python-setuptools))) | |
745 | (inputs | |
746 | `(("python" ,python) | |
747 | ("gmp" ,gmp))) | |
748 | (arguments | |
749 | `(#:phases | |
750 | (alist-cons-before | |
751 | 'build 'set-build-env | |
752 | ;; pycrypto runs an autoconf configure script behind the scenes | |
753 | (lambda _ | |
754 | (setenv "CONFIG_SHELL" (which "bash"))) | |
755 | %standard-phases))) | |
756 | (home-page "http://www.pycrypto.org/") | |
757 | (synopsis "Cryptographic modules for Python") | |
758 | (description | |
759 | "Pycrypto is a collection of both secure hash functions (such as SHA256 | |
760 | and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, | |
35b9e423 | 761 | etc.). The package is structured to make adding new modules easy.") |
cafc3f5a EB |
762 | (license public-domain))) |
763 | ||
345f0611 ED |
764 | (define-public python2-pycrypto |
765 | (package-with-python2 python-pycrypto)) | |
766 | ||
cafc3f5a EB |
767 | (define-public python-keyring |
768 | (package | |
769 | (name "python-keyring") | |
770 | (version "3.8") | |
771 | (source | |
772 | (origin | |
773 | (method url-fetch) | |
774 | (uri (string-append "https://pypi.python.org/packages/source/k/" | |
775 | "keyring/keyring-" version ".zip")) | |
776 | (sha256 | |
777 | (base32 | |
778 | "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg")))) | |
779 | (build-system python-build-system) | |
780 | (native-inputs | |
781 | `(("unzip" ,unzip) | |
782 | ("python-setuptools" ,python-setuptools) | |
783 | ("python-mock" ,python-mock))) | |
784 | (inputs | |
785 | `(("python-pycrypto" ,python-pycrypto))) | |
786 | (arguments | |
787 | `(#:tests? #f ;TODO: tests require pytest | |
788 | #:phases | |
789 | (alist-replace | |
790 | 'unpack | |
791 | (lambda _ | |
792 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
793 | "/bin/unzip")) | |
794 | (source (assoc-ref %build-inputs "source"))) | |
795 | (and (zero? (system* unzip source)) | |
796 | (chdir (string-append "keyring-" ,version))))) | |
797 | %standard-phases))) | |
798 | (home-page "http://bitbucket.org/kang/python-keyring-lib") | |
799 | (synopsis "Store and access your passwords safely") | |
800 | (description | |
801 | "The Python keyring lib provides a easy way to access the system keyring | |
35b9e423 | 802 | service from python. It can be used in any application that needs safe |
cafc3f5a EB |
803 | password storage.") |
804 | ;; "MIT" and PSF dual license | |
805 | (license x11))) | |
806 | ||
d7af1069 CR |
807 | (define-public python2-keyring |
808 | (package-with-python2 python-keyring)) | |
809 | ||
a480bc41 EB |
810 | (define-public python-six |
811 | (package | |
812 | (name "python-six") | |
98bdee67 | 813 | (version "1.9.0") |
a480bc41 EB |
814 | (source |
815 | (origin | |
816 | (method url-fetch) | |
817 | (uri (string-append "https://pypi.python.org/packages/source/s/" | |
818 | "six/six-" version ".tar.gz")) | |
819 | (sha256 | |
820 | (base32 | |
98bdee67 | 821 | "1mci5i8mjqmljmv33h0q3d4djc13zk1kfmb3fbvd3yy43x0m4h72")))) |
a480bc41 EB |
822 | (build-system python-build-system) |
823 | (inputs | |
824 | `(("python-setuptools" ,python-setuptools))) | |
825 | (home-page "http://pypi.python.org/pypi/six/") | |
826 | (synopsis "Python 2 and 3 compatibility utilities") | |
827 | (description | |
35b9e423 | 828 | "Six is a Python 2 and 3 compatibility library. It provides utility |
a480bc41 EB |
829 | functions for smoothing over the differences between the Python versions with |
830 | the goal of writing Python code that is compatible on both Python versions. | |
35b9e423 | 831 | Six supports every Python version since 2.5. It is contained in only one |
a480bc41 EB |
832 | Python file, so it can be easily copied into your project.") |
833 | (license x11))) | |
834 | ||
0c20025c AE |
835 | (define-public python2-six |
836 | (package-with-python2 python-six)) | |
837 | ||
cafc3f5a EB |
838 | (define-public python-dateutil-2 |
839 | (package | |
840 | (name "python-dateutil") | |
841 | (version "2.2") | |
842 | (source | |
843 | (origin | |
844 | (method url-fetch) | |
845 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
846 | name "/" name "-" version ".tar.gz")) | |
847 | (sha256 | |
848 | (base32 | |
849 | "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f")))) | |
850 | (build-system python-build-system) | |
851 | (inputs | |
852 | `(("python-setuptools" ,python-setuptools) | |
853 | ("python-six" ,python-six))) | |
854 | (home-page "http://labix.org/python-dateutil") | |
855 | (synopsis "Extensions to the standard datetime module") | |
856 | (description | |
857 | "The dateutil module provides powerful extensions to the standard | |
858 | datetime module, available in Python 2.3+.") | |
859 | (license bsd-3))) | |
860 | ||
861 | (define-public python2-dateutil-2 | |
862 | (package-with-python2 python-dateutil-2)) | |
863 | ||
fc50e9c6 AE |
864 | (define-public python-dateutil |
865 | (package | |
866 | (name "python-dateutil") | |
867 | (version "1.5") ; last version for python < 3 | |
868 | (source | |
869 | (origin | |
870 | (method url-fetch) | |
cafc3f5a EB |
871 | (uri (string-append "http://labix.org/download/python-dateutil/" |
872 | "python-dateutil-" version ".tar.gz")) | |
fc50e9c6 AE |
873 | (sha256 |
874 | (base32 | |
875 | "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0")))) | |
876 | (build-system python-build-system) | |
877 | (inputs | |
878 | `(("python-setuptools" ,python-setuptools))) | |
879 | (home-page "http://labix.org/python-dateutil") | |
cafc3f5a | 880 | (synopsis "Extensions to the standard datetime module") |
fc50e9c6 AE |
881 | (description |
882 | "The dateutil module provides powerful extensions to the standard | |
883 | datetime module, available in Python 2.3+.") | |
884 | (license psfl))) | |
885 | ||
886 | (define-public python2-dateutil | |
887 | (package-with-python2 python-dateutil)) | |
1d08c01f | 888 | |
cafc3f5a EB |
889 | (define-public python-parsedatetime |
890 | (package | |
891 | (name "python-parsedatetime") | |
892 | (version "1.2") | |
893 | (source | |
894 | (origin | |
895 | (method url-fetch) | |
896 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
897 | "parsedatetime/parsedatetime-" version ".tar.gz")) | |
898 | (sha256 | |
899 | (base32 | |
900 | "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv")))) | |
901 | (build-system python-build-system) | |
902 | (native-inputs | |
903 | `(("python-setuptools" ,python-setuptools))) | |
904 | (arguments `(#:tests? #f)) ;no test target | |
905 | (home-page "http://github.com/bear/parsedatetime/") | |
906 | (synopsis | |
907 | "Parse human-readable date/time text") | |
908 | (description | |
e881752c | 909 | "Parse human-readable date/time text.") |
cafc3f5a EB |
910 | (license asl2.0))) |
911 | ||
d072efcb RW |
912 | (define-public python-pandas |
913 | (package | |
914 | (name "python-pandas") | |
915 | (version "0.16.0") | |
916 | (source | |
917 | (origin | |
918 | (method url-fetch) | |
919 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
920 | "pandas/pandas-" version ".tar.gz")) | |
921 | (sha256 | |
922 | (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0")))) | |
923 | (build-system python-build-system) | |
924 | (arguments | |
925 | `(;; Three tests fail: | |
926 | ;; - test_read_google | |
927 | ;; - test_read_yahoo | |
928 | ;; - test_month_range_union_tz_dateutil | |
929 | #:tests? #f)) | |
930 | (propagated-inputs | |
931 | `(("python-numpy" ,python-numpy) | |
932 | ("python-pytz" ,python-pytz) | |
933 | ("python-dateutil" ,python-dateutil-2))) | |
934 | (native-inputs | |
935 | `(("python-nose" ,python-nose) | |
936 | ("python-setuptools" ,python-setuptools))) | |
937 | (home-page "http://pandas.pydata.org") | |
938 | (synopsis "Data structures for data analysis, time series, and statistics") | |
939 | (description | |
940 | "Pandas is a Python package providing fast, flexible, and expressive data | |
941 | structures designed to make working with structured (tabular, | |
942 | multidimensional, potentially heterogeneous) and time series data both easy | |
943 | and intuitive. It aims to be the fundamental high-level building block for | |
944 | doing practical, real world data analysis in Python.") | |
945 | (license bsd-3))) | |
946 | ||
947 | (define-public python2-pandas | |
948 | (package-with-python2 python-pandas)) | |
949 | ||
cafc3f5a EB |
950 | (define-public python-tzlocal |
951 | (package | |
952 | (name "python-tzlocal") | |
953 | (version "1.1.1") | |
954 | (source | |
955 | (origin | |
956 | (method url-fetch) | |
957 | (uri (string-append "https://pypi.python.org/packages/source/t/" | |
958 | "tzlocal/tzlocal-" version ".zip")) | |
959 | (sha256 | |
960 | (base32 | |
961 | "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9")))) | |
962 | (build-system python-build-system) | |
963 | (native-inputs | |
964 | `(("unzip" ,unzip) | |
965 | ("python-setuptools" ,python-setuptools))) | |
966 | (inputs `(("python-pytz" ,python-pytz))) | |
967 | (arguments | |
968 | `(#:phases | |
969 | (alist-replace | |
970 | 'unpack | |
971 | (lambda _ | |
972 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
973 | "/bin/unzip")) | |
974 | (source (assoc-ref %build-inputs "source"))) | |
975 | (and (zero? (system* unzip source)) | |
976 | (chdir (string-append "tzlocal-" ,version))))) | |
977 | %standard-phases))) | |
978 | (home-page "https://github.com/regebro/tzlocal") | |
979 | (synopsis | |
35b9e423 | 980 | "Local timezone information for Python") |
cafc3f5a EB |
981 | (description |
982 | "Tzlocal returns a tzinfo object with the local timezone information. | |
983 | This module attempts to fix a glaring hole in pytz, that there is no way to | |
984 | get the local timezone information, unless you know the zoneinfo name, and | |
985 | under several distributions that's hard or impossible to figure out.") | |
986 | (license cc0))) | |
987 | ||
be7134bf RW |
988 | (define-public python-pysam |
989 | (package | |
990 | (name "python-pysam") | |
991 | (version "0.8.1") | |
992 | (source | |
993 | (origin | |
994 | (method url-fetch) | |
995 | (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-" | |
996 | version ".tar.gz")) | |
997 | (sha256 | |
998 | (base32 | |
999 | "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459")))) | |
1000 | (build-system python-build-system) | |
1001 | (arguments | |
1002 | `(#:tests? #f ; tests are excluded in the manifest | |
1003 | #:phases | |
1004 | (alist-cons-before | |
1005 | 'build 'set-flags | |
1006 | (lambda _ | |
1007 | (setenv "LDFLAGS" "-lncurses") | |
1008 | (setenv "CFLAGS" "-D_CURSES_LIB=1")) | |
1009 | %standard-phases))) | |
1010 | (inputs | |
1011 | `(("python-cython" ,python-cython) | |
1012 | ("python-setuptools" ,python-setuptools) | |
1013 | ("ncurses" ,ncurses) | |
1014 | ("zlib" ,zlib))) | |
1015 | (home-page "https://github.com/pysam-developers/pysam") | |
1016 | (synopsis "Python bindings to the SAMtools C API") | |
1017 | (description | |
1018 | "Pysam is a Python module for reading and manipulating files in the | |
1019 | SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It | |
1020 | also includes an interface for tabix.") | |
bd3fa666 | 1021 | (license license:expat))) |
be7134bf RW |
1022 | |
1023 | (define-public python2-pysam | |
1024 | (package-with-python2 python-pysam)) | |
1d08c01f AE |
1025 | |
1026 | (define-public python2-pysqlite | |
1027 | (package | |
1028 | (name "python2-pysqlite") | |
7a03af70 | 1029 | (version "2.6.3a") ; see below |
1d08c01f AE |
1030 | (source |
1031 | (origin | |
1032 | (method url-fetch) | |
7a03af70 LC |
1033 | ;; During the switch from code.google.com to pypi.python.org, the 2.6.3 |
1034 | ;; tarball was modified, but the version number was kept: | |
1035 | ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>. | |
1036 | ;; Here we want to refer to the pypi-hosted 2.6.3 tarball. | |
1037 | (uri (string-append | |
1038 | "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-" | |
1039 | "2.6.3" ".tar.gz")) | |
1d08c01f AE |
1040 | (sha256 |
1041 | (base32 | |
7a03af70 | 1042 | "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y")))) |
1d08c01f AE |
1043 | (build-system python-build-system) |
1044 | (inputs | |
1045 | `(("sqlite" ,sqlite))) | |
1046 | (arguments | |
1047 | `(#:python ,python-2 ; incompatible with Python 3 | |
1048 | #:tests? #f)) ; no test target | |
7a03af70 LC |
1049 | (home-page "https://pypi.python.org/pypi/pysqlite") |
1050 | (synopsis "SQLite bindings for Python") | |
1d08c01f AE |
1051 | (description |
1052 | "Pysqlite provides SQLite bindings for Python that comply to the | |
1053 | Database API 2.0T.") | |
ed0cdf83 | 1054 | (license license:zlib))) |
1d08c01f | 1055 | |
2875caf5 AE |
1056 | |
1057 | (define-public python2-mechanize | |
1058 | (package | |
1059 | (name "python2-mechanize") | |
1060 | (version "0.2.5") | |
1061 | (source | |
1062 | (origin | |
1063 | (method url-fetch) | |
1064 | (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-" | |
1065 | version ".tar.gz")) | |
1066 | (sha256 | |
1067 | (base32 | |
1068 | "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf")))) | |
1069 | (build-system python-build-system) | |
1070 | (inputs | |
1071 | `(("python2-setuptools" ,python2-setuptools))) | |
1072 | (arguments | |
1073 | `(#:python ,python-2 ; apparently incompatible with Python 3 | |
1074 | #:tests? #f)) | |
1075 | ;; test fails with message | |
1076 | ;; AttributeError: 'module' object has no attribute 'test_pullparser' | |
1077 | ;; (python-3.3.2) or | |
1078 | ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet' | |
1079 | ;; (python-2.7.5). | |
1080 | ;; The source code is from March 2011 and probably not up-to-date | |
1081 | ;; with respect to python unit tests. | |
1082 | (home-page "http://wwwsearch.sourceforge.net/mechanize/") | |
1083 | (synopsis | |
1084 | "Stateful programmatic web browsing in Python") | |
1085 | (description | |
1086 | "Mechanize implements stateful programmatic web browsing in Python, | |
1087 | after Andy Lester’s Perl module WWW::Mechanize.") | |
166191b3 | 1088 | (license (non-copyleft "file://COPYING" |
e881752c | 1089 | "See COPYING in the distribution.")))) |
2875caf5 | 1090 | |
0352532e AE |
1091 | |
1092 | (define-public python-simplejson | |
1093 | (package | |
1094 | (name "python-simplejson") | |
1095 | (version "3.3.0") | |
1096 | (source | |
1097 | (origin | |
1098 | (method url-fetch) | |
1099 | (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-" | |
1100 | version ".tar.gz")) | |
1101 | (sha256 | |
1102 | (base32 | |
1103 | "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks")))) | |
1104 | (build-system python-build-system) | |
1105 | (home-page "http://simplejson.readthedocs.org/en/latest/") | |
1106 | (synopsis | |
1107 | "Json library for Python") | |
1108 | (description | |
e881752c AK |
1109 | "JSON (JavaScript Object Notation) is a subset of JavaScript |
1110 | syntax (ECMA-262 3rd edition) used as a lightweight data interchange | |
1111 | format. | |
0352532e AE |
1112 | |
1113 | Simplejson exposes an API familiar to users of the standard library marshal | |
1114 | and pickle modules. It is the externally maintained version of the json | |
1115 | library contained in Python 2.6, but maintains compatibility with Python 2.5 | |
1116 | and (currently) has significant performance advantages, even without using | |
1117 | the optional C extension for speedups. Simplejson is also supported on | |
1118 | Python 3.3+.") | |
1119 | (license x11))) | |
1120 | ||
1121 | (define-public python2-simplejson | |
1122 | (package-with-python2 python-simplejson)) | |
421a80a2 AE |
1123 | |
1124 | ||
1125 | (define-public python2-pyicu | |
1126 | (package | |
1127 | (name "python2-pyicu") | |
569ac046 | 1128 | (version "1.8") |
421a80a2 AE |
1129 | (source |
1130 | (origin | |
1131 | (method url-fetch) | |
1132 | (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-" | |
1133 | version ".tar.gz")) | |
1134 | (sha256 | |
1135 | (base32 | |
569ac046 | 1136 | "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw")))) |
421a80a2 AE |
1137 | (build-system python-build-system) |
1138 | (inputs | |
1139 | `(("icu4c" ,icu4c))) | |
1140 | (arguments | |
1141 | `(#:python ,python-2 ; Python 3 works also, but needs special care for | |
1142 | ; linking with libpython3.3m | |
1143 | #:tests? #f)) ; no check target | |
1144 | (home-page "http://pyicu.osafoundation.org/") | |
9e771e3b | 1145 | (synopsis "Python extension wrapping the ICU C++ API") |
421a80a2 AE |
1146 | (description |
1147 | "PyICU is a python extension wrapping the ICU C++ API.") | |
1148 | (license x11))) | |
cc20a22a LC |
1149 | |
1150 | (define-public python2-dogtail | |
1151 | ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and | |
1152 | ;; spaces in indentation" with Python 3. | |
1153 | (package | |
1154 | (name "python2-dogtail") | |
1155 | (version "0.8.2") | |
1156 | (source (origin | |
1157 | (method url-fetch) | |
1158 | (uri (string-append | |
1159 | "https://fedorahosted.org/released/dogtail/dogtail-" | |
1160 | version ".tar.gz")) | |
1161 | (sha256 | |
1162 | (base32 | |
1163 | "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1")))) | |
1164 | (build-system python-build-system) | |
1165 | (arguments `(#:python ,python-2 | |
1166 | #:tests? #f)) ; invalid command "test" | |
1167 | (home-page "https://fedorahosted.org/dogtail/") | |
1168 | (synopsis "GUI test tool and automation framework written in Python") | |
1169 | (description | |
35b9e423 | 1170 | "Dogtail is a GUI test tool and automation framework written in Python. |
cc20a22a LC |
1171 | It uses Accessibility (a11y) technologies to communicate with desktop |
1172 | applications. dogtail scripts are written in Python and executed like any | |
1173 | other Python program.") | |
1174 | (license gpl2+))) | |
515e6878 | 1175 | |
011b18c3 LC |
1176 | (define-public python2-empy |
1177 | (package | |
1178 | (name "python2-empy") | |
1179 | (version "3.3") | |
1180 | (source (origin | |
1181 | (method url-fetch) | |
1182 | (uri (string-append "http://www.alcyone.com/software/empy/empy-" | |
1183 | version ".tar.gz")) | |
1184 | (sha256 | |
1185 | (base32 | |
1186 | "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6")))) | |
1187 | (build-system python-build-system) | |
1188 | (arguments | |
1189 | `(#:python ,python-2 | |
1190 | #:phases (alist-replace | |
1191 | 'check | |
1192 | (lambda _ | |
1193 | (zero? (system* "./test.sh"))) | |
1194 | %standard-phases))) | |
1195 | (home-page "http://www.alcyone.com/software/empy/") | |
1196 | (synopsis "Templating system for Python") | |
1197 | (description | |
1198 | "EmPy is a system for embedding Python expressions and statements in | |
1199 | template text; it takes an EmPy source file, processes it, and produces | |
1200 | output. This is accomplished via expansions, which are special signals to the | |
1cd4027c | 1201 | EmPy system and are set off by a special prefix (by default the at sign, @@). |
011b18c3 LC |
1202 | EmPy can expand arbitrary Python expressions and statements in this way, as |
1203 | well as a variety of special forms. Textual data not explicitly delimited in | |
1204 | this way is sent unaffected to the output, allowing Python to be used in | |
1205 | effect as a markup language. Also supported are callbacks via hooks, | |
1206 | recording and playback via diversions, and dynamic, chainable filters. The | |
1207 | system is highly configurable via command line options and embedded | |
1208 | commands.") | |
1209 | (license lgpl2.1+))) | |
1210 | ||
8deeda0c LC |
1211 | (define-public python2-element-tree |
1212 | (package | |
1213 | (name "python2-element-tree") | |
1214 | (version "1.2.6") | |
1215 | (source (origin | |
1216 | (method url-fetch) | |
1217 | (uri (string-append | |
1218 | "http://effbot.org/media/downloads/elementtree-" | |
1219 | version "-20050316.tar.gz")) | |
1220 | (sha256 | |
1221 | (base32 | |
1222 | "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj")))) | |
1223 | (build-system python-build-system) | |
1224 | (arguments | |
1225 | `(#:python ,python-2 ; seems to be part of Python 3 | |
1226 | #:tests? #f)) ; no 'test' sub-command | |
1227 | (synopsis "Toolkit for XML processing in Python") | |
1228 | (description | |
1229 | "ElementTree is a Python library supporting lightweight XML processing.") | |
1230 | (home-page "http://effbot.org/zone/element-index.htm") | |
1231 | (license (x11-style "http://docs.python.org/2/license.html" | |
1232 | "Like \"CWI LICENSE AGREEMENT FOR PYTHON \ | |
1233 | 0.9.0 THROUGH 1.2\".")))) | |
1234 | ||
1235 | (define-public python2-pybugz | |
1236 | (package | |
1237 | (name "python2-pybugz") | |
1238 | (version "0.6.11") | |
1239 | (source (origin | |
1240 | (method url-fetch) | |
1241 | (uri (string-append | |
1242 | "http://bits.liquidx.net/projects/pybugz/pybugz-" | |
1243 | version ".tar.gz")) | |
1244 | (sha256 | |
1245 | (base32 | |
6f194a1e LC |
1246 | "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd")) |
1247 | (patches (map search-patch | |
1248 | (list "pybugz-stty.patch" | |
1249 | "pybugz-encode-error.patch"))))) | |
8deeda0c LC |
1250 | (build-system python-build-system) |
1251 | (arguments | |
1252 | `(#:python ,python-2 ; SyntaxError with Python 3 | |
1253 | #:tests? #f)) ; no 'test' sub-command | |
1254 | (inputs `(("element-tree" ,python2-element-tree))) | |
1255 | (synopsis "Python and command-line interface to Bugzilla") | |
1256 | (description | |
1257 | "PyBugz is a Python library and command-line tool to query the Bugzilla | |
1258 | bug tracking system. It is meant as an aid to speed up interaction with the | |
1259 | bug tracker.") | |
1260 | (home-page "http://www.liquidx.net/pybugz/") | |
1261 | (license gpl2))) | |
1262 | ||
a480bc41 EB |
1263 | (define-public python-enum34 |
1264 | (package | |
1265 | (name "python-enum34") | |
1266 | (version "1.0") | |
1267 | (source | |
1268 | (origin | |
1269 | (method url-fetch) | |
1270 | (uri (string-append "https://pypi.python.org/packages/source/e/" | |
1271 | "enum34/enum34-" version ".tar.gz")) | |
1272 | (sha256 | |
1273 | (base32 | |
1274 | "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq")))) | |
1275 | (build-system python-build-system) | |
1276 | (inputs | |
1277 | `(("python-setuptools" ,python-setuptools))) | |
1278 | (arguments | |
1279 | `(#:phases | |
1280 | (alist-replace | |
1281 | 'check | |
1282 | (lambda _ (zero? (system* "python" "enum/test_enum.py"))) | |
1283 | %standard-phases))) | |
1284 | (home-page "https://pypi.python.org/pypi/enum34") | |
1285 | (synopsis "Backported Python 3.4 Enum") | |
1286 | (description | |
1287 | "Enum34 is the new Python stdlib enum module available in Python 3.4 | |
1288 | backported for previous versions of Python from 2.4 to 3.3.") | |
1289 | (license bsd-3))) | |
1290 | ||
1291 | (define-public python-parse-type | |
1292 | (package | |
1293 | (name "python-parse-type") | |
1294 | (version "0.3.4") | |
1295 | (source | |
1296 | (origin | |
1297 | (method url-fetch) | |
1298 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
1299 | "parse_type/parse_type-" version ".tar.gz")) | |
1300 | (sha256 | |
1301 | (base32 | |
1302 | "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x")))) | |
1303 | (build-system python-build-system) | |
1304 | (inputs | |
1305 | `(("python-setuptools" ,python-setuptools) | |
1306 | ("python-six" ,python-six) | |
1307 | ("python-parse" ,python-parse) | |
1308 | ("python-enum34" ,python-enum34))) ;required for python<3.4 | |
1309 | (arguments '(#:tests? #f)) ;TODO: tests require pytest | |
1310 | (home-page "https://github.com/jenisys/parse_type") | |
1311 | (synopsis "Extended parse module") | |
1312 | (description | |
1313 | "Parse_type extends the python parse module.") | |
1314 | (license bsd-3))) | |
1315 | ||
1316 | (define-public python-parse | |
1317 | (package | |
1318 | (name "python-parse") | |
1319 | (version "1.6.4") | |
1320 | (source | |
1321 | (origin | |
1322 | (method url-fetch) | |
1323 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
1324 | "parse/parse-" version ".tar.gz")) | |
1325 | (sha256 | |
1326 | (base32 | |
1327 | "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57")))) | |
1328 | (build-system python-build-system) | |
1329 | (arguments | |
1330 | `(#:phases | |
1331 | (alist-replace | |
1332 | 'check | |
1333 | (lambda _ (zero? (system* "python" "test_parse.py"))) | |
1334 | %standard-phases))) | |
1335 | (home-page "https://github.com/r1chardj0n3s/parse") | |
1336 | (synopsis "Parse strings") | |
1337 | (description | |
1338 | "Parse strings using a specification based on the Python format() | |
1339 | syntax.") | |
1340 | (license x11))) | |
1341 | ||
1342 | ||
515e6878 LC |
1343 | (define-public scons |
1344 | (package | |
1345 | (name "scons") | |
a3f61425 | 1346 | (version "2.3.4") |
515e6878 LC |
1347 | (source (origin |
1348 | (method url-fetch) | |
1349 | (uri (string-append "mirror://sourceforge/scons/scons-" | |
1350 | version ".tar.gz")) | |
1351 | (sha256 | |
1352 | (base32 | |
a3f61425 | 1353 | "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb")))) |
515e6878 LC |
1354 | (build-system python-build-system) |
1355 | (arguments | |
1356 | ;; With Python 3.x, fails to build with a syntax error. | |
1357 | `(#:python ,python-2 | |
1358 | #:tests? #f)) ; no 'python setup.py test' command | |
1359 | (home-page "http://scons.org/") | |
1360 | (synopsis "Software construction tool written in Python") | |
1361 | (description | |
1362 | "SCons is a software construction tool. Think of SCons as an improved, | |
1363 | cross-platform substitute for the classic Make utility with integrated | |
1364 | functionality similar to autoconf/automake and compiler caches such as ccache. | |
1365 | In short, SCons is an easier, more reliable and faster way to build | |
1366 | software.") | |
1367 | (license x11))) | |
011b18c3 | 1368 | |
c15a5c0e DT |
1369 | (define-public python-extras |
1370 | (package | |
1371 | (name "python-extras") | |
1372 | (version "0.0.3") | |
1373 | (source | |
1374 | (origin | |
1375 | (method url-fetch) | |
1376 | (uri (string-append | |
1377 | "https://pypi.python.org/packages/source/e/extras/extras-" | |
1378 | version ".tar.gz")) | |
1379 | (sha256 | |
1380 | (base32 | |
1381 | "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s")))) | |
1382 | (build-system python-build-system) | |
1383 | (inputs | |
1384 | `(("python-setuptools" ,python-setuptools))) | |
1385 | (arguments | |
1386 | ;; error in setup.cfg: command 'test' has no such option 'buffer' | |
1387 | '(#:tests? #f)) | |
1388 | (home-page "https://github.com/testing-cabal/extras") | |
1389 | (synopsis "Useful extensions to the Python standard library") | |
1390 | (description | |
1391 | "Extras is a set of extensions to the Python standard library.") | |
bd3fa666 | 1392 | (license license:expat))) |
c15a5c0e DT |
1393 | |
1394 | (define-public python2-extras | |
1395 | (package-with-python2 python-extras)) | |
1396 | ||
56ea0efd DT |
1397 | (define-public python-mimeparse |
1398 | (package | |
1399 | (name "python-mimeparse") | |
1400 | (version "0.1.4") | |
1401 | (source | |
1402 | (origin | |
1403 | (method url-fetch) | |
1404 | (uri (string-append | |
1405 | "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-" | |
1406 | version ".tar.gz")) | |
1407 | (sha256 | |
1408 | (base32 | |
1409 | "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w")))) | |
1410 | (build-system python-build-system) | |
1411 | (inputs | |
1412 | `(("python-setuptools" ,python-setuptools))) | |
1413 | (arguments | |
1414 | '(#:tests? #f)) ; no setup.py test command | |
1415 | (home-page | |
1416 | "https://github.com/dbtsai/python-mimeparse") | |
9e771e3b | 1417 | (synopsis "Python library for parsing MIME types") |
56ea0efd DT |
1418 | (description |
1419 | "Mimeparse provides basic functions for parsing MIME type names and | |
1420 | matching them against a list of media-ranges.") | |
bd3fa666 | 1421 | (license license:expat))) |
56ea0efd DT |
1422 | |
1423 | (define-public python2-mimeparse | |
1424 | (package-with-python2 python-mimeparse)) | |
1425 | ||
4435427e DT |
1426 | (define-public python-nose |
1427 | (package | |
1428 | (name "python-nose") | |
1429 | (version "1.3.4") | |
1430 | (source | |
1431 | (origin | |
1432 | (method url-fetch) | |
1433 | (uri (string-append | |
1434 | "https://pypi.python.org/packages/source/n/nose/nose-" | |
1435 | version ".tar.gz")) | |
1436 | (sha256 | |
1437 | (base32 | |
1438 | "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n")))) | |
1439 | (build-system python-build-system) | |
1440 | (inputs | |
1441 | `(("python-setuptools" ,python-setuptools))) | |
1442 | (arguments | |
1443 | '(#:tests? #f)) ; FIXME: test suite fails | |
1444 | (home-page "http://readthedocs.org/docs/nose/") | |
1445 | (synopsis "Python testing library") | |
1446 | (description | |
1447 | "Nose extends the unittest library to make testing easier.") | |
1448 | (license lgpl2.0+))) | |
1449 | ||
1450 | (define-public python2-nose | |
1451 | (package-with-python2 python-nose)) | |
1452 | ||
6cd9c356 DT |
1453 | (define-public python-unittest2 |
1454 | (package | |
1455 | (name "python-unittest2") | |
1456 | (version "0.5.1") | |
1457 | (source | |
1458 | (origin | |
1459 | (method url-fetch) | |
1460 | (uri (string-append | |
1461 | "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-" | |
1462 | version ".tar.gz")) | |
1463 | (sha256 | |
1464 | (base32 | |
1465 | "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q")))) | |
1466 | (build-system python-build-system) | |
1467 | (inputs | |
1468 | `(("python-setuptools" ,python-setuptools))) | |
1469 | (home-page "http://pypi.python.org/pypi/unittest2") | |
1470 | (synopsis "Python unit testing library") | |
1471 | (description | |
1472 | "Unittest2 is a replacement for the unittest module in the Python | |
1473 | standard library.") | |
1474 | (license psfl))) | |
1475 | ||
1476 | (define-public python2-unittest2 | |
1477 | (package (inherit python-unittest2) | |
1478 | (name "python2-unittest2") | |
1479 | (version "0.5.1") | |
1480 | (source | |
1481 | (origin | |
1482 | (method url-fetch) | |
1483 | (uri (string-append | |
1484 | "https://pypi.python.org/packages/source/u/unittest2/unittest2-" | |
1485 | version ".tar.gz")) | |
1486 | (sha256 | |
1487 | (base32 | |
1488 | "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda")))) | |
1489 | (inputs | |
1490 | `(("python2-setuptools" ,python-setuptools))) | |
1491 | (arguments | |
1492 | `(#:python ,python-2 | |
1493 | #:tests? #f)))) ; no setup.py test command | |
1494 | ||
542ad60f DT |
1495 | (define-public python-py |
1496 | (package | |
1497 | (name "python-py") | |
1498 | (version "1.4.23") | |
1499 | (source | |
1500 | (origin | |
1501 | (method url-fetch) | |
1502 | (uri (string-append | |
1503 | "https://pypi.python.org/packages/source/p/py/py-" | |
1504 | version ".tar.gz")) | |
1505 | (sha256 | |
1506 | (base32 | |
1507 | "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs")))) | |
1508 | (build-system python-build-system) | |
1509 | (inputs | |
1510 | `(("python-setuptools" ,python-setuptools))) | |
1511 | (home-page "http://pylib.readthedocs.org/") | |
1512 | (synopsis "Python library for parsing, I/O, instrospection, and logging") | |
1513 | (description | |
1514 | "Py is a Python library for file name parsing, .ini file parsing, I/O, | |
1515 | code introspection, and logging.") | |
bd3fa666 | 1516 | (license license:expat))) |
542ad60f DT |
1517 | |
1518 | (define-public python2-py | |
1519 | (package-with-python2 python-py)) | |
1520 | ||
855d4761 DT |
1521 | (define-public python-pytest |
1522 | (package | |
1523 | (name "python-pytest") | |
1524 | (version "2.6.1") | |
1525 | (source | |
1526 | (origin | |
1527 | (method url-fetch) | |
1528 | (uri (string-append | |
1529 | "https://pypi.python.org/packages/source/p/pytest/pytest-" | |
1530 | version ".tar.gz")) | |
1531 | (sha256 | |
1532 | (base32 | |
1533 | "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr")) | |
1534 | (modules '((guix build utils))) | |
1535 | (snippet | |
1536 | ;; One of the tests involves the /usr directory, so it fails. | |
1537 | '(substitute* "testing/test_argcomplete.py" | |
1538 | (("def test_remove_dir_prefix\\(self\\):") | |
1539 | "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))))) | |
1540 | (build-system python-build-system) | |
1541 | (inputs | |
1542 | `(("python-setuptools" ,python-setuptools) | |
1543 | ("python-py" ,python-py) | |
1544 | ("python-nose" ,python-nose) | |
1545 | ("python-mock" ,python-mock))) | |
1546 | (home-page "http://pytest.org") | |
1547 | (synopsis "Python testing library") | |
1548 | (description | |
1549 | "Pytest is a testing tool that provides auto-discovery of test modules | |
1550 | and functions, detailed info on failing assert statements, modular fixtures, | |
1551 | and many external plugins.") | |
bd3fa666 | 1552 | (license license:expat))) |
855d4761 DT |
1553 | |
1554 | (define-public python2-pytest | |
1555 | (package-with-python2 python-pytest)) | |
1556 | ||
84d24017 DT |
1557 | (define-public python-scripttest |
1558 | (package | |
1559 | (name "python-scripttest") | |
1560 | (version "1.3") | |
1561 | (source | |
1562 | (origin | |
1563 | (method url-fetch) | |
1564 | (uri (string-append | |
1565 | "https://pypi.python.org/packages/source/s/scripttest/scripttest-" | |
1566 | version ".tar.gz")) | |
1567 | (sha256 | |
1568 | (base32 | |
1569 | "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m")))) | |
1570 | (build-system python-build-system) | |
1571 | (inputs | |
1572 | `(("python-setuptools" ,python-setuptools) | |
1573 | ("python-pytest" ,python-pytest))) | |
1574 | (home-page "http://pythonpaste.org/scripttest/") | |
1575 | (synopsis "Python library to test command-line scripts") | |
1576 | (description "Scripttest is a Python helper library for testing | |
1577 | interactive command-line applications. With it you can run a script in a | |
1578 | subprocess and see the output as well as any file modifications.") | |
bd3fa666 | 1579 | (license license:expat))) |
84d24017 DT |
1580 | |
1581 | (define-public python2-scripttest | |
1582 | (package-with-python2 python-scripttest)) | |
1583 | ||
d8fa80e1 DT |
1584 | (define-public python-testtools |
1585 | (package | |
1586 | (name "python-testtools") | |
1587 | (version "1.0.0") | |
1588 | (source | |
1589 | (origin | |
1590 | (method url-fetch) | |
1591 | (uri (string-append | |
1592 | "https://pypi.python.org/packages/source/t/testtools/testtools-" | |
1593 | version ".tar.gz")) | |
1594 | (sha256 | |
1595 | (base32 | |
1596 | "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx")))) | |
1597 | (build-system python-build-system) | |
0e88cbf8 CR |
1598 | (propagated-inputs |
1599 | `(("python-mimeparse" ,python-mimeparse))) | |
d8fa80e1 DT |
1600 | (inputs |
1601 | `(("python-setuptools" ,python-setuptools) | |
d8fa80e1 DT |
1602 | ("python-extras" ,python-extras))) |
1603 | (home-page "https://github.com/testing-cabal/testtools") | |
1604 | (synopsis | |
1605 | "Extensions to the Python standard library unit testing framework") | |
1606 | (description | |
1607 | "Testtools extends the Python standard library unit testing framework to | |
1608 | provide matchers, more debugging information, and cross-Python | |
1609 | compatibility.") | |
1610 | (license psfl))) | |
1611 | ||
1612 | (define-public python2-testtools | |
1613 | (package-with-python2 python-testtools)) | |
1614 | ||
5bf3afea DT |
1615 | (define-public python-testscenarios |
1616 | (package | |
1617 | (name "python-testscenarios") | |
1618 | (version "0.4") | |
1619 | (source | |
1620 | (origin | |
1621 | (method url-fetch) | |
1622 | (uri (string-append | |
1623 | "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-" | |
1624 | version ".tar.gz")) | |
1625 | (sha256 | |
1626 | (base32 | |
1627 | "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg")))) | |
1628 | (build-system python-build-system) | |
1629 | (inputs | |
1630 | `(("python-setuptools" ,python-setuptools) | |
1631 | ("python-testtools" ,python-testtools) | |
1632 | ("python-mimeparse" ,python-mimeparse))) | |
1633 | (home-page "https://launchpad.net/testscenarios") | |
1634 | (synopsis "Pyunit extension for dependency injection") | |
1635 | (description | |
1636 | "Testscenarios provides clean dependency injection for Python unittest | |
1637 | style tests.") | |
1638 | (license (list bsd-3 asl2.0)))) ; at the user's option | |
1639 | ||
1640 | (define-public python2-testscenarios | |
1641 | (package-with-python2 python-testscenarios)) | |
1642 | ||
dac79ecc DT |
1643 | (define-public python-testresources |
1644 | (package | |
1645 | (name "python-testresources") | |
1646 | (version "0.2.7") | |
1647 | (source | |
1648 | (origin | |
1649 | (method url-fetch) | |
1650 | (uri (string-append | |
1651 | "https://pypi.python.org/packages/source/t/testresources/testresources-" | |
1652 | version ".tar.gz")) | |
1653 | (sha256 | |
1654 | (base32 | |
1655 | "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md")))) | |
1656 | (build-system python-build-system) | |
1657 | (inputs | |
1658 | `(("python-setuptools" ,python-setuptools))) | |
1659 | (home-page "https://launchpad.net/testresources") | |
1660 | (synopsis | |
1661 | "Pyunit extension for managing test resources") | |
1662 | (description | |
1663 | "Testresources is an extension to Python's unittest to allow declarative | |
1664 | use of resources by test cases.") | |
1665 | (license (list bsd-3 asl2.0)))) ; at the user's option | |
1666 | ||
1667 | (define-public python2-testresources | |
1668 | (package-with-python2 python-testresources)) | |
1669 | ||
070ab058 DT |
1670 | (define-public python-subunit |
1671 | (package | |
1672 | (name "python-subunit") | |
1673 | (version "0.0.21") | |
1674 | (source | |
1675 | (origin | |
1676 | (method url-fetch) | |
1677 | (uri (string-append | |
1678 | "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-" | |
1679 | version ".tar.gz")) | |
1680 | (sha256 | |
1681 | (base32 | |
1682 | "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv")))) | |
1683 | (build-system python-build-system) | |
1684 | (inputs | |
1685 | `(("python-setuptools" ,python-setuptools) | |
1686 | ("python-testtools" ,python-testtools) | |
1687 | ("python-mimeparse" ,python-mimeparse) | |
1688 | ("python-testscenarios" ,python-testscenarios))) | |
1689 | (home-page "http://launchpad.net/subunit") | |
1690 | (synopsis "Python implementation of the subunit protocol") | |
1691 | (description | |
1692 | "Python-subunit is a Python implementation of the subunit test streaming | |
1693 | protocol.") | |
1694 | (license (list bsd-3 asl2.0)))) ; at the user's option | |
1695 | ||
1696 | (define-public python2-subunit | |
1697 | (package-with-python2 python-subunit)) | |
1698 | ||
cd49454b DT |
1699 | (define-public python-fixtures |
1700 | (package | |
1701 | (name "python-fixtures") | |
1702 | (version "0.3.16") | |
1703 | (source | |
1704 | (origin | |
1705 | (method url-fetch) | |
1706 | (uri (string-append | |
1707 | "https://pypi.python.org/packages/source/f/fixtures/fixtures-" | |
1708 | version ".tar.gz")) | |
1709 | (sha256 | |
1710 | (base32 | |
1711 | "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc")))) | |
1712 | (build-system python-build-system) | |
1713 | (inputs | |
1714 | `(("python-setuptools" ,python-setuptools))) | |
1715 | (arguments | |
1716 | '(#:tests? #f)) ; no setup.py test command | |
1717 | (home-page "https://launchpad.net/python-fixtures") | |
1718 | (synopsis "Python test fixture library") | |
1719 | (description | |
1720 | "Fixtures provides a way to create reusable state, useful when writing | |
1721 | Python tests.") | |
1722 | (license (list bsd-3 asl2.0)))) ; at user's option | |
1723 | ||
1724 | (define-public python2-fixtures | |
1725 | (package-with-python2 python-fixtures)) | |
1726 | ||
b24a0c00 DT |
1727 | (define-public python-testrepository |
1728 | (package | |
1729 | (name "python-testrepository") | |
1730 | (version "0.0.20") | |
1731 | (source | |
1732 | (origin | |
1733 | (method url-fetch) | |
1734 | (uri (string-append | |
1735 | "https://pypi.python.org/packages/source/t/testrepository/testrepository-" | |
1736 | version ".tar.gz")) | |
1737 | (sha256 | |
1738 | (base32 | |
1739 | "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m")))) | |
1740 | (build-system python-build-system) | |
05de40c5 CR |
1741 | (propagated-inputs |
1742 | `(("python-fixtures" ,python-fixtures) | |
1743 | ("python-testtools" ,python-testtools))) | |
b24a0c00 DT |
1744 | (inputs |
1745 | `(("python-setuptools" ,python-setuptools) | |
b24a0c00 | 1746 | ("python-subunit" ,python-subunit) |
b24a0c00 DT |
1747 | ("python-mimeparse" ,python-mimeparse))) |
1748 | (home-page "https://launchpad.net/testrepository") | |
1749 | (synopsis "Database for Python test results") | |
1750 | (description "Testrepository provides a database of test results which can | |
1751 | be used as part of a developer's workflow to check things such as what tests | |
1752 | have failed since the last commit or what tests are currently failing.") | |
1753 | (license (list bsd-3 asl2.0)))) ; at user's option | |
1754 | ||
1755 | (define-public python2-testrepository | |
1756 | (package-with-python2 python-testrepository)) | |
1757 | ||
243a009a DT |
1758 | (define-public python-coverage |
1759 | (package | |
1760 | (name "python-coverage") | |
1761 | (version "3.7.1") | |
1762 | (source | |
1763 | (origin | |
1764 | (method url-fetch) | |
1765 | (uri (string-append | |
1766 | "https://pypi.python.org/packages/source/c/coverage/coverage-" | |
1767 | version ".tar.gz")) | |
1768 | (sha256 | |
1769 | (base32 | |
1770 | "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni")))) | |
1771 | (build-system python-build-system) | |
1772 | (inputs | |
1773 | `(("python-setuptools" ,python-setuptools))) | |
1774 | (home-page "http://nedbatchelder.com/code/coverage") | |
1775 | (synopsis "Code coverage measurement for Python") | |
1776 | (description | |
1777 | "Coverage measures code coverage, typically during test execution. It | |
1778 | uses the code analysis tools and tracing hooks provided in the Python standard | |
1779 | library to determine which lines are executable, and which have been | |
1780 | executed.") | |
1781 | (license bsd-3))) | |
1782 | ||
1783 | (define-public python2-coverage | |
1784 | (package-with-python2 python-coverage)) | |
1785 | ||
041358fb DT |
1786 | (define-public python-discover |
1787 | (package | |
1788 | (name "python-discover") | |
1789 | (version "0.4.0") | |
1790 | (source | |
1791 | (origin | |
1792 | (method url-fetch) | |
1793 | (uri (string-append | |
1794 | "https://pypi.python.org/packages/source/d/discover/discover-" | |
1795 | version ".tar.gz")) | |
1796 | (sha256 | |
1797 | (base32 | |
1798 | "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5")))) | |
1799 | (build-system python-build-system) | |
1800 | (inputs | |
1801 | `(("python-setuptools" ,python-setuptools))) | |
1802 | (home-page "http://pypi.python.org/pypi/discover/") | |
1803 | (synopsis | |
1804 | "Python test discovery for unittest") | |
1805 | (description | |
1806 | "Discover provides test discovery for unittest, a feature that has been | |
e881752c | 1807 | backported from Python 2.7 for Python 2.4+.") |
041358fb DT |
1808 | (license bsd-3))) |
1809 | ||
1810 | (define-public python2-discover | |
1811 | (package-with-python2 python-discover)) | |
1812 | ||
a480bc41 EB |
1813 | (define-public behave |
1814 | (package | |
1815 | (name "behave") | |
1816 | (version "1.2.4") | |
1817 | (source (origin | |
1818 | (method url-fetch) | |
1819 | (uri (string-append "https://pypi.python.org/packages/source/b/" | |
1820 | name "/" name "-" version ".tar.gz")) | |
1821 | (sha256 | |
1822 | (base32 | |
1823 | "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14")))) | |
1824 | (build-system python-build-system) | |
1825 | (inputs | |
1826 | `(("python-setuptools" ,python-setuptools) | |
1827 | ("python-six" ,python-six) | |
1828 | ("python-enum43" ,python-enum34) | |
1829 | ("python-parse" ,python-parse) | |
1830 | ("python-parse-type" ,python-parse-type))) | |
1831 | (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and | |
1832 | ;PyHamcrest>=1.8 | |
1833 | (home-page "http://github.com/behave/behave") | |
1834 | (synopsis "Python behavior-driven development") | |
1835 | (description | |
1836 | "Behave is a tool for behavior-driven development in python. | |
1837 | Behavior-driven development (or BDD) is an agile software development | |
1838 | technique that encourages collaboration between developers, QA and | |
1839 | non-technical or business participants in a software project. Behave uses | |
1840 | tests written in a natural language style, backed up by Python code.") | |
1841 | (license x11))) | |
c7303d3c DT |
1842 | |
1843 | (define-public python-exif-read | |
1844 | (package | |
1845 | (name "python-exif-read") | |
1846 | (version "1.4.2") | |
1847 | (source (origin | |
1848 | (method url-fetch) | |
1849 | (uri | |
1850 | (string-append | |
1851 | "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-" | |
1852 | version ".tar.gz")) | |
1853 | (sha256 | |
1854 | (base32 | |
1855 | "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1")))) | |
1856 | (build-system python-build-system) | |
1857 | (inputs | |
1858 | `(("python-setuptools" ,python-setuptools))) | |
1859 | (arguments `(#:tests? #f)) ; no tests | |
1860 | (home-page "https://github.com/ianare/exif-py") | |
1861 | (synopsis "Python library to extract EXIF data from image files") | |
1862 | (description | |
1863 | "ExifRead is a Python library to extract EXIF data from tiff and jpeg | |
1864 | files.") | |
1865 | (license bsd-3))) | |
1866 | ||
1867 | (define-public python2-exif-read | |
1868 | (package-with-python2 python-exif-read)) | |
d5f89b22 DT |
1869 | |
1870 | (define-public python-pyld | |
1871 | (package | |
1872 | (name "python-pyld") | |
1873 | (version "0.6.0") | |
1874 | (source (origin | |
1875 | (method url-fetch) | |
1876 | (uri | |
1877 | (string-append | |
1878 | "https://pypi.python.org/packages/source/P/PyLD/PyLD-" | |
1879 | version ".tar.gz")) | |
1880 | (sha256 | |
1881 | (base32 | |
1882 | "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8")))) | |
1883 | (build-system python-build-system) | |
1884 | (inputs | |
1885 | `(("python-setuptools" ,python-setuptools))) | |
1886 | (arguments `(#:tests? #f)) ; no tests | |
1887 | (home-page "http://github.com/digitalbazaar/pyld") | |
1888 | (synopsis "Python implementation of the JSON-LD specification") | |
1889 | (description | |
1890 | "PyLD is an implementation of the JSON-LD specification.") | |
1891 | (license bsd-3))) | |
1892 | ||
1893 | (define-public python2-pyld | |
1894 | (package-with-python2 python-pyld)) | |
3a1f9a68 DT |
1895 | |
1896 | (define-public python-certifi | |
1897 | (package | |
1898 | (name "python-certifi") | |
1899 | (version "14.05.14") | |
1900 | (source (origin | |
1901 | (method url-fetch) | |
1902 | (uri | |
1903 | (string-append | |
1904 | "https://pypi.python.org/packages/source/c/certifi/certifi-" | |
1905 | version ".tar.gz")) | |
1906 | (sha256 | |
1907 | (base32 | |
1908 | "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy")))) | |
1909 | (build-system python-build-system) | |
1910 | (inputs | |
1911 | `(("python-setuptools" ,python-setuptools))) | |
1912 | (arguments `(#:tests? #f)) ; no tests | |
1913 | (home-page "http://python-requests.org/") | |
1914 | (synopsis "Python CA certificate bundle") | |
1915 | (description | |
1916 | "Certifi is a Python library that contains a CA certificate bundle, which | |
1917 | is used by the Requests library to verify HTTPS requests.") | |
1918 | (license asl2.0))) | |
1919 | ||
1920 | (define-public python2-certifi | |
1921 | (package-with-python2 python-certifi)) | |
e6cfbd36 | 1922 | |
12c270dd RW |
1923 | (define-public python-click |
1924 | (package | |
1925 | (name "python-click") | |
1926 | (version "4.0") | |
1927 | (source | |
1928 | (origin | |
1929 | (method url-fetch) | |
1930 | (uri (string-append | |
1931 | "https://pypi.python.org/packages/source/c/click/click-" | |
1932 | version ".tar.gz")) | |
1933 | (sha256 | |
1934 | (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl")))) | |
1935 | (build-system python-build-system) | |
1936 | (native-inputs | |
1937 | `(("python-setuptools" ,python-setuptools))) | |
1938 | (home-page "http://click.pocoo.org") | |
1939 | (synopsis "Command line library for Python") | |
1940 | (description | |
1941 | "Click is a Python package for creating command line interfaces in a | |
1942 | composable way with as little code as necessary. Its name stands for | |
1943 | \"Command Line Interface Creation Kit\". It's highly configurable but comes | |
1944 | with sensible defaults out of the box.") | |
1945 | (license bsd-3))) | |
1946 | ||
1947 | (define-public python2-click | |
1948 | (package-with-python2 python-click)) | |
1949 | ||
ae641128 | 1950 | (define-public python-requests |
e6cfbd36 | 1951 | (package |
ae641128 | 1952 | (name "python-requests") |
e6cfbd36 DT |
1953 | (version "2.4.0") |
1954 | (source (origin | |
1955 | (method url-fetch) | |
1956 | (uri | |
1957 | (string-append | |
1958 | "https://pypi.python.org/packages/source/r/requests/requests-" | |
1959 | version ".tar.gz")) | |
1960 | (sha256 | |
1961 | (base32 | |
1962 | "0gknlfx1wakrrm1zi8gi03x2lzj4dsns0vjw0nsmgqvkphyf01vh")))) | |
1963 | (build-system python-build-system) | |
1964 | (inputs | |
1965 | `(("python-setuptools" ,python-setuptools) | |
1966 | ("python-certifi" ,python-certifi))) | |
ae641128 | 1967 | (arguments `(#:tests? #f)) ; no tests |
e6cfbd36 DT |
1968 | (home-page "http://python-requests.org/") |
1969 | (synopsis "Python HTTP library") | |
1970 | (description | |
1971 | "Requests is a Python HTTP client library. It aims to be easier to use | |
1972 | than Python’s urllib2 library.") | |
1973 | (license asl2.0))) | |
864b5211 | 1974 | |
ae641128 DT |
1975 | (define-public python2-requests |
1976 | (package-with-python2 python-requests)) | |
1977 | ||
864b5211 DT |
1978 | (define-public python-jsonschema |
1979 | (package | |
1980 | (name "python-jsonschema") | |
1981 | (version "2.4.0") | |
1982 | (source (origin | |
1983 | (method url-fetch) | |
1984 | (uri | |
1985 | (string-append | |
1986 | "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-" | |
1987 | version ".tar.gz")) | |
1988 | (sha256 | |
1989 | (base32 | |
1990 | "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j")))) | |
1991 | (build-system python-build-system) | |
1992 | (inputs | |
1993 | `(("python-setuptools" ,python-setuptools))) | |
1994 | (home-page "http://github.com/Julian/jsonschema") | |
1995 | (synopsis "Implementation of JSON Schema for Python") | |
1996 | (description | |
1997 | "Jsonschema is an implementation of JSON Schema for Python.") | |
bd3fa666 | 1998 | (license license:expat))) |
864b5211 DT |
1999 | |
2000 | (define-public python2-jsonschema | |
2001 | (package-with-python2 python-jsonschema)) | |
850189b8 DT |
2002 | |
2003 | (define-public python-unidecode | |
2004 | (package | |
2005 | (name "python-unidecode") | |
2006 | (version "0.04.16") | |
2007 | (source (origin | |
2008 | (method url-fetch) | |
2009 | (uri | |
2010 | (string-append | |
2011 | "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-" | |
2012 | version ".tar.gz")) | |
2013 | (sha256 | |
2014 | (base32 | |
2015 | "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc")))) | |
2016 | (build-system python-build-system) | |
2017 | (inputs | |
2018 | `(("python-setuptools" ,python-setuptools))) | |
2019 | (home-page "https://pypi.python.org/pypi/Unidecode") | |
2020 | (synopsis "ASCII transliterations of Unicode text") | |
2021 | (description | |
2022 | "Unidecode provides ASCII transliterations of Unicode text. Unidecode is | |
2023 | useful when integrating with legacy code that doesn't support Unicode, or for | |
2024 | ease of entry of non-Roman names on a US keyboard, or when constructing ASCII | |
2025 | machine identifiers from human-readable Unicode strings that should still be | |
2026 | somewhat intelligeble.") | |
2027 | (license gpl2+))) | |
2028 | ||
2029 | (define-public python2-unidecode | |
2030 | (package-with-python2 python-unidecode)) | |
6d45fef4 DT |
2031 | |
2032 | (define-public python-pyjwt | |
2033 | (package | |
2034 | (name "python-pyjwt") | |
2035 | (version "0.2.1") | |
2036 | (source | |
2037 | (origin | |
2038 | (method url-fetch) | |
2039 | (uri (string-append | |
2040 | "https://pypi.python.org/packages/source/P/PyJWT/PyJWT-" | |
2041 | version ".tar.gz")) | |
2042 | (sha256 | |
2043 | (base32 | |
2044 | "1ahqblfy2sj3xz34wsa48cn9rp0dspzq56p54i5znmws3b8gml6g")))) | |
2045 | (build-system python-build-system) | |
2046 | (inputs | |
2047 | `(("python-setuptools" ,python-setuptools))) | |
2048 | (arguments | |
2049 | '(#:tests? #f)) ; test suite doesn't work | |
2050 | (home-page "http://github.com/progrium/pyjwt") | |
2051 | (synopsis "JSON Web Token implementation in Python") | |
2052 | (description | |
2053 | "PyJWT is a JSON Web Token implementation written in Python.") | |
bd3fa666 | 2054 | (license license:expat))) |
6d45fef4 DT |
2055 | |
2056 | (define-public python2-pyjwt | |
2057 | (package-with-python2 python-pyjwt)) | |
2058 | ||
2cec1f6f DT |
2059 | (define-public python-oauthlib |
2060 | (package | |
2061 | (name "python-oauthlib") | |
2062 | (version "0.6.3") | |
2063 | (source (origin | |
2064 | (method url-fetch) | |
2065 | (uri | |
2066 | (string-append | |
2067 | "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-" | |
2068 | version ".tar.gz")) | |
2069 | (sha256 | |
2070 | (base32 | |
2071 | "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a")))) | |
2072 | (build-system python-build-system) | |
2073 | (inputs | |
2074 | `(("python-setuptools" ,python-setuptools) | |
2075 | ("python-pyjwt" ,python-pyjwt) | |
2076 | ("python-pycrypto" ,python-pycrypto) | |
2077 | ("python-nose" ,python-nose) | |
2078 | ("python-mock" ,python-mock))) | |
2079 | (home-page "https://github.com/idan/oauthlib") | |
2080 | (synopsis "OAuth implementation for Python") | |
2081 | (description | |
2082 | "Oauthlib is a generic, spec-compliant, thorough implementation of the | |
2083 | OAuth request-signing logic.") | |
2084 | (license bsd-3))) | |
2085 | ||
2086 | (define-public python2-oauthlib | |
2087 | (let ((base (package-with-python2 python-oauthlib))) | |
2088 | (package | |
2089 | (inherit base) | |
2cec1f6f DT |
2090 | (inputs |
2091 | (append (package-inputs base) | |
2092 | `(("python2-unittest2" ,python2-unittest2))))))) | |
ec5dbb5c DT |
2093 | |
2094 | (define-public python-itsdangerous | |
2095 | (package | |
2096 | (name "python-itsdangerous") | |
2097 | (version "0.24") | |
2098 | (source | |
2099 | (origin | |
2100 | (method url-fetch) | |
2101 | (uri (string-append | |
2102 | "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-" | |
2103 | version ".tar.gz")) | |
2104 | (sha256 | |
2105 | (base32 | |
2106 | "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb")))) | |
2107 | (build-system python-build-system) | |
2108 | (inputs | |
2109 | `(("python-setuptools" ,python-setuptools))) | |
2110 | (home-page "http://github.com/mitsuhiko/itsdangerous") | |
2111 | (synopsis "Python library for passing data to/from untrusted environments") | |
2112 | (description | |
2113 | "Itsdangerous provides various helpers to pass trusted data to untrusted | |
2114 | environments and back.") | |
2115 | (license bsd-3))) | |
2116 | ||
2117 | (define-public python2-itsdangerous | |
2118 | (package-with-python2 python-itsdangerous)) | |
5731cae3 | 2119 | |
8d12be1e RW |
2120 | (define-public python-pyyaml |
2121 | (package | |
2122 | (name "python-pyyaml") | |
2123 | (version "3.11") | |
2124 | (source | |
2125 | (origin | |
2126 | (method url-fetch) | |
2127 | (uri (string-append | |
2128 | "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-" | |
2129 | version ".tar.gz")) | |
2130 | (sha256 | |
2131 | (base32 | |
2132 | "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63")))) | |
2133 | (build-system python-build-system) | |
2134 | (inputs | |
2135 | `(("libyaml" ,libyaml))) | |
2136 | (native-inputs | |
2137 | `(("python-setuptools" ,python-setuptools))) | |
2138 | (home-page "http://pyyaml.org/wiki/PyYAML") | |
2139 | (synopsis "YAML parser and emitter for Python") | |
2140 | (description | |
2141 | "PyYAML is a YAML parser and emitter for Python. PyYAML features a | |
2142 | complete YAML 1.1 parser, Unicode support, pickle support, capable extension | |
2143 | API, and sensible error messages. PyYAML supports standard YAML tags and | |
2144 | provides Python-specific tags that allow to represent an arbitrary Python | |
2145 | object.") | |
2146 | (license license:expat))) | |
2147 | ||
2148 | (define-public python2-pyyaml | |
2149 | (package-with-python2 python-pyyaml)) | |
2150 | ||
5731cae3 DT |
2151 | (define-public python-virtualenv |
2152 | (package | |
2153 | (name "python-virtualenv") | |
2154 | (version "1.11.6") | |
2155 | (source | |
2156 | (origin | |
2157 | (method url-fetch) | |
2158 | (uri (string-append | |
2159 | "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-" | |
2160 | version ".tar.gz")) | |
2161 | (sha256 | |
2162 | (base32 | |
2163 | "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy")))) | |
2164 | (build-system python-build-system) | |
2165 | (inputs | |
2166 | `(("python-setuptools" ,python-setuptools) | |
2167 | ("python-mock" ,python-mock) | |
2168 | ("python-nose" ,python-nose))) | |
2169 | (home-page "https://virtualenv.pypa.io/") | |
2170 | (synopsis "Virtual Python environment builder") | |
2171 | (description | |
2172 | "Virtualenv is a tool to create isolated Python environments.") | |
bd3fa666 | 2173 | (license license:expat))) |
5731cae3 DT |
2174 | |
2175 | (define-public python2-virtualenv | |
2176 | (package-with-python2 python-virtualenv)) | |
8176d4d5 DT |
2177 | |
2178 | (define-public python-markupsafe | |
2179 | (package | |
2180 | (name "python-markupsafe") | |
2181 | (version "0.23") | |
2182 | (source | |
2183 | (origin | |
2184 | (method url-fetch) | |
2185 | (uri (string-append | |
2186 | "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-" | |
2187 | version ".tar.gz")) | |
2188 | (sha256 | |
2189 | (base32 | |
2190 | "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54")))) | |
2191 | (build-system python-build-system) | |
2192 | (inputs | |
2193 | `(("python-setuptools" ,python-setuptools))) | |
2194 | (home-page "http://github.com/mitsuhiko/markupsafe") | |
2195 | (synopsis "XML/HTML/XHTML markup safe string implementation for Python") | |
2196 | (description | |
2197 | "Markupsafe provides an XML/HTML/XHTML markup safe string implementation | |
2198 | for Python.") | |
2199 | (license bsd-3))) | |
2200 | ||
2201 | (define-public python2-markupsafe | |
2202 | (package-with-python2 python-markupsafe)) | |
fe34f0d1 DT |
2203 | |
2204 | (define-public python-jinja2 | |
2205 | (package | |
2206 | (name "python-jinja2") | |
2207 | (version "2.7.3") | |
2208 | (source | |
2209 | (origin | |
2210 | (method url-fetch) | |
2211 | (uri (string-append | |
2212 | "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-" | |
2213 | version ".tar.gz")) | |
2214 | (sha256 | |
2215 | (base32 | |
2216 | "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f")))) | |
2217 | (build-system python-build-system) | |
2218 | (inputs | |
2219 | `(("python-setuptools" ,python-setuptools) | |
2220 | ("python-markupsafe" ,python-markupsafe))) | |
2221 | (home-page "http://jinja.pocoo.org/") | |
2222 | (synopsis "Python template engine") | |
2223 | (description | |
2224 | "Jinja2 is a small but fast and easy to use stand-alone template engine | |
2225 | written in pure Python.") | |
2226 | (license bsd-3))) | |
2227 | ||
2228 | (define-public python2-jinja2 | |
2229 | (package-with-python2 python-jinja2)) | |
3580ab8b DT |
2230 | |
2231 | (define-public python-docutils | |
2232 | (package | |
2233 | (name "python-docutils") | |
2234 | (version "0.12") | |
2235 | (source | |
2236 | (origin | |
2237 | (method url-fetch) | |
2238 | (uri (string-append | |
2239 | "https://pypi.python.org/packages/source/d/docutils/docutils-" | |
2240 | version ".tar.gz")) | |
2241 | (sha256 | |
2242 | (base32 | |
2243 | "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7")))) | |
2244 | (build-system python-build-system) | |
2245 | (inputs | |
2246 | `(("python-setuptools" ,python-setuptools))) | |
2247 | (arguments | |
2248 | '(#:tests? #f)) ; no setup.py test command | |
2249 | (home-page "http://docutils.sourceforge.net/") | |
2250 | (synopsis "Python Documentation Utilities") | |
2251 | (description | |
2252 | "Docutils is a modular system for processing documentation into useful | |
2253 | formats, such as HTML, XML, and LaTeX. For input Docutils supports | |
2254 | reStructuredText.") | |
2255 | ;; Most of the source code is public domain, but some source files are | |
2256 | ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses. | |
2257 | (license (list public-domain psfl bsd-2 gpl3+)))) | |
2258 | ||
2259 | (define-public python2-docutils | |
2260 | (package-with-python2 python-docutils)) | |
fb35b7c0 DT |
2261 | |
2262 | (define-public python-pygments | |
2263 | (package | |
2264 | (name "python-pygments") | |
2265 | (version "1.6") | |
2266 | (source | |
2267 | (origin | |
2268 | (method url-fetch) | |
2269 | (uri (string-append | |
2270 | "https://pypi.python.org/packages/source/P/Pygments/Pygments-" | |
2271 | version ".tar.gz")) | |
2272 | (sha256 | |
2273 | (base32 | |
2274 | "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr")))) | |
2275 | (build-system python-build-system) | |
2276 | (inputs | |
2277 | `(("python-setuptools" ,python-setuptools))) | |
2278 | (home-page "http://pygments.org/") | |
2279 | (synopsis "Syntax highlighting") | |
2280 | (description | |
2281 | "Pygments is a syntax highlighting package written in Python.") | |
2282 | (license bsd-2))) | |
2283 | ||
2284 | (define-public python2-pygments | |
2285 | (package-with-python2 python-pygments)) | |
9dd6078d DT |
2286 | |
2287 | (define-public python-sphinx | |
2288 | (package | |
2289 | (name "python-sphinx") | |
2290 | (version "1.2.3") | |
2291 | (source | |
2292 | (origin | |
2293 | (method url-fetch) | |
2294 | (uri (string-append | |
2295 | "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-" | |
2296 | version ".tar.gz")) | |
2297 | (sha256 | |
2298 | (base32 | |
2299 | "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl")))) | |
2300 | (build-system python-build-system) | |
2301 | (inputs | |
2302 | `(("python-setuptools" ,python-setuptools) | |
2303 | ("python-jinja2" ,python-jinja2) | |
2304 | ("python-docutils" ,python-docutils) | |
2305 | ("python-pygments" ,python-pygments))) | |
2306 | (home-page "http://sphinx-doc.org/") | |
2307 | (synopsis "Python documentation generator") | |
2308 | (description "Sphinx is a tool that makes it easy to create documentation | |
2309 | for Python projects or other documents consisting of multiple reStructuredText | |
2310 | sources.") | |
2311 | (license bsd-3))) | |
2312 | ||
2313 | (define-public python2-sphinx | |
2314 | (package-with-python2 python-sphinx)) | |
6888830b | 2315 | |
ad320b20 RW |
2316 | (define-public python-sphinx-rtd-theme |
2317 | (package | |
2318 | (name "python-sphinx-rtd-theme") | |
2319 | (version "0.1.6") | |
2320 | (source | |
2321 | (origin | |
2322 | (method url-fetch) | |
2323 | (uri (string-append "https://pypi.python.org/packages/source/s/" | |
2324 | "sphinx_rtd_theme/sphinx_rtd_theme-" | |
2325 | version ".tar.gz")) | |
2326 | (sha256 | |
2327 | (base32 | |
2328 | "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g")))) | |
2329 | (build-system python-build-system) | |
2330 | (arguments | |
2331 | `(;; With standard flags, the install phase attempts to create a zip'd | |
2332 | ;; egg file, and fails with an error: 'ZIP does not support timestamps | |
2333 | ;; before 1980' | |
2334 | #:configure-flags '("--single-version-externally-managed" | |
2335 | "--record=sphinx-rtd-theme.txt"))) | |
2336 | (native-inputs | |
2337 | `(("python-setuptools" ,python-setuptools))) | |
2338 | (inputs | |
2339 | `(("python-docutils" ,python-docutils) | |
2340 | ("python-sphinx" ,python-sphinx))) | |
2341 | (home-page "https://github.com/snide/sphinx_rtd_theme/") | |
2342 | (synopsis "ReadTheDocs.org theme for Sphinx") | |
2343 | (description "A theme for Sphinx used by ReadTheDocs.org.") | |
bd3fa666 | 2344 | (license license:expat))) |
ad320b20 RW |
2345 | |
2346 | (define-public python2-sphinx-rtd-theme | |
2347 | (package-with-python2 python-sphinx-rtd-theme)) | |
2348 | ||
f4de5b3b CAW |
2349 | (define-public python-feedgenerator |
2350 | (package | |
2351 | (name "python-feedgenerator") | |
2352 | (version "20150710.97185b7") | |
2353 | (source | |
2354 | ;; Using the git checkout for now because license file not added till | |
2355 | ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39 | |
2356 | (origin | |
2357 | (method git-fetch) | |
2358 | (uri (git-reference | |
2359 | (url "https://github.com/dmdm/feedgenerator-py3k.git") | |
2360 | (commit "97185b7566c240c4bf5ed80db7d6c271204dab39"))) | |
2361 | (sha256 | |
2362 | (base32 | |
2363 | "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a")))) | |
2364 | (arguments | |
2365 | `(;; With standard flags, the install phase attempts to create a zip'd | |
2366 | ;; egg file, and fails with an error: 'ZIP does not support timestamps | |
2367 | ;; before 1980' | |
2368 | #:configure-flags '("--single-version-externally-managed" | |
2369 | "--record=feedgenerator.txt"))) | |
2370 | (build-system python-build-system) | |
2371 | (inputs | |
2372 | `(("python-setuptools" ,python-setuptools) | |
2373 | ("python-pytz" ,python-pytz) | |
2374 | ("python-six" ,python-six))) | |
2375 | (home-page | |
2376 | "https://github.com/dmdm/feedgenerator-py3k.git") | |
2377 | (synopsis | |
2378 | "Standalone version of Django's Atom/RSS feed generator") | |
2379 | (description | |
2380 | "Feedgenerator-py3k is a standalone version of Django's feedgenerator, | |
2381 | which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") | |
2382 | (license bsd-3))) | |
2383 | ||
2384 | (define-public python2-feedgenerator | |
2385 | (package-with-python2 python-feedgenerator)) | |
2386 | ||
59ad30e3 CAW |
2387 | (define-public python-blinker |
2388 | (package | |
2389 | (name "python-blinker") | |
2390 | (version "1.3") | |
2391 | (source | |
2392 | (origin | |
2393 | (method url-fetch) | |
2394 | (uri (string-append | |
2395 | "https://pypi.python.org/packages/source/b/blinker/blinker-" | |
2396 | version ".tar.gz")) | |
2397 | (sha256 | |
2398 | (base32 | |
2399 | "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8")))) | |
2400 | (build-system python-build-system) | |
2401 | (native-inputs | |
2402 | `(("python-setuptools" ,python-setuptools))) | |
2403 | ;; No "test" command supplied to setuptools, so unless there's another way | |
2404 | ;; to run tests, we're skipping them! | |
2405 | (arguments '(#:tests? #f)) | |
2406 | (home-page "http://pythonhosted.org/blinker/") | |
2407 | (synopsis "Fast, simple object-to-object and broadcast signaling") | |
2408 | (description | |
2409 | "Blinker provides a fast dispatching system that allows any number of | |
2410 | interested parties to subscribe to events, or \"signals\".") | |
2411 | (license license:expat))) | |
2412 | ||
2413 | (define-public python2-blinker | |
2414 | (package-with-python2 python-blinker)) | |
2415 | ||
b8050e71 CAW |
2416 | (define-public pelican |
2417 | (package | |
2418 | (name "pelican") | |
2419 | (version "3.6.0") | |
2420 | (source | |
2421 | (origin | |
2422 | (method url-fetch) | |
2423 | (uri (string-append | |
2424 | "https://pypi.python.org/packages/source/p/pelican/pelican-" | |
2425 | version ".tar.gz")) | |
2426 | (sha256 | |
2427 | (base32 | |
2428 | "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps")))) | |
2429 | (build-system python-build-system) | |
2430 | (native-inputs | |
2431 | `(("python-setuptools" ,python-setuptools))) | |
2432 | (propagated-inputs | |
2433 | `(("python-feedgenerator" ,python-feedgenerator) | |
2434 | ("python-jinja2" ,python-jinja2) | |
2435 | ("python-pygments" ,python-pygments) | |
2436 | ("python-docutils" ,python-docutils) | |
2437 | ("python-pytz" ,python-pytz) | |
2438 | ("python-blinker" ,python-blinker) | |
2439 | ("python-unidecode" ,python-unidecode) | |
2440 | ("python-six" ,python-six) | |
2441 | ("python-dateutil-2" ,python-dateutil-2))) | |
2442 | (home-page "http://getpelican.com/") | |
2443 | (arguments | |
2444 | `(;; XXX Requires a lot more packages to do unit tests :P | |
2445 | #:tests? #f | |
2446 | #:phases (modify-phases %standard-phases | |
2447 | (add-before | |
2448 | 'install 'adjust-requires | |
2449 | ;; Since feedgenerator is installed from git, it doesn't | |
2450 | ;; conform to the version requirements. | |
2451 | ;; | |
2452 | ;; We *do have* "feedgenerator >= 1.6", but strip off the | |
2453 | ;; version requirement so setuptools doesn't get confused. | |
2454 | (lambda _ | |
2455 | (substitute* "setup.py" | |
2456 | (("['\"]feedgenerator.*?['\"]") | |
2457 | "'feedgenerator'"))))))) | |
2458 | (synopsis "Python-based static site publishing system") | |
2459 | (description | |
2460 | "Pelican is a tool to generate a static blog from reStructuredText, | |
2461 | Markdown input files, and more. Pelican uses Jinja2 for templating | |
2462 | and is very extensible.") | |
2463 | (license agpl3+))) | |
2464 | ||
240ca4aa RW |
2465 | (define-public python-scikit-learn |
2466 | (package | |
2467 | (name "python-scikit-learn") | |
be0a4c26 | 2468 | (version "0.16.1") |
240ca4aa RW |
2469 | (source |
2470 | (origin | |
2471 | (method url-fetch) | |
2472 | (uri (string-append | |
2473 | "https://github.com/scikit-learn/scikit-learn/archive/" | |
2474 | version ".tar.gz")) | |
2475 | (sha256 | |
2476 | (base32 | |
be0a4c26 | 2477 | "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih")))) |
240ca4aa RW |
2478 | (build-system python-build-system) |
2479 | (arguments | |
2480 | `(#:phases | |
2481 | (alist-cons-before | |
2f6b3d2e RW |
2482 | 'check 'set-HOME |
2483 | ;; some tests require access to "$HOME" | |
2484 | (lambda _ (setenv "HOME" "/tmp")) | |
2485 | ;; Tests can only be run after the library has been installed and not | |
2486 | ;; within the source directory. | |
2487 | (alist-cons-after | |
2488 | 'install 'check | |
2489 | (lambda _ | |
2490 | (with-directory-excursion "/tmp" | |
2491 | ;; With Python 3 one test of 3334 fails | |
2492 | ;; (sklearn.tests.test_common.test_transformers); see | |
2493 | ;; https://github.com/scikit-learn/scikit-learn/issues/3693 | |
2494 | (system* "nosetests" "-v" "sklearn"))) | |
2495 | (alist-delete 'check %standard-phases))))) | |
240ca4aa | 2496 | (inputs |
2f6b3d2e | 2497 | `(("openblas" ,openblas) |
240ca4aa RW |
2498 | ("python-nose" ,python-nose))) |
2499 | (propagated-inputs | |
2500 | `(("python-numpy" ,python-numpy) | |
2501 | ("python-scipy" ,python-scipy))) | |
2502 | (home-page "http://scikit-learn.org/") | |
2503 | (synopsis "Machine Learning in Python") | |
2504 | (description | |
2505 | "Scikit-learn provides simple and efficient tools for data | |
2506 | mining and data analysis.") | |
2507 | (license bsd-3))) | |
2508 | ||
2509 | (define-public python2-scikit-learn | |
2510 | (let ((scikit (package-with-python2 python-scikit-learn))) | |
2511 | (package (inherit scikit) | |
2512 | (propagated-inputs | |
2513 | `(("python2-numpy" ,python2-numpy) | |
2514 | ("python2-scipy" ,python2-scipy) | |
2515 | ,@(alist-delete | |
2516 | "python-numpy" | |
2517 | (alist-delete | |
2518 | "python-scipy" (package-propagated-inputs scikit)))))))) | |
2519 | ||
12f8f9bb RW |
2520 | (define-public python-scikit-image |
2521 | (package | |
2522 | (name "python-scikit-image") | |
2523 | (version "0.11.3") | |
2524 | (source | |
2525 | (origin | |
2526 | (method url-fetch) | |
2527 | (uri (string-append | |
2528 | "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-" | |
2529 | version ".tar.gz")) | |
2530 | (sha256 | |
2531 | (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn")))) | |
2532 | (build-system python-build-system) | |
2533 | (propagated-inputs | |
2534 | `(("python-matplotlib" ,python-matplotlib) | |
2535 | ("python-networkx" ,python-networkx) | |
2536 | ("python-numpy" ,python-numpy) | |
2537 | ("python-scipy" ,python-scipy) | |
2538 | ("python-six" ,python-six) | |
2539 | ("python-pillow" ,python-pillow))) | |
2540 | (native-inputs | |
2541 | `(("python-cython" ,python-cython) | |
2542 | ("python-setuptools" ,python-setuptools))) | |
2543 | (home-page "http://scikit-image.org/") | |
2544 | (synopsis "Image processing in Python") | |
2545 | (description | |
e881752c | 2546 | "Scikit-image is a collection of algorithms for image processing.") |
12f8f9bb RW |
2547 | (license bsd-3))) |
2548 | ||
2549 | (define-public python2-scikit-image | |
2550 | (let ((scikit-image (package-with-python2 python-scikit-image))) | |
2551 | (package (inherit scikit-image) | |
2552 | (native-inputs | |
2553 | `(("python2-mock" ,python2-mock) | |
2554 | ,@(package-native-inputs scikit-image))) | |
2555 | (propagated-inputs | |
2556 | `(("python2-pytz" ,python2-pytz) | |
2557 | ,@(package-propagated-inputs scikit-image)))))) | |
2558 | ||
5394a6a6 RW |
2559 | (define-public python-redis |
2560 | (package | |
2561 | (name "python-redis") | |
2562 | (version "2.10.3") | |
2563 | (source | |
2564 | (origin | |
2565 | (method url-fetch) | |
2566 | (uri (string-append | |
2567 | "https://pypi.python.org/packages/source/r/redis/redis-" | |
2568 | version ".tar.gz")) | |
2569 | (sha256 | |
2570 | (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4")))) | |
2571 | (build-system python-build-system) | |
2572 | ;; Tests require a running Redis server | |
2573 | (arguments '(#:tests? #f)) | |
2574 | (native-inputs | |
2575 | `(("python-setuptools" ,python-setuptools) | |
2576 | ("python-pytest" ,python-pytest))) | |
2577 | (home-page "https://github.com/andymccurdy/redis-py") | |
2578 | (synopsis "Redis Python client") | |
2579 | (description | |
2580 | "This package provides a Python interface to the Redis key-value store.") | |
2581 | (license license:expat))) | |
2582 | ||
2583 | (define-public python2-redis | |
2584 | (package-with-python2 python-redis)) | |
2585 | ||
748cef5b RW |
2586 | (define-public python-rq |
2587 | (package | |
2588 | (name "python-rq") | |
2589 | (version "0.5.2") | |
2590 | (source | |
2591 | (origin | |
2592 | (method url-fetch) | |
2593 | (uri (string-append | |
2594 | "https://pypi.python.org/packages/source/r/rq/rq-" | |
2595 | version ".tar.gz")) | |
2596 | (sha256 | |
2597 | (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix")))) | |
2598 | (build-system python-build-system) | |
2599 | (propagated-inputs | |
2600 | `(("python-click" ,python-click) | |
2601 | ("python-redis" ,python-redis))) | |
2602 | (native-inputs | |
2603 | `(("python-setuptools" ,python-setuptools))) | |
2604 | (home-page "http://python-rq.org/") | |
2605 | (synopsis "Simple job queues for Python") | |
2606 | (description | |
2607 | "RQ (Redis Queue) is a simple Python library for queueing jobs and | |
2608 | processing them in the background with workers. It is backed by Redis and it | |
2609 | is designed to have a low barrier to entry.") | |
2610 | (license bsd-2))) | |
2611 | ||
2612 | (define-public python2-rq | |
2613 | (package-with-python2 python-rq)) | |
2614 | ||
6888830b FB |
2615 | (define-public python-cython |
2616 | (package | |
2617 | (name "python-cython") | |
2618 | (version "0.21.1") | |
2619 | (source | |
2620 | (origin | |
2621 | (method url-fetch) | |
2622 | (uri (string-append "http://cython.org/release/Cython-" | |
2623 | version ".tar.gz")) | |
2624 | (sha256 | |
2625 | (base32 | |
2626 | "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3")))) | |
2627 | (build-system python-build-system) | |
2628 | ;; we need the full python package and not just the python-wrapper | |
2629 | ;; because we need libpython3.3m.so | |
2630 | (inputs | |
2631 | `(("python" ,python))) | |
2632 | (arguments | |
2633 | `(#:phases | |
2634 | (alist-cons-before | |
2635 | 'check 'set-HOME | |
2636 | ;; some tests require access to "$HOME/.cython" | |
2637 | (lambda* _ (setenv "HOME" "/tmp")) | |
2638 | (alist-replace | |
2639 | 'check | |
2640 | (lambda _ (zero? (system* "python" "runtests.py" "-vv"))) | |
2641 | %standard-phases)))) | |
2642 | (home-page "http://cython.org/") | |
2643 | (synopsis "C extensions for Python") | |
2644 | (description "Cython is an optimising static compiler for both the Python | |
2645 | programming language and the extended Cython programming language. It makes | |
2646 | writing C extensions for Python as easy as Python itself.") | |
2647 | (license asl2.0))) | |
2648 | ||
2649 | (define-public python2-cython | |
2650 | (package (inherit (package-with-python2 python-cython)) | |
2651 | (name "python2-cython") | |
2652 | (inputs | |
2653 | `(("python-2" ,python-2))))) ; this is not automatically changed | |
0da98533 FB |
2654 | |
2655 | ;; This version of numpy is missing the documentation and is only used to | |
2656 | ;; build matplotlib which is required to build numpy's documentation. | |
2657 | (define python-numpy-bootstrap | |
2658 | (package | |
2659 | (name "python-numpy-bootstrap") | |
2660 | (version "1.9.1") | |
2661 | (source | |
2662 | (origin | |
2663 | (method url-fetch) | |
2664 | (uri (string-append "mirror://sourceforge/numpy" | |
2665 | "/numpy-" version ".tar.gz")) | |
2666 | (sha256 | |
2667 | (base32 | |
2668 | "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80")))) | |
2669 | (build-system python-build-system) | |
2670 | (inputs | |
2671 | `(("python-nose" ,python-nose) | |
cba256f8 RW |
2672 | ("openblas" ,openblas) |
2673 | ("lapack" ,lapack))) | |
0da98533 | 2674 | (native-inputs |
19afbea1 | 2675 | `(("gfortran" ,gfortran))) |
0da98533 FB |
2676 | (arguments |
2677 | `(#:phases | |
2678 | (alist-cons-before | |
2679 | 'build 'set-environment-variables | |
2680 | (lambda* (#:key inputs #:allow-other-keys) | |
dbdfe515 RW |
2681 | (call-with-output-file "site.cfg" |
2682 | (lambda (port) | |
cba256f8 RW |
2683 | (format port |
2684 | "[openblas] | |
dbdfe515 RW |
2685 | libraries = openblas |
2686 | library_dirs = ~a/lib | |
2687 | include_dirs = ~a/include | |
cba256f8 RW |
2688 | |
2689 | [lapack] | |
2690 | lapack_libs = lapack | |
2691 | library_dirs = ~a/lib | |
2692 | include_dirs = ~a/include | |
2693 | " | |
2694 | (assoc-ref inputs "openblas") | |
2695 | (assoc-ref inputs "openblas") | |
2696 | (assoc-ref inputs "lapack") | |
2697 | (assoc-ref inputs "lapack")))) | |
dbdfe515 RW |
2698 | ;; Use "gcc" executable, not "cc". |
2699 | (substitute* "numpy/distutils/system_info.py" | |
2700 | (("c = distutils\\.ccompiler\\.new_compiler\\(\\)") | |
2701 | "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')")) | |
2702 | #t) | |
6a843168 FB |
2703 | ;; Tests can only be run after the library has been installed and not |
2704 | ;; within the source directory. | |
2705 | (alist-cons-after | |
2706 | 'install 'check | |
89b5c60e | 2707 | (lambda _ |
6a843168 | 2708 | (with-directory-excursion "/tmp" |
89b5c60e | 2709 | (zero? (system* "python" "-c" |
6a843168 | 2710 | "import numpy; numpy.test(verbose=2)")))) |
89b5c60e AE |
2711 | (alist-delete |
2712 | 'check | |
6a843168 | 2713 | %standard-phases))))) |
0da98533 FB |
2714 | (home-page "http://www.numpy.org/") |
2715 | (synopsis "Fundamental package for scientific computing with Python") | |
2716 | (description "NumPy is the fundamental package for scientific computing | |
e881752c | 2717 | with Python. It contains among other things: a powerful N-dimensional array |
0da98533 FB |
2718 | object, sophisticated (broadcasting) functions, tools for integrating C/C++ |
2719 | and Fortran code, useful linear algebra, Fourier transform, and random number | |
2720 | capabilities.") | |
2721 | (license bsd-3))) | |
2722 | ||
2723 | (define python2-numpy-bootstrap | |
2724 | (package-with-python2 python-numpy-bootstrap)) | |
15bfe6d6 | 2725 | |
3a1bfe18 RW |
2726 | (define-public python2-fastlmm |
2727 | (package | |
2728 | (name "python2-fastlmm") | |
2729 | (version "0.2.14") | |
2730 | (source | |
2731 | (origin | |
2732 | (method url-fetch) | |
2733 | (uri (string-append | |
2734 | "https://pypi.python.org/packages/source/f/fastlmm" | |
2735 | "/fastlmm-" version ".zip")) | |
2736 | (sha256 | |
2737 | (base32 | |
2738 | "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l")))) | |
2739 | (build-system python-build-system) | |
2740 | (arguments | |
2741 | `(#:python ,python-2)) ; only Python 2.7 is supported | |
2742 | (propagated-inputs | |
2743 | `(("python2-numpy" ,python2-numpy) | |
2744 | ("python2-scipy" ,python2-scipy) | |
2745 | ("python2-matplotlib" ,python2-matplotlib) | |
2746 | ("python2-pandas" ,python2-pandas) | |
2747 | ("python2-scikit-learn" ,python2-scikit-learn) | |
2748 | ("python2-cython" ,python2-cython) | |
2749 | ("python2-pysnptools" ,python2-pysnptools))) | |
2750 | (native-inputs | |
2751 | `(("unzip" ,unzip) | |
2752 | ("python2-mock" ,python2-mock) | |
2753 | ("python2-setuptools" ,python2-setuptools))) | |
2754 | (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/") | |
2755 | (synopsis "Perform genome-wide association studies on large data sets") | |
2756 | (description | |
2757 | "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed | |
2758 | Models, is a program for performing both single-SNP and SNP-set genome-wide | |
2759 | association studies (GWAS) on extremely large data sets.") | |
2760 | (license asl2.0))) | |
2761 | ||
2ee8869a FB |
2762 | (define-public python-numpy |
2763 | (package (inherit python-numpy-bootstrap) | |
2764 | (name "python-numpy") | |
2765 | (outputs '("out" "doc")) | |
89b5c60e | 2766 | (inputs |
2ee8869a FB |
2767 | `(("which" ,which) |
2768 | ("python-setuptools" ,python-setuptools) | |
2769 | ("python-matplotlib" ,python-matplotlib) | |
2770 | ("python-sphinx" ,python-sphinx) | |
2771 | ("python-pyparsing" ,python-pyparsing) | |
2772 | ("python-numpydoc" ,python-numpydoc) | |
2773 | ,@(package-inputs python-numpy-bootstrap))) | |
2774 | (native-inputs | |
2775 | `(("pkg-config" ,pkg-config) | |
2776 | ("texlive" ,texlive) | |
2777 | ("texinfo" ,texinfo) | |
2778 | ("perl" ,perl) | |
2779 | ,@(package-native-inputs python-numpy-bootstrap))) | |
2780 | (arguments | |
89b5c60e | 2781 | `(,@(substitute-keyword-arguments |
2ee8869a FB |
2782 | (package-arguments python-numpy-bootstrap) |
2783 | ((#:phases phases) | |
2784 | `(alist-cons-after | |
2785 | 'install 'install-doc | |
2786 | (lambda* (#:key outputs #:allow-other-keys) | |
2787 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
89b5c60e AE |
2788 | (doc (string-append |
2789 | data "/doc/" ,name "-" | |
2ee8869a FB |
2790 | ,(package-version python-numpy-bootstrap))) |
2791 | (info (string-append data "/info")) | |
2792 | (html (string-append doc "/html")) | |
2793 | (pyver ,(string-append "PYVER="))) | |
2794 | (with-directory-excursion "doc" | |
2795 | (mkdir-p html) | |
2796 | (system* "make" "html" pyver) | |
2797 | (system* "make" "latex" "PAPER=a4" pyver) | |
89b5c60e | 2798 | (system* "make" "-C" "build/latex" |
2ee8869a FB |
2799 | "all-pdf" "PAPER=a4" pyver) |
2800 | ;; FIXME: Generation of the info file fails. | |
2801 | ;; (system* "make" "info" pyver) | |
2802 | ;; (mkdir-p info) | |
2803 | ;; (copy-file "build/texinfo/numpy.info" | |
2804 | ;; (string-append info "/numpy.info")) | |
2805 | (for-each (lambda (file) | |
2806 | (copy-file (string-append "build/latex" file) | |
2807 | (string-append doc file))) | |
2808 | '("/numpy-ref.pdf" "/numpy-user.pdf")) | |
2809 | (with-directory-excursion "build/html" | |
2810 | (for-each (lambda (file) | |
2811 | (let* ((dir (dirname file)) | |
2812 | (tgt-dir (string-append html "/" dir))) | |
2813 | (unless (equal? "." dir) | |
2814 | (mkdir-p tgt-dir)) | |
96c46210 | 2815 | (install-file file html))) |
2ee8869a FB |
2816 | (find-files "." ".*")))))) |
2817 | ,phases))))))) | |
2818 | ||
764c077b LC |
2819 | (define-public python2-numpy |
2820 | (let ((numpy (package-with-python2 python-numpy))) | |
2821 | (package (inherit numpy) | |
88c26834 AE |
2822 | ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for |
2823 | ;; Python 2. | |
2824 | (inputs `(("python2-matplotlib" ,python2-matplotlib) | |
2825 | ,@(alist-delete "python-matplotlib" | |
2826 | (package-inputs numpy))))))) | |
2ee8869a | 2827 | |
15bfe6d6 FB |
2828 | (define-public python-pyparsing |
2829 | (package | |
2830 | (name "python-pyparsing") | |
e0669289 | 2831 | (version "2.0.3") |
15bfe6d6 FB |
2832 | (source |
2833 | (origin | |
2834 | (method url-fetch) | |
2835 | (uri (string-append "mirror://sourceforge/pyparsing" | |
2836 | "/pyparsing-" version ".tar.gz")) | |
2837 | (sha256 | |
2838 | (base32 | |
e0669289 | 2839 | "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6")))) |
15bfe6d6 FB |
2840 | (build-system python-build-system) |
2841 | (outputs '("out" "doc")) | |
2842 | (arguments | |
2843 | `(#:tests? #f ; no test target | |
2844 | #:modules ((guix build python-build-system) | |
2845 | (guix build utils)) | |
2846 | #:phases | |
2847 | (alist-cons-after | |
2848 | 'install 'install-doc | |
2849 | (lambda* (#:key outputs #:allow-other-keys) | |
89b5c60e | 2850 | (let* ((doc (string-append (assoc-ref outputs "doc") |
15bfe6d6 FB |
2851 | "/share/doc/" ,name "-" ,version)) |
2852 | (html-doc (string-append doc "/html")) | |
2853 | (examples (string-append doc "/examples"))) | |
2854 | (mkdir-p html-doc) | |
2855 | (mkdir-p examples) | |
89b5c60e | 2856 | (for-each |
15bfe6d6 | 2857 | (lambda (dir tgt) |
89b5c60e | 2858 | (map (lambda (file) |
96c46210 | 2859 | (install-file file tgt)) |
15bfe6d6 FB |
2860 | (find-files dir ".*"))) |
2861 | (list "docs" "htmldoc" "examples") | |
2862 | (list doc html-doc examples)))) | |
2863 | %standard-phases))) | |
2864 | (home-page "http://pyparsing.wikispaces.com") | |
2865 | (synopsis "Python parsing class library") | |
2866 | (description | |
2867 | "The pyparsing module is an alternative approach to creating and | |
2868 | executing simple grammars, vs. the traditional lex/yacc approach, or the use | |
2869 | of regular expressions. The pyparsing module provides a library of classes | |
2870 | that client code uses to construct the grammar directly in Python code.") | |
bd3fa666 | 2871 | (license license:expat))) |
15bfe6d6 FB |
2872 | |
2873 | (define-public python2-pyparsing | |
2874 | (package-with-python2 python-pyparsing)) | |
2875 | ||
ec00de35 FB |
2876 | (define-public python-numpydoc |
2877 | (package | |
2878 | (name "python-numpydoc") | |
2879 | (version "0.5") | |
2880 | (source | |
2881 | (origin | |
2882 | (method url-fetch) | |
89b5c60e | 2883 | (uri (string-append |
ec00de35 FB |
2884 | "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-" |
2885 | version ".tar.gz")) | |
2886 | (sha256 | |
2887 | (base32 | |
5e4d8f67 AE |
2888 | "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k")) |
2889 | (modules '((guix build utils))) | |
2890 | (snippet | |
2891 | '(begin | |
2892 | ;; Drop a test requiring matplotlib, which we cannot add as an | |
2893 | ;; input since it would create a circular dependency: Extend the | |
2894 | ;; test for Python 3, where it is already dropped, to Python 2. | |
2895 | (substitute* "numpydoc/tests/test_plot_directive.py" | |
2896 | (("3") "2")))))) | |
ec00de35 FB |
2897 | (build-system python-build-system) |
2898 | (inputs | |
2899 | `(("python-setuptools" ,python-setuptools) | |
2900 | ("python-docutils" ,python-docutils) | |
2901 | ("python-sphinx" ,python-sphinx) | |
2902 | ("python-nose" ,python-nose))) | |
2903 | (home-page "https://pypi.python.org/pypi/numpydoc") | |
2904 | (synopsis | |
2905 | "Numpy's Sphinx extensions") | |
2906 | (description | |
2907 | "Sphinx extension to support docstrings in Numpy format.") | |
2908 | (license bsd-2))) | |
2909 | ||
2910 | (define-public python2-numpydoc | |
5e4d8f67 | 2911 | (package-with-python2 python-numpydoc)) |
1c65314c FB |
2912 | |
2913 | (define-public python-matplotlib | |
2914 | (package | |
2915 | (name "python-matplotlib") | |
2916 | (version "1.4.2") | |
2917 | (source | |
2918 | (origin | |
2919 | (method url-fetch) | |
2920 | (uri (string-append "mirror://sourceforge/matplotlib" | |
2921 | "/matplotlib-" version ".tar.gz")) | |
2922 | (sha256 | |
2923 | (base32 | |
2924 | "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp")))) | |
2925 | (build-system python-build-system) | |
2926 | (outputs '("out" "doc")) | |
25f9a068 FB |
2927 | (propagated-inputs ; the following packages are all needed at run time |
2928 | `(("python-pyparsing" ,python-pyparsing) | |
2929 | ("python-pygobject" ,python-pygobject) | |
2930 | ("gobject-introspection" ,gobject-introspection) | |
2931 | ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated | |
2932 | ;; from 'gtk+') provides the required 'typelib' files used by | |
2933 | ;; 'gobject-introspection'. The location of these files is set with the | |
2934 | ;; help of the environment variable GI_TYPELIB_PATH. At build time this | |
2935 | ;; is done automatically by a 'native-search-path' procedure. However, | |
2936 | ;; at run-time the user must set this variable as follows: | |
2937 | ;; | |
2938 | ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0 | |
25f9a068 FB |
2939 | ("gtk+" ,gtk+) |
2940 | ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of | |
2941 | ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' | |
2942 | ;; object. For this reason we need to import both libraries. | |
2943 | ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo | |
2944 | ("python-pycairo" ,python-pycairo) | |
2945 | ("python-cairocffi" ,python-cairocffi))) | |
1c65314c FB |
2946 | (inputs |
2947 | `(("python-setuptools" ,python-setuptools) | |
2948 | ("python-dateutil" ,python-dateutil-2) | |
1c65314c FB |
2949 | ("python-six" ,python-six) |
2950 | ("python-pytz" ,python-pytz) | |
2951 | ("python-numpy" ,python-numpy-bootstrap) | |
2952 | ("python-sphinx" ,python-sphinx) | |
2953 | ("python-numpydoc" ,python-numpydoc) | |
2954 | ("python-nose" ,python-nose) | |
2955 | ("python-mock" ,python-mock) | |
2956 | ("libpng" ,libpng) | |
2957 | ("imagemagick" ,imagemagick) | |
2958 | ("freetype" ,freetype) | |
25f9a068 FB |
2959 | ("cairo" ,cairo) |
2960 | ("glib" ,glib) | |
4e7a137a | 2961 | ("python-pillow" ,python-pillow) |
1c65314c | 2962 | ;; FIXME: Add backends when available. |
1c65314c FB |
2963 | ;("python-wxpython" ,python-wxpython) |
2964 | ;("python-pyqt" ,python-pyqt) | |
2965 | )) | |
2966 | (native-inputs | |
2967 | `(("pkg-config" ,pkg-config) | |
2968 | ("texlive" ,texlive) | |
2969 | ("texinfo" ,texinfo))) | |
2970 | (arguments | |
2971 | `(#:phases | |
25f9a068 FB |
2972 | (alist-cons-before |
2973 | 'build 'configure-environment | |
2974 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2975 | (let ((cairo (assoc-ref inputs "cairo")) | |
2976 | (gtk+ (assoc-ref inputs "gtk+"))) | |
2977 | ;; Setting these directories in the 'basedirlist' of 'setup.cfg' | |
2978 | ;; has not effect. | |
25f9a068 FB |
2979 | (setenv "LD_LIBRARY_PATH" |
2980 | (string-append cairo "/lib:" gtk+ "/lib")) | |
2981 | (setenv "HOME" (getcwd)) | |
2982 | (call-with-output-file "setup.cfg" | |
2983 | (lambda (port) | |
2984 | (format port "[rc_options]~% | |
2985 | backend = GTK3Agg~%"))))) | |
2986 | (alist-cons-after | |
2987 | 'install 'install-doc | |
2988 | (lambda* (#:key outputs #:allow-other-keys) | |
2989 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
2990 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
2991 | (info (string-append data "/info")) | |
2992 | (html (string-append doc "/html"))) | |
2993 | (with-directory-excursion "doc" | |
25f9a068 FB |
2994 | ;; Produce pdf in 'A4' format. |
2995 | (substitute* (find-files "." "conf\\.py") | |
2996 | (("latex_paper_size = 'letter'") | |
2997 | "latex_paper_size = 'a4'")) | |
2998 | (mkdir-p html) | |
2999 | (mkdir-p info) | |
3000 | ;; The doc recommends to run the 'html' target twice. | |
3001 | (system* "python" "make.py" "html") | |
3002 | (system* "python" "make.py" "html") | |
3003 | (system* "python" "make.py" "latex") | |
3004 | (system* "python" "make.py" "texinfo") | |
3005 | (copy-file "build/texinfo/matplotlib.info" | |
3006 | (string-append info "/matplotlib.info")) | |
3007 | (copy-file "build/latex/Matplotlib.pdf" | |
3008 | (string-append doc "/Matplotlib.pdf")) | |
3009 | (copy-recursively "build/html" html)))) | |
3010 | %standard-phases)))) | |
1c65314c FB |
3011 | (home-page "http://matplotlib.org") |
3012 | (synopsis "2D plotting library for Python") | |
3013 | (description | |
3014 | "Matplotlib is a Python 2D plotting library which produces publication | |
3015 | quality figures in a variety of hardcopy formats and interactive environments | |
3016 | across platforms. Matplotlib can be used in Python scripts, the python and | |
3017 | ipython shell, web application servers, and six graphical user interface | |
3018 | toolkits.") | |
3019 | (license psfl))) | |
3020 | ||
764c077b LC |
3021 | (define-public python2-matplotlib |
3022 | (let ((matplotlib (package-with-python2 python-matplotlib))) | |
3023 | (package (inherit matplotlib) | |
88c26834 AE |
3024 | ;; Make sure to use special packages for Python 2 instead |
3025 | ;; of those automatically rewritten by package-with-python2. | |
89b5c60e | 3026 | (propagated-inputs |
7ca0dbc3 | 3027 | `(("python2-pycairo" ,python2-pycairo) |
764c077b LC |
3028 | ("python2-pygobject-2" ,python2-pygobject-2) |
3029 | ,@(alist-delete "python-pycairo" | |
3030 | (alist-delete "python-pygobject" | |
89b5c60e | 3031 | (package-propagated-inputs |
88c26834 | 3032 | matplotlib)))))))) |
94914805 | 3033 | |
0dde6232 RW |
3034 | (define-public python2-pysnptools |
3035 | (package | |
3036 | (name "python2-pysnptools") | |
3037 | (version "0.2.13") | |
3038 | (source | |
3039 | (origin | |
3040 | (method url-fetch) | |
3041 | (uri (string-append | |
3042 | "https://pypi.python.org/packages/source/p/pysnptools" | |
3043 | "/pysnptools-" version ".zip")) | |
3044 | (sha256 | |
3045 | (base32 | |
3046 | "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib")))) | |
3047 | (build-system python-build-system) | |
3048 | (arguments | |
3049 | `(#:python ,python-2)) ; only Python 2.7 is supported | |
3050 | (propagated-inputs | |
3051 | `(("python2-numpy" ,python2-numpy) | |
3052 | ("python2-scipy" ,python2-scipy) | |
3053 | ("python2-pandas" ,python2-pandas) | |
3054 | ("python2-cython" ,python2-cython))) | |
3055 | (native-inputs | |
3056 | `(("unzip" ,unzip) | |
3057 | ("python2-setuptools" ,python2-setuptools))) | |
3058 | (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/") | |
3059 | (synopsis "Library for reading and manipulating genetic data") | |
3060 | (description | |
3061 | "PySnpTools is a library for reading and manipulating genetic data. It | |
3062 | can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of | |
3063 | those files. It can also efficiently manipulate ranges of integers using set | |
3064 | operators such as union, intersection, and difference.") | |
3065 | (license asl2.0))) | |
3066 | ||
c9b1b4f9 RW |
3067 | (define-public python-rpy2 |
3068 | (package | |
3069 | (name "python-rpy2") | |
3070 | (version "2.6.0") | |
3071 | (source | |
3072 | (origin | |
3073 | (method url-fetch) | |
3074 | (uri (string-append "https://pypi.python.org/packages/source/r/rpy2" | |
3075 | "/rpy2-" version ".tar.gz")) | |
3076 | (sha256 | |
3077 | (base32 | |
3078 | "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk")))) | |
3079 | (build-system python-build-system) | |
3080 | (inputs | |
3081 | `(("python-six" ,python-six) | |
3082 | ("readline" ,readline) | |
3083 | ("icu4c" ,icu4c) | |
3084 | ("pcre" ,pcre) | |
3085 | ("r" ,r))) | |
3086 | (native-inputs | |
3087 | `(("python-setuptools" ,python-setuptools))) | |
3088 | (home-page "http://rpy.sourceforge.net/") | |
3089 | (synopsis "Python interface to the R language") | |
3090 | (description "rpy2 is a redesign and rewrite of rpy. It is providing a | |
3091 | low-level interface to R from Python, a proposed high-level interface, | |
3092 | including wrappers to graphical libraries, as well as R-like structures and | |
3093 | functions.") | |
3094 | (license gpl3+))) | |
3095 | ||
3096 | (define-public python2-rpy2 | |
3097 | (let ((rpy2 (package-with-python2 python-rpy2))) | |
3098 | (package (inherit rpy2) | |
3099 | (native-inputs | |
3100 | `(("python2-singledispatch" ,python2-singledispatch) | |
3101 | ,@(package-native-inputs rpy2)))))) | |
3102 | ||
bb986599 FB |
3103 | (define-public python-scipy |
3104 | (package | |
3105 | (name "python-scipy") | |
da6ce3f1 | 3106 | (version "0.15.0") |
bb986599 FB |
3107 | (source |
3108 | (origin | |
3109 | (method url-fetch) | |
3110 | (uri (string-append "mirror://sourceforge/scipy" | |
da6ce3f1 | 3111 | "/scipy-" version ".tar.xz")) |
bb986599 FB |
3112 | (sha256 |
3113 | (base32 | |
da6ce3f1 | 3114 | "0fsqi05s035d7p6s8h3h2pvk1axias16chy17rw9l1bxvrfhmncf")))) |
bb986599 FB |
3115 | (build-system python-build-system) |
3116 | (inputs | |
3117 | `(("python-numpy" ,python-numpy) | |
3118 | ("python-matplotlib" ,python-matplotlib) | |
3119 | ("python-pyparsing" ,python-pyparsing) | |
3120 | ("python-nose" ,python-nose) | |
3121 | ("python-sphinx" ,python-sphinx) | |
719b01c1 RW |
3122 | ("lapack" ,lapack) |
3123 | ("openblas" ,openblas))) | |
bb986599 | 3124 | (native-inputs |
19afbea1 | 3125 | `(("gfortran" ,gfortran) |
bb986599 FB |
3126 | ("texlive" ,texlive) |
3127 | ("perl" ,perl))) | |
3128 | (outputs '("out" "doc")) | |
3129 | (arguments | |
3130 | `(#:phases | |
3131 | (alist-cons-before | |
719b01c1 | 3132 | 'build 'configure-openblas |
bb986599 | 3133 | (lambda* (#:key inputs #:allow-other-keys) |
719b01c1 RW |
3134 | (call-with-output-file "site.cfg" |
3135 | (lambda (port) | |
3136 | (format port | |
3137 | "[blas] | |
3138 | libraries = openblas | |
3139 | library_dirs = ~a/lib | |
3140 | include_dirs = ~a/include | |
3141 | [atlas] | |
3142 | library_dirs = ~a/lib | |
3143 | atlas_libs = openblas | |
3144 | " | |
3145 | (assoc-ref inputs "openblas") | |
3146 | (assoc-ref inputs "openblas") | |
3147 | (assoc-ref inputs "openblas")))) | |
3148 | #t) | |
bb986599 FB |
3149 | (alist-cons-after |
3150 | 'install 'install-doc | |
3151 | (lambda* (#:key outputs #:allow-other-keys) | |
3152 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3153 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3154 | (html (string-append doc "/html")) | |
3155 | (pyver ,(string-append "PYVER="))) | |
3156 | (with-directory-excursion "doc" | |
bb986599 FB |
3157 | ;; Fix generation of images for mathematical expressions. |
3158 | (substitute* (find-files "source" "conf\\.py") | |
3159 | (("pngmath_use_preview = True") | |
3160 | "pngmath_use_preview = False")) | |
3161 | (mkdir-p html) | |
3162 | (system* "make" "html" pyver) | |
3163 | (system* "make" "latex" "PAPER=a4" pyver) | |
3164 | (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver) | |
3165 | (copy-file "build/latex/scipy-ref.pdf" | |
3166 | (string-append doc "/scipy-ref.pdf")) | |
3167 | (with-directory-excursion "build/html" | |
3168 | (for-each (lambda (file) | |
3169 | (let* ((dir (dirname file)) | |
3170 | (tgt-dir (string-append html "/" dir))) | |
96c46210 | 3171 | (install-file file html))) |
bb986599 FB |
3172 | (find-files "." ".*")))))) |
3173 | ;; Tests can only be run after the library has been installed and not | |
3174 | ;; within the source directory. | |
3175 | (alist-cons-after | |
3176 | 'install 'check | |
89b5c60e | 3177 | (lambda _ |
bb986599 FB |
3178 | (with-directory-excursion "/tmp" |
3179 | (zero? (system* "python" "-c" "import scipy; scipy.test()")))) | |
89b5c60e AE |
3180 | (alist-delete |
3181 | 'check | |
bb986599 FB |
3182 | %standard-phases)))))) |
3183 | (home-page "http://www.scipy.org/") | |
3184 | (synopsis "The Scipy library provides efficient numerical routines") | |
3185 | (description "The SciPy library is one of the core packages that make up | |
3186 | the SciPy stack. It provides many user-friendly and efficient numerical | |
3187 | routines such as routines for numerical integration and optimization.") | |
3188 | (license bsd-3))) | |
3189 | ||
764c077b LC |
3190 | (define-public python2-scipy |
3191 | (let ((scipy (package-with-python2 python-scipy))) | |
3192 | (package (inherit scipy) | |
3193 | ;; Use packages customized for python-2. | |
3194 | (inputs `(("python2-matplotlib" ,python2-matplotlib) | |
3195 | ("python2-numpy" ,python2-numpy) | |
89b5c60e AE |
3196 | ,@(alist-delete "python-matplotlib" |
3197 | (alist-delete "python-numpy" | |
764c077b | 3198 | (package-inputs scipy)))))))) |
bb986599 | 3199 | |
94914805 EB |
3200 | (define-public python-sqlalchemy |
3201 | (package | |
3202 | (name "python-sqlalchemy") | |
3203 | (version "0.9.7") | |
3204 | (source | |
3205 | (origin | |
3206 | (method url-fetch) | |
3207 | (uri (string-append "https://pypi.python.org/packages/source/S/" | |
3208 | "SQLAlchemy/SQLAlchemy-" version ".tar.gz")) | |
3209 | (sha256 | |
3210 | (base32 | |
3211 | "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz")))) | |
3212 | (build-system python-build-system) | |
3213 | (native-inputs | |
3214 | `(("python-cython" ,python-cython) ;for c extensions | |
3215 | ("python-pytest" ,python-pytest) | |
3216 | ("python-mock" ,python-mock))) ;for tests | |
3217 | (arguments | |
3218 | `(#:phases (alist-replace | |
3219 | 'check | |
3220 | (lambda _ (zero? (system* "py.test"))) | |
3221 | %standard-phases))) | |
3222 | (home-page "http://www.sqlalchemy.org") | |
3223 | (synopsis "Database abstraction library") | |
3224 | (description | |
3225 | "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that | |
3226 | gives application developers the full power and flexibility of SQL. It | |
3227 | provides a full suite of well known enterprise-level persistence patterns, | |
3228 | designed for efficient and high-performing database access, adapted into a | |
3229 | simple and Pythonic domain language.") | |
3230 | (license x11))) | |
3231 | ||
3232 | (define-public python2-sqlalchemy | |
3233 | (package-with-python2 python-sqlalchemy)) | |
c937562e | 3234 | |
1671c07c EB |
3235 | (define-public python-distutils-extra |
3236 | (package | |
3237 | (name "python-distutils-extra") | |
3238 | (version "2.38") | |
3239 | (source | |
3240 | (origin | |
3241 | (method url-fetch) | |
3242 | (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/" | |
3243 | version "/+download/python-distutils-extra-" | |
3244 | version ".tar.gz")) | |
3245 | (sha256 | |
3246 | (base32 | |
3247 | "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x")))) | |
3248 | (build-system python-build-system) | |
3249 | (native-inputs | |
3250 | `(("python-setuptools" ,python-setuptools))) | |
3251 | (home-page "https://launchpad.net/python-distutils-extra/") | |
3252 | (synopsis "Enhancements to Python's distutils") | |
3253 | (description | |
3254 | "The python-distutils-extra module enables you to easily integrate | |
3255 | gettext support, themed icons, and scrollkeeper-based documentation into | |
3256 | Python's distutils.") | |
3257 | (license gpl2))) | |
3258 | ||
3259 | (define-public python2-distutils-extra | |
3260 | (package-with-python2 python-distutils-extra)) | |
ea5456c8 EB |
3261 | |
3262 | (define-public python2-elib.intl | |
3263 | (package | |
3264 | (name "python2-elib.intl") | |
3265 | (version "0.0.3") | |
3266 | (source | |
3267 | (origin | |
3268 | ;; This project doesn't tag releases or publish tarballs, so we take | |
3269 | ;; source from a (semi-arbitrary, i.e. latest as of now) git commit. | |
3270 | (method git-fetch) | |
3271 | (uri (git-reference | |
3272 | (url "https://github.com/dieterv/elib.intl.git") | |
3273 | (commit "d09997cfef"))) | |
3274 | (sha256 | |
3275 | (base32 | |
3276 | "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d")))) | |
3277 | (build-system python-build-system) | |
3278 | (native-inputs | |
3279 | `(("python2-setuptools" ,python2-setuptools))) | |
3280 | (arguments | |
3281 | ;; incompatible with Python 3 (exception syntax) | |
3282 | `(#:python ,python-2 | |
3283 | #:tests? #f | |
3284 | ;; With standard flags, the install phase attempts to create a zip'd | |
3285 | ;; egg file, and fails with an error: 'ZIP does not support timestamps | |
3286 | ;; before 1980' | |
3287 | #:configure-flags '("--single-version-externally-managed" | |
3288 | "--record=elib.txt"))) | |
3289 | (home-page "https://github.com/dieterv/elib.intl") | |
3290 | (synopsis "Enhanced internationalization for Python") | |
3291 | (description | |
3292 | "The elib.intl module provides enhanced internationalization (I18N) | |
3293 | services for your Python modules and applications.") | |
3294 | (license lgpl3+))) | |
3295 | ||
c937562e EB |
3296 | (define-public python-pillow |
3297 | (package | |
3298 | (name "python-pillow") | |
5ff408d9 | 3299 | (version "2.8.1") |
c937562e EB |
3300 | (source |
3301 | (origin | |
3302 | (method url-fetch) | |
3303 | (uri (string-append "https://pypi.python.org/packages/source/P/" | |
3304 | "Pillow/Pillow-" version ".tar.gz")) | |
3305 | (sha256 | |
3306 | (base32 | |
5ff408d9 | 3307 | "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47")))) |
c937562e EB |
3308 | (build-system python-build-system) |
3309 | (native-inputs | |
3310 | `(("python-setuptools" ,python-setuptools) | |
3311 | ("python-nose" ,python-nose))) | |
3312 | (inputs | |
5ff408d9 SB |
3313 | `(("freetype" ,freetype) |
3314 | ("lcms" ,lcms) | |
c937562e EB |
3315 | ("zlib" ,zlib) |
3316 | ("libjpeg" ,libjpeg) | |
3317 | ("openjpeg" ,openjpeg) | |
5ff408d9 SB |
3318 | ("libtiff" ,libtiff) |
3319 | ("libwebp" ,libwebp))) | |
c937562e EB |
3320 | (propagated-inputs |
3321 | `(;; Used at runtime for pkg_resources | |
3322 | ("python-setuptools" ,python-setuptools))) | |
3323 | (arguments | |
e5358a6b LC |
3324 | `(#:phases (modify-phases %standard-phases |
3325 | (add-before | |
3326 | 'install 'disable-egg-compression | |
3327 | (lambda _ | |
3328 | ;; Leave the .egg uncompressed since compressing it would | |
3329 | ;; prevent the GC from identifying run-time dependencies. | |
3330 | ;; See <http://bugs.gnu.org/20765>. | |
3331 | (let ((port (open-file "setup.cfg" "a"))) | |
3332 | (display "\n[easy_install]\nzip_ok = 0\n" | |
3333 | port) | |
3334 | (close-port port) | |
3335 | #t))) | |
3336 | (add-after | |
3337 | 'install 'check-installed | |
3338 | (lambda _ | |
3339 | (begin | |
3340 | (setenv "HOME" (getcwd)) | |
3341 | (and (zero? (system* "python" "selftest.py" | |
3342 | "--installed")) | |
3343 | (zero? (system* "python" "test-installed.py")))))) | |
3344 | (delete 'check)))) | |
c937562e EB |
3345 | (home-page "https://pypi.python.org/pypi/Pillow") |
3346 | (synopsis "Fork of the Python Imaging Library") | |
3347 | (description | |
3348 | "The Python Imaging Library adds image processing capabilities to your | |
3349 | Python interpreter. This library provides extensive file format support, an | |
3350 | efficient internal representation, and fairly powerful image processing | |
3351 | capabilities. The core image library is designed for fast access to data | |
3352 | stored in a few basic pixel formats. It should provide a solid foundation for | |
3353 | a general image processing tool.") | |
3354 | (license (x11-style | |
3355 | "http://www.pythonware.com/products/pil/license.htm" | |
3356 | "The PIL Software License")))) | |
3357 | ||
3358 | (define-public python2-pillow | |
3359 | (package-with-python2 python-pillow)) | |
bb986599 | 3360 | |
a415f036 FB |
3361 | (define-public python-pycparser |
3362 | (package | |
3363 | (name "python-pycparser") | |
3364 | (version "2.10") | |
3365 | (source | |
3366 | (origin | |
3367 | (method url-fetch) | |
3368 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
3369 | "pycparser/pycparser-" version ".tar.gz")) | |
3370 | (sha256 | |
3371 | (base32 | |
3372 | "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm")))) | |
3373 | (outputs '("out" "doc")) | |
3374 | (build-system python-build-system) | |
3375 | (native-inputs | |
3376 | `(("pkg-config" ,pkg-config) | |
3377 | ("python-setuptools" ,python-setuptools))) | |
3378 | (arguments | |
89b5c60e | 3379 | `(#:phases |
a415f036 FB |
3380 | (alist-replace |
3381 | 'check | |
3382 | (lambda _ | |
3383 | (with-directory-excursion "tests" | |
3384 | (zero? (system* "python" "all_tests.py")))) | |
3385 | (alist-cons-after | |
3386 | 'install 'install-doc | |
3387 | (lambda* (#:key outputs #:allow-other-keys) | |
3388 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3389 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3390 | (examples (string-append doc "/examples"))) | |
3391 | (mkdir-p examples) | |
3392 | (for-each (lambda (file) | |
3393 | (copy-file (string-append "." file) | |
3394 | (string-append doc file))) | |
3395 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
3396 | (copy-recursively "examples" examples))) | |
3397 | %standard-phases)))) | |
3398 | (home-page "https://github.com/eliben/pycparser") | |
3399 | (synopsis "C parser in Python") | |
3400 | (description | |
3401 | "Pycparser is a complete parser of the C language, written in pure Python | |
3402 | using the PLY parsing library. It parses C code into an AST and can serve as | |
3403 | a front-end for C compilers or analysis tools.") | |
3404 | (license bsd-3))) | |
3405 | ||
3406 | (define-public python2-pycparser | |
3407 | (package-with-python2 python-pycparser)) | |
57c3f716 FB |
3408 | |
3409 | (define-public python-cffi | |
3410 | (package | |
3411 | (name "python-cffi") | |
4179f952 | 3412 | (version "1.2.1") |
57c3f716 FB |
3413 | (source |
3414 | (origin | |
3415 | (method url-fetch) | |
3416 | (uri (string-append "https://pypi.python.org/packages/source/c/" | |
3417 | "cffi/cffi-" version ".tar.gz")) | |
89b5c60e | 3418 | (sha256 |
4179f952 | 3419 | (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga")))) |
57c3f716 FB |
3420 | (build-system python-build-system) |
3421 | (outputs '("out" "doc")) | |
3422 | (inputs | |
3423 | `(("libffi" ,libffi))) | |
3424 | (propagated-inputs ; required at run-time | |
3425 | `(("python-pycparser" ,python-pycparser))) | |
3426 | (native-inputs | |
3427 | `(("pkg-config" ,pkg-config) | |
3428 | ("python-sphinx" ,python-sphinx) | |
4179f952 | 3429 | ("python-pytest" ,python-pytest) |
57c3f716 FB |
3430 | ("python-setuptools" ,python-setuptools))) |
3431 | (arguments | |
4179f952 | 3432 | `(#:phases |
57c3f716 FB |
3433 | (alist-cons-after |
3434 | 'install 'install-doc | |
3435 | (lambda* (#:key outputs #:allow-other-keys) | |
3436 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3437 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3438 | (html (string-append doc "/html"))) | |
3439 | (with-directory-excursion "doc" | |
3440 | (system* "make" "html") | |
3441 | (mkdir-p html) | |
3442 | (copy-recursively "build/html" html)) | |
3443 | (copy-file "LICENSE" (string-append doc "/LICENSE")))) | |
3444 | %standard-phases))) | |
3445 | (home-page "http://cffi.readthedocs.org") | |
3446 | (synopsis "Foreign function interface for Python") | |
3447 | (description | |
3448 | "Foreign Function Interface for Python calling C code.") | |
bd3fa666 | 3449 | (license license:expat))) |
57c3f716 FB |
3450 | |
3451 | (define-public python2-cffi | |
3452 | (package-with-python2 python-cffi)) | |
6fa14469 FB |
3453 | |
3454 | (define-public python-xcffib | |
3455 | (package | |
3456 | (name "python-xcffib") | |
3457 | (version "0.1.9") | |
3458 | (source | |
3459 | (origin | |
3460 | (method url-fetch) | |
3461 | (uri (string-append "https://pypi.python.org/packages/source/x/" | |
3462 | "xcffib/xcffib-" version ".tar.gz")) | |
3463 | (sha256 | |
3464 | (base32 | |
3465 | "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81")))) | |
3466 | (build-system python-build-system) | |
3467 | (inputs | |
3468 | `(("libxcb" ,libxcb) | |
3469 | ("python-six" ,python-six))) | |
3470 | (native-inputs | |
3471 | `(("python-setuptools" ,python-setuptools))) | |
3472 | (propagated-inputs | |
3473 | `(("python-cffi" ,python-cffi))) ; used at run time | |
3474 | (arguments | |
89b5c60e | 3475 | `(#:phases |
6fa14469 FB |
3476 | (alist-cons-after |
3477 | 'install 'install-doc | |
3478 | (lambda* (#:key outputs #:allow-other-keys) | |
3479 | (let ((doc (string-append (assoc-ref outputs "out") "/share" | |
3480 | "/doc/" ,name "-" ,version))) | |
3481 | (mkdir-p doc) | |
3482 | (copy-file "README.md" | |
3483 | (string-append doc "/README.md")))) | |
3484 | %standard-phases))) | |
3485 | (home-page "https://github.com/tych0/xcffib") | |
3486 | (synopsis "XCB Python bindings") | |
3487 | (description | |
3488 | "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds | |
3489 | support for Python 3 and PyPy. It is based on cffi.") | |
bd3fa666 | 3490 | (license license:expat))) |
6fa14469 FB |
3491 | |
3492 | (define-public python2-xcffib | |
3493 | (package-with-python2 python-xcffib)) | |
3494 | ||
9e099723 FB |
3495 | (define-public python-cairocffi |
3496 | (package | |
3497 | (name "python-cairocffi") | |
3498 | (version "0.6") | |
3499 | (source | |
3500 | (origin | |
3501 | (method url-fetch) | |
3502 | ;; The archive on pypi is missing the 'utils' directory! | |
3503 | (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v" | |
3504 | version ".tar.gz")) | |
f586c877 | 3505 | (file-name (string-append name "-" version ".tar.gz")) |
9e099723 FB |
3506 | (sha256 |
3507 | (base32 | |
3508 | "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51")))) | |
3509 | (build-system python-build-system) | |
3510 | (outputs '("out" "doc")) | |
3511 | (inputs | |
3512 | `(("gdk-pixbuf" ,gdk-pixbuf) | |
3513 | ("cairo" ,cairo))) | |
3514 | (native-inputs | |
3515 | `(("pkg-config" ,pkg-config) | |
3516 | ("python-sphinx" ,python-sphinx) | |
3517 | ("python-docutils" ,python-docutils) | |
3518 | ("python-setuptools" ,python-setuptools))) | |
3519 | (propagated-inputs | |
3520 | `(("python-xcffib" ,python-xcffib))) ; used at run time | |
3521 | (arguments | |
89b5c60e | 3522 | `(#:phases |
9e099723 FB |
3523 | (alist-cons-after |
3524 | 'install 'install-doc | |
3525 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3526 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3527 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3528 | (html (string-append doc "/html"))) | |
89b5c60e | 3529 | (setenv "LD_LIBRARY_PATH" |
9e099723 FB |
3530 | (string-append (assoc-ref inputs "cairo") "/lib" ":" |
3531 | (assoc-ref inputs "gdk-pixbuf") "/lib")) | |
3532 | (setenv "LANG" "en_US.UTF-8") | |
3533 | (mkdir-p html) | |
3534 | (for-each (lambda (file) | |
3535 | (copy-file (string-append "." file) | |
3536 | (string-append doc file))) | |
3537 | '("/README.rst" "/CHANGES" "/LICENSE")) | |
3538 | (system* "python" "setup.py" "build_sphinx") | |
3539 | (copy-recursively "docs/_build/html" html))) | |
3540 | %standard-phases))) | |
3541 | (home-page "https://github.com/SimonSapin/cairocffi") | |
3542 | (synopsis "Python bindings and object-oriented API for Cairo") | |
3543 | (description | |
3544 | "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of | |
3545 | Python bindings and object-oriented API for cairo. Cairo is a 2D vector | |
3546 | graphics library with support for multiple backends including image buffers, | |
3547 | PNG, PostScript, PDF, and SVG file output.") | |
3548 | (license bsd-3))) | |
3549 | ||
3550 | (define-public python2-cairocffi | |
3551 | (package-with-python2 python-cairocffi)) | |
3552 | ||
3cff95cb RW |
3553 | (define-public python-decorator |
3554 | (package | |
3555 | (name "python-decorator") | |
3556 | (version "3.4.2") | |
3557 | (source | |
3558 | (origin | |
3559 | (method url-fetch) | |
3560 | (uri (string-append | |
3561 | "https://pypi.python.org/packages/source/d/decorator/decorator-" | |
3562 | version ".tar.gz")) | |
3563 | (sha256 | |
3564 | (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k")))) | |
3565 | (build-system python-build-system) | |
3566 | (arguments '(#:tests? #f)) ; no test target | |
3567 | (native-inputs | |
3568 | `(("python-setuptools" ,python-setuptools))) | |
3569 | (home-page "http://pypi.python.org/pypi/decorator/") | |
3570 | (synopsis "Python module to simplify usage of decorators") | |
3571 | (description | |
3572 | "The aim of the decorator module is to simplify the usage of decorators | |
3573 | for the average programmer, and to popularize decorators usage giving examples | |
3574 | of useful decorators, such as memoize, tracing, redirecting_stdout, locked, | |
3575 | etc. The core of this module is a decorator factory.") | |
3576 | (license license:expat))) | |
3577 | ||
3578 | (define-public python2-decorator | |
3579 | (package-with-python2 python-decorator)) | |
3580 | ||
2c0499ad RW |
3581 | (define-public python-drmaa |
3582 | (package | |
3583 | (name "python-drmaa") | |
3584 | (version "0.7.6") | |
3585 | (source | |
3586 | (origin | |
3587 | (method url-fetch) | |
3588 | (uri (string-append | |
3589 | "https://pypi.python.org/packages/source/d/drmaa/drmaa-" | |
3590 | version ".tar.gz")) | |
3591 | (sha256 | |
3592 | (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh")))) | |
3593 | (build-system python-build-system) | |
3594 | ;; The test suite requires libdrmaa which is provided by the cluster | |
3595 | ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH | |
3596 | ;; should be set to the path of the libdrmaa library. | |
3597 | (arguments '(#:tests? #f)) | |
3598 | (native-inputs | |
3599 | `(("python-nose" ,python-nose) | |
3600 | ("python-setuptools" ,python-setuptools))) | |
3601 | (home-page "https://pypi.python.org/pypi/drmaa") | |
3602 | (synopsis "Python bindings for the DRMAA library") | |
3603 | (description | |
3604 | "A Python package for Distributed Resource Management (DRM) job | |
3605 | submission and control. This package is an implementation of the DRMAA 1.0 | |
3606 | Python language binding specification.") | |
3607 | (license bsd-3))) | |
3608 | ||
3609 | (define-public python2-drmaa | |
3610 | (package-with-python2 python-drmaa)) | |
3611 | ||
d05c6da0 RW |
3612 | (define-public python-gridmap |
3613 | (package | |
3614 | (name "python-gridmap") | |
3615 | (version "0.13.0") | |
3616 | (source | |
3617 | (origin | |
3618 | (method url-fetch) | |
3619 | (uri (string-append | |
3620 | "https://github.com/pygridtools/gridmap/archive/v" | |
3621 | version ".tar.gz")) | |
3622 | (file-name (string-append name "-" version ".tar.gz")) | |
3623 | (sha256 | |
3624 | (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x")))) | |
3625 | (build-system python-build-system) | |
3626 | (inputs | |
3627 | `(("python-psutil" ,python-psutil) | |
3628 | ("python-drmaa" ,python-drmaa) | |
3629 | ("python-pyzmq" ,python-pyzmq))) | |
3630 | (native-inputs | |
3631 | `(("python-setuptools" ,python-setuptools))) | |
3632 | (home-page "https://github.com/pygridtools/gridmap") | |
3633 | (synopsis "Create jobs on a cluster directly from Python") | |
3634 | (description | |
3635 | "Gridmap is a Python package to allow you to easily create jobs on the | |
3636 | cluster directly from Python. You can directly map Python functions onto the | |
3637 | cluster without needing to write any wrapper code yourself.") | |
3638 | (license gpl3+))) | |
3639 | ||
3640 | (define-public python2-gridmap | |
3641 | (package-with-python2 python-gridmap)) | |
3642 | ||
ae1ab9fe FB |
3643 | (define-public python-ipython |
3644 | (package | |
3645 | (name "python-ipython") | |
3a0b1b9a | 3646 | (version "3.2.1") |
ae1ab9fe FB |
3647 | (source |
3648 | (origin | |
3649 | (method url-fetch) | |
3650 | (uri (string-append "https://pypi.python.org/packages/source/i/" | |
3651 | "ipython/ipython-" version ".tar.gz")) | |
3652 | (sha256 | |
3a0b1b9a | 3653 | (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9")))) |
ae1ab9fe FB |
3654 | (build-system python-build-system) |
3655 | (outputs '("out" "doc")) | |
3a0b1b9a FB |
3656 | (propagated-inputs |
3657 | `(("python-pyzmq" ,python-pyzmq) | |
3658 | ("python-terminado" ,python-terminado))) | |
ae1ab9fe FB |
3659 | (inputs |
3660 | `(("readline" ,readline) | |
3a0b1b9a | 3661 | ("which" ,which) |
ae1ab9fe FB |
3662 | ("python-matplotlib" ,python-matplotlib) |
3663 | ("python-numpy" ,python-numpy-bootstrap) | |
3664 | ("python-numpydoc" ,python-numpydoc) | |
3a0b1b9a FB |
3665 | ("python-jinja2" ,python-jinja2) |
3666 | ("python-mistune" ,python-mistune) | |
3667 | ("python-jsonschema" ,python-jsonschema) | |
3668 | ("python-pygments" ,python-pygments) | |
3669 | ("python-requests" ,python-requests) ;; for tests | |
ae1ab9fe FB |
3670 | ("python-nose" ,python-nose))) |
3671 | (native-inputs | |
3672 | `(("pkg-config" ,pkg-config) | |
3673 | ("python-sphinx" ,python-sphinx) | |
3674 | ("texlive" ,texlive) | |
3675 | ("texinfo" ,texinfo) | |
3676 | ("python-setuptools" ,python-setuptools))) | |
3677 | (arguments | |
89b5c60e | 3678 | `(#:phases |
3a0b1b9a FB |
3679 | (modify-phases %standard-phases |
3680 | (add-after | |
3681 | 'install 'install-doc | |
3682 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3683 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | |
3684 | (doc (string-append data "/doc/" ,name "-" ,version)) | |
3685 | (html (string-append doc "/html")) | |
3686 | (man1 (string-append data "/man/man1")) | |
3687 | (info (string-append data "/info")) | |
3688 | (examples (string-append doc "/examples"))) | |
afd3d931 | 3689 | (setenv "LANG" "en_US.utf8") |
3a0b1b9a FB |
3690 | (with-directory-excursion "docs" |
3691 | ;; FIXME: html and pdf fail to build | |
3692 | ;; (system* "make" "html") | |
3693 | ;; (system* "make" "pdf" "PAPER=a4") | |
3694 | (system* "make" "info")) | |
3695 | (copy-recursively "docs/man" man1) | |
3696 | (copy-recursively "examples" examples) | |
3697 | ;; (copy-recursively "docs/build/html" html) | |
3698 | ;; (copy-file "docs/build/latex/ipython.pdf" | |
3699 | ;; (string-append doc "/ipython.pdf")) | |
3700 | (mkdir-p info) | |
3701 | (copy-file "docs/build/texinfo/ipython.info" | |
3702 | (string-append info "/ipython.info")) | |
3703 | (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))))) | |
3704 | ;; Tests can only be run after the library has been installed and not | |
3705 | ;; within the source directory. | |
3706 | (delete 'check) | |
3707 | (add-after | |
3708 | 'install 'check | |
3709 | (lambda* (#:key outputs tests? #:allow-other-keys) | |
3710 | (if tests? | |
3711 | (with-directory-excursion "/tmp" | |
3712 | (setenv "HOME" "/tmp/") ;; required by a test | |
3713 | (zero? (system* (string-append (assoc-ref outputs "out") | |
3714 | "/bin/iptest")))) | |
3715 | #t))) | |
3716 | (add-before | |
3717 | 'install 'fix-tests | |
3718 | (lambda* (#:key inputs #:allow-other-keys) | |
3719 | (substitute* "./IPython/utils/_process_posix.py" | |
3720 | (("/usr/bin/env', 'which") (which "which"))) | |
3721 | (substitute* "./IPython/core/tests/test_inputtransformer.py" | |
3722 | (("#!/usr/bin/env python") | |
3723 | (string-append "#!" (which "python")))) | |
3724 | ;; Disable 1 failing test | |
3725 | (substitute* "./IPython/core/tests/test_magic.py" | |
3726 | (("def test_dirops\\(\\):" all) | |
3727 | (string-append "@dec.skipif(True)\n" all)))))))) | |
ae1ab9fe FB |
3728 | (home-page "http://ipython.org") |
3729 | (synopsis "IPython is a tool for interactive computing in Python") | |
3730 | (description | |
3731 | "IPython provides a rich architecture for interactive computing with: | |
3732 | Powerful interactive shells, a browser-based notebook, support for interactive | |
3733 | data visualization, embeddable interpreters and tools for parallel | |
3734 | computing.") | |
3735 | (license bsd-3))) | |
3736 | ||
3737 | (define-public python2-ipython | |
3738 | (let ((ipython (package-with-python2 python-ipython))) | |
3a0b1b9a FB |
3739 | (package |
3740 | (inherit ipython) | |
3741 | ;; FIXME: some tests are failing | |
3742 | (arguments | |
3743 | `(#:tests? #f ,@(package-arguments ipython))) | |
ae1ab9fe | 3744 | ;; Make sure we use custom python2-NAME packages. |
3a0b1b9a | 3745 | ;; FIXME: add pyreadline once available. |
667d90df RW |
3746 | (propagated-inputs |
3747 | `(("python2-terminado" ,python2-terminado) | |
3748 | ,@(alist-delete "python-terminado" | |
3749 | (package-propagated-inputs ipython)))) | |
89b5c60e | 3750 | (inputs |
3a0b1b9a FB |
3751 | `(("python2-mock" ,python2-mock) |
3752 | ("python2-matplotlib" ,python2-matplotlib) | |
667d90df RW |
3753 | ,@(alist-delete "python-matplotlib" |
3754 | (package-inputs ipython))))))) | |
03411993 AE |
3755 | |
3756 | (define-public python-isodate | |
3757 | (package | |
3758 | (name "python-isodate") | |
3759 | (version "0.5.1") | |
3760 | (source | |
3761 | (origin | |
3762 | (method url-fetch) | |
3763 | (uri (string-append | |
3764 | "https://pypi.python.org/packages/source/i/isodate/isodate-" | |
3765 | version | |
3766 | ".tar.gz")) | |
3767 | (sha256 | |
3768 | (base32 | |
3769 | "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami")))) | |
3770 | (build-system python-build-system) | |
3771 | (inputs | |
3772 | `(("python-setuptools" ,python-setuptools))) | |
3773 | (home-page | |
3774 | "http://cheeseshop.python.org/pypi/isodate") | |
3775 | (synopsis | |
3776 | "Python date parser and formatter") | |
3777 | (description | |
3778 | "Python-isodate is a python module for parsing and formatting | |
3779 | ISO 8601 dates, time and duration.") | |
3780 | (license bsd-3))) | |
3781 | ||
3782 | (define-public python2-isodate | |
3783 | (package-with-python2 python-isodate)) | |
673ab897 AE |
3784 | |
3785 | (define-public python-html5lib | |
3786 | (package | |
3787 | (name "python-html5lib") | |
3788 | (version "1.0b3") | |
3789 | (source | |
3790 | (origin | |
3791 | (method url-fetch) | |
3792 | (uri (string-append | |
3793 | "https://pypi.python.org/packages/source/h/html5lib/html5lib-" | |
3794 | version | |
3795 | ".tar.gz")) | |
3796 | (sha256 | |
3797 | (base32 | |
3798 | "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln")))) | |
3799 | (build-system python-build-system) | |
3dd75476 AE |
3800 | (propagated-inputs |
3801 | `(("python-six" ,python-six))) ; required to "import html5lib" | |
673ab897 AE |
3802 | (inputs |
3803 | `(("python-setuptools" ,python-setuptools))) | |
3804 | (arguments | |
3805 | `(#:test-target "check")) | |
3806 | (home-page | |
3807 | "https://github.com/html5lib/html5lib-python") | |
3808 | (synopsis | |
3809 | "Python HTML parser based on the WHATWG HTML specifcation") | |
3810 | (description | |
3811 | "Html5lib is an HTML parser based on the WHATWG HTML specifcation | |
3812 | and written in Python.") | |
bd3fa666 | 3813 | (license license:expat))) |
673ab897 AE |
3814 | |
3815 | (define-public python2-html5lib | |
3816 | (package-with-python2 python-html5lib)) | |
e99f4211 MW |
3817 | |
3818 | (define-public python-urwid | |
3819 | (package | |
3820 | (name "python-urwid") | |
3821 | (version "1.3.0") | |
3822 | (source | |
3823 | (origin | |
3824 | (method url-fetch) | |
be1f44bb MW |
3825 | (uri (string-append |
3826 | "https://pypi.python.org/packages/source/u/urwid/urwid-" | |
3827 | version ".tar.gz")) | |
e99f4211 MW |
3828 | (sha256 |
3829 | (base32 | |
3830 | "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19")))) | |
3831 | (build-system python-build-system) | |
3832 | (native-inputs `(("python-setuptools" ,python-setuptools))) | |
3833 | (home-page "http://urwid.org") | |
3834 | (synopsis "Console user interface library for Python") | |
3835 | (description | |
3836 | "Urwid is a curses-based UI/widget library for Python. It includes many | |
3837 | features useful for text console applications.") | |
3838 | (license lgpl2.1+))) | |
3839 | ||
3840 | (define-public python2-urwid | |
3841 | (package-with-python2 python-urwid)) | |
d95a56c6 PAR |
3842 | |
3843 | (define-public python-dbus | |
3844 | (package | |
3845 | (name "python-dbus") | |
3846 | (version "1.2.0") | |
3847 | (source | |
3848 | (origin | |
3849 | (method url-fetch) | |
3850 | (uri (string-append | |
3851 | "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-" | |
3852 | version ".tar.gz")) | |
3853 | (sha256 | |
3854 | (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71")))) | |
3855 | (build-system gnu-build-system) | |
3856 | (native-inputs | |
3857 | `(("pkg-config" ,pkg-config))) | |
3858 | (inputs | |
3859 | `(("python" ,python) | |
2e88d113 | 3860 | ("dbus-glib" ,dbus-glib))) |
d95a56c6 PAR |
3861 | (synopsis "Python bindings for D-bus") |
3862 | (description "python-dbus provides bindings for libdbus, the reference | |
3863 | implementation of D-Bus.") | |
3864 | (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/") | |
bd3fa666 | 3865 | (license license:expat))) |
b52af02b MW |
3866 | |
3867 | (define-public python2-dbus | |
3868 | (package (inherit python-dbus) | |
3869 | (name "python2-dbus") | |
3870 | (inputs `(("python" ,python-2) | |
3871 | ,@(alist-delete "python" | |
3872 | (package-inputs python-dbus) | |
3873 | equal?))) | |
3874 | ;; FIXME: on Python 2, the test_utf8 fails with: | |
3875 | ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)" | |
3876 | (arguments `(#:tests? #f)))) | |
a6ac8332 AE |
3877 | |
3878 | (define-public python-apsw | |
3879 | (package | |
3880 | (name "python-apsw") | |
3881 | (version "3.8.7.3-r1") | |
3882 | (source | |
3883 | (origin | |
3884 | (method url-fetch) | |
3885 | (uri (string-append | |
3886 | "https://pypi.python.org/packages/source/a/apsw/apsw-" | |
3887 | version | |
3888 | ".tar.gz")) | |
3889 | (sha256 | |
3890 | (base32 | |
3891 | "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l")))) | |
3892 | (build-system python-build-system) | |
3893 | (inputs | |
3894 | `(("python-setuptools" ,python-setuptools) | |
3895 | ("sqlite" ,sqlite))) | |
3896 | (arguments | |
3897 | `(#:phases | |
3898 | ;; swap check and install phases | |
3899 | (alist-cons-after | |
3900 | 'install 'check | |
3901 | (assoc-ref %standard-phases 'check) | |
3902 | (alist-delete | |
3903 | 'check | |
3904 | %standard-phases)))) | |
3905 | (home-page "https://github.com/rogerbinns/apsw/") | |
3906 | (synopsis "Another Python SQLite Wrapper") | |
3907 | (description "APSW is a Python wrapper for the SQLite | |
3908 | embedded relational database engine. In contrast to other wrappers such as | |
3909 | pysqlite it focuses on being a minimal layer over SQLite attempting just to | |
3910 | translate the complete SQLite API into Python.") | |
abde5f37 | 3911 | (license license:zlib))) |
a6ac8332 AE |
3912 | |
3913 | (define-public python2-apsw | |
3914 | (package-with-python2 python-apsw)) | |
26b307e2 AE |
3915 | |
3916 | (define-public python-lxml | |
3917 | (package | |
3918 | (name "python-lxml") | |
3919 | (version "3.4.2") | |
3920 | (source | |
3921 | (origin | |
3922 | (method url-fetch) | |
3923 | (uri (string-append | |
3924 | "https://pypi.python.org/packages/source/l/lxml/lxml-" | |
3925 | version | |
3926 | ".tar.gz")) | |
3927 | (sha256 | |
3928 | (base32 | |
3929 | "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7")))) | |
3930 | (build-system python-build-system) | |
3931 | (inputs | |
3932 | `(("libxml2" ,libxml2) | |
3933 | ("libxslt" ,libxslt) | |
3934 | ("python-setuptools" ,python-setuptools))) | |
3935 | (home-page "http://lxml.de/") | |
3936 | (synopsis | |
3937 | "Python XML processing library") | |
3938 | (description | |
3939 | "The lxml XML toolkit is a Pythonic binding for the C libraries | |
3940 | libxml2 and libxslt.") | |
3941 | (license bsd-3))) ; and a few more, see LICENSES.txt | |
3942 | ||
3943 | (define-public python2-lxml | |
3944 | (package-with-python2 python-lxml)) | |
4ed20663 | 3945 | |
bec07a7c AE |
3946 | (define-public python2-pil |
3947 | (package | |
3948 | (name "python2-pil") | |
3949 | (version "1.1.7") | |
3950 | (source | |
3951 | (origin | |
3952 | (method url-fetch) | |
3953 | (uri (string-append | |
3954 | "http://effbot.org/downloads/Imaging-" | |
3955 | version ".tar.gz")) | |
3956 | (sha256 | |
3957 | (base32 | |
516277cb AE |
3958 | "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9")) |
3959 | (modules '((guix build utils))) | |
3960 | (snippet | |
3961 | ;; Adapt to newer freetype. As the package is unmaintained upstream, | |
3962 | ;; there is no use in creating a patch and reporting it. | |
3963 | '(substitute* "_imagingft.c" | |
3964 | (("freetype/") | |
3965 | "freetype2/"))))) | |
bec07a7c AE |
3966 | (build-system python-build-system) |
3967 | (inputs | |
3968 | `(("freetype" ,freetype) | |
3969 | ("libjpeg" ,libjpeg) | |
3970 | ("libtiff" ,libtiff) | |
3971 | ("python-setuptools" ,python-setuptools) | |
3972 | ("zlib" ,zlib))) | |
3973 | (arguments | |
3974 | ;; Only the fork python-pillow works with Python 3. | |
3975 | `(#:python ,python-2 | |
3976 | #:tests? #f ; no check target | |
3977 | #:phases | |
3978 | (alist-cons-before | |
3979 | 'build 'configure | |
3980 | ;; According to README and setup.py, manual configuration is | |
3981 | ;; the preferred way of "searching" for inputs. | |
3982 | ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter. | |
3983 | (lambda* (#:key inputs #:allow-other-keys) | |
3984 | (let ((jpeg (assoc-ref inputs "libjpeg")) | |
3985 | (zlib (assoc-ref inputs "zlib")) | |
3986 | (tiff (assoc-ref inputs "libtiff")) | |
3987 | (freetype (assoc-ref inputs "freetype"))) | |
3988 | (substitute* "setup.py" | |
3989 | (("JPEG_ROOT = None") | |
3990 | (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")")) | |
3991 | (("ZLIB_ROOT = None") | |
3992 | (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")")) | |
3993 | (("TIFF_ROOT = None") | |
3994 | (string-append "TIFF_ROOT = libinclude(\"" tiff "\")")) | |
3995 | (("FREETYPE_ROOT = None") | |
3996 | (string-append "FREETYPE_ROOT = libinclude(\"" | |
3997 | freetype "\")"))))) | |
3998 | %standard-phases))) | |
3999 | (home-page "http://www.pythonware.com/products/pil/") | |
4000 | (synopsis "Python Imaging Library") | |
4001 | (description "The Python Imaging Library (PIL) adds image processing | |
4002 | capabilities to the Python interpreter.") | |
4003 | (license (x11-style | |
4004 | "file://README" | |
4005 | "See 'README' in the distribution.")))) | |
092e86f5 AE |
4006 | |
4007 | (define-public python2-cssutils | |
4008 | (package | |
4009 | (name "python2-cssutils") | |
4010 | (version "1.0") | |
4011 | (source | |
4012 | (origin | |
4013 | (method url-fetch) | |
4014 | (uri (string-append | |
4015 | "https://pypi.python.org/packages/source/c/cssutils/cssutils-" | |
4016 | version | |
4017 | ".zip")) | |
4018 | (sha256 | |
4019 | (base32 | |
4020 | "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125")))) | |
4021 | (build-system python-build-system) | |
4022 | (native-inputs | |
4023 | `(("python2-mock" ,python2-mock) ; for the tests | |
4024 | ("unzip" ,unzip))) ; for unpacking the source | |
4025 | (inputs | |
4026 | `(("python2-setuptools" ,python2-setuptools))) | |
4027 | (arguments | |
4028 | `(#:python ,python-2 ; Otherwise tests fail with a syntax error. | |
4029 | #:tests? #f ; The tests apparently download an external URL. | |
da6dd842 | 4030 | )) |
092e86f5 AE |
4031 | (home-page "http://cthedot.de/cssutils/") |
4032 | (synopsis | |
4033 | "CSS Cascading Style Sheets library for Python") | |
4034 | (description | |
4035 | "Cssutils is a Python package for parsing and building CSS | |
4036 | Cascading Style Sheets. Currently it provides a DOM only and no rendering | |
4037 | options.") | |
4038 | (license lgpl3+))) | |
880ff77c AE |
4039 | |
4040 | (define-public python-cssselect | |
4041 | (package | |
4042 | (name "python-cssselect") | |
4043 | (version "0.9.1") | |
4044 | (source | |
4045 | (origin | |
4046 | (method url-fetch) | |
4047 | (uri (string-append | |
4048 | "https://pypi.python.org/packages/source/c/cssselect/cssselect-" | |
4049 | version | |
4050 | ".tar.gz")) | |
4051 | (sha256 | |
4052 | (base32 | |
4053 | "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85")))) | |
4054 | (build-system python-build-system) | |
4055 | (inputs | |
4056 | `(("python-setuptools" ,python-setuptools))) | |
4057 | (arguments | |
4058 | ;; tests fail with message | |
4059 | ;; AttributeError: 'module' object has no attribute 'tests' | |
4060 | `(#:tests? #f)) | |
4061 | (home-page | |
4062 | "https://pythonhosted.org/cssselect/") | |
4063 | (synopsis | |
4064 | "CSS3 selector parser and translator to XPath 1.0") | |
4065 | (description | |
4066 | "Cssselect ia a Python module that parses CSS3 Selectors and translates | |
4067 | them to XPath 1.0 expressions. Such expressions can be used in lxml or | |
4068 | another XPath engine to find the matching elements in an XML or HTML document.") | |
4069 | (license bsd-3))) | |
4070 | ||
4071 | (define-public python2-cssselect | |
4072 | (package-with-python2 python-cssselect)) | |
60357f99 AE |
4073 | |
4074 | (define-public python-netifaces | |
4075 | (package | |
4076 | (name "python-netifaces") | |
4077 | (version "0.10.4") | |
4078 | (source | |
4079 | (origin | |
4080 | (method url-fetch) | |
4081 | (uri (string-append | |
4082 | "https://pypi.python.org/packages/source/n/netifaces/netifaces-" | |
4083 | version | |
4084 | ".tar.gz")) | |
4085 | (sha256 | |
4086 | (base32 | |
4087 | "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln")))) | |
4088 | (build-system python-build-system) | |
4089 | (inputs | |
4090 | `(("python-setuptools" ,python-setuptools))) | |
4091 | (home-page | |
4092 | "https://bitbucket.org/al45tair/netifaces") | |
4093 | (synopsis | |
4094 | "Python module for portable network interface information") | |
4095 | (description | |
4096 | "Netifaces is a Python module providing information on network | |
4097 | interfaces in an easy and portable manner.") | |
4098 | (license license:expat))) | |
4099 | ||
4100 | (define-public python2-netifaces | |
4101 | (package-with-python2 python-netifaces)) | |
92cb152b | 4102 | |
32f77c04 RW |
4103 | (define-public python-networkx |
4104 | (package | |
4105 | (name "python-networkx") | |
4106 | (version "1.9.1") | |
4107 | (source | |
4108 | (origin | |
4109 | (method url-fetch) | |
4110 | (uri (string-append | |
4111 | "https://pypi.python.org/packages/source/n/networkx/networkx-" | |
4112 | version ".tar.gz")) | |
4113 | (sha256 | |
4114 | (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033")))) | |
4115 | (build-system python-build-system) | |
4116 | ;; python-decorator is needed at runtime | |
4117 | (propagated-inputs | |
4118 | `(("python-decorator" ,python-decorator))) | |
4119 | (native-inputs | |
4120 | `(("python-setuptools" ,python-setuptools) | |
4121 | ("python-nose" ,python-nose))) | |
4122 | (home-page "http://networkx.github.io/") | |
4123 | (synopsis "Python module for creating and manipulating graphs and networks") | |
4124 | (description | |
4125 | "NetworkX is a Python package for the creation, manipulation, and study | |
4126 | of the structure, dynamics, and functions of complex networks.") | |
4127 | (license bsd-3))) | |
4128 | ||
4129 | (define-public python2-networkx | |
4130 | (package-with-python2 python-networkx)) | |
4131 | ||
92cb152b RW |
4132 | (define-public snakemake |
4133 | (package | |
4134 | (name "snakemake") | |
4135 | (version "3.2.1") | |
4136 | (source | |
4137 | (origin | |
4138 | (method url-fetch) | |
4139 | (uri (string-append | |
4140 | "https://pypi.python.org/packages/source/s/snakemake/snakemake-" | |
4141 | version ".tar.gz")) | |
4142 | (sha256 | |
4143 | (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91")))) | |
4144 | (build-system python-build-system) | |
4145 | (inputs `(("python-setuptools" ,python-setuptools))) | |
4146 | (home-page "https://bitbucket.org/johanneskoester/snakemake") | |
4147 | (synopsis "Python-based execution environment for make-like workflows") | |
4148 | (description | |
4149 | "Snakemake aims to reduce the complexity of creating workflows by | |
4150 | providing a clean and modern domain specific specification language (DSL) in | |
4151 | Python style, together with a fast and comfortable execution environment.") | |
4152 | (license license:expat))) | |
a1920bc9 | 4153 | |
35de1fbd RW |
4154 | (define-public python-seaborn |
4155 | (package | |
4156 | (name "python-seaborn") | |
4157 | (version "0.5.1") | |
4158 | (source | |
4159 | (origin | |
4160 | (method url-fetch) | |
4161 | (uri (string-append | |
4162 | "https://pypi.python.org/packages/source/s/seaborn/seaborn-" | |
4163 | version ".tar.gz")) | |
4164 | (sha256 | |
4165 | (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc")))) | |
4166 | (build-system python-build-system) | |
4167 | (propagated-inputs | |
4168 | `(("python-pandas" ,python-pandas) | |
4169 | ("python-matplotlib" ,python-matplotlib) | |
4170 | ("python-scipy" ,python-scipy))) | |
4171 | (native-inputs | |
4172 | `(("python-setuptools" ,python-setuptools))) | |
4173 | (home-page "http://stanford.edu/~mwaskom/software/seaborn/") | |
4174 | (synopsis "Statistical data visualization") | |
4175 | (description | |
4176 | "Seaborn is a library for making attractive and informative statistical | |
4177 | graphics in Python. It is built on top of matplotlib and tightly integrated | |
4178 | with the PyData stack, including support for numpy and pandas data structures | |
4179 | and statistical routines from scipy and statsmodels.") | |
4180 | (license bsd-3))) | |
4181 | ||
4182 | (define-public python2-seaborn | |
4183 | (let ((seaborn (package-with-python2 python-seaborn))) | |
4184 | (package (inherit seaborn) | |
4185 | (propagated-inputs | |
4186 | `(("python2-pytz" ,python2-pytz) | |
4187 | ,@(package-propagated-inputs seaborn)))))) | |
4188 | ||
90fc547f RW |
4189 | (define-public python-sympy |
4190 | (package | |
4191 | (name "python-sympy") | |
4192 | (version "0.7.6") | |
4193 | (source | |
4194 | (origin | |
4195 | (method url-fetch) | |
4196 | (uri (string-append | |
4197 | "https://github.com/sympy/sympy/releases/download/sympy-" | |
4198 | version "/sympy-" version ".tar.gz")) | |
4199 | (sha256 | |
4200 | (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz")))) | |
4201 | (build-system python-build-system) | |
4202 | (native-inputs | |
4203 | `(("python-setuptools" ,python-setuptools))) | |
4204 | (home-page "http://www.sympy.org/") | |
4205 | (synopsis "Python library for symbolic mathematics") | |
4206 | (description | |
4207 | "SymPy is a Python library for symbolic mathematics. It aims to become a | |
4208 | full-featured computer algebra system (CAS) while keeping the code as simple | |
4209 | as possible in order to be comprehensible and easily extensible.") | |
4210 | (license bsd-3))) | |
4211 | ||
4212 | (define-public python2-sympy | |
4213 | (package-with-python2 python-sympy)) | |
4214 | ||
a1920bc9 FB |
4215 | (define-public python-testlib |
4216 | (package | |
4217 | (name "python-testlib") | |
4218 | (version "0.6.5") | |
4219 | (source | |
4220 | (origin | |
4221 | (method url-fetch) | |
4222 | (uri (string-append | |
4223 | "https://pypi.python.org/packages/source/t/testlib/testlib-" | |
4224 | version ".zip")) | |
4225 | (sha256 | |
4226 | (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y")))) | |
4227 | (build-system python-build-system) | |
4228 | (inputs | |
4229 | `(("python-setuptools" ,python-setuptools))) | |
4230 | (native-inputs | |
4231 | `(("unzip" ,unzip))) | |
4232 | (arguments | |
4233 | `(#:phases | |
4234 | (alist-replace | |
4235 | 'unpack | |
4236 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4237 | (let ((unzip (string-append (assoc-ref inputs "unzip") | |
4238 | "/bin/unzip")) | |
4239 | (source (assoc-ref inputs "source"))) | |
4240 | (and (zero? (system* unzip source)) | |
4241 | (chdir (string-append "testlib-" ,version))))) | |
4242 | %standard-phases))) | |
4243 | (synopsis "Python micro test suite harness") | |
4244 | (description "A micro unittest suite harness for Python.") | |
4245 | (home-page "https://github.com/trentm/testlib") | |
1cb9c006 | 4246 | (license license:expat))) |
a1920bc9 FB |
4247 | |
4248 | (define-public python2-testlib | |
4249 | (package-with-python2 python-testlib)) | |
db62afa5 LC |
4250 | |
4251 | (define-public python2-xlib | |
4252 | (package | |
4253 | (name "python2-xlib") | |
4254 | (version "0.14") | |
4255 | (source (origin | |
4256 | (method url-fetch) | |
4257 | (uri (string-append "mirror://sourceforge/python-xlib/" | |
4258 | "python-xlib-" version ".tar.gz")) | |
4259 | (sha256 | |
4260 | (base32 | |
4261 | "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7")))) | |
4262 | (build-system python-build-system) | |
4263 | (arguments | |
4264 | `(#:python ,python-2 ;Python 2 only | |
4265 | #:tests? #f)) ;no tests | |
4266 | (inputs | |
4267 | `(("python-setuptools" ,python-setuptools))) | |
4268 | (home-page "http://python-xlib.sourceforge.net/") | |
4269 | (synopsis "Python X11 client library") | |
4270 | (description | |
4271 | "The Python X Library is intended to be a fully functional X client | |
4272 | library for Python programs. It is useful to implement low-level X clients. | |
4273 | It is written entirely in Python.") | |
4274 | (license gpl2+))) | |
0234ca06 DT |
4275 | |
4276 | (define-public python-singledispatch | |
4277 | (package | |
4278 | (name "python-singledispatch") | |
4279 | (version "3.4.0.3") | |
4280 | (source | |
4281 | (origin | |
4282 | (method url-fetch) | |
4283 | (uri (string-append | |
4284 | "https://pypi.python.org/packages/source/s/singledispatch/" | |
4285 | "singledispatch-" version ".tar.gz")) | |
4286 | (sha256 | |
4287 | (base32 | |
4288 | "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv")))) | |
4289 | (build-system python-build-system) | |
4290 | (native-inputs | |
4291 | `(("python-setuptools" ,python-setuptools))) | |
4292 | (propagated-inputs | |
4293 | `(("python-six" ,python-six))) | |
4294 | (home-page | |
4295 | "http://docs.python.org/3/library/functools.html#functools.singledispatch") | |
4296 | (synopsis "Backport of singledispatch feature from Python 3.4") | |
4297 | (description | |
4298 | "This library brings functools.singledispatch from Python 3.4 to Python | |
4299 | 2.6-3.3.") | |
4300 | (license license:expat))) | |
4301 | ||
4302 | (define-public python2-singledispatch | |
4303 | (package-with-python2 python-singledispatch)) | |
feaae484 | 4304 | |
310d218f RW |
4305 | (define-public python-tornado |
4306 | (package | |
4307 | (name "python-tornado") | |
4308 | (version "4.1") | |
4309 | (source | |
4310 | (origin | |
4311 | (method url-fetch) | |
4312 | (uri (string-append | |
4313 | "https://pypi.python.org/packages/source/t/tornado/" | |
4314 | "tornado-" version ".tar.gz")) | |
4315 | (sha256 | |
4316 | (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr")))) | |
4317 | (build-system python-build-system) | |
4318 | (inputs | |
4319 | `(("python-certifi" ,python-certifi))) | |
4320 | (native-inputs | |
4321 | `(("python-setuptools" ,python-setuptools))) | |
4322 | (home-page "https://pypi.python.org/pypi/tornado/4.1") | |
4323 | (synopsis "Python web framework and asynchronous networking library") | |
4324 | (description | |
4325 | "Tornado is a Python web framework and asynchronous networking library, | |
4326 | originally developed at FriendFeed. By using non-blocking network I/O, | |
4327 | Tornado can scale to tens of thousands of open connections, making it ideal | |
4328 | for long polling, WebSockets, and other applications that require a long-lived | |
4329 | connection to each user.") | |
4330 | (license asl2.0))) | |
4331 | ||
4332 | (define-public python2-tornado | |
4333 | (let ((tornado (package-with-python2 python-tornado))) | |
4334 | (package (inherit tornado) | |
4335 | (inputs | |
4336 | `(("python2-backport-ssl-match-hostname" | |
4337 | ,python2-backport-ssl-match-hostname) | |
4338 | ,@(package-inputs tornado)))))) | |
4339 | ||
feaae484 SB |
4340 | (define-public python-waf |
4341 | (package | |
4342 | (name "python-waf") | |
4343 | (version "1.8.8") | |
4344 | (source (origin | |
4345 | (method url-fetch) | |
4346 | (uri (string-append "https://waf.io/" | |
4347 | "waf-" version ".tar.bz2")) | |
4348 | (sha256 | |
4349 | (base32 | |
4350 | "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn")))) | |
4351 | (build-system python-build-system) | |
4352 | (arguments | |
4353 | '(#:phases | |
4354 | (modify-phases %standard-phases | |
4355 | (replace 'build | |
4356 | (lambda _ | |
4357 | (zero? (begin | |
4358 | (system* "python" "waf-light" "configure") | |
4359 | (system* "python" "waf-light" "build"))))) | |
4360 | (replace 'check | |
4361 | (lambda _ | |
4362 | (zero? (system* "python" "waf" "--version")))) | |
4363 | (replace 'install | |
4364 | (lambda _ | |
4365 | (copy-file "waf" %output)))))) | |
4366 | (home-page "https://waf.io/") | |
4367 | (synopsis "Python-based build system") | |
4368 | (description | |
4369 | "Waf is a Python-based framework for configuring, compiling and installing | |
4370 | applications.") | |
4371 | (license bsd-3))) | |
4372 | ||
4373 | (define-public python2-waf | |
4374 | (package-with-python2 python-waf)) | |
45203542 RW |
4375 | |
4376 | (define-public python-pyzmq | |
4377 | (package | |
4378 | (name "python-pyzmq") | |
4379 | (version "14.6.0") | |
4380 | (source | |
4381 | (origin | |
4382 | (method url-fetch) | |
4383 | (uri (string-append | |
4384 | "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-" | |
4385 | version ".tar.gz")) | |
4386 | (sha256 | |
4387 | (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp")))) | |
4388 | (build-system python-build-system) | |
4389 | (arguments | |
4390 | `(#:configure-flags | |
4391 | (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq"))) | |
4392 | ;; FIXME: You must build pyzmq with 'python setup.py build_ext | |
4393 | ;; --inplace' for 'python setup.py test' to work. | |
4394 | #:tests? #f)) | |
4395 | (inputs | |
4396 | `(("zeromq" ,zeromq))) | |
4397 | (native-inputs | |
4398 | `(("pkg-config" ,pkg-config) | |
4399 | ("python-nose" ,python-nose) | |
4400 | ("python-setuptools" ,python-setuptools))) | |
4401 | (home-page "http://github.com/zeromq/pyzmq") | |
4402 | (synopsis "Python bindings for 0MQ") | |
4403 | (description | |
4404 | "PyZMQ is the official Python binding for the ZeroMQ messaging library.") | |
4405 | (license bsd-4))) | |
4406 | ||
4407 | (define-public python2-pyzmq | |
4408 | (package-with-python2 python-pyzmq)) | |
d889e6c4 CR |
4409 | |
4410 | (define-public python-pep8 | |
4411 | (package | |
4412 | (name "python-pep8") | |
4413 | (version "1.6.2") | |
4414 | (source | |
4415 | (origin | |
4416 | (method url-fetch) | |
4417 | (uri (string-append | |
4418 | "https://pypi.python.org/packages/source/p/pep8/pep8-" | |
4419 | version | |
4420 | ".tar.gz")) | |
4421 | (sha256 | |
4422 | (base32 | |
4423 | "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq")))) | |
4424 | (build-system python-build-system) | |
4425 | (inputs | |
4426 | `(("python-setuptools" ,python-setuptools))) | |
4427 | (home-page "http://pep8.readthedocs.org/") | |
4428 | (synopsis "Python style guide checker") | |
4429 | (description | |
4430 | "This tools checks Python code against some of the style conventions in | |
4431 | PEP 8.") | |
4432 | (license license:expat))) | |
4433 | ||
4434 | (define-public python2-pep8 | |
4435 | (package-with-python2 python-pep8)) | |
e31d7f44 CR |
4436 | |
4437 | (define-public python-pyflakes | |
4438 | (package | |
4439 | (name "python-pyflakes") | |
4440 | (version "0.9.2") | |
4441 | (source | |
4442 | (origin | |
4443 | (method url-fetch) | |
4444 | (uri (string-append | |
4445 | "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-" | |
4446 | version | |
4447 | ".tar.gz")) | |
4448 | (sha256 | |
4449 | (base32 | |
4450 | "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82")))) | |
4451 | (build-system python-build-system) | |
4452 | (inputs | |
4453 | `(("python-setuptools" ,python-setuptools))) | |
4454 | (home-page | |
4455 | "https://github.com/pyflakes/pyflakes") | |
4456 | (synopsis "Passive checker of Python programs") | |
4457 | (description | |
4458 | "Pyflakes statically checks Python source code for common errors.") | |
4459 | (license license:expat))) | |
a59e017c | 4460 | |
7261d9eb CR |
4461 | (define-public python2-pyflakes |
4462 | (package-with-python2 python-pyflakes)) | |
4463 | ||
a59e017c CR |
4464 | (define-public python-mccabe |
4465 | (package | |
4466 | (name "python-mccabe") | |
4467 | (version "0.3.1") | |
4468 | (source | |
4469 | (origin | |
4470 | (method url-fetch) | |
4471 | (uri (string-append | |
4472 | "https://pypi.python.org/packages/source/m/mccabe/mccabe-" | |
4473 | version | |
4474 | ".tar.gz")) | |
4475 | (sha256 | |
4476 | (base32 | |
4477 | "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz")))) | |
4478 | (build-system python-build-system) | |
4479 | (inputs | |
4480 | `(("python-setuptools" ,python-setuptools))) | |
4481 | (home-page "https://github.com/flintwork/mccabe") | |
4482 | (synopsis "McCabe checker, plugin for flake8") | |
4483 | (description | |
4484 | "This package provides a Flake8 plug-in to compute the McCabe cyclomatic | |
4485 | complexity of Python source code.") | |
7362371d | 4486 | (license license:expat))) |
a59e017c CR |
4487 | |
4488 | (define-public python2-mccabe | |
4489 | (package-with-python2 python-mccabe)) | |
e8df8f47 CR |
4490 | |
4491 | ;; Flake8 2.4.1 requires an older version of pep8. | |
4492 | ;; This should be removed ASAP. | |
4493 | (define-public python-pep8-1.5.7 | |
4494 | (package (inherit python-pep8) | |
4495 | (version "1.5.7") | |
4496 | (source | |
4497 | (origin | |
4498 | (method url-fetch) | |
4499 | (uri (string-append | |
4500 | "https://pypi.python.org/packages/source/p/pep8/pep8-" | |
4501 | version | |
4502 | ".tar.gz")) | |
4503 | (sha256 | |
4504 | (base32 | |
4505 | "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m")))))) | |
4506 | ||
4507 | (define-public python2-pep8-1.5.7 | |
4508 | (package-with-python2 python-pep8-1.5.7)) | |
4509 | ||
4510 | ;; Flake8 2.4.1 requires an older version of pyflakes. | |
4511 | ;; This should be removed ASAP. | |
4512 | (define-public python-pyflakes-0.8.1 | |
4513 | (package (inherit python-pyflakes) | |
4514 | (version "0.8.1") | |
4515 | (source | |
4516 | (origin | |
4517 | (method url-fetch) | |
4518 | (uri (string-append | |
4519 | "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-" | |
4520 | version | |
4521 | ".tar.gz")) | |
4522 | (sha256 | |
4523 | (base32 | |
4524 | "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z")))))) | |
4525 | ||
4526 | (define-public python2-pyflakes-0.8.1 | |
7261d9eb | 4527 | (package-with-python2 python-pyflakes-0.8.1)) |
e8df8f47 CR |
4528 | |
4529 | (define-public python-flake8 | |
4530 | (package | |
4531 | (name "python-flake8") | |
4532 | (version "2.4.1") | |
4533 | (source | |
4534 | (origin | |
4535 | (method url-fetch) | |
4536 | (uri (string-append | |
4537 | "https://pypi.python.org/packages/source/f/flake8/flake8-" | |
4538 | version | |
4539 | ".tar.gz")) | |
4540 | (sha256 | |
4541 | (base32 | |
4542 | "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif")))) | |
4543 | (build-system python-build-system) | |
4544 | (inputs | |
4545 | `(("python-setuptools" ,python-setuptools) | |
4546 | ("python-pep8" ,python-pep8-1.5.7) | |
4547 | ("python-pyflakes" ,python-pyflakes-0.8.1) | |
4548 | ("python-mccabe" ,python-mccabe) | |
4549 | ("python-mock" ,python-mock) | |
4550 | ("python-nose" ,python-nose))) | |
4551 | (home-page "https://gitlab.com/pycqa/flake8") | |
4552 | (synopsis | |
4553 | "The modular source code checker: pep8, pyflakes and co") | |
4554 | (description | |
4555 | "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") | |
4556 | (license license:expat))) | |
4557 | ||
4558 | (define-public python2-flake8 | |
4559 | (package-with-python2 python-flake8)) | |
61b9ac53 FB |
4560 | |
4561 | (define-public python-mistune | |
4562 | (package | |
4563 | (name "python-mistune") | |
4564 | (version "0.7") | |
4565 | (source | |
4566 | (origin | |
4567 | (method url-fetch) | |
4568 | (uri (string-append | |
4569 | "https://pypi.python.org/packages/source/m/mistune/mistune-" | |
4570 | version | |
4571 | ".tar.gz")) | |
4572 | (sha256 | |
4573 | (base32 | |
4574 | "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx")))) | |
4575 | (build-system python-build-system) | |
4576 | (inputs | |
4577 | `(("python-setuptools" ,python-setuptools) | |
4578 | ("python-nose" ,python-nose) | |
4579 | ("python-cython" ,python-cython))) | |
4580 | (home-page "https://github.com/lepture/mistune") | |
4581 | (synopsis "Markdown parser in pure Python") | |
4582 | (description "This package provides a fast markdown parser in pure | |
4583 | Python.") | |
4584 | (license bsd-3))) | |
4585 | ||
4586 | (define-public python2-mistune | |
4587 | (package-with-python2 python-mistune)) | |
6d992d07 FB |
4588 | |
4589 | (define-public python-ptyprocess | |
4590 | (package | |
4591 | (name "python-ptyprocess") | |
4592 | (version "0.5") | |
4593 | (source | |
4594 | (origin | |
4595 | (method url-fetch) | |
4596 | (uri (string-append | |
4597 | "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-" | |
4598 | version ".tar.gz")) | |
4599 | (sha256 | |
4600 | (base32 | |
4601 | "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw")))) | |
4602 | (build-system python-build-system) | |
4603 | (inputs | |
4604 | `(("python-setuptools" ,python-setuptools) | |
4605 | ("python-nose" ,python-nose))) | |
4606 | (arguments | |
4607 | `(#:phases | |
4608 | (modify-phases %standard-phases | |
4609 | (replace 'check | |
4610 | (lambda _ | |
4611 | (zero? (system* "nosetests"))))))) | |
4612 | (home-page "https://github.com/pexpect/ptyprocess") | |
4613 | (synopsis "Run a subprocess in a pseudo terminal") | |
4614 | (description | |
4615 | "This package provides a Python library used to launch a subprocess in a | |
4616 | pseudo terminal (pty), and interact with both the process and its pty.") | |
4617 | (license isc))) | |
4618 | ||
4619 | (define-public python2-ptyprocess | |
4620 | (package-with-python2 python-ptyprocess)) | |
4aadb1df FB |
4621 | |
4622 | (define-public python-terminado | |
4623 | (package | |
4624 | (name "python-terminado") | |
4625 | (version "0.5") | |
4626 | (source | |
4627 | (origin | |
4628 | (method url-fetch) | |
4629 | (uri (string-append | |
4630 | "https://pypi.python.org/packages/source/t/terminado/terminado-" | |
4631 | version ".tar.gz")) | |
4632 | (sha256 | |
4633 | (base32 | |
4634 | "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33")))) | |
4635 | (build-system python-build-system) | |
4636 | (propagated-inputs | |
4637 | `(("python-tornado" ,python-tornado) | |
4638 | ("python-ptyprocess" ,python-ptyprocess))) | |
4639 | (inputs | |
4640 | `(("python-setuptools" ,python-setuptools) | |
4641 | ("python-nose" ,python-nose))) | |
4642 | (arguments | |
4643 | `(#:phases | |
4644 | (modify-phases %standard-phases | |
4645 | (replace 'check | |
4646 | (lambda _ | |
4647 | (zero? (system* "nosetests"))))))) | |
4648 | (home-page "https://github.com/takluyver/terminado") | |
4649 | (synopsis "Terminals served to term.js using Tornado websockets") | |
4650 | (description "This package provides a Tornado websocket backend for the | |
4651 | term.js Javascript terminal emulator library.") | |
4652 | (license bsd-2))) | |
4653 | ||
4654 | (define-public python2-terminado | |
4655 | (let ((terminado (package-with-python2 python-terminado))) | |
4656 | (package (inherit terminado) | |
4657 | (propagated-inputs | |
4658 | `(("python2-tornado" ,python2-tornado) | |
4659 | ("python2-backport-ssl-match-hostname" | |
4660 | ,python2-backport-ssl-match-hostname) | |
4661 | ,@(alist-delete "python-tornado" | |
4662 | (package-propagated-inputs terminado))))))) | |
5faa5ce4 | 4663 | |
d582eaac SB |
4664 | (define-public python-fonttools |
4665 | (package | |
4666 | (name "python-fonttools") | |
4667 | (version "2.5") | |
4668 | (source (origin | |
4669 | (method url-fetch) | |
4670 | (uri (string-append | |
4671 | "https://pypi.python.org/packages/source/F/FontTools/" | |
4672 | "fonttools-" version ".tar.gz")) | |
4673 | (sha256 | |
4674 | (base32 | |
4675 | "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb")))) | |
4676 | (build-system python-build-system) | |
4677 | (arguments '(#:test-target "check")) | |
4678 | (propagated-inputs | |
4679 | ;; XXX: module not found if setuptools is not available. | |
4680 | `(("python-setuptools" ,python-setuptools))) | |
4681 | (home-page "http://github.com/behdad/fonttools") | |
4682 | (synopsis "Tools to manipulate font files") | |
4683 | (description | |
4684 | "FontTools/TTX is a library to manipulate font files from Python. It | |
4685 | supports reading and writinfg of TrueType/OpenType fonts, reading and writing | |
4686 | of AFM files, reading (and partially writing) of PS Type 1 fonts. The package | |
4687 | also contains a tool called “TTX” which converts TrueType/OpenType fonts to and | |
4688 | from an XML-based format.") | |
4689 | (license (non-copyleft "file://LICENSE.txt" | |
4690 | "See LICENSE.txt in the distribution.")))) | |
4691 | ||
4692 | (define-public python2-fonttools | |
4693 | (package-with-python2 python-fonttools)) | |
75710da6 | 4694 | |
5faa5ce4 RW |
4695 | (define-public python-ly |
4696 | (package | |
4697 | (name "python-ly") | |
4698 | (version "0.9.2") | |
4699 | (source | |
4700 | (origin | |
4701 | (method url-fetch) | |
4702 | (uri (string-append | |
4703 | "https://pypi.python.org/packages/source/p/python-ly/python-ly-" | |
4704 | version ".tar.gz")) | |
4705 | (sha256 | |
4706 | (base32 | |
4707 | "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2")))) | |
4708 | (build-system python-build-system) | |
4709 | (native-inputs | |
4710 | `(("python-setuptools" ,python-setuptools))) | |
4711 | (synopsis "Tool and library for manipulating LilyPond files") | |
4712 | (description "This package provides a Python library to parse, manipulate | |
4713 | or create documents in LilyPond format. A command line program ly is also | |
4714 | provided that can be used to do various manipulations with LilyPond files.") | |
4715 | (home-page "https://pypi.python.org/pypi/python-ly") | |
4716 | (license gpl2+))) | |
7e7b27d9 CR |
4717 | |
4718 | (define-public python-appdirs | |
4719 | (package | |
4720 | (name "python-appdirs") | |
4721 | (version "1.4.0") | |
4722 | (source | |
4723 | (origin | |
4724 | (method url-fetch) | |
4725 | (uri (string-append | |
4726 | "https://pypi.python.org/packages/source/a/appdirs/appdirs-" | |
4727 | version | |
4728 | ".tar.gz")) | |
4729 | (sha256 | |
4730 | (base32 | |
4731 | "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg")))) | |
4732 | (build-system python-build-system) | |
4733 | (inputs | |
4734 | `(("python-setuptools" ,python-setuptools))) | |
4735 | (home-page "http://github.com/ActiveState/appdirs") | |
4736 | (synopsis | |
4737 | "Determine platform-specific dirs, e.g. a \"user data dir\"") | |
4738 | (description | |
4739 | "This module provides a portable way of finding out where user data | |
4740 | should be stored on various operating systems.") | |
4741 | (license license:expat))) | |
4742 | ||
4743 | (define-public python2-appdirs | |
4744 | (package-with-python2 python-appdirs)) | |
89b2e0b0 LF |
4745 | |
4746 | (define-public python-llfuse | |
4747 | (package | |
4748 | (name "python-llfuse") | |
4749 | (version "0.41") | |
4750 | (source (origin | |
4751 | (method url-fetch) | |
4752 | (uri (string-append | |
4753 | "https://bitbucket.org/nikratio/python-llfuse/downloads/" | |
4754 | "llfuse-" version ".tar.bz2")) | |
4755 | (sha256 | |
4756 | (base32 | |
4757 | "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb")))) | |
4758 | (build-system python-build-system) | |
4759 | (inputs | |
4760 | `(("fuse" ,fuse) | |
4761 | ("attr" ,attr))) | |
4762 | (native-inputs | |
4763 | `(("pkg-config" ,pkg-config) | |
4764 | ("python-setuptools" ,python-setuptools))) | |
4765 | (synopsis "Python bindings for FUSE") | |
4766 | (description | |
4767 | "Python-LLFUSE is a set of Python bindings for the low level FUSE API.") | |
4768 | (home-page "https://bitbucket.org/nikratio/python-llfuse/") | |
4769 | ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed. | |
4770 | ;; The rest of the package is licensed under LGPL2.0 or later. | |
4771 | (license (list license:expat lgpl2.0+)))) | |
4772 | ||
4773 | (define-public python2-llfuse | |
4774 | (package-with-python2 python-llfuse)) | |
641c9871 LF |
4775 | |
4776 | (define-public python-msgpack | |
4777 | (package | |
4778 | (name "python-msgpack") | |
4779 | (version "0.4.6") | |
4780 | (source (origin | |
4781 | (method url-fetch) | |
4782 | (uri (string-append | |
4783 | "https://pypi.python.org/packages/source/m/" | |
4784 | "msgpack-python/msgpack-python-" version ".tar.gz")) | |
4785 | (sha256 | |
4786 | (base32 | |
4787 | "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z")))) | |
4788 | (build-system python-build-system) | |
4789 | (native-inputs | |
4790 | `(("python-setuptools" ,python-setuptools))) | |
4791 | (synopsis "MessagePack (de)serializer") | |
4792 | (description "MessagePack is a fast, compact binary serialization format, | |
4793 | suitable for similar data to JSON. This package provides CPython bindings for | |
4794 | reading and writing MessagePack data.") | |
4795 | (home-page "https://pypi.python.org/pypi/msgpack-python/") | |
4796 | (license asl2.0))) | |
4797 | ||
4798 | (define-public python2-msgpack | |
4799 | (package-with-python2 python-msgpack)) | |
6e5e39f4 CR |
4800 | |
4801 | (define-public python-netaddr | |
4802 | (package | |
4803 | (name "python-netaddr") | |
4804 | (version "0.7.18") | |
4805 | (source | |
4806 | (origin | |
4807 | (method url-fetch) | |
4808 | (uri (string-append | |
4809 | "https://pypi.python.org/packages/source/n/netaddr/netaddr-" | |
4810 | version | |
4811 | ".tar.gz")) | |
4812 | (sha256 | |
4813 | (base32 | |
4814 | "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1")))) | |
4815 | (build-system python-build-system) | |
4816 | (arguments `(#:tests? #f)) ;; No tests. | |
4817 | (inputs | |
4818 | `(("python-setuptools" ,python-setuptools))) | |
4819 | (home-page "https://github.com/drkjam/netaddr/") | |
4820 | (synopsis "Pythonic manipulation of network addresses") | |
4821 | (description | |
4822 | "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI | |
4823 | and MAC network addresses.") | |
4824 | (license bsd-3))) | |
4825 | ||
4826 | (define-public python2-netaddr | |
4827 | (package-with-python2 python-netaddr)) | |
8c692a52 CR |
4828 | |
4829 | (define-public python-wrapt | |
4830 | (package | |
4831 | (name "python-wrapt") | |
4832 | (version "1.10.5") | |
4833 | (source | |
4834 | (origin | |
4835 | (method url-fetch) | |
4836 | (uri (string-append | |
4837 | "https://pypi.python.org/packages/source/w/wrapt/wrapt-" | |
4838 | version | |
4839 | ".tar.gz")) | |
4840 | (sha256 | |
4841 | (base32 | |
4842 | "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr")))) | |
4843 | (build-system python-build-system) | |
4844 | (arguments | |
4845 | ;; Tests are not included in the tarball, they are only available in the | |
4846 | ;; git repository. | |
4847 | `(#:tests? #f)) | |
4848 | (inputs | |
4849 | `(("python-setuptools" ,python-setuptools))) | |
4850 | (home-page "https://github.com/GrahamDumpleton/wrapt") | |
4851 | (synopsis "Module for decorators, wrappers and monkey patching") | |
4852 | (description | |
4853 | "The aim of the wrapt module is to provide a transparent object proxy for | |
4854 | Python, which can be used as the basis for the construction of function | |
4855 | wrappers and decorator functions.") | |
4856 | (license bsd-2))) | |
4857 | ||
4858 | (define-public python2-wrapt | |
4859 | (package-with-python2 python-wrapt)) | |
b85c85be CR |
4860 | |
4861 | (define-public python-iso8601 | |
4862 | (package | |
4863 | (name "python-iso8601") | |
4864 | (version "0.1.10") | |
4865 | (source | |
4866 | (origin | |
4867 | (method url-fetch) | |
4868 | (uri (string-append | |
4869 | "https://pypi.python.org/packages/source/i/iso8601/iso8601-" | |
4870 | version | |
4871 | ".tar.gz")) | |
4872 | (sha256 | |
4873 | (base32 | |
4874 | "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7")))) | |
4875 | (build-system python-build-system) | |
4876 | (inputs | |
4877 | `(("python-setuptools" ,python-setuptools))) | |
4878 | (home-page "https://bitbucket.org/micktwomey/pyiso8601") | |
4879 | (synopsis "Module to parse ISO 8601 dates") | |
4880 | (description | |
4881 | "This module parses the most common forms of ISO 8601 date strings (e.g. | |
4882 | @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.") | |
4883 | (license license:expat))) | |
4884 | ||
4885 | (define-public python2-iso8601 | |
4886 | (package-with-python2 python-iso8601)) | |
5e412b63 CR |
4887 | |
4888 | (define-public python-monotonic | |
4889 | (package | |
4890 | (name "python-monotonic") | |
4891 | (version "0.3") | |
4892 | (source | |
4893 | (origin | |
4894 | (method url-fetch) | |
4895 | (uri (string-append | |
4896 | "https://pypi.python.org/packages/source/m/monotonic/monotonic-" | |
4897 | version | |
4898 | ".tar.gz")) | |
4899 | (sha256 | |
4900 | (base32 | |
4901 | "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998")))) | |
4902 | (build-system python-build-system) | |
4903 | (inputs | |
4904 | `(("python-setuptools" ,python-setuptools))) | |
4905 | (home-page "https://github.com/atdt/monotonic") | |
4906 | (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3") | |
4907 | (description | |
4908 | "This module provides a monotonic() function which returns the value (in | |
4909 | fractional seconds) of a clock which never goes backwards.") | |
4910 | (license asl2.0))) | |
4911 | ||
4912 | (define-public python2-monotonic | |
4913 | (package-with-python2 python-monotonic)) | |
de34afac CR |
4914 | |
4915 | (define-public python-webob | |
4916 | (package | |
4917 | (name "python-webob") | |
4918 | (version "1.5.0b0") | |
4919 | (source | |
4920 | (origin | |
4921 | (method url-fetch) | |
4922 | (uri (string-append | |
4923 | "https://pypi.python.org/packages/source/W/WebOb/WebOb-" | |
4924 | version ".tar.gz")) | |
4925 | (sha256 | |
4926 | (base32 | |
4927 | "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a")))) | |
4928 | (build-system python-build-system) | |
4929 | (inputs | |
4930 | `(("python-nose" ,python-nose) | |
4931 | ("python-setuptools" ,python-setuptools))) | |
4932 | (home-page "http://webob.org/") | |
4933 | (synopsis "WSGI request and response object") | |
4934 | (description | |
4935 | "WebOb provides wrappers around the WSGI request environment, and an | |
4936 | object to help create WSGI responses.") | |
4937 | (license license:expat))) | |
4938 | ||
4939 | (define-public python2-webob | |
4940 | (package-with-python2 python-webob)) | |
350ba0a3 CR |
4941 | |
4942 | (define-public python-prettytable | |
4943 | (package | |
4944 | (name "python-prettytable") | |
4945 | (version "0.7.2") | |
4946 | (source | |
4947 | (origin | |
4948 | (method url-fetch) | |
4949 | (uri (string-append | |
4950 | "https://pypi.python.org/packages/source/P/PrettyTable/" | |
4951 | "prettytable-" version ".tar.bz2")) | |
4952 | (sha256 | |
4953 | (base32 | |
4954 | "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45")))) | |
4955 | (build-system python-build-system) | |
4956 | (inputs | |
4957 | `(("python-setuptools" ,python-setuptools))) | |
4958 | (home-page "http://code.google.com/p/prettytable/") | |
4959 | (synopsis "Display tabular data in an ASCII table format") | |
4960 | (description | |
4961 | "A library designed to represent tabular data in visually appealing ASCII | |
4962 | tables. PrettyTable allows for selection of which columns are to be printed, | |
4963 | independent alignment of columns (left or right justified or centred) and | |
4964 | printing of sub-tables by specifying a row range.") | |
4965 | (license bsd-3))) | |
4966 | ||
4967 | (define-public python2-prettytable | |
4968 | (package-with-python2 python-prettytable)) | |
7a8ac75a RW |
4969 | |
4970 | (define-public python-pyasn1 | |
4971 | (package | |
4972 | (name "python-pyasn1") | |
4973 | (version "0.1.8") | |
4974 | (source | |
4975 | (origin | |
4976 | (method url-fetch) | |
4977 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
4978 | "pyasn1/pyasn1-" version ".tar.gz")) | |
4979 | (sha256 | |
4980 | (base32 | |
4981 | "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx")))) | |
4982 | (build-system python-build-system) | |
4983 | (home-page "http://pyasn1.sourceforge.net/") | |
4984 | (synopsis "ASN.1 types and codecs") | |
4985 | (description | |
4986 | "This is an implementation of ASN.1 types and codecs in Python. It is | |
4987 | suitable for a wide range of protocols based on the ASN.1 specification.") | |
4988 | (license bsd-2))) | |
4989 | ||
4990 | (define-public python2-pyasn1 | |
4991 | (package-with-python2 python-pyasn1)) | |
9a49a535 RW |
4992 | |
4993 | (define-public python2-ipaddress | |
4994 | (package | |
4995 | (name "python2-ipaddress") | |
4996 | (version "1.0.14") | |
4997 | (source | |
4998 | (origin | |
4999 | (method url-fetch) | |
5000 | (uri (string-append "https://pypi.python.org/packages/source/i/" | |
5001 | "ipaddress/ipaddress-" version ".tar.gz")) | |
5002 | (sha256 | |
5003 | (base32 | |
5004 | "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2")))) | |
5005 | (build-system python-build-system) | |
5006 | (arguments | |
5007 | `(#:tests? #f ; no tests | |
5008 | #:python ,python-2)) | |
5009 | (home-page "https://github.com/phihag/ipaddress") | |
5010 | (synopsis "IP address manipulation library") | |
5011 | (description | |
5012 | "This package provides a fast, lightweight IPv4/IPv6 manipulation library | |
5013 | in Python. This library is used to create, poke at, and manipulate IPv4 and | |
5014 | IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress | |
5015 | module to older versions of Python.") | |
5016 | (license psfl))) | |
3f00e078 RW |
5017 | |
5018 | (define-public python-idna | |
5019 | (package | |
5020 | (name "python-idna") | |
5021 | (version "2.0") | |
5022 | (source | |
5023 | (origin | |
5024 | (method url-fetch) | |
5025 | (uri (string-append "https://pypi.python.org/packages/source/i/" | |
5026 | "idna/idna-" version ".tar.gz")) | |
5027 | (sha256 | |
5028 | (base32 | |
5029 | "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n")))) | |
5030 | (build-system python-build-system) | |
5031 | (native-inputs | |
5032 | `(("python-setuptools" ,python-setuptools))) | |
5033 | (home-page "https://github.com/kjd/idna") | |
5034 | (synopsis "Internationalized domain names in applications") | |
5035 | (description | |
5036 | "This is a library to support the Internationalised Domain Names in | |
5037 | Applications (IDNA) protocol as specified in RFC 5891. This version of the | |
5038 | protocol is often referred to as “IDNA2008” and can produce different results | |
5039 | from the earlier standard from 2003. The library is also intended to act as a | |
5040 | suitable drop-in replacement for the “encodings.idna” module that comes with | |
5041 | the Python standard library but currently only supports the older 2003 | |
5042 | specification.") | |
5043 | (license bsd-4))) | |
5044 | ||
5045 | (define-public python2-idna | |
5046 | (package-with-python2 python-idna)) | |
36ebf972 RW |
5047 | |
5048 | (define-public python-pretend | |
5049 | (package | |
5050 | (name "python-pretend") | |
5051 | (version "1.0.8") | |
5052 | (source | |
5053 | (origin | |
5054 | (method url-fetch) | |
5055 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
5056 | "pretend/pretend-" version ".tar.gz")) | |
5057 | (sha256 | |
5058 | (base32 | |
5059 | "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk")))) | |
5060 | (build-system python-build-system) | |
5061 | (native-inputs | |
5062 | `(("python-setuptools" ,python-setuptools))) | |
5063 | (home-page "https://github.com/alex/pretend") | |
5064 | (synopsis "Library for stubbing in Python") | |
5065 | (description | |
5066 | "Pretend is a library to make stubbing with Python easier. Stubbing is a | |
5067 | technique for writing tests. You may hear the term mixed up with mocks, | |
5068 | fakes, or doubles. Basically, a stub is an object that returns pre-canned | |
5069 | responses, rather than doing any computation.") | |
5070 | (license bsd-3))) | |
5071 | ||
5072 | (define-public python2-pretend | |
5073 | (package-with-python2 python-pretend)) | |
aa759a51 RW |
5074 | |
5075 | (define-public python-cryptography-vectors | |
5076 | (package | |
5077 | (name "python-cryptography-vectors") | |
5078 | (version "1.0.1") | |
5079 | (source | |
5080 | (origin | |
5081 | (method url-fetch) | |
5082 | (uri (string-append "https://pypi.python.org/packages/source/c/" | |
5083 | "cryptography-vectors/cryptography_vectors-" | |
5084 | version ".tar.gz")) | |
5085 | (sha256 | |
5086 | (base32 | |
5087 | "1i2chlyhlx4792di82fqzcy9wz0gnnc661bj46zr794ip4629sp4")))) | |
5088 | (build-system python-build-system) | |
5089 | (native-inputs | |
5090 | `(("python-setuptools" ,python-setuptools))) | |
5091 | (home-page "https://github.com/pyca/cryptography") | |
5092 | (synopsis "Test vectors for the cryptography package.") | |
5093 | (description | |
5094 | "This package contains test vectors for the cryptography package.") | |
5095 | ;; Distributed under either BSD-3 or ASL2.0 | |
5096 | (license (list bsd-3 asl2.0)))) | |
5097 | ||
5098 | (define-public python2-cryptography-vectors | |
5099 | (package-with-python2 python-cryptography-vectors)) | |
88b47cb0 RW |
5100 | |
5101 | (define-public python-cryptography | |
5102 | (package | |
5103 | (name "python-cryptography") | |
5104 | (version "1.0.1") | |
5105 | (source | |
5106 | (origin | |
5107 | (method url-fetch) | |
5108 | (uri (string-append "https://pypi.python.org/packages/source/c/" | |
5109 | "cryptography/cryptography-" version ".tar.gz")) | |
5110 | (sha256 | |
5111 | (base32 | |
5112 | "1lxzvhlyl6h6nm77n34622rcj2cxnx220x9vgjlw76wjd8m0kqyg")))) | |
5113 | (build-system python-build-system) | |
5114 | (inputs | |
5115 | `(("openssl" ,openssl))) | |
5116 | (propagated-inputs | |
5117 | `(("python-cffi" ,python-cffi) | |
5118 | ("python-six" ,python-six) | |
5119 | ("python-pyasn1" ,python-pyasn1) | |
5120 | ("python-enum34" ,python-enum34) | |
5121 | ("python-idna" ,python-idna) | |
5122 | ("python-iso8601" ,python-iso8601))) | |
5123 | (native-inputs | |
5124 | `(("python-cryptography-vectors" ,python-cryptography-vectors) | |
5125 | ("python-setuptools" ,python-setuptools) | |
5126 | ("python-pretend" ,python-pretend) | |
5127 | ("python-pytest" ,python-pytest))) | |
5128 | (home-page "https://github.com/pyca/cryptography") | |
5129 | (synopsis "Cryptographic recipes and primitives for Python") | |
5130 | (description | |
5131 | "cryptography is a package which provides cryptographic recipes and | |
5132 | primitives to Python developers. It aims to be the “cryptographic standard | |
5133 | library” for Python. The package includes both high level recipes, and low | |
5134 | level interfaces to common cryptographic algorithms such as symmetric ciphers, | |
5135 | message digests and key derivation functions.") | |
5136 | ;; Distributed under either BSD-3 or ASL2.0 | |
5137 | (license (list bsd-3 asl2.0)))) | |
5138 | ||
5139 | (define-public python2-cryptography | |
5140 | (let ((crypto (package-with-python2 python-cryptography))) | |
5141 | (package (inherit crypto) | |
5142 | (propagated-inputs | |
5143 | `(("python2-ipaddress" ,python2-ipaddress) | |
5144 | ,@(package-propagated-inputs crypto)))))) | |
5af999b8 RW |
5145 | |
5146 | (define-public python-pyopenssl | |
5147 | (package | |
5148 | (name "python-pyopenssl") | |
5149 | (version "0.15.1") | |
5150 | (source | |
5151 | (origin | |
5152 | (method url-fetch) | |
5153 | (uri (string-append "https://pypi.python.org/packages/source/p/" | |
5154 | "pyOpenSSL/pyOpenSSL-" version ".tar.gz")) | |
5155 | (sha256 | |
5156 | (base32 | |
5157 | "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph")))) | |
5158 | (build-system python-build-system) | |
5159 | (arguments | |
5160 | `(#:phases | |
5161 | (modify-phases %standard-phases | |
5162 | (add-after 'unpack 'fix-tests | |
5163 | (lambda* (#:key inputs #:allow-other-keys) | |
5164 | (substitute* "OpenSSL/test/test_ssl.py" | |
5165 | (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)") | |
5166 | "return True") | |
5167 | ;; FIXME: disable broken test | |
5168 | (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh")) | |
5169 | (substitute* "OpenSSL/test/test_crypto.py" | |
5170 | (("command = b\"openssl \"") | |
5171 | (string-append "command = b\"" | |
5172 | (assoc-ref inputs "openssl") | |
5173 | "/bin/openssl" " \"")) | |
5174 | ;; FIXME: disable four broken tests | |
5175 | (("test_der") "disabled__der") | |
5176 | (("test_digest") "disabled__digest") | |
5177 | (("test_get_extension") "disabled__get_extension") | |
5178 | (("test_extension_count") "disabled__extension_count")) | |
5179 | #t))))) | |
5180 | (propagated-inputs | |
5181 | `(("python-cryptography" ,python-cryptography) | |
5182 | ("python-six" ,python-six))) | |
5183 | (inputs | |
5184 | `(("openssl" ,openssl))) | |
5185 | (native-inputs | |
5186 | `(("python-setuptools" ,python-setuptools))) | |
5187 | (home-page "https://github.com/pyca/pyopenssl") | |
5188 | (synopsis "Python wrapper module around the OpenSSL library") | |
5189 | (description | |
5190 | "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL | |
5191 | library.") | |
5192 | (license asl2.0))) | |
5193 | ||
5194 | (define-public python2-pyopenssl | |
5195 | (let ((pyopenssl (package-with-python2 python-pyopenssl))) | |
5196 | (package (inherit pyopenssl) | |
5197 | (propagated-inputs | |
5198 | `(("python2-cryptography" ,python2-cryptography) | |
5199 | ,@(alist-delete "python-cryptography" | |
5200 | (package-propagated-inputs pyopenssl))))))) |