projects/guix·blob version-0.11.0 · refs

9806 lines · 348.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <[email protected]>
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <[email protected]>
5;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
6;;; Copyright © 2014 Eric Bavier <[email protected]>
7;;; Copyright © 2014, 2015 Federico Beffa <[email protected]>
8;;; Copyright © 2015 Omar Radwan <[email protected]>
9;;; Copyright © 2015 Pierre-Antoine Rault <[email protected]>
10;;; Copyright © 2015, 2016 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <[email protected]>
12;;; Copyright © 2015 Eric Dvorsak <[email protected]>
13;;; Copyright © 2015, 2016 David Thompson <[email protected]>
14;;; Copyright © 2015, 2016 Leo Famulari <[email protected]>
15;;; Copyright © 2015 Ben Woodcroft <[email protected]>
16;;; Copyright © 2015, 2016 Erik Edrosa <[email protected]>
17;;; Copyright © 2015, 2016 Efraim Flashner <[email protected]>
18;;; Copyright © 2015 Kyle Meyer <[email protected]>
19;;; Copyright © 2015, 2016 Chris Marusich <[email protected]>
20;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
21;;; Copyright © 2016 Lukas Gradl <[email protected]>
22;;; Copyright © 2016 Hartmut Goebel <[email protected]>
23;;; Copyright © 2016 Daniel Pimentel <[email protected]>
24;;; Copyright © 2016 Sou Bunnbu <[email protected]>
25;;; Copyright © 2016 Troy Sankey <[email protected]>
26;;; Copyright © 2016 ng0 <[email protected]>
27;;;
28;;; This file is part of GNU Guix.
29;;;
30;;; GNU Guix is free software; you can redistribute it and/or modify it
31;;; under the terms of the GNU General Public License as published by
32;;; the Free Software Foundation; either version 3 of the License, or (at
33;;; your option) any later version.
34;;;
35;;; GNU Guix is distributed in the hope that it will be useful, but
36;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38;;; GNU General Public License for more details.
39;;;
40;;; You should have received a copy of the GNU General Public License
41;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42
43(define-module (gnu packages python)
44 #:use-module ((guix licenses)
45 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
46 gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
47 isc mpl2.0 psfl public-domain repoze unlicense x11-style
48 zpl2.1))
49 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages adns)
53 #:use-module (gnu packages attr)
54 #:use-module (gnu packages backup)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages file)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages gcc)
60 #:use-module (gnu packages ghostscript)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages icu4c)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages imagemagick)
66 #:use-module (gnu packages libevent)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux)
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages multiprecision)
71 #:use-module (gnu packages networking)
72 #:use-module (gnu packages ncurses)
73 #:use-module (gnu packages pcre)
74 #:use-module (gnu packages perl)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages readline)
77 #:use-module (gnu packages statistics)
78 #:use-module (gnu packages tex)
79 #:use-module (gnu packages texinfo)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages version-control)
82 #:use-module (gnu packages web)
83 #:use-module (gnu packages base)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages xorg)
86 #:use-module (gnu packages xdisorg)
87 #:use-module (gnu packages zip)
88 #:use-module (gnu packages tcl)
89 #:use-module (gnu packages bdw-gc)
90 #:use-module (gnu packages pcre)
91 #:use-module (guix packages)
92 #:use-module (guix download)
93 #:use-module (guix git-download)
94 #:use-module (guix utils)
95 #:use-module (guix build-system gnu)
96 #:use-module (guix build-system cmake)
97 #:use-module (guix build-system python)
98 #:use-module (guix build-system trivial)
99 #:use-module (srfi srfi-1))
100
101(define-public python-2.7
102 (package
103 (name "python")
104 (version "2.7.11")
105 (source
106 (origin
107 (method url-fetch)
108 (uri (string-append "https://www.python.org/ftp/python/"
109 version "/Python-" version ".tar.xz"))
110 (sha256
111 (base32
112 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
113 (patches (search-patches "python-2.7-search-paths.patch"
114 "python-2-deterministic-build-info.patch"
115 "python-2.7-source-date-epoch.patch"))
116 (modules '((guix build utils)))
117 ;; suboptimal to delete failing tests here, but if we delete them in the
118 ;; arguments then we need to make sure to strip out that phase when it
119 ;; gets inherited by python and python-minimal.
120 (snippet
121 '(begin
122 (for-each delete-file
123 '("Lib/test/test_compileall.py"
124 "Lib/test/test_distutils.py"
125 "Lib/test/test_import.py"
126 "Lib/test/test_shutil.py"
127 "Lib/test/test_socket.py"
128 "Lib/test/test_subprocess.py"))
129 #t))))
130 (outputs '("out"
131 "tk")) ;tkinter; adds 50 MiB to the closure
132 (build-system gnu-build-system)
133 (arguments
134 `(;; 356 tests OK.
135 ;; 6 tests failed:
136 ;; test_compileall test_distutils test_import test_shutil test_socket
137 ;; test_subprocess
138 ;; 39 tests skipped:
139 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
140 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
141 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
142 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
143 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
144 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
145 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
146 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
147 ;; test_winreg test_winsound test_zipfile64
148 ;; 4 skips unexpected on linux2:
149 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
150 #:test-target "test"
151 #:configure-flags
152 (list "--enable-shared" ;allow embedding
153 "--with-system-ffi" ;build ctypes
154 (string-append "LDFLAGS=-Wl,-rpath="
155 (assoc-ref %outputs "out") "/lib"))
156
157 #:modules ((ice-9 ftw) (ice-9 match)
158 (guix build utils) (guix build gnu-build-system))
159 #:phases
160 (modify-phases %standard-phases
161 (add-before
162 'configure 'patch-lib-shells
163 (lambda _
164 ;; Filter for existing files, since some may not exist in all
165 ;; versions of python that are built with this recipe.
166 (substitute* (filter file-exists?
167 '("Lib/subprocess.py"
168 "Lib/popen2.py"
169 "Lib/distutils/tests/test_spawn.py"
170 "Lib/test/test_subprocess.py"))
171 (("/bin/sh") (which "sh")))
172
173 ;; Use zero as the timestamp in .pyc files so that builds are
174 ;; deterministic. TODO: Remove it when this variable is set in
175 ;; gnu-build-system.scm.
176 (setenv "SOURCE_DATE_EPOCH" "1")
177 #t))
178 (add-before 'configure 'do-not-record-configure-flags
179 (lambda* (#:key configure-flags #:allow-other-keys)
180 ;; Remove configure flags from the installed '_sysconfigdata.py'
181 ;; and 'Makefile' so we don't end up keeping references to the
182 ;; build tools.
183 ;;
184 ;; Preserve at least '--with-system-ffi' since otherwise the
185 ;; thing tries to build libffi, fails, and we end up with a
186 ;; Python that lacks ctypes.
187 (substitute* "configure"
188 (("^CONFIG_ARGS=.*$")
189 (format #f "CONFIG_ARGS='~a'\n"
190 (if (member "--with-system-ffi" configure-flags)
191 "--with-system-ffi"
192 ""))))
193 #t))
194 (add-before
195 'check 'pre-check
196 (lambda _
197 ;; 'Lib/test/test_site.py' needs a valid $HOME
198 (setenv "HOME" (getcwd))
199 ,@(if (string-prefix? "mips64el" (%current-system))
200
201 ;; XXX: The following test fails on mips64el.
202 '((false-if-exception
203 (delete-file "Lib/test/test_ctypes.py")))
204
205 '())
206 #t))
207 (add-after
208 'unpack 'set-source-file-times-to-1980
209 ;; XXX One of the tests uses a ZIP library to pack up some of the
210 ;; source tree, and fails with "ZIP does not support timestamps
211 ;; before 1980". Work around this by setting the file times in the
212 ;; source tree to sometime in early 1980.
213 (lambda _
214 (let ((circa-1980 (* 10 366 24 60 60)))
215 (ftw "." (lambda (file stat flag)
216 (utime file circa-1980 circa-1980)
217 #t))
218 #t)))
219 (add-after 'install 'remove-tests
220 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
221 ;; because these files are used by some libraries out there.
222 (lambda* (#:key outputs #:allow-other-keys)
223 (let ((out (assoc-ref outputs "out")))
224 (match (scandir (string-append out "/lib")
225 (lambda (name)
226 (string-prefix? "python" name)))
227 ((pythonX.Y)
228 (let ((testdir (string-append out "/lib/" pythonX.Y
229 "/test")))
230 (with-directory-excursion testdir
231 (for-each delete-file-recursively
232 (scandir testdir
233 (match-lambda
234 ((or "." "..") #f)
235 (file
236 (not
237 (string-prefix? "test_support."
238 file))))))
239 (call-with-output-file "__init__.py" (const #t))
240 #t)))))))
241 (add-before 'strip 'make-libraries-writable
242 (lambda* (#:key outputs #:allow-other-keys)
243 ;; Make .so files writable so they can be stripped.
244 (let ((out (assoc-ref outputs "out")))
245 (for-each (lambda (file)
246 (chmod file #o755))
247 (find-files (string-append out "/lib")
248 "\\.so"))
249 #t)))
250 (add-after 'install 'move-tk-inter
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; When Tkinter support is built move it to a separate output so
253 ;; that the main output doesn't contain a reference to Tcl/Tk.
254 (let ((out (assoc-ref outputs "out"))
255 (tk (assoc-ref outputs "tk")))
256 (when tk
257 (match (find-files out "tkinter.*\\.so")
258 ((tkinter.so)
259 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
260 ;; want it under TK/lib/pythonX.Y/site-packages.
261 (let* ((len (string-length out))
262 (target (string-append
263 tk "/"
264 (string-drop
265 (dirname (dirname tkinter.so))
266 len)
267 "/site-packages")))
268 (install-file tkinter.so target)
269 (delete-file tkinter.so)))))
270 #t))))))
271 (inputs
272 `(("bzip2" ,bzip2)
273 ("gdbm" ,gdbm)
274 ("libffi" ,libffi) ; for ctypes
275 ("sqlite" ,sqlite) ; for sqlite extension
276 ("openssl" ,openssl)
277 ("readline" ,readline)
278 ("zlib" ,zlib)
279 ("tcl" ,tcl)
280 ("tk" ,tk))) ; for tkinter
281 (native-inputs
282 `(("pkg-config" ,pkg-config)))
283 (native-search-paths
284 (list (search-path-specification
285 (variable "PYTHONPATH")
286 (files '("lib/python2.7/site-packages")))))
287 (home-page "http://python.org")
288 (synopsis "High-level, dynamically-typed programming language")
289 (description
290 "Python is a remarkably powerful dynamic programming language that
291is used in a wide variety of application domains. Some of its key
292distinguishing features include: clear, readable syntax; strong
293introspection capabilities; intuitive object orientation; natural
294expression of procedural code; full modularity, supporting hierarchical
295packages; exception-based error handling; and very high level dynamic
296data types.")
297 (license psfl)))
298
299;; Current 2.x version.
300(define-public python-2 python-2.7)
301
302(define-public python-3.4
303 (package (inherit python-2)
304 (version "3.4.3")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append "https://www.python.org/ftp/python/"
308 version "/Python-" version ".tar.xz"))
309 (patches (search-patches
310 "python-fix-tests.patch"
311 ;; XXX Try removing this patch for python > 3.4.3
312 "python-disable-ssl-test.patch"
313 "python-3-deterministic-build-info.patch"
314 "python-3-search-paths.patch"))
315 (patch-flags '("-p0"))
316 (sha256
317 (base32
318 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
319 (arguments (substitute-keyword-arguments (package-arguments python-2)
320 ((#:tests? _) #t)))
321 (native-search-paths
322 (list (search-path-specification
323 (variable "PYTHONPATH")
324 (files (list (string-append "lib/python"
325 (version-major+minor version)
326 "/site-packages"))))))))
327
328;; Current 3.x version.
329(define-public python-3 python-3.4)
330
331;; Current major version.
332(define-public python python-3)
333
334;; Minimal variants of Python, mostly used to break the cycle between Tk and
335;; Python (Tk -> libxcb -> Python.)
336
337(define-public python2-minimal
338 (package (inherit python-2)
339 (name "python-minimal")
340 (outputs '("out"))
341 (arguments
342 (substitute-keyword-arguments (package-arguments python-2)
343 ((#:configure-flags cf)
344 `(append ,cf '("--without-system-ffi")))))
345 (inputs '()))) ;none of the optional dependencies
346
347(define-public python-minimal
348 (package (inherit python)
349 (name "python-minimal")
350 (outputs '("out"))
351 (arguments
352 (substitute-keyword-arguments (package-arguments python)
353 ((#:configure-flags cf)
354 `(append ,cf '("--without-system-ffi")))))
355
356 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
357 ;; zlib is required by 'zipimport', used by pip.
358 (inputs `(("openssl" ,openssl)
359 ("zlib" ,zlib)))))
360
361(define* (wrap-python3 python
362 #:optional
363 (name (string-append (package-name python) "-wrapper")))
364 (package (inherit python)
365 (name name)
366 (source #f)
367 (build-system trivial-build-system)
368 (outputs '("out"))
369 (propagated-inputs `(("python" ,python)))
370 (arguments
371 `(#:modules ((guix build utils))
372 #:builder
373 (begin
374 (use-modules (guix build utils))
375 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
376 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
377 (mkdir-p bin)
378 (for-each
379 (lambda (old new)
380 (symlink (string-append python old)
381 (string-append bin "/" new)))
382 '("python3" "pydoc3" "idle3")
383 '("python" "pydoc" "idle"))))))
384 (synopsis "Wrapper for the Python 3 commands")
385 (description
386 "This package provides wrappers for the commands of Python@tie{}3.x such
387that they can be invoked under their usual name---e.g., @command{python}
388instead of @command{python3}.")))
389
390(define-public python-wrapper (wrap-python3 python))
391(define-public python-minimal-wrapper (wrap-python3 python-minimal))
392
393(define-public python-psutil
394 (package
395 (name "python-psutil")
396 (version "4.3.0")
397 (source
398 (origin
399 (method url-fetch)
400 (uri (pypi-uri "psutil" version))
401 (sha256
402 (base32
403 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
404 (build-system python-build-system)
405 (native-inputs
406 `(("python-setuptools" ,python-setuptools)))
407 (home-page "https://www.github.com/giampaolo/psutil")
408 (synopsis "Library for retrieving information on running processes")
409 (description
410 "psutil (Python system and process utilities) is a library for retrieving
411information on running processes and system utilization (CPU, memory, disks,
412network) in Python. It is useful mainly for system monitoring, profiling and
413limiting process resources and management of running processes. It implements
414many functionalities offered by command line tools such as: ps, top, lsof,
415netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
416pidof, tty, taskset, pmap.")
417 (license bsd-3)))
418
419(define-public python2-psutil
420 (package-with-python2 python-psutil))
421
422(define-public python-passlib
423 (package
424 (name "python-passlib")
425 (version "1.6.5")
426 (source
427 (origin
428 (method url-fetch)
429 (uri (pypi-uri "passlib" version))
430 (sha256
431 (base32
432 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
433 (build-system python-build-system)
434 (native-inputs
435 `(("python-nose" ,python-nose)
436 ("python-setuptools" ,python-setuptools)))
437 (inputs
438 `(("python-py-bcrypt" ,python-py-bcrypt)))
439 (arguments
440 `(#:phases
441 (alist-cons-before
442 'check 'set-PYTHON_EGG_CACHE
443 ;; some tests require access to "$HOME/.cython"
444 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
445 %standard-phases)))
446 (home-page "https://bitbucket.org/ecollins/passlib")
447 (synopsis
448 "Comprehensive password hashing framework")
449 (description
450 "Passlib is a password hashing library for Python 2 & 3, which provides
451cross-platform implementations of over 30 password hashing algorithms, as well
452as a framework for managing existing password hashes. It's designed to be
453useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
454to providing full-strength password hashing for multi-user application.")
455 (license bsd-3)))
456
457(define-public python2-passlib
458 (package-with-python2 python-passlib))
459
460(define-public python-py-bcrypt
461 (package
462 (name "python-py-bcrypt")
463 (version "0.4")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (string-append
468 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
469 version
470 ".tar.gz"))
471 (sha256
472 (base32
473 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
474 (build-system python-build-system)
475 (native-inputs
476 `(("python-setuptools" ,python-setuptools)))
477 (home-page "https://code.google.com/p/py-bcrypt")
478 (synopsis
479 "Bcrypt password hashing and key derivation")
480 (description
481 "A python wrapper of OpenBSD's Blowfish password hashing code. This
482system hashes passwords using a version of Bruce Schneier's Blowfish block
483cipher with modifications designed to raise the cost of off-line password
484cracking and frustrate fast hardware implementation. The computation cost of
485the algorithm is parametised, so it can be increased as computers get faster.
486The intent is to make a compromise of a password database less likely to
487result in an attacker gaining knowledge of the plaintext passwords (e.g. using
488John the Ripper).")
489 ;; "sha2.c" is under BSD-3;
490 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
491 ;; the rest is under ISC.
492 (license (list isc bsd-3 bsd-4))))
493
494(define-public python2-py-bcrypt
495 (package-with-python2 python-py-bcrypt))
496
497
498(define-public python-paramiko
499 (package
500 (name "python-paramiko")
501 (version "1.16.0")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (pypi-uri "paramiko" version))
506 (sha256
507 (base32
508 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
509 (build-system python-build-system)
510 (native-inputs
511 `(("python-setuptools" ,python-setuptools)))
512 (propagated-inputs
513 `(("python-pycrypto" ,python-pycrypto)))
514 (inputs
515 `(("python-ecdsa" ,python-ecdsa)))
516 (home-page "http://www.paramiko.org/")
517 (synopsis "SSHv2 protocol library")
518 (description "Paramiko is a python implementation of the SSHv2 protocol,
519providing both client and server functionality. While it leverages a Python C
520extension for low level cryptography (PyCrypto), Paramiko itself is a pure
521Python interface around SSH networking concepts.")
522 (license lgpl2.1+)))
523
524(define-public python2-paramiko
525 (package-with-python2 python-paramiko))
526
527
528(define-public python-httplib2
529 (package
530 (name "python-httplib2")
531 (version "0.9.2")
532 (source
533 (origin
534 (method url-fetch)
535 (uri (pypi-uri "httplib2" version))
536 (sha256
537 (base32
538 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
539 (build-system python-build-system)
540 (native-inputs
541 `(("python-setuptools" ,python-setuptools)))
542 (home-page "https://github.com/jcgregorio/httplib2")
543 (synopsis "Comprehensive HTTP client library")
544 (description
545 "A comprehensive HTTP client library supporting many features left out of
546other HTTP libraries.")
547 (license license:expat)))
548
549(define-public python2-httplib2
550 (package-with-python2 python-httplib2))
551
552(define-public python-ecdsa
553 (package
554 (name "python-ecdsa")
555 (version "0.13")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (string-append
560 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
561 version
562 ".tar.gz"))
563 (sha256
564 (base32
565 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
566 (build-system python-build-system)
567 (native-inputs
568 `(("python-setuptools" ,python-setuptools)))
569 (inputs
570 `(("openssl" ,openssl)))
571 (home-page
572 "http://github.com/warner/python-ecdsa")
573 (synopsis
574 "ECDSA cryptographic signature library (pure python)")
575 (description
576 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
577Curve Digital Signature Algorithm), implemented purely in Python. With this
578library, you can quickly create keypairs (signing key and verifying key), sign
579messages, and verify the signatures. The keys and signatures are very short,
580making them easy to handle and incorporate into other protocols.")
581 (license license:expat)))
582
583(define-public python2-ecdsa
584 (package-with-python2 python-ecdsa))
585
586(define-public python-ccm
587 (package
588 (name "python-ccm")
589 (version "2.1.6")
590 (source
591 (origin
592 (method url-fetch)
593 (uri (pypi-uri "ccm" version))
594 (sha256
595 (base32
596 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
597 (build-system python-build-system)
598 (native-inputs
599 `(("python-setuptools" ,python-setuptools)))
600 (inputs
601 `(("python-pyyaml" ,python-pyyaml)
602 ("python-six" ,python-six)))
603 (home-page "https://github.com/pcmanus/ccm")
604 (synopsis "Cassandra Cluster Manager")
605 (description "A script/library to create, launch and remove an Apache
606Cassandra cluster on localhost.")
607 (license asl2.0)))
608
609(define-public python2-ccm
610 (package-with-python2 python-ccm))
611
612(define-public python-pytz
613 (package
614 (name "python-pytz")
615 (version "2016.3")
616 (source
617 (origin
618 (method url-fetch)
619 (uri (pypi-uri "pytz" version ".tar.bz2"))
620 (sha256
621 (base32
622 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
623 (build-system python-build-system)
624 (arguments `(#:tests? #f)) ; no test target
625 (home-page "http://pythonhosted.org/pytz")
626 (synopsis "Python timezone library")
627 (description
628 "This library allows accurate and cross platform timezone calculations
629using Python 2.4 or higher and provides access to the Olson timezone database.")
630 (license license:expat)))
631
632(define-public python2-pytz
633 (package-with-python2 python-pytz))
634
635
636(define-public python-babel
637 (package
638 (name "python-babel")
639 (version "2.3.2")
640 (source
641 (origin
642 (method url-fetch)
643 (uri (pypi-uri "Babel" version))
644 (sha256
645 (base32
646 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
647 (build-system python-build-system)
648 (inputs
649 `(("python-pytz" ,python-pytz)
650 ("python-setuptools" ,python-setuptools)))
651 (arguments `(#:tests? #f)) ; no test target
652 (home-page "http://babel.pocoo.org/")
653 (synopsis
654 "Tools for internationalizing Python applications")
655 (description
656 "Babel is composed of two major parts:
657- tools to build and work with gettext message catalogs
658- a Python interface to the CLDR (Common Locale Data Repository), providing
659access to various locale display names, localized number and date formatting,
660etc. ")
661 (license bsd-3)))
662
663(define-public python2-babel
664 (package-with-python2 python-babel))
665
666(define-public python2-backport-ssl-match-hostname
667 (package
668 (name "python2-backport-ssl-match-hostname")
669 (version "3.5.0.1")
670 (source
671 (origin
672 (method url-fetch)
673 (uri (string-append
674 "https://pypi.python.org/packages/source/b/"
675 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
676 version ".tar.gz"))
677 (sha256
678 (base32
679 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
680 (build-system python-build-system)
681 (arguments
682 `(#:python ,python-2
683 #:tests? #f)) ; no test target
684 (inputs
685 `(("python2-setuptools" ,python2-setuptools)))
686 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
687 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
688 (description
689 "This backport brings the ssl.match_hostname() function to users of
690earlier versions of Python. The function checks the hostname in the
691certificate returned by the server to which a connection has been established,
692and verifies that it matches the intended target hostname.")
693 (license psfl)))
694
695(define-public python-h5py
696 (package
697 (name "python-h5py")
698 (version "2.6.0")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "h5py" version))
703 (sha256
704 (base32
705 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
706 (build-system python-build-system)
707 (arguments
708 `(#:tests? #f ; no test target
709 #:phases
710 (modify-phases %standard-phases
711 (add-after 'unpack 'fix-hdf5-paths
712 (lambda* (#:key inputs #:allow-other-keys)
713 (let ((prefix (assoc-ref inputs "hdf5")))
714 (substitute* "setup_build.py"
715 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
716 (string-append "['" prefix "/lib" "']"))
717 (("'/opt/local/include', '/usr/local/include'")
718 (string-append "'" prefix "/include" "'")))
719 (substitute* "setup_configure.py"
720 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
721 (string-append "['" prefix "/lib" "']")))
722 #t))))))
723 (propagated-inputs
724 `(("python-numpy" ,python-numpy)))
725 (inputs
726 `(("hdf5" ,hdf5)
727 ("python-six" ,python-six)))
728 (native-inputs
729 `(("python-cython" ,python-cython)
730 ("python-pkgconfig" ,python-pkgconfig)))
731 (home-page "http://www.h5py.org/")
732 (synopsis "Read and write HDF5 files from Python")
733 (description
734 "The h5py package provides both a high- and low-level interface to the
735HDF5 library from Python. The low-level interface is intended to be a
736complete wrapping of the HDF5 API, while the high-level component supports
737access to HDF5 files, datasets and groups using established Python and NumPy
738concepts.")
739 (license bsd-3)
740 (properties `((python2-variant . ,(delay python2-h5py))))))
741
742(define-public python2-h5py
743 (package-with-python2 (strip-python2-variant python-h5py)))
744
745(define-public python-lockfile
746 (package
747 (name "python-lockfile")
748 (version "0.12.2")
749 (source
750 (origin
751 (method url-fetch)
752 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
753 "lockfile-" version ".tar.gz"))
754 (sha256
755 (base32
756 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
757 (build-system python-build-system)
758 (arguments '(#:test-target "check"))
759 (native-inputs
760 `(("python-pbr" ,python-pbr)))
761 (home-page "http://code.google.com/p/pylockfile/")
762 (synopsis "Platform-independent file locking module")
763 (description
764 "The lockfile package exports a LockFile class which provides a simple
765API for locking files.")
766 (license license:expat)
767 (properties `((python2-variant . ,(delay python2-lockfile))))))
768
769(define-public python2-lockfile
770 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
771 (package
772 (inherit base)
773 (native-inputs `(("python2-setuptools" ,python2-setuptools)
774 ,@(package-native-inputs base))))))
775
776(define-public python-mock
777 (package
778 (name "python-mock")
779 (version "1.0.1")
780 (source
781 (origin
782 (method url-fetch)
783 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
784 "mock-" version ".tar.gz"))
785 (sha256
786 (base32
787 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
788 (build-system python-build-system)
789 (arguments '(#:test-target "check"))
790 (home-page "http://code.google.com/p/mock/")
791 (synopsis "Python mocking and patching library for testing")
792 (description
793 "Mock is a library for testing in Python. It allows you to replace parts
794of your system under test with mock objects and make assertions about how they
795have been used.")
796 (license license:expat)))
797
798(define-public python2-mock
799 (package-with-python2 python-mock))
800
801
802(define-public python-setuptools
803 (package
804 (name "python-setuptools")
805 (version "18.3.1")
806 (source
807 (origin
808 (method url-fetch)
809 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
810 version ".tar.gz"))
811 (sha256
812 (base32
813 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
814 (build-system python-build-system)
815 ;; FIXME: Tests require pytest, which itself relies on setuptools.
816 ;; One could bootstrap with an internal untested setuptools.
817 (arguments
818 `(#:tests? #f))
819 (home-page "https://pypi.python.org/pypi/setuptools")
820 (synopsis
821 "Library designed to facilitate packaging Python projects")
822 (description
823 "Setuptools is a fully-featured, stable library designed to facilitate
824packaging Python projects, where packaging includes:
825Python package and module definitions,
826distribution package metadata,
827test hooks,
828project installation,
829platform-specific details,
830Python 3 support.")
831 (license psfl)))
832
833(define-public python2-setuptools
834 (package-with-python2 python-setuptools))
835
836
837(define-public python-pycrypto
838 (package
839 (name "python-pycrypto")
840 (version "2.6.1")
841 (source
842 (origin
843 (method url-fetch)
844 (uri (string-append "https://pypi.python.org/packages/source/p/"
845 "pycrypto/pycrypto-" version ".tar.gz"))
846 (sha256
847 (base32
848 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
849 (build-system python-build-system)
850 (native-inputs
851 `(("python-setuptools" ,python-setuptools)))
852 (inputs
853 `(("python" ,python)
854 ("gmp" ,gmp)))
855 (arguments
856 `(#:phases
857 (alist-cons-before
858 'build 'set-build-env
859 ;; pycrypto runs an autoconf configure script behind the scenes
860 (lambda _
861 (setenv "CONFIG_SHELL" (which "bash")))
862 %standard-phases)))
863 (home-page "http://www.pycrypto.org/")
864 (synopsis "Cryptographic modules for Python")
865 (description
866 "Pycrypto is a collection of both secure hash functions (such as SHA256
867and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
868etc.). The package is structured to make adding new modules easy.")
869 (license public-domain)))
870
871(define-public python2-pycrypto
872 (let ((pycrypto (package-with-python2 python-pycrypto)))
873 (package (inherit pycrypto)
874 (inputs
875 `(("python" ,python-2)
876 ,@(alist-delete
877 "python"
878 (package-inputs pycrypto)))))))
879
880(define-public python-keyring
881 (package
882 (name "python-keyring")
883 (version "8.7")
884 (source
885 (origin
886 (method url-fetch)
887 (uri (pypi-uri "keyring" version))
888 (sha256
889 (base32
890 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
891 (build-system python-build-system)
892 (native-inputs
893 `(("python-setuptools-scm" ,python-setuptools-scm)))
894 (inputs
895 `(("python-pycrypto" ,python-pycrypto)))
896 (arguments
897 `(#:tests? #f)) ;TODO: tests require pytest
898 (home-page "http://bitbucket.org/kang/python-keyring-lib")
899 (synopsis "Store and access your passwords safely")
900 (description
901 "The Python keyring lib provides a easy way to access the system keyring
902service from python. It can be used in any application that needs safe
903password storage.")
904 ;; "MIT" and PSF dual license
905 (license x11)
906 (properties `((python2-variant . ,(delay python2-keyring))))))
907
908(define-public python2-keyring
909 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
910 (package
911 (inherit base)
912 (native-inputs `(("python2-setuptools" ,python2-setuptools)
913 ,@(package-native-inputs base))))))
914
915(define-public python-six
916 (package
917 (name "python-six")
918 (version "1.10.0")
919 (source
920 (origin
921 (method url-fetch)
922 (uri (pypi-uri "six" version))
923 (sha256
924 (base32
925 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
926 (build-system python-build-system)
927 (inputs
928 `(("python-setuptools" ,python-setuptools)))
929 (home-page "http://pypi.python.org/pypi/six/")
930 (synopsis "Python 2 and 3 compatibility utilities")
931 (description
932 "Six is a Python 2 and 3 compatibility library. It provides utility
933functions for smoothing over the differences between the Python versions with
934the goal of writing Python code that is compatible on both Python versions.
935Six supports every Python version since 2.5. It is contained in only one
936Python file, so it can be easily copied into your project.")
937 (license x11)))
938
939(define-public python2-six
940 (package-with-python2 python-six))
941
942(define-public python-dateutil-2
943 (package
944 (name "python-dateutil")
945 (version "2.5.2")
946 (source
947 (origin
948 (method url-fetch)
949 (uri (pypi-uri "python-dateutil" version))
950 (sha256
951 (base32
952 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
953 (build-system python-build-system)
954 (inputs
955 `(("python-six" ,python-six)))
956 (home-page "http://labix.org/python-dateutil")
957 (synopsis "Extensions to the standard datetime module")
958 (description
959 "The dateutil module provides powerful extensions to the standard
960datetime module, available in Python 2.3+.")
961 (license bsd-3)
962 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
963
964(define-public python2-dateutil-2
965 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
966 (package
967 (inherit base)
968 (inputs `(("python2-setuptools" ,python2-setuptools)
969 ,@(package-inputs base))))))
970
971(define-public python-dateutil
972 (package
973 (name "python-dateutil")
974 (version "1.5") ; last version for python < 3
975 (source
976 (origin
977 (method url-fetch)
978 (uri (string-append "http://labix.org/download/python-dateutil/"
979 "python-dateutil-" version ".tar.gz"))
980 (sha256
981 (base32
982 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
983 (build-system python-build-system)
984 (inputs
985 `(("python-setuptools" ,python-setuptools)))
986 (home-page "http://labix.org/python-dateutil")
987 (synopsis "Extensions to the standard datetime module")
988 (description
989 "The dateutil module provides powerful extensions to the standard
990datetime module, available in Python 2.3+.")
991 (license psfl)))
992
993(define-public python2-dateutil
994 (package-with-python2 python-dateutil))
995
996(define-public python-parsedatetime
997 (package
998 (name "python-parsedatetime")
999 (version "2.1")
1000 (source
1001 (origin
1002 (method url-fetch)
1003 (uri (pypi-uri "parsedatetime" version))
1004 (sha256
1005 (base32
1006 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1007 (build-system python-build-system)
1008 (native-inputs
1009 `(("python-nose" ,python-nose)
1010 ("python-pyicu" ,python-pyicu)))
1011 (home-page "http://github.com/bear/parsedatetime/")
1012 (synopsis
1013 "Parse human-readable date/time text")
1014 (description
1015 "Parse human-readable date/time text.")
1016 (license asl2.0)
1017 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
1018
1019(define-public python2-parsedatetime
1020 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1021 (package
1022 (inherit base)
1023 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1024 ,@(package-native-inputs base))))))
1025
1026(define-public python-pandas
1027 (package
1028 (name "python-pandas")
1029 (version "0.18.1")
1030 (source
1031 (origin
1032 (method url-fetch)
1033 (uri (string-append
1034 "https://pypi.python.org/packages/11/09/"
1035 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1036 "pandas-" version ".tar.gz"))
1037 (sha256
1038 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1039 (build-system python-build-system)
1040 (propagated-inputs
1041 `(("python-numpy" ,python-numpy)))
1042 (inputs
1043 `(("python-pytz" ,python-pytz)
1044 ("python-dateutil" ,python-dateutil-2)))
1045 (native-inputs
1046 `(("python-nose" ,python-nose)))
1047 (home-page "http://pandas.pydata.org")
1048 (synopsis "Data structures for data analysis, time series, and statistics")
1049 (description
1050 "Pandas is a Python package providing fast, flexible, and expressive data
1051structures designed to make working with structured (tabular,
1052multidimensional, potentially heterogeneous) and time series data both easy
1053and intuitive. It aims to be the fundamental high-level building block for
1054doing practical, real world data analysis in Python.")
1055 (license bsd-3)
1056 (properties `((python2-variant . ,(delay python2-pandas))))))
1057
1058(define-public python2-pandas
1059 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1060 (package
1061 (inherit base)
1062 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1063 ,@(package-native-inputs base))))))
1064
1065(define-public python-tzlocal
1066 (package
1067 (name "python-tzlocal")
1068 (version "1.2.2")
1069 (source
1070 (origin
1071 (method url-fetch)
1072 (uri (pypi-uri "tzlocal" version))
1073 (sha256
1074 (base32
1075 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1076 (build-system python-build-system)
1077 (inputs `(("python-pytz" ,python-pytz)))
1078 (home-page "https://github.com/regebro/tzlocal")
1079 (synopsis
1080 "Local timezone information for Python")
1081 (description
1082 "Tzlocal returns a tzinfo object with the local timezone information.
1083This module attempts to fix a glaring hole in pytz, that there is no way to
1084get the local timezone information, unless you know the zoneinfo name, and
1085under several distributions that's hard or impossible to figure out.")
1086 (license cc0)))
1087
1088(define-public python2-pysqlite
1089 (package
1090 (name "python2-pysqlite")
1091 (version "2.8.1")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (pypi-uri "pysqlite" version))
1096 (sha256
1097 (base32
1098 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1099 (build-system python-build-system)
1100 (inputs
1101 `(("sqlite" ,sqlite)))
1102 (arguments
1103 `(#:python ,python-2 ; incompatible with Python 3
1104 #:tests? #f)) ; no test target
1105 (home-page "http://github.com/ghaering/pysqlite")
1106 (synopsis "SQLite bindings for Python")
1107 (description
1108 "Pysqlite provides SQLite bindings for Python that comply to the
1109Database API 2.0T.")
1110 (license license:zlib)))
1111
1112
1113(define-public python2-mechanize
1114 (package
1115 (name "python2-mechanize")
1116 (version "0.2.5")
1117 (source
1118 (origin
1119 (method url-fetch)
1120 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1121 version ".tar.gz"))
1122 (sha256
1123 (base32
1124 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1125 (build-system python-build-system)
1126 (inputs
1127 `(("python2-setuptools" ,python2-setuptools)))
1128 (arguments
1129 `(#:python ,python-2 ; apparently incompatible with Python 3
1130 #:tests? #f))
1131 ;; test fails with message
1132 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1133 ;; (python-3.3.2) or
1134 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1135 ;; (python-2.7.5).
1136 ;; The source code is from March 2011 and probably not up-to-date
1137 ;; with respect to python unit tests.
1138 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1139 (synopsis
1140 "Stateful programmatic web browsing in Python")
1141 (description
1142 "Mechanize implements stateful programmatic web browsing in Python,
1143after Andy Lester’s Perl module WWW::Mechanize.")
1144 (license (non-copyleft "file://COPYING"
1145 "See COPYING in the distribution."))))
1146
1147
1148(define-public python-simplejson
1149 (package
1150 (name "python-simplejson")
1151 (version "3.8.2")
1152 (source
1153 (origin
1154 (method url-fetch)
1155 (uri (pypi-uri "simplejson" version))
1156 (sha256
1157 (base32
1158 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1159 (build-system python-build-system)
1160 (home-page "http://simplejson.readthedocs.org/en/latest/")
1161 (synopsis
1162 "Json library for Python")
1163 (description
1164 "JSON (JavaScript Object Notation) is a subset of JavaScript
1165syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1166format.
1167
1168Simplejson exposes an API familiar to users of the standard library marshal
1169and pickle modules. It is the externally maintained version of the json
1170library contained in Python 2.6, but maintains compatibility with Python 2.5
1171and (currently) has significant performance advantages, even without using
1172the optional C extension for speedups. Simplejson is also supported on
1173Python 3.3+.")
1174 (license x11)))
1175
1176(define-public python2-simplejson
1177 (package-with-python2 python-simplejson))
1178
1179
1180(define-public python-pyicu
1181 (package
1182 (name "python-pyicu")
1183 (version "1.9.2")
1184 (source
1185 (origin
1186 (method url-fetch)
1187 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1188 version ".tar.gz"))
1189 (sha256
1190 (base32
1191 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1192 (build-system python-build-system)
1193 (inputs
1194 `(("icu4c" ,icu4c)))
1195 (home-page "http://pyicu.osafoundation.org/")
1196 (synopsis "Python extension wrapping the ICU C++ API")
1197 (description
1198 "PyICU is a python extension wrapping the ICU C++ API.")
1199 (license x11)
1200 (properties `((python2-variant . ,(delay python2-pyicu))))))
1201
1202(define-public python2-pyicu
1203 (package
1204 (inherit (package-with-python2
1205 (strip-python2-variant python-pyicu)))
1206 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
1207
1208(define-public python2-dogtail
1209 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1210 ;; spaces in indentation" with Python 3.
1211 (package
1212 (name "python2-dogtail")
1213 (version "0.8.2")
1214 (source (origin
1215 (method url-fetch)
1216 (uri (string-append
1217 "https://fedorahosted.org/released/dogtail/dogtail-"
1218 version ".tar.gz"))
1219 (sha256
1220 (base32
1221 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1222 (build-system python-build-system)
1223 (arguments `(#:python ,python-2
1224 #:tests? #f)) ; invalid command "test"
1225 (home-page "https://fedorahosted.org/dogtail/")
1226 (synopsis "GUI test tool and automation framework written in ​Python")
1227 (description
1228 "Dogtail is a GUI test tool and automation framework written in Python.
1229It uses Accessibility (a11y) technologies to communicate with desktop
1230applications. dogtail scripts are written in Python and executed like any
1231other Python program.")
1232 (license gpl2+)))
1233
1234(define-public python2-empy
1235 (package
1236 (name "python2-empy")
1237 (version "3.3")
1238 (source (origin
1239 (method url-fetch)
1240 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1241 version ".tar.gz"))
1242 (sha256
1243 (base32
1244 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1245 (build-system python-build-system)
1246 (arguments
1247 `(#:python ,python-2
1248 #:phases (alist-replace
1249 'check
1250 (lambda _
1251 (zero? (system* "./test.sh")))
1252 %standard-phases)))
1253 (home-page "http://www.alcyone.com/software/empy/")
1254 (synopsis "Templating system for Python")
1255 (description
1256 "EmPy is a system for embedding Python expressions and statements in
1257template text; it takes an EmPy source file, processes it, and produces
1258output. This is accomplished via expansions, which are special signals to the
1259EmPy system and are set off by a special prefix (by default the at sign, @@).
1260EmPy can expand arbitrary Python expressions and statements in this way, as
1261well as a variety of special forms. Textual data not explicitly delimited in
1262this way is sent unaffected to the output, allowing Python to be used in
1263effect as a markup language. Also supported are callbacks via hooks,
1264recording and playback via diversions, and dynamic, chainable filters. The
1265system is highly configurable via command line options and embedded
1266commands.")
1267 (license lgpl2.1+)))
1268
1269(define-public python2-element-tree
1270 (package
1271 (name "python2-element-tree")
1272 (version "1.2.6")
1273 (source (origin
1274 (method url-fetch)
1275 (uri (string-append
1276 "http://effbot.org/media/downloads/elementtree-"
1277 version "-20050316.tar.gz"))
1278 (sha256
1279 (base32
1280 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1281 (build-system python-build-system)
1282 (arguments
1283 `(#:python ,python-2 ; seems to be part of Python 3
1284 #:tests? #f)) ; no 'test' sub-command
1285 (synopsis "Toolkit for XML processing in Python")
1286 (description
1287 "ElementTree is a Python library supporting lightweight XML processing.")
1288 (home-page "http://effbot.org/zone/element-index.htm")
1289 (license (x11-style "http://docs.python.org/2/license.html"
1290 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
12910.9.0 THROUGH 1.2\"."))))
1292
1293(define-public python2-pybugz
1294 (package
1295 (name "python2-pybugz")
1296 (version "0.6.11")
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append
1300 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1301 version ".tar.gz"))
1302 (sha256
1303 (base32
1304 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1305 (patches (search-patches "pybugz-stty.patch"
1306 "pybugz-encode-error.patch"))))
1307 (build-system python-build-system)
1308 (arguments
1309 `(#:python ,python-2 ; SyntaxError with Python 3
1310 #:tests? #f)) ; no 'test' sub-command
1311 (inputs `(("element-tree" ,python2-element-tree)))
1312 (synopsis "Python and command-line interface to Bugzilla")
1313 (description
1314 "PyBugz is a Python library and command-line tool to query the Bugzilla
1315bug tracking system. It is meant as an aid to speed up interaction with the
1316bug tracker.")
1317 (home-page "http://www.liquidx.net/pybugz/")
1318 (license gpl2)))
1319
1320(define-public python-enum34
1321 (package
1322 (name "python-enum34")
1323 (version "1.1.0")
1324 (source
1325 (origin
1326 (method url-fetch)
1327 (uri (pypi-uri "enum34" version))
1328 (sha256
1329 (base32
1330 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1331 (build-system python-build-system)
1332 (arguments
1333 `(#:phases
1334 (alist-replace
1335 'check
1336 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1337 %standard-phases)))
1338 (home-page "https://pypi.python.org/pypi/enum34")
1339 (synopsis "Backported Python 3.4 Enum")
1340 (description
1341 "Enum34 is the new Python stdlib enum module available in Python 3.4
1342backported for previous versions of Python from 2.4 to 3.3.")
1343 (license bsd-3)))
1344
1345(define-public python2-enum34
1346 (package-with-python2 python-enum34))
1347
1348(define-public python-parse-type
1349 (package
1350 (name "python-parse-type")
1351 (version "0.3.4")
1352 (source
1353 (origin
1354 (method url-fetch)
1355 (uri (string-append "https://pypi.python.org/packages/source/p/"
1356 "parse_type/parse_type-" version ".tar.gz"))
1357 (sha256
1358 (base32
1359 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1360 (build-system python-build-system)
1361 (inputs
1362 `(("python-setuptools" ,python-setuptools)
1363 ("python-six" ,python-six)
1364 ("python-parse" ,python-parse)))
1365 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1366 (home-page "https://github.com/jenisys/parse_type")
1367 (synopsis "Extended parse module")
1368 (description
1369 "Parse_type extends the python parse module.")
1370 (license bsd-3)))
1371
1372(define-public python-parse
1373 (package
1374 (name "python-parse")
1375 (version "1.6.6")
1376 (source
1377 (origin
1378 (method url-fetch)
1379 (uri (pypi-uri "parse" version))
1380 (sha256
1381 (base32
1382 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
1383 (build-system python-build-system)
1384 (arguments
1385 `(#:phases
1386 (alist-replace
1387 'check
1388 (lambda _ (zero? (system* "python" "test_parse.py")))
1389 %standard-phases)))
1390 (home-page "https://github.com/r1chardj0n3s/parse")
1391 (synopsis "Parse strings")
1392 (description
1393 "Parse strings using a specification based on the Python format()
1394syntax.")
1395 (license x11)))
1396
1397
1398(define-public scons
1399 (package
1400 (name "scons")
1401 (version "2.3.4")
1402 (source (origin
1403 (method url-fetch)
1404 (uri (string-append "mirror://sourceforge/scons/scons/" version
1405 "/scons-" version ".tar.gz"))
1406 (sha256
1407 (base32
1408 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1409 (build-system python-build-system)
1410 (arguments
1411 ;; With Python 3.x, fails to build with a syntax error.
1412 `(#:python ,python-2
1413 #:tests? #f)) ; no 'python setup.py test' command
1414 (home-page "http://scons.org/")
1415 (synopsis "Software construction tool written in Python")
1416 (description
1417 "SCons is a software construction tool. Think of SCons as an improved,
1418cross-platform substitute for the classic Make utility with integrated
1419functionality similar to autoconf/automake and compiler caches such as ccache.
1420In short, SCons is an easier, more reliable and faster way to build
1421software.")
1422 (license x11)))
1423
1424(define-public python-extras
1425 (package
1426 (name "python-extras")
1427 (version "0.0.3")
1428 (source
1429 (origin
1430 (method url-fetch)
1431 (uri (string-append
1432 "https://pypi.python.org/packages/source/e/extras/extras-"
1433 version ".tar.gz"))
1434 (sha256
1435 (base32
1436 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1437 (build-system python-build-system)
1438 (inputs
1439 `(("python-setuptools" ,python-setuptools)))
1440 (arguments
1441 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1442 '(#:tests? #f))
1443 (home-page "https://github.com/testing-cabal/extras")
1444 (synopsis "Useful extensions to the Python standard library")
1445 (description
1446 "Extras is a set of extensions to the Python standard library.")
1447 (license license:expat)))
1448
1449(define-public python2-extras
1450 (package-with-python2 python-extras))
1451
1452(define-public python-mimeparse
1453 (package
1454 (name "python-mimeparse")
1455 (version "0.1.4")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (string-append
1460 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1461 version ".tar.gz"))
1462 (sha256
1463 (base32
1464 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1465 (build-system python-build-system)
1466 (inputs
1467 `(("python-setuptools" ,python-setuptools)))
1468 (arguments
1469 '(#:tests? #f)) ; no setup.py test command
1470 (home-page
1471 "https://github.com/dbtsai/python-mimeparse")
1472 (synopsis "Python library for parsing MIME types")
1473 (description
1474 "Mimeparse provides basic functions for parsing MIME type names and
1475matching them against a list of media-ranges.")
1476 (license license:expat)))
1477
1478(define-public python2-mimeparse
1479 (package-with-python2 python-mimeparse))
1480
1481(define-public python-nose
1482 (package
1483 (name "python-nose")
1484 (version "1.3.7")
1485 (source
1486 (origin
1487 (method url-fetch)
1488 (uri (pypi-uri "nose" version))
1489 (sha256
1490 (base32
1491 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1492 (build-system python-build-system)
1493 (inputs
1494 `(("python-setuptools" ,python-setuptools)))
1495 (arguments
1496 '(#:tests? #f)) ; FIXME: test suite fails
1497 (home-page "http://readthedocs.org/docs/nose/")
1498 (synopsis "Python testing library")
1499 (description
1500 "Nose extends the unittest library to make testing easier.")
1501 (license lgpl2.0+)))
1502
1503(define-public python2-nose
1504 (package-with-python2 python-nose))
1505
1506(define-public python-unittest2
1507 (package
1508 (name "python-unittest2")
1509 (version "0.5.1")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (string-append
1514 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1515 version ".tar.gz"))
1516 (sha256
1517 (base32
1518 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1519 (build-system python-build-system)
1520 (inputs
1521 `(("python-setuptools" ,python-setuptools)))
1522 (home-page "http://pypi.python.org/pypi/unittest2")
1523 (synopsis "Python unit testing library")
1524 (description
1525 "Unittest2 is a replacement for the unittest module in the Python
1526standard library.")
1527 (license psfl)))
1528
1529(define-public python2-unittest2
1530 (package (inherit python-unittest2)
1531 (name "python2-unittest2")
1532 (version "0.5.1")
1533 (source
1534 (origin
1535 (method url-fetch)
1536 (uri (string-append
1537 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1538 version ".tar.gz"))
1539 (sha256
1540 (base32
1541 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1542 (inputs
1543 `(("python2-setuptools" ,python2-setuptools)))
1544 (arguments
1545 `(#:python ,python-2
1546 #:tests? #f)))) ; no setup.py test command
1547
1548(define-public python-py
1549 (package
1550 (name "python-py")
1551 (version "1.4.31")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "py" version))
1556 (sha256
1557 (base32
1558 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1559 (build-system python-build-system)
1560 (inputs
1561 `(("python-setuptools" ,python-setuptools)))
1562 (home-page "http://pylib.readthedocs.org/")
1563 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1564 (description
1565 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1566code introspection, and logging.")
1567 (license license:expat)))
1568
1569(define-public python2-py
1570 (package-with-python2 python-py))
1571
1572(define-public python-pytest
1573 (package
1574 (name "python-pytest")
1575 (version "2.7.3")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (string-append
1580 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1581 version ".tar.gz"))
1582 (sha256
1583 (base32
1584 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1585 (modules '((guix build utils)))
1586 (snippet
1587 ;; One of the tests involves the /usr directory, so it fails.
1588 '(substitute* "testing/test_argcomplete.py"
1589 (("def test_remove_dir_prefix\\(self\\):")
1590 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1591 (build-system python-build-system)
1592 (inputs
1593 `(("python-setuptools" ,python-setuptools)
1594 ("python-py" ,python-py)
1595 ("python-nose" ,python-nose)
1596 ("python-mock" ,python-mock)))
1597 (home-page "http://pytest.org")
1598 (synopsis "Python testing library")
1599 (description
1600 "Pytest is a testing tool that provides auto-discovery of test modules
1601and functions, detailed info on failing assert statements, modular fixtures,
1602and many external plugins.")
1603 (license license:expat)))
1604
1605(define-public python2-pytest
1606 (package-with-python2 python-pytest))
1607
1608(define-public python-pytest-cov
1609 (package
1610 (name "python-pytest-cov")
1611 (version "2.2.1")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (pypi-uri "pytest-cov" version))
1616 (sha256
1617 (base32
1618 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1619 (build-system python-build-system)
1620 (inputs
1621 `(("python-coverage" ,python-coverage)
1622 ("python-pytest" ,python-pytest)))
1623 (home-page "https://github.com/pytest-dev/pytest-cov")
1624 (synopsis "Pytest plugin for measuring coverage")
1625 (description
1626 "Pytest-cov produces coverage reports. It supports centralised testing and
1627distributed testing in both @code{load} and @code{each} modes. It also
1628supports coverage of subprocesses.")
1629 (license license:expat)
1630 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
1631
1632(define-public python2-pytest-cov
1633 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1634 (package
1635 (inherit base)
1636 (inputs `(("python2-setuptools" ,python2-setuptools)
1637 ,@(package-inputs base))))))
1638
1639(define-public python-pytest-runner
1640 (package
1641 (name "python-pytest-runner")
1642 (version "2.6.2")
1643 (source
1644 (origin
1645 (method url-fetch)
1646 (uri (pypi-uri "pytest-runner" version))
1647 (sha256
1648 (base32
1649 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1650 (build-system python-build-system)
1651 (arguments
1652 `(#:phases
1653 (modify-phases %standard-phases
1654 ;; The fancy way of setting the version with setuptools_scm does not
1655 ;; seem to work here.
1656 (add-after 'unpack 'set-version
1657 (lambda _
1658 (substitute* "docs/conf.py"
1659 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1660 (string-append "version = \"" ,version "\"")))
1661 #t)))))
1662 (native-inputs
1663 `(("python-pytest" ,python-pytest)
1664 ("python-setuptools-scm" ,python-setuptools-scm)))
1665 (home-page "https://github.com/pytest-dev/pytest-runner")
1666 (synopsis "Invoke py.test as a distutils command")
1667 (description
1668 "This package provides a @command{pytest-runner} command that
1669@file{setup.py} files can use to run tests.")
1670 (license license:expat)
1671 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1672
1673(define-public python2-pytest-runner
1674 (let ((base (package-with-python2
1675 (strip-python2-variant python-pytest-runner))))
1676 (package
1677 (inherit base)
1678 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1679 ,@(package-native-inputs base))))))
1680
1681(define-public python2-pytest-runner
1682 (package-with-python2 python-pytest-runner))
1683
1684(define-public python-pytest-xdist
1685 (package
1686 (name "python-pytest-xdist")
1687 (version "1.14")
1688 (source
1689 (origin
1690 (method url-fetch)
1691 (uri (pypi-uri "pytest-xdist" version ".zip"))
1692 (sha256
1693 (base32
1694 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))))
1695 (build-system python-build-system)
1696 (native-inputs
1697 `(("unzip" ,unzip)
1698 ("python-setuptools-scm" ,python-setuptools-scm)))
1699 (inputs
1700 `(("python-apipkg" ,python-apipkg)
1701 ("python-execnet" ,python-execnet)
1702 ("python-pytest" ,python-pytest)
1703 ("python-py" ,python-py)))
1704 (home-page
1705 "https://github.com/pytest-dev/pytest-xdist")
1706 (synopsis
1707 "Plugin for py.test with distributed testing and loop-on-failing modes")
1708 (description
1709 "The pytest-xdist plugin extends py.test with some unique test execution
1710modes: parallelization, running tests in boxed subprocesses, the ability
1711to run tests repeatedly when failed, and the ability to run tests on multiple
1712Python interpreters or platforms. It uses rsync to copy the existing
1713program code to a remote location, executes there, and then syncs the
1714result back.")
1715 (license license:expat)
1716 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
1717
1718(define-public python2-pytest-xdist
1719 (let ((base (package-with-python2
1720 (strip-python2-variant python-pytest-xdist))))
1721 (package
1722 (inherit base)
1723 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1724 ,@(package-native-inputs base))))))
1725
1726(define-public python-scripttest
1727 (package
1728 (name "python-scripttest")
1729 (version "1.3")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (string-append
1734 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1739 (build-system python-build-system)
1740 (inputs
1741 `(("python-setuptools" ,python-setuptools)
1742 ("python-pytest" ,python-pytest)))
1743 (home-page "http://pythonpaste.org/scripttest/")
1744 (synopsis "Python library to test command-line scripts")
1745 (description "Scripttest is a Python helper library for testing
1746interactive command-line applications. With it you can run a script in a
1747subprocess and see the output as well as any file modifications.")
1748 (license license:expat)))
1749
1750(define-public python2-scripttest
1751 (package-with-python2 python-scripttest))
1752
1753(define-public python-testtools
1754 (package
1755 (name "python-testtools")
1756 (version "1.0.0")
1757 (source
1758 (origin
1759 (method url-fetch)
1760 (uri (string-append
1761 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1762 version ".tar.gz"))
1763 (sha256
1764 (base32
1765 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1766 (build-system python-build-system)
1767 (propagated-inputs
1768 `(("python-mimeparse" ,python-mimeparse)))
1769 (inputs
1770 `(("python-setuptools" ,python-setuptools)
1771 ("python-extras" ,python-extras)))
1772 (home-page "https://github.com/testing-cabal/testtools")
1773 (synopsis
1774 "Extensions to the Python standard library unit testing framework")
1775 (description
1776 "Testtools extends the Python standard library unit testing framework to
1777provide matchers, more debugging information, and cross-Python
1778compatibility.")
1779 (license psfl)))
1780
1781(define-public python2-testtools
1782 (package-with-python2 python-testtools))
1783
1784(define-public python-testscenarios
1785 (package
1786 (name "python-testscenarios")
1787 (version "0.4")
1788 (source
1789 (origin
1790 (method url-fetch)
1791 (uri (string-append
1792 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1793 version ".tar.gz"))
1794 (sha256
1795 (base32
1796 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1797 (build-system python-build-system)
1798 (inputs
1799 `(("python-setuptools" ,python-setuptools)
1800 ("python-testtools" ,python-testtools)
1801 ("python-mimeparse" ,python-mimeparse)))
1802 (home-page "https://launchpad.net/testscenarios")
1803 (synopsis "Pyunit extension for dependency injection")
1804 (description
1805 "Testscenarios provides clean dependency injection for Python unittest
1806style tests.")
1807 (license (list bsd-3 asl2.0)))) ; at the user's option
1808
1809(define-public python2-testscenarios
1810 (package-with-python2 python-testscenarios))
1811
1812(define-public python-testresources
1813 (package
1814 (name "python-testresources")
1815 (version "0.2.7")
1816 (source
1817 (origin
1818 (method url-fetch)
1819 (uri (string-append
1820 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1821 version ".tar.gz"))
1822 (sha256
1823 (base32
1824 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1825 (build-system python-build-system)
1826 (inputs
1827 `(("python-setuptools" ,python-setuptools)))
1828 (home-page "https://launchpad.net/testresources")
1829 (synopsis
1830 "Pyunit extension for managing test resources")
1831 (description
1832 "Testresources is an extension to Python's unittest to allow declarative
1833use of resources by test cases.")
1834 (license (list bsd-3 asl2.0)))) ; at the user's option
1835
1836(define-public python2-testresources
1837 (package-with-python2 python-testresources))
1838
1839(define-public python-subunit
1840 (package
1841 (name "python-subunit")
1842 (version "0.0.21")
1843 (source
1844 (origin
1845 (method url-fetch)
1846 (uri (string-append
1847 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1848 version ".tar.gz"))
1849 (sha256
1850 (base32
1851 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1852 (build-system python-build-system)
1853 (inputs
1854 `(("python-setuptools" ,python-setuptools)
1855 ("python-testtools" ,python-testtools)
1856 ("python-mimeparse" ,python-mimeparse)
1857 ("python-testscenarios" ,python-testscenarios)))
1858 (home-page "http://launchpad.net/subunit")
1859 (synopsis "Python implementation of the subunit protocol")
1860 (description
1861 "Python-subunit is a Python implementation of the subunit test streaming
1862protocol.")
1863 (license (list bsd-3 asl2.0)))) ; at the user's option
1864
1865(define-public python2-subunit
1866 (package-with-python2 python-subunit))
1867
1868;; Recent versions of python-fixtures need a recent version of python-pbr,
1869;; which needs a recent version of python-fixtures. To fix this circular
1870;; dependency, we keep old versions of python-fixtures and python-pbr to
1871;; bootstrap the whole thing:
1872;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1873;; - python-pbr-0.11 is used to build python-fixtures
1874;; - python-fixtures is used to build python-pbr
1875(define-public python-fixtures-0.3.16
1876 (package
1877 (name "python-fixtures")
1878 (version "0.3.16")
1879 (source
1880 (origin
1881 (method url-fetch)
1882 (uri (string-append
1883 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1884 version ".tar.gz"))
1885 (sha256
1886 (base32
1887 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1888 (build-system python-build-system)
1889 (inputs
1890 `(("python-setuptools" ,python-setuptools)))
1891 (arguments
1892 '(#:tests? #f)) ; no setup.py test command
1893 (home-page "https://launchpad.net/python-fixtures")
1894 (synopsis "Python test fixture library")
1895 (description
1896 "Fixtures provides a way to create reusable state, useful when writing
1897Python tests.")
1898 (license (list bsd-3 asl2.0)))) ; at user's option
1899
1900(define-public python2-fixtures-0.3.16
1901 (package-with-python2 python-fixtures-0.3.16))
1902
1903(define-public python-pbr-0.11
1904 (package
1905 (name "python-pbr")
1906 (version "0.11.0")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (string-append
1911 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1912 version ".tar.gz"))
1913 (sha256
1914 (base32
1915 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1916 (build-system python-build-system)
1917 (arguments
1918 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1919 (inputs
1920 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1921 ("python-pip" ,python-pip)
1922 ("python-setuptools" ,python-setuptools)))
1923 (home-page "https://launchpad.net/pbr")
1924 (synopsis "Change the default behavior of Python’s setuptools")
1925 (description
1926 "Python Build Reasonableness (PBR) is a library that injects some useful
1927and sensible default behaviors into your setuptools run.")
1928 (license asl2.0)))
1929
1930(define-public python2-pbr-0.11
1931 (package-with-python2 python-pbr-0.11))
1932
1933(define-public python-pbr
1934 (package
1935 (name "python-pbr")
1936 (version "1.8.1")
1937 (source
1938 (origin
1939 (method url-fetch)
1940 (uri (string-append
1941 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1942 version
1943 ".tar.gz"))
1944 (sha256
1945 (base32
1946 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1947 (build-system python-build-system)
1948 (arguments
1949 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1950 (propagated-inputs
1951 `(("python-testrepository" ,python-testrepository)
1952 ("git" ,git))) ;; pbr actually uses the "git" binary.
1953 (inputs
1954 `(("python-fixtures" ,python-fixtures)
1955 ("python-mimeparse" ,python-mimeparse)
1956 ("python-mock" ,python-mock)
1957 ("python-setuptools" ,python-setuptools)
1958 ("python-six" ,python-six)
1959 ("python-sphinx" ,python-sphinx)
1960 ("python-testrepository" ,python-testrepository)
1961 ("python-testresources" ,python-testresources)
1962 ("python-testscenarios" ,python-testscenarios)
1963 ("python-testtools" ,python-testtools)
1964 ("python-virtualenv" ,python-virtualenv)))
1965 (home-page "https://launchpad.net/pbr")
1966 (synopsis "Change the default behavior of Python’s setuptools")
1967 (description
1968 "Python Build Reasonableness (PBR) is a library that injects some useful
1969and sensible default behaviors into your setuptools run.")
1970 (license asl2.0)))
1971
1972(define-public python2-pbr
1973 (package-with-python2 python-pbr))
1974
1975(define-public python-fixtures
1976 (package
1977 (name "python-fixtures")
1978 (version "1.4.0")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "fixtures" version))
1983 (sha256
1984 (base32
1985 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
1986 (build-system python-build-system)
1987 (propagated-inputs
1988 `(("python-six" ,python-six)
1989 ("python-pbr-0.11" ,python-pbr-0.11)))
1990 (inputs
1991 `(("python-pip" ,python-pip)
1992 ("python-setuptools" ,python-setuptools)
1993 ;; Tests
1994 ("python-testtools" ,python-testtools)))
1995 (arguments
1996 '(#:tests? #f)) ; no setup.py test command
1997 (home-page "https://launchpad.net/python-fixtures")
1998 (synopsis "Python test fixture library")
1999 (description
2000 "Fixtures provides a way to create reusable state, useful when writing
2001Python tests.")
2002 (license (list bsd-3 asl2.0)))) ; at user's option
2003
2004(define-public python2-fixtures
2005 (package-with-python2 python-fixtures))
2006
2007(define-public python-testrepository
2008 (package
2009 (name "python-testrepository")
2010 (version "0.0.20")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (string-append
2015 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2016 version ".tar.gz"))
2017 (sha256
2018 (base32
2019 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2020 (build-system python-build-system)
2021 (propagated-inputs
2022 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2023 ("python-testtools" ,python-testtools)))
2024 (inputs
2025 `(("python-setuptools" ,python-setuptools)
2026 ("python-subunit" ,python-subunit)
2027 ("python-mimeparse" ,python-mimeparse)))
2028 (home-page "https://launchpad.net/testrepository")
2029 (synopsis "Database for Python test results")
2030 (description "Testrepository provides a database of test results which can
2031be used as part of a developer's workflow to check things such as what tests
2032have failed since the last commit or what tests are currently failing.")
2033 (license (list bsd-3 asl2.0)))) ; at user's option
2034
2035(define-public python2-testrepository
2036 (package-with-python2 python-testrepository))
2037
2038(define-public python-coverage
2039 (package
2040 (name "python-coverage")
2041 (version "4.1")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "coverage" version))
2046 (sha256
2047 (base32
2048 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2049 (build-system python-build-system)
2050 (inputs
2051 `(("python-setuptools" ,python-setuptools)))
2052 (home-page "http://nedbatchelder.com/code/coverage")
2053 (synopsis "Code coverage measurement for Python")
2054 (description
2055 "Coverage measures code coverage, typically during test execution. It
2056uses the code analysis tools and tracing hooks provided in the Python standard
2057library to determine which lines are executable, and which have been
2058executed.")
2059 (license bsd-3)))
2060
2061(define-public python2-coverage
2062 (package-with-python2 python-coverage))
2063
2064(define-public python-discover
2065 (package
2066 (name "python-discover")
2067 (version "0.4.0")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (string-append
2072 "https://pypi.python.org/packages/source/d/discover/discover-"
2073 version ".tar.gz"))
2074 (sha256
2075 (base32
2076 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2077 (build-system python-build-system)
2078 (inputs
2079 `(("python-setuptools" ,python-setuptools)))
2080 (home-page "http://pypi.python.org/pypi/discover/")
2081 (synopsis
2082 "Python test discovery for unittest")
2083 (description
2084 "Discover provides test discovery for unittest, a feature that has been
2085backported from Python 2.7 for Python 2.4+.")
2086 (license bsd-3)))
2087
2088(define-public python2-discover
2089 (package-with-python2 python-discover))
2090
2091(define-public behave
2092 (package
2093 (name "behave")
2094 (version "1.2.5")
2095 (source (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "behave" version ".tar.bz2"))
2098 (sha256
2099 (base32
2100 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2101 (build-system python-build-system)
2102 (inputs
2103 `(("python-setuptools" ,python-setuptools)
2104 ("python-six" ,python-six)
2105 ("python-parse" ,python-parse)
2106 ("python-parse-type" ,python-parse-type)))
2107 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2108 ;PyHamcrest>=1.8
2109 (home-page "http://github.com/behave/behave")
2110 (synopsis "Python behavior-driven development")
2111 (description
2112 "Behave is a tool for behavior-driven development in python.
2113Behavior-driven development (or BDD) is an agile software development
2114technique that encourages collaboration between developers, QA and
2115non-technical or business participants in a software project. Behave uses
2116tests written in a natural language style, backed up by Python code.")
2117 (license x11)))
2118
2119(define-public python-exif-read
2120 (package
2121 (name "python-exif-read")
2122 (version "2.1.2")
2123 (source (origin
2124 (method url-fetch)
2125 (uri (pypi-uri "ExifRead" version))
2126 (sha256
2127 (base32
2128 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2129 (build-system python-build-system)
2130 (inputs
2131 `(("python-setuptools" ,python-setuptools)))
2132 (arguments `(#:tests? #f)) ; no tests
2133 (home-page "https://github.com/ianare/exif-py")
2134 (synopsis "Python library to extract EXIF data from image files")
2135 (description
2136 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2137files.")
2138 (license bsd-3)))
2139
2140(define-public python2-exif-read
2141 (package-with-python2 python-exif-read))
2142
2143(define-public python-pyld
2144 (package
2145 (name "python-pyld")
2146 (version "0.6.8")
2147 (source (origin
2148 (method url-fetch)
2149 (uri (pypi-uri "PyLD" version))
2150 (sha256
2151 (base32
2152 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2153 (build-system python-build-system)
2154 (inputs
2155 `(("python-setuptools" ,python-setuptools)))
2156 (arguments `(#:tests? #f)) ; no tests
2157 (home-page "http://github.com/digitalbazaar/pyld")
2158 (synopsis "Python implementation of the JSON-LD specification")
2159 (description
2160 "PyLD is an implementation of the JSON-LD specification.")
2161 (license bsd-3)))
2162
2163(define-public python2-pyld
2164 (package-with-python2 python-pyld))
2165
2166(define-public python-certifi
2167 (package
2168 (name "python-certifi")
2169 (version "2015.11.20.1")
2170 (source (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "certifi" version))
2173 (sha256
2174 (base32
2175 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
2176 (build-system python-build-system)
2177 (inputs
2178 `(("python-setuptools" ,python-setuptools)))
2179 (arguments `(#:tests? #f)) ; no tests
2180 (home-page "http://python-requests.org/")
2181 (synopsis "Python CA certificate bundle")
2182 (description
2183 "Certifi is a Python library that contains a CA certificate bundle, which
2184is used by the Requests library to verify HTTPS requests.")
2185 (license asl2.0)))
2186
2187(define-public python2-certifi
2188 (package-with-python2 python-certifi))
2189
2190(define-public python-click
2191 (package
2192 (name "python-click")
2193 (version "6.6")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (string-append
2198 "https://pypi.python.org/packages/"
2199 "7a/00/c14926d8232b36b08218067bcd5853caefb4737cda3f0a47437151344792/"
2200 "click-" version ".tar.gz"))
2201 (sha256
2202 (base32
2203 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2204 (build-system python-build-system)
2205 (native-inputs
2206 `(("python-setuptools" ,python-setuptools)))
2207 (home-page "http://click.pocoo.org")
2208 (synopsis "Command line library for Python")
2209 (description
2210 "Click is a Python package for creating command line interfaces in a
2211composable way with as little code as necessary. Its name stands for
2212\"Command Line Interface Creation Kit\". It's highly configurable but comes
2213with sensible defaults out of the box.")
2214 (license bsd-3)))
2215
2216(define-public python2-click
2217 (package-with-python2 python-click))
2218
2219(define-public python-wheel
2220 (package
2221 (name "python-wheel")
2222 (version "0.29.0")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "wheel" version))
2227 (sha256
2228 (base32
2229 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2230 (build-system python-build-system)
2231 (native-inputs
2232 `(("python-setuptools" ,python-setuptools)
2233 ("python-jsonschema" ,python-jsonschema)
2234 ("python-pytest-cov" ,python-pytest-cov)))
2235 (home-page "https://bitbucket.org/pypa/wheel/")
2236 (synopsis "Format for built Python packages")
2237 (description
2238 "A wheel is a ZIP-format archive with a specially formatted filename and
2239the @code{.whl} extension. It is designed to contain all the files for a PEP
2240376 compatible install in a way that is very close to the on-disk format. Many
2241packages will be properly installed with only the @code{Unpack} step and the
2242unpacked archive preserves enough information to @code{Spread} (copy data and
2243scripts to their final locations) at any later time. Wheel files can be
2244installed with a newer @code{pip} or with wheel's own command line utility.")
2245 (license license:expat)
2246 (properties `((python2-variant . ,(delay python2-wheel))))))
2247
2248(define-public python2-wheel
2249 (let ((wheel (package-with-python2
2250 (strip-python2-variant python-wheel))))
2251 (package (inherit wheel)
2252 (native-inputs `(("python2-functools32" ,python2-functools32)
2253 ,@(package-native-inputs wheel))))))
2254
2255
2256(define-public python-requests
2257 (package
2258 (name "python-requests")
2259 (version "2.9.1")
2260 (source (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "requests" version))
2263 (sha256
2264 (base32
2265 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2266 (build-system python-build-system)
2267 (native-inputs
2268 `(("python-setuptools" ,python-setuptools)
2269 ("python-py" ,python-py)
2270 ("python-pytest" ,python-pytest)
2271 ("python-pytest-cov" ,python-pytest-cov)
2272 ("python-wheel" ,python-wheel)))
2273 (home-page "http://python-requests.org/")
2274 (synopsis "Python HTTP library")
2275 (description
2276 "Requests is a Python HTTP client library. It aims to be easier to use
2277than Python’s urllib2 library.")
2278 (license asl2.0)))
2279
2280;; Some software requires an older version of Requests, notably Docker
2281;; Compose.
2282(define-public python-requests-2.7
2283 (package (inherit python-requests)
2284 (version "2.7.0")
2285 (source (origin
2286 (method url-fetch)
2287 (uri (pypi-uri "requests" version))
2288 (sha256
2289 (base32
2290 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2291
2292(define-public python2-requests
2293 (package-with-python2 python-requests))
2294
2295(define-public python-vcversioner
2296 (package
2297 (name "python-vcversioner")
2298 (version "2.14.0.0")
2299 (source
2300 (origin
2301 (method url-fetch)
2302 (uri (pypi-uri "vcversioner" version))
2303 (sha256
2304 (base32
2305 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2306 (build-system python-build-system)
2307 (inputs
2308 `(("python-setuptools" ,python-setuptools)))
2309 (synopsis "Python library for version number discovery")
2310 (description "Vcversioner is a Python library that inspects tagging
2311information in a variety of version control systems in order to discover
2312version numbers.")
2313 (home-page "https://github.com/habnabit/vcversioner")
2314 (license isc)))
2315
2316(define-public python2-vcversioner
2317 (package-with-python2 python-vcversioner))
2318
2319(define-public python-jsonschema
2320 (package
2321 (name "python-jsonschema")
2322 (version "2.5.1")
2323 (source (origin
2324 (method url-fetch)
2325 (uri
2326 (string-append
2327 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2328 version ".tar.gz"))
2329 (sha256
2330 (base32
2331 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2332 (build-system python-build-system)
2333 (inputs
2334 `(("python-setuptools" ,python-setuptools)
2335 ("python-vcversioner" ,python-vcversioner)))
2336 (home-page "http://github.com/Julian/jsonschema")
2337 (synopsis "Implementation of JSON Schema for Python")
2338 (description
2339 "Jsonschema is an implementation of JSON Schema for Python.")
2340 (license license:expat)
2341 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2342
2343(define-public python2-jsonschema
2344 (let ((jsonschema (package-with-python2
2345 (strip-python2-variant python-jsonschema))))
2346 (package (inherit jsonschema)
2347 (inputs
2348 `(("python2-functools32" ,python2-functools32)
2349 ,@(package-inputs jsonschema))))))
2350
2351(define-public python-unidecode
2352 (package
2353 (name "python-unidecode")
2354 (version "0.04.18")
2355 (source (origin
2356 (method url-fetch)
2357 (uri (pypi-uri "Unidecode" version))
2358 (sha256
2359 (base32
2360 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2361 (build-system python-build-system)
2362 (inputs
2363 `(("python-setuptools" ,python-setuptools)))
2364 (home-page "https://pypi.python.org/pypi/Unidecode")
2365 (synopsis "ASCII transliterations of Unicode text")
2366 (description
2367 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2368useful when integrating with legacy code that doesn't support Unicode, or for
2369ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2370machine identifiers from human-readable Unicode strings that should still be
2371somewhat intelligeble.")
2372 (license gpl2+)))
2373
2374(define-public python2-unidecode
2375 (package-with-python2 python-unidecode))
2376
2377(define-public python-pyjwt
2378 (package
2379 (name "python-pyjwt")
2380 (version "1.4.0")
2381 (source
2382 (origin
2383 (method url-fetch)
2384 (uri (pypi-uri "PyJWT" version))
2385 (sha256
2386 (base32
2387 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2388 (build-system python-build-system)
2389 (native-inputs
2390 `(("python-setuptools" ,python-setuptools)
2391 ("python-pytest-runner" ,python-pytest-runner)))
2392 (arguments
2393 '(#:tests? #f)) ; test suite doesn't work
2394 (home-page "http://github.com/progrium/pyjwt")
2395 (synopsis "JSON Web Token implementation in Python")
2396 (description
2397 "PyJWT is a JSON Web Token implementation written in Python.")
2398 (license license:expat)))
2399
2400(define-public python2-pyjwt
2401 (package-with-python2 python-pyjwt))
2402
2403(define-public python-oauthlib
2404 (package
2405 (name "python-oauthlib")
2406 (version "1.0.3")
2407 (source (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "oauthlib" version))
2410 (sha256
2411 (base32
2412 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2413 (build-system python-build-system)
2414 (native-inputs
2415 `(("python-coverage" ,python-coverage)
2416 ("python-nose" ,python-nose)
2417 ("python-mock" ,python-mock)))
2418 (inputs
2419 `(("python-blinker" ,python-blinker)
2420 ("python-cryptography" ,python-cryptography)
2421 ("python-pyjwt" ,python-pyjwt)))
2422 (home-page "https://github.com/idan/oauthlib")
2423 (synopsis "OAuth implementation for Python")
2424 (description
2425 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2426OAuth request-signing logic.")
2427 (license bsd-3)
2428 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2429
2430(define-public python2-oauthlib
2431 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2432 (package
2433 (inherit base)
2434 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2435 ("python2-unittest2" ,python2-unittest2)
2436 ,@(package-native-inputs base))))))
2437
2438(define-public python-itsdangerous
2439 (package
2440 (name "python-itsdangerous")
2441 (version "0.24")
2442 (source
2443 (origin
2444 (method url-fetch)
2445 (uri (string-append
2446 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2447 version ".tar.gz"))
2448 (sha256
2449 (base32
2450 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2451 (build-system python-build-system)
2452 (home-page "http://github.com/mitsuhiko/itsdangerous")
2453 (synopsis "Python library for passing data to/from untrusted environments")
2454 (description
2455 "Itsdangerous provides various helpers to pass trusted data to untrusted
2456environments and back.")
2457 (license bsd-3)
2458 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
2459
2460(define-public python2-itsdangerous
2461 (let ((base (package-with-python2
2462 (strip-python2-variant python-itsdangerous))))
2463 (package
2464 (inherit base)
2465 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2466 ,@(package-native-inputs base))))))
2467
2468(define-public python-pyyaml
2469 (package
2470 (name "python-pyyaml")
2471 (version "3.11")
2472 (source
2473 (origin
2474 (method url-fetch)
2475 (uri (string-append
2476 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2477 version ".tar.gz"))
2478 (sha256
2479 (base32
2480 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2481 (build-system python-build-system)
2482 (inputs
2483 `(("libyaml" ,libyaml)))
2484 (native-inputs
2485 `(("python-setuptools" ,python-setuptools)))
2486 (home-page "http://pyyaml.org/wiki/PyYAML")
2487 (synopsis "YAML parser and emitter for Python")
2488 (description
2489 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2490complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2491API, and sensible error messages. PyYAML supports standard YAML tags and
2492provides Python-specific tags that allow to represent an arbitrary Python
2493object.")
2494 (license license:expat)))
2495
2496(define-public python2-pyyaml
2497 (package-with-python2 python-pyyaml))
2498
2499(define-public python-virtualenv
2500 (package
2501 (name "python-virtualenv")
2502 (version "13.1.2")
2503 (source
2504 (origin
2505 (method url-fetch)
2506 (uri (pypi-uri "virtualenv" version))
2507 (sha256
2508 (base32
2509 "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a"))))
2510 (build-system python-build-system)
2511 (arguments
2512 `(#:phases
2513 (modify-phases %standard-phases
2514 (replace 'check
2515 (lambda _ (zero? (system* "py.test")))))))
2516 (inputs
2517 `(("python-setuptools" ,python-setuptools)
2518 ("python-mock" ,python-mock)
2519 ("python-pytest" ,python-pytest)))
2520 (home-page "https://virtualenv.pypa.io/")
2521 (synopsis "Virtual Python environment builder")
2522 (description
2523 "Virtualenv is a tool to create isolated Python environments.")
2524 (license license:expat)))
2525
2526(define-public python2-virtualenv
2527 (package-with-python2 python-virtualenv))
2528
2529(define-public python-markupsafe
2530 (package
2531 (name "python-markupsafe")
2532 (version "0.23")
2533 (source
2534 (origin
2535 (method url-fetch)
2536 (uri (string-append
2537 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2538 version ".tar.gz"))
2539 (sha256
2540 (base32
2541 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2542 (build-system python-build-system)
2543 (inputs
2544 `(("python-setuptools" ,python-setuptools)))
2545 (home-page "http://github.com/mitsuhiko/markupsafe")
2546 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2547 (description
2548 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2549for Python.")
2550 (license bsd-3)))
2551
2552(define-public python2-markupsafe
2553 (package-with-python2 python-markupsafe))
2554
2555(define-public python-jinja2
2556 (package
2557 (name "python-jinja2")
2558 (version "2.8")
2559 (source
2560 (origin
2561 (method url-fetch)
2562 (uri (pypi-uri "Jinja2" version))
2563 (sha256
2564 (base32
2565 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2566 (build-system python-build-system)
2567 (inputs
2568 `(("python-setuptools" ,python-setuptools)
2569 ("python-markupsafe" ,python-markupsafe)))
2570 (home-page "http://jinja.pocoo.org/")
2571 (synopsis "Python template engine")
2572 (description
2573 "Jinja2 is a small but fast and easy to use stand-alone template engine
2574written in pure Python.")
2575 (license bsd-3)))
2576
2577(define-public python2-jinja2
2578 (package-with-python2 python-jinja2))
2579
2580(define-public python-pystache
2581 (package
2582 (name "python-pystache")
2583 (version "0.5.4")
2584 (source (origin
2585 (method url-fetch)
2586 (uri (pypi-uri "pystache" version))
2587 (sha256
2588 (base32
2589 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2590 (build-system python-build-system)
2591 (native-inputs
2592 `(("python-setuptools" ,python-setuptools)))
2593 (home-page "http://defunkt.io/pystache/")
2594 (synopsis "Python logic-less template engine")
2595 (description
2596 "Pystache is a Python implementation of the framework agnostic,
2597logic-free templating system Mustache.")
2598 (license license:expat)))
2599
2600(define-public python2-pystache
2601 (package-with-python2 python-pystache))
2602
2603(define-public python-joblib
2604 (package
2605 (name "python-joblib")
2606 (version "0.9.0b4")
2607 (source (origin
2608 (method url-fetch)
2609 (uri (string-append "https://pypi.python.org/packages/source/"
2610 "j/joblib/joblib-" version ".tar.gz"))
2611 (sha256
2612 (base32
2613 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2614 (build-system python-build-system)
2615 (native-inputs
2616 `(("python-setuptools" ,python-setuptools)
2617 ("python-nose" ,python-nose)))
2618 (home-page "http://pythonhosted.org/joblib/")
2619 (synopsis "Using Python functions as pipeline jobs")
2620 (description
2621 "Joblib is a set of tools to provide lightweight pipelining in Python.
2622In particular, joblib offers: transparent disk-caching of the output values
2623and lazy re-evaluation (memoize pattern), easy simple parallel computing
2624logging and tracing of the execution.")
2625 (license bsd-3)))
2626
2627(define-public python2-joblib
2628 (package-with-python2 python-joblib))
2629
2630(define-public python-docutils
2631 (package
2632 (name "python-docutils")
2633 (version "0.12")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (string-append
2638 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2639 version ".tar.gz"))
2640 (sha256
2641 (base32
2642 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2643 (build-system python-build-system)
2644 (inputs
2645 `(("python-setuptools" ,python-setuptools)))
2646 (arguments
2647 '(#:tests? #f)) ; no setup.py test command
2648 (home-page "http://docutils.sourceforge.net/")
2649 (synopsis "Python Documentation Utilities")
2650 (description
2651 "Docutils is a modular system for processing documentation into useful
2652formats, such as HTML, XML, and LaTeX. For input Docutils supports
2653reStructuredText.")
2654 ;; Most of the source code is public domain, but some source files are
2655 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2656 (license (list public-domain psfl bsd-2 gpl3+))))
2657
2658(define-public python2-docutils
2659 (package-with-python2 python-docutils))
2660
2661(define-public python-pygments
2662 (package
2663 (name "python-pygments")
2664 (version "2.0.2")
2665 (source
2666 (origin
2667 (method url-fetch)
2668 (uri (pypi-uri "Pygments" version))
2669 (sha256
2670 (base32
2671 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2672 (build-system python-build-system)
2673 (inputs
2674 `(("python-setuptools" ,python-setuptools)))
2675 (home-page "http://pygments.org/")
2676 (synopsis "Syntax highlighting")
2677 (description
2678 "Pygments is a syntax highlighting package written in Python.")
2679 (license bsd-2)))
2680
2681(define-public python2-pygments
2682 (package-with-python2 python-pygments))
2683
2684(define-public python-sphinx
2685 (package
2686 (name "python-sphinx")
2687 (version "1.2.3")
2688 (source
2689 (origin
2690 (method url-fetch)
2691 (uri (string-append
2692 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2693 version ".tar.gz"))
2694 (sha256
2695 (base32
2696 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2697 (build-system python-build-system)
2698 (inputs
2699 `(("python-setuptools" ,python-setuptools)
2700 ("python-jinja2" ,python-jinja2)
2701 ("python-docutils" ,python-docutils)
2702 ("python-pygments" ,python-pygments)))
2703 (home-page "http://sphinx-doc.org/")
2704 (synopsis "Python documentation generator")
2705 (description "Sphinx is a tool that makes it easy to create documentation
2706for Python projects or other documents consisting of multiple reStructuredText
2707sources.")
2708 (license bsd-3)))
2709
2710(define-public python2-sphinx
2711 (package-with-python2 python-sphinx))
2712
2713(define-public python-sphinx-rtd-theme
2714 (package
2715 (name "python-sphinx-rtd-theme")
2716 (version "0.1.6")
2717 (source
2718 (origin
2719 (method url-fetch)
2720 (uri (string-append "https://pypi.python.org/packages/source/s/"
2721 "sphinx_rtd_theme/sphinx_rtd_theme-"
2722 version ".tar.gz"))
2723 (sha256
2724 (base32
2725 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2726 (build-system python-build-system)
2727 (arguments
2728 `(;; With standard flags, the install phase attempts to create a zip'd
2729 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2730 ;; before 1980'
2731 #:configure-flags '("--single-version-externally-managed"
2732 "--record=sphinx-rtd-theme.txt")))
2733 (native-inputs
2734 `(("python-setuptools" ,python-setuptools)))
2735 (inputs
2736 `(("python-docutils" ,python-docutils)
2737 ("python-sphinx" ,python-sphinx)))
2738 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2739 (synopsis "ReadTheDocs.org theme for Sphinx")
2740 (description "A theme for Sphinx used by ReadTheDocs.org.")
2741 (license license:expat)))
2742
2743(define-public python2-sphinx-rtd-theme
2744 (package-with-python2 python-sphinx-rtd-theme))
2745
2746(define-public python-feedgenerator
2747 (package
2748 (name "python-feedgenerator")
2749 (version "1.8")
2750 (source
2751 (origin
2752 (method url-fetch)
2753 (uri (pypi-uri "feedgenerator" version))
2754 (sha256
2755 (base32
2756 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2757 (build-system python-build-system)
2758 (native-inputs
2759 `(("python-setuptools" ,python-setuptools)
2760 ("python-pytz" ,python-pytz)
2761 ("python-six" ,python-six)))
2762 (home-page "https://github.com/getpelican/feedgenerator")
2763 (synopsis
2764 "Standalone version of Django's Atom/RSS feed generator")
2765 (description
2766 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2767which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2768 (license bsd-3)))
2769
2770(define-public python2-feedgenerator
2771 (package-with-python2 python-feedgenerator))
2772
2773(define-public python-blinker
2774 (package
2775 (name "python-blinker")
2776 (version "1.4")
2777 (source
2778 (origin
2779 (method url-fetch)
2780 (uri (pypi-uri "blinker" version))
2781 (sha256
2782 (base32
2783 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2784 (build-system python-build-system)
2785 (native-inputs
2786 `(("python-setuptools" ,python-setuptools)))
2787 ;; No "test" command supplied to setuptools, so unless there's another way
2788 ;; to run tests, we're skipping them!
2789 (arguments '(#:tests? #f))
2790 (home-page "http://pythonhosted.org/blinker/")
2791 (synopsis "Fast, simple object-to-object and broadcast signaling")
2792 (description
2793 "Blinker provides a fast dispatching system that allows any number of
2794interested parties to subscribe to events, or \"signals\".")
2795 (license license:expat)))
2796
2797(define-public python2-blinker
2798 (package-with-python2 python-blinker))
2799
2800(define-public pelican
2801 (package
2802 (name "pelican")
2803 (version "3.6.3")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "pelican" version))
2808 (sha256
2809 (base32
2810 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2811 (build-system python-build-system)
2812 (inputs
2813 `(("python-feedgenerator" ,python-feedgenerator)
2814 ("python-jinja2" ,python-jinja2)
2815 ("python-pygments" ,python-pygments)
2816 ("python-docutils" ,python-docutils)
2817 ("python-pytz" ,python-pytz)
2818 ("python-blinker" ,python-blinker)
2819 ("python-unidecode" ,python-unidecode)
2820 ("python-six" ,python-six)
2821 ("python-dateutil-2" ,python-dateutil-2)))
2822 (home-page "http://getpelican.com/")
2823 (arguments
2824 `(;; XXX Requires a lot more packages to do unit tests :P
2825 #:tests? #f
2826 #:phases (modify-phases %standard-phases
2827 (add-before
2828 'install 'adjust-requires
2829 ;; Since feedgenerator is installed from git, it doesn't
2830 ;; conform to the version requirements.
2831 ;;
2832 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2833 ;; version requirement so setuptools doesn't get confused.
2834 (lambda _
2835 (substitute* "setup.py"
2836 (("['\"]feedgenerator.*?['\"]")
2837 "'feedgenerator'")))))))
2838 (synopsis "Python-based static site publishing system")
2839 (description
2840 "Pelican is a tool to generate a static blog from reStructuredText,
2841Markdown input files, and more. Pelican uses Jinja2 for templating
2842and is very extensible.")
2843 (license agpl3+)))
2844
2845(define-public python-scikit-learn
2846 (package
2847 (name "python-scikit-learn")
2848 (version "0.16.1")
2849 (source
2850 (origin
2851 (method url-fetch)
2852 (uri (string-append
2853 "https://github.com/scikit-learn/scikit-learn/archive/"
2854 version ".tar.gz"))
2855 (sha256
2856 (base32
2857 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2858 (build-system python-build-system)
2859 (arguments
2860 `(#:phases
2861 (alist-cons-before
2862 'check 'set-HOME
2863 ;; some tests require access to "$HOME"
2864 (lambda _ (setenv "HOME" "/tmp"))
2865 ;; Tests can only be run after the library has been installed and not
2866 ;; within the source directory.
2867 (alist-cons-after
2868 'install 'check
2869 (lambda _
2870 (with-directory-excursion "/tmp"
2871 ;; With Python 3 one test of 3334 fails
2872 ;; (sklearn.tests.test_common.test_transformers); see
2873 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2874 (system* "nosetests" "-v" "sklearn")))
2875 (alist-delete 'check %standard-phases)))))
2876 (inputs
2877 `(("openblas" ,openblas)
2878 ("python-nose" ,python-nose)))
2879 (propagated-inputs
2880 `(("python-numpy" ,python-numpy)
2881 ("python-scipy" ,python-scipy)))
2882 (home-page "http://scikit-learn.org/")
2883 (synopsis "Machine Learning in Python")
2884 (description
2885 "Scikit-learn provides simple and efficient tools for data
2886mining and data analysis.")
2887 (license bsd-3)))
2888
2889(define-public python2-scikit-learn
2890 (let ((scikit (package-with-python2 python-scikit-learn)))
2891 (package (inherit scikit)
2892 (propagated-inputs
2893 `(("python2-numpy" ,python2-numpy)
2894 ("python2-scipy" ,python2-scipy)
2895 ,@(alist-delete
2896 "python-numpy"
2897 (alist-delete
2898 "python-scipy" (package-propagated-inputs scikit))))))))
2899
2900(define-public python-scikit-image
2901 (package
2902 (name "python-scikit-image")
2903 (version "0.11.3")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (string-append
2908 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2909 version ".tar.gz"))
2910 (sha256
2911 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2912 (build-system python-build-system)
2913 (propagated-inputs
2914 `(("python-matplotlib" ,python-matplotlib)
2915 ("python-networkx" ,python-networkx)
2916 ("python-numpy" ,python-numpy)
2917 ("python-scipy" ,python-scipy)
2918 ("python-six" ,python-six)
2919 ("python-pillow" ,python-pillow)))
2920 (native-inputs
2921 `(("python-cython" ,python-cython)
2922 ("python-setuptools" ,python-setuptools)))
2923 (home-page "http://scikit-image.org/")
2924 (synopsis "Image processing in Python")
2925 (description
2926 "Scikit-image is a collection of algorithms for image processing.")
2927 (license bsd-3)))
2928
2929(define-public python2-scikit-image
2930 (let ((scikit-image (package-with-python2 python-scikit-image)))
2931 (package (inherit scikit-image)
2932 (native-inputs
2933 `(("python2-mock" ,python2-mock)
2934 ,@(package-native-inputs scikit-image)))
2935 (propagated-inputs
2936 `(("python2-pytz" ,python2-pytz)
2937 ("python2-matplotlib" ,python2-matplotlib)
2938 ("python2-numpy" ,python2-numpy)
2939 ("python2-scipy" ,python2-scipy)
2940 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2941 '("python-matplotlib" "python-numpy" "python-scipy")))))))
2942
2943(define-public python-redis
2944 (package
2945 (name "python-redis")
2946 (version "2.10.3")
2947 (source
2948 (origin
2949 (method url-fetch)
2950 (uri (string-append
2951 "https://pypi.python.org/packages/source/r/redis/redis-"
2952 version ".tar.gz"))
2953 (sha256
2954 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2955 (build-system python-build-system)
2956 ;; Tests require a running Redis server
2957 (arguments '(#:tests? #f))
2958 (native-inputs
2959 `(("python-setuptools" ,python-setuptools)
2960 ("python-pytest" ,python-pytest)))
2961 (home-page "https://github.com/andymccurdy/redis-py")
2962 (synopsis "Redis Python client")
2963 (description
2964 "This package provides a Python interface to the Redis key-value store.")
2965 (license license:expat)))
2966
2967(define-public python2-redis
2968 (package-with-python2 python-redis))
2969
2970(define-public python-rq
2971 (package
2972 (name "python-rq")
2973 (version "0.5.2")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (string-append
2978 "https://pypi.python.org/packages/source/r/rq/rq-"
2979 version ".tar.gz"))
2980 (sha256
2981 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2982 (build-system python-build-system)
2983 (propagated-inputs
2984 `(("python-click" ,python-click)
2985 ("python-redis" ,python-redis)))
2986 (native-inputs
2987 `(("python-setuptools" ,python-setuptools)))
2988 (home-page "http://python-rq.org/")
2989 (synopsis "Simple job queues for Python")
2990 (description
2991 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2992processing them in the background with workers. It is backed by Redis and it
2993is designed to have a low barrier to entry.")
2994 (license bsd-2)))
2995
2996(define-public python2-rq
2997 (package-with-python2 python-rq))
2998
2999(define-public python-cython
3000 (package
3001 (name "python-cython")
3002 (version "0.24")
3003 (source
3004 (origin
3005 (method url-fetch)
3006 (uri (pypi-uri "Cython" version))
3007 (sha256
3008 (base32
3009 "1wd3q97gia3zhsgcdlvxh26hkrf3m53i6r1l4g0yya119264vr3d"))))
3010 (build-system python-build-system)
3011 ;; we need the full python package and not just the python-wrapper
3012 ;; because we need libpython3.3m.so
3013 (inputs
3014 `(("python" ,python)))
3015 (arguments
3016 `(#:phases
3017 (alist-cons-before
3018 'check 'set-HOME
3019 ;; some tests require access to "$HOME/.cython"
3020 (lambda* _ (setenv "HOME" "/tmp"))
3021 (alist-replace
3022 'check
3023 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
3024 %standard-phases))))
3025 (home-page "http://cython.org/")
3026 (synopsis "C extensions for Python")
3027 (description "Cython is an optimising static compiler for both the Python
3028programming language and the extended Cython programming language. It makes
3029writing C extensions for Python as easy as Python itself.")
3030 (license asl2.0)
3031 (properties `((python2-variant . ,(delay python2-cython))))))
3032
3033(define-public python2-cython
3034 (package (inherit (package-with-python2
3035 (strip-python2-variant python-cython)))
3036 (name "python2-cython")
3037 (inputs
3038 `(("python-2" ,python-2))))) ; this is not automatically changed
3039
3040;; This version of numpy is missing the documentation and is only used to
3041;; build matplotlib which is required to build numpy's documentation.
3042(define python-numpy-bootstrap
3043 (package
3044 (name "python-numpy-bootstrap")
3045 (version "1.10.4")
3046 (source
3047 (origin
3048 (method url-fetch)
3049 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3050 "/numpy-" version ".tar.gz"))
3051 (sha256
3052 (base32
3053 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3054 (build-system python-build-system)
3055 (inputs
3056 `(("python-nose" ,python-nose)
3057 ("openblas" ,openblas)
3058 ("lapack" ,lapack)))
3059 (native-inputs
3060 `(("gfortran" ,gfortran)))
3061 (arguments
3062 `(#:phases
3063 (alist-cons-before
3064 'build 'set-environment-variables
3065 (lambda* (#:key inputs #:allow-other-keys)
3066 (call-with-output-file "site.cfg"
3067 (lambda (port)
3068 (format port
3069 "[openblas]
3070libraries = openblas
3071library_dirs = ~a/lib
3072include_dirs = ~a/include
3073
3074[lapack]
3075lapack_libs = lapack
3076library_dirs = ~a/lib
3077include_dirs = ~a/include
3078"
3079 (assoc-ref inputs "openblas")
3080 (assoc-ref inputs "openblas")
3081 (assoc-ref inputs "lapack")
3082 (assoc-ref inputs "lapack"))))
3083 ;; Use "gcc" executable, not "cc".
3084 (substitute* "numpy/distutils/system_info.py"
3085 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3086 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3087 #t)
3088 ;; Tests can only be run after the library has been installed and not
3089 ;; within the source directory.
3090 (alist-cons-after
3091 'install 'check
3092 (lambda _
3093 (with-directory-excursion "/tmp"
3094 (zero? (system* "python" "-c"
3095 "import numpy; numpy.test(verbose=2)"))))
3096 (alist-delete
3097 'check
3098 %standard-phases)))))
3099 (home-page "http://www.numpy.org/")
3100 (synopsis "Fundamental package for scientific computing with Python")
3101 (description "NumPy is the fundamental package for scientific computing
3102with Python. It contains among other things: a powerful N-dimensional array
3103object, sophisticated (broadcasting) functions, tools for integrating C/C++
3104and Fortran code, useful linear algebra, Fourier transform, and random number
3105capabilities.")
3106 (license bsd-3)))
3107
3108(define python2-numpy-bootstrap
3109 (package-with-python2 python-numpy-bootstrap))
3110
3111(define-public python2-fastlmm
3112 (package
3113 (name "python2-fastlmm")
3114 (version "0.2.21")
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (pypi-uri "fastlmm" version ".zip"))
3119 (sha256
3120 (base32
3121 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3122 (build-system python-build-system)
3123 (arguments
3124 `(#:python ,python-2)) ; only Python 2.7 is supported
3125 (propagated-inputs
3126 `(("python2-numpy" ,python2-numpy)
3127 ("python2-scipy" ,python2-scipy)
3128 ("python2-matplotlib" ,python2-matplotlib)
3129 ("python2-pandas" ,python2-pandas)
3130 ("python2-scikit-learn" ,python2-scikit-learn)
3131 ("python2-cython" ,python2-cython)
3132 ("python2-pysnptools" ,python2-pysnptools)))
3133 (native-inputs
3134 `(("unzip" ,unzip)
3135 ("python2-mock" ,python2-mock)
3136 ("python2-setuptools" ,python2-setuptools)))
3137 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3138 (synopsis "Perform genome-wide association studies on large data sets")
3139 (description
3140 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3141Models, is a program for performing both single-SNP and SNP-set genome-wide
3142association studies (GWAS) on extremely large data sets.")
3143 (license asl2.0)))
3144
3145(define-public python-numpy
3146 (package (inherit python-numpy-bootstrap)
3147 (name "python-numpy")
3148 (outputs '("out" "doc"))
3149 (inputs
3150 `(("which" ,which)
3151 ("python-setuptools" ,python-setuptools)
3152 ("python-matplotlib" ,python-matplotlib)
3153 ("python-sphinx" ,python-sphinx)
3154 ("python-pyparsing" ,python-pyparsing)
3155 ("python-numpydoc" ,python-numpydoc)
3156 ,@(package-inputs python-numpy-bootstrap)))
3157 (native-inputs
3158 `(("pkg-config" ,pkg-config)
3159 ("texlive" ,texlive)
3160 ("texinfo" ,texinfo)
3161 ("perl" ,perl)
3162 ,@(package-native-inputs python-numpy-bootstrap)))
3163 (arguments
3164 `(,@(substitute-keyword-arguments
3165 (package-arguments python-numpy-bootstrap)
3166 ((#:phases phases)
3167 `(alist-cons-after
3168 'install 'install-doc
3169 (lambda* (#:key outputs #:allow-other-keys)
3170 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3171 (doc (string-append
3172 data "/doc/" ,name "-"
3173 ,(package-version python-numpy-bootstrap)))
3174 (info (string-append data "/info"))
3175 (html (string-append doc "/html"))
3176 (pyver ,(string-append "PYVER=")))
3177 (with-directory-excursion "doc"
3178 (mkdir-p html)
3179 (system* "make" "html" pyver)
3180 (system* "make" "latex" "PAPER=a4" pyver)
3181 (system* "make" "-C" "build/latex"
3182 "all-pdf" "PAPER=a4" pyver)
3183 ;; FIXME: Generation of the info file fails.
3184 ;; (system* "make" "info" pyver)
3185 ;; (mkdir-p info)
3186 ;; (copy-file "build/texinfo/numpy.info"
3187 ;; (string-append info "/numpy.info"))
3188 (for-each (lambda (file)
3189 (copy-file (string-append "build/latex" file)
3190 (string-append doc file)))
3191 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3192 (with-directory-excursion "build/html"
3193 (for-each (lambda (file)
3194 (let* ((dir (dirname file))
3195 (tgt-dir (string-append html "/" dir)))
3196 (unless (equal? "." dir)
3197 (mkdir-p tgt-dir))
3198 (install-file file html)))
3199 (find-files "." ".*"))))))
3200 ,phases)))))))
3201
3202(define-public python2-numpy
3203 (package-with-python2 python-numpy))
3204
3205(define-public python-pyparsing
3206 (package
3207 (name "python-pyparsing")
3208 (version "2.0.3")
3209 (source
3210 (origin
3211 (method url-fetch)
3212 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3213 "/pyparsing-" version
3214 "/pyparsing-" version ".tar.gz"))
3215 (sha256
3216 (base32
3217 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3218 (build-system python-build-system)
3219 (outputs '("out" "doc"))
3220 (arguments
3221 `(#:tests? #f ; no test target
3222 #:modules ((guix build python-build-system)
3223 (guix build utils))
3224 #:phases
3225 (alist-cons-after
3226 'install 'install-doc
3227 (lambda* (#:key outputs #:allow-other-keys)
3228 (let* ((doc (string-append (assoc-ref outputs "doc")
3229 "/share/doc/" ,name "-" ,version))
3230 (html-doc (string-append doc "/html"))
3231 (examples (string-append doc "/examples")))
3232 (mkdir-p html-doc)
3233 (mkdir-p examples)
3234 (for-each
3235 (lambda (dir tgt)
3236 (map (lambda (file)
3237 (install-file file tgt))
3238 (find-files dir ".*")))
3239 (list "docs" "htmldoc" "examples")
3240 (list doc html-doc examples))))
3241 %standard-phases)))
3242 (home-page "http://pyparsing.wikispaces.com")
3243 (synopsis "Python parsing class library")
3244 (description
3245 "The pyparsing module is an alternative approach to creating and
3246executing simple grammars, vs. the traditional lex/yacc approach, or the use
3247of regular expressions. The pyparsing module provides a library of classes
3248that client code uses to construct the grammar directly in Python code.")
3249 (license license:expat)))
3250
3251(define-public python2-pyparsing
3252 (package-with-python2 python-pyparsing))
3253
3254(define-public python-numpydoc
3255 (package
3256 (name "python-numpydoc")
3257 (version "0.5")
3258 (source
3259 (origin
3260 (method url-fetch)
3261 (uri (string-append
3262 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3263 version ".tar.gz"))
3264 (sha256
3265 (base32
3266 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3267 (modules '((guix build utils)))
3268 (snippet
3269 '(begin
3270 ;; Drop a test requiring matplotlib, which we cannot add as an
3271 ;; input since it would create a circular dependency: Extend the
3272 ;; test for Python 3, where it is already dropped, to Python 2.
3273 (substitute* "numpydoc/tests/test_plot_directive.py"
3274 (("3") "2"))))))
3275 (build-system python-build-system)
3276 (inputs
3277 `(("python-setuptools" ,python-setuptools)
3278 ("python-docutils" ,python-docutils)
3279 ("python-sphinx" ,python-sphinx)
3280 ("python-nose" ,python-nose)))
3281 (home-page "https://pypi.python.org/pypi/numpydoc")
3282 (synopsis
3283 "Numpy's Sphinx extensions")
3284 (description
3285 "Sphinx extension to support docstrings in Numpy format.")
3286 (license bsd-2)))
3287
3288(define-public python2-numpydoc
3289 (package-with-python2 python-numpydoc))
3290
3291(define-public python-numexpr
3292 (package
3293 (name "python-numexpr")
3294 (version "2.6.0")
3295 (source
3296 (origin
3297 (method url-fetch)
3298 (uri (pypi-uri "numexpr" version))
3299 (sha256
3300 (base32
3301 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3302 (build-system python-build-system)
3303 (arguments `(#:tests? #f)) ; no tests included
3304 (propagated-inputs
3305 `(("python-numpy" ,python-numpy)))
3306 (home-page "https://github.com/pydata/numexpr")
3307 (synopsis "Fast numerical expression evaluator for NumPy")
3308 (description
3309 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3310expressions that operate on arrays are accelerated and use less memory than
3311doing the same calculation in Python. In addition, its multi-threaded
3312capabilities can make use of all your cores, which may accelerate
3313computations, most specially if they are not memory-bounded (e.g. those using
3314transcendental functions).")
3315 (license license:expat)))
3316
3317(define-public python2-numexpr
3318 (let ((numexpr (package-with-python2 python-numexpr)))
3319 (package (inherit numexpr)
3320 ;; Make sure to use special packages for Python 2 instead
3321 ;; of those automatically rewritten by package-with-python2.
3322 (propagated-inputs
3323 `(("python2-numpy" ,python2-numpy)
3324 ,@(alist-delete "python-numpy"
3325 (package-propagated-inputs numexpr)))))))
3326
3327(define-public python-matplotlib
3328 (package
3329 (name "python-matplotlib")
3330 (version "1.4.3")
3331 (source
3332 (origin
3333 (method url-fetch)
3334 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3335 "/matplotlib-" version
3336 "/matplotlib-" version ".tar.gz"))
3337 (sha256
3338 (base32
3339 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3340 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3341 (build-system python-build-system)
3342 (outputs '("out" "doc"))
3343 (propagated-inputs ; the following packages are all needed at run time
3344 `(("python-pyparsing" ,python-pyparsing)
3345 ("python-pygobject" ,python-pygobject)
3346 ("gobject-introspection" ,gobject-introspection)
3347 ("python-tkinter" ,python "tk")
3348 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3349 ;; from 'gtk+') provides the required 'typelib' files used by
3350 ;; 'gobject-introspection'. The location of these files is set with the
3351 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3352 ;; is done automatically by a 'native-search-path' procedure. However,
3353 ;; at run-time the user must set this variable as follows:
3354 ;;
3355 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3356 ("gtk+" ,gtk+)
3357 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3358 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3359 ;; object. For this reason we need to import both libraries.
3360 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3361 ("python-pycairo" ,python-pycairo)
3362 ("python-cairocffi" ,python-cairocffi)))
3363 (inputs
3364 `(("python-setuptools" ,python-setuptools)
3365 ("python-dateutil" ,python-dateutil-2)
3366 ("python-six" ,python-six)
3367 ("python-pytz" ,python-pytz)
3368 ("python-numpy" ,python-numpy-bootstrap)
3369 ("python-sphinx" ,python-sphinx)
3370 ("python-numpydoc" ,python-numpydoc)
3371 ("python-nose" ,python-nose)
3372 ("python-mock" ,python-mock)
3373 ("libpng" ,libpng)
3374 ("imagemagick" ,imagemagick)
3375 ("freetype" ,freetype)
3376 ("cairo" ,cairo)
3377 ("glib" ,glib)
3378 ("python-pillow" ,python-pillow)
3379 ;; FIXME: Add backends when available.
3380 ;("python-wxpython" ,python-wxpython)
3381 ;("python-pyqt" ,python-pyqt)
3382 ("tcl" ,tcl)
3383 ("tk" ,tk)))
3384 (native-inputs
3385 `(("pkg-config" ,pkg-config)
3386 ("texlive" ,texlive)
3387 ("texinfo" ,texinfo)))
3388 (arguments
3389 `(#:phases
3390 (alist-cons-before
3391 'build 'configure-environment
3392 (lambda* (#:key outputs inputs #:allow-other-keys)
3393 (let ((cairo (assoc-ref inputs "cairo"))
3394 (gtk+ (assoc-ref inputs "gtk+")))
3395 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3396 ;; has not effect.
3397 (setenv "LD_LIBRARY_PATH"
3398 (string-append cairo "/lib:" gtk+ "/lib"))
3399 (setenv "HOME" (getcwd))
3400 (call-with-output-file "setup.cfg"
3401 (lambda (port)
3402 (format port "[directories]~%
3403basedirlist = ~a,~a~%
3404 [rc_options]~%
3405backend = TkAgg~%"
3406 (assoc-ref inputs "tcl")
3407 (assoc-ref inputs "tk"))))))
3408 (alist-cons-after
3409 'install 'install-doc
3410 (lambda* (#:key outputs #:allow-other-keys)
3411 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3412 (doc (string-append data "/doc/" ,name "-" ,version))
3413 (info (string-append data "/info"))
3414 (html (string-append doc "/html")))
3415 (with-directory-excursion "doc"
3416 ;; Produce pdf in 'A4' format.
3417 (substitute* (find-files "." "conf\\.py")
3418 (("latex_paper_size = 'letter'")
3419 "latex_paper_size = 'a4'"))
3420 (mkdir-p html)
3421 (mkdir-p info)
3422 ;; The doc recommends to run the 'html' target twice.
3423 (system* "python" "make.py" "html")
3424 (system* "python" "make.py" "html")
3425 (copy-recursively "build/html" html)
3426 (system* "python" "make.py" "latex")
3427 (system* "python" "make.py" "texinfo")
3428 (symlink (string-append html "/_images")
3429 (string-append info "/matplotlib-figures"))
3430 (with-directory-excursion "build/texinfo"
3431 (substitute* "matplotlib.texi"
3432 (("@image\\{([^,]*)" all file)
3433 (string-append "@image{matplotlib-figures/" file)))
3434 (symlink (string-append html "/_images")
3435 "./matplotlib-figures")
3436 (system* "makeinfo" "--no-split"
3437 "-o" "matplotlib.info" "matplotlib.texi"))
3438 (copy-file "build/texinfo/matplotlib.info"
3439 (string-append info "/matplotlib.info"))
3440 (copy-file "build/latex/Matplotlib.pdf"
3441 (string-append doc "/Matplotlib.pdf")))))
3442 %standard-phases))))
3443 (home-page "http://matplotlib.org")
3444 (synopsis "2D plotting library for Python")
3445 (description
3446 "Matplotlib is a Python 2D plotting library which produces publication
3447quality figures in a variety of hardcopy formats and interactive environments
3448across platforms. Matplotlib can be used in Python scripts, the python and
3449ipython shell, web application servers, and six graphical user interface
3450toolkits.")
3451 (license psfl)
3452 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3453
3454(define-public python2-matplotlib
3455 (let ((matplotlib (package-with-python2
3456 (strip-python2-variant python-matplotlib))))
3457 (package (inherit matplotlib)
3458 ;; Make sure to use special packages for Python 2 instead
3459 ;; of those automatically rewritten by package-with-python2.
3460 (propagated-inputs
3461 `(("python2-pycairo" ,python2-pycairo)
3462 ("python2-pygobject-2" ,python2-pygobject-2)
3463 ("python2-tkinter" ,python-2 "tk")
3464 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3465 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3466
3467(define-public python2-pysnptools
3468 (package
3469 (name "python2-pysnptools")
3470 (version "0.3.9")
3471 (source
3472 (origin
3473 (method url-fetch)
3474 (uri (pypi-uri "pysnptools" version ".zip"))
3475 (sha256
3476 (base32
3477 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3478 (build-system python-build-system)
3479 (arguments
3480 `(#:python ,python-2)) ; only Python 2.7 is supported
3481 (propagated-inputs
3482 `(("python2-numpy" ,python2-numpy)
3483 ("python2-scipy" ,python2-scipy)
3484 ("python2-pytz" ,python2-pytz)
3485 ("python2-cython" ,python2-cython)))
3486 (inputs
3487 `(("python2-dateutil-2" ,python2-dateutil-2)
3488 ("python2-pandas" ,python2-pandas)
3489 ("python2-six" ,python2-six)))
3490 (native-inputs
3491 `(("unzip" ,unzip)
3492 ("python2-setuptools" ,python2-setuptools)))
3493 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3494 (synopsis "Library for reading and manipulating genetic data")
3495 (description
3496 "PySnpTools is a library for reading and manipulating genetic data. It
3497can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3498those files. It can also efficiently manipulate ranges of integers using set
3499operators such as union, intersection, and difference.")
3500 (license asl2.0)))
3501
3502(define-public python-rpy2
3503 (package
3504 (name "python-rpy2")
3505 (version "2.7.6")
3506 (source
3507 (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "rpy2" version))
3510 (sha256
3511 (base32
3512 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3513 (build-system python-build-system)
3514 (inputs
3515 `(("python-six" ,python-six)
3516 ("readline" ,readline)
3517 ("icu4c" ,icu4c)
3518 ("pcre" ,pcre)
3519 ("r" ,r)))
3520 (native-inputs
3521 `(("python-setuptools" ,python-setuptools)
3522 ("zlib" ,zlib)))
3523 (home-page "http://rpy.sourceforge.net/")
3524 (synopsis "Python interface to the R language")
3525 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3526low-level interface to R from Python, a proposed high-level interface,
3527including wrappers to graphical libraries, as well as R-like structures and
3528functions.")
3529 (license gpl3+)))
3530
3531(define-public python2-rpy2
3532 (let ((rpy2 (package-with-python2 python-rpy2)))
3533 (package (inherit rpy2)
3534 (native-inputs
3535 `(("python2-singledispatch" ,python2-singledispatch)
3536 ,@(package-native-inputs rpy2))))))
3537
3538(define-public python-scipy
3539 (package
3540 (name "python-scipy")
3541 (version "0.16.0")
3542 (source
3543 (origin
3544 (method url-fetch)
3545; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3546 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3547 "/scipy-" version ".tar.xz"))
3548 (sha256
3549 (base32
3550 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3551 (build-system python-build-system)
3552 (propagated-inputs
3553 `(("python-numpy" ,python-numpy)
3554 ("python-matplotlib" ,python-matplotlib)
3555 ("python-pyparsing" ,python-pyparsing)))
3556 (inputs
3557 `(("lapack" ,lapack)
3558 ("openblas" ,openblas)))
3559 (native-inputs
3560 `(("python-nose" ,python-nose)
3561 ("python-sphinx" ,python-sphinx)
3562 ("python-numpydoc" ,python-numpydoc)
3563 ("gfortran" ,gfortran)
3564 ("texlive" ,texlive)
3565 ("perl" ,perl)))
3566 (outputs '("out" "doc"))
3567 (arguments
3568 `(#:phases
3569 (alist-cons-before
3570 'build 'configure-openblas
3571 (lambda* (#:key inputs #:allow-other-keys)
3572 (call-with-output-file "site.cfg"
3573 (lambda (port)
3574 (format port
3575 "[blas]
3576libraries = openblas
3577library_dirs = ~a/lib
3578include_dirs = ~a/include
3579[atlas]
3580library_dirs = ~a/lib
3581atlas_libs = openblas
3582"
3583 (assoc-ref inputs "openblas")
3584 (assoc-ref inputs "openblas")
3585 (assoc-ref inputs "openblas"))))
3586 #t)
3587 (alist-cons-after
3588 'install 'install-doc
3589 (lambda* (#:key outputs #:allow-other-keys)
3590 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3591 (doc (string-append data "/doc/" ,name "-" ,version))
3592 (html (string-append doc "/html"))
3593 (pyver ,(string-append "PYVER=")))
3594 (with-directory-excursion "doc"
3595 ;; Fix generation of images for mathematical expressions.
3596 (substitute* (find-files "source" "conf\\.py")
3597 (("pngmath_use_preview = True")
3598 "pngmath_use_preview = False"))
3599 (mkdir-p html)
3600 (system* "make" "html" pyver)
3601 (system* "make" "latex" "PAPER=a4" pyver)
3602 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3603 (copy-file "build/latex/scipy-ref.pdf"
3604 (string-append doc "/scipy-ref.pdf"))
3605 (with-directory-excursion "build/html"
3606 (for-each (lambda (file)
3607 (let* ((dir (dirname file))
3608 (tgt-dir (string-append html "/" dir)))
3609 (install-file file html)))
3610 (find-files "." ".*"))))))
3611 ;; Tests can only be run after the library has been installed and not
3612 ;; within the source directory.
3613 (alist-cons-after
3614 'install 'check
3615 (lambda _
3616 (with-directory-excursion "/tmp"
3617 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3618 (alist-delete
3619 'check
3620 (alist-cons-after
3621 'unpack 'fix-tests
3622 (lambda _
3623 (substitute* "scipy/integrate/tests/test_quadpack.py"
3624 (("libm.so") "libm.so.6"))
3625 #t)
3626 %standard-phases)))))))
3627 (home-page "http://www.scipy.org/")
3628 (synopsis "The Scipy library provides efficient numerical routines")
3629 (description "The SciPy library is one of the core packages that make up
3630the SciPy stack. It provides many user-friendly and efficient numerical
3631routines such as routines for numerical integration and optimization.")
3632 (license bsd-3)))
3633
3634(define-public python2-scipy
3635 (package-with-python2 python-scipy))
3636
3637(define-public python-sqlalchemy
3638 (package
3639 (name "python-sqlalchemy")
3640 (version "1.0.12")
3641 (source
3642 (origin
3643 (method url-fetch)
3644 (uri (string-append "https://pypi.python.org/packages/source/S/"
3645 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3646 (sha256
3647 (base32
3648 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3649 (build-system python-build-system)
3650 (native-inputs
3651 `(("python-cython" ,python-cython) ;for c extensions
3652 ("python-pytest" ,python-pytest)
3653 ("python-mock" ,python-mock))) ;for tests
3654 (arguments
3655 `(#:phases (alist-replace
3656 'check
3657 (lambda _ (zero? (system* "py.test")))
3658 %standard-phases)))
3659 (home-page "http://www.sqlalchemy.org")
3660 (synopsis "Database abstraction library")
3661 (description
3662 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3663gives application developers the full power and flexibility of SQL. It
3664provides a full suite of well known enterprise-level persistence patterns,
3665designed for efficient and high-performing database access, adapted into a
3666simple and Pythonic domain language.")
3667 (license x11)))
3668
3669(define-public python2-sqlalchemy
3670 (package-with-python2 python-sqlalchemy))
3671
3672(define-public python-alembic
3673 (package
3674 (name "python-alembic")
3675 (version "0.8.7")
3676 (source
3677 (origin
3678 (method url-fetch)
3679 (uri (pypi-uri "alembic" version))
3680 (sha256
3681 (base32
3682 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3683 (build-system python-build-system)
3684 (native-inputs
3685 `(("python-mock" ,python-mock)
3686 ("python-pytest-cov" ,python-pytest-cov)))
3687 (propagated-inputs
3688 `(("python-sqlalchemy" ,python-sqlalchemy)
3689 ("python-mako" ,python-mako)
3690 ("python-editor" ,python-editor)))
3691 (home-page "http://bitbucket.org/zzzeek/alembic")
3692 (synopsis
3693 "Database migration tool for SQLAlchemy")
3694 (description
3695 "Alembic is a lightweight database migration tool for usage with the
3696SQLAlchemy Database Toolkit for Python.")
3697 (license license:expat)
3698 (properties `((python2-variant . ,(delay python2-alembic))))))
3699
3700(define-public python2-alembic
3701 (let ((alembic (package-with-python2
3702 (strip-python2-variant python-alembic))))
3703 (package
3704 (inherit alembic)
3705 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3706 ,@(package-native-inputs alembic))))))
3707
3708(define-public python-distutils-extra
3709 (package
3710 (name "python-distutils-extra")
3711 (version "2.38")
3712 (source
3713 (origin
3714 (method url-fetch)
3715 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3716 version "/+download/python-distutils-extra-"
3717 version ".tar.gz"))
3718 (sha256
3719 (base32
3720 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3721 (build-system python-build-system)
3722 (native-inputs
3723 `(("python-setuptools" ,python-setuptools)))
3724 (home-page "https://launchpad.net/python-distutils-extra/")
3725 (synopsis "Enhancements to Python's distutils")
3726 (description
3727 "The python-distutils-extra module enables you to easily integrate
3728gettext support, themed icons, and scrollkeeper-based documentation into
3729Python's distutils.")
3730 (license gpl2)))
3731
3732(define-public python2-distutils-extra
3733 (package-with-python2 python-distutils-extra))
3734
3735(define-public python2-elib.intl
3736 (package
3737 (name "python2-elib.intl")
3738 (version "0.0.3")
3739 (source
3740 (origin
3741 ;; This project doesn't tag releases or publish tarballs, so we take
3742 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3743 (method git-fetch)
3744 (uri (git-reference
3745 (url "https://github.com/dieterv/elib.intl.git")
3746 (commit "d09997cfef")))
3747 (sha256
3748 (base32
3749 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3750 (build-system python-build-system)
3751 (native-inputs
3752 `(("python2-setuptools" ,python2-setuptools)))
3753 (arguments
3754 ;; incompatible with Python 3 (exception syntax)
3755 `(#:python ,python-2
3756 #:tests? #f
3757 ;; With standard flags, the install phase attempts to create a zip'd
3758 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3759 ;; before 1980'
3760 #:configure-flags '("--single-version-externally-managed"
3761 "--record=elib.txt")))
3762 (home-page "https://github.com/dieterv/elib.intl")
3763 (synopsis "Enhanced internationalization for Python")
3764 (description
3765 "The elib.intl module provides enhanced internationalization (I18N)
3766services for your Python modules and applications.")
3767 (license lgpl3+)))
3768
3769(define-public python-pillow
3770 (package
3771 (name "python-pillow")
3772 (version "3.1.1")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "Pillow" version))
3777 (sha256
3778 (base32
3779 "1zwzakr5v0skdh0azp5cd6fwzbll5305dsk33k5jk570vv6lqvs8"))))
3780 (build-system python-build-system)
3781 (native-inputs
3782 `(("python-setuptools" ,python-setuptools)
3783 ("python-nose" ,python-nose)))
3784 (inputs
3785 `(("freetype" ,freetype)
3786 ("lcms" ,lcms)
3787 ("zlib" ,zlib)
3788 ("libjpeg" ,libjpeg)
3789 ("openjpeg" ,openjpeg)
3790 ("libtiff" ,libtiff)
3791 ("libwebp" ,libwebp)))
3792 (propagated-inputs
3793 `(;; Used at runtime for pkg_resources
3794 ("python-setuptools" ,python-setuptools)))
3795 (arguments
3796 `(#:phases (modify-phases %standard-phases
3797 (add-before
3798 'install 'disable-egg-compression
3799 (lambda _
3800 ;; Leave the .egg uncompressed since compressing it would
3801 ;; prevent the GC from identifying run-time dependencies.
3802 ;; See <http://bugs.gnu.org/20765>.
3803 (let ((port (open-file "setup.cfg" "a")))
3804 (display "\n[easy_install]\nzip_ok = 0\n"
3805 port)
3806 (close-port port)
3807 #t)))
3808 (add-after
3809 'install 'check-installed
3810 (lambda _
3811 (begin
3812 (setenv "HOME" (getcwd))
3813 (and (zero? (system* "python" "selftest.py"
3814 "--installed"))
3815 (zero? (system* "python" "test-installed.py"))))))
3816 (delete 'check))))
3817 (home-page "https://pypi.python.org/pypi/Pillow")
3818 (synopsis "Fork of the Python Imaging Library")
3819 (description
3820 "The Python Imaging Library adds image processing capabilities to your
3821Python interpreter. This library provides extensive file format support, an
3822efficient internal representation, and fairly powerful image processing
3823capabilities. The core image library is designed for fast access to data
3824stored in a few basic pixel formats. It should provide a solid foundation for
3825a general image processing tool.")
3826 (license (x11-style
3827 "http://www.pythonware.com/products/pil/license.htm"
3828 "The PIL Software License"))))
3829
3830(define-public python2-pillow
3831 (package-with-python2 python-pillow))
3832
3833(define-public python-pycparser
3834 (package
3835 (name "python-pycparser")
3836 (version "2.14")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (pypi-uri "pycparser" version))
3841 (sha256
3842 (base32
3843 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
3844 (outputs '("out" "doc"))
3845 (build-system python-build-system)
3846 (native-inputs
3847 `(("pkg-config" ,pkg-config)
3848 ("python-setuptools" ,python-setuptools)))
3849 (arguments
3850 `(#:phases
3851 (alist-replace
3852 'check
3853 (lambda _
3854 (with-directory-excursion "tests"
3855 (zero? (system* "python" "all_tests.py"))))
3856 (alist-cons-after
3857 'install 'install-doc
3858 (lambda* (#:key outputs #:allow-other-keys)
3859 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3860 (doc (string-append data "/doc/" ,name "-" ,version))
3861 (examples (string-append doc "/examples")))
3862 (mkdir-p examples)
3863 (for-each (lambda (file)
3864 (copy-file (string-append "." file)
3865 (string-append doc file)))
3866 '("/README.rst" "/CHANGES" "/LICENSE"))
3867 (copy-recursively "examples" examples)))
3868 %standard-phases))))
3869 (home-page "https://github.com/eliben/pycparser")
3870 (synopsis "C parser in Python")
3871 (description
3872 "Pycparser is a complete parser of the C language, written in pure Python
3873using the PLY parsing library. It parses C code into an AST and can serve as
3874a front-end for C compilers or analysis tools.")
3875 (license bsd-3)))
3876
3877(define-public python2-pycparser
3878 (package-with-python2 python-pycparser))
3879
3880(define-public python-cffi
3881 (package
3882 (name "python-cffi")
3883 (version "1.4.2")
3884 (source
3885 (origin
3886 (method url-fetch)
3887 (uri (pypi-uri "cffi" version))
3888 (sha256
3889 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
3890 (build-system python-build-system)
3891 (outputs '("out" "doc"))
3892 (inputs
3893 `(("libffi" ,libffi)))
3894 (propagated-inputs ; required at run-time
3895 `(("python-pycparser" ,python-pycparser)))
3896 (native-inputs
3897 `(("pkg-config" ,pkg-config)
3898 ("python-sphinx" ,python-sphinx)
3899 ("python-pytest" ,python-pytest)
3900 ("python-setuptools" ,python-setuptools)))
3901 (arguments
3902 `(#:phases
3903 (alist-cons-after
3904 'install 'install-doc
3905 (lambda* (#:key outputs #:allow-other-keys)
3906 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3907 (doc (string-append data "/doc/" ,name "-" ,version))
3908 (html (string-append doc "/html")))
3909 (with-directory-excursion "doc"
3910 (system* "make" "html")
3911 (mkdir-p html)
3912 (copy-recursively "build/html" html))
3913 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3914 %standard-phases)))
3915 (home-page "http://cffi.readthedocs.org")
3916 (synopsis "Foreign function interface for Python")
3917 (description
3918 "Foreign Function Interface for Python calling C code.")
3919 (license license:expat)))
3920
3921(define-public python2-cffi
3922 (package-with-python2 python-cffi))
3923
3924(define-public python-xcffib
3925 (package
3926 (name "python-xcffib")
3927 (version "0.1.9")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (string-append "https://pypi.python.org/packages/source/x/"
3932 "xcffib/xcffib-" version ".tar.gz"))
3933 (sha256
3934 (base32
3935 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3936 (build-system python-build-system)
3937 (inputs
3938 `(("libxcb" ,libxcb)
3939 ("python-six" ,python-six)))
3940 (native-inputs
3941 `(("python-setuptools" ,python-setuptools)))
3942 (propagated-inputs
3943 `(("python-cffi" ,python-cffi))) ; used at run time
3944 (arguments
3945 `(#:phases
3946 (alist-cons-after
3947 'install 'install-doc
3948 (lambda* (#:key outputs #:allow-other-keys)
3949 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3950 "/doc/" ,name "-" ,version)))
3951 (mkdir-p doc)
3952 (copy-file "README.md"
3953 (string-append doc "/README.md"))))
3954 %standard-phases)))
3955 (home-page "https://github.com/tych0/xcffib")
3956 (synopsis "XCB Python bindings")
3957 (description
3958 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3959support for Python 3 and PyPy. It is based on cffi.")
3960 (license license:expat)))
3961
3962(define-public python2-xcffib
3963 (package-with-python2 python-xcffib))
3964
3965(define-public python-cairocffi
3966 (package
3967 (name "python-cairocffi")
3968 (version "0.6")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 ;; The archive on pypi is missing the 'utils' directory!
3973 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3974 version ".tar.gz"))
3975 (file-name (string-append name "-" version ".tar.gz"))
3976 (sha256
3977 (base32
3978 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3979 (build-system python-build-system)
3980 (outputs '("out" "doc"))
3981 (inputs
3982 `(("gdk-pixbuf" ,gdk-pixbuf)
3983 ("cairo" ,cairo)))
3984 (native-inputs
3985 `(("pkg-config" ,pkg-config)
3986 ("python-sphinx" ,python-sphinx)
3987 ("python-docutils" ,python-docutils)
3988 ("python-setuptools" ,python-setuptools)))
3989 (propagated-inputs
3990 `(("python-xcffib" ,python-xcffib))) ; used at run time
3991 (arguments
3992 `(#:phases
3993 (alist-cons-after
3994 'install 'install-doc
3995 (lambda* (#:key inputs outputs #:allow-other-keys)
3996 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3997 (doc (string-append data "/doc/" ,name "-" ,version))
3998 (html (string-append doc "/html")))
3999 (setenv "LD_LIBRARY_PATH"
4000 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4001 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4002 (setenv "LANG" "en_US.UTF-8")
4003 (mkdir-p html)
4004 (for-each (lambda (file)
4005 (copy-file (string-append "." file)
4006 (string-append doc file)))
4007 '("/README.rst" "/CHANGES" "/LICENSE"))
4008 (system* "python" "setup.py" "build_sphinx")
4009 (copy-recursively "docs/_build/html" html)))
4010 %standard-phases)))
4011 (home-page "https://github.com/SimonSapin/cairocffi")
4012 (synopsis "Python bindings and object-oriented API for Cairo")
4013 (description
4014 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4015Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4016graphics library with support for multiple backends including image buffers,
4017PNG, PostScript, PDF, and SVG file output.")
4018 (license bsd-3)))
4019
4020(define-public python2-cairocffi
4021 (package-with-python2 python-cairocffi))
4022
4023(define-public python-decorator
4024 (package
4025 (name "python-decorator")
4026 (version "4.0.9")
4027 (source
4028 (origin
4029 (method url-fetch)
4030 (uri (pypi-uri "decorator" version))
4031 (sha256
4032 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4033 (build-system python-build-system)
4034 (arguments '(#:tests? #f)) ; no test target
4035 (native-inputs
4036 `(("python-setuptools" ,python-setuptools)))
4037 (home-page "https://pypi.python.org/pypi/decorator/")
4038 (synopsis "Python module to simplify usage of decorators")
4039 (description
4040 "The aim of the decorator module is to simplify the usage of decorators
4041for the average programmer, and to popularize decorators usage giving examples
4042of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4043etc. The core of this module is a decorator factory.")
4044 (license license:expat)))
4045
4046(define-public python2-decorator
4047 (package-with-python2 python-decorator))
4048
4049(define-public python-drmaa
4050 (package
4051 (name "python-drmaa")
4052 (version "0.7.6")
4053 (source
4054 (origin
4055 (method url-fetch)
4056 (uri (string-append
4057 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4058 version ".tar.gz"))
4059 (sha256
4060 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4061 (build-system python-build-system)
4062 ;; The test suite requires libdrmaa which is provided by the cluster
4063 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4064 ;; should be set to the path of the libdrmaa library.
4065 (arguments '(#:tests? #f))
4066 (native-inputs
4067 `(("python-nose" ,python-nose)
4068 ("python-setuptools" ,python-setuptools)))
4069 (home-page "https://pypi.python.org/pypi/drmaa")
4070 (synopsis "Python bindings for the DRMAA library")
4071 (description
4072 "A Python package for Distributed Resource Management (DRM) job
4073submission and control. This package is an implementation of the DRMAA 1.0
4074Python language binding specification.")
4075 (license bsd-3)))
4076
4077(define-public python2-drmaa
4078 (package-with-python2 python-drmaa))
4079
4080(define-public python-gridmap
4081 (package
4082 (name "python-gridmap")
4083 (version "0.13.0")
4084 (source
4085 (origin
4086 (method url-fetch)
4087 (uri (string-append
4088 "https://github.com/pygridtools/gridmap/archive/v"
4089 version ".tar.gz"))
4090 (file-name (string-append name "-" version ".tar.gz"))
4091 (sha256
4092 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4093 (build-system python-build-system)
4094 (inputs
4095 `(("python-psutil" ,python-psutil)
4096 ("python-drmaa" ,python-drmaa)
4097 ("python-pyzmq" ,python-pyzmq)))
4098 (native-inputs
4099 `(("python-setuptools" ,python-setuptools)))
4100 (home-page "https://github.com/pygridtools/gridmap")
4101 (synopsis "Create jobs on a cluster directly from Python")
4102 (description
4103 "Gridmap is a Python package to allow you to easily create jobs on the
4104cluster directly from Python. You can directly map Python functions onto the
4105cluster without needing to write any wrapper code yourself.")
4106 (license gpl3+)))
4107
4108(define-public python2-gridmap
4109 (package-with-python2 python-gridmap))
4110
4111(define-public python-pexpect
4112 (package
4113 (name "python-pexpect")
4114 (version "3.3")
4115 (source
4116 (origin
4117 (method url-fetch)
4118 (uri (string-append "https://pypi.python.org/packages/source/p/"
4119 "pexpect/pexpect-" version ".tar.gz"))
4120 (sha256
4121 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4122 (build-system python-build-system)
4123 (arguments
4124 `(#:phases
4125 (modify-phases %standard-phases
4126 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4127 (native-inputs
4128 `(("python-nose" ,python-nose)))
4129 (home-page "http://pexpect.readthedocs.org/")
4130 (synopsis "Controlling interactive console applications")
4131 (description
4132 "Pexpect is a pure Python module for spawning child applications;
4133controlling them; and responding to expected patterns in their output.
4134Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4135child application and control it as if a human were typing commands.")
4136 (license isc)))
4137
4138(define-public python2-pexpect
4139 (package-with-python2 python-pexpect))
4140
4141(define-public python-setuptools-scm
4142 (package
4143 (name "python-setuptools-scm")
4144 (version "1.11.1")
4145 (source (origin
4146 (method url-fetch)
4147 (uri (pypi-uri "setuptools_scm" version))
4148 (sha256
4149 (base32
4150 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4151 (build-system python-build-system)
4152 (native-inputs `(("python-setuptools" ,python-setuptools)))
4153 (home-page "https://github.com/pypa/setuptools_scm/")
4154 (synopsis "Manage Python package versions in SCM metadata")
4155 (description
4156 "Setuptools_scm handles managing your Python package versions in
4157@dfn{software configuration management} (SCM) metadata instead of declaring
4158them as the version argument or in a SCM managed file.")
4159 (license license:expat)))
4160
4161(define-public python2-setuptools-scm
4162 (package-with-python2 python-setuptools-scm))
4163
4164(define-public python-pathpy
4165 (package
4166 (name "python-pathpy")
4167 (version "8.1.1")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (string-append "https://pypi.python.org/packages/source/p/"
4172 "path.py/path.py-" version ".tar.gz"))
4173 (sha256
4174 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4175 (build-system python-build-system)
4176 (propagated-inputs
4177 `(("python-appdirs" ,python-appdirs)))
4178 (native-inputs
4179 `(("python-setuptools" ,python-setuptools)
4180 ("python-setuptools-scm" ,python-setuptools-scm)
4181 ("python-pytest" ,python-pytest)
4182 ("python-pytest-runner" ,python-pytest-runner)))
4183 (home-page "http://github.com/jaraco/path.py")
4184 (synopsis "Python module wrapper for built-in os.path")
4185 (description
4186 "@code{path.py} implements path objects as first-class entities, allowing
4187common operations on files to be invoked on those path objects directly.")
4188 (license license:expat)))
4189
4190(define-public python2-pathpy
4191 (package-with-python2 python-pathpy))
4192
4193(define-public python-pickleshare
4194 (package
4195 (name "python-pickleshare")
4196 (version "0.5")
4197 (source
4198 (origin
4199 (method url-fetch)
4200 (uri (string-append "https://pypi.python.org/packages/source/p/"
4201 "pickleshare/pickleshare-" version ".tar.gz"))
4202 (sha256
4203 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4204 (build-system python-build-system)
4205 (propagated-inputs
4206 `(("python-pathpy" ,python-pathpy)))
4207 (native-inputs
4208 `(("python-setuptools" ,python-setuptools)))
4209 (home-page "https://github.com/vivainio/pickleshare")
4210 (synopsis "Tiny key value database with concurrency support")
4211 (description
4212 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4213Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4214shelve, many processes can access the database simultaneously. Changing a
4215value in database is immediately visible to other processes accessing the same
4216database. Concurrency is possible because the values are stored in separate
4217files. Hence the “database” is a directory where all files are governed by
4218PickleShare.")
4219 (license license:expat)))
4220
4221(define-public python2-pickleshare
4222 (package-with-python2 python-pickleshare))
4223
4224(define-public python-simplegeneric
4225 (package
4226 (name "python-simplegeneric")
4227 (version "0.8.1")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (string-append "https://pypi.python.org/packages/source/s/"
4232 "simplegeneric/simplegeneric-" version ".zip"))
4233 (sha256
4234 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4235 (build-system python-build-system)
4236 (native-inputs
4237 `(("python-setuptools" ,python-setuptools)
4238 ("unzip" ,unzip)))
4239 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4240 (synopsis "Python module for simple generic functions")
4241 (description
4242 "The simplegeneric module lets you define simple single-dispatch generic
4243functions, akin to Python’s built-in generic functions like @code{len()},
4244@code{iter()} and so on. However, instead of using specially-named methods,
4245these generic functions use simple lookup tables, akin to those used by
4246e.g. @code{pickle.dump()} and other generic functions found in the Python
4247standard library.")
4248 (license zpl2.1)))
4249
4250(define-public python2-simplegeneric
4251 (package-with-python2 python-simplegeneric))
4252
4253(define-public python-ipython-genutils
4254 (package
4255 (name "python-ipython-genutils")
4256 (version "0.1.0")
4257 (source
4258 (origin
4259 (method url-fetch)
4260 (uri (string-append "https://pypi.python.org/packages/source/i/"
4261 "ipython_genutils/ipython_genutils-"
4262 version ".tar.gz"))
4263 (sha256
4264 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4265 (build-system python-build-system)
4266 (arguments `(#:tests? #f)) ; no tests
4267 (home-page "http://ipython.org")
4268 (synopsis "Vestigial utilities from IPython")
4269 (description
4270 "This package provides retired utilities from IPython.")
4271 (license bsd-3)))
4272
4273(define-public python2-ipython-genutils
4274 (package-with-python2 python-ipython-genutils))
4275
4276(define-public python-traitlets
4277 (package
4278 (name "python-traitlets")
4279 (version "4.1.0")
4280 (source
4281 (origin
4282 (method url-fetch)
4283 (uri (pypi-uri "traitlets" version))
4284 (sha256
4285 (base32
4286 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
4287 (build-system python-build-system)
4288 (arguments
4289 `(#:phases
4290 (modify-phases %standard-phases
4291 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4292 (propagated-inputs
4293 `(("python-ipython-genutils" ,python-ipython-genutils)
4294 ("python-decorator" ,python-decorator)))
4295 (native-inputs
4296 `(("python-mock" ,python-mock)
4297 ("python-nose" ,python-nose)))
4298 (home-page "http://ipython.org")
4299 (synopsis "Configuration system for Python applications")
4300 (description
4301 "Traitlets is a framework that lets Python classes have attributes with
4302type checking, dynamically calculated default values, and ‘on change’
4303callbacks. The package also includes a mechanism to use traitlets for
4304configuration, loading values from files or from command line arguments. This
4305is a distinct layer on top of traitlets, so you can use traitlets in your code
4306without using the configuration machinery.")
4307 (license bsd-3)))
4308
4309(define-public python2-traitlets
4310 (package-with-python2 python-traitlets))
4311
4312(define-public python-ipython
4313 (package
4314 (name "python-ipython")
4315 (version "3.2.1")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
4320 (uri (string-append "https://pypi.python.org/packages/source/i/"
4321 "ipython/ipython-" version ".tar.gz"))
4322 (sha256
4323 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4324 (build-system python-build-system)
4325 (outputs '("out" "doc"))
4326 (propagated-inputs
4327 `(("python-pyzmq" ,python-pyzmq)
4328 ("python-terminado" ,python-terminado)))
4329 (inputs
4330 `(("readline" ,readline)
4331 ("which" ,which)
4332 ("python-matplotlib" ,python-matplotlib)
4333 ("python-numpy" ,python-numpy)
4334 ("python-numpydoc" ,python-numpydoc)
4335 ("python-jinja2" ,python-jinja2)
4336 ("python-mistune" ,python-mistune)
4337 ("python-jsonschema" ,python-jsonschema)
4338 ("python-pygments" ,python-pygments)
4339 ("python-requests" ,python-requests) ;; for tests
4340 ("python-nose" ,python-nose)))
4341 (native-inputs
4342 `(("pkg-config" ,pkg-config)
4343 ("python-sphinx" ,python-sphinx)
4344 ("texlive" ,texlive)
4345 ("texinfo" ,texinfo)
4346 ("python-setuptools" ,python-setuptools)))
4347 (arguments
4348 `(#:phases
4349 (modify-phases %standard-phases
4350 (add-after
4351 'install 'install-doc
4352 (lambda* (#:key inputs outputs #:allow-other-keys)
4353 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4354 (doc (string-append data "/doc/" ,name "-" ,version))
4355 (html (string-append doc "/html"))
4356 (man1 (string-append data "/man/man1"))
4357 (info (string-append data "/info"))
4358 (examples (string-append doc "/examples")))
4359 (setenv "LANG" "en_US.utf8")
4360 (with-directory-excursion "docs"
4361 ;; FIXME: html and pdf fail to build
4362 ;; (system* "make" "html")
4363 ;; (system* "make" "pdf" "PAPER=a4")
4364 (system* "make" "info"))
4365 (copy-recursively "docs/man" man1)
4366 (copy-recursively "examples" examples)
4367 ;; (copy-recursively "docs/build/html" html)
4368 ;; (copy-file "docs/build/latex/ipython.pdf"
4369 ;; (string-append doc "/ipython.pdf"))
4370 (mkdir-p info)
4371 (copy-file "docs/build/texinfo/ipython.info"
4372 (string-append info "/ipython.info"))
4373 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4374 ;; Tests can only be run after the library has been installed and not
4375 ;; within the source directory.
4376 (delete 'check)
4377 (add-after
4378 'install 'check
4379 (lambda* (#:key outputs tests? #:allow-other-keys)
4380 (if tests?
4381 (with-directory-excursion "/tmp"
4382 (setenv "HOME" "/tmp/") ;; required by a test
4383 (zero? (system* (string-append (assoc-ref outputs "out")
4384 "/bin/iptest"))))
4385 #t)))
4386 (add-before
4387 'install 'fix-tests
4388 (lambda* (#:key inputs #:allow-other-keys)
4389 (substitute* "./IPython/utils/_process_posix.py"
4390 (("/usr/bin/env', 'which") (which "which")))
4391 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4392 (("#!/usr/bin/env python")
4393 (string-append "#!" (which "python"))))
4394 ;; Disable 1 failing test
4395 (substitute* "./IPython/core/tests/test_magic.py"
4396 (("def test_dirops\\(\\):" all)
4397 (string-append "@dec.skipif(True)\n" all))))))))
4398 (home-page "http://ipython.org")
4399 (synopsis "IPython is a tool for interactive computing in Python")
4400 (description
4401 "IPython provides a rich architecture for interactive computing with:
4402Powerful interactive shells, a browser-based notebook, support for interactive
4403data visualization, embeddable interpreters and tools for parallel
4404computing.")
4405 (license bsd-3)))
4406
4407(define-public python2-ipython
4408 (let ((ipython (package-with-python2 python-ipython)))
4409 (package
4410 (inherit ipython)
4411 ;; FIXME: some tests are failing
4412 (arguments
4413 `(#:tests? #f ,@(package-arguments ipython)))
4414 ;; Make sure we use custom python2-NAME packages.
4415 ;; FIXME: add pyreadline once available.
4416 (propagated-inputs
4417 `(("python2-terminado" ,python2-terminado)
4418 ,@(alist-delete "python-terminado"
4419 (package-propagated-inputs ipython))))
4420 (inputs
4421 `(("python2-jsonschema" ,python2-jsonschema)
4422 ("python2-mock" ,python2-mock)
4423 ("python2-matplotlib" ,python2-matplotlib)
4424 ("python2-numpy" ,python2-numpy)
4425 ("python2-requests" ,python2-requests)
4426 ,@(fold alist-delete (package-inputs ipython)
4427 '("python-jsonschema" "python-matplotlib" "python-numpy" "python-requests")))))))
4428
4429(define-public python-isodate
4430 (package
4431 (name "python-isodate")
4432 (version "0.5.4")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (pypi-uri "isodate" version))
4437 (sha256
4438 (base32
4439 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4440 (build-system python-build-system)
4441 (inputs
4442 `(("python-setuptools" ,python-setuptools)))
4443 (home-page
4444 "http://cheeseshop.python.org/pypi/isodate")
4445 (synopsis
4446 "Python date parser and formatter")
4447 (description
4448 "Python-isodate is a python module for parsing and formatting
4449ISO 8601 dates, time and duration.")
4450 (license bsd-3)))
4451
4452(define-public python2-isodate
4453 (package-with-python2 python-isodate))
4454
4455(define-public python-html5lib
4456 (package
4457 (name "python-html5lib")
4458 (version "1.0b8")
4459 (source
4460 (origin
4461 (method url-fetch)
4462 (uri (pypi-uri "html5lib" version))
4463 (sha256
4464 (base32
4465 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4466 (build-system python-build-system)
4467 (propagated-inputs
4468 `(("python-six" ,python-six))) ; required to "import html5lib"
4469 (inputs
4470 `(("python-setuptools" ,python-setuptools)))
4471 (arguments
4472 `(#:test-target "check"))
4473 (home-page
4474 "https://github.com/html5lib/html5lib-python")
4475 (synopsis
4476 "Python HTML parser based on the WHATWG HTML specifcation")
4477 (description
4478 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4479and written in Python.")
4480 (license license:expat)))
4481
4482(define-public python2-html5lib
4483 (package-with-python2 python-html5lib))
4484
4485(define-public python-urwid
4486 (package
4487 (name "python-urwid")
4488 (version "1.3.0")
4489 (source
4490 (origin
4491 (method url-fetch)
4492 (uri (pypi-uri "urwid" version))
4493 (sha256
4494 (base32
4495 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4496 (build-system python-build-system)
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 ;; Disable failing test. Bug filed upstream:
4501 ;; https://github.com/wardi/urwid/issues/164
4502 ;; TODO: check again for python-urwid > 1.3.0 or python > 3.4.3.
4503 (add-after 'unpack 'disable-failing-test
4504 (lambda _
4505 (substitute* "urwid/tests/test_event_loops.py"
4506 (("test_remove_watch_file")
4507 "disable_remove_watch_file")))))))
4508 (native-inputs `(("python-setuptools" ,python-setuptools)))
4509 (home-page "http://urwid.org")
4510 (synopsis "Console user interface library for Python")
4511 (description
4512 "Urwid is a curses-based UI/widget library for Python. It includes many
4513features useful for text console applications.")
4514 (license lgpl2.1+)))
4515
4516(define-public python2-urwid
4517 (package-with-python2 python-urwid))
4518
4519(define-public python-urwidtrees
4520 (package
4521 (name "python-urwidtrees")
4522 (version "1.0.1.1")
4523 (source
4524 (origin
4525 (method url-fetch)
4526 (uri (pypi-uri "urwidtrees" version))
4527 (sha256
4528 (base32
4529 "1zcvy12s7h3fazf33d6y7b4v19p8hg95xqwhqlmw6jz9fq76v9h8"))))
4530 (build-system python-build-system)
4531 (arguments
4532 '(#:tests? #f)) ; no tests
4533 (inputs `(("python-urwid" ,python-urwid)))
4534 (home-page "https://github.com/pazz/urwidtrees")
4535 (synopsis "Tree widgets for urwid")
4536 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4537toolkit. Use it to build trees of widgets.")
4538 (license gpl3+)))
4539
4540(define-public python2-urwidtrees
4541 (package-with-python2 python-urwidtrees))
4542
4543(define-public python-dbus
4544 (package
4545 (name "python-dbus")
4546 (version "1.2.0")
4547 (source
4548 (origin
4549 (method url-fetch)
4550 (uri (string-append
4551 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4552 version ".tar.gz"))
4553 (sha256
4554 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4555 (build-system gnu-build-system)
4556 (arguments
4557 '(#:phases
4558 (modify-phases %standard-phases
4559 (add-before
4560 'check 'pre-check
4561 (lambda _
4562 ;; XXX: For the missing '/etc/machine-id'.
4563 (substitute* "test/run-test.sh"
4564 (("DBUS_FATAL_WARNINGS=1")
4565 "DBUS_FATAL_WARNINGS=0"))
4566 #t)))))
4567 (native-inputs
4568 `(("pkg-config" ,pkg-config)))
4569 (inputs
4570 `(("python" ,python)
4571 ("dbus-glib" ,dbus-glib)))
4572 (synopsis "Python bindings for D-bus")
4573 (description "python-dbus provides bindings for libdbus, the reference
4574implementation of D-Bus.")
4575 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4576 (license license:expat)))
4577
4578(define-public python2-dbus
4579 (package (inherit python-dbus)
4580 (name "python2-dbus")
4581 (inputs `(("python" ,python-2)
4582 ,@(alist-delete "python"
4583 (package-inputs python-dbus)
4584 equal?)))
4585 ;; FIXME: on Python 2, the test_utf8 fails with:
4586 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4587 (arguments `(#:tests? #f))))
4588
4589(define-public python-apsw
4590 (package
4591 (name "python-apsw")
4592 (version "3.9.2-r1")
4593 (source
4594 (origin
4595 (method url-fetch)
4596 (uri (pypi-uri "apsw" version))
4597 (sha256
4598 (base32
4599 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4600 (build-system python-build-system)
4601 (inputs
4602 `(("python-setuptools" ,python-setuptools)
4603 ("sqlite" ,sqlite)))
4604 (arguments
4605 `(#:phases
4606 ;; swap check and install phases
4607 (alist-cons-after
4608 'install 'check
4609 (assoc-ref %standard-phases 'check)
4610 (alist-delete
4611 'check
4612 %standard-phases))))
4613 (home-page "https://github.com/rogerbinns/apsw/")
4614 (synopsis "Another Python SQLite Wrapper")
4615 (description "APSW is a Python wrapper for the SQLite
4616embedded relational database engine. In contrast to other wrappers such as
4617pysqlite it focuses on being a minimal layer over SQLite attempting just to
4618translate the complete SQLite API into Python.")
4619 (license license:zlib)))
4620
4621(define-public python2-apsw
4622 (package-with-python2 python-apsw))
4623
4624(define-public python-lxml
4625 (package
4626 (name "python-lxml")
4627 (version "3.6.0")
4628 (source
4629 (origin
4630 (method url-fetch)
4631 (uri (pypi-uri "lxml" version))
4632 (sha256
4633 (base32
4634 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4635 (build-system python-build-system)
4636 (inputs
4637 `(("libxml2" ,libxml2)
4638 ("libxslt" ,libxslt)
4639 ("python-setuptools" ,python-setuptools)))
4640 (home-page "http://lxml.de/")
4641 (synopsis
4642 "Python XML processing library")
4643 (description
4644 "The lxml XML toolkit is a Pythonic binding for the C libraries
4645libxml2 and libxslt.")
4646 (license bsd-3))) ; and a few more, see LICENSES.txt
4647
4648(define-public python2-lxml
4649 (package-with-python2 python-lxml))
4650
4651;; beautifulsoup4 has a totally different namespace than 3.x,
4652;; and pypi seems to put it under its own name, so I guess we should too
4653(define-public python-beautifulsoup4
4654 (package
4655 (name "python-beautifulsoup4")
4656 (version "4.5.0")
4657 (source
4658 (origin
4659 (method url-fetch)
4660 (uri (pypi-uri "beautifulsoup4" version))
4661 (sha256
4662 (base32
4663 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
4664 (build-system python-build-system)
4665 (home-page
4666 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4667 (synopsis
4668 "Python screen-scraping library")
4669 (description
4670 "Beautiful Soup is a Python library designed for rapidly setting up
4671screen-scraping projects. It offers Pythonic idioms for navigating,
4672searching, and modifying a parse tree, providing a toolkit for
4673dissecting a document and extracting what you need. It automatically
4674converts incoming documents to Unicode and outgoing documents to UTF-8.")
4675 (license license:expat)
4676 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4677
4678(define-public python2-beautifulsoup4
4679 (package
4680 (inherit (package-with-python2
4681 (strip-python2-variant python-beautifulsoup4)))
4682 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4683
4684(define-public python2-cssutils
4685 (package
4686 (name "python2-cssutils")
4687 (version "1.0.1")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 (uri (pypi-uri "cssutils" version))
4692 (sha256
4693 (base32
4694 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
4695 (build-system python-build-system)
4696 (native-inputs
4697 `(("python2-mock" ,python2-mock) ; for the tests
4698 ("unzip" ,unzip))) ; for unpacking the source
4699 (inputs
4700 `(("python2-setuptools" ,python2-setuptools)))
4701 (arguments
4702 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4703 #:tests? #f ; The tests apparently download an external URL.
4704 ))
4705 (home-page "http://cthedot.de/cssutils/")
4706 (synopsis
4707 "CSS Cascading Style Sheets library for Python")
4708 (description
4709 "Cssutils is a Python package for parsing and building CSS
4710Cascading Style Sheets. Currently it provides a DOM only and no rendering
4711options.")
4712 (license lgpl3+)))
4713
4714(define-public python-cssselect
4715 (package
4716 (name "python-cssselect")
4717 (version "0.9.2")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "cssselect" version))
4722 (sha256
4723 (base32
4724 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
4725 (build-system python-build-system)
4726 (inputs
4727 `(("python-setuptools" ,python-setuptools)))
4728 (arguments
4729 ;; tests fail with message
4730 ;; AttributeError: 'module' object has no attribute 'tests'
4731 `(#:tests? #f))
4732 (home-page
4733 "https://pythonhosted.org/cssselect/")
4734 (synopsis
4735 "CSS3 selector parser and translator to XPath 1.0")
4736 (description
4737 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4738them to XPath 1.0 expressions. Such expressions can be used in lxml or
4739another XPath engine to find the matching elements in an XML or HTML document.")
4740 (license bsd-3)))
4741
4742(define-public python2-cssselect
4743 (package-with-python2 python-cssselect))
4744
4745(define-public python-netifaces
4746 (package
4747 (name "python-netifaces")
4748 (version "0.10.4")
4749 (source
4750 (origin
4751 (method url-fetch)
4752 (uri (string-append
4753 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4754 version
4755 ".tar.gz"))
4756 (sha256
4757 (base32
4758 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4759 (build-system python-build-system)
4760 (inputs
4761 `(("python-setuptools" ,python-setuptools)))
4762 (home-page
4763 "https://bitbucket.org/al45tair/netifaces")
4764 (synopsis
4765 "Python module for portable network interface information")
4766 (description
4767 "Netifaces is a Python module providing information on network
4768interfaces in an easy and portable manner.")
4769 (license license:expat)))
4770
4771(define-public python2-netifaces
4772 (package-with-python2 python-netifaces))
4773
4774(define-public python-networkx
4775 (package
4776 (name "python-networkx")
4777 (version "1.11")
4778 (source
4779 (origin
4780 (method url-fetch)
4781 (uri (pypi-uri "networkx" version))
4782 (sha256
4783 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
4784 (build-system python-build-system)
4785 ;; python-decorator is needed at runtime
4786 (propagated-inputs
4787 `(("python-decorator" ,python-decorator)))
4788 (native-inputs
4789 `(("python-setuptools" ,python-setuptools)
4790 ("python-nose" ,python-nose)))
4791 (home-page "http://networkx.github.io/")
4792 (synopsis "Python module for creating and manipulating graphs and networks")
4793 (description
4794 "NetworkX is a Python package for the creation, manipulation, and study
4795of the structure, dynamics, and functions of complex networks.")
4796 (license bsd-3)))
4797
4798(define-public python2-networkx
4799 (package-with-python2 python-networkx))
4800
4801(define-public snakemake
4802 (package
4803 (name "snakemake")
4804 (version "3.2.1")
4805 (source
4806 (origin
4807 (method url-fetch)
4808 (uri (string-append
4809 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4810 version ".tar.gz"))
4811 (sha256
4812 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4813 (build-system python-build-system)
4814 (inputs `(("python-setuptools" ,python-setuptools)))
4815 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4816 (synopsis "Python-based execution environment for make-like workflows")
4817 (description
4818 "Snakemake aims to reduce the complexity of creating workflows by
4819providing a clean and modern domain specific specification language (DSL) in
4820Python style, together with a fast and comfortable execution environment.")
4821 (license license:expat)))
4822
4823(define-public python-seaborn
4824 (package
4825 (name "python-seaborn")
4826 (version "0.7.0")
4827 (source
4828 (origin
4829 (method url-fetch)
4830 (uri (pypi-uri "seaborn" version))
4831 (sha256
4832 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
4833 (build-system python-build-system)
4834 (propagated-inputs
4835 `(("python-pandas" ,python-pandas)
4836 ("python-matplotlib" ,python-matplotlib)
4837 ("python-scipy" ,python-scipy)))
4838 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4839 (synopsis "Statistical data visualization")
4840 (description
4841 "Seaborn is a library for making attractive and informative statistical
4842graphics in Python. It is built on top of matplotlib and tightly integrated
4843with the PyData stack, including support for numpy and pandas data structures
4844and statistical routines from scipy and statsmodels.")
4845 (license bsd-3)
4846 (properties `((python2-variant . ,(delay python2-seaborn))))))
4847
4848(define-public python2-seaborn
4849 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
4850 (package
4851 (inherit base)
4852 (propagated-inputs `(("python2-pytz" ,python2-pytz)
4853 ,@(package-propagated-inputs base)))
4854 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4855 ,@(package-native-inputs base))))))
4856
4857(define-public python-sympy
4858 (package
4859 (name "python-sympy")
4860 (version "0.7.6")
4861 (source
4862 (origin
4863 (method url-fetch)
4864 (uri (string-append
4865 "https://github.com/sympy/sympy/releases/download/sympy-"
4866 version "/sympy-" version ".tar.gz"))
4867 (sha256
4868 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4869 (build-system python-build-system)
4870 (native-inputs
4871 `(("python-setuptools" ,python-setuptools)))
4872 (home-page "http://www.sympy.org/")
4873 (synopsis "Python library for symbolic mathematics")
4874 (description
4875 "SymPy is a Python library for symbolic mathematics. It aims to become a
4876full-featured computer algebra system (CAS) while keeping the code as simple
4877as possible in order to be comprehensible and easily extensible.")
4878 (license bsd-3)))
4879
4880(define-public python2-sympy
4881 (package-with-python2 python-sympy))
4882
4883(define-public python-testlib
4884 (package
4885 (name "python-testlib")
4886 (version "0.6.5")
4887 (source
4888 (origin
4889 (method url-fetch)
4890 (uri (string-append
4891 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4892 version ".zip"))
4893 (sha256
4894 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4895 (build-system python-build-system)
4896 (inputs
4897 `(("python-setuptools" ,python-setuptools)))
4898 (native-inputs
4899 `(("unzip" ,unzip)))
4900 (arguments
4901 `(#:phases
4902 (alist-replace
4903 'unpack
4904 (lambda* (#:key inputs outputs #:allow-other-keys)
4905 (let ((unzip (string-append (assoc-ref inputs "unzip")
4906 "/bin/unzip"))
4907 (source (assoc-ref inputs "source")))
4908 (and (zero? (system* unzip source))
4909 (chdir (string-append "testlib-" ,version)))))
4910 %standard-phases)))
4911 (synopsis "Python micro test suite harness")
4912 (description "A micro unittest suite harness for Python.")
4913 (home-page "https://github.com/trentm/testlib")
4914 (license license:expat)))
4915
4916(define-public python2-testlib
4917 (package-with-python2 python-testlib))
4918
4919(define-public python2-xlib
4920 (package
4921 (name "python2-xlib")
4922 (version "0.14")
4923 (source (origin
4924 (method url-fetch)
4925 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
4926 "/" version "/"
4927 "python-xlib-" version ".tar.gz"))
4928 (sha256
4929 (base32
4930 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4931 (build-system python-build-system)
4932 (arguments
4933 `(#:python ,python-2 ;Python 2 only
4934 #:tests? #f)) ;no tests
4935 (inputs
4936 `(("python-setuptools" ,python-setuptools)))
4937 (home-page "http://python-xlib.sourceforge.net/")
4938 (synopsis "Python X11 client library")
4939 (description
4940 "The Python X Library is intended to be a fully functional X client
4941library for Python programs. It is useful to implement low-level X clients.
4942It is written entirely in Python.")
4943 (license gpl2+)))
4944
4945(define-public python-singledispatch
4946 (package
4947 (name "python-singledispatch")
4948 (version "3.4.0.3")
4949 (source
4950 (origin
4951 (method url-fetch)
4952 (uri (pypi-uri "singledispatch" version))
4953 (sha256
4954 (base32
4955 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4956 (build-system python-build-system)
4957 (native-inputs
4958 `(("python-setuptools" ,python-setuptools)))
4959 (inputs
4960 `(("python-six" ,python-six)))
4961 (home-page
4962 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4963 (synopsis "Backport of singledispatch feature from Python 3.4")
4964 (description
4965 "This library brings functools.singledispatch from Python 3.4 to Python
49662.6-3.3.")
4967 (license license:expat)))
4968
4969(define-public python2-singledispatch
4970 (package-with-python2 python-singledispatch))
4971
4972(define-public python-tornado
4973 (package
4974 (name "python-tornado")
4975 (version "4.3")
4976 (source
4977 (origin
4978 (method url-fetch)
4979 (uri (pypi-uri "tornado" version))
4980 (sha256
4981 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
4982 (build-system python-build-system)
4983 (native-inputs
4984 `(("python-certifi" ,python-certifi)))
4985 (inputs
4986 `(("python-backports-abc" ,python-backports-abc)))
4987 (home-page "http://www.tornadoweb.org/")
4988 (synopsis "Python web framework and asynchronous networking library")
4989 (description
4990 "Tornado is a Python web framework and asynchronous networking library,
4991originally developed at FriendFeed. By using non-blocking network I/O,
4992Tornado can scale to tens of thousands of open connections, making it ideal
4993for long polling, WebSockets, and other applications that require a long-lived
4994connection to each user.")
4995 (license asl2.0)
4996 (properties `((python2-variant . ,(delay python2-tornado))))))
4997
4998(define-public python2-tornado
4999 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5000 (package (inherit tornado)
5001 (inputs
5002 `(("python2-backport-ssl-match-hostname"
5003 ,python2-backport-ssl-match-hostname)
5004 ("python2-singledispatch" ,python2-singledispatch)
5005 ,@(package-inputs tornado)))
5006 (native-inputs
5007 `(("python2-setuptools" ,python2-setuptools)
5008 ,@(package-native-inputs tornado))))))
5009
5010;; the python- version can be removed with python-3.5
5011(define-public python-backports-abc
5012 (package
5013 (name "python-backports-abc")
5014 (version "0.4")
5015 (source
5016 (origin
5017 (method url-fetch)
5018 (uri (pypi-uri "backports_abc" version))
5019 (sha256
5020 (base32
5021 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5022 (build-system python-build-system)
5023 (inputs
5024 `(("python-setuptools" ,python-setuptools)))
5025 (home-page "https://github.com/cython/backports_abc")
5026 (synopsis "Backport of additions to the 'collections.abc' module")
5027 (description
5028 "Python-backports-abc provides a backport of additions to the
5029'collections.abc' module in Python-3.5.")
5030 (license psfl)))
5031
5032(define-public python2-backports-abc
5033 (package-with-python2 python-backports-abc))
5034
5035(define-public python-waf
5036 (package
5037 (name "python-waf")
5038 (version "1.9.1")
5039 (source (origin
5040 (method url-fetch)
5041 (uri (string-append "https://waf.io/"
5042 "waf-" version ".tar.bz2"))
5043 (sha256
5044 (base32
5045 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
5046 (build-system python-build-system)
5047 (arguments
5048 '(#:phases
5049 (modify-phases %standard-phases
5050 (replace 'build
5051 (lambda _
5052 (zero? (begin
5053 (system* "python" "waf-light" "configure")
5054 (system* "python" "waf-light" "build")))))
5055 (replace 'check
5056 (lambda _
5057 (zero? (system* "python" "waf" "--version"))))
5058 (replace 'install
5059 (lambda _
5060 (copy-file "waf" %output))))))
5061 (home-page "https://waf.io/")
5062 (synopsis "Python-based build system")
5063 (description
5064 "Waf is a Python-based framework for configuring, compiling and installing
5065applications.")
5066 (license bsd-3)))
5067
5068(define-public python2-waf
5069 (package-with-python2 python-waf))
5070
5071(define-public python-pyzmq
5072 (package
5073 (name "python-pyzmq")
5074 (version "15.1.0")
5075 (source
5076 (origin
5077 (method url-fetch)
5078 (uri (pypi-uri "pyzmq" version))
5079 (sha256
5080 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5081 (build-system python-build-system)
5082 (arguments
5083 `(#:configure-flags
5084 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5085 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5086 ;; --inplace' for 'python setup.py test' to work.
5087 #:tests? #f))
5088 (inputs
5089 `(("zeromq" ,zeromq)))
5090 (native-inputs
5091 `(("pkg-config" ,pkg-config)
5092 ("python-nose" ,python-nose)
5093 ("python-setuptools" ,python-setuptools)))
5094 (home-page "http://github.com/zeromq/pyzmq")
5095 (synopsis "Python bindings for 0MQ")
5096 (description
5097 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5098 (license bsd-4)))
5099
5100(define-public python2-pyzmq
5101 (package-with-python2 python-pyzmq))
5102
5103(define-public python-pep8
5104 (package
5105 (name "python-pep8")
5106 (version "1.7.0")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (pypi-uri "pep8" version))
5111 (sha256
5112 (base32
5113 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5114 (build-system python-build-system)
5115 (inputs
5116 `(("python-setuptools" ,python-setuptools)))
5117 (home-page "http://pep8.readthedocs.org/")
5118 (synopsis "Python style guide checker")
5119 (description
5120 "This tools checks Python code against some of the style conventions in
5121PEP 8.")
5122 (license license:expat)))
5123
5124(define-public python2-pep8
5125 (package-with-python2 python-pep8))
5126
5127(define-public python-pyflakes
5128 (package
5129 (name "python-pyflakes")
5130 (version "1.0.0")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (pypi-uri "pyflakes" version))
5135 (sha256
5136 (base32
5137 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5138 (build-system python-build-system)
5139 (inputs
5140 `(("python-setuptools" ,python-setuptools)))
5141 (home-page
5142 "https://github.com/pyflakes/pyflakes")
5143 (synopsis "Passive checker of Python programs")
5144 (description
5145 "Pyflakes statically checks Python source code for common errors.")
5146 (license license:expat)))
5147
5148(define-public python2-pyflakes
5149 (package-with-python2 python-pyflakes))
5150
5151(define-public python-mccabe
5152 (package
5153 (name "python-mccabe")
5154 (version "0.4.0")
5155 (source
5156 (origin
5157 (method url-fetch)
5158 (uri (pypi-uri "mccabe" version))
5159 (sha256
5160 (base32
5161 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5162 (build-system python-build-system)
5163 (inputs
5164 `(("python-pytest" ,python-pytest)
5165 ("python-pytest-runner" ,python-pytest-runner)
5166 ("python-setuptools" ,python-setuptools)))
5167 (home-page "https://github.com/flintwork/mccabe")
5168 (synopsis "McCabe checker, plugin for flake8")
5169 (description
5170 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5171complexity of Python source code.")
5172 (license license:expat)))
5173
5174(define-public python2-mccabe
5175 (package-with-python2 python-mccabe))
5176
5177(define-public python-mccabe-0.2.1
5178 (package (inherit python-mccabe)
5179 (version "0.2.1")
5180 (source
5181 (origin
5182 (method url-fetch)
5183 (uri (pypi-uri "mccabe" version))
5184 (sha256
5185 (base32
5186 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
5187 (inputs `(("python-setuptools" ,python-setuptools)))))
5188
5189(define-public python2-mccabe-0.2.1
5190 (package-with-python2 python-mccabe-0.2.1))
5191
5192;; Flake8 2.4.1 requires an older version of pep8.
5193;; This should be removed ASAP.
5194(define-public python-pep8-1.5.7
5195 (package (inherit python-pep8)
5196 (version "1.5.7")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (string-append
5201 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5202 version
5203 ".tar.gz"))
5204 (sha256
5205 (base32
5206 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5207
5208(define-public python2-pep8-1.5.7
5209 (package-with-python2 python-pep8-1.5.7))
5210
5211;; Flake8 2.4.1 requires an older version of pyflakes.
5212;; This should be removed ASAP.
5213(define-public python-pyflakes-0.8.1
5214 (package (inherit python-pyflakes)
5215 (version "0.8.1")
5216 (source
5217 (origin
5218 (method url-fetch)
5219 (uri (string-append
5220 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5221 version
5222 ".tar.gz"))
5223 (sha256
5224 (base32
5225 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5226
5227(define-public python2-pyflakes-0.8.1
5228 (package-with-python2 python-pyflakes-0.8.1))
5229
5230(define-public python-flake8
5231 (package
5232 (name "python-flake8")
5233 (version "2.5.4")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (pypi-uri "flake8" version))
5238 (sha256
5239 (base32
5240 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5241 (build-system python-build-system)
5242 (inputs
5243 `(("python-setuptools" ,python-setuptools)
5244 ("python-pep8" ,python-pep8)
5245 ("python-pyflakes" ,python-pyflakes)
5246 ("python-mccabe" ,python-mccabe)
5247 ("python-mock" ,python-mock)
5248 ("python-nose" ,python-nose)))
5249 (home-page "https://gitlab.com/pycqa/flake8")
5250 (synopsis
5251 "The modular source code checker: pep8, pyflakes and co")
5252 (description
5253 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5254 (license license:expat)))
5255
5256(define-public python2-flake8
5257 (package-with-python2 python-flake8))
5258
5259;; This will only be needed by the python-hacking package and will not be
5260;; necessary once python-hacking > 0.10.2 is released.
5261(define-public python-flake8-2.2.4
5262 (package (inherit python-flake8)
5263 (inputs
5264 `(("python-setuptools" ,python-setuptools)
5265 ("python-pep8" ,python-pep8-1.5.7)
5266 ("python-pyflakes" ,python-pyflakes-0.8.1)
5267 ("python-mccabe" ,python-mccabe-0.2.1)
5268 ("python-mock" ,python-mock)
5269 ("python-nose" ,python-nose)))
5270 (version "2.2.4")
5271 (source
5272 (origin
5273 (method url-fetch)
5274 (uri (pypi-uri "flake8" version))
5275 (sha256
5276 (base32
5277 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5278
5279(define-public python2-flake8-2.2.4
5280 (package-with-python2 python-flake8-2.2.4))
5281
5282(define-public python-mistune
5283 (package
5284 (name "python-mistune")
5285 (version "0.7")
5286 (source
5287 (origin
5288 (method url-fetch)
5289 (uri (string-append
5290 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5291 version
5292 ".tar.gz"))
5293 (sha256
5294 (base32
5295 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5296 (build-system python-build-system)
5297 (inputs
5298 `(("python-setuptools" ,python-setuptools)
5299 ("python-nose" ,python-nose)
5300 ("python-cython" ,python-cython)))
5301 (home-page "https://github.com/lepture/mistune")
5302 (synopsis "Markdown parser in pure Python")
5303 (description "This package provides a fast markdown parser in pure
5304Python.")
5305 (license bsd-3)))
5306
5307(define-public python2-mistune
5308 (package-with-python2 python-mistune))
5309
5310(define-public python-markdown
5311 (package
5312 (name "python-markdown")
5313 (version "2.6.5")
5314 (source
5315 (origin
5316 (method url-fetch)
5317 (uri (pypi-uri "Markdown" version))
5318 (sha256
5319 (base32
5320 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5321 (build-system python-build-system)
5322 (arguments
5323 `(#:phases
5324 (modify-phases %standard-phases
5325 (replace 'check
5326 (lambda _
5327 (zero? (system* "python" "run-tests.py")))))))
5328 (native-inputs
5329 `(("python-nose" ,python-nose)
5330 ("python-pyyaml" ,python-pyyaml)))
5331 (home-page "https://pythonhosted.org/Markdown/")
5332 (synopsis "Python implementation of Markdown")
5333 (description
5334 "This package provides a Python implementation of John Gruber's
5335Markdown. The library features international input, various Markdown
5336extensions, and several HTML output formats. A command line wrapper
5337markdown_py is also provided to convert Markdown files to HTML.")
5338 (license bsd-3)))
5339
5340(define-public python2-markdown
5341 (package-with-python2 python-markdown))
5342
5343(define-public python-ptyprocess
5344 (package
5345 (name "python-ptyprocess")
5346 (version "0.5")
5347 (source
5348 (origin
5349 (method url-fetch)
5350 (uri (string-append
5351 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5352 version ".tar.gz"))
5353 (sha256
5354 (base32
5355 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5356 (build-system python-build-system)
5357 (inputs
5358 `(("python-setuptools" ,python-setuptools)
5359 ("python-nose" ,python-nose)))
5360 (arguments
5361 `(#:phases
5362 (modify-phases %standard-phases
5363 (replace 'check
5364 (lambda _
5365 (zero? (system* "nosetests")))))))
5366 (home-page "https://github.com/pexpect/ptyprocess")
5367 (synopsis "Run a subprocess in a pseudo terminal")
5368 (description
5369 "This package provides a Python library used to launch a subprocess in a
5370pseudo terminal (pty), and interact with both the process and its pty.")
5371 (license isc)))
5372
5373(define-public python2-ptyprocess
5374 (package-with-python2 python-ptyprocess))
5375
5376(define-public python-terminado
5377 (package
5378 (name "python-terminado")
5379 (version "0.6")
5380 (source
5381 (origin
5382 (method url-fetch)
5383 (uri (pypi-uri "terminado" version))
5384 (sha256
5385 (base32
5386 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5387 (build-system python-build-system)
5388 (propagated-inputs
5389 `(("python-tornado" ,python-tornado)
5390 ("python-ptyprocess" ,python-ptyprocess)))
5391 (native-inputs
5392 `(("python-nose" ,python-nose)))
5393 (arguments
5394 `(#:phases
5395 (modify-phases %standard-phases
5396 (replace 'check
5397 (lambda _
5398 (zero? (system* "nosetests")))))))
5399 (home-page "https://github.com/takluyver/terminado")
5400 (synopsis "Terminals served to term.js using Tornado websockets")
5401 (description "This package provides a Tornado websocket backend for the
5402term.js Javascript terminal emulator library.")
5403 (license bsd-2)
5404 (properties `((python2-variant . ,(delay python2-terminado))))))
5405
5406(define-public python2-terminado
5407 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5408 (package (inherit terminado)
5409 (propagated-inputs
5410 `(("python2-backport-ssl-match-hostname"
5411 ,python2-backport-ssl-match-hostname)
5412 ,@(package-propagated-inputs terminado)))
5413 (native-inputs
5414 `(("python2-setuptools" ,python2-setuptools)
5415 ,@(package-native-inputs terminado))))))
5416
5417(define-public python-fonttools
5418 (package
5419 (name "python-fonttools")
5420 (version "2.5")
5421 (source (origin
5422 (method url-fetch)
5423 (uri (string-append
5424 "https://pypi.python.org/packages/source/F/FontTools/"
5425 "fonttools-" version ".tar.gz"))
5426 (sha256
5427 (base32
5428 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5429 (build-system python-build-system)
5430 (arguments '(#:test-target "check"))
5431 (propagated-inputs
5432 ;; XXX: module not found if setuptools is not available.
5433 `(("python-setuptools" ,python-setuptools)))
5434 (home-page "http://github.com/behdad/fonttools")
5435 (synopsis "Tools to manipulate font files")
5436 (description
5437 "FontTools/TTX is a library to manipulate font files from Python. It
5438supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5439of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5440also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5441from an XML-based format.")
5442 (license (non-copyleft "file://LICENSE.txt"
5443 "See LICENSE.txt in the distribution."))))
5444
5445(define-public python2-fonttools
5446 (package-with-python2 python-fonttools))
5447
5448(define-public python-ly
5449 (package
5450 (name "python-ly")
5451 (version "0.9.4")
5452 (source
5453 (origin
5454 (method url-fetch)
5455 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5456 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5457 "/python-ly-" version ".tar.gz"))
5458 (sha256
5459 (base32
5460 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5461 (build-system python-build-system)
5462 (native-inputs
5463 `(("python-setuptools" ,python-setuptools)))
5464 (synopsis "Tool and library for manipulating LilyPond files")
5465 (description "This package provides a Python library to parse, manipulate
5466or create documents in LilyPond format. A command line program ly is also
5467provided that can be used to do various manipulations with LilyPond files.")
5468 (home-page "https://pypi.python.org/pypi/python-ly")
5469 (license gpl2+)))
5470
5471(define-public python-appdirs
5472 (package
5473 (name "python-appdirs")
5474 (version "1.4.0")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (string-append
5479 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5480 version
5481 ".tar.gz"))
5482 (sha256
5483 (base32
5484 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5485 (build-system python-build-system)
5486 (inputs
5487 `(("python-setuptools" ,python-setuptools)))
5488 (home-page "http://github.com/ActiveState/appdirs")
5489 (synopsis
5490 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5491 (description
5492 "This module provides a portable way of finding out where user data
5493should be stored on various operating systems.")
5494 (license license:expat)))
5495
5496(define-public python2-appdirs
5497 (package-with-python2 python-appdirs))
5498
5499(define-public python-llfuse
5500 (package
5501 (name "python-llfuse")
5502 (version "1.1")
5503 (source (origin
5504 (method url-fetch)
5505 (uri (string-append
5506 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5507 "llfuse-" version ".tar.bz2"))
5508 (sha256
5509 (base32
5510 "1ywzbqkahrfl9kkcasxrmgilv6fybapvh6pqvimimnfh7sgxal72"))))
5511 (build-system python-build-system)
5512 (inputs
5513 `(("fuse" ,fuse)
5514 ("attr" ,attr)))
5515 (native-inputs
5516 `(("pkg-config" ,pkg-config)
5517 ("python-setuptools" ,python-setuptools)))
5518 (synopsis "Python bindings for FUSE")
5519 (description
5520 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5521 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5522 (license lgpl2.0+)
5523 (properties `((python2-variant . ,(delay python2-llfuse))))))
5524
5525(define-public python2-llfuse
5526 (package (inherit (package-with-python2
5527 (strip-python2-variant python-llfuse)))
5528 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5529
5530;; For attic-0.16
5531(define-public python-llfuse-0.41
5532 (package (inherit python-llfuse)
5533 (version "0.41.1")
5534 (source (origin
5535 (method url-fetch)
5536 (uri (string-append
5537 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5538 "llfuse-" version ".tar.bz2"))
5539 (sha256
5540 (base32
5541 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5542 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5543 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5544 (license (list license:expat lgpl2.0+))))
5545
5546(define-public python-msgpack
5547 (package
5548 (name "python-msgpack")
5549 (version "0.4.7")
5550 (source (origin
5551 (method url-fetch)
5552 (uri (pypi-uri "msgpack-python" version))
5553 (sha256
5554 (base32
5555 "0syd7bs83qs9qmxw540jbgsildbqk4yb57fmrlns1021llli402y"))))
5556 (build-system python-build-system)
5557 (synopsis "MessagePack (de)serializer")
5558 (description "MessagePack is a fast, compact binary serialization format,
5559suitable for similar data to JSON. This package provides CPython bindings for
5560reading and writing MessagePack data.")
5561 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5562 (license asl2.0)
5563 (properties `((python2-variant . ,(delay python2-msgpack))))))
5564
5565(define-public python2-msgpack
5566 (package (inherit (package-with-python2
5567 (strip-python2-variant python-msgpack)))
5568 (native-inputs
5569 `(("python2-setuptools" ,python2-setuptools)))))
5570
5571(define-public python2-msgpack
5572 (package-with-python2 python-msgpack))
5573
5574(define-public python-netaddr
5575 (package
5576 (name "python-netaddr")
5577 (version "0.7.18")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (string-append
5582 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5583 version
5584 ".tar.gz"))
5585 (sha256
5586 (base32
5587 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5588 (build-system python-build-system)
5589 (arguments `(#:tests? #f)) ;; No tests.
5590 (inputs
5591 `(("python-setuptools" ,python-setuptools)))
5592 (home-page "https://github.com/drkjam/netaddr/")
5593 (synopsis "Pythonic manipulation of network addresses")
5594 (description
5595 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5596and MAC network addresses.")
5597 (license bsd-3)))
5598
5599(define-public python2-netaddr
5600 (package-with-python2 python-netaddr))
5601
5602(define-public python-wrapt
5603 (package
5604 (name "python-wrapt")
5605 (version "1.10.5")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (string-append
5610 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5611 version
5612 ".tar.gz"))
5613 (sha256
5614 (base32
5615 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5616 (build-system python-build-system)
5617 (arguments
5618 ;; Tests are not included in the tarball, they are only available in the
5619 ;; git repository.
5620 `(#:tests? #f))
5621 (inputs
5622 `(("python-setuptools" ,python-setuptools)))
5623 (home-page "https://github.com/GrahamDumpleton/wrapt")
5624 (synopsis "Module for decorators, wrappers and monkey patching")
5625 (description
5626 "The aim of the wrapt module is to provide a transparent object proxy for
5627 Python, which can be used as the basis for the construction of function
5628 wrappers and decorator functions.")
5629 (license bsd-2)))
5630
5631(define-public python2-wrapt
5632 (package-with-python2 python-wrapt))
5633
5634(define-public python-iso8601
5635 (package
5636 (name "python-iso8601")
5637 (version "0.1.11")
5638 (source
5639 (origin
5640 (method url-fetch)
5641 (uri (pypi-uri "iso8601" version))
5642 (sha256
5643 (base32
5644 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5645 (build-system python-build-system)
5646 (inputs
5647 `(("python-setuptools" ,python-setuptools)))
5648 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5649 (synopsis "Module to parse ISO 8601 dates")
5650 (description
5651 "This module parses the most common forms of ISO 8601 date strings (e.g.
5652@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5653 (license license:expat)))
5654
5655(define-public python2-iso8601
5656 (package-with-python2 python-iso8601))
5657
5658(define-public python-monotonic
5659 (package
5660 (name "python-monotonic")
5661 (version "0.3")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (string-append
5666 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5667 version
5668 ".tar.gz"))
5669 (sha256
5670 (base32
5671 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5672 (build-system python-build-system)
5673 (inputs
5674 `(("python-setuptools" ,python-setuptools)))
5675 (home-page "https://github.com/atdt/monotonic")
5676 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5677 (description
5678 "This module provides a monotonic() function which returns the value (in
5679fractional seconds) of a clock which never goes backwards.")
5680 (license asl2.0)))
5681
5682(define-public python2-monotonic
5683 (package-with-python2 python-monotonic))
5684
5685(define-public python-webob
5686 (package
5687 (name "python-webob")
5688 (version "1.5.1")
5689 (source
5690 (origin
5691 (method url-fetch)
5692 (uri (pypi-uri "WebOb" version))
5693 (sha256
5694 (base32
5695 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5696 (build-system python-build-system)
5697 (inputs
5698 `(("python-nose" ,python-nose)
5699 ("python-setuptools" ,python-setuptools)))
5700 (home-page "http://webob.org/")
5701 (synopsis "WSGI request and response object")
5702 (description
5703 "WebOb provides wrappers around the WSGI request environment, and an
5704object to help create WSGI responses.")
5705 (license license:expat)))
5706
5707(define-public python2-webob
5708 (package-with-python2 python-webob))
5709
5710(define-public python-xlrd
5711 (package
5712 (name "python-xlrd")
5713 (version "0.9.4")
5714 (source (origin
5715 (method url-fetch)
5716 (uri (string-append "https://pypi.python.org/packages/source/x/"
5717 "xlrd/xlrd-" version ".tar.gz"))
5718 (sha256
5719 (base32
5720 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5721 (build-system python-build-system)
5722 (arguments
5723 `(#:phases
5724 (modify-phases %standard-phases
5725 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5726 ;; run tests instead for now.
5727 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5728 (native-inputs `(("python-nose" ,python-nose)
5729 ("python-setuptools" ,python-setuptools)))
5730 (home-page "http://www.python-excel.org/")
5731 (synopsis "Library for extracting data from Excel files")
5732 (description "This packages provides a library to extract data from
5733spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5734@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5735Unicode-aware. It is not intended as an end-user tool.")
5736 (license bsd-3)))
5737
5738(define-public python2-xlrd
5739 (package-with-python2 python-xlrd))
5740
5741(define-public python-prettytable
5742 (package
5743 (name "python-prettytable")
5744 (version "0.7.2")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (string-append
5749 "https://pypi.python.org/packages/source/P/PrettyTable/"
5750 "prettytable-" version ".tar.bz2"))
5751 (sha256
5752 (base32
5753 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5754 (build-system python-build-system)
5755 (inputs
5756 `(("python-setuptools" ,python-setuptools)))
5757 (home-page "http://code.google.com/p/prettytable/")
5758 (synopsis "Display tabular data in an ASCII table format")
5759 (description
5760 "A library designed to represent tabular data in visually appealing ASCII
5761tables. PrettyTable allows for selection of which columns are to be printed,
5762independent alignment of columns (left or right justified or centred) and
5763printing of sub-tables by specifying a row range.")
5764 (license bsd-3)))
5765
5766(define-public python2-prettytable
5767 (package-with-python2 python-prettytable))
5768
5769(define-public python-tables
5770 (package
5771 (name "python-tables")
5772 (version "3.2.2")
5773 (source
5774 (origin
5775 (method url-fetch)
5776 (uri (pypi-uri "tables" version))
5777 (sha256
5778 (base32
5779 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5780 (build-system python-build-system)
5781 (arguments
5782 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5783 ;; or "check", so we must override the build and check phases.
5784 #:phases
5785 (modify-phases %standard-phases
5786 (add-after 'unpack 'use-gcc
5787 (lambda _
5788 (substitute* "setup.py"
5789 (("compiler = new_compiler\\(\\)" line)
5790 (string-append line
5791 "\ncompiler.set_executables(compiler='gcc',"
5792 "compiler_so='gcc',"
5793 "linker_exe='gcc',"
5794 "linker_so='gcc -shared')")))
5795 #t))
5796 (replace 'build
5797 (lambda* (#:key inputs #:allow-other-keys)
5798 (zero? (system* "python" "setup.py" "build"
5799 (string-append "--hdf5="
5800 (assoc-ref inputs "hdf5"))))))
5801 (replace 'check
5802 (lambda* (#:key inputs #:allow-other-keys)
5803 (zero? (system* "python" "setup.py" "check"
5804 (string-append "--hdf5="
5805 (assoc-ref inputs "hdf5")))))))))
5806 (propagated-inputs
5807 `(("python-numexpr" ,python-numexpr)
5808 ("python-numpy" ,python-numpy)))
5809 (native-inputs
5810 `(("python-setuptools" ,python-setuptools)
5811 ("python-cython" ,python-cython)
5812 ("pkg-config" ,pkg-config)))
5813 (inputs
5814 `(("hdf5" ,hdf5)
5815 ("bzip2" ,bzip2)
5816 ("zlib" ,zlib)))
5817 (home-page "http://www.pytables.org/")
5818 (synopsis "Hierarchical datasets for Python")
5819 (description "PyTables is a package for managing hierarchical datasets and
5820designed to efficently cope with extremely large amounts of data.")
5821 (license bsd-3)))
5822
5823(define-public python2-tables
5824 (package-with-python2 python-tables))
5825
5826(define-public python-pyasn1
5827 (package
5828 (name "python-pyasn1")
5829 (version "0.1.8")
5830 (source
5831 (origin
5832 (method url-fetch)
5833 (uri (string-append "https://pypi.python.org/packages/source/p/"
5834 "pyasn1/pyasn1-" version ".tar.gz"))
5835 (sha256
5836 (base32
5837 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5838 (build-system python-build-system)
5839 (home-page "http://pyasn1.sourceforge.net/")
5840 (synopsis "ASN.1 types and codecs")
5841 (description
5842 "This is an implementation of ASN.1 types and codecs in Python. It is
5843suitable for a wide range of protocols based on the ASN.1 specification.")
5844 (license bsd-2)))
5845
5846(define-public python2-pyasn1
5847 (package-with-python2 python-pyasn1))
5848
5849(define-public python-pyasn1-modules
5850 (package
5851 (name "python-pyasn1-modules")
5852 (version "0.0.8")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "pyasn1-modules" version))
5857 (sha256
5858 (base32
5859 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5860 (build-system python-build-system)
5861 (native-inputs
5862 `(("python-setuptools" ,python-setuptools)))
5863 (propagated-inputs
5864 `(("python-pyasn1" ,python-pyasn1)))
5865 (home-page "http://sourceforge.net/projects/pyasn1/")
5866 (synopsis "ASN.1 codec implementations")
5867 (description
5868 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5869implementations of ASN.1-based codecs and protocols.")
5870 (license bsd-3)))
5871
5872(define-public python2-pyasn1-modules
5873 (package-with-python2 python-pyasn1-modules))
5874
5875(define-public python2-ipaddress
5876 (package
5877 (name "python2-ipaddress")
5878 (version "1.0.14")
5879 (source
5880 (origin
5881 (method url-fetch)
5882 (uri (string-append "https://pypi.python.org/packages/source/i/"
5883 "ipaddress/ipaddress-" version ".tar.gz"))
5884 (sha256
5885 (base32
5886 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5887 (build-system python-build-system)
5888 (arguments
5889 `(#:tests? #f ; no tests
5890 #:python ,python-2))
5891 (home-page "https://github.com/phihag/ipaddress")
5892 (synopsis "IP address manipulation library")
5893 (description
5894 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5895in Python. This library is used to create, poke at, and manipulate IPv4 and
5896IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5897module to older versions of Python.")
5898 (license psfl)))
5899
5900(define-public python2-ipaddr
5901 (package
5902 (name "python2-ipaddr")
5903 (version "2.1.11")
5904 (source
5905 (origin
5906 (method url-fetch)
5907 (uri (pypi-uri "ipaddr" version))
5908 (sha256
5909 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
5910 (build-system python-build-system)
5911 (arguments
5912 `(#:python ,python-2 ;version 2 only
5913 #:phases
5914 (modify-phases %standard-phases
5915 (replace 'check
5916 (lambda* _
5917 (zero? (system* "python" "ipaddr_test.py")))))))
5918 (home-page "https://github.com/google/ipaddr-py")
5919 (synopsis "IP address manipulation library")
5920 (description
5921 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
5922IPv6 addresses and networks.
5923
5924For new implementations you may prefer to use the standard module
5925@code{ipaddress}, which was introduced in Python 3.3 and backported to older
5926versions of Python.")
5927 (license asl2.0)))
5928
5929(define-public python-idna
5930 (package
5931 (name "python-idna")
5932 (version "2.0")
5933 (source
5934 (origin
5935 (method url-fetch)
5936 (uri (string-append "https://pypi.python.org/packages/source/i/"
5937 "idna/idna-" version ".tar.gz"))
5938 (sha256
5939 (base32
5940 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5941 (build-system python-build-system)
5942 (native-inputs
5943 `(("python-setuptools" ,python-setuptools)))
5944 (home-page "https://github.com/kjd/idna")
5945 (synopsis "Internationalized domain names in applications")
5946 (description
5947 "This is a library to support the Internationalised Domain Names in
5948Applications (IDNA) protocol as specified in RFC 5891. This version of the
5949protocol is often referred to as “IDNA2008” and can produce different results
5950from the earlier standard from 2003. The library is also intended to act as a
5951suitable drop-in replacement for the “encodings.idna” module that comes with
5952the Python standard library but currently only supports the older 2003
5953specification.")
5954 (license bsd-4)))
5955
5956(define-public python2-idna
5957 (package-with-python2 python-idna))
5958
5959(define-public python-pretend
5960 (package
5961 (name "python-pretend")
5962 (version "1.0.8")
5963 (source
5964 (origin
5965 (method url-fetch)
5966 (uri (string-append "https://pypi.python.org/packages/source/p/"
5967 "pretend/pretend-" version ".tar.gz"))
5968 (sha256
5969 (base32
5970 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5971 (build-system python-build-system)
5972 (native-inputs
5973 `(("python-setuptools" ,python-setuptools)))
5974 (home-page "https://github.com/alex/pretend")
5975 (synopsis "Library for stubbing in Python")
5976 (description
5977 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5978technique for writing tests. You may hear the term mixed up with mocks,
5979fakes, or doubles. Basically, a stub is an object that returns pre-canned
5980responses, rather than doing any computation.")
5981 (license bsd-3)))
5982
5983(define-public python2-pretend
5984 (package-with-python2 python-pretend))
5985
5986(define-public python-cryptography-vectors
5987 (package
5988 (name "python-cryptography-vectors")
5989 (version "1.3.4")
5990 (source
5991 (origin
5992 (method url-fetch)
5993 (uri (pypi-uri "cryptography_vectors" version))
5994 (sha256
5995 (base32
5996 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
5997 (build-system python-build-system)
5998 (native-inputs
5999 `(("python-setuptools" ,python-setuptools)))
6000 (home-page "https://github.com/pyca/cryptography")
6001 (synopsis "Test vectors for the cryptography package")
6002 (description
6003 "This package contains test vectors for the cryptography package.")
6004 ;; Distributed under either BSD-3 or ASL2.0
6005 (license (list bsd-3 asl2.0))))
6006
6007(define-public python2-cryptography-vectors
6008 (package-with-python2 python-cryptography-vectors))
6009
6010(define-public python-cryptography
6011 (package
6012 (name "python-cryptography")
6013 (version "1.3.4")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "cryptography" version))
6018 (sha256
6019 (base32
6020 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
6021 (build-system python-build-system)
6022 (inputs
6023 `(("openssl" ,openssl)))
6024 (propagated-inputs
6025 `(("python-cffi" ,python-cffi)
6026 ("python-six" ,python-six)
6027 ("python-pyasn1" ,python-pyasn1)
6028 ("python-idna" ,python-idna)
6029 ("python-iso8601" ,python-iso8601)))
6030 (native-inputs
6031 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6032 ("python-hypothesis" ,python-hypothesis)
6033 ("python-setuptools" ,python-setuptools)
6034 ("python-pretend" ,python-pretend)
6035 ("python-pyasn1" ,python-pyasn1)
6036 ("python-pyasn1-modules" ,python-pyasn1-modules)
6037 ("python-pytest" ,python-pytest)))
6038 (home-page "https://github.com/pyca/cryptography")
6039 (synopsis "Cryptographic recipes and primitives for Python")
6040 (description
6041 "cryptography is a package which provides cryptographic recipes and
6042primitives to Python developers. It aims to be the “cryptographic standard
6043library” for Python. The package includes both high level recipes, and low
6044level interfaces to common cryptographic algorithms such as symmetric ciphers,
6045message digests and key derivation functions.")
6046 ;; Distributed under either BSD-3 or ASL2.0
6047 (license (list bsd-3 asl2.0))
6048 (properties `((python2-variant . ,(delay python2-cryptography))))))
6049
6050(define-public python2-cryptography
6051 (let ((crypto (package-with-python2
6052 (strip-python2-variant python-cryptography))))
6053 (package (inherit crypto)
6054 (propagated-inputs
6055 `(("python2-ipaddress" ,python2-ipaddress)
6056 ("python2-backport-ssl-match-hostname"
6057 ,python2-backport-ssl-match-hostname)
6058 ("python2-enum34" ,python2-enum34)
6059 ,@(package-propagated-inputs crypto))))))
6060
6061(define-public python-pyopenssl
6062 (package
6063 (name "python-pyopenssl")
6064 (version "16.0.0")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (string-append "https://pypi.python.org/packages/source/p/"
6069 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
6070 (sha256
6071 (base32
6072 "0zfijaxlq4vgi6jz0d4i5xq9ygqnyps6br7lmigjhqnh8gp10g9n"))))
6073 (build-system python-build-system)
6074 (propagated-inputs
6075 `(("python-cryptography" ,python-cryptography)
6076 ("python-six" ,python-six)))
6077 (inputs
6078 `(("openssl" ,openssl)))
6079 (native-inputs
6080 `(("python-setuptools" ,python-setuptools)))
6081 (home-page "https://github.com/pyca/pyopenssl")
6082 (synopsis "Python wrapper module around the OpenSSL library")
6083 (description
6084 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6085library.")
6086 (license asl2.0)))
6087
6088(define-public python2-pyopenssl
6089 (package-with-python2 python-pyopenssl))
6090
6091(define-public python-pip
6092 (package
6093 (name "python-pip")
6094 (version "8.0.2")
6095 (source
6096 (origin
6097 (method url-fetch)
6098 (uri (pypi-uri "pip" version))
6099 (sha256
6100 (base32
6101 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6102 (build-system python-build-system)
6103 (inputs
6104 `(("python-setuptools" ,python-setuptools)
6105 ("python-virtualenv" ,python-virtualenv)
6106 ;; Tests
6107 ("python-mock" ,python-mock)
6108 ("python-pytest" ,python-pytest)
6109 ("python-scripttest" ,python-scripttest)))
6110 (home-page "https://pip.pypa.io/")
6111 (synopsis
6112 "Package manager for Python software")
6113 (description
6114 "Pip is a package manager for Python software, that finds packages on the
6115Python Package Index (PyPI).")
6116 (license license:expat)))
6117
6118(define-public python2-pip
6119 (package-with-python2 python-pip))
6120
6121(define-public python-tlsh
6122 (package
6123 (name "python-tlsh")
6124 (version "3.4.4")
6125 (home-page "https://github.com/trendmicro/tlsh")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6129 version ".tar.gz"))
6130 (sha256
6131 (base32
6132 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6133 (file-name (string-append name "-" version ".tar.gz"))))
6134 (build-system cmake-build-system)
6135 (arguments
6136 '(#:out-of-source? #f
6137 #:phases (modify-phases %standard-phases
6138 (replace
6139 'install
6140 (lambda* (#:key outputs #:allow-other-keys)
6141 ;; Build and install the Python bindings. The underlying
6142 ;; C++ library is apparently not meant to be installed.
6143 (let ((out (assoc-ref outputs "out")))
6144 (with-directory-excursion "py_ext"
6145 (and (system* "python" "setup.py" "build")
6146 (system* "python" "setup.py" "install"
6147 (string-append "--prefix=" out))))))))))
6148 (inputs `(("python" ,python-wrapper))) ;for the bindings
6149 (synopsis "Fuzzy matching library for Python")
6150 (description
6151 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6152Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6153value which can be used for similarity comparisons. Similar objects have
6154similar hash values, which allows for the detection of similar objects by
6155comparing their hash values. The byte stream should have a sufficient amount
6156of complexity; for example, a byte stream of identical bytes will not generate
6157a hash value.")
6158 (license asl2.0)))
6159
6160(define-public python2-tlsh
6161 (package
6162 (inherit python-tlsh)
6163 (name "python2-tlsh")
6164 (inputs `(("python" ,python-2)))))
6165
6166(define-public python-libarchive-c
6167 (package
6168 (name "python-libarchive-c")
6169 (version "2.2")
6170 (source (origin
6171 (method url-fetch)
6172 (uri (pypi-uri "libarchive-c" version))
6173 (sha256
6174 (base32
6175 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6176 (build-system python-build-system)
6177 (arguments
6178 '(#:phases (modify-phases %standard-phases
6179 (add-before
6180 'build 'reference-libarchive
6181 (lambda* (#:key inputs #:allow-other-keys)
6182 ;; Retain the absolute file name of libarchive.so.
6183 (let ((libarchive (assoc-ref inputs "libarchive")))
6184 (substitute* "libarchive/ffi.py"
6185 (("find_library\\('archive'\\)")
6186 (string-append "'" libarchive
6187 "/lib/libarchive.so'"))))
6188
6189 ;; Do not make a compressed egg (see
6190 ;; <http://bugs.gnu.org/20765>).
6191 (let ((port (open-file "setup.cfg" "a")))
6192 (display "\n[easy_install]\nzip_ok = 0\n"
6193 port)
6194 (close-port port)
6195 #t))))))
6196 (inputs
6197 `(("python-setuptools" ,python-setuptools)
6198 ("libarchive" ,libarchive)))
6199 (home-page "https://github.com/Changaco/python-libarchive-c")
6200 (synopsis "Python interface to libarchive")
6201 (description
6202 "This package provides Python bindings to libarchive, a C library to
6203access possibly compressed archives in many different formats. It uses
6204Python's @code{ctypes} foreign function interface (FFI).")
6205 (license lgpl2.0+)))
6206
6207(define-public python2-libarchive-c
6208 (package-with-python2 python-libarchive-c))
6209
6210(define-public python-file
6211 (package
6212 (inherit file)
6213 (name "python-file")
6214 (build-system python-build-system)
6215 (arguments
6216 '(#:tests? #f ;no tests
6217 #:phases (modify-phases %standard-phases
6218 (add-before 'build 'change-directory
6219 (lambda _
6220 (chdir "python")
6221 #t))
6222 (add-before 'build 'set-library-file-name
6223 (lambda* (#:key inputs #:allow-other-keys)
6224 (let ((file (assoc-ref inputs "file")))
6225 (substitute* "magic.py"
6226 (("find_library\\('magic'\\)")
6227 (string-append "'" file "/lib/libmagic.so'")))
6228 #t))))))
6229 (inputs `(("file" ,file)))
6230 (self-native-input? #f)
6231 (synopsis "Python bindings to the libmagic file type guesser. Note that
6232this module and the python-magic module both provide a \"magic.py\" file;
6233these two modules, which are different and were developed separately, both
6234serve the same purpose: provide Python bindings for libmagic.")))
6235
6236(define-public python2-file
6237 (package-with-python2 python-file))
6238
6239(define-public python-debian
6240 (package
6241 (name "python-debian")
6242 (version "0.1.23")
6243 (source
6244 (origin
6245 (method url-fetch)
6246 (uri (string-append
6247 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6248 version ".tar.gz"))
6249 (sha256
6250 (base32
6251 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6252 (build-system python-build-system)
6253 (inputs
6254 `(("python-six" ,python-six)))
6255 (native-inputs
6256 `(("python-setuptools" ,python-setuptools)))
6257 (home-page "http://packages.debian.org/sid/python-debian")
6258 (synopsis "Debian package related modules")
6259 (description
6260 ;; XXX: Use @enumerate instead of @itemize to work around
6261 ;; <http://bugs.gnu.org/21772>.
6262 "This package provides Python modules that abstract many formats of
6263Debian-related files, such as:
6264
6265@enumerate
6266@item Debtags information;
6267@item @file{debian/changelog} files;
6268@item packages files, pdiffs;
6269@item control files of single or multiple RFC822-style paragraphs---e.g.
6270 @file{debian/control}, @file{.changes}, @file{.dsc};
6271@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6272 contained files and meta-information.
6273@end enumerate\n")
6274
6275 ;; Modules are either GPLv2+ or GPLv3+.
6276 (license gpl3+)))
6277
6278(define-public python2-debian
6279 (package-with-python2 python-debian))
6280
6281(define-public python-chardet
6282 (package
6283 (name "python-chardet")
6284 (version "2.3.0")
6285 (source
6286 (origin
6287 (method url-fetch)
6288 (uri (string-append
6289 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6290 version
6291 ".tar.gz"))
6292 (sha256
6293 (base32
6294 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6295 (build-system python-build-system)
6296 (native-inputs
6297 `(("python-setuptools" ,python-setuptools)))
6298 (home-page "https://github.com/chardet/chardet")
6299 (synopsis "Universal encoding detector for Python 2 and 3")
6300 (description
6301 "This package provides @code{chardet}, a Python module that can
6302automatically detect a wide range of file encodings.")
6303 (license lgpl2.1+)))
6304
6305(define-public python2-chardet
6306 (package-with-python2 python-chardet))
6307
6308(define-public python-docopt
6309 (package
6310 (name "python-docopt")
6311 (version "0.6.2")
6312 (source
6313 (origin
6314 (method url-fetch)
6315 ;; The release on PyPI does not include tests.
6316 (uri (string-append
6317 "https://github.com/docopt/docopt/archive/"
6318 version ".tar.gz"))
6319 (file-name (string-append name "-" version ".tar.gz"))
6320 (sha256
6321 (base32
6322 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6323 (build-system python-build-system)
6324 (native-inputs
6325 `(("python-pytest" ,python-pytest)
6326 ("python-setuptools" ,python-setuptools)))
6327 (arguments
6328 `(#:phases (alist-replace
6329 'check
6330 (lambda _ (zero? (system* "py.test")))
6331 %standard-phases)))
6332 (home-page "http://docopt.org")
6333 (synopsis "Command-line interface description language for Python")
6334 (description "This library allows the user to define a command-line
6335interface from a program's help message rather than specifying it
6336programatically with command-line parsers like @code{getopt} and
6337@code{argparse}.")
6338 (license license:expat)))
6339
6340(define-public python2-docopt
6341 (package-with-python2 python-docopt))
6342
6343(define-public python-zope-event
6344 (package
6345 (name "python-zope-event")
6346 (version "4.1.0")
6347 (source
6348 (origin
6349 (method url-fetch)
6350 (uri (string-append "https://pypi.python.org/packages/source/z"
6351 "/zope.event/zope.event-" version ".tar.gz"))
6352 (sha256
6353 (base32
6354 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6355 (build-system python-build-system)
6356 (inputs
6357 `(("python-setuptools" ,python-setuptools)))
6358 (home-page "http://pypi.python.org/pypi/zope.event")
6359 (synopsis "Event publishing system for Python")
6360 (description "Zope.event provides an event publishing API, intended for
6361use by applications which are unaware of any subscribers to their events. It
6362is a simple event-dispatching system on which more sophisticated event
6363dispatching systems can be built.")
6364 (license zpl2.1)))
6365
6366(define-public python2-zope-event
6367 (package-with-python2 python-zope-event))
6368
6369(define-public python-zope-interface
6370 (package
6371 (name "python-zope-interface")
6372 (version "4.1.3")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (string-append "https://pypi.python.org/packages/source/z"
6377 "/zope.interface/zope.interface-" version ".tar.gz"))
6378 (sha256
6379 (base32
6380 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6381 (build-system python-build-system)
6382 (propagated-inputs
6383 `(("python-zope-event" ,python-zope-event)))
6384 (home-page "https://github.com/zopefoundation/zope.interface")
6385 (synopsis "Python implementation of the \"design by contract\"
6386methodology")
6387 (description "Zope.interface provides an implementation of \"object
6388interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6389conforming to a given API or contract.")
6390 (license zpl2.1)))
6391
6392(define-public python2-zope-interface
6393 (package-with-python2 python-zope-interface))
6394
6395(define-public python-zope-exceptions
6396 (package
6397 (name "python-zope-exceptions")
6398 (version "4.0.8")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (string-append "https://pypi.python.org/packages/source/z"
6403 "/zope.exceptions/zope.exceptions-"
6404 version ".tar.gz"))
6405 (sha256
6406 (base32
6407 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6408 (build-system python-build-system)
6409 (arguments
6410 '(#:tests? #f)) ; circular dependency with zope.testrunner
6411 (propagated-inputs
6412 `(("python-zope-interface" ,python-zope-interface)))
6413 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6414 (synopsis "Zope exceptions")
6415 (description "Zope.exceptions provides general-purpose exception types
6416that have uses outside of the Zope framework.")
6417 (license zpl2.1)))
6418
6419(define-public python2-zope-exceptions
6420 (package-with-python2 python-zope-exceptions))
6421
6422(define-public python-zope-testing
6423 (package
6424 (name "python-zope-testing")
6425 (version "4.5.0")
6426 (source
6427 (origin
6428 (method url-fetch)
6429 (uri (string-append "https://pypi.python.org/packages/source/z"
6430 "/zope.testing/zope.testing-" version ".tar.gz"))
6431 (sha256
6432 (base32
6433 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6434 (build-system python-build-system)
6435 (native-inputs
6436 `(("python-zope-exceptions" ,python-zope-exceptions)))
6437 (propagated-inputs
6438 `(("python-zope-interface" ,python-zope-interface)))
6439 (home-page "http://pypi.python.org/pypi/zope.testing")
6440 (synopsis "Zope testing helpers")
6441 (description "Zope.testing provides a number of testing utilities for HTML
6442forms, HTTP servers, regular expressions, and more.")
6443 (license zpl2.1)))
6444
6445(define-public python2-zope-testing
6446 (package-with-python2 python-zope-testing))
6447
6448(define-public python-zope-testrunner
6449 (package
6450 (name "python-zope-testrunner")
6451 (version "4.4.9")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (string-append "https://pypi.python.org/packages/source/z"
6456 "/zope.testrunner/zope.testrunner-"
6457 version ".zip"))
6458 (sha256
6459 (base32
6460 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6461 (build-system python-build-system)
6462 (native-inputs
6463 `(("python-six" ,python-six)
6464 ("python-zope-exceptions" ,python-zope-exceptions)
6465 ("python-zope-testing" ,python-zope-testing)
6466 ("unzip" ,unzip)))
6467 (propagated-inputs
6468 `(("python-zope-interface" ,python-zope-interface)))
6469 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6470 (synopsis "Zope testrunner script")
6471 (description "Zope.testrunner provides a script for running Python
6472tests.")
6473 (license zpl2.1)))
6474
6475(define-public python2-zope-testrunner
6476 (let ((base (package-with-python2 python-zope-testrunner)))
6477 (package
6478 (inherit base)
6479 (native-inputs
6480 (append (package-native-inputs base)
6481 `(("python2-subunit" ,python2-subunit)
6482 ("python2-mimeparse" ,python2-mimeparse)))))))
6483
6484(define-public python-zope-i18nmessageid
6485 (package
6486 (name "python-zope-i18nmessageid")
6487 (version "4.0.3")
6488 (source
6489 (origin
6490 (method url-fetch)
6491 (uri (string-append
6492 "https://pypi.python.org/packages/source/z"
6493 "/zope.i18nmessageid/zope.i18nmessageid-"
6494 version ".tar.gz"))
6495 (sha256
6496 (base32
6497 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6498 (build-system python-build-system)
6499 (inputs
6500 `(("python-setuptools" ,python-setuptools)))
6501 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6502 (synopsis "Message identifiers for internationalization")
6503 (description "Zope.i18nmessageid provides facilities for declaring
6504internationalized messages within program source text.")
6505 (license zpl2.1)))
6506
6507(define-public python2-zope-i18nmessageid
6508 (package-with-python2 python-zope-i18nmessageid))
6509
6510(define-public python-zope-schema
6511 (package
6512 (name "python-zope-schema")
6513 (version "4.4.2")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (string-append "https://pypi.python.org/packages/source/z"
6518 "/zope.schema/zope.schema-" version ".tar.gz"))
6519 (sha256
6520 (base32
6521 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6522 (build-system python-build-system)
6523 (propagated-inputs
6524 `(("python-zope-event" ,python-zope-event)
6525 ("python-zope-interface" ,python-zope-interface)))
6526 (native-inputs
6527 `(("python-zope-testing" ,python-zope-testing)))
6528 (home-page "http://pypi.python.org/pypi/zope.schema")
6529 (synopsis "Zope data schemas")
6530 (description "Zope.scheme provides extensions to zope.interface for
6531defining data schemas.")
6532 (license zpl2.1)))
6533
6534(define-public python2-zope-schema
6535 (package-with-python2 python-zope-schema))
6536
6537(define-public python-zope-configuration
6538 (package
6539 (name "python-zope-configuration")
6540 (version "4.0.3")
6541 (source (origin
6542 (method url-fetch)
6543 (uri (string-append "https://pypi.python.org/packages/source/z"
6544 "/zope.configuration/zope.configuration-"
6545 version ".tar.gz"))
6546 (sha256
6547 (base32
6548 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6549 (build-system python-build-system)
6550 (propagated-inputs
6551 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6552 ("python-zope-schema" ,python-zope-schema)))
6553 (home-page "http://pypi.python.org/pypi/zope.configuration")
6554 (synopsis "Zope Configuration Markup Language")
6555 (description "Zope.configuration implements ZCML, the Zope Configuration
6556Markup Language.")
6557 (license zpl2.1)))
6558
6559(define-public python2-zope-configuration
6560 (package-with-python2 python-zope-configuration))
6561
6562(define-public python-zope-proxy
6563 (package
6564 (name "python-zope-proxy")
6565 (version "4.1.6")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (string-append "https://pypi.python.org/packages/source/z"
6570 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6571 (sha256
6572 (base32
6573 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6574 (build-system python-build-system)
6575 (propagated-inputs
6576 `(("python-zope-interface" ,python-zope-interface)))
6577 (home-page "http://pypi.python.org/pypi/zope.proxy")
6578 (synopsis "Generic, transparent proxies")
6579 (description "Zope.proxy provides generic, transparent proxies for Python.
6580Proxies are special objects which serve as mostly-transparent wrappers around
6581another object, intervening in the apparent behavior of the wrapped object
6582only when necessary to apply the policy (e.g., access checking, location
6583brokering, etc.) for which the proxy is responsible.")
6584 (license zpl2.1)))
6585
6586(define-public python2-zope-proxy
6587 (package-with-python2 python-zope-proxy))
6588
6589(define-public python-zope-location
6590 (package
6591 (name "python-zope-location")
6592 (version "4.0.3")
6593 (source
6594 (origin
6595 (method url-fetch)
6596 (uri (string-append "https://pypi.python.org/packages/source/z"
6597 "/zope.location/zope.location-" version ".tar.gz"))
6598 (sha256
6599 (base32
6600 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6601 (build-system python-build-system)
6602 (native-inputs
6603 `(("python-zope-proxy" ,python-zope-proxy)
6604 ("python-zope-schema" ,python-zope-schema)))
6605 (home-page "http://pypi.python.org/pypi/zope.location/")
6606 (synopsis "Zope location library")
6607 (description "Zope.location implements the concept of \"locations\" in
6608Zope3, which are are special objects that have a structural location.")
6609 (license zpl2.1)))
6610
6611(define-public python2-zope-location
6612 (package-with-python2 python-zope-location))
6613
6614(define-public python-zope-security
6615 (package
6616 (name "python-zope-security")
6617 (version "4.0.3")
6618 (source
6619 (origin
6620 (method url-fetch)
6621 (uri (string-append "https://pypi.python.org/packages/source/z"
6622 "/zope.security/zope.security-" version ".tar.gz"))
6623 (sha256
6624 (base32
6625 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6626 (build-system python-build-system)
6627 (propagated-inputs
6628 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6629 ("python-zope-component" ,python-zope-component)
6630 ("python-zope-location" ,python-zope-location)
6631 ("python-zope-proxy" ,python-zope-proxy)
6632 ("python-zope-schema" ,python-zope-schema)
6633 ("python-zope-testrunner" ,python-zope-testrunner)
6634 ("python-zope-testing" ,python-zope-testing)))
6635 (home-page "http://pypi.python.org/pypi/zope.security")
6636 (synopsis "Zope security framework")
6637 (description "Zope.security provides a generic mechanism to implement
6638security policies on Python objects.")
6639 (license zpl2.1)))
6640
6641(define-public python2-zope-security
6642 (let ((zope-security (package-with-python2 python-zope-security)))
6643 (package (inherit zope-security)
6644 (propagated-inputs
6645 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6646 ,@(alist-delete
6647 "python-zope-testrunner"
6648 (package-propagated-inputs zope-security)))))))
6649
6650(define-public python-zope-component
6651 (package
6652 (name "python-zope-component")
6653 (version "4.2.2")
6654 (source
6655 (origin
6656 (method url-fetch)
6657 (uri (string-append "https://pypi.python.org/packages/source/z"
6658 "/zope.component/zope.component-" version ".tar.gz"))
6659 (sha256
6660 (base32
6661 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6662 (build-system python-build-system)
6663 (arguments
6664 ;; Skip tests due to circular dependency with python-zope-security.
6665 '(#:tests? #f))
6666 (native-inputs
6667 `(("python-zope-testing" ,python-zope-testing)))
6668 (propagated-inputs
6669 `(("python-zope-event" ,python-zope-event)
6670 ("python-zope-interface" ,python-zope-interface)
6671 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6672 ("python-zope-configuration" ,python-zope-configuration)))
6673 (home-page "https://github.com/zopefoundation/zope.component")
6674 (synopsis "Zope Component Architecture")
6675 (description "Zope.component represents the core of the Zope Component
6676Architecture. Together with the zope.interface package, it provides
6677facilities for defining, registering and looking up components.")
6678 (license zpl2.1)))
6679
6680(define-public python2-zope-component
6681 (package-with-python2 python-zope-component))
6682
6683(define-public python2-pythondialog
6684 (package
6685 (name "python2-pythondialog")
6686 (version "3.4.0")
6687 (source
6688 (origin
6689 (method url-fetch)
6690 (uri (pypi-uri "python2-pythondialog" version))
6691 (sha256
6692 (base32
6693 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9"))))
6694 (build-system python-build-system)
6695 (arguments
6696 `(#:phases
6697 (modify-phases %standard-phases
6698 (add-after 'unpack 'patch-path
6699 (lambda* (#:key inputs #:allow-other-keys)
6700 (let* ((dialog (assoc-ref inputs "dialog")))
6701 ;; Since this library really wants to grovel the search path, we
6702 ;; must hardcode dialog's store path into it.
6703 (substitute* "dialog.py"
6704 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6705 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6706 #t))))
6707 #:python ,python-2
6708 #:tests? #f)) ; no test suite
6709 (propagated-inputs
6710 `(("dialog" ,dialog)))
6711 (home-page "http://pythondialog.sourceforge.net/")
6712 (synopsis "Python interface to the UNIX dialog utility")
6713 (description "A Python wrapper for the dialog utility. Its purpose is to
6714provide an easy to use, pythonic and comprehensive Python interface to dialog.
6715This allows one to make simple text-mode user interfaces on Unix-like systems")
6716 (license lgpl2.1)))
6717
6718(define-public python-pyrfc3339
6719 (package
6720 (name "python-pyrfc3339")
6721 (version "1.0")
6722 (source
6723 (origin
6724 (method url-fetch)
6725 (uri (pypi-uri "pyRFC3339" version))
6726 (sha256
6727 (base32
6728 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
6729 (build-system python-build-system)
6730 (propagated-inputs
6731 `(("python-pytz" ,python-pytz)))
6732 (native-inputs
6733 `(("python-nose" ,python-nose)
6734 ("python-setuptools" ,python-setuptools)))
6735 (home-page "https://github.com/kurtraschke/pyRFC3339")
6736 (synopsis "Python timestamp library")
6737 (description "Python library for generating and parsing RFC 3339-compliant
6738timestamps.")
6739 (license license:expat)))
6740
6741(define-public python2-pyrfc3339
6742 (package-with-python2 python-pyrfc3339))
6743
6744(define-public python-werkzeug
6745 (package
6746 (name "python-werkzeug")
6747 (version "0.11.5")
6748 (source
6749 (origin
6750 (method url-fetch)
6751 (uri (pypi-uri "Werkzeug" version))
6752 (sha256
6753 (base32
6754 "0r41xqp4cypzcgsf6zbspbqd272wnzf20igb4w4b5wzfhgqh9nxg"))))
6755 (build-system python-build-system)
6756 (native-inputs
6757 `(("python-pytest" ,python-pytest)))
6758 (home-page "http://werkzeug.pocoo.org/")
6759 (synopsis "Utilities for WSGI applications")
6760 (description "One of the most advanced WSGI utility modules. It includes a
6761powerful debugger, full-featured request and response objects, HTTP utilities to
6762handle entity tags, cache control headers, HTTP dates, cookie handling, file
6763uploads, a powerful URL routing system and a bunch of community-contributed
6764addon modules.")
6765 (license x11)))
6766
6767(define-public python2-werkzeug
6768 (package-with-python2 python-werkzeug))
6769
6770(define-public python-configobj
6771 (package
6772 (name "python-configobj")
6773 (version "5.0.6")
6774 (source (origin
6775 (method url-fetch)
6776 (uri (string-append
6777 "https://pypi.python.org/packages/source/c/configobj/"
6778 "configobj-" version ".tar.gz"))
6779 (sha256
6780 (base32
6781 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6782 ;; Patch setup.py so it looks for python-setuptools, which is
6783 ;; required to parse the keyword 'install_requires' in setup.py.
6784 (patches (search-patches "python-configobj-setuptools.patch"))))
6785 (build-system python-build-system)
6786 (native-inputs
6787 `(("python-setuptools" ,python-setuptools)
6788 ("python-six" ,python-six)))
6789 (synopsis "Config file reading, writing and validation")
6790 (description "ConfigObj is a simple but powerful config file reader and
6791writer: an ini file round tripper. Its main feature is that it is very easy to
6792use, with a straightforward programmer’s interface and a simple syntax for
6793config files.")
6794 (home-page "https://github.com/DiffSK/configobj")
6795 (license bsd-3)))
6796
6797(define-public python2-configobj
6798 (package-with-python2 python-configobj))
6799
6800(define-public python-configargparse
6801 (package
6802 (name "python-configargparse")
6803 (version "0.10.0")
6804 (source (origin
6805 (method url-fetch)
6806 (uri (string-append
6807 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6808 "ConfigArgParse-" version ".tar.gz"))
6809 (sha256
6810 (base32
6811 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6812 (build-system python-build-system)
6813 (arguments
6814 ;; FIXME: Bug in test suite filed upstream:
6815 ;; https://github.com/bw2/ConfigArgParse/issues/32
6816 '(#:tests? #f))
6817 (synopsis "Replacement for argparse")
6818 (description "A drop-in replacement for argparse that allows options to also
6819be set via config files and/or environment variables.")
6820 (home-page "https://github.com/bw2/ConfigArgParse")
6821 (license license:expat)))
6822
6823(define-public python2-configargparse
6824 (package-with-python2 python-configargparse))
6825
6826(define-public python-ndg-httpsclient
6827 (package
6828 (name "python-ndg-httpsclient")
6829 (version "0.4.0")
6830 (source (origin
6831 (method url-fetch)
6832 (uri (string-append
6833 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6834 "ndg_httpsclient-" version ".tar.gz"))
6835 (sha256
6836 (base32
6837 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6838 (build-system python-build-system)
6839 (propagated-inputs
6840 `(("python-pyopenssl" ,python-pyopenssl)))
6841 (synopsis "HTTPS support for Python's httplib and urllib2")
6842 (description "This is a HTTPS client implementation for httplib and urllib2
6843based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6844over the default provided with Python and importantly enables full verification
6845of the SSL peer.")
6846 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6847 (license bsd-3)))
6848
6849;; python2-openssl requires special care, so package-with-python2 is
6850;; insufficient.
6851(define-public python2-ndg-httpsclient
6852 (package (inherit python-ndg-httpsclient)
6853 (name "python2-ndg-httpsclient")
6854 (arguments `(#:python ,python-2))
6855 (propagated-inputs
6856 `(("python2-pyopenssl" ,python2-pyopenssl)))))
6857
6858(define-public python-contextlib2
6859 (package
6860 (name "python-contextlib2")
6861 (version "0.4.0")
6862 (source
6863 (origin
6864 (method url-fetch)
6865 (uri (pypi-uri "contextlib2" version))
6866 (sha256
6867 (base32
6868 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6869 (build-system python-build-system)
6870 (arguments
6871 `(#:phases
6872 (modify-phases %standard-phases
6873 (replace 'check
6874 (lambda _ (zero?
6875 (system*
6876 "python" "test_contextlib2.py" "-v")))))))
6877 (home-page "http://contextlib2.readthedocs.org/")
6878 (synopsis "Tools for decorators and context managers")
6879 (description "This module is primarily a backport of the Python
68803.2 contextlib to earlier Python versions. Like contextlib, it
6881provides utilities for common tasks involving decorators and context
6882managers. It also contains additional features that are not part of
6883the standard library.")
6884 (license psfl)))
6885
6886(define-public python2-contextlib2
6887 (package-with-python2 python-contextlib2))
6888
6889(define-public python-texttable
6890 (package
6891 (name "python-texttable")
6892 (version "0.8.4")
6893 (source
6894 (origin
6895 (method url-fetch)
6896 (uri (pypi-uri "texttable" version))
6897 (sha256
6898 (base32
6899 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
6900 (build-system python-build-system)
6901 (arguments '(#:tests? #f)) ; no tests
6902 (home-page "https://github.com/foutaise/texttable/")
6903 (synopsis "Python module for creating simple ASCII tables")
6904 (description "Texttable is a Python module for creating simple ASCII
6905tables.")
6906 (license lgpl2.1+)))
6907
6908(define-public python2-texttable
6909 (package-with-python2 python-texttable))
6910
6911(define-public python-websocket-client
6912 (package
6913 (name "python-websocket-client")
6914 (version "0.37.0")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (pypi-uri "websocket_client" version))
6919 (sha256
6920 (base32
6921 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
6922 (build-system python-build-system)
6923 (native-inputs
6924 `(("python-six" ,python-six))) ; for tests
6925 (inputs
6926 `(("python-setuptools" ,python-setuptools)))
6927 (home-page "https://github.com/liris/websocket-client")
6928 (synopsis "WebSocket client for Python")
6929 (description "The Websocket-client module provides the low level APIs for
6930WebSocket usage in Python programs.")
6931 (license lgpl2.1+)))
6932
6933(define-public python2-websocket-client
6934 (package-with-python2 python-websocket-client))
6935
6936(define-public python-atomicwrites
6937 (package
6938 (name "python-atomicwrites")
6939 (version "1.1.0")
6940 (source (origin
6941 (method url-fetch)
6942 (uri (pypi-uri "atomicwrites" version))
6943 (sha256
6944 (base32
6945 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
6946 (build-system python-build-system)
6947 (synopsis "Atomic file writes in Python")
6948 (description "Library for atomic file writes using platform dependent tools
6949for atomic filesystem operations.")
6950 (home-page "https://github.com/untitaker/python-atomicwrites")
6951 (license license:expat)
6952 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
6953
6954(define-public python2-atomicwrites
6955 (package (inherit (package-with-python2
6956 (strip-python2-variant python-atomicwrites)))
6957 (native-inputs
6958 `(("python2-setuptools" ,python2-setuptools)))))
6959
6960(define-public python-requests-toolbelt
6961 (package
6962 (name "python-requests-toolbelt")
6963 (version "0.6.2")
6964 (source (origin
6965 (method url-fetch)
6966 (uri (string-append
6967 "https://pypi.python.org/packages/"
6968 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
6969 "requests-toolbelt-" version ".tar.gz"))
6970 (sha256
6971 (base32
6972 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
6973 (build-system python-build-system)
6974 (propagated-inputs
6975 `(("python-requests" ,python-requests)))
6976 (synopsis "Extensions to python-requests")
6977 (description "This is a toolbelt of useful classes and functions to be used
6978with python-requests.")
6979 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
6980 (license asl2.0)))
6981
6982(define-public python-click-threading
6983 (package
6984 (name "python-click-threading")
6985 (version "0.2.0")
6986 (source (origin
6987 (method url-fetch)
6988 (uri (string-append
6989 "https://pypi.python.org/packages/"
6990 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
6991 "click-threading-" version ".tar.gz"))
6992 (sha256
6993 (base32
6994 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
6995 (build-system python-build-system)
6996 (propagated-inputs
6997 `(("python-click" ,python-click)))
6998 (synopsis "Utilities for multithreading in Click")
6999 (description "This package provides utilities for multithreading in Click
7000applications.")
7001 (home-page "https://github.com/click-contrib/click-threading")
7002 (license license:expat)))
7003
7004(define-public python-click-log
7005 (package
7006 (name "python-click-log")
7007 (version "0.1.3")
7008 (source (origin
7009 (method url-fetch)
7010 (uri (pypi-uri "click-log" version))
7011 (sha256
7012 (base32
7013 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7014 (build-system python-build-system)
7015 (propagated-inputs
7016 `(("python-click" ,python-click)))
7017 (synopsis "Logging for click applications")
7018 (description "This package provides a Python library for logging Click
7019applications.")
7020 (home-page "https://github.com/click-contrib/click-log")
7021 (license license:expat)))
7022
7023(define-public python-apipkg
7024 (package
7025 (name "python-apipkg")
7026 (version "1.4")
7027 (source (origin
7028 (method url-fetch)
7029 (uri (pypi-uri "apipkg" version))
7030 (sha256
7031 (base32
7032 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7033 (build-system python-build-system)
7034 (inputs
7035 `(("python-pytest" ,python-pytest)))
7036 (synopsis "Namespace control and lazy-import mechanism")
7037 (description "With apipkg you can control the exported namespace of a Python
7038package and greatly reduce the number of imports for your users. It is a small
7039pure Python module that works on virtually all Python versions.")
7040 (home-page "https://bitbucket.org/hpk42/apipkg")
7041 (license license:expat)
7042 (properties `((python2-variant . ,(delay python2-apipkg))))))
7043
7044(define-public python2-apipkg
7045 (package
7046 (inherit (package-with-python2
7047 (strip-python2-variant python-apipkg)))
7048 (native-inputs
7049 `(("python2-setuptools" ,python2-setuptools)))))
7050
7051(define-public python-execnet
7052 (package
7053 (name "python-execnet")
7054 (version "1.4.1")
7055 (source (origin
7056 (method url-fetch)
7057 (uri (pypi-uri "execnet" version))
7058 (sha256
7059 (base32
7060 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7061 (build-system python-build-system)
7062 (native-inputs
7063 `(("python-setuptools-scm" ,python-setuptools-scm)))
7064 (inputs
7065 `(("python-apipkg" ,python-apipkg)))
7066 (synopsis "Rapid multi-Python deployment")
7067 (description "Execnet provides a share-nothing model with
7068channel-send/receive communication for distributing execution across many
7069Python interpreters across version, platform and network barriers. It has a
7070minimal and fast API targetting the following uses:
7071@enumerate
7072@item distribute tasks to (many) local or remote CPUs
7073@item write and deploy hybrid multi-process applications
7074@item write scripts to administer multiple environments
7075@end enumerate")
7076 (home-page "http://codespeak.net/execnet/")
7077 (license license:expat)
7078 (properties `((python2-variant . ,(delay python2-execnet))))))
7079
7080(define-public python2-execnet
7081 (let ((execnet (package-with-python2
7082 (strip-python2-variant python-execnet))))
7083 (package
7084 (inherit execnet)
7085 (native-inputs
7086 `(("python2-setuptools" ,python2-setuptools)
7087 ,@(package-native-inputs execnet))))))
7088
7089;;; The software provided by this package was integrated into pytest 2.8.
7090(define-public python-pytest-cache
7091 (package
7092 (name "python-pytest-cache")
7093 (version "1.0")
7094 (source (origin
7095 (method url-fetch)
7096 (uri (pypi-uri "pytest-cache" version))
7097 (sha256
7098 (base32
7099 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7100 (build-system python-build-system)
7101 (inputs
7102 `(("python-apipkg" ,python-apipkg)
7103 ("python-execnet" ,python-execnet)
7104 ("python-py" ,python-py)
7105 ("python-pytest" ,python-pytest)))
7106 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7107 (description "The pytest-cache plugin provides tools to rerun failures from
7108the last py.test invocation.")
7109 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7110 (license license:expat)
7111 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7112
7113(define-public python2-pytest-cache
7114 (let ((pytest-cache (package-with-python2
7115 (strip-python2-variant python-pytest-cache))))
7116 (package
7117 (inherit pytest-cache)
7118 (native-inputs
7119 `(("python2-setuptools" ,python2-setuptools)
7120 ,@(package-native-inputs pytest-cache))))))
7121
7122(define-public python-pytest-localserver
7123 (package
7124 (name "python-pytest-localserver")
7125 (version "0.3.5")
7126 (source (origin
7127 (method url-fetch)
7128 (uri (pypi-uri "pytest-localserver" version))
7129 (sha256
7130 (base32
7131 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7132 (build-system python-build-system)
7133 (arguments
7134 `(#:phases (modify-phases %standard-phases
7135 (replace 'check
7136 (lambda _
7137 (zero? (system* "py.test" "--genscript=runtests.py"))
7138 (zero? (system* "py.test")))))))
7139 (native-inputs
7140 `(("python-pytest" ,python-pytest)
7141 ("python-requests" ,python-requests)
7142 ("python-six" ,python-six)))
7143 (inputs
7144 `(("python-werkzeug" ,python-werkzeug)))
7145 (synopsis "Py.test plugin to test server connections locally")
7146 (description "Pytest-localserver is a plugin for the pytest testing
7147framework which enables you to test server connections locally.")
7148 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7149 (license license:expat)))
7150
7151(define-public python-wsgi-intercept
7152 (package
7153 (name "python-wsgi-intercept")
7154 (version "1.2.2")
7155 (source (origin
7156 (method url-fetch)
7157 (uri (string-append
7158 "https://pypi.python.org/packages/"
7159 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7160 "wsgi_intercept-" version ".tar.gz"))
7161 (sha256
7162 (base32
7163 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7164 (build-system python-build-system)
7165 (native-inputs
7166 `(("python-pytest" ,python-pytest)
7167 ("python-six" ,python-six)))
7168 (propagated-inputs
7169 `(("python-httplib2" ,python-httplib2)
7170 ("python-requests" ,python-requests)))
7171 (synopsis "Puts a WSGI application in place of a real URI for testing")
7172 (description "Wsgi_intercept installs a WSGI application in place of a real
7173URI for testing. Testing a WSGI application normally involves starting a
7174server at a local host and port, then pointing your test code to that address.
7175Instead, this library lets you intercept calls to any specific host/port
7176combination and redirect them into a WSGI application importable by your test
7177program. Thus, you can avoid spawning multiple processes or threads to test
7178your Web app.")
7179 (home-page "https://github.com/cdent/wsgi-intercept")
7180 (license license:expat)))
7181
7182(define-public python-pytest-xprocess
7183 (package
7184 (name "python-pytest-xprocess")
7185 (version "0.9.1")
7186 (source (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "pytest-xprocess" version))
7189 (sha256
7190 (base32
7191 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7192 (build-system python-build-system)
7193 (propagated-inputs
7194 `(("python-pytest" ,python-pytest)
7195 ("python-pytest-cache" ,python-pytest-cache)
7196 ("python-psutil" ,python-psutil)))
7197 (synopsis "Pytest plugin to manage external processes across test runs")
7198 (description "Pytest-xprocess is an experimental py.test plugin for managing
7199processes across test runs.")
7200 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7201 (license license:expat)))
7202
7203(define-public python-icalendar
7204 (package
7205 (name "python-icalendar")
7206 (version "3.9.1")
7207 (source (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "icalendar" version))
7210 (sha256
7211 (base32
7212 "0fhrczdj3jxy5bvswphp3vys7vwv5c9bpwg7asykqwa3z6253q6q"))))
7213 (build-system python-build-system)
7214 (propagated-inputs
7215 `(("python-dateutil-2" ,python-dateutil-2)
7216 ("python-pytz" ,python-pytz)))
7217 (synopsis "Python library for parsing iCalendar files")
7218 (description "The icalendar package is a parser/generator of iCalendar
7219files for use with Python.")
7220 (home-page "https://github.com/collective/icalendar")
7221 (license bsd-2)))
7222
7223(define-public python-sphinxcontrib-newsfeed
7224 (package
7225 (name "python-sphinxcontrib-newsfeed")
7226 (version "0.1.4")
7227 (source (origin
7228 (method url-fetch)
7229 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7230 (sha256
7231 (base32
7232 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7233 (build-system python-build-system)
7234 (propagated-inputs
7235 `(("python-docutils" ,python-docutils)
7236 ("python-sphinx" ,python-sphinx)))
7237 (synopsis "News Feed extension for Sphinx")
7238 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7239Blog, News or Announcements section to a Sphinx website.")
7240 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7241 (license bsd-2)))
7242
7243(define-public python-args
7244 (package
7245 (name "python-args")
7246 (version "0.1.0")
7247 (source (origin
7248 (method url-fetch)
7249 (uri (pypi-uri "args" version))
7250 (sha256
7251 (base32
7252 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7253 (build-system python-build-system)
7254 (inputs
7255 `(("python-setuptools" ,python-setuptools)))
7256 (home-page "https://github.com/kennethreitz/args")
7257 (synopsis "Command-line argument parser")
7258 (description
7259 "This library provides a Python module to parse command-line arguments.")
7260 (license bsd-3)))
7261
7262(define-public python2-args
7263 (package-with-python2 python-args))
7264
7265(define-public python-clint
7266 (package
7267 (name "python-clint")
7268 (version "0.5.1")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "clint" version))
7272 (sha256
7273 (base32
7274 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7275 (build-system python-build-system)
7276 (inputs
7277 `(("python-args" ,python-args)
7278 ("python-setuptools" ,python-setuptools)))
7279 (home-page "https://github.com/kennethreitz/clint")
7280 (synopsis "Command-line interface tools")
7281 (description
7282 "Clint is a Python module filled with a set of tools for developing
7283command-line applications, including tools for colored and indented
7284output, progress bar display, and pipes.")
7285 (license isc)))
7286
7287(define-public python2-clint
7288 (package-with-python2 python-clint))
7289
7290(define-public python-astor
7291 (package
7292 (name "python-astor")
7293 (version "0.5")
7294 (source (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "astor" version))
7297 (sha256
7298 (base32
7299 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7300 (build-system python-build-system)
7301 (inputs
7302 `(("python-setuptools" ,python-setuptools)))
7303 (home-page "https://github.com/berkerpeksag/astor")
7304 (synopsis "Read and write Python ASTs")
7305 (description
7306 "Astor is designed to allow easy manipulation of Python source via the
7307Abstract Syntax Tree.")
7308 (license bsd-3)))
7309
7310(define-public python2-astor
7311 (package-with-python2 python-astor))
7312
7313(define-public python-rply
7314 (package
7315 (name "python-rply")
7316 (version "0.7.4")
7317 (source (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "rply" version))
7320 (sha256
7321 (base32
7322 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7323 (build-system python-build-system)
7324 (inputs
7325 `(("python-appdirs" ,python-appdirs)
7326 ("python-setuptools" ,python-setuptools)))
7327 (home-page "https://github.com/alex/rply")
7328 (synopsis "Parser generator for Python")
7329 (description
7330 "This package provides a pure Python based parser generator, that also
7331works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7332with a new public API, and RPython support.")
7333 (license bsd-3)))
7334
7335(define-public python2-rply
7336 (package-with-python2 python-rply))
7337
7338(define-public python-hy
7339 (package
7340 (name "python-hy")
7341 (version "0.11.1")
7342 (source (origin
7343 (method url-fetch)
7344 (uri (pypi-uri "hy" version))
7345 (sha256
7346 (base32
7347 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7348 (build-system python-build-system)
7349 (inputs
7350 `(("python-astor" ,python-astor)
7351 ("python-clint" ,python-clint)
7352 ("python-rply" ,python-rply)
7353 ("python-setuptools" ,python-setuptools)))
7354 (home-page "http://hylang.org/")
7355 (synopsis "Lisp frontend to Python")
7356 (description
7357 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7358its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7359Python at your fingertips, in Lisp form.")
7360 (license license:expat)))
7361
7362(define-public python2-hy
7363 (package-with-python2 python-hy))
7364
7365(define-public python-rauth
7366 (package
7367 (name "python-rauth")
7368 (version "0.7.2")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "rauth" version))
7373 (sha256
7374 (base32
7375 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7376 (build-system python-build-system)
7377 (arguments
7378 `(#:test-target "check"))
7379 (inputs
7380 `(("python-requests" ,python-requests)))
7381 (home-page "https://github.com/litl/rauth")
7382 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7383 (description
7384 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7385provides service wrappers for convenient connection initialization and
7386authenticated session objects providing things like keep-alive.")
7387 (license license:expat)
7388 (properties `((python2-variant . ,(delay python2-rauth))))))
7389
7390(define-public python2-rauth
7391 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7392 (package
7393 (inherit base)
7394 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7395 ("python2-unittest2" ,python2-unittest2)
7396 ,@(package-native-inputs base))))))
7397
7398(define-public python2-functools32
7399 (package
7400 (name "python2-functools32")
7401 (version "3.2.3-2")
7402 (source
7403 (origin
7404 (method url-fetch)
7405 (uri (pypi-uri "functools32" version))
7406 (sha256
7407 (base32
7408 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7409 (build-system python-build-system)
7410 (arguments
7411 `(#:python ,python-2
7412 #:tests? #f)) ; no test target
7413 (native-inputs
7414 `(("python2-setuptools" ,python2-setuptools)))
7415 (home-page "https://github.com/MiCHiLU/python-functools32")
7416 (synopsis
7417 "Backport of the functools module from Python 3.2.3")
7418 (description
7419 "This package is a backport of the @code{functools} module from Python
74203.2.3 for use with older versions of Python and PyPy.")
7421 (license license:expat)))
7422
7423(define-public python2-futures
7424 (package
7425 (name "python2-futures")
7426 (version "3.0.3")
7427 (source
7428 (origin
7429 (method url-fetch)
7430 (uri (pypi-uri "futures" version))
7431 (sha256
7432 (base32
7433 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7434 (build-system python-build-system)
7435 (arguments `(#:python ,python-2))
7436 (native-inputs
7437 `(("python2-setuptools" ,python2-setuptools)))
7438 (home-page "https://github.com/agronholm/pythonfutures")
7439 (synopsis
7440 "Backport of the concurrent.futures package from Python 3.2")
7441 (description
7442 "The concurrent.futures module provides a high-level interface for
7443asynchronously executing callables. This package backports the
7444concurrent.futures package from Python 3.2")
7445 (license bsd-3)))
7446
7447(define-public python-urllib3
7448 (package
7449 (name "python-urllib3")
7450 (version "1.13.1")
7451 (source
7452 (origin
7453 (method url-fetch)
7454 (uri (pypi-uri "urllib3" version))
7455 (sha256
7456 (base32
7457 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7458 (build-system python-build-system)
7459 (arguments `(#:tests? #f))
7460 (native-inputs
7461 `(("python-setuptools" ,python-setuptools)
7462 ;; some packages for tests
7463 ("python-nose" ,python-nose)
7464 ("python-mock" ,python-mock)
7465 ("python-tornado" ,python-tornado)))
7466 (propagated-inputs
7467 `(;; packages for https security
7468 ("python-certifi" ,python-certifi)
7469 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7470 ("python-pyasn1" ,python-pyasn1)
7471 ("python-pyopenssl" ,python-pyopenssl)))
7472 (home-page "http://urllib3.readthedocs.org/")
7473 (synopsis "HTTP library with thread-safe connection pooling")
7474 (description
7475 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7476can reuse the same socket connection for multiple requests, it can POST files,
7477supports url redirection and retries, and also gzip and deflate decoding.")
7478 (license license:expat)))
7479
7480(define-public python2-urllib3
7481 (package-with-python2 python-urllib3))
7482
7483(define-public python-colorama
7484 (package
7485 (name "python-colorama")
7486 (version "0.3.3")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "colorama" version))
7491 (sha256
7492 (base32
7493 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7494 (build-system python-build-system)
7495 (inputs
7496 `(("python-setuptools" ,python-setuptools)))
7497 (synopsis "colored terminal text rendering for Python")
7498 (description "Colorama is a Python library for rendering colored terminal
7499text.")
7500 (home-page "https://pypi.python.org/pypi/colorama")
7501 (license bsd-3)))
7502
7503(define-public python2-colorama
7504 (package-with-python2 python-colorama))
7505
7506(define-public python-rsa
7507 (package
7508 (name "python-rsa")
7509 (version "3.2")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (pypi-uri "rsa" version))
7514 (sha256
7515 (base32
7516 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7517 (build-system python-build-system)
7518 (inputs
7519 `(("python-pyasn1" ,python-pyasn1)
7520 ("python-setuptools" ,python-setuptools)))
7521 (synopsis "Pure-Python RSA implementation")
7522 (description "Python-RSA is a pure-Python RSA implementation. It supports
7523encryption and decryption, signing and verifying signatures, and key
7524generation according to PKCS#1 version 1.5. It can be used as a Python
7525library as well as on the command line.")
7526 (home-page "http://stuvel.eu/rsa")
7527 (license asl2.0)))
7528
7529(define-public python2-rsa
7530 (package-with-python2 python-rsa))
7531
7532(define-public python-pluggy
7533 (package
7534 (name "python-pluggy")
7535 (version "0.3.1")
7536 (source
7537 (origin
7538 (method url-fetch)
7539 (uri (pypi-uri "pluggy" version))
7540 (sha256
7541 (base32
7542 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7543 (build-system python-build-system)
7544 (inputs
7545 `(("python-setuptools" ,python-setuptools)))
7546 (synopsis "Plugin and hook calling mechanism for Python")
7547 (description "Pluggy is an extraction of the plugin manager as used by
7548Pytest but stripped of Pytest specific details.")
7549 (home-page "https://pypi.python.org/pypi/pluggy")
7550 (license license:expat)))
7551
7552(define-public python2-pluggy
7553 (package-with-python2 python-pluggy))
7554
7555(define-public python-tox
7556 (package
7557 (name "python-tox")
7558 (version "2.3.1")
7559 (source
7560 (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "tox" version))
7563 (sha256
7564 (base32
7565 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7566 (build-system python-build-system)
7567 (arguments
7568 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7569 ;; pytest breaks other packages.
7570 '(#:tests? #f))
7571 (inputs
7572 `(("python-setuptools" ,python-setuptools)
7573 ("python-pluggy" ,python-pluggy)
7574 ("python-py" ,python-py)
7575 ("python-virtualenv" ,python-virtualenv)
7576 ("python-pytest" ,python-pytest)))
7577 (home-page "http://tox.testrun.org/")
7578 (synopsis "Virtualenv-based automation of test activities")
7579 (description "Tox is a generic virtualenv management and test command line
7580tool. It can be used to check that a package installs correctly with
7581different Python versions and interpreters, or run tests in each type of
7582supported environment, or act as a frontend to continuous integration
7583servers.")
7584 (license license:expat)))
7585
7586(define-public python2-tox
7587 (package-with-python2 python-tox))
7588
7589(define-public python-jmespath
7590 (package
7591 (name "python-jmespath")
7592 (version "0.9.0")
7593 (source
7594 (origin
7595 (method url-fetch)
7596 (uri (pypi-uri "jmespath" version))
7597 (sha256
7598 (base32
7599 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7600 (build-system python-build-system)
7601 (inputs
7602 `(("python-setuptools" ,python-setuptools)))
7603 (synopsis "JSON Matching Expressions")
7604 (description "JMESPath (pronounced “james path”) is a Python library that
7605allows one to declaratively specify how to extract elements from a JSON
7606document.")
7607 (home-page "https://github.com/jmespath/jmespath.py")
7608 (license license:expat)))
7609
7610(define-public python2-jmespath
7611 (package-with-python2 python-jmespath))
7612
7613(define-public python-botocore
7614 (package
7615 (name "python-botocore")
7616 (version "1.3.17")
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (pypi-uri "botocore" version))
7621 (sha256
7622 (base32
7623 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7624 (build-system python-build-system)
7625 (inputs
7626 `(("python-dateutil" ,python-dateutil-2)
7627 ("python-docutils" ,python-docutils)
7628 ("python-mock" ,python-mock)
7629 ("python-nose" ,python-nose)
7630 ("python-setuptools" ,python-setuptools)
7631 ("python-tox" ,python-tox)
7632 ("python-wheel" ,python-wheel)
7633 ("python-jmespath" ,python-jmespath)))
7634 (home-page "https://github.com/boto/botocore")
7635 (synopsis "Low-level interface to AWS")
7636 (description "Botocore is a Python library that provides a low-level
7637interface to the Amazon Web Services (AWS) API.")
7638 (license asl2.0)))
7639
7640(define-public python2-botocore
7641 (package-with-python2 python-botocore))
7642
7643(define-public awscli
7644 (package
7645 (name "awscli")
7646 (version "1.9.17")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (string-append
7651 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7652 version ".tar.gz"))
7653 (sha256
7654 (base32
7655 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7656 (build-system python-build-system)
7657 (inputs
7658 `(("python-colorama" ,python-colorama)
7659 ("python-docutils" ,python-docutils)
7660 ("python-mock" ,python-mock)
7661 ("python-nose" ,python-nose)
7662 ("python-rsa" ,python-rsa)
7663 ("python-setuptools" ,python-setuptools)
7664 ("python-sphinx" ,python-sphinx)
7665 ("python-tox" ,python-tox)
7666 ("python-wheel" ,python-wheel)
7667 ("python-botocore" ,python-botocore)))
7668 (home-page "http://aws.amazon.com/cli/")
7669 (synopsis "Command line client for AWS")
7670 (description "AWS CLI provides a unified command line interface to the
7671Amazon Web Services (AWS) API.")
7672 (license asl2.0)))
7673
7674(define-public python-hypothesis
7675 (package
7676 (name "python-hypothesis")
7677 (version "3.1.0")
7678 (source (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "hypothesis" version))
7681 (sha256
7682 (base32
7683 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
7684 (build-system python-build-system)
7685 (propagated-inputs
7686 `(("python-flake8" ,python-flake8)
7687 ("python-pytest" ,python-pytest)))
7688 (synopsis "Library for property based testing")
7689 (description "Hypothesis is a library for testing your Python code against a
7690much larger range of examples than you would ever want to write by hand. It’s
7691based on the Haskell library, Quickcheck, and is designed to integrate
7692seamlessly into your existing Python unit testing work flow.")
7693 (home-page "https://github.com/DRMacIver/hypothesis")
7694 (license mpl2.0)
7695 (properties `((python2-variant . ,(delay python2-hypothesis))))))
7696
7697(define-public python2-hypothesis
7698 (let ((hypothesis (package-with-python2
7699 (strip-python2-variant python-hypothesis))))
7700 (package (inherit hypothesis)
7701 (native-inputs
7702 `(("python2-enum34" ,python2-enum34)
7703 ("python2-setuptools" ,python2-setuptools))))))
7704
7705(define-public python-pytest-subtesthack
7706 (package
7707 (name "python-pytest-subtesthack")
7708 (version "0.1.1")
7709 (source (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "pytest-subtesthack" version))
7712 (sha256
7713 (base32
7714 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
7715 (build-system python-build-system)
7716 (native-inputs
7717 `(;; setuptools required for python-2 variant
7718 ("python-setuptools" ,python-setuptools)))
7719 (propagated-inputs
7720 `(("python-pytest" ,python-pytest)))
7721 (synopsis "Set-up and tear-down fixtures for unit tests")
7722 (description "This plugin allows you to set up and tear down fixtures within
7723unit test functions that use @code{py.test}. This is useful for using
7724@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
7725function multiple times, without setting up or tearing down fixture state as is
7726normally the case.")
7727 (home-page "https://github.com/untitaker/pytest-subtesthack/")
7728 (license unlicense)))
7729
7730(define-public python2-pytest-subtesthack
7731 (package-with-python2 python-pytest-subtesthack))
7732
7733(define-public python2-xdo
7734 (package
7735 (name "python2-xdo")
7736 (version "0.2")
7737 (source (origin
7738 (method url-fetch)
7739 (uri (string-append
7740 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7741 "python-xdo_" version ".orig.tar.gz"))
7742 (sha256
7743 (base32
7744 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
7745 (build-system python-build-system)
7746 (arguments
7747 `(#:python ,python-2
7748 #:tests? #f)) ; no tests provided
7749 (inputs
7750 `(("xdotool" ,xdotool)
7751 ("libX11" ,libx11)))
7752 (home-page "https://tracker.debian.org/pkg/python-xdo")
7753 (synopsis "Python library for simulating X11 keyboard/mouse input")
7754 (description "Provides bindings to libxdo for manipulating X11 via simulated
7755input. (Note that this is mostly a legacy library; you may wish to look at
7756python-xdo for newer bindings.)")
7757 (license bsd-3)))
7758
7759(define-public python-wtforms
7760 (package
7761 (name "python-wtforms")
7762 (version "2.1")
7763 (source
7764 (origin
7765 (method url-fetch)
7766 (uri (pypi-uri "WTForms" version ".zip"))
7767 (sha256
7768 (base32
7769 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
7770 (build-system python-build-system)
7771 (native-inputs
7772 `(("unzip" ,unzip)))
7773 (home-page "http://wtforms.simplecodes.com/")
7774 (synopsis
7775 "Form validation and rendering library for Python web development")
7776 (description
7777 "WTForms is a flexible forms validation and rendering library
7778for Python web development. It is very similar to the web form API
7779available in Django, but is a standalone package.")
7780 (license bsd-3)
7781 (properties `((python2-variant . ,(delay python2-wtforms))))))
7782
7783(define-public python2-wtforms
7784 (package
7785 (inherit (package-with-python2
7786 (strip-python2-variant python-wtforms)))
7787 (inputs `(("python2-setuptools" ,python2-setuptools)))))
7788
7789(define-public python-mako
7790 (package
7791 (name "python-mako")
7792 (version "1.0.3")
7793 (source
7794 (origin
7795 (method url-fetch)
7796 (uri (pypi-uri "Mako" version))
7797 (sha256
7798 (base32
7799 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
7800 (build-system python-build-system)
7801 (native-inputs
7802 `(("python-markupsafe" ,python-markupsafe)
7803 ("python-mock" ,python-mock)
7804 ("python-nose" ,python-nose)))
7805 (home-page "http://www.makotemplates.org/")
7806 (synopsis "Templating language for Python")
7807 (description "Mako is a templating language for Python that compiles
7808templates into Python modules.")
7809 (license license:expat)
7810 (properties `((python2-variant . ,(delay python2-mako))))))
7811
7812(define-public python2-mako
7813 (let ((base (package-with-python2
7814 (strip-python2-variant python-mako))))
7815 (package
7816 (inherit base)
7817 (native-inputs
7818 (cons `("python2-setuptools" ,python2-setuptools)
7819 (package-native-inputs base))))))
7820
7821(define-public python-waitress
7822 (package
7823 (name "python-waitress")
7824 (version "0.8.10")
7825 (source
7826 (origin
7827 (method url-fetch)
7828 (uri (pypi-uri "waitress" version))
7829 (sha256
7830 (base32
7831 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
7832 (build-system python-build-system)
7833 (home-page "https://github.com/Pylons/waitress")
7834 (synopsis "Waitress WSGI server")
7835 (description "Waitress is meant to be a production-quality pure-Python WSGI
7836server with very acceptable performance.")
7837 (license zpl2.1)
7838 (properties `((python2-variant . ,(delay python2-waitress))))))
7839
7840(define-public python2-waitress
7841 (package
7842 (inherit (package-with-python2
7843 (strip-python2-variant python-waitress)))
7844 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
7845
7846(define-public python-wsgiproxy2
7847 (package
7848 (name "python-wsgiproxy2")
7849 (version "0.4.2")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "WSGIProxy2" version ".zip"))
7854 (sha256
7855 (base32
7856 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
7857 (build-system python-build-system)
7858 (native-inputs
7859 `(("unzip" ,unzip)
7860 ("python-nose" ,python-nose)
7861 ("python-coverage" ,python-coverage)))
7862 (propagated-inputs
7863 `(("python-six" ,python-six)
7864 ("python-webob" ,python-webob)))
7865 (home-page
7866 "https://github.com/gawel/WSGIProxy2/")
7867 (synopsis "WSGI Proxy with various http client backends")
7868 (description "WSGI turns HTTP requests into WSGI function calls.
7869WSGIProxy turns WSGI function calls into HTTP requests.
7870It also includes code to sign requests and pass private data,
7871and to spawn subprocesses to handle requests.")
7872 (license license:expat)
7873 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
7874
7875(define-public python2-wsgiproxy2
7876 (let ((wsgiproxy2 (package-with-python2
7877 (strip-python2-variant python-wsgiproxy2))))
7878 (package
7879 (inherit wsgiproxy2)
7880 (inputs `(("python2-setuptools" ,python2-setuptools)
7881 ,@(package-inputs wsgiproxy2))))))
7882
7883(define-public python-pastedeploy
7884 (package
7885 (name "python-pastedeploy")
7886 (version "1.5.2")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "PasteDeploy" version))
7891 (sha256
7892 (base32
7893 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
7894 (build-system python-build-system)
7895 (native-inputs
7896 `(("python-nose" ,python-nose)))
7897 (propagated-inputs
7898 ;; This package uses pkg_resources, part of setuptools, during runtime,
7899 ;; hence why not a native-input.
7900 `(("python-setuptools" ,python-setuptools)))
7901 (home-page "http://pythonpaste.org/deploy/")
7902 (synopsis
7903 "Load, configure, and compose WSGI applications and servers")
7904 (description
7905 "This tool provides code to load WSGI applications and servers from URIs;
7906these URIs can refer to Python Eggs for INI-style configuration files. Paste
7907Script provides commands to serve applications based on this configuration
7908file.")
7909 (license license:expat)))
7910
7911(define-public python2-pastedeploy
7912 (package-with-python2 python-pastedeploy))
7913
7914(define-public python-paste
7915 (package
7916 (name "python-paste")
7917 (version "2.0.2")
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "Paste" version))
7922 (sha256
7923 (base32
7924 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
7925 (patches (search-patches "python-paste-remove-website-test.patch"
7926 "python-paste-remove-timing-test.patch"))))
7927 (build-system python-build-system)
7928 (native-inputs
7929 `(("python-nose" ,python-nose)))
7930 (propagated-inputs
7931 `(;; Uses pkg_resources provided by setuptools internally.
7932 ("python-setuptools" ,python-setuptools)
7933 ("python-six" ,python-six)))
7934 (arguments
7935 '(;; Tests don't pass on Python 3, but work fine on Python 2.
7936 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
7937 ;; but is usable enough for the minimal amount it's used in MediaGoblin
7938 ;; still... things should be better by the next Paste release.)
7939 #:tests? #f))
7940 (home-page "http://pythonpaste.org")
7941 (synopsis
7942 "Python web development tools, focusing on WSGI")
7943 (description
7944 "Paste provides a variety of web development tools and middleware which
7945can be nested together to build web applications. Paste's design closely
7946follows ideas flowing from WSGI (Web Standard Gateway Interface).")
7947 (license license:expat)
7948 (properties `((python2-variant . ,(delay python2-paste))))))
7949
7950(define-public python2-paste
7951 (let ((paste (package-with-python2
7952 (strip-python2-variant python-paste))))
7953 (package
7954 (inherit paste)
7955 (arguments
7956 ;; Tests are back for Python 2!
7957 `(#:tests? #t
7958 ,@(package-arguments paste))))))
7959
7960(define-public python-pastescript
7961 (package
7962 (name "python-pastescript")
7963 (version "2.0.2")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "PasteScript" version))
7968 (sha256
7969 (base32
7970 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
7971 (build-system python-build-system)
7972 (native-inputs
7973 `(("python-nose" ,python-nose)))
7974 (propagated-inputs
7975 `(;; Uses pkg_resources provided by setuptools internally.
7976 ("python-setuptools" ,python-setuptools)
7977 ("python-paste" ,python-paste)
7978 ("python-pastedeploy" ,python-pastedeploy)))
7979 (home-page "http://pythonpaste.org/script/")
7980 (arguments
7981 '(;; Unfortunately, this requires the latest unittest2,
7982 ;; but that requires traceback2 which requires linecache2 which requires
7983 ;; unittest2. So we're skipping tests for now.
7984 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
7985 ;; so in theory we could get around this situation somehow.)
7986 #:tests? #f))
7987 (synopsis
7988 "Pluggable command line tool for serving web applications and more")
7989 (description
7990 "PasteScript is a plugin-friendly command line tool which provides a
7991variety of features, from launching web applications to bootstrapping project
7992layouts.")
7993 (license license:expat)))
7994
7995(define-public python2-pastescript
7996 (package-with-python2 python-pastescript))
7997
7998(define-public python-pyquery
7999 (package
8000 (name "python-pyquery")
8001 (version "1.2.13")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "pyquery" version))
8006 (sha256
8007 (base32
8008 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8009 (build-system python-build-system)
8010 (propagated-inputs
8011 `(("python-lxml" ,python-lxml)
8012 ("python-cssselect" ,python-cssselect)))
8013 (home-page "https://github.com/gawel/pyquery")
8014 (synopsis "Make jQuery-like queries on xml documents")
8015 (description "pyquery allows you to make jQuery queries on xml documents.
8016The API is as much as possible the similar to jQuery. pyquery uses lxml for
8017fast xml and html manipulation.")
8018 (license bsd-3)
8019 (properties `((python2-variant . ,(delay python2-pyquery))))))
8020
8021(define-public python2-pyquery
8022 (let ((pyquery (package-with-python2
8023 (strip-python2-variant python-pyquery))))
8024 (package
8025 (inherit pyquery)
8026 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
8027
8028(define-public python-webtest
8029 (package
8030 (name "python-webtest")
8031 (version "2.0.20")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "WebTest" version))
8036 (sha256
8037 (base32
8038 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8039 (build-system python-build-system)
8040 (arguments
8041 `(;; Unfortunately we have to disable tests!
8042 ;; This release of WebTest is pinned to python-nose < 1.3,
8043 ;; but older versions of python-nose are plagued with the following
8044 ;; bug(s), which rears its ugly head during test execution:
8045 ;; https://github.com/nose-devs/nose/issues/759
8046 ;; https://github.com/nose-devs/nose/pull/811
8047 #:tests? #f))
8048 ;; Commented out code is no good, but in this case, once tests
8049 ;; are ready to be enabled again, we should put the following
8050 ;; in place:
8051 ;; (native-inputs
8052 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8053 ;; ; but see above comment
8054 ;; ("python-coverage" ,python-coverage)
8055 ;; ("python-mock" ,python-mock)
8056 ;; ("python-pastedeploy" ,python-pastedeploy)
8057 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8058 ;; ("python-pyquery" ,python-pyquery)))
8059 (propagated-inputs
8060 `(("python-waitress" ,python-waitress)
8061 ("python-webob" ,python-webob)
8062 ("python-six" ,python-six)
8063 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8064 (home-page "http://webtest.pythonpaste.org/")
8065 (synopsis "Helper to test WSGI applications")
8066 (description "Webtest allows you to test your Python web applications
8067without starting an HTTP server. It supports anything that supports the
8068minimum of WSGI.")
8069 (license license:expat)
8070 (properties `((python2-variant . ,(delay python2-webtest))))))
8071
8072(define-public python2-webtest
8073 (let ((webtest (package-with-python2
8074 (strip-python2-variant python-webtest))))
8075 (package
8076 (inherit webtest)
8077 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8078 ,@(package-native-inputs webtest))))))
8079
8080(define-public python-anyjson
8081 (package
8082 (name "python-anyjson")
8083 (version "0.3.3")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "anyjson" version))
8088 (sha256
8089 (base32
8090 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8091 (build-system python-build-system)
8092 (arguments
8093 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8094 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8095 ;; whatever) so this transformation needs to be done before the tests
8096 ;; can be run. Maybe we could add a build step to transform beforehand
8097 ;; but it could be annoying/difficult.
8098 ;; We can enable tests for the Python 2 version, though, and do below.
8099 #:tests? #f))
8100 (home-page "http://bitbucket.org/runeh/anyjson/")
8101 (synopsis
8102 "Wraps best available JSON implementation in a common interface")
8103 (description
8104 "Anyjson loads whichever is the fastest JSON module installed
8105and provides a uniform API regardless of which JSON implementation is used.")
8106 (license bsd-3)
8107 (properties `((python2-variant . ,(delay python2-anyjson))))))
8108
8109(define-public python2-anyjson
8110 (let ((anyjson (package-with-python2
8111 (strip-python2-variant python-anyjson))))
8112 (package
8113 (inherit anyjson)
8114 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8115 #:tests? #t
8116 ,@(package-arguments anyjson)))
8117 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8118 ("python2-nose" ,python2-nose))))))
8119
8120(define-public python-amqp
8121 (package
8122 (name "python-amqp")
8123 (version "1.4.9")
8124 (source
8125 (origin
8126 (method url-fetch)
8127 (uri (pypi-uri "amqp" version))
8128 (sha256
8129 (base32
8130 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8131 (build-system python-build-system)
8132 (native-inputs
8133 `(("python-nose" ,python-nose)
8134 ("python-mock" ,python-mock)))
8135 (home-page "http://github.com/celery/py-amqp")
8136 (synopsis
8137 "Low-level AMQP client for Python (fork of amqplib)")
8138 (description
8139 "This is a fork of amqplib which was originally written by Barry Pederson.
8140It is maintained by the Celery project, and used by kombu as a pure python
8141alternative when librabbitmq is not available.")
8142 (license lgpl2.1+)
8143 (properties `((python2-variant . ,(delay python2-amqp))))))
8144
8145(define-public python2-amqp
8146 (let ((amqp (package-with-python2
8147 (strip-python2-variant python-amqp))))
8148 (package
8149 (inherit amqp)
8150 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8151 ;; unmaintained. Weirdly, does not do this on the python 3
8152 ;; version?
8153 #:tests? #f
8154 ,@(package-arguments amqp)))
8155 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8156 ,@(package-native-inputs amqp))))))
8157
8158(define-public python-kombu
8159 (package
8160 (name "python-kombu")
8161 (version "3.0.33")
8162 (source
8163 (origin
8164 (method url-fetch)
8165 (uri (pypi-uri "kombu" version))
8166 (sha256
8167 (base32
8168 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8169 (build-system python-build-system)
8170 (native-inputs
8171 `(("python-mock" ,python-mock)
8172 ("python-nose" ,python-nose)))
8173 (propagated-inputs
8174 `(("python-anyjson" ,python-anyjson)
8175 ("python-amqp" ,python-amqp)))
8176 (home-page "http://kombu.readthedocs.org")
8177 (synopsis "Message passing library for Python")
8178 (description "The aim of Kombu is to make messaging in Python as easy as
8179possible by providing an idiomatic high-level interface for the AMQ protocol,
8180and also provide proven and tested solutions to common messaging problems.
8181AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8182message orientation, queuing, routing, reliability and security, for which the
8183RabbitMQ messaging server is the most popular implementation.")
8184 (license bsd-3)
8185 (properties `((python2-variant . ,(delay python2-kombu))))))
8186
8187(define-public python2-kombu
8188 (let ((kombu (package-with-python2
8189 (strip-python2-variant python-kombu))))
8190 (package
8191 (inherit kombu)
8192 (inputs `(("python2-setuptools" ,python2-setuptools)
8193 ("python2-unittest2" ,python2-unittest2)
8194 ,@(package-inputs kombu))))))
8195
8196(define-public python-billiard
8197 (package
8198 (name "python-billiard")
8199 (version "3.3.0.22")
8200 (source
8201 (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "billiard" version))
8204 (sha256
8205 (base32
8206 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8207 (build-system python-build-system)
8208 (native-inputs
8209 `(("python-nose" ,python-nose)))
8210 (home-page "http://github.com/celery/billiard")
8211 (synopsis
8212 "Python multiprocessing fork with improvements and bugfixes")
8213 (description
8214 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8215multiprocessing package itself is a renamed and updated version of R Oudkerk's
8216pyprocessing package. This standalone variant is intended to be compatible with
8217Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8218 (license bsd-3)
8219 (properties `((python2-variant . ,(delay python2-billiard))))))
8220
8221(define-public python2-billiard
8222 (let ((billiard (package-with-python2
8223 (strip-python2-variant python-billiard))))
8224 (package
8225 (inherit billiard)
8226 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8227 ("python2-unittest2" ,python2-unittest2)
8228 ("python2-mock" ,python2-mock)
8229 ,@(package-native-inputs billiard))))))
8230
8231(define-public python-celery
8232 (package
8233 (name "python-celery")
8234 (version "3.1.20")
8235 (source
8236 (origin
8237 (method url-fetch)
8238 (uri (pypi-uri "celery" version))
8239 (sha256
8240 (base32
8241 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8242 (build-system python-build-system)
8243 (native-inputs
8244 `(("python-nose" ,python-nose)))
8245 (inputs
8246 `(("python-pytz" ,python-pytz)
8247 ("python-amqp" ,python-amqp)
8248 ("python-anyjson" ,python-anyjson)
8249 ("python-billiard" ,python-billiard)
8250 ("python-kombu" ,python-kombu)))
8251 (home-page "http://celeryproject.org")
8252 (synopsis "Distributed Task Queue")
8253 (description "Celery is an asynchronous task queue/job queue based on
8254distributed message passing. It is focused on real-time operation, but
8255supports scheduling as well. The execution units, called tasks, are executed
8256concurrently on a single or more worker servers using multiprocessing,
8257Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8258synchronously (wait until ready).")
8259 (license bsd-3)
8260 (properties `((python2-variant . ,(delay python2-celery))))))
8261
8262(define-public python2-celery
8263 (let ((celery (package-with-python2
8264 (strip-python2-variant python-celery))))
8265 (package
8266 (inherit celery)
8267 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8268 ("python2-unittest2" ,python2-unittest2)
8269 ("python2-mock" ,python2-mock)
8270 ,@(package-native-inputs celery))))))
8271
8272(define-public python-translitcodec
8273 (package
8274 (name "python-translitcodec")
8275 (version "0.4.0")
8276 (source
8277 (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "translitcodec" version))
8280 (sha256
8281 (base32
8282 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8283 (build-system python-build-system)
8284 (arguments
8285 `(#:tests? #f)) ; no tests provided
8286 (home-page
8287 "https://github.com/claudep/translitcodec")
8288 (synopsis
8289 "Unicode to 8-bit charset transliteration codec")
8290 (description
8291 "This package contains codecs for transliterating ISO 10646 texts into
8292best-effort representations using smaller coded character sets (ASCII,
8293ISO 8859, etc.).")
8294 (license license:expat)
8295 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8296
8297(define-public python2-translitcodec
8298 (package
8299 (inherit (package-with-python2
8300 (strip-python2-variant python-translitcodec)))
8301 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8302
8303(define-public python-editor
8304 (package
8305 (name "python-editor")
8306 (version "0.5")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "python-editor" version))
8311 (sha256
8312 (base32
8313 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8314 (build-system python-build-system)
8315 (home-page
8316 "https://github.com/fmoo/python-editor")
8317 (synopsis
8318 "Programmatically open an editor, capture the result")
8319 (description
8320 "python-editor is a library that provides the editor module for
8321programmatically interfacing with your system's $EDITOR.")
8322 (license asl2.0)
8323 (properties `((python2-variant . ,(delay python2-editor))))))
8324
8325(define-public python2-editor
8326 (package
8327 (inherit (package-with-python2
8328 (strip-python2-variant python-editor)))
8329 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8330
8331(define-public python-sphinxcontrib-programoutput
8332 (package
8333 (name "python-sphinxcontrib-programoutput")
8334 (version "0.8")
8335 (source (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8338 (sha256
8339 (base32
8340 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8341 (build-system python-build-system)
8342 (propagated-inputs
8343 `(("python-docutils" ,python-docutils)
8344 ("python-sphinx" ,python-sphinx)))
8345 (synopsis "Sphinx extension to include program output")
8346 (description "A Sphinx extension to literally insert the output of arbitrary
8347commands into documents, helping you to keep your command examples up to date.")
8348 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8349 (license bsd-2)
8350 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8351
8352(define-public python2-sphinxcontrib-programoutput
8353 (package
8354 (inherit (package-with-python2
8355 (strip-python2-variant python-sphinxcontrib-programoutput)))
8356 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8357
8358(define-public python-sphinx-repoze-autointerface
8359 (package
8360 (name "python-sphinx-repoze-autointerface")
8361 (version "0.8")
8362 (source (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8365 (sha256
8366 (base32
8367 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8368 (build-system python-build-system)
8369 (propagated-inputs
8370 `(("python-docutils" ,python-docutils)
8371 ("python-sphinx" ,python-sphinx)
8372 ("python-zope-interface" ,python-zope-interface)))
8373 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8374 (description "This package defines an extension for the Sphinx documentation
8375system. The extension allows generation of API documentation by
8376introspection of @code{zope.interface} instances in code.")
8377 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8378 (license repoze)))
8379
8380(define-public python2-sphinx-repoze-autointerface
8381 (package-with-python2 python-sphinx-repoze-autointerface))
8382
8383(define-public python-psycopg2
8384 (package
8385 (name "python-psycopg2")
8386 (version "2.6.1")
8387 (source
8388 (origin
8389 (method url-fetch)
8390 (uri (pypi-uri "psycopg2" version))
8391 (sha256
8392 (base32
8393 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8394 (build-system python-build-system)
8395 (arguments
8396 ;; Tests would require a postgresql database "psycopg2_test"
8397 ;; and a running postgresql database management service.
8398 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8399 (inputs
8400 `(("postgresql" ,postgresql))) ; libpq
8401 (home-page "http://initd.org/psycopg/")
8402 (synopsis "Python PostgreSQL adapter")
8403 (description
8404 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8405 (license lgpl3+)
8406 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8407
8408(define-public python2-psycopg2
8409 (package
8410 (inherit (package-with-python2
8411 (strip-python2-variant python-psycopg2)))
8412 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8413
8414(define-public python-vobject
8415 (package
8416 (name "python-vobject")
8417 (version "0.9.2")
8418 (source (origin
8419 (method url-fetch)
8420 (uri (pypi-uri "vobject" version))
8421 (sha256
8422 (base32
8423 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
8424 (build-system python-build-system)
8425 (inputs
8426 `(("python-dateutil-2" ,python-dateutil-2)
8427 ("python-pyicu" ,python-pyicu)))
8428 (synopsis "Parse and generate vCard and vCalendar files")
8429 (description "Vobject is intended to be a full featured Python package for
8430parsing and generating vCard and vCalendar files. Currently, iCalendar files
8431are supported and well tested. vCard 3.0 files are supported, and all data
8432should be imported, but only a few components are understood in a sophisticated
8433way.")
8434 (home-page "http://eventable.github.io/vobject/")
8435 (license asl2.0)
8436 (properties `((python2-variant . ,(delay python2-vobject))))))
8437
8438(define-public python2-vobject
8439 (package
8440 (inherit (package-with-python2
8441 (strip-python2-variant python-vobject)))
8442 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8443
8444(define-public python-munkres
8445 (package
8446 (name "python-munkres")
8447 (version "1.0.7")
8448 (source (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "munkres" version))
8451 (sha256
8452 (base32
8453 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8454 (build-system python-build-system)
8455 (arguments
8456 '(#:tests? #f)) ; no test suite
8457 (home-page "http://software.clapper.org/munkres/")
8458 (synopsis "Implementation of the Munkres algorithm")
8459 (description "The Munkres module provides an implementation of the Munkres
8460algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8461useful for solving the Assignment Problem.")
8462 (license bsd-3)))
8463
8464(define-public python2-munkres
8465 (package-with-python2 python-munkres))
8466
8467(define-public python-flask
8468 (package
8469 (name "python-flask")
8470 (version "0.10.1")
8471 (source (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "Flask" version))
8474 (sha256
8475 (base32
8476 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8477 (build-system python-build-system)
8478 (propagated-inputs
8479 `(("python-itsdangerous" ,python-itsdangerous)
8480 ("python-jinja2" ,python-jinja2)
8481 ("python-werkzeug" ,python-werkzeug)))
8482 (home-page "https://github.com/mitsuhiko/flask/")
8483 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8484 (description "Flask is a micro web framework based on the Werkzeug toolkit
8485and Jinja2 template engine. It is called a micro framework because it does not
8486presume or force a developer to use a particular tool or library.")
8487 (license bsd-3)
8488 (properties `((python2-variant . ,(delay python2-flask))))))
8489
8490(define-public python2-flask
8491 (package (inherit (package-with-python2
8492 (strip-python2-variant python-flask)))
8493 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8494
8495(define-public python-cookies
8496 (package
8497 (name "python-cookies")
8498 (version "2.2.1")
8499 (source (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "cookies" version))
8502 (sha256
8503 (base32
8504 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8505 (build-system python-build-system)
8506 (arguments
8507 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8508 #:tests? #f))
8509 (native-inputs
8510 `(("python-pytest" ,python2-pytest)))
8511 (synopsis "HTTP cookie parser and renderer")
8512 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8513Python.")
8514 (home-page "https://gitlab.com/sashahart/cookies")
8515 (license license:expat)
8516 (properties `((python2-variant . ,(delay python2-cookies))))))
8517
8518(define-public python2-cookies
8519 (let ((cookies (package-with-python2
8520 (strip-python2-variant python-cookies))))
8521 (package (inherit cookies)
8522 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8523 ,@(package-native-inputs cookies))))))
8524
8525(define-public python-responses
8526 (package
8527 (name "python-responses")
8528 (version "0.5.1")
8529 (source (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "responses" version))
8532 (sha256
8533 (base32
8534 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8535 (build-system python-build-system)
8536 (arguments
8537 `(;; Test suite is not distributed:
8538 ;; https://github.com/getsentry/responses/issues/38
8539 #:tests? #f))
8540 (native-inputs
8541 `(("python-cookies" ,python-cookies)
8542 ("python-mock" ,python-mock)))
8543 (propagated-inputs
8544 `(("python-requests" ,python-requests)
8545 ("python-six" ,python-six)))
8546 (home-page "https://github.com/getsentry/responses")
8547 (synopsis "Utility for mocking out the `requests` Python library")
8548 (description "A utility library for mocking out the `requests` Python
8549library.")
8550 (license asl2.0)
8551 (properties `((python2-variant . ,(delay python2-responses))))))
8552
8553(define-public python2-responses
8554 (let ((responses (package-with-python2
8555 (strip-python2-variant python-responses))))
8556 (package (inherit responses)
8557 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8558 ,@(package-native-inputs responses))))))
8559
8560(define-public python-pathlib
8561 (package
8562 (name "python-pathlib")
8563 (version "1.0.1")
8564 (source (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "pathlib" version))
8567 (sha256
8568 (base32
8569 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8570 (build-system python-build-system)
8571 (arguments
8572 `(#:phases
8573 (modify-phases %standard-phases
8574 (replace 'check
8575 (lambda _ (zero? (system* "python" "./test_pathlib.py")))))))
8576 (home-page "https://pathlib.readthedocs.org/")
8577 (synopsis "Object-oriented filesystem paths")
8578 (description "Pathlib offers a set of classes to handle filesystem paths.
8579It offers the following advantages over using string objects:
8580
8581@enumerate
8582@item No more cumbersome use of os and os.path functions. Everything can
8583be done easily through operators, attribute accesses, and method calls.
8584@item Embodies the semantics of different path types. For example,
8585comparing Windows paths ignores casing.
8586@item Well-defined semantics, eliminating any inconsistencies or
8587ambiguities (forward vs. backward slashes, etc.).
8588@end enumerate\n")
8589 (license license:expat)))
8590
8591(define-public python2-pathlib
8592 (package-with-python2 python-pathlib))
8593
8594(define-public python-jellyfish
8595 (package
8596 (name "python-jellyfish")
8597 (version "0.5.3")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "jellyfish" version))
8601 (sha256
8602 (base32
8603 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8604 (build-system python-build-system)
8605 (native-inputs
8606 `(("python-pytest" ,python-pytest)))
8607 (home-page "https://github.com/jamesturk/jellyfish")
8608 (synopsis "Approximate and phonetic matching of strings")
8609 (description "Jellyfish uses a variety of string comparison and phonetic
8610encoding algorithms to do fuzzy string matching.")
8611 (license bsd-2)
8612 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8613
8614(define-public python2-jellyfish
8615 (let ((jellyfish (package-with-python2
8616 (strip-python2-variant python-jellyfish))))
8617 (package (inherit jellyfish)
8618 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8619 ("python2-unicodecsv" ,python2-unicodecsv)
8620 ,@(package-native-inputs jellyfish))))))
8621
8622(define-public python2-unicodecsv
8623 (package
8624 (name "python2-unicodecsv")
8625 (version "0.14.1")
8626 (source (origin
8627 (method url-fetch)
8628 ;; The test suite is not included in the PyPi release.
8629 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8630 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8631 "archive/" version ".tar.gz"))
8632 (file-name (string-append name "-" version ".tar.gz"))
8633 (sha256
8634 (base32
8635 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8636 (build-system python-build-system)
8637 (arguments
8638 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8639 #:python ,python-2))
8640 (native-inputs
8641 `(("python2-setuptools" ,python2-setuptools)
8642 ("python2-unittest2" ,python2-unittest2)))
8643 (home-page "https://github.com/jdunck/python-unicodecsv")
8644 (synopsis "Unicode CSV module for Python 2")
8645 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8646module, adding support for Unicode strings.")
8647 (license bsd-2)))
8648
8649(define-public python-rarfile
8650 (package
8651 (name "python-rarfile")
8652 (version "2.7")
8653 (source (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "rarfile" version))
8656 (sha256
8657 (base32
8658 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
8659 ;; https://github.com/markokr/rarfile/pull/17/
8660 (patches (search-patches "python-rarfile-fix-tests.patch"))))
8661 (build-system python-build-system)
8662 (arguments
8663 '(#:phases
8664 (modify-phases %standard-phases
8665 (replace 'check
8666 ;; Many tests fail, but the installation proceeds.
8667 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8668 (native-inputs
8669 `(("which" ,which))) ; required for tests
8670 (propagated-inputs
8671 `(("libarchive" ,libarchive)))
8672 (home-page "https://github.com/markokr/rarfile")
8673 (synopsis "RAR archive reader for Python")
8674 (description "This is Python module for RAR archive reading. The interface
8675is made as zipfile like as possible.")
8676 (license isc)))
8677
8678(define-public python2-rarfile
8679 (package-with-python2 python-rarfile))
8680
8681(define-public python-magic
8682 (package
8683 (name "python-magic")
8684 (version "0.4.3")
8685 (source
8686 (origin
8687 (method url-fetch)
8688 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8689 version ".tar.gz"))
8690 (sha256
8691 (base32
8692 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8693 (file-name (string-append name "-" version "-checkout"))))
8694 (build-system python-build-system)
8695 (arguments
8696 ;; The tests are unreliable, so don't run them. The tests fail
8697 ;; under Python3 because they were written for Python2 and
8698 ;; contain import statements that do not work in Python3. One of
8699 ;; the tests fails under Python2 because its assertions are
8700 ;; overly stringent; it relies on comparing output strings which
8701 ;; are brittle and can change depending on the version of
8702 ;; libmagic being used and the system on which the test is
8703 ;; running. In my case, under GuixSD 0.10.0, only one test
8704 ;; failed, and it seems to have failed only because the version
8705 ;; of libmagic that is packaged in Guix outputs a slightly
8706 ;; different (but not wrong) string than the one that the test
8707 ;; expected.
8708 '(#:tests? #f
8709 #:phases (modify-phases %standard-phases
8710 ;; Replace a specific method call with a hard-coded
8711 ;; path to the necessary libmagic.so file in the
8712 ;; store. If we don't do this, then the method call
8713 ;; will fail to find the libmagic.so file, which in
8714 ;; turn will cause any application using
8715 ;; python-magic to fail.
8716 (add-before 'build 'hard-code-path-to-libmagic
8717 (lambda* (#:key inputs #:allow-other-keys)
8718 (let ((file (assoc-ref inputs "file")))
8719 (substitute* "magic.py"
8720 (("ctypes.util.find_library\\('magic'\\)")
8721 (string-append "'" file "/lib/libmagic.so'")))
8722 #t))))))
8723 (native-inputs
8724 `(("python-setuptools" ,python-setuptools)))
8725 (inputs
8726 ;; python-magic needs to be able to find libmagic.so.
8727 `(("file" ,file)))
8728 (home-page "https://github.com/ahupp/python-magic")
8729 (synopsis "File type identification using libmagic")
8730 (description
8731 "This module uses ctypes to access the libmagic file type
8732identification library. It makes use of the local magic database and
8733supports both textual and MIME-type output. Note that this module and
8734the python-file module both provide a \"magic.py\" file; these two
8735modules, which are different and were developed separately, both serve
8736the same purpose: to provide Python bindings for libmagic.")
8737 (license license:expat)))
8738
8739(define-public python2-magic
8740 (package-with-python2 python-magic))
8741
8742(define-public python2-s3cmd
8743 (package
8744 (name "python2-s3cmd")
8745 (version "1.6.1")
8746 (source
8747 (origin
8748 (method url-fetch)
8749 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8750 "s3cmd-" version ".tar.gz"))
8751 (sha256
8752 (base32
8753 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8754 (build-system python-build-system)
8755 (arguments
8756 ;; s3cmd is written for python2 only and contains no tests.
8757 `(#:python ,python-2
8758 #:tests? #f))
8759 (native-inputs
8760 `(("python2-setuptools" ,python2-setuptools)))
8761 (inputs
8762 `(("python2-dateutil" ,python2-dateutil)
8763 ;; The python-file package also provides a magic.py module.
8764 ;; This is an unfortunate state of affairs; however, s3cmd
8765 ;; fails to install if it cannot find specifically the
8766 ;; python-magic package. Thus we include it, instead of using
8767 ;; python-file. Ironically, s3cmd sometimes works better
8768 ;; without libmagic bindings at all:
8769 ;; https://github.com/s3tools/s3cmd/issues/198
8770 ("python2-magic" ,python2-magic)))
8771 (home-page "http://s3tools.org/s3cmd")
8772 (synopsis "Command line tool for S3-compatible storage services")
8773 (description
8774 "S3cmd is a command line tool for uploading, retrieving and managing data
8775in storage services that are compatible with the Amazon Simple Storage
8776Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8777GnuPG encryption, and more. It also supports management of Amazon's
8778CloudFront content delivery network.")
8779 (license gpl2+)))
8780
8781(define-public python-pkgconfig
8782 (package
8783 (name "python-pkgconfig")
8784 (version "1.1.0")
8785 (source
8786 (origin
8787 (method url-fetch)
8788 (uri (pypi-uri "pkgconfig" version))
8789 (sha256
8790 (base32
8791 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8792 (build-system python-build-system)
8793 (native-inputs
8794 `(("python-nose" ,python-nose)
8795 ("python-setuptools" ,python-setuptools)))
8796 (inputs
8797 `(("pkg-config" ,pkg-config)))
8798 (arguments
8799 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8800 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8801 #:tests? #f
8802 ;; Prevent creation of the egg. This works around
8803 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
8804 #:configure-flags '("--single-version-externally-managed" "--root=/")
8805 ;; Hard-code the path to pkg-config.
8806 #:phases
8807 (modify-phases %standard-phases
8808 (add-before
8809 'build 'patch
8810 (lambda _
8811 (substitute* "pkgconfig/pkgconfig.py"
8812 (("cmd = 'pkg-config")
8813 (string-append "cmd = '" (which "pkg-config"))))
8814 #t)))))
8815 (home-page "http://github.com/matze/pkgconfig")
8816 (synopsis "Python interface for pkg-config")
8817 (description "This module provides a Python interface to pkg-config. It
8818can be used to find all pkg-config packages, check if a package exists,
8819check if a package meets certain version requirements, query CFLAGS and
8820LDFLAGS and parse the output to build extensions with setup.py.")
8821 (license license:expat)))
8822
8823(define-public python2-pkgconfig
8824 (package-with-python2 python-pkgconfig))
8825
8826(define-public python-bz2file
8827 (package
8828 (name "python-bz2file")
8829 (version "0.98")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "bz2file" version))
8834 (sha256
8835 (base32
8836 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8837 (build-system python-build-system)
8838 (arguments
8839 `(#:phases
8840 (modify-phases %standard-phases
8841 ;; python setup.py test does not work as of 0.98
8842 ;; but there is only the one test file
8843 (replace 'check
8844 (lambda _ (zero? (system* "python" "test_bz2file.py")))))))
8845 (home-page "https://github.com/nvawda/bz2file")
8846 (synopsis "Read and write bzip2-compressed files")
8847 (description
8848 "Bz2file is a Python library for reading and writing bzip2-compressed
8849files. It contains a drop-in replacement for the I/O interface in the
8850standard library's @code{bz2} module, including features from the latest
8851development version of CPython that are not available in older releases.")
8852 (license asl2.0)
8853 (properties `((python2-variant . ,(delay python2-bz2file))))))
8854
8855(define-public python2-bz2file
8856 (let ((base (package-with-python2
8857 (strip-python2-variant python-bz2file))))
8858 (package
8859 (inherit base)
8860 (native-inputs
8861 `(("python2-setuptools" ,python2-setuptools))))))
8862
8863(define-public python-cysignals
8864 (package
8865 (name "python-cysignals")
8866 (version "1.1.0")
8867 (source
8868 (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8871 (sha256
8872 (base32
8873 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8874 (build-system python-build-system)
8875 (native-inputs
8876 `(("python-cython" ,python-cython)
8877 ("python-setuptools" ,python-setuptools)
8878 ("python-sphinx" ,python-sphinx)))
8879 (inputs
8880 `(("pari-gp" ,pari-gp)))
8881 (arguments
8882 `(#:modules ((guix build python-build-system)
8883 ((guix build gnu-build-system) #:prefix gnu:)
8884 (guix build utils))
8885 ;; FIXME: Tests are executed after installation and currently fail
8886 ;; when not installing into standard locations; the author is working
8887 ;; on a fix.
8888 #:tests? #f
8889 #:phases
8890 (modify-phases %standard-phases
8891 (add-before
8892 'build 'configure
8893 (assoc-ref gnu:%standard-phases 'configure)))))
8894 (home-page
8895 "https://github.com/sagemath/cysignals")
8896 (synopsis
8897 "Handling of interrupts and signals for Cython")
8898 (description
8899 "The cysignals package provides mechanisms to handle interrupts (and
8900other signals and errors) in Cython code, using two related approaches,
8901for mixed Cython/Python code or external C libraries and pure Cython code,
8902respectively.")
8903 (license lgpl3+)))
8904
8905(define-public python2-cysignals
8906 (package-with-python2 python-cysignals))
8907
8908(define-public python2-shedskin
8909 (package
8910 (name "python2-shedskin")
8911 (version "0.9.4")
8912 (source
8913 (origin
8914 (method url-fetch)
8915 (uri (string-append "https://github.com/shedskin/shedskin/"
8916 "releases/download/v" version
8917 "/shedskin-" version ".tgz"))
8918 (sha256
8919 (base32
8920 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8921 (build-system python-build-system)
8922 (arguments
8923 `(#:python ,python-2
8924 #:phases (modify-phases %standard-phases
8925 (add-after 'unpack 'fix-resulting-include-libs
8926 (lambda* (#:key inputs #:allow-other-keys)
8927 (let ((libgc (assoc-ref inputs "libgc"))
8928 (pcre (assoc-ref inputs "pcre")))
8929 (substitute* "shedskin/makefile.py"
8930 (("variable == 'CCFLAGS':[ ]*")
8931 (string-append "variable == 'CCFLAGS':\n"
8932 " line += ' -I " pcre "/include"
8933 " -I " libgc "/include'"))
8934 (("variable == 'LFLAGS':[ ]*")
8935 (string-append "variable == 'LFLAGS':\n"
8936 " line += ' -L" pcre "/lib"
8937 " -L " libgc "/lib'")))
8938 #t))))))
8939 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
8940 (inputs `(("pcre" ,pcre)
8941 ("libgc" ,libgc)))
8942 (home-page "https://shedskin.github.io/")
8943 (synopsis "Experimental Python-2 to C++ Compiler")
8944 (description (string-append "This is an experimental compiler for a subset of
8945Python. It generates C++ code and a Makefile."))
8946 (license (list gpl3 bsd-3 license:expat))))
8947
8948(define-public python2-rope
8949 (package
8950 (name "python2-rope")
8951 (version "0.10.3")
8952 (source
8953 (origin
8954 (method url-fetch)
8955 (uri (pypi-uri "rope" version))
8956 (sha256
8957 (base32
8958 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8959 (arguments
8960 ;; Rope is currently python-2 only.
8961 ;; https://github.com/python-rope/rope/issues/57
8962 `(#:python ,python-2))
8963 (build-system python-build-system)
8964 (native-inputs
8965 `(("python2-unittest2" ,python2-unittest2)
8966 ("python2-setuptools" ,python2-setuptools)))
8967 (home-page "https://github.com/python-rope/rope")
8968 (synopsis "Refactoring library for Python")
8969 (description "Rope is a refactoring library for Python. It facilitates
8970the renaming, moving and extracting of attributes, functions, modules, fields
8971and parameters in Python 2 source code. These refactorings can also be applied
8972to occurences in strings and comments.")
8973 (license gpl2)))
8974
8975(define-public python-py3status
8976 (package
8977 (name "python-py3status")
8978 (version "2.9")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (pypi-uri "py3status" version))
8983 (sha256
8984 (base32
8985 "09y7h8rjay5kzwk5akq7f5f9wqnvjkxhivck04hdc8ny1nw3vqzp"))))
8986 (build-system python-build-system)
8987 (native-inputs
8988 `(("python-setuptools" ,python-setuptools)))
8989 (home-page "https://github.com/ultrabug/py3status")
8990 (synopsis "Extensible i3status wrapper written in Python")
8991 (description "py3status is an i3status wrapper which extends i3status
8992functionality in a modular way, allowing you to extend your panel with your
8993own code, responding to click events and updating clock every second.")
8994 (license bsd-3)))
8995
8996(define-public python-tblib
8997 (package
8998 (name "python-tblib")
8999 (version "1.3.0")
9000 (source (origin
9001 (method url-fetch)
9002 (uri (pypi-uri "tblib" version))
9003 (sha256 (base32
9004 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9005 (build-system python-build-system)
9006 (arguments
9007 `(#:phases
9008 (modify-phases %standard-phases
9009 (replace 'check
9010 (lambda _
9011 ;; Upstream runs tests after installation and the package itself
9012 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9013 ;; found.
9014 (setenv "PYTHONPATH"
9015 (string-append (getcwd) "/build/lib:"
9016 (getenv "PYTHONPATH")))
9017 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9018 (native-inputs
9019 `(("python-pytest" ,python-pytest)
9020 ("python-setuptools" ,python-setuptools)
9021 ("python-six" ,python-six)))
9022 (home-page "https://github.com/ionelmc/python-tblib")
9023 (synopsis "Traceback serialization library")
9024 (description
9025 "Traceback serialization allows you to:
9026
9027@enumerate
9028@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9029different processes. This allows better error handling when running code over
9030multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9031
9032@item Parse traceback strings and raise with the parsed tracebacks.
9033@end itemize")
9034 (license bsd-3)))
9035
9036(define-public python2-tblib
9037 (package-with-python2 python-tblib))
9038
9039(define-public python-sqlparse
9040 (package
9041 (name "python-sqlparse")
9042 (version "0.1.19")
9043 (source (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "sqlparse" version))
9046 (sha256
9047 (base32
9048 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9049 (build-system python-build-system)
9050 (arguments
9051 `(#:phases
9052 (modify-phases %standard-phases
9053 (replace 'check
9054 (lambda* _
9055 ;; setup.py-integrated 2to3 only affects the build files, but
9056 ;; py.test is using the source files. So we need to convert them
9057 ;; manually.
9058 (when (zero? (system* "python3"))
9059 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9060 (zero? (system* "py.test")))))))
9061 (native-inputs
9062 `(("python-pytest" ,python-pytest)
9063 ("python-setuptools" ,python-setuptools)))
9064 (home-page "https://github.com/andialbrecht/sqlparse")
9065 (synopsis "Non-validating SQL parser")
9066 (description "Sqlparse is a non-validating SQL parser for Python. It
9067provides support for parsing, splitting and formatting SQL statements.")
9068 (license bsd-3)))
9069
9070(define-public python2-sqlparse
9071 (package-with-python2 python-sqlparse))
9072
9073(define-public python-greenlet
9074 (package
9075 (name "python-greenlet")
9076 (version "0.4.9")
9077 (source (origin
9078 (method url-fetch)
9079 (uri (pypi-uri "greenlet" version))
9080 (sha256
9081 (base32
9082 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9083 (build-system python-build-system)
9084 (native-inputs
9085 `(("python-setuptools" ,python-setuptools)))
9086 (home-page "https://greenlet.readthedocs.io/")
9087 (synopsis "Lightweight in-process concurrent programming")
9088 (description
9089 "Greenlet package is a spin-off of Stackless, a version of CPython
9090that supports micro-threads called \"tasklets\". Tasklets run
9091pseudo-concurrently (typically in a single or a few OS-level threads) and
9092are synchronized with data exchanges on \"channels\".")
9093 (license (list psfl license:expat))))
9094
9095(define-public python2-greenlet
9096 (package-with-python2 python-greenlet))
9097
9098(define-public python-gevent
9099 (package
9100 (name "python-gevent")
9101 (version "1.1.1")
9102 (source (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "gevent" version))
9105 (sha256
9106 (base32
9107 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9108 (modules '((guix build utils)))
9109 (snippet
9110 '(begin
9111 ;; unbunding libev and c-ares
9112 (for-each delete-file-recursively '("libev" "c-ares"))
9113 ;; fixing testsuite
9114 (call-with-output-file "greentest/__init__.py" noop)
9115 (substitute* "greentest/testrunner.py"
9116 (("import util") "from . import util")
9117 (("from util import log") "from .util import log"))))))
9118 (build-system python-build-system)
9119 (propagated-inputs
9120 `(("python-greenlet" ,python-greenlet)))
9121 (native-inputs
9122 `(("python-setuptools" ,python-setuptools)
9123 ("python-six" ,python-six)))
9124 (inputs
9125 `(("c-ares" ,c-ares)
9126 ("libev" ,libev)))
9127 (home-page "http://www.gevent.org/")
9128 (synopsis "Coroutine-based network library")
9129 (description
9130 "gevent is a coroutine-based Python networking library that uses greenlet
9131to provide a high-level synchronous API on top of the libev event loop.")
9132 (license license:expat)))
9133
9134(define-public python2-gevent
9135 (package-with-python2 python-gevent))
9136
9137(define-public python-twisted
9138 (package
9139 (name "python-twisted")
9140 (version "16.2.0")
9141 (source (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9144 (sha256
9145 (base32
9146 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9147 (build-system python-build-system)
9148 (native-inputs
9149 `(("python-setuptools" ,python-setuptools)))
9150 (propagated-inputs
9151 `(("python-zope-interface" ,python-zope-interface)))
9152 (home-page "https://twistedmatrix.com/")
9153 (synopsis "Asynchronous networking framework written in Python")
9154 (description
9155 "Twisted is an extensible framework for Python programming, with special
9156focus on event-based network programming and multiprotocol integration.")
9157 (license license:expat)))
9158
9159(define-public python2-twisted
9160 (package-with-python2 python-twisted))
9161
9162(define-public python-ply
9163 (package
9164 (name "python-ply")
9165 (version "3.8")
9166 (source
9167 (origin
9168 (method url-fetch)
9169 (uri (string-append
9170 "https://pypi.python.org/packages/"
9171 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9172 "/ply-" version ".tar.gz"))
9173 (sha256
9174 (base32
9175 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9176 (build-system python-build-system)
9177 (home-page "http://www.dabeaz.com/ply/")
9178 (synopsis "Python Lex & Yacc")
9179 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9180It uses LR parsing and does extensive error checking.")
9181 (license bsd-3)
9182 (properties `((python2-variant . ,(delay python2-ply))))))
9183
9184(define-public python2-ply
9185 (package
9186 (inherit (package-with-python2
9187 (strip-python2-variant python-ply)))
9188 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9189
9190(define-public python-tabulate
9191 (package
9192 (name "python-tabulate")
9193 (version "0.7.5")
9194 (source (origin
9195 (method url-fetch)
9196 (uri (pypi-uri "tabulate" version))
9197 (sha256
9198 (base32
9199 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9200 ;; Fix tests
9201 (modules '((guix build utils)))
9202 (snippet '(substitute* '("test/test_cli.py"
9203 "test/test_input.py"
9204 "test/test_output.py"
9205 "test/test_regression.py")
9206 (("from common") "from nose.tools")))))
9207 (build-system python-build-system)
9208 (native-inputs
9209 `(("python-setuptools" ,python-setuptools)
9210 ;; For testing
9211 ("python-nose" ,python-nose)))
9212 (home-page "https://bitbucket.org/astanin/python-tabulate")
9213 (synopsis "Pretty-print tabular data")
9214 (description
9215 "Tabulate is a library and command-line utility to pretty-print tabular
9216data in Python.")
9217 (license license:expat)))
9218
9219(define-public python2-tabulate
9220 (package-with-python2 python-tabulate))
9221
9222(define-public python-kazoo
9223 (package
9224 (name "python-kazoo")
9225 (version "2.2.1")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "kazoo" version))
9230 (sha256
9231 (base32
9232 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9233 (build-system python-build-system)
9234 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9235 (native-inputs
9236 `(("python-setuptools" ,python-setuptools)))
9237 (propagated-inputs
9238 `(("python-six" ,python-six)))
9239 (home-page "https://kazoo.readthedocs.org")
9240 (synopsis "High-level Zookeeper client library")
9241 (description
9242 "Kazoo is a Python client library for the Apache Zookeeper distributed
9243application service. It is designed to be easy to use and to avoid common
9244programming errors.")
9245 (license asl2.0)))
9246
9247(define-public python2-kazoo
9248 (package-with-python2 python-kazoo))
9249
9250(define-public python-pykafka
9251 (package
9252 (name "python-pykafka")
9253 (version "2.4.0")
9254 (source (origin
9255 (method url-fetch)
9256 (uri (string-append
9257 "https://pypi.python.org/packages/8b/3e/"
9258 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9259 "pykafka-" version ".tar.gz"))
9260 (sha256
9261 (base32
9262 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9263 (build-system python-build-system)
9264 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9265 (native-inputs
9266 `(("python-setuptools" ,python-setuptools)))
9267 (propagated-inputs
9268 `(("python-gevent" ,python-gevent)
9269 ("python-kazoo" ,python-kazoo)
9270 ("python-tabulate" ,python-tabulate)))
9271 (inputs
9272 `(("librdkafka" ,librdkafka)))
9273 (home-page "https://pykafka.readthedocs.io/")
9274 (synopsis "Apache Kafka client for Python")
9275 (description
9276 "PyKafka is a client for the Apache Kafka distributed messaging system.
9277It includes Python implementations of Kafka producers and consumers, which
9278are optionally backed by a C extension built on librdkafka.")
9279 (license asl2.0)))
9280
9281(define-public python2-pykafka
9282 (package-with-python2 python-pykafka))
9283
9284(define-public python-wcwidth
9285 (package
9286 (name "python-wcwidth")
9287 (version "0.1.6")
9288 (source
9289 (origin
9290 (method url-fetch)
9291 (uri (string-append
9292 "https://pypi.python.org/packages/"
9293 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9294 "wcwidth-" version ".tar.gz"))
9295 (sha256
9296 (base32
9297 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9298 (build-system python-build-system)
9299 (home-page "https://github.com/jquast/wcwidth")
9300 (synopsis "Measure number of terminal column cells of wide-character codes")
9301 (description "Wcwidth measures the number of terminal column cells of
9302wide-character codes. It is useful for those implementing a terminal emulator,
9303or programs that carefully produce output to be interpreted by one. It is a
9304Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9305specified in POSIX.1-2001 and POSIX.1-2008.")
9306 (license license:expat)
9307 (properties `((python2-variant . ,(delay python2-wcwidth))))))
9308
9309(define-public python2-wcwidth
9310 (package
9311 (inherit (package-with-python2
9312 (strip-python2-variant python-wcwidth)))
9313 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9314
9315(define-public python2-jsonrpclib
9316 (package
9317 (name "python2-jsonrpclib")
9318 (version "0.1.7")
9319 (source (origin
9320 (method url-fetch)
9321 (uri (string-append
9322 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9323 "jsonrpclib-" version ".tar.gz"))
9324 (sha256
9325 (base32
9326 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9327 (build-system python-build-system)
9328 (native-inputs
9329 `(("python2-setuptools" ,python2-setuptools)))
9330 (arguments
9331 `(#:tests? #f
9332 #:python ,python-2))
9333 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9334 (synopsis "Implementation of JSON-RPC specification for Python")
9335 (description
9336 "This library is an implementation of the JSON-RPC specification.
9337It supports both the original 1.0 specification, as well as the
9338new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9339etc.")
9340 (license asl2.0)))
9341
9342(define-public python-chai
9343 (package
9344 (name "python-chai")
9345 (version "1.1.1")
9346 (source (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "chai" version))
9349 (sha256
9350 (base32
9351 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9352 (build-system python-build-system)
9353 (native-inputs
9354 `(("python-setuptools" ,python-setuptools)))
9355 (home-page "https://github.com/agoragames/chai")
9356 (synopsis "Mocking framework for Python")
9357 (description
9358 "Chai provides an api for mocking, stubbing and spying your python
9359objects, patterned after the Mocha library for Ruby.")
9360 (license bsd-3)))
9361
9362(define-public python2-chai
9363 (package-with-python2 python-chai))
9364
9365(define-public python-arrow
9366 (package
9367 (name "python-arrow")
9368 (version "0.8.0")
9369 (source (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "arrow" version))
9372 (sha256
9373 (base32
9374 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9375 (build-system python-build-system)
9376 (native-inputs
9377 `(("python-setuptools" ,python-setuptools)
9378 ;; For testing
9379 ("python-chai" ,python-chai)
9380 ("python-simplejson" ,python-simplejson)))
9381 (propagated-inputs
9382 `(("python-dateutil" ,python-dateutil-2)))
9383 (home-page "https://github.com/crsmithdev/arrow/")
9384 (synopsis "Dates and times for Python")
9385 (description
9386 "Arrow is a Python library to creating, manipulating, formatting and
9387converting dates, times, and timestamps. It implements and updates the
9388datetime type.")
9389 (license asl2.0)))
9390
9391(define-public python2-arrow
9392 (package-with-python2 python-arrow))
9393
9394(define-public python-inflection
9395 (package
9396 (name "python-inflection")
9397 (version "0.3.1")
9398 (source
9399 (origin (method url-fetch)
9400 (uri (pypi-uri "inflection" version))
9401 (sha256
9402 (base32
9403 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9404 (build-system python-build-system)
9405 (native-inputs
9406 `(("python-setuptools" ,python-setuptools)))
9407 (home-page "http://github.com/jpvanhal/inflection")
9408 (synopsis "Python string transformation library")
9409 (description
9410 "Inflection is a string transformation library. It singularizes
9411and pluralizes English words, and transforms strings from CamelCase to
9412underscored string.")
9413 (license license:expat)))
9414
9415(define-public python2-inflection
9416 (package-with-python2 python-inflection))
9417
9418(define-public python-pylev
9419 (package
9420 (name "python-pylev")
9421 (version "1.3.0")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "pylev" version))
9425 (sha256
9426 (base32
9427 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9428 (build-system python-build-system)
9429 (native-inputs
9430 `(("python-setuptools" ,python-setuptools)))
9431 (home-page "http://github.com/toastdriven/pylev")
9432 (synopsis "Levenshtein distance implementation in Python")
9433 (description "Pure Python Levenshtein implementation, based off the
9434Wikipedia code samples at
9435@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9436 (license bsd-3)))
9437
9438(define-public python2-pylev
9439 (package-with-python2 python-pylev))
9440
9441(define-public python-cleo
9442 (package
9443 (name "python-cleo")
9444 (version "0.4.1")
9445 (source (origin
9446 (method url-fetch)
9447 (uri (pypi-uri "cleo" version))
9448 (sha256
9449 (base32
9450 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9451 (build-system python-build-system)
9452 (native-inputs
9453 `(("python-setuptools" ,python-setuptools)
9454 ;; For testing
9455 ("python-mock" ,python-mock)
9456 ("python-pytest" ,python-pytest)))
9457 (propagated-inputs
9458 `(("python-psutil" ,python-psutil)
9459 ("python-pylev" ,python-pylev)))
9460 (home-page "https://github.com/sdispater/cleo")
9461 (synopsis "Command-line arguments library for Python")
9462 (description
9463 "Cleo allows you to create command-line commands with signature in
9464docstring and colored output.")
9465 (license license:expat)))
9466
9467(define-public python2-cleo
9468 (package-with-python2 python-cleo))
9469
9470(define-public python-lazy-object-proxy
9471 (package
9472 (name "python-lazy-object-proxy")
9473 (version "1.2.2")
9474 (source (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "lazy-object-proxy" version))
9477 (sha256
9478 (base32
9479 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9480 (build-system python-build-system)
9481 (native-inputs
9482 `(("python-setuptools" ,python-setuptools)))
9483 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9484 (synopsis "Lazy object proxy for python")
9485 (description
9486 "Lazy object proxy is an object that wraps a callable but defers the call
9487until the object is actually required, and caches the result of said call.")
9488 (license bsd-2)))
9489
9490(define-public python2-lazy-object-proxy
9491 (package-with-python2 python-lazy-object-proxy))
9492
9493(define-public python-dnspython
9494 (package
9495 (name "python-dnspython")
9496 (version "1.14.0")
9497 (source (origin
9498 (method url-fetch)
9499 (uri (string-append "http://www.dnspython.org/kits/"
9500 version "/dnspython-" version ".tar.gz"))
9501 (sha256
9502 (base32
9503 "1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"))))
9504 (build-system python-build-system)
9505 (arguments '(#:tests? #f)) ; XXX: requires internet access
9506 (native-inputs
9507 `(("python-setuptools" ,python-setuptools)))
9508 (home-page "http://www.dnspython.org")
9509 (synopsis "DNS toolkit for Python")
9510 (description
9511 "dnspython is a DNS toolkit for Python. It supports almost all record
9512types. It can be used for queries, zone transfers, and dynamic updates.
9513It supports TSIG authenticated messages and EDNS0.")
9514 (license license:expat)))
9515
9516(define-public python2-dnspython
9517 (package-with-python2 python-dnspython))
9518
9519(define-public python-email-validator
9520 (package
9521 (name "python-email-validator")
9522 (version "1.0.1")
9523 (source
9524 (origin (method url-fetch)
9525 (uri (pypi-uri "email_validator" version))
9526 (sha256
9527 (base32
9528 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
9529 (build-system python-build-system)
9530 (arguments
9531 '(#:phases
9532 (modify-phases %standard-phases
9533 (add-before 'build 'use-dnspython
9534 (lambda _
9535 (substitute* "setup.py"
9536 (("dnspython3") "dnspython"))
9537 #t)))))
9538 (native-inputs
9539 `(("python-setuptools" ,python-setuptools)))
9540 (propagated-inputs
9541 `(("python-dnspython" ,python-dnspython)
9542 ("python-idna" ,python-idna)))
9543 (home-page "https://github.com/JoshData/python-email-validator")
9544 (synopsis "Email address validation library for Python")
9545 (description
9546 "This library validates email address syntax and deliverability.")
9547 (license cc0)))
9548
9549(define-public python2-email-validator
9550 (package-with-python2 python-email-validator))
9551
9552(define-public python-ukpostcodeparser
9553 (package
9554 (name "python-ukpostcodeparser")
9555 (version "1.0.3")
9556 (source (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "UkPostcodeParser" version))
9559 (sha256
9560 (base32
9561 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9562 (build-system python-build-system)
9563 (native-inputs
9564 `(("python-setuptools" ,python-setuptools)))
9565 (home-page "https://github.com/hamstah/ukpostcodeparser")
9566 (synopsis "UK Postcode parser for Python")
9567 (description
9568 "This library provides the @code{parse_uk_postcode} function for
9569parsing UK postcodes.")
9570 (license license:expat)))
9571
9572(define-public python2-ukpostcodeparser
9573 (package-with-python2 python-ukpostcodeparser))
9574
9575(define-public python-fake-factory
9576 (package
9577 (name "python-fake-factory")
9578 (version "0.5.7")
9579 (source (origin
9580 (method url-fetch)
9581 (uri (pypi-uri "fake-factory" version))
9582 (sha256
9583 (base32
9584 "1chmarnrdzn4r017n8qlic0m0bbnhw04s3hkwribjvm3mqpb6pa0"))))
9585 (build-system python-build-system)
9586 (arguments
9587 '(#:phases
9588 (modify-phases %standard-phases
9589 (add-before 'check 'disable-failing-test
9590 ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
9591 ;; first_name, last_name = name.split()
9592 ;; ValueError: too many values to unpack (expected 2)
9593 (lambda _
9594 (delete-file "faker/tests/ne_np/__init__.py")
9595 #t)))))
9596 (native-inputs
9597 `(("python-setuptools" ,python-setuptools)
9598 ;; For testing
9599 ("python-email-validator" ,python-email-validator)
9600 ("python-mock" ,python-mock)
9601 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9602 (propagated-inputs
9603 `(("python-dateutil" ,python-dateutil-2)
9604 ("python-six" ,python-six)))
9605 (home-page "http://github.com/joke2k/faker")
9606 (synopsis "Python package that generates fake data")
9607 (description
9608 "Faker is a Python package that generates fake data such as names,
9609addresses, and phone numbers.")
9610 (license license:expat)
9611 (properties `((python2-variant . ,(delay python2-fake-factory))))))
9612
9613(define-public python2-fake-factory
9614 (let ((base (package-with-python2 (strip-python2-variant
9615 python-fake-factory))))
9616 (package
9617 (inherit base)
9618 (propagated-inputs
9619 `(("python2-ipaddress" ,python2-ipaddress)
9620 ,@(package-propagated-inputs base))))))
9621
9622(define-public python-pyaml
9623 (package
9624 (name "python-pyaml")
9625 (version "15.8.2")
9626 (source (origin
9627 (method url-fetch)
9628 (uri (pypi-uri "pyaml" version))
9629 (sha256
9630 (base32
9631 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
9632 (build-system python-build-system)
9633 (native-inputs
9634 `(("python-setuptools" ,python-setuptools)))
9635 (propagated-inputs
9636 `(("python-pyyaml" ,python-pyyaml)))
9637 (home-page "https://github.com/mk-fg/pretty-yaml")
9638 (synopsis "YAML pretty-print library for Python")
9639 (description
9640 "pyaml is a PyYAML based python module to produce pretty and readable
9641YAML-serialized data.")
9642 (license (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9643
9644(define-public python2-pyaml
9645 (package-with-python2 python-pyaml))
9646
9647(define-public python-flexmock
9648 (package
9649 (name "python-flexmock")
9650 (version "0.10.2")
9651 (source (origin
9652 (method url-fetch)
9653 (uri (pypi-uri "flexmock" version))
9654 (sha256
9655 (base32
9656 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
9657 (build-system python-build-system)
9658 (native-inputs
9659 `(("python-setuptools" ,python-setuptools)))
9660 (home-page "https://flexmock.readthedocs.org")
9661 (synopsis "Testing library for Python")
9662 (description
9663 "flexmock is a testing library for Python that makes it easy to create
9664mocks, stubs and fakes.")
9665 (license bsd-3)))
9666
9667(define-public python2-flexmock
9668 (package-with-python2 python-flexmock))
9669
9670(define-public python-orator
9671 (package
9672 (name "python-orator")
9673 (version "0.8.2")
9674 (source (origin
9675 (method url-fetch)
9676 (uri (pypi-uri "orator" version))
9677 (sha256
9678 (base32
9679 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
9680 (build-system python-build-system)
9681 (arguments '(#:tests? #f)) ; no tests
9682 (native-inputs
9683 `(("python-setuptools" ,python-setuptools)))
9684 (propagated-inputs
9685 `(("python-arrow" ,python-arrow)
9686 ("python-blinker" ,python-blinker)
9687 ("python-cleo" ,python-cleo)
9688 ("python-fake-factory" ,python-fake-factory)
9689 ("python-inflection" ,python-inflection)
9690 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
9691 ("python-pyaml" ,python-pyaml)
9692 ("python-simplejson" ,python-simplejson)
9693 ("python-wrapt" ,python-wrapt)))
9694 (home-page "https://orator-orm.com/")
9695 (synopsis "ActiveRecord ORM for Python")
9696 (description
9697 "Orator provides a simple ActiveRecord-like Object Relational Mapping
9698implementation for Python.")
9699 (license license:expat)
9700 (properties `((python2-variant . ,(delay python2-orator))))))
9701
9702(define-public python2-orator
9703 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
9704 (package
9705 (inherit base)
9706 (propagated-inputs
9707 `(("python2-ipaddress" ,python2-ipaddress)
9708 ,@(package-propagated-inputs base))))))
9709
9710(define-public python-prompt-toolkit
9711 (package
9712 (name "python-prompt-toolkit")
9713 (version "1.0.3")
9714 (source
9715 (origin
9716 (method url-fetch)
9717 (uri (string-append
9718 "https://pypi.python.org/packages/"
9719 "8d/de/412f23919929c01e6b55183e124623f705e4b91796d3d2dce2cb53d595ad/"
9720 "prompt_toolkit-" version ".tar.gz"))
9721 (sha256
9722 (base32
9723 "18lbmmkyjf509klc3217lq0x863pfzix779zx5kp9lms1iph4pl0"))))
9724 (build-system python-build-system)
9725 (inputs `(("python-wcwidth" ,python-wcwidth)
9726 ("python-pygments" ,python-pygments)))
9727 (native-inputs `(("python-six" ,python-six)))
9728 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9729 (synopsis "Library for building command line interfaces in Python")
9730 (description
9731 "Prompt-Toolkit is a library for building interactive command line
9732interfaces in Python. It's like GNU Readline but it also features syntax
9733highlighting while typing, out-of-the-box multi-line input editing, advanced
9734code completion, incremental search, support for Chinese double-width
9735characters, mouse support, and auto suggestions.")
9736 (license bsd-3)
9737 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
9738
9739(define-public python2-prompt-toolkit
9740 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
9741 (package
9742 (inherit base)
9743 (native-inputs
9744 `(("python2-setuptools" ,python2-setuptools)
9745 ,@(package-native-inputs base))))))
9746
9747(define-public python-jedi
9748 (package
9749 (name "python-jedi")
9750 (version "0.9.0")
9751 (source
9752 (origin
9753 (method url-fetch)
9754 (uri (pypi-uri "jedi" version))
9755 (sha256
9756 (base32
9757 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9758 (build-system python-build-system)
9759 (home-page "https://github.com/davidhalter/jedi")
9760 (synopsis
9761 "Autocompletion for Python that can be used for text editors")
9762 (description
9763 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9764 (license license:expat)
9765 (properties `((python2-variant . ,(delay python2-jedi))))))
9766
9767(define-public python2-jedi
9768 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
9769 (package
9770 (inherit base)
9771 (native-inputs
9772 `(("python2-setuptools" ,python2-setuptools)
9773 ,@(package-native-inputs base))))))
9774
9775(define-public ptpython
9776 (package
9777 (name "ptpython")
9778 (version "0.34")
9779 (source (origin
9780 (method url-fetch)
9781 (uri (pypi-uri "ptpython" version))
9782 (sha256
9783 (base32
9784 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9785 (build-system python-build-system)
9786 (inputs
9787 `(("python-docopt" ,python-docopt)
9788 ("python-jedi" ,python-jedi)
9789 ("python-prompt-toolkit" ,python-prompt-toolkit)
9790 ("python-pygments" ,python-pygments)
9791 ("python-setuptools" ,python-setuptools)))
9792 (home-page "https://github.com/jonathanslenders/ptpython")
9793 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9794 (description
9795 "ptpython is a Python read-eval-print loop with IDE-like features.
9796It supports syntax highlighting, multiline editing, autocompletion, mouse,
9797color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9798etc.")
9799 (license bsd-3)
9800 (properties `((python2-variant . ,(delay ptpython-2))))))
9801
9802(define-public ptpython-2
9803 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9804 (package
9805 (inherit base)
9806 (name "ptpython2"))))