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