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, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages python)
37 #:use-module ((guix licenses)
38 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
39 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
40 isc psfl public-domain x11-style zpl2.1))
41 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages attr)
44 #:use-module (gnu packages backup)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages databases)
47 #:use-module (gnu packages file)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages ghostscript)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages icu4c)
54 #:use-module (gnu packages image)
55 #:use-module (gnu packages imagemagick)
56 #:use-module (gnu packages libffi)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages maths)
59 #:use-module (gnu packages multiprecision)
60 #:use-module (gnu packages networking)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages pcre)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages readline)
66 #:use-module (gnu packages statistics)
67 #:use-module (gnu packages texlive)
68 #:use-module (gnu packages texinfo)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages web)
71 #:use-module (gnu packages base)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages zip)
75 #:use-module (gnu packages tcl)
76 #:use-module (guix packages)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module (guix utils)
80 #:use-module (guix build-system gnu)
81 #:use-module (guix build-system cmake)
82 #:use-module (guix build-system python)
83 #:use-module (guix build-system trivial)
84 #:use-module (srfi srfi-1))
86 (define-public python-2
93 (uri (string-append "https://www.python.org/ftp/python/"
94 version "/Python-" version ".tar.xz"))
97 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
98 (patches (map search-patch
99 '("python-2.7-search-paths.patch"
100 "python-2-deterministic-build-info.patch"
101 "python-2.7-source-date-epoch.patch")))))
103 "tk")) ;tkinter; adds 50 MiB to the closure
104 (build-system gnu-build-system)
109 ;; test_distutils test_shutil test_signal test_site test_slice
110 ;; test_smtplib test_smtpnet test_socket test_socketserver
111 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
112 ;; test_startfile test_stat test_str test_strftime test_string
113 ;; test_stringprep test_strop test_strptime test_strtod test_struct
114 ;; test_structmembers test_structseq test_subprocess test_sunau
115 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
116 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
117 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
118 ;; test_threaded_import test_threadedtempfile test_threading
119 ;; test_threading_local test_threadsignals test_time test_timeit
120 ;; test_timeout test_tk test_tokenize test_tools test_trace
121 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
122 ;; test_tuple test_typechecks test_ucn test_unary
123 ;; test_undocumented_details test_unicode test_unicode_file
124 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
125 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
126 ;; test_urllibnet test_urlparse test_userdict test_userlist
127 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
128 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
129 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
130 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
131 ;; test_xpickle test_xrange test_zipfile test_zipfile64
132 ;; test_zipimport test_zipimport_support test_zlib
134 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
135 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
136 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
137 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
138 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
139 ;; test_macostools test_msilib test_nis test_ossaudiodev
140 ;; test_scriptpackages
141 ;; 6 skips unexpected on linux2:
142 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
143 ;; One of the typical errors:
145 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
146 ;; such file or directory
149 (list "--enable-shared" ;allow embedding
150 "--with-system-ffi" ;build ctypes
151 (string-append "LDFLAGS=-Wl,-rpath="
152 (assoc-ref %outputs "out") "/lib"))
154 #:modules ((ice-9 ftw) (ice-9 match)
155 (guix build utils) (guix build gnu-build-system))
157 (modify-phases %standard-phases
159 'configure 'patch-lib-shells
161 ;; Filter for existing files, since some may not exist in all
162 ;; versions of python that are built with this recipe.
163 (substitute* (filter file-exists?
164 '("Lib/subprocess.py"
166 "Lib/distutils/tests/test_spawn.py"
167 "Lib/test/test_subprocess.py"))
168 (("/bin/sh") (which "sh")))
170 ;; Use zero as the timestamp in .pyc files so that builds are
171 ;; deterministic. TODO: Remove it when this variable is set in
172 ;; gnu-build-system.scm.
173 (setenv "SOURCE_DATE_EPOCH" "1")
175 (add-before 'configure 'do-not-record-configure-flags
176 (lambda* (#:key configure-flags #:allow-other-keys)
177 ;; Remove configure flags from the installed '_sysconfigdata.py'
178 ;; and 'Makefile' so we don't end up keeping references to the
181 ;; Preserve at least '--with-system-ffi' since otherwise the
182 ;; thing tries to build libffi, fails, and we end up with a
183 ;; Python that lacks ctypes.
184 (substitute* "configure"
185 (("^CONFIG_ARGS=.*$")
186 (format #f "CONFIG_ARGS='~a'\n"
187 (if (member "--with-system-ffi" configure-flags)
194 ;; 'Lib/test/test_site.py' needs a valid $HOME
195 (setenv "HOME" (getcwd))
198 'unpack 'set-source-file-times-to-1980
199 ;; XXX One of the tests uses a ZIP library to pack up some of the
200 ;; source tree, and fails with "ZIP does not support timestamps
201 ;; before 1980". Work around this by setting the file times in the
202 ;; source tree to sometime in early 1980.
204 (let ((circa-1980 (* 10 366 24 60 60)))
205 (ftw "." (lambda (file stat flag)
206 (utime file circa-1980 circa-1980)
209 (add-after 'install 'move-tk-inter
210 (lambda* (#:key outputs #:allow-other-keys)
211 ;; When Tkinter support is built move it to a separate output so
212 ;; that the main output doesn't contain a reference to Tcl/Tk.
213 (let ((out (assoc-ref outputs "out"))
214 (tk (assoc-ref outputs "tk")))
216 (match (find-files out "tkinter.*\\.so")
218 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
219 ;; want it under TK/lib/pythonX.Y/site-packages.
220 (let* ((len (string-length out))
221 (target (string-append
224 (dirname (dirname tkinter.so))
227 (install-file tkinter.so target)
228 (delete-file tkinter.so)))))
233 ("libffi" ,libffi) ; for ctypes
234 ("sqlite" ,sqlite) ; for sqlite extension
236 ("readline" ,readline)
239 ("tk" ,tk))) ; for tkinter
241 `(("pkg-config" ,pkg-config)))
243 (list (search-path-specification
244 (variable "PYTHONPATH")
245 (files '("lib/python2.7/site-packages")))))
246 (home-page "http://python.org")
247 (synopsis "High-level, dynamically-typed programming language")
249 "Python is a remarkably powerful dynamic programming language that
250 is used in a wide variety of application domains. Some of its key
251 distinguishing features include: clear, readable syntax; strong
252 introspection capabilities; intuitive object orientation; natural
253 expression of procedural code; full modularity, supporting hierarchical
254 packages; exception-based error handling; and very high level dynamic
258 (define-public python
259 (package (inherit python-2)
263 (uri (string-append "https://www.python.org/ftp/python/"
264 version "/Python-" version ".tar.xz"))
265 (patches (map search-patch
266 '("python-fix-tests.patch"
267 ;; XXX Try removing this patch for python > 3.4.3
268 "python-disable-ssl-test.patch"
269 "python-3-deterministic-build-info.patch"
270 "python-3-search-paths.patch")))
271 (patch-flags '("-p0"))
274 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
275 (arguments (substitute-keyword-arguments (package-arguments python-2)
278 (list (search-path-specification
279 (variable "PYTHONPATH")
280 (files (list (string-append "lib/python"
281 (version-major+minor version)
282 "/site-packages"))))))))
284 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
285 ;; Python (Tk -> libxcb -> Python.)
287 (define-public python2-minimal
288 (package (inherit python-2)
289 (name "python-minimal")
292 (substitute-keyword-arguments (package-arguments python-2)
293 ((#:configure-flags cf)
294 `(append ,cf '("--without-system-ffi")))))
295 (inputs '()))) ;none of the optional dependencies
297 (define-public python-minimal
298 (package (inherit python)
299 (name "python-minimal")
302 (substitute-keyword-arguments (package-arguments python)
303 ((#:configure-flags cf)
304 `(append ,cf '("--without-system-ffi")))))
306 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
307 ;; zlib is required by 'zipimport', used by pip.
308 (inputs `(("openssl" ,openssl)
311 (define* (wrap-python3 python #:optional (name "python-wrapper"))
312 (package (inherit python)
315 (build-system trivial-build-system)
317 (propagated-inputs `(("python" ,python)))
319 `(#:modules ((guix build utils))
322 (use-modules (guix build utils))
323 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
324 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
328 (symlink (string-append python old)
329 (string-append bin "/" new)))
330 `("python3", "pydoc3", "idle3")
331 `("python", "pydoc", "idle"))))))
332 (synopsis "Wrapper for the Python 3 commands")
334 "This package provides wrappers for the commands of Python@tie{}3.x such
335 that they can be invoked under their usual name---e.g., @command{python}
336 instead of @command{python3}.")))
338 (define-public python-wrapper (wrap-python3 python))
339 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
341 (define-public python-psutil
343 (name "python-psutil")
348 (uri (pypi-uri "psutil" version))
351 "11bd1555vf2ibjnmqf64im5cp55vcqfq45ccinm9ll3bs68na6s2"))))
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")
377 (uri (pypi-uri "passlib" version))
380 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
381 (build-system python-build-system)
383 `(("python-nose" ,python-nose)
384 ("python-setuptools" ,python-setuptools)))
386 `(("python-py-bcrypt" ,python-py-bcrypt)))
390 'check 'set-PYTHON_EGG_CACHE
391 ;; some tests require access to "$HOME/.cython"
392 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
394 (home-page "https://bitbucket.org/ecollins/passlib")
396 "Comprehensive password hashing framework")
398 "Passlib is a password hashing library for Python 2 & 3, which provides
399 cross-platform implementations of over 30 password hashing algorithms, as well
400 as a framework for managing existing password hashes. It's designed to be
401 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
402 to providing full-strength password hashing for multi-user application.")
405 (define-public python2-passlib
406 (package-with-python2 python-passlib))
408 (define-public python-py-bcrypt
410 (name "python-py-bcrypt")
416 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
421 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
422 (build-system python-build-system)
424 `(("python-setuptools" ,python-setuptools)))
425 (home-page "https://code.google.com/p/py-bcrypt")
427 "Bcrypt password hashing and key derivation")
429 "A python wrapper of OpenBSD's Blowfish password hashing code. This
430 system hashes passwords using a version of Bruce Schneier's Blowfish block
431 cipher with modifications designed to raise the cost of off-line password
432 cracking and frustrate fast hardware implementation. The computation cost of
433 the algorithm is parametised, so it can be increased as computers get faster.
434 The intent is to make a compromise of a password database less likely to
435 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
437 ;; "sha2.c" is under BSD-3;
438 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
439 ;; the rest is under ISC.
440 (license (list isc bsd-3 bsd-4))))
442 (define-public python2-py-bcrypt
443 (package-with-python2 python-py-bcrypt))
446 (define-public python-paramiko
448 (name "python-paramiko")
454 "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
459 "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
460 (build-system python-build-system)
462 `(("python-setuptools" ,python-setuptools)))
464 `(("python-pycrypto" ,python-pycrypto)))
466 `(("python-ecdsa" ,python-ecdsa)))
467 (home-page "http://www.paramiko.org/")
468 (synopsis "SSHv2 protocol library")
469 (description "Paramiko is a python implementation of the SSHv2 protocol,
470 providing both client and server functionality. While it leverages a Python C
471 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
472 Python interface around SSH networking concepts.")
475 (define-public python2-paramiko
476 (package-with-python2 python-paramiko))
479 (define-public python-httplib2
481 (name "python-httplib2")
487 "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
492 "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
493 (build-system python-build-system)
495 `(("python-setuptools" ,python-setuptools)))
497 "https://github.com/jcgregorio/httplib2")
498 (synopsis "Comprehensive HTTP client library")
500 "A comprehensive HTTP client library supporting many features left out of
501 other HTTP libraries.")
502 (license license:expat)))
504 (define-public python2-httplib2
505 (package-with-python2 python-httplib2))
507 (define-public python-ecdsa
509 (name "python-ecdsa")
515 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
520 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
521 (build-system python-build-system)
523 `(("python-setuptools" ,python-setuptools)))
525 `(("openssl" ,openssl)))
527 "http://github.com/warner/python-ecdsa")
529 "ECDSA cryptographic signature library (pure python)")
531 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
532 Curve Digital Signature Algorithm), implemented purely in Python. With this
533 library, you can quickly create keypairs (signing key and verifying key), sign
534 messages, and verify the signatures. The keys and signatures are very short,
535 making them easy to handle and incorporate into other protocols.")
536 (license license:expat)))
538 (define-public python2-ecdsa
539 (package-with-python2 python-ecdsa))
541 (define-public python-ccm
549 "https://pypi.python.org/packages/source/c/ccm/ccm-"
554 "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
555 (build-system python-build-system)
557 `(("python-setuptools" ,python-setuptools)))
559 `(("python-pyyaml" ,python-pyyaml)
560 ("python-six" ,python-six)))
561 (home-page "https://github.com/pcmanus/ccm")
562 (synopsis "Cassandra Cluster Manager")
563 (description "A script/library to create, launch and remove an Apache
564 Cassandra cluster on localhost.")
567 (define-public python2-ccm
568 (package-with-python2 python-ccm))
570 (define-public python-pytz
577 (uri (pypi-uri "pytz" version))
580 "1spgdfp1ssya7v3kww7zp71xpj437skpqazcvqr3kr1p1brnw9lr"))))
581 (build-system python-build-system)
582 (arguments `(#:tests? #f)) ; no test target
583 (home-page "http://pythonhosted.org/pytz")
584 (synopsis "Python timezone library")
586 "This library allows accurate and cross platform timezone calculations
587 using Python 2.4 or higher and provides access to the Olson timezone database.")
588 (license license:expat)))
590 (define-public python2-pytz
591 (package-with-python2 python-pytz))
594 (define-public python-babel
596 (name "python-babel")
601 (uri (pypi-uri "Babel" version))
604 "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
605 (build-system python-build-system)
607 `(("python-pytz" ,python-pytz)
608 ("python-setuptools" ,python-setuptools)))
609 (arguments `(#:tests? #f)) ; no test target
610 (home-page "http://babel.pocoo.org/")
612 "Tools for internationalizing Python applications")
614 "Babel is composed of two major parts:
615 - tools to build and work with gettext message catalogs
616 - a Python interface to the CLDR (Common Locale Data Repository), providing
617 access to various locale display names, localized number and date formatting,
621 (define-public python2-babel
622 (package-with-python2 python-babel))
624 (define-public python2-backport-ssl-match-hostname
626 (name "python2-backport-ssl-match-hostname")
632 "https://pypi.python.org/packages/source/b/"
633 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
637 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
638 (build-system python-build-system)
639 (arguments `(#:python ,python-2))
641 `(("python2-setuptools" ,python2-setuptools)))
642 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
643 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
645 "This backport brings the ssl.match_hostname() function to users of
646 earlier versions of Python. The function checks the hostname in the
647 certificate returned by the server to which a connection has been established,
648 and verifies that it matches the intended target hostname.")
651 (define-public python-h5py
658 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
662 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
663 (build-system python-build-system)
665 `(#:tests? #f ; no test target
667 (modify-phases %standard-phases
668 (add-after 'unpack 'fix-hdf5-paths
669 (lambda* (#:key inputs #:allow-other-keys)
670 (let ((prefix (assoc-ref inputs "hdf5")))
671 (substitute* "setup_build.py"
672 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
673 (string-append "['" prefix "/lib" "']"))
674 (("'/opt/local/include', '/usr/local/include'")
675 (string-append "'" prefix "/include" "'")))
676 (substitute* "setup_configure.py"
677 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
678 (string-append "['" prefix "/lib" "']")))
681 `(("python-numpy" ,python-numpy)))
685 `(("python-cython" ,python-cython)))
686 (home-page "http://www.h5py.org/")
687 (synopsis "Read and write HDF5 files from Python")
689 "The h5py package provides both a high- and low-level interface to the
690 HDF5 library from Python. The low-level interface is intended to be a
691 complete wrapping of the HDF5 API, while the high-level component supports
692 access to HDF5 files, datasets and groups using established Python and NumPy
696 (define-public python2-h5py
697 (let ((h5py (package-with-python2 python-h5py)))
698 (package (inherit h5py)
700 `(("python2-numpy" ,python2-numpy)
703 (package-propagated-inputs h5py)))))))
705 (define-public python-lockfile
707 (name "python-lockfile")
712 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
713 "lockfile-" version ".tar.gz"))
716 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
717 (build-system python-build-system)
718 (arguments '(#:test-target "check"))
719 (home-page "http://code.google.com/p/pylockfile/")
720 (synopsis "Platform-independent file locking module")
722 "The lockfile package exports a LockFile class which provides a simple
723 API for locking files.")
724 (license license:expat)))
726 (define-public python2-lockfile
727 (package-with-python2 python-lockfile))
729 (define-public python-mock
736 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
737 "mock-" version ".tar.gz"))
740 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
741 (build-system python-build-system)
742 (arguments '(#:test-target "check"))
743 (home-page "http://code.google.com/p/mock/")
744 (synopsis "Python mocking and patching library for testing")
746 "Mock is a library for testing in Python. It allows you to replace parts
747 of your system under test with mock objects and make assertions about how they
749 (license license:expat)))
751 (define-public python2-mock
752 (package-with-python2 python-mock))
755 (define-public python-setuptools
757 (name "python-setuptools")
762 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
766 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
767 (build-system python-build-system)
768 ;; FIXME: Tests require pytest, which itself relies on setuptools.
769 ;; One could bootstrap with an internal untested setuptools.
772 (home-page "https://pypi.python.org/pypi/setuptools")
774 "Library designed to facilitate packaging Python projects")
776 "Setuptools is a fully-featured, stable library designed to facilitate
777 packaging Python projects, where packaging includes:
778 Python package and module definitions,
779 distribution package metadata,
781 project installation,
782 platform-specific details,
786 (define-public python2-setuptools
787 (package-with-python2 python-setuptools))
790 (define-public python-pycrypto
792 (name "python-pycrypto")
797 (uri (string-append "https://pypi.python.org/packages/source/p/"
798 "pycrypto/pycrypto-" version ".tar.gz"))
801 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
802 (build-system python-build-system)
804 `(("python-setuptools" ,python-setuptools)))
811 'build 'set-build-env
812 ;; pycrypto runs an autoconf configure script behind the scenes
814 (setenv "CONFIG_SHELL" (which "bash")))
816 (home-page "http://www.pycrypto.org/")
817 (synopsis "Cryptographic modules for Python")
819 "Pycrypto is a collection of both secure hash functions (such as SHA256
820 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
821 etc.). The package is structured to make adding new modules easy.")
822 (license public-domain)))
824 (define-public python2-pycrypto
825 (let ((pycrypto (package-with-python2 python-pycrypto)))
826 (package (inherit pycrypto)
828 `(("python" ,python-2)
831 (package-inputs pycrypto)))))))
833 (define-public python-keyring
835 (name "python-keyring")
840 (uri (pypi-uri "keyring" version))
843 "1h7a1r9ick7wdd0xb5p63413nvjadna2xawrsvmklsl5ddhm5wrx"))))
844 (build-system python-build-system)
846 `(("python-setuptools" ,python-setuptools)
847 ("python-setuptools-scm" ,python-setuptools-scm)
848 ("python-mock" ,python-mock)))
850 `(("python-pycrypto" ,python-pycrypto)))
852 `(#:tests? #f)) ;TODO: tests require pytest
853 (home-page "http://bitbucket.org/kang/python-keyring-lib")
854 (synopsis "Store and access your passwords safely")
856 "The Python keyring lib provides a easy way to access the system keyring
857 service from python. It can be used in any application that needs safe
859 ;; "MIT" and PSF dual license
862 (define-public python2-keyring
863 (let ((keyring (package-with-python2 python-keyring)))
864 (package (inherit keyring)
866 `(("python2-pycrypto" ,python2-pycrypto))))))
868 (define-public python-six
875 (uri (pypi-uri "six" version))
878 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
879 (build-system python-build-system)
881 `(("python-setuptools" ,python-setuptools)))
882 (home-page "http://pypi.python.org/pypi/six/")
883 (synopsis "Python 2 and 3 compatibility utilities")
885 "Six is a Python 2 and 3 compatibility library. It provides utility
886 functions for smoothing over the differences between the Python versions with
887 the goal of writing Python code that is compatible on both Python versions.
888 Six supports every Python version since 2.5. It is contained in only one
889 Python file, so it can be easily copied into your project.")
892 (define-public python2-six
893 (package-with-python2 python-six))
895 (define-public python-dateutil-2
897 (name "python-dateutil")
902 (uri (string-append "https://pypi.python.org/packages/source/p/"
903 name "/" name "-" version ".tar.gz"))
906 "0ggbm2z72p0nwjqgvpw8s5bqzwayqiqv2iws0x2a605m3mf4959y"))))
907 (build-system python-build-system)
909 `(("python-setuptools" ,python-setuptools)
910 ("python-six" ,python-six)))
911 (home-page "http://labix.org/python-dateutil")
912 (synopsis "Extensions to the standard datetime module")
914 "The dateutil module provides powerful extensions to the standard
915 datetime module, available in Python 2.3+.")
918 (define-public python2-dateutil-2
919 (package-with-python2 python-dateutil-2))
921 (define-public python-dateutil
923 (name "python-dateutil")
924 (version "1.5") ; last version for python < 3
928 (uri (string-append "http://labix.org/download/python-dateutil/"
929 "python-dateutil-" version ".tar.gz"))
932 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
933 (build-system python-build-system)
935 `(("python-setuptools" ,python-setuptools)))
936 (home-page "http://labix.org/python-dateutil")
937 (synopsis "Extensions to the standard datetime module")
939 "The dateutil module provides powerful extensions to the standard
940 datetime module, available in Python 2.3+.")
943 (define-public python2-dateutil
944 (package-with-python2 python-dateutil))
946 (define-public python-parsedatetime
948 (name "python-parsedatetime")
953 (uri (string-append "https://pypi.python.org/packages/source/p/"
954 "parsedatetime/parsedatetime-" version ".tar.gz"))
957 "1as0mm4ql3z0324nc9bys2s1ngh507i317p16b79rx86wlmvx9ix"))))
958 (build-system python-build-system)
960 `(("python-setuptools" ,python-setuptools)))
961 (home-page "http://github.com/bear/parsedatetime/")
963 "Parse human-readable date/time text")
965 "Parse human-readable date/time text.")
968 (define-public python2-parsedatetime
969 (package-with-python2 python-parsedatetime))
971 (define-public python-pandas
973 (name "python-pandas")
978 (uri (string-append "https://pypi.python.org/packages/source/p/"
979 "pandas/pandas-" version ".tar.gz"))
981 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
982 (build-system python-build-system)
984 `(;; Three tests fail:
985 ;; - test_read_google
987 ;; - test_month_range_union_tz_dateutil
990 `(("python-numpy" ,python-numpy)
991 ("python-pytz" ,python-pytz)
992 ("python-dateutil" ,python-dateutil-2)))
994 `(("python-nose" ,python-nose)
995 ("python-setuptools" ,python-setuptools)))
996 (home-page "http://pandas.pydata.org")
997 (synopsis "Data structures for data analysis, time series, and statistics")
999 "Pandas is a Python package providing fast, flexible, and expressive data
1000 structures designed to make working with structured (tabular,
1001 multidimensional, potentially heterogeneous) and time series data both easy
1002 and intuitive. It aims to be the fundamental high-level building block for
1003 doing practical, real world data analysis in Python.")
1006 (define-public python2-pandas
1007 (let ((pandas (package-with-python2 python-pandas)))
1008 (package (inherit pandas)
1010 `(("python2-numpy" ,python2-numpy)
1011 ,@(alist-delete "python-numpy"
1012 (package-propagated-inputs pandas)))))))
1014 (define-public python-tzlocal
1016 (name "python-tzlocal")
1021 (uri (pypi-uri "tzlocal" version))
1024 "12wsw2fl3adrqrwghasld57bhqdrzn0crblqrci1p5acd0ni53s3"))))
1025 (build-system python-build-system)
1026 (propagated-inputs `(("python-pytz" ,python-pytz)))
1027 (home-page "https://github.com/regebro/tzlocal")
1029 "Local timezone information for Python")
1031 "Tzlocal returns a tzinfo object with the local timezone information.
1032 This module attempts to fix a glaring hole in pytz, that there is no way to
1033 get the local timezone information, unless you know the zoneinfo name, and
1034 under several distributions that's hard or impossible to figure out.")
1037 (define-public python-pysam
1039 (name "python-pysam")
1044 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
1048 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
1049 (build-system python-build-system)
1051 `(#:tests? #f ; tests are excluded in the manifest
1056 (setenv "LDFLAGS" "-lncurses")
1057 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
1060 `(("python-cython" ,python-cython)
1061 ("python-setuptools" ,python-setuptools)
1062 ("ncurses" ,ncurses)
1064 (home-page "https://github.com/pysam-developers/pysam")
1065 (synopsis "Python bindings to the SAMtools C API")
1067 "Pysam is a Python module for reading and manipulating files in the
1068 SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1069 also includes an interface for tabix.")
1070 (license license:expat)))
1072 (define-public python2-pysam
1073 (package-with-python2 python-pysam))
1075 (define-public python2-pysqlite
1077 (name "python2-pysqlite")
1078 (version "2.6.3a") ; see below
1082 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
1083 ;; tarball was modified, but the version number was kept:
1084 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
1085 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
1087 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
1091 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1092 (build-system python-build-system)
1094 `(("sqlite" ,sqlite)))
1096 `(#:python ,python-2 ; incompatible with Python 3
1097 #:tests? #f)) ; no test target
1098 (home-page "https://pypi.python.org/pypi/pysqlite")
1099 (synopsis "SQLite bindings for Python")
1101 "Pysqlite provides SQLite bindings for Python that comply to the
1102 Database API 2.0T.")
1103 (license license:zlib)))
1106 (define-public python2-mechanize
1108 (name "python2-mechanize")
1113 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1117 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1118 (build-system python-build-system)
1120 `(("python2-setuptools" ,python2-setuptools)))
1122 `(#:python ,python-2 ; apparently incompatible with Python 3
1124 ;; test fails with message
1125 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1126 ;; (python-3.3.2) or
1127 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1129 ;; The source code is from March 2011 and probably not up-to-date
1130 ;; with respect to python unit tests.
1131 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1133 "Stateful programmatic web browsing in Python")
1135 "Mechanize implements stateful programmatic web browsing in Python,
1136 after Andy Lester’s Perl module WWW::Mechanize.")
1137 (license (non-copyleft "file://COPYING"
1138 "See COPYING in the distribution."))))
1141 (define-public python-simplejson
1143 (name "python-simplejson")
1148 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1152 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1153 (build-system python-build-system)
1154 (home-page "http://simplejson.readthedocs.org/en/latest/")
1156 "Json library for Python")
1158 "JSON (JavaScript Object Notation) is a subset of JavaScript
1159 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1162 Simplejson exposes an API familiar to users of the standard library marshal
1163 and pickle modules. It is the externally maintained version of the json
1164 library contained in Python 2.6, but maintains compatibility with Python 2.5
1165 and (currently) has significant performance advantages, even without using
1166 the optional C extension for speedups. Simplejson is also supported on
1170 (define-public python2-simplejson
1171 (package-with-python2 python-simplejson))
1174 (define-public python2-pyicu
1176 (name "python2-pyicu")
1181 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1185 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
1186 (build-system python-build-system)
1188 `(("icu4c" ,icu4c)))
1190 `(#:python ,python-2 ; Python 3 works also, but needs special care for
1191 ; linking with libpython3.3m
1192 #:tests? #f)) ; no check target
1193 (home-page "http://pyicu.osafoundation.org/")
1194 (synopsis "Python extension wrapping the ICU C++ API")
1196 "PyICU is a python extension wrapping the ICU C++ API.")
1199 (define-public python2-dogtail
1200 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1201 ;; spaces in indentation" with Python 3.
1203 (name "python2-dogtail")
1208 "https://fedorahosted.org/released/dogtail/dogtail-"
1212 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1213 (build-system python-build-system)
1214 (arguments `(#:python ,python-2
1215 #:tests? #f)) ; invalid command "test"
1216 (home-page "https://fedorahosted.org/dogtail/")
1217 (synopsis "GUI test tool and automation framework written in Python")
1219 "Dogtail is a GUI test tool and automation framework written in Python.
1220 It uses Accessibility (a11y) technologies to communicate with desktop
1221 applications. dogtail scripts are written in Python and executed like any
1222 other Python program.")
1225 (define-public python2-empy
1227 (name "python2-empy")
1231 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1235 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1236 (build-system python-build-system)
1238 `(#:python ,python-2
1239 #:phases (alist-replace
1242 (zero? (system* "./test.sh")))
1244 (home-page "http://www.alcyone.com/software/empy/")
1245 (synopsis "Templating system for Python")
1247 "EmPy is a system for embedding Python expressions and statements in
1248 template text; it takes an EmPy source file, processes it, and produces
1249 output. This is accomplished via expansions, which are special signals to the
1250 EmPy system and are set off by a special prefix (by default the at sign, @@).
1251 EmPy can expand arbitrary Python expressions and statements in this way, as
1252 well as a variety of special forms. Textual data not explicitly delimited in
1253 this way is sent unaffected to the output, allowing Python to be used in
1254 effect as a markup language. Also supported are callbacks via hooks,
1255 recording and playback via diversions, and dynamic, chainable filters. The
1256 system is highly configurable via command line options and embedded
1258 (license lgpl2.1+)))
1260 (define-public python2-element-tree
1262 (name "python2-element-tree")
1267 "http://effbot.org/media/downloads/elementtree-"
1268 version "-20050316.tar.gz"))
1271 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1272 (build-system python-build-system)
1274 `(#:python ,python-2 ; seems to be part of Python 3
1275 #:tests? #f)) ; no 'test' sub-command
1276 (synopsis "Toolkit for XML processing in Python")
1278 "ElementTree is a Python library supporting lightweight XML processing.")
1279 (home-page "http://effbot.org/zone/element-index.htm")
1280 (license (x11-style "http://docs.python.org/2/license.html"
1281 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
1282 0.9.0 THROUGH 1.2\"."))))
1284 (define-public python2-pybugz
1286 (name "python2-pybugz")
1291 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1295 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1296 (patches (map search-patch
1297 (list "pybugz-stty.patch"
1298 "pybugz-encode-error.patch")))))
1299 (build-system python-build-system)
1301 `(#:python ,python-2 ; SyntaxError with Python 3
1302 #:tests? #f)) ; no 'test' sub-command
1303 (inputs `(("element-tree" ,python2-element-tree)))
1304 (synopsis "Python and command-line interface to Bugzilla")
1306 "PyBugz is a Python library and command-line tool to query the Bugzilla
1307 bug tracking system. It is meant as an aid to speed up interaction with the
1309 (home-page "http://www.liquidx.net/pybugz/")
1312 (define-public python-enum34
1314 (name "python-enum34")
1319 (uri (string-append "https://pypi.python.org/packages/source/e/"
1320 "enum34/enum34-" version ".tar.gz"))
1323 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1324 (build-system python-build-system)
1326 `(("python-setuptools" ,python-setuptools)))
1331 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1333 (home-page "https://pypi.python.org/pypi/enum34")
1334 (synopsis "Backported Python 3.4 Enum")
1336 "Enum34 is the new Python stdlib enum module available in Python 3.4
1337 backported for previous versions of Python from 2.4 to 3.3.")
1340 (define-public python-parse-type
1342 (name "python-parse-type")
1347 (uri (string-append "https://pypi.python.org/packages/source/p/"
1348 "parse_type/parse_type-" version ".tar.gz"))
1351 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1352 (build-system python-build-system)
1354 `(("python-setuptools" ,python-setuptools)
1355 ("python-six" ,python-six)
1356 ("python-parse" ,python-parse)
1357 ("python-enum34" ,python-enum34))) ;required for python<3.4
1358 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1359 (home-page "https://github.com/jenisys/parse_type")
1360 (synopsis "Extended parse module")
1362 "Parse_type extends the python parse module.")
1365 (define-public python-parse
1367 (name "python-parse")
1372 (uri (string-append "https://pypi.python.org/packages/source/p/"
1373 "parse/parse-" version ".tar.gz"))
1376 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1377 (build-system python-build-system)
1382 (lambda _ (zero? (system* "python" "test_parse.py")))
1384 (home-page "https://github.com/r1chardj0n3s/parse")
1385 (synopsis "Parse strings")
1387 "Parse strings using a specification based on the Python format()
1392 (define-public scons
1398 (uri (string-append "mirror://sourceforge/scons/scons-"
1402 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1403 (build-system python-build-system)
1405 ;; With Python 3.x, fails to build with a syntax error.
1406 `(#:python ,python-2
1407 #:tests? #f)) ; no 'python setup.py test' command
1408 (home-page "http://scons.org/")
1409 (synopsis "Software construction tool written in Python")
1411 "SCons is a software construction tool. Think of SCons as an improved,
1412 cross-platform substitute for the classic Make utility with integrated
1413 functionality similar to autoconf/automake and compiler caches such as ccache.
1414 In short, SCons is an easier, more reliable and faster way to build
1418 (define-public python-extras
1420 (name "python-extras")
1426 "https://pypi.python.org/packages/source/e/extras/extras-"
1430 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1431 (build-system python-build-system)
1433 `(("python-setuptools" ,python-setuptools)))
1435 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1437 (home-page "https://github.com/testing-cabal/extras")
1438 (synopsis "Useful extensions to the Python standard library")
1440 "Extras is a set of extensions to the Python standard library.")
1441 (license license:expat)))
1443 (define-public python2-extras
1444 (package-with-python2 python-extras))
1446 (define-public python-mimeparse
1448 (name "python-mimeparse")
1454 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1458 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1459 (build-system python-build-system)
1461 `(("python-setuptools" ,python-setuptools)))
1463 '(#:tests? #f)) ; no setup.py test command
1465 "https://github.com/dbtsai/python-mimeparse")
1466 (synopsis "Python library for parsing MIME types")
1468 "Mimeparse provides basic functions for parsing MIME type names and
1469 matching them against a list of media-ranges.")
1470 (license license:expat)))
1472 (define-public python2-mimeparse
1473 (package-with-python2 python-mimeparse))
1475 (define-public python-nose
1477 (name "python-nose")
1482 (uri (pypi-uri "nose" version))
1485 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1486 (build-system python-build-system)
1488 `(("python-setuptools" ,python-setuptools)))
1490 '(#:tests? #f)) ; FIXME: test suite fails
1491 (home-page "http://readthedocs.org/docs/nose/")
1492 (synopsis "Python testing library")
1494 "Nose extends the unittest library to make testing easier.")
1495 (license lgpl2.0+)))
1497 (define-public python2-nose
1498 (package-with-python2 python-nose))
1500 (define-public python-unittest2
1502 (name "python-unittest2")
1508 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1512 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1513 (build-system python-build-system)
1515 `(("python-setuptools" ,python-setuptools)))
1516 (home-page "http://pypi.python.org/pypi/unittest2")
1517 (synopsis "Python unit testing library")
1519 "Unittest2 is a replacement for the unittest module in the Python
1523 (define-public python2-unittest2
1524 (package (inherit python-unittest2)
1525 (name "python2-unittest2")
1531 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1535 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1537 `(("python2-setuptools" ,python2-setuptools)))
1539 `(#:python ,python-2
1540 #:tests? #f)))) ; no setup.py test command
1542 (define-public python-py
1549 (uri (pypi-uri "py" version))
1552 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1553 (build-system python-build-system)
1555 `(("python-setuptools" ,python-setuptools)))
1556 (home-page "http://pylib.readthedocs.org/")
1557 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1559 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1560 code introspection, and logging.")
1561 (license license:expat)))
1563 (define-public python2-py
1564 (package-with-python2 python-py))
1566 (define-public python-pytest
1568 (name "python-pytest")
1574 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1578 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1579 (modules '((guix build utils)))
1581 ;; One of the tests involves the /usr directory, so it fails.
1582 '(substitute* "testing/test_argcomplete.py"
1583 (("def test_remove_dir_prefix\\(self\\):")
1584 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1585 (build-system python-build-system)
1587 `(("python-setuptools" ,python-setuptools)
1588 ("python-py" ,python-py)
1589 ("python-nose" ,python-nose)
1590 ("python-mock" ,python-mock)))
1591 (home-page "http://pytest.org")
1592 (synopsis "Python testing library")
1594 "Pytest is a testing tool that provides auto-discovery of test modules
1595 and functions, detailed info on failing assert statements, modular fixtures,
1596 and many external plugins.")
1597 (license license:expat)))
1599 (define-public python2-pytest
1600 (package-with-python2 python-pytest))
1602 (define-public python-pytest-cov
1604 (name "python-pytest-cov")
1609 (uri (pypi-uri "pytest-cov" version))
1612 "1lf9jsmhqk5nc4w3kzwglmdzjvmi7ajvrsnwv826j3bn0wzx8c92"))))
1613 (build-system python-build-system)
1615 `(("python-coverage" ,python-coverage)
1616 ("python-pytest" ,python-pytest)))
1618 `(("python-setuptools" ,python-setuptools)))
1619 (home-page "https://github.com/pytest-dev/pytest-cov")
1620 (synopsis "Pytest plugin for measuring coverage")
1622 "Pytest-cov produces coverage reports. It supports centralised testing and
1623 distributed testing in both load and each modes. It also supports coverage
1625 (license license:expat)))
1627 (define-public python2-pytest-cov
1628 (package-with-python2 python-pytest-cov))
1630 (define-public python-pytest-runner
1632 (name "python-pytest-runner")
1637 (uri (string-append "https://pypi.python.org/packages/source/p/"
1638 "pytest-runner/pytest-runner-"
1642 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1643 (build-system python-build-system)
1646 (modify-phases %standard-phases
1647 ;; The fancy way of setting the version with setuptools_scm does not
1648 ;; seem to work here.
1649 (add-after 'unpack 'set-version
1651 (substitute* "docs/conf.py"
1652 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1653 (string-append "version = \"" ,version "\"")))
1656 `(("python-pytest" ,python-pytest)
1657 ("python-setuptools" ,python-setuptools)
1658 ("python-setuptools-scm" ,python-setuptools-scm)))
1659 (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
1660 (synopsis "Invoke py.test as a distutils command")
1662 "This package provides a @command{pytest-runner} command that
1663 @file{setup.py} files can use to run tests.")
1664 (license license:expat)))
1666 (define-public python2-pytest-runner
1667 (package-with-python2 python-pytest-runner))
1669 (define-public python-scripttest
1671 (name "python-scripttest")
1677 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1681 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1682 (build-system python-build-system)
1684 `(("python-setuptools" ,python-setuptools)
1685 ("python-pytest" ,python-pytest)))
1686 (home-page "http://pythonpaste.org/scripttest/")
1687 (synopsis "Python library to test command-line scripts")
1688 (description "Scripttest is a Python helper library for testing
1689 interactive command-line applications. With it you can run a script in a
1690 subprocess and see the output as well as any file modifications.")
1691 (license license:expat)))
1693 (define-public python2-scripttest
1694 (package-with-python2 python-scripttest))
1696 (define-public python-testtools
1698 (name "python-testtools")
1704 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1708 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1709 (build-system python-build-system)
1711 `(("python-mimeparse" ,python-mimeparse)))
1713 `(("python-setuptools" ,python-setuptools)
1714 ("python-extras" ,python-extras)))
1715 (home-page "https://github.com/testing-cabal/testtools")
1717 "Extensions to the Python standard library unit testing framework")
1719 "Testtools extends the Python standard library unit testing framework to
1720 provide matchers, more debugging information, and cross-Python
1724 (define-public python2-testtools
1725 (package-with-python2 python-testtools))
1727 (define-public python-testscenarios
1729 (name "python-testscenarios")
1735 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1739 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1740 (build-system python-build-system)
1742 `(("python-setuptools" ,python-setuptools)
1743 ("python-testtools" ,python-testtools)
1744 ("python-mimeparse" ,python-mimeparse)))
1745 (home-page "https://launchpad.net/testscenarios")
1746 (synopsis "Pyunit extension for dependency injection")
1748 "Testscenarios provides clean dependency injection for Python unittest
1750 (license (list bsd-3 asl2.0)))) ; at the user's option
1752 (define-public python2-testscenarios
1753 (package-with-python2 python-testscenarios))
1755 (define-public python-testresources
1757 (name "python-testresources")
1763 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1767 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1768 (build-system python-build-system)
1770 `(("python-setuptools" ,python-setuptools)))
1771 (home-page "https://launchpad.net/testresources")
1773 "Pyunit extension for managing test resources")
1775 "Testresources is an extension to Python's unittest to allow declarative
1776 use of resources by test cases.")
1777 (license (list bsd-3 asl2.0)))) ; at the user's option
1779 (define-public python2-testresources
1780 (package-with-python2 python-testresources))
1782 (define-public python-subunit
1784 (name "python-subunit")
1790 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1794 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1795 (build-system python-build-system)
1797 `(("python-setuptools" ,python-setuptools)
1798 ("python-testtools" ,python-testtools)
1799 ("python-mimeparse" ,python-mimeparse)
1800 ("python-testscenarios" ,python-testscenarios)))
1801 (home-page "http://launchpad.net/subunit")
1802 (synopsis "Python implementation of the subunit protocol")
1804 "Python-subunit is a Python implementation of the subunit test streaming
1806 (license (list bsd-3 asl2.0)))) ; at the user's option
1808 (define-public python2-subunit
1809 (package-with-python2 python-subunit))
1811 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1812 ;; which needs a recent version of python-fixtures. To fix this circular
1813 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1814 ;; bootstrap the whole thing:
1815 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1816 ;; - python-pbr-0.11 is used to build python-fixtures
1817 ;; - python-fixtures is used to build python-pbr
1818 (define-public python-fixtures-0.3.16
1820 (name "python-fixtures")
1826 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1830 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1831 (build-system python-build-system)
1833 `(("python-setuptools" ,python-setuptools)))
1835 '(#:tests? #f)) ; no setup.py test command
1836 (home-page "https://launchpad.net/python-fixtures")
1837 (synopsis "Python test fixture library")
1839 "Fixtures provides a way to create reusable state, useful when writing
1841 (license (list bsd-3 asl2.0)))) ; at user's option
1843 (define-public python2-fixtures-0.3.16
1844 (package-with-python2 python-fixtures-0.3.16))
1846 (define-public python-pbr-0.11
1854 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1858 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1859 (build-system python-build-system)
1861 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1863 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1864 ("python-pip" ,python-pip)
1865 ("python-setuptools" ,python-setuptools)))
1866 (home-page "https://launchpad.net/pbr")
1867 (synopsis "Change the default behavior of Python’s setuptools")
1869 "Python Build Reasonableness (PBR) is a library that injects some useful
1870 and sensible default behaviors into your setuptools run.")
1873 (define-public python2-pbr-0.11
1874 (package-with-python2 python-pbr-0.11))
1876 (define-public python-fixtures
1878 (name "python-fixtures")
1883 (uri (pypi-uri "fixtures" version))
1886 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
1887 (build-system python-build-system)
1889 `(("python-six" ,python-six)
1890 ("python-pbr-0.11" ,python-pbr-0.11)))
1892 `(("python-pip" ,python-pip)
1893 ("python-setuptools" ,python-setuptools)
1895 ("python-testtools" ,python-testtools)))
1897 '(#:tests? #f)) ; no setup.py test command
1898 (home-page "https://launchpad.net/python-fixtures")
1899 (synopsis "Python test fixture library")
1901 "Fixtures provides a way to create reusable state, useful when writing
1903 (license (list bsd-3 asl2.0)))) ; at user's option
1905 (define-public python2-fixtures
1906 (package-with-python2 python-fixtures))
1908 (define-public python-testrepository
1910 (name "python-testrepository")
1916 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1920 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1921 (build-system python-build-system)
1923 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1924 ("python-testtools" ,python-testtools)))
1926 `(("python-setuptools" ,python-setuptools)
1927 ("python-subunit" ,python-subunit)
1928 ("python-mimeparse" ,python-mimeparse)))
1929 (home-page "https://launchpad.net/testrepository")
1930 (synopsis "Database for Python test results")
1931 (description "Testrepository provides a database of test results which can
1932 be used as part of a developer's workflow to check things such as what tests
1933 have failed since the last commit or what tests are currently failing.")
1934 (license (list bsd-3 asl2.0)))) ; at user's option
1936 (define-public python2-testrepository
1937 (package-with-python2 python-testrepository))
1939 (define-public python-coverage
1941 (name "python-coverage")
1946 (uri (pypi-uri "coverage" version))
1949 "0qjlja8ny4gcfp8abqfwdrvr8qw9kr69lkja0b4cqqbsdmdjgcc5"))))
1950 (build-system python-build-system)
1952 `(("python-setuptools" ,python-setuptools)))
1953 (home-page "http://nedbatchelder.com/code/coverage")
1954 (synopsis "Code coverage measurement for Python")
1956 "Coverage measures code coverage, typically during test execution. It
1957 uses the code analysis tools and tracing hooks provided in the Python standard
1958 library to determine which lines are executable, and which have been
1962 (define-public python2-coverage
1963 (package-with-python2 python-coverage))
1965 (define-public python-discover
1967 (name "python-discover")
1973 "https://pypi.python.org/packages/source/d/discover/discover-"
1977 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1978 (build-system python-build-system)
1980 `(("python-setuptools" ,python-setuptools)))
1981 (home-page "http://pypi.python.org/pypi/discover/")
1983 "Python test discovery for unittest")
1985 "Discover provides test discovery for unittest, a feature that has been
1986 backported from Python 2.7 for Python 2.4+.")
1989 (define-public python2-discover
1990 (package-with-python2 python-discover))
1992 (define-public behave
1998 (uri (string-append "https://pypi.python.org/packages/source/b/"
1999 name "/" name "-" version ".tar.gz"))
2002 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2003 (build-system python-build-system)
2005 `(("python-setuptools" ,python-setuptools)
2006 ("python-six" ,python-six)
2007 ("python-enum43" ,python-enum34)
2008 ("python-parse" ,python-parse)
2009 ("python-parse-type" ,python-parse-type)))
2010 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2012 (home-page "http://github.com/behave/behave")
2013 (synopsis "Python behavior-driven development")
2015 "Behave is a tool for behavior-driven development in python.
2016 Behavior-driven development (or BDD) is an agile software development
2017 technique that encourages collaboration between developers, QA and
2018 non-technical or business participants in a software project. Behave uses
2019 tests written in a natural language style, backed up by Python code.")
2022 (define-public python-exif-read
2024 (name "python-exif-read")
2028 (uri (pypi-uri "ExifRead" version))
2031 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2032 (build-system python-build-system)
2034 `(("python-setuptools" ,python-setuptools)))
2035 (arguments `(#:tests? #f)) ; no tests
2036 (home-page "https://github.com/ianare/exif-py")
2037 (synopsis "Python library to extract EXIF data from image files")
2039 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2043 (define-public python2-exif-read
2044 (package-with-python2 python-exif-read))
2046 (define-public python-pyld
2048 (name "python-pyld")
2052 (uri (pypi-uri "PyLD" version))
2055 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2056 (build-system python-build-system)
2058 `(("python-setuptools" ,python-setuptools)))
2059 (arguments `(#:tests? #f)) ; no tests
2060 (home-page "http://github.com/digitalbazaar/pyld")
2061 (synopsis "Python implementation of the JSON-LD specification")
2063 "PyLD is an implementation of the JSON-LD specification.")
2066 (define-public python2-pyld
2067 (package-with-python2 python-pyld))
2069 (define-public python-certifi
2071 (name "python-certifi")
2072 (version "2015.11.20.1")
2075 (uri (pypi-uri "certifi" version))
2078 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
2079 (build-system python-build-system)
2081 `(("python-setuptools" ,python-setuptools)))
2082 (arguments `(#:tests? #f)) ; no tests
2083 (home-page "http://python-requests.org/")
2084 (synopsis "Python CA certificate bundle")
2086 "Certifi is a Python library that contains a CA certificate bundle, which
2087 is used by the Requests library to verify HTTPS requests.")
2090 (define-public python2-certifi
2091 (package-with-python2 python-certifi))
2093 (define-public python-click
2095 (name "python-click")
2100 (uri (pypi-uri "click" version))
2102 (base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
2103 (build-system python-build-system)
2105 `(("python-setuptools" ,python-setuptools)))
2106 (home-page "http://click.pocoo.org")
2107 (synopsis "Command line library for Python")
2109 "Click is a Python package for creating command line interfaces in a
2110 composable way with as little code as necessary. Its name stands for
2111 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2112 with sensible defaults out of the box.")
2115 (define-public python2-click
2116 (package-with-python2 python-click))
2118 (define-public python-wheel
2120 (name "python-wheel")
2125 (uri (pypi-uri "wheel" version))
2128 "032k1ajijbqnv0z0k88bhf75mdimi18fcmm28mss90610lw3bbga"))))
2129 (build-system python-build-system)
2131 `(("python-setuptools" ,python-setuptools)
2132 ("python-jsonschema" ,python-jsonschema)
2133 ("python-pytest-cov" ,python-pytest-cov)))
2134 (home-page "https://bitbucket.org/pypa/wheel/")
2135 (synopsis "Built-package format for Python")
2137 "A wheel is a ZIP-format archive with a specially formatted filename and the
2138 .whl extension. It is designed to contain all the files for a PEP 376
2139 compatible install in a way that is very close to the on-disk format.")
2140 (license license:expat)))
2142 (define-public python2-wheel
2143 (package-with-python2 python-wheel))
2145 (define-public python-requests
2147 (name "python-requests")
2151 (uri (pypi-uri "requests" version))
2154 "0ny2nr1sqr4hcn3903ghmh7w2yni8shlfv240a8c9p6wyidqvzl4"))))
2155 (build-system python-build-system)
2157 `(("python-setuptools" ,python-setuptools)))
2159 `(("python-py" ,python-py)
2160 ("python-pytest" ,python-pytest)
2161 ("python-pytest-cov" ,python-pytest-cov)
2162 ("python-wheel" ,python-wheel)))
2163 (home-page "http://python-requests.org/")
2164 (synopsis "Python HTTP library")
2166 "Requests is a Python HTTP client library. It aims to be easier to use
2167 than Python’s urllib2 library.")
2170 ;; Some software requires an older version of Requests, notably Docker
2172 (define-public python-requests-2.7
2173 (package (inherit python-requests)
2177 (uri (pypi-uri "requests" version))
2180 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2182 (define-public python2-requests
2183 (package-with-python2 python-requests))
2185 (define-public python-vcversioner
2187 (name "python-vcversioner")
2188 (version "2.14.0.0")
2192 (uri (pypi-uri "vcversioner" version))
2195 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2196 (build-system python-build-system)
2198 `(("python-setuptools" ,python-setuptools)))
2199 (synopsis "Python library for version number discovery")
2200 (description "Vcversioner is a Python library that inspects tagging
2201 information in a variety of version control systems in order to discover
2203 (home-page "https://github.com/habnabit/vcversioner")
2206 (define-public python2-vcversioner
2207 (package-with-python2 python-vcversioner))
2209 (define-public python-jsonschema
2211 (name "python-jsonschema")
2217 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2221 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2222 (build-system python-build-system)
2224 `(("python-setuptools" ,python-setuptools)
2225 ("python-vcversioner" ,python-vcversioner)))
2226 (home-page "http://github.com/Julian/jsonschema")
2227 (synopsis "Implementation of JSON Schema for Python")
2229 "Jsonschema is an implementation of JSON Schema for Python.")
2230 (license license:expat)))
2232 (define-public python2-jsonschema
2233 (package-with-python2 python-jsonschema))
2235 (define-public python-unidecode
2237 (name "python-unidecode")
2241 (uri (pypi-uri "Unidecode" version))
2244 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2245 (build-system python-build-system)
2247 `(("python-setuptools" ,python-setuptools)))
2248 (home-page "https://pypi.python.org/pypi/Unidecode")
2249 (synopsis "ASCII transliterations of Unicode text")
2251 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2252 useful when integrating with legacy code that doesn't support Unicode, or for
2253 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2254 machine identifiers from human-readable Unicode strings that should still be
2255 somewhat intelligeble.")
2258 (define-public python2-unidecode
2259 (package-with-python2 python-unidecode))
2261 (define-public python-pyjwt
2263 (name "python-pyjwt")
2268 (uri (pypi-uri "PyJWT" version))
2271 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2272 (build-system python-build-system)
2274 `(("python-setuptools" ,python-setuptools)
2275 ("python-pytest-runner" ,python-pytest-runner)))
2277 '(#:tests? #f)) ; test suite doesn't work
2278 (home-page "http://github.com/progrium/pyjwt")
2279 (synopsis "JSON Web Token implementation in Python")
2281 "PyJWT is a JSON Web Token implementation written in Python.")
2282 (license license:expat)))
2284 (define-public python2-pyjwt
2285 (package-with-python2 python-pyjwt))
2287 (define-public python-oauthlib
2289 (name "python-oauthlib")
2293 (uri (pypi-uri "oauthlib" version))
2296 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2297 (build-system python-build-system)
2299 `(("python-setuptools" ,python-setuptools)
2300 ("python-coverage", python-coverage)
2301 ("python-nose" ,python-nose)
2302 ("python-mock" ,python-mock)))
2304 `(("python-blinker" ,python-blinker)
2305 ("python-cryptography" ,python-cryptography)
2306 ("python-pyjwt" ,python-pyjwt)))
2307 (home-page "https://github.com/idan/oauthlib")
2308 (synopsis "OAuth implementation for Python")
2310 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2311 OAuth request-signing logic.")
2314 (define-public python2-oauthlib
2315 (let ((base (package-with-python2 python-oauthlib)))
2319 `(("python2-unittest2" ,python2-unittest2)
2320 ("python2-cryptography" ,python2-cryptography)
2321 ,@(alist-delete "python-cryptography"
2322 (package-inputs base)))))))
2324 (define-public python-itsdangerous
2326 (name "python-itsdangerous")
2332 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2336 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2337 (build-system python-build-system)
2339 `(("python-setuptools" ,python-setuptools)))
2340 (home-page "http://github.com/mitsuhiko/itsdangerous")
2341 (synopsis "Python library for passing data to/from untrusted environments")
2343 "Itsdangerous provides various helpers to pass trusted data to untrusted
2344 environments and back.")
2347 (define-public python2-itsdangerous
2348 (package-with-python2 python-itsdangerous))
2350 (define-public python-pyyaml
2352 (name "python-pyyaml")
2358 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2362 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2363 (build-system python-build-system)
2365 `(("libyaml" ,libyaml)))
2367 `(("python-setuptools" ,python-setuptools)))
2368 (home-page "http://pyyaml.org/wiki/PyYAML")
2369 (synopsis "YAML parser and emitter for Python")
2371 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2372 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2373 API, and sensible error messages. PyYAML supports standard YAML tags and
2374 provides Python-specific tags that allow to represent an arbitrary Python
2376 (license license:expat)))
2378 (define-public python2-pyyaml
2379 (package-with-python2 python-pyyaml))
2381 (define-public python-virtualenv
2383 (name "python-virtualenv")
2388 (uri (pypi-uri "virtualenv" version))
2391 "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a"))))
2392 (build-system python-build-system)
2395 (modify-phases %standard-phases
2397 (lambda _ (zero? (system* "py.test")))))))
2399 `(("python-setuptools" ,python-setuptools)
2400 ("python-mock" ,python-mock)
2401 ("python-pytest" ,python-pytest)))
2402 (home-page "https://virtualenv.pypa.io/")
2403 (synopsis "Virtual Python environment builder")
2405 "Virtualenv is a tool to create isolated Python environments.")
2406 (license license:expat)))
2408 (define-public python2-virtualenv
2409 (package-with-python2 python-virtualenv))
2411 (define-public python-markupsafe
2413 (name "python-markupsafe")
2419 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2423 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2424 (build-system python-build-system)
2426 `(("python-setuptools" ,python-setuptools)))
2427 (home-page "http://github.com/mitsuhiko/markupsafe")
2428 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2430 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2434 (define-public python2-markupsafe
2435 (package-with-python2 python-markupsafe))
2437 (define-public python-jinja2
2439 (name "python-jinja2")
2444 (uri (pypi-uri "Jinja2" version))
2447 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2448 (build-system python-build-system)
2450 `(("python-setuptools" ,python-setuptools)
2451 ("python-markupsafe" ,python-markupsafe)))
2452 (home-page "http://jinja.pocoo.org/")
2453 (synopsis "Python template engine")
2455 "Jinja2 is a small but fast and easy to use stand-alone template engine
2456 written in pure Python.")
2459 (define-public python2-jinja2
2460 (package-with-python2 python-jinja2))
2462 (define-public python-pystache
2464 (name "python-pystache")
2468 (uri (pypi-uri "pystache" version))
2471 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2472 (build-system python-build-system)
2474 `(("python-setuptools" ,python-setuptools)))
2475 (home-page "http://defunkt.io/pystache/")
2476 (synopsis "Python logic-less template engine")
2478 "Pystache is a Python implementation of the framework agnostic,
2479 logic-free templating system Mustache.")
2480 (license license:expat)))
2482 (define-public python2-pystache
2483 (package-with-python2 python-pystache))
2485 (define-public python-joblib
2487 (name "python-joblib")
2491 (uri (string-append "https://pypi.python.org/packages/source/"
2492 "j/joblib/joblib-" version ".tar.gz"))
2495 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2496 (build-system python-build-system)
2498 `(("python-setuptools" ,python-setuptools)
2499 ("python-nose" ,python-nose)))
2500 (home-page "http://pythonhosted.org/joblib/")
2501 (synopsis "Using Python functions as pipeline jobs")
2503 "Joblib is a set of tools to provide lightweight pipelining in Python.
2504 In particular, joblib offers: transparent disk-caching of the output values
2505 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2506 logging and tracing of the execution.")
2509 (define-public python2-joblib
2510 (package-with-python2 python-joblib))
2512 (define-public python-docutils
2514 (name "python-docutils")
2520 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2524 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2525 (build-system python-build-system)
2527 `(("python-setuptools" ,python-setuptools)))
2529 '(#:tests? #f)) ; no setup.py test command
2530 (home-page "http://docutils.sourceforge.net/")
2531 (synopsis "Python Documentation Utilities")
2533 "Docutils is a modular system for processing documentation into useful
2534 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2536 ;; Most of the source code is public domain, but some source files are
2537 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2538 (license (list public-domain psfl bsd-2 gpl3+))))
2540 (define-public python2-docutils
2541 (package-with-python2 python-docutils))
2543 (define-public python-pygments
2545 (name "python-pygments")
2550 (uri (pypi-uri "Pygments" version))
2553 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2554 (build-system python-build-system)
2556 `(("python-setuptools" ,python-setuptools)))
2557 (home-page "http://pygments.org/")
2558 (synopsis "Syntax highlighting")
2560 "Pygments is a syntax highlighting package written in Python.")
2563 (define-public python2-pygments
2564 (package-with-python2 python-pygments))
2566 (define-public python-sphinx
2568 (name "python-sphinx")
2574 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2578 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2579 (build-system python-build-system)
2581 `(("python-setuptools" ,python-setuptools)
2582 ("python-jinja2" ,python-jinja2)
2583 ("python-docutils" ,python-docutils)
2584 ("python-pygments" ,python-pygments)))
2585 (home-page "http://sphinx-doc.org/")
2586 (synopsis "Python documentation generator")
2587 (description "Sphinx is a tool that makes it easy to create documentation
2588 for Python projects or other documents consisting of multiple reStructuredText
2592 (define-public python2-sphinx
2593 (package-with-python2 python-sphinx))
2595 (define-public python-sphinx-rtd-theme
2597 (name "python-sphinx-rtd-theme")
2602 (uri (string-append "https://pypi.python.org/packages/source/s/"
2603 "sphinx_rtd_theme/sphinx_rtd_theme-"
2607 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2608 (build-system python-build-system)
2610 `(;; With standard flags, the install phase attempts to create a zip'd
2611 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2613 #:configure-flags '("--single-version-externally-managed"
2614 "--record=sphinx-rtd-theme.txt")))
2616 `(("python-setuptools" ,python-setuptools)))
2618 `(("python-docutils" ,python-docutils)
2619 ("python-sphinx" ,python-sphinx)))
2620 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2621 (synopsis "ReadTheDocs.org theme for Sphinx")
2622 (description "A theme for Sphinx used by ReadTheDocs.org.")
2623 (license license:expat)))
2625 (define-public python2-sphinx-rtd-theme
2626 (package-with-python2 python-sphinx-rtd-theme))
2628 (define-public python-feedgenerator
2630 (name "python-feedgenerator")
2631 (version "20150710.97185b7")
2633 ;; Using the git checkout for now because license file not added till
2634 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2638 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2639 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2642 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2644 `(;; With standard flags, the install phase attempts to create a zip'd
2645 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2647 #:configure-flags '("--single-version-externally-managed"
2648 "--record=feedgenerator.txt")))
2649 (build-system python-build-system)
2651 `(("python-setuptools" ,python-setuptools)
2652 ("python-pytz" ,python-pytz)
2653 ("python-six" ,python-six)))
2655 "https://github.com/dmdm/feedgenerator-py3k.git")
2657 "Standalone version of Django's Atom/RSS feed generator")
2659 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2660 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2663 (define-public python2-feedgenerator
2664 (package-with-python2 python-feedgenerator))
2666 (define-public python-blinker
2668 (name "python-blinker")
2673 (uri (pypi-uri "blinker" version))
2676 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2677 (build-system python-build-system)
2679 `(("python-setuptools" ,python-setuptools)))
2680 ;; No "test" command supplied to setuptools, so unless there's another way
2681 ;; to run tests, we're skipping them!
2682 (arguments '(#:tests? #f))
2683 (home-page "http://pythonhosted.org/blinker/")
2684 (synopsis "Fast, simple object-to-object and broadcast signaling")
2686 "Blinker provides a fast dispatching system that allows any number of
2687 interested parties to subscribe to events, or \"signals\".")
2688 (license license:expat)))
2690 (define-public python2-blinker
2691 (package-with-python2 python-blinker))
2693 (define-public pelican
2700 (uri (pypi-uri "pelican" version))
2703 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2704 (build-system python-build-system)
2706 `(("python-setuptools" ,python-setuptools)))
2708 `(("python-feedgenerator" ,python-feedgenerator)
2709 ("python-jinja2" ,python-jinja2)
2710 ("python-pygments" ,python-pygments)
2711 ("python-docutils" ,python-docutils)
2712 ("python-pytz" ,python-pytz)
2713 ("python-blinker" ,python-blinker)
2714 ("python-unidecode" ,python-unidecode)
2715 ("python-six" ,python-six)
2716 ("python-dateutil-2" ,python-dateutil-2)))
2717 (home-page "http://getpelican.com/")
2719 `(;; XXX Requires a lot more packages to do unit tests :P
2721 #:phases (modify-phases %standard-phases
2723 'install 'adjust-requires
2724 ;; Since feedgenerator is installed from git, it doesn't
2725 ;; conform to the version requirements.
2727 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2728 ;; version requirement so setuptools doesn't get confused.
2730 (substitute* "setup.py"
2731 (("['\"]feedgenerator.*?['\"]")
2732 "'feedgenerator'")))))))
2733 (synopsis "Python-based static site publishing system")
2735 "Pelican is a tool to generate a static blog from reStructuredText,
2736 Markdown input files, and more. Pelican uses Jinja2 for templating
2737 and is very extensible.")
2740 (define-public python-scikit-learn
2742 (name "python-scikit-learn")
2748 "https://github.com/scikit-learn/scikit-learn/archive/"
2752 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2753 (build-system python-build-system)
2758 ;; some tests require access to "$HOME"
2759 (lambda _ (setenv "HOME" "/tmp"))
2760 ;; Tests can only be run after the library has been installed and not
2761 ;; within the source directory.
2765 (with-directory-excursion "/tmp"
2766 ;; With Python 3 one test of 3334 fails
2767 ;; (sklearn.tests.test_common.test_transformers); see
2768 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2769 (system* "nosetests" "-v" "sklearn")))
2770 (alist-delete 'check %standard-phases)))))
2772 `(("openblas" ,openblas)
2773 ("python-nose" ,python-nose)))
2775 `(("python-numpy" ,python-numpy)
2776 ("python-scipy" ,python-scipy)))
2777 (home-page "http://scikit-learn.org/")
2778 (synopsis "Machine Learning in Python")
2780 "Scikit-learn provides simple and efficient tools for data
2781 mining and data analysis.")
2784 (define-public python2-scikit-learn
2785 (let ((scikit (package-with-python2 python-scikit-learn)))
2786 (package (inherit scikit)
2788 `(("python2-numpy" ,python2-numpy)
2789 ("python2-scipy" ,python2-scipy)
2793 "python-scipy" (package-propagated-inputs scikit))))))))
2795 (define-public python-scikit-image
2797 (name "python-scikit-image")
2803 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2806 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2807 (build-system python-build-system)
2809 `(("python-matplotlib" ,python-matplotlib)
2810 ("python-networkx" ,python-networkx)
2811 ("python-numpy" ,python-numpy)
2812 ("python-scipy" ,python-scipy)
2813 ("python-six" ,python-six)
2814 ("python-pillow" ,python-pillow)))
2816 `(("python-cython" ,python-cython)
2817 ("python-setuptools" ,python-setuptools)))
2818 (home-page "http://scikit-image.org/")
2819 (synopsis "Image processing in Python")
2821 "Scikit-image is a collection of algorithms for image processing.")
2824 (define-public python2-scikit-image
2825 (let ((scikit-image (package-with-python2 python-scikit-image)))
2826 (package (inherit scikit-image)
2828 `(("python2-mock" ,python2-mock)
2829 ,@(package-native-inputs scikit-image)))
2831 `(("python2-pytz" ,python2-pytz)
2832 ("python2-matplotlib" ,python2-matplotlib)
2833 ("python2-numpy" ,python2-numpy)
2834 ("python2-scipy" ,python2-scipy)
2835 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2836 '("python-matplotlib" "python-numpy" "python-scipy")))))))
2838 (define-public python-redis
2840 (name "python-redis")
2846 "https://pypi.python.org/packages/source/r/redis/redis-"
2849 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2850 (build-system python-build-system)
2851 ;; Tests require a running Redis server
2852 (arguments '(#:tests? #f))
2854 `(("python-setuptools" ,python-setuptools)
2855 ("python-pytest" ,python-pytest)))
2856 (home-page "https://github.com/andymccurdy/redis-py")
2857 (synopsis "Redis Python client")
2859 "This package provides a Python interface to the Redis key-value store.")
2860 (license license:expat)))
2862 (define-public python2-redis
2863 (package-with-python2 python-redis))
2865 (define-public python-rq
2873 "https://pypi.python.org/packages/source/r/rq/rq-"
2876 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2877 (build-system python-build-system)
2879 `(("python-click" ,python-click)
2880 ("python-redis" ,python-redis)))
2882 `(("python-setuptools" ,python-setuptools)))
2883 (home-page "http://python-rq.org/")
2884 (synopsis "Simple job queues for Python")
2886 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2887 processing them in the background with workers. It is backed by Redis and it
2888 is designed to have a low barrier to entry.")
2891 (define-public python2-rq
2892 (package-with-python2 python-rq))
2894 (define-public python-cython
2896 (name "python-cython")
2901 (uri (pypi-uri "Cython" version))
2904 "13hdffhd37mx3gjby018xl179jaj957fy7kzi01crmimxvn2zi7y"))))
2905 (build-system python-build-system)
2906 ;; we need the full python package and not just the python-wrapper
2907 ;; because we need libpython3.3m.so
2909 `(("python" ,python)))
2914 ;; some tests require access to "$HOME/.cython"
2915 (lambda* _ (setenv "HOME" "/tmp"))
2918 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2919 %standard-phases))))
2920 (home-page "http://cython.org/")
2921 (synopsis "C extensions for Python")
2922 (description "Cython is an optimising static compiler for both the Python
2923 programming language and the extended Cython programming language. It makes
2924 writing C extensions for Python as easy as Python itself.")
2927 (define-public python2-cython
2928 (package (inherit (package-with-python2 python-cython))
2929 (name "python2-cython")
2931 `(("python-2" ,python-2))))) ; this is not automatically changed
2933 ;; This version of numpy is missing the documentation and is only used to
2934 ;; build matplotlib which is required to build numpy's documentation.
2935 (define python-numpy-bootstrap
2937 (name "python-numpy-bootstrap")
2942 (uri (string-append "mirror://sourceforge/numpy"
2943 "/numpy-" version ".tar.gz"))
2946 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2947 (build-system python-build-system)
2949 `(("python-nose" ,python-nose)
2950 ("openblas" ,openblas)
2951 ("lapack" ,lapack)))
2953 `(("gfortran" ,gfortran)))
2957 'build 'set-environment-variables
2958 (lambda* (#:key inputs #:allow-other-keys)
2959 (call-with-output-file "site.cfg"
2963 libraries = openblas
2964 library_dirs = ~a/lib
2965 include_dirs = ~a/include
2968 lapack_libs = lapack
2969 library_dirs = ~a/lib
2970 include_dirs = ~a/include
2972 (assoc-ref inputs "openblas")
2973 (assoc-ref inputs "openblas")
2974 (assoc-ref inputs "lapack")
2975 (assoc-ref inputs "lapack"))))
2976 ;; Use "gcc" executable, not "cc".
2977 (substitute* "numpy/distutils/system_info.py"
2978 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2979 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2981 ;; Tests can only be run after the library has been installed and not
2982 ;; within the source directory.
2986 (with-directory-excursion "/tmp"
2987 (zero? (system* "python" "-c"
2988 "import numpy; numpy.test(verbose=2)"))))
2991 %standard-phases)))))
2992 (home-page "http://www.numpy.org/")
2993 (synopsis "Fundamental package for scientific computing with Python")
2994 (description "NumPy is the fundamental package for scientific computing
2995 with Python. It contains among other things: a powerful N-dimensional array
2996 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2997 and Fortran code, useful linear algebra, Fourier transform, and random number
3001 (define python2-numpy-bootstrap
3002 (package-with-python2 python-numpy-bootstrap))
3004 (define-public python2-fastlmm
3006 (name "python2-fastlmm")
3012 "https://pypi.python.org/packages/source/f/fastlmm"
3013 "/fastlmm-" version ".zip"))
3016 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
3017 (build-system python-build-system)
3019 `(#:python ,python-2)) ; only Python 2.7 is supported
3021 `(("python2-numpy" ,python2-numpy)
3022 ("python2-scipy" ,python2-scipy)
3023 ("python2-matplotlib" ,python2-matplotlib)
3024 ("python2-pandas" ,python2-pandas)
3025 ("python2-scikit-learn" ,python2-scikit-learn)
3026 ("python2-cython" ,python2-cython)
3027 ("python2-pysnptools" ,python2-pysnptools)))
3030 ("python2-mock" ,python2-mock)
3031 ("python2-setuptools" ,python2-setuptools)))
3032 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3033 (synopsis "Perform genome-wide association studies on large data sets")
3035 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3036 Models, is a program for performing both single-SNP and SNP-set genome-wide
3037 association studies (GWAS) on extremely large data sets.")
3040 (define-public python-numpy
3041 (package (inherit python-numpy-bootstrap)
3042 (name "python-numpy")
3043 (outputs '("out" "doc"))
3046 ("python-setuptools" ,python-setuptools)
3047 ("python-matplotlib" ,python-matplotlib)
3048 ("python-sphinx" ,python-sphinx)
3049 ("python-pyparsing" ,python-pyparsing)
3050 ("python-numpydoc" ,python-numpydoc)
3051 ,@(package-inputs python-numpy-bootstrap)))
3053 `(("pkg-config" ,pkg-config)
3054 ("texlive" ,texlive)
3055 ("texinfo" ,texinfo)
3057 ,@(package-native-inputs python-numpy-bootstrap)))
3059 `(,@(substitute-keyword-arguments
3060 (package-arguments python-numpy-bootstrap)
3063 'install 'install-doc
3064 (lambda* (#:key outputs #:allow-other-keys)
3065 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3067 data "/doc/" ,name "-"
3068 ,(package-version python-numpy-bootstrap)))
3069 (info (string-append data "/info"))
3070 (html (string-append doc "/html"))
3071 (pyver ,(string-append "PYVER=")))
3072 (with-directory-excursion "doc"
3074 (system* "make" "html" pyver)
3075 (system* "make" "latex" "PAPER=a4" pyver)
3076 (system* "make" "-C" "build/latex"
3077 "all-pdf" "PAPER=a4" pyver)
3078 ;; FIXME: Generation of the info file fails.
3079 ;; (system* "make" "info" pyver)
3081 ;; (copy-file "build/texinfo/numpy.info"
3082 ;; (string-append info "/numpy.info"))
3083 (for-each (lambda (file)
3084 (copy-file (string-append "build/latex" file)
3085 (string-append doc file)))
3086 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3087 (with-directory-excursion "build/html"
3088 (for-each (lambda (file)
3089 (let* ((dir (dirname file))
3090 (tgt-dir (string-append html "/" dir)))
3091 (unless (equal? "." dir)
3093 (install-file file html)))
3094 (find-files "." ".*"))))))
3097 (define-public python2-numpy
3098 (let ((numpy (package-with-python2 python-numpy)))
3099 (package (inherit numpy)
3100 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
3102 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3103 ,@(alist-delete "python-matplotlib"
3104 (package-inputs numpy)))))))
3106 (define-public python-pyparsing
3108 (name "python-pyparsing")
3113 (uri (string-append "mirror://sourceforge/pyparsing"
3114 "/pyparsing-" version ".tar.gz"))
3117 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3118 (build-system python-build-system)
3119 (outputs '("out" "doc"))
3121 `(#:tests? #f ; no test target
3122 #:modules ((guix build python-build-system)
3126 'install 'install-doc
3127 (lambda* (#:key outputs #:allow-other-keys)
3128 (let* ((doc (string-append (assoc-ref outputs "doc")
3129 "/share/doc/" ,name "-" ,version))
3130 (html-doc (string-append doc "/html"))
3131 (examples (string-append doc "/examples")))
3137 (install-file file tgt))
3138 (find-files dir ".*")))
3139 (list "docs" "htmldoc" "examples")
3140 (list doc html-doc examples))))
3142 (home-page "http://pyparsing.wikispaces.com")
3143 (synopsis "Python parsing class library")
3145 "The pyparsing module is an alternative approach to creating and
3146 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3147 of regular expressions. The pyparsing module provides a library of classes
3148 that client code uses to construct the grammar directly in Python code.")
3149 (license license:expat)))
3151 (define-public python2-pyparsing
3152 (package-with-python2 python-pyparsing))
3154 (define-public python-numpydoc
3156 (name "python-numpydoc")
3162 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3166 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3167 (modules '((guix build utils)))
3170 ;; Drop a test requiring matplotlib, which we cannot add as an
3171 ;; input since it would create a circular dependency: Extend the
3172 ;; test for Python 3, where it is already dropped, to Python 2.
3173 (substitute* "numpydoc/tests/test_plot_directive.py"
3175 (build-system python-build-system)
3177 `(("python-setuptools" ,python-setuptools)
3178 ("python-docutils" ,python-docutils)
3179 ("python-sphinx" ,python-sphinx)
3180 ("python-nose" ,python-nose)))
3181 (home-page "https://pypi.python.org/pypi/numpydoc")
3183 "Numpy's Sphinx extensions")
3185 "Sphinx extension to support docstrings in Numpy format.")
3188 (define-public python2-numpydoc
3189 (package-with-python2 python-numpydoc))
3191 (define-public python-numexpr
3193 (name "python-numexpr")
3198 (uri (string-append "https://pypi.python.org/packages/source/"
3199 "n/numexpr/numexpr-" version ".tar.gz"))
3202 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3203 (build-system python-build-system)
3204 (arguments `(#:tests? #f)) ; no tests included
3206 `(("python-numpy" ,python-numpy)))
3207 (home-page "https://github.com/pydata/numexpr")
3208 (synopsis "Fast numerical expression evaluator for NumPy")
3210 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3211 expressions that operate on arrays are accelerated and use less memory than
3212 doing the same calculation in Python. In addition, its multi-threaded
3213 capabilities can make use of all your cores, which may accelerate
3214 computations, most specially if they are not memory-bounded (e.g. those using
3215 transcendental functions).")
3216 (license license:expat)))
3218 (define-public python2-numexpr
3219 (let ((numexpr (package-with-python2 python-numexpr)))
3220 (package (inherit numexpr)
3221 ;; Make sure to use special packages for Python 2 instead
3222 ;; of those automatically rewritten by package-with-python2.
3224 `(("python2-numpy" ,python2-numpy)
3225 ,@(alist-delete "python-numpy"
3226 (package-propagated-inputs numexpr)))))))
3228 (define-public python-matplotlib
3230 (name "python-matplotlib")
3235 (uri (string-append "mirror://sourceforge/matplotlib"
3236 "/matplotlib-" version ".tar.gz"))
3239 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3240 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
3241 (build-system python-build-system)
3242 (outputs '("out" "doc"))
3243 (propagated-inputs ; the following packages are all needed at run time
3244 `(("python-pyparsing" ,python-pyparsing)
3245 ("python-pygobject" ,python-pygobject)
3246 ("gobject-introspection" ,gobject-introspection)
3247 ("python-tkinter" ,python "tk")
3248 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3249 ;; from 'gtk+') provides the required 'typelib' files used by
3250 ;; 'gobject-introspection'. The location of these files is set with the
3251 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3252 ;; is done automatically by a 'native-search-path' procedure. However,
3253 ;; at run-time the user must set this variable as follows:
3255 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3257 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3258 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3259 ;; object. For this reason we need to import both libraries.
3260 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3261 ("python-pycairo" ,python-pycairo)
3262 ("python-cairocffi" ,python-cairocffi)))
3264 `(("python-setuptools" ,python-setuptools)
3265 ("python-dateutil" ,python-dateutil-2)
3266 ("python-six" ,python-six)
3267 ("python-pytz" ,python-pytz)
3268 ("python-numpy" ,python-numpy-bootstrap)
3269 ("python-sphinx" ,python-sphinx)
3270 ("python-numpydoc" ,python-numpydoc)
3271 ("python-nose" ,python-nose)
3272 ("python-mock" ,python-mock)
3274 ("imagemagick" ,imagemagick)
3275 ("freetype" ,freetype)
3278 ("python-pillow" ,python-pillow)
3279 ;; FIXME: Add backends when available.
3280 ;("python-wxpython" ,python-wxpython)
3281 ;("python-pyqt" ,python-pyqt)
3285 `(("pkg-config" ,pkg-config)
3286 ("texlive" ,texlive)
3287 ("texinfo" ,texinfo)))
3291 'build 'configure-environment
3292 (lambda* (#:key outputs inputs #:allow-other-keys)
3293 (let ((cairo (assoc-ref inputs "cairo"))
3294 (gtk+ (assoc-ref inputs "gtk+")))
3295 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3297 (setenv "LD_LIBRARY_PATH"
3298 (string-append cairo "/lib:" gtk+ "/lib"))
3299 (setenv "HOME" (getcwd))
3300 (call-with-output-file "setup.cfg"
3302 (format port "[directories]~%
3303 basedirlist = ~a,~a~%
3306 (assoc-ref inputs "tcl")
3307 (assoc-ref inputs "tk"))))))
3309 'install 'install-doc
3310 (lambda* (#:key outputs #:allow-other-keys)
3311 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3312 (doc (string-append data "/doc/" ,name "-" ,version))
3313 (info (string-append data "/info"))
3314 (html (string-append doc "/html")))
3315 (with-directory-excursion "doc"
3316 ;; Produce pdf in 'A4' format.
3317 (substitute* (find-files "." "conf\\.py")
3318 (("latex_paper_size = 'letter'")
3319 "latex_paper_size = 'a4'"))
3322 ;; The doc recommends to run the 'html' target twice.
3323 (system* "python" "make.py" "html")
3324 (system* "python" "make.py" "html")
3325 (copy-recursively "build/html" html)
3326 (system* "python" "make.py" "latex")
3327 (system* "python" "make.py" "texinfo")
3328 (symlink (string-append html "/_images")
3329 (string-append info "/matplotlib-figures"))
3330 (with-directory-excursion "build/texinfo"
3331 (substitute* "matplotlib.texi"
3332 (("@image\\{([^,]*)" all file)
3333 (string-append "@image{matplotlib-figures/" file)))
3334 (symlink (string-append html "/_images")
3335 "./matplotlib-figures")
3336 (system* "makeinfo" "--no-split"
3337 "-o" "matplotlib.info" "matplotlib.texi"))
3338 (copy-file "build/texinfo/matplotlib.info"
3339 (string-append info "/matplotlib.info"))
3340 (copy-file "build/latex/Matplotlib.pdf"
3341 (string-append doc "/Matplotlib.pdf")))))
3342 %standard-phases))))
3343 (home-page "http://matplotlib.org")
3344 (synopsis "2D plotting library for Python")
3346 "Matplotlib is a Python 2D plotting library which produces publication
3347 quality figures in a variety of hardcopy formats and interactive environments
3348 across platforms. Matplotlib can be used in Python scripts, the python and
3349 ipython shell, web application servers, and six graphical user interface
3353 (define-public python2-matplotlib
3354 (let ((matplotlib (package-with-python2 python-matplotlib)))
3355 (package (inherit matplotlib)
3356 ;; Make sure to use special packages for Python 2 instead
3357 ;; of those automatically rewritten by package-with-python2.
3359 `(("python2-pycairo" ,python2-pycairo)
3360 ("python2-pygobject-2" ,python2-pygobject-2)
3361 ("python2-tkinter" ,python-2 "tk")
3362 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3363 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3365 (define-public python2-pysnptools
3367 (name "python2-pysnptools")
3373 "https://pypi.python.org/packages/source/p/pysnptools"
3374 "/pysnptools-" version ".zip"))
3377 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3378 (build-system python-build-system)
3380 `(#:python ,python-2)) ; only Python 2.7 is supported
3382 `(("python2-numpy" ,python2-numpy)
3383 ("python2-scipy" ,python2-scipy)
3384 ("python2-pandas" ,python2-pandas)
3385 ("python2-cython" ,python2-cython)))
3388 ("python2-setuptools" ,python2-setuptools)))
3389 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3390 (synopsis "Library for reading and manipulating genetic data")
3392 "PySnpTools is a library for reading and manipulating genetic data. It
3393 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3394 those files. It can also efficiently manipulate ranges of integers using set
3395 operators such as union, intersection, and difference.")
3398 (define-public python-rpy2
3400 (name "python-rpy2")
3405 (uri (pypi-uri "rpy2" version))
3408 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3409 (build-system python-build-system)
3411 `(("python-six" ,python-six)
3412 ("readline" ,readline)
3417 `(("python-setuptools" ,python-setuptools)
3419 (home-page "http://rpy.sourceforge.net/")
3420 (synopsis "Python interface to the R language")
3421 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3422 low-level interface to R from Python, a proposed high-level interface,
3423 including wrappers to graphical libraries, as well as R-like structures and
3427 (define-public python2-rpy2
3428 (let ((rpy2 (package-with-python2 python-rpy2)))
3429 (package (inherit rpy2)
3431 `(("python2-singledispatch" ,python2-singledispatch)
3432 ,@(package-native-inputs rpy2))))))
3434 (define-public python-scipy
3436 (name "python-scipy")
3441 (uri (string-append "mirror://sourceforge/scipy"
3442 "/scipy-" version ".tar.xz"))
3445 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3446 (build-system python-build-system)
3448 `(("python-numpy" ,python-numpy)
3449 ("python-matplotlib" ,python-matplotlib)
3450 ("python-pyparsing" ,python-pyparsing)))
3452 `(("lapack" ,lapack)
3453 ("openblas" ,openblas)))
3455 `(("python-nose" ,python-nose)
3456 ("python-sphinx" ,python-sphinx)
3457 ("python-numpydoc" ,python-numpydoc)
3458 ("gfortran" ,gfortran)
3459 ("texlive" ,texlive)
3461 (outputs '("out" "doc"))
3465 'build 'configure-openblas
3466 (lambda* (#:key inputs #:allow-other-keys)
3467 (call-with-output-file "site.cfg"
3471 libraries = openblas
3472 library_dirs = ~a/lib
3473 include_dirs = ~a/include
3475 library_dirs = ~a/lib
3476 atlas_libs = openblas
3478 (assoc-ref inputs "openblas")
3479 (assoc-ref inputs "openblas")
3480 (assoc-ref inputs "openblas"))))
3483 'install 'install-doc
3484 (lambda* (#:key outputs #:allow-other-keys)
3485 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3486 (doc (string-append data "/doc/" ,name "-" ,version))
3487 (html (string-append doc "/html"))
3488 (pyver ,(string-append "PYVER=")))
3489 (with-directory-excursion "doc"
3490 ;; Fix generation of images for mathematical expressions.
3491 (substitute* (find-files "source" "conf\\.py")
3492 (("pngmath_use_preview = True")
3493 "pngmath_use_preview = False"))
3495 (system* "make" "html" pyver)
3496 (system* "make" "latex" "PAPER=a4" pyver)
3497 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3498 (copy-file "build/latex/scipy-ref.pdf"
3499 (string-append doc "/scipy-ref.pdf"))
3500 (with-directory-excursion "build/html"
3501 (for-each (lambda (file)
3502 (let* ((dir (dirname file))
3503 (tgt-dir (string-append html "/" dir)))
3504 (install-file file html)))
3505 (find-files "." ".*"))))))
3506 ;; Tests can only be run after the library has been installed and not
3507 ;; within the source directory.
3511 (with-directory-excursion "/tmp"
3512 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3518 (substitute* "scipy/integrate/tests/test_quadpack.py"
3519 (("libm.so") "libm.so.6"))
3521 %standard-phases)))))))
3522 (home-page "http://www.scipy.org/")
3523 (synopsis "The Scipy library provides efficient numerical routines")
3524 (description "The SciPy library is one of the core packages that make up
3525 the SciPy stack. It provides many user-friendly and efficient numerical
3526 routines such as routines for numerical integration and optimization.")
3529 (define-public python2-scipy
3530 (let ((scipy (package-with-python2 python-scipy)))
3531 (package (inherit scipy)
3532 ;; Use packages customized for python-2.
3534 `(("python2-matplotlib" ,python2-matplotlib)
3535 ("python2-numpy" ,python2-numpy)
3536 ,@(alist-delete "python-matplotlib"
3537 (alist-delete "python-numpy"
3538 (package-propagated-inputs scipy))))))))
3540 (define-public python-sqlalchemy
3542 (name "python-sqlalchemy")
3547 (uri (string-append "https://pypi.python.org/packages/source/S/"
3548 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3551 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3552 (build-system python-build-system)
3554 `(("python-cython" ,python-cython) ;for c extensions
3555 ("python-pytest" ,python-pytest)
3556 ("python-mock" ,python-mock))) ;for tests
3558 `(#:phases (alist-replace
3560 (lambda _ (zero? (system* "py.test")))
3562 (home-page "http://www.sqlalchemy.org")
3563 (synopsis "Database abstraction library")
3565 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3566 gives application developers the full power and flexibility of SQL. It
3567 provides a full suite of well known enterprise-level persistence patterns,
3568 designed for efficient and high-performing database access, adapted into a
3569 simple and Pythonic domain language.")
3572 (define-public python2-sqlalchemy
3573 (package-with-python2 python-sqlalchemy))
3575 (define-public python-distutils-extra
3577 (name "python-distutils-extra")
3582 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3583 version "/+download/python-distutils-extra-"
3587 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3588 (build-system python-build-system)
3590 `(("python-setuptools" ,python-setuptools)))
3591 (home-page "https://launchpad.net/python-distutils-extra/")
3592 (synopsis "Enhancements to Python's distutils")
3594 "The python-distutils-extra module enables you to easily integrate
3595 gettext support, themed icons, and scrollkeeper-based documentation into
3596 Python's distutils.")
3599 (define-public python2-distutils-extra
3600 (package-with-python2 python-distutils-extra))
3602 (define-public python2-elib.intl
3604 (name "python2-elib.intl")
3608 ;; This project doesn't tag releases or publish tarballs, so we take
3609 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3612 (url "https://github.com/dieterv/elib.intl.git")
3613 (commit "d09997cfef")))
3616 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3617 (build-system python-build-system)
3619 `(("python2-setuptools" ,python2-setuptools)))
3621 ;; incompatible with Python 3 (exception syntax)
3622 `(#:python ,python-2
3624 ;; With standard flags, the install phase attempts to create a zip'd
3625 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3627 #:configure-flags '("--single-version-externally-managed"
3628 "--record=elib.txt")))
3629 (home-page "https://github.com/dieterv/elib.intl")
3630 (synopsis "Enhanced internationalization for Python")
3632 "The elib.intl module provides enhanced internationalization (I18N)
3633 services for your Python modules and applications.")
3636 (define-public python-pillow
3638 (name "python-pillow")
3643 (uri (string-append "https://pypi.python.org/packages/source/P/"
3644 "Pillow/Pillow-" version ".tar.gz"))
3647 "1fsl6sywd4f4axvbpy5h5h26l6w8592j0f1wcnj1hmgy83svwl5d"))))
3648 (build-system python-build-system)
3650 `(("python-setuptools" ,python-setuptools)
3651 ("python-nose" ,python-nose)))
3653 `(("freetype" ,freetype)
3656 ("libjpeg" ,libjpeg)
3657 ("openjpeg" ,openjpeg)
3658 ("libtiff" ,libtiff)
3659 ("libwebp" ,libwebp)))
3661 `(;; Used at runtime for pkg_resources
3662 ("python-setuptools" ,python-setuptools)))
3664 `(#:phases (modify-phases %standard-phases
3666 'install 'disable-egg-compression
3668 ;; Leave the .egg uncompressed since compressing it would
3669 ;; prevent the GC from identifying run-time dependencies.
3670 ;; See <http://bugs.gnu.org/20765>.
3671 (let ((port (open-file "setup.cfg" "a")))
3672 (display "\n[easy_install]\nzip_ok = 0\n"
3677 'install 'check-installed
3680 (setenv "HOME" (getcwd))
3681 (and (zero? (system* "python" "selftest.py"
3683 (zero? (system* "python" "test-installed.py"))))))
3685 (home-page "https://pypi.python.org/pypi/Pillow")
3686 (synopsis "Fork of the Python Imaging Library")
3688 "The Python Imaging Library adds image processing capabilities to your
3689 Python interpreter. This library provides extensive file format support, an
3690 efficient internal representation, and fairly powerful image processing
3691 capabilities. The core image library is designed for fast access to data
3692 stored in a few basic pixel formats. It should provide a solid foundation for
3693 a general image processing tool.")
3695 "http://www.pythonware.com/products/pil/license.htm"
3696 "The PIL Software License"))))
3698 (define-public python2-pillow
3699 (package-with-python2 python-pillow))
3701 (define-public python-pycparser
3703 (name "python-pycparser")
3708 (uri (pypi-uri "pycparser" version))
3711 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
3712 (outputs '("out" "doc"))
3713 (build-system python-build-system)
3715 `(("pkg-config" ,pkg-config)
3716 ("python-setuptools" ,python-setuptools)))
3722 (with-directory-excursion "tests"
3723 (zero? (system* "python" "all_tests.py"))))
3725 'install 'install-doc
3726 (lambda* (#:key outputs #:allow-other-keys)
3727 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3728 (doc (string-append data "/doc/" ,name "-" ,version))
3729 (examples (string-append doc "/examples")))
3731 (for-each (lambda (file)
3732 (copy-file (string-append "." file)
3733 (string-append doc file)))
3734 '("/README.rst" "/CHANGES" "/LICENSE"))
3735 (copy-recursively "examples" examples)))
3736 %standard-phases))))
3737 (home-page "https://github.com/eliben/pycparser")
3738 (synopsis "C parser in Python")
3740 "Pycparser is a complete parser of the C language, written in pure Python
3741 using the PLY parsing library. It parses C code into an AST and can serve as
3742 a front-end for C compilers or analysis tools.")
3745 (define-public python2-pycparser
3746 (package-with-python2 python-pycparser))
3748 (define-public python-cffi
3750 (name "python-cffi")
3755 (uri (pypi-uri "cffi" version))
3757 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
3758 (build-system python-build-system)
3759 (outputs '("out" "doc"))
3761 `(("libffi" ,libffi)))
3762 (propagated-inputs ; required at run-time
3763 `(("python-pycparser" ,python-pycparser)))
3765 `(("pkg-config" ,pkg-config)
3766 ("python-sphinx" ,python-sphinx)
3767 ("python-pytest" ,python-pytest)
3768 ("python-setuptools" ,python-setuptools)))
3772 'install 'install-doc
3773 (lambda* (#:key outputs #:allow-other-keys)
3774 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3775 (doc (string-append data "/doc/" ,name "-" ,version))
3776 (html (string-append doc "/html")))
3777 (with-directory-excursion "doc"
3778 (system* "make" "html")
3780 (copy-recursively "build/html" html))
3781 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3783 (home-page "http://cffi.readthedocs.org")
3784 (synopsis "Foreign function interface for Python")
3786 "Foreign Function Interface for Python calling C code.")
3787 (license license:expat)))
3789 (define-public python2-cffi
3790 (package-with-python2 python-cffi))
3792 (define-public python-xcffib
3794 (name "python-xcffib")
3799 (uri (string-append "https://pypi.python.org/packages/source/x/"
3800 "xcffib/xcffib-" version ".tar.gz"))
3803 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3804 (build-system python-build-system)
3806 `(("libxcb" ,libxcb)
3807 ("python-six" ,python-six)))
3809 `(("python-setuptools" ,python-setuptools)))
3811 `(("python-cffi" ,python-cffi))) ; used at run time
3815 'install 'install-doc
3816 (lambda* (#:key outputs #:allow-other-keys)
3817 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3818 "/doc/" ,name "-" ,version)))
3820 (copy-file "README.md"
3821 (string-append doc "/README.md"))))
3823 (home-page "https://github.com/tych0/xcffib")
3824 (synopsis "XCB Python bindings")
3826 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3827 support for Python 3 and PyPy. It is based on cffi.")
3828 (license license:expat)))
3830 (define-public python2-xcffib
3831 (package-with-python2 python-xcffib))
3833 (define-public python-cairocffi
3835 (name "python-cairocffi")
3840 ;; The archive on pypi is missing the 'utils' directory!
3841 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3843 (file-name (string-append name "-" version ".tar.gz"))
3846 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3847 (build-system python-build-system)
3848 (outputs '("out" "doc"))
3850 `(("gdk-pixbuf" ,gdk-pixbuf)
3853 `(("pkg-config" ,pkg-config)
3854 ("python-sphinx" ,python-sphinx)
3855 ("python-docutils" ,python-docutils)
3856 ("python-setuptools" ,python-setuptools)))
3858 `(("python-xcffib" ,python-xcffib))) ; used at run time
3862 'install 'install-doc
3863 (lambda* (#:key inputs outputs #:allow-other-keys)
3864 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3865 (doc (string-append data "/doc/" ,name "-" ,version))
3866 (html (string-append doc "/html")))
3867 (setenv "LD_LIBRARY_PATH"
3868 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3869 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3870 (setenv "LANG" "en_US.UTF-8")
3872 (for-each (lambda (file)
3873 (copy-file (string-append "." file)
3874 (string-append doc file)))
3875 '("/README.rst" "/CHANGES" "/LICENSE"))
3876 (system* "python" "setup.py" "build_sphinx")
3877 (copy-recursively "docs/_build/html" html)))
3879 (home-page "https://github.com/SimonSapin/cairocffi")
3880 (synopsis "Python bindings and object-oriented API for Cairo")
3882 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3883 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3884 graphics library with support for multiple backends including image buffers,
3885 PNG, PostScript, PDF, and SVG file output.")
3888 (define-public python2-cairocffi
3889 (package-with-python2 python-cairocffi))
3891 (define-public python-decorator
3893 (name "python-decorator")
3898 (uri (pypi-uri "decorator" version))
3900 (base32 "1710cwsbwr8fkiq59w2min7rwgdz7ly51yz8l8yh1zbpfxcm8qhw"))))
3901 (build-system python-build-system)
3902 (arguments '(#:tests? #f)) ; no test target
3904 `(("python-setuptools" ,python-setuptools)))
3905 (home-page "http://pypi.python.org/pypi/decorator/")
3906 (synopsis "Python module to simplify usage of decorators")
3908 "The aim of the decorator module is to simplify the usage of decorators
3909 for the average programmer, and to popularize decorators usage giving examples
3910 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3911 etc. The core of this module is a decorator factory.")
3912 (license license:expat)))
3914 (define-public python2-decorator
3915 (package-with-python2 python-decorator))
3917 (define-public python-drmaa
3919 (name "python-drmaa")
3925 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3928 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3929 (build-system python-build-system)
3930 ;; The test suite requires libdrmaa which is provided by the cluster
3931 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3932 ;; should be set to the path of the libdrmaa library.
3933 (arguments '(#:tests? #f))
3935 `(("python-nose" ,python-nose)
3936 ("python-setuptools" ,python-setuptools)))
3937 (home-page "https://pypi.python.org/pypi/drmaa")
3938 (synopsis "Python bindings for the DRMAA library")
3940 "A Python package for Distributed Resource Management (DRM) job
3941 submission and control. This package is an implementation of the DRMAA 1.0
3942 Python language binding specification.")
3945 (define-public python2-drmaa
3946 (package-with-python2 python-drmaa))
3948 (define-public python-gridmap
3950 (name "python-gridmap")
3956 "https://github.com/pygridtools/gridmap/archive/v"
3958 (file-name (string-append name "-" version ".tar.gz"))
3960 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3961 (build-system python-build-system)
3963 `(("python-psutil" ,python-psutil)
3964 ("python-drmaa" ,python-drmaa)
3965 ("python-pyzmq" ,python-pyzmq)))
3967 `(("python-setuptools" ,python-setuptools)))
3968 (home-page "https://github.com/pygridtools/gridmap")
3969 (synopsis "Create jobs on a cluster directly from Python")
3971 "Gridmap is a Python package to allow you to easily create jobs on the
3972 cluster directly from Python. You can directly map Python functions onto the
3973 cluster without needing to write any wrapper code yourself.")
3976 (define-public python2-gridmap
3977 (package-with-python2 python-gridmap))
3979 (define-public python-pexpect
3981 (name "python-pexpect")
3986 (uri (string-append "https://pypi.python.org/packages/source/p/"
3987 "pexpect/pexpect-" version ".tar.gz"))
3989 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
3990 (build-system python-build-system)
3993 (modify-phases %standard-phases
3994 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
3996 `(("python-nose" ,python-nose)))
3997 (home-page "http://pexpect.readthedocs.org/")
3998 (synopsis "Controlling interactive console applications")
4000 "Pexpect is a pure Python module for spawning child applications;
4001 controlling them; and responding to expected patterns in their output.
4002 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4003 child application and control it as if a human were typing commands.")
4006 (define-public python2-pexpect
4007 (package-with-python2 python-pexpect))
4009 (define-public python-setuptools-scm
4011 (name "python-setuptools-scm")
4015 (uri (pypi-uri "setuptools_scm" version))
4018 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
4019 (build-system python-build-system)
4020 (native-inputs `(("python-setuptools" ,python-setuptools)))
4021 (home-page "https://github.com/pypa/setuptools_scm/")
4022 (synopsis "Manage Python package versions in SCM metadata")
4024 "Setuptools_scm handles managing your Python package versions in
4025 @dfn{software configuration management} (SCM) metadata instead of declaring
4026 them as the version argument or in a SCM managed file.")
4027 (license license:expat)))
4029 (define-public python2-setuptools-scm
4030 (package-with-python2 python-setuptools-scm))
4032 (define-public python-pathpy
4034 (name "python-pathpy")
4039 (uri (string-append "https://pypi.python.org/packages/source/p/"
4040 "path.py/path.py-" version ".tar.gz"))
4042 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4043 (build-system python-build-system)
4045 `(("python-appdirs" ,python-appdirs)))
4047 `(("python-setuptools" ,python-setuptools)
4048 ("python-setuptools-scm" ,python-setuptools-scm)
4049 ("python-pytest" ,python-pytest)
4050 ("python-pytest-runner" ,python-pytest-runner)))
4051 (home-page "http://github.com/jaraco/path.py")
4052 (synopsis "Python module wrapper for built-in os.path")
4054 "@code{path.py} implements path objects as first-class entities, allowing
4055 common operations on files to be invoked on those path objects directly.")
4056 (license license:expat)))
4058 (define-public python2-pathpy
4059 (package-with-python2 python-pathpy))
4061 (define-public python-pickleshare
4063 (name "python-pickleshare")
4068 (uri (string-append "https://pypi.python.org/packages/source/p/"
4069 "pickleshare/pickleshare-" version ".tar.gz"))
4071 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4072 (build-system python-build-system)
4074 `(("python-pathpy" ,python-pathpy)))
4076 `(("python-setuptools" ,python-setuptools)))
4077 (home-page "https://github.com/vivainio/pickleshare")
4078 (synopsis "Tiny key value database with concurrency support")
4080 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4081 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4082 shelve, many processes can access the database simultaneously. Changing a
4083 value in database is immediately visible to other processes accessing the same
4084 database. Concurrency is possible because the values are stored in separate
4085 files. Hence the “database” is a directory where all files are governed by
4087 (license license:expat)))
4089 (define-public python2-pickleshare
4090 (package-with-python2 python-pickleshare))
4092 (define-public python-simplegeneric
4094 (name "python-simplegeneric")
4099 (uri (string-append "https://pypi.python.org/packages/source/s/"
4100 "simplegeneric/simplegeneric-" version ".zip"))
4102 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4103 (build-system python-build-system)
4105 `(("python-setuptools" ,python-setuptools)
4107 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4108 (synopsis "Python module for simple generic functions")
4110 "The simplegeneric module lets you define simple single-dispatch generic
4111 functions, akin to Python’s built-in generic functions like @code{len()},
4112 @code{iter()} and so on. However, instead of using specially-named methods,
4113 these generic functions use simple lookup tables, akin to those used by
4114 e.g. @code{pickle.dump()} and other generic functions found in the Python
4118 (define-public python2-simplegeneric
4119 (package-with-python2 python-simplegeneric))
4121 (define-public python-ipython-genutils
4123 (name "python-ipython-genutils")
4128 (uri (string-append "https://pypi.python.org/packages/source/i/"
4129 "ipython_genutils/ipython_genutils-"
4132 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4133 (build-system python-build-system)
4134 (arguments `(#:tests? #f)) ; no tests
4135 (home-page "http://ipython.org")
4136 (synopsis "Vestigial utilities from IPython")
4138 "This package provides retired utilities from IPython.")
4141 (define-public python2-ipython-genutils
4142 (package-with-python2 python-ipython-genutils))
4144 (define-public python-traitlets
4146 (name "python-traitlets")
4151 (uri (string-append "https://pypi.python.org/packages/source/t/"
4152 "traitlets/traitlets-" version ".tar.gz"))
4155 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4156 (build-system python-build-system)
4159 (modify-phases %standard-phases
4160 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4162 `(("python-ipython-genutils" ,python-ipython-genutils)
4163 ("python-decorator" ,python-decorator)))
4165 `(("python-nose" ,python-nose)))
4166 (home-page "http://ipython.org")
4167 (synopsis "Configuration system for Python applications")
4169 "Traitlets is a framework that lets Python classes have attributes with
4170 type checking, dynamically calculated default values, and ‘on change’
4171 callbacks. The package also includes a mechanism to use traitlets for
4172 configuration, loading values from files or from command line arguments. This
4173 is a distinct layer on top of traitlets, so you can use traitlets in your code
4174 without using the configuration machinery.")
4177 (define-public python2-traitlets
4178 (package-with-python2 python-traitlets))
4180 (define-public python-ipython
4182 (name "python-ipython")
4187 (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
4188 (uri (string-append "https://pypi.python.org/packages/source/i/"
4189 "ipython/ipython-" version ".tar.gz"))
4191 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4192 (build-system python-build-system)
4193 (outputs '("out" "doc"))
4195 `(("python-pyzmq" ,python-pyzmq)
4196 ("python-terminado" ,python-terminado)))
4198 `(("readline" ,readline)
4200 ("python-matplotlib" ,python-matplotlib)
4201 ("python-numpy" ,python-numpy)
4202 ("python-numpydoc" ,python-numpydoc)
4203 ("python-jinja2" ,python-jinja2)
4204 ("python-mistune" ,python-mistune)
4205 ("python-jsonschema" ,python-jsonschema)
4206 ("python-pygments" ,python-pygments)
4207 ("python-requests" ,python-requests) ;; for tests
4208 ("python-nose" ,python-nose)))
4210 `(("pkg-config" ,pkg-config)
4211 ("python-sphinx" ,python-sphinx)
4212 ("texlive" ,texlive)
4213 ("texinfo" ,texinfo)
4214 ("python-setuptools" ,python-setuptools)))
4217 (modify-phases %standard-phases
4219 'install 'install-doc
4220 (lambda* (#:key inputs outputs #:allow-other-keys)
4221 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4222 (doc (string-append data "/doc/" ,name "-" ,version))
4223 (html (string-append doc "/html"))
4224 (man1 (string-append data "/man/man1"))
4225 (info (string-append data "/info"))
4226 (examples (string-append doc "/examples")))
4227 (setenv "LANG" "en_US.utf8")
4228 (with-directory-excursion "docs"
4229 ;; FIXME: html and pdf fail to build
4230 ;; (system* "make" "html")
4231 ;; (system* "make" "pdf" "PAPER=a4")
4232 (system* "make" "info"))
4233 (copy-recursively "docs/man" man1)
4234 (copy-recursively "examples" examples)
4235 ;; (copy-recursively "docs/build/html" html)
4236 ;; (copy-file "docs/build/latex/ipython.pdf"
4237 ;; (string-append doc "/ipython.pdf"))
4239 (copy-file "docs/build/texinfo/ipython.info"
4240 (string-append info "/ipython.info"))
4241 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4242 ;; Tests can only be run after the library has been installed and not
4243 ;; within the source directory.
4247 (lambda* (#:key outputs tests? #:allow-other-keys)
4249 (with-directory-excursion "/tmp"
4250 (setenv "HOME" "/tmp/") ;; required by a test
4251 (zero? (system* (string-append (assoc-ref outputs "out")
4256 (lambda* (#:key inputs #:allow-other-keys)
4257 (substitute* "./IPython/utils/_process_posix.py"
4258 (("/usr/bin/env', 'which") (which "which")))
4259 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4260 (("#!/usr/bin/env python")
4261 (string-append "#!" (which "python"))))
4262 ;; Disable 1 failing test
4263 (substitute* "./IPython/core/tests/test_magic.py"
4264 (("def test_dirops\\(\\):" all)
4265 (string-append "@dec.skipif(True)\n" all))))))))
4266 (home-page "http://ipython.org")
4267 (synopsis "IPython is a tool for interactive computing in Python")
4269 "IPython provides a rich architecture for interactive computing with:
4270 Powerful interactive shells, a browser-based notebook, support for interactive
4271 data visualization, embeddable interpreters and tools for parallel
4275 (define-public python2-ipython
4276 (let ((ipython (package-with-python2 python-ipython)))
4279 ;; FIXME: some tests are failing
4281 `(#:tests? #f ,@(package-arguments ipython)))
4282 ;; Make sure we use custom python2-NAME packages.
4283 ;; FIXME: add pyreadline once available.
4285 `(("python2-terminado" ,python2-terminado)
4286 ,@(alist-delete "python-terminado"
4287 (package-propagated-inputs ipython))))
4289 `(("python2-mock" ,python2-mock)
4290 ("python2-matplotlib" ,python2-matplotlib)
4291 ("python2-numpy" ,python2-numpy)
4292 ,@(fold alist-delete (package-inputs ipython)
4293 '("python-matplotlib" "python-numpy")))))))
4295 (define-public python-isodate
4297 (name "python-isodate")
4303 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4308 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4309 (build-system python-build-system)
4311 `(("python-setuptools" ,python-setuptools)))
4313 "http://cheeseshop.python.org/pypi/isodate")
4315 "Python date parser and formatter")
4317 "Python-isodate is a python module for parsing and formatting
4318 ISO 8601 dates, time and duration.")
4321 (define-public python2-isodate
4322 (package-with-python2 python-isodate))
4324 (define-public python-html5lib
4326 (name "python-html5lib")
4332 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4337 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4338 (build-system python-build-system)
4340 `(("python-six" ,python-six))) ; required to "import html5lib"
4342 `(("python-setuptools" ,python-setuptools)))
4344 `(#:test-target "check"))
4346 "https://github.com/html5lib/html5lib-python")
4348 "Python HTML parser based on the WHATWG HTML specifcation")
4350 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4351 and written in Python.")
4352 (license license:expat)))
4354 (define-public python2-html5lib
4355 (package-with-python2 python-html5lib))
4357 (define-public python-urwid
4359 (name "python-urwid")
4364 (uri (pypi-uri "urwid" version))
4367 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4368 (build-system python-build-system)
4371 (modify-phases %standard-phases
4372 ;; Disable failing test. Bug filed upstream:
4373 ;; https://github.com/wardi/urwid/issues/164
4374 ;; TODO: check again for python-urwid > 1.3.0 or python > 3.4.3.
4375 (add-after 'unpack 'disable-failing-test
4377 (substitute* "urwid/tests/test_event_loops.py"
4378 (("test_remove_watch_file")
4379 "disable_remove_watch_file")))))))
4380 (native-inputs `(("python-setuptools" ,python-setuptools)))
4381 (home-page "http://urwid.org")
4382 (synopsis "Console user interface library for Python")
4384 "Urwid is a curses-based UI/widget library for Python. It includes many
4385 features useful for text console applications.")
4386 (license lgpl2.1+)))
4388 (define-public python2-urwid
4389 (package-with-python2 python-urwid))
4391 (define-public python-dbus
4393 (name "python-dbus")
4399 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4402 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4403 (build-system gnu-build-system)
4406 (modify-phases %standard-phases
4410 ;; XXX: For the missing '/etc/machine-id'.
4411 (substitute* "test/run-test.sh"
4412 (("DBUS_FATAL_WARNINGS=1")
4413 "DBUS_FATAL_WARNINGS=0"))
4416 `(("pkg-config" ,pkg-config)))
4418 `(("python" ,python)
4419 ("dbus-glib" ,dbus-glib)))
4420 (synopsis "Python bindings for D-bus")
4421 (description "python-dbus provides bindings for libdbus, the reference
4422 implementation of D-Bus.")
4423 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4424 (license license:expat)))
4426 (define-public python2-dbus
4427 (package (inherit python-dbus)
4428 (name "python2-dbus")
4429 (inputs `(("python" ,python-2)
4430 ,@(alist-delete "python"
4431 (package-inputs python-dbus)
4433 ;; FIXME: on Python 2, the test_utf8 fails with:
4434 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4435 (arguments `(#:tests? #f))))
4437 (define-public python-apsw
4439 (name "python-apsw")
4440 (version "3.8.7.3-r1")
4445 "https://pypi.python.org/packages/source/a/apsw/apsw-"
4450 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
4451 (build-system python-build-system)
4453 `(("python-setuptools" ,python-setuptools)
4454 ("sqlite" ,sqlite)))
4457 ;; swap check and install phases
4460 (assoc-ref %standard-phases 'check)
4463 %standard-phases))))
4464 (home-page "https://github.com/rogerbinns/apsw/")
4465 (synopsis "Another Python SQLite Wrapper")
4466 (description "APSW is a Python wrapper for the SQLite
4467 embedded relational database engine. In contrast to other wrappers such as
4468 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4469 translate the complete SQLite API into Python.")
4470 (license license:zlib)))
4472 (define-public python2-apsw
4473 (package-with-python2 python-apsw))
4475 (define-public python-lxml
4477 (name "python-lxml")
4483 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4488 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4489 (build-system python-build-system)
4491 `(("libxml2" ,libxml2)
4492 ("libxslt" ,libxslt)
4493 ("python-setuptools" ,python-setuptools)))
4494 (home-page "http://lxml.de/")
4496 "Python XML processing library")
4498 "The lxml XML toolkit is a Pythonic binding for the C libraries
4499 libxml2 and libxslt.")
4500 (license bsd-3))) ; and a few more, see LICENSES.txt
4502 (define-public python2-lxml
4503 (package-with-python2 python-lxml))
4505 (define-public python2-pil
4507 (name "python2-pil")
4513 "http://effbot.org/downloads/Imaging-"
4517 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4518 (modules '((guix build utils)))
4520 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4521 ;; there is no use in creating a patch and reporting it.
4522 '(substitute* "_imagingft.c"
4525 (build-system python-build-system)
4527 `(("freetype" ,freetype)
4528 ("libjpeg" ,libjpeg)
4529 ("libtiff" ,libtiff)
4530 ("python-setuptools" ,python-setuptools)
4533 ;; Only the fork python-pillow works with Python 3.
4534 `(#:python ,python-2
4535 #:tests? #f ; no check target
4539 ;; According to README and setup.py, manual configuration is
4540 ;; the preferred way of "searching" for inputs.
4541 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4542 (lambda* (#:key inputs #:allow-other-keys)
4543 (let ((jpeg (assoc-ref inputs "libjpeg"))
4544 (zlib (assoc-ref inputs "zlib"))
4545 (tiff (assoc-ref inputs "libtiff"))
4546 (freetype (assoc-ref inputs "freetype")))
4547 (substitute* "setup.py"
4548 (("JPEG_ROOT = None")
4549 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4550 (("ZLIB_ROOT = None")
4551 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4552 (("TIFF_ROOT = None")
4553 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4554 (("FREETYPE_ROOT = None")
4555 (string-append "FREETYPE_ROOT = libinclude(\""
4558 (home-page "http://www.pythonware.com/products/pil/")
4559 (synopsis "Python Imaging Library")
4560 (description "The Python Imaging Library (PIL) adds image processing
4561 capabilities to the Python interpreter.")
4564 "See 'README' in the distribution."))))
4566 (define-public python2-cssutils
4568 (name "python2-cssutils")
4574 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4579 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4580 (build-system python-build-system)
4582 `(("python2-mock" ,python2-mock) ; for the tests
4583 ("unzip" ,unzip))) ; for unpacking the source
4585 `(("python2-setuptools" ,python2-setuptools)))
4587 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4588 #:tests? #f ; The tests apparently download an external URL.
4590 (home-page "http://cthedot.de/cssutils/")
4592 "CSS Cascading Style Sheets library for Python")
4594 "Cssutils is a Python package for parsing and building CSS
4595 Cascading Style Sheets. Currently it provides a DOM only and no rendering
4599 (define-public python-cssselect
4601 (name "python-cssselect")
4607 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4612 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4613 (build-system python-build-system)
4615 `(("python-setuptools" ,python-setuptools)))
4617 ;; tests fail with message
4618 ;; AttributeError: 'module' object has no attribute 'tests'
4621 "https://pythonhosted.org/cssselect/")
4623 "CSS3 selector parser and translator to XPath 1.0")
4625 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4626 them to XPath 1.0 expressions. Such expressions can be used in lxml or
4627 another XPath engine to find the matching elements in an XML or HTML document.")
4630 (define-public python2-cssselect
4631 (package-with-python2 python-cssselect))
4633 (define-public python-netifaces
4635 (name "python-netifaces")
4641 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4646 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4647 (build-system python-build-system)
4649 `(("python-setuptools" ,python-setuptools)))
4651 "https://bitbucket.org/al45tair/netifaces")
4653 "Python module for portable network interface information")
4655 "Netifaces is a Python module providing information on network
4656 interfaces in an easy and portable manner.")
4657 (license license:expat)))
4659 (define-public python2-netifaces
4660 (package-with-python2 python-netifaces))
4662 (define-public python-networkx
4664 (name "python-networkx")
4670 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4673 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4674 (build-system python-build-system)
4675 ;; python-decorator is needed at runtime
4677 `(("python-decorator" ,python-decorator)))
4679 `(("python-setuptools" ,python-setuptools)
4680 ("python-nose" ,python-nose)))
4681 (home-page "http://networkx.github.io/")
4682 (synopsis "Python module for creating and manipulating graphs and networks")
4684 "NetworkX is a Python package for the creation, manipulation, and study
4685 of the structure, dynamics, and functions of complex networks.")
4688 (define-public python2-networkx
4689 (package-with-python2 python-networkx))
4691 (define-public snakemake
4699 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4702 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4703 (build-system python-build-system)
4704 (inputs `(("python-setuptools" ,python-setuptools)))
4705 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4706 (synopsis "Python-based execution environment for make-like workflows")
4708 "Snakemake aims to reduce the complexity of creating workflows by
4709 providing a clean and modern domain specific specification language (DSL) in
4710 Python style, together with a fast and comfortable execution environment.")
4711 (license license:expat)))
4713 (define-public python-seaborn
4715 (name "python-seaborn")
4721 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4724 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4725 (build-system python-build-system)
4727 `(("python-pandas" ,python-pandas)
4728 ("python-matplotlib" ,python-matplotlib)
4729 ("python-scipy" ,python-scipy)))
4731 `(("python-setuptools" ,python-setuptools)))
4732 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4733 (synopsis "Statistical data visualization")
4735 "Seaborn is a library for making attractive and informative statistical
4736 graphics in Python. It is built on top of matplotlib and tightly integrated
4737 with the PyData stack, including support for numpy and pandas data structures
4738 and statistical routines from scipy and statsmodels.")
4741 (define-public python2-seaborn
4742 (let ((seaborn (package-with-python2 python-seaborn)))
4743 (package (inherit seaborn)
4745 `(("python2-pytz" ,python2-pytz)
4746 ("python2-pandas" ,python2-pandas)
4747 ("python2-matplotlib" ,python2-matplotlib)
4748 ("python2-scipy" ,python2-scipy))))))
4750 (define-public python-sympy
4752 (name "python-sympy")
4758 "https://github.com/sympy/sympy/releases/download/sympy-"
4759 version "/sympy-" version ".tar.gz"))
4761 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4762 (build-system python-build-system)
4764 `(("python-setuptools" ,python-setuptools)))
4765 (home-page "http://www.sympy.org/")
4766 (synopsis "Python library for symbolic mathematics")
4768 "SymPy is a Python library for symbolic mathematics. It aims to become a
4769 full-featured computer algebra system (CAS) while keeping the code as simple
4770 as possible in order to be comprehensible and easily extensible.")
4773 (define-public python2-sympy
4774 (package-with-python2 python-sympy))
4776 (define-public python-testlib
4778 (name "python-testlib")
4784 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4787 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4788 (build-system python-build-system)
4790 `(("python-setuptools" ,python-setuptools)))
4792 `(("unzip" ,unzip)))
4797 (lambda* (#:key inputs outputs #:allow-other-keys)
4798 (let ((unzip (string-append (assoc-ref inputs "unzip")
4800 (source (assoc-ref inputs "source")))
4801 (and (zero? (system* unzip source))
4802 (chdir (string-append "testlib-" ,version)))))
4804 (synopsis "Python micro test suite harness")
4805 (description "A micro unittest suite harness for Python.")
4806 (home-page "https://github.com/trentm/testlib")
4807 (license license:expat)))
4809 (define-public python2-testlib
4810 (package-with-python2 python-testlib))
4812 (define-public python2-xlib
4814 (name "python2-xlib")
4818 (uri (string-append "mirror://sourceforge/python-xlib/"
4819 "python-xlib-" version ".tar.gz"))
4822 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4823 (build-system python-build-system)
4825 `(#:python ,python-2 ;Python 2 only
4826 #:tests? #f)) ;no tests
4828 `(("python-setuptools" ,python-setuptools)))
4829 (home-page "http://python-xlib.sourceforge.net/")
4830 (synopsis "Python X11 client library")
4832 "The Python X Library is intended to be a fully functional X client
4833 library for Python programs. It is useful to implement low-level X clients.
4834 It is written entirely in Python.")
4837 (define-public python-singledispatch
4839 (name "python-singledispatch")
4845 "https://pypi.python.org/packages/source/s/singledispatch/"
4846 "singledispatch-" version ".tar.gz"))
4849 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4850 (build-system python-build-system)
4852 `(("python-setuptools" ,python-setuptools)))
4854 `(("python-six" ,python-six)))
4856 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4857 (synopsis "Backport of singledispatch feature from Python 3.4")
4859 "This library brings functools.singledispatch from Python 3.4 to Python
4861 (license license:expat)))
4863 (define-public python2-singledispatch
4864 (package-with-python2 python-singledispatch))
4866 (define-public python-tornado
4868 (name "python-tornado")
4874 "https://pypi.python.org/packages/source/t/tornado/"
4875 "tornado-" version ".tar.gz"))
4877 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4878 (build-system python-build-system)
4880 `(("python-certifi" ,python-certifi)))
4882 `(("python-setuptools" ,python-setuptools)))
4883 (home-page "http://www.tornadoweb.org/")
4884 (synopsis "Python web framework and asynchronous networking library")
4886 "Tornado is a Python web framework and asynchronous networking library,
4887 originally developed at FriendFeed. By using non-blocking network I/O,
4888 Tornado can scale to tens of thousands of open connections, making it ideal
4889 for long polling, WebSockets, and other applications that require a long-lived
4890 connection to each user.")
4893 (define-public python2-tornado
4894 (let ((tornado (package-with-python2 python-tornado)))
4895 (package (inherit tornado)
4897 `(("python2-backport-ssl-match-hostname"
4898 ,python2-backport-ssl-match-hostname)
4899 ,@(package-inputs tornado))))))
4901 (define-public python-waf
4907 (uri (string-append "https://waf.io/"
4908 "waf-" version ".tar.bz2"))
4911 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4912 (build-system python-build-system)
4915 (modify-phases %standard-phases
4919 (system* "python" "waf-light" "configure")
4920 (system* "python" "waf-light" "build")))))
4923 (zero? (system* "python" "waf" "--version"))))
4926 (copy-file "waf" %output))))))
4927 (home-page "https://waf.io/")
4928 (synopsis "Python-based build system")
4930 "Waf is a Python-based framework for configuring, compiling and installing
4934 (define-public python2-waf
4935 (package-with-python2 python-waf))
4937 (define-public python-pyzmq
4939 (name "python-pyzmq")
4944 (uri (pypi-uri "pyzmq" version))
4946 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
4947 (build-system python-build-system)
4950 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4951 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4952 ;; --inplace' for 'python setup.py test' to work.
4955 `(("zeromq" ,zeromq)))
4957 `(("pkg-config" ,pkg-config)
4958 ("python-nose" ,python-nose)
4959 ("python-setuptools" ,python-setuptools)))
4960 (home-page "http://github.com/zeromq/pyzmq")
4961 (synopsis "Python bindings for 0MQ")
4963 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4966 (define-public python2-pyzmq
4967 (package-with-python2 python-pyzmq))
4969 (define-public python-pep8
4971 (name "python-pep8")
4977 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4982 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4983 (build-system python-build-system)
4985 `(("python-setuptools" ,python-setuptools)))
4986 (home-page "http://pep8.readthedocs.org/")
4987 (synopsis "Python style guide checker")
4989 "This tools checks Python code against some of the style conventions in
4991 (license license:expat)))
4993 (define-public python2-pep8
4994 (package-with-python2 python-pep8))
4996 (define-public python-pyflakes
4998 (name "python-pyflakes")
5003 (uri (pypi-uri "pyflakes" version))
5006 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5007 (build-system python-build-system)
5009 `(("python-setuptools" ,python-setuptools)))
5011 "https://github.com/pyflakes/pyflakes")
5012 (synopsis "Passive checker of Python programs")
5014 "Pyflakes statically checks Python source code for common errors.")
5015 (license license:expat)))
5017 (define-public python2-pyflakes
5018 (package-with-python2 python-pyflakes))
5020 (define-public python-mccabe
5022 (name "python-mccabe")
5028 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5033 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5034 (build-system python-build-system)
5036 `(("python-setuptools" ,python-setuptools)))
5037 (home-page "https://github.com/flintwork/mccabe")
5038 (synopsis "McCabe checker, plugin for flake8")
5040 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5041 complexity of Python source code.")
5042 (license license:expat)))
5044 (define-public python2-mccabe
5045 (package-with-python2 python-mccabe))
5047 (define-public python-mccabe-0.2.1
5048 (package (inherit python-mccabe)
5053 (uri (pypi-uri "mccabe" version))
5056 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5058 (define-public python2-mccabe-0.2.1
5059 (package-with-python2 python-mccabe-0.2.1))
5061 ;; Flake8 2.4.1 requires an older version of pep8.
5062 ;; This should be removed ASAP.
5063 (define-public python-pep8-1.5.7
5064 (package (inherit python-pep8)
5070 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5075 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5077 (define-public python2-pep8-1.5.7
5078 (package-with-python2 python-pep8-1.5.7))
5080 ;; Flake8 2.4.1 requires an older version of pyflakes.
5081 ;; This should be removed ASAP.
5082 (define-public python-pyflakes-0.8.1
5083 (package (inherit python-pyflakes)
5089 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5094 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5096 (define-public python2-pyflakes-0.8.1
5097 (package-with-python2 python-pyflakes-0.8.1))
5099 (define-public python-flake8
5101 (name "python-flake8")
5106 (uri (pypi-uri "flake8" version))
5109 "00sn2g5ydriv5anbipcrprpv797kh4q8rfa75w3fc7v7n14fv2j4"))))
5110 (build-system python-build-system)
5112 `(("python-setuptools" ,python-setuptools)
5113 ("python-pep8" ,python-pep8-1.5.7)
5114 ("python-pyflakes" ,python-pyflakes-0.8.1)
5115 ("python-mccabe" ,python-mccabe)
5116 ("python-mock" ,python-mock)
5117 ("python-nose" ,python-nose)))
5118 (home-page "https://gitlab.com/pycqa/flake8")
5120 "The modular source code checker: pep8, pyflakes and co")
5122 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5123 (license license:expat)))
5125 (define-public python2-flake8
5126 (package-with-python2 python-flake8))
5128 ;; This will only be needed by the python-hacking package and will not be
5129 ;; necessary once python-hacking > 0.10.2 is released.
5130 (define-public python-flake8-2.2.4
5131 (package (inherit python-flake8)
5133 `(("python-setuptools" ,python-setuptools)
5134 ("python-pep8" ,python-pep8-1.5.7)
5135 ("python-pyflakes" ,python-pyflakes-0.8.1)
5136 ("python-mccabe" ,python-mccabe-0.2.1)
5137 ("python-mock" ,python-mock)
5138 ("python-nose" ,python-nose)))
5143 (uri (pypi-uri "flake8" version))
5146 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5148 (define-public python2-flake8-2.2.4
5149 (package-with-python2 python-flake8-2.2.4))
5151 (define-public python-mistune
5153 (name "python-mistune")
5159 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5164 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5165 (build-system python-build-system)
5167 `(("python-setuptools" ,python-setuptools)
5168 ("python-nose" ,python-nose)
5169 ("python-cython" ,python-cython)))
5170 (home-page "https://github.com/lepture/mistune")
5171 (synopsis "Markdown parser in pure Python")
5172 (description "This package provides a fast markdown parser in pure
5176 (define-public python2-mistune
5177 (package-with-python2 python-mistune))
5179 (define-public python-markdown
5181 (name "python-markdown")
5186 (uri (pypi-uri "Markdown" version))
5189 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5190 (build-system python-build-system)
5193 (modify-phases %standard-phases
5196 (zero? (system* "python" "run-tests.py")))))))
5198 `(("python-nose" ,python-nose)
5199 ("python-pyyaml" ,python-pyyaml)))
5200 (home-page "https://pythonhosted.org/Markdown/")
5201 (synopsis "Python implementation of Markdown")
5203 "This package provides a Python implementation of John Gruber's
5204 Markdown. The library features international input, various Markdown
5205 extensions, and several HTML output formats. A command line wrapper
5206 markdown_py is also provided to convert Markdown files to HTML.")
5209 (define-public python2-markdown
5210 (package-with-python2 python-markdown))
5212 (define-public python-ptyprocess
5214 (name "python-ptyprocess")
5220 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5224 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5225 (build-system python-build-system)
5227 `(("python-setuptools" ,python-setuptools)
5228 ("python-nose" ,python-nose)))
5231 (modify-phases %standard-phases
5234 (zero? (system* "nosetests")))))))
5235 (home-page "https://github.com/pexpect/ptyprocess")
5236 (synopsis "Run a subprocess in a pseudo terminal")
5238 "This package provides a Python library used to launch a subprocess in a
5239 pseudo terminal (pty), and interact with both the process and its pty.")
5242 (define-public python2-ptyprocess
5243 (package-with-python2 python-ptyprocess))
5245 (define-public python-terminado
5247 (name "python-terminado")
5253 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5257 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5258 (build-system python-build-system)
5260 `(("python-tornado" ,python-tornado)
5261 ("python-ptyprocess" ,python-ptyprocess)))
5263 `(("python-setuptools" ,python-setuptools)
5264 ("python-nose" ,python-nose)))
5267 (modify-phases %standard-phases
5270 (zero? (system* "nosetests")))))))
5271 (home-page "https://github.com/takluyver/terminado")
5272 (synopsis "Terminals served to term.js using Tornado websockets")
5273 (description "This package provides a Tornado websocket backend for the
5274 term.js Javascript terminal emulator library.")
5277 (define-public python2-terminado
5278 (let ((terminado (package-with-python2 python-terminado)))
5279 (package (inherit terminado)
5281 `(("python2-tornado" ,python2-tornado)
5282 ("python2-backport-ssl-match-hostname"
5283 ,python2-backport-ssl-match-hostname)
5284 ,@(alist-delete "python-tornado"
5285 (package-propagated-inputs terminado)))))))
5287 (define-public python-fonttools
5289 (name "python-fonttools")
5294 "https://pypi.python.org/packages/source/F/FontTools/"
5295 "fonttools-" version ".tar.gz"))
5298 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5299 (build-system python-build-system)
5300 (arguments '(#:test-target "check"))
5302 ;; XXX: module not found if setuptools is not available.
5303 `(("python-setuptools" ,python-setuptools)))
5304 (home-page "http://github.com/behdad/fonttools")
5305 (synopsis "Tools to manipulate font files")
5307 "FontTools/TTX is a library to manipulate font files from Python. It
5308 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5309 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5310 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5311 from an XML-based format.")
5312 (license (non-copyleft "file://LICENSE.txt"
5313 "See LICENSE.txt in the distribution."))))
5315 (define-public python2-fonttools
5316 (package-with-python2 python-fonttools))
5318 (define-public python-ly
5326 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5330 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
5331 (build-system python-build-system)
5333 `(("python-setuptools" ,python-setuptools)))
5334 (synopsis "Tool and library for manipulating LilyPond files")
5335 (description "This package provides a Python library to parse, manipulate
5336 or create documents in LilyPond format. A command line program ly is also
5337 provided that can be used to do various manipulations with LilyPond files.")
5338 (home-page "https://pypi.python.org/pypi/python-ly")
5341 (define-public python-appdirs
5343 (name "python-appdirs")
5349 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5354 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5355 (build-system python-build-system)
5357 `(("python-setuptools" ,python-setuptools)))
5358 (home-page "http://github.com/ActiveState/appdirs")
5360 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5362 "This module provides a portable way of finding out where user data
5363 should be stored on various operating systems.")
5364 (license license:expat)))
5366 (define-public python2-appdirs
5367 (package-with-python2 python-appdirs))
5369 (define-public python-llfuse
5371 (name "python-llfuse")
5376 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5377 "llfuse-" version ".tar.bz2"))
5380 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5381 (build-system python-build-system)
5386 `(("pkg-config" ,pkg-config)
5387 ("python-setuptools" ,python-setuptools)))
5388 (synopsis "Python bindings for FUSE")
5390 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5391 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5392 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5393 ;; The rest of the package is licensed under LGPL2.0 or later.
5394 (license (list license:expat lgpl2.0+))))
5396 (define-public python2-llfuse
5397 (package-with-python2 python-llfuse))
5399 (define-public python-msgpack
5401 (name "python-msgpack")
5406 "https://pypi.python.org/packages/source/m/"
5407 "msgpack-python/msgpack-python-" version ".tar.gz"))
5410 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5411 (build-system python-build-system)
5413 `(("python-setuptools" ,python-setuptools)))
5414 (synopsis "MessagePack (de)serializer")
5415 (description "MessagePack is a fast, compact binary serialization format,
5416 suitable for similar data to JSON. This package provides CPython bindings for
5417 reading and writing MessagePack data.")
5418 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5421 (define-public python2-msgpack
5422 (package-with-python2 python-msgpack))
5424 (define-public python-netaddr
5426 (name "python-netaddr")
5432 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5437 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5438 (build-system python-build-system)
5439 (arguments `(#:tests? #f)) ;; No tests.
5441 `(("python-setuptools" ,python-setuptools)))
5442 (home-page "https://github.com/drkjam/netaddr/")
5443 (synopsis "Pythonic manipulation of network addresses")
5445 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5446 and MAC network addresses.")
5449 (define-public python2-netaddr
5450 (package-with-python2 python-netaddr))
5452 (define-public python-wrapt
5454 (name "python-wrapt")
5460 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5465 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5466 (build-system python-build-system)
5468 ;; Tests are not included in the tarball, they are only available in the
5472 `(("python-setuptools" ,python-setuptools)))
5473 (home-page "https://github.com/GrahamDumpleton/wrapt")
5474 (synopsis "Module for decorators, wrappers and monkey patching")
5476 "The aim of the wrapt module is to provide a transparent object proxy for
5477 Python, which can be used as the basis for the construction of function
5478 wrappers and decorator functions.")
5481 (define-public python2-wrapt
5482 (package-with-python2 python-wrapt))
5484 (define-public python-iso8601
5486 (name "python-iso8601")
5492 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5497 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5498 (build-system python-build-system)
5500 `(("python-setuptools" ,python-setuptools)))
5501 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5502 (synopsis "Module to parse ISO 8601 dates")
5504 "This module parses the most common forms of ISO 8601 date strings (e.g.
5505 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5506 (license license:expat)))
5508 (define-public python2-iso8601
5509 (package-with-python2 python-iso8601))
5511 (define-public python-monotonic
5513 (name "python-monotonic")
5519 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5524 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5525 (build-system python-build-system)
5527 `(("python-setuptools" ,python-setuptools)))
5528 (home-page "https://github.com/atdt/monotonic")
5529 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5531 "This module provides a monotonic() function which returns the value (in
5532 fractional seconds) of a clock which never goes backwards.")
5535 (define-public python2-monotonic
5536 (package-with-python2 python-monotonic))
5538 (define-public python-webob
5540 (name "python-webob")
5545 (uri (pypi-uri "WebOb" version))
5548 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5549 (build-system python-build-system)
5551 `(("python-nose" ,python-nose)
5552 ("python-setuptools" ,python-setuptools)))
5553 (home-page "http://webob.org/")
5554 (synopsis "WSGI request and response object")
5556 "WebOb provides wrappers around the WSGI request environment, and an
5557 object to help create WSGI responses.")
5558 (license license:expat)))
5560 (define-public python2-webob
5561 (package-with-python2 python-webob))
5563 (define-public python-xlrd
5565 (name "python-xlrd")
5569 (uri (string-append "https://pypi.python.org/packages/source/x/"
5570 "xlrd/xlrd-" version ".tar.gz"))
5573 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5574 (build-system python-build-system)
5577 (modify-phases %standard-phases
5578 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5579 ;; run tests instead for now.
5580 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5581 (native-inputs `(("python-nose" ,python-nose)
5582 ("python-setuptools" ,python-setuptools)))
5583 (home-page "http://www.python-excel.org/")
5584 (synopsis "Library for extracting data from Excel files")
5585 (description "This packages provides a library to extract data from
5586 spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5587 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5588 Unicode-aware. It is not intended as an end-user tool.")
5591 (define-public python2-xlrd
5592 (package-with-python2 python-xlrd))
5594 (define-public python-prettytable
5596 (name "python-prettytable")
5602 "https://pypi.python.org/packages/source/P/PrettyTable/"
5603 "prettytable-" version ".tar.bz2"))
5606 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5607 (build-system python-build-system)
5609 `(("python-setuptools" ,python-setuptools)))
5610 (home-page "http://code.google.com/p/prettytable/")
5611 (synopsis "Display tabular data in an ASCII table format")
5613 "A library designed to represent tabular data in visually appealing ASCII
5614 tables. PrettyTable allows for selection of which columns are to be printed,
5615 independent alignment of columns (left or right justified or centred) and
5616 printing of sub-tables by specifying a row range.")
5619 (define-public python2-prettytable
5620 (package-with-python2 python-prettytable))
5622 (define-public python-pyasn1
5624 (name "python-pyasn1")
5629 (uri (string-append "https://pypi.python.org/packages/source/p/"
5630 "pyasn1/pyasn1-" version ".tar.gz"))
5633 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5634 (build-system python-build-system)
5635 (home-page "http://pyasn1.sourceforge.net/")
5636 (synopsis "ASN.1 types and codecs")
5638 "This is an implementation of ASN.1 types and codecs in Python. It is
5639 suitable for a wide range of protocols based on the ASN.1 specification.")
5642 (define-public python2-pyasn1
5643 (package-with-python2 python-pyasn1))
5645 (define-public python2-ipaddress
5647 (name "python2-ipaddress")
5652 (uri (string-append "https://pypi.python.org/packages/source/i/"
5653 "ipaddress/ipaddress-" version ".tar.gz"))
5656 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5657 (build-system python-build-system)
5659 `(#:tests? #f ; no tests
5660 #:python ,python-2))
5661 (home-page "https://github.com/phihag/ipaddress")
5662 (synopsis "IP address manipulation library")
5664 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5665 in Python. This library is used to create, poke at, and manipulate IPv4 and
5666 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5667 module to older versions of Python.")
5670 (define-public python-idna
5672 (name "python-idna")
5677 (uri (string-append "https://pypi.python.org/packages/source/i/"
5678 "idna/idna-" version ".tar.gz"))
5681 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5682 (build-system python-build-system)
5684 `(("python-setuptools" ,python-setuptools)))
5685 (home-page "https://github.com/kjd/idna")
5686 (synopsis "Internationalized domain names in applications")
5688 "This is a library to support the Internationalised Domain Names in
5689 Applications (IDNA) protocol as specified in RFC 5891. This version of the
5690 protocol is often referred to as “IDNA2008” and can produce different results
5691 from the earlier standard from 2003. The library is also intended to act as a
5692 suitable drop-in replacement for the “encodings.idna” module that comes with
5693 the Python standard library but currently only supports the older 2003
5697 (define-public python2-idna
5698 (package-with-python2 python-idna))
5700 (define-public python-pretend
5702 (name "python-pretend")
5707 (uri (string-append "https://pypi.python.org/packages/source/p/"
5708 "pretend/pretend-" version ".tar.gz"))
5711 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5712 (build-system python-build-system)
5714 `(("python-setuptools" ,python-setuptools)))
5715 (home-page "https://github.com/alex/pretend")
5716 (synopsis "Library for stubbing in Python")
5718 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5719 technique for writing tests. You may hear the term mixed up with mocks,
5720 fakes, or doubles. Basically, a stub is an object that returns pre-canned
5721 responses, rather than doing any computation.")
5724 (define-public python2-pretend
5725 (package-with-python2 python-pretend))
5727 (define-public python-cryptography-vectors
5729 (name "python-cryptography-vectors")
5734 (uri (string-append "https://pypi.python.org/packages/source/c/"
5735 "cryptography-vectors/cryptography_vectors-"
5739 "0dx98kcypmarwwhi6rjwy30ridys2ja6mc6mjf0svd4nllkaljdq"))))
5740 (build-system python-build-system)
5742 `(("python-setuptools" ,python-setuptools)))
5743 (home-page "https://github.com/pyca/cryptography")
5744 (synopsis "Test vectors for the cryptography package.")
5746 "This package contains test vectors for the cryptography package.")
5747 ;; Distributed under either BSD-3 or ASL2.0
5748 (license (list bsd-3 asl2.0))))
5750 (define-public python2-cryptography-vectors
5751 (package-with-python2 python-cryptography-vectors))
5753 (define-public python-cryptography
5755 (name "python-cryptography")
5760 (uri (string-append "https://pypi.python.org/packages/source/c/"
5761 "cryptography/cryptography-" version ".tar.gz"))
5764 "1jmcidddbbgdavvnvjjc0pda4b9a5i9idsivchn69pqxx68x8k6n"))))
5765 (build-system python-build-system)
5767 `(("openssl" ,openssl)))
5769 `(("python-cffi" ,python-cffi)
5770 ("python-six" ,python-six)
5771 ("python-pyasn1" ,python-pyasn1)
5772 ("python-enum34" ,python-enum34)
5773 ("python-idna" ,python-idna)
5774 ("python-iso8601" ,python-iso8601)))
5776 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5777 ("python-setuptools" ,python-setuptools)
5778 ("python-pretend" ,python-pretend)
5779 ("python-pytest" ,python-pytest)))
5780 (home-page "https://github.com/pyca/cryptography")
5781 (synopsis "Cryptographic recipes and primitives for Python")
5783 "cryptography is a package which provides cryptographic recipes and
5784 primitives to Python developers. It aims to be the “cryptographic standard
5785 library” for Python. The package includes both high level recipes, and low
5786 level interfaces to common cryptographic algorithms such as symmetric ciphers,
5787 message digests and key derivation functions.")
5788 ;; Distributed under either BSD-3 or ASL2.0
5789 (license (list bsd-3 asl2.0))))
5791 (define-public python2-cryptography
5792 (let ((crypto (package-with-python2 python-cryptography)))
5793 (package (inherit crypto)
5795 `(("python2-ipaddress" ,python2-ipaddress)
5796 ,@(package-propagated-inputs crypto))))))
5798 (define-public python-pyopenssl
5800 (name "python-pyopenssl")
5805 (uri (string-append "https://pypi.python.org/packages/source/p/"
5806 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5809 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5810 (build-system python-build-system)
5813 (modify-phases %standard-phases
5814 (add-after 'unpack 'fix-tests
5815 (lambda* (#:key inputs #:allow-other-keys)
5816 (substitute* "OpenSSL/test/test_ssl.py"
5817 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5819 ;; FIXME: disable broken test
5820 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5821 (substitute* "OpenSSL/test/test_crypto.py"
5822 (("command = b\"openssl \"")
5823 (string-append "command = b\""
5824 (assoc-ref inputs "openssl")
5825 "/bin/openssl" " \""))
5826 ;; FIXME: disable four broken tests
5827 (("test_der") "disabled__der")
5828 (("test_digest") "disabled__digest")
5829 (("test_get_extension") "disabled__get_extension")
5830 (("test_extension_count") "disabled__extension_count"))
5833 `(("python-cryptography" ,python-cryptography)
5834 ("python-six" ,python-six)))
5836 `(("openssl" ,openssl)))
5838 `(("python-setuptools" ,python-setuptools)))
5839 (home-page "https://github.com/pyca/pyopenssl")
5840 (synopsis "Python wrapper module around the OpenSSL library")
5842 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5846 (define-public python2-pyopenssl
5847 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5848 (package (inherit pyopenssl)
5850 `(("python2-cryptography" ,python2-cryptography)
5851 ,@(alist-delete "python-cryptography"
5852 (package-propagated-inputs pyopenssl)))))))
5854 (define-public python-pip
5862 "https://pypi.python.org/packages/source/p/pip/pip-"
5866 "0xx4aypfgchxdknxq7gyqghd8wb221zrzyqlbabzm32jy237j16a"))))
5867 (build-system python-build-system)
5869 `(("python-setuptools" ,python-setuptools)
5870 ("python-virtualenv" ,python-virtualenv)
5872 ("python-mock" ,python-mock)
5873 ("python-pytest" ,python-pytest)
5874 ("python-scripttest" ,python-scripttest)))
5875 (home-page "https://pip.pypa.io/")
5877 "Package manager for Python software")
5879 "Pip is a package manager for Python software, that finds packages on the
5880 Python Package Index (PyPI).")
5881 (license license:expat)))
5883 (define-public python2-pip
5884 (package-with-python2 python-pip))
5886 (define-public python-tlsh
5888 (name "python-tlsh")
5890 (home-page "https://github.com/trendmicro/tlsh")
5893 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
5897 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
5898 (file-name (string-append name "-" version ".tar.gz"))))
5899 (build-system cmake-build-system)
5901 '(#:out-of-source? #f
5902 #:phases (modify-phases %standard-phases
5905 (lambda* (#:key outputs #:allow-other-keys)
5906 ;; Build and install the Python bindings. The underlying
5907 ;; C++ library is apparently not meant to be installed.
5908 (let ((out (assoc-ref outputs "out")))
5909 (with-directory-excursion "py_ext"
5910 (and (system* "python" "setup.py" "build")
5911 (system* "python" "setup.py" "install"
5912 (string-append "--prefix=" out))))))))))
5913 (inputs `(("python" ,python-wrapper))) ;for the bindings
5914 (synopsis "Fuzzy matching library for Python")
5916 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5917 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5918 value which can be used for similarity comparisons. Similar objects have
5919 similar hash values, which allows for the detection of similar objects by
5920 comparing their hash values. The byte stream should have a sufficient amount
5921 of complexity; for example, a byte stream of identical bytes will not generate
5925 (define-public python2-tlsh
5927 (inherit python-tlsh)
5928 (name "python2-tlsh")
5929 (inputs `(("python" ,python-2)))))
5931 (define-public python-libarchive-c
5933 (name "python-libarchive-c")
5937 (uri (pypi-uri "libarchive-c" version))
5940 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
5941 (build-system python-build-system)
5943 '(#:phases (modify-phases %standard-phases
5945 'build 'reference-libarchive
5946 (lambda* (#:key inputs #:allow-other-keys)
5947 ;; Retain the absolute file name of libarchive.so.
5948 (let ((libarchive (assoc-ref inputs "libarchive")))
5949 (substitute* "libarchive/ffi.py"
5950 (("find_library\\('archive'\\)")
5951 (string-append "'" libarchive
5952 "/lib/libarchive.so'"))))
5954 ;; Do not make a compressed egg (see
5955 ;; <http://bugs.gnu.org/20765>).
5956 (let ((port (open-file "setup.cfg" "a")))
5957 (display "\n[easy_install]\nzip_ok = 0\n"
5962 `(("python-setuptools" ,python-setuptools)
5963 ("libarchive" ,libarchive)))
5964 (home-page "https://github.com/Changaco/python-libarchive-c")
5965 (synopsis "Python interface to libarchive")
5967 "This package provides Python bindings to libarchive, a C library to
5968 access possibly compressed archives in many different formats. It uses
5969 Python's @code{ctypes} foreign function interface (FFI).")
5970 (license lgpl2.0+)))
5972 (define-public python2-libarchive-c
5973 (package-with-python2 python-libarchive-c))
5975 (define-public python-file
5978 (name "python-file")
5979 (build-system python-build-system)
5981 '(#:tests? #f ;no tests
5982 #:phases (modify-phases %standard-phases
5983 (add-before 'build 'change-directory
5987 (add-before 'build 'set-library-file-name
5988 (lambda* (#:key inputs #:allow-other-keys)
5989 (let ((file (assoc-ref inputs "file")))
5990 (substitute* "magic.py"
5991 (("find_library\\('magic'\\)")
5992 (string-append "'" file "/lib/libmagic.so'")))
5994 (inputs `(("file" ,file)))
5995 (self-native-input? #f)
5996 (synopsis "Python bindings to the libmagic file type guesser")))
5998 (define-public python2-file
5999 (package-with-python2 python-file))
6001 (define-public python-debian
6003 (name "python-debian")
6009 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6013 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6014 (build-system python-build-system)
6016 `(("python-six" ,python-six)))
6018 `(("python-setuptools" ,python-setuptools)))
6019 (home-page "http://packages.debian.org/sid/python-debian")
6020 (synopsis "Debian package related modules")
6022 ;; XXX: Use @enumerate instead of @itemize to work around
6023 ;; <http://bugs.gnu.org/21772>.
6024 "This package provides Python modules that abstract many formats of
6025 Debian-related files, such as:
6028 @item Debtags information;
6029 @item @file{debian/changelog} files;
6030 @item packages files, pdiffs;
6031 @item control files of single or multiple RFC822-style paragraphs---e.g.
6032 @file{debian/control}, @file{.changes}, @file{.dsc};
6033 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6034 contained files and meta-information.
6037 ;; Modules are either GPLv2+ or GPLv3+.
6040 (define-public python2-debian
6041 (package-with-python2 python-debian))
6043 (define-public python-chardet
6045 (name "python-chardet")
6051 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6056 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6057 (build-system python-build-system)
6059 `(("python-setuptools" ,python-setuptools)))
6060 (home-page "https://github.com/chardet/chardet")
6061 (synopsis "Universal encoding detector for Python 2 and 3")
6063 "This package provides @code{chardet}, a Python module that can
6064 automatically detect a wide range of file encodings.")
6065 (license lgpl2.1+)))
6067 (define-public python2-chardet
6068 (package-with-python2 python-chardet))
6070 (define-public python-docopt
6072 (name "python-docopt")
6077 ;; The release on PyPI does not include tests.
6079 "https://github.com/docopt/docopt/archive/"
6081 (file-name (string-append name "-" version ".tar.gz"))
6084 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6085 (build-system python-build-system)
6087 `(("python-pytest" ,python-pytest)
6088 ("python-setuptools" ,python-setuptools)))
6090 `(#:phases (alist-replace
6092 (lambda _ (zero? (system* "py.test")))
6094 (home-page "http://docopt.org")
6095 (synopsis "Command-line interface description language for Python")
6096 (description "This library allows the user to define a command-line
6097 interface from a program's help message rather than specifying it
6098 programatically with command-line parsers like @code{getopt} and
6100 (license license:expat)))
6102 (define-public python2-docopt
6103 (package-with-python2 python-docopt))
6105 (define-public python-zope-event
6107 (name "python-zope-event")
6112 (uri (string-append "https://pypi.python.org/packages/source/z"
6113 "/zope.event/zope.event-" version ".tar.gz"))
6116 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6117 (build-system python-build-system)
6119 `(("python-setuptools" ,python-setuptools)))
6120 (home-page "http://pypi.python.org/pypi/zope.event")
6121 (synopsis "Event publishing system for Python")
6122 (description "Zope.event provides an event publishing API, intended for
6123 use by applications which are unaware of any subscribers to their events. It
6124 is a simple event-dispatching system on which more sophisticated event
6125 dispatching systems can be built.")
6128 (define-public python2-zope-event
6129 (package-with-python2 python-zope-event))
6131 (define-public python-zope-interface
6133 (name "python-zope-interface")
6138 (uri (string-append "https://pypi.python.org/packages/source/z"
6139 "/zope.interface/zope.interface-" version ".tar.gz"))
6142 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6143 (build-system python-build-system)
6145 `(("python-zope-event" ,python-zope-event)))
6146 (home-page "https://github.com/zopefoundation/zope.interface")
6147 (synopsis "Python implementation of the \"design by contract\"
6149 (description "Zope.interface provides an implementation of \"object
6150 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6151 conforming to a given API or contract.")
6154 (define-public python2-zope-interface
6155 (package-with-python2 python-zope-interface))
6157 (define-public python-zope-exceptions
6159 (name "python-zope-exceptions")
6164 (uri (string-append "https://pypi.python.org/packages/source/z"
6165 "/zope.exceptions/zope.exceptions-"
6169 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6170 (build-system python-build-system)
6172 '(#:tests? #f)) ; circular dependency with zope.testrunner
6174 `(("python-zope-interface" ,python-zope-interface)))
6175 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6176 (synopsis "Zope exceptions")
6177 (description "Zope.exceptions provides general-purpose exception types
6178 that have uses outside of the Zope framework.")
6181 (define-public python2-zope-exceptions
6182 (package-with-python2 python-zope-exceptions))
6184 (define-public python-zope-testing
6186 (name "python-zope-testing")
6191 (uri (string-append "https://pypi.python.org/packages/source/z"
6192 "/zope.testing/zope.testing-" version ".tar.gz"))
6195 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6196 (build-system python-build-system)
6198 `(("python-zope-exceptions" ,python-zope-exceptions)))
6200 `(("python-zope-interface" ,python-zope-interface)))
6201 (home-page "http://pypi.python.org/pypi/zope.testing")
6202 (synopsis "Zope testing helpers")
6203 (description "Zope.testing provides a number of testing utilities for HTML
6204 forms, HTTP servers, regular expressions, and more.")
6207 (define-public python2-zope-testing
6208 (package-with-python2 python-zope-testing))
6210 (define-public python-zope-testrunner
6212 (name "python-zope-testrunner")
6217 (uri (string-append "https://pypi.python.org/packages/source/z"
6218 "/zope.testrunner/zope.testrunner-"
6222 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6223 (build-system python-build-system)
6225 `(("python-six" ,python-six)
6226 ("python-zope-exceptions" ,python-zope-exceptions)
6227 ("python-zope-testing" ,python-zope-testing)
6230 `(("python-zope-interface" ,python-zope-interface)))
6231 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6232 (synopsis "Zope testrunner script")
6233 (description "Zope.testrunner provides a script for running Python
6237 (define-public python2-zope-testrunner
6238 (let ((base (package-with-python2 python-zope-testrunner)))
6242 (append (package-native-inputs base)
6243 `(("python2-subunit" ,python2-subunit)
6244 ("python2-mimeparse" ,python2-mimeparse)))))))
6246 (define-public python-zope-i18nmessageid
6248 (name "python-zope-i18nmessageid")
6254 "https://pypi.python.org/packages/source/z"
6255 "/zope.i18nmessageid/zope.i18nmessageid-"
6259 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6260 (build-system python-build-system)
6262 `(("python-setuptools" ,python-setuptools)))
6263 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6264 (synopsis "Message identifiers for internationalization")
6265 (description "Zope.i18nmessageid provides facilities for declaring
6266 internationalized messages within program source text.")
6269 (define-public python2-zope-i18nmessageid
6270 (package-with-python2 python-zope-i18nmessageid))
6272 (define-public python-zope-schema
6274 (name "python-zope-schema")
6279 (uri (string-append "https://pypi.python.org/packages/source/z"
6280 "/zope.schema/zope.schema-" version ".tar.gz"))
6283 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6284 (build-system python-build-system)
6286 `(("python-zope-event" ,python-zope-event)
6287 ("python-zope-interface" ,python-zope-interface)))
6289 `(("python-zope-testing" ,python-zope-testing)))
6290 (home-page "http://pypi.python.org/pypi/zope.schema")
6291 (synopsis "Zope data schemas")
6292 (description "Zope.scheme provides extensions to zope.interface for
6293 defining data schemas.")
6296 (define-public python2-zope-schema
6297 (package-with-python2 python-zope-schema))
6299 (define-public python-zope-configuration
6301 (name "python-zope-configuration")
6305 (uri (string-append "https://pypi.python.org/packages/source/z"
6306 "/zope.configuration/zope.configuration-"
6310 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6311 (build-system python-build-system)
6313 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6314 ("python-zope-schema" ,python-zope-schema)))
6315 (home-page "http://pypi.python.org/pypi/zope.configuration")
6316 (synopsis "Zope Configuration Markup Language")
6317 (description "Zope.configuration implements ZCML, the Zope Configuration
6321 (define-public python2-zope-configuration
6322 (package-with-python2 python-zope-configuration))
6324 (define-public python-zope-proxy
6326 (name "python-zope-proxy")
6331 (uri (string-append "https://pypi.python.org/packages/source/z"
6332 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6335 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6336 (build-system python-build-system)
6338 `(("python-zope-interface" ,python-zope-interface)))
6339 (home-page "http://pypi.python.org/pypi/zope.proxy")
6340 (synopsis "Generic, transparent proxies")
6341 (description "Zope.proxy provides generic, transparent proxies for Python.
6342 Proxies are special objects which serve as mostly-transparent wrappers around
6343 another object, intervening in the apparent behavior of the wrapped object
6344 only when necessary to apply the policy (e.g., access checking, location
6345 brokering, etc.) for which the proxy is responsible.")
6348 (define-public python2-zope-proxy
6349 (package-with-python2 python-zope-proxy))
6351 (define-public python-zope-location
6353 (name "python-zope-location")
6358 (uri (string-append "https://pypi.python.org/packages/source/z"
6359 "/zope.location/zope.location-" version ".tar.gz"))
6362 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6363 (build-system python-build-system)
6365 `(("python-zope-proxy" ,python-zope-proxy)
6366 ("python-zope-schema" ,python-zope-schema)))
6367 (home-page "http://pypi.python.org/pypi/zope.location/")
6368 (synopsis "Zope location library")
6369 (description "Zope.location implements the concept of \"locations\" in
6370 Zope3, which are are special objects that have a structural location.")
6373 (define-public python2-zope-location
6374 (package-with-python2 python-zope-location))
6376 (define-public python-zope-security
6378 (name "python-zope-security")
6383 (uri (string-append "https://pypi.python.org/packages/source/z"
6384 "/zope.security/zope.security-" version ".tar.gz"))
6387 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6388 (build-system python-build-system)
6390 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6391 ("python-zope-component" ,python-zope-component)
6392 ("python-zope-location" ,python-zope-location)
6393 ("python-zope-proxy" ,python-zope-proxy)
6394 ("python-zope-schema" ,python-zope-schema)
6395 ("python-zope-testrunner" ,python-zope-testrunner)
6396 ("python-zope-testing" ,python-zope-testing)))
6397 (home-page "http://pypi.python.org/pypi/zope.security")
6398 (synopsis "Zope security framework")
6399 (description "Zope.security provides a generic mechanism to implement
6400 security policies on Python objects.")
6403 (define-public python2-zope-security
6404 (let ((zope-security (package-with-python2 python-zope-security)))
6405 (package (inherit zope-security)
6407 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6409 "python-zope-testrunner"
6410 (package-propagated-inputs zope-security)))))))
6412 (define-public python-zope-component
6414 (name "python-zope-component")
6419 (uri (string-append "https://pypi.python.org/packages/source/z"
6420 "/zope.component/zope.component-" version ".tar.gz"))
6423 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6424 (build-system python-build-system)
6426 ;; Skip tests due to circular dependency with python-zope-security.
6429 `(("python-zope-testing" ,python-zope-testing)))
6431 `(("python-zope-event" ,python-zope-event)
6432 ("python-zope-interface" ,python-zope-interface)
6433 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6434 ("python-zope-configuration" ,python-zope-configuration)))
6435 (home-page "https://github.com/zopefoundation/zope.component")
6436 (synopsis "Zope Component Architecture")
6437 (description "Zope.component represents the core of the Zope Component
6438 Architecture. Together with the zope.interface package, it provides
6439 facilities for defining, registering and looking up components.")
6442 (define-public python2-zope-component
6443 (package-with-python2 python-zope-component))
6445 (define-public python2-pythondialog
6447 (name "python2-pythondialog")
6452 (uri (string-append "https://pypi.python.org/packages/source/p/"
6453 "python2-pythondialog/python2-pythondialog-"
6457 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6458 (build-system python-build-system)
6461 (modify-phases %standard-phases
6462 (add-after 'unpack 'patch-path
6463 (lambda* (#:key inputs #:allow-other-keys)
6464 (let* ((dialog (assoc-ref inputs "dialog")))
6465 ;; Since this library really wants to grovel the search path, we
6466 ;; must hardcode dialog's store path into it.
6467 (substitute* "dialog.py"
6468 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6469 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6472 #:tests? #f)) ; no test suite
6474 `(("dialog" ,dialog)))
6475 (home-page "http://pythondialog.sourceforge.net/")
6476 (synopsis "Python interface to the UNIX dialog utility")
6477 (description "A Python wrapper for the dialog utility. Its purpose is to
6478 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6479 This allows one to make simple text-mode user interfaces on Unix-like systems")
6482 (define-public python-pyrfc3339
6484 (name "python-pyrfc3339")
6489 (uri (pypi-uri "pyRFC3339" version))
6492 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
6493 (build-system python-build-system)
6495 `(("python-pytz" ,python-pytz)))
6497 `(("python-nose" ,python-nose)
6498 ("python-setuptools" ,python-setuptools)))
6499 (home-page "https://github.com/kurtraschke/pyRFC3339")
6500 (synopsis "Python timestamp library")
6501 (description "Python library for generating and parsing RFC 3339-compliant
6503 (license license:expat)))
6505 (define-public python2-pyrfc3339
6506 (package-with-python2 python-pyrfc3339))
6508 (define-public python-werkzeug
6510 (name "python-werkzeug")
6515 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6516 "/Werkzeug-" version ".tar.gz"))
6517 (file-name (string-append name "-" version ".tar.gz"))
6520 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6521 (build-system python-build-system)
6523 `(("python-pytest" ,python-pytest)))
6524 (home-page "http://werkzeug.pocoo.org/")
6525 (synopsis "Utilities for WSGI applications")
6526 (description "One of the most advanced WSGI utility modules. It includes a
6527 powerful debugger, full-featured request and response objects, HTTP utilities to
6528 handle entity tags, cache control headers, HTTP dates, cookie handling, file
6529 uploads, a powerful URL routing system and a bunch of community-contributed
6533 (define-public python2-werkzeug
6534 (package-with-python2 python-werkzeug))
6536 (define-public python-configobj
6538 (name "python-configobj")
6543 "https://pypi.python.org/packages/source/c/configobj/"
6544 "configobj-" version ".tar.gz"))
6547 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6548 ;; Patch setup.py so it looks for python-setuptools, which is
6549 ;; required to parse the keyword 'install_requires' in setup.py.
6550 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6551 (build-system python-build-system)
6553 `(("python-setuptools" ,python-setuptools)
6554 ("python-six" ,python-six)))
6555 (synopsis "Config file reading, writing and validation")
6556 (description "ConfigObj is a simple but powerful config file reader and
6557 writer: an ini file round tripper. Its main feature is that it is very easy to
6558 use, with a straightforward programmer’s interface and a simple syntax for
6560 (home-page "https://github.com/DiffSK/configobj")
6563 (define-public python2-configobj
6564 (package-with-python2 python-configobj))
6566 (define-public python-configargparse
6568 (name "python-configargparse")
6573 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6574 "ConfigArgParse-" version ".tar.gz"))
6577 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6578 (build-system python-build-system)
6580 ;; FIXME: Bug in test suite filed upstream:
6581 ;; https://github.com/bw2/ConfigArgParse/issues/32
6583 (synopsis "Replacement for argparse")
6584 (description "A drop-in replacement for argparse that allows options to also
6585 be set via config files and/or environment variables.")
6586 (home-page "https://github.com/bw2/ConfigArgParse")
6587 (license license:expat)))
6589 (define-public python2-configargparse
6590 (package-with-python2 python-configargparse))
6592 (define-public python-ndg-httpsclient
6594 (name "python-ndg-httpsclient")
6599 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6600 "ndg_httpsclient-" version ".tar.gz"))
6603 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6604 (build-system python-build-system)
6606 `(("python-pyopenssl" ,python-pyopenssl)))
6607 (synopsis "HTTPS support for Python's httplib and urllib2")
6608 (description "This is a HTTPS client implementation for httplib and urllib2
6609 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6610 over the default provided with Python and importantly enables full verification
6612 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6615 ;; python2-openssl requires special care, so package-with-python2 is
6617 (define-public python2-ndg-httpsclient
6618 (package (inherit python-ndg-httpsclient)
6619 (name "python2-ndg-httpsclient")
6620 (arguments `(#:python ,python-2))
6622 `(("python2-pyopenssl" ,python2-pyopenssl)))))
6624 (define-public python-contextlib2
6626 (name "python-contextlib2")
6631 (uri (pypi-uri "contextlib2" version))
6634 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6635 (build-system python-build-system)
6638 (modify-phases %standard-phases
6642 "python" "test_contextlib2.py", "-v")))))))
6643 (home-page "http://contextlib2.readthedocs.org/")
6644 (synopsis "Tools for decorators and context managers")
6645 (description "This module is primarily a backport of the Python
6646 3.2 contextlib to earlier Python versions. Like contextlib, it
6647 provides utilities for common tasks involving decorators and context
6648 managers. It also contains additional features that are not part of
6649 the standard library.")
6652 (define-public python2-contextlib2
6653 (package-with-python2 python-contextlib2))
6655 (define-public python-texttable
6657 (name "python-texttable")
6662 (uri (pypi-uri "texttable" version))
6665 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
6666 (build-system python-build-system)
6667 (arguments '(#:tests? #f)) ; no tests
6668 (home-page "https://github.com/foutaise/texttable/")
6669 (synopsis "Python module for creating simple ASCII tables")
6670 (description "Texttable is a Python module for creating simple ASCII
6672 (license lgpl2.1+)))
6674 (define-public python2-texttable
6675 (package-with-python2 python-texttable))
6677 (define-public python-websocket-client
6679 (name "python-websocket-client")
6684 (uri (string-append "https://pypi.python.org/packages/source/w"
6685 "/websocket-client/websocket_client-"
6689 "1prdx6d49f1cff17kzj15bnz09palfdgc1m5dkq9jd4mr90n4ak8"))))
6690 (build-system python-build-system)
6692 `(("python-six" ,python-six))) ; for tests
6694 `(("python-setuptools" ,python-setuptools)))
6695 (home-page "https://github.com/liris/websocket-client")
6696 (synopsis "WebSocket client for Python")
6697 (description "The Websocket-client module provides the low level APIs for
6698 WebSocket usage in Python programs.")
6699 (license lgpl2.1+)))
6701 (define-public python2-websocket-client
6702 (package-with-python2 python-websocket-client))
6704 (define-public python-atomicwrites
6706 (name "python-atomicwrites")
6710 (uri (pypi-uri "atomicwrites" version))
6713 "13nwk0gw0yb61pnf5vxs3fvhav6q3zrf08x9ggc93bnk5fsssx1j"))))
6714 (build-system python-build-system)
6715 (synopsis "Atomic file writes in Python")
6716 (description "Library for atomic file writes using platform dependent tools
6717 for atomic filesystem operations.")
6718 (home-page "https://github.com/untitaker/python-atomicwrites")
6719 (license license:expat)))
6721 (define-public python-requests-toolbelt
6723 (name "python-requests-toolbelt")
6727 (uri (pypi-uri "requests-toolbelt" version))
6730 "1kbms1s52dhb98vbpaprr15b0ijdbqp500lpfsyjccpd8cjkyngk"))))
6731 (build-system python-build-system)
6733 `(("python-requests" ,python-requests)))
6734 (synopsis "Extensions to python-requests")
6735 (description "This is a toolbelt of useful classes and functions to be used
6736 with python-requests.")
6737 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
6740 (define-public python-click-threading
6742 (name "python-click-threading")
6746 (uri (pypi-uri "click-threading" version))
6749 "0jmrv4334lfxa2ss53c06dafdwqbk1pb3ihd26izn5igw1bm8145"))))
6750 (build-system python-build-system)
6752 `(("python-click" ,python-click)))
6753 (synopsis "Utilities for multithreading in Click")
6754 (description "This package provides utilities for multithreading in Click
6756 (home-page "https://github.com/click-contrib/click-threading")
6757 (license license:expat)))
6759 (define-public python-click-log
6761 (name "python-click-log")
6765 (uri (pypi-uri "click-log" version))
6768 "1z3jdwjmwax159zrnyx830xa968rfqrpkm04ad5xqyh0269ydiqb"))))
6769 (build-system python-build-system)
6771 `(("python-click" ,python-click)))
6772 (synopsis "Logging for click applications")
6773 (description "This package provides a Python library for logging Click
6775 (home-page "https://github.com/click-contrib/click-log")
6776 (license license:expat)))
6778 (define-public python-apipkg
6780 (name "python-apipkg")
6784 (uri (pypi-uri "apipkg" version))
6787 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
6788 (build-system python-build-system)
6790 `(("unzip" ,unzip)))
6792 `(("python-pytest" ,python-pytest)))
6793 (synopsis "Namespace control and lazy-import mechanism")
6794 (description "With apipkg you can control the exported namespace of a Python
6795 package and greatly reduce the number of imports for your users. It is a small
6796 pure Python module that works on virtually all Python versions.")
6797 (home-page "https://bitbucket.org/hpk42/apipkg")
6798 (license license:expat)))
6800 (define-public python-execnet
6802 (name "python-execnet")
6806 (uri (pypi-uri "execnet" version))
6809 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
6810 (build-system python-build-system)
6812 `(("python-setuptools-scm" ,python-setuptools-scm)))
6814 `(("python-apipkg" ,python-apipkg)))
6815 (synopsis "Rapid multi-Python deployment")
6816 (description "Execnet provides a share-nothing model with
6817 channel-send/receive communication for distributing execution across many
6818 Python interpreters across version, platform and network barriers. It has a
6819 minimal and fast API targetting the following uses:
6821 @item distribute tasks to (many) local or remote CPUs
6822 @item write and deploy hybrid multi-process applications
6823 @item write scripts to administer multiple environments
6825 (home-page "http://codespeak.net/execnet/")
6826 (license license:expat)))
6828 ;;; The software provided by this package was integrated into pytest 2.8.
6829 (define-public python-pytest-cache
6831 (name "python-pytest-cache")
6835 (uri (pypi-uri "pytest-cache" version))
6838 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
6839 (build-system python-build-system)
6841 `(("python-execnet" ,python-execnet)))
6842 (synopsis "Py.test plugin with mechanisms for caching across test runs")
6843 (description "The pytest-cache plugin provides tools to rerun failures from
6844 the last py.test invocation.")
6845 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
6846 (license license:expat)))
6848 (define-public python-pytest-localserver
6850 (name "python-pytest-localserver")
6854 (uri (pypi-uri "pytest-localserver" version ".zip"))
6857 "050q505a7gnsz7vqidw0w5dvxjb2flzi7z734agpjzmsl85c2bcx"))))
6858 (build-system python-build-system)
6860 `(#:phases (modify-phases %standard-phases
6863 (zero? (system* "py.test" "--genscript=runtests.py"))
6864 (zero? (system* "py.test")))))))
6866 `(("unzip" ,unzip)))
6868 `(("python-pytest" ,python-pytest)
6869 ("python-requests" ,python-requests)
6870 ("python-six" ,python-six)
6871 ("python-werkzeug" ,python-werkzeug)))
6872 (synopsis "Py.test plugin to test server connections locally")
6873 (description "Pytest-localserver is a plugin for the pytest testing
6874 framework which enables you to test server connections locally.")
6875 (home-page "https://pypi.python.org/pypi/pytest-localserver")
6876 (license license:expat)))
6878 (define-public python-wsgi-intercept
6880 (name "python-wsgi-intercept")
6884 (uri (pypi-uri "wsgi_intercept" version))
6887 "0xyfchacywb1mql84270mcidsqc5ssyspd18yacjk82x2xc68h0r"))))
6888 (build-system python-build-system)
6890 `(("python-pytest" ,python-pytest)))
6892 `(("python-httplib2" ,python-httplib2)
6893 ("python-requests" ,python-requests)))
6894 (synopsis "Puts a WSGI application in place of a real URI for testing")
6895 (description "Wsgi_intercept installs a WSGI application in place of a real
6896 URI for testing. Testing a WSGI application normally involves starting a
6897 server at a local host and port, then pointing your test code to that address.
6898 Instead, this library lets you intercept calls to any specific host/port
6899 combination and redirect them into a WSGI application importable by your test
6900 program. Thus, you can avoid spawning multiple processes or threads to test
6902 (home-page "https://github.com/cdent/wsgi-intercept")
6903 (license license:expat)))
6905 (define-public python-pytest-xprocess
6907 (name "python-pytest-xprocess")
6911 (uri (pypi-uri "pytest-xprocess" version))
6914 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
6915 (build-system python-build-system)
6917 `(("python-pytest" ,python-pytest)
6918 ("python-pytest-cache" ,python-pytest-cache)
6919 ("python-psutil" ,python-psutil)))
6920 (synopsis "Pytest plugin to manage external processes across test runs")
6921 (description "Pytest-xprocess is an experimental py.test plugin for managing
6922 processes across test runs.")
6923 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
6924 (license license:expat)))
6926 (define-public python-icalendar
6928 (name "python-icalendar")
6932 (uri (pypi-uri "icalendar" version))
6935 "0fhrczdj3jxy5bvswphp3vys7vwv5c9bpwg7asykqwa3z6253q6q"))))
6936 (build-system python-build-system)
6938 `(("python-dateutil-2" ,python-dateutil-2)
6939 ("python-pytz" ,python-pytz)))
6940 (synopsis "Python library for parsing iCalendar files")
6941 (description "The icalendar package is a parser/generator of iCalendar
6942 files for use with Python.")
6943 (home-page "https://github.com/collective/icalendar")
6946 (define-public python-sphinxcontrib-newsfeed
6948 (name "python-sphinxcontrib-newsfeed")
6952 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
6955 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
6956 (build-system python-build-system)
6958 `(("python-docutils" ,python-docutils)
6959 ("python-sphinx" ,python-sphinx)))
6960 (synopsis "News Feed extension for Sphinx")
6961 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
6962 Blog, News or Announcements section to a Sphinx website.")
6963 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
6966 (define-public python-args
6968 (name "python-args")
6972 (uri (pypi-uri "args" version))
6975 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
6976 (build-system python-build-system)
6978 `(("python-setuptools" ,python-setuptools)))
6979 (home-page "https://github.com/kennethreitz/args")
6980 (synopsis "Command-line argument parser")
6982 "This library provides a Python module to parse command-line arguments.")
6985 (define-public python2-args
6986 (package-with-python2 python-args))
6988 (define-public python-clint
6990 (name "python-clint")
6994 (uri (pypi-uri "clint" version))
6997 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
6998 (build-system python-build-system)
7000 `(("python-args" ,python-args)
7001 ("python-setuptools" ,python-setuptools)))
7002 (home-page "https://github.com/kennethreitz/clint")
7003 (synopsis "Command-line interface tools")
7005 "Clint is a Python module filled with a set of tools for developing
7006 command-line applications, including tools for colored and indented
7007 output, progress bar display, and pipes.")
7010 (define-public python2-clint
7011 (package-with-python2 python-clint))
7013 (define-public python-astor
7015 (name "python-astor")
7019 (uri (pypi-uri "astor" version))
7022 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7023 (build-system python-build-system)
7025 `(("python-setuptools" ,python-setuptools)))
7026 (home-page "https://github.com/berkerpeksag/astor")
7027 (synopsis "Read and write Python ASTs")
7029 "Astor is designed to allow easy manipulation of Python source via the
7030 Abstract Syntax Tree.")
7033 (define-public python2-astor
7034 (package-with-python2 python-astor))
7036 (define-public python-rply
7038 (name "python-rply")
7042 (uri (pypi-uri "rply" version))
7045 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7046 (build-system python-build-system)
7048 `(("python-appdirs" ,python-appdirs)
7049 ("python-setuptools" ,python-setuptools)))
7050 (home-page "https://github.com/alex/rply")
7051 (synopsis "Parser generator for Python")
7053 "This package provides a pure Python based parser generator, that also
7054 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7055 with a new public API, and RPython support.")
7058 (define-public python2-rply
7059 (package-with-python2 python-rply))