1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages python)
35 #:use-module ((guix licenses)
36 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
37 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
38 isc psfl public-domain x11-style zpl2.1))
39 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages backup)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages databases)
45 #:use-module (gnu packages file)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages gcc)
48 #:use-module (gnu packages ghostscript)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages icu4c)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages imagemagick)
54 #:use-module (gnu packages libffi)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages maths)
57 #:use-module (gnu packages multiprecision)
58 #:use-module (gnu packages networking)
59 #:use-module (gnu packages ncurses)
60 #:use-module (gnu packages pcre)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages readline)
64 #:use-module (gnu packages statistics)
65 #:use-module (gnu packages texlive)
66 #:use-module (gnu packages texinfo)
67 #:use-module (gnu packages tls)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages base)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages xorg)
72 #:use-module (gnu packages zip)
73 #:use-module (gnu packages tcl)
74 #:use-module (guix packages)
75 #:use-module (guix download)
76 #:use-module (guix git-download)
77 #:use-module (guix utils)
78 #:use-module (guix build-system gnu)
79 #:use-module (guix build-system cmake)
80 #:use-module (guix build-system python)
81 #:use-module (guix build-system trivial)
82 #:use-module (srfi srfi-1))
84 (define-public python-2
91 (uri (string-append "https://www.python.org/ftp/python/"
92 version "/Python-" version ".tar.xz"))
95 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
96 (patches (map search-patch
97 '("python-2.7-search-paths.patch"
98 "python-2-deterministic-build-info.patch"
99 "python-2.7-source-date-epoch.patch")))))
101 "tk")) ;tkinter; adds 50 MiB to the closure
102 (build-system gnu-build-system)
107 ;; test_distutils test_shutil test_signal test_site test_slice
108 ;; test_smtplib test_smtpnet test_socket test_socketserver
109 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
110 ;; test_startfile test_stat test_str test_strftime test_string
111 ;; test_stringprep test_strop test_strptime test_strtod test_struct
112 ;; test_structmembers test_structseq test_subprocess test_sunau
113 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
114 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
115 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
116 ;; test_threaded_import test_threadedtempfile test_threading
117 ;; test_threading_local test_threadsignals test_time test_timeit
118 ;; test_timeout test_tk test_tokenize test_tools test_trace
119 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
120 ;; test_tuple test_typechecks test_ucn test_unary
121 ;; test_undocumented_details test_unicode test_unicode_file
122 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
123 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
124 ;; test_urllibnet test_urlparse test_userdict test_userlist
125 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
126 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
127 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
128 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
129 ;; test_xpickle test_xrange test_zipfile test_zipfile64
130 ;; test_zipimport test_zipimport_support test_zlib
132 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
133 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
134 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
135 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
136 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
137 ;; test_macostools test_msilib test_nis test_ossaudiodev
138 ;; test_scriptpackages
139 ;; 6 skips unexpected on linux2:
140 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
141 ;; One of the typical errors:
143 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
144 ;; such file or directory
147 (list "--enable-shared" ;allow embedding
148 "--with-system-ffi" ;build ctypes
149 (string-append "LDFLAGS=-Wl,-rpath="
150 (assoc-ref %outputs "out") "/lib"))
152 #:modules ((ice-9 ftw) (ice-9 match)
153 (guix build utils) (guix build gnu-build-system))
155 (modify-phases %standard-phases
157 'configure 'patch-lib-shells
159 ;; Filter for existing files, since some may not exist in all
160 ;; versions of python that are built with this recipe.
161 (substitute* (filter file-exists?
162 '("Lib/subprocess.py"
164 "Lib/distutils/tests/test_spawn.py"
165 "Lib/test/test_subprocess.py"))
166 (("/bin/sh") (which "sh")))
168 ;; Use zero as the timestamp in .pyc files so that builds are
169 ;; deterministic. TODO: Remove it when this variable is set in
170 ;; gnu-build-system.scm.
171 (setenv "SOURCE_DATE_EPOCH" "1")
173 (add-before 'configure 'do-not-record-configure-flags
174 (lambda* (#:key configure-flags #:allow-other-keys)
175 ;; Remove configure flags from the installed '_sysconfigdata.py'
176 ;; and 'Makefile' so we don't end up keeping references to the
179 ;; Preserve at least '--with-system-ffi' since otherwise the
180 ;; thing tries to build libffi, fails, and we end up with a
181 ;; Python that lacks ctypes.
182 (substitute* "configure"
183 (("^CONFIG_ARGS=.*$")
184 (format #f "CONFIG_ARGS='~a'\n"
185 (if (member "--with-system-ffi" configure-flags)
192 ;; 'Lib/test/test_site.py' needs a valid $HOME
193 (setenv "HOME" (getcwd))
196 'unpack 'set-source-file-times-to-1980
197 ;; XXX One of the tests uses a ZIP library to pack up some of the
198 ;; source tree, and fails with "ZIP does not support timestamps
199 ;; before 1980". Work around this by setting the file times in the
200 ;; source tree to sometime in early 1980.
202 (let ((circa-1980 (* 10 366 24 60 60)))
203 (ftw "." (lambda (file stat flag)
204 (utime file circa-1980 circa-1980)
207 (add-after 'install 'move-tk-inter
208 (lambda* (#:key outputs #:allow-other-keys)
209 ;; When Tkinter support is built move it to a separate output so
210 ;; that the main output doesn't contain a reference to Tcl/Tk.
211 (let ((out (assoc-ref outputs "out"))
212 (tk (assoc-ref outputs "tk")))
214 (match (find-files out "tkinter.*\\.so")
216 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
217 ;; want it under TK/lib/pythonX.Y/site-packages.
218 (let* ((len (string-length out))
219 (target (string-append
222 (dirname (dirname tkinter.so))
225 (install-file tkinter.so target)
226 (delete-file tkinter.so)))))
231 ("libffi" ,libffi) ; for ctypes
232 ("sqlite" ,sqlite) ; for sqlite extension
234 ("readline" ,readline)
237 ("tk" ,tk))) ; for tkinter
239 `(("pkg-config" ,pkg-config)))
241 (list (search-path-specification
242 (variable "PYTHONPATH")
243 (files '("lib/python2.7/site-packages")))))
244 (home-page "http://python.org")
245 (synopsis "High-level, dynamically-typed programming language")
247 "Python is a remarkably powerful dynamic programming language that
248 is used in a wide variety of application domains. Some of its key
249 distinguishing features include: clear, readable syntax; strong
250 introspection capabilities; intuitive object orientation; natural
251 expression of procedural code; full modularity, supporting hierarchical
252 packages; exception-based error handling; and very high level dynamic
256 (define-public python
257 (package (inherit python-2)
261 (uri (string-append "https://www.python.org/ftp/python/"
262 version "/Python-" version ".tar.xz"))
263 (patches (map search-patch
264 '("python-fix-tests.patch"
265 ;; XXX Try removing this patch for python > 3.4.3
266 "python-disable-ssl-test.patch"
267 "python-3-deterministic-build-info.patch"
268 "python-3-search-paths.patch")))
269 (patch-flags '("-p0"))
272 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
273 (arguments (substitute-keyword-arguments (package-arguments python-2)
276 (list (search-path-specification
277 (variable "PYTHONPATH")
278 (files (list (string-append "lib/python"
279 (version-major+minor version)
280 "/site-packages"))))))))
282 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
283 ;; Python (Tk -> libxcb -> Python.)
285 (define-public python2-minimal
286 (package (inherit python-2)
287 (name "python-minimal")
290 (substitute-keyword-arguments (package-arguments python-2)
291 ((#:configure-flags cf)
292 `(append ,cf '("--without-system-ffi")))))
293 (inputs '()))) ;none of the optional dependencies
295 (define-public python-minimal
296 (package (inherit python)
297 (name "python-minimal")
300 (substitute-keyword-arguments (package-arguments python)
301 ((#:configure-flags cf)
302 `(append ,cf '("--without-system-ffi")))))
304 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
305 ;; zlib is required by 'zipimport', used by pip.
306 (inputs `(("openssl" ,openssl)
309 (define* (wrap-python3 python #:optional (name "python-wrapper"))
310 (package (inherit python)
313 (build-system trivial-build-system)
315 (propagated-inputs `(("python" ,python)))
317 `(#:modules ((guix build utils))
320 (use-modules (guix build utils))
321 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
322 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
326 (symlink (string-append python old)
327 (string-append bin "/" new)))
328 `("python3", "pydoc3", "idle3")
329 `("python", "pydoc", "idle"))))))
330 (synopsis "Wrapper for the Python 3 commands")
332 "This package provides wrappers for the commands of Python@tie{}3.x such
333 that they can be invoked under their usual name---e.g., @command{python}
334 instead of @command{python3}.")))
336 (define-public python-wrapper (wrap-python3 python))
337 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
339 (define-public python-psutil
341 (name "python-psutil")
347 "https://pypi.python.org/packages/source/p/psutil/psutil-"
351 "00c8h1mzqysih99z8pnbmdv117d2naldf11yjy50dhykxsf3n89z"))))
352 (build-system python-build-system)
354 `(("python-setuptools" ,python-setuptools)))
355 (home-page "https://pypi.python.org/pypi/psutil/")
356 (synopsis "Library for retrieving information on running processes")
358 "psutil (Python system and process utilities) is a library for retrieving
359 information on running processes and system utilization (CPU, memory, disks,
360 network) in Python. It is useful mainly for system monitoring, profiling and
361 limiting process resources and management of running processes. It implements
362 many functionalities offered by command line tools such as: ps, top, lsof,
363 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
364 pidof, tty, taskset, pmap.")
367 (define-public python2-psutil
368 (package-with-python2 python-psutil))
370 (define-public python-passlib
372 (name "python-passlib")
378 "https://pypi.python.org/packages/source/p/passlib/passlib-"
383 "0b9rd161b3mmiwd7nx1v599yh9sp07mlfwac65sjy9qn1l0gd1z9"))))
384 (build-system python-build-system)
386 `(("python-nose" ,python-nose)
387 ("python-setuptools" ,python-setuptools)))
389 `(("python-py-bcrypt" ,python-py-bcrypt)))
393 'check 'set-PYTHON_EGG_CACHE
394 ;; some tests require access to "$HOME/.cython"
395 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
397 (home-page "https://bitbucket.org/ecollins/passlib")
399 "Comprehensive password hashing framework")
401 "Passlib is a password hashing library for Python 2 & 3, which provides
402 cross-platform implementations of over 30 password hashing algorithms, as well
403 as a framework for managing existing password hashes. It's designed to be
404 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
405 to providing full-strength password hashing for multi-user application.")
408 (define-public python2-passlib
409 (package-with-python2 python-passlib))
411 (define-public python-py-bcrypt
413 (name "python-py-bcrypt")
419 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
424 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
425 (build-system python-build-system)
427 `(("python-setuptools" ,python-setuptools)))
428 (home-page "https://code.google.com/p/py-bcrypt")
430 "Bcrypt password hashing and key derivation")
432 "A python wrapper of OpenBSD's Blowfish password hashing code. This
433 system hashes passwords using a version of Bruce Schneier's Blowfish block
434 cipher with modifications designed to raise the cost of off-line password
435 cracking and frustrate fast hardware implementation. The computation cost of
436 the algorithm is parametised, so it can be increased as computers get faster.
437 The intent is to make a compromise of a password database less likely to
438 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
440 ;; "sha2.c" is under BSD-3;
441 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
442 ;; the rest is under ISC.
443 (license (list isc bsd-3 bsd-4))))
445 (define-public python2-py-bcrypt
446 (package-with-python2 python-py-bcrypt))
449 (define-public python-paramiko
451 (name "python-paramiko")
457 "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
462 "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
463 (build-system python-build-system)
465 `(("python-setuptools" ,python-setuptools)))
467 `(("python-pycrypto" ,python-pycrypto)))
469 `(("python-ecdsa" ,python-ecdsa)))
470 (home-page "http://www.paramiko.org/")
471 (synopsis "SSHv2 protocol library")
472 (description "Paramiko is a python implementation of the SSHv2 protocol,
473 providing both client and server functionality. While it leverages a Python C
474 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
475 Python interface around SSH networking concepts.")
478 (define-public python2-paramiko
479 (package-with-python2 python-paramiko))
482 (define-public python-httplib2
484 (name "python-httplib2")
490 "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
495 "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
496 (build-system python-build-system)
498 `(("python-setuptools" ,python-setuptools)))
500 "https://github.com/jcgregorio/httplib2")
501 (synopsis "Comprehensive HTTP client library")
503 "A comprehensive HTTP client library supporting many features left out of
504 other HTTP libraries.")
505 (license license:expat)))
507 (define-public python2-httplib2
508 (package-with-python2 python-httplib2))
510 (define-public python-ecdsa
512 (name "python-ecdsa")
518 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
523 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
524 (build-system python-build-system)
526 `(("python-setuptools" ,python-setuptools)))
528 `(("openssl" ,openssl)))
530 "http://github.com/warner/python-ecdsa")
532 "ECDSA cryptographic signature library (pure python)")
534 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
535 Curve Digital Signature Algorithm), implemented purely in Python. With this
536 library, you can quickly create keypairs (signing key and verifying key), sign
537 messages, and verify the signatures. The keys and signatures are very short,
538 making them easy to handle and incorporate into other protocols.")
539 (license license:expat)))
541 (define-public python2-ecdsa
542 (package-with-python2 python-ecdsa))
544 (define-public python-ccm
552 "https://pypi.python.org/packages/source/c/ccm/ccm-"
557 "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
558 (build-system python-build-system)
560 `(("python-setuptools" ,python-setuptools)))
562 `(("python-pyyaml" ,python-pyyaml)
563 ("python-six" ,python-six)))
564 (home-page "https://github.com/pcmanus/ccm")
565 (synopsis "Cassandra Cluster Manager")
566 (description "A script/library to create, launch and remove an Apache
567 Cassandra cluster on localhost.")
570 (define-public python2-ccm
571 (package-with-python2 python-ccm))
573 (define-public python-pytz
580 (uri (string-append "https://launchpad.net/pytz/main/" version
581 "/+download/pytz-" version ".tar.bz2"))
584 "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
585 (build-system python-build-system)
586 (arguments `(#:tests? #f)) ; no test target
587 (home-page "https://launchpad.net/pytz")
588 (synopsis "Python timezone library")
590 "This library allows accurate and cross platform timezone calculations
591 using Python 2.4 or higher and provides access to the Olson timezone database.")
594 (define-public python2-pytz
595 (package-with-python2 python-pytz))
598 (define-public python-babel
600 (name "python-babel")
605 (uri (pypi-uri "Babel" version))
608 "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
609 (build-system python-build-system)
611 `(("python-pytz" ,python-pytz)
612 ("python-setuptools" ,python-setuptools)))
613 (arguments `(#:tests? #f)) ; no test target
614 (home-page "http://babel.pocoo.org/")
616 "Tools for internationalizing Python applications")
618 "Babel is composed of two major parts:
619 - tools to build and work with gettext message catalogs
620 - a Python interface to the CLDR (Common Locale Data Repository), providing
621 access to various locale display names, localized number and date formatting,
625 (define-public python2-babel
626 (package-with-python2 python-babel))
628 (define-public python2-backport-ssl-match-hostname
630 (name "python2-backport-ssl-match-hostname")
636 "https://pypi.python.org/packages/source/b/"
637 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
641 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
642 (build-system python-build-system)
643 (arguments `(#:python ,python-2))
645 `(("python2-setuptools" ,python2-setuptools)))
646 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
647 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
649 "This backport brings the ssl.match_hostname() function to users of
650 earlier versions of Python. The function checks the hostname in the
651 certificate returned by the server to which a connection has been established,
652 and verifies that it matches the intended target hostname.")
655 (define-public python-h5py
662 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
666 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
667 (build-system python-build-system)
669 `(#:tests? #f ; no test target
671 (modify-phases %standard-phases
672 (add-after 'unpack 'fix-hdf5-paths
673 (lambda* (#:key inputs #:allow-other-keys)
674 (let ((prefix (assoc-ref inputs "hdf5")))
675 (substitute* "setup_build.py"
676 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
677 (string-append "['" prefix "/lib" "']"))
678 (("'/opt/local/include', '/usr/local/include'")
679 (string-append "'" prefix "/include" "'")))
680 (substitute* "setup_configure.py"
681 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
682 (string-append "['" prefix "/lib" "']")))
685 `(("python-numpy" ,python-numpy)))
689 `(("python-cython" ,python-cython)))
690 (home-page "http://www.h5py.org/")
691 (synopsis "Read and write HDF5 files from Python")
693 "The h5py package provides both a high- and low-level interface to the
694 HDF5 library from Python. The low-level interface is intended to be a
695 complete wrapping of the HDF5 API, while the high-level component supports
696 access to HDF5 files, datasets and groups using established Python and NumPy
700 (define-public python2-h5py
701 (let ((h5py (package-with-python2 python-h5py)))
702 (package (inherit h5py)
704 `(("python2-numpy" ,python2-numpy)
707 (package-propagated-inputs h5py)))))))
709 (define-public python-lockfile
711 (name "python-lockfile")
716 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
717 "lockfile-" version ".tar.gz"))
720 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
721 (build-system python-build-system)
722 (arguments '(#:test-target "check"))
723 (home-page "http://code.google.com/p/pylockfile/")
724 (synopsis "Platform-independent file locking module")
726 "The lockfile package exports a LockFile class which provides a simple
727 API for locking files.")
728 (license license:expat)))
730 (define-public python2-lockfile
731 (package-with-python2 python-lockfile))
733 (define-public python-mock
740 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
741 "mock-" version ".tar.gz"))
744 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
745 (build-system python-build-system)
746 (arguments '(#:test-target "check"))
747 (home-page "http://code.google.com/p/mock/")
748 (synopsis "Python mocking and patching library for testing")
750 "Mock is a library for testing in Python. It allows you to replace parts
751 of your system under test with mock objects and make assertions about how they
753 (license license:expat)))
755 (define-public python2-mock
756 (package-with-python2 python-mock))
759 (define-public python-setuptools
761 (name "python-setuptools")
766 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
770 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
771 (build-system python-build-system)
772 ;; FIXME: Tests require pytest, which itself relies on setuptools.
773 ;; One could bootstrap with an internal untested setuptools.
776 (home-page "https://pypi.python.org/pypi/setuptools")
778 "Library designed to facilitate packaging Python projects")
780 "Setuptools is a fully-featured, stable library designed to facilitate
781 packaging Python projects, where packaging includes:
782 Python package and module definitions,
783 distribution package metadata,
785 project installation,
786 platform-specific details,
790 (define-public python2-setuptools
791 (package-with-python2 python-setuptools))
794 (define-public python-pycrypto
796 (name "python-pycrypto")
801 (uri (string-append "https://pypi.python.org/packages/source/p/"
802 "pycrypto/pycrypto-" version ".tar.gz"))
805 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
806 (build-system python-build-system)
808 `(("python-setuptools" ,python-setuptools)))
815 'build 'set-build-env
816 ;; pycrypto runs an autoconf configure script behind the scenes
818 (setenv "CONFIG_SHELL" (which "bash")))
820 (home-page "http://www.pycrypto.org/")
821 (synopsis "Cryptographic modules for Python")
823 "Pycrypto is a collection of both secure hash functions (such as SHA256
824 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
825 etc.). The package is structured to make adding new modules easy.")
826 (license public-domain)))
828 (define-public python2-pycrypto
829 (let ((pycrypto (package-with-python2 python-pycrypto)))
830 (package (inherit pycrypto)
832 `(("python" ,python-2)
835 (package-inputs pycrypto)))))))
837 (define-public python-keyring
839 (name "python-keyring")
844 (uri (string-append "https://pypi.python.org/packages/source/k/"
845 "keyring/keyring-" version ".zip"))
848 "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
849 (build-system python-build-system)
852 ("python-setuptools" ,python-setuptools)
853 ("python-mock" ,python-mock)))
855 `(("python-pycrypto" ,python-pycrypto)))
857 `(#:tests? #f ;TODO: tests require pytest
862 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
864 (source (assoc-ref %build-inputs "source")))
865 (and (zero? (system* unzip source))
866 (chdir (string-append "keyring-" ,version)))))
868 (home-page "http://bitbucket.org/kang/python-keyring-lib")
869 (synopsis "Store and access your passwords safely")
871 "The Python keyring lib provides a easy way to access the system keyring
872 service from python. It can be used in any application that needs safe
874 ;; "MIT" and PSF dual license
877 (define-public python2-keyring
878 (let ((keyring (package-with-python2 python-keyring)))
879 (package (inherit keyring)
881 `(("python2-pycrypto" ,python2-pycrypto))))))
883 (define-public python-six
890 (uri (pypi-uri "six" version))
893 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
894 (build-system python-build-system)
896 `(("python-setuptools" ,python-setuptools)))
897 (home-page "http://pypi.python.org/pypi/six/")
898 (synopsis "Python 2 and 3 compatibility utilities")
900 "Six is a Python 2 and 3 compatibility library. It provides utility
901 functions for smoothing over the differences between the Python versions with
902 the goal of writing Python code that is compatible on both Python versions.
903 Six supports every Python version since 2.5. It is contained in only one
904 Python file, so it can be easily copied into your project.")
907 (define-public python2-six
908 (package-with-python2 python-six))
910 (define-public python-dateutil-2
912 (name "python-dateutil")
917 (uri (string-append "https://pypi.python.org/packages/source/p/"
918 name "/" name "-" version ".tar.gz"))
921 "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
922 (build-system python-build-system)
924 `(("python-setuptools" ,python-setuptools)
925 ("python-six" ,python-six)))
926 (home-page "http://labix.org/python-dateutil")
927 (synopsis "Extensions to the standard datetime module")
929 "The dateutil module provides powerful extensions to the standard
930 datetime module, available in Python 2.3+.")
933 (define-public python2-dateutil-2
934 (package-with-python2 python-dateutil-2))
936 (define-public python-dateutil
938 (name "python-dateutil")
939 (version "1.5") ; last version for python < 3
943 (uri (string-append "http://labix.org/download/python-dateutil/"
944 "python-dateutil-" version ".tar.gz"))
947 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
948 (build-system python-build-system)
950 `(("python-setuptools" ,python-setuptools)))
951 (home-page "http://labix.org/python-dateutil")
952 (synopsis "Extensions to the standard datetime module")
954 "The dateutil module provides powerful extensions to the standard
955 datetime module, available in Python 2.3+.")
958 (define-public python2-dateutil
959 (package-with-python2 python-dateutil))
961 (define-public python-parsedatetime
963 (name "python-parsedatetime")
968 (uri (string-append "https://pypi.python.org/packages/source/p/"
969 "parsedatetime/parsedatetime-" version ".tar.gz"))
972 "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
973 (build-system python-build-system)
975 `(("python-setuptools" ,python-setuptools)))
976 (arguments `(#:tests? #f)) ;no test target
977 (home-page "http://github.com/bear/parsedatetime/")
979 "Parse human-readable date/time text")
981 "Parse human-readable date/time text.")
984 (define-public python-pandas
986 (name "python-pandas")
991 (uri (string-append "https://pypi.python.org/packages/source/p/"
992 "pandas/pandas-" version ".tar.gz"))
994 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
995 (build-system python-build-system)
997 `(;; Three tests fail:
998 ;; - test_read_google
1000 ;; - test_month_range_union_tz_dateutil
1003 `(("python-numpy" ,python-numpy)
1004 ("python-pytz" ,python-pytz)
1005 ("python-dateutil" ,python-dateutil-2)))
1007 `(("python-nose" ,python-nose)
1008 ("python-setuptools" ,python-setuptools)))
1009 (home-page "http://pandas.pydata.org")
1010 (synopsis "Data structures for data analysis, time series, and statistics")
1012 "Pandas is a Python package providing fast, flexible, and expressive data
1013 structures designed to make working with structured (tabular,
1014 multidimensional, potentially heterogeneous) and time series data both easy
1015 and intuitive. It aims to be the fundamental high-level building block for
1016 doing practical, real world data analysis in Python.")
1019 (define-public python2-pandas
1020 (let ((pandas (package-with-python2 python-pandas)))
1021 (package (inherit pandas)
1023 `(("python2-numpy" ,python2-numpy)
1024 ,@(alist-delete "python-numpy"
1025 (package-propagated-inputs pandas)))))))
1027 (define-public python-tzlocal
1029 (name "python-tzlocal")
1034 (uri (string-append "https://pypi.python.org/packages/source/t/"
1035 "tzlocal/tzlocal-" version ".zip"))
1038 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
1039 (build-system python-build-system)
1042 ("python-setuptools" ,python-setuptools)))
1043 (inputs `(("python-pytz" ,python-pytz)))
1049 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
1051 (source (assoc-ref %build-inputs "source")))
1052 (and (zero? (system* unzip source))
1053 (chdir (string-append "tzlocal-" ,version)))))
1055 (home-page "https://github.com/regebro/tzlocal")
1057 "Local timezone information for Python")
1059 "Tzlocal returns a tzinfo object with the local timezone information.
1060 This module attempts to fix a glaring hole in pytz, that there is no way to
1061 get the local timezone information, unless you know the zoneinfo name, and
1062 under several distributions that's hard or impossible to figure out.")
1065 (define-public python-pysam
1067 (name "python-pysam")
1072 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
1076 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
1077 (build-system python-build-system)
1079 `(#:tests? #f ; tests are excluded in the manifest
1084 (setenv "LDFLAGS" "-lncurses")
1085 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
1088 `(("python-cython" ,python-cython)
1089 ("python-setuptools" ,python-setuptools)
1090 ("ncurses" ,ncurses)
1092 (home-page "https://github.com/pysam-developers/pysam")
1093 (synopsis "Python bindings to the SAMtools C API")
1095 "Pysam is a Python module for reading and manipulating files in the
1096 SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1097 also includes an interface for tabix.")
1098 (license license:expat)))
1100 (define-public python2-pysam
1101 (package-with-python2 python-pysam))
1103 (define-public python2-pysqlite
1105 (name "python2-pysqlite")
1106 (version "2.6.3a") ; see below
1110 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
1111 ;; tarball was modified, but the version number was kept:
1112 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
1113 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
1115 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
1119 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1120 (build-system python-build-system)
1122 `(("sqlite" ,sqlite)))
1124 `(#:python ,python-2 ; incompatible with Python 3
1125 #:tests? #f)) ; no test target
1126 (home-page "https://pypi.python.org/pypi/pysqlite")
1127 (synopsis "SQLite bindings for Python")
1129 "Pysqlite provides SQLite bindings for Python that comply to the
1130 Database API 2.0T.")
1131 (license license:zlib)))
1134 (define-public python2-mechanize
1136 (name "python2-mechanize")
1141 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1145 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1146 (build-system python-build-system)
1148 `(("python2-setuptools" ,python2-setuptools)))
1150 `(#:python ,python-2 ; apparently incompatible with Python 3
1152 ;; test fails with message
1153 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1154 ;; (python-3.3.2) or
1155 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1157 ;; The source code is from March 2011 and probably not up-to-date
1158 ;; with respect to python unit tests.
1159 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1161 "Stateful programmatic web browsing in Python")
1163 "Mechanize implements stateful programmatic web browsing in Python,
1164 after Andy Lester’s Perl module WWW::Mechanize.")
1165 (license (non-copyleft "file://COPYING"
1166 "See COPYING in the distribution."))))
1169 (define-public python-simplejson
1171 (name "python-simplejson")
1176 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1180 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1181 (build-system python-build-system)
1182 (home-page "http://simplejson.readthedocs.org/en/latest/")
1184 "Json library for Python")
1186 "JSON (JavaScript Object Notation) is a subset of JavaScript
1187 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1190 Simplejson exposes an API familiar to users of the standard library marshal
1191 and pickle modules. It is the externally maintained version of the json
1192 library contained in Python 2.6, but maintains compatibility with Python 2.5
1193 and (currently) has significant performance advantages, even without using
1194 the optional C extension for speedups. Simplejson is also supported on
1198 (define-public python2-simplejson
1199 (package-with-python2 python-simplejson))
1202 (define-public python2-pyicu
1204 (name "python2-pyicu")
1209 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1213 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
1214 (build-system python-build-system)
1216 `(("icu4c" ,icu4c)))
1218 `(#:python ,python-2 ; Python 3 works also, but needs special care for
1219 ; linking with libpython3.3m
1220 #:tests? #f)) ; no check target
1221 (home-page "http://pyicu.osafoundation.org/")
1222 (synopsis "Python extension wrapping the ICU C++ API")
1224 "PyICU is a python extension wrapping the ICU C++ API.")
1227 (define-public python2-dogtail
1228 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1229 ;; spaces in indentation" with Python 3.
1231 (name "python2-dogtail")
1236 "https://fedorahosted.org/released/dogtail/dogtail-"
1240 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1241 (build-system python-build-system)
1242 (arguments `(#:python ,python-2
1243 #:tests? #f)) ; invalid command "test"
1244 (home-page "https://fedorahosted.org/dogtail/")
1245 (synopsis "GUI test tool and automation framework written in Python")
1247 "Dogtail is a GUI test tool and automation framework written in Python.
1248 It uses Accessibility (a11y) technologies to communicate with desktop
1249 applications. dogtail scripts are written in Python and executed like any
1250 other Python program.")
1253 (define-public python2-empy
1255 (name "python2-empy")
1259 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1263 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1264 (build-system python-build-system)
1266 `(#:python ,python-2
1267 #:phases (alist-replace
1270 (zero? (system* "./test.sh")))
1272 (home-page "http://www.alcyone.com/software/empy/")
1273 (synopsis "Templating system for Python")
1275 "EmPy is a system for embedding Python expressions and statements in
1276 template text; it takes an EmPy source file, processes it, and produces
1277 output. This is accomplished via expansions, which are special signals to the
1278 EmPy system and are set off by a special prefix (by default the at sign, @@).
1279 EmPy can expand arbitrary Python expressions and statements in this way, as
1280 well as a variety of special forms. Textual data not explicitly delimited in
1281 this way is sent unaffected to the output, allowing Python to be used in
1282 effect as a markup language. Also supported are callbacks via hooks,
1283 recording and playback via diversions, and dynamic, chainable filters. The
1284 system is highly configurable via command line options and embedded
1286 (license lgpl2.1+)))
1288 (define-public python2-element-tree
1290 (name "python2-element-tree")
1295 "http://effbot.org/media/downloads/elementtree-"
1296 version "-20050316.tar.gz"))
1299 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1300 (build-system python-build-system)
1302 `(#:python ,python-2 ; seems to be part of Python 3
1303 #:tests? #f)) ; no 'test' sub-command
1304 (synopsis "Toolkit for XML processing in Python")
1306 "ElementTree is a Python library supporting lightweight XML processing.")
1307 (home-page "http://effbot.org/zone/element-index.htm")
1308 (license (x11-style "http://docs.python.org/2/license.html"
1309 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
1310 0.9.0 THROUGH 1.2\"."))))
1312 (define-public python2-pybugz
1314 (name "python2-pybugz")
1319 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1323 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1324 (patches (map search-patch
1325 (list "pybugz-stty.patch"
1326 "pybugz-encode-error.patch")))))
1327 (build-system python-build-system)
1329 `(#:python ,python-2 ; SyntaxError with Python 3
1330 #:tests? #f)) ; no 'test' sub-command
1331 (inputs `(("element-tree" ,python2-element-tree)))
1332 (synopsis "Python and command-line interface to Bugzilla")
1334 "PyBugz is a Python library and command-line tool to query the Bugzilla
1335 bug tracking system. It is meant as an aid to speed up interaction with the
1337 (home-page "http://www.liquidx.net/pybugz/")
1340 (define-public python-enum34
1342 (name "python-enum34")
1347 (uri (string-append "https://pypi.python.org/packages/source/e/"
1348 "enum34/enum34-" version ".tar.gz"))
1351 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1352 (build-system python-build-system)
1354 `(("python-setuptools" ,python-setuptools)))
1359 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1361 (home-page "https://pypi.python.org/pypi/enum34")
1362 (synopsis "Backported Python 3.4 Enum")
1364 "Enum34 is the new Python stdlib enum module available in Python 3.4
1365 backported for previous versions of Python from 2.4 to 3.3.")
1368 (define-public python-parse-type
1370 (name "python-parse-type")
1375 (uri (string-append "https://pypi.python.org/packages/source/p/"
1376 "parse_type/parse_type-" version ".tar.gz"))
1379 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1380 (build-system python-build-system)
1382 `(("python-setuptools" ,python-setuptools)
1383 ("python-six" ,python-six)
1384 ("python-parse" ,python-parse)
1385 ("python-enum34" ,python-enum34))) ;required for python<3.4
1386 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1387 (home-page "https://github.com/jenisys/parse_type")
1388 (synopsis "Extended parse module")
1390 "Parse_type extends the python parse module.")
1393 (define-public python-parse
1395 (name "python-parse")
1400 (uri (string-append "https://pypi.python.org/packages/source/p/"
1401 "parse/parse-" version ".tar.gz"))
1404 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1405 (build-system python-build-system)
1410 (lambda _ (zero? (system* "python" "test_parse.py")))
1412 (home-page "https://github.com/r1chardj0n3s/parse")
1413 (synopsis "Parse strings")
1415 "Parse strings using a specification based on the Python format()
1420 (define-public scons
1426 (uri (string-append "mirror://sourceforge/scons/scons-"
1430 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1431 (build-system python-build-system)
1433 ;; With Python 3.x, fails to build with a syntax error.
1434 `(#:python ,python-2
1435 #:tests? #f)) ; no 'python setup.py test' command
1436 (home-page "http://scons.org/")
1437 (synopsis "Software construction tool written in Python")
1439 "SCons is a software construction tool. Think of SCons as an improved,
1440 cross-platform substitute for the classic Make utility with integrated
1441 functionality similar to autoconf/automake and compiler caches such as ccache.
1442 In short, SCons is an easier, more reliable and faster way to build
1446 (define-public python-extras
1448 (name "python-extras")
1454 "https://pypi.python.org/packages/source/e/extras/extras-"
1458 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1459 (build-system python-build-system)
1461 `(("python-setuptools" ,python-setuptools)))
1463 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1465 (home-page "https://github.com/testing-cabal/extras")
1466 (synopsis "Useful extensions to the Python standard library")
1468 "Extras is a set of extensions to the Python standard library.")
1469 (license license:expat)))
1471 (define-public python2-extras
1472 (package-with-python2 python-extras))
1474 (define-public python-mimeparse
1476 (name "python-mimeparse")
1482 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1486 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1487 (build-system python-build-system)
1489 `(("python-setuptools" ,python-setuptools)))
1491 '(#:tests? #f)) ; no setup.py test command
1493 "https://github.com/dbtsai/python-mimeparse")
1494 (synopsis "Python library for parsing MIME types")
1496 "Mimeparse provides basic functions for parsing MIME type names and
1497 matching them against a list of media-ranges.")
1498 (license license:expat)))
1500 (define-public python2-mimeparse
1501 (package-with-python2 python-mimeparse))
1503 (define-public python-nose
1505 (name "python-nose")
1511 "https://pypi.python.org/packages/source/n/nose/nose-"
1515 "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n"))))
1516 (build-system python-build-system)
1518 `(("python-setuptools" ,python-setuptools)))
1520 '(#:tests? #f)) ; FIXME: test suite fails
1521 (home-page "http://readthedocs.org/docs/nose/")
1522 (synopsis "Python testing library")
1524 "Nose extends the unittest library to make testing easier.")
1525 (license lgpl2.0+)))
1527 (define-public python2-nose
1528 (package-with-python2 python-nose))
1530 (define-public python-unittest2
1532 (name "python-unittest2")
1538 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1542 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1543 (build-system python-build-system)
1545 `(("python-setuptools" ,python-setuptools)))
1546 (home-page "http://pypi.python.org/pypi/unittest2")
1547 (synopsis "Python unit testing library")
1549 "Unittest2 is a replacement for the unittest module in the Python
1553 (define-public python2-unittest2
1554 (package (inherit python-unittest2)
1555 (name "python2-unittest2")
1561 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1565 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1567 `(("python2-setuptools" ,python2-setuptools)))
1569 `(#:python ,python-2
1570 #:tests? #f)))) ; no setup.py test command
1572 (define-public python-py
1580 "https://pypi.python.org/packages/source/p/py/py-"
1584 "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs"))))
1585 (build-system python-build-system)
1587 `(("python-setuptools" ,python-setuptools)))
1588 (home-page "http://pylib.readthedocs.org/")
1589 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1591 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1592 code introspection, and logging.")
1593 (license license:expat)))
1595 (define-public python2-py
1596 (package-with-python2 python-py))
1598 (define-public python-pytest
1600 (name "python-pytest")
1606 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1610 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1611 (modules '((guix build utils)))
1613 ;; One of the tests involves the /usr directory, so it fails.
1614 '(substitute* "testing/test_argcomplete.py"
1615 (("def test_remove_dir_prefix\\(self\\):")
1616 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1617 (build-system python-build-system)
1619 `(("python-setuptools" ,python-setuptools)
1620 ("python-py" ,python-py)
1621 ("python-nose" ,python-nose)
1622 ("python-mock" ,python-mock)))
1623 (home-page "http://pytest.org")
1624 (synopsis "Python testing library")
1626 "Pytest is a testing tool that provides auto-discovery of test modules
1627 and functions, detailed info on failing assert statements, modular fixtures,
1628 and many external plugins.")
1629 (license license:expat)))
1631 (define-public python2-pytest
1632 (package-with-python2 python-pytest))
1634 (define-public python-pytest-runner
1636 (name "python-pytest-runner")
1641 (uri (string-append "https://pypi.python.org/packages/source/p/"
1642 "pytest-runner/pytest-runner-"
1646 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1647 (build-system python-build-system)
1650 (modify-phases %standard-phases
1651 ;; The fancy way of setting the version with setuptools_scm does not
1652 ;; seem to work here.
1653 (add-after 'unpack 'set-version
1655 (substitute* "docs/conf.py"
1656 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1657 (string-append "version = \"" ,version "\"")))
1660 `(("python-pytest" ,python-pytest)
1661 ("python-setuptools" ,python-setuptools)
1662 ("python-setuptools-scm" ,python-setuptools-scm)))
1663 (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
1664 (synopsis "Invoke py.test as a distutils command")
1666 "This package provides a @command{pytest-runner} command that
1667 @file{setup.py} files can use to run tests.")
1668 (license license:expat)))
1670 (define-public python2-pytest-runner
1671 (package-with-python2 python-pytest-runner))
1673 (define-public python-scripttest
1675 (name "python-scripttest")
1681 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1685 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1686 (build-system python-build-system)
1688 `(("python-setuptools" ,python-setuptools)
1689 ("python-pytest" ,python-pytest)))
1690 (home-page "http://pythonpaste.org/scripttest/")
1691 (synopsis "Python library to test command-line scripts")
1692 (description "Scripttest is a Python helper library for testing
1693 interactive command-line applications. With it you can run a script in a
1694 subprocess and see the output as well as any file modifications.")
1695 (license license:expat)))
1697 (define-public python2-scripttest
1698 (package-with-python2 python-scripttest))
1700 (define-public python-testtools
1702 (name "python-testtools")
1708 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1712 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1713 (build-system python-build-system)
1715 `(("python-mimeparse" ,python-mimeparse)))
1717 `(("python-setuptools" ,python-setuptools)
1718 ("python-extras" ,python-extras)))
1719 (home-page "https://github.com/testing-cabal/testtools")
1721 "Extensions to the Python standard library unit testing framework")
1723 "Testtools extends the Python standard library unit testing framework to
1724 provide matchers, more debugging information, and cross-Python
1728 (define-public python2-testtools
1729 (package-with-python2 python-testtools))
1731 (define-public python-testscenarios
1733 (name "python-testscenarios")
1739 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1743 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1744 (build-system python-build-system)
1746 `(("python-setuptools" ,python-setuptools)
1747 ("python-testtools" ,python-testtools)
1748 ("python-mimeparse" ,python-mimeparse)))
1749 (home-page "https://launchpad.net/testscenarios")
1750 (synopsis "Pyunit extension for dependency injection")
1752 "Testscenarios provides clean dependency injection for Python unittest
1754 (license (list bsd-3 asl2.0)))) ; at the user's option
1756 (define-public python2-testscenarios
1757 (package-with-python2 python-testscenarios))
1759 (define-public python-testresources
1761 (name "python-testresources")
1767 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1771 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1772 (build-system python-build-system)
1774 `(("python-setuptools" ,python-setuptools)))
1775 (home-page "https://launchpad.net/testresources")
1777 "Pyunit extension for managing test resources")
1779 "Testresources is an extension to Python's unittest to allow declarative
1780 use of resources by test cases.")
1781 (license (list bsd-3 asl2.0)))) ; at the user's option
1783 (define-public python2-testresources
1784 (package-with-python2 python-testresources))
1786 (define-public python-subunit
1788 (name "python-subunit")
1794 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1798 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1799 (build-system python-build-system)
1801 `(("python-setuptools" ,python-setuptools)
1802 ("python-testtools" ,python-testtools)
1803 ("python-mimeparse" ,python-mimeparse)
1804 ("python-testscenarios" ,python-testscenarios)))
1805 (home-page "http://launchpad.net/subunit")
1806 (synopsis "Python implementation of the subunit protocol")
1808 "Python-subunit is a Python implementation of the subunit test streaming
1810 (license (list bsd-3 asl2.0)))) ; at the user's option
1812 (define-public python2-subunit
1813 (package-with-python2 python-subunit))
1815 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1816 ;; which needs a recent version of python-fixtures. To fix this circular
1817 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1818 ;; bootstrap the whole thing:
1819 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1820 ;; - python-pbr-0.11 is used to build python-fixtures
1821 ;; - python-fixtures is used to build python-pbr
1822 (define-public python-fixtures-0.3.16
1824 (name "python-fixtures")
1830 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1834 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1835 (build-system python-build-system)
1837 `(("python-setuptools" ,python-setuptools)))
1839 '(#:tests? #f)) ; no setup.py test command
1840 (home-page "https://launchpad.net/python-fixtures")
1841 (synopsis "Python test fixture library")
1843 "Fixtures provides a way to create reusable state, useful when writing
1845 (license (list bsd-3 asl2.0)))) ; at user's option
1847 (define-public python2-fixtures-0.3.16
1848 (package-with-python2 python-fixtures-0.3.16))
1850 (define-public python-pbr-0.11
1858 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1862 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1863 (build-system python-build-system)
1865 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1867 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1868 ("python-pip" ,python-pip)
1869 ("python-setuptools" ,python-setuptools)))
1870 (home-page "https://launchpad.net/pbr")
1871 (synopsis "Change the default behavior of Python’s setuptools")
1873 "Python Build Reasonableness (PBR) is a library that injects some useful
1874 and sensible default behaviors into your setuptools run.")
1877 (define-public python2-pbr-0.11
1878 (package-with-python2 python-pbr-0.11))
1880 (define-public python-fixtures
1882 (name "python-fixtures")
1888 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1892 "1khpywdh91ijryhxjxiyyi5rmbimhl8hwbbf8lazhgzq6yxz6g5n"))))
1893 (build-system python-build-system)
1895 `(("python-six" ,python-six)
1896 ("python-pbr-0.11" ,python-pbr-0.11)))
1898 `(("python-pip" ,python-pip)
1899 ("python-setuptools" ,python-setuptools)
1901 ("python-testtools" ,python-testtools)))
1903 '(#:tests? #f)) ; no setup.py test command
1904 (home-page "https://launchpad.net/python-fixtures")
1905 (synopsis "Python test fixture library")
1907 "Fixtures provides a way to create reusable state, useful when writing
1909 (license (list bsd-3 asl2.0)))) ; at user's option
1911 (define-public python2-fixtures
1912 (package-with-python2 python-fixtures))
1914 (define-public python-testrepository
1916 (name "python-testrepository")
1922 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1926 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1927 (build-system python-build-system)
1929 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1930 ("python-testtools" ,python-testtools)))
1932 `(("python-setuptools" ,python-setuptools)
1933 ("python-subunit" ,python-subunit)
1934 ("python-mimeparse" ,python-mimeparse)))
1935 (home-page "https://launchpad.net/testrepository")
1936 (synopsis "Database for Python test results")
1937 (description "Testrepository provides a database of test results which can
1938 be used as part of a developer's workflow to check things such as what tests
1939 have failed since the last commit or what tests are currently failing.")
1940 (license (list bsd-3 asl2.0)))) ; at user's option
1942 (define-public python2-testrepository
1943 (package-with-python2 python-testrepository))
1945 (define-public python-coverage
1947 (name "python-coverage")
1953 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1957 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1958 (build-system python-build-system)
1960 `(("python-setuptools" ,python-setuptools)))
1961 (home-page "http://nedbatchelder.com/code/coverage")
1962 (synopsis "Code coverage measurement for Python")
1964 "Coverage measures code coverage, typically during test execution. It
1965 uses the code analysis tools and tracing hooks provided in the Python standard
1966 library to determine which lines are executable, and which have been
1970 (define-public python2-coverage
1971 (package-with-python2 python-coverage))
1973 (define-public python-discover
1975 (name "python-discover")
1981 "https://pypi.python.org/packages/source/d/discover/discover-"
1985 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1986 (build-system python-build-system)
1988 `(("python-setuptools" ,python-setuptools)))
1989 (home-page "http://pypi.python.org/pypi/discover/")
1991 "Python test discovery for unittest")
1993 "Discover provides test discovery for unittest, a feature that has been
1994 backported from Python 2.7 for Python 2.4+.")
1997 (define-public python2-discover
1998 (package-with-python2 python-discover))
2000 (define-public behave
2006 (uri (string-append "https://pypi.python.org/packages/source/b/"
2007 name "/" name "-" version ".tar.gz"))
2010 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2011 (build-system python-build-system)
2013 `(("python-setuptools" ,python-setuptools)
2014 ("python-six" ,python-six)
2015 ("python-enum43" ,python-enum34)
2016 ("python-parse" ,python-parse)
2017 ("python-parse-type" ,python-parse-type)))
2018 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2020 (home-page "http://github.com/behave/behave")
2021 (synopsis "Python behavior-driven development")
2023 "Behave is a tool for behavior-driven development in python.
2024 Behavior-driven development (or BDD) is an agile software development
2025 technique that encourages collaboration between developers, QA and
2026 non-technical or business participants in a software project. Behave uses
2027 tests written in a natural language style, backed up by Python code.")
2030 (define-public python-exif-read
2032 (name "python-exif-read")
2038 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
2042 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
2043 (build-system python-build-system)
2045 `(("python-setuptools" ,python-setuptools)))
2046 (arguments `(#:tests? #f)) ; no tests
2047 (home-page "https://github.com/ianare/exif-py")
2048 (synopsis "Python library to extract EXIF data from image files")
2050 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2054 (define-public python2-exif-read
2055 (package-with-python2 python-exif-read))
2057 (define-public python-pyld
2059 (name "python-pyld")
2065 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
2069 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
2070 (build-system python-build-system)
2072 `(("python-setuptools" ,python-setuptools)))
2073 (arguments `(#:tests? #f)) ; no tests
2074 (home-page "http://github.com/digitalbazaar/pyld")
2075 (synopsis "Python implementation of the JSON-LD specification")
2077 "PyLD is an implementation of the JSON-LD specification.")
2080 (define-public python2-pyld
2081 (package-with-python2 python-pyld))
2083 (define-public python-certifi
2085 (name "python-certifi")
2086 (version "14.05.14")
2091 "https://pypi.python.org/packages/source/c/certifi/certifi-"
2095 "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy"))))
2096 (build-system python-build-system)
2098 `(("python-setuptools" ,python-setuptools)))
2099 (arguments `(#:tests? #f)) ; no tests
2100 (home-page "http://python-requests.org/")
2101 (synopsis "Python CA certificate bundle")
2103 "Certifi is a Python library that contains a CA certificate bundle, which
2104 is used by the Requests library to verify HTTPS requests.")
2107 (define-public python2-certifi
2108 (package-with-python2 python-certifi))
2110 (define-public python-click
2112 (name "python-click")
2118 "https://pypi.python.org/packages/source/c/click/click-"
2121 (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
2122 (build-system python-build-system)
2124 `(("python-setuptools" ,python-setuptools)))
2125 (home-page "http://click.pocoo.org")
2126 (synopsis "Command line library for Python")
2128 "Click is a Python package for creating command line interfaces in a
2129 composable way with as little code as necessary. Its name stands for
2130 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2131 with sensible defaults out of the box.")
2134 (define-public python2-click
2135 (package-with-python2 python-click))
2137 (define-public python-requests
2139 (name "python-requests")
2145 "https://pypi.python.org/packages/source/r/requests/requests-"
2149 "0yrvj8hfnabrdxds59w6d6887sn5j0jlgpmcq04lk4k0kdc07w5j"))))
2150 (build-system python-build-system)
2152 `(("python-setuptools" ,python-setuptools)
2153 ("python-certifi" ,python-certifi)))
2154 (arguments `(#:tests? #f)) ; no tests
2155 (home-page "http://python-requests.org/")
2156 (synopsis "Python HTTP library")
2158 "Requests is a Python HTTP client library. It aims to be easier to use
2159 than Python’s urllib2 library.")
2162 (define-public python2-requests
2163 (package-with-python2 python-requests))
2165 (define-public python-jsonschema
2167 (name "python-jsonschema")
2173 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2177 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
2178 (build-system python-build-system)
2180 `(("python-setuptools" ,python-setuptools)))
2181 (home-page "http://github.com/Julian/jsonschema")
2182 (synopsis "Implementation of JSON Schema for Python")
2184 "Jsonschema is an implementation of JSON Schema for Python.")
2185 (license license:expat)))
2187 (define-public python2-jsonschema
2188 (package-with-python2 python-jsonschema))
2190 (define-public python-unidecode
2192 (name "python-unidecode")
2198 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
2202 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
2203 (build-system python-build-system)
2205 `(("python-setuptools" ,python-setuptools)))
2206 (home-page "https://pypi.python.org/pypi/Unidecode")
2207 (synopsis "ASCII transliterations of Unicode text")
2209 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2210 useful when integrating with legacy code that doesn't support Unicode, or for
2211 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2212 machine identifiers from human-readable Unicode strings that should still be
2213 somewhat intelligeble.")
2216 (define-public python2-unidecode
2217 (package-with-python2 python-unidecode))
2219 (define-public python-pyjwt
2221 (name "python-pyjwt")
2226 (uri (pypi-uri "PyJWT" version))
2229 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2230 (build-system python-build-system)
2232 `(("python-setuptools" ,python-setuptools)
2233 ("python-pytest-runner" ,python-pytest-runner)))
2235 '(#:tests? #f)) ; test suite doesn't work
2236 (home-page "http://github.com/progrium/pyjwt")
2237 (synopsis "JSON Web Token implementation in Python")
2239 "PyJWT is a JSON Web Token implementation written in Python.")
2240 (license license:expat)))
2242 (define-public python2-pyjwt
2243 (package-with-python2 python-pyjwt))
2245 (define-public python-oauthlib
2247 (name "python-oauthlib")
2251 (uri (pypi-uri "oauthlib" version))
2254 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2255 (build-system python-build-system)
2257 `(("python-setuptools" ,python-setuptools)
2258 ("python-coverage", python-coverage)
2259 ("python-nose" ,python-nose)
2260 ("python-mock" ,python-mock)))
2262 `(("python-blinker" ,python-blinker)
2263 ("python-cryptography" ,python-cryptography)
2264 ("python-pyjwt" ,python-pyjwt)))
2265 (home-page "https://github.com/idan/oauthlib")
2266 (synopsis "OAuth implementation for Python")
2268 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2269 OAuth request-signing logic.")
2272 (define-public python2-oauthlib
2273 (let ((base (package-with-python2 python-oauthlib)))
2277 `(("python2-unittest2" ,python2-unittest2)
2278 ("python2-cryptography" ,python2-cryptography)
2279 ,@(alist-delete "python-cryptography"
2280 (package-inputs base)))))))
2282 (define-public python-itsdangerous
2284 (name "python-itsdangerous")
2290 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2294 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2295 (build-system python-build-system)
2297 `(("python-setuptools" ,python-setuptools)))
2298 (home-page "http://github.com/mitsuhiko/itsdangerous")
2299 (synopsis "Python library for passing data to/from untrusted environments")
2301 "Itsdangerous provides various helpers to pass trusted data to untrusted
2302 environments and back.")
2305 (define-public python2-itsdangerous
2306 (package-with-python2 python-itsdangerous))
2308 (define-public python-pyyaml
2310 (name "python-pyyaml")
2316 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2320 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2321 (build-system python-build-system)
2323 `(("libyaml" ,libyaml)))
2325 `(("python-setuptools" ,python-setuptools)))
2326 (home-page "http://pyyaml.org/wiki/PyYAML")
2327 (synopsis "YAML parser and emitter for Python")
2329 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2330 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2331 API, and sensible error messages. PyYAML supports standard YAML tags and
2332 provides Python-specific tags that allow to represent an arbitrary Python
2334 (license license:expat)))
2336 (define-public python2-pyyaml
2337 (package-with-python2 python-pyyaml))
2339 (define-public python-virtualenv
2341 (name "python-virtualenv")
2347 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
2351 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
2352 (build-system python-build-system)
2354 `(("python-setuptools" ,python-setuptools)
2355 ("python-mock" ,python-mock)
2356 ("python-nose" ,python-nose)))
2357 (home-page "https://virtualenv.pypa.io/")
2358 (synopsis "Virtual Python environment builder")
2360 "Virtualenv is a tool to create isolated Python environments.")
2361 (license license:expat)))
2363 (define-public python2-virtualenv
2364 (package-with-python2 python-virtualenv))
2366 (define-public python-markupsafe
2368 (name "python-markupsafe")
2374 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2378 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2379 (build-system python-build-system)
2381 `(("python-setuptools" ,python-setuptools)))
2382 (home-page "http://github.com/mitsuhiko/markupsafe")
2383 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2385 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2389 (define-public python2-markupsafe
2390 (package-with-python2 python-markupsafe))
2392 (define-public python-jinja2
2394 (name "python-jinja2")
2400 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
2404 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
2405 (build-system python-build-system)
2407 `(("python-setuptools" ,python-setuptools)
2408 ("python-markupsafe" ,python-markupsafe)))
2409 (home-page "http://jinja.pocoo.org/")
2410 (synopsis "Python template engine")
2412 "Jinja2 is a small but fast and easy to use stand-alone template engine
2413 written in pure Python.")
2416 (define-public python2-jinja2
2417 (package-with-python2 python-jinja2))
2419 (define-public python-pystache
2421 (name "python-pystache")
2425 (uri (pypi-uri "pystache" version))
2428 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2429 (build-system python-build-system)
2431 `(("python-setuptools" ,python-setuptools)))
2432 (home-page "http://defunkt.io/pystache/")
2433 (synopsis "Python logic-less template engine")
2435 "Pystache is a Python implementation of the framework agnostic,
2436 logic-free templating system Mustache.")
2437 (license license:expat)))
2439 (define-public python2-pystache
2440 (package-with-python2 python-pystache))
2442 (define-public python-joblib
2444 (name "python-joblib")
2448 (uri (string-append "https://pypi.python.org/packages/source/"
2449 "j/joblib/joblib-" version ".tar.gz"))
2452 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2453 (build-system python-build-system)
2455 `(("python-setuptools" ,python-setuptools)
2456 ("python-nose" ,python-nose)))
2457 (home-page "http://pythonhosted.org/joblib/")
2458 (synopsis "Using Python functions as pipeline jobs")
2460 "Joblib is a set of tools to provide lightweight pipelining in Python.
2461 In particular, joblib offers: transparent disk-caching of the output values
2462 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2463 logging and tracing of the execution.")
2466 (define-public python2-joblib
2467 (package-with-python2 python-joblib))
2469 (define-public python-docutils
2471 (name "python-docutils")
2477 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2481 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2482 (build-system python-build-system)
2484 `(("python-setuptools" ,python-setuptools)))
2486 '(#:tests? #f)) ; no setup.py test command
2487 (home-page "http://docutils.sourceforge.net/")
2488 (synopsis "Python Documentation Utilities")
2490 "Docutils is a modular system for processing documentation into useful
2491 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2493 ;; Most of the source code is public domain, but some source files are
2494 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2495 (license (list public-domain psfl bsd-2 gpl3+))))
2497 (define-public python2-docutils
2498 (package-with-python2 python-docutils))
2500 (define-public python-pygments
2502 (name "python-pygments")
2508 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
2512 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
2513 (build-system python-build-system)
2515 `(("python-setuptools" ,python-setuptools)))
2516 (home-page "http://pygments.org/")
2517 (synopsis "Syntax highlighting")
2519 "Pygments is a syntax highlighting package written in Python.")
2522 (define-public python2-pygments
2523 (package-with-python2 python-pygments))
2525 (define-public python-sphinx
2527 (name "python-sphinx")
2533 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2537 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2538 (build-system python-build-system)
2540 `(("python-setuptools" ,python-setuptools)
2541 ("python-jinja2" ,python-jinja2)
2542 ("python-docutils" ,python-docutils)
2543 ("python-pygments" ,python-pygments)))
2544 (home-page "http://sphinx-doc.org/")
2545 (synopsis "Python documentation generator")
2546 (description "Sphinx is a tool that makes it easy to create documentation
2547 for Python projects or other documents consisting of multiple reStructuredText
2551 (define-public python2-sphinx
2552 (package-with-python2 python-sphinx))
2554 (define-public python-sphinx-rtd-theme
2556 (name "python-sphinx-rtd-theme")
2561 (uri (string-append "https://pypi.python.org/packages/source/s/"
2562 "sphinx_rtd_theme/sphinx_rtd_theme-"
2566 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2567 (build-system python-build-system)
2569 `(;; With standard flags, the install phase attempts to create a zip'd
2570 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2572 #:configure-flags '("--single-version-externally-managed"
2573 "--record=sphinx-rtd-theme.txt")))
2575 `(("python-setuptools" ,python-setuptools)))
2577 `(("python-docutils" ,python-docutils)
2578 ("python-sphinx" ,python-sphinx)))
2579 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2580 (synopsis "ReadTheDocs.org theme for Sphinx")
2581 (description "A theme for Sphinx used by ReadTheDocs.org.")
2582 (license license:expat)))
2584 (define-public python2-sphinx-rtd-theme
2585 (package-with-python2 python-sphinx-rtd-theme))
2587 (define-public python-feedgenerator
2589 (name "python-feedgenerator")
2590 (version "20150710.97185b7")
2592 ;; Using the git checkout for now because license file not added till
2593 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2597 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2598 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2601 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2603 `(;; With standard flags, the install phase attempts to create a zip'd
2604 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2606 #:configure-flags '("--single-version-externally-managed"
2607 "--record=feedgenerator.txt")))
2608 (build-system python-build-system)
2610 `(("python-setuptools" ,python-setuptools)
2611 ("python-pytz" ,python-pytz)
2612 ("python-six" ,python-six)))
2614 "https://github.com/dmdm/feedgenerator-py3k.git")
2616 "Standalone version of Django's Atom/RSS feed generator")
2618 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2619 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2622 (define-public python2-feedgenerator
2623 (package-with-python2 python-feedgenerator))
2625 (define-public python-blinker
2627 (name "python-blinker")
2633 "https://pypi.python.org/packages/source/b/blinker/blinker-"
2637 "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8"))))
2638 (build-system python-build-system)
2640 `(("python-setuptools" ,python-setuptools)))
2641 ;; No "test" command supplied to setuptools, so unless there's another way
2642 ;; to run tests, we're skipping them!
2643 (arguments '(#:tests? #f))
2644 (home-page "http://pythonhosted.org/blinker/")
2645 (synopsis "Fast, simple object-to-object and broadcast signaling")
2647 "Blinker provides a fast dispatching system that allows any number of
2648 interested parties to subscribe to events, or \"signals\".")
2649 (license license:expat)))
2651 (define-public python2-blinker
2652 (package-with-python2 python-blinker))
2654 (define-public pelican
2662 "https://pypi.python.org/packages/source/p/pelican/pelican-"
2666 "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
2667 (build-system python-build-system)
2669 `(("python-setuptools" ,python-setuptools)))
2671 `(("python-feedgenerator" ,python-feedgenerator)
2672 ("python-jinja2" ,python-jinja2)
2673 ("python-pygments" ,python-pygments)
2674 ("python-docutils" ,python-docutils)
2675 ("python-pytz" ,python-pytz)
2676 ("python-blinker" ,python-blinker)
2677 ("python-unidecode" ,python-unidecode)
2678 ("python-six" ,python-six)
2679 ("python-dateutil-2" ,python-dateutil-2)))
2680 (home-page "http://getpelican.com/")
2682 `(;; XXX Requires a lot more packages to do unit tests :P
2684 #:phases (modify-phases %standard-phases
2686 'install 'adjust-requires
2687 ;; Since feedgenerator is installed from git, it doesn't
2688 ;; conform to the version requirements.
2690 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2691 ;; version requirement so setuptools doesn't get confused.
2693 (substitute* "setup.py"
2694 (("['\"]feedgenerator.*?['\"]")
2695 "'feedgenerator'")))))))
2696 (synopsis "Python-based static site publishing system")
2698 "Pelican is a tool to generate a static blog from reStructuredText,
2699 Markdown input files, and more. Pelican uses Jinja2 for templating
2700 and is very extensible.")
2703 (define-public python-scikit-learn
2705 (name "python-scikit-learn")
2711 "https://github.com/scikit-learn/scikit-learn/archive/"
2715 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2716 (build-system python-build-system)
2721 ;; some tests require access to "$HOME"
2722 (lambda _ (setenv "HOME" "/tmp"))
2723 ;; Tests can only be run after the library has been installed and not
2724 ;; within the source directory.
2728 (with-directory-excursion "/tmp"
2729 ;; With Python 3 one test of 3334 fails
2730 ;; (sklearn.tests.test_common.test_transformers); see
2731 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2732 (system* "nosetests" "-v" "sklearn")))
2733 (alist-delete 'check %standard-phases)))))
2735 `(("openblas" ,openblas)
2736 ("python-nose" ,python-nose)))
2738 `(("python-numpy" ,python-numpy)
2739 ("python-scipy" ,python-scipy)))
2740 (home-page "http://scikit-learn.org/")
2741 (synopsis "Machine Learning in Python")
2743 "Scikit-learn provides simple and efficient tools for data
2744 mining and data analysis.")
2747 (define-public python2-scikit-learn
2748 (let ((scikit (package-with-python2 python-scikit-learn)))
2749 (package (inherit scikit)
2751 `(("python2-numpy" ,python2-numpy)
2752 ("python2-scipy" ,python2-scipy)
2756 "python-scipy" (package-propagated-inputs scikit))))))))
2758 (define-public python-scikit-image
2760 (name "python-scikit-image")
2766 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2769 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2770 (build-system python-build-system)
2772 `(("python-matplotlib" ,python-matplotlib)
2773 ("python-networkx" ,python-networkx)
2774 ("python-numpy" ,python-numpy)
2775 ("python-scipy" ,python-scipy)
2776 ("python-six" ,python-six)
2777 ("python-pillow" ,python-pillow)))
2779 `(("python-cython" ,python-cython)
2780 ("python-setuptools" ,python-setuptools)))
2781 (home-page "http://scikit-image.org/")
2782 (synopsis "Image processing in Python")
2784 "Scikit-image is a collection of algorithms for image processing.")
2787 (define-public python2-scikit-image
2788 (let ((scikit-image (package-with-python2 python-scikit-image)))
2789 (package (inherit scikit-image)
2791 `(("python2-mock" ,python2-mock)
2792 ,@(package-native-inputs scikit-image)))
2794 `(("python2-pytz" ,python2-pytz)
2795 ("python2-matplotlib" ,python2-matplotlib)
2796 ("python2-numpy" ,python2-numpy)
2797 ("python2-scipy" ,python2-scipy)
2798 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2799 '("python-matplotlib" "python-numpy" "python-scipy")))))))
2801 (define-public python-redis
2803 (name "python-redis")
2809 "https://pypi.python.org/packages/source/r/redis/redis-"
2812 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2813 (build-system python-build-system)
2814 ;; Tests require a running Redis server
2815 (arguments '(#:tests? #f))
2817 `(("python-setuptools" ,python-setuptools)
2818 ("python-pytest" ,python-pytest)))
2819 (home-page "https://github.com/andymccurdy/redis-py")
2820 (synopsis "Redis Python client")
2822 "This package provides a Python interface to the Redis key-value store.")
2823 (license license:expat)))
2825 (define-public python2-redis
2826 (package-with-python2 python-redis))
2828 (define-public python-rq
2836 "https://pypi.python.org/packages/source/r/rq/rq-"
2839 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2840 (build-system python-build-system)
2842 `(("python-click" ,python-click)
2843 ("python-redis" ,python-redis)))
2845 `(("python-setuptools" ,python-setuptools)))
2846 (home-page "http://python-rq.org/")
2847 (synopsis "Simple job queues for Python")
2849 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2850 processing them in the background with workers. It is backed by Redis and it
2851 is designed to have a low barrier to entry.")
2854 (define-public python2-rq
2855 (package-with-python2 python-rq))
2857 (define-public python-cython
2859 (name "python-cython")
2864 (uri (string-append "http://cython.org/release/Cython-"
2868 "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3"))))
2869 (build-system python-build-system)
2870 ;; we need the full python package and not just the python-wrapper
2871 ;; because we need libpython3.3m.so
2873 `(("python" ,python)))
2878 ;; some tests require access to "$HOME/.cython"
2879 (lambda* _ (setenv "HOME" "/tmp"))
2882 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2883 %standard-phases))))
2884 (home-page "http://cython.org/")
2885 (synopsis "C extensions for Python")
2886 (description "Cython is an optimising static compiler for both the Python
2887 programming language and the extended Cython programming language. It makes
2888 writing C extensions for Python as easy as Python itself.")
2891 (define-public python2-cython
2892 (package (inherit (package-with-python2 python-cython))
2893 (name "python2-cython")
2895 `(("python-2" ,python-2))))) ; this is not automatically changed
2897 ;; This version of numpy is missing the documentation and is only used to
2898 ;; build matplotlib which is required to build numpy's documentation.
2899 (define python-numpy-bootstrap
2901 (name "python-numpy-bootstrap")
2906 (uri (string-append "mirror://sourceforge/numpy"
2907 "/numpy-" version ".tar.gz"))
2910 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2911 (build-system python-build-system)
2913 `(("python-nose" ,python-nose)
2914 ("openblas" ,openblas)
2915 ("lapack" ,lapack)))
2917 `(("gfortran" ,gfortran)))
2921 'build 'set-environment-variables
2922 (lambda* (#:key inputs #:allow-other-keys)
2923 (call-with-output-file "site.cfg"
2927 libraries = openblas
2928 library_dirs = ~a/lib
2929 include_dirs = ~a/include
2932 lapack_libs = lapack
2933 library_dirs = ~a/lib
2934 include_dirs = ~a/include
2936 (assoc-ref inputs "openblas")
2937 (assoc-ref inputs "openblas")
2938 (assoc-ref inputs "lapack")
2939 (assoc-ref inputs "lapack"))))
2940 ;; Use "gcc" executable, not "cc".
2941 (substitute* "numpy/distutils/system_info.py"
2942 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2943 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2945 ;; Tests can only be run after the library has been installed and not
2946 ;; within the source directory.
2950 (with-directory-excursion "/tmp"
2951 (zero? (system* "python" "-c"
2952 "import numpy; numpy.test(verbose=2)"))))
2955 %standard-phases)))))
2956 (home-page "http://www.numpy.org/")
2957 (synopsis "Fundamental package for scientific computing with Python")
2958 (description "NumPy is the fundamental package for scientific computing
2959 with Python. It contains among other things: a powerful N-dimensional array
2960 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2961 and Fortran code, useful linear algebra, Fourier transform, and random number
2965 (define python2-numpy-bootstrap
2966 (package-with-python2 python-numpy-bootstrap))
2968 (define-public python2-fastlmm
2970 (name "python2-fastlmm")
2976 "https://pypi.python.org/packages/source/f/fastlmm"
2977 "/fastlmm-" version ".zip"))
2980 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
2981 (build-system python-build-system)
2983 `(#:python ,python-2)) ; only Python 2.7 is supported
2985 `(("python2-numpy" ,python2-numpy)
2986 ("python2-scipy" ,python2-scipy)
2987 ("python2-matplotlib" ,python2-matplotlib)
2988 ("python2-pandas" ,python2-pandas)
2989 ("python2-scikit-learn" ,python2-scikit-learn)
2990 ("python2-cython" ,python2-cython)
2991 ("python2-pysnptools" ,python2-pysnptools)))
2994 ("python2-mock" ,python2-mock)
2995 ("python2-setuptools" ,python2-setuptools)))
2996 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2997 (synopsis "Perform genome-wide association studies on large data sets")
2999 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3000 Models, is a program for performing both single-SNP and SNP-set genome-wide
3001 association studies (GWAS) on extremely large data sets.")
3004 (define-public python-numpy
3005 (package (inherit python-numpy-bootstrap)
3006 (name "python-numpy")
3007 (outputs '("out" "doc"))
3010 ("python-setuptools" ,python-setuptools)
3011 ("python-matplotlib" ,python-matplotlib)
3012 ("python-sphinx" ,python-sphinx)
3013 ("python-pyparsing" ,python-pyparsing)
3014 ("python-numpydoc" ,python-numpydoc)
3015 ,@(package-inputs python-numpy-bootstrap)))
3017 `(("pkg-config" ,pkg-config)
3018 ("texlive" ,texlive)
3019 ("texinfo" ,texinfo)
3021 ,@(package-native-inputs python-numpy-bootstrap)))
3023 `(,@(substitute-keyword-arguments
3024 (package-arguments python-numpy-bootstrap)
3027 'install 'install-doc
3028 (lambda* (#:key outputs #:allow-other-keys)
3029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3031 data "/doc/" ,name "-"
3032 ,(package-version python-numpy-bootstrap)))
3033 (info (string-append data "/info"))
3034 (html (string-append doc "/html"))
3035 (pyver ,(string-append "PYVER=")))
3036 (with-directory-excursion "doc"
3038 (system* "make" "html" pyver)
3039 (system* "make" "latex" "PAPER=a4" pyver)
3040 (system* "make" "-C" "build/latex"
3041 "all-pdf" "PAPER=a4" pyver)
3042 ;; FIXME: Generation of the info file fails.
3043 ;; (system* "make" "info" pyver)
3045 ;; (copy-file "build/texinfo/numpy.info"
3046 ;; (string-append info "/numpy.info"))
3047 (for-each (lambda (file)
3048 (copy-file (string-append "build/latex" file)
3049 (string-append doc file)))
3050 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3051 (with-directory-excursion "build/html"
3052 (for-each (lambda (file)
3053 (let* ((dir (dirname file))
3054 (tgt-dir (string-append html "/" dir)))
3055 (unless (equal? "." dir)
3057 (install-file file html)))
3058 (find-files "." ".*"))))))
3061 (define-public python2-numpy
3062 (let ((numpy (package-with-python2 python-numpy)))
3063 (package (inherit numpy)
3064 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
3066 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3067 ,@(alist-delete "python-matplotlib"
3068 (package-inputs numpy)))))))
3070 (define-public python-pyparsing
3072 (name "python-pyparsing")
3077 (uri (string-append "mirror://sourceforge/pyparsing"
3078 "/pyparsing-" version ".tar.gz"))
3081 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3082 (build-system python-build-system)
3083 (outputs '("out" "doc"))
3085 `(#:tests? #f ; no test target
3086 #:modules ((guix build python-build-system)
3090 'install 'install-doc
3091 (lambda* (#:key outputs #:allow-other-keys)
3092 (let* ((doc (string-append (assoc-ref outputs "doc")
3093 "/share/doc/" ,name "-" ,version))
3094 (html-doc (string-append doc "/html"))
3095 (examples (string-append doc "/examples")))
3101 (install-file file tgt))
3102 (find-files dir ".*")))
3103 (list "docs" "htmldoc" "examples")
3104 (list doc html-doc examples))))
3106 (home-page "http://pyparsing.wikispaces.com")
3107 (synopsis "Python parsing class library")
3109 "The pyparsing module is an alternative approach to creating and
3110 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3111 of regular expressions. The pyparsing module provides a library of classes
3112 that client code uses to construct the grammar directly in Python code.")
3113 (license license:expat)))
3115 (define-public python2-pyparsing
3116 (package-with-python2 python-pyparsing))
3118 (define-public python-numpydoc
3120 (name "python-numpydoc")
3126 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3130 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3131 (modules '((guix build utils)))
3134 ;; Drop a test requiring matplotlib, which we cannot add as an
3135 ;; input since it would create a circular dependency: Extend the
3136 ;; test for Python 3, where it is already dropped, to Python 2.
3137 (substitute* "numpydoc/tests/test_plot_directive.py"
3139 (build-system python-build-system)
3141 `(("python-setuptools" ,python-setuptools)
3142 ("python-docutils" ,python-docutils)
3143 ("python-sphinx" ,python-sphinx)
3144 ("python-nose" ,python-nose)))
3145 (home-page "https://pypi.python.org/pypi/numpydoc")
3147 "Numpy's Sphinx extensions")
3149 "Sphinx extension to support docstrings in Numpy format.")
3152 (define-public python2-numpydoc
3153 (package-with-python2 python-numpydoc))
3155 (define-public python-numexpr
3157 (name "python-numexpr")
3162 (uri (string-append "https://pypi.python.org/packages/source/"
3163 "n/numexpr/numexpr-" version ".tar.gz"))
3166 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3167 (build-system python-build-system)
3168 (arguments `(#:tests? #f)) ; no tests included
3170 `(("python-numpy" ,python-numpy)))
3171 (home-page "https://github.com/pydata/numexpr")
3172 (synopsis "Fast numerical expression evaluator for NumPy")
3174 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3175 expressions that operate on arrays are accelerated and use less memory than
3176 doing the same calculation in Python. In addition, its multi-threaded
3177 capabilities can make use of all your cores, which may accelerate
3178 computations, most specially if they are not memory-bounded (e.g. those using
3179 transcendental functions).")
3180 (license license:expat)))
3182 (define-public python2-numexpr
3183 (let ((numexpr (package-with-python2 python-numexpr)))
3184 (package (inherit numexpr)
3185 ;; Make sure to use special packages for Python 2 instead
3186 ;; of those automatically rewritten by package-with-python2.
3188 `(("python2-numpy" ,python2-numpy)
3189 ,@(alist-delete "python-numpy"
3190 (package-propagated-inputs numexpr)))))))
3192 (define-public python-matplotlib
3194 (name "python-matplotlib")
3199 (uri (string-append "mirror://sourceforge/matplotlib"
3200 "/matplotlib-" version ".tar.gz"))
3203 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3204 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
3205 (build-system python-build-system)
3206 (outputs '("out" "doc"))
3207 (propagated-inputs ; the following packages are all needed at run time
3208 `(("python-pyparsing" ,python-pyparsing)
3209 ("python-pygobject" ,python-pygobject)
3210 ("gobject-introspection" ,gobject-introspection)
3211 ("python-tkinter" ,python "tk")
3212 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3213 ;; from 'gtk+') provides the required 'typelib' files used by
3214 ;; 'gobject-introspection'. The location of these files is set with the
3215 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3216 ;; is done automatically by a 'native-search-path' procedure. However,
3217 ;; at run-time the user must set this variable as follows:
3219 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3221 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3222 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3223 ;; object. For this reason we need to import both libraries.
3224 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3225 ("python-pycairo" ,python-pycairo)
3226 ("python-cairocffi" ,python-cairocffi)))
3228 `(("python-setuptools" ,python-setuptools)
3229 ("python-dateutil" ,python-dateutil-2)
3230 ("python-six" ,python-six)
3231 ("python-pytz" ,python-pytz)
3232 ("python-numpy" ,python-numpy-bootstrap)
3233 ("python-sphinx" ,python-sphinx)
3234 ("python-numpydoc" ,python-numpydoc)
3235 ("python-nose" ,python-nose)
3236 ("python-mock" ,python-mock)
3238 ("imagemagick" ,imagemagick)
3239 ("freetype" ,freetype)
3242 ("python-pillow" ,python-pillow)
3243 ;; FIXME: Add backends when available.
3244 ;("python-wxpython" ,python-wxpython)
3245 ;("python-pyqt" ,python-pyqt)
3249 `(("pkg-config" ,pkg-config)
3250 ("texlive" ,texlive)
3251 ("texinfo" ,texinfo)))
3255 'build 'configure-environment
3256 (lambda* (#:key outputs inputs #:allow-other-keys)
3257 (let ((cairo (assoc-ref inputs "cairo"))
3258 (gtk+ (assoc-ref inputs "gtk+")))
3259 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3261 (setenv "LD_LIBRARY_PATH"
3262 (string-append cairo "/lib:" gtk+ "/lib"))
3263 (setenv "HOME" (getcwd))
3264 (call-with-output-file "setup.cfg"
3266 (format port "[directories]~%
3267 basedirlist = ~a,~a~%
3270 (assoc-ref inputs "tcl")
3271 (assoc-ref inputs "tk"))))))
3273 'install 'install-doc
3274 (lambda* (#:key outputs #:allow-other-keys)
3275 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3276 (doc (string-append data "/doc/" ,name "-" ,version))
3277 (info (string-append data "/info"))
3278 (html (string-append doc "/html")))
3279 (with-directory-excursion "doc"
3280 ;; Produce pdf in 'A4' format.
3281 (substitute* (find-files "." "conf\\.py")
3282 (("latex_paper_size = 'letter'")
3283 "latex_paper_size = 'a4'"))
3286 ;; The doc recommends to run the 'html' target twice.
3287 (system* "python" "make.py" "html")
3288 (system* "python" "make.py" "html")
3289 (copy-recursively "build/html" html)
3290 (system* "python" "make.py" "latex")
3291 (system* "python" "make.py" "texinfo")
3292 (symlink (string-append html "/_images")
3293 (string-append info "/matplotlib-figures"))
3294 (with-directory-excursion "build/texinfo"
3295 (substitute* "matplotlib.texi"
3296 (("@image\\{([^,]*)" all file)
3297 (string-append "@image{matplotlib-figures/" file)))
3298 (symlink (string-append html "/_images")
3299 "./matplotlib-figures")
3300 (system* "makeinfo" "--no-split"
3301 "-o" "matplotlib.info" "matplotlib.texi"))
3302 (copy-file "build/texinfo/matplotlib.info"
3303 (string-append info "/matplotlib.info"))
3304 (copy-file "build/latex/Matplotlib.pdf"
3305 (string-append doc "/Matplotlib.pdf")))))
3306 %standard-phases))))
3307 (home-page "http://matplotlib.org")
3308 (synopsis "2D plotting library for Python")
3310 "Matplotlib is a Python 2D plotting library which produces publication
3311 quality figures in a variety of hardcopy formats and interactive environments
3312 across platforms. Matplotlib can be used in Python scripts, the python and
3313 ipython shell, web application servers, and six graphical user interface
3317 (define-public python2-matplotlib
3318 (let ((matplotlib (package-with-python2 python-matplotlib)))
3319 (package (inherit matplotlib)
3320 ;; Make sure to use special packages for Python 2 instead
3321 ;; of those automatically rewritten by package-with-python2.
3323 `(("python2-pycairo" ,python2-pycairo)
3324 ("python2-pygobject-2" ,python2-pygobject-2)
3325 ("python2-tkinter" ,python-2 "tk")
3326 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3327 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3329 (define-public python2-pysnptools
3331 (name "python2-pysnptools")
3337 "https://pypi.python.org/packages/source/p/pysnptools"
3338 "/pysnptools-" version ".zip"))
3341 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3342 (build-system python-build-system)
3344 `(#:python ,python-2)) ; only Python 2.7 is supported
3346 `(("python2-numpy" ,python2-numpy)
3347 ("python2-scipy" ,python2-scipy)
3348 ("python2-pandas" ,python2-pandas)
3349 ("python2-cython" ,python2-cython)))
3352 ("python2-setuptools" ,python2-setuptools)))
3353 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3354 (synopsis "Library for reading and manipulating genetic data")
3356 "PySnpTools is a library for reading and manipulating genetic data. It
3357 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3358 those files. It can also efficiently manipulate ranges of integers using set
3359 operators such as union, intersection, and difference.")
3362 (define-public python-rpy2
3364 (name "python-rpy2")
3369 (uri (string-append "https://pypi.python.org/packages/source/r/rpy2"
3370 "/rpy2-" version ".tar.gz"))
3373 "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk"))))
3374 (build-system python-build-system)
3376 `(("python-six" ,python-six)
3377 ("readline" ,readline)
3382 `(("python-setuptools" ,python-setuptools)
3384 (home-page "http://rpy.sourceforge.net/")
3385 (synopsis "Python interface to the R language")
3386 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3387 low-level interface to R from Python, a proposed high-level interface,
3388 including wrappers to graphical libraries, as well as R-like structures and
3392 (define-public python2-rpy2
3393 (let ((rpy2 (package-with-python2 python-rpy2)))
3394 (package (inherit rpy2)
3396 `(("python2-singledispatch" ,python2-singledispatch)
3397 ,@(package-native-inputs rpy2))))))
3399 (define-public python-scipy
3401 (name "python-scipy")
3406 (uri (string-append "mirror://sourceforge/scipy"
3407 "/scipy-" version ".tar.xz"))
3410 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3411 (build-system python-build-system)
3413 `(("python-numpy" ,python-numpy)
3414 ("python-matplotlib" ,python-matplotlib)
3415 ("python-pyparsing" ,python-pyparsing)))
3417 `(("lapack" ,lapack)
3418 ("openblas" ,openblas)))
3420 `(("python-nose" ,python-nose)
3421 ("python-sphinx" ,python-sphinx)
3422 ("python-numpydoc" ,python-numpydoc)
3423 ("gfortran" ,gfortran)
3424 ("texlive" ,texlive)
3426 (outputs '("out" "doc"))
3430 'build 'configure-openblas
3431 (lambda* (#:key inputs #:allow-other-keys)
3432 (call-with-output-file "site.cfg"
3436 libraries = openblas
3437 library_dirs = ~a/lib
3438 include_dirs = ~a/include
3440 library_dirs = ~a/lib
3441 atlas_libs = openblas
3443 (assoc-ref inputs "openblas")
3444 (assoc-ref inputs "openblas")
3445 (assoc-ref inputs "openblas"))))
3448 'install 'install-doc
3449 (lambda* (#:key outputs #:allow-other-keys)
3450 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3451 (doc (string-append data "/doc/" ,name "-" ,version))
3452 (html (string-append doc "/html"))
3453 (pyver ,(string-append "PYVER=")))
3454 (with-directory-excursion "doc"
3455 ;; Fix generation of images for mathematical expressions.
3456 (substitute* (find-files "source" "conf\\.py")
3457 (("pngmath_use_preview = True")
3458 "pngmath_use_preview = False"))
3460 (system* "make" "html" pyver)
3461 (system* "make" "latex" "PAPER=a4" pyver)
3462 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3463 (copy-file "build/latex/scipy-ref.pdf"
3464 (string-append doc "/scipy-ref.pdf"))
3465 (with-directory-excursion "build/html"
3466 (for-each (lambda (file)
3467 (let* ((dir (dirname file))
3468 (tgt-dir (string-append html "/" dir)))
3469 (install-file file html)))
3470 (find-files "." ".*"))))))
3471 ;; Tests can only be run after the library has been installed and not
3472 ;; within the source directory.
3476 (with-directory-excursion "/tmp"
3477 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3483 (substitute* "scipy/integrate/tests/test_quadpack.py"
3484 (("libm.so") "libm.so.6"))
3486 %standard-phases)))))))
3487 (home-page "http://www.scipy.org/")
3488 (synopsis "The Scipy library provides efficient numerical routines")
3489 (description "The SciPy library is one of the core packages that make up
3490 the SciPy stack. It provides many user-friendly and efficient numerical
3491 routines such as routines for numerical integration and optimization.")
3494 (define-public python2-scipy
3495 (let ((scipy (package-with-python2 python-scipy)))
3496 (package (inherit scipy)
3497 ;; Use packages customized for python-2.
3499 `(("python2-matplotlib" ,python2-matplotlib)
3500 ("python2-numpy" ,python2-numpy)
3501 ,@(alist-delete "python-matplotlib"
3502 (alist-delete "python-numpy"
3503 (package-propagated-inputs scipy))))))))
3505 (define-public python-sqlalchemy
3507 (name "python-sqlalchemy")
3512 (uri (string-append "https://pypi.python.org/packages/source/S/"
3513 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3516 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3517 (build-system python-build-system)
3519 `(("python-cython" ,python-cython) ;for c extensions
3520 ("python-pytest" ,python-pytest)
3521 ("python-mock" ,python-mock))) ;for tests
3523 `(#:phases (alist-replace
3525 (lambda _ (zero? (system* "py.test")))
3527 (home-page "http://www.sqlalchemy.org")
3528 (synopsis "Database abstraction library")
3530 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3531 gives application developers the full power and flexibility of SQL. It
3532 provides a full suite of well known enterprise-level persistence patterns,
3533 designed for efficient and high-performing database access, adapted into a
3534 simple and Pythonic domain language.")
3537 (define-public python2-sqlalchemy
3538 (package-with-python2 python-sqlalchemy))
3540 (define-public python-distutils-extra
3542 (name "python-distutils-extra")
3547 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3548 version "/+download/python-distutils-extra-"
3552 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3553 (build-system python-build-system)
3555 `(("python-setuptools" ,python-setuptools)))
3556 (home-page "https://launchpad.net/python-distutils-extra/")
3557 (synopsis "Enhancements to Python's distutils")
3559 "The python-distutils-extra module enables you to easily integrate
3560 gettext support, themed icons, and scrollkeeper-based documentation into
3561 Python's distutils.")
3564 (define-public python2-distutils-extra
3565 (package-with-python2 python-distutils-extra))
3567 (define-public python2-elib.intl
3569 (name "python2-elib.intl")
3573 ;; This project doesn't tag releases or publish tarballs, so we take
3574 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3577 (url "https://github.com/dieterv/elib.intl.git")
3578 (commit "d09997cfef")))
3581 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3582 (build-system python-build-system)
3584 `(("python2-setuptools" ,python2-setuptools)))
3586 ;; incompatible with Python 3 (exception syntax)
3587 `(#:python ,python-2
3589 ;; With standard flags, the install phase attempts to create a zip'd
3590 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3592 #:configure-flags '("--single-version-externally-managed"
3593 "--record=elib.txt")))
3594 (home-page "https://github.com/dieterv/elib.intl")
3595 (synopsis "Enhanced internationalization for Python")
3597 "The elib.intl module provides enhanced internationalization (I18N)
3598 services for your Python modules and applications.")
3601 (define-public python-pillow
3603 (name "python-pillow")
3608 (uri (string-append "https://pypi.python.org/packages/source/P/"
3609 "Pillow/Pillow-" version ".tar.gz"))
3612 "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
3613 (build-system python-build-system)
3615 `(("python-setuptools" ,python-setuptools)
3616 ("python-nose" ,python-nose)))
3618 `(("freetype" ,freetype)
3621 ("libjpeg" ,libjpeg)
3622 ("openjpeg" ,openjpeg)
3623 ("libtiff" ,libtiff)
3624 ("libwebp" ,libwebp)))
3626 `(;; Used at runtime for pkg_resources
3627 ("python-setuptools" ,python-setuptools)))
3629 `(#:phases (modify-phases %standard-phases
3631 'install 'disable-egg-compression
3633 ;; Leave the .egg uncompressed since compressing it would
3634 ;; prevent the GC from identifying run-time dependencies.
3635 ;; See <http://bugs.gnu.org/20765>.
3636 (let ((port (open-file "setup.cfg" "a")))
3637 (display "\n[easy_install]\nzip_ok = 0\n"
3642 'install 'check-installed
3645 (setenv "HOME" (getcwd))
3646 (and (zero? (system* "python" "selftest.py"
3648 (zero? (system* "python" "test-installed.py"))))))
3650 (home-page "https://pypi.python.org/pypi/Pillow")
3651 (synopsis "Fork of the Python Imaging Library")
3653 "The Python Imaging Library adds image processing capabilities to your
3654 Python interpreter. This library provides extensive file format support, an
3655 efficient internal representation, and fairly powerful image processing
3656 capabilities. The core image library is designed for fast access to data
3657 stored in a few basic pixel formats. It should provide a solid foundation for
3658 a general image processing tool.")
3660 "http://www.pythonware.com/products/pil/license.htm"
3661 "The PIL Software License"))))
3663 (define-public python2-pillow
3664 (package-with-python2 python-pillow))
3666 (define-public python-pycparser
3668 (name "python-pycparser")
3673 (uri (string-append "https://pypi.python.org/packages/source/p/"
3674 "pycparser/pycparser-" version ".tar.gz"))
3677 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3678 (outputs '("out" "doc"))
3679 (build-system python-build-system)
3681 `(("pkg-config" ,pkg-config)
3682 ("python-setuptools" ,python-setuptools)))
3688 (with-directory-excursion "tests"
3689 (zero? (system* "python" "all_tests.py"))))
3691 'install 'install-doc
3692 (lambda* (#:key outputs #:allow-other-keys)
3693 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3694 (doc (string-append data "/doc/" ,name "-" ,version))
3695 (examples (string-append doc "/examples")))
3697 (for-each (lambda (file)
3698 (copy-file (string-append "." file)
3699 (string-append doc file)))
3700 '("/README.rst" "/CHANGES" "/LICENSE"))
3701 (copy-recursively "examples" examples)))
3702 %standard-phases))))
3703 (home-page "https://github.com/eliben/pycparser")
3704 (synopsis "C parser in Python")
3706 "Pycparser is a complete parser of the C language, written in pure Python
3707 using the PLY parsing library. It parses C code into an AST and can serve as
3708 a front-end for C compilers or analysis tools.")
3711 (define-public python2-pycparser
3712 (package-with-python2 python-pycparser))
3714 (define-public python-cffi
3716 (name "python-cffi")
3721 (uri (string-append "https://pypi.python.org/packages/source/c/"
3722 "cffi/cffi-" version ".tar.gz"))
3724 (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga"))))
3725 (build-system python-build-system)
3726 (outputs '("out" "doc"))
3728 `(("libffi" ,libffi)))
3729 (propagated-inputs ; required at run-time
3730 `(("python-pycparser" ,python-pycparser)))
3732 `(("pkg-config" ,pkg-config)
3733 ("python-sphinx" ,python-sphinx)
3734 ("python-pytest" ,python-pytest)
3735 ("python-setuptools" ,python-setuptools)))
3739 'install 'install-doc
3740 (lambda* (#:key outputs #:allow-other-keys)
3741 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3742 (doc (string-append data "/doc/" ,name "-" ,version))
3743 (html (string-append doc "/html")))
3744 (with-directory-excursion "doc"
3745 (system* "make" "html")
3747 (copy-recursively "build/html" html))
3748 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3750 (home-page "http://cffi.readthedocs.org")
3751 (synopsis "Foreign function interface for Python")
3753 "Foreign Function Interface for Python calling C code.")
3754 (license license:expat)))
3756 (define-public python2-cffi
3757 (package-with-python2 python-cffi))
3759 (define-public python-xcffib
3761 (name "python-xcffib")
3766 (uri (string-append "https://pypi.python.org/packages/source/x/"
3767 "xcffib/xcffib-" version ".tar.gz"))
3770 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3771 (build-system python-build-system)
3773 `(("libxcb" ,libxcb)
3774 ("python-six" ,python-six)))
3776 `(("python-setuptools" ,python-setuptools)))
3778 `(("python-cffi" ,python-cffi))) ; used at run time
3782 'install 'install-doc
3783 (lambda* (#:key outputs #:allow-other-keys)
3784 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3785 "/doc/" ,name "-" ,version)))
3787 (copy-file "README.md"
3788 (string-append doc "/README.md"))))
3790 (home-page "https://github.com/tych0/xcffib")
3791 (synopsis "XCB Python bindings")
3793 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3794 support for Python 3 and PyPy. It is based on cffi.")
3795 (license license:expat)))
3797 (define-public python2-xcffib
3798 (package-with-python2 python-xcffib))
3800 (define-public python-cairocffi
3802 (name "python-cairocffi")
3807 ;; The archive on pypi is missing the 'utils' directory!
3808 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3810 (file-name (string-append name "-" version ".tar.gz"))
3813 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3814 (build-system python-build-system)
3815 (outputs '("out" "doc"))
3817 `(("gdk-pixbuf" ,gdk-pixbuf)
3820 `(("pkg-config" ,pkg-config)
3821 ("python-sphinx" ,python-sphinx)
3822 ("python-docutils" ,python-docutils)
3823 ("python-setuptools" ,python-setuptools)))
3825 `(("python-xcffib" ,python-xcffib))) ; used at run time
3829 'install 'install-doc
3830 (lambda* (#:key inputs outputs #:allow-other-keys)
3831 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3832 (doc (string-append data "/doc/" ,name "-" ,version))
3833 (html (string-append doc "/html")))
3834 (setenv "LD_LIBRARY_PATH"
3835 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3836 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3837 (setenv "LANG" "en_US.UTF-8")
3839 (for-each (lambda (file)
3840 (copy-file (string-append "." file)
3841 (string-append doc file)))
3842 '("/README.rst" "/CHANGES" "/LICENSE"))
3843 (system* "python" "setup.py" "build_sphinx")
3844 (copy-recursively "docs/_build/html" html)))
3846 (home-page "https://github.com/SimonSapin/cairocffi")
3847 (synopsis "Python bindings and object-oriented API for Cairo")
3849 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3850 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3851 graphics library with support for multiple backends including image buffers,
3852 PNG, PostScript, PDF, and SVG file output.")
3855 (define-public python2-cairocffi
3856 (package-with-python2 python-cairocffi))
3858 (define-public python-decorator
3860 (name "python-decorator")
3866 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3869 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3870 (build-system python-build-system)
3871 (arguments '(#:tests? #f)) ; no test target
3873 `(("python-setuptools" ,python-setuptools)))
3874 (home-page "http://pypi.python.org/pypi/decorator/")
3875 (synopsis "Python module to simplify usage of decorators")
3877 "The aim of the decorator module is to simplify the usage of decorators
3878 for the average programmer, and to popularize decorators usage giving examples
3879 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3880 etc. The core of this module is a decorator factory.")
3881 (license license:expat)))
3883 (define-public python2-decorator
3884 (package-with-python2 python-decorator))
3886 (define-public python-drmaa
3888 (name "python-drmaa")
3894 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3897 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3898 (build-system python-build-system)
3899 ;; The test suite requires libdrmaa which is provided by the cluster
3900 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3901 ;; should be set to the path of the libdrmaa library.
3902 (arguments '(#:tests? #f))
3904 `(("python-nose" ,python-nose)
3905 ("python-setuptools" ,python-setuptools)))
3906 (home-page "https://pypi.python.org/pypi/drmaa")
3907 (synopsis "Python bindings for the DRMAA library")
3909 "A Python package for Distributed Resource Management (DRM) job
3910 submission and control. This package is an implementation of the DRMAA 1.0
3911 Python language binding specification.")
3914 (define-public python2-drmaa
3915 (package-with-python2 python-drmaa))
3917 (define-public python-gridmap
3919 (name "python-gridmap")
3925 "https://github.com/pygridtools/gridmap/archive/v"
3927 (file-name (string-append name "-" version ".tar.gz"))
3929 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3930 (build-system python-build-system)
3932 `(("python-psutil" ,python-psutil)
3933 ("python-drmaa" ,python-drmaa)
3934 ("python-pyzmq" ,python-pyzmq)))
3936 `(("python-setuptools" ,python-setuptools)))
3937 (home-page "https://github.com/pygridtools/gridmap")
3938 (synopsis "Create jobs on a cluster directly from Python")
3940 "Gridmap is a Python package to allow you to easily create jobs on the
3941 cluster directly from Python. You can directly map Python functions onto the
3942 cluster without needing to write any wrapper code yourself.")
3945 (define-public python2-gridmap
3946 (package-with-python2 python-gridmap))
3948 (define-public python-pexpect
3950 (name "python-pexpect")
3955 (uri (string-append "https://pypi.python.org/packages/source/p/"
3956 "pexpect/pexpect-" version ".tar.gz"))
3958 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
3959 (build-system python-build-system)
3962 (modify-phases %standard-phases
3963 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
3965 `(("python-nose" ,python-nose)))
3966 (home-page "http://pexpect.readthedocs.org/")
3967 (synopsis "Controlling interactive console applications")
3969 "Pexpect is a pure Python module for spawning child applications;
3970 controlling them; and responding to expected patterns in their output.
3971 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
3972 child application and control it as if a human were typing commands.")
3975 (define-public python2-pexpect
3976 (package-with-python2 python-pexpect))
3978 (define-public python-setuptools-scm
3980 (name "python-setuptools-scm")
3984 (uri (pypi-uri "setuptools_scm" version))
3987 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
3988 (build-system python-build-system)
3989 (native-inputs `(("python-setuptools" ,python-setuptools)))
3990 (home-page "https://github.com/pypa/setuptools_scm/")
3991 (synopsis "Manage Python package versions in SCM metadata")
3993 "Setuptools_scm handles managing your Python package versions in
3994 @dfn{software configuration management} (SCM) metadata instead of declaring
3995 them as the version argument or in a SCM managed file.")
3996 (license license:expat)))
3998 (define-public python2-setuptools-scm
3999 (package-with-python2 python-setuptools-scm))
4001 (define-public python-pathpy
4003 (name "python-pathpy")
4008 (uri (string-append "https://pypi.python.org/packages/source/p/"
4009 "path.py/path.py-" version ".tar.gz"))
4011 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4012 (build-system python-build-system)
4014 `(("python-appdirs" ,python-appdirs)))
4016 `(("python-setuptools" ,python-setuptools)
4017 ("python-setuptools-scm" ,python-setuptools-scm)
4018 ("python-pytest" ,python-pytest)
4019 ("python-pytest-runner" ,python-pytest-runner)))
4020 (home-page "http://github.com/jaraco/path.py")
4021 (synopsis "Python module wrapper for built-in os.path")
4023 "@code{path.py} implements path objects as first-class entities, allowing
4024 common operations on files to be invoked on those path objects directly.")
4025 (license license:expat)))
4027 (define-public python2-pathpy
4028 (package-with-python2 python-pathpy))
4030 (define-public python-pickleshare
4032 (name "python-pickleshare")
4037 (uri (string-append "https://pypi.python.org/packages/source/p/"
4038 "pickleshare/pickleshare-" version ".tar.gz"))
4040 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4041 (build-system python-build-system)
4043 `(("python-pathpy" ,python-pathpy)))
4045 `(("python-setuptools" ,python-setuptools)))
4046 (home-page "https://github.com/vivainio/pickleshare")
4047 (synopsis "Tiny key value database with concurrency support")
4049 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4050 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4051 shelve, many processes can access the database simultaneously. Changing a
4052 value in database is immediately visible to other processes accessing the same
4053 database. Concurrency is possible because the values are stored in separate
4054 files. Hence the “database” is a directory where all files are governed by
4056 (license license:expat)))
4058 (define-public python2-pickleshare
4059 (package-with-python2 python-pickleshare))
4061 (define-public python-simplegeneric
4063 (name "python-simplegeneric")
4068 (uri (string-append "https://pypi.python.org/packages/source/s/"
4069 "simplegeneric/simplegeneric-" version ".zip"))
4071 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4072 (build-system python-build-system)
4074 `(("python-setuptools" ,python-setuptools)
4076 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4077 (synopsis "Python module for simple generic functions")
4079 "The simplegeneric module lets you define simple single-dispatch generic
4080 functions, akin to Python’s built-in generic functions like @code{len()},
4081 @code{iter()} and so on. However, instead of using specially-named methods,
4082 these generic functions use simple lookup tables, akin to those used by
4083 e.g. @code{pickle.dump()} and other generic functions found in the Python
4087 (define-public python2-simplegeneric
4088 (package-with-python2 python-simplegeneric))
4090 (define-public python-ipython-genutils
4092 (name "python-ipython-genutils")
4097 (uri (string-append "https://pypi.python.org/packages/source/i/"
4098 "ipython_genutils/ipython_genutils-"
4101 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4102 (build-system python-build-system)
4103 (arguments `(#:tests? #f)) ; no tests
4104 (home-page "http://ipython.org")
4105 (synopsis "Vestigial utilities from IPython")
4107 "This package provides retired utilities from IPython.")
4110 (define-public python2-ipython-genutils
4111 (package-with-python2 python-ipython-genutils))
4113 (define-public python-traitlets
4115 (name "python-traitlets")
4120 (uri (string-append "https://pypi.python.org/packages/source/t/"
4121 "traitlets/traitlets-" version ".tar.gz"))
4124 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4125 (build-system python-build-system)
4128 (modify-phases %standard-phases
4129 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4131 `(("python-ipython-genutils" ,python-ipython-genutils)
4132 ("python-decorator" ,python-decorator)))
4134 `(("python-nose" ,python-nose)))
4135 (home-page "http://ipython.org")
4136 (synopsis "Configuration system for Python applications")
4138 "Traitlets is a framework that lets Python classes have attributes with
4139 type checking, dynamically calculated default values, and ‘on change’
4140 callbacks. The package also includes a mechanism to use traitlets for
4141 configuration, loading values from files or from command line arguments. This
4142 is a distinct layer on top of traitlets, so you can use traitlets in your code
4143 without using the configuration machinery.")
4146 (define-public python2-traitlets
4147 (package-with-python2 python-traitlets))
4149 (define-public python-ipython
4151 (name "python-ipython")
4156 (uri (string-append "https://pypi.python.org/packages/source/i/"
4157 "ipython/ipython-" version ".tar.gz"))
4159 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4160 (build-system python-build-system)
4161 (outputs '("out" "doc"))
4163 `(("python-pyzmq" ,python-pyzmq)
4164 ("python-terminado" ,python-terminado)))
4166 `(("readline" ,readline)
4168 ("python-matplotlib" ,python-matplotlib)
4169 ("python-numpy" ,python-numpy)
4170 ("python-numpydoc" ,python-numpydoc)
4171 ("python-jinja2" ,python-jinja2)
4172 ("python-mistune" ,python-mistune)
4173 ("python-jsonschema" ,python-jsonschema)
4174 ("python-pygments" ,python-pygments)
4175 ("python-requests" ,python-requests) ;; for tests
4176 ("python-nose" ,python-nose)))
4178 `(("pkg-config" ,pkg-config)
4179 ("python-sphinx" ,python-sphinx)
4180 ("texlive" ,texlive)
4181 ("texinfo" ,texinfo)
4182 ("python-setuptools" ,python-setuptools)))
4185 (modify-phases %standard-phases
4187 'install 'install-doc
4188 (lambda* (#:key inputs outputs #:allow-other-keys)
4189 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4190 (doc (string-append data "/doc/" ,name "-" ,version))
4191 (html (string-append doc "/html"))
4192 (man1 (string-append data "/man/man1"))
4193 (info (string-append data "/info"))
4194 (examples (string-append doc "/examples")))
4195 (setenv "LANG" "en_US.utf8")
4196 (with-directory-excursion "docs"
4197 ;; FIXME: html and pdf fail to build
4198 ;; (system* "make" "html")
4199 ;; (system* "make" "pdf" "PAPER=a4")
4200 (system* "make" "info"))
4201 (copy-recursively "docs/man" man1)
4202 (copy-recursively "examples" examples)
4203 ;; (copy-recursively "docs/build/html" html)
4204 ;; (copy-file "docs/build/latex/ipython.pdf"
4205 ;; (string-append doc "/ipython.pdf"))
4207 (copy-file "docs/build/texinfo/ipython.info"
4208 (string-append info "/ipython.info"))
4209 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4210 ;; Tests can only be run after the library has been installed and not
4211 ;; within the source directory.
4215 (lambda* (#:key outputs tests? #:allow-other-keys)
4217 (with-directory-excursion "/tmp"
4218 (setenv "HOME" "/tmp/") ;; required by a test
4219 (zero? (system* (string-append (assoc-ref outputs "out")
4224 (lambda* (#:key inputs #:allow-other-keys)
4225 (substitute* "./IPython/utils/_process_posix.py"
4226 (("/usr/bin/env', 'which") (which "which")))
4227 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4228 (("#!/usr/bin/env python")
4229 (string-append "#!" (which "python"))))
4230 ;; Disable 1 failing test
4231 (substitute* "./IPython/core/tests/test_magic.py"
4232 (("def test_dirops\\(\\):" all)
4233 (string-append "@dec.skipif(True)\n" all))))))))
4234 (home-page "http://ipython.org")
4235 (synopsis "IPython is a tool for interactive computing in Python")
4237 "IPython provides a rich architecture for interactive computing with:
4238 Powerful interactive shells, a browser-based notebook, support for interactive
4239 data visualization, embeddable interpreters and tools for parallel
4243 (define-public python2-ipython
4244 (let ((ipython (package-with-python2 python-ipython)))
4247 ;; FIXME: some tests are failing
4249 `(#:tests? #f ,@(package-arguments ipython)))
4250 ;; Make sure we use custom python2-NAME packages.
4251 ;; FIXME: add pyreadline once available.
4253 `(("python2-terminado" ,python2-terminado)
4254 ,@(alist-delete "python-terminado"
4255 (package-propagated-inputs ipython))))
4257 `(("python2-mock" ,python2-mock)
4258 ("python2-matplotlib" ,python2-matplotlib)
4259 ("python2-numpy" ,python2-numpy)
4260 ,@(fold alist-delete (package-inputs ipython)
4261 '("python-matplotlib" "python-numpy")))))))
4263 (define-public python-isodate
4265 (name "python-isodate")
4271 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4276 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4277 (build-system python-build-system)
4279 `(("python-setuptools" ,python-setuptools)))
4281 "http://cheeseshop.python.org/pypi/isodate")
4283 "Python date parser and formatter")
4285 "Python-isodate is a python module for parsing and formatting
4286 ISO 8601 dates, time and duration.")
4289 (define-public python2-isodate
4290 (package-with-python2 python-isodate))
4292 (define-public python-html5lib
4294 (name "python-html5lib")
4300 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4305 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4306 (build-system python-build-system)
4308 `(("python-six" ,python-six))) ; required to "import html5lib"
4310 `(("python-setuptools" ,python-setuptools)))
4312 `(#:test-target "check"))
4314 "https://github.com/html5lib/html5lib-python")
4316 "Python HTML parser based on the WHATWG HTML specifcation")
4318 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4319 and written in Python.")
4320 (license license:expat)))
4322 (define-public python2-html5lib
4323 (package-with-python2 python-html5lib))
4325 (define-public python-urwid
4327 (name "python-urwid")
4333 "https://pypi.python.org/packages/source/u/urwid/urwid-"
4337 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4338 (build-system python-build-system)
4339 (native-inputs `(("python-setuptools" ,python-setuptools)))
4340 (home-page "http://urwid.org")
4341 (synopsis "Console user interface library for Python")
4343 "Urwid is a curses-based UI/widget library for Python. It includes many
4344 features useful for text console applications.")
4345 (license lgpl2.1+)))
4347 (define-public python2-urwid
4348 (package-with-python2 python-urwid))
4350 (define-public python-dbus
4352 (name "python-dbus")
4358 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4361 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4362 (build-system gnu-build-system)
4365 (modify-phases %standard-phases
4369 ;; XXX: For the missing '/etc/machine-id'.
4370 (substitute* "test/run-test.sh"
4371 (("DBUS_FATAL_WARNINGS=1")
4372 "DBUS_FATAL_WARNINGS=0"))
4375 `(("pkg-config" ,pkg-config)))
4377 `(("python" ,python)
4378 ("dbus-glib" ,dbus-glib)))
4379 (synopsis "Python bindings for D-bus")
4380 (description "python-dbus provides bindings for libdbus, the reference
4381 implementation of D-Bus.")
4382 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4383 (license license:expat)))
4385 (define-public python2-dbus
4386 (package (inherit python-dbus)
4387 (name "python2-dbus")
4388 (inputs `(("python" ,python-2)
4389 ,@(alist-delete "python"
4390 (package-inputs python-dbus)
4392 ;; FIXME: on Python 2, the test_utf8 fails with:
4393 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4394 (arguments `(#:tests? #f))))
4396 (define-public python-apsw
4398 (name "python-apsw")
4399 (version "3.8.7.3-r1")
4404 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4409 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4410 (build-system python-build-system)
4412 `(("python-setuptools" ,python-setuptools)
4413 ("sqlite" ,sqlite)))
4416 ;; swap check and install phases
4419 (assoc-ref %standard-phases 'check)
4422 %standard-phases))))
4423 (home-page "https://github.com/rogerbinns/apsw/")
4424 (synopsis "Another Python SQLite Wrapper")
4425 (description "APSW is a Python wrapper for the SQLite
4426 embedded relational database engine. In contrast to other wrappers such as
4427 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4428 translate the complete SQLite API into Python.")
4429 (license license:zlib)))
4431 (define-public python2-apsw
4432 (package-with-python2 python-apsw))
4434 (define-public python-lxml
4436 (name "python-lxml")
4442 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4447 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4448 (build-system python-build-system)
4450 `(("libxml2" ,libxml2)
4451 ("libxslt" ,libxslt)
4452 ("python-setuptools" ,python-setuptools)))
4453 (home-page "http://lxml.de/")
4455 "Python XML processing library")
4457 "The lxml XML toolkit is a Pythonic binding for the C libraries
4458 libxml2 and libxslt.")
4459 (license bsd-3))) ; and a few more, see LICENSES.txt
4461 (define-public python2-lxml
4462 (package-with-python2 python-lxml))
4464 (define-public python2-pil
4466 (name "python2-pil")
4472 "http://effbot.org/downloads/Imaging-"
4476 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4477 (modules '((guix build utils)))
4479 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4480 ;; there is no use in creating a patch and reporting it.
4481 '(substitute* "_imagingft.c"
4484 (build-system python-build-system)
4486 `(("freetype" ,freetype)
4487 ("libjpeg" ,libjpeg)
4488 ("libtiff" ,libtiff)
4489 ("python-setuptools" ,python-setuptools)
4492 ;; Only the fork python-pillow works with Python 3.
4493 `(#:python ,python-2
4494 #:tests? #f ; no check target
4498 ;; According to README and setup.py, manual configuration is
4499 ;; the preferred way of "searching" for inputs.
4500 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4501 (lambda* (#:key inputs #:allow-other-keys)
4502 (let ((jpeg (assoc-ref inputs "libjpeg"))
4503 (zlib (assoc-ref inputs "zlib"))
4504 (tiff (assoc-ref inputs "libtiff"))
4505 (freetype (assoc-ref inputs "freetype")))
4506 (substitute* "setup.py"
4507 (("JPEG_ROOT = None")
4508 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4509 (("ZLIB_ROOT = None")
4510 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4511 (("TIFF_ROOT = None")
4512 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4513 (("FREETYPE_ROOT = None")
4514 (string-append "FREETYPE_ROOT = libinclude(\""
4517 (home-page "http://www.pythonware.com/products/pil/")
4518 (synopsis "Python Imaging Library")
4519 (description "The Python Imaging Library (PIL) adds image processing
4520 capabilities to the Python interpreter.")
4523 "See 'README' in the distribution."))))
4525 (define-public python2-cssutils
4527 (name "python2-cssutils")
4533 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4538 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4539 (build-system python-build-system)
4541 `(("python2-mock" ,python2-mock) ; for the tests
4542 ("unzip" ,unzip))) ; for unpacking the source
4544 `(("python2-setuptools" ,python2-setuptools)))
4546 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4547 #:tests? #f ; The tests apparently download an external URL.
4549 (home-page "http://cthedot.de/cssutils/")
4551 "CSS Cascading Style Sheets library for Python")
4553 "Cssutils is a Python package for parsing and building CSS
4554 Cascading Style Sheets. Currently it provides a DOM only and no rendering
4558 (define-public python-cssselect
4560 (name "python-cssselect")
4566 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4571 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4572 (build-system python-build-system)
4574 `(("python-setuptools" ,python-setuptools)))
4576 ;; tests fail with message
4577 ;; AttributeError: 'module' object has no attribute 'tests'
4580 "https://pythonhosted.org/cssselect/")
4582 "CSS3 selector parser and translator to XPath 1.0")
4584 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4585 them to XPath 1.0 expressions. Such expressions can be used in lxml or
4586 another XPath engine to find the matching elements in an XML or HTML document.")
4589 (define-public python2-cssselect
4590 (package-with-python2 python-cssselect))
4592 (define-public python-netifaces
4594 (name "python-netifaces")
4600 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4605 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4606 (build-system python-build-system)
4608 `(("python-setuptools" ,python-setuptools)))
4610 "https://bitbucket.org/al45tair/netifaces")
4612 "Python module for portable network interface information")
4614 "Netifaces is a Python module providing information on network
4615 interfaces in an easy and portable manner.")
4616 (license license:expat)))
4618 (define-public python2-netifaces
4619 (package-with-python2 python-netifaces))
4621 (define-public python-networkx
4623 (name "python-networkx")
4629 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4632 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4633 (build-system python-build-system)
4634 ;; python-decorator is needed at runtime
4636 `(("python-decorator" ,python-decorator)))
4638 `(("python-setuptools" ,python-setuptools)
4639 ("python-nose" ,python-nose)))
4640 (home-page "http://networkx.github.io/")
4641 (synopsis "Python module for creating and manipulating graphs and networks")
4643 "NetworkX is a Python package for the creation, manipulation, and study
4644 of the structure, dynamics, and functions of complex networks.")
4647 (define-public python2-networkx
4648 (package-with-python2 python-networkx))
4650 (define-public snakemake
4658 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4661 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4662 (build-system python-build-system)
4663 (inputs `(("python-setuptools" ,python-setuptools)))
4664 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4665 (synopsis "Python-based execution environment for make-like workflows")
4667 "Snakemake aims to reduce the complexity of creating workflows by
4668 providing a clean and modern domain specific specification language (DSL) in
4669 Python style, together with a fast and comfortable execution environment.")
4670 (license license:expat)))
4672 (define-public python-seaborn
4674 (name "python-seaborn")
4680 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4683 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4684 (build-system python-build-system)
4686 `(("python-pandas" ,python-pandas)
4687 ("python-matplotlib" ,python-matplotlib)
4688 ("python-scipy" ,python-scipy)))
4690 `(("python-setuptools" ,python-setuptools)))
4691 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4692 (synopsis "Statistical data visualization")
4694 "Seaborn is a library for making attractive and informative statistical
4695 graphics in Python. It is built on top of matplotlib and tightly integrated
4696 with the PyData stack, including support for numpy and pandas data structures
4697 and statistical routines from scipy and statsmodels.")
4700 (define-public python2-seaborn
4701 (let ((seaborn (package-with-python2 python-seaborn)))
4702 (package (inherit seaborn)
4704 `(("python2-pytz" ,python2-pytz)
4705 ("python2-pandas" ,python2-pandas)
4706 ("python2-matplotlib" ,python2-matplotlib)
4707 ("python2-scipy" ,python2-scipy))))))
4709 (define-public python-sympy
4711 (name "python-sympy")
4717 "https://github.com/sympy/sympy/releases/download/sympy-"
4718 version "/sympy-" version ".tar.gz"))
4720 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4721 (build-system python-build-system)
4723 `(("python-setuptools" ,python-setuptools)))
4724 (home-page "http://www.sympy.org/")
4725 (synopsis "Python library for symbolic mathematics")
4727 "SymPy is a Python library for symbolic mathematics. It aims to become a
4728 full-featured computer algebra system (CAS) while keeping the code as simple
4729 as possible in order to be comprehensible and easily extensible.")
4732 (define-public python2-sympy
4733 (package-with-python2 python-sympy))
4735 (define-public python-testlib
4737 (name "python-testlib")
4743 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4746 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4747 (build-system python-build-system)
4749 `(("python-setuptools" ,python-setuptools)))
4751 `(("unzip" ,unzip)))
4756 (lambda* (#:key inputs outputs #:allow-other-keys)
4757 (let ((unzip (string-append (assoc-ref inputs "unzip")
4759 (source (assoc-ref inputs "source")))
4760 (and (zero? (system* unzip source))
4761 (chdir (string-append "testlib-" ,version)))))
4763 (synopsis "Python micro test suite harness")
4764 (description "A micro unittest suite harness for Python.")
4765 (home-page "https://github.com/trentm/testlib")
4766 (license license:expat)))
4768 (define-public python2-testlib
4769 (package-with-python2 python-testlib))
4771 (define-public python2-xlib
4773 (name "python2-xlib")
4777 (uri (string-append "mirror://sourceforge/python-xlib/"
4778 "python-xlib-" version ".tar.gz"))
4781 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4782 (build-system python-build-system)
4784 `(#:python ,python-2 ;Python 2 only
4785 #:tests? #f)) ;no tests
4787 `(("python-setuptools" ,python-setuptools)))
4788 (home-page "http://python-xlib.sourceforge.net/")
4789 (synopsis "Python X11 client library")
4791 "The Python X Library is intended to be a fully functional X client
4792 library for Python programs. It is useful to implement low-level X clients.
4793 It is written entirely in Python.")
4796 (define-public python-singledispatch
4798 (name "python-singledispatch")
4804 "https://pypi.python.org/packages/source/s/singledispatch/"
4805 "singledispatch-" version ".tar.gz"))
4808 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4809 (build-system python-build-system)
4811 `(("python-setuptools" ,python-setuptools)))
4813 `(("python-six" ,python-six)))
4815 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4816 (synopsis "Backport of singledispatch feature from Python 3.4")
4818 "This library brings functools.singledispatch from Python 3.4 to Python
4820 (license license:expat)))
4822 (define-public python2-singledispatch
4823 (package-with-python2 python-singledispatch))
4825 (define-public python-tornado
4827 (name "python-tornado")
4833 "https://pypi.python.org/packages/source/t/tornado/"
4834 "tornado-" version ".tar.gz"))
4836 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4837 (build-system python-build-system)
4839 `(("python-certifi" ,python-certifi)))
4841 `(("python-setuptools" ,python-setuptools)))
4842 (home-page "http://www.tornadoweb.org/")
4843 (synopsis "Python web framework and asynchronous networking library")
4845 "Tornado is a Python web framework and asynchronous networking library,
4846 originally developed at FriendFeed. By using non-blocking network I/O,
4847 Tornado can scale to tens of thousands of open connections, making it ideal
4848 for long polling, WebSockets, and other applications that require a long-lived
4849 connection to each user.")
4852 (define-public python2-tornado
4853 (let ((tornado (package-with-python2 python-tornado)))
4854 (package (inherit tornado)
4856 `(("python2-backport-ssl-match-hostname"
4857 ,python2-backport-ssl-match-hostname)
4858 ,@(package-inputs tornado))))))
4860 (define-public python-waf
4866 (uri (string-append "https://waf.io/"
4867 "waf-" version ".tar.bz2"))
4870 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4871 (build-system python-build-system)
4874 (modify-phases %standard-phases
4878 (system* "python" "waf-light" "configure")
4879 (system* "python" "waf-light" "build")))))
4882 (zero? (system* "python" "waf" "--version"))))
4885 (copy-file "waf" %output))))))
4886 (home-page "https://waf.io/")
4887 (synopsis "Python-based build system")
4889 "Waf is a Python-based framework for configuring, compiling and installing
4893 (define-public python2-waf
4894 (package-with-python2 python-waf))
4896 (define-public python-pyzmq
4898 (name "python-pyzmq")
4904 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4907 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4908 (build-system python-build-system)
4911 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4912 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4913 ;; --inplace' for 'python setup.py test' to work.
4916 `(("zeromq" ,zeromq)))
4918 `(("pkg-config" ,pkg-config)
4919 ("python-nose" ,python-nose)
4920 ("python-setuptools" ,python-setuptools)))
4921 (home-page "http://github.com/zeromq/pyzmq")
4922 (synopsis "Python bindings for 0MQ")
4924 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4927 (define-public python2-pyzmq
4928 (package-with-python2 python-pyzmq))
4930 (define-public python-pep8
4932 (name "python-pep8")
4938 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4943 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4944 (build-system python-build-system)
4946 `(("python-setuptools" ,python-setuptools)))
4947 (home-page "http://pep8.readthedocs.org/")
4948 (synopsis "Python style guide checker")
4950 "This tools checks Python code against some of the style conventions in
4952 (license license:expat)))
4954 (define-public python2-pep8
4955 (package-with-python2 python-pep8))
4957 (define-public python-pyflakes
4959 (name "python-pyflakes")
4965 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4970 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
4971 (build-system python-build-system)
4973 `(("python-setuptools" ,python-setuptools)))
4975 "https://github.com/pyflakes/pyflakes")
4976 (synopsis "Passive checker of Python programs")
4978 "Pyflakes statically checks Python source code for common errors.")
4979 (license license:expat)))
4981 (define-public python2-pyflakes
4982 (package-with-python2 python-pyflakes))
4984 (define-public python-mccabe
4986 (name "python-mccabe")
4992 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
4997 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
4998 (build-system python-build-system)
5000 `(("python-setuptools" ,python-setuptools)))
5001 (home-page "https://github.com/flintwork/mccabe")
5002 (synopsis "McCabe checker, plugin for flake8")
5004 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5005 complexity of Python source code.")
5006 (license license:expat)))
5008 (define-public python2-mccabe
5009 (package-with-python2 python-mccabe))
5011 (define-public python-mccabe-0.2.1
5012 (package (inherit python-mccabe)
5017 (uri (pypi-uri "mccabe" version))
5020 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5022 (define-public python2-mccabe-0.2.1
5023 (package-with-python2 python-mccabe-0.2.1))
5025 ;; Flake8 2.4.1 requires an older version of pep8.
5026 ;; This should be removed ASAP.
5027 (define-public python-pep8-1.5.7
5028 (package (inherit python-pep8)
5034 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5039 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5041 (define-public python2-pep8-1.5.7
5042 (package-with-python2 python-pep8-1.5.7))
5044 ;; Flake8 2.4.1 requires an older version of pyflakes.
5045 ;; This should be removed ASAP.
5046 (define-public python-pyflakes-0.8.1
5047 (package (inherit python-pyflakes)
5053 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5058 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5060 (define-public python2-pyflakes-0.8.1
5061 (package-with-python2 python-pyflakes-0.8.1))
5063 (define-public python-flake8
5065 (name "python-flake8")
5071 "https://pypi.python.org/packages/source/f/flake8/flake8-"
5076 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
5077 (build-system python-build-system)
5079 `(("python-setuptools" ,python-setuptools)
5080 ("python-pep8" ,python-pep8-1.5.7)
5081 ("python-pyflakes" ,python-pyflakes-0.8.1)
5082 ("python-mccabe" ,python-mccabe)
5083 ("python-mock" ,python-mock)
5084 ("python-nose" ,python-nose)))
5085 (home-page "https://gitlab.com/pycqa/flake8")
5087 "The modular source code checker: pep8, pyflakes and co")
5089 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5090 (license license:expat)))
5092 (define-public python2-flake8
5093 (package-with-python2 python-flake8))
5095 ;; This will only be needed by the python-hacking package and will not be
5096 ;; necessary once python-hacking > 0.10.2 is released.
5097 (define-public python-flake8-2.2.4
5098 (package (inherit python-flake8)
5100 `(("python-setuptools" ,python-setuptools)
5101 ("python-pep8" ,python-pep8-1.5.7)
5102 ("python-pyflakes" ,python-pyflakes-0.8.1)
5103 ("python-mccabe" ,python-mccabe-0.2.1)
5104 ("python-mock" ,python-mock)
5105 ("python-nose" ,python-nose)))
5110 (uri (pypi-uri "flake8" version))
5113 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5115 (define-public python2-flake8-2.2.4
5116 (package-with-python2 python-flake8-2.2.4))
5118 (define-public python-mistune
5120 (name "python-mistune")
5126 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5131 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5132 (build-system python-build-system)
5134 `(("python-setuptools" ,python-setuptools)
5135 ("python-nose" ,python-nose)
5136 ("python-cython" ,python-cython)))
5137 (home-page "https://github.com/lepture/mistune")
5138 (synopsis "Markdown parser in pure Python")
5139 (description "This package provides a fast markdown parser in pure
5143 (define-public python2-mistune
5144 (package-with-python2 python-mistune))
5146 (define-public python-ptyprocess
5148 (name "python-ptyprocess")
5154 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5158 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5159 (build-system python-build-system)
5161 `(("python-setuptools" ,python-setuptools)
5162 ("python-nose" ,python-nose)))
5165 (modify-phases %standard-phases
5168 (zero? (system* "nosetests")))))))
5169 (home-page "https://github.com/pexpect/ptyprocess")
5170 (synopsis "Run a subprocess in a pseudo terminal")
5172 "This package provides a Python library used to launch a subprocess in a
5173 pseudo terminal (pty), and interact with both the process and its pty.")
5176 (define-public python2-ptyprocess
5177 (package-with-python2 python-ptyprocess))
5179 (define-public python-terminado
5181 (name "python-terminado")
5187 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5191 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5192 (build-system python-build-system)
5194 `(("python-tornado" ,python-tornado)
5195 ("python-ptyprocess" ,python-ptyprocess)))
5197 `(("python-setuptools" ,python-setuptools)
5198 ("python-nose" ,python-nose)))
5201 (modify-phases %standard-phases
5204 (zero? (system* "nosetests")))))))
5205 (home-page "https://github.com/takluyver/terminado")
5206 (synopsis "Terminals served to term.js using Tornado websockets")
5207 (description "This package provides a Tornado websocket backend for the
5208 term.js Javascript terminal emulator library.")
5211 (define-public python2-terminado
5212 (let ((terminado (package-with-python2 python-terminado)))
5213 (package (inherit terminado)
5215 `(("python2-tornado" ,python2-tornado)
5216 ("python2-backport-ssl-match-hostname"
5217 ,python2-backport-ssl-match-hostname)
5218 ,@(alist-delete "python-tornado"
5219 (package-propagated-inputs terminado)))))))
5221 (define-public python-fonttools
5223 (name "python-fonttools")
5228 "https://pypi.python.org/packages/source/F/FontTools/"
5229 "fonttools-" version ".tar.gz"))
5232 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5233 (build-system python-build-system)
5234 (arguments '(#:test-target "check"))
5236 ;; XXX: module not found if setuptools is not available.
5237 `(("python-setuptools" ,python-setuptools)))
5238 (home-page "http://github.com/behdad/fonttools")
5239 (synopsis "Tools to manipulate font files")
5241 "FontTools/TTX is a library to manipulate font files from Python. It
5242 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5243 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5244 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5245 from an XML-based format.")
5246 (license (non-copyleft "file://LICENSE.txt"
5247 "See LICENSE.txt in the distribution."))))
5249 (define-public python2-fonttools
5250 (package-with-python2 python-fonttools))
5252 (define-public python-ly
5260 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5264 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5265 (build-system python-build-system)
5267 `(("python-setuptools" ,python-setuptools)))
5268 (synopsis "Tool and library for manipulating LilyPond files")
5269 (description "This package provides a Python library to parse, manipulate
5270 or create documents in LilyPond format. A command line program ly is also
5271 provided that can be used to do various manipulations with LilyPond files.")
5272 (home-page "https://pypi.python.org/pypi/python-ly")
5275 (define-public python-appdirs
5277 (name "python-appdirs")
5283 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5288 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5289 (build-system python-build-system)
5291 `(("python-setuptools" ,python-setuptools)))
5292 (home-page "http://github.com/ActiveState/appdirs")
5294 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5296 "This module provides a portable way of finding out where user data
5297 should be stored on various operating systems.")
5298 (license license:expat)))
5300 (define-public python2-appdirs
5301 (package-with-python2 python-appdirs))
5303 (define-public python-llfuse
5305 (name "python-llfuse")
5310 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5311 "llfuse-" version ".tar.bz2"))
5314 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5315 (build-system python-build-system)
5320 `(("pkg-config" ,pkg-config)
5321 ("python-setuptools" ,python-setuptools)))
5322 (synopsis "Python bindings for FUSE")
5324 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5325 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5326 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5327 ;; The rest of the package is licensed under LGPL2.0 or later.
5328 (license (list license:expat lgpl2.0+))))
5330 (define-public python2-llfuse
5331 (package-with-python2 python-llfuse))
5333 (define-public python-msgpack
5335 (name "python-msgpack")
5340 "https://pypi.python.org/packages/source/m/"
5341 "msgpack-python/msgpack-python-" version ".tar.gz"))
5344 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5345 (build-system python-build-system)
5347 `(("python-setuptools" ,python-setuptools)))
5348 (synopsis "MessagePack (de)serializer")
5349 (description "MessagePack is a fast, compact binary serialization format,
5350 suitable for similar data to JSON. This package provides CPython bindings for
5351 reading and writing MessagePack data.")
5352 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5355 (define-public python2-msgpack
5356 (package-with-python2 python-msgpack))
5358 (define-public python-netaddr
5360 (name "python-netaddr")
5366 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5371 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5372 (build-system python-build-system)
5373 (arguments `(#:tests? #f)) ;; No tests.
5375 `(("python-setuptools" ,python-setuptools)))
5376 (home-page "https://github.com/drkjam/netaddr/")
5377 (synopsis "Pythonic manipulation of network addresses")
5379 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5380 and MAC network addresses.")
5383 (define-public python2-netaddr
5384 (package-with-python2 python-netaddr))
5386 (define-public python-wrapt
5388 (name "python-wrapt")
5394 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5399 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5400 (build-system python-build-system)
5402 ;; Tests are not included in the tarball, they are only available in the
5406 `(("python-setuptools" ,python-setuptools)))
5407 (home-page "https://github.com/GrahamDumpleton/wrapt")
5408 (synopsis "Module for decorators, wrappers and monkey patching")
5410 "The aim of the wrapt module is to provide a transparent object proxy for
5411 Python, which can be used as the basis for the construction of function
5412 wrappers and decorator functions.")
5415 (define-public python2-wrapt
5416 (package-with-python2 python-wrapt))
5418 (define-public python-iso8601
5420 (name "python-iso8601")
5426 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5431 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5432 (build-system python-build-system)
5434 `(("python-setuptools" ,python-setuptools)))
5435 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5436 (synopsis "Module to parse ISO 8601 dates")
5438 "This module parses the most common forms of ISO 8601 date strings (e.g.
5439 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5440 (license license:expat)))
5442 (define-public python2-iso8601
5443 (package-with-python2 python-iso8601))
5445 (define-public python-monotonic
5447 (name "python-monotonic")
5453 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5458 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5459 (build-system python-build-system)
5461 `(("python-setuptools" ,python-setuptools)))
5462 (home-page "https://github.com/atdt/monotonic")
5463 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5465 "This module provides a monotonic() function which returns the value (in
5466 fractional seconds) of a clock which never goes backwards.")
5469 (define-public python2-monotonic
5470 (package-with-python2 python-monotonic))
5472 (define-public python-webob
5474 (name "python-webob")
5480 "https://pypi.python.org/packages/source/W/WebOb/WebOb-"
5484 "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a"))))
5485 (build-system python-build-system)
5487 `(("python-nose" ,python-nose)
5488 ("python-setuptools" ,python-setuptools)))
5489 (home-page "http://webob.org/")
5490 (synopsis "WSGI request and response object")
5492 "WebOb provides wrappers around the WSGI request environment, and an
5493 object to help create WSGI responses.")
5494 (license license:expat)))
5496 (define-public python2-webob
5497 (package-with-python2 python-webob))
5499 (define-public python-xlrd
5501 (name "python-xlrd")
5505 (uri (string-append "https://pypi.python.org/packages/source/x/"
5506 "xlrd/xlrd-" version ".tar.gz"))
5509 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5510 (build-system python-build-system)
5513 (modify-phases %standard-phases
5514 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5515 ;; run tests instead for now.
5516 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5517 (native-inputs `(("python-nose" ,python-nose)
5518 ("python-setuptools" ,python-setuptools)))
5519 (home-page "http://www.python-excel.org/")
5520 (synopsis "Library for extracting data from Excel files")
5521 (description "This packages provides a library to extract data from
5522 spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5523 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5524 Unicode-aware. It is not intended as an end-user tool.")
5527 (define-public python2-xlrd
5528 (package-with-python2 python-xlrd))
5530 (define-public python-prettytable
5532 (name "python-prettytable")
5538 "https://pypi.python.org/packages/source/P/PrettyTable/"
5539 "prettytable-" version ".tar.bz2"))
5542 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5543 (build-system python-build-system)
5545 `(("python-setuptools" ,python-setuptools)))
5546 (home-page "http://code.google.com/p/prettytable/")
5547 (synopsis "Display tabular data in an ASCII table format")
5549 "A library designed to represent tabular data in visually appealing ASCII
5550 tables. PrettyTable allows for selection of which columns are to be printed,
5551 independent alignment of columns (left or right justified or centred) and
5552 printing of sub-tables by specifying a row range.")
5555 (define-public python2-prettytable
5556 (package-with-python2 python-prettytable))
5558 (define-public python-pyasn1
5560 (name "python-pyasn1")
5565 (uri (string-append "https://pypi.python.org/packages/source/p/"
5566 "pyasn1/pyasn1-" version ".tar.gz"))
5569 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5570 (build-system python-build-system)
5571 (home-page "http://pyasn1.sourceforge.net/")
5572 (synopsis "ASN.1 types and codecs")
5574 "This is an implementation of ASN.1 types and codecs in Python. It is
5575 suitable for a wide range of protocols based on the ASN.1 specification.")
5578 (define-public python2-pyasn1
5579 (package-with-python2 python-pyasn1))
5581 (define-public python2-ipaddress
5583 (name "python2-ipaddress")
5588 (uri (string-append "https://pypi.python.org/packages/source/i/"
5589 "ipaddress/ipaddress-" version ".tar.gz"))
5592 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5593 (build-system python-build-system)
5595 `(#:tests? #f ; no tests
5596 #:python ,python-2))
5597 (home-page "https://github.com/phihag/ipaddress")
5598 (synopsis "IP address manipulation library")
5600 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5601 in Python. This library is used to create, poke at, and manipulate IPv4 and
5602 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5603 module to older versions of Python.")
5606 (define-public python-idna
5608 (name "python-idna")
5613 (uri (string-append "https://pypi.python.org/packages/source/i/"
5614 "idna/idna-" version ".tar.gz"))
5617 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5618 (build-system python-build-system)
5620 `(("python-setuptools" ,python-setuptools)))
5621 (home-page "https://github.com/kjd/idna")
5622 (synopsis "Internationalized domain names in applications")
5624 "This is a library to support the Internationalised Domain Names in
5625 Applications (IDNA) protocol as specified in RFC 5891. This version of the
5626 protocol is often referred to as “IDNA2008” and can produce different results
5627 from the earlier standard from 2003. The library is also intended to act as a
5628 suitable drop-in replacement for the “encodings.idna” module that comes with
5629 the Python standard library but currently only supports the older 2003
5633 (define-public python2-idna
5634 (package-with-python2 python-idna))
5636 (define-public python-pretend
5638 (name "python-pretend")
5643 (uri (string-append "https://pypi.python.org/packages/source/p/"
5644 "pretend/pretend-" version ".tar.gz"))
5647 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5648 (build-system python-build-system)
5650 `(("python-setuptools" ,python-setuptools)))
5651 (home-page "https://github.com/alex/pretend")
5652 (synopsis "Library for stubbing in Python")
5654 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5655 technique for writing tests. You may hear the term mixed up with mocks,
5656 fakes, or doubles. Basically, a stub is an object that returns pre-canned
5657 responses, rather than doing any computation.")
5660 (define-public python2-pretend
5661 (package-with-python2 python-pretend))
5663 (define-public python-cryptography-vectors
5665 (name "python-cryptography-vectors")
5670 (uri (string-append "https://pypi.python.org/packages/source/c/"
5671 "cryptography-vectors/cryptography_vectors-"
5675 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
5676 (build-system python-build-system)
5678 `(("python-setuptools" ,python-setuptools)))
5679 (home-page "https://github.com/pyca/cryptography")
5680 (synopsis "Test vectors for the cryptography package.")
5682 "This package contains test vectors for the cryptography package.")
5683 ;; Distributed under either BSD-3 or ASL2.0
5684 (license (list bsd-3 asl2.0))))
5686 (define-public python2-cryptography-vectors
5687 (package-with-python2 python-cryptography-vectors))
5689 (define-public python-cryptography
5691 (name "python-cryptography")
5696 (uri (string-append "https://pypi.python.org/packages/source/c/"
5697 "cryptography/cryptography-" version ".tar.gz"))
5700 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
5701 (build-system python-build-system)
5703 `(("openssl" ,openssl)))
5705 `(("python-cffi" ,python-cffi)
5706 ("python-six" ,python-six)
5707 ("python-pyasn1" ,python-pyasn1)
5708 ("python-enum34" ,python-enum34)
5709 ("python-idna" ,python-idna)
5710 ("python-iso8601" ,python-iso8601)))
5712 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5713 ("python-setuptools" ,python-setuptools)
5714 ("python-pretend" ,python-pretend)
5715 ("python-pytest" ,python-pytest)))
5716 (home-page "https://github.com/pyca/cryptography")
5717 (synopsis "Cryptographic recipes and primitives for Python")
5719 "cryptography is a package which provides cryptographic recipes and
5720 primitives to Python developers. It aims to be the “cryptographic standard
5721 library” for Python. The package includes both high level recipes, and low
5722 level interfaces to common cryptographic algorithms such as symmetric ciphers,
5723 message digests and key derivation functions.")
5724 ;; Distributed under either BSD-3 or ASL2.0
5725 (license (list bsd-3 asl2.0))))
5727 (define-public python2-cryptography
5728 (let ((crypto (package-with-python2 python-cryptography)))
5729 (package (inherit crypto)
5731 `(("python2-ipaddress" ,python2-ipaddress)
5732 ,@(package-propagated-inputs crypto))))))
5734 (define-public python-pyopenssl
5736 (name "python-pyopenssl")
5741 (uri (string-append "https://pypi.python.org/packages/source/p/"
5742 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5745 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5746 (build-system python-build-system)
5749 (modify-phases %standard-phases
5750 (add-after 'unpack 'fix-tests
5751 (lambda* (#:key inputs #:allow-other-keys)
5752 (substitute* "OpenSSL/test/test_ssl.py"
5753 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5755 ;; FIXME: disable broken test
5756 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5757 (substitute* "OpenSSL/test/test_crypto.py"
5758 (("command = b\"openssl \"")
5759 (string-append "command = b\""
5760 (assoc-ref inputs "openssl")
5761 "/bin/openssl" " \""))
5762 ;; FIXME: disable four broken tests
5763 (("test_der") "disabled__der")
5764 (("test_digest") "disabled__digest")
5765 (("test_get_extension") "disabled__get_extension")
5766 (("test_extension_count") "disabled__extension_count"))
5769 `(("python-cryptography" ,python-cryptography)
5770 ("python-six" ,python-six)))
5772 `(("openssl" ,openssl)))
5774 `(("python-setuptools" ,python-setuptools)))
5775 (home-page "https://github.com/pyca/pyopenssl")
5776 (synopsis "Python wrapper module around the OpenSSL library")
5778 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5782 (define-public python2-pyopenssl
5783 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5784 (package (inherit pyopenssl)
5786 `(("python2-cryptography" ,python2-cryptography)
5787 ,@(alist-delete "python-cryptography"
5788 (package-propagated-inputs pyopenssl)))))))
5790 (define-public python-pip
5798 "https://pypi.python.org/packages/source/p/pip/pip-"
5802 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5803 (build-system python-build-system)
5805 `(("python-setuptools" ,python-setuptools)
5806 ("python-virtualenv" ,python-virtualenv)
5808 ("python-mock" ,python-mock)
5809 ("python-pytest" ,python-pytest)
5810 ("python-scripttest" ,python-scripttest)))
5811 (home-page "https://pip.pypa.io/")
5813 "Package manager for Python software")
5815 "Pip is a package manager for Python software, that finds packages on the
5816 Python Package Index (PyPI).")
5817 (license license:expat)))
5819 (define-public python2-pip
5820 (package-with-python2 python-pip))
5822 (define-public python-tlsh
5824 (name "python-tlsh")
5825 (version "3.4.1") ;according to CMakeLists.txt
5826 (home-page "https://github.com/trendmicro/tlsh")
5831 ;; This is a commit right after 3.4.1; see
5832 ;; <https://github.com/trendmicro/tlsh/issues/9>.
5833 (commit "3ae3f1f")))
5836 "12cvnr5ndm5cg6i7lch93id90kgwgrigjgrj8f186nh3h4bf9chj"))
5837 (file-name (string-append name "-" version "-checkout"))))
5838 (build-system cmake-build-system)
5840 '(#:out-of-source? #f
5841 #:phases (modify-phases %standard-phases
5844 (lambda* (#:key outputs #:allow-other-keys)
5845 ;; Build and install the Python bindings. The underlying
5846 ;; C++ library is apparently not meant to be installed.
5847 (let ((out (assoc-ref outputs "out")))
5848 (with-directory-excursion "py_ext"
5849 (and (system* "python" "setup.py" "build")
5850 (system* "python" "setup.py" "install"
5851 (string-append "--prefix=" out))))))))))
5852 (inputs `(("python" ,python-wrapper))) ;for the bindings
5853 (synopsis "Fuzzy matching library for Python")
5855 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5856 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5857 value which can be used for similarity comparisons. Similar objects have
5858 similar hash values, which allows for the detection of similar objects by
5859 comparing their hash values. The byte stream should have a sufficient amount
5860 of complexity; for example, a byte stream of identical bytes will not generate
5864 (define-public python2-tlsh
5866 (inherit python-tlsh)
5867 (name "python2-tlsh")
5868 (inputs `(("python" ,python-2)))))
5870 (define-public python-libarchive-c
5872 (name "python-libarchive-c")
5877 "https://pypi.python.org/packages/source/l/libarchive-c/libarchive-c-"
5881 "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n"))))
5882 (build-system python-build-system)
5884 '(#:phases (modify-phases %standard-phases
5886 'build 'reference-libarchive
5887 (lambda* (#:key inputs #:allow-other-keys)
5888 ;; Retain the absolute file name of libarchive.so.
5889 (let ((libarchive (assoc-ref inputs "libarchive")))
5890 (substitute* "libarchive/ffi.py"
5891 (("find_library\\('archive'\\)")
5892 (string-append "'" libarchive
5893 "/lib/libarchive.so'"))))
5895 ;; Do not make a compressed egg (see
5896 ;; <http://bugs.gnu.org/20765>).
5897 (let ((port (open-file "setup.cfg" "a")))
5898 (display "\n[easy_install]\nzip_ok = 0\n"
5903 `(("python-setuptools" ,python-setuptools)
5904 ("libarchive" ,libarchive)))
5905 (home-page "https://github.com/Changaco/python-libarchive-c")
5906 (synopsis "Python interface to libarchive")
5908 "This package provides Python bindings to libarchive, a C library to
5909 access possibly compressed archives in many different formats. It uses
5910 Python's @code{ctypes} foreign function interface (FFI).")
5911 (license lgpl2.0+)))
5913 (define-public python2-libarchive-c
5914 (package-with-python2 python-libarchive-c))
5916 (define-public python-file
5919 (name "python-file")
5920 (build-system python-build-system)
5922 '(#:tests? #f ;no tests
5923 #:phases (modify-phases %standard-phases
5924 (add-before 'build 'change-directory
5928 (add-before 'build 'set-library-file-name
5929 (lambda* (#:key inputs #:allow-other-keys)
5930 (let ((file (assoc-ref inputs "file")))
5931 (substitute* "magic.py"
5932 (("find_library\\('magic'\\)")
5933 (string-append "'" file "/lib/libmagic.so'")))
5935 (inputs `(("file" ,file)))
5936 (self-native-input? #f)
5937 (synopsis "Python bindings to the libmagic file type guesser")))
5939 (define-public python2-file
5940 (package-with-python2 python-file))
5942 (define-public python-debian
5944 (name "python-debian")
5950 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
5954 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
5955 (build-system python-build-system)
5957 `(("python-six" ,python-six)))
5959 `(("python-setuptools" ,python-setuptools)))
5960 (home-page "http://packages.debian.org/sid/python-debian")
5961 (synopsis "Debian package related modules")
5963 ;; XXX: Use @enumerate instead of @itemize to work around
5964 ;; <http://bugs.gnu.org/21772>.
5965 "This package provides Python modules that abstract many formats of
5966 Debian-related files, such as:
5969 @item Debtags information;
5970 @item @file{debian/changelog} files;
5971 @item packages files, pdiffs;
5972 @item control files of single or multiple RFC822-style paragraphs---e.g.
5973 @file{debian/control}, @file{.changes}, @file{.dsc};
5974 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
5975 contained files and meta-information.
5978 ;; Modules are either GPLv2+ or GPLv3+.
5981 (define-public python2-debian
5982 (package-with-python2 python-debian))
5984 (define-public python-chardet
5986 (name "python-chardet")
5992 "https://pypi.python.org/packages/source/c/chardet/chardet-"
5997 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
5998 (build-system python-build-system)
6000 `(("python-setuptools" ,python-setuptools)))
6001 (home-page "https://github.com/chardet/chardet")
6002 (synopsis "Universal encoding detector for Python 2 and 3")
6004 "This package provides @code{chardet}, a Python module that can
6005 automatically detect a wide range of file encodings.")
6006 (license lgpl2.1+)))
6008 (define-public python2-chardet
6009 (package-with-python2 python-chardet))
6011 (define-public python-zope-event
6013 (name "python-zope-event")
6018 (uri (string-append "https://pypi.python.org/packages/source/z"
6019 "/zope.event/zope.event-" version ".tar.gz"))
6022 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6023 (build-system python-build-system)
6025 `(("python-setuptools" ,python-setuptools)))
6026 (home-page "http://pypi.python.org/pypi/zope.event")
6027 (synopsis "Event publishing system for Python")
6028 (description "Zope.event provides an event publishing API, intended for
6029 use by applications which are unaware of any subscribers to their events. It
6030 is a simple event-dispatching system on which more sophisticated event
6031 dispatching systems can be built.")
6034 (define-public python2-zope-event
6035 (package-with-python2 python-zope-event))
6037 (define-public python-zope-interface
6039 (name "python-zope-interface")
6044 (uri (string-append "https://pypi.python.org/packages/source/z"
6045 "/zope.interface/zope.interface-" version ".tar.gz"))
6048 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6049 (build-system python-build-system)
6051 `(("python-zope-event" ,python-zope-event)))
6052 (home-page "https://github.com/zopefoundation/zope.interface")
6053 (synopsis "Python implementation of the \"design by contract\"
6055 (description "Zope.interface provides an implementation of \"object
6056 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6057 conforming to a given API or contract.")
6060 (define-public python2-zope-interface
6061 (package-with-python2 python-zope-interface))
6063 (define-public python-zope-exceptions
6065 (name "python-zope-exceptions")
6070 (uri (string-append "https://pypi.python.org/packages/source/z"
6071 "/zope.exceptions/zope.exceptions-"
6075 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6076 (build-system python-build-system)
6078 '(#:tests? #f)) ; circular dependency with zope.testrunner
6080 `(("python-zope-interface" ,python-zope-interface)))
6081 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6082 (synopsis "Zope exceptions")
6083 (description "Zope.exceptions provides general-purpose exception types
6084 that have uses outside of the Zope framework.")
6087 (define-public python2-zope-exceptions
6088 (package-with-python2 python-zope-exceptions))
6090 (define-public python-zope-testing
6092 (name "python-zope-testing")
6097 (uri (string-append "https://pypi.python.org/packages/source/z"
6098 "/zope.testing/zope.testing-" version ".tar.gz"))
6101 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6102 (build-system python-build-system)
6104 `(("python-zope-exceptions" ,python-zope-exceptions)))
6106 `(("python-zope-interface" ,python-zope-interface)))
6107 (home-page "http://pypi.python.org/pypi/zope.testing")
6108 (synopsis "Zope testing helpers")
6109 (description "Zope.testing provides a number of testing utilities for HTML
6110 forms, HTTP servers, regular expressions, and more.")
6113 (define-public python2-zope-testing
6114 (package-with-python2 python-zope-testing))
6116 (define-public python-zope-testrunner
6118 (name "python-zope-testrunner")
6123 (uri (string-append "https://pypi.python.org/packages/source/z"
6124 "/zope.testrunner/zope.testrunner-"
6128 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6129 (build-system python-build-system)
6131 `(("python-six" ,python-six)
6132 ("python-zope-exceptions" ,python-zope-exceptions)
6133 ("python-zope-testing" ,python-zope-testing)
6136 `(("python-zope-interface" ,python-zope-interface)))
6137 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6138 (synopsis "Zope testrunner script")
6139 (description "Zope.testrunner provides a script for running Python
6143 (define-public python2-zope-testrunner
6144 (let ((base (package-with-python2 python-zope-testrunner)))
6148 (append (package-native-inputs base)
6149 `(("python2-subunit" ,python2-subunit)
6150 ("python2-mimeparse" ,python2-mimeparse)))))))
6152 (define-public python-zope-i18nmessageid
6154 (name "python-zope-i18nmessageid")
6160 "https://pypi.python.org/packages/source/z"
6161 "/zope.i18nmessageid/zope.i18nmessageid-"
6165 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6166 (build-system python-build-system)
6168 `(("python-setuptools" ,python-setuptools)))
6169 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6170 (synopsis "Message identifiers for internationalization")
6171 (description "Zope.i18nmessageid provides facilities for declaring
6172 internationalized messages within program source text.")
6175 (define-public python2-zope-i18nmessageid
6176 (package-with-python2 python-zope-i18nmessageid))