1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 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, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 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, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
40 ;;; This file is part of GNU Guix.
42 ;;; GNU Guix is free software; you can redistribute it and/or modify it
43 ;;; under the terms of the GNU General Public License as published by
44 ;;; the Free Software Foundation; either version 3 of the License, or (at
45 ;;; your option) any later version.
47 ;;; GNU Guix is distributed in the hope that it will be useful, but
48 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 ;;; GNU General Public License for more details.
52 ;;; You should have received a copy of the GNU General Public License
53 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55 (define-module (gnu packages python)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages adns)
60 #:use-module (gnu packages attr)
61 #:use-module (gnu packages backup)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages file)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages graphviz)
73 #:use-module (gnu packages gstreamer)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages icu4c)
76 #:use-module (gnu packages image)
77 #:use-module (gnu packages imagemagick)
78 #:use-module (gnu packages libevent)
79 #:use-module (gnu packages libffi)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages multiprecision)
84 #:use-module (gnu packages networking)
85 #:use-module (gnu packages ncurses)
86 #:use-module (gnu packages openstack)
87 #:use-module (gnu packages password-utils)
88 #:use-module (gnu packages pcre)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages pkg-config)
91 #:use-module (gnu packages protobuf)
92 #:use-module (gnu packages qt)
93 #:use-module (gnu packages readline)
94 #:use-module (gnu packages sdl)
95 #:use-module (gnu packages shells)
96 #:use-module (gnu packages statistics)
97 #:use-module (gnu packages tex)
98 #:use-module (gnu packages texinfo)
99 #:use-module (gnu packages tls)
100 #:use-module (gnu packages version-control)
101 #:use-module (gnu packages video)
102 #:use-module (gnu packages web)
103 #:use-module (gnu packages base)
104 #:use-module (gnu packages xml)
105 #:use-module (gnu packages xorg)
106 #:use-module (gnu packages xdisorg)
107 #:use-module (gnu packages zip)
108 #:use-module (gnu packages tcl)
109 #:use-module (gnu packages bdw-gc)
110 #:use-module (guix packages)
111 #:use-module (guix download)
112 #:use-module (guix git-download)
113 #:use-module (guix utils)
114 #:use-module (guix build-system gnu)
115 #:use-module (guix build-system cmake)
116 #:use-module (guix build-system python)
117 #:use-module (guix build-system trivial)
118 #:use-module (srfi srfi-1))
120 (define-public python-2.7
127 (uri (string-append "https://www.python.org/ftp/python/"
128 version "/Python-" version ".tar.xz"))
131 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
132 (patches (search-patches "python-2.7-search-paths.patch"
133 "python-2-deterministic-build-info.patch"
134 "python-2.7-site-prefixes.patch"
135 "python-2.7-source-date-epoch.patch"))
136 (modules '((guix build utils)))
137 ;; suboptimal to delete failing tests here, but if we delete them in the
138 ;; arguments then we need to make sure to strip out that phase when it
139 ;; gets inherited by python and python-minimal.
142 (for-each delete-file
143 '("Lib/test/test_compileall.py"
144 "Lib/test/test_ctypes.py" ; fails on mips64el
145 "Lib/test/test_distutils.py"
146 "Lib/test/test_import.py"
147 "Lib/test/test_shutil.py"
148 "Lib/test/test_socket.py"
149 "Lib/test/test_subprocess.py"))
152 "tk")) ;tkinter; adds 50 MiB to the closure
153 (build-system gnu-build-system)
157 ;; test_compileall test_distutils test_import test_shutil test_socket
160 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
161 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
162 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
163 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
164 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
165 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
166 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
167 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
168 ;; test_winreg test_winsound test_zipfile64
169 ;; 4 skips unexpected on linux2:
170 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
173 (list "--enable-shared" ;allow embedding
174 "--with-system-ffi" ;build ctypes
175 "--with-ensurepip=install" ;install pip and setuptools
176 (string-append "LDFLAGS=-Wl,-rpath="
177 (assoc-ref %outputs "out") "/lib"))
179 #:modules ((ice-9 ftw) (ice-9 match)
180 (guix build utils) (guix build gnu-build-system))
182 (modify-phases %standard-phases
184 'configure 'patch-lib-shells
186 ;; Filter for existing files, since some may not exist in all
187 ;; versions of python that are built with this recipe.
188 (substitute* (filter file-exists?
189 '("Lib/subprocess.py"
191 "Lib/distutils/tests/test_spawn.py"
192 "Lib/test/test_subprocess.py"))
193 (("/bin/sh") (which "sh")))
195 ;; Use zero as the timestamp in .pyc files so that builds are
196 ;; deterministic. TODO: Remove it when this variable is set in
197 ;; gnu-build-system.scm.
198 (setenv "SOURCE_DATE_EPOCH" "1")
200 (add-before 'configure 'do-not-record-configure-flags
201 (lambda* (#:key configure-flags #:allow-other-keys)
202 ;; Remove configure flags from the installed '_sysconfigdata.py'
203 ;; and 'Makefile' so we don't end up keeping references to the
206 ;; Preserve at least '--with-system-ffi' since otherwise the
207 ;; thing tries to build libffi, fails, and we end up with a
208 ;; Python that lacks ctypes.
209 (substitute* "configure"
210 (("^CONFIG_ARGS=.*$")
211 (format #f "CONFIG_ARGS='~a'\n"
212 (if (member "--with-system-ffi" configure-flags)
219 ;; 'Lib/test/test_site.py' needs a valid $HOME
220 (setenv "HOME" (getcwd))
223 'unpack 'set-source-file-times-to-1980
224 ;; XXX One of the tests uses a ZIP library to pack up some of the
225 ;; source tree, and fails with "ZIP does not support timestamps
226 ;; before 1980". Work around this by setting the file times in the
227 ;; source tree to sometime in early 1980.
229 (let ((circa-1980 (* 10 366 24 60 60)))
230 (ftw "." (lambda (file stat flag)
231 (utime file circa-1980 circa-1980)
234 (add-after 'install 'remove-tests
235 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
236 ;; because these files are used by some libraries out there.
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let ((out (assoc-ref outputs "out")))
239 (match (scandir (string-append out "/lib")
241 (string-prefix? "python" name)))
243 (let ((testdir (string-append out "/lib/" pythonX.Y
245 (with-directory-excursion testdir
246 (for-each delete-file-recursively
252 (string-prefix? "test_support."
254 (call-with-output-file "__init__.py" (const #t))
256 (add-before 'strip 'make-libraries-writable
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; Make .so files writable so they can be stripped.
259 (let ((out (assoc-ref outputs "out")))
260 (for-each (lambda (file)
262 (find-files (string-append out "/lib")
265 (add-after 'install 'move-tk-inter
266 (lambda* (#:key outputs #:allow-other-keys)
267 ;; When Tkinter support is built move it to a separate output so
268 ;; that the main output doesn't contain a reference to Tcl/Tk.
269 (let ((out (assoc-ref outputs "out"))
270 (tk (assoc-ref outputs "tk")))
272 (match (find-files out "tkinter.*\\.so")
274 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
275 ;; want it under TK/lib/pythonX.Y/site-packages.
276 (let* ((len (string-length out))
277 (target (string-append
280 (dirname (dirname tkinter.so))
283 (install-file tkinter.so target)
284 (delete-file tkinter.so)))))
289 ("libffi" ,libffi) ; for ctypes
290 ("sqlite" ,sqlite) ; for sqlite extension
292 ("readline" ,readline)
295 ("tk" ,tk))) ; for tkinter
297 `(("pkg-config" ,pkg-config)))
299 (list (search-path-specification
300 (variable "PYTHONPATH")
301 (files '("lib/python2.7/site-packages")))))
302 (home-page "https://www.python.org")
303 (synopsis "High-level, dynamically-typed programming language")
305 "Python is a remarkably powerful dynamic programming language that
306 is used in a wide variety of application domains. Some of its key
307 distinguishing features include: clear, readable syntax; strong
308 introspection capabilities; intuitive object orientation; natural
309 expression of procedural code; full modularity, supporting hierarchical
310 packages; exception-based error handling; and very high level dynamic
312 (license license:psfl)))
314 ;; Current 2.x version.
315 (define-public python-2 python-2.7)
317 (define-public python-3.5
318 (package (inherit python-2)
322 (uri (string-append "https://www.python.org/ftp/python/"
323 version "/Python-" version ".tar.xz"))
324 (patches (search-patches
325 "python-fix-tests.patch"
326 "python-3.5-fix-tests.patch"
327 "python-3-deterministic-build-info.patch"
328 "python-3-search-paths.patch"))
329 (patch-flags '("-p0"))
332 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
333 (arguments (substitute-keyword-arguments (package-arguments python-2)
336 (list (search-path-specification
337 (variable "PYTHONPATH")
338 (files (list (string-append "lib/python"
339 (version-major+minor version)
340 "/site-packages"))))))))
342 (define-public python-3.4
343 (package (inherit python-3.5)
347 (uri (string-append "https://www.python.org/ftp/python/"
348 version "/Python-" version ".tar.xz"))
349 (patches (search-patches
350 "python-fix-tests.patch"
351 "python-3.4-fix-tests.patch"
352 "python-3-deterministic-build-info.patch"
353 "python-3-search-paths.patch"))
354 (patch-flags '("-p0"))
357 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
359 ;; Current 3.x version.
360 (define-public python-3 python-3.5)
362 ;; Current major version.
363 (define-public python python-3)
365 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
366 ;; Python (Tk -> libxcb -> Python.)
368 (define-public python2-minimal
369 (package (inherit python-2)
370 (name "python-minimal")
373 (substitute-keyword-arguments (package-arguments python-2)
374 ((#:configure-flags cf)
375 `(append ,cf '("--without-system-ffi")))))
376 (inputs '()))) ;none of the optional dependencies
378 (define-public python-minimal
379 (package (inherit python)
380 (name "python-minimal")
383 ;; Build fails due to missing ctypes without libffi.
384 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
385 ;; zlib is required by 'zipimport', used by pip.
386 (inputs `(("libffi" ,libffi)
390 (define* (wrap-python3 python
392 (name (string-append (package-name python) "-wrapper")))
393 (package (inherit python)
396 (build-system trivial-build-system)
398 (inputs `(("bash" ,bash)))
399 (propagated-inputs `(("python" ,python)))
401 `(#:modules ((guix build utils))
404 (use-modules (guix build utils))
405 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
406 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
410 (symlink (string-append python old)
411 (string-append bin "/" new)))
412 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
413 `("python" ,"pydoc" ,"idle" ,"pip"))
414 ;; python-config outputs search paths based upon its location,
415 ;; use a bash wrapper to avoid changing its outputs.
416 (let ((bash (string-append (assoc-ref %build-inputs "bash")
418 (old (string-append python "python3-config"))
419 (new (string-append bin "/python-config")))
420 (with-output-to-file new
422 (format #t "#!~a~%" bash)
423 (format #t "exec \"~a\" \"$@\"~%" old)
426 (synopsis "Wrapper for the Python 3 commands")
428 "This package provides wrappers for the commands of Python@tie{}3.x such
429 that they can be invoked under their usual name---e.g., @command{python}
430 instead of @command{python3}.")))
432 (define-public python-wrapper (wrap-python3 python))
433 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
435 (define-public python-psutil
437 (name "python-psutil")
442 (uri (pypi-uri "psutil" version))
445 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
446 (build-system python-build-system)
448 ;; FIXME: some tests does not return and times out.
450 (home-page "https://www.github.com/giampaolo/psutil")
451 (synopsis "Library for retrieving information on running processes")
453 "psutil (Python system and process utilities) is a library for retrieving
454 information on running processes and system utilization (CPU, memory, disks,
455 network) in Python. It is useful mainly for system monitoring, profiling and
456 limiting process resources and management of running processes. It implements
457 many functionalities offered by command line tools such as: ps, top, lsof,
458 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
459 pidof, tty, taskset, pmap.")
460 (license license:bsd-3)))
462 (define-public python2-psutil
463 (package-with-python2 python-psutil))
465 (define-public python-passlib
467 (name "python-passlib")
472 (uri (pypi-uri "passlib" version))
475 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
476 (build-system python-build-system)
478 `(("python-nose" ,python-nose)))
480 `(("python-py-bcrypt" ,python-py-bcrypt)))
484 'check 'set-PYTHON_EGG_CACHE
485 ;; some tests require access to "$HOME/.cython"
486 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
488 (home-page "https://bitbucket.org/ecollins/passlib")
490 "Comprehensive password hashing framework")
492 "Passlib is a password hashing library for Python 2 & 3, which provides
493 cross-platform implementations of over 30 password hashing algorithms, as well
494 as a framework for managing existing password hashes. It's designed to be
495 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
496 to providing full-strength password hashing for multi-user application.")
497 (license license:bsd-3)))
499 (define-public python2-passlib
500 (package-with-python2 python-passlib))
502 (define-public python-py-bcrypt
504 (name "python-py-bcrypt")
510 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
515 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
516 (build-system python-build-system)
517 (home-page "https://code.google.com/p/py-bcrypt")
519 "Bcrypt password hashing and key derivation")
521 "A python wrapper of OpenBSD's Blowfish password hashing code. This
522 system hashes passwords using a version of Bruce Schneier's Blowfish block
523 cipher with modifications designed to raise the cost of off-line password
524 cracking and frustrate fast hardware implementation. The computation cost of
525 the algorithm is parametised, so it can be increased as computers get faster.
526 The intent is to make a compromise of a password database less likely to
527 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
529 ;; "sha2.c" is under BSD-3;
530 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
531 ;; the rest is under ISC.
532 (license (list license:isc license:bsd-3 license:bsd-4))))
534 (define-public python2-py-bcrypt
535 (package-with-python2 python-py-bcrypt))
538 (define-public python-paramiko
540 (name "python-paramiko")
545 (uri (pypi-uri "paramiko" version))
548 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
549 (build-system python-build-system)
551 '(;; FIXME: One test fails with "EOFError not raised by connect".
554 ;; (modify-phases %standard-phases
557 ;; (zero? (system* "python" "test.py")))))))
559 `(("python-pycrypto" ,python-pycrypto)
560 ("python-ecdsa" ,python-ecdsa)))
561 (home-page "http://www.paramiko.org/")
562 (synopsis "SSHv2 protocol library")
563 (description "Paramiko is a python implementation of the SSHv2 protocol,
564 providing both client and server functionality. While it leverages a Python C
565 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
566 Python interface around SSH networking concepts.")
567 (license license:lgpl2.1+)))
569 (define-public python2-paramiko
570 (package-with-python2 python-paramiko))
573 (define-public python-httplib2
575 (name "python-httplib2")
580 (uri (pypi-uri "httplib2" version))
583 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
584 (build-system python-build-system)
585 (home-page "https://github.com/jcgregorio/httplib2")
586 (synopsis "Comprehensive HTTP client library")
588 "A comprehensive HTTP client library supporting many features left out of
589 other HTTP libraries.")
590 (license license:expat)))
592 (define-public python2-httplib2
593 (package-with-python2 python-httplib2))
595 (define-public python-ecdsa
597 (name "python-ecdsa")
603 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
608 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
609 (build-system python-build-system)
611 `(("openssl" ,openssl)))
613 "http://github.com/warner/python-ecdsa")
615 "ECDSA cryptographic signature library (pure python)")
617 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
618 Curve Digital Signature Algorithm), implemented purely in Python. With this
619 library, you can quickly create keypairs (signing key and verifying key), sign
620 messages, and verify the signatures. The keys and signatures are very short,
621 making them easy to handle and incorporate into other protocols.")
622 (license license:expat)))
624 (define-public python2-ecdsa
625 (package-with-python2 python-ecdsa))
627 (define-public python-ccm
634 (uri (pypi-uri "ccm" version))
637 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
638 (build-system python-build-system)
640 `(("python-pyyaml" ,python-pyyaml)
641 ;; Not listed in setup.py, but used in ccmlib/node.py for full
643 ("python-psutil" ,python-psutil)
644 ("python-six" ,python-six)))
645 (home-page "https://github.com/pcmanus/ccm")
646 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
648 (description "Cassandra Cluster Manager is a development tool for testing
649 local Cassandra clusters. It creates, launches and removes Cassandra clusters
651 (license license:asl2.0)))
653 (define-public python2-ccm
654 (package-with-python2 python-ccm))
656 (define-public python-pytz
663 (uri (pypi-uri "pytz" version ".tar.bz2"))
666 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
667 (build-system python-build-system)
668 (arguments `(#:tests? #f)) ; no test target
669 (home-page "http://pythonhosted.org/pytz")
670 (synopsis "Python timezone library")
672 "This library allows accurate and cross platform timezone calculations
673 using Python 2.4 or higher and provides access to the Olson timezone database.")
674 (license license:expat)))
676 (define-public python2-pytz
677 (package-with-python2 python-pytz))
680 (define-public python-babel
682 (name "python-babel")
687 (uri (pypi-uri "Babel" version))
690 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
691 (build-system python-build-system)
693 `(("python-pytz" ,python-pytz)))
694 (arguments `(#:tests? #f)) ; no test target
695 (home-page "http://babel.pocoo.org/")
697 "Tools for internationalizing Python applications")
699 "Babel is composed of two major parts:
700 - tools to build and work with gettext message catalogs
701 - a Python interface to the CLDR (Common Locale Data Repository), providing
702 access to various locale display names, localized number and date formatting,
704 (license license:bsd-3)))
706 (define-public python2-babel
707 (package-with-python2 python-babel))
709 (define-public python2-backport-ssl-match-hostname
711 (name "python2-backport-ssl-match-hostname")
717 "https://pypi.python.org/packages/source/b/"
718 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
722 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
723 (build-system python-build-system)
726 #:tests? #f)) ; no test target
727 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
728 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
730 "This backport brings the ssl.match_hostname() function to users of
731 earlier versions of Python. The function checks the hostname in the
732 certificate returned by the server to which a connection has been established,
733 and verifies that it matches the intended target hostname.")
734 (license license:psfl)))
736 (define-public python-hdf4
743 (uri (pypi-uri name version))
746 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
747 (build-system python-build-system)
748 (native-inputs `(("nose" ,python-nose)))
749 (propagated-inputs `(("numpy" ,python-numpy)))
756 (modify-phases %standard-phases
759 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
760 ;; on to import numpy. Somehow this works on their CI system.
761 ;; Let's just manage PYTHONPATH here instead.
762 (substitute* "runexamples.sh"
763 (("export PYTHONPATH=.*") ""))
765 (string-append (getcwd) ":"
766 (getenv "PYTHONPATH")))
767 (and (zero? (system* "./runexamples.sh"))
768 (zero? (system* "nosetests" "-v"))))))))
769 (home-page "https://github.com/fhs/python-hdf4")
770 (synopsis "Python interface to the NCSA HDF4 library")
772 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
773 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
774 NetCDF files can also be read and modified. Python-HDF4 is a fork of
775 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
776 (license license:expat)))
778 (define-public python2-hdf4
779 (package-with-python2 python-hdf4))
781 (define-public python-h5py
788 (uri (pypi-uri "h5py" version))
791 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
792 (build-system python-build-system)
794 `(#:tests? #f ; no test target
796 (modify-phases %standard-phases
797 (add-after 'unpack 'fix-hdf5-paths
798 (lambda* (#:key inputs #:allow-other-keys)
799 (let ((prefix (assoc-ref inputs "hdf5")))
800 (substitute* "setup_build.py"
801 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
802 (string-append "['" prefix "/lib" "']"))
803 (("'/opt/local/include', '/usr/local/include'")
804 (string-append "'" prefix "/include" "'")))
805 (substitute* "setup_configure.py"
806 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
807 (string-append "['" prefix "/lib" "']")))
810 `(("python-six" ,python-six)
811 ("python-numpy" ,python-numpy)))
815 `(("python-cython" ,python-cython)
816 ("python-pkgconfig" ,python-pkgconfig)))
817 (home-page "http://www.h5py.org/")
818 (synopsis "Read and write HDF5 files from Python")
820 "The h5py package provides both a high- and low-level interface to the
821 HDF5 library from Python. The low-level interface is intended to be a
822 complete wrapping of the HDF5 API, while the high-level component supports
823 access to HDF5 files, datasets and groups using established Python and NumPy
825 (license license:bsd-3)))
827 (define-public python2-h5py
828 (package-with-python2 python-h5py))
830 (define-public python-netcdf4
832 (name "python-netcdf4")
837 (uri (pypi-uri "netCDF4" version))
840 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
841 (build-system python-build-system)
843 `(("python-cython" ,python-cython)))
845 `(("python-numpy" ,python-numpy)))
852 (modify-phases %standard-phases
855 (setenv "NO_NET" "1") ; disable opendap tests
856 (with-directory-excursion "test"
857 (setenv "PYTHONPATH" ; find and add the library we just built
859 (car (find-files "../build" "lib.*"
861 #:fail-on-error? #:t))
862 ":" (getenv "PYTHONPATH")))
863 (zero? (system* "python" "run_all.py"))))))))
865 "https://github.com/Unidata/netcdf4-python")
866 (synopsis "Python/numpy interface to the netCDF library")
867 (description "Netcdf4-python is a Python interface to the netCDF C
868 library. netCDF version 4 has many features not found in earlier
869 versions of the library and is implemented on top of HDF5. This module
870 can read and write files in both the new netCDF 4 and the old netCDF 3
871 format, and can create files that are readable by HDF5 clients. The
872 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
873 to users of that module.")
874 ;; The software is mainly ISC, but includes some files covered
875 ;; by the Expat license.
876 (license (list license:isc license:expat))))
878 (define-public python2-netcdf4
879 (package-with-python2 python-netcdf4))
881 (define-public python-lockfile
883 (name "python-lockfile")
888 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
889 "lockfile-" version ".tar.gz"))
892 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
893 (build-system python-build-system)
894 (arguments '(#:test-target "check"))
896 `(("python-pbr" ,python-pbr)))
897 (home-page "https://launchpad.net/pylockfile")
898 (synopsis "Platform-independent file locking module")
900 "The lockfile package exports a LockFile class which provides a simple
901 API for locking files.")
902 (license license:expat)))
904 (define-public python2-lockfile
905 (package-with-python2 python-lockfile))
907 (define-public python-mock
914 (uri (pypi-uri "mock" version))
917 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
918 (build-system python-build-system)
919 (arguments '(#:test-target "check"))
920 (home-page "https://github.com/testing-cabal/mock")
921 (synopsis "Python mocking and patching library for testing")
923 "Mock is a library for testing in Python. It allows you to replace parts
924 of your system under test with mock objects and make assertions about how they
926 (license license:expat)))
928 (define-public python2-mock
929 (package-with-python2 python-mock))
932 (define-public python-setuptools
934 (name "python-setuptools")
939 (uri (pypi-uri "setuptools" version))
942 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
943 (modules '((guix build utils)))
946 ;; Remove included binaries which are used to build self-extracting
947 ;; installers for Windows.
948 ;; TODO: Find some way to build them ourself so we can include them.
949 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
951 (build-system python-build-system)
952 ;; FIXME: Tests require pytest, which itself relies on setuptools.
953 ;; One could bootstrap with an internal untested setuptools.
956 (home-page "https://pypi.python.org/pypi/setuptools")
958 "Library designed to facilitate packaging Python projects")
960 "Setuptools is a fully-featured, stable library designed to facilitate
961 packaging Python projects, where packaging includes:
962 Python package and module definitions,
963 distribution package metadata,
965 project installation,
966 platform-specific details,
968 ;; TODO: setuptools now bundles the following libraries:
969 ;; packaging, pyparsing, six and appdirs. How to unbundle?
970 (license (list license:psfl ; setuptools itself
971 license:expat ; six, appdirs, pyparsing
972 license:asl2.0 ; packaging is dual ASL2/BSD-2
975 (define-public python2-setuptools
976 (package-with-python2 python-setuptools))
978 ;;; Pycrypto is abandoned upstream:
980 ;;; https://github.com/dlitz/pycrypto/issues/173
982 ;;; TODO Remove this package from GNU Guix.
983 (define-public python-pycrypto
985 (name "python-pycrypto")
990 (uri (pypi-uri "pycrypto" version))
991 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
994 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
995 (build-system python-build-system)
1002 'build 'set-build-env
1003 ;; pycrypto runs an autoconf configure script behind the scenes
1005 (setenv "CONFIG_SHELL" (which "bash")))
1007 (home-page "http://www.pycrypto.org/")
1008 (synopsis "Cryptographic modules for Python")
1010 "Pycrypto is a collection of both secure hash functions (such as SHA256
1011 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1012 etc.). The package is structured to make adding new modules easy.")
1013 (license license:public-domain)))
1015 (define-public python2-pycrypto
1016 (let ((pycrypto (package-with-python2 python-pycrypto)))
1017 (package (inherit pycrypto)
1019 `(("python" ,python-2)
1022 (package-inputs pycrypto)))))))
1024 (define-public python-eventlet
1026 (name "python-eventlet")
1031 (uri (pypi-uri "eventlet" version))
1034 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1035 (build-system python-build-system)
1037 `(("python-greenlet" ,python-greenlet)))
1038 (home-page "http://eventlet.net")
1039 (synopsis "Concurrent networking library for Python")
1041 "Eventlet is a concurrent networking library for Python that
1042 allows you to change how you run your code, not how you write it.
1043 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1044 Coroutines ensure that the developer uses a blocking style of programming
1045 that is similar to threading, but provide the benefits of non-blocking I/O.
1046 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1047 from the Python interpreter, or as a small part of a larger application.")
1048 (license license:expat)))
1050 (define-public python2-eventlet
1051 (let ((base (package-with-python2
1052 (strip-python2-variant python-eventlet))))
1053 (package (inherit base)
1055 `(("python2-enum34" ,python2-enum34)
1056 ,@(package-propagated-inputs base))))))
1058 (define-public python-keyring
1060 (name "python-keyring")
1065 (uri (pypi-uri "keyring" version))
1068 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1069 (build-system python-build-system)
1071 `(("python-setuptools-scm" ,python-setuptools-scm)))
1073 `(("python-pycrypto" ,python-pycrypto)))
1075 `(#:tests? #f)) ;TODO: tests require pytest
1076 (home-page "https://github.com/jaraco/keyring")
1077 (synopsis "Store and access your passwords safely")
1079 "The Python keyring lib provides a easy way to access the system keyring
1080 service from python. It can be used in any application that needs safe
1082 ;; "MIT" and PSF dual license
1083 (license license:x11)))
1085 (define-public python2-keyring
1086 (package-with-python2 python-keyring))
1088 (define-public python-six
1095 (uri (pypi-uri "six" version))
1098 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1099 (build-system python-build-system)
1101 `(("python-py" ,python-py)
1102 ("python-pytest" ,python-pytest)))
1103 (home-page "http://pypi.python.org/pypi/six/")
1104 (synopsis "Python 2 and 3 compatibility utilities")
1106 "Six is a Python 2 and 3 compatibility library. It provides utility
1107 functions for smoothing over the differences between the Python versions with
1108 the goal of writing Python code that is compatible on both Python versions.
1109 Six supports every Python version since 2.5. It is contained in only one
1110 Python file, so it can be easily copied into your project.")
1111 (license license:x11)))
1113 (define-public python2-six
1114 (package-with-python2 python-six))
1116 (define-public python-dateutil
1118 (name "python-dateutil")
1123 (uri (pypi-uri "python-dateutil" version))
1126 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
1127 (build-system python-build-system)
1129 `(("python-six" ,python-six)))
1130 (home-page "https://dateutil.readthedocs.io/en/stable/")
1131 (synopsis "Extensions to the standard datetime module")
1133 "The dateutil module provides powerful extensions to the standard
1134 datetime module, available in Python 2.3+.")
1135 (license license:bsd-3)))
1137 (define-public python2-dateutil
1138 (package-with-python2 python-dateutil))
1140 (define-public python-parsedatetime
1142 (name "python-parsedatetime")
1147 (uri (pypi-uri "parsedatetime" version))
1150 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1151 (build-system python-build-system)
1153 `(("python-nose" ,python-nose)
1154 ("python-pyicu" ,python-pyicu)))
1155 (home-page "http://github.com/bear/parsedatetime/")
1157 "Parse human-readable date/time text")
1159 "Parse human-readable date/time text.")
1160 (license license:asl2.0)))
1162 (define-public python2-parsedatetime
1163 (package-with-python2 python-parsedatetime))
1165 (define-public python-pandas
1167 (name "python-pandas")
1172 (uri (pypi-uri "pandas" version))
1174 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1176 (search-patches "python-pandas-skip-failing-tests.patch"))))
1177 (build-system python-build-system)
1179 `(("python-numpy" ,python-numpy)
1180 ("python-pytz" ,python-pytz)
1181 ("python-dateutil" ,python-dateutil)))
1183 `(("python-nose" ,python-nose)
1184 ("python-cython" ,python-cython)))
1185 (home-page "http://pandas.pydata.org")
1186 (synopsis "Data structures for data analysis, time series, and statistics")
1188 "Pandas is a Python package providing fast, flexible, and expressive data
1189 structures designed to make working with structured (tabular,
1190 multidimensional, potentially heterogeneous) and time series data both easy
1191 and intuitive. It aims to be the fundamental high-level building block for
1192 doing practical, real world data analysis in Python.")
1193 (license license:bsd-3)))
1195 (define-public python2-pandas
1196 (package-with-python2 python-pandas))
1198 (define-public python-tzlocal
1200 (name "python-tzlocal")
1205 (uri (pypi-uri "tzlocal" version))
1208 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1209 (build-system python-build-system)
1211 `(("python-pytz" ,python-pytz)))
1212 (home-page "https://github.com/regebro/tzlocal")
1214 "Local timezone information for Python")
1216 "Tzlocal returns a tzinfo object with the local timezone information.
1217 This module attempts to fix a glaring hole in pytz, that there is no way to
1218 get the local timezone information, unless you know the zoneinfo name, and
1219 under several distributions that's hard or impossible to figure out.")
1220 (license license:cc0)))
1222 (define-public python2-pysqlite
1224 (name "python2-pysqlite")
1229 (uri (pypi-uri "pysqlite" version))
1232 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1233 (build-system python-build-system)
1235 `(("sqlite" ,sqlite)))
1237 `(#:python ,python-2 ; incompatible with Python 3
1238 #:tests? #f)) ; no test target
1239 (home-page "http://github.com/ghaering/pysqlite")
1240 (synopsis "SQLite bindings for Python")
1242 "Pysqlite provides SQLite bindings for Python that comply to the
1243 Database API 2.0T.")
1244 (license license:zlib)))
1247 (define-public python2-mechanize
1249 (name "python2-mechanize")
1254 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1258 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1259 (build-system python-build-system)
1261 `(#:python ,python-2 ; apparently incompatible with Python 3
1263 ;; test fails with message
1264 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1265 ;; (python-3.3.2) or
1266 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1268 ;; The source code is from March 2011 and probably not up-to-date
1269 ;; with respect to python unit tests.
1270 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1272 "Stateful programmatic web browsing in Python")
1274 "Mechanize implements stateful programmatic web browsing in Python,
1275 after Andy Lester’s Perl module WWW::Mechanize.")
1276 (license (license:non-copyleft
1278 "See COPYING in the distribution."))))
1281 (define-public python-simplejson
1283 (name "python-simplejson")
1288 (uri (pypi-uri "simplejson" version))
1291 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1292 (build-system python-build-system)
1293 (home-page "http://simplejson.readthedocs.org/en/latest/")
1295 "Json library for Python")
1297 "JSON (JavaScript Object Notation) is a subset of JavaScript
1298 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1301 Simplejson exposes an API familiar to users of the standard library marshal
1302 and pickle modules. It is the externally maintained version of the json
1303 library contained in Python 2.6, but maintains compatibility with Python 2.5
1304 and (currently) has significant performance advantages, even without using
1305 the optional C extension for speedups. Simplejson is also supported on
1307 (license license:x11)))
1309 (define-public python2-simplejson
1310 (package-with-python2 python-simplejson))
1313 (define-public python-pyicu
1315 (name "python-pyicu")
1320 (uri (pypi-uri "PyICU" version))
1323 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1324 (build-system python-build-system)
1327 (modify-phases %standard-phases
1328 (add-before 'check 'delete-failing-test
1330 ;; XXX: These tests require locales that are unavailable
1331 ;; in the build environment.
1332 (delete-file "test/test_DateTimeParserGenerator.py")
1335 `(("icu4c" ,icu4c)))
1336 (home-page "http://pyicu.osafoundation.org/")
1337 (synopsis "Python extension wrapping the ICU C++ API")
1339 "PyICU is a python extension wrapping the ICU C++ API.")
1340 (license license:x11)))
1342 (define-public python2-pyicu
1343 (package-with-python2 python-pyicu))
1345 (define-public python2-dogtail
1346 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1347 ;; spaces in indentation" with Python 3.
1349 (name "python2-dogtail")
1354 "https://fedorahosted.org/released/dogtail/dogtail-"
1358 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1359 (build-system python-build-system)
1360 (arguments `(#:python ,python-2
1361 #:tests? #f)) ; invalid command "test"
1362 (home-page "https://fedorahosted.org/dogtail/")
1363 (synopsis "GUI test tool and automation framework written in Python")
1365 "Dogtail is a GUI test tool and automation framework written in Python.
1366 It uses Accessibility (a11y) technologies to communicate with desktop
1367 applications. dogtail scripts are written in Python and executed like any
1368 other Python program.")
1369 (license license:gpl2+)))
1371 (define-public python2-empy
1373 (name "python2-empy")
1377 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1381 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1382 (build-system python-build-system)
1384 `(#:python ,python-2
1385 #:phases (alist-replace
1388 (zero? (system* "./test.sh")))
1390 (home-page "http://www.alcyone.com/software/empy/")
1391 (synopsis "Templating system for Python")
1393 "EmPy is a system for embedding Python expressions and statements in
1394 template text; it takes an EmPy source file, processes it, and produces
1395 output. This is accomplished via expansions, which are special signals to the
1396 EmPy system and are set off by a special prefix (by default the at sign, @@).
1397 EmPy can expand arbitrary Python expressions and statements in this way, as
1398 well as a variety of special forms. Textual data not explicitly delimited in
1399 this way is sent unaffected to the output, allowing Python to be used in
1400 effect as a markup language. Also supported are callbacks via hooks,
1401 recording and playback via diversions, and dynamic, chainable filters. The
1402 system is highly configurable via command line options and embedded
1404 (license license:lgpl2.1+)))
1406 (define-public python2-element-tree
1408 (name "python2-element-tree")
1413 "http://effbot.org/media/downloads/elementtree-"
1414 version "-20050316.tar.gz"))
1417 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1418 (build-system python-build-system)
1420 `(#:python ,python-2 ; seems to be part of Python 3
1421 #:tests? #f)) ; no 'test' sub-command
1422 (synopsis "Toolkit for XML processing in Python")
1424 "ElementTree is a Python library supporting lightweight XML processing.")
1425 (home-page "http://effbot.org/zone/element-index.htm")
1426 (license (license:x11-style
1427 "http://docs.python.org/2/license.html"
1428 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1430 (define-public python2-pybugz
1432 (name "python2-pybugz")
1437 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1441 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1442 (patches (search-patches "pybugz-stty.patch"
1443 "pybugz-encode-error.patch"))))
1444 (build-system python-build-system)
1446 `(#:python ,python-2 ; SyntaxError with Python 3
1447 #:tests? #f)) ; no 'test' sub-command
1449 `(("element-tree" ,python2-element-tree)))
1450 (synopsis "Python and command-line interface to Bugzilla")
1452 "PyBugz is a Python library and command-line tool to query the Bugzilla
1453 bug tracking system. It is meant as an aid to speed up interaction with the
1455 (home-page "http://www.liquidx.net/pybugz/")
1456 (license license:gpl2)))
1458 (define-public python-enum34
1460 (name "python-enum34")
1465 (uri (pypi-uri "enum34" version))
1468 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1469 (build-system python-build-system)
1474 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1476 (home-page "https://pypi.python.org/pypi/enum34")
1477 (synopsis "Backported Python 3.4 Enum")
1479 "Enum34 is the new Python stdlib enum module available in Python 3.4
1480 backported for previous versions of Python from 2.4 to 3.3.")
1481 (license license:bsd-3)))
1483 (define-public python2-enum34
1484 (package-with-python2 python-enum34))
1486 (define-public python-parse-type
1488 (name "python-parse-type")
1493 (uri (string-append "https://pypi.python.org/packages/source/p/"
1494 "parse_type/parse_type-" version ".tar.gz"))
1497 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1498 (build-system python-build-system)
1500 `(("python-six" ,python-six)
1501 ("python-parse" ,python-parse)))
1502 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1503 (home-page "https://github.com/jenisys/parse_type")
1504 (synopsis "Extended parse module")
1506 "Parse_type extends the python parse module.")
1507 (license license:bsd-3)))
1509 (define-public python-parse
1511 (name "python-parse")
1516 (uri (pypi-uri "parse" version))
1519 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1520 (patches (search-patches "python-parse-too-many-fields.patch"))))
1521 (build-system python-build-system)
1524 (modify-phases %standard-phases
1526 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1527 (home-page "https://github.com/r1chardj0n3s/parse")
1528 (synopsis "Parse strings")
1530 "Parse strings using a specification based on the Python format()
1532 (license license:x11)))
1534 (define-public python-polib
1536 (name "python-polib")
1540 (uri (pypi-uri "polib" version))
1543 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1544 (build-system python-build-system)
1545 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1546 (synopsis "Manipulate, create and modify gettext files")
1547 (description "Polib can manipulate any gettext format (po, pot and mo)
1548 files. It can be used to create po files from scratch or to modify
1550 (license license:expat)))
1552 (define-public python2-polib
1553 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1556 (arguments `(,@(package-arguments base)
1557 ;; Tests don't work with python2.
1560 (define-public scons
1566 (uri (string-append "mirror://sourceforge/scons/scons/" version
1567 "/scons-" version ".tar.gz"))
1570 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1571 (build-system python-build-system)
1573 ;; With Python 3.x, fails to build with a syntax error.
1574 `(#:python ,python-2
1575 #:use-setuptools? #f ; still relies on distutils
1576 #:tests? #f)) ; no 'python setup.py test' command
1577 (home-page "http://scons.org/")
1578 (synopsis "Software construction tool written in Python")
1580 "SCons is a software construction tool. Think of SCons as an improved,
1581 cross-platform substitute for the classic Make utility with integrated
1582 functionality similar to autoconf/automake and compiler caches such as ccache.
1583 In short, SCons is an easier, more reliable and faster way to build
1585 (license license:x11)))
1587 (define-public python-extras
1589 (name "python-extras")
1595 "https://pypi.python.org/packages/source/e/extras/extras-"
1599 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1600 (build-system python-build-system)
1602 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1604 (home-page "https://github.com/testing-cabal/extras")
1605 (synopsis "Useful extensions to the Python standard library")
1607 "Extras is a set of extensions to the Python standard library.")
1608 (license license:expat)))
1610 (define-public python2-extras
1611 (package-with-python2 python-extras))
1613 (define-public python-mimeparse
1615 (name "python-mimeparse")
1621 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1625 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1626 (build-system python-build-system)
1628 '(#:tests? #f)) ; no setup.py test command
1630 "https://github.com/dbtsai/python-mimeparse")
1631 (synopsis "Python library for parsing MIME types")
1633 "Mimeparse provides basic functions for parsing MIME type names and
1634 matching them against a list of media-ranges.")
1635 (license license:expat)))
1637 (define-public python2-mimeparse
1638 (package-with-python2 python-mimeparse))
1640 (define-public python-nose
1642 (name "python-nose")
1647 (uri (pypi-uri "nose" version))
1650 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1651 (build-system python-build-system)
1653 '(#:tests? #f)) ; FIXME: test suite fails
1654 (home-page "http://readthedocs.org/docs/nose/")
1655 (synopsis "Python testing library")
1657 "Nose extends the unittest library to make testing easier.")
1658 (license license:lgpl2.0+)))
1660 (define-public python2-nose
1661 (package-with-python2 python-nose))
1663 (define-public python-nose2
1665 (name "python-nose2")
1670 (uri (pypi-uri "nose2" version))
1673 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1674 (build-system python-build-system)
1675 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1677 `(("python-cov-core" ,python-cov-core)
1678 ("python-pytest-cov" ,python-pytest-cov)
1679 ("python-six" ,python-six)))
1680 (home-page "https://github.com/nose-devs/nose2")
1681 (synopsis "Next generation of nicer testing for Python")
1683 "Nose2 is the next generation of nicer testing for Python, based on the
1684 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1685 better plugin api, being easier for users to configure, and simplifying internal
1686 interfaces and processes.")
1687 (license license:bsd-2)))
1689 (define-public python2-nose2
1690 (package-with-python2 python-nose2))
1692 (define-public python-unittest2
1694 (name "python-unittest2")
1700 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1704 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1705 (build-system python-build-system)
1706 (home-page "http://pypi.python.org/pypi/unittest2")
1707 (synopsis "Python unit testing library")
1709 "Unittest2 is a replacement for the unittest module in the Python
1711 (license license:psfl)))
1713 (define-public python2-unittest2
1714 (package (inherit python-unittest2)
1715 (name "python2-unittest2")
1721 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1725 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1727 `(#:python ,python-2
1728 #:tests? #f)))) ; no setup.py test command
1730 (define-public python-pafy
1732 (name "python-pafy")
1737 (uri (pypi-uri "pafy" version))
1740 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1741 (build-system python-build-system)
1743 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1745 ;; Youtube-dl is a python package which is imported in the file
1746 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1747 `(("youtube-dl" ,youtube-dl)))
1748 (home-page "https://np1.github.io/pafy/")
1749 (synopsis "Retrieve YouTube content and metadata")
1751 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1752 (license license:lgpl3+)))
1754 (define-public python-py
1761 (uri (pypi-uri "py" version))
1764 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1765 (build-system python-build-system)
1767 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1768 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1769 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1770 ;; Is this module globally installed?"
1772 (home-page "http://pylib.readthedocs.org/")
1773 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1775 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1776 code introspection, and logging.")
1777 (license license:expat)))
1779 (define-public python2-py
1780 (package-with-python2 python-py))
1782 (define-public python-pytest
1784 (name "python-pytest")
1790 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1794 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1795 (modules '((guix build utils)))
1797 ;; One of the tests involves the /usr directory, so it fails.
1798 '(substitute* "testing/test_argcomplete.py"
1799 (("def test_remove_dir_prefix\\(self\\):")
1800 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1801 (build-system python-build-system)
1803 `(("python-py" ,python-py)))
1805 `(("python-nose" ,python-nose)
1806 ("python-mock" ,python-mock)))
1807 (home-page "http://pytest.org")
1808 (synopsis "Python testing library")
1810 "Pytest is a testing tool that provides auto-discovery of test modules
1811 and functions, detailed info on failing assert statements, modular fixtures,
1812 and many external plugins.")
1813 (license license:expat)))
1815 (define-public python2-pytest
1816 (package-with-python2 python-pytest))
1818 ;; This package is used by Borg until we can upgrade all our Python packages to
1819 ;; use a more recent pytest.
1820 (define-public python-pytest-2.9.2
1822 (inherit python-pytest)
1823 (name "python-pytest")
1827 (uri (pypi-uri "pytest" version))
1830 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1833 (modify-phases %standard-phases
1834 (add-before 'check 'disable-invalid-test
1836 (substitute* "testing/test_argcomplete.py"
1837 (("def test_remove_dir_prefix" line)
1838 (string-append "@pytest.mark.skip"
1839 "(reason=\"Assumes that /usr exists.\")\n "
1843 (define-public python-pytest-cov
1845 (name "python-pytest-cov")
1850 (uri (pypi-uri "pytest-cov" version))
1853 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1854 (build-system python-build-system)
1857 (modify-phases %standard-phases
1860 ;; options taken from tox.ini
1861 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1862 ;; with "Duplicate implicit target name"
1863 (zero? (system* "python" "./setup.py" "check"
1864 "--strict" "--metadata")))))))
1866 `(("python-coverage" ,python-coverage)
1867 ("python-pytest" ,python-pytest)))
1868 (home-page "https://github.com/pytest-dev/pytest-cov")
1869 (synopsis "Pytest plugin for measuring coverage")
1871 "Pytest-cov produces coverage reports. It supports centralised testing and
1872 distributed testing in both @code{load} and @code{each} modes. It also
1873 supports coverage of subprocesses.")
1874 (license license:expat)))
1876 (define-public python2-pytest-cov
1877 (package-with-python2 python-pytest-cov))
1879 (define-public python-pytest-runner
1881 (name "python-pytest-runner")
1886 (uri (pypi-uri "pytest-runner" version))
1889 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1890 (build-system python-build-system)
1893 (modify-phases %standard-phases
1894 ;; The fancy way of setting the version with setuptools_scm does not
1895 ;; seem to work here.
1896 (add-after 'unpack 'set-version
1898 (substitute* "docs/conf.py"
1899 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1900 (string-append "version = \"" ,version "\"")))
1903 `(("python-pytest" ,python-pytest)
1904 ("python-setuptools-scm" ,python-setuptools-scm)))
1905 (home-page "https://github.com/pytest-dev/pytest-runner")
1906 (synopsis "Invoke py.test as a distutils command")
1908 "This package provides a @command{pytest-runner} command that
1909 @file{setup.py} files can use to run tests.")
1910 (license license:expat)))
1912 (define-public python2-pytest-runner
1913 (package-with-python2 python-pytest-runner))
1915 (define-public python-pytest-mock
1917 (name "python-pytest-mock")
1922 (uri (pypi-uri "pytest-mock" version ".zip"))
1925 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1926 (build-system python-build-system)
1928 `(("unzip" ,unzip)))
1930 `(("python-pytest" ,python-pytest)))
1931 (home-page "https://github.com/pytest-dev/pytest-mock/")
1932 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1934 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1935 around the patching API provided by the @code{mock} package, but with the
1936 benefit of not having to worry about undoing patches at the end of a test.
1937 The mocker fixture has the same API as @code{mock.patch}, supporting the
1939 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1940 (license license:expat)))
1942 (define-public python2-pytest-mock
1943 (let ((base (package-with-python2
1944 (strip-python2-variant python-pytest-mock))))
1945 (package (inherit base)
1947 `(("python2-mock" ,python2-mock)
1948 ,@(package-propagated-inputs base))))))
1950 (define-public python-pytest-xdist
1952 (name "python-pytest-xdist")
1957 (uri (pypi-uri "pytest-xdist" version ".zip"))
1960 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1961 (modules '((guix build utils)))
1964 ;; Remove pre-compiled .pyc files from source.
1965 (for-each delete-file-recursively
1966 (find-files "." "__pycache__" #:directories? #t))
1967 (for-each delete-file (find-files "." "\\.pyc$"))
1969 (build-system python-build-system)
1971 '(#:tests? #f)) ;FIXME: Some tests are failing.
1973 ;; (modify-phases %standard-phases
1975 ;; (add-after 'install 'check
1976 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1977 ;; (add-installed-pythonpath inputs outputs)
1978 ;; (zero? (system* "py.test" "-v")))))
1981 ("python-setuptools-scm" ,python-setuptools-scm)))
1983 `(("python-execnet" ,python-execnet)
1984 ("python-pytest" ,python-pytest)
1985 ("python-py" ,python-py)))
1987 "https://github.com/pytest-dev/pytest-xdist")
1989 "Plugin for py.test with distributed testing and loop-on-failing modes")
1991 "The pytest-xdist plugin extends py.test with some unique test execution
1992 modes: parallelization, running tests in boxed subprocesses, the ability
1993 to run tests repeatedly when failed, and the ability to run tests on multiple
1994 Python interpreters or platforms. It uses rsync to copy the existing
1995 program code to a remote location, executes there, and then syncs the
1997 (license license:expat)))
1999 (define-public python2-pytest-xdist
2000 (package-with-python2 python-pytest-xdist))
2002 (define-public python-scripttest
2004 (name "python-scripttest")
2010 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2014 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2015 (build-system python-build-system)
2017 `(("python-pytest" ,python-pytest)))
2018 (home-page "http://pythonpaste.org/scripttest/")
2019 (synopsis "Python library to test command-line scripts")
2020 (description "Scripttest is a Python helper library for testing
2021 interactive command-line applications. With it you can run a script in a
2022 subprocess and see the output as well as any file modifications.")
2023 (license license:expat)))
2025 (define-public python2-scripttest
2026 (package-with-python2 python-scripttest))
2028 (define-public python-testtools
2030 (name "python-testtools")
2035 (uri (pypi-uri "testtools" version))
2038 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2039 (build-system python-build-system)
2042 (modify-phases %standard-phases
2043 (add-after 'unpack 'fix-module-imports
2045 (substitute* "setup.py"
2046 (("'unittest2>=0.8.0',") ""))
2047 (substitute* '("testtools/testcase.py"
2048 "testtools/testsuite.py"
2050 "testtools/tests/test_run.py"
2051 "testtools/tests/test_testsuite.py"
2052 "testtools/tests/test_deferredruntest.py")
2053 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2054 (("import unittest2 as unittest") "import unittest")
2055 (("import unittest2") "import unittest as unittest2")
2056 (("from unittest2 import") "from unittest import"))
2057 (substitute* "testtools/tests/test_testresult.py"
2058 ;; NUL in source code is not allowed (raises ValueError).
2059 (("\\x00\\x04") "\\x04"))
2062 `(("python-mimeparse" ,python-mimeparse)
2063 ("python-extras" ,python-extras)))
2064 (home-page "https://github.com/testing-cabal/testtools")
2066 "Extensions to the Python standard library unit testing framework")
2068 "Testtools extends the Python standard library unit testing framework to
2069 provide matchers, more debugging information, and cross-Python
2071 (license license:psfl)))
2073 (define-public python2-testtools
2074 (package-with-python2 python-testtools))
2076 (define-public python-testscenarios
2078 (name "python-testscenarios")
2084 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2088 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2089 (build-system python-build-system)
2091 `(("python-testtools" ,python-testtools)))
2092 (home-page "https://launchpad.net/testscenarios")
2093 (synopsis "Pyunit extension for dependency injection")
2095 "Testscenarios provides clean dependency injection for Python unittest
2097 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2099 (define-public python2-testscenarios
2100 (package-with-python2 python-testscenarios))
2102 (define-public python-testresources
2104 (name "python-testresources")
2110 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2114 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2115 (build-system python-build-system)
2116 (home-page "https://launchpad.net/testresources")
2118 "Pyunit extension for managing test resources")
2120 "Testresources is an extension to Python's unittest to allow declarative
2121 use of resources by test cases.")
2122 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2124 (define-public python2-testresources
2125 (package-with-python2 python-testresources))
2127 (define-public python-subunit
2129 (name "python-subunit")
2135 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2139 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2140 (build-system python-build-system)
2142 `(("python-extras" ,python-extras)
2143 ("python-mimeparse" ,python-mimeparse)))
2145 `(("python-testscenarios" ,python-testscenarios)))
2146 (home-page "http://launchpad.net/subunit")
2147 (synopsis "Python implementation of the subunit protocol")
2149 "Python-subunit is a Python implementation of the subunit test streaming
2151 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2153 (define-public python2-subunit
2154 (package-with-python2 python-subunit))
2156 ;; Recent versions of python-fixtures and python-testrepository need
2157 ;; python-pbr for packaging, which itself needs these two packages for
2159 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2160 ;; same source, just without any test dependencies and with tests disabled.
2161 ;; python-pbr-minmal is then used to package python-fixtures and
2162 ;; python-testrepository.
2163 ;; Strictly speaking we currently could remove the test-requirements from the
2164 ;; normal python-pbr package (and save this package) since test are disabled
2165 ;; there anyway. But this may change in future.
2166 (define python-pbr-minimal
2168 (name "python-pbr-minimal")
2173 (uri (pypi-uri "pbr" version))
2176 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2177 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2178 (build-system python-build-system)
2181 (home-page "http://docs.openstack.org/developer/pbr/")
2182 (synopsis "Minimal build of python-pbr used for bootstrapping")
2184 "Used only for bootstrapping python2-pbr, you should not need this.")
2185 (license license:asl2.0)))
2187 (define python2-pbr-minimal
2188 (package-with-python2 python-pbr-minimal))
2190 (define-public python-pbr
2192 (inherit python-pbr-minimal)
2195 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2197 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2199 `(("python-fixtures" ,python-fixtures)
2200 ;; discover, coverage, hacking, subunit
2201 ("python-mock" ,python-mock)
2202 ("python-six" ,python-six)
2203 ("python-sphinx" ,python-sphinx)
2204 ("python-testrepository" ,python-testrepository)
2205 ("python-testresources" ,python-testresources)
2206 ("python-testscenarios" ,python-testscenarios)
2207 ("python-testtools" ,python-testtools)
2208 ("python-virtualenv" ,python-virtualenv)))
2209 (synopsis "Enhance the default behavior of Python’s setuptools")
2211 "Python Build Reasonableness (PBR) is a library that injects some useful
2212 and sensible default behaviors into your setuptools run. It will set
2213 versions, process requirements files and generate AUTHORS and ChangeLog file
2214 from git information.
2217 (define-public python2-pbr
2218 (package-with-python2 python-pbr))
2220 (define-public python-fixtures
2222 (name "python-fixtures")
2227 (uri (pypi-uri "fixtures" version))
2230 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2231 (build-system python-build-system)
2234 (modify-phases %standard-phases
2237 (zero? (system* "python" "-m" "testtools.run"
2238 "fixtures.test_suite")))))))
2240 `(("python-six" ,python-six)))
2242 `(("python-mock" ,python-mock)
2243 ("python-pbr-minimal" ,python-pbr-minimal)
2244 ("python-testtools" ,python-testtools)))
2245 (home-page "https://launchpad.net/python-fixtures")
2246 (synopsis "Python test fixture library")
2248 "Fixtures provides a way to create reusable state, useful when writing
2250 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2252 (define-public python2-fixtures
2253 (package-with-python2 python-fixtures))
2255 (define-public python-testrepository
2257 (name "python-testrepository")
2263 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2267 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2268 (build-system python-build-system)
2270 ;; FIXME: Many tests are failing.
2273 `(("python-fixtures" ,python-fixtures)
2274 ("python-subunit" ,python-subunit)
2275 ("python-testtools" ,python-testtools)))
2277 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2278 ("python-mimeparse" ,python-mimeparse)))
2279 (home-page "https://launchpad.net/testrepository")
2280 (synopsis "Database for Python test results")
2281 (description "Testrepository provides a database of test results which can
2282 be used as part of a developer's workflow to check things such as what tests
2283 have failed since the last commit or what tests are currently failing.")
2284 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2286 (define-public python2-testrepository
2287 (package-with-python2 python-testrepository))
2289 (define-public python-coverage
2291 (name "python-coverage")
2296 (uri (pypi-uri "coverage" version))
2299 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2300 (build-system python-build-system)
2302 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2304 (home-page "http://nedbatchelder.com/code/coverage")
2305 (synopsis "Code coverage measurement for Python")
2307 "Coverage measures code coverage, typically during test execution. It
2308 uses the code analysis tools and tracing hooks provided in the Python standard
2309 library to determine which lines are executable, and which have been
2311 (license license:bsd-3)))
2313 (define-public python2-coverage
2314 (package-with-python2 python-coverage))
2316 (define-public python-cov-core
2318 (name "python-cov-core")
2323 (uri (pypi-uri "cov-core" version))
2326 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2327 (build-system python-build-system)
2329 `(("python-coverage" ,python-coverage)))
2330 (home-page "https://github.com/schlamar/cov-core")
2331 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2333 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2334 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2335 testing frameworks.")
2336 (license license:expat)))
2338 (define-public python2-cov-core
2339 (package-with-python2 python-cov-core))
2341 (define-public python-discover
2343 (name "python-discover")
2349 "https://pypi.python.org/packages/source/d/discover/discover-"
2353 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2354 (build-system python-build-system)
2355 (home-page "http://pypi.python.org/pypi/discover/")
2357 "Python test discovery for unittest")
2359 "Discover provides test discovery for unittest, a feature that has been
2360 backported from Python 2.7 for Python 2.4+.")
2361 (license license:bsd-3)))
2363 (define-public python2-discover
2364 (package-with-python2 python-discover))
2366 (define-public behave
2372 (uri (pypi-uri "behave" version ".tar.bz2"))
2375 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2376 (build-system python-build-system)
2378 `(("python-six" ,python-six)
2379 ("python-parse" ,python-parse)
2380 ("python-parse-type" ,python-parse-type)))
2381 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2383 (home-page "http://github.com/behave/behave")
2384 (synopsis "Python behavior-driven development")
2386 "Behave is a tool for behavior-driven development in python.
2387 Behavior-driven development (or BDD) is an agile software development
2388 technique that encourages collaboration between developers, QA and
2389 non-technical or business participants in a software project. Behave uses
2390 tests written in a natural language style, backed up by Python code.")
2391 (license license:x11)))
2393 (define-public python-exif-read
2395 (name "python-exif-read")
2399 (uri (pypi-uri "ExifRead" version))
2402 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2403 (build-system python-build-system)
2404 (arguments `(#:tests? #f)) ; no tests
2405 (home-page "https://github.com/ianare/exif-py")
2406 (synopsis "Python library to extract EXIF data from image files")
2408 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2410 (license license:bsd-3)))
2412 (define-public python2-exif-read
2413 (package-with-python2 python-exif-read))
2415 (define-public python-pyld
2417 (name "python-pyld")
2421 (uri (pypi-uri "PyLD" version))
2424 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2425 (build-system python-build-system)
2426 (arguments `(#:tests? #f)) ; no tests
2427 (home-page "http://github.com/digitalbazaar/pyld")
2428 (synopsis "Python implementation of the JSON-LD specification")
2430 "PyLD is an implementation of the JSON-LD specification.")
2431 (license license:bsd-3)))
2433 (define-public python2-pyld
2434 (package-with-python2 python-pyld))
2436 (define-public python-certifi
2438 (name "python-certifi")
2439 (version "2017.1.23")
2442 (uri (pypi-uri "certifi" version))
2445 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2446 (build-system python-build-system)
2447 (home-page "https://certifi.io/")
2448 (synopsis "Python CA certificate bundle")
2450 "Certifi is a Python library that contains a CA certificate bundle, which
2451 is used by the Requests library to verify HTTPS requests.")
2452 (license license:asl2.0)))
2454 (define-public python2-certifi
2455 (package-with-python2 python-certifi))
2457 (define-public python-click
2459 (name "python-click")
2464 (uri (pypi-uri "click" version))
2467 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2468 (build-system python-build-system)
2471 (modify-phases %standard-phases
2472 (add-after 'unpack 'fix-paths
2473 (lambda* (#:key inputs #:allow-other-keys)
2474 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2475 "cross-libc" "libc"))))
2476 (substitute* "click/_unicodefun.py"
2478 (string-append "'" glibc "/bin/locale'"))))
2482 (zero? (system* "make" "test")))))))
2484 `(("python-pytest" ,python-pytest)))
2485 (home-page "http://click.pocoo.org")
2486 (synopsis "Command line library for Python")
2488 "Click is a Python package for creating command line interfaces in a
2489 composable way with as little code as necessary. Its name stands for
2490 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2491 with sensible defaults out of the box.")
2492 (license license:bsd-3)))
2494 (define-public python2-click
2495 (package-with-python2 python-click))
2497 (define-public python-wheel
2499 (name "python-wheel")
2500 (version "0.30.0a0")
2504 (uri (pypi-uri "wheel" version))
2507 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2508 (build-system python-build-system)
2510 `(("python-jsonschema" ,python-jsonschema)
2511 ("python-pytest-cov" ,python-pytest-cov)))
2512 (home-page "https://bitbucket.org/pypa/wheel/")
2513 (synopsis "Format for built Python packages")
2515 "A wheel is a ZIP-format archive with a specially formatted filename and
2516 the @code{.whl} extension. It is designed to contain all the files for a PEP
2517 376 compatible install in a way that is very close to the on-disk format. Many
2518 packages will be properly installed with only the @code{Unpack} step and the
2519 unpacked archive preserves enough information to @code{Spread} (copy data and
2520 scripts to their final locations) at any later time. Wheel files can be
2521 installed with a newer @code{pip} or with wheel's own command line utility.")
2522 (license license:expat)
2523 (properties `((python2-variant . ,(delay python2-wheel))))))
2525 (define-public python2-wheel
2526 (let ((wheel (package-with-python2
2527 (strip-python2-variant python-wheel))))
2528 (package (inherit wheel)
2529 (native-inputs `(("python2-functools32" ,python2-functools32)
2530 ,@(package-native-inputs wheel))))))
2533 (define-public python-requests
2535 (name "python-requests")
2539 (uri (pypi-uri "requests" version))
2542 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2543 ;; TODO: unbundle urllib3 and chardet.
2544 (build-system python-build-system)
2546 ;; FIXME: Some tests require network access.
2548 (home-page "http://python-requests.org/")
2549 (synopsis "Python HTTP library")
2551 "Requests is a Python HTTP client library. It aims to be easier to use
2552 than Python’s urllib2 library.")
2553 (license license:asl2.0)))
2555 ;; Some software requires an older version of Requests, notably Docker
2557 (define-public python-requests-2.7
2558 (package (inherit python-requests)
2562 (uri (pypi-uri "requests" version))
2565 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2567 (define-public python2-requests
2568 (package-with-python2 python-requests))
2570 (define-public python-vcversioner
2572 (name "python-vcversioner")
2573 (version "2.16.0.0")
2577 (uri (pypi-uri "vcversioner" version))
2580 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2581 (build-system python-build-system)
2582 (synopsis "Python library for version number discovery")
2583 (description "Vcversioner is a Python library that inspects tagging
2584 information in a variety of version control systems in order to discover
2586 (home-page "https://github.com/habnabit/vcversioner")
2587 (license license:isc)))
2589 (define-public python2-vcversioner
2590 (package-with-python2 python-vcversioner))
2592 (define-public python-jsonschema
2594 (name "python-jsonschema")
2600 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2604 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2605 (build-system python-build-system)
2608 (modify-phases %standard-phases
2609 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2611 `(("python-nose" ,python-nose)
2612 ("python-vcversioner" ,python-vcversioner)))
2613 (home-page "https://github.com/Julian/jsonschema")
2614 (synopsis "Implementation of JSON Schema for Python")
2616 "Jsonschema is an implementation of JSON Schema for Python.")
2617 (license license:expat)
2618 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2620 (define-public python2-jsonschema
2621 (let ((jsonschema (package-with-python2
2622 (strip-python2-variant python-jsonschema))))
2623 (package (inherit jsonschema)
2625 `(("python2-mock" ,python2-mock)
2626 ,@(package-native-inputs jsonschema)))
2628 `(("python2-functools32" ,python2-functools32))))))
2630 (define-public python-kitchen
2632 (name "python-kitchen")
2637 (uri (pypi-uri "kitchen" version))
2640 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2641 (build-system python-build-system)
2643 `(("python-chardet" ,python-chardet)))
2644 (home-page "https://fedorahosted.org/kitchen")
2645 (synopsis "Python API for snippets")
2646 (description "@code{kitchen} module provides a python API for all sorts of
2647 little useful snippets of code that everybody ends up writing for their projects
2648 but never seem big enough to build an independent release. Use kitchen and stop
2649 cutting and pasting that code over and over.")
2650 (license (list license:lgpl2.1+
2651 ;; subprocess.py, test_subprocess.py,
2652 ;; kitchen/pycompat25/defaultdict.py:
2655 (define-public python2-kitchen
2656 (package-with-python2 python-kitchen))
2658 (define-public python-unidecode
2660 (name "python-unidecode")
2664 (uri (pypi-uri "Unidecode" version))
2667 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2668 (build-system python-build-system)
2669 (home-page "https://pypi.python.org/pypi/Unidecode")
2670 (synopsis "ASCII transliterations of Unicode text")
2672 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2673 useful when integrating with legacy code that doesn't support Unicode, or for
2674 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2675 machine identifiers from human-readable Unicode strings that should still be
2676 somewhat intelligeble.")
2677 (license license:gpl2+)))
2679 (define-public python2-unidecode
2680 (package-with-python2 python-unidecode))
2682 (define-public python-pyjwt
2684 (name "python-pyjwt")
2689 (uri (pypi-uri "PyJWT" version))
2692 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2693 (build-system python-build-system)
2695 `(("python-pytest" ,python-pytest)
2696 ("python-pytest-cov" ,python-pytest-cov)
2697 ("python-pytest-runner" ,python-pytest-runner)))
2698 (home-page "http://github.com/progrium/pyjwt")
2699 (synopsis "JSON Web Token implementation in Python")
2701 "PyJWT is a JSON Web Token implementation written in Python.")
2702 (license license:expat)))
2704 (define-public python2-pyjwt
2705 (package-with-python2 python-pyjwt))
2707 (define-public python-pykka
2709 (name "python-pykka")
2714 (uri (pypi-uri "Pykka" version))
2717 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2718 (build-system python-build-system)
2720 `(("python-mock" ,python-mock)
2721 ("python-nose" ,python-nose)
2722 ("python-gevent" ,python-gevent)
2723 ("python-eventlet" ,python-eventlet)))
2724 (home-page "https://www.pykka.org/")
2725 (synopsis "Pykka is a Python implementation of the actor model")
2727 "Pykka is a Python implementation of the actor model.
2728 The actor model introduces some simple rules to control the sharing
2729 of state and cooperation between execution units, which makes it
2730 easier to build concurrent applications.")
2731 (license license:asl2.0)))
2733 (define-public python2-pykka
2734 (package-with-python2 python-pykka))
2736 (define-public python-oauthlib
2738 (name "python-oauthlib")
2742 (uri (pypi-uri "oauthlib" version))
2745 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2746 (build-system python-build-system)
2748 `(("python-nose" ,python-nose)
2749 ("python-mock" ,python-mock)
2750 ("python-cryptography" ,python-cryptography)
2751 ("python-pyjwt" ,python-pyjwt)
2752 ("python-blinker" ,python-blinker)))
2753 (home-page "https://github.com/idan/oauthlib")
2754 (synopsis "OAuth implementation for Python")
2756 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2757 OAuth request-signing logic.")
2758 (license license:bsd-3)
2759 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2761 (define-public python2-oauthlib
2762 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2765 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2766 ,@(package-native-inputs base))))))
2768 (define-public python-itsdangerous
2770 (name "python-itsdangerous")
2776 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2780 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2781 (build-system python-build-system)
2782 (home-page "http://github.com/mitsuhiko/itsdangerous")
2783 (synopsis "Python library for passing data to/from untrusted environments")
2785 "Itsdangerous provides various helpers to pass trusted data to untrusted
2786 environments and back.")
2787 (license license:bsd-3)))
2789 (define-public python2-itsdangerous
2790 (package-with-python2 python-itsdangerous))
2792 (define-public python-pyyaml
2794 (name "python-pyyaml")
2799 (uri (pypi-uri "PyYAML" version))
2802 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2803 (build-system python-build-system)
2805 `(("libyaml" ,libyaml)))
2806 (home-page "http://pyyaml.org/wiki/PyYAML")
2807 (synopsis "YAML parser and emitter for Python")
2809 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2810 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2811 API, and sensible error messages. PyYAML supports standard YAML tags and
2812 provides Python-specific tags that allow to represent an arbitrary Python
2814 (license license:expat)))
2816 (define-public python2-pyyaml
2817 (package-with-python2 python-pyyaml))
2819 (define-public python-virtualenv
2821 (name "python-virtualenv")
2826 (uri (pypi-uri "virtualenv" version))
2829 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2830 (build-system python-build-system)
2833 (modify-phases %standard-phases
2836 ;; Disable failing test. See upstream bug report
2837 ;; https://github.com/pypa/virtualenv/issues/957
2838 (substitute* "tests/test_virtualenv.py"
2839 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2840 (zero? (system* "py.test")))))))
2842 `(("python-mock" ,python-mock)
2843 ("python-pytest" ,python-pytest)))
2844 (home-page "https://virtualenv.pypa.io/")
2845 (synopsis "Virtual Python environment builder")
2847 "Virtualenv is a tool to create isolated Python environments.")
2848 (license license:expat)))
2850 (define-public python2-virtualenv
2851 (package-with-python2 python-virtualenv))
2853 (define-public python-markupsafe
2855 (name "python-markupsafe")
2861 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2865 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2866 (build-system python-build-system)
2867 (home-page "http://github.com/mitsuhiko/markupsafe")
2868 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2870 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2872 (license license:bsd-3)))
2874 (define-public python2-markupsafe
2875 (package-with-python2 python-markupsafe))
2877 (define-public python-jinja2
2879 (name "python-jinja2")
2884 (uri (pypi-uri "Jinja2" version))
2887 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2888 (build-system python-build-system)
2890 `(("python-markupsafe" ,python-markupsafe)))
2891 (home-page "http://jinja.pocoo.org/")
2892 (synopsis "Python template engine")
2894 "Jinja2 is a small but fast and easy to use stand-alone template engine
2895 written in pure Python.")
2896 (license license:bsd-3)))
2898 (define-public python2-jinja2
2899 (package-with-python2 python-jinja2))
2901 (define-public python-pystache
2903 (name "python-pystache")
2907 (uri (pypi-uri "pystache" version))
2910 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2911 (build-system python-build-system)
2913 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2914 (home-page "http://defunkt.io/pystache/")
2915 (synopsis "Python logic-less template engine")
2917 "Pystache is a Python implementation of the framework agnostic,
2918 logic-free templating system Mustache.")
2919 (license license:expat)
2920 (properties `((python2-variant . ,(delay python2-pystache))))))
2922 (define-public python2-pystache
2923 (package (inherit (package-with-python2
2924 (strip-python2-variant python-pystache)))
2926 `(#:python ,python-2
2928 (modify-phases %standard-phases
2931 (zero? (system* "python" "test_pystache.py")))))))))
2933 (define-public python-joblib
2935 (name "python-joblib")
2939 (uri (pypi-uri "joblib" version))
2942 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2943 (modules '((guix build utils)))
2946 ;; Remove pre-compiled .pyc files from source.
2947 (for-each delete-file-recursively
2948 (find-files "." "__pycache__" #:directories? #t))
2949 (for-each delete-file (find-files "." "\\.pyc$"))
2951 (build-system python-build-system)
2954 (modify-phases %standard-phases
2955 (add-before 'check 'disable-failing-tests
2957 ;; This numpydoc tests fails for unknown reasons
2958 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2959 ;; This numpydoc test depends on matplotlib, which is not a
2961 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2962 ;; These tests fail to execute sys.executable
2963 (substitute* "joblib/test/test_parallel.py"
2964 (("import nose" line)
2965 (string-append "from nose.plugins.skip import SkipTest\n" line))
2966 (("def test_nested_parallel_warnings" line)
2967 (string-append "@SkipTest\n" line))
2968 (("def test_parallel_with_interactively_defined_functions" line)
2969 (string-append "@SkipTest\n" line)))
2971 ;; Provide nose to enable tests command
2973 `(("python-nose" ,python-nose)
2974 ("python-sphinx" ,python-sphinx)
2975 ("python-docutils" ,python-docutils)
2976 ("python-numpydoc" ,python-numpydoc)))
2977 (home-page "http://pythonhosted.org/joblib/")
2978 (synopsis "Using Python functions as pipeline jobs")
2980 "Joblib is a set of tools to provide lightweight pipelining in Python.
2981 In particular, joblib offers: transparent disk-caching of the output values
2982 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2983 logging and tracing of the execution.")
2984 (license license:bsd-3)))
2986 (define-public python2-joblib
2987 (package-with-python2 python-joblib))
2989 (define-public python-docutils
2991 (name "python-docutils")
2996 (uri (pypi-uri "docutils" version))
2999 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3000 (build-system python-build-system)
3002 '(#:tests? #f)) ; no setup.py test command
3003 (home-page "http://docutils.sourceforge.net/")
3004 (synopsis "Python Documentation Utilities")
3006 "Docutils is a modular system for processing documentation into useful
3007 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3009 ;; Most of the source code is public domain, but some source files are
3010 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3011 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3013 (define-public python2-docutils
3014 (package-with-python2 python-docutils))
3016 (define-public python-pygments
3018 (name "python-pygments")
3023 (uri (pypi-uri "Pygments" version))
3026 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3027 (build-system python-build-system)
3029 ;; FIXME: Tests require sphinx, which depends on this.
3031 (home-page "http://pygments.org/")
3032 (synopsis "Syntax highlighting")
3034 "Pygments is a syntax highlighting package written in Python.")
3035 (license license:bsd-2)))
3037 (define-public python2-pygments
3038 (package-with-python2 python-pygments))
3040 (define-public python-sphinx
3042 (name "python-sphinx")
3047 (uri (pypi-uri "Sphinx" version))
3050 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3051 (build-system python-build-system)
3054 (modify-phases %standard-phases
3057 ;; Requires Internet access.
3058 (delete-file "tests/test_build_linkcheck.py")
3059 (zero? (system* "make" "test")))))))
3061 `(("python-imagesize" ,python-imagesize)
3062 ("python-sphinx-alabaster-theme"
3063 ,python-sphinx-alabaster-theme)
3064 ("python-babel" ,python-babel)
3065 ("python-snowballstemmer" ,python-snowballstemmer)
3066 ("python-docutils" ,python-docutils)
3067 ("python-jinja2" ,python-jinja2)
3068 ("python-pygments" ,python-pygments)
3069 ("python-requests" ,python-requests)
3070 ("python-six" ,python-six)))
3072 `(("graphviz" ,graphviz)
3073 ("python-html5lib" ,python-html5lib)
3074 ("python-mock" ,python-mock)
3075 ("python-nose" ,python-nose)))
3076 (home-page "http://sphinx-doc.org/")
3077 (synopsis "Python documentation generator")
3078 (description "Sphinx is a tool that makes it easy to create documentation
3079 for Python projects or other documents consisting of multiple reStructuredText
3081 (license license:bsd-3)
3082 (properties `((python2-variant . ,(delay python2-sphinx))))))
3084 (define-public python2-sphinx
3085 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3088 (native-inputs `(("python2-mock" ,python2-mock)
3089 ("python2-enum34" ,python2-enum34)
3090 ,@(package-native-inputs base)))
3091 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3092 ,@(package-propagated-inputs base))))))
3094 (define-public python-sphinx-rtd-theme
3096 (name "python-sphinx-rtd-theme")
3101 (uri (string-append "https://pypi.python.org/packages/source/s/"
3102 "sphinx_rtd_theme/sphinx_rtd_theme-"
3106 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3107 (build-system python-build-system)
3108 (arguments '(#:tests? #f)) ; No tests.
3110 `(("python-sphinx" ,python-sphinx)))
3111 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3112 (synopsis "ReadTheDocs.org theme for Sphinx")
3113 (description "A theme for Sphinx used by ReadTheDocs.org.")
3114 (license license:expat)))
3116 (define-public python2-sphinx-rtd-theme
3117 (package-with-python2 python-sphinx-rtd-theme))
3119 (define-public python-rst.linker
3121 (name "python-rst.linker")
3126 (uri (pypi-uri "rst.linker" version))
3129 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3130 (build-system python-build-system)
3132 `(("python-dateutil" ,python-dateutil)
3133 ("python-six" ,python-six)))
3135 `(("python-setuptools-scm" ,python-setuptools-scm)))
3136 ;; Test would require path.py, which would introduce a cyclic dependence.
3137 (arguments `(#:tests? #f))
3138 ;; Note: As of version 1.7 the documentation is not worth building.
3139 (home-page "https://github.com/jaraco/rst.linker")
3140 (synopsis "Sphinx plugin to add links and timestamps")
3141 (description "rst.linker allows to automatically replace text by a
3142 reStructuredText external reference or timestamps. It's primary purpose is to
3143 augment the changelog, but it can be used for other documents, too.")
3144 (license license:expat)))
3146 (define-public python2-rst.linker
3147 (package-with-python2 python-rst.linker))
3149 (define-public python-feedgenerator
3151 (name "python-feedgenerator")
3156 (uri (pypi-uri "feedgenerator" version))
3159 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3160 (modules '((guix build utils)))
3163 ;; Remove pre-compiled .pyc files from source.
3164 (for-each delete-file-recursively
3165 (find-files "." "__pycache__" #:directories? #t))
3166 (for-each delete-file (find-files "." "\\.pyc$"))
3168 (build-system python-build-system)
3170 `(("python-pytz" ,python-pytz)
3171 ("python-six" ,python-six)))
3172 (home-page "https://github.com/getpelican/feedgenerator")
3174 "Standalone version of Django's Atom/RSS feed generator")
3176 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3177 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3178 (license license:bsd-3)))
3180 (define-public python2-feedgenerator
3181 (package-with-python2 python-feedgenerator))
3183 (define-public python-blinker
3185 (name "python-blinker")
3190 (uri (pypi-uri "blinker" version))
3193 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3194 (build-system python-build-system)
3195 (home-page "http://pythonhosted.org/blinker/")
3196 (synopsis "Fast, simple object-to-object and broadcast signaling")
3198 "Blinker provides a fast dispatching system that allows any number of
3199 interested parties to subscribe to events, or \"signals\".")
3200 (license license:expat)))
3202 (define-public python2-blinker
3203 (package-with-python2 python-blinker))
3205 (define-public pelican
3212 (uri (pypi-uri "pelican" version))
3215 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3216 (build-system python-build-system)
3218 `(("python-feedgenerator" ,python-feedgenerator)
3219 ("python-jinja2" ,python-jinja2)
3220 ("python-pygments" ,python-pygments)
3221 ("python-docutils" ,python-docutils)
3222 ("python-pytz" ,python-pytz)
3223 ("python-blinker" ,python-blinker)
3224 ("python-unidecode" ,python-unidecode)
3225 ("python-six" ,python-six)
3226 ("python-dateutil" ,python-dateutil)))
3227 (home-page "http://getpelican.com/")
3229 `(;; XXX Requires a lot more packages to do unit tests :P
3231 #:phases (modify-phases %standard-phases
3233 'install 'adjust-requires
3234 ;; Since feedgenerator is installed from git, it doesn't
3235 ;; conform to the version requirements.
3237 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3238 ;; version requirement so setuptools doesn't get confused.
3240 (substitute* "setup.py"
3241 (("['\"]feedgenerator.*?['\"]")
3242 "'feedgenerator'")))))))
3243 (synopsis "Python-based static site publishing system")
3245 "Pelican is a tool to generate a static blog from reStructuredText,
3246 Markdown input files, and more. Pelican uses Jinja2 for templating
3247 and is very extensible.")
3248 (license license:agpl3+)))
3250 (define-public python-scikit-learn
3252 (name "python-scikit-learn")
3258 "https://github.com/scikit-learn/scikit-learn/archive/"
3260 (file-name (string-append name "-" version ".tar.gz"))
3263 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3264 (build-system python-build-system)
3267 (modify-phases %standard-phases
3269 (add-after 'install 'check
3270 ;; Running tests from the source directory requires
3271 ;; an "inplace" build with paths relative to CWD.
3272 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3273 ;; Use the installed version instead.
3274 (lambda* (#:key inputs outputs #:allow-other-keys)
3275 (add-installed-pythonpath inputs outputs)
3276 ;; some tests require access to "$HOME"
3277 (setenv "HOME" "/tmp")
3278 ;; Step out of the source directory just to be sure.
3280 (zero? (system* "nosetests" "-v" "sklearn")))))))
3282 `(("openblas" ,openblas)))
3284 `(("python-nose" ,python-nose)
3285 ("python-cython" ,python-cython)))
3287 `(("python-numpy" ,python-numpy)
3288 ("python-scipy" ,python-scipy)))
3289 (home-page "http://scikit-learn.org/")
3290 (synopsis "Machine Learning in Python")
3292 "Scikit-learn provides simple and efficient tools for data
3293 mining and data analysis.")
3294 (license license:bsd-3)))
3296 (define-public python2-scikit-learn
3297 (package-with-python2 python-scikit-learn))
3299 (define-public python-scikit-image
3301 (name "python-scikit-image")
3307 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3310 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3311 (build-system python-build-system)
3313 ;; TODO: Some tests require running X11 server. Disable them?
3315 ;; See DEPENDS.txt for the list of build and run time requiremnts
3317 `(("python-matplotlib" ,python-matplotlib)
3318 ("python-networkx" ,python-networkx)
3319 ("python-scipy" ,python-scipy)
3320 ("python-pillow" ,python-pillow)))
3322 `(("python-numpy" ,python-numpy)
3323 ("python-cython" ,python-cython)
3324 ("python-six" ,python-six)))
3325 (home-page "http://scikit-image.org/")
3326 (synopsis "Image processing in Python")
3328 "Scikit-image is a collection of algorithms for image processing.")
3329 (license license:bsd-3)))
3331 (define-public python2-scikit-image
3332 (package-with-python2 python-scikit-image))
3334 (define-public python-redis
3336 (name "python-redis")
3341 (uri (pypi-uri "redis" version))
3343 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3344 (build-system python-build-system)
3345 ;; Tests require a running Redis server
3346 (arguments '(#:tests? #f))
3347 ;; As long as we are not running test, we do not need this input :-)
3349 ;; `(("python-pytest" ,python-pytest)))
3350 (home-page "https://github.com/andymccurdy/redis-py")
3351 (synopsis "Redis Python client")
3353 "This package provides a Python interface to the Redis key-value store.")
3354 (license license:expat)))
3356 (define-public python2-redis
3357 (package-with-python2 python-redis))
3359 (define-public python-rq
3367 "https://pypi.python.org/packages/source/r/rq/rq-"
3370 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3371 (build-system python-build-system)
3373 `(("python-click" ,python-click)
3374 ("python-redis" ,python-redis)))
3375 (home-page "http://python-rq.org/")
3376 (synopsis "Simple job queues for Python")
3378 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3379 processing them in the background with workers. It is backed by Redis and it
3380 is designed to have a low barrier to entry.")
3381 (license license:bsd-2)))
3383 (define-public python2-rq
3384 (package-with-python2 python-rq))
3386 (define-public python-cython
3388 (name "python-cython")
3393 (uri (pypi-uri "Cython" version))
3396 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3397 (build-system python-build-system)
3398 ;; we need the full python package and not just the python-wrapper
3399 ;; because we need libpython3.3m.so
3401 `(("python" ,python)))
3404 (modify-phases %standard-phases
3405 (add-before 'check 'set-HOME
3406 ;; some tests require access to "$HOME/.cython"
3407 (lambda _ (setenv "HOME" "/tmp")))
3409 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3410 (home-page "http://cython.org/")
3411 (synopsis "C extensions for Python")
3412 (description "Cython is an optimising static compiler for both the Python
3413 programming language and the extended Cython programming language. It makes
3414 writing C extensions for Python as easy as Python itself.")
3415 (license license:asl2.0)
3416 (properties `((python2-variant . ,(delay python2-cython))))))
3418 (define-public python2-cython
3419 (package (inherit (package-with-python2
3420 (strip-python2-variant python-cython)))
3421 (name "python2-cython")
3423 `(("python-2" ,python-2))))) ; this is not automatically changed
3425 ;; The RPython toolchain currently does not support Python 3.
3426 (define-public python2-rpython
3428 (name "python2-rpython")
3433 (uri (pypi-uri "rpython" version))
3436 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3437 (build-system python-build-system)
3438 (arguments `(#:python ,python-2))
3440 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3441 (home-page "https://rpython.readthedocs.org")
3442 (synopsis "Framework for implementing interpreters and virtual machines")
3443 (description "RPython is a translation and support framework for
3444 producing implementations of dynamic languages, emphasizing a clean separation
3445 between language specification and implementation aspects.")
3446 (license license:expat)))
3448 ;; This version of numpy is missing the documentation and is only used to
3449 ;; build matplotlib which is required to build numpy's documentation.
3450 (define-public python-numpy
3452 (name "python-numpy")
3458 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3459 (file-name (string-append name "-" version ".tar.gz"))
3462 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3463 (build-system python-build-system)
3465 `(("openblas" ,openblas)
3466 ("lapack" ,lapack)))
3468 `(("python-cython" ,python-cython)
3469 ("python-nose" ,python-nose)
3470 ("gfortran" ,gfortran)))
3473 (modify-phases %standard-phases
3474 (add-before 'build 'set-environment-variables
3475 (lambda* (#:key inputs #:allow-other-keys)
3476 (call-with-output-file "site.cfg"
3480 libraries = openblas
3481 library_dirs = ~a/lib
3482 include_dirs = ~a/include
3484 # backslash-n to make emacs happy
3486 lapack_libs = lapack
3487 library_dirs = ~a/lib
3488 include_dirs = ~a/include
3490 (assoc-ref inputs "openblas")
3491 (assoc-ref inputs "openblas")
3492 (assoc-ref inputs "lapack")
3493 (assoc-ref inputs "lapack"))))
3494 ;; Use "gcc" executable, not "cc".
3495 (substitute* "numpy/distutils/system_info.py"
3496 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3497 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3499 ;; Tests can only be run after the library has been installed and not
3500 ;; within the source directory.
3502 (add-after 'install 'check
3503 (lambda* (#:key outputs inputs #:allow-other-keys)
3504 ;; Make installed package available for running the tests
3505 (add-installed-pythonpath inputs outputs)
3506 (with-directory-excursion "/tmp"
3507 (zero? (system* "python" "-c"
3508 "import numpy; numpy.test(verbose=2)"))))))))
3509 (home-page "http://www.numpy.org/")
3510 (synopsis "Fundamental package for scientific computing with Python")
3511 (description "NumPy is the fundamental package for scientific computing
3512 with Python. It contains among other things: a powerful N-dimensional array
3513 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3514 and Fortran code, useful linear algebra, Fourier transform, and random number
3516 (license license:bsd-3)))
3518 (define-public python2-numpy
3519 (package-with-python2 python-numpy))
3521 (define-public python-munch
3523 (name "python-munch")
3528 (uri (pypi-uri "munch" version))
3531 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3532 (build-system python-build-system)
3533 (home-page "https://github.com/Infinidat/munch")
3534 (synopsis "Dot-accessible dictionary")
3535 (description "Munch is a dot-accessible dictionary similar to JavaScript
3537 (license license:expat)))
3539 (define-public python2-munch
3540 (package-with-python2 python-munch))
3542 (define-public python2-fastlmm
3544 (name "python2-fastlmm")
3549 (uri (pypi-uri "fastlmm" version ".zip"))
3552 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3553 (build-system python-build-system)
3555 `(#:python ,python-2)) ; only Python 2.7 is supported
3557 `(("python2-numpy" ,python2-numpy)
3558 ("python2-scipy" ,python2-scipy)
3559 ("python2-matplotlib" ,python2-matplotlib)
3560 ("python2-pandas" ,python2-pandas)
3561 ("python2-scikit-learn" ,python2-scikit-learn)
3562 ("python2-pysnptools" ,python2-pysnptools)))
3565 ("python2-cython" ,python2-cython)
3566 ("python2-mock" ,python2-mock)
3567 ("python2-nose" ,python2-nose)))
3568 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3569 (synopsis "Perform genome-wide association studies on large data sets")
3571 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3572 Models, is a program for performing both single-SNP and SNP-set genome-wide
3573 association studies (GWAS) on extremely large data sets.")
3574 (license license:asl2.0)))
3576 (define-public python-numpy-documentation
3578 (name "python-numpy-documentation")
3579 (version (package-version python-numpy))
3580 (source (package-source python-numpy))
3581 (build-system python-build-system)
3583 `(("python-matplotlib" ,python-matplotlib)
3584 ("python-numpy" ,python-numpy)
3585 ("pkg-config" ,pkg-config)
3586 ("python-sphinx" ,python-sphinx)
3587 ("python-numpydoc" ,python-numpydoc)
3588 ("texlive" ,texlive)
3589 ("texinfo" ,texinfo)
3591 ("scipy-sphinx-theme"
3592 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3595 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3596 (commit "c466764e22")))
3599 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3600 ,@(package-native-inputs python-numpy)))
3602 `(#:tests? #f ; we're only generating the documentation
3604 (modify-phases %standard-phases
3607 (lambda* (#:key inputs outputs #:allow-other-keys)
3608 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3610 data "/doc/" ,name "-"
3611 ,(package-version python-numpy)))
3612 (info-reader (string-append data "/info"))
3613 (html (string-append doc "/html"))
3614 (scipy-sphinx-theme "scipy-sphinx-theme")
3615 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3616 (pyver ,(string-append "PYVER=")))
3617 (with-directory-excursion "doc"
3618 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3620 (system* "make" "html" pyver)
3621 (system* "make" "latex" "PAPER=a4" pyver)
3622 (system* "make" "-C" "build/latex"
3623 "all-pdf" "PAPER=a4" pyver)
3624 ;; FIXME: Generation of the info file fails.
3625 ;; (system* "make" "info" pyver)
3627 ;; (copy-file "build/texinfo/numpy.info"
3628 ;; (string-append info "/numpy.info"))
3629 (for-each (lambda (file)
3630 (copy-file (string-append "build/latex" file)
3631 (string-append doc file)))
3632 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3633 (with-directory-excursion "build/html"
3634 (for-each (lambda (file)
3635 (let* ((dir (dirname file))
3636 (tgt-dir (string-append html "/" dir)))
3637 (unless (equal? "." dir)
3639 (install-file file html)))
3640 (find-files "." ".*")))))
3642 (home-page (package-home-page python-numpy))
3643 (synopsis "Documentation for the python-numpy package")
3644 (description (package-description python-numpy))
3645 (license (package-license python-numpy))))
3647 (define-public python2-numpy-documentation
3648 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3650 (inherit numpy-documentation)
3651 (native-inputs `(("python2-functools32" ,python2-functools32)
3652 ,@(package-native-inputs numpy-documentation))))))
3654 (define-public python-pygit2
3656 (name "python-pygit2")
3661 (uri (pypi-uri "pygit2" version))
3664 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3666 (search-patches "python-pygit2-disable-network-tests.patch"))))
3667 (build-system python-build-system)
3669 `(("python-six" ,python-six)
3670 ("python-cffi" ,python-cffi)
3671 ("libgit2" ,libgit2)
3672 ("python-tox" ,python-tox)))
3673 (home-page "https://github.com/libgit2/pygit2")
3674 (synopsis "Python bindings for libgit2")
3675 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3676 library, libgit2 implements Git plumbing.")
3677 ;; GPL2.0 only, with linking exception.
3678 (license license:gpl2)))
3680 (define-public python2-pygit2
3681 (package-with-python2 python-pygit2))
3683 (define-public python-pyparsing
3685 (name "python-pyparsing")
3690 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3691 "/pyparsing-" version
3692 "/pyparsing-" version ".tar.gz"))
3695 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3696 (build-system python-build-system)
3697 (outputs '("out" "doc"))
3699 `(#:tests? #f ; no test target
3700 #:modules ((guix build python-build-system)
3704 'install 'install-doc
3705 (lambda* (#:key outputs #:allow-other-keys)
3706 (let* ((doc (string-append (assoc-ref outputs "doc")
3707 "/share/doc/" ,name "-" ,version))
3708 (html-doc (string-append doc "/html"))
3709 (examples (string-append doc "/examples")))
3715 (install-file file tgt))
3716 (find-files dir ".*")))
3717 (list "docs" "htmldoc" "examples")
3718 (list doc html-doc examples))))
3720 (home-page "http://pyparsing.wikispaces.com")
3721 (synopsis "Python parsing class library")
3723 "The pyparsing module is an alternative approach to creating and
3724 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3725 of regular expressions. The pyparsing module provides a library of classes
3726 that client code uses to construct the grammar directly in Python code.")
3727 (license license:expat)))
3729 (define-public python2-pyparsing
3730 (package-with-python2 python-pyparsing))
3732 (define-public python-numpydoc
3734 (name "python-numpydoc")
3740 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3744 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3745 (modules '((guix build utils)))
3748 ;; Drop a test requiring matplotlib, which we cannot add as an
3749 ;; input since it would create a circular dependency: Extend the
3750 ;; test for Python 3, where it is already dropped, to Python 2.
3751 (substitute* "numpydoc/tests/test_plot_directive.py"
3753 (build-system python-build-system)
3755 `(("python-sphinx" ,python-sphinx)))
3757 `(("python-nose" ,python-nose)))
3758 (home-page "https://pypi.python.org/pypi/numpydoc")
3760 "Numpy's Sphinx extensions")
3762 "Sphinx extension to support docstrings in Numpy format.")
3763 (license license:bsd-2)))
3765 (define-public python2-numpydoc
3766 (package-with-python2 python-numpydoc))
3768 (define-public python-numexpr
3770 (name "python-numexpr")
3775 (uri (pypi-uri "numexpr" version))
3778 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3779 (build-system python-build-system)
3780 (arguments `(#:tests? #f)) ; no tests included
3782 `(("python-numpy" ,python-numpy)))
3783 (home-page "https://github.com/pydata/numexpr")
3784 (synopsis "Fast numerical expression evaluator for NumPy")
3786 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3787 expressions that operate on arrays are accelerated and use less memory than
3788 doing the same calculation in Python. In addition, its multi-threaded
3789 capabilities can make use of all your cores, which may accelerate
3790 computations, most specially if they are not memory-bounded (e.g. those using
3791 transcendental functions).")
3792 (license license:expat)))
3794 (define-public python2-numexpr
3795 (package-with-python2 python-numexpr))
3797 (define-public python-cycler
3799 (name "python-cycler")
3803 (uri (pypi-uri "cycler" version))
3806 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3807 (build-system python-build-system)
3809 ;; XXX: The current version requires 'coveralls' which we don't have.
3810 ;; Enable this for the next release which uses 'python-pytest'.
3813 `(("python-six" ,python-six)))
3814 (home-page "http://matplotlib.org/cycler/")
3815 (synopsis "Composable keyword argument iterator")
3817 "When using @code{matplotlib} and plotting more than one line, it is
3818 common to want to be able to want to be able to cycle over one or more artist
3819 styles; but the plotting logic can quickly become involved.
3820 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3821 @code{Cycler} class was developed.")
3822 (license license:bsd-3)))
3824 (define-public python2-cycler
3825 (package-with-python2 python-cycler))
3827 (define-public python-colorspacious
3829 (name "python-colorspacious")
3834 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3836 (file-name (string-append name "-" version))
3838 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3839 (build-system python-build-system)
3841 `(("python-numpy" ,python-numpy)))
3843 `(("python-nose" ,python-nose)))
3846 (modify-phases %standard-phases
3849 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3850 (home-page "https://github.com/njsmith/colorspacious")
3851 (synopsis "Python library for colorspace conversions")
3852 (description "@code{colorspacious} is a Python library that lets you
3853 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3854 (license license:expat)))
3856 (define-public python2-colorspacious
3857 (package-with-python2 python-colorspacious))
3859 (define-public python-matplotlib
3861 (name "python-matplotlib")
3867 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3868 (file-name (string-append name "-" version ".tar.gz"))
3871 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3872 (build-system python-build-system)
3873 (propagated-inputs ; the following packages are all needed at run time
3874 `(("python-cycler" ,python-cycler)
3875 ("python-pyparsing" ,python-pyparsing)
3876 ("python-pygobject" ,python-pygobject)
3877 ("gobject-introspection" ,gobject-introspection)
3878 ("python-tkinter" ,python "tk")
3879 ("python-dateutil" ,python-dateutil)
3880 ("python-numpy" ,python-numpy)
3881 ("python-pillow" ,python-pillow)
3882 ("python-pytz" ,python-pytz)
3883 ("python-six" ,python-six)
3884 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3885 ;; from 'gtk+') provides the required 'typelib' files used by
3886 ;; 'gobject-introspection'. The location of these files is set with the
3887 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3888 ;; is done automatically by a 'native-search-path' procedure. However,
3889 ;; at run-time the user must set this variable as follows:
3891 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3893 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3894 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3895 ;; object. For this reason we need to import both libraries.
3896 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3897 ("python-pycairo" ,python-pycairo)
3898 ("python-cairocffi" ,python-cairocffi)))
3900 `(("libpng" ,libpng)
3901 ("imagemagick" ,imagemagick)
3902 ("freetype" ,freetype)
3905 ;; FIXME: Add backends when available.
3906 ;("python-wxpython" ,python-wxpython)
3907 ("python-pyqt" ,python-pyqt)
3911 `(("pkg-config" ,pkg-config)
3912 ("python-nose" ,python-nose)
3913 ("python-mock" ,python-mock)))
3916 (modify-phases %standard-phases
3917 (add-before 'build 'configure-environment
3918 (lambda* (#:key outputs inputs #:allow-other-keys)
3919 (let ((cairo (assoc-ref inputs "cairo"))
3920 (gtk+ (assoc-ref inputs "gtk+")))
3921 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3923 (setenv "LD_LIBRARY_PATH"
3924 (string-append cairo "/lib:" gtk+ "/lib"))
3925 (setenv "HOME" (getcwd))
3926 (call-with-output-file "setup.cfg"
3928 (format port "[directories]~%
3929 basedirlist = ~a,~a~%
3932 (assoc-ref inputs "tcl")
3933 (assoc-ref inputs "tk")))))
3935 (home-page "http://matplotlib.org")
3936 (synopsis "2D plotting library for Python")
3938 "Matplotlib is a Python 2D plotting library which produces publication
3939 quality figures in a variety of hardcopy formats and interactive environments
3940 across platforms. Matplotlib can be used in Python scripts, the python and
3941 ipython shell, web application servers, and six graphical user interface
3943 (license license:psfl)
3944 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3946 (define-public python2-matplotlib
3947 (let ((matplotlib (package-with-python2
3948 (strip-python2-variant python-matplotlib))))
3949 (package (inherit matplotlib)
3950 ;; Make sure to use special packages for Python 2 instead
3951 ;; of those automatically rewritten by package-with-python2.
3953 `(("python2-pycairo" ,python2-pycairo)
3954 ("python2-functools32" ,python2-functools32)
3955 ("python2-pygobject-2" ,python2-pygobject-2)
3956 ("python2-subprocess32" ,python2-subprocess32)
3957 ("python2-tkinter" ,python-2 "tk")
3958 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3959 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3961 (define-public python-matplotlib-documentation
3963 (name "python-matplotlib-documentation")
3964 (version (package-version python-matplotlib))
3965 (source (package-source python-matplotlib))
3966 (build-system python-build-system)
3968 `(("python-matplotlib" ,python-matplotlib)
3969 ("python-colorspacious" ,python-colorspacious)
3970 ("python-sphinx" ,python-sphinx)
3971 ("python-numpydoc" ,python-numpydoc)
3972 ("python-ipython" ,python-ipython)
3973 ("python-mock" ,python-mock)
3974 ("graphviz" ,graphviz)
3975 ("texlive" ,texlive)
3976 ("texinfo" ,texinfo)
3977 ,@(package-native-inputs python-matplotlib)))
3979 `(#:tests? #f ; we're only generating documentation
3981 (modify-phases %standard-phases
3985 ;; Produce pdf in 'A4' format.
3986 (substitute* "conf.py"
3987 (("latex_paper_size = 'letter'") "")
3988 ;; latex_paper_size is deprecated -> set paper size using
3990 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3991 ;; insert at a point where latex_elements{} is defined:
3992 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3993 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3995 (lambda* (#:key inputs outputs #:allow-other-keys)
3996 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3997 (doc (string-append data "/doc/python-matplotlib-" ,version))
3998 (info (string-append data "/info"))
3999 (html (string-append doc "/html")))
4002 (copy-recursively "build/html" html)
4003 (symlink (string-append html "/_images")
4004 (string-append info "/matplotlib-figures"))
4005 (with-directory-excursion "build/texinfo"
4006 (substitute* "matplotlib.texi"
4007 (("@image\\{([^,]*)" all file)
4008 (string-append "@image{matplotlib-figures/" file)))
4009 (symlink (string-append html "/_images")
4010 "./matplotlib-figures")
4011 (system* "makeinfo" "--no-split"
4012 "-o" "matplotlib.info" "matplotlib.texi"))
4013 (copy-file "build/texinfo/matplotlib.info"
4014 (string-append info "/matplotlib.info"))
4015 (copy-file "build/latex/Matplotlib.pdf"
4016 (string-append doc "/Matplotlib.pdf")))
4018 (home-page (package-home-page python-matplotlib))
4019 (synopsis "Documentation for the python-matplotlib package")
4020 (description (package-description python-matplotlib))
4021 (license (package-license python-matplotlib))))
4023 (define-public python2-matplotlib-documentation
4024 (package-with-python2 python-matplotlib-documentation))
4026 (define-public python2-pysnptools
4028 (name "python2-pysnptools")
4033 (uri (pypi-uri "pysnptools" version ".zip"))
4036 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4037 (build-system python-build-system)
4039 `(#:python ,python-2)) ; only Python 2.7 is supported
4041 `(("python2-numpy" ,python2-numpy)
4042 ("python2-scipy" ,python2-scipy)
4043 ("python2-pandas" ,python2-pandas)))
4045 `(("python2-cython" ,python2-cython)))
4047 `(("unzip" ,unzip)))
4048 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4049 (synopsis "Library for reading and manipulating genetic data")
4051 "PySnpTools is a library for reading and manipulating genetic data. It
4052 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4053 those files. It can also efficiently manipulate ranges of integers using set
4054 operators such as union, intersection, and difference.")
4055 (license license:asl2.0)))
4057 (define-public python-rpy2
4059 (name "python-rpy2")
4064 (uri (pypi-uri "rpy2" version))
4067 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4068 (build-system python-build-system)
4071 (modify-phases %standard-phases
4073 (add-after 'install 'check
4074 (lambda* (#:key outputs inputs #:allow-other-keys)
4075 ;; It's easier to run tests after install.
4076 ;; Make installed package available for running the tests
4077 (add-installed-pythonpath inputs outputs)
4078 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4080 `(("python-six" ,python-six)))
4082 `(("readline" ,readline)
4088 (home-page "http://rpy.sourceforge.net/")
4089 (synopsis "Python interface to the R language")
4090 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4091 low-level interface to R from Python, a proposed high-level interface,
4092 including wrappers to graphical libraries, as well as R-like structures and
4094 (license license:gpl3+)))
4096 (define-public python2-rpy2
4097 (let ((rpy2 (package-with-python2 python-rpy2)))
4098 (package (inherit rpy2)
4100 `(("python2-singledispatch" ,python2-singledispatch)
4101 ,@(package-propagated-inputs rpy2))))))
4103 (define-public python-scipy
4105 (name "python-scipy")
4110 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4112 (file-name (string-append name "-" version ".tar.gz"))
4115 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4116 (build-system python-build-system)
4118 `(("python-numpy" ,python-numpy)
4119 ("python-matplotlib" ,python-matplotlib)
4120 ("python-pyparsing" ,python-pyparsing)))
4122 `(("lapack" ,lapack)
4123 ("openblas" ,openblas)))
4125 `(("python-cython" ,python-cython)
4126 ("python-nose" ,python-nose)
4127 ("python-sphinx" ,python-sphinx)
4128 ("python-numpydoc" ,python-numpydoc)
4129 ("gfortran" ,gfortran)
4131 (outputs '("out" "doc"))
4134 (modify-phases %standard-phases
4135 (add-before 'build 'configure-openblas
4136 (lambda* (#:key inputs #:allow-other-keys)
4137 (call-with-output-file "site.cfg"
4141 libraries = openblas
4142 library_dirs = ~a/lib
4143 include_dirs = ~a/include
4145 # backslash-n to make emacs happy
4147 library_dirs = ~a/lib
4148 atlas_libs = openblas
4150 (assoc-ref inputs "openblas")
4151 (assoc-ref inputs "openblas")
4152 (assoc-ref inputs "openblas"))))
4154 (add-after 'install 'install-doc
4155 (lambda* (#:key inputs outputs #:allow-other-keys)
4156 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4157 (doc (string-append data "/doc/" ,name "-" ,version))
4158 (html (string-append doc "/html"))
4159 (pyver ,(string-append "PYVER=")))
4160 ;; Make installed package available for building the
4162 (add-installed-pythonpath inputs outputs)
4163 (with-directory-excursion "doc"
4164 ;; Fix generation of images for mathematical expressions.
4165 (substitute* (find-files "source" "conf\\.py")
4166 (("pngmath_use_preview = True")
4167 "pngmath_use_preview = False"))
4169 (system* "make" "html" pyver)
4170 (with-directory-excursion "build/html"
4171 (for-each (lambda (file)
4172 (let* ((dir (dirname file))
4173 (tgt-dir (string-append html "/" dir)))
4174 (install-file file html)))
4175 (find-files "." ".*")))))
4177 (add-after 'unpack 'fix-tests
4179 (substitute* "scipy/integrate/tests/test_quadpack.py"
4180 (("libm.so") "libm.so.6"))
4182 ;; Tests can only be run after the library has been installed and not
4183 ;; within the source directory.
4185 (add-after 'install 'check
4186 (lambda* (#:key inputs outputs #:allow-other-keys)
4187 (add-installed-pythonpath inputs outputs)
4188 (with-directory-excursion "/tmp"
4189 (zero? (system* "python" "-c"
4190 "import scipy; scipy.test('full')")))
4192 (home-page "http://www.scipy.org/")
4193 (synopsis "The Scipy library provides efficient numerical routines")
4194 (description "The SciPy library is one of the core packages that make up
4195 the SciPy stack. It provides many user-friendly and efficient numerical
4196 routines such as routines for numerical integration and optimization.")
4197 (properties `((python2-variant . ,(delay python2-scipy))))
4198 (license license:bsd-3)))
4200 (define-public python2-scipy
4201 (package-with-python2
4202 (strip-python2-variant python-scipy)))
4204 (define-public python-socksipy-branch
4206 (name "python-socksipy-branch")
4211 (uri (pypi-uri "SocksiPy-branch" version))
4214 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4215 (build-system python-build-system)
4217 `(#:tests? #f)) ; There are no tests
4218 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4219 (synopsis "Python SOCKS module")
4221 "SocksiPy - A Python SOCKS client module. It provides a
4222 socket-like interface that supports connections to any TCP
4223 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4224 The original version was developed by Dan Haim, this is a
4225 branch created by Mario Vilas to address some open issues,
4226 as the original project seems to have been abandoned circa 2007.")
4227 (license license:bsd-3)))
4229 (define-public python2-socksipy-branch
4230 (package-with-python2 python-socksipy-branch))
4232 (define-public python-sqlalchemy
4234 (name "python-sqlalchemy")
4239 (uri (string-append "https://pypi.python.org/packages/source/S/"
4240 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4243 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4244 (build-system python-build-system)
4246 `(("python-cython" ,python-cython) ;for c extensions
4247 ("python-pytest" ,python-pytest)
4248 ("python-mock" ,python-mock))) ;for tests
4250 `(#:phases (alist-replace
4252 (lambda _ (zero? (system* "py.test")))
4254 (home-page "http://www.sqlalchemy.org")
4255 (synopsis "Database abstraction library")
4257 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4258 gives application developers the full power and flexibility of SQL. It
4259 provides a full suite of well known enterprise-level persistence patterns,
4260 designed for efficient and high-performing database access, adapted into a
4261 simple and Pythonic domain language.")
4262 (license license:x11)))
4264 (define-public python2-sqlalchemy
4265 (package-with-python2 python-sqlalchemy))
4267 (define-public python-pycodestyle
4269 (name "python-pycodestyle")
4274 (uri (pypi-uri "pycodestyle" version))
4277 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4278 (build-system python-build-system)
4279 (home-page "https://pycodestyle.readthedocs.io/")
4280 (synopsis "Python style guide checker")
4281 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4282 Python code against some of the style conventions in
4283 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4284 (license license:expat)))
4286 (define-public python2-pycodestyle
4287 (package-with-python2 python-pycodestyle))
4289 (define-public python-orderedmultidict
4291 (name "python-orderedmultidict")
4296 (uri (pypi-uri "orderedmultidict" version))
4299 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4300 (build-system python-build-system)
4303 (modify-phases %standard-phases
4304 (add-after 'unpack 'fix-tests
4306 ;; The package uses nosetest for running the tests.
4307 ;; Adding this initfile allows to run the test suite
4308 ;; without requiring nosetest.
4309 (zero? (system* "touch" "tests/__init__.py")))))))
4311 `(("python-six" ,python-six)))
4313 `(("python-pycodestyle" ,python-pycodestyle)))
4314 (home-page "https://github.com/gruns/orderedmultidict")
4315 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4316 (description "This package contains a library for ordered multivalue
4317 dictionaries. A multivalue dictionary is a dictionary that can store
4318 multiple values for the same key. An ordered multivalue dictionary is a
4319 multivalue dictionary that retains the order of insertions and deletions.")
4320 (license license:unlicense)))
4322 (define-public python2-orderedmultidict
4323 (package-with-python2 python-orderedmultidict))
4325 (define-public python-furl
4327 (name "python-furl")
4332 (uri (pypi-uri "furl" version))
4335 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4336 (build-system python-build-system)
4338 `(("python-six" ,python-six)
4339 ("python-orderedmultidict" ,python-orderedmultidict)))
4341 `(("python-pycodestyle" ,python-pycodestyle)))
4342 (home-page "https://github.com/gruns/furl")
4343 (synopsis "URL manipulation in Python")
4344 (description "Furl provides an easy-to-use alternative to the
4345 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4346 (license license:unlicense)))
4348 (define-public python2-furl
4349 (package-with-python2 python-furl))
4351 (define-public python-flask-babel
4353 (name "python-flask-babel")
4358 (uri (pypi-uri "Flask-Babel" version))
4361 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4362 (build-system python-build-system)
4364 `(("python-flask" ,python-flask)
4365 ("python-babel" ,python-babel)
4366 ("python-jinja2" ,python-jinja2)
4367 ("python-pytz" ,python-pytz)))
4368 (home-page "https://github.com/python-babel/flask-babel")
4369 (synopsis "Add i18n/l10n support to Flask applications")
4370 (description "This package implements internationalization and localization
4371 support for Flask. This is based on the Python babel module as well as pytz -
4372 both of which are installed automatically if you install this library.")
4373 (license license:bsd-3)))
4375 (define-public python2-flask-babel
4376 (package-with-python2 python-flask-babel))
4378 (define-public python-sqlalchemy-utils
4380 (name "python-sqlalchemy-utils")
4385 (uri (pypi-uri "SQLAlchemy-Utils" version))
4388 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4389 (build-system python-build-system)
4391 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4393 ;; (modify-phases %standard-phases
4396 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4398 `(("python-six" ,python-six)
4399 ("python-sqlalchemy" ,python-sqlalchemy)))
4401 `(("python-dateutil" ,python-dateutil)
4402 ("python-flexmock" ,python-flexmock)
4403 ("python-psycopg2" ,python-psycopg2)
4404 ("python-pytest" ,python-pytest)
4405 ("python-pytz" ,python-pytz)))
4406 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4407 (synopsis "Various utility functions for SQLAlchemy")
4409 "SQLAlchemy-utils provides various utility functions and custom data types
4410 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4412 You might also want to install the following optional dependencies:
4414 @item @code{python-passlib}
4415 @item @code{python-babel}
4416 @item @code{python-cryptography}
4417 @item @code{python-pytz}
4418 @item @code{python-psycopg2}
4419 @item @code{python-furl}
4420 @item @code{python-flask-babel}
4423 (license license:bsd-3)))
4425 (define-public python2-sqlalchemy-utils
4426 (package-with-python2 python-sqlalchemy-utils))
4428 (define-public python-alembic
4430 (name "python-alembic")
4435 (uri (pypi-uri "alembic" version))
4438 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4439 (build-system python-build-system)
4441 `(("python-mock" ,python-mock)
4442 ("python-pytest-cov" ,python-pytest-cov)))
4444 `(("python-sqlalchemy" ,python-sqlalchemy)
4445 ("python-mako" ,python-mako)
4446 ("python-editor" ,python-editor)))
4447 (home-page "http://bitbucket.org/zzzeek/alembic")
4449 "Database migration tool for SQLAlchemy")
4451 "Alembic is a lightweight database migration tool for usage with the
4452 SQLAlchemy Database Toolkit for Python.")
4453 (license license:expat)))
4455 (define-public python2-alembic
4456 (package-with-python2 python-alembic))
4458 (define-public python-autopep8
4460 (name "python-autopep8")
4465 (uri (pypi-uri "autopep8" version))
4468 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4469 (build-system python-build-system)
4471 `(("python-pep8" ,python-pep8)))
4472 (home-page "https://github.com/hhatto/autopep8")
4473 (synopsis "Format Python code according to the PEP 8 style guide")
4475 "@code{autopep8} automatically formats Python code to conform to
4476 the PEP 8 style guide. It uses the pycodestyle utility to determine
4477 what parts of the code needs to be formatted. @code{autopep8} is
4478 capable of fixing most of the formatting issues that can be reported
4480 (license (license:non-copyleft
4481 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4483 (define-public python2-autopep8
4484 (package-with-python2 python-autopep8))
4486 (define-public python-distutils-extra
4488 (name "python-distutils-extra")
4493 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4494 version "/+download/python-distutils-extra-"
4498 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4499 (build-system python-build-system)
4500 (home-page "https://launchpad.net/python-distutils-extra/")
4501 (synopsis "Enhancements to Python's distutils")
4503 "The python-distutils-extra module enables you to easily integrate
4504 gettext support, themed icons, and scrollkeeper-based documentation into
4505 Python's distutils.")
4506 (license license:gpl2)))
4508 (define-public python2-distutils-extra
4509 (package-with-python2 python-distutils-extra))
4511 (define-public python2-elib.intl
4513 (name "python2-elib.intl")
4517 ;; This project doesn't tag releases or publish tarballs, so we take
4518 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4521 (url "https://github.com/dieterv/elib.intl.git")
4522 (commit "d09997cfef")))
4525 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4526 (build-system python-build-system)
4528 ;; incompatible with Python 3 (exception syntax)
4529 `(#:python ,python-2
4531 (home-page "https://github.com/dieterv/elib.intl")
4532 (synopsis "Enhanced internationalization for Python")
4534 "The elib.intl module provides enhanced internationalization (I18N)
4535 services for your Python modules and applications.")
4536 (license license:lgpl3+)))
4538 (define-public python-pillow
4540 (name "python-pillow")
4545 (uri (pypi-uri "Pillow" version))
4548 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4549 (build-system python-build-system)
4551 `(("python-nose" ,python-nose)))
4553 `(("freetype" ,freetype)
4556 ("libjpeg" ,libjpeg)
4557 ("openjpeg" ,openjpeg)
4558 ("libtiff" ,libtiff)
4559 ("libwebp" ,libwebp)))
4561 `(#:phases (modify-phases %standard-phases
4563 'install 'check-installed
4564 (lambda* (#:key outputs inputs #:allow-other-keys)
4566 (setenv "HOME" (getcwd))
4567 ;; Make installed package available for running the
4569 (add-installed-pythonpath inputs outputs)
4570 (and (zero? (system* "python" "selftest.py"
4572 (zero? (system* "python" "test-installed.py"))))))
4574 (home-page "https://pypi.python.org/pypi/Pillow")
4575 (synopsis "Fork of the Python Imaging Library")
4577 "The Python Imaging Library adds image processing capabilities to your
4578 Python interpreter. This library provides extensive file format support, an
4579 efficient internal representation, and fairly powerful image processing
4580 capabilities. The core image library is designed for fast access to data
4581 stored in a few basic pixel formats. It should provide a solid foundation for
4582 a general image processing tool.")
4583 (license (license:x11-style
4584 "http://www.pythonware.com/products/pil/license.htm"
4585 "The PIL Software License"))))
4587 (define-public python2-pillow
4588 (package-with-python2 python-pillow))
4590 (define-public python-pycparser
4592 (name "python-pycparser")
4597 (uri (pypi-uri "pycparser" version))
4600 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4601 (outputs '("out" "doc"))
4602 (build-system python-build-system)
4604 `(("pkg-config" ,pkg-config)))
4607 (modify-phases %standard-phases
4610 (with-directory-excursion "tests"
4611 (zero? (system* "python" "all_tests.py")))))
4612 (add-after 'install 'install-doc
4613 (lambda* (#:key outputs #:allow-other-keys)
4614 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4615 (doc (string-append data "/doc/" ,name "-" ,version))
4616 (examples (string-append doc "/examples")))
4618 (for-each (lambda (file)
4619 (copy-file (string-append "." file)
4620 (string-append doc file)))
4621 '("/README.rst" "/CHANGES" "/LICENSE"))
4622 (copy-recursively "examples" examples)))))))
4623 (home-page "https://github.com/eliben/pycparser")
4624 (synopsis "C parser in Python")
4626 "Pycparser is a complete parser of the C language, written in pure Python
4627 using the PLY parsing library. It parses C code into an AST and can serve as
4628 a front-end for C compilers or analysis tools.")
4629 (license license:bsd-3)))
4631 (define-public python2-pycparser
4632 (package-with-python2 python-pycparser))
4634 (define-public python-cffi
4636 (name "python-cffi")
4641 (uri (pypi-uri "cffi" version))
4643 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4644 (build-system python-build-system)
4645 (outputs '("out" "doc"))
4647 `(("libffi" ,libffi)))
4648 (propagated-inputs ; required at run-time
4649 `(("python-pycparser" ,python-pycparser)))
4651 `(("pkg-config" ,pkg-config)
4652 ("python-sphinx" ,python-sphinx)
4653 ("python-pytest" ,python-pytest)))
4657 'install 'install-doc
4658 (lambda* (#:key outputs #:allow-other-keys)
4659 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4660 (doc (string-append data "/doc/" ,name "-" ,version))
4661 (html (string-append doc "/html")))
4662 (with-directory-excursion "doc"
4663 (system* "make" "html")
4665 (copy-recursively "build/html" html))
4666 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4668 (home-page "http://cffi.readthedocs.org")
4669 (synopsis "Foreign function interface for Python")
4671 "Foreign Function Interface for Python calling C code.")
4672 (license license:expat)))
4674 (define-public python2-cffi
4675 (package-with-python2 python-cffi))
4677 (define-public python-xcffib
4679 (name "python-xcffib")
4684 (uri (string-append "https://pypi.python.org/packages/source/x/"
4685 "xcffib/xcffib-" version ".tar.gz"))
4688 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4689 (build-system python-build-system)
4691 `(("libxcb" ,libxcb)))
4693 `(("python-cffi" ,python-cffi) ; used at run time
4694 ("python-six" ,python-six)))
4696 `(;; FIXME: Tests cannot load libxcb.so.1
4699 (modify-phases %standard-phases
4700 (add-after 'install 'install-doc
4701 (lambda* (#:key outputs #:allow-other-keys)
4702 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4703 "/doc/" ,name "-" ,version)))
4705 (copy-file "README.md"
4706 (string-append doc "/README.md"))
4708 (home-page "https://github.com/tych0/xcffib")
4709 (synopsis "XCB Python bindings")
4711 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4712 support for Python 3 and PyPy. It is based on cffi.")
4713 (license license:expat)))
4715 (define-public python2-xcffib
4716 (package-with-python2 python-xcffib))
4718 (define-public python-cairocffi
4720 (name "python-cairocffi")
4725 ;; The archive on pypi is missing the 'utils' directory!
4726 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4728 (file-name (string-append name "-" version ".tar.gz"))
4731 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4732 (build-system python-build-system)
4733 (outputs '("out" "doc"))
4735 `(("gdk-pixbuf" ,gdk-pixbuf)
4738 `(("pkg-config" ,pkg-config)
4739 ("python-sphinx" ,python-sphinx)
4740 ("python-docutils" ,python-docutils)))
4742 `(("python-xcffib" ,python-xcffib))) ; used at run time
4744 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4747 (modify-phases %standard-phases
4748 (add-after 'install 'install-doc
4749 (lambda* (#:key inputs outputs #:allow-other-keys)
4750 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4751 (doc (string-append data "/doc/" ,name "-" ,version))
4752 (html (string-append doc "/html")))
4753 (setenv "LD_LIBRARY_PATH"
4754 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4755 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4756 (setenv "LANG" "en_US.UTF-8")
4758 (for-each (lambda (file)
4759 (copy-file (string-append "." file)
4760 (string-append doc file)))
4761 '("/README.rst" "/CHANGES" "/LICENSE"))
4762 (system* "python" "setup.py" "build_sphinx")
4763 (copy-recursively "docs/_build/html" html)
4765 (home-page "https://github.com/SimonSapin/cairocffi")
4766 (synopsis "Python bindings and object-oriented API for Cairo")
4768 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4769 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4770 graphics library with support for multiple backends including image buffers,
4771 PNG, PostScript, PDF, and SVG file output.")
4772 (license license:bsd-3)))
4774 (define-public python2-cairocffi
4775 (package-with-python2 python-cairocffi))
4777 (define-public python-decorator
4779 (name "python-decorator")
4784 (uri (pypi-uri "decorator" version))
4786 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4787 (build-system python-build-system)
4788 (arguments '(#:tests? #f)) ; no test target
4789 (home-page "https://pypi.python.org/pypi/decorator/")
4790 (synopsis "Python module to simplify usage of decorators")
4792 "The aim of the decorator module is to simplify the usage of decorators
4793 for the average programmer, and to popularize decorators usage giving examples
4794 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4795 etc. The core of this module is a decorator factory.")
4796 (license license:expat)))
4798 (define-public python2-decorator
4799 (package-with-python2 python-decorator))
4801 (define-public python-drmaa
4803 (name "python-drmaa")
4809 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4812 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4813 (build-system python-build-system)
4814 ;; The test suite requires libdrmaa which is provided by the cluster
4815 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4816 ;; should be set to the path of the libdrmaa library.
4817 (arguments '(#:tests? #f))
4819 `(("python-nose" ,python-nose)))
4820 (home-page "https://pypi.python.org/pypi/drmaa")
4821 (synopsis "Python bindings for the DRMAA library")
4823 "A Python package for Distributed Resource Management (DRM) job
4824 submission and control. This package is an implementation of the DRMAA 1.0
4825 Python language binding specification.")
4826 (license license:bsd-3)))
4828 (define-public python2-drmaa
4829 (package-with-python2 python-drmaa))
4831 (define-public python-gridmap
4833 (name "python-gridmap")
4839 "https://github.com/pygridtools/gridmap/archive/v"
4841 (file-name (string-append name "-" version ".tar.gz"))
4843 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4844 (build-system python-build-system)
4846 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4848 `(("python-psutil" ,python-psutil)
4849 ("python-drmaa" ,python-drmaa)
4850 ("python-pyzmq" ,python-pyzmq)))
4851 (home-page "https://github.com/pygridtools/gridmap")
4852 (synopsis "Create jobs on a cluster directly from Python")
4854 "Gridmap is a Python package to allow you to easily create jobs on the
4855 cluster directly from Python. You can directly map Python functions onto the
4856 cluster without needing to write any wrapper code yourself.")
4857 (license license:gpl3+)))
4859 (define-public python2-gridmap
4860 (package-with-python2 python-gridmap))
4862 (define-public python-pexpect
4864 (name "python-pexpect")
4869 (uri (pypi-uri "pexpect" version))
4871 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4872 (build-system python-build-system)
4875 (modify-phases %standard-phases
4876 (add-before 'check 'prepare-tests
4878 (substitute* (find-files "tests")
4879 (("/bin/ls") (which "ls"))
4880 (("/bin/echo") (which "echo"))
4881 (("/bin/which") (which "which"))
4882 ;; Many tests try to use the /bin directory which
4883 ;; is not present in the build environment.
4884 ;; Use one that's non-empty and unlikely to change.
4885 (("/bin'") "/dev'"))
4886 ;; XXX: Socket connection test gets "Connection reset by peer".
4887 ;; Why does it not work? Delete for now.
4888 (delete-file "tests/test_socket.py")
4890 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4892 `(("python-nose" ,python-nose)
4893 ("python-pytest" ,python-pytest)
4897 `(("python-ptyprocess" ,python-ptyprocess)))
4898 (home-page "http://pexpect.readthedocs.org/")
4899 (synopsis "Controlling interactive console applications")
4901 "Pexpect is a pure Python module for spawning child applications;
4902 controlling them; and responding to expected patterns in their output.
4903 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4904 child application and control it as if a human were typing commands.")
4905 (license license:isc)))
4907 (define-public python2-pexpect
4908 (package-with-python2 python-pexpect))
4910 (define-public python-setuptools-scm
4912 (name "python-setuptools-scm")
4916 (uri (pypi-uri "setuptools_scm" version))
4919 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4920 (build-system python-build-system)
4921 (home-page "https://github.com/pypa/setuptools_scm/")
4922 (synopsis "Manage Python package versions in SCM metadata")
4924 "Setuptools_scm handles managing your Python package versions in
4925 @dfn{software configuration management} (SCM) metadata instead of declaring
4926 them as the version argument or in a SCM managed file.")
4927 (license license:expat)))
4929 (define-public python2-setuptools-scm
4930 (package-with-python2 python-setuptools-scm))
4932 (define-public python-pathpy
4934 (name "python-pathpy")
4939 (uri (string-append "https://pypi.python.org/packages/source/p/"
4940 "path.py/path.py-" version ".tar.gz"))
4942 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4943 (outputs '("out" "doc"))
4944 (build-system python-build-system)
4946 `(("python-appdirs" ,python-appdirs)))
4948 `(("python-setuptools-scm" ,python-setuptools-scm)
4949 ("python-sphinx" ,python-sphinx)
4950 ("python-rst.linker" ,python-rst.linker)
4951 ("python-pytest" ,python-pytest)
4952 ("python-pytest-runner" ,python-pytest-runner)))
4955 (modify-phases %standard-phases
4956 (add-after 'build 'build-doc
4958 (setenv "LANG" "en_US.UTF-8")
4959 (zero? (system* "python" "setup.py" "build_sphinx"))))
4960 (add-after 'install 'install-doc
4961 (lambda* (#:key outputs #:allow-other-keys)
4962 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4963 (doc (string-append data "/doc/" ,name "-" ,version))
4964 (html (string-append doc "/html")))
4966 (for-each (lambda (file)
4967 (copy-file file (string-append doc "/" file)))
4968 '("README.rst" "CHANGES.rst"))
4969 (copy-recursively "build/sphinx/html" html)))))))
4970 (home-page "http://github.com/jaraco/path.py")
4971 (synopsis "Python module wrapper for built-in os.path")
4973 "@code{path.py} implements path objects as first-class entities, allowing
4974 common operations on files to be invoked on those path objects directly.")
4975 (license license:expat)))
4977 (define-public python2-pathpy
4978 (package-with-python2 python-pathpy))
4980 (define-public python-pickleshare
4982 (name "python-pickleshare")
4987 (uri (string-append "https://pypi.python.org/packages/source/p/"
4988 "pickleshare/pickleshare-" version ".tar.gz"))
4990 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4991 (build-system python-build-system)
4993 `(("python-pathpy" ,python-pathpy)))
4994 (home-page "https://github.com/vivainio/pickleshare")
4995 (synopsis "Tiny key value database with concurrency support")
4997 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4998 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4999 shelve, many processes can access the database simultaneously. Changing a
5000 value in database is immediately visible to other processes accessing the same
5001 database. Concurrency is possible because the values are stored in separate
5002 files. Hence the “database” is a directory where all files are governed by
5004 (license license:expat)))
5006 (define-public python2-pickleshare
5007 (package-with-python2 python-pickleshare))
5009 (define-public python-simplegeneric
5011 (name "python-simplegeneric")
5016 (uri (string-append "https://pypi.python.org/packages/source/s/"
5017 "simplegeneric/simplegeneric-" version ".zip"))
5019 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5020 (build-system python-build-system)
5022 `(("unzip" ,unzip)))
5023 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5024 (synopsis "Python module for simple generic functions")
5026 "The simplegeneric module lets you define simple single-dispatch generic
5027 functions, akin to Python’s built-in generic functions like @code{len()},
5028 @code{iter()} and so on. However, instead of using specially-named methods,
5029 these generic functions use simple lookup tables, akin to those used by
5030 e.g. @code{pickle.dump()} and other generic functions found in the Python
5032 (license license:zpl2.1)))
5034 (define-public python2-simplegeneric
5035 (package-with-python2 python-simplegeneric))
5037 (define-public python-ipython-genutils
5038 ;; TODO: This package is retired, check if can be removed, see description.
5040 (name "python-ipython-genutils")
5045 (uri (string-append "https://pypi.python.org/packages/source/i/"
5046 "ipython_genutils/ipython_genutils-"
5049 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5050 (build-system python-build-system)
5051 (arguments `(#:tests? #f)) ; no tests
5052 (home-page "http://ipython.org")
5053 (synopsis "Vestigial utilities from IPython")
5055 "This package provides retired utilities from IPython. No packages
5056 outside IPython/Jupyter should depend on it.
5058 This package shouldn't exist. It contains some common utilities shared by
5059 Jupyter and IPython projects during The Big Split. As soon as possible, those
5060 packages will remove their dependency on this, and this package will go
5062 (license license:bsd-3)))
5064 (define-public python2-ipython-genutils
5065 (package-with-python2 python-ipython-genutils))
5067 (define-public python-traitlets
5069 (name "python-traitlets")
5074 (uri (pypi-uri "traitlets" version))
5077 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5078 (build-system python-build-system)
5081 (modify-phases %standard-phases
5082 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5084 `(("python-ipython-genutils" ,python-ipython-genutils)
5085 ("python-decorator" ,python-decorator)))
5087 `(("python-mock" ,python-mock)
5088 ("python-nose" ,python-nose)))
5089 (home-page "http://ipython.org")
5090 (synopsis "Configuration system for Python applications")
5092 "Traitlets is a framework that lets Python classes have attributes with
5093 type checking, dynamically calculated default values, and ‘on change’
5094 callbacks. The package also includes a mechanism to use traitlets for
5095 configuration, loading values from files or from command line arguments. This
5096 is a distinct layer on top of traitlets, so you can use traitlets in your code
5097 without using the configuration machinery.")
5098 (license license:bsd-3)))
5100 (define-public python2-traitlets
5101 (package-with-python2 python-traitlets))
5103 (define-public python-jupyter-core
5105 (name "python-jupyter-core")
5110 (uri (string-append (pypi-uri "jupyter_core" version)))
5113 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5114 (build-system python-build-system)
5115 ;; FIXME: not sure how to run the tests
5116 (arguments `(#:tests? #f))
5118 `(("python-traitlets" ,python-traitlets)))
5119 (home-page "http://jupyter.org/")
5120 (synopsis "Jupyter base package")
5122 "Jupyter core is the base package on which Jupyter projects rely.")
5123 (license license:bsd-3)))
5125 (define-public python2-jupyter-core
5126 (package-with-python2 python-jupyter-core))
5128 (define-public python-jupyter-client
5130 (name "python-jupyter-client")
5135 (uri (pypi-uri "jupyter_client" version))
5138 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5139 (build-system python-build-system)
5140 ;; Tests fail because of missing native python kernel which I assume is
5141 ;; provided by the ipython package, which we cannot use because it would
5142 ;; cause a dependency cycle.
5143 (arguments `(#:tests? #f))
5145 `(("python-pyzmq" ,python-pyzmq)
5146 ("python-traitlets" ,python-traitlets)
5147 ("python-jupyter-core" ,python-jupyter-core)))
5148 (home-page "http://jupyter.org/")
5149 (synopsis "Jupyter protocol implementation and client libraries")
5151 "The @code{jupyter_client} package contains the reference implementation
5152 of the Jupyter protocol. It also provides client and kernel management APIs
5153 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5154 installing @code{kernelspec}s for use with Jupyter frontends.")
5155 (license license:bsd-3)))
5157 (define-public python2-jupyter-client
5158 (package-with-python2 python-jupyter-client))
5160 (define-public python-ipykernel
5162 (name "python-ipykernel")
5167 (uri (pypi-uri "ipykernel" version))
5169 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5170 (build-system python-build-system)
5171 ;; The tests load a submodule of IPython. However, IPython itself depends
5173 (arguments `(#:tests? #f))
5175 ;; imported at runtime during connect
5176 `(("python-jupyter-client" ,python-jupyter-client)))
5177 (home-page "http://ipython.org")
5178 (synopsis "IPython Kernel for Jupyter")
5180 "This package provides the IPython kernel for Jupyter.")
5181 (license license:bsd-3)))
5183 (define-public python2-ipykernel
5184 (package-with-python2 python-ipykernel))
5186 (define-public python-testpath
5188 (name "python-testpath")
5193 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5195 (file-name (string-append name "-" version ".tar.gz"))
5198 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5199 (build-system python-build-system)
5201 `(#:tests? #f ; this package does not even have a setup.py
5202 #:modules ((guix build python-build-system)
5205 #:imported-modules (,@%python-build-system-modules
5208 (modify-phases %standard-phases
5211 (lambda* (#:key inputs outputs #:allow-other-keys)
5212 (let* ((version (last
5213 (string-split (assoc-ref inputs "python") #\-)))
5214 (x.y (string-join (take (string-split version #\.) 2)
5217 (assoc-ref outputs "out")
5218 "/lib/python" x.y "/site-packages/testpath")))
5220 (copy-recursively "testpath" dir))
5222 (home-page "https://github.com/takluyver/testpath")
5223 (synopsis "Test utilities for code working with files and commands")
5225 "Testpath is a collection of utilities for Python code working with files
5226 and commands. It contains functions to check things on the filesystem, and
5227 tools for mocking system commands and recording calls to those.")
5228 (license license:expat)))
5230 (define-public python2-testpath
5231 (package-with-python2 python-testpath))
5233 (define-public python-ipython
5235 (name "python-ipython")
5240 (uri (pypi-uri "ipython" version ".tar.gz"))
5242 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5243 (build-system python-build-system)
5244 (outputs '("out" "doc"))
5246 `(("python-pyzmq" ,python-pyzmq)
5247 ("python-prompt-toolkit" ,python-prompt-toolkit)
5248 ("python-terminado" ,python-terminado)
5249 ("python-matplotlib" ,python-matplotlib)
5250 ("python-numpy" ,python-numpy)
5251 ("python-numpydoc" ,python-numpydoc)
5252 ("python-jinja2" ,python-jinja2)
5253 ("python-mistune" ,python-mistune)
5254 ("python-pexpect" ,python-pexpect)
5255 ("python-pickleshare" ,python-pickleshare)
5256 ("python-simplegeneric" ,python-simplegeneric)
5257 ("python-jsonschema" ,python-jsonschema)
5258 ("python-traitlets" ,python-traitlets)
5259 ("python-ipykernel" ,python-ipykernel)
5260 ("python-nbformat" ,python-nbformat)
5261 ("python-pygments" ,python-pygments)))
5263 `(("readline" ,readline)
5266 `(("graphviz" ,graphviz)
5267 ("pkg-config" ,pkg-config)
5268 ("python-requests" ,python-requests) ;; for tests
5269 ("python-testpath" ,python-testpath)
5270 ("python-nose" ,python-nose)
5271 ("python-sphinx" ,python-sphinx)
5272 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5273 ("texlive" ,texlive)
5274 ("texinfo" ,texinfo)))
5277 (modify-phases %standard-phases
5279 'install 'install-doc
5280 (lambda* (#:key inputs outputs #:allow-other-keys)
5281 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5282 (doc (string-append data "/doc/" ,name "-" ,version))
5283 (html (string-append doc "/html"))
5284 (man1 (string-append data "/man/man1"))
5285 (info (string-append data "/info"))
5286 (examples (string-append doc "/examples"))
5287 (python-arg (string-append "PYTHON=" (which "python"))))
5288 (setenv "LANG" "en_US.utf8")
5289 ;; Make installed package available for running the tests
5290 (add-installed-pythonpath inputs outputs)
5291 (with-directory-excursion "docs"
5292 ;; FIXME: pdf fails to build
5293 ;;(system* "make" "pdf" "PAPER=a4")
5294 (system* "make" python-arg "html")
5295 (system* "make" python-arg "info"))
5296 (copy-recursively "docs/man" man1)
5297 (copy-recursively "examples" examples)
5298 (copy-recursively "docs/build/html" html)
5299 ;; (copy-file "docs/build/latex/ipython.pdf"
5300 ;; (string-append doc "/ipython.pdf"))
5302 (copy-file "docs/build/texinfo/ipython.info"
5303 (string-append info "/ipython.info"))
5304 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5305 ;; Tests can only be run after the library has been installed and not
5306 ;; within the source directory.
5310 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5312 (with-directory-excursion "/tmp"
5313 ;; Make installed package available for running the tests
5314 (add-installed-pythonpath inputs outputs)
5315 (setenv "HOME" "/tmp/") ;; required by a test
5316 (zero? (system* (string-append (assoc-ref outputs "out")
5321 (lambda* (#:key inputs #:allow-other-keys)
5322 (substitute* "./IPython/utils/_process_posix.py"
5323 (("/usr/bin/env', 'which") (which "which")))
5324 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5325 (("#!/usr/bin/env python")
5326 (string-append "#!" (which "python"))))
5327 ;; Disable 1 failing test
5328 (substitute* "./IPython/core/tests/test_magic.py"
5329 (("def test_dirops\\(\\):" all)
5330 (string-append "@dec.skipif(True)\n" all))))))))
5331 (home-page "http://ipython.org")
5332 (synopsis "IPython is a tool for interactive computing in Python")
5334 "IPython provides a rich architecture for interactive computing with:
5335 Powerful interactive shells, a browser-based notebook, support for interactive
5336 data visualization, embeddable interpreters and tools for parallel
5338 (license license:bsd-3)
5339 (properties `((python2-variant . ,(delay python2-ipython))))))
5341 (define-public python2-ipython
5342 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5345 ;; FIXME: add pyreadline once available.
5347 `(("python2-backports-shutil-get-terminal-size"
5348 ,python2-backports-shutil-get-terminal-size)
5349 ("python2-pathlib2" ,python2-pathlib2)
5350 ,@(package-propagated-inputs ipython)))
5352 `(("python2-mock" ,python2-mock)
5353 ,@(package-native-inputs ipython))))))
5355 (define-public python-isodate
5357 (name "python-isodate")
5362 (uri (pypi-uri "isodate" version))
5365 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5366 (build-system python-build-system)
5368 "http://cheeseshop.python.org/pypi/isodate")
5370 "Python date parser and formatter")
5372 "Python-isodate is a python module for parsing and formatting
5373 ISO 8601 dates, time and duration.")
5374 (license license:bsd-3)))
5376 (define-public python2-isodate
5377 (package-with-python2 python-isodate))
5379 (define-public python-html5lib
5381 (name "python-html5lib")
5386 (uri (pypi-uri "html5lib" version))
5389 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5390 (build-system python-build-system)
5392 `(("python-six" ,python-six)
5393 ("python-webencodings" ,python-webencodings)))
5395 `(#:test-target "check"))
5397 "https://github.com/html5lib/html5lib-python")
5399 "Python HTML parser based on the WHATWG HTML specifcation")
5401 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5402 and written in Python.")
5403 (license license:expat)))
5405 (define-public python2-html5lib
5406 (package-with-python2 python-html5lib))
5408 ;; Needed for python-bleach, a dependency of python-notebook
5409 (define-public python-html5lib-0.9
5411 (inherit python-html5lib)
5416 (uri (pypi-uri "html5lib" version))
5419 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5421 (define-public python2-html5lib-0.9
5422 (package-with-python2 python-html5lib-0.9))
5424 (define-public python-webencodings
5426 (name "python-webencodings")
5430 (uri (pypi-uri "webencodings" version))
5433 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5434 (build-system python-build-system)
5437 (modify-phases %standard-phases
5440 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5442 `(("python-pytest" ,python-pytest)))
5443 (home-page "https://github.com/SimonSapin/python-webencodings")
5444 (synopsis "Character encoding aliases for legacy web content")
5446 "In order to be compatible with legacy web content when interpreting
5447 something like @code{Content-Type: text/html; charset=latin1}, tools need
5448 to use a particular set of aliases for encoding labels as well as some
5449 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5450 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5451 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5452 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5453 defines all such details so that implementations do not have to
5454 reverse-engineer each other.
5456 This module implements the Encoding standard and has encoding labels and
5457 BOM detection, but the actual implementation for encoders and decoders
5459 (license license:bsd-3)))
5461 (define-public python2-webencodings
5462 (package-with-python2 python-webencodings))
5464 (define-public python-urwid
5466 (name "python-urwid")
5471 (uri (pypi-uri "urwid" version))
5474 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5475 (build-system python-build-system)
5478 (modify-phases %standard-phases
5479 ;; Disable failing test. Bug filed upstream:
5480 ;; https://github.com/wardi/urwid/issues/164
5481 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5482 (add-after 'unpack 'disable-failing-test
5484 (substitute* "urwid/tests/test_event_loops.py"
5485 (("test_remove_watch_file")
5486 "disable_remove_watch_file")))))))
5487 (home-page "http://urwid.org")
5488 (synopsis "Console user interface library for Python")
5490 "Urwid is a curses-based UI/widget library for Python. It includes many
5491 features useful for text console applications.")
5492 (license license:lgpl2.1+)))
5494 (define-public python2-urwid
5495 (package-with-python2 python-urwid))
5497 (define-public python-openid
5499 (name "python-openid")
5504 (uri (pypi-uri "python3-openid" version))
5507 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5508 (build-system python-build-system)
5509 (home-page "https://github.com/necaris/python3-openid")
5510 (synopsis "OpenID support for servers and consumers")
5511 (description "This library provides OpenID authentication for Python, both
5512 for clients and servers.")
5513 (license license:asl2.0)))
5515 (define-public python2-openid
5517 (name "python2-openid")
5522 (uri (pypi-uri "python-openid" version))
5525 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5526 (build-system python-build-system)
5528 ;; Python 3 support is in `python3-openid`, a separate package.
5529 `(#:python ,python-2))
5530 (home-page "https://github.com/openid/python-openid")
5531 (synopsis "OpenID support for servers and consumers")
5532 (description "This library provides OpenID authentication for Python, both
5533 for clients and servers.")
5534 (license license:asl2.0)))
5536 (define-public python-urwidtrees
5538 (name "python-urwidtrees")
5543 ;; package author intends on distributing via github rather than pypi:
5544 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5545 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5547 (file-name (string-append name "-" version ".tar.gz"))
5550 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5551 (build-system python-build-system)
5553 '(#:tests? #f)) ; no tests
5554 (propagated-inputs `(("python-urwid" ,python-urwid)))
5555 (home-page "https://github.com/pazz/urwidtrees")
5556 (synopsis "Tree widgets for urwid")
5557 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5558 toolkit. Use it to build trees of widgets.")
5559 (license license:gpl3+)))
5561 (define-public python2-urwidtrees
5562 (package-with-python2 python-urwidtrees))
5564 (define-public python-dbus
5566 (name "python-dbus")
5572 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5575 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5576 (build-system gnu-build-system)
5579 (modify-phases %standard-phases
5583 ;; XXX: For the missing '/etc/machine-id'.
5584 (substitute* "test/run-test.sh"
5585 (("DBUS_FATAL_WARNINGS=1")
5586 "DBUS_FATAL_WARNINGS=0"))
5589 `(("pkg-config" ,pkg-config)))
5591 `(("python" ,python)
5592 ("dbus-glib" ,dbus-glib)))
5593 (synopsis "Python bindings for D-bus")
5594 (description "python-dbus provides bindings for libdbus, the reference
5595 implementation of D-Bus.")
5596 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5597 (license license:expat)))
5599 (define-public python2-dbus
5600 (package (inherit python-dbus)
5601 (name "python2-dbus")
5602 (inputs `(("python" ,python-2)
5603 ,@(alist-delete "python"
5604 (package-inputs python-dbus)
5606 ;; FIXME: on Python 2, the test_utf8 fails with:
5607 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5608 (arguments `(#:tests? #f))))
5610 (define-public python-apsw
5612 (name "python-apsw")
5613 (version "3.9.2-r1")
5617 (uri (pypi-uri "apsw" version))
5620 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5621 (build-system python-build-system)
5623 `(("sqlite" ,sqlite)))
5626 (modify-phases %standard-phases
5628 (add-after 'install 'check
5629 (lambda* (#:key inputs outputs #:allow-other-keys)
5630 (add-installed-pythonpath inputs outputs)
5631 (zero? (system* "python" "setup.py" "test")))))))
5632 (home-page "https://github.com/rogerbinns/apsw/")
5633 (synopsis "Another Python SQLite Wrapper")
5634 (description "APSW is a Python wrapper for the SQLite
5635 embedded relational database engine. In contrast to other wrappers such as
5636 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5637 translate the complete SQLite API into Python.")
5638 (license license:zlib)))
5640 (define-public python2-apsw
5641 (package-with-python2 python-apsw))
5643 (define-public python-lxml
5645 (name "python-lxml")
5650 (uri (pypi-uri "lxml" version))
5653 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5654 (build-system python-build-system)
5656 `(("libxml2" ,libxml2)
5657 ("libxslt" ,libxslt)))
5658 (home-page "http://lxml.de/")
5660 "Python XML processing library")
5662 "The lxml XML toolkit is a Pythonic binding for the C libraries
5663 libxml2 and libxslt.")
5664 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5666 (define-public python2-lxml
5667 (package-with-python2 python-lxml))
5669 ;; beautifulsoup4 has a totally different namespace than 3.x,
5670 ;; and pypi seems to put it under its own name, so I guess we should too
5671 (define-public python-beautifulsoup4
5673 (name "python-beautifulsoup4")
5678 (uri (pypi-uri "beautifulsoup4" version))
5681 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5682 (build-system python-build-system)
5685 (modify-phases %standard-phases
5686 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5687 ;; must use this conversion script when building with Python 3. The
5688 ;; conversion script also runs the tests.
5689 ;; For more information, see the file 'convert-py3k' in the source
5692 (lambda _ (zero? (system* "./convert-py3k")))))))
5694 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5696 "Python screen-scraping library")
5698 "Beautiful Soup is a Python library designed for rapidly setting up
5699 screen-scraping projects. It offers Pythonic idioms for navigating,
5700 searching, and modifying a parse tree, providing a toolkit for
5701 dissecting a document and extracting what you need. It automatically
5702 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5703 (license license:expat)
5704 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5706 (define-public python2-beautifulsoup4
5708 (inherit (package-with-python2
5709 (strip-python2-variant python-beautifulsoup4)))
5710 (arguments `(#:python ,python-2))))
5712 (define-public python-cssutils
5714 (name "python-cssutils")
5719 (uri (pypi-uri "cssutils" version))
5722 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5723 (build-system python-build-system)
5725 `(("unzip" ,unzip))) ; for unpacking the source
5727 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5728 (home-page "http://cthedot.de/cssutils/")
5730 "CSS Cascading Style Sheets library for Python")
5732 "Cssutils is a Python package for parsing and building CSS
5733 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5735 (license license:lgpl3+)))
5737 (define-public python2-cssutils
5738 (package-with-python2 python-cssutils))
5740 (define-public python-cssselect
5742 (name "python-cssselect")
5747 (uri (pypi-uri "cssselect" version))
5750 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5751 (build-system python-build-system)
5753 ;; tests fail with message
5754 ;; AttributeError: 'module' object has no attribute 'tests'
5757 "https://pythonhosted.org/cssselect/")
5759 "CSS3 selector parser and translator to XPath 1.0")
5761 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5762 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5763 another XPath engine to find the matching elements in an XML or HTML document.")
5764 (license license:bsd-3)))
5766 (define-public python2-cssselect
5767 (package-with-python2 python-cssselect))
5769 (define-public python-openid-cla
5771 (name "python-openid-cla")
5776 (uri (pypi-uri "python-openid-cla" version))
5779 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5780 (build-system python-build-system)
5781 (arguments '(#:tests? #f)) ; No tests.
5782 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5783 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5784 (description "@code{openid-cla} is an implementation of the OpenID
5785 contributor license agreement extension for python-openid.")
5786 (license license:bsd-3)))
5788 (define-public python2-openid-cla
5789 (package-with-python2 python-openid-cla))
5791 (define-public python-openid-teams
5793 (name "python-openid-teams")
5798 (uri (pypi-uri "python-openid-teams" version))
5801 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5802 (build-system python-build-system)
5803 (arguments '(#:tests? #f)) ; No tests.
5804 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5805 (synopsis "Implementation of the OpenID teams extension for python-openid")
5807 "@code{openid-teams} is an implementation of the OpenID
5808 teams extension for python-openid.")
5809 (license license:bsd-3)))
5811 (define-public python2-openid-teams
5812 (package-with-python2 python-openid-teams))
5814 (define-public python-netifaces
5816 (name "python-netifaces")
5822 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5827 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5828 (build-system python-build-system)
5830 "https://bitbucket.org/al45tair/netifaces")
5832 "Python module for portable network interface information")
5834 "Netifaces is a Python module providing information on network
5835 interfaces in an easy and portable manner.")
5836 (license license:expat)))
5838 (define-public python2-netifaces
5839 (package-with-python2 python-netifaces))
5841 (define-public python-networkx
5843 (name "python-networkx")
5848 (uri (pypi-uri "networkx" version))
5850 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5851 (build-system python-build-system)
5852 ;; python-decorator is needed at runtime
5854 `(("python-decorator" ,python-decorator)))
5856 `(("python-nose" ,python-nose)))
5857 (home-page "http://networkx.github.io/")
5858 (synopsis "Python module for creating and manipulating graphs and networks")
5860 "NetworkX is a Python package for the creation, manipulation, and study
5861 of the structure, dynamics, and functions of complex networks.")
5862 (license license:bsd-3)))
5864 (define-public python2-networkx
5865 (package-with-python2 python-networkx))
5867 (define-public snakemake
5874 (uri (pypi-uri "snakemake" version))
5876 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
5877 (build-system python-build-system)
5879 ;; TODO: Package missing test dependencies.
5881 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5882 (synopsis "Python-based execution environment for make-like workflows")
5884 "Snakemake aims to reduce the complexity of creating workflows by
5885 providing a clean and modern domain specific specification language (DSL) in
5886 Python style, together with a fast and comfortable execution environment.")
5887 (license license:expat)))
5889 (define-public python-seaborn
5891 (name "python-seaborn")
5896 (uri (pypi-uri "seaborn" version))
5898 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5899 (build-system python-build-system)
5901 '(#:tests? #f)) ; Tests requires a running X11 server.
5903 `(("python-pandas" ,python-pandas)
5904 ("python-matplotlib" ,python-matplotlib)
5905 ("python-scipy" ,python-scipy)))
5906 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5907 (synopsis "Statistical data visualization")
5909 "Seaborn is a library for making attractive and informative statistical
5910 graphics in Python. It is built on top of matplotlib and tightly integrated
5911 with the PyData stack, including support for numpy and pandas data structures
5912 and statistical routines from scipy and statsmodels.")
5913 (license license:bsd-3)
5914 (properties `((python2-variant . ,(delay python2-seaborn))))))
5916 (define-public python2-seaborn
5917 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5920 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5921 ,@(package-propagated-inputs base))))))
5923 (define-public python-mpmath
5925 (name "python-mpmath")
5929 (uri (string-append "http://mpmath.org/files/mpmath-"
5933 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5934 (build-system python-build-system)
5937 (modify-phases %standard-phases
5941 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5942 (home-page "http://mpmath.org")
5943 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5945 "@code{mpmath} can be used as an arbitrary-precision substitute for
5946 Python's float/complex types and math/cmath modules, but also does much
5947 more advanced mathematics.")
5948 (license license:bsd-3)))
5950 (define-public python2-mpmath
5951 (package-with-python2 python-mpmath))
5953 (define-public python-sympy
5955 (name "python-sympy")
5961 "https://github.com/sympy/sympy/releases/download/sympy-"
5962 version "/sympy-" version ".tar.gz"))
5964 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
5965 (build-system python-build-system)
5967 `(("python-mpmath" ,python-mpmath)))
5968 (home-page "http://www.sympy.org/")
5969 (synopsis "Python library for symbolic mathematics")
5971 "SymPy is a Python library for symbolic mathematics. It aims to become a
5972 full-featured computer algebra system (CAS) while keeping the code as simple
5973 as possible in order to be comprehensible and easily extensible.")
5974 (license license:bsd-3)))
5976 (define-public python2-sympy
5977 (package-with-python2 python-sympy))
5979 (define-public python-q
5986 (uri (pypi-uri "q" version))
5989 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5990 (build-system python-build-system)
5991 (home-page "https://github.com/zestyping/q")
5992 (synopsis "Quick-and-dirty debugging output for tired programmers")
5994 "q is a Python module for \"print\" style of debugging Python code. It
5995 provides convenient short API for print out of values, tracebacks, and
5996 falling into the Python interpreter.")
5997 (license license:asl2.0)))
5999 (define-public python2-q
6000 (package-with-python2 python-q))
6002 (define-public python-testlib
6004 (name "python-testlib")
6010 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6013 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6014 (build-system python-build-system)
6016 `(("unzip" ,unzip))) ; for unpacking the source
6017 (synopsis "Python micro test suite harness")
6018 (description "A micro unittest suite harness for Python.")
6019 (home-page "https://github.com/trentm/testlib")
6020 (license license:expat)))
6022 (define-public python2-testlib
6023 (package-with-python2 python-testlib))
6025 (define-public python2-xlib
6027 (name "python2-xlib")
6031 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6033 "python-xlib-" version ".tar.gz"))
6036 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6037 (build-system python-build-system)
6039 `(#:python ,python-2 ;Python 2 only
6040 #:tests? #f)) ;no tests
6041 (home-page "http://python-xlib.sourceforge.net/")
6042 (synopsis "Python X11 client library")
6044 "The Python X Library is intended to be a fully functional X client
6045 library for Python programs. It is useful to implement low-level X clients.
6046 It is written entirely in Python.")
6047 (license license:gpl2+)))
6049 (define-public python-singledispatch
6051 (name "python-singledispatch")
6056 (uri (pypi-uri "singledispatch" version))
6059 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6060 (build-system python-build-system)
6062 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6064 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6065 (synopsis "Backport of singledispatch feature from Python 3.4")
6067 "This library brings functools.singledispatch from Python 3.4 to Python
6069 (license license:expat)))
6071 (define-public python2-singledispatch
6072 (package-with-python2 python-singledispatch))
6074 (define-public python-tornado
6076 (name "python-tornado")
6081 (uri (pypi-uri "tornado" version))
6083 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
6084 (build-system python-build-system)
6086 '(;; FIXME: Two tests error out with:
6087 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6089 ;; (modify-phases %standard-phases
6092 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6093 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6094 ;; (zero? (system* "python" "-m" "tornado.test")))))
6097 `(("python-certifi" ,python-certifi)))
6099 `(("python-backports-abc" ,python-backports-abc)))
6100 (home-page "http://www.tornadoweb.org/")
6101 (synopsis "Python web framework and asynchronous networking library")
6103 "Tornado is a Python web framework and asynchronous networking library,
6104 originally developed at FriendFeed. By using non-blocking network I/O,
6105 Tornado can scale to tens of thousands of open connections, making it ideal
6106 for long polling, WebSockets, and other applications that require a long-lived
6107 connection to each user.")
6108 (license license:asl2.0)
6109 (properties `((python2-variant . ,(delay python2-tornado))))))
6111 (define-public python2-tornado
6112 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6113 (package (inherit tornado)
6115 `(("python2-backport-ssl-match-hostname"
6116 ,python2-backport-ssl-match-hostname)
6117 ("python2-singledispatch" ,python2-singledispatch)
6118 ,@(package-propagated-inputs tornado))))))
6120 ;; the python- version can be removed with python-3.5
6121 (define-public python-backports-abc
6123 (name "python-backports-abc")
6128 (uri (pypi-uri "backports_abc" version))
6131 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6132 (build-system python-build-system)
6133 (home-page "https://github.com/cython/backports_abc")
6134 (synopsis "Backport of additions to the 'collections.abc' module")
6136 "Python-backports-abc provides a backport of additions to the
6137 'collections.abc' module in Python-3.5.")
6138 (license license:psfl)))
6140 (define-public python2-backports-abc
6141 (package-with-python2 python-backports-abc))
6143 (define-public python2-backports-shutil-get-terminal-size
6145 (name "python2-backports-shutil-get-terminal-size")
6150 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6153 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6154 (build-system python-build-system)
6156 `(#:python ,python-2
6158 (modify-phases %standard-phases
6161 (zero? (system* "py.test" "-v")))))))
6163 `(("python2-pytest" ,python2-pytest)))
6164 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6165 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6167 "This package provides a backport of the @code{get_terminal_size
6168 function} from Python 3.3's @code{shutil}.
6169 Unlike the original version it is written in pure Python rather than C,
6170 so it might be a tiny bit slower.")
6171 (license license:expat)))
6173 (define-public python-waf
6179 (uri (string-append "https://waf.io/"
6180 "waf-" version ".tar.bz2"))
6183 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
6184 (build-system python-build-system)
6187 (modify-phases %standard-phases
6190 (zero? (system* "python" "waf-light" "configure" "build"))))
6193 (zero? (system* "python" "waf" "--version"))))
6196 (copy-file "waf" %output))))))
6197 (home-page "http://waf.io/")
6198 (synopsis "Python-based build system")
6200 "Waf is a Python-based framework for configuring, compiling and installing
6202 (license license:bsd-3)))
6204 (define-public python2-waf
6205 (package-with-python2 python-waf))
6207 (define-public python-pyzmq
6209 (name "python-pyzmq")
6214 (uri (pypi-uri "pyzmq" version))
6216 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6217 (build-system python-build-system)
6220 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6221 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6222 ;; --inplace' for 'python setup.py test' to work.
6225 `(("zeromq" ,zeromq)))
6227 `(("pkg-config" ,pkg-config)
6228 ("python-nose" ,python-nose)))
6229 (home-page "http://github.com/zeromq/pyzmq")
6230 (synopsis "Python bindings for 0MQ")
6232 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6233 (license license:bsd-4)))
6235 (define-public python2-pyzmq
6236 (package-with-python2 python-pyzmq))
6238 (define-public python-pep8
6240 (name "python-pep8")
6245 (uri (pypi-uri "pep8" version))
6248 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6249 (build-system python-build-system)
6250 (home-page "http://pep8.readthedocs.org/")
6251 (synopsis "Python style guide checker")
6253 "This tools checks Python code against some of the style conventions in
6255 (license license:expat)))
6257 (define-public python2-pep8
6258 (package-with-python2 python-pep8))
6260 (define-public python-pyflakes
6262 (name "python-pyflakes")
6267 (uri (pypi-uri "pyflakes" version))
6270 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6271 (build-system python-build-system)
6273 "https://github.com/pyflakes/pyflakes")
6274 (synopsis "Passive checker of Python programs")
6276 "Pyflakes statically checks Python source code for common errors.")
6277 (license license:expat)))
6279 (define-public python2-pyflakes
6280 (package-with-python2 python-pyflakes))
6282 (define-public python-mccabe
6284 (name "python-mccabe")
6289 (uri (pypi-uri "mccabe" version))
6292 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6293 (build-system python-build-system)
6295 `(("python-pytest" ,python-pytest)
6296 ("python-pytest-runner" ,python-pytest-runner)))
6297 (home-page "https://github.com/flintwork/mccabe")
6298 (synopsis "McCabe checker, plugin for flake8")
6300 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6301 complexity of Python source code.")
6302 (license license:expat)))
6304 (define-public python2-mccabe
6305 (package-with-python2 python-mccabe))
6307 (define-public python-mccabe-0.2.1
6308 (package (inherit python-mccabe)
6313 (uri (pypi-uri "mccabe" version))
6316 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6318 (define-public python2-mccabe-0.2.1
6319 (package-with-python2 python-mccabe-0.2.1))
6321 ;; Flake8 2.4.1 requires an older version of pep8.
6322 ;; This should be removed ASAP.
6323 (define-public python-pep8-1.5.7
6324 (package (inherit python-pep8)
6330 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6335 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6337 ;; XXX Tests not compatible with Python 3.5.
6340 (define-public python2-pep8-1.5.7
6341 (package-with-python2 python-pep8-1.5.7))
6343 ;; Flake8 2.4.1 requires an older version of pyflakes.
6344 ;; This should be removed ASAP.
6345 (define-public python-pyflakes-0.8.1
6346 (package (inherit python-pyflakes)
6352 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6357 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6359 ;; XXX Tests not compatible with Python 3.5.
6362 (define-public python2-pyflakes-0.8.1
6363 (package-with-python2 python-pyflakes-0.8.1))
6365 (define-public python-flake8
6367 (name "python-flake8")
6372 (uri (pypi-uri "flake8" version))
6375 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6376 (modules '((guix build utils)))
6379 ;; Remove pre-compiled .pyc files from source.
6380 (for-each delete-file-recursively
6381 (find-files "." "__pycache__" #:directories? #t))
6382 (for-each delete-file (find-files "." "\\.pyc$"))
6384 (build-system python-build-system)
6386 `(("python-pep8" ,python-pep8)
6387 ("python-pyflakes" ,python-pyflakes)
6388 ("python-mccabe" ,python-mccabe)))
6390 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6391 ("python-nose" ,python-nose)))
6392 (home-page "https://gitlab.com/pycqa/flake8")
6394 "The modular source code checker: pep8, pyflakes and co")
6396 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6397 (license license:expat)))
6399 (define-public python2-flake8
6400 (package-with-python2 python-flake8))
6402 ;; This will only be needed by the python-hacking package and will not be
6403 ;; necessary once python-hacking > 0.10.2 is released.
6404 (define-public python-flake8-2.2.4
6405 (package (inherit python-flake8)
6407 `(("python-pep8" ,python-pep8-1.5.7)
6408 ("python-pyflakes" ,python-pyflakes-0.8.1)
6409 ("python-mccabe" ,python-mccabe-0.2.1)))
6411 `(("python-mock" ,python-mock)
6412 ("python-nose" ,python-nose)))
6417 (uri (pypi-uri "flake8" version))
6420 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6421 (modules '((guix build utils)))
6424 ;; Remove pre-compiled .pyc files from source.
6425 (for-each delete-file-recursively
6426 (find-files "." "__pycache__" #:directories? #t))
6427 (for-each delete-file (find-files "." "\\.pyc$"))
6430 ;; XXX Fails with Python 3.5.
6433 (define-public python2-flake8-2.2.4
6434 (package-with-python2 python-flake8-2.2.4))
6436 (define-public python-flake8-polyfill
6438 (name "python-flake8-polyfill")
6443 (uri (pypi-uri "flake8-polyfill" version))
6446 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6447 (build-system python-build-system)
6450 (modify-phases %standard-phases
6453 (setenv "PYTHONPATH"
6454 (string-append (getcwd) "/build/lib:"
6455 (getenv "PYTHONPATH")))
6456 (zero? (system* "py.test" "-v")))))))
6458 `(("python-flake8" ,python-flake8)
6459 ("python-mock" ,python-mock)
6460 ("python-pycodestyle" ,python-pycodestyle)
6461 ("python-pytest" ,python-pytest)))
6462 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6463 (synopsis "Polyfill package for Flake8 plugins")
6465 "This package that provides some compatibility helpers for Flake8
6466 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6467 (license license:expat)))
6469 (define-public python2-flake8-polyfill
6470 (package-with-python2 python-flake8-polyfill))
6472 (define-public python-mistune
6474 (name "python-mistune")
6479 (uri (pypi-uri "mistune" version))
6482 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6483 (build-system python-build-system)
6485 `(("python-nose" ,python-nose)
6486 ("python-cython" ,python-cython)))
6487 (home-page "https://github.com/lepture/mistune")
6488 (synopsis "Markdown parser in pure Python")
6489 (description "This package provides a fast markdown parser in pure
6491 (license license:bsd-3)))
6493 (define-public python2-mistune
6494 (package-with-python2 python-mistune))
6496 (define-public python-markdown
6498 (name "python-markdown")
6503 (uri (pypi-uri "Markdown" version))
6506 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6507 (build-system python-build-system)
6510 (modify-phases %standard-phases
6513 (zero? (system* "python" "run-tests.py")))))))
6515 `(("python-nose" ,python-nose)
6516 ("python-pyyaml" ,python-pyyaml)))
6517 (home-page "https://pythonhosted.org/Markdown/")
6518 (synopsis "Python implementation of Markdown")
6520 "This package provides a Python implementation of John Gruber's
6521 Markdown. The library features international input, various Markdown
6522 extensions, and several HTML output formats. A command line wrapper
6523 markdown_py is also provided to convert Markdown files to HTML.")
6524 (license license:bsd-3)))
6526 (define-public python2-markdown
6527 (package-with-python2 python-markdown))
6529 (define-public python-ptyprocess
6531 (name "python-ptyprocess")
6537 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6541 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6542 (build-system python-build-system)
6544 `(("python-nose" ,python-nose)))
6547 (modify-phases %standard-phases
6550 (zero? (system* "nosetests")))))))
6551 (home-page "https://github.com/pexpect/ptyprocess")
6552 (synopsis "Run a subprocess in a pseudo terminal")
6554 "This package provides a Python library used to launch a subprocess in a
6555 pseudo terminal (pty), and interact with both the process and its pty.")
6556 (license license:isc)))
6558 (define-public python2-ptyprocess
6559 (package-with-python2 python-ptyprocess))
6561 (define-public python-cram
6563 (name "python-cram")
6565 (home-page "https://bitheap.org/cram/")
6568 (uri (list (string-append home-page "cram-"
6570 (pypi-uri "cram" version)))
6573 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6576 (modify-phases %standard-phases
6577 (add-after 'unpack 'patch-source
6579 (substitute* (find-files "cram" ".*\\.py$")
6580 ;; Replace default shell path.
6581 (("/bin/sh") (which "sh")))
6582 (substitute* (find-files "tests" ".*\\.t$")
6584 (("/bin/bash") (which "bash"))
6585 (("/bin/sh") (which "sh")))
6586 (substitute* "cram/_test.py"
6587 ;; This hack works around a bug triggered by substituting
6588 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6589 ;; "cram -h", which breaks the output at 80 characters. This
6590 ;; causes the line showing the default shell to break into two
6591 ;; lines, but the test expects a single line...
6592 (("env\\['COLUMNS'\\] = '80'")
6593 "env['COLUMNS'] = '160'"))
6596 (add-after 'install 'check
6597 ;; The test phase uses the built library and executable.
6598 ;; It's easier to run it after install since the build
6599 ;; directory contains version-specific PATH.
6600 (lambda* (#:key inputs outputs #:allow-other-keys)
6601 (add-installed-pythonpath inputs outputs)
6602 (setenv "PATH" (string-append (getenv "PATH") ":"
6603 (assoc-ref outputs "out") "/bin"))
6604 (zero? (system* "make" "test")))))))
6605 (build-system python-build-system)
6607 `(("python-coverage" ,python-coverage)
6609 (synopsis "Simple testing framework for command line applications")
6611 "Cram is a functional testing framework for command line applications.
6612 Cram tests look like snippets of interactive shell sessions. Cram runs each
6613 command and compares the command output in the test with the command’s actual
6615 (license license:gpl2+)))
6617 (define-public python2-cram
6618 (package-with-python2 python-cram))
6620 (define-public python-terminado
6622 (name "python-terminado")
6627 (uri (pypi-uri "terminado" version))
6630 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6631 (build-system python-build-system)
6633 `(("python-tornado" ,python-tornado)
6634 ("python-ptyprocess" ,python-ptyprocess)))
6636 `(("python-nose" ,python-nose)))
6639 (modify-phases %standard-phases
6642 (zero? (system* "nosetests")))))))
6643 (home-page "https://github.com/takluyver/terminado")
6644 (synopsis "Terminals served to term.js using Tornado websockets")
6645 (description "This package provides a Tornado websocket backend for the
6646 term.js Javascript terminal emulator library.")
6647 (license license:bsd-2)
6648 (properties `((python2-variant . ,(delay python2-terminado))))))
6650 (define-public python2-terminado
6651 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6652 (package (inherit terminado)
6654 `(("python2-backport-ssl-match-hostname"
6655 ,python2-backport-ssl-match-hostname)
6656 ,@(package-propagated-inputs terminado))))))
6658 (define-public python-straight-plugin
6660 (name "python-straight-plugin")
6665 (uri (pypi-uri "straight.plugin" version))
6668 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6669 (build-system python-build-system)
6670 (home-page "https://github.com/ironfroggy/straight.plugin")
6671 (synopsis "Simple namespaced plugin facility")
6672 (description "Straight Plugin provides a type of plugin you can create from
6673 almost any existing Python modules, and an easy way for outside developers to
6674 add functionality and customization to your projects with their own plugins.")
6675 (license license:expat)))
6677 (define-public python2-straight-plugin
6678 (package-with-python2 python-straight-plugin))
6680 (define-public python-fonttools
6682 (name "python-fonttools")
6687 "https://pypi.python.org/packages/source/F/FontTools/"
6688 "fonttools-" version ".tar.gz"))
6691 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6692 (build-system python-build-system)
6694 '(#:test-target "check"
6696 (modify-phases %standard-phases
6697 (add-after 'unpack 'patch-setuppy
6698 ;; Remove the undocumented "extra_path" argument, which adds an
6699 ;; intervening directories between site-packages and the package
6702 (substitute* "setup.py"
6703 (("^[ \t]*extra_path *= *'FontTools',") ""))
6705 (home-page "http://github.com/behdad/fonttools")
6706 (synopsis "Tools to manipulate font files")
6708 "FontTools/TTX is a library to manipulate font files from Python. It
6709 supports reading and writing of TrueType/OpenType fonts, reading and writing
6710 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6711 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6712 from an XML-based format.")
6713 (license (license:non-copyleft
6714 "file://LICENSE.txt"
6715 "See LICENSE.txt in the distribution."))))
6717 (define-public python2-fonttools
6718 (package-with-python2 python-fonttools))
6720 (define-public python-ly
6727 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6728 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6729 "/python-ly-" version ".tar.gz"))
6732 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6733 (build-system python-build-system)
6735 ;; FIXME: Some tests need network access.
6737 (synopsis "Tool and library for manipulating LilyPond files")
6738 (description "This package provides a Python library to parse, manipulate
6739 or create documents in LilyPond format. A command line program ly is also
6740 provided that can be used to do various manipulations with LilyPond files.")
6741 (home-page "https://pypi.python.org/pypi/python-ly")
6742 (license license:gpl2+)))
6744 (define-public python-appdirs
6746 (name "python-appdirs")
6752 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6757 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6758 (build-system python-build-system)
6759 (home-page "http://github.com/ActiveState/appdirs")
6761 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6763 "This module provides a portable way of finding out where user data
6764 should be stored on various operating systems.")
6765 (license license:expat)))
6767 (define-public python2-appdirs
6768 (package-with-python2 python-appdirs))
6770 (define-public python-llfuse
6772 (name "python-llfuse")
6777 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6778 "llfuse-" version ".tar.bz2"))
6781 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6782 (build-system python-build-system)
6787 `(("pkg-config" ,pkg-config)))
6788 (synopsis "Python bindings for FUSE")
6790 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6791 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6792 (license license:lgpl2.0+)
6793 (properties `((python2-variant . ,(delay python2-llfuse))))))
6795 (define-public python2-llfuse
6796 (package (inherit (package-with-python2
6797 (strip-python2-variant python-llfuse)))
6798 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6801 (define-public python-llfuse-0.41
6802 (package (inherit python-llfuse)
6807 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6808 "llfuse-" version ".tar.bz2"))
6811 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6812 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6813 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6814 (license (list license:expat license:lgpl2.0+))))
6816 (define-public python-msgpack
6818 (name "python-msgpack")
6822 (uri (pypi-uri "msgpack-python" version))
6825 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6826 (build-system python-build-system)
6827 (synopsis "MessagePack (de)serializer")
6828 (description "MessagePack is a fast, compact binary serialization format,
6829 suitable for similar data to JSON. This package provides CPython bindings for
6830 reading and writing MessagePack data.")
6831 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6832 (license license:asl2.0)))
6834 (define-public python2-msgpack
6835 (package-with-python2 python-msgpack))
6837 (define-public python-netaddr
6839 (name "python-netaddr")
6845 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6850 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6851 (build-system python-build-system)
6852 (arguments `(#:tests? #f)) ;; No tests.
6853 (home-page "https://github.com/drkjam/netaddr/")
6854 (synopsis "Pythonic manipulation of network addresses")
6856 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6857 and MAC network addresses.")
6858 (license license:bsd-3)))
6860 (define-public python2-netaddr
6861 (package-with-python2 python-netaddr))
6863 (define-public python-wrapt
6865 (name "python-wrapt")
6871 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6876 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6877 (build-system python-build-system)
6879 ;; Tests are not included in the tarball, they are only available in the
6882 (home-page "https://github.com/GrahamDumpleton/wrapt")
6883 (synopsis "Module for decorators, wrappers and monkey patching")
6885 "The aim of the wrapt module is to provide a transparent object proxy for
6886 Python, which can be used as the basis for the construction of function
6887 wrappers and decorator functions.")
6888 (license license:bsd-2)))
6890 (define-public python2-wrapt
6891 (package-with-python2 python-wrapt))
6893 (define-public python-iso8601
6895 (name "python-iso8601")
6900 (uri (pypi-uri "iso8601" version))
6903 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6904 (build-system python-build-system)
6906 `(("python-pytest" ,python-pytest)))
6907 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6908 (synopsis "Module to parse ISO 8601 dates")
6910 "This module parses the most common forms of ISO 8601 date strings (e.g.
6911 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6912 (license license:expat)))
6914 (define-public python2-iso8601
6915 (package-with-python2 python-iso8601))
6917 (define-public python-monotonic
6919 (name "python-monotonic")
6925 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6930 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6931 (build-system python-build-system)
6932 (home-page "https://github.com/atdt/monotonic")
6933 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6935 "This module provides a monotonic() function which returns the value (in
6936 fractional seconds) of a clock which never goes backwards.")
6937 (license license:asl2.0)))
6939 (define-public python2-monotonic
6940 (package-with-python2 python-monotonic))
6942 (define-public python-webob
6944 (name "python-webob")
6949 (uri (pypi-uri "WebOb" version))
6952 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6953 (build-system python-build-system)
6955 `(("python-nose" ,python-nose)))
6956 (home-page "http://webob.org/")
6957 (synopsis "WSGI request and response object")
6959 "WebOb provides wrappers around the WSGI request environment, and an
6960 object to help create WSGI responses.")
6961 (license license:expat)))
6963 (define-public python2-webob
6964 (package-with-python2 python-webob))
6966 (define-public python-xlrd
6968 (name "python-xlrd")
6972 (uri (pypi-uri "xlrd" version))
6975 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6976 (build-system python-build-system)
6979 (modify-phases %standard-phases
6980 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6981 ;; run tests instead for now.
6982 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6983 (native-inputs `(("python-nose" ,python-nose)))
6984 (home-page "http://www.python-excel.org/")
6985 (synopsis "Library for extracting data from Excel files")
6986 (description "This packages provides a library to extract data from
6987 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6988 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6989 Unicode-aware. It is not intended as an end-user tool.")
6990 (license license:bsd-3)))
6992 (define-public python2-xlrd
6993 (package-with-python2 python-xlrd))
6995 (define-public python-prettytable
6997 (name "python-prettytable")
7003 "https://pypi.python.org/packages/source/P/PrettyTable/"
7004 "prettytable-" version ".tar.bz2"))
7007 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7008 (build-system python-build-system)
7009 (home-page "http://code.google.com/p/prettytable/")
7010 (synopsis "Display tabular data in an ASCII table format")
7012 "A library designed to represent tabular data in visually appealing ASCII
7013 tables. PrettyTable allows for selection of which columns are to be printed,
7014 independent alignment of columns (left or right justified or centred) and
7015 printing of sub-tables by specifying a row range.")
7016 (license license:bsd-3)))
7018 (define-public python2-prettytable
7019 (package-with-python2 python-prettytable))
7021 (define-public python-tables
7023 (name "python-tables")
7028 (uri (pypi-uri "tables" version))
7031 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7032 (modules '((guix build utils)))
7035 ;; Remove pre-compiled .pyc files from source.
7036 (for-each delete-file-recursively
7037 (find-files "." "__pycache__" #:directories? #t))
7038 (for-each delete-file (find-files "." "\\.pyc$"))
7040 (build-system python-build-system)
7042 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7043 ;; or "check", so we must override the build and check phases.
7045 (modify-phases %standard-phases
7046 (add-after 'unpack 'use-gcc
7048 (substitute* "setup.py"
7049 (("compiler = new_compiler\\(\\)" line)
7051 "\ncompiler.set_executables(compiler='gcc',"
7052 "compiler_so='gcc',"
7054 "linker_so='gcc -shared')")))
7057 (lambda* (#:key inputs #:allow-other-keys)
7058 (zero? (system* "python" "setup.py" "build"
7059 (string-append "--hdf5="
7060 (assoc-ref inputs "hdf5"))))))
7062 (lambda* (#:key inputs #:allow-other-keys)
7063 (zero? (system* "python" "setup.py" "check"
7064 (string-append "--hdf5="
7065 (assoc-ref inputs "hdf5")))))))))
7067 `(("python-numexpr" ,python-numexpr)
7068 ("python-numpy" ,python-numpy)))
7070 `(("python-cython" ,python-cython)
7071 ("pkg-config" ,pkg-config)))
7076 (home-page "http://www.pytables.org/")
7077 (synopsis "Hierarchical datasets for Python")
7078 (description "PyTables is a package for managing hierarchical datasets and
7079 designed to efficently cope with extremely large amounts of data.")
7080 (license license:bsd-3)))
7082 (define-public python2-tables
7083 (package-with-python2 python-tables))
7085 (define-public python-pyasn1
7087 (name "python-pyasn1")
7092 (uri (pypi-uri "pyasn1" version))
7095 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7096 (build-system python-build-system)
7097 (home-page "http://pyasn1.sourceforge.net/")
7098 (synopsis "ASN.1 types and codecs")
7100 "This is an implementation of ASN.1 types and codecs in Python. It is
7101 suitable for a wide range of protocols based on the ASN.1 specification.")
7102 (license license:bsd-2)))
7104 (define-public python2-pyasn1
7105 (package-with-python2 python-pyasn1))
7107 (define-public python-pyasn1-modules
7109 (name "python-pyasn1-modules")
7114 (uri (pypi-uri "pyasn1-modules" version))
7117 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7118 (build-system python-build-system)
7120 `(("python-pyasn1" ,python-pyasn1)))
7121 (home-page "https://sourceforge.net/projects/pyasn1/")
7122 (synopsis "ASN.1 codec implementations")
7124 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7125 implementations of ASN.1-based codecs and protocols.")
7126 (license license:bsd-3)))
7128 (define-public python2-pyasn1-modules
7129 (package-with-python2 python-pyasn1-modules))
7131 (define-public python-ipaddress
7133 (name "python-ipaddress")
7137 (uri (pypi-uri "ipaddress" version))
7140 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
7141 (build-system python-build-system)
7142 (home-page "https://github.com/phihag/ipaddress")
7143 (synopsis "IP address manipulation library")
7145 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7146 in Python. This library is used to create, poke at, and manipulate IPv4 and
7147 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7148 module to older versions of Python.")
7149 (license license:psfl)))
7151 (define-public python2-ipaddress
7152 (package-with-python2 python-ipaddress))
7154 (define-public python2-ipaddr
7156 (name "python2-ipaddr")
7161 (uri (pypi-uri "ipaddr" version))
7163 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7164 (build-system python-build-system)
7166 `(#:python ,python-2 ;version 2 only
7168 (modify-phases %standard-phases
7171 (zero? (system* "python" "ipaddr_test.py")))))))
7172 (home-page "https://github.com/google/ipaddr-py")
7173 (synopsis "IP address manipulation library")
7175 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7176 IPv6 addresses and networks.
7178 For new implementations you may prefer to use the standard module
7179 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7180 versions of Python.")
7181 (license license:asl2.0)))
7183 (define-public python-idna
7185 (name "python-idna")
7190 (uri (string-append "https://pypi.python.org/packages/source/i/"
7191 "idna/idna-" version ".tar.gz"))
7194 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7195 (build-system python-build-system)
7196 (home-page "https://github.com/kjd/idna")
7197 (synopsis "Internationalized domain names in applications")
7199 "This is a library to support the Internationalised Domain Names in
7200 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7201 protocol is often referred to as “IDNA2008” and can produce different results
7202 from the earlier standard from 2003. The library is also intended to act as a
7203 suitable drop-in replacement for the “encodings.idna” module that comes with
7204 the Python standard library but currently only supports the older 2003
7206 (license license:bsd-4)))
7208 (define-public python2-idna
7209 (package-with-python2 python-idna))
7211 (define-public python-pretend
7213 (name "python-pretend")
7218 (uri (string-append "https://pypi.python.org/packages/source/p/"
7219 "pretend/pretend-" version ".tar.gz"))
7222 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7223 (build-system python-build-system)
7224 (home-page "https://github.com/alex/pretend")
7225 (synopsis "Library for stubbing in Python")
7227 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7228 technique for writing tests. You may hear the term mixed up with mocks,
7229 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7230 responses, rather than doing any computation.")
7231 (license license:bsd-3)))
7233 (define-public python2-pretend
7234 (package-with-python2 python-pretend))
7236 (define-public python-cryptography-vectors
7238 (name "python-cryptography-vectors")
7243 (uri (pypi-uri "cryptography_vectors" version))
7246 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
7247 (build-system python-build-system)
7248 (home-page "https://github.com/pyca/cryptography")
7249 (synopsis "Test vectors for the cryptography package")
7251 "This package contains test vectors for the cryptography package.")
7252 ;; Distributed under either BSD-3 or ASL2.0
7253 (license (list license:bsd-3 license:asl2.0))))
7255 (define-public python2-cryptography-vectors
7256 (package-with-python2 python-cryptography-vectors))
7258 (define-public python-cryptography
7260 (name "python-cryptography")
7265 (uri (pypi-uri "cryptography" version))
7268 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
7269 (build-system python-build-system)
7271 `(("openssl" ,openssl)))
7273 `(("python-cffi" ,python-cffi)
7274 ("python-six" ,python-six)
7275 ("python-pyasn1" ,python-pyasn1)
7276 ("python-idna" ,python-idna)
7277 ("python-iso8601" ,python-iso8601)))
7279 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7280 ("python-hypothesis" ,python-hypothesis)
7281 ("python-pretend" ,python-pretend)
7282 ("python-pyasn1" ,python-pyasn1)
7283 ("python-pyasn1-modules" ,python-pyasn1-modules)
7284 ("python-pytz" ,python-pytz)
7285 ("python-pytest" ,python-pytest-2.9.2)))
7286 (home-page "https://github.com/pyca/cryptography")
7287 (synopsis "Cryptographic recipes and primitives for Python")
7289 "cryptography is a package which provides cryptographic recipes and
7290 primitives to Python developers. It aims to be the “cryptographic standard
7291 library” for Python. The package includes both high level recipes, and low
7292 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7293 message digests and key derivation functions.")
7294 ;; Distributed under either BSD-3 or ASL2.0
7295 (license (list license:bsd-3 license:asl2.0))
7296 (properties `((python2-variant . ,(delay python2-cryptography))))))
7298 (define-public python2-cryptography
7299 (let ((crypto (package-with-python2
7300 (strip-python2-variant python-cryptography))))
7301 (package (inherit crypto)
7303 `(("python2-ipaddress" ,python2-ipaddress)
7304 ("python2-backport-ssl-match-hostname"
7305 ,python2-backport-ssl-match-hostname)
7306 ("python2-enum34" ,python2-enum34)
7307 ,@(package-propagated-inputs crypto))))))
7309 (define-public python-pyopenssl
7311 (name "python-pyopenssl")
7316 (uri (pypi-uri "pyOpenSSL" version))
7319 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7321 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7322 (build-system python-build-system)
7325 (modify-phases %standard-phases
7327 (add-after 'install 'check
7328 (lambda* (#:key inputs outputs #:allow-other-keys)
7329 (add-installed-pythonpath inputs outputs)
7330 (zero? (system* "py.test" "-v")))))))
7332 `(("python-cryptography" ,python-cryptography)
7333 ("python-six" ,python-six)))
7335 `(("openssl" ,openssl)))
7337 `(("python-pytest" ,python-pytest)))
7338 (home-page "https://github.com/pyca/pyopenssl")
7339 (synopsis "Python wrapper module around the OpenSSL library")
7341 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7343 (license license:asl2.0)))
7345 (define-public python2-pyopenssl
7346 (package-with-python2 python-pyopenssl))
7348 (define-public python-pip
7355 (uri (pypi-uri "pip" version))
7358 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7359 (build-system python-build-system)
7361 '(#:tests? #f)) ; there are no tests in the pypi archive.
7362 (home-page "https://pip.pypa.io/")
7363 (synopsis "Package manager for Python software")
7365 "Pip is a package manager for Python software, that finds packages on the
7366 Python Package Index (PyPI).")
7367 (license license:expat)))
7369 (define-public python2-pip
7370 (package-with-python2 python-pip))
7372 (define-public python-tlsh
7374 (name "python-tlsh")
7376 (home-page "https://github.com/trendmicro/tlsh")
7379 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7383 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7384 (file-name (string-append name "-" version ".tar.gz"))))
7385 (build-system cmake-build-system)
7387 '(#:out-of-source? #f
7388 #:phases (modify-phases %standard-phases
7391 (lambda* (#:key outputs #:allow-other-keys)
7392 ;; Build and install the Python bindings. The underlying
7393 ;; C++ library is apparently not meant to be installed.
7394 (let ((out (assoc-ref outputs "out")))
7395 (with-directory-excursion "py_ext"
7396 (and (system* "python" "setup.py" "build")
7397 (system* "python" "setup.py" "install"
7398 (string-append "--prefix=" out))))))))))
7399 (inputs `(("python" ,python-wrapper))) ;for the bindings
7400 (synopsis "Fuzzy matching library for Python")
7402 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7403 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7404 value which can be used for similarity comparisons. Similar objects have
7405 similar hash values, which allows for the detection of similar objects by
7406 comparing their hash values. The byte stream should have a sufficient amount
7407 of complexity; for example, a byte stream of identical bytes will not generate
7409 (license license:asl2.0)))
7411 (define-public python2-tlsh
7413 (inherit python-tlsh)
7414 (name "python2-tlsh")
7415 (inputs `(("python" ,python-2)))))
7417 (define-public python-termcolor
7419 (name "python-termcolor")
7424 (uri (pypi-uri "python-termcolor" version))
7427 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7428 (build-system python-build-system)
7430 ;; There are no tests.
7432 (home-page "http://pypi.python.org/pypi/termcolor")
7433 (synopsis "ANSII Color formatting for terminal output")
7435 "This package provides ANSII Color formatting for output in terminals.")
7436 (license license:expat)))
7438 (define-public python2-termcolor
7439 (package-with-python2 python-termcolor))
7441 (define-public python-libarchive-c
7443 (name "python-libarchive-c")
7447 (uri (pypi-uri "libarchive-c" version))
7450 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7451 (build-system python-build-system)
7453 '(#:phases (modify-phases %standard-phases
7455 'build 'reference-libarchive
7456 (lambda* (#:key inputs #:allow-other-keys)
7457 ;; Retain the absolute file name of libarchive.so.
7458 (let ((libarchive (assoc-ref inputs "libarchive")))
7459 (substitute* "libarchive/ffi.py"
7460 (("find_library\\('archive'\\)")
7461 (string-append "'" libarchive
7462 "/lib/libarchive.so'")))))))))
7464 `(("libarchive" ,libarchive)))
7465 (home-page "https://github.com/Changaco/python-libarchive-c")
7466 (synopsis "Python interface to libarchive")
7468 "This package provides Python bindings to libarchive, a C library to
7469 access possibly compressed archives in many different formats. It uses
7470 Python's @code{ctypes} foreign function interface (FFI).")
7471 (license license:lgpl2.0+)))
7473 (define-public python2-libarchive-c
7474 (package-with-python2 python-libarchive-c))
7476 (define-public python-file
7479 (name "python-file")
7481 (inherit (package-source file))
7482 ;; This patch should not be applied to python2-file.
7483 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7484 (build-system python-build-system)
7486 '(#:tests? #f ;no tests
7487 #:configure-flags '("--single-version-externally-managed" "--root=/")
7488 #:phases (modify-phases %standard-phases
7489 (add-before 'build 'change-directory
7493 (add-before 'build 'set-library-file-name
7494 (lambda* (#:key inputs #:allow-other-keys)
7495 (let ((file (assoc-ref inputs "file")))
7496 (substitute* "magic.py"
7497 (("find_library\\('magic'\\)")
7498 (string-append "'" file "/lib/libmagic.so'")))
7500 (inputs `(("file" ,file)))
7501 (self-native-input? #f)
7502 (synopsis "Python bindings to the libmagic file type guesser. Note that
7503 this module and the python-magic module both provide a \"magic.py\" file;
7504 these two modules, which are different and were developed separately, both
7505 serve the same purpose: provide Python bindings for libmagic.")))
7507 (define-public python2-file
7508 (package-with-python2 python-file))
7510 (define-public python-debian
7512 (name "python-debian")
7517 (uri (pypi-uri name version))
7520 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7521 (build-system python-build-system)
7523 `(("python-six" ,python-six)))
7524 (home-page "http://packages.debian.org/sid/python-debian")
7525 (synopsis "Debian package related modules")
7527 ;; XXX: Use @enumerate instead of @itemize to work around
7528 ;; <http://bugs.gnu.org/21772>.
7529 "This package provides Python modules that abstract many formats of
7530 Debian-related files, such as:
7533 @item Debtags information;
7534 @item @file{debian/changelog} files;
7535 @item packages files, pdiffs;
7536 @item control files of single or multiple RFC822-style paragraphs---e.g.
7537 @file{debian/control}, @file{.changes}, @file{.dsc};
7538 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7539 contained files and meta-information.
7542 ;; Modules are either GPLv2+ or GPLv3+.
7543 (license license:gpl3+)))
7545 (define-public python2-debian
7546 (package-with-python2 python-debian))
7548 (define-public python-nbformat
7550 (name "python-nbformat")
7555 (uri (pypi-uri "nbformat" version))
7558 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7559 (build-system python-build-system)
7560 (arguments `(#:tests? #f)) ; no test target
7562 `(("python-ipython-genutils" ,python-ipython-genutils)
7563 ("python-jsonschema" ,python-jsonschema)
7564 ("python-jupyter-core" ,python-jupyter-core)
7565 ("python-traitlets" ,python-traitlets)))
7566 (home-page "http://jupyter.org")
7567 (synopsis "Jupyter Notebook format")
7568 (description "This package provides the reference implementation of the
7569 Jupyter Notebook format and Python APIs for working with notebooks.")
7570 (license license:bsd-3)))
7572 (define-public python2-nbformat
7573 (package-with-python2 python-nbformat))
7575 (define-public python-bleach
7577 (name "python-bleach")
7582 (uri (pypi-uri "bleach" version))
7585 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7586 (build-system python-build-system)
7588 `(("python-html5lib" ,python-html5lib-0.9)
7589 ("python-six" ,python-six)))
7591 `(("python-nose" ,python-nose)))
7592 (home-page "http://github.com/jsocol/bleach")
7593 (synopsis "Whitelist-based HTML-sanitizing tool")
7594 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7595 (license license:asl2.0)))
7597 (define-public python2-bleach
7598 (package-with-python2 python-bleach))
7600 (define-public python-entrypoints
7602 (name "python-entrypoints")
7607 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7609 (file-name (string-append name "-" version ".tar.gz"))
7612 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7613 (build-system python-build-system)
7614 ;; The package does not come with a setup.py file, so we have to generate
7619 (modify-phases %standard-phases
7620 (add-after 'unpack 'create-setup.py
7622 (call-with-output-file "setup.py"
7625 from setuptools import setup
7626 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7628 (home-page "https://github.com/takluyver/entrypoints")
7629 (synopsis "Discover and load entry points from installed Python packages")
7630 (description "Entry points are a way for Python packages to advertise
7631 objects with some common interface. The most common examples are
7632 @code{console_scripts} entry points, which define shell commands by
7633 identifying a Python function to run. The @code{entrypoints} module contains
7634 functions to find and load entry points.")
7635 (license license:expat)))
7637 (define-public python2-entrypoints
7638 (package-with-python2 python-entrypoints))
7640 (define-public python-nbconvert
7642 (name "python-nbconvert")
7647 (uri (pypi-uri "nbconvert" version))
7650 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7651 (build-system python-build-system)
7653 `(;; The "bdist_egg" target is disabled by default, causing the installation
7655 #:configure-flags (list "bdist_egg")
7656 ;; FIXME: 5 failures, 40 errors.
7659 ;; (modify-phases %standard-phases
7662 ;; (zero? (system* "py.test" "-v")))))
7664 `(("python-pytest" ,python-pytest)))
7666 `(("python-bleach" ,python-bleach)
7667 ("python-entrypoints" ,python-entrypoints)
7668 ("python-jinja2" ,python-jinja2)
7669 ("python-jupyter-core" ,python-jupyter-core)
7670 ("python-mistune" ,python-mistune)
7671 ("python-nbformat" ,python-nbformat)
7672 ("python-pygments" ,python-pygments)
7673 ("python-traitlets" ,python-traitlets)))
7674 (home-page "http://jupyter.org")
7675 (synopsis "Converting Jupyter Notebooks")
7676 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7677 notebooks to various other formats via Jinja templates. It allows you to
7678 convert an @code{.ipynb} notebook file into various static formats including:
7686 @item ReStructured Text (rst)
7687 @item executable script
7689 (license license:bsd-3)))
7691 (define-public python2-nbconvert
7692 (package-with-python2 python-nbconvert))
7694 (define-public python-notebook
7696 (name "python-notebook")
7700 (uri (pypi-uri "notebook" version))
7703 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7704 (build-system python-build-system)
7707 (modify-phases %standard-phases
7710 ;; HOME must be set for tests
7711 (setenv "HOME" "/tmp")
7712 (zero? (system* "nosetests")))))))
7714 `(("python-jupyter-core" ,python-jupyter-core)
7715 ("python-nbformat" ,python-nbformat)
7716 ("python-nbconvert" ,python-nbconvert)
7717 ("python-ipython" ,python-ipython)))
7719 `(("python-nose" ,python-nose)
7720 ("python-sphinx" ,python-sphinx)
7721 ("python-requests" ,python-requests)))
7722 (home-page "http://jupyter.org/")
7723 (synopsis "Web-based notebook environment for interactive computing")
7725 "The Jupyter HTML notebook is a web-based notebook environment for
7726 interactive computing.")
7727 (properties `((python2-variant . ,(delay python2-notebook))))
7728 (license license:bsd-3)))
7730 (define-public python2-notebook
7731 (let ((base (package-with-python2
7732 (strip-python2-variant python-notebook))))
7733 (package (inherit base)
7735 `(("python2-mock" ,python2-mock)
7736 ,@(package-native-inputs base)))
7738 (substitute-keyword-arguments (package-arguments base)
7740 `(modify-phases ,phases
7741 (add-before 'check 'disable-test-case
7742 ;; The test requires network access to localhost. Curiously it
7743 ;; fails with Python 2 only. Simply make the test-case return
7747 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7748 (("formats = self.nbconvert_api") "return #")))))))))))
7750 (define-public python-widgetsnbextension
7752 (name "python-widgetsnbextension")
7757 (uri (pypi-uri "widgetsnbextension" version))
7760 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7761 (build-system python-build-system)
7763 `(("python-notebook" ,python-notebook)))
7765 `(("python-certifi" ,python-certifi)
7766 ("python-nose" ,python-nose)))
7767 (home-page "http://ipython.org")
7768 (synopsis "IPython HTML widgets for Jupyter")
7769 (description "This package provides interactive HTML widgets for Jupyter
7771 (license license:bsd-3)))
7773 (define-public python2-widgetsnbextension
7774 (package-with-python2 python-widgetsnbextension))
7776 (define-public python-ipywidgets
7778 (name "python-ipywidgets")
7783 (uri (pypi-uri "ipywidgets" version))
7786 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7787 (build-system python-build-system)
7788 ;; FIXME: it's not clear how to run the tests.
7789 (arguments `(#:tests? #f))
7791 `(("python-ipykernel" ,python-ipykernel)
7792 ("python-ipython" ,python-ipython)
7793 ("python-traitlets" ,python-traitlets)
7794 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7795 (home-page "http://ipython.org")
7796 (synopsis "IPython HTML widgets for Jupyter")
7797 (description "Ipywidgets are interactive HTML widgets for Jupyter
7798 notebooks and the IPython kernel. Notebooks come alive when interactive
7799 widgets are used. Users gain control of their data and can visualize changes
7801 (license license:bsd-3)))
7803 (define-public python2-ipywidgets
7804 (package-with-python2 python-ipywidgets))
7806 (define-public python-jupyter-console
7808 (name "python-jupyter-console")
7813 (uri (pypi-uri "jupyter_console" version))
7816 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7817 (build-system python-build-system)
7818 ;; FIXME: it's not clear how to run the tests.
7819 (arguments `(#:tests? #f))
7821 `(("python-ipykernel" ,python-ipykernel)
7822 ("python-ipython" ,python-ipython)
7823 ("python-jupyter-client" ,python-jupyter-client)
7824 ("python-prompt-toolkit" ,python-prompt-toolkit)
7825 ("python-pygments" ,python-pygments)))
7826 (home-page "https://jupyter.org")
7827 (synopsis "Jupyter terminal console")
7828 (description "This package provides a terminal-based console frontend for
7829 Jupyter kernels. It also allows for console-based interaction with non-Python
7830 Jupyter kernels such as IJulia and IRKernel.")
7831 (license license:bsd-3)))
7833 (define-public python2-jupyter-console
7834 (package-with-python2 python-jupyter-console))
7836 (define-public jupyter
7843 (uri (pypi-uri "jupyter" version))
7846 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7847 (build-system python-build-system)
7848 ;; FIXME: it's not clear how to run the tests.
7849 (arguments `(#:tests? #f))
7851 `(("python-ipykernel" ,python-ipykernel)
7852 ("python-ipywidgets" ,python-ipywidgets)
7853 ("python-jupyter-console" ,python-jupyter-console)
7854 ("python-nbconvert" ,python-nbconvert)
7855 ("python-notebook" ,python-notebook)))
7856 (home-page "http://jupyter.org")
7857 (synopsis "Web application for interactive documents")
7859 "The Jupyter Notebook is a web application that allows you to create and
7860 share documents that contain live code, equations, visualizations and
7861 explanatory text. Uses include: data cleaning and transformation, numerical
7862 simulation, statistical modeling, machine learning and much more.")
7863 (license license:bsd-3)))
7865 (define-public python-chardet
7867 (name "python-chardet")
7873 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7878 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7879 (build-system python-build-system)
7880 (home-page "https://github.com/chardet/chardet")
7881 (synopsis "Universal encoding detector for Python 2 and 3")
7883 "This package provides @code{chardet}, a Python module that can
7884 automatically detect a wide range of file encodings.")
7885 (license license:lgpl2.1+)))
7887 (define-public python2-chardet
7888 (package-with-python2 python-chardet))
7890 (define-public python-docopt
7892 (name "python-docopt")
7897 ;; The release on PyPI does not include tests.
7899 "https://github.com/docopt/docopt/archive/"
7901 (file-name (string-append name "-" version ".tar.gz"))
7904 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7905 (build-system python-build-system)
7907 `(("python-pytest" ,python-pytest)))
7909 `(#:phases (alist-replace
7911 (lambda _ (zero? (system* "py.test")))
7913 (home-page "http://docopt.org")
7914 (synopsis "Command-line interface description language for Python")
7915 (description "This library allows the user to define a command-line
7916 interface from a program's help message rather than specifying it
7917 programatically with command-line parsers like @code{getopt} and
7919 (license license:expat)))
7921 (define-public python2-docopt
7922 (package-with-python2 python-docopt))
7924 (define-public python-zope-event
7926 (name "python-zope-event")
7931 (uri (string-append "https://pypi.python.org/packages/source/z"
7932 "/zope.event/zope.event-" version ".tar.gz"))
7935 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7936 (build-system python-build-system)
7937 (home-page "http://pypi.python.org/pypi/zope.event")
7938 (synopsis "Event publishing system for Python")
7939 (description "Zope.event provides an event publishing API, intended for
7940 use by applications which are unaware of any subscribers to their events. It
7941 is a simple event-dispatching system on which more sophisticated event
7942 dispatching systems can be built.")
7943 (license license:zpl2.1)))
7945 (define-public python2-zope-event
7946 (package-with-python2 python-zope-event))
7948 (define-public python-zope-interface
7950 (name "python-zope-interface")
7955 (uri (string-append "https://pypi.python.org/packages/source/z"
7956 "/zope.interface/zope.interface-" version ".tar.gz"))
7959 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7960 (build-system python-build-system)
7962 `(("python-zope-event" ,python-zope-event)))
7963 (home-page "https://github.com/zopefoundation/zope.interface")
7964 (synopsis "Python implementation of the \"design by contract\"
7966 (description "Zope.interface provides an implementation of \"object
7967 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7968 conforming to a given API or contract.")
7969 (license license:zpl2.1)))
7971 (define-public python2-zope-interface
7972 (package-with-python2 python-zope-interface))
7974 (define-public python-zope-exceptions
7976 (name "python-zope-exceptions")
7981 (uri (string-append "https://pypi.python.org/packages/source/z"
7982 "/zope.exceptions/zope.exceptions-"
7986 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7987 (build-system python-build-system)
7989 '(#:tests? #f)) ; circular dependency with zope.testrunner
7991 `(("python-zope-interface" ,python-zope-interface)))
7992 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7993 (synopsis "Zope exceptions")
7994 (description "Zope.exceptions provides general-purpose exception types
7995 that have uses outside of the Zope framework.")
7996 (license license:zpl2.1)))
7998 (define-public python2-zope-exceptions
7999 (package-with-python2 python-zope-exceptions))
8001 (define-public python-zope-testing
8003 (name "python-zope-testing")
8008 (uri (string-append "https://pypi.python.org/packages/source/z"
8009 "/zope.testing/zope.testing-" version ".tar.gz"))
8012 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8013 (modules '((guix build utils)))
8016 ;; Remove pre-compiled .pyc files backup files from source.
8017 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8019 (build-system python-build-system)
8021 `(("python-zope-exceptions" ,python-zope-exceptions)))
8023 `(("python-zope-interface" ,python-zope-interface)))
8024 (home-page "http://pypi.python.org/pypi/zope.testing")
8025 (synopsis "Zope testing helpers")
8026 (description "Zope.testing provides a number of testing utilities for HTML
8027 forms, HTTP servers, regular expressions, and more.")
8028 (license license:zpl2.1)))
8030 (define-public python2-zope-testing
8031 (package-with-python2 python-zope-testing))
8033 (define-public python-zope-testrunner
8035 (name "python-zope-testrunner")
8040 (uri (string-append "https://pypi.python.org/packages/source/z"
8041 "/zope.testrunner/zope.testrunner-"
8045 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8046 (build-system python-build-system)
8048 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8050 `(("python-six" ,python-six)
8051 ;("python-zope-interface" ,python-zope-interface)
8052 ("python-zope-exceptions" ,python-zope-exceptions)
8053 ("python-zope-testing" ,python-zope-testing)
8056 `(("python-zope-interface" ,python-zope-interface)))
8057 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8058 (synopsis "Zope testrunner script")
8059 (description "Zope.testrunner provides a script for running Python
8061 (license license:zpl2.1)))
8063 (define-public python2-zope-testrunner
8064 (let ((base (package-with-python2 python-zope-testrunner)))
8068 (append (package-native-inputs base)
8069 `(("python2-subunit" ,python2-subunit)
8070 ("python2-mimeparse" ,python2-mimeparse)))))))
8072 (define-public python-zope-i18nmessageid
8074 (name "python-zope-i18nmessageid")
8080 "https://pypi.python.org/packages/source/z"
8081 "/zope.i18nmessageid/zope.i18nmessageid-"
8085 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8086 (build-system python-build-system)
8087 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8088 (synopsis "Message identifiers for internationalization")
8089 (description "Zope.i18nmessageid provides facilities for declaring
8090 internationalized messages within program source text.")
8091 (license license:zpl2.1)))
8093 (define-public python2-zope-i18nmessageid
8094 (package-with-python2 python-zope-i18nmessageid))
8096 (define-public python-zope-schema
8098 (name "python-zope-schema")
8103 (uri (string-append "https://pypi.python.org/packages/source/z"
8104 "/zope.schema/zope.schema-" version ".tar.gz"))
8107 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8108 (build-system python-build-system)
8110 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8112 `(("python-zope-event" ,python-zope-event)
8113 ("python-zope-exceptions", python-zope-exceptions)
8114 ("python-zope-interface" ,python-zope-interface)))
8116 `(("python-zope-testing" ,python-zope-testing)
8117 ("python-coverage" ,python-coverage)
8118 ("python-nose" ,python-nose)))
8119 (home-page "http://pypi.python.org/pypi/zope.schema")
8120 (synopsis "Zope data schemas")
8121 (description "Zope.scheme provides extensions to zope.interface for
8122 defining data schemas.")
8123 (license license:zpl2.1)))
8125 (define-public python2-zope-schema
8126 (package-with-python2 python-zope-schema))
8128 (define-public python-zope-configuration
8130 (name "python-zope-configuration")
8134 (uri (string-append "https://pypi.python.org/packages/source/z"
8135 "/zope.configuration/zope.configuration-"
8139 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8140 (build-system python-build-system)
8142 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8144 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8145 ("python-zope-schema" ,python-zope-schema)))
8146 (home-page "http://pypi.python.org/pypi/zope.configuration")
8147 (synopsis "Zope Configuration Markup Language")
8148 (description "Zope.configuration implements ZCML, the Zope Configuration
8150 (license license:zpl2.1)))
8152 (define-public python2-zope-configuration
8153 (package-with-python2 python-zope-configuration))
8155 (define-public python-zope-proxy
8157 (name "python-zope-proxy")
8162 (uri (string-append "https://pypi.python.org/packages/source/z"
8163 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8166 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8167 (build-system python-build-system)
8169 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8171 `(("python-zope-interface" ,python-zope-interface)))
8172 (home-page "http://pypi.python.org/pypi/zope.proxy")
8173 (synopsis "Generic, transparent proxies")
8174 (description "Zope.proxy provides generic, transparent proxies for Python.
8175 Proxies are special objects which serve as mostly-transparent wrappers around
8176 another object, intervening in the apparent behavior of the wrapped object
8177 only when necessary to apply the policy (e.g., access checking, location
8178 brokering, etc.) for which the proxy is responsible.")
8179 (license license:zpl2.1)))
8181 (define-public python2-zope-proxy
8182 (package-with-python2 python-zope-proxy))
8184 (define-public python-zope-location
8186 (name "python-zope-location")
8191 (uri (string-append "https://pypi.python.org/packages/source/z"
8192 "/zope.location/zope.location-" version ".tar.gz"))
8195 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8196 (build-system python-build-system)
8198 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8200 `(("python-zope-proxy" ,python-zope-proxy)
8201 ("python-zope-schema" ,python-zope-schema)))
8202 (home-page "http://pypi.python.org/pypi/zope.location/")
8203 (synopsis "Zope location library")
8204 (description "Zope.location implements the concept of \"locations\" in
8205 Zope3, which are are special objects that have a structural location.")
8206 (license license:zpl2.1)))
8208 (define-public python2-zope-location
8209 (package-with-python2 python-zope-location))
8211 (define-public python-zope-security
8213 (name "python-zope-security")
8218 (uri (string-append "https://pypi.python.org/packages/source/z"
8219 "/zope.security/zope.security-" version ".tar.gz"))
8222 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8223 (build-system python-build-system)
8225 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8227 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8228 ("python-zope-proxy" ,python-zope-proxy)
8229 ("python-zope-schema" ,python-zope-schema)))
8231 `(("python-six" ,python-six)
8232 ("python-zope-component" ,python-zope-component)
8233 ("python-zope-configuration" ,python-zope-configuration)
8234 ("python-zope-location" ,python-zope-location)
8235 ("python-zope-testrunner" ,python-zope-testrunner)
8236 ("python-zope-testing" ,python-zope-testing)))
8237 (home-page "http://pypi.python.org/pypi/zope.security")
8238 (synopsis "Zope security framework")
8239 (description "Zope.security provides a generic mechanism to implement
8240 security policies on Python objects.")
8241 (license license:zpl2.1)))
8243 (define-public python2-zope-security
8244 (let ((zope-security (package-with-python2 python-zope-security)))
8245 (package (inherit zope-security)
8247 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8249 "python-zope-testrunner"
8250 (package-propagated-inputs zope-security)))))))
8252 (define-public python-zope-component
8254 (name "python-zope-component")
8259 (uri (string-append "https://pypi.python.org/packages/source/z"
8260 "/zope.component/zope.component-" version ".tar.gz"))
8263 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8264 (build-system python-build-system)
8266 ;; Skip tests due to circular dependency with python-zope-security.
8269 `(("python-zope-testing" ,python-zope-testing)))
8271 `(("python-zope-event" ,python-zope-event)
8272 ("python-zope-interface" ,python-zope-interface)
8273 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8274 ("python-zope-configuration" ,python-zope-configuration)))
8275 (home-page "https://github.com/zopefoundation/zope.component")
8276 (synopsis "Zope Component Architecture")
8277 (description "Zope.component represents the core of the Zope Component
8278 Architecture. Together with the zope.interface package, it provides
8279 facilities for defining, registering and looking up components.")
8280 (license license:zpl2.1)))
8282 (define-public python2-zope-component
8283 (package-with-python2 python-zope-component))
8285 (define-public python-pythondialog
8287 (name "python-pythondialog")
8292 (uri (pypi-uri "pythondialog" version))
8295 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8296 (build-system python-build-system)
8299 (modify-phases %standard-phases
8300 (add-after 'unpack 'patch-path
8301 (lambda* (#:key inputs #:allow-other-keys)
8302 (let* ((dialog (assoc-ref inputs "dialog")))
8303 ;; Since this library really wants to grovel the search path, we
8304 ;; must hardcode dialog's store path into it.
8305 (substitute* "dialog.py"
8306 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8307 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8309 #:tests? #f)) ; no test suite
8311 `(("dialog" ,dialog)))
8312 (home-page "http://pythondialog.sourceforge.net/")
8313 (synopsis "Python interface to the UNIX dialog utility")
8314 (description "A Python wrapper for the dialog utility. Its purpose is to
8315 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8316 This allows one to make simple text-mode user interfaces on Unix-like systems")
8317 (license license:lgpl2.1)
8318 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8320 (define-public python2-pythondialog
8321 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8324 (version (package-version python-pythondialog))
8327 (uri (pypi-uri "python2-pythondialog" version))
8330 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8332 (define-public python-pyrfc3339
8334 (name "python-pyrfc3339")
8339 (uri (pypi-uri "pyRFC3339" version))
8342 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8343 (build-system python-build-system)
8345 `(("python-pytz" ,python-pytz)))
8347 `(("python-nose" ,python-nose)))
8348 (home-page "https://github.com/kurtraschke/pyRFC3339")
8349 (synopsis "Python timestamp library")
8350 (description "Python library for generating and parsing RFC 3339-compliant
8352 (license license:expat)))
8354 (define-public python2-pyrfc3339
8355 (package-with-python2 python-pyrfc3339))
8357 (define-public python-werkzeug
8359 (name "python-werkzeug")
8364 (uri (pypi-uri "Werkzeug" version))
8367 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8368 (build-system python-build-system)
8370 `(("python-pytest" ,python-pytest)))
8371 (home-page "http://werkzeug.pocoo.org/")
8372 (synopsis "Utilities for WSGI applications")
8373 (description "One of the most advanced WSGI utility modules. It includes a
8374 powerful debugger, full-featured request and response objects, HTTP utilities to
8375 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8376 uploads, a powerful URL routing system and a bunch of community-contributed
8378 (license license:x11)))
8380 (define-public python2-werkzeug
8381 (package-with-python2 python-werkzeug))
8383 (define-public python-configobj
8385 (name "python-configobj")
8390 "https://pypi.python.org/packages/source/c/configobj/"
8391 "configobj-" version ".tar.gz"))
8394 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8395 ;; Patch setup.py so it looks for python-setuptools, which is
8396 ;; required to parse the keyword 'install_requires' in setup.py.
8397 (patches (search-patches "python-configobj-setuptools.patch"))))
8398 (build-system python-build-system)
8400 `(("python-six" ,python-six)))
8401 (synopsis "Config file reading, writing and validation")
8402 (description "ConfigObj is a simple but powerful config file reader and
8403 writer: an ini file round tripper. Its main feature is that it is very easy to
8404 use, with a straightforward programmer’s interface and a simple syntax for
8406 (home-page "https://github.com/DiffSK/configobj")
8407 (license license:bsd-3)))
8409 (define-public python2-configobj
8410 (package-with-python2 python-configobj))
8412 (define-public python-configargparse
8414 (name "python-configargparse")
8419 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8420 "ConfigArgParse-" version ".tar.gz"))
8423 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8424 (build-system python-build-system)
8426 ;; FIXME: Bug in test suite filed upstream:
8427 ;; https://github.com/bw2/ConfigArgParse/issues/32
8429 (synopsis "Replacement for argparse")
8430 (description "A drop-in replacement for argparse that allows options to also
8431 be set via config files and/or environment variables.")
8432 (home-page "https://github.com/bw2/ConfigArgParse")
8433 (license license:expat)))
8435 (define-public python2-configargparse
8436 (package-with-python2 python-configargparse))
8438 (define-public python-ndg-httpsclient
8440 (name "python-ndg-httpsclient")
8444 (uri (pypi-uri "ndg_httpsclient" version))
8447 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8448 (build-system python-build-system)
8450 '(;; The tests appear to require networking.
8453 `(("python-pyopenssl" ,python-pyopenssl)))
8454 (synopsis "HTTPS support for Python's httplib and urllib2")
8455 (description "This is a HTTPS client implementation for httplib and urllib2
8456 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8457 over the default provided with Python and importantly enables full verification
8459 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8460 (license license:bsd-3)))
8462 ;; python2-openssl requires special care, so package-with-python2 is
8464 (define-public python2-ndg-httpsclient
8465 (package (inherit python-ndg-httpsclient)
8466 (name "python2-ndg-httpsclient")
8467 (arguments `(#:python ,python-2))
8469 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8471 (define-public python-contextlib2
8473 (name "python-contextlib2")
8478 (uri (pypi-uri "contextlib2" version))
8481 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8482 (build-system python-build-system)
8485 (modify-phases %standard-phases
8489 "python" "test_contextlib2.py" "-v")))))))
8490 (home-page "http://contextlib2.readthedocs.org/")
8491 (synopsis "Tools for decorators and context managers")
8492 (description "This module is primarily a backport of the Python
8493 3.2 contextlib to earlier Python versions. Like contextlib, it
8494 provides utilities for common tasks involving decorators and context
8495 managers. It also contains additional features that are not part of
8496 the standard library.")
8497 (license license:psfl)))
8499 (define-public python2-contextlib2
8500 (package-with-python2 python-contextlib2))
8502 (define-public python-texttable
8504 (name "python-texttable")
8509 (uri (pypi-uri "texttable" version))
8512 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8513 (build-system python-build-system)
8514 (arguments '(#:tests? #f)) ; no tests
8515 (home-page "https://github.com/foutaise/texttable/")
8516 (synopsis "Python module for creating simple ASCII tables")
8517 (description "Texttable is a Python module for creating simple ASCII
8519 (license license:lgpl2.1+)))
8521 (define-public python2-texttable
8522 (package-with-python2 python-texttable))
8524 (define-public python-websocket-client
8526 (name "python-websocket-client")
8531 (uri (pypi-uri "websocket_client" version))
8534 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8535 (build-system python-build-system)
8537 `(("python-six" ,python-six)))
8538 (home-page "https://github.com/liris/websocket-client")
8539 (synopsis "WebSocket client for Python")
8540 (description "The Websocket-client module provides the low level APIs for
8541 WebSocket usage in Python programs.")
8542 (license license:lgpl2.1+)))
8544 (define-public python2-websocket-client
8545 (package-with-python2 python-websocket-client))
8547 (define-public python-atomicwrites
8549 (name "python-atomicwrites")
8553 (uri (pypi-uri "atomicwrites" version))
8556 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
8557 (build-system python-build-system)
8558 (synopsis "Atomic file writes in Python")
8559 (description "Library for atomic file writes using platform dependent tools
8560 for atomic file system operations.")
8561 (home-page "https://github.com/untitaker/python-atomicwrites")
8562 (license license:expat)))
8564 (define-public python2-atomicwrites
8565 (package-with-python2 python-atomicwrites))
8567 (define-public python-requests-toolbelt
8569 (name "python-requests-toolbelt")
8574 "https://pypi.python.org/packages/"
8575 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8576 "requests-toolbelt-" version ".tar.gz"))
8579 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8580 (build-system python-build-system)
8582 `(("python-betamax" ,python-betamax)
8583 ("python-mock" ,python-mock)
8584 ("python-pytest" ,python-pytest)))
8586 `(("python-requests" ,python-requests)))
8587 (synopsis "Extensions to python-requests")
8588 (description "This is a toolbelt of useful classes and functions to be used
8589 with python-requests.")
8590 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8591 (license license:asl2.0)))
8593 (define-public python-click-threading
8595 (name "python-click-threading")
8600 "https://pypi.python.org/packages/"
8601 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8602 "click-threading-" version ".tar.gz"))
8605 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8606 (build-system python-build-system)
8608 `(("python-click" ,python-click)))
8609 (synopsis "Utilities for multithreading in Click")
8610 (description "This package provides utilities for multithreading in Click
8612 (home-page "https://github.com/click-contrib/click-threading")
8613 (license license:expat)))
8615 (define-public python-click-log
8617 (name "python-click-log")
8621 (uri (pypi-uri "click-log" version))
8624 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8625 (build-system python-build-system)
8627 `(("python-click" ,python-click)))
8628 (synopsis "Logging for click applications")
8629 (description "This package provides a Python library for logging Click
8631 (home-page "https://github.com/click-contrib/click-log")
8632 (license license:expat)))
8634 (define-public python-apipkg
8636 (name "python-apipkg")
8640 (uri (pypi-uri "apipkg" version))
8643 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8644 (build-system python-build-system)
8646 `(("python-pytest" ,python-pytest)))
8647 (synopsis "Namespace control and lazy-import mechanism")
8648 (description "With apipkg you can control the exported namespace of a Python
8649 package and greatly reduce the number of imports for your users. It is a small
8650 pure Python module that works on virtually all Python versions.")
8651 (home-page "https://bitbucket.org/hpk42/apipkg")
8652 (license license:expat)))
8654 (define-public python2-apipkg
8655 (package-with-python2 python-apipkg))
8657 (define-public python-execnet
8659 (name "python-execnet")
8663 (uri (pypi-uri "execnet" version))
8666 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8667 (build-system python-build-system)
8669 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8670 ;; The two test failures are caused by the lack of an `ssh` executable.
8671 ;; The test suite can be run with pytest after the 'install' phase.
8674 `(("python-pytest" ,python-pytest)
8675 ("python-setuptools-scm" ,python-setuptools-scm)))
8677 `(("python-apipkg" ,python-apipkg)))
8678 (synopsis "Rapid multi-Python deployment")
8679 (description "Execnet provides a share-nothing model with
8680 channel-send/receive communication for distributing execution across many
8681 Python interpreters across version, platform and network barriers. It has a
8682 minimal and fast API targetting the following uses:
8684 @item distribute tasks to (many) local or remote CPUs
8685 @item write and deploy hybrid multi-process applications
8686 @item write scripts to administer multiple environments
8688 (home-page "http://codespeak.net/execnet/")
8689 (license license:expat)))
8691 (define-public python2-execnet
8692 (package-with-python2 python-execnet))
8694 (define-public python-trollius-redis
8696 (name "python-trollius-redis")
8701 (uri (pypi-uri "trollius_redis" version))
8704 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8705 (build-system python-build-system)
8706 ;; TODO: Tests require packaging 'hiredis'.
8707 (arguments '(#:tests? #f))
8708 (home-page "https://github.com/benjolitz/trollius-redis")
8709 (synopsis "Port of asyncio-redis to trollius")
8710 (description "@code{trollius-redis} is a Redis client for Python
8711 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8713 (license license:bsd-2)))
8715 (define-public python2-trollius-redis
8716 (package-with-python2 python-trollius-redis))
8718 ;;; The software provided by this package was integrated into pytest 2.8.
8719 (define-public python-pytest-cache
8721 (name "python-pytest-cache")
8725 (uri (pypi-uri "pytest-cache" version))
8728 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8729 (build-system python-build-system)
8731 `(("python-apipkg" ,python-apipkg)
8732 ("python-execnet" ,python-execnet)
8733 ("python-py" ,python-py)
8734 ("python-pytest" ,python-pytest)))
8735 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8736 (description "The pytest-cache plugin provides tools to rerun failures from
8737 the last py.test invocation.")
8738 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8739 (license license:expat)))
8741 (define-public python2-pytest-cache
8742 (package-with-python2 python-pytest-cache))
8744 (define-public python-pytest-localserver
8746 (name "python-pytest-localserver")
8750 (uri (pypi-uri "pytest-localserver" version))
8753 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8754 (build-system python-build-system)
8756 `(#:phases (modify-phases %standard-phases
8759 (zero? (system* "py.test" "--genscript=runtests.py"))
8760 (zero? (system* "py.test")))))))
8762 `(("python-pytest" ,python-pytest)
8763 ("python-requests" ,python-requests)
8764 ("python-six" ,python-six)))
8766 `(("python-werkzeug" ,python-werkzeug)))
8767 (synopsis "Py.test plugin to test server connections locally")
8768 (description "Pytest-localserver is a plugin for the pytest testing
8769 framework which enables you to test server connections locally.")
8770 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8771 (license license:expat)))
8773 (define-public python-wsgi-intercept
8775 (name "python-wsgi-intercept")
8780 "https://pypi.python.org/packages/"
8781 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8782 "wsgi_intercept-" version ".tar.gz"))
8785 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8786 (build-system python-build-system)
8788 `(("python-six" ,python-six)))
8790 `(("python-pytest" ,python-pytest)
8791 ("python-httplib2" ,python-httplib2)
8792 ("python-requests" ,python-requests)
8793 ("python-urllib3" ,python-urllib3)))
8794 (synopsis "Puts a WSGI application in place of a real URI for testing")
8795 (description "Wsgi_intercept installs a WSGI application in place of a real
8796 URI for testing. Testing a WSGI application normally involves starting a
8797 server at a local host and port, then pointing your test code to that address.
8798 Instead, this library lets you intercept calls to any specific host/port
8799 combination and redirect them into a WSGI application importable by your test
8800 program. Thus, you can avoid spawning multiple processes or threads to test
8802 (home-page "https://github.com/cdent/wsgi-intercept")
8803 (license license:expat)))
8805 (define-public python-pytest-xprocess
8807 (name "python-pytest-xprocess")
8811 (uri (pypi-uri "pytest-xprocess" version))
8814 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8815 (build-system python-build-system)
8817 `(("python-pytest" ,python-pytest)
8818 ("python-pytest-cache" ,python-pytest-cache)
8819 ("python-psutil" ,python-psutil)))
8820 (synopsis "Pytest plugin to manage external processes across test runs")
8821 (description "Pytest-xprocess is an experimental py.test plugin for managing
8822 processes across test runs.")
8823 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8824 (license license:expat)))
8826 (define-public python-icalendar
8828 (name "python-icalendar")
8832 (uri (pypi-uri "icalendar" version))
8835 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
8836 (build-system python-build-system)
8838 `(("python-dateutil" ,python-dateutil)
8839 ("python-pytz" ,python-pytz)))
8840 (synopsis "Python library for parsing iCalendar files")
8841 (description "The icalendar package is a parser/generator of iCalendar
8842 files for use with Python.")
8843 (home-page "https://github.com/collective/icalendar")
8844 (license license:bsd-2)))
8846 (define-public python-sphinxcontrib-newsfeed
8848 (name "python-sphinxcontrib-newsfeed")
8852 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8855 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8856 (arguments '(#:tests? #f)) ; No tests.
8857 (build-system python-build-system)
8859 `(("python-sphinx" ,python-sphinx)))
8860 (synopsis "News Feed extension for Sphinx")
8861 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8862 Blog, News or Announcements section to a Sphinx website.")
8863 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8864 (license license:bsd-2)))
8866 (define-public python-args
8868 (name "python-args")
8872 (uri (pypi-uri "args" version))
8875 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8876 (build-system python-build-system)
8877 (home-page "https://github.com/kennethreitz/args")
8878 (synopsis "Command-line argument parser")
8880 "This library provides a Python module to parse command-line arguments.")
8881 (license license:bsd-3)))
8883 (define-public python2-args
8884 (package-with-python2 python-args))
8886 (define-public python-clint
8888 (name "python-clint")
8892 (uri (pypi-uri "clint" version))
8895 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8896 (build-system python-build-system)
8899 (modify-phases %standard-phases
8902 (zero? (system* "py.test" "-v")))))))
8904 `(("python-pytest" ,python-pytest)))
8906 `(("python-args" ,python-args)))
8907 (home-page "https://github.com/kennethreitz/clint")
8908 (synopsis "Command-line interface tools")
8910 "Clint is a Python module filled with a set of tools for developing
8911 command-line applications, including tools for colored and indented
8912 output, progress bar display, and pipes.")
8913 (license license:isc)))
8915 (define-public python2-clint
8916 (package-with-python2 python-clint))
8918 (define-public python-astor
8920 (name "python-astor")
8924 (uri (pypi-uri "astor" version))
8927 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8928 (build-system python-build-system)
8929 (home-page "https://github.com/berkerpeksag/astor")
8930 (synopsis "Read and write Python ASTs")
8932 "Astor is designed to allow easy manipulation of Python source via the
8933 Abstract Syntax Tree.")
8934 (license license:bsd-3)))
8936 (define-public python2-astor
8937 (package-with-python2 python-astor))
8939 (define-public python-rply
8941 (name "python-rply")
8945 (uri (pypi-uri "rply" version))
8948 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8949 (build-system python-build-system)
8951 `(("python-appdirs" ,python-appdirs)))
8952 (home-page "https://github.com/alex/rply")
8953 (synopsis "Parser generator for Python")
8955 "This package provides a pure Python based parser generator, that also
8956 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8957 with a new public API, and RPython support.")
8958 (license license:bsd-3)))
8960 (define-public python2-rply
8961 (package-with-python2 python-rply))
8963 (define-public python-hy
8969 (uri (pypi-uri "hy" version))
8972 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8973 (build-system python-build-system)
8976 (modify-phases %standard-phases
8979 ;; Tests require write access to HOME.
8980 (setenv "HOME" "/tmp")
8981 (zero? (system* "nosetests")))))))
8983 `(("python-coverage" ,python-coverage)
8984 ("python-nose" ,python-nose)))
8986 `(("python-astor" ,python-astor)
8987 ("python-clint" ,python-clint)
8988 ("python-rply" ,python-rply)))
8989 (home-page "http://hylang.org/")
8990 (synopsis "Lisp frontend to Python")
8992 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8993 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8994 Python at your fingertips, in Lisp form.")
8995 (license license:expat)))
8997 (define-public python2-hy
8998 (package-with-python2 python-hy))
9000 (define-public python-rauth
9002 (name "python-rauth")
9007 (uri (pypi-uri "rauth" version))
9010 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
9011 (build-system python-build-system)
9013 `(#:test-target "check"))
9015 `(("python-requests" ,python-requests)))
9016 (home-page "https://github.com/litl/rauth")
9017 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9019 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9020 provides service wrappers for convenient connection initialization and
9021 authenticated session objects providing things like keep-alive.")
9022 (license license:expat)
9023 (properties `((python2-variant . ,(delay python2-rauth))))))
9025 (define-public python2-rauth
9026 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9029 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9030 ,@(package-native-inputs base))))))
9032 (define-public python2-functools32
9034 (name "python2-functools32")
9039 (uri (pypi-uri "functools32" version))
9042 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9043 (build-system python-build-system)
9045 `(#:python ,python-2
9046 #:tests? #f)) ; no test target
9047 (home-page "https://github.com/MiCHiLU/python-functools32")
9049 "Backport of the functools module from Python 3.2.3")
9051 "This package is a backport of the @code{functools} module from Python
9052 3.2.3 for use with older versions of Python and PyPy.")
9053 (license license:expat)))
9055 (define-public python2-subprocess32
9057 (name "python2-subprocess32")
9061 (uri (pypi-uri "subprocess32" version))
9064 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9066 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9067 (build-system python-build-system)
9069 `(#:python ,python-2
9071 (modify-phases %standard-phases
9072 (add-after 'unpack 'patch-/bin/sh
9074 (substitute* '("subprocess32.py"
9075 "test_subprocess32.py")
9076 (("/bin/sh") (which "sh")))
9079 (add-after 'install 'check
9080 (lambda* (#:key inputs outputs #:allow-other-keys)
9081 ;; For some reason this package fails to import
9082 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9083 ;; directory. Running tests after install is easier.
9084 (add-installed-pythonpath inputs outputs)
9085 (zero? (system* "python" "test_subprocess32.py")))))))
9086 (home-page "https://github.com/google/python-subprocess32")
9087 (synopsis "Backport of the subprocess module from Python 3.2")
9089 "This is a backport of the @code{subprocess} standard library module
9090 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9091 new features. On POSIX systems it is guaranteed to be reliable when used
9092 in threaded applications. It includes timeout support from Python 3.3 but
9093 otherwise matches 3.2’s API.")
9094 (license license:psfl)))
9096 (define-public python2-futures
9098 (name "python2-futures")
9103 (uri (pypi-uri "futures" version))
9106 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
9107 (build-system python-build-system)
9108 (arguments `(#:python ,python-2))
9109 (home-page "https://github.com/agronholm/pythonfutures")
9111 "Backport of the concurrent.futures package from Python 3.2")
9113 "The concurrent.futures module provides a high-level interface for
9114 asynchronously executing callables. This package backports the
9115 concurrent.futures package from Python 3.2")
9116 (license license:bsd-3)))
9118 (define-public python-promise
9120 (name "python-promise")
9125 (uri (pypi-uri "promise" version))
9128 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9129 (build-system python-build-system)
9130 ;; Tests wants python-futures, which is a python2 only program, and
9131 ;; can't be found by python-promise at test time.
9132 (arguments `(#:tests? #f))
9133 (home-page "https://github.com/syrusakbary/promise")
9134 (synopsis "Promises/A+ implementation for Python")
9136 "Promises/A+ implementation for Python")
9137 (properties `((python2-variant . ,(delay python2-promise))))
9138 (license license:expat)))
9140 (define-public python2-promise
9141 (let ((promise (package-with-python2
9142 (strip-python2-variant python-promise))))
9143 (package (inherit promise)
9144 (arguments (substitute-keyword-arguments (package-arguments promise)
9147 `(("python2-futures" ,python2-futures)
9148 ("python2-pytest" ,python2-pytest)
9149 ,@(package-native-inputs promise))))))
9151 (define-public python-urllib3
9153 (name "python-urllib3")
9158 (uri (pypi-uri "urllib3" version))
9161 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9162 (build-system python-build-system)
9163 (arguments `(#:tests? #f))
9165 `(;; some packages for tests
9166 ("python-nose" ,python-nose)
9167 ("python-mock" ,python-mock)
9168 ("python-tornado" ,python-tornado)))
9170 `(;; extra packages for https security
9171 ("python-certifi" ,python-certifi)
9172 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9173 ("python-pyasn1" ,python-pyasn1)
9174 ("python-pyopenssl" ,python-pyopenssl)))
9175 (home-page "https://urllib3.readthedocs.org/")
9176 (synopsis "HTTP library with thread-safe connection pooling")
9178 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9179 can reuse the same socket connection for multiple requests, it can POST files,
9180 supports url redirection and retries, and also gzip and deflate decoding.")
9181 (license license:expat)))
9183 (define-public python2-urllib3
9184 (package-with-python2 python-urllib3))
9186 (define-public python-colorama
9188 (name "python-colorama")
9193 (uri (pypi-uri "colorama" version))
9196 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9197 (build-system python-build-system)
9198 (synopsis "Colored terminal text rendering for Python")
9199 (description "Colorama is a Python library for rendering colored terminal
9201 (home-page "https://pypi.python.org/pypi/colorama")
9202 (license license:bsd-3)))
9204 (define-public python2-colorama
9205 (package-with-python2 python-colorama))
9207 (define-public python-rsa
9214 (uri (pypi-uri "rsa" version))
9217 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9218 (build-system python-build-system)
9220 `(("python-pyasn1" ,python-pyasn1)))
9221 (synopsis "Pure-Python RSA implementation")
9222 (description "Python-RSA is a pure-Python RSA implementation. It supports
9223 encryption and decryption, signing and verifying signatures, and key
9224 generation according to PKCS#1 version 1.5. It can be used as a Python
9225 library as well as on the command line.")
9226 (home-page "http://stuvel.eu/rsa")
9227 (license license:asl2.0)))
9229 (define-public python2-rsa
9230 (package-with-python2 python-rsa))
9232 (define-public python-pluggy
9234 (name "python-pluggy")
9239 (uri (pypi-uri "pluggy" version))
9242 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9243 (build-system python-build-system)
9244 (synopsis "Plugin and hook calling mechanism for Python")
9245 (description "Pluggy is an extraction of the plugin manager as used by
9246 Pytest but stripped of Pytest specific details.")
9247 (home-page "https://pypi.python.org/pypi/pluggy")
9248 (license license:expat)))
9250 (define-public python2-pluggy
9251 (package-with-python2 python-pluggy))
9253 (define-public python-tox
9260 (uri (pypi-uri "tox" version))
9263 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9264 (build-system python-build-system)
9266 ;; FIXME: Tests require pytest-timeout, which itself requires
9267 ;; pytest>=2.8.0 for installation.
9270 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9271 ("python-py" ,python-py)
9272 ("python-virtualenv" ,python-virtualenv)))
9274 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9275 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9276 (home-page "http://tox.testrun.org/")
9277 (synopsis "Virtualenv-based automation of test activities")
9278 (description "Tox is a generic virtualenv management and test command line
9279 tool. It can be used to check that a package installs correctly with
9280 different Python versions and interpreters, or run tests in each type of
9281 supported environment, or act as a frontend to continuous integration
9283 (license license:expat)))
9285 (define-public python2-tox
9286 (package-with-python2 python-tox))
9288 (define-public python-jmespath
9290 (name "python-jmespath")
9295 (uri (pypi-uri "jmespath" version))
9298 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9299 (build-system python-build-system)
9301 `(("python-nose" ,python-nose)))
9302 (synopsis "JSON Matching Expressions")
9303 (description "JMESPath (pronounced “james path”) is a Python library that
9304 allows one to declaratively specify how to extract elements from a JSON
9306 (home-page "https://github.com/jmespath/jmespath.py")
9307 (license license:expat)))
9309 (define-public python2-jmespath
9310 (package-with-python2 python-jmespath))
9312 (define-public python-botocore
9314 (name "python-botocore")
9319 (uri (pypi-uri "botocore" version))
9322 "1hqvqwhgfcch4knm1l02ynx7qd1igxk3pj34c1x2b0r79jca524n"))))
9323 (build-system python-build-system)
9325 ;; FIXME: Many tests are failing.
9328 `(("python-dateutil" ,python-dateutil)
9329 ("python-docutils" ,python-docutils)
9330 ("python-jmespath" ,python-jmespath)))
9332 `(("python-mock" ,python-mock)
9333 ("python-nose" ,python-nose)
9335 ("python-tox" ,python-tox)
9336 ("python-wheel" ,python-wheel)))
9337 (home-page "https://github.com/boto/botocore")
9338 (synopsis "Low-level interface to AWS")
9339 (description "Botocore is a Python library that provides a low-level
9340 interface to the Amazon Web Services (AWS) API.")
9341 (license license:asl2.0)))
9343 (define-public python2-botocore
9344 (package-with-python2 python-botocore))
9346 (define-public awscli
9353 (uri (pypi-uri name version))
9356 "0p0pila0k99fm87q1gb24wyd34ags0vkh37h1fa6hklq4mi69i1w"))))
9357 (build-system python-build-system)
9359 `(("python-colorama" ,python-colorama)
9360 ("python-botocore" ,python-botocore)
9361 ("python-s3transfer" ,python-s3transfer)
9362 ("python-docutils" ,python-docutils)
9363 ("python-rsa" ,python-rsa)))
9365 ;; FIXME: The 'pypi' release does not contain tests.
9367 (home-page "https://aws.amazon.com/cli/")
9368 (synopsis "Command line client for AWS")
9369 (description "AWS CLI provides a unified command line interface to the
9370 Amazon Web Services (AWS) API.")
9371 (license license:asl2.0)))
9373 (define-public python-hypothesis
9375 (name "python-hypothesis")
9379 (uri (pypi-uri "hypothesis" version))
9382 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9383 (build-system python-build-system)
9385 `(("python-flake8" ,python-flake8)
9386 ("python-pytest" ,python-pytest)))
9387 (synopsis "Library for property based testing")
9388 (description "Hypothesis is a library for testing your Python code against a
9389 much larger range of examples than you would ever want to write by hand. It’s
9390 based on the Haskell library, Quickcheck, and is designed to integrate
9391 seamlessly into your existing Python unit testing work flow.")
9392 (home-page "https://github.com/DRMacIver/hypothesis")
9393 (license license:mpl2.0)
9394 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9396 (define-public python2-hypothesis
9397 (let ((hypothesis (package-with-python2
9398 (strip-python2-variant python-hypothesis))))
9399 (package (inherit hypothesis)
9401 `(("python2-enum34" ,python2-enum34)
9402 ,@(package-native-inputs hypothesis))))))
9404 (define-public python-pytest-subtesthack
9406 (name "python-pytest-subtesthack")
9410 (uri (pypi-uri "pytest-subtesthack" version))
9413 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9414 (build-system python-build-system)
9416 `(("python-pytest" ,python-pytest)))
9417 (synopsis "Set-up and tear-down fixtures for unit tests")
9418 (description "This plugin allows you to set up and tear down fixtures within
9419 unit test functions that use @code{py.test}. This is useful for using
9420 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9421 function multiple times, without setting up or tearing down fixture state as is
9422 normally the case.")
9423 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9424 (license license:unlicense)))
9426 (define-public python2-pytest-subtesthack
9427 (package-with-python2 python-pytest-subtesthack))
9429 (define-public python-xdo
9436 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9437 "python-xdo_" version ".orig.tar.gz"))
9440 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9441 (build-system python-build-system)
9444 (modify-phases %standard-phases
9445 (add-before 'install 'patch-libxdo-path
9446 ;; Hardcode the path of dynamically loaded libxdo library.
9447 (lambda* (#:key inputs #:allow-other-keys)
9448 (let ((libxdo (string-append
9449 (assoc-ref inputs "xdotool")
9451 (substitute* "xdo/_xdo.py"
9452 (("find_library\\(\"xdo\"\\)")
9453 (simple-format #f "\"~a\"" libxdo)))
9455 #:tests? #f)) ; no tests provided
9457 `(("python-six" ,python-six)))
9459 `(("xdotool" ,xdotool)
9460 ("libX11" ,libx11)))
9461 (home-page "https://tracker.debian.org/pkg/python-xdo")
9462 (synopsis "Python library for simulating X11 keyboard/mouse input")
9463 (description "Provides bindings to libxdo for manipulating X11 via simulated
9464 input. (Note that this is mostly a legacy library; you may wish to look at
9465 python-xdo for newer bindings.)")
9466 (license license:bsd-3)))
9468 (define-public python2-xdo
9469 (package-with-python2 python-xdo))
9471 (define-public python-wtforms
9473 (name "python-wtforms")
9478 (uri (pypi-uri "WTForms" version ".zip"))
9481 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9482 (build-system python-build-system)
9485 (modify-phases %standard-phases
9486 (add-after 'unpack 'remove-django-test
9487 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9491 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9492 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9495 `(("unzip" ,unzip)))
9496 (home-page "http://wtforms.simplecodes.com/")
9498 "Form validation and rendering library for Python web development")
9500 "WTForms is a flexible forms validation and rendering library
9501 for Python web development. It is very similar to the web form API
9502 available in Django, but is a standalone package.")
9503 (license license:bsd-3)))
9505 (define-public python2-wtforms
9506 (package-with-python2 python-wtforms))
9508 (define-public python-mako
9510 (name "python-mako")
9515 (uri (pypi-uri "Mako" version))
9518 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9519 (build-system python-build-system)
9521 `(("python-markupsafe" ,python-markupsafe)))
9523 `(("python-mock" ,python-mock)
9524 ("python-nose" ,python-nose)
9525 ("python-pytest" ,python-pytest)))
9526 (home-page "http://www.makotemplates.org/")
9527 (synopsis "Templating language for Python")
9528 (description "Mako is a templating language for Python that compiles
9529 templates into Python modules.")
9530 (license license:expat)))
9532 (define-public python2-mako
9533 (package-with-python2 python-mako))
9535 (define-public python-waitress
9537 (name "python-waitress")
9542 (uri (pypi-uri "waitress" version))
9545 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9546 (build-system python-build-system)
9547 (home-page "https://github.com/Pylons/waitress")
9548 (synopsis "Waitress WSGI server")
9549 (description "Waitress is meant to be a production-quality pure-Python WSGI
9550 server with very acceptable performance.")
9551 (license license:zpl2.1)))
9553 (define-public python2-waitress
9554 (package-with-python2 python-waitress))
9556 (define-public python-wsgiproxy2
9558 (name "python-wsgiproxy2")
9563 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9566 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9567 (build-system python-build-system)
9569 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9570 ;; support Python 3:
9571 ;; https://github.com/benoitc/restkit/issues/140
9575 ("python-nose" ,python-nose)
9576 ("python-coverage" ,python-coverage)))
9578 `(("python-six" ,python-six)
9579 ("python-webob" ,python-webob)))
9581 "https://github.com/gawel/WSGIProxy2/")
9582 (synopsis "WSGI Proxy with various http client backends")
9583 (description "WSGI turns HTTP requests into WSGI function calls.
9584 WSGIProxy turns WSGI function calls into HTTP requests.
9585 It also includes code to sign requests and pass private data,
9586 and to spawn subprocesses to handle requests.")
9587 (license license:expat)))
9589 (define-public python2-wsgiproxy2
9590 (package-with-python2 python-wsgiproxy2))
9592 (define-public python-pastedeploy
9594 (name "python-pastedeploy")
9599 (uri (pypi-uri "PasteDeploy" version))
9602 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9603 (build-system python-build-system)
9605 `(("python-nose" ,python-nose)))
9606 (home-page "http://pythonpaste.org/deploy/")
9608 "Load, configure, and compose WSGI applications and servers")
9610 "This tool provides code to load WSGI applications and servers from URIs;
9611 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9612 Script provides commands to serve applications based on this configuration
9614 (license license:expat)))
9616 (define-public python2-pastedeploy
9617 (package-with-python2 python-pastedeploy))
9619 (define-public python-paste
9621 (name "python-paste")
9626 (uri (pypi-uri "Paste" version))
9629 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9630 (patches (search-patches "python-paste-remove-website-test.patch"
9631 "python-paste-remove-timing-test.patch"))))
9632 (build-system python-build-system)
9634 `(("python-nose" ,python-nose)))
9636 `(("python-six" ,python-six)))
9637 (home-page "http://pythonpaste.org")
9639 "Python web development tools, focusing on WSGI")
9641 "Paste provides a variety of web development tools and middleware which
9642 can be nested together to build web applications. Paste's design closely
9643 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9644 (license license:expat)))
9646 (define-public python2-paste
9647 (package-with-python2 python-paste))
9649 (define-public python-pastescript
9651 (name "python-pastescript")
9656 (uri (pypi-uri "PasteScript" version))
9659 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9660 (build-system python-build-system)
9662 `(("python-nose" ,python-nose)))
9664 `(("python-paste" ,python-paste)
9665 ("python-pastedeploy" ,python-pastedeploy)))
9666 (home-page "http://pythonpaste.org/script/")
9668 '(;; Unfortunately, this requires the latest unittest2,
9669 ;; but that requires traceback2 which requires linecache2 which requires
9670 ;; unittest2. So we're skipping tests for now.
9671 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9672 ;; so in theory we could get around this situation somehow.)
9675 "Pluggable command line tool for serving web applications and more")
9677 "PasteScript is a plugin-friendly command line tool which provides a
9678 variety of features, from launching web applications to bootstrapping project
9680 (license license:expat)))
9682 (define-public python2-pastescript
9683 (package-with-python2 python-pastescript))
9685 (define-public python-pyquery
9687 (name "python-pyquery")
9692 (uri (pypi-uri "pyquery" version))
9695 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9696 (build-system python-build-system)
9698 `(("python-webob" ,python-webob)
9699 ("python-webtest" ,python-webtest)))
9701 `(("python-lxml" ,python-lxml)
9702 ("python-cssselect" ,python-cssselect)))
9703 (home-page "https://github.com/gawel/pyquery")
9704 (synopsis "Make jQuery-like queries on xml documents")
9705 (description "pyquery allows you to make jQuery queries on xml documents.
9706 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9707 fast xml and html manipulation.")
9708 (license license:bsd-3)))
9710 (define-public python2-pyquery
9711 (package-with-python2 python-pyquery))
9713 (define-public python-webtest
9715 (name "python-webtest")
9720 (uri (pypi-uri "WebTest" version))
9723 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9724 (build-system python-build-system)
9726 `(;; Unfortunately we have to disable tests!
9727 ;; This release of WebTest is pinned to python-nose < 1.3,
9728 ;; but older versions of python-nose are plagued with the following
9729 ;; bug(s), which rears its ugly head during test execution:
9730 ;; https://github.com/nose-devs/nose/issues/759
9731 ;; https://github.com/nose-devs/nose/pull/811
9733 ;; Commented out code is no good, but in this case, once tests
9734 ;; are ready to be enabled again, we should put the following
9737 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9738 ;; ; but see above comment
9739 ;; ("python-coverage" ,python-coverage)
9740 ;; ("python-mock" ,python-mock)
9741 ;; ("python-pastedeploy" ,python-pastedeploy)
9742 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9743 ;; ("python-pyquery" ,python-pyquery)))
9745 `(("python-waitress" ,python-waitress)
9746 ("python-webob" ,python-webob)
9747 ("python-six" ,python-six)
9748 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9749 (home-page "http://webtest.pythonpaste.org/")
9750 (synopsis "Helper to test WSGI applications")
9751 (description "Webtest allows you to test your Python web applications
9752 without starting an HTTP server. It supports anything that supports the
9754 (license license:expat)))
9756 (define-public python2-webtest
9757 (package-with-python2 python-webtest))
9759 (define-public python-anyjson
9761 (name "python-anyjson")
9766 (uri (pypi-uri "anyjson" version))
9769 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9770 (build-system python-build-system)
9772 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9773 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9774 ;; whatever) so this transformation needs to be done before the tests
9775 ;; can be run. Maybe we could add a build step to transform beforehand
9776 ;; but it could be annoying/difficult.
9777 ;; We can enable tests for the Python 2 version, though, and do below.
9779 (home-page "http://bitbucket.org/runeh/anyjson/")
9781 "Wraps best available JSON implementation in a common interface")
9783 "Anyjson loads whichever is the fastest JSON module installed
9784 and provides a uniform API regardless of which JSON implementation is used.")
9785 (license license:bsd-3)
9786 (properties `((python2-variant . ,(delay python2-anyjson))))))
9788 (define-public python2-anyjson
9789 (let ((anyjson (package-with-python2
9790 (strip-python2-variant python-anyjson))))
9793 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9795 ,@(package-arguments anyjson)))
9796 (native-inputs `(("python2-nose" ,python2-nose))))))
9798 (define-public python-amqp
9800 (name "python-amqp")
9805 (uri (pypi-uri "amqp" version))
9808 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9809 (build-system python-build-system)
9811 `(("python-nose" ,python-nose)
9812 ("python-mock" ,python-mock)))
9813 (home-page "http://github.com/celery/py-amqp")
9815 "Low-level AMQP client for Python (fork of amqplib)")
9817 "This is a fork of amqplib which was originally written by Barry Pederson.
9818 It is maintained by the Celery project, and used by kombu as a pure python
9819 alternative when librabbitmq is not available.")
9820 (license license:lgpl2.1+)
9821 (properties `((python2-variant . ,(delay python2-amqp))))))
9823 (define-public python2-amqp
9824 (let ((amqp (package-with-python2
9825 (strip-python2-variant python-amqp))))
9828 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9829 ;; unmaintained. Weirdly, does not do this on the python 3
9832 ,@(package-arguments amqp))))))
9834 (define-public python-kombu
9836 (name "python-kombu")
9841 (uri (pypi-uri "kombu" version))
9844 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9845 (build-system python-build-system)
9847 `(("python-mock" ,python-mock)
9848 ("python-nose" ,python-nose)))
9850 `(("python-anyjson" ,python-anyjson)
9851 ("python-amqp" ,python-amqp)
9852 ("python-redis" ,python-redis)))
9853 (home-page "http://kombu.readthedocs.org")
9854 (synopsis "Message passing library for Python")
9855 (description "The aim of Kombu is to make messaging in Python as easy as
9856 possible by providing an idiomatic high-level interface for the AMQ protocol,
9857 and also provide proven and tested solutions to common messaging problems.
9858 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9859 message orientation, queuing, routing, reliability and security, for which the
9860 RabbitMQ messaging server is the most popular implementation.")
9861 (license license:bsd-3)
9862 (properties `((python2-variant . ,(delay python2-kombu))))))
9864 (define-public python2-kombu
9865 (let ((kombu (package-with-python2
9866 (strip-python2-variant python-kombu))))
9869 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9870 ;; It works fine on the python3 variant.
9872 ,@(package-arguments kombu)))
9873 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9874 ,@(package-native-inputs kombu))))))
9876 (define-public python-billiard
9878 (name "python-billiard")
9879 (version "3.3.0.23")
9883 (uri (pypi-uri "billiard" version))
9886 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9887 (build-system python-build-system)
9889 `(("python-nose" ,python-nose)))
9890 (home-page "http://github.com/celery/billiard")
9892 "Python multiprocessing fork with improvements and bugfixes")
9894 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9895 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9896 pyprocessing package. This standalone variant is intended to be compatible with
9897 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9898 (license license:bsd-3)
9899 (properties `((python2-variant . ,(delay python2-billiard))))))
9901 (define-public python2-billiard
9902 (let ((billiard (package-with-python2
9903 (strip-python2-variant python-billiard))))
9906 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9907 ("python2-mock" ,python2-mock)
9908 ,@(package-native-inputs billiard))))))
9910 (define-public python-celery
9912 (name "python-celery")
9917 (uri (pypi-uri "celery" version))
9920 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9921 (build-system python-build-system)
9924 (modify-phases %standard-phases
9925 ;; These tests break with Python 3.5:
9926 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9930 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9932 `(("python-nose" ,python-nose)))
9934 `(("python-pytz" ,python-pytz)
9935 ("python-billiard" ,python-billiard)
9936 ("python-kombu" ,python-kombu)))
9937 (home-page "http://celeryproject.org")
9938 (synopsis "Distributed Task Queue")
9939 (description "Celery is an asynchronous task queue/job queue based on
9940 distributed message passing. It is focused on real-time operation, but
9941 supports scheduling as well. The execution units, called tasks, are executed
9942 concurrently on a single or more worker servers using multiprocessing,
9943 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9944 synchronously (wait until ready).")
9945 (license license:bsd-3)
9946 (properties `((python2-variant . ,(delay python2-celery))))))
9948 (define-public python2-celery
9949 (let ((celery (package-with-python2
9950 (strip-python2-variant python-celery))))
9953 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9954 ("python2-mock" ,python2-mock)
9955 ,@(package-native-inputs celery))))))
9957 (define-public python-translitcodec
9959 (name "python-translitcodec")
9964 (uri (pypi-uri "translitcodec" version))
9967 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9968 (build-system python-build-system)
9970 `(#:tests? #f)) ; no tests provided
9972 "https://github.com/claudep/translitcodec")
9974 "Unicode to 8-bit charset transliteration codec")
9976 "This package contains codecs for transliterating ISO 10646 texts into
9977 best-effort representations using smaller coded character sets (ASCII,
9979 (license license:expat)))
9981 (define-public python2-translitcodec
9982 (package-with-python2 python-translitcodec))
9984 (define-public python-editor
9986 (name "python-editor")
9991 (uri (pypi-uri "python-editor" version))
9994 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9995 (build-system python-build-system)
9997 "https://github.com/fmoo/python-editor")
9999 "Programmatically open an editor, capture the result")
10001 "python-editor is a library that provides the editor module for
10002 programmatically interfacing with your system's $EDITOR.")
10003 (license license:asl2.0)))
10005 (define-public python2-editor
10006 (package-with-python2 python-editor))
10008 (define-public python-sphinxcontrib-programoutput
10010 (name "python-sphinxcontrib-programoutput")
10014 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10017 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10018 (build-system python-build-system)
10020 ;; FIXME: Many tests are failing and the upstream is gone.
10023 `(("python-sphinx" ,python-sphinx)))
10024 (synopsis "Sphinx extension to include program output")
10025 (description "A Sphinx extension to literally insert the output of arbitrary
10026 commands into documents, helping you to keep your command examples up to date.")
10027 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10028 (license license:bsd-2)))
10030 (define-public python2-sphinxcontrib-programoutput
10031 (package-with-python2 python-sphinxcontrib-programoutput))
10033 (define-public python-sphinx-repoze-autointerface
10035 (name "python-sphinx-repoze-autointerface")
10039 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10042 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10043 (build-system python-build-system)
10044 (arguments '(#:tests? #f)) ; No tests.
10046 `(("python-sphinx" ,python-sphinx)
10047 ("python-zope-interface" ,python-zope-interface)))
10048 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10049 (description "This package defines an extension for the Sphinx documentation
10050 system. The extension allows generation of API documentation by
10051 introspection of @code{zope.interface} instances in code.")
10052 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10053 (license license:repoze)))
10055 (define-public python2-sphinx-repoze-autointerface
10056 (package-with-python2 python-sphinx-repoze-autointerface))
10058 (define-public python-psycopg2
10060 (name "python-psycopg2")
10065 (uri (pypi-uri "psycopg2" version))
10068 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
10069 (build-system python-build-system)
10071 ;; Tests would require a postgresql database "psycopg2_test"
10072 ;; and a running postgresql database management service.
10073 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10075 `(("postgresql" ,postgresql))) ; libpq
10076 (home-page "http://initd.org/psycopg/")
10077 (synopsis "Python PostgreSQL adapter")
10079 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10080 (license license:lgpl3+)))
10082 (define-public python2-psycopg2
10083 (package-with-python2 python-psycopg2))
10085 (define-public python-vobject
10087 (name "python-vobject")
10091 (uri (pypi-uri "vobject" version))
10094 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10095 (build-system python-build-system)
10097 '(;; The test suite relies on some non-portable Windows interfaces.
10100 `(("python-dateutil" ,python-dateutil)
10101 ("python-pyicu" ,python-pyicu)))
10102 (synopsis "Parse and generate vCard and vCalendar files")
10103 (description "Vobject is intended to be a full featured Python package for
10104 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10105 are supported and well tested. vCard 3.0 files are supported, and all data
10106 should be imported, but only a few components are understood in a sophisticated
10108 (home-page "http://eventable.github.io/vobject/")
10109 (license license:asl2.0)))
10111 (define-public python2-vobject
10112 (package-with-python2 python-vobject))
10114 (define-public python-munkres
10116 (name "python-munkres")
10120 (uri (pypi-uri "munkres" version))
10123 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10124 (build-system python-build-system)
10126 '(#:tests? #f)) ; no test suite
10127 (home-page "http://software.clapper.org/munkres/")
10128 (synopsis "Implementation of the Munkres algorithm")
10129 (description "The Munkres module provides an implementation of the Munkres
10130 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10131 useful for solving the Assignment Problem.")
10132 (license license:bsd-3)))
10134 (define-public python2-munkres
10135 (package-with-python2 python-munkres))
10137 (define-public python-flask
10139 (name "python-flask")
10143 (uri (pypi-uri "Flask" version))
10146 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10147 (build-system python-build-system)
10149 `(("python-itsdangerous" ,python-itsdangerous)
10150 ("python-jinja2" ,python-jinja2)
10151 ("python-click" ,python-click)
10152 ("python-werkzeug" ,python-werkzeug)))
10153 (home-page "https://github.com/mitsuhiko/flask/")
10154 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10155 (description "Flask is a micro web framework based on the Werkzeug toolkit
10156 and Jinja2 template engine. It is called a micro framework because it does not
10157 presume or force a developer to use a particular tool or library.")
10158 (license license:bsd-3)))
10160 (define-public python2-flask
10161 (package-with-python2 python-flask))
10163 (define-public python-flask-wtf
10165 (name "python-flask-wtf")
10170 (uri (pypi-uri "Flask-WTF" version))
10173 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10174 (build-system python-build-system)
10177 (modify-phases %standard-phases
10178 (add-before 'check 'drop-failing-test
10180 ;; FIXME: This file tries resolving an external server, which
10181 ;; fails. Try to patch out the offending section instead of
10182 ;; deleting the whole thing.
10183 (delete-file "tests/test_recaptcha.py")
10186 `(("python-flask-babel" ,python-flask-babel)
10187 ("python-babel" ,python-babel)
10188 ("python-wtforms" ,python-wtforms)))
10190 `(("python-nose" ,python-nose)))
10191 (home-page "https://github.com/lepture/flask-wtf")
10192 (synopsis "Simple integration of Flask and WTForms")
10193 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10194 upload, and reCAPTCHA.")
10195 (license license:bsd-3)))
10197 (define-public python2-flask-wtf
10198 (package-with-python2 python-flask-wtf))
10200 (define-public python-flask-multistatic
10202 (name "python-flask-multistatic")
10207 (uri (pypi-uri "flask-multistatic" version))
10210 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10211 (build-system python-build-system)
10213 `(("python-flask" ,python-flask)))
10214 (home-page "https://pagure.io/flask-multistatic")
10215 (synopsis "Flask plugin to allow overriding static files")
10216 (description "@code{flask-multistatic} is a flask plugin that adds support
10217 for overriding static files.")
10218 (license license:gpl3+)))
10220 (define-public python2-flask-multistatic
10221 (package-with-python2 python-flask-multistatic))
10223 (define-public python-cookies
10225 (name "python-cookies")
10229 (uri (pypi-uri "cookies" version))
10232 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10233 (build-system python-build-system)
10235 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10238 `(("python-pytest" ,python2-pytest)))
10239 (synopsis "HTTP cookie parser and renderer")
10240 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10242 (home-page "https://gitlab.com/sashahart/cookies")
10243 (license license:expat)))
10245 (define-public python2-cookies
10246 (package-with-python2 python-cookies))
10248 (define-public python-responses
10250 (name "python-responses")
10254 (uri (pypi-uri "responses" version))
10257 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10258 (build-system python-build-system)
10260 `(;; Test suite is not distributed:
10261 ;; https://github.com/getsentry/responses/issues/38
10264 `(("python-mock" ,python-mock)))
10266 `(("python-requests" ,python-requests)
10267 ("python-cookies" ,python-cookies)
10268 ("python-six" ,python-six)))
10269 (home-page "https://github.com/getsentry/responses")
10270 (synopsis "Utility for mocking out the `requests` Python library")
10271 (description "A utility library for mocking out the `requests` Python
10273 (license license:asl2.0)))
10275 (define-public python2-responses
10276 (package-with-python2 python-responses))
10278 (define-public python-whoosh
10280 (name "python-whoosh")
10285 (uri (pypi-uri "Whoosh" version))
10288 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10289 (build-system python-build-system)
10291 `(("python-pytest" ,python-pytest)))
10292 (home-page "http://bitbucket.org/mchaput/whoosh")
10293 (synopsis "Full text indexing, search, and spell checking library")
10295 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10296 checking library.")
10297 (license license:bsd-2)))
10299 (define-public python2-whoosh
10300 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10301 (package (inherit whoosh)
10303 `(("python2-backport-ssl-match-hostname"
10304 ,python2-backport-ssl-match-hostname)
10305 ,@(package-propagated-inputs whoosh))))))
10307 (define-public python-pathlib
10309 (name "python-pathlib")
10313 (uri (pypi-uri "pathlib" version))
10316 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10317 (build-system python-build-system)
10318 ;; The tests depend on the internal "test" module, which does not provide
10319 ;; a stable interface.
10320 (arguments `(#:tests? #f))
10321 (home-page "https://pathlib.readthedocs.org/")
10322 (synopsis "Object-oriented file system paths")
10323 (description "Pathlib offers a set of classes to handle file system paths.
10324 It offers the following advantages over using string objects:
10327 @item No more cumbersome use of os and os.path functions. Everything can
10328 be done easily through operators, attribute accesses, and method calls.
10329 @item Embodies the semantics of different path types. For example,
10330 comparing Windows paths ignores casing.
10331 @item Well-defined semantics, eliminating any inconsistencies or
10332 ambiguities (forward vs. backward slashes, etc.).
10335 Note: In Python 3.4, pathlib is now part of the standard library. For other
10336 Python versions please consider python-pathlib2 instead, which tracks the
10337 standard library module. This module (python-pathlib) isn't maintained
10339 (license license:expat)))
10341 (define-public python2-pathlib
10342 (package-with-python2 python-pathlib))
10344 (define-public python2-pathlib2
10346 (name "python2-pathlib2")
10350 (uri (pypi-uri "pathlib2" version))
10353 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10354 (build-system python-build-system)
10355 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10356 ;; version is 3.4 which already includes this package as part of the
10357 ;; standard library.
10359 `(#:python ,python-2))
10361 `(("python2-six" ,python2-six)))
10362 (home-page "http://pypi.python.org/pypi/pathlib2/")
10363 (synopsis "Object-oriented file system paths - backport of standard
10365 (description "The goal of pathlib2 is to provide a backport of standard
10366 pathlib module which tracks the standard library module, so all the newest
10367 features of the standard pathlib can be used also on older Python versions.
10369 Pathlib offers a set of classes to handle file system paths. It offers the
10370 following advantages over using string objects:
10373 @item No more cumbersome use of os and os.path functions. Everything can
10374 be done easily through operators, attribute accesses, and method calls.
10375 @item Embodies the semantics of different path types. For example,
10376 comparing Windows paths ignores casing.
10377 @item Well-defined semantics, eliminating any inconsistencies or
10378 ambiguities (forward vs. backward slashes, etc.).
10380 (license license:expat)))
10382 (define-public python-jellyfish
10384 (name "python-jellyfish")
10388 (uri (pypi-uri "jellyfish" version))
10391 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10392 (build-system python-build-system)
10394 `(("python-pytest" ,python-pytest)))
10395 (home-page "https://github.com/jamesturk/jellyfish")
10396 (synopsis "Approximate and phonetic matching of strings")
10397 (description "Jellyfish uses a variety of string comparison and phonetic
10398 encoding algorithms to do fuzzy string matching.")
10399 (license license:bsd-2)
10400 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10402 (define-public python2-jellyfish
10403 (let ((jellyfish (package-with-python2
10404 (strip-python2-variant python-jellyfish))))
10405 (package (inherit jellyfish)
10406 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10407 ,@(package-native-inputs jellyfish))))))
10409 (define-public python2-unicodecsv
10411 (name "python2-unicodecsv")
10415 ;; The test suite is not included in the PyPi release.
10416 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10417 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10418 "archive/" version ".tar.gz"))
10419 (file-name (string-append name "-" version ".tar.gz"))
10422 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10423 (build-system python-build-system)
10425 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10426 #:python ,python-2))
10428 `(("python2-unittest2" ,python2-unittest2)))
10429 (home-page "https://github.com/jdunck/python-unicodecsv")
10430 (synopsis "Unicode CSV module for Python 2")
10431 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10432 module, adding support for Unicode strings.")
10433 (license license:bsd-2)))
10435 (define-public python-rarfile
10437 (name "python-rarfile")
10441 (uri (pypi-uri "rarfile" version))
10444 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10445 (build-system python-build-system)
10448 (modify-phases %standard-phases
10450 ;; Many tests fail, but the installation proceeds.
10451 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10453 `(("which" ,which))) ; required for tests
10455 `(("libarchive" ,libarchive)))
10456 (home-page "https://github.com/markokr/rarfile")
10457 (synopsis "RAR archive reader for Python")
10458 (description "This is Python module for RAR archive reading. The interface
10459 is made as zipfile like as possible.")
10460 (license license:isc)))
10462 (define-public python2-rarfile
10463 (package-with-python2 python-rarfile))
10465 (define-public python-magic
10467 (name "python-magic")
10472 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10473 version ".tar.gz"))
10476 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10477 (file-name (string-append name "-" version "-checkout"))))
10478 (build-system python-build-system)
10480 ;; The tests are unreliable, so don't run them. The tests fail
10481 ;; under Python3 because they were written for Python2 and
10482 ;; contain import statements that do not work in Python3. One of
10483 ;; the tests fails under Python2 because its assertions are
10484 ;; overly stringent; it relies on comparing output strings which
10485 ;; are brittle and can change depending on the version of
10486 ;; libmagic being used and the system on which the test is
10487 ;; running. In my case, under GuixSD 0.10.0, only one test
10488 ;; failed, and it seems to have failed only because the version
10489 ;; of libmagic that is packaged in Guix outputs a slightly
10490 ;; different (but not wrong) string than the one that the test
10493 #:phases (modify-phases %standard-phases
10494 ;; Replace a specific method call with a hard-coded
10495 ;; path to the necessary libmagic.so file in the
10496 ;; store. If we don't do this, then the method call
10497 ;; will fail to find the libmagic.so file, which in
10498 ;; turn will cause any application using
10499 ;; python-magic to fail.
10500 (add-before 'build 'hard-code-path-to-libmagic
10501 (lambda* (#:key inputs #:allow-other-keys)
10502 (let ((file (assoc-ref inputs "file")))
10503 (substitute* "magic.py"
10504 (("ctypes.util.find_library\\('magic'\\)")
10505 (string-append "'" file "/lib/libmagic.so'")))
10507 (add-before 'install 'disable-egg-compression
10509 (let ((port (open-file "setup.cfg" "a")))
10510 (display "\n[easy_install]\nzip_ok = 0\n"
10515 ;; python-magic needs to be able to find libmagic.so.
10517 (home-page "https://github.com/ahupp/python-magic")
10518 (synopsis "File type identification using libmagic")
10520 "This module uses ctypes to access the libmagic file type
10521 identification library. It makes use of the local magic database and
10522 supports both textual and MIME-type output. Note that this module and
10523 the python-file module both provide a \"magic.py\" file; these two
10524 modules, which are different and were developed separately, both serve
10525 the same purpose: to provide Python bindings for libmagic.")
10526 (license license:expat)))
10528 (define-public python2-magic
10529 (package-with-python2 python-magic))
10531 (define-public python2-s3cmd
10533 (name "python2-s3cmd")
10538 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10539 "s3cmd-" version ".tar.gz"))
10542 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10543 (build-system python-build-system)
10545 ;; s3cmd is written for python2 only and contains no tests.
10546 `(#:python ,python-2
10549 `(("python2-dateutil" ,python2-dateutil)
10550 ;; The python-file package also provides a magic.py module.
10551 ;; This is an unfortunate state of affairs; however, s3cmd
10552 ;; fails to install if it cannot find specifically the
10553 ;; python-magic package. Thus we include it, instead of using
10554 ;; python-file. Ironically, s3cmd sometimes works better
10555 ;; without libmagic bindings at all:
10556 ;; https://github.com/s3tools/s3cmd/issues/198
10557 ("python2-magic" ,python2-magic)))
10558 (home-page "http://s3tools.org/s3cmd")
10559 (synopsis "Command line tool for S3-compatible storage services")
10561 "S3cmd is a command line tool for uploading, retrieving and managing data
10562 in storage services that are compatible with the Amazon Simple Storage
10563 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10564 GnuPG encryption, and more. It also supports management of Amazon's
10565 CloudFront content delivery network.")
10566 (license license:gpl2+)))
10568 (define-public python-pkgconfig
10570 (name "python-pkgconfig")
10575 (uri (pypi-uri "pkgconfig" version))
10578 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10579 (build-system python-build-system)
10581 `(("python-nose" ,python-nose)))
10583 `(("pkg-config" ,pkg-config)))
10585 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10586 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10588 ;; Hard-code the path to pkg-config.
10590 (modify-phases %standard-phases
10594 (substitute* "pkgconfig/pkgconfig.py"
10595 (("cmd = 'pkg-config")
10596 (string-append "cmd = '" (which "pkg-config"))))
10598 (home-page "http://github.com/matze/pkgconfig")
10599 (synopsis "Python interface for pkg-config")
10600 (description "This module provides a Python interface to pkg-config. It
10601 can be used to find all pkg-config packages, check if a package exists,
10602 check if a package meets certain version requirements, query CFLAGS and
10603 LDFLAGS and parse the output to build extensions with setup.py.")
10604 (license license:expat)))
10606 (define-public python2-pkgconfig
10607 (package-with-python2 python-pkgconfig))
10609 (define-public python-bz2file
10611 (name "python-bz2file")
10616 (uri (pypi-uri "bz2file" version))
10619 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10620 (build-system python-build-system)
10622 `(#:tests? #f)) ; Tests use deprecated python modules.
10623 (home-page "https://github.com/nvawda/bz2file")
10624 (synopsis "Read and write bzip2-compressed files")
10626 "Bz2file is a Python library for reading and writing bzip2-compressed
10627 files. It contains a drop-in replacement for the I/O interface in the
10628 standard library's @code{bz2} module, including features from the latest
10629 development version of CPython that are not available in older releases.")
10630 (license license:asl2.0)
10631 (properties `((python2-variant . ,(delay python2-bz2file))))))
10633 (define-public python2-bz2file
10634 (let ((base (package-with-python2
10635 (strip-python2-variant python-bz2file))))
10639 `(#:python ,python-2
10641 (modify-phases %standard-phases
10642 ;; 'python setup.py test' does not work as of 0.98.
10643 ;; There is only the one test file, so we run it directly.
10645 (lambda _ (zero? (system* "python"
10646 "test_bz2file.py"))))))))))
10648 (define-public python-future
10650 (name "python-future")
10655 (uri (pypi-uri "future" version))
10658 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10659 (build-system python-build-system)
10660 ;; Many tests connect to the network or are otherwise flawed.
10661 ;; https://github.com/PythonCharmers/python-future/issues/210
10664 (home-page "http://python-future.org")
10665 (synopsis "Single-source support for Python 3 and 2")
10667 "@code{python-future} is the missing compatibility layer between Python 2 and
10668 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10669 to support both Python 2 and Python 3 with minimal overhead.")
10670 (license license:expat)))
10672 (define-public python2-future
10673 (package-with-python2 python-future))
10675 (define-public python-cysignals
10677 (name "python-cysignals")
10682 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10685 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10686 (build-system python-build-system)
10688 `(("python-cython" ,python-cython)
10689 ("python-sphinx" ,python-sphinx)))
10691 `(("pari-gp" ,pari-gp)))
10693 `(#:modules ((guix build python-build-system)
10694 ((guix build gnu-build-system) #:prefix gnu:)
10695 (guix build utils))
10696 ;; FIXME: Tests are executed after installation and currently fail
10697 ;; when not installing into standard locations; the author is working
10701 (modify-phases %standard-phases
10704 (assoc-ref gnu:%standard-phases 'configure)))))
10706 "https://github.com/sagemath/cysignals")
10708 "Handling of interrupts and signals for Cython")
10710 "The cysignals package provides mechanisms to handle interrupts (and
10711 other signals and errors) in Cython code, using two related approaches,
10712 for mixed Cython/Python code or external C libraries and pure Cython code,
10714 (license license:lgpl3+)))
10716 (define-public python2-cysignals
10717 (package-with-python2 python-cysignals))
10719 (define-public python2-shedskin
10721 (name "python2-shedskin")
10726 (uri (string-append "https://github.com/shedskin/shedskin/"
10727 "releases/download/v" version
10728 "/shedskin-" version ".tgz"))
10731 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10732 (build-system python-build-system)
10734 `(#:python ,python-2
10735 #:phases (modify-phases %standard-phases
10736 (add-after 'unpack 'fix-resulting-include-libs
10737 (lambda* (#:key inputs #:allow-other-keys)
10738 (let ((libgc (assoc-ref inputs "libgc"))
10739 (pcre (assoc-ref inputs "pcre")))
10740 (substitute* "shedskin/makefile.py"
10741 (("variable == 'CCFLAGS':[ ]*")
10742 (string-append "variable == 'CCFLAGS':\n"
10743 " line += ' -I " pcre "/include"
10744 " -I " libgc "/include'"))
10745 (("variable == 'LFLAGS':[ ]*")
10746 (string-append "variable == 'LFLAGS':\n"
10747 " line += ' -L" pcre "/lib"
10748 " -L " libgc "/lib'")))
10750 (inputs `(("pcre" ,pcre)
10752 (home-page "https://shedskin.github.io/")
10753 (synopsis "Experimental Python-2 to C++ Compiler")
10754 (description (string-append "This is an experimental compiler for a subset of
10755 Python. It generates C++ code and a Makefile."))
10756 (license (list license:gpl3 license:bsd-3 license:expat))))
10758 (define-public python2-rope
10760 (name "python2-rope")
10765 (uri (pypi-uri "rope" version))
10768 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10770 ;; Rope is currently python-2 only.
10771 ;; https://github.com/python-rope/rope/issues/57
10772 `(#:python ,python-2))
10773 (build-system python-build-system)
10775 `(("python2-unittest2" ,python2-unittest2)))
10776 (home-page "https://github.com/python-rope/rope")
10777 (synopsis "Refactoring library for Python")
10778 (description "Rope is a refactoring library for Python. It facilitates
10779 the renaming, moving and extracting of attributes, functions, modules, fields
10780 and parameters in Python 2 source code. These refactorings can also be applied
10781 to occurences in strings and comments.")
10782 (license license:gpl2)))
10784 (define-public python-py3status
10786 (name "python-py3status")
10791 (uri (pypi-uri "py3status" version))
10794 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10795 (build-system python-build-system)
10797 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10798 (home-page "https://github.com/ultrabug/py3status")
10799 (synopsis "Extensible i3status wrapper written in Python")
10800 (description "py3status is an i3status wrapper which extends i3status
10801 functionality in a modular way, allowing you to extend your panel with your
10802 own code, responding to click events and updating clock every second.")
10803 (license license:bsd-3)))
10805 (define-public python-tblib
10807 (name "python-tblib")
10811 (uri (pypi-uri "tblib" version))
10813 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10814 (build-system python-build-system)
10817 (modify-phases %standard-phases
10820 ;; Upstream runs tests after installation and the package itself
10821 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10823 (setenv "PYTHONPATH"
10824 (string-append (getcwd) "/build/lib:"
10825 (getenv "PYTHONPATH")))
10826 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10828 `(("python-pytest" ,python-pytest)
10829 ("python-six" ,python-six)))
10830 (home-page "https://github.com/ionelmc/python-tblib")
10831 (synopsis "Traceback serialization library")
10833 "Traceback serialization allows you to:
10836 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10837 different processes. This allows better error handling when running code over
10838 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10840 @item Parse traceback strings and raise with the parsed tracebacks.
10842 (license license:bsd-3)))
10844 (define-public python2-tblib
10845 (package-with-python2 python-tblib))
10847 (define-public python-sqlparse
10849 (name "python-sqlparse")
10853 (uri (pypi-uri "sqlparse" version))
10856 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10857 (build-system python-build-system)
10860 (modify-phases %standard-phases
10863 ;; setup.py-integrated 2to3 only affects the build files, but
10864 ;; py.test is using the source files. So we need to convert them
10866 (when (zero? (system* "python3"))
10867 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10868 (zero? (system* "py.test")))))))
10870 `(("python-pytest" ,python-pytest)))
10871 (home-page "https://github.com/andialbrecht/sqlparse")
10872 (synopsis "Non-validating SQL parser")
10873 (description "Sqlparse is a non-validating SQL parser for Python. It
10874 provides support for parsing, splitting and formatting SQL statements.")
10875 (license license:bsd-3)))
10877 (define-public python2-sqlparse
10878 (package-with-python2 python-sqlparse))
10880 (define-public python-greenlet
10882 (name "python-greenlet")
10886 (uri (pypi-uri "greenlet" version))
10889 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10890 (build-system python-build-system)
10891 (home-page "https://greenlet.readthedocs.io/")
10892 (synopsis "Lightweight in-process concurrent programming")
10894 "Greenlet package is a spin-off of Stackless, a version of CPython
10895 that supports micro-threads called \"tasklets\". Tasklets run
10896 pseudo-concurrently (typically in a single or a few OS-level threads) and
10897 are synchronized with data exchanges on \"channels\".")
10898 (license (list license:psfl license:expat))))
10900 (define-public python2-greenlet
10901 (package-with-python2 python-greenlet))
10903 (define-public python-gevent
10905 (name "python-gevent")
10909 (uri (pypi-uri "gevent" version))
10912 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10913 (modules '((guix build utils)))
10916 ;; unbunding libev and c-ares
10917 (for-each delete-file-recursively '("libev" "c-ares"))
10918 ;; fixing testsuite
10919 (call-with-output-file "greentest/__init__.py" noop)
10920 (substitute* "greentest/testrunner.py"
10921 (("import util") "from . import util")
10922 (("from util import log") "from .util import log"))))))
10923 (build-system python-build-system)
10925 `(("python-greenlet" ,python-greenlet)))
10927 `(("python-six" ,python-six)))
10929 `(("c-ares" ,c-ares)
10931 (home-page "http://www.gevent.org/")
10932 (synopsis "Coroutine-based network library")
10934 "gevent is a coroutine-based Python networking library that uses greenlet
10935 to provide a high-level synchronous API on top of the libev event loop.")
10936 (license license:expat)))
10938 (define-public python2-gevent
10939 (package-with-python2 python-gevent))
10941 (define-public python-geventhttpclient
10943 (name "python-geventhttpclient")
10947 (uri (pypi-uri "geventhttpclient" version))
10950 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10951 (modules '((guix build utils)))
10954 ;; Delete pre-compiled files.
10955 (for-each delete-file (find-files "src/geventhttpclient"
10958 (build-system python-build-system)
10961 (modify-phases %standard-phases
10962 (add-after 'unpack 'delete-network-tests
10964 (delete-file "src/geventhttpclient/tests/test_client.py")
10967 (add-after 'install 'check
10968 (lambda* (#:key inputs outputs #:allow-other-keys)
10969 (add-installed-pythonpath inputs outputs)
10970 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10972 `(("python-pytest" ,python-pytest)))
10974 `(("python-certifi" ,python-certifi)
10975 ("python-gevent" ,python-gevent)
10976 ("python-six" ,python-six)))
10977 (home-page "https://github.com/gwik/geventhttpclient")
10978 (synopsis "HTTP client library for gevent")
10979 (description "@code{python-geventhttpclient} is a high performance,
10980 concurrent HTTP client library for python using @code{gevent}.")
10981 (license license:expat)))
10983 (define-public python2-geventhttpclient
10984 (package-with-python2 python-geventhttpclient))
10986 (define-public python-fastimport
10988 (name "python-fastimport")
10993 (uri (pypi-uri "fastimport" version))
10995 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10996 (build-system python-build-system)
10997 (home-page "https://github.com/jelmer/python-fastimport")
10998 (synopsis "VCS fastimport parser and generator in Python")
10999 (description "This package provides a parser for and generator of the Git
11000 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11002 (license license:gpl2+)))
11004 (define-public python2-fastimport
11005 (package-with-python2 python-fastimport))
11007 (define-public python-twisted
11009 (name "python-twisted")
11013 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11016 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11017 (build-system python-build-system)
11019 '(#:tests? #f)) ; FIXME: Some tests are failing.
11021 ;; (modify-phases %standard-phases
11024 ;; (zero? (system* "./bin/trial" "twisted")))))
11026 `(("python-zope-interface" ,python-zope-interface)))
11027 (home-page "https://twistedmatrix.com/")
11028 (synopsis "Asynchronous networking framework written in Python")
11030 "Twisted is an extensible framework for Python programming, with special
11031 focus on event-based network programming and multiprotocol integration.")
11032 (license license:expat)))
11034 (define-public python2-twisted
11035 (package-with-python2 python-twisted))
11037 (define-public python-pika
11039 (name "python-pika")
11044 (uri (pypi-uri "pika" version))
11047 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11048 (build-system python-build-system)
11050 `(("python-pyev" ,python-pyev)
11051 ("python-tornado" ,python-tornado)
11052 ("python-twisted" ,python-twisted)))
11053 (home-page "https://pika.readthedocs.org")
11054 (synopsis "Pure Python AMQP Client Library")
11056 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11057 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11058 network support library.")
11059 (license license:bsd-3)))
11061 (define-public python2-pika
11062 (package-with-python2 python-pika))
11064 (define-public python-ply
11066 (name "python-ply")
11071 (uri (pypi-uri "ply" version))
11074 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11075 (build-system python-build-system)
11076 (home-page "http://www.dabeaz.com/ply/")
11077 (synopsis "Python Lex & Yacc")
11078 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11079 It uses LR parsing and does extensive error checking.")
11080 (license license:bsd-3)))
11082 (define-public python2-ply
11083 (package-with-python2 python-ply))
11085 (define-public python-tabulate
11087 (name "python-tabulate")
11091 (uri (pypi-uri "tabulate" version))
11094 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11095 (build-system python-build-system)
11097 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11098 ;; and the latest release is not tagged in the upstream repository.
11100 (home-page "https://bitbucket.org/astanin/python-tabulate")
11101 (synopsis "Pretty-print tabular data")
11103 "Tabulate is a library and command-line utility to pretty-print tabular
11105 (license license:expat)))
11107 (define-public python2-tabulate
11108 (package-with-python2 python-tabulate))
11110 (define-public python-kazoo
11112 (name "python-kazoo")
11117 (uri (pypi-uri "kazoo" version))
11120 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11121 (build-system python-build-system)
11122 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11124 `(("python-six" ,python-six)))
11125 (home-page "https://kazoo.readthedocs.org")
11126 (synopsis "High-level Zookeeper client library")
11128 "Kazoo is a Python client library for the Apache Zookeeper distributed
11129 application service. It is designed to be easy to use and to avoid common
11130 programming errors.")
11131 (license license:asl2.0)))
11133 (define-public python2-kazoo
11134 (package-with-python2 python-kazoo))
11136 (define-public python-pykafka
11138 (name "python-pykafka")
11142 (uri (string-append
11143 "https://pypi.python.org/packages/8b/3e/"
11144 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11145 "pykafka-" version ".tar.gz"))
11148 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11149 (build-system python-build-system)
11150 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11152 `(("python-gevent" ,python-gevent)
11153 ("python-kazoo" ,python-kazoo)
11154 ("python-tabulate" ,python-tabulate)))
11156 `(("librdkafka" ,librdkafka)))
11157 (home-page "https://pykafka.readthedocs.io/")
11158 (synopsis "Apache Kafka client for Python")
11160 "PyKafka is a client for the Apache Kafka distributed messaging system.
11161 It includes Python implementations of Kafka producers and consumers, which
11162 are optionally backed by a C extension built on librdkafka.")
11163 (license license:asl2.0)))
11165 (define-public python2-pykafka
11166 (package-with-python2 python-pykafka))
11168 (define-public python-wcwidth
11170 (name "python-wcwidth")
11175 (uri (string-append
11176 "https://pypi.python.org/packages/"
11177 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
11178 "wcwidth-" version ".tar.gz"))
11181 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
11182 (build-system python-build-system)
11183 (home-page "https://github.com/jquast/wcwidth")
11184 (synopsis "Measure number of terminal column cells of wide-character codes")
11185 (description "Wcwidth measures the number of terminal column cells of
11186 wide-character codes. It is useful for those implementing a terminal emulator,
11187 or programs that carefully produce output to be interpreted by one. It is a
11188 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11189 specified in POSIX.1-2001 and POSIX.1-2008.")
11190 (license license:expat)))
11192 (define-public python2-wcwidth
11193 (package-with-python2 python-wcwidth))
11195 (define-public python2-jsonrpclib
11197 (name "python2-jsonrpclib")
11201 (uri (string-append
11202 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11203 "jsonrpclib-" version ".tar.gz"))
11206 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11207 (build-system python-build-system)
11210 #:python ,python-2))
11211 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11212 (synopsis "Implementation of JSON-RPC specification for Python")
11214 "This library is an implementation of the JSON-RPC specification.
11215 It supports both the original 1.0 specification, as well as the
11216 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11218 (license license:asl2.0)))
11220 (define-public python-chai
11222 (name "python-chai")
11226 (uri (pypi-uri "chai" version))
11229 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11230 (build-system python-build-system)
11231 (home-page "https://github.com/agoragames/chai")
11232 (synopsis "Mocking framework for Python")
11234 "Chai provides an api for mocking, stubbing and spying your python
11235 objects, patterned after the Mocha library for Ruby.")
11236 (license license:bsd-3)))
11238 (define-public python2-chai
11239 (package-with-python2 python-chai))
11241 (define-public python-arrow
11243 (name "python-arrow")
11247 (uri (pypi-uri "arrow" version))
11250 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11251 (build-system python-build-system)
11254 ("python-chai" ,python-chai)
11255 ("python-simplejson" ,python-simplejson)))
11257 `(("python-dateutil" ,python-dateutil)))
11258 (home-page "https://github.com/crsmithdev/arrow/")
11259 (synopsis "Dates and times for Python")
11261 "Arrow is a Python library to creating, manipulating, formatting and
11262 converting dates, times, and timestamps. It implements and updates the
11264 (license license:asl2.0)))
11266 (define-public python2-arrow
11267 (package-with-python2 python-arrow))
11269 (define-public python-inflection
11271 (name "python-inflection")
11274 (origin (method url-fetch)
11275 (uri (pypi-uri "inflection" version))
11278 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11279 (build-system python-build-system)
11281 `(("python-pytest" ,python-pytest)))
11282 (home-page "http://github.com/jpvanhal/inflection")
11283 (synopsis "Python string transformation library")
11285 "Inflection is a string transformation library. It singularizes
11286 and pluralizes English words, and transforms strings from CamelCase to
11287 underscored string.")
11288 (license license:expat)))
11290 (define-public python2-inflection
11291 (package-with-python2 python-inflection))
11293 (define-public python-pylev
11295 (name "python-pylev")
11299 (uri (pypi-uri "pylev" version))
11302 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11303 (build-system python-build-system)
11304 (home-page "http://github.com/toastdriven/pylev")
11305 (synopsis "Levenshtein distance implementation in Python")
11306 (description "Pure Python Levenshtein implementation, based off the
11307 Wikipedia code samples at
11308 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11309 (license license:bsd-3)))
11311 (define-public python2-pylev
11312 (package-with-python2 python-pylev))
11314 (define-public python-cleo
11316 (name "python-cleo")
11320 (uri (pypi-uri "cleo" version))
11323 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11324 (build-system python-build-system)
11327 ("python-mock" ,python-mock)
11328 ("python-pytest" ,python-pytest)))
11330 `(("python-psutil" ,python-psutil)
11331 ("python-pylev" ,python-pylev)))
11332 (home-page "https://github.com/sdispater/cleo")
11333 (synopsis "Command-line arguments library for Python")
11335 "Cleo allows you to create command-line commands with signature in
11336 docstring and colored output.")
11337 (license license:expat)))
11339 (define-public python2-cleo
11340 (package-with-python2 python-cleo))
11342 (define-public python-lazy-object-proxy
11344 (name "python-lazy-object-proxy")
11348 (uri (pypi-uri "lazy-object-proxy" version))
11351 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11352 (build-system python-build-system)
11353 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11354 (synopsis "Lazy object proxy for python")
11356 "Lazy object proxy is an object that wraps a callable but defers the call
11357 until the object is actually required, and caches the result of said call.")
11358 (license license:bsd-2)))
11360 (define-public python2-lazy-object-proxy
11361 (package-with-python2 python-lazy-object-proxy))
11363 (define-public python-dnspython
11365 (name "python-dnspython")
11369 (uri (string-append "http://www.dnspython.org/kits/"
11370 version "/dnspython-" version ".tar.gz"))
11373 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11374 (build-system python-build-system)
11375 (arguments '(#:tests? #f)) ; XXX: requires internet access
11376 (home-page "http://www.dnspython.org")
11377 (synopsis "DNS toolkit for Python")
11379 "dnspython is a DNS toolkit for Python. It supports almost all record
11380 types. It can be used for queries, zone transfers, and dynamic updates.
11381 It supports TSIG authenticated messages and EDNS0.")
11382 (license license:expat)))
11384 (define-public python2-dnspython
11385 (package-with-python2 python-dnspython))
11387 (define-public python-email-validator
11389 (name "python-email-validator")
11392 (origin (method url-fetch)
11393 (uri (pypi-uri "email_validator" version))
11396 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11397 (build-system python-build-system)
11400 (modify-phases %standard-phases
11401 (add-before 'build 'use-dnspython
11403 (substitute* "setup.py"
11404 (("dnspython3") "dnspython"))
11407 `(("python-dnspython" ,python-dnspython)
11408 ("python-idna" ,python-idna)))
11409 (home-page "https://github.com/JoshData/python-email-validator")
11410 (synopsis "Email address validation library for Python")
11412 "This library validates email address syntax and deliverability.")
11413 (license license:cc0)))
11415 (define-public python2-email-validator
11416 (package-with-python2 python-email-validator))
11418 (define-public python-ukpostcodeparser
11420 (name "python-ukpostcodeparser")
11424 (uri (pypi-uri "UkPostcodeParser" version))
11427 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11428 (build-system python-build-system)
11429 (home-page "https://github.com/hamstah/ukpostcodeparser")
11430 (synopsis "UK Postcode parser for Python")
11432 "This library provides the @code{parse_uk_postcode} function for
11433 parsing UK postcodes.")
11434 (license license:expat)))
11436 (define-public python2-ukpostcodeparser
11437 (package-with-python2 python-ukpostcodeparser))
11439 (define-public python-faker
11441 (name "python-faker")
11445 (uri (pypi-uri "Faker" version))
11448 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11450 (search-patches "python-faker-fix-build-32bit.patch"))
11451 (modules '((guix build utils)))
11454 (for-each delete-file (find-files "." "\\.pyc$"))
11456 (build-system python-build-system)
11459 (modify-phases %standard-phases
11462 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11465 ("python-email-validator" ,python-email-validator)
11466 ("python-mock" ,python-mock)
11467 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11469 `(("python-dateutil" ,python-dateutil)
11470 ("python-six" ,python-six)))
11471 (home-page "https://github.com/joke2k/faker")
11472 (synopsis "Python package that generates fake data")
11474 "Faker is a Python package that generates fake data such as names,
11475 addresses, and phone numbers.")
11476 (license license:expat)
11477 (properties `((python2-variant . ,(delay python2-faker))))))
11479 (define-public python2-faker
11480 (let ((base (package-with-python2 (strip-python2-variant
11485 `(("python2-ipaddress" ,python2-ipaddress)
11486 ,@(package-propagated-inputs base))))))
11488 (define-public python-fake-factory
11490 (name "python-fake-factory")
11494 (uri (pypi-uri "fake-factory" version))
11497 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11500 "python-fake-factory-fix-build-32bit.patch"))))
11501 (build-system python-build-system)
11504 (modify-phases %standard-phases
11507 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11510 ("python-email-validator" ,python-email-validator)
11511 ("python-mock" ,python-mock)
11512 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11514 `(("python-dateutil" ,python-dateutil)
11515 ("python-six" ,python-six)))
11516 (home-page "https://github.com/joke2k/faker")
11517 (synopsis "Python package that generates fake data")
11519 "Faker is a Python package that generates fake data such as names,
11520 addresses, and phone numbers.")
11521 (license license:expat)
11522 (properties `((python2-variant . ,(delay python2-fake-factory))
11523 (superseded . ,python-faker)))))
11525 (define-public python2-fake-factory
11526 (let ((base (package-with-python2 (strip-python2-variant
11527 python-fake-factory))))
11530 (properties `((superseded . ,python2-faker)))
11532 `(("python2-ipaddress" ,python2-ipaddress)
11533 ,@(package-propagated-inputs base))))))
11535 (define-public python-pyaml
11537 (name "python-pyaml")
11541 (uri (pypi-uri "pyaml" version))
11544 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11545 (build-system python-build-system)
11547 `(("python-unidecode" ,python-unidecode)))
11549 `(("python-pyyaml" ,python-pyyaml)))
11550 (home-page "https://github.com/mk-fg/pretty-yaml")
11551 (synopsis "YAML pretty-print library for Python")
11553 "pyaml is a PyYAML based python module to produce pretty and readable
11554 YAML-serialized data.")
11555 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11557 (define-public python2-pyaml
11558 (package-with-python2 python-pyaml))
11560 (define-public python-flexmock
11562 (name "python-flexmock")
11566 (uri (pypi-uri "flexmock" version))
11569 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11570 (build-system python-build-system)
11571 (home-page "https://flexmock.readthedocs.org")
11572 (synopsis "Testing library for Python")
11574 "flexmock is a testing library for Python that makes it easy to create
11575 mocks, stubs and fakes.")
11576 (license license:bsd-3)))
11578 (define-public python2-flexmock
11579 (package-with-python2 python-flexmock))
11581 (define-public python-orator
11583 (name "python-orator")
11587 (uri (pypi-uri "orator" version))
11590 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11591 (build-system python-build-system)
11592 (arguments '(#:tests? #f)) ; no tests
11594 `(("python-arrow" ,python-arrow)
11595 ("python-blinker" ,python-blinker)
11596 ("python-cleo" ,python-cleo)
11597 ("python-faker" ,python-faker)
11598 ("python-inflection" ,python-inflection)
11599 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11600 ("python-pyaml" ,python-pyaml)
11601 ("python-simplejson" ,python-simplejson)
11602 ("python-wrapt" ,python-wrapt)))
11603 (home-page "https://orator-orm.com/")
11604 (synopsis "ActiveRecord ORM for Python")
11606 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11607 implementation for Python.")
11608 (license license:expat)
11609 (properties `((python2-variant . ,(delay python2-orator))))))
11611 (define-public python2-orator
11612 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11616 `(("python2-ipaddress" ,python2-ipaddress)
11617 ,@(package-propagated-inputs base))))))
11619 (define-public python-prompt-toolkit
11621 (name "python-prompt-toolkit")
11626 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11629 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11630 (build-system python-build-system)
11632 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11634 `(("python-wcwidth" ,python-wcwidth)
11635 ("python-six" ,python-six)
11636 ("python-pygments" ,python-pygments)))
11637 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11638 (synopsis "Library for building command line interfaces in Python")
11640 "Prompt-Toolkit is a library for building interactive command line
11641 interfaces in Python. It's like GNU Readline but it also features syntax
11642 highlighting while typing, out-of-the-box multi-line input editing, advanced
11643 code completion, incremental search, support for Chinese double-width
11644 characters, mouse support, and auto suggestions.")
11645 (license license:bsd-3)))
11647 (define-public python2-prompt-toolkit
11648 (package-with-python2 python-prompt-toolkit))
11650 (define-public python-jedi
11652 (name "python-jedi")
11657 (uri (pypi-uri "jedi" version))
11660 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11661 (build-system python-build-system)
11663 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11666 `(("python-pytest" ,python-pytest)))
11667 (home-page "https://github.com/davidhalter/jedi")
11669 "Autocompletion for Python that can be used for text editors")
11671 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11672 (license license:expat)))
11674 (define-public python2-jedi
11675 (package-with-python2 python-jedi))
11677 (define-public ptpython
11683 (uri (pypi-uri "ptpython" version))
11686 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11687 (build-system python-build-system)
11689 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11691 `(("python-docopt" ,python-docopt)
11692 ("python-jedi" ,python-jedi)
11693 ("python-prompt-toolkit" ,python-prompt-toolkit)
11694 ("python-pygments" ,python-pygments)))
11695 (home-page "https://github.com/jonathanslenders/ptpython")
11696 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11698 "ptpython is a Python read-eval-print loop with IDE-like features.
11699 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11700 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11702 (license license:bsd-3)
11703 (properties `((python2-variant . ,(delay ptpython-2))))))
11705 (define-public ptpython-2
11706 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11709 (name "ptpython2"))))
11711 (define-public python-requests-oauthlib
11713 (name "python-requests-oauthlib")
11718 (uri (pypi-uri "requests-oauthlib" version))
11721 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11722 (build-system python-build-system)
11725 (modify-phases %standard-phases
11726 ;; removes tests that require network access
11727 (add-before 'check 'pre-check
11729 (delete-file "tests/test_core.py")
11732 `(("python-requests-mock" ,python-requests-mock)
11733 ("python-mock" ,python-mock)))
11735 `(("python-oauthlib" ,python-oauthlib)
11736 ("python-requests" ,python-requests)))
11738 "https://github.com/requests/requests-oauthlib")
11740 "OAuthlib authentication support for Requests")
11742 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11743 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11744 (license license:isc)))
11746 (define-public python2-requests-oauthlib
11747 (package-with-python2 python-requests-oauthlib))
11749 (define-public python-stem
11751 (name "python-stem")
11756 (uri (pypi-uri "stem" version))
11759 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11760 (build-system python-build-system)
11763 (modify-phases %standard-phases
11766 (zero? (system* "./run_tests.py" "--unit")))))))
11768 `(("python-mock" ,python-mock)
11769 ("python-pep8" ,python-pep8)
11770 ("python-pyflakes" ,python-pyflakes)))
11771 (home-page "https://stem.torproject.org/")
11773 "Python controller library that allows applications to interact with Tor")
11775 "Stem is a Python controller library for Tor. With it you can use Tor's
11776 control protocol to script against the Tor process and read descriptor data
11777 relays publish about themselves.")
11778 (license license:lgpl3)))
11780 (define-public python2-stem
11781 (package-with-python2 python-stem))
11783 (define-public python-pyserial
11785 (name "python-pyserial")
11790 (uri (pypi-uri "pyserial" version))
11793 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11794 (build-system python-build-system)
11796 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11798 ;; (modify-phases %standard-phases
11801 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11803 "https://github.com/pyserial/pyserial")
11804 (synopsis "Python Serial Port Bindings")
11805 (description "@code{pyserial} provide serial port bindings for Python. It
11806 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11807 and/or Xon/Xoff. The port is accessed in RAW mode.")
11808 (license license:bsd-3)))
11810 (define-public python2-pyserial
11811 (package-with-python2 python-pyserial))
11813 (define-public python-kivy
11815 (name "python-kivy")
11820 (uri (pypi-uri "kivy" version))
11821 (file-name (string-append name "-" version ".tar.gz"))
11824 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11825 (build-system python-build-system)
11827 `(#:tests? #f ; Tests require many optional packages
11829 (modify-phases %standard-phases
11830 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11831 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11832 (lambda* (#:key inputs #:allow-other-keys)
11833 (setenv "KIVY_SDL2_PATH"
11834 (string-append (assoc-ref inputs "sdl-union")
11838 `(("pkg-config" ,pkg-config)
11839 ("python-cython" ,python-cython)))
11841 `(("gstreamer" ,gstreamer)
11844 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11845 (home-page "http://kivy.org")
11847 "Multitouch application framework")
11849 "A software library for rapid development of
11850 hardware-accelerated multitouch applications.")
11851 (license license:expat)))
11853 (define-public python2-kivy
11854 (package-with-python2 python-kivy))
11856 (define-public python-kivy-next
11857 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11859 (package (inherit python-kivy)
11860 (name "python-kivy-next")
11861 (version (string-append "1.9.1-" revision "."
11862 (string-take commit 7)))
11866 (uri (git-reference
11867 (url "https://github.com/kivy/kivy")
11869 (file-name (string-append name "-" version "-checkout"))
11872 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11874 (define-public python2-kivy-next
11875 (package-with-python2 python-kivy-next))
11877 (define-public python-binaryornot
11879 (name "python-binaryornot")
11883 (uri (pypi-uri "binaryornot" version))
11886 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11887 (build-system python-build-system)
11889 `(("python-chardet" ,python-chardet)
11890 ("python-hypothesis" ,python-hypothesis)))
11891 (home-page "https://github.com/audreyr/binaryornot")
11892 (synopsis "Package to check if a file is binary or text")
11893 (description "Ultra-lightweight pure Python package to check if a file is
11895 (license license:bsd-3)
11896 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11898 (define-public python2-binaryornot
11899 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11900 (package (inherit base)
11902 `(("python2-enum34" ,python2-enum34)
11903 ,@(package-propagated-inputs base))))))
11905 (define-public python-nltk
11907 (name "python-nltk")
11911 (uri (pypi-uri "nltk" version))
11914 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11915 (build-system python-build-system)
11917 '(;; The tests require some extra resources to be downloaded.
11918 ;; TODO Try packaging these resources.
11920 (home-page "http://nltk.org/")
11921 (synopsis "Natural Language Toolkit")
11922 (description "It provides interfaces to over 50 corpora and lexical
11923 resources such as WordNet, along with a suite of text processing libraries
11924 for classification, tokenization, stemming, tagging, parsing, and semantic
11925 reasoning, wrappers for natural language processing libraries.")
11926 (license license:asl2.0)))
11928 (define-public python2-nltk
11929 (package-with-python2 python-nltk))
11931 (define-public python-pymongo
11933 (name "python-pymongo")
11937 (uri (pypi-uri "pymongo" version))
11940 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11941 (build-system python-build-system)
11943 `(("python-certifi" ,python-certifi)))
11944 (home-page "http://github.com/mongodb/mongo-python-driver")
11945 (synopsis "Python driver for MongoDB")
11946 (description "Python driver for MongoDB.")
11947 (license license:asl2.0)))
11949 (define-public python2-pymongo
11950 (package-with-python2 python-pymongo))
11952 (define-public python-sh
11958 (uri (pypi-uri "sh" version))
11961 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11962 (build-system python-build-system)
11964 `(#:tests? #f)) ; no tests
11965 (home-page "https://github.com/amoffat/sh")
11966 (synopsis "Python subprocess interface")
11967 (description "Abstracts process invocation by providing a function
11968 interface for programs.")
11969 (license license:expat)))
11971 (define-public python2-sh
11972 (package-with-python2 python-sh))
11974 (define-public python-consul
11976 (name "python-consul")
11981 (uri (pypi-uri "python-consul" version))
11984 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11985 (build-system python-build-system)
11987 `(("python-pytest" ,python-pytest)))
11989 `(("python-requests" ,python-requests)
11990 ("python-six" ,python-six)))
11991 (home-page "https://github.com/cablehead/python-consul")
11992 (synopsis "Python client for Consul")
11994 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11995 discovery, monitoring and configuration.")
11996 (license license:expat)))
11998 (define-public python2-consul
11999 (package-with-python2 python-consul))
12001 (define-public python-schematics
12003 (name "python-schematics")
12008 (uri (string-append
12009 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12010 (file-name (string-append name "-" version ".tar.gz"))
12013 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12014 (build-system python-build-system)
12016 `(("python-six" ,python-six)))
12018 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12019 ; version requirements (eg python-coveralls)
12020 (home-page "https://github.com/schematics/schematics")
12021 (synopsis "Python Data Structures for Humans")
12022 (description "Python Data Structures for Humans.")
12023 (license license:bsd-3)))
12025 (define-public python2-schematics
12026 (package-with-python2 python-schematics))
12028 (define-public python-publicsuffix
12030 (name "python-publicsuffix")
12034 (uri (pypi-uri "publicsuffix" version))
12037 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12038 (build-system python-build-system)
12040 `(#:tests? #f)) ; tests use the internet
12041 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12042 (synopsis "Get suffix for a domain name")
12043 (description "Get a public suffix for a domain name using the Public Suffix
12045 (license license:expat)))
12047 (define-public python2-publicsuffix
12048 (package-with-python2 python-publicsuffix))
12050 (define-public python-publicsuffix2
12052 (name "python-publicsuffix2")
12053 (version "2.20160621")
12057 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12060 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
12061 (build-system python-build-system)
12063 '(#:tests? #f)) ; The test suite requires network access.
12064 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12065 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12066 (description "Get a public suffix for a domain name using the Public Suffix
12067 List. Forked from and using the same API as the publicsuffix package.")
12068 (license (list license:expat license:mpl2.0))))
12070 (define-public python2-publicsuffix2
12071 (package-with-python2 python-publicsuffix2))
12073 (define-public python-url
12075 (name "python-url")
12079 (uri (pypi-uri "url" version))
12082 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12083 (build-system python-build-system)
12085 `(("python-publicsuffix" ,python-publicsuffix)))
12087 `(("python-coverage" ,python-coverage)
12088 ("python-nose" ,python-nose)))
12090 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12091 (home-page "http://github.com/seomoz/url-py")
12092 (synopsis "URL Parsing")
12093 (description "Library for parsing urls.")
12094 (license license:expat)
12095 (properties `((python2-variant . ,(delay python2-url))))))
12097 (define-public python2-url
12098 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12099 (package (inherit base)
12101 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12103 (define-public python-freezegun
12105 (name "python-freezegun")
12110 (uri (pypi-uri "freezegun" version))
12113 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12114 (build-system python-build-system)
12116 `(("python-mock" ,python-mock)
12117 ("python-nose" ,python-nose)
12118 ("python-coverage" ,python-coverage)))
12120 `(("python-six" ,python-six)
12121 ("python-dateutil" ,python-dateutil)))
12123 `(#:phases (modify-phases %standard-phases
12124 ;; The tests are normally executed via `make test`, but the PyPi
12125 ;; package does not include the Makefile.
12128 (zero? (system* "nosetests" "./tests/")))))))
12129 (home-page "https://github.com/spulec/freezegun")
12130 (synopsis "Test utility for mocking the datetime module")
12132 "FreezeGun is a library that allows your python tests to travel through
12133 time by mocking the datetime module.")
12134 (license license:asl2.0)))
12136 (define-public python2-freezegun
12137 (package-with-python2 python-freezegun))
12140 (define-public python-odfpy
12142 (name "python-odfpy")
12146 (uri (pypi-uri "odfpy" version))
12149 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12151 `(#:modules ((srfi srfi-1)
12152 (guix build python-build-system)
12153 (guix build utils))
12155 (modify-phases %standard-phases
12157 ;; The test runner invokes python2 and python3 for test*.py.
12158 ;; To avoid having both in inputs, we replicate it here.
12160 (every (lambda (test-file)
12161 (zero? (system* "python" test-file)))
12162 (find-files "tests" "^test.*\\.py$")))))))
12163 (build-system python-build-system)
12164 (home-page "https://github.com/eea/odfpy")
12165 (synopsis "Python API and tools to manipulate OpenDocument files")
12166 (description "Collection of libraries and utility programs written in
12167 Python to manipulate OpenDocument 1.2 files.")
12169 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12170 ;; number of files with other licenses.
12171 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12173 (define-public python2-odfpy
12174 (package-with-python2 python-odfpy))
12176 (define-public python-cachecontrol
12178 (name "python-cachecontrol")
12183 ;; Pypi does not have tests.
12184 (uri (string-append
12185 "https://github.com/ionrock/cachecontrol/archive/v"
12186 version ".tar.gz"))
12187 (file-name (string-append name "-" version ".tar.gz"))
12190 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12191 (build-system python-build-system)
12194 (modify-phases %standard-phases
12197 ;; Drop test that requires internet access.
12198 (delete-file "tests/test_regressions.py")
12199 (setenv "PYTHONPATH"
12200 (string-append (getcwd) "/build/lib:"
12201 (getenv "PYTHONPATH")))
12202 (zero? (system* "py.test" "-vv")))))))
12204 `(("python-pytest" ,python-pytest)
12205 ("python-redis" ,python-redis)
12206 ("python-webtest" ,python-webtest)
12207 ("python-mock" ,python-mock)))
12209 `(("python-requests" ,python-requests)
12210 ("python-lockfile" ,python-lockfile)))
12211 (home-page "https://github.com/ionrock/cachecontrol")
12212 (synopsis "The httplib2 caching algorithms for use with requests")
12213 (description "CacheControl is a port of the caching algorithms in
12214 @code{httplib2} for use with @code{requests} session objects.")
12215 (license license:asl2.0)))
12217 (define-public python2-cachecontrol
12218 (package-with-python2 python-cachecontrol))
12220 (define-public python-lit
12222 (name "python-lit")
12227 (uri (pypi-uri "lit" version))
12230 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12231 (build-system python-build-system)
12232 (home-page "http://llvm.org/")
12233 (synopsis "LLVM Software Testing Tool")
12234 (description "@code{lit} is a portable tool for executing LLVM and Clang
12235 style test suites, summarizing their results, and providing indication of
12237 (license license:ncsa)))
12239 (define-public python2-lit
12240 (package-with-python2 python-lit))
12242 (define-public python-pytest-pep8
12244 (name "python-pytest-pep8")
12248 (uri (pypi-uri "pytest-pep8" version))
12251 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12252 (build-system python-build-system)
12254 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12256 `(("python-pytest" ,python-pytest)))
12258 `(("python-pep8" ,python-pep8)))
12259 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12260 (synopsis "Py.test plugin to check PEP8 requirements")
12261 (description "Pytest plugin for checking PEP8 compliance.")
12262 (license license:expat)))
12264 (define-public python2-pytest-pep8
12265 (package-with-python2 python-pytest-pep8))
12267 (define-public python-pytest-flakes
12269 (name "python-pytest-flakes")
12273 (uri (pypi-uri "pytest-flakes" version))
12276 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12277 (build-system python-build-system)
12280 (modify-phases %standard-phases
12282 (add-after 'install 'check
12283 (lambda* (#:key outputs inputs #:allow-other-keys)
12284 ;; It's easier to run tests after install.
12285 ;; Make installed package available for running the tests
12286 (add-installed-pythonpath inputs outputs)
12287 (zero? (system* "py.test" "-vv")))))))
12289 `(("python-coverage" ,python-coverage)
12290 ("python-pytest" ,python-pytest)
12291 ("python-pytest-cache" ,python-pytest-cache)
12292 ("python-pytest-pep8" ,python-pytest-pep8)))
12294 `(("python-pyflakes" ,python-pyflakes)))
12295 (home-page "https://github.com/fschulze/pytest-flakes")
12296 (synopsis "Py.test plugin to check source code with pyflakes")
12297 (description "Pytest plugin for checking Python source code with pyflakes.")
12298 (license license:expat)))
12300 (define-public python2-pytest-flakes
12301 (package-with-python2 python-pytest-flakes))
12303 (define-public python-natsort
12305 (name "python-natsort")
12309 (uri (pypi-uri "natsort" version))
12312 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12313 (build-system python-build-system)
12316 (modify-phases %standard-phases
12317 (add-before 'check 'set-cachedir
12318 ;; Tests require write access to $HOME by default
12319 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12321 `(("python-hypothesis" ,python-hypothesis)
12322 ("python-pytest-cache" ,python-pytest-cache)
12323 ("python-pytest-cov" ,python-pytest-cov)
12324 ("python-pytest-flakes" ,python-pytest-flakes)
12325 ("python-pytest-pep8" ,python-pytest-pep8)))
12326 (propagated-inputs ; TODO: Add python-fastnumbers.
12327 `(("python-pyicu" ,python-pyicu)))
12328 (home-page "https://github.com/SethMMorton/natsort")
12329 (synopsis "Natural sorting for python and shell")
12331 "Natsort lets you apply natural sorting on lists instead of
12332 lexicographical. If you use the built-in @code{sorted} method in python
12333 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12334 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12335 function @code{natsorted} that identifies numbers and sorts them separately
12336 from strings. It can also sort version numbers, real numbers, mixed types
12337 and more, and comes with a shell command @command{natsort} that exposes this
12338 functionality in the command line.")
12339 (license license:expat)
12340 (properties `((python2-variant . ,(delay python2-natsort))))))
12342 (define-public python2-natsort
12343 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12344 (package (inherit base)
12346 `(("python2-pathlib" ,python2-pathlib)
12347 ("python2-mock" ,python2-mock)
12348 ("python2-enum34" ,python2-enum34)
12349 ,@(package-native-inputs base))))))
12351 (define-public python-glances
12353 (name "python-glances")
12358 (uri (pypi-uri "Glances" version))
12361 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12362 (build-system python-build-system)
12364 `(("python-psutil" ,python-psutil)))
12366 "https://github.com/nicolargo/glances")
12368 "A cross-platform curses-based monitoring tool")
12370 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12371 Glances uses the PsUtil library to get information from your system. It monitors
12372 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12373 (license license:lgpl3+)))
12375 (define-public python2-glances
12376 (package-with-python2 python-glances))
12378 (define-public python-graphql-core
12380 (name "python-graphql-core")
12385 (uri (pypi-uri "graphql-core" version))
12388 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12389 (build-system python-build-system)
12391 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12393 (modify-phases %standard-phases
12394 (add-after 'unpack 'patch-hardcoded-version
12395 (lambda _ (substitute*
12397 (("'gevent==1.1rc1'") "'gevent'"))
12400 `(("python-gevent" ,python-gevent)
12401 ("python-mock" ,python-mock)
12402 ("python-pytest-mock" ,python-pytest-mock)))
12404 `(("python-promise" ,python-promise)
12405 ("python-six" ,python-six)))
12406 (home-page "https://github.com/graphql-python/graphql-core")
12407 (synopsis "GraphQL implementation for Python")
12409 "GraphQL implementation for Python. GraphQL is a data query language and
12410 runtime designed and used to request and deliver data to mobile and web apps.
12411 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12413 (license license:expat)))
12415 (define-public python2-graphql-core
12416 (package-with-python2 python-graphql-core))
12418 (define-public python-graphql-relay
12420 (name "python-graphql-relay")
12425 (uri (pypi-uri "graphql-relay" version))
12428 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12429 (build-system python-build-system)
12431 `(("python-pytest" ,python-pytest)))
12433 `(("python-graphql-core" ,python-graphql-core)
12434 ("python-promise" ,python-promise)
12435 ("python-six" ,python-six)))
12436 (home-page "https://github.com/graphql-python/graphql-relay-py")
12437 (synopsis "Relay implementation for Python")
12439 "This is a library to allow the easy creation of Relay-compliant servers
12440 using the GraphQL Python reference implementation of a GraphQL server. It
12441 should be noted that the code is a exact port of the original
12442 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12444 (license license:expat)))
12446 (define-public python2-graphql-relay
12447 (package-with-python2 python-graphql-relay))
12449 (define-public python-graphene
12451 (name "python-graphene")
12456 (uri (pypi-uri "graphene" version))
12459 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12460 (build-system python-build-system)
12462 `(("python-django-filter" ,python-django-filter)
12463 ("python-mock" ,python-mock)
12464 ("python-psycopg2" ,python-psycopg2)
12465 ("python-pytest-django" ,python-pytest-django)
12466 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12468 `(("python-graphql-core" ,python-graphql-core)
12469 ("python-graphql-relay" ,python-graphql-relay)
12470 ("python-iso8601" ,python-iso8601)
12471 ("python-promise" ,python-promise)
12472 ("python-six" ,python-six)))
12473 (home-page "http://graphene-python.org/")
12474 (synopsis "GraphQL Framework for Python")
12476 "Graphene is a Python library for building GraphQL schemas/types.
12477 A GraphQL schema describes your data model, and provides a GraphQL server
12478 with an associated set of resolve methods that know how to fetch data.")
12479 (properties `((python2-variant . ,(delay python2-graphene))))
12480 (license license:expat)))
12482 (define-public python2-graphene
12483 (let ((base (package-with-python2
12484 (strip-python2-variant python-graphene))))
12485 (package (inherit base)
12487 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12488 ,@(package-native-inputs base))))))
12490 (define-public python-nautilus
12492 (name "python-nautilus")
12497 (uri (pypi-uri "nautilus" version))
12500 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12501 (build-system python-build-system)
12502 (arguments `(#:tests? #f)) ; fails to import test modules
12504 `(("python-bcrypt" ,python-bcrypt)
12505 ("python-click" ,python-click)
12506 ("python-consul" ,python-consul)
12507 ("python-graphene" ,python-graphene)
12508 ("python-jinja2" ,python-jinja2)
12509 ("python-peewee" ,python-peewee)
12510 ("python-pika" ,python-pika)
12511 ("python-tornado" ,python-tornado)
12512 ("python-wtforms" ,python-wtforms)))
12514 `(("python-nose2" ,python-nose2)))
12515 (home-page "https://github.com/AlecAivazis/nautilus")
12516 (synopsis "Library for creating microservice applications")
12518 "Nautilus is a framework for flux based microservices that looks to
12519 provide extendible implementations of common aspects of a cloud so that you can
12520 focus on building massively scalable web applications.")
12521 (license license:expat)))
12523 (define-public python-snowballstemmer
12525 (name "python-snowballstemmer")
12529 (uri (pypi-uri "snowballstemmer" version))
12532 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12533 (build-system python-build-system)
12535 `(;; No tests exist
12537 (home-page "https://github.com/shibukawa/snowball_py")
12538 (synopsis "Snowball stemming library collection for Python")
12539 (description "This package provides 16 word stemmer algorithms generated
12540 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12542 (license license:bsd-3)))
12544 (define-public python2-snowballstemmer
12545 (package-with-python2 python-snowballstemmer))
12547 (define-public python-sphinx-cloud-sptheme
12549 (name "python-sphinx-cloud-sptheme")
12553 (uri (pypi-uri "cloud_sptheme" version))
12556 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12557 (build-system python-build-system)
12558 ;; FIXME: The 'pypi' release archive does not contain tests.
12559 (arguments '(#:tests? #f))
12561 `(("python-sphinx" ,python-sphinx)))
12562 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12563 (synopsis "'Cloud' theme for Sphinx documenter")
12564 (description "This package contains the \"Cloud\" theme for Sphinx and some
12565 related extensions.")
12566 (license license:bsd-3)))
12568 (define-public python2-sphinx-cloud-sptheme
12569 (package-with-python2 python-sphinx-cloud-sptheme))
12571 (define-public python-sphinx-alabaster-theme
12573 (name "python-sphinx-alabaster-theme")
12577 (uri (pypi-uri "alabaster" version))
12580 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12581 (build-system python-build-system)
12583 `(("python-pygments" ,python-pygments)))
12584 (home-page "https://alabaster.readthedocs.io/")
12585 (synopsis "Configurable sidebar-enabled Sphinx theme")
12586 (description "Alabaster is a visually (c)lean, responsive, configurable
12587 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12588 (license license:bsd-3)))
12590 (define-public python2-sphinx-alabaster-theme
12591 (package-with-python2 python-sphinx-alabaster-theme))
12593 (define-public python-betamax
12595 (name "python-betamax")
12600 (uri (pypi-uri "betamax" version))
12603 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12604 (build-system python-build-system)
12606 '(;; Many tests fail because they require networking.
12609 `(("python-requests" ,python-requests)))
12610 (home-page "https://github.com/sigmavirus24/betamax")
12611 (synopsis "Record HTTP interactions with python-requests")
12612 (description "Betamax will record your test suite's HTTP interactions and
12613 replay them during future tests. It is designed to work with python-requests.")
12614 (license license:expat)))
12616 (define-public python2-betamax
12617 (package-with-python2 python-betamax))
12619 (define-public python-s3transfer
12621 (name "python-s3transfer")
12625 (uri (pypi-uri "s3transfer" version))
12628 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12629 (build-system python-build-system)
12632 (modify-phases %standard-phases
12635 ;; 7 of the 'integration' tests require network access or login
12637 (zero? (system* "nosetests" "--exclude=integration")))))))
12639 `(("python-docutils" ,python-docutils)
12640 ("python-mock" ,python-mock)
12641 ("python-nose" ,python-nose)))
12643 `(("python-botocore" ,python-botocore)))
12644 (synopsis "Amazon S3 Transfer Manager")
12645 (description "S3transfer is a Python library for managing Amazon S3
12647 (home-page "https://github.com/boto/s3transfer")
12648 (license license:asl2.0)
12649 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12651 (define-public python2-s3transfer
12652 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12656 `(("python2-futures" ,python2-futures)
12657 ,@(package-native-inputs base))))))
12659 (define-public python-setproctitle
12661 (name "python-setproctitle")
12666 (uri (pypi-uri "setproctitle" version))
12669 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12670 (build-system python-build-system)
12673 (modify-phases %standard-phases
12674 (add-before 'check 'patch-Makefile
12675 ;; Stricly this is only required for the python2 variant.
12676 ;; But adding a phase in an inherited package seems to be
12677 ;; cumbersum. So we patch even for python3.
12679 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12681 (substitute* "Makefile"
12682 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12683 (string-append nose "/bin/nosetests "))))
12687 (setenv "PYTHON" (or (which "python3") (which "python")))
12688 (setenv "PYCONFIG" (or (which "python3-config")
12689 (which "python-config")))
12690 (setenv "CC" "gcc")
12691 ;; No need to extend PYTHONPATH to find the built package, since
12692 ;; the Makefile will build anyway
12693 (zero? (system* "make" "check")))))))
12695 `(("procps" ,procps))) ; required for tests
12697 "https://github.com/dvarrazzo/py-setproctitle")
12699 "Setproctitle implementation for Python to customize the process title")
12700 (description "The library allows a process to change its title (as displayed
12701 by system tools such as ps and top).
12703 Changing the title is mostly useful in multi-process systems, for
12704 example when a master process is forked: changing the children's title
12705 allows to identify the task each process is busy with. The technique
12706 is used by PostgreSQL and the OpenSSH Server for example.")
12707 (license license:bsd-3)
12708 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12710 (define-public python2-setproctitle
12711 (let ((base (package-with-python2
12712 (strip-python2-variant python-setproctitle))))
12715 (native-inputs `(("python2-nose" ,python2-nose)
12716 ,@(package-native-inputs base))))))
12718 (define-public python-validictory
12720 (name "python-validictory")
12725 (uri (pypi-uri "validictory" version))
12728 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12729 (build-system python-build-system)
12732 (modify-phases %standard-phases
12733 (add-after 'unpack 'bootstrap
12734 ;; Move the tests out of the package directory to avoid
12737 (rename-file "validictory/tests" "tests")
12738 (delete-file "tests/__init__.py")))
12741 ;; Extend PYTHONPATH so the built package will be found.
12742 (setenv "PYTHONPATH"
12743 (string-append (getcwd) "/build/lib:"
12744 (getenv "PYTHONPATH")))
12745 (zero? (system* "py.test" "-vv" )))))))
12747 `(("python-pytest" ,python-pytest)))
12749 "https://github.com/jamesturk/validictory")
12750 (synopsis "General purpose Python data validator")
12751 (description "It allows validation of arbitrary Python data structures.
12753 The schema format is based on the JSON Schema
12754 proposal (http://json-schema.org), so combined with json the library is also
12755 useful as a validator for JSON data.")
12756 (license license:expat)))
12758 (define-public python2-validictory
12759 (package-with-python2 python-validictory))
12761 (define-public python-aniso8601
12763 (name "python-aniso8601")
12768 (uri (pypi-uri "aniso8601" version))
12771 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12772 (build-system python-build-system)
12774 `(("python-dateutil" ,python-dateutil)))
12776 "https://bitbucket.org/nielsenb/aniso8601")
12778 "Python library for parsing ISO 8601 strings")
12780 "This package contains a library for parsing ISO 8601 datetime strings.")
12781 (license license:bsd-3)))
12783 (define-public python-flask-restful
12785 (name "python-flask-restful")
12790 (uri (pypi-uri "Flask-RESTful" version))
12793 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12794 (build-system python-build-system)
12796 `(("python-aniso8601" ,python-aniso8601)
12797 ("python-flask" ,python-flask)
12798 ("python-pycrypto" ,python-pycrypto)
12799 ("python-pytz" ,python-pytz)))
12801 `(;; Optional dependency of Flask. Tests need it.
12802 ("python-blinker" ,python-blinker)
12803 ("python-mock" ,python-mock) ; For tests
12804 ("python-nose" ,python-nose) ; For tests
12805 ("python-sphinx" ,python-sphinx)))
12807 "https://www.github.com/flask-restful/flask-restful/")
12809 "Flask module for creating REST APIs")
12811 "This package contains a Flask module for creating REST APIs.")
12812 (license license:bsd-3)))
12814 (define-public python-flask-basicauth
12816 (name "python-flask-basicauth")
12821 (uri (pypi-uri "Flask-BasicAuth" version))
12824 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12825 (build-system python-build-system)
12827 `(("python-flask" ,python-flask)))
12829 "https://github.com/jpvanhal/flask-basicauth")
12831 "HTTP basic access authentication for Flask")
12833 "This package provides HTTP basic access authentication for Flask.")
12834 (license license:bsd-3)))
12836 (define-public python-flask-sqlalchemy
12838 (name "python-flask-sqlalchemy")
12843 (uri (pypi-uri "Flask-SQLAlchemy" version))
12846 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12847 (build-system python-build-system)
12849 `(("python-flask" ,python-flask)
12850 ("python-sqlalchemy" ,python-sqlalchemy)))
12852 "http://github.com/mitsuhiko/flask-sqlalchemy")
12854 "Module adding SQLAlchemy support to your Flask application")
12856 "This package adds SQLAlchemy support to your Flask application.")
12857 (license license:bsd-3)))
12859 (define-public python-pyev
12861 (name "python-pyev")
12866 (uri (pypi-uri "pyev" version))
12869 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12870 (build-system python-build-system)
12872 `(#:tests? #f ; no test suite
12874 (modify-phases %standard-phases
12875 (add-after 'unpack 'patch
12876 (lambda* (#:key inputs #:allow-other-keys)
12877 (let ((libev (string-append (assoc-ref inputs "libev")
12878 "/lib/libev.so.4")))
12879 (substitute* "setup.py"
12880 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12881 (string-append "libev_dll_name = \"" libev "\"")))))))))
12883 `(("libev" ,libev)))
12884 (home-page "http://pythonhosted.org/pyev/")
12885 (synopsis "Python libev interface")
12886 (description "Pyev provides a Python interface to libev.")
12887 (license license:gpl3)))
12889 (define-public python2-pyev
12890 (package-with-python2 python-pyev))
12892 (define-public python-imagesize
12894 (name "python-imagesize")
12899 (uri (pypi-uri "imagesize" version))
12902 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12903 (build-system python-build-system)
12905 '(;; Test files are not distributed on PyPi:
12906 ;; https://github.com/shibukawa/imagesize_py/issues/7
12908 (home-page "https://github.com/shibukawa/imagesize_py")
12909 (synopsis "Gets image size of files in variaous formats in Python")
12911 "This package allows determination of image size from
12912 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12913 (license license:expat)))
12915 (define-public python2-imagesize
12916 (package-with-python2 python-imagesize))
12918 (define-public python-axolotl-curve25519
12920 (name "python-axolotl-curve25519")
12925 (uri (git-reference
12926 (url "git://github.com/tgalal/python-axolotl-curve25519")
12927 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12928 (file-name (string-append name "-" version "-checkout"))
12931 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12932 (build-system python-build-system)
12934 `(;; Prevent creation of the egg. This works around
12935 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12936 #:configure-flags '("--root=/")))
12937 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12938 (synopsis "Python wrapper for curve25519 library")
12939 (description "This is a python wrapper for the curve25519 library
12940 with ed25519 signatures. The C code was pulled from
12941 libaxolotl-android. At the moment this wrapper is meant for use by
12943 (license (list license:gpl3 ; Most files
12944 license:bsd-3)))) ; curve/curve25519-donna.c
12946 (define-public python2-axolotl-curve25519
12947 (package-with-python2 python-axolotl-curve25519))
12949 (define-public python-axolotl
12951 (name "python-axolotl")
12956 (uri (string-append
12957 "https://github.com/tgalal/python-axolotl/archive/"
12958 version ".tar.gz"))
12959 (file-name (string-append name "-" version ".tar.gz"))
12961 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12962 (build-system python-build-system)
12965 (modify-phases %standard-phases
12966 ;; Don't install tests
12967 (add-before 'install 'remove-tests
12969 (for-each delete-file-recursively
12970 '("axolotl/tests" "build/lib/axolotl/tests"))
12973 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12974 ("python-dateutil" ,python-dateutil)
12975 ("python-protobuf" ,python-protobuf)
12976 ("python-pycrypto" ,python-pycrypto)))
12977 (home-page "https://github.com/tgalal/python-axolotl")
12978 (synopsis "Python port of libaxolotl-android")
12979 (description "This is a python port of libaxolotl-android. This
12980 is a ratcheting forward secrecy protocol that works in synchronous and
12981 asynchronous messaging environments.")
12982 (license license:gpl3)))
12984 (define-public python2-axolotl
12985 (package-with-python2 python-axolotl))
12987 (define-public python-termstyle
12989 (name "python-termstyle")
12994 (uri (pypi-uri "termstyle" version))
12997 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12998 (build-system python-build-system)
13001 (modify-phases %standard-phases
13004 (zero? (system* "python" "test3.py")))))))
13005 (home-page "http://github.com/gfxmonk/termstyle")
13006 (synopsis "Console text coloring for Python")
13007 (description "This package provides console text coloring for Python.")
13008 (license license:bsd-3)))
13010 (define-public python-rednose
13012 (name "python-rednose")
13017 (uri (pypi-uri "rednose" version))
13020 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13021 (build-system python-build-system)
13024 (modify-phases %standard-phases
13025 (add-after 'unpack 'fix-deps
13027 ;; See <https://github.com/JBKahn/rednose/issues/12>
13028 (substitute* "setup.py"
13029 (("python-termstyle") "termstyle"))
13032 `(("python-colorama" ,python-colorama)
13033 ("python-termstyle" ,python-termstyle)))
13035 `(("python-six" ,python-six)
13036 ("python-nose" ,python-nose)))
13037 (home-page "https://github.com/JBKahn/rednose")
13038 (synopsis "Colored output for Python nosetests")
13039 (description "This package provides colored output for the
13040 @command{nosetests} command of the Python Nose unit test framework.")
13041 (license license:bsd-3)))
13043 (define-public python-flask-restplus
13045 (name "python-flask-restplus")
13050 (uri (pypi-uri "flask-restplus" version))
13053 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13054 (build-system python-build-system)
13056 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13058 ;; (modify-phases %standard-phases
13061 ;; (zero? (system* "nosetests")))))))
13063 `(("python-aniso8601" ,python-aniso8601)
13064 ("python-flask" ,python-flask)
13065 ("python-jsonschema" ,python-jsonschema)
13066 ("python-pytz" ,python-pytz)
13067 ("python-six" ,python-six)))
13069 `(("python-tzlocal" ,python-tzlocal)
13070 ("python-blinker" ,python-blinker)
13071 ("python-nose" ,python-nose)
13072 ("python-rednose" ,python-rednose)))
13073 (home-page "https://github.com/noirbizarre/flask-restplus")
13074 (synopsis "Framework for documented API development with Flask")
13075 (description "This package provides a framework for API development with
13076 the Flask web framework in Python. It is similar to package
13077 @code{python-flask-restful} but supports the @code{python-swagger}
13078 documentation builder.")
13079 (license license:expat)))
13081 (define-public python-sadisplay
13083 (name "python-sadisplay")
13088 (uri (pypi-uri "sadisplay" version))
13091 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13092 (build-system python-build-system)
13094 `(("python-sqlalchemy" ,python-sqlalchemy)))
13096 `(("python-nose" ,python-nose)))
13097 (home-page "https://bitbucket.org/estin/sadisplay")
13098 (synopsis "SQLAlchemy schema displayer")
13099 (description "This package provides a program to build Entity
13100 Relationship diagrams from a SQLAlchemy model (or directly from the
13102 (license license:bsd-3)))
13104 (define-public python2-sadisplay
13105 (package-with-python2 python-sadisplay))
13107 (define-public python-flask-restful-swagger
13109 (name "python-flask-restful-swagger")
13114 (uri (pypi-uri "flask-restful-swagger" version))
13117 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13118 (build-system python-build-system)
13120 `(("python-flask-restful" ,python-flask-restful)))
13121 (home-page "https://github.com/rantav/flask-restful-swagger")
13122 (synopsis "Extract Swagger specs from Flask-Restful projects")
13123 (description "This package lets you extract Swagger API documentation
13124 specs from your Flask-Restful projects.")
13125 (license license:expat)))
13127 (define-public python2-flask-restful-swagger
13128 (package-with-python2 python-flask-restful-swagger))
13130 (define-public python-argcomplete
13132 (name "python-argcomplete")
13137 (uri (pypi-uri "argcomplete" version))
13140 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13141 (build-system python-build-system)
13143 `(("python-pexpect" ,python-pexpect)
13145 (home-page "https://github.com/kislyuk/argcomplete")
13146 (synopsis "Shell tab completion for Python argparse")
13147 (description "argcomplete provides extensible command line tab completion
13148 of arguments and options for Python scripts using @code{argparse}. It's
13149 particularly useful for programs with many options or sub-parsers that can
13150 dynamically suggest completions; for example, when browsing resources over the
13152 (license license:asl2.0)))
13154 (define-public python2-argcomplete
13155 (package-with-python2 python-argcomplete))
13157 (define-public python-xopen
13159 (name "python-xopen")
13164 (uri (pypi-uri "xopen" version))
13167 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13168 (file-name (string-append name "-" version ".tar.gz"))))
13169 (build-system python-build-system)
13170 (home-page "https://github.com/marcelm/xopen/")
13171 (synopsis "Open compressed files transparently")
13172 (description "This module provides an @code{xopen} function that works like
13173 Python's built-in @code{open} function, but can also deal with compressed files.
13174 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13175 recognized by their file extensions. The focus is on being as efficient as
13176 possible on all supported Python versions.")
13177 (license license:expat)))
13179 (define-public python2-xopen
13180 (package-with-python2 python-xopen))
13182 (define-public python2-cheetah
13184 (name "python2-cheetah")
13189 (uri (pypi-uri "Cheetah" version))
13192 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13193 (build-system python-build-system)
13195 `(#:python ,python-2))
13197 `(("python2-markdown" ,python2-markdown)))
13198 (home-page "https://pythonhosted.org/Cheetah/")
13199 (synopsis "Template engine")
13200 (description "Cheetah is a text-based template engine and Python code
13203 Cheetah can be used as a standalone templating utility or referenced as
13204 a library from other Python applications. It has many potential uses,
13205 but web developers looking for a viable alternative to ASP, JSP, PHP and
13206 PSP are expected to be its principle user group.
13210 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13212 @item Cleanly separates content, graphic design, and program code.
13213 @item Blends the power and flexibility of Python with a simple template language
13214 that non-programmers can understand.
13215 @item Gives template writers full access to any Python data structure, module,
13216 function, object, or method in their templates.
13217 @item Makes code reuse easy by providing an object-orientated interface to
13218 templates that is accessible from Python code or other Cheetah templates.
13219 One template can subclass another and selectively reimplement sections of it.
13220 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13221 improve the performance of a dynamic website.
13222 @item Compiles templates into optimized, yet readable, Python code.
13224 (license (license:x11-style "file://LICENSE"))))
13226 (define-public python-dulwich
13228 (name "python-dulwich")
13233 (uri (list (string-append "https://www.dulwich.io/releases/"
13234 "dulwich-" version ".tar.gz")
13235 (pypi-uri "dulwich" version)))
13237 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13238 (build-system python-build-system)
13241 (modify-phases %standard-phases
13242 (add-before 'check 'fix-tests
13243 (lambda* (#:key inputs #:allow-other-keys)
13244 ;; The tests use Popen with a custom environment which doesn't
13246 (substitute* "dulwich/tests/compat/utils.py"
13247 (("'git'") (string-append "'"
13250 (substitute* '("dulwich/tests/test_repository.py"
13251 "dulwich/tests/test_hooks.py")
13252 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13253 (setenv "TEST_RUNNER" "unittest")
13254 (setenv "PYTHONHASHSEED" "random")
13257 `(("python-fastimport" ,python-fastimport)))
13259 `(("python-mock" ,python-mock)
13260 ("python-geventhttpclient" ,python-geventhttpclient)
13262 (home-page "https://www.dulwich.io/")
13263 (synopsis "Git implementation in Python")
13264 (description "Dulwich is an implementation of the Git file formats and
13265 protocols written in pure Python.")
13266 ;; Can be used with either license.
13267 (license (list license:asl2.0 license:gpl2+))))
13269 (define-public python2-dulwich
13270 (package-with-python2 python-dulwich))
13272 (define-public python-pbkdf2
13274 (name "python-pbkdf2")
13279 (uri (pypi-uri "pbkdf2" version))
13282 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13283 (build-system python-build-system)
13286 (modify-phases %standard-phases
13289 (setenv "PYTHONPATH"
13290 (string-append (getcwd) "/build/lib:"
13291 (getenv "PYTHONPATH")))
13292 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13294 `(("python-pycrypto" ,python-pycrypto))) ; optional
13295 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13296 (synopsis "Password-based key derivation")
13297 (description "This module implements the password-based key derivation
13298 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13300 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13301 is part of the RSA Public Key Cryptography Standards series. The provided
13302 implementation takes a password or a passphrase and a salt value (and
13303 optionally a iteration count, a digest module, and a MAC module) and provides
13304 a file-like object from which an arbitrarly-sized key can be read.")
13305 (license license:expat)))
13307 (define-public python2-pbkdf2
13308 (package-with-python2 python-pbkdf2))
13310 (define-public python-qrcode
13312 (name "python-qrcode")
13317 (uri (pypi-uri "qrcode" version))
13320 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13321 (build-system python-build-system)
13323 ;; FIXME: Tests require packaging 'pymaging'.
13326 `(("python-lxml" ,python-lxml) ; for SVG output
13327 ("python-pillow" ,python-pillow) ; for PNG output
13328 ("python-six" ,python-six)))
13329 (home-page "https://github.com/lincolnloop/python-qrcode")
13330 (synopsis "QR Code image generator")
13331 (description "This package provides a pure Python QR Code generator
13332 module. It uses the Python Imaging Library (PIL) to allow for the generation
13335 In addition this package provides a command line tool to generate QR codes and
13336 either write these QR codes to a file or do the output as ascii art at the
13338 (license license:bsd-3)))
13340 (define-public python2-qrcode
13341 (package-with-python2 python-qrcode))
13343 ;; SlowAES isn't compatible with Python 3.
13344 (define-public python2-slowaes
13346 (name "python2-slowaes")
13351 (uri (pypi-uri "slowaes" version))
13354 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13355 (build-system python-build-system)
13356 (arguments `(#:python ,python-2))
13357 (home-page "http://code.google.com/p/slowaes/")
13358 (synopsis "Implementation of AES in Python")
13359 (description "This package contains an implementation of AES in Python.
13360 This implementation is slow (hence the project name) but still useful when
13361 faster ones are not available.")
13362 (license license:asl2.0)))
13364 (define-public python-rst2ansi
13366 (name "python-rst2ansi")
13371 (uri (pypi-uri "rst2ansi" version))
13374 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13375 (build-system python-build-system)
13377 `(("python-docutils" ,python-docutils)))
13378 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13379 (synopsis "Convert RST to ANSI-decorated console output")
13381 "Python module dedicated to rendering RST (reStructuredText) documents
13382 to ansi-escaped strings suitable for display in a terminal.")
13383 (license license:expat)))
13385 (define-public python-ddt
13387 (name "python-ddt")
13392 (uri (pypi-uri "ddt" version))
13395 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13396 (build-system python-build-system)
13398 `(("python-mock" ,python-mock)
13399 ("python-nose" ,python-nose)))
13401 `(("python-six" ,python-six)
13402 ("python-pyyaml" ,python-pyyaml)))
13403 (home-page "https://github.com/txels/ddt")
13404 (synopsis "Data-Driven Tests")
13406 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13407 it with different test data, and make it appear as multiple test cases.")
13408 (license license:expat)))
13410 (define-public python2-ddt
13411 (package-with-python2 python-ddt))
13413 (define-public python-pycosat
13415 (name "python-pycosat")
13420 (uri (pypi-uri "pycosat" version))
13423 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13424 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13425 (build-system python-build-system)
13426 (home-page "https://github.com/ContinuumIO/pycosat")
13427 (synopsis "Bindings to picosat (a SAT solver)")
13429 "This package provides efficient Python bindings to @code{picosat} on
13430 the C level. When importing pycosat, the @code{picosat} solver becomes part
13431 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13432 Problem} (SAT) solver.")
13433 (license license:expat)))
13435 (define-public python2-pycosat
13436 (package-with-python2 python-pycosat))
13438 (define-public python2-ruamel.ordereddict
13440 (name "python2-ruamel.ordereddict")
13445 (uri (pypi-uri "ruamel.ordereddict" version))
13448 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13449 (build-system python-build-system)
13451 `(#:python ,python-2
13453 (modify-phases %standard-phases
13455 (add-after 'install 'check
13456 (lambda* (#:key inputs outputs #:allow-other-keys)
13457 (add-installed-pythonpath inputs outputs)
13458 (zero? (system* "python" "test/testordereddict.py")))))))
13459 (home-page "https://bitbucket.org/ruamel/ordereddict")
13460 (synopsis "Version of dict that keeps keys in insertion order")
13462 "This is an implementation of an ordered dictionary with @dfn{Key
13463 Insertion Order} (KIO: updates of values do not affect the position of the
13464 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13465 removed and put at the back). The standard library module @code{OrderedDict},
13466 implemented later, implements a subset of @code{ordereddict} functionality.
13467 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13468 Order} (KSO, no sorting function can be specified, but a transform can be
13469 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13470 (license license:expat)))
13472 (define-public python-pypeg2
13474 (name "python-pypeg2")
13479 (uri (pypi-uri "pyPEG2" version))
13482 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13483 (build-system python-build-system)
13484 (propagated-inputs `(("python-lxml" ,python-lxml)))
13486 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13488 (home-page "https://fdik.org/pyPEG/")
13489 (synopsis "Parsering Expression Grammars in Python")
13490 (description "PyPEG is an intrinsic parser interpreter framework for
13491 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13492 parse many formal languages.")
13493 (license license:gpl2)))