76e6ead6444041d1c9a8c54b73b49a02dd07f057
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;;
40 ;;; This file is part of GNU Guix.
41 ;;;
42 ;;; GNU Guix is free software; you can redistribute it and/or modify it
43 ;;; under the terms of the GNU General Public License as published by
44 ;;; the Free Software Foundation; either version 3 of the License, or (at
45 ;;; your option) any later version.
46 ;;;
47 ;;; GNU Guix is distributed in the hope that it will be useful, but
48 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 ;;; GNU General Public License for more details.
51 ;;;
52 ;;; You should have received a copy of the GNU General Public License
53 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
55 (define-module (gnu packages python)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages adns)
60 #:use-module (gnu packages attr)
61 #:use-module (gnu packages backup)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages file)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages graphviz)
73 #:use-module (gnu packages gstreamer)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages icu4c)
76 #:use-module (gnu packages image)
77 #:use-module (gnu packages imagemagick)
78 #:use-module (gnu packages libevent)
79 #:use-module (gnu packages libffi)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages multiprecision)
84 #:use-module (gnu packages networking)
85 #:use-module (gnu packages ncurses)
86 #:use-module (gnu packages openstack)
87 #:use-module (gnu packages password-utils)
88 #:use-module (gnu packages pcre)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages pkg-config)
91 #:use-module (gnu packages protobuf)
92 #:use-module (gnu packages qt)
93 #:use-module (gnu packages readline)
94 #:use-module (gnu packages sdl)
95 #:use-module (gnu packages shells)
96 #:use-module (gnu packages statistics)
97 #:use-module (gnu packages tex)
98 #:use-module (gnu packages texinfo)
99 #:use-module (gnu packages tls)
100 #:use-module (gnu packages version-control)
101 #:use-module (gnu packages video)
102 #:use-module (gnu packages web)
103 #:use-module (gnu packages base)
104 #:use-module (gnu packages xml)
105 #:use-module (gnu packages xorg)
106 #:use-module (gnu packages xdisorg)
107 #:use-module (gnu packages zip)
108 #:use-module (gnu packages tcl)
109 #:use-module (gnu packages bdw-gc)
110 #:use-module (guix packages)
111 #:use-module (guix download)
112 #:use-module (guix git-download)
113 #:use-module (guix utils)
114 #:use-module (guix build-system gnu)
115 #:use-module (guix build-system cmake)
116 #:use-module (guix build-system python)
117 #:use-module (guix build-system trivial)
118 #:use-module (srfi srfi-1))
119
120 (define-public python-2.7
121 (package
122 (name "python")
123 (version "2.7.12")
124 (source
125 (origin
126 (method url-fetch)
127 (uri (string-append "https://www.python.org/ftp/python/"
128 version "/Python-" version ".tar.xz"))
129 (sha256
130 (base32
131 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
132 (patches (search-patches "python-2.7-search-paths.patch"
133 "python-2-deterministic-build-info.patch"
134 "python-2.7-site-prefixes.patch"
135 "python-2.7-source-date-epoch.patch"))
136 (modules '((guix build utils)))
137 ;; suboptimal to delete failing tests here, but if we delete them in the
138 ;; arguments then we need to make sure to strip out that phase when it
139 ;; gets inherited by python and python-minimal.
140 (snippet
141 '(begin
142 (for-each delete-file
143 '("Lib/test/test_compileall.py"
144 "Lib/test/test_ctypes.py" ; fails on mips64el
145 "Lib/test/test_distutils.py"
146 "Lib/test/test_import.py"
147 "Lib/test/test_shutil.py"
148 "Lib/test/test_socket.py"
149 "Lib/test/test_subprocess.py"))
150 #t))))
151 (outputs '("out"
152 "tk")) ;tkinter; adds 50 MiB to the closure
153 (build-system gnu-build-system)
154 (arguments
155 `(;; 356 tests OK.
156 ;; 6 tests failed:
157 ;; test_compileall test_distutils test_import test_shutil test_socket
158 ;; test_subprocess
159 ;; 39 tests skipped:
160 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
161 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
162 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
163 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
164 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
165 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
166 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
167 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
168 ;; test_winreg test_winsound test_zipfile64
169 ;; 4 skips unexpected on linux2:
170 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
171 #:test-target "test"
172 #:configure-flags
173 (list "--enable-shared" ;allow embedding
174 "--with-system-ffi" ;build ctypes
175 "--with-ensurepip=install" ;install pip and setuptools
176 (string-append "LDFLAGS=-Wl,-rpath="
177 (assoc-ref %outputs "out") "/lib"))
178
179 #:modules ((ice-9 ftw) (ice-9 match)
180 (guix build utils) (guix build gnu-build-system))
181 #:phases
182 (modify-phases %standard-phases
183 (add-before
184 'configure 'patch-lib-shells
185 (lambda _
186 ;; Filter for existing files, since some may not exist in all
187 ;; versions of python that are built with this recipe.
188 (substitute* (filter file-exists?
189 '("Lib/subprocess.py"
190 "Lib/popen2.py"
191 "Lib/distutils/tests/test_spawn.py"
192 "Lib/test/test_subprocess.py"))
193 (("/bin/sh") (which "sh")))
194
195 ;; Use zero as the timestamp in .pyc files so that builds are
196 ;; deterministic. TODO: Remove it when this variable is set in
197 ;; gnu-build-system.scm.
198 (setenv "SOURCE_DATE_EPOCH" "1")
199 #t))
200 (add-before 'configure 'do-not-record-configure-flags
201 (lambda* (#:key configure-flags #:allow-other-keys)
202 ;; Remove configure flags from the installed '_sysconfigdata.py'
203 ;; and 'Makefile' so we don't end up keeping references to the
204 ;; build tools.
205 ;;
206 ;; Preserve at least '--with-system-ffi' since otherwise the
207 ;; thing tries to build libffi, fails, and we end up with a
208 ;; Python that lacks ctypes.
209 (substitute* "configure"
210 (("^CONFIG_ARGS=.*$")
211 (format #f "CONFIG_ARGS='~a'\n"
212 (if (member "--with-system-ffi" configure-flags)
213 "--with-system-ffi"
214 ""))))
215 #t))
216 (add-before
217 'check 'pre-check
218 (lambda _
219 ;; 'Lib/test/test_site.py' needs a valid $HOME
220 (setenv "HOME" (getcwd))
221 #t))
222 (add-after
223 'unpack 'set-source-file-times-to-1980
224 ;; XXX One of the tests uses a ZIP library to pack up some of the
225 ;; source tree, and fails with "ZIP does not support timestamps
226 ;; before 1980". Work around this by setting the file times in the
227 ;; source tree to sometime in early 1980.
228 (lambda _
229 (let ((circa-1980 (* 10 366 24 60 60)))
230 (ftw "." (lambda (file stat flag)
231 (utime file circa-1980 circa-1980)
232 #t))
233 #t)))
234 (add-after 'install 'remove-tests
235 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
236 ;; because these files are used by some libraries out there.
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let ((out (assoc-ref outputs "out")))
239 (match (scandir (string-append out "/lib")
240 (lambda (name)
241 (string-prefix? "python" name)))
242 ((pythonX.Y)
243 (let ((testdir (string-append out "/lib/" pythonX.Y
244 "/test")))
245 (with-directory-excursion testdir
246 (for-each delete-file-recursively
247 (scandir testdir
248 (match-lambda
249 ((or "." "..") #f)
250 (file
251 (not
252 (string-prefix? "test_support."
253 file))))))
254 (call-with-output-file "__init__.py" (const #t))
255 #t)))))))
256 (add-before 'strip 'make-libraries-writable
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; Make .so files writable so they can be stripped.
259 (let ((out (assoc-ref outputs "out")))
260 (for-each (lambda (file)
261 (chmod file #o755))
262 (find-files (string-append out "/lib")
263 "\\.so"))
264 #t)))
265 (add-after 'install 'move-tk-inter
266 (lambda* (#:key outputs #:allow-other-keys)
267 ;; When Tkinter support is built move it to a separate output so
268 ;; that the main output doesn't contain a reference to Tcl/Tk.
269 (let ((out (assoc-ref outputs "out"))
270 (tk (assoc-ref outputs "tk")))
271 (when tk
272 (match (find-files out "tkinter.*\\.so")
273 ((tkinter.so)
274 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
275 ;; want it under TK/lib/pythonX.Y/site-packages.
276 (let* ((len (string-length out))
277 (target (string-append
278 tk "/"
279 (string-drop
280 (dirname (dirname tkinter.so))
281 len)
282 "/site-packages")))
283 (install-file tkinter.so target)
284 (delete-file tkinter.so)))))
285 #t))))))
286 (inputs
287 `(("bzip2" ,bzip2)
288 ("gdbm" ,gdbm)
289 ("libffi" ,libffi) ; for ctypes
290 ("sqlite" ,sqlite) ; for sqlite extension
291 ("openssl" ,openssl)
292 ("readline" ,readline)
293 ("zlib" ,zlib)
294 ("tcl" ,tcl)
295 ("tk" ,tk))) ; for tkinter
296 (native-inputs
297 `(("pkg-config" ,pkg-config)))
298 (native-search-paths
299 (list (search-path-specification
300 (variable "PYTHONPATH")
301 (files '("lib/python2.7/site-packages")))))
302 (home-page "https://www.python.org")
303 (synopsis "High-level, dynamically-typed programming language")
304 (description
305 "Python is a remarkably powerful dynamic programming language that
306 is used in a wide variety of application domains. Some of its key
307 distinguishing features include: clear, readable syntax; strong
308 introspection capabilities; intuitive object orientation; natural
309 expression of procedural code; full modularity, supporting hierarchical
310 packages; exception-based error handling; and very high level dynamic
311 data types.")
312 (license license:psfl)))
313
314 ;; Current 2.x version.
315 (define-public python-2 python-2.7)
316
317 (define-public python-3.5
318 (package (inherit python-2)
319 (version "3.5.2")
320 (source (origin
321 (method url-fetch)
322 (uri (string-append "https://www.python.org/ftp/python/"
323 version "/Python-" version ".tar.xz"))
324 (patches (search-patches
325 "python-fix-tests.patch"
326 "python-3.5-fix-tests.patch"
327 "python-3-deterministic-build-info.patch"
328 "python-3-search-paths.patch"))
329 (patch-flags '("-p0"))
330 (sha256
331 (base32
332 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
333 (arguments (substitute-keyword-arguments (package-arguments python-2)
334 ((#:tests? _) #t)))
335 (native-search-paths
336 (list (search-path-specification
337 (variable "PYTHONPATH")
338 (files (list (string-append "lib/python"
339 (version-major+minor version)
340 "/site-packages"))))))))
341
342 (define-public python-3.4
343 (package (inherit python-3.5)
344 (version "3.4.5")
345 (source (origin
346 (method url-fetch)
347 (uri (string-append "https://www.python.org/ftp/python/"
348 version "/Python-" version ".tar.xz"))
349 (patches (search-patches
350 "python-fix-tests.patch"
351 "python-3.4-fix-tests.patch"
352 "python-3-deterministic-build-info.patch"
353 "python-3-search-paths.patch"))
354 (patch-flags '("-p0"))
355 (sha256
356 (base32
357 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
358
359 ;; Current 3.x version.
360 (define-public python-3 python-3.5)
361
362 ;; Current major version.
363 (define-public python python-3)
364
365 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
366 ;; Python (Tk -> libxcb -> Python.)
367
368 (define-public python2-minimal
369 (package (inherit python-2)
370 (name "python-minimal")
371 (outputs '("out"))
372 (arguments
373 (substitute-keyword-arguments (package-arguments python-2)
374 ((#:configure-flags cf)
375 `(append ,cf '("--without-system-ffi")))))
376 (inputs '()))) ;none of the optional dependencies
377
378 (define-public python-minimal
379 (package (inherit python)
380 (name "python-minimal")
381 (outputs '("out"))
382
383 ;; Build fails due to missing ctypes without libffi.
384 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
385 ;; zlib is required by 'zipimport', used by pip.
386 (inputs `(("libffi" ,libffi)
387 ("openssl" ,openssl)
388 ("zlib" ,zlib)))))
389
390 (define* (wrap-python3 python
391 #:optional
392 (name (string-append (package-name python) "-wrapper")))
393 (package (inherit python)
394 (name name)
395 (source #f)
396 (build-system trivial-build-system)
397 (outputs '("out"))
398 (inputs `(("bash" ,bash)))
399 (propagated-inputs `(("python" ,python)))
400 (arguments
401 `(#:modules ((guix build utils))
402 #:builder
403 (begin
404 (use-modules (guix build utils))
405 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
406 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
407 (mkdir-p bin)
408 (for-each
409 (lambda (old new)
410 (symlink (string-append python old)
411 (string-append bin "/" new)))
412 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
413 `("python" ,"pydoc" ,"idle" ,"pip"))
414 ;; python-config outputs search paths based upon its location,
415 ;; use a bash wrapper to avoid changing its outputs.
416 (let ((bash (string-append (assoc-ref %build-inputs "bash")
417 "/bin/bash"))
418 (old (string-append python "python3-config"))
419 (new (string-append bin "/python-config")))
420 (with-output-to-file new
421 (lambda ()
422 (format #t "#!~a~%" bash)
423 (format #t "exec \"~a\" \"$@\"~%" old)
424 (chmod new #o755)
425 #t)))))))
426 (synopsis "Wrapper for the Python 3 commands")
427 (description
428 "This package provides wrappers for the commands of Python@tie{}3.x such
429 that they can be invoked under their usual name---e.g., @command{python}
430 instead of @command{python3}.")))
431
432 (define-public python-wrapper (wrap-python3 python))
433 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
434
435 (define-public python-psutil
436 (package
437 (name "python-psutil")
438 (version "4.3.0")
439 (source
440 (origin
441 (method url-fetch)
442 (uri (pypi-uri "psutil" version))
443 (sha256
444 (base32
445 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
446 (build-system python-build-system)
447 (arguments
448 ;; FIXME: some tests does not return and times out.
449 '(#:tests? #f))
450 (home-page "https://www.github.com/giampaolo/psutil")
451 (synopsis "Library for retrieving information on running processes")
452 (description
453 "psutil (Python system and process utilities) is a library for retrieving
454 information on running processes and system utilization (CPU, memory, disks,
455 network) in Python. It is useful mainly for system monitoring, profiling and
456 limiting process resources and management of running processes. It implements
457 many functionalities offered by command line tools such as: ps, top, lsof,
458 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
459 pidof, tty, taskset, pmap.")
460 (license license:bsd-3)))
461
462 (define-public python2-psutil
463 (package-with-python2 python-psutil))
464
465 (define-public python-passlib
466 (package
467 (name "python-passlib")
468 (version "1.7.1")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (pypi-uri "passlib" version))
473 (sha256
474 (base32
475 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
476 (build-system python-build-system)
477 (native-inputs
478 `(("python-nose" ,python-nose)))
479 (propagated-inputs
480 `(("python-py-bcrypt" ,python-py-bcrypt)))
481 (arguments
482 `(#:phases
483 (alist-cons-before
484 'check 'set-PYTHON_EGG_CACHE
485 ;; some tests require access to "$HOME/.cython"
486 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
487 %standard-phases)))
488 (home-page "https://bitbucket.org/ecollins/passlib")
489 (synopsis
490 "Comprehensive password hashing framework")
491 (description
492 "Passlib is a password hashing library for Python 2 & 3, which provides
493 cross-platform implementations of over 30 password hashing algorithms, as well
494 as a framework for managing existing password hashes. It's designed to be
495 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
496 to providing full-strength password hashing for multi-user application.")
497 (license license:bsd-3)))
498
499 (define-public python2-passlib
500 (package-with-python2 python-passlib))
501
502 (define-public python-py-bcrypt
503 (package
504 (name "python-py-bcrypt")
505 (version "0.4")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (string-append
510 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
511 version
512 ".tar.gz"))
513 (sha256
514 (base32
515 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
516 (build-system python-build-system)
517 (home-page "https://code.google.com/p/py-bcrypt")
518 (synopsis
519 "Bcrypt password hashing and key derivation")
520 (description
521 "A python wrapper of OpenBSD's Blowfish password hashing code. This
522 system hashes passwords using a version of Bruce Schneier's Blowfish block
523 cipher with modifications designed to raise the cost of off-line password
524 cracking and frustrate fast hardware implementation. The computation cost of
525 the algorithm is parametised, so it can be increased as computers get faster.
526 The intent is to make a compromise of a password database less likely to
527 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
528 John the Ripper).")
529 ;; "sha2.c" is under BSD-3;
530 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
531 ;; the rest is under ISC.
532 (license (list license:isc license:bsd-3 license:bsd-4))))
533
534 (define-public python2-py-bcrypt
535 (package-with-python2 python-py-bcrypt))
536
537
538 (define-public python-paramiko
539 (package
540 (name "python-paramiko")
541 (version "1.16.0")
542 (source
543 (origin
544 (method url-fetch)
545 (uri (pypi-uri "paramiko" version))
546 (sha256
547 (base32
548 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
549 (build-system python-build-system)
550 (arguments
551 '(;; FIXME: One test fails with "EOFError not raised by connect".
552 #:tests? #f))
553 ;; #:phases
554 ;; (modify-phases %standard-phases
555 ;; (replace 'check
556 ;; (lambda _
557 ;; (zero? (system* "python" "test.py")))))))
558 (propagated-inputs
559 `(("python-pycrypto" ,python-pycrypto)
560 ("python-ecdsa" ,python-ecdsa)))
561 (home-page "http://www.paramiko.org/")
562 (synopsis "SSHv2 protocol library")
563 (description "Paramiko is a python implementation of the SSHv2 protocol,
564 providing both client and server functionality. While it leverages a Python C
565 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
566 Python interface around SSH networking concepts.")
567 (license license:lgpl2.1+)))
568
569 (define-public python2-paramiko
570 (package-with-python2 python-paramiko))
571
572
573 (define-public python-httplib2
574 (package
575 (name "python-httplib2")
576 (version "0.9.2")
577 (source
578 (origin
579 (method url-fetch)
580 (uri (pypi-uri "httplib2" version))
581 (sha256
582 (base32
583 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
584 (build-system python-build-system)
585 (home-page "https://github.com/jcgregorio/httplib2")
586 (synopsis "Comprehensive HTTP client library")
587 (description
588 "A comprehensive HTTP client library supporting many features left out of
589 other HTTP libraries.")
590 (license license:expat)))
591
592 (define-public python2-httplib2
593 (package-with-python2 python-httplib2))
594
595 (define-public python-ecdsa
596 (package
597 (name "python-ecdsa")
598 (version "0.13")
599 (source
600 (origin
601 (method url-fetch)
602 (uri (string-append
603 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
604 version
605 ".tar.gz"))
606 (sha256
607 (base32
608 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
609 (build-system python-build-system)
610 (inputs
611 `(("openssl" ,openssl)))
612 (home-page
613 "http://github.com/warner/python-ecdsa")
614 (synopsis
615 "ECDSA cryptographic signature library (pure python)")
616 (description
617 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
618 Curve Digital Signature Algorithm), implemented purely in Python. With this
619 library, you can quickly create keypairs (signing key and verifying key), sign
620 messages, and verify the signatures. The keys and signatures are very short,
621 making them easy to handle and incorporate into other protocols.")
622 (license license:expat)))
623
624 (define-public python2-ecdsa
625 (package-with-python2 python-ecdsa))
626
627 (define-public python-ccm
628 (package
629 (name "python-ccm")
630 (version "2.1.6")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "ccm" version))
635 (sha256
636 (base32
637 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
638 (build-system python-build-system)
639 (propagated-inputs
640 `(("python-pyyaml" ,python-pyyaml)
641 ;; Not listed in setup.py, but used in ccmlib/node.py for full
642 ;; functionality
643 ("python-psutil" ,python-psutil)
644 ("python-six" ,python-six)))
645 (home-page "https://github.com/pcmanus/ccm")
646 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
647 localhost")
648 (description "Cassandra Cluster Manager is a development tool for testing
649 local Cassandra clusters. It creates, launches and removes Cassandra clusters
650 on localhost.")
651 (license license:asl2.0)))
652
653 (define-public python2-ccm
654 (package-with-python2 python-ccm))
655
656 (define-public python-pytz
657 (package
658 (name "python-pytz")
659 (version "2016.10")
660 (source
661 (origin
662 (method url-fetch)
663 (uri (pypi-uri "pytz" version ".tar.bz2"))
664 (sha256
665 (base32
666 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
667 (build-system python-build-system)
668 (arguments `(#:tests? #f)) ; no test target
669 (home-page "http://pythonhosted.org/pytz")
670 (synopsis "Python timezone library")
671 (description
672 "This library allows accurate and cross platform timezone calculations
673 using Python 2.4 or higher and provides access to the Olson timezone database.")
674 (license license:expat)))
675
676 (define-public python2-pytz
677 (package-with-python2 python-pytz))
678
679
680 (define-public python-babel
681 (package
682 (name "python-babel")
683 (version "2.3.4")
684 (source
685 (origin
686 (method url-fetch)
687 (uri (pypi-uri "Babel" version))
688 (sha256
689 (base32
690 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
691 (build-system python-build-system)
692 (propagated-inputs
693 `(("python-pytz" ,python-pytz)))
694 (arguments `(#:tests? #f)) ; no test target
695 (home-page "http://babel.pocoo.org/")
696 (synopsis
697 "Tools for internationalizing Python applications")
698 (description
699 "Babel is composed of two major parts:
700 - tools to build and work with gettext message catalogs
701 - a Python interface to the CLDR (Common Locale Data Repository), providing
702 access to various locale display names, localized number and date formatting,
703 etc. ")
704 (license license:bsd-3)))
705
706 (define-public python2-babel
707 (package-with-python2 python-babel))
708
709 (define-public python2-backport-ssl-match-hostname
710 (package
711 (name "python2-backport-ssl-match-hostname")
712 (version "3.5.0.1")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (string-append
717 "https://pypi.python.org/packages/source/b/"
718 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
719 version ".tar.gz"))
720 (sha256
721 (base32
722 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
723 (build-system python-build-system)
724 (arguments
725 `(#:python ,python-2
726 #:tests? #f)) ; no test target
727 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
728 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
729 (description
730 "This backport brings the ssl.match_hostname() function to users of
731 earlier versions of Python. The function checks the hostname in the
732 certificate returned by the server to which a connection has been established,
733 and verifies that it matches the intended target hostname.")
734 (license license:psfl)))
735
736 (define-public python-hdf4
737 (package
738 (name "python-hdf4")
739 (version "0.9")
740 (source
741 (origin
742 (method url-fetch)
743 (uri (pypi-uri name version))
744 (sha256
745 (base32
746 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
747 (build-system python-build-system)
748 (native-inputs `(("nose" ,python-nose)))
749 (propagated-inputs `(("numpy" ,python-numpy)))
750 (inputs
751 `(("hdf4" ,hdf4)
752 ("libjpeg" ,libjpeg)
753 ("zlib" ,zlib)))
754 (arguments
755 `(#:phases
756 (modify-phases %standard-phases
757 (replace 'check
758 (lambda _
759 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
760 ;; on to import numpy. Somehow this works on their CI system.
761 ;; Let's just manage PYTHONPATH here instead.
762 (substitute* "runexamples.sh"
763 (("export PYTHONPATH=.*") ""))
764 (setenv "PYTHONPATH"
765 (string-append (getcwd) ":"
766 (getenv "PYTHONPATH")))
767 (and (zero? (system* "./runexamples.sh"))
768 (zero? (system* "nosetests" "-v"))))))))
769 (home-page "https://github.com/fhs/python-hdf4")
770 (synopsis "Python interface to the NCSA HDF4 library")
771 (description
772 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
773 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
774 NetCDF files can also be read and modified. Python-HDF4 is a fork of
775 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
776 (license license:expat)))
777
778 (define-public python2-hdf4
779 (package-with-python2 python-hdf4))
780
781 (define-public python-h5py
782 (package
783 (name "python-h5py")
784 (version "2.6.0")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "h5py" version))
789 (sha256
790 (base32
791 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
792 (build-system python-build-system)
793 (arguments
794 `(#:tests? #f ; no test target
795 #:phases
796 (modify-phases %standard-phases
797 (add-after 'unpack 'fix-hdf5-paths
798 (lambda* (#:key inputs #:allow-other-keys)
799 (let ((prefix (assoc-ref inputs "hdf5")))
800 (substitute* "setup_build.py"
801 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
802 (string-append "['" prefix "/lib" "']"))
803 (("'/opt/local/include', '/usr/local/include'")
804 (string-append "'" prefix "/include" "'")))
805 (substitute* "setup_configure.py"
806 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
807 (string-append "['" prefix "/lib" "']")))
808 #t))))))
809 (propagated-inputs
810 `(("python-six" ,python-six)
811 ("python-numpy" ,python-numpy)))
812 (inputs
813 `(("hdf5" ,hdf5)))
814 (native-inputs
815 `(("python-cython" ,python-cython)
816 ("python-pkgconfig" ,python-pkgconfig)))
817 (home-page "http://www.h5py.org/")
818 (synopsis "Read and write HDF5 files from Python")
819 (description
820 "The h5py package provides both a high- and low-level interface to the
821 HDF5 library from Python. The low-level interface is intended to be a
822 complete wrapping of the HDF5 API, while the high-level component supports
823 access to HDF5 files, datasets and groups using established Python and NumPy
824 concepts.")
825 (license license:bsd-3)))
826
827 (define-public python2-h5py
828 (package-with-python2 python-h5py))
829
830 (define-public python-netcdf4
831 (package
832 (name "python-netcdf4")
833 (version "1.2.7")
834 (source
835 (origin
836 (method url-fetch)
837 (uri (pypi-uri "netCDF4" version))
838 (sha256
839 (base32
840 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
841 (build-system python-build-system)
842 (native-inputs
843 `(("python-cython" ,python-cython)))
844 (propagated-inputs
845 `(("python-numpy" ,python-numpy)))
846 (inputs
847 `(("netcdf" ,netcdf)
848 ("hdf4" ,hdf4)
849 ("hdf5" ,hdf5)))
850 (arguments
851 '(#:phases
852 (modify-phases %standard-phases
853 (replace 'check
854 (lambda _
855 (setenv "NO_NET" "1") ; disable opendap tests
856 (with-directory-excursion "test"
857 (setenv "PYTHONPATH" ; find and add the library we just built
858 (string-append
859 (car (find-files "../build" "lib.*"
860 #:directories? #:t
861 #:fail-on-error? #:t))
862 ":" (getenv "PYTHONPATH")))
863 (zero? (system* "python" "run_all.py"))))))))
864 (home-page
865 "https://github.com/Unidata/netcdf4-python")
866 (synopsis "Python/numpy interface to the netCDF library")
867 (description "Netcdf4-python is a Python interface to the netCDF C
868 library. netCDF version 4 has many features not found in earlier
869 versions of the library and is implemented on top of HDF5. This module
870 can read and write files in both the new netCDF 4 and the old netCDF 3
871 format, and can create files that are readable by HDF5 clients. The
872 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
873 to users of that module.")
874 ;; The software is mainly ISC, but includes some files covered
875 ;; by the Expat license.
876 (license (list license:isc license:expat))))
877
878 (define-public python2-netcdf4
879 (package-with-python2 python-netcdf4))
880
881 (define-public python-lockfile
882 (package
883 (name "python-lockfile")
884 (version "0.12.2")
885 (source
886 (origin
887 (method url-fetch)
888 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
889 "lockfile-" version ".tar.gz"))
890 (sha256
891 (base32
892 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
893 (build-system python-build-system)
894 (arguments '(#:test-target "check"))
895 (native-inputs
896 `(("python-pbr" ,python-pbr)))
897 (home-page "https://launchpad.net/pylockfile")
898 (synopsis "Platform-independent file locking module")
899 (description
900 "The lockfile package exports a LockFile class which provides a simple
901 API for locking files.")
902 (license license:expat)))
903
904 (define-public python2-lockfile
905 (package-with-python2 python-lockfile))
906
907 (define-public python-mock
908 (package
909 (name "python-mock")
910 (version "1.0.1")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (pypi-uri "mock" version))
915 (sha256
916 (base32
917 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
918 (build-system python-build-system)
919 (arguments '(#:test-target "check"))
920 (home-page "https://github.com/testing-cabal/mock")
921 (synopsis "Python mocking and patching library for testing")
922 (description
923 "Mock is a library for testing in Python. It allows you to replace parts
924 of your system under test with mock objects and make assertions about how they
925 have been used.")
926 (license license:expat)))
927
928 (define-public python2-mock
929 (package-with-python2 python-mock))
930
931
932 (define-public python-setuptools
933 (package
934 (name "python-setuptools")
935 (version "31.0.0")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (pypi-uri "setuptools" version))
940 (sha256
941 (base32
942 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
943 (modules '((guix build utils)))
944 (snippet
945 '(begin
946 ;; Remove included binaries which are used to build self-extracting
947 ;; installers for Windows.
948 ;; TODO: Find some way to build them ourself so we can include them.
949 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
950 #t))))
951 (build-system python-build-system)
952 ;; FIXME: Tests require pytest, which itself relies on setuptools.
953 ;; One could bootstrap with an internal untested setuptools.
954 (arguments
955 `(#:tests? #f))
956 (home-page "https://pypi.python.org/pypi/setuptools")
957 (synopsis
958 "Library designed to facilitate packaging Python projects")
959 (description
960 "Setuptools is a fully-featured, stable library designed to facilitate
961 packaging Python projects, where packaging includes:
962 Python package and module definitions,
963 distribution package metadata,
964 test hooks,
965 project installation,
966 platform-specific details,
967 Python 3 support.")
968 ;; TODO: setuptools now bundles the following libraries:
969 ;; packaging, pyparsing, six and appdirs. How to unbundle?
970 (license (list license:psfl ; setuptools itself
971 license:expat ; six, appdirs, pyparsing
972 license:asl2.0 ; packaging is dual ASL2/BSD-2
973 license:bsd-2))))
974
975 (define-public python2-setuptools
976 (package-with-python2 python-setuptools))
977
978 ;;; Pycrypto is abandoned upstream:
979 ;;;
980 ;;; https://github.com/dlitz/pycrypto/issues/173
981 ;;;
982 ;;; TODO Remove this package from GNU Guix.
983 (define-public python-pycrypto
984 (package
985 (name "python-pycrypto")
986 (version "2.6.1")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "pycrypto" version))
991 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
992 (sha256
993 (base32
994 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
995 (build-system python-build-system)
996 (inputs
997 `(("python" ,python)
998 ("gmp" ,gmp)))
999 (arguments
1000 `(#:phases
1001 (alist-cons-before
1002 'build 'set-build-env
1003 ;; pycrypto runs an autoconf configure script behind the scenes
1004 (lambda _
1005 (setenv "CONFIG_SHELL" (which "bash")))
1006 %standard-phases)))
1007 (home-page "http://www.pycrypto.org/")
1008 (synopsis "Cryptographic modules for Python")
1009 (description
1010 "Pycrypto is a collection of both secure hash functions (such as SHA256
1011 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1012 etc.). The package is structured to make adding new modules easy.")
1013 (license license:public-domain)))
1014
1015 (define-public python2-pycrypto
1016 (let ((pycrypto (package-with-python2 python-pycrypto)))
1017 (package (inherit pycrypto)
1018 (inputs
1019 `(("python" ,python-2)
1020 ,@(alist-delete
1021 "python"
1022 (package-inputs pycrypto)))))))
1023
1024 (define-public python-eventlet
1025 (package
1026 (name "python-eventlet")
1027 (version "0.20.1")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "eventlet" version))
1032 (sha256
1033 (base32
1034 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1035 (build-system python-build-system)
1036 (propagated-inputs
1037 `(("python-greenlet" ,python-greenlet)))
1038 (home-page "http://eventlet.net")
1039 (synopsis "Concurrent networking library for Python")
1040 (description
1041 "Eventlet is a concurrent networking library for Python that
1042 allows you to change how you run your code, not how you write it.
1043 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1044 Coroutines ensure that the developer uses a blocking style of programming
1045 that is similar to threading, but provide the benefits of non-blocking I/O.
1046 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1047 from the Python interpreter, or as a small part of a larger application.")
1048 (license license:expat)))
1049
1050 (define-public python2-eventlet
1051 (let ((base (package-with-python2
1052 (strip-python2-variant python-eventlet))))
1053 (package (inherit base)
1054 (propagated-inputs
1055 `(("python2-enum34" ,python2-enum34)
1056 ,@(package-propagated-inputs base))))))
1057
1058 (define-public python-keyring
1059 (package
1060 (name "python-keyring")
1061 (version "8.7")
1062 (source
1063 (origin
1064 (method url-fetch)
1065 (uri (pypi-uri "keyring" version))
1066 (sha256
1067 (base32
1068 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1069 (build-system python-build-system)
1070 (native-inputs
1071 `(("python-setuptools-scm" ,python-setuptools-scm)))
1072 (propagated-inputs
1073 `(("python-pycrypto" ,python-pycrypto)))
1074 (arguments
1075 `(#:tests? #f)) ;TODO: tests require pytest
1076 (home-page "https://github.com/jaraco/keyring")
1077 (synopsis "Store and access your passwords safely")
1078 (description
1079 "The Python keyring lib provides a easy way to access the system keyring
1080 service from python. It can be used in any application that needs safe
1081 password storage.")
1082 ;; "MIT" and PSF dual license
1083 (license license:x11)))
1084
1085 (define-public python2-keyring
1086 (package-with-python2 python-keyring))
1087
1088 (define-public python-six
1089 (package
1090 (name "python-six")
1091 (version "1.10.0")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (pypi-uri "six" version))
1096 (sha256
1097 (base32
1098 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1099 (build-system python-build-system)
1100 (native-inputs
1101 `(("python-py" ,python-py)
1102 ("python-pytest" ,python-pytest)))
1103 (home-page "http://pypi.python.org/pypi/six/")
1104 (synopsis "Python 2 and 3 compatibility utilities")
1105 (description
1106 "Six is a Python 2 and 3 compatibility library. It provides utility
1107 functions for smoothing over the differences between the Python versions with
1108 the goal of writing Python code that is compatible on both Python versions.
1109 Six supports every Python version since 2.5. It is contained in only one
1110 Python file, so it can be easily copied into your project.")
1111 (license license:x11)))
1112
1113 (define-public python2-six
1114 (package-with-python2 python-six))
1115
1116 (define-public python-dateutil
1117 (package
1118 (name "python-dateutil")
1119 (version "2.5.3")
1120 (source
1121 (origin
1122 (method url-fetch)
1123 (uri (pypi-uri "python-dateutil" version))
1124 (sha256
1125 (base32
1126 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
1127 (build-system python-build-system)
1128 (propagated-inputs
1129 `(("python-six" ,python-six)))
1130 (home-page "https://dateutil.readthedocs.io/en/stable/")
1131 (synopsis "Extensions to the standard datetime module")
1132 (description
1133 "The dateutil module provides powerful extensions to the standard
1134 datetime module, available in Python 2.3+.")
1135 (license license:bsd-3)))
1136
1137 (define-public python2-dateutil
1138 (package-with-python2 python-dateutil))
1139
1140 (define-public python-parsedatetime
1141 (package
1142 (name "python-parsedatetime")
1143 (version "2.1")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (pypi-uri "parsedatetime" version))
1148 (sha256
1149 (base32
1150 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1151 (build-system python-build-system)
1152 (native-inputs
1153 `(("python-nose" ,python-nose)
1154 ("python-pyicu" ,python-pyicu)))
1155 (home-page "http://github.com/bear/parsedatetime/")
1156 (synopsis
1157 "Parse human-readable date/time text")
1158 (description
1159 "Parse human-readable date/time text.")
1160 (license license:asl2.0)))
1161
1162 (define-public python2-parsedatetime
1163 (package-with-python2 python-parsedatetime))
1164
1165 (define-public python-pandas
1166 (package
1167 (name "python-pandas")
1168 (version "0.19.2")
1169 (source
1170 (origin
1171 (method url-fetch)
1172 (uri (pypi-uri "pandas" version))
1173 (sha256
1174 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))))
1175 (build-system python-build-system)
1176 (propagated-inputs
1177 `(("python-numpy" ,python-numpy)
1178 ("python-pytz" ,python-pytz)
1179 ("python-dateutil" ,python-dateutil)))
1180 (native-inputs
1181 `(("python-nose" ,python-nose)
1182 ("python-cython" ,python-cython)))
1183 (home-page "http://pandas.pydata.org")
1184 (synopsis "Data structures for data analysis, time series, and statistics")
1185 (description
1186 "Pandas is a Python package providing fast, flexible, and expressive data
1187 structures designed to make working with structured (tabular,
1188 multidimensional, potentially heterogeneous) and time series data both easy
1189 and intuitive. It aims to be the fundamental high-level building block for
1190 doing practical, real world data analysis in Python.")
1191 (license license:bsd-3)))
1192
1193 (define-public python2-pandas
1194 (package-with-python2 python-pandas))
1195
1196 (define-public python-tzlocal
1197 (package
1198 (name "python-tzlocal")
1199 (version "1.2.2")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "tzlocal" version))
1204 (sha256
1205 (base32
1206 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1207 (build-system python-build-system)
1208 (propagated-inputs
1209 `(("python-pytz" ,python-pytz)))
1210 (home-page "https://github.com/regebro/tzlocal")
1211 (synopsis
1212 "Local timezone information for Python")
1213 (description
1214 "Tzlocal returns a tzinfo object with the local timezone information.
1215 This module attempts to fix a glaring hole in pytz, that there is no way to
1216 get the local timezone information, unless you know the zoneinfo name, and
1217 under several distributions that's hard or impossible to figure out.")
1218 (license license:cc0)))
1219
1220 (define-public python2-pysqlite
1221 (package
1222 (name "python2-pysqlite")
1223 (version "2.8.3")
1224 (source
1225 (origin
1226 (method url-fetch)
1227 (uri (pypi-uri "pysqlite" version))
1228 (sha256
1229 (base32
1230 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1231 (build-system python-build-system)
1232 (inputs
1233 `(("sqlite" ,sqlite)))
1234 (arguments
1235 `(#:python ,python-2 ; incompatible with Python 3
1236 #:tests? #f)) ; no test target
1237 (home-page "http://github.com/ghaering/pysqlite")
1238 (synopsis "SQLite bindings for Python")
1239 (description
1240 "Pysqlite provides SQLite bindings for Python that comply to the
1241 Database API 2.0T.")
1242 (license license:zlib)))
1243
1244
1245 (define-public python2-mechanize
1246 (package
1247 (name "python2-mechanize")
1248 (version "0.2.5")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1253 version ".tar.gz"))
1254 (sha256
1255 (base32
1256 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1257 (build-system python-build-system)
1258 (arguments
1259 `(#:python ,python-2 ; apparently incompatible with Python 3
1260 #:tests? #f))
1261 ;; test fails with message
1262 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1263 ;; (python-3.3.2) or
1264 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1265 ;; (python-2.7.5).
1266 ;; The source code is from March 2011 and probably not up-to-date
1267 ;; with respect to python unit tests.
1268 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1269 (synopsis
1270 "Stateful programmatic web browsing in Python")
1271 (description
1272 "Mechanize implements stateful programmatic web browsing in Python,
1273 after Andy Lester’s Perl module WWW::Mechanize.")
1274 (license (license:non-copyleft
1275 "file://COPYING"
1276 "See COPYING in the distribution."))))
1277
1278
1279 (define-public python-simplejson
1280 (package
1281 (name "python-simplejson")
1282 (version "3.10.0")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "simplejson" version))
1287 (sha256
1288 (base32
1289 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1290 (build-system python-build-system)
1291 (home-page "http://simplejson.readthedocs.org/en/latest/")
1292 (synopsis
1293 "Json library for Python")
1294 (description
1295 "JSON (JavaScript Object Notation) is a subset of JavaScript
1296 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1297 format.
1298
1299 Simplejson exposes an API familiar to users of the standard library marshal
1300 and pickle modules. It is the externally maintained version of the json
1301 library contained in Python 2.6, but maintains compatibility with Python 2.5
1302 and (currently) has significant performance advantages, even without using
1303 the optional C extension for speedups. Simplejson is also supported on
1304 Python 3.3+.")
1305 (license license:x11)))
1306
1307 (define-public python2-simplejson
1308 (package-with-python2 python-simplejson))
1309
1310
1311 (define-public python-pyicu
1312 (package
1313 (name "python-pyicu")
1314 (version "1.9.5")
1315 (source
1316 (origin
1317 (method url-fetch)
1318 (uri (pypi-uri "PyICU" version))
1319 (sha256
1320 (base32
1321 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1322 (build-system python-build-system)
1323 (arguments
1324 '(#:phases
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1327 (lambda _
1328 ;; XXX: These tests require locales that are unavailable
1329 ;; in the build environment.
1330 (delete-file "test/test_DateTimeParserGenerator.py")
1331 #t)))))
1332 (inputs
1333 `(("icu4c" ,icu4c)))
1334 (home-page "http://pyicu.osafoundation.org/")
1335 (synopsis "Python extension wrapping the ICU C++ API")
1336 (description
1337 "PyICU is a python extension wrapping the ICU C++ API.")
1338 (license license:x11)))
1339
1340 (define-public python2-pyicu
1341 (package-with-python2 python-pyicu))
1342
1343 (define-public python2-dogtail
1344 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1345 ;; spaces in indentation" with Python 3.
1346 (package
1347 (name "python2-dogtail")
1348 (version "0.8.2")
1349 (source (origin
1350 (method url-fetch)
1351 (uri (string-append
1352 "https://fedorahosted.org/released/dogtail/dogtail-"
1353 version ".tar.gz"))
1354 (sha256
1355 (base32
1356 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1357 (build-system python-build-system)
1358 (arguments `(#:python ,python-2
1359 #:tests? #f)) ; invalid command "test"
1360 (home-page "https://fedorahosted.org/dogtail/")
1361 (synopsis "GUI test tool and automation framework written in Python")
1362 (description
1363 "Dogtail is a GUI test tool and automation framework written in Python.
1364 It uses Accessibility (a11y) technologies to communicate with desktop
1365 applications. dogtail scripts are written in Python and executed like any
1366 other Python program.")
1367 (license license:gpl2+)))
1368
1369 (define-public python2-empy
1370 (package
1371 (name "python2-empy")
1372 (version "3.3")
1373 (source (origin
1374 (method url-fetch)
1375 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1376 version ".tar.gz"))
1377 (sha256
1378 (base32
1379 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1380 (build-system python-build-system)
1381 (arguments
1382 `(#:python ,python-2
1383 #:phases (alist-replace
1384 'check
1385 (lambda _
1386 (zero? (system* "./test.sh")))
1387 %standard-phases)))
1388 (home-page "http://www.alcyone.com/software/empy/")
1389 (synopsis "Templating system for Python")
1390 (description
1391 "EmPy is a system for embedding Python expressions and statements in
1392 template text; it takes an EmPy source file, processes it, and produces
1393 output. This is accomplished via expansions, which are special signals to the
1394 EmPy system and are set off by a special prefix (by default the at sign, @@).
1395 EmPy can expand arbitrary Python expressions and statements in this way, as
1396 well as a variety of special forms. Textual data not explicitly delimited in
1397 this way is sent unaffected to the output, allowing Python to be used in
1398 effect as a markup language. Also supported are callbacks via hooks,
1399 recording and playback via diversions, and dynamic, chainable filters. The
1400 system is highly configurable via command line options and embedded
1401 commands.")
1402 (license license:lgpl2.1+)))
1403
1404 (define-public python2-element-tree
1405 (package
1406 (name "python2-element-tree")
1407 (version "1.2.6")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (string-append
1411 "http://effbot.org/media/downloads/elementtree-"
1412 version "-20050316.tar.gz"))
1413 (sha256
1414 (base32
1415 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1416 (build-system python-build-system)
1417 (arguments
1418 `(#:python ,python-2 ; seems to be part of Python 3
1419 #:tests? #f)) ; no 'test' sub-command
1420 (synopsis "Toolkit for XML processing in Python")
1421 (description
1422 "ElementTree is a Python library supporting lightweight XML processing.")
1423 (home-page "http://effbot.org/zone/element-index.htm")
1424 (license (license:x11-style
1425 "http://docs.python.org/2/license.html"
1426 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1427
1428 (define-public python2-pybugz
1429 (package
1430 (name "python2-pybugz")
1431 (version "0.6.11")
1432 (source (origin
1433 (method url-fetch)
1434 (uri (string-append
1435 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1436 version ".tar.gz"))
1437 (sha256
1438 (base32
1439 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1440 (patches (search-patches "pybugz-stty.patch"
1441 "pybugz-encode-error.patch"))))
1442 (build-system python-build-system)
1443 (arguments
1444 `(#:python ,python-2 ; SyntaxError with Python 3
1445 #:tests? #f)) ; no 'test' sub-command
1446 (propagated-inputs
1447 `(("element-tree" ,python2-element-tree)))
1448 (synopsis "Python and command-line interface to Bugzilla")
1449 (description
1450 "PyBugz is a Python library and command-line tool to query the Bugzilla
1451 bug tracking system. It is meant as an aid to speed up interaction with the
1452 bug tracker.")
1453 (home-page "http://www.liquidx.net/pybugz/")
1454 (license license:gpl2)))
1455
1456 (define-public python-enum34
1457 (package
1458 (name "python-enum34")
1459 (version "1.1.0")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "enum34" version))
1464 (sha256
1465 (base32
1466 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1467 (build-system python-build-system)
1468 (arguments
1469 `(#:phases
1470 (alist-replace
1471 'check
1472 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1473 %standard-phases)))
1474 (home-page "https://pypi.python.org/pypi/enum34")
1475 (synopsis "Backported Python 3.4 Enum")
1476 (description
1477 "Enum34 is the new Python stdlib enum module available in Python 3.4
1478 backported for previous versions of Python from 2.4 to 3.3.")
1479 (license license:bsd-3)))
1480
1481 (define-public python2-enum34
1482 (package-with-python2 python-enum34))
1483
1484 (define-public python-parse-type
1485 (package
1486 (name "python-parse-type")
1487 (version "0.3.4")
1488 (source
1489 (origin
1490 (method url-fetch)
1491 (uri (string-append "https://pypi.python.org/packages/source/p/"
1492 "parse_type/parse_type-" version ".tar.gz"))
1493 (sha256
1494 (base32
1495 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1496 (build-system python-build-system)
1497 (propagated-inputs
1498 `(("python-six" ,python-six)
1499 ("python-parse" ,python-parse)))
1500 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1501 (home-page "https://github.com/jenisys/parse_type")
1502 (synopsis "Extended parse module")
1503 (description
1504 "Parse_type extends the python parse module.")
1505 (license license:bsd-3)))
1506
1507 (define-public python-parse
1508 (package
1509 (name "python-parse")
1510 (version "1.6.6")
1511 (source
1512 (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "parse" version))
1515 (sha256
1516 (base32
1517 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1518 (patches (search-patches "python-parse-too-many-fields.patch"))))
1519 (build-system python-build-system)
1520 (arguments
1521 `(#:phases
1522 (modify-phases %standard-phases
1523 (replace 'check
1524 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1525 (home-page "https://github.com/r1chardj0n3s/parse")
1526 (synopsis "Parse strings")
1527 (description
1528 "Parse strings using a specification based on the Python format()
1529 syntax.")
1530 (license license:x11)))
1531
1532 (define-public python-polib
1533 (package
1534 (name "python-polib")
1535 (version "1.0.8")
1536 (source (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "polib" version))
1539 (sha256
1540 (base32
1541 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1542 (build-system python-build-system)
1543 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1544 (synopsis "Manipulate, create and modify gettext files")
1545 (description "Polib can manipulate any gettext format (po, pot and mo)
1546 files. It can be used to create po files from scratch or to modify
1547 existing ones.")
1548 (license license:expat)))
1549
1550 (define-public python2-polib
1551 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1552 (package
1553 (inherit base)
1554 (arguments `(,@(package-arguments base)
1555 ;; Tests don't work with python2.
1556 #:tests? #f)))))
1557
1558 (define-public scons
1559 (package
1560 (name "scons")
1561 (version "2.3.4")
1562 (source (origin
1563 (method url-fetch)
1564 (uri (string-append "mirror://sourceforge/scons/scons/" version
1565 "/scons-" version ".tar.gz"))
1566 (sha256
1567 (base32
1568 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1569 (build-system python-build-system)
1570 (arguments
1571 ;; With Python 3.x, fails to build with a syntax error.
1572 `(#:python ,python-2
1573 #:use-setuptools? #f ; still relies on distutils
1574 #:tests? #f)) ; no 'python setup.py test' command
1575 (home-page "http://scons.org/")
1576 (synopsis "Software construction tool written in Python")
1577 (description
1578 "SCons is a software construction tool. Think of SCons as an improved,
1579 cross-platform substitute for the classic Make utility with integrated
1580 functionality similar to autoconf/automake and compiler caches such as ccache.
1581 In short, SCons is an easier, more reliable and faster way to build
1582 software.")
1583 (license license:x11)))
1584
1585 (define-public python-extras
1586 (package
1587 (name "python-extras")
1588 (version "0.0.3")
1589 (source
1590 (origin
1591 (method url-fetch)
1592 (uri (string-append
1593 "https://pypi.python.org/packages/source/e/extras/extras-"
1594 version ".tar.gz"))
1595 (sha256
1596 (base32
1597 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1598 (build-system python-build-system)
1599 (arguments
1600 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1601 '(#:tests? #f))
1602 (home-page "https://github.com/testing-cabal/extras")
1603 (synopsis "Useful extensions to the Python standard library")
1604 (description
1605 "Extras is a set of extensions to the Python standard library.")
1606 (license license:expat)))
1607
1608 (define-public python2-extras
1609 (package-with-python2 python-extras))
1610
1611 (define-public python-mimeparse
1612 (package
1613 (name "python-mimeparse")
1614 (version "0.1.4")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (string-append
1619 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1620 version ".tar.gz"))
1621 (sha256
1622 (base32
1623 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1624 (build-system python-build-system)
1625 (arguments
1626 '(#:tests? #f)) ; no setup.py test command
1627 (home-page
1628 "https://github.com/dbtsai/python-mimeparse")
1629 (synopsis "Python library for parsing MIME types")
1630 (description
1631 "Mimeparse provides basic functions for parsing MIME type names and
1632 matching them against a list of media-ranges.")
1633 (license license:expat)))
1634
1635 (define-public python2-mimeparse
1636 (package-with-python2 python-mimeparse))
1637
1638 (define-public python-nose
1639 (package
1640 (name "python-nose")
1641 (version "1.3.7")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "nose" version))
1646 (sha256
1647 (base32
1648 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1649 (build-system python-build-system)
1650 (arguments
1651 '(#:tests? #f)) ; FIXME: test suite fails
1652 (home-page "http://readthedocs.org/docs/nose/")
1653 (synopsis "Python testing library")
1654 (description
1655 "Nose extends the unittest library to make testing easier.")
1656 (license license:lgpl2.0+)))
1657
1658 (define-public python2-nose
1659 (package-with-python2 python-nose))
1660
1661 (define-public python-nose2
1662 (package
1663 (name "python-nose2")
1664 (version "0.6.5")
1665 (source
1666 (origin
1667 (method url-fetch)
1668 (uri (pypi-uri "nose2" version))
1669 (sha256
1670 (base32
1671 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1672 (build-system python-build-system)
1673 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1674 (propagated-inputs
1675 `(("python-cov-core" ,python-cov-core)
1676 ("python-pytest-cov" ,python-pytest-cov)
1677 ("python-six" ,python-six)))
1678 (home-page "https://github.com/nose-devs/nose2")
1679 (synopsis "Next generation of nicer testing for Python")
1680 (description
1681 "Nose2 is the next generation of nicer testing for Python, based on the
1682 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1683 better plugin api, being easier for users to configure, and simplifying internal
1684 interfaces and processes.")
1685 (license license:bsd-2)))
1686
1687 (define-public python2-nose2
1688 (package-with-python2 python-nose2))
1689
1690 (define-public python-unittest2
1691 (package
1692 (name "python-unittest2")
1693 (version "0.5.1")
1694 (source
1695 (origin
1696 (method url-fetch)
1697 (uri (string-append
1698 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1699 version ".tar.gz"))
1700 (sha256
1701 (base32
1702 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1703 (build-system python-build-system)
1704 (home-page "http://pypi.python.org/pypi/unittest2")
1705 (synopsis "Python unit testing library")
1706 (description
1707 "Unittest2 is a replacement for the unittest module in the Python
1708 standard library.")
1709 (license license:psfl)))
1710
1711 (define-public python2-unittest2
1712 (package (inherit python-unittest2)
1713 (name "python2-unittest2")
1714 (version "0.5.1")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1720 version ".tar.gz"))
1721 (sha256
1722 (base32
1723 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1724 (arguments
1725 `(#:python ,python-2
1726 #:tests? #f)))) ; no setup.py test command
1727
1728 (define-public python-pafy
1729 (package
1730 (name "python-pafy")
1731 (version "0.5.2")
1732 (source
1733 (origin
1734 (method url-fetch)
1735 (uri (pypi-uri "pafy" version))
1736 (sha256
1737 (base32
1738 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1739 (build-system python-build-system)
1740 (arguments
1741 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1742 (propagated-inputs
1743 ;; Youtube-dl is a python package which is imported in the file
1744 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1745 `(("youtube-dl" ,youtube-dl)))
1746 (home-page "https://np1.github.io/pafy/")
1747 (synopsis "Retrieve YouTube content and metadata")
1748 (description
1749 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1750 (license license:lgpl3+)))
1751
1752 (define-public python-py
1753 (package
1754 (name "python-py")
1755 (version "1.4.31")
1756 (source
1757 (origin
1758 (method url-fetch)
1759 (uri (pypi-uri "py" version))
1760 (sha256
1761 (base32
1762 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1763 (build-system python-build-system)
1764 (arguments
1765 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1766 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1767 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1768 ;; Is this module globally installed?"
1769 '(#:tests? #f))
1770 (home-page "http://pylib.readthedocs.org/")
1771 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1772 (description
1773 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1774 code introspection, and logging.")
1775 (license license:expat)))
1776
1777 (define-public python2-py
1778 (package-with-python2 python-py))
1779
1780 (define-public python-pytest
1781 (package
1782 (name "python-pytest")
1783 (version "2.7.3")
1784 (source
1785 (origin
1786 (method url-fetch)
1787 (uri (string-append
1788 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1789 version ".tar.gz"))
1790 (sha256
1791 (base32
1792 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1793 (modules '((guix build utils)))
1794 (snippet
1795 ;; One of the tests involves the /usr directory, so it fails.
1796 '(substitute* "testing/test_argcomplete.py"
1797 (("def test_remove_dir_prefix\\(self\\):")
1798 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1799 (build-system python-build-system)
1800 (propagated-inputs
1801 `(("python-py" ,python-py)))
1802 (native-inputs
1803 `(("python-nose" ,python-nose)
1804 ("python-mock" ,python-mock)))
1805 (home-page "http://pytest.org")
1806 (synopsis "Python testing library")
1807 (description
1808 "Pytest is a testing tool that provides auto-discovery of test modules
1809 and functions, detailed info on failing assert statements, modular fixtures,
1810 and many external plugins.")
1811 (license license:expat)))
1812
1813 (define-public python2-pytest
1814 (package-with-python2 python-pytest))
1815
1816 ;; This package is used by Borg until we can upgrade all our Python packages to
1817 ;; use a more recent pytest.
1818 (define-public python-pytest-2.9.2
1819 (package
1820 (inherit python-pytest)
1821 (name "python-pytest")
1822 (version "2.9.2")
1823 (source (origin
1824 (method url-fetch)
1825 (uri (pypi-uri "pytest" version))
1826 (sha256
1827 (base32
1828 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1829 (arguments
1830 `(#:phases
1831 (modify-phases %standard-phases
1832 (add-before 'check 'disable-invalid-test
1833 (lambda _
1834 (substitute* "testing/test_argcomplete.py"
1835 (("def test_remove_dir_prefix" line)
1836 (string-append "@pytest.mark.skip"
1837 "(reason=\"Assumes that /usr exists.\")\n "
1838 line)))
1839 #t)))))))
1840
1841 (define-public python-pytest-cov
1842 (package
1843 (name "python-pytest-cov")
1844 (version "2.2.1")
1845 (source
1846 (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "pytest-cov" version))
1849 (sha256
1850 (base32
1851 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1852 (build-system python-build-system)
1853 (arguments
1854 `(#:phases
1855 (modify-phases %standard-phases
1856 (replace 'check
1857 (lambda _
1858 ;; options taken from tox.ini
1859 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1860 ;; with "Duplicate implicit target name"
1861 (zero? (system* "python" "./setup.py" "check"
1862 "--strict" "--metadata")))))))
1863 (propagated-inputs
1864 `(("python-coverage" ,python-coverage)
1865 ("python-pytest" ,python-pytest)))
1866 (home-page "https://github.com/pytest-dev/pytest-cov")
1867 (synopsis "Pytest plugin for measuring coverage")
1868 (description
1869 "Pytest-cov produces coverage reports. It supports centralised testing and
1870 distributed testing in both @code{load} and @code{each} modes. It also
1871 supports coverage of subprocesses.")
1872 (license license:expat)))
1873
1874 (define-public python2-pytest-cov
1875 (package-with-python2 python-pytest-cov))
1876
1877 (define-public python-pytest-runner
1878 (package
1879 (name "python-pytest-runner")
1880 (version "2.6.2")
1881 (source
1882 (origin
1883 (method url-fetch)
1884 (uri (pypi-uri "pytest-runner" version))
1885 (sha256
1886 (base32
1887 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1888 (build-system python-build-system)
1889 (arguments
1890 `(#:phases
1891 (modify-phases %standard-phases
1892 ;; The fancy way of setting the version with setuptools_scm does not
1893 ;; seem to work here.
1894 (add-after 'unpack 'set-version
1895 (lambda _
1896 (substitute* "docs/conf.py"
1897 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1898 (string-append "version = \"" ,version "\"")))
1899 #t)))))
1900 (native-inputs
1901 `(("python-pytest" ,python-pytest)
1902 ("python-setuptools-scm" ,python-setuptools-scm)))
1903 (home-page "https://github.com/pytest-dev/pytest-runner")
1904 (synopsis "Invoke py.test as a distutils command")
1905 (description
1906 "This package provides a @command{pytest-runner} command that
1907 @file{setup.py} files can use to run tests.")
1908 (license license:expat)))
1909
1910 (define-public python2-pytest-runner
1911 (package-with-python2 python-pytest-runner))
1912
1913 (define-public python-pytest-mock
1914 (package
1915 (name "python-pytest-mock")
1916 (version "1.2")
1917 (source
1918 (origin
1919 (method url-fetch)
1920 (uri (pypi-uri "pytest-mock" version ".zip"))
1921 (sha256
1922 (base32
1923 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1924 (build-system python-build-system)
1925 (native-inputs
1926 `(("unzip" ,unzip)))
1927 (propagated-inputs
1928 `(("python-pytest" ,python-pytest)))
1929 (home-page "https://github.com/pytest-dev/pytest-mock/")
1930 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1931 (description
1932 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1933 around the patching API provided by the @code{mock} package, but with the
1934 benefit of not having to worry about undoing patches at the end of a test.
1935 The mocker fixture has the same API as @code{mock.patch}, supporting the
1936 same arguments.")
1937 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1938 (license license:expat)))
1939
1940 (define-public python2-pytest-mock
1941 (let ((base (package-with-python2
1942 (strip-python2-variant python-pytest-mock))))
1943 (package (inherit base)
1944 (propagated-inputs
1945 `(("python2-mock" ,python2-mock)
1946 ,@(package-propagated-inputs base))))))
1947
1948 (define-public python-pytest-xdist
1949 (package
1950 (name "python-pytest-xdist")
1951 (version "1.14")
1952 (source
1953 (origin
1954 (method url-fetch)
1955 (uri (pypi-uri "pytest-xdist" version ".zip"))
1956 (sha256
1957 (base32
1958 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1959 (modules '((guix build utils)))
1960 (snippet
1961 '(begin
1962 ;; Remove pre-compiled .pyc files from source.
1963 (for-each delete-file-recursively
1964 (find-files "." "__pycache__" #:directories? #t))
1965 (for-each delete-file (find-files "." "\\.pyc$"))
1966 #t))))
1967 (build-system python-build-system)
1968 (arguments
1969 '(#:tests? #f)) ;FIXME: Some tests are failing.
1970 ;; #:phases
1971 ;; (modify-phases %standard-phases
1972 ;; (delete 'check)
1973 ;; (add-after 'install 'check
1974 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1975 ;; (add-installed-pythonpath inputs outputs)
1976 ;; (zero? (system* "py.test" "-v")))))
1977 (native-inputs
1978 `(("unzip" ,unzip)
1979 ("python-setuptools-scm" ,python-setuptools-scm)))
1980 (propagated-inputs
1981 `(("python-execnet" ,python-execnet)
1982 ("python-pytest" ,python-pytest)
1983 ("python-py" ,python-py)))
1984 (home-page
1985 "https://github.com/pytest-dev/pytest-xdist")
1986 (synopsis
1987 "Plugin for py.test with distributed testing and loop-on-failing modes")
1988 (description
1989 "The pytest-xdist plugin extends py.test with some unique test execution
1990 modes: parallelization, running tests in boxed subprocesses, the ability
1991 to run tests repeatedly when failed, and the ability to run tests on multiple
1992 Python interpreters or platforms. It uses rsync to copy the existing
1993 program code to a remote location, executes there, and then syncs the
1994 result back.")
1995 (license license:expat)))
1996
1997 (define-public python2-pytest-xdist
1998 (package-with-python2 python-pytest-xdist))
1999
2000 (define-public python-scripttest
2001 (package
2002 (name "python-scripttest")
2003 (version "1.3")
2004 (source
2005 (origin
2006 (method url-fetch)
2007 (uri (string-append
2008 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2009 version ".tar.gz"))
2010 (sha256
2011 (base32
2012 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2013 (build-system python-build-system)
2014 (native-inputs
2015 `(("python-pytest" ,python-pytest)))
2016 (home-page "http://pythonpaste.org/scripttest/")
2017 (synopsis "Python library to test command-line scripts")
2018 (description "Scripttest is a Python helper library for testing
2019 interactive command-line applications. With it you can run a script in a
2020 subprocess and see the output as well as any file modifications.")
2021 (license license:expat)))
2022
2023 (define-public python2-scripttest
2024 (package-with-python2 python-scripttest))
2025
2026 (define-public python-testtools
2027 (package
2028 (name "python-testtools")
2029 (version "1.4.0")
2030 (source
2031 (origin
2032 (method url-fetch)
2033 (uri (pypi-uri "testtools" version))
2034 (sha256
2035 (base32
2036 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2037 (build-system python-build-system)
2038 (arguments
2039 `(#:phases
2040 (modify-phases %standard-phases
2041 (add-after 'unpack 'fix-module-imports
2042 (lambda _
2043 (substitute* "setup.py"
2044 (("'unittest2>=0.8.0',") ""))
2045 (substitute* '("testtools/testcase.py"
2046 "testtools/testsuite.py"
2047 "testtools/run.py"
2048 "testtools/tests/test_run.py"
2049 "testtools/tests/test_testsuite.py"
2050 "testtools/tests/test_deferredruntest.py")
2051 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2052 (("import unittest2 as unittest") "import unittest")
2053 (("import unittest2") "import unittest as unittest2")
2054 (("from unittest2 import") "from unittest import"))
2055 (substitute* "testtools/tests/test_testresult.py"
2056 ;; NUL in source code is not allowed (raises ValueError).
2057 (("\\x00\\x04") "\\x04"))
2058 #t)))))
2059 (propagated-inputs
2060 `(("python-mimeparse" ,python-mimeparse)
2061 ("python-extras" ,python-extras)))
2062 (home-page "https://github.com/testing-cabal/testtools")
2063 (synopsis
2064 "Extensions to the Python standard library unit testing framework")
2065 (description
2066 "Testtools extends the Python standard library unit testing framework to
2067 provide matchers, more debugging information, and cross-Python
2068 compatibility.")
2069 (license license:psfl)))
2070
2071 (define-public python2-testtools
2072 (package-with-python2 python-testtools))
2073
2074 (define-public python-testscenarios
2075 (package
2076 (name "python-testscenarios")
2077 (version "0.4")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (string-append
2082 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2083 version ".tar.gz"))
2084 (sha256
2085 (base32
2086 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2087 (build-system python-build-system)
2088 (propagated-inputs
2089 `(("python-testtools" ,python-testtools)))
2090 (home-page "https://launchpad.net/testscenarios")
2091 (synopsis "Pyunit extension for dependency injection")
2092 (description
2093 "Testscenarios provides clean dependency injection for Python unittest
2094 style tests.")
2095 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2096
2097 (define-public python2-testscenarios
2098 (package-with-python2 python-testscenarios))
2099
2100 (define-public python-testresources
2101 (package
2102 (name "python-testresources")
2103 (version "0.2.7")
2104 (source
2105 (origin
2106 (method url-fetch)
2107 (uri (string-append
2108 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2109 version ".tar.gz"))
2110 (sha256
2111 (base32
2112 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2113 (build-system python-build-system)
2114 (home-page "https://launchpad.net/testresources")
2115 (synopsis
2116 "Pyunit extension for managing test resources")
2117 (description
2118 "Testresources is an extension to Python's unittest to allow declarative
2119 use of resources by test cases.")
2120 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2121
2122 (define-public python2-testresources
2123 (package-with-python2 python-testresources))
2124
2125 (define-public python-subunit
2126 (package
2127 (name "python-subunit")
2128 (version "0.0.21")
2129 (source
2130 (origin
2131 (method url-fetch)
2132 (uri (string-append
2133 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2134 version ".tar.gz"))
2135 (sha256
2136 (base32
2137 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2138 (build-system python-build-system)
2139 (propagated-inputs
2140 `(("python-extras" ,python-extras)
2141 ("python-mimeparse" ,python-mimeparse)))
2142 (native-inputs
2143 `(("python-testscenarios" ,python-testscenarios)))
2144 (home-page "http://launchpad.net/subunit")
2145 (synopsis "Python implementation of the subunit protocol")
2146 (description
2147 "Python-subunit is a Python implementation of the subunit test streaming
2148 protocol.")
2149 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2150
2151 (define-public python2-subunit
2152 (package-with-python2 python-subunit))
2153
2154 ;; Recent versions of python-fixtures and python-testrepository need
2155 ;; python-pbr for packaging, which itself needs these two packages for
2156 ;; testing.
2157 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2158 ;; same source, just without any test dependencies and with tests disabled.
2159 ;; python-pbr-minmal is then used to package python-fixtures and
2160 ;; python-testrepository.
2161 ;; Strictly speaking we currently could remove the test-requirements from the
2162 ;; normal python-pbr package (and save this package) since test are disabled
2163 ;; there anyway. But this may change in future.
2164 (define python-pbr-minimal
2165 (package
2166 (name "python-pbr-minimal")
2167 (version "1.10.0")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (pypi-uri "pbr" version))
2172 (sha256
2173 (base32
2174 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2175 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2176 (build-system python-build-system)
2177 (arguments
2178 `(#:tests? #f))
2179 (home-page "http://docs.openstack.org/developer/pbr/")
2180 (synopsis "Minimal build of python-pbr used for bootstrapping")
2181 (description
2182 "Used only for bootstrapping python2-pbr, you should not need this.")
2183 (license license:asl2.0)))
2184
2185 (define python2-pbr-minimal
2186 (package-with-python2 python-pbr-minimal))
2187
2188 (define-public python-pbr
2189 (package
2190 (inherit python-pbr-minimal)
2191 (name "python-pbr")
2192 (arguments
2193 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2194 (propagated-inputs
2195 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2196 (native-inputs
2197 `(("python-fixtures" ,python-fixtures)
2198 ;; discover, coverage, hacking, subunit
2199 ("python-mock" ,python-mock)
2200 ("python-six" ,python-six)
2201 ("python-sphinx" ,python-sphinx)
2202 ("python-testrepository" ,python-testrepository)
2203 ("python-testresources" ,python-testresources)
2204 ("python-testscenarios" ,python-testscenarios)
2205 ("python-testtools" ,python-testtools)
2206 ("python-virtualenv" ,python-virtualenv)))
2207 (synopsis "Enhance the default behavior of Python’s setuptools")
2208 (description
2209 "Python Build Reasonableness (PBR) is a library that injects some useful
2210 and sensible default behaviors into your setuptools run. It will set
2211 versions, process requirements files and generate AUTHORS and ChangeLog file
2212 from git information.
2213 ")))
2214
2215 (define-public python2-pbr
2216 (package-with-python2 python-pbr))
2217
2218 (define-public python-fixtures
2219 (package
2220 (name "python-fixtures")
2221 (version "1.4.0")
2222 (source
2223 (origin
2224 (method url-fetch)
2225 (uri (pypi-uri "fixtures" version))
2226 (sha256
2227 (base32
2228 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2229 (build-system python-build-system)
2230 (arguments
2231 '(#:phases
2232 (modify-phases %standard-phases
2233 (replace 'check
2234 (lambda _
2235 (zero? (system* "python" "-m" "testtools.run"
2236 "fixtures.test_suite")))))))
2237 (propagated-inputs
2238 `(("python-six" ,python-six)))
2239 (native-inputs
2240 `(("python-mock" ,python-mock)
2241 ("python-pbr-minimal" ,python-pbr-minimal)
2242 ("python-testtools" ,python-testtools)))
2243 (home-page "https://launchpad.net/python-fixtures")
2244 (synopsis "Python test fixture library")
2245 (description
2246 "Fixtures provides a way to create reusable state, useful when writing
2247 Python tests.")
2248 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2249
2250 (define-public python2-fixtures
2251 (package-with-python2 python-fixtures))
2252
2253 (define-public python-testrepository
2254 (package
2255 (name "python-testrepository")
2256 (version "0.0.20")
2257 (source
2258 (origin
2259 (method url-fetch)
2260 (uri (string-append
2261 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2262 version ".tar.gz"))
2263 (sha256
2264 (base32
2265 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2266 (build-system python-build-system)
2267 (arguments
2268 ;; FIXME: Many tests are failing.
2269 '(#:tests? #f))
2270 (propagated-inputs
2271 `(("python-fixtures" ,python-fixtures)
2272 ("python-subunit" ,python-subunit)
2273 ("python-testtools" ,python-testtools)))
2274 (native-inputs
2275 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2276 ("python-mimeparse" ,python-mimeparse)))
2277 (home-page "https://launchpad.net/testrepository")
2278 (synopsis "Database for Python test results")
2279 (description "Testrepository provides a database of test results which can
2280 be used as part of a developer's workflow to check things such as what tests
2281 have failed since the last commit or what tests are currently failing.")
2282 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2283
2284 (define-public python2-testrepository
2285 (package-with-python2 python-testrepository))
2286
2287 (define-public python-coverage
2288 (package
2289 (name "python-coverage")
2290 (version "4.1")
2291 (source
2292 (origin
2293 (method url-fetch)
2294 (uri (pypi-uri "coverage" version))
2295 (sha256
2296 (base32
2297 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2298 (build-system python-build-system)
2299 (arguments
2300 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2301 '(#:tests? #f))
2302 (home-page "http://nedbatchelder.com/code/coverage")
2303 (synopsis "Code coverage measurement for Python")
2304 (description
2305 "Coverage measures code coverage, typically during test execution. It
2306 uses the code analysis tools and tracing hooks provided in the Python standard
2307 library to determine which lines are executable, and which have been
2308 executed.")
2309 (license license:bsd-3)))
2310
2311 (define-public python2-coverage
2312 (package-with-python2 python-coverage))
2313
2314 (define-public python-cov-core
2315 (package
2316 (name "python-cov-core")
2317 (version "1.15.0")
2318 (source
2319 (origin
2320 (method url-fetch)
2321 (uri (pypi-uri "cov-core" version))
2322 (sha256
2323 (base32
2324 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2325 (build-system python-build-system)
2326 (propagated-inputs
2327 `(("python-coverage" ,python-coverage)))
2328 (home-page "https://github.com/schlamar/cov-core")
2329 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2330 (description
2331 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2332 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2333 testing frameworks.")
2334 (license license:expat)))
2335
2336 (define-public python2-cov-core
2337 (package-with-python2 python-cov-core))
2338
2339 (define-public python-discover
2340 (package
2341 (name "python-discover")
2342 (version "0.4.0")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/d/discover/discover-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2352 (build-system python-build-system)
2353 (home-page "http://pypi.python.org/pypi/discover/")
2354 (synopsis
2355 "Python test discovery for unittest")
2356 (description
2357 "Discover provides test discovery for unittest, a feature that has been
2358 backported from Python 2.7 for Python 2.4+.")
2359 (license license:bsd-3)))
2360
2361 (define-public python2-discover
2362 (package-with-python2 python-discover))
2363
2364 (define-public behave
2365 (package
2366 (name "behave")
2367 (version "1.2.5")
2368 (source (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "behave" version ".tar.bz2"))
2371 (sha256
2372 (base32
2373 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2374 (build-system python-build-system)
2375 (propagated-inputs
2376 `(("python-six" ,python-six)
2377 ("python-parse" ,python-parse)
2378 ("python-parse-type" ,python-parse-type)))
2379 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2380 ;PyHamcrest>=1.8
2381 (home-page "http://github.com/behave/behave")
2382 (synopsis "Python behavior-driven development")
2383 (description
2384 "Behave is a tool for behavior-driven development in python.
2385 Behavior-driven development (or BDD) is an agile software development
2386 technique that encourages collaboration between developers, QA and
2387 non-technical or business participants in a software project. Behave uses
2388 tests written in a natural language style, backed up by Python code.")
2389 (license license:x11)))
2390
2391 (define-public python-exif-read
2392 (package
2393 (name "python-exif-read")
2394 (version "2.1.2")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "ExifRead" version))
2398 (sha256
2399 (base32
2400 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2401 (build-system python-build-system)
2402 (arguments `(#:tests? #f)) ; no tests
2403 (home-page "https://github.com/ianare/exif-py")
2404 (synopsis "Python library to extract EXIF data from image files")
2405 (description
2406 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2407 files.")
2408 (license license:bsd-3)))
2409
2410 (define-public python2-exif-read
2411 (package-with-python2 python-exif-read))
2412
2413 (define-public python-pyld
2414 (package
2415 (name "python-pyld")
2416 (version "0.7.1")
2417 (source (origin
2418 (method url-fetch)
2419 (uri (pypi-uri "PyLD" version))
2420 (sha256
2421 (base32
2422 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2423 (build-system python-build-system)
2424 (arguments `(#:tests? #f)) ; no tests
2425 (home-page "http://github.com/digitalbazaar/pyld")
2426 (synopsis "Python implementation of the JSON-LD specification")
2427 (description
2428 "PyLD is an implementation of the JSON-LD specification.")
2429 (license license:bsd-3)))
2430
2431 (define-public python2-pyld
2432 (package-with-python2 python-pyld))
2433
2434 (define-public python-certifi
2435 (package
2436 (name "python-certifi")
2437 (version "2017.1.23")
2438 (source (origin
2439 (method url-fetch)
2440 (uri (pypi-uri "certifi" version))
2441 (sha256
2442 (base32
2443 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2444 (build-system python-build-system)
2445 (home-page "https://certifi.io/")
2446 (synopsis "Python CA certificate bundle")
2447 (description
2448 "Certifi is a Python library that contains a CA certificate bundle, which
2449 is used by the Requests library to verify HTTPS requests.")
2450 (license license:asl2.0)))
2451
2452 (define-public python2-certifi
2453 (package-with-python2 python-certifi))
2454
2455 (define-public python-click
2456 (package
2457 (name "python-click")
2458 (version "6.7")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "click" version))
2463 (sha256
2464 (base32
2465 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2466 (build-system python-build-system)
2467 (arguments
2468 `(#:phases
2469 (modify-phases %standard-phases
2470 (add-after 'unpack 'fix-paths
2471 (lambda* (#:key inputs #:allow-other-keys)
2472 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2473 "cross-libc" "libc"))))
2474 (substitute* "click/_unicodefun.py"
2475 (("'locale'")
2476 (string-append "'" glibc "/bin/locale'"))))
2477 #t))
2478 (replace 'check
2479 (lambda _
2480 (zero? (system* "make" "test")))))))
2481 (native-inputs
2482 `(("python-pytest" ,python-pytest)))
2483 (home-page "http://click.pocoo.org")
2484 (synopsis "Command line library for Python")
2485 (description
2486 "Click is a Python package for creating command line interfaces in a
2487 composable way with as little code as necessary. Its name stands for
2488 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2489 with sensible defaults out of the box.")
2490 (license license:bsd-3)))
2491
2492 (define-public python2-click
2493 (package-with-python2 python-click))
2494
2495 (define-public python-wheel
2496 (package
2497 (name "python-wheel")
2498 (version "0.30.0a0")
2499 (source
2500 (origin
2501 (method url-fetch)
2502 (uri (pypi-uri "wheel" version))
2503 (sha256
2504 (base32
2505 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2506 (build-system python-build-system)
2507 (native-inputs
2508 `(("python-jsonschema" ,python-jsonschema)
2509 ("python-pytest-cov" ,python-pytest-cov)))
2510 (home-page "https://bitbucket.org/pypa/wheel/")
2511 (synopsis "Format for built Python packages")
2512 (description
2513 "A wheel is a ZIP-format archive with a specially formatted filename and
2514 the @code{.whl} extension. It is designed to contain all the files for a PEP
2515 376 compatible install in a way that is very close to the on-disk format. Many
2516 packages will be properly installed with only the @code{Unpack} step and the
2517 unpacked archive preserves enough information to @code{Spread} (copy data and
2518 scripts to their final locations) at any later time. Wheel files can be
2519 installed with a newer @code{pip} or with wheel's own command line utility.")
2520 (license license:expat)
2521 (properties `((python2-variant . ,(delay python2-wheel))))))
2522
2523 (define-public python2-wheel
2524 (let ((wheel (package-with-python2
2525 (strip-python2-variant python-wheel))))
2526 (package (inherit wheel)
2527 (native-inputs `(("python2-functools32" ,python2-functools32)
2528 ,@(package-native-inputs wheel))))))
2529
2530
2531 (define-public python-requests
2532 (package
2533 (name "python-requests")
2534 (version "2.13.0")
2535 (source (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "requests" version))
2538 (sha256
2539 (base32
2540 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2541 ;; TODO: unbundle urllib3 and chardet.
2542 (build-system python-build-system)
2543 (arguments
2544 ;; FIXME: Some tests require network access.
2545 '(#:tests? #f))
2546 (home-page "http://python-requests.org/")
2547 (synopsis "Python HTTP library")
2548 (description
2549 "Requests is a Python HTTP client library. It aims to be easier to use
2550 than Python’s urllib2 library.")
2551 (license license:asl2.0)))
2552
2553 ;; Some software requires an older version of Requests, notably Docker
2554 ;; Compose.
2555 (define-public python-requests-2.7
2556 (package (inherit python-requests)
2557 (version "2.7.0")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "requests" version))
2561 (sha256
2562 (base32
2563 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2564
2565 (define-public python2-requests
2566 (package-with-python2 python-requests))
2567
2568 (define-public python-vcversioner
2569 (package
2570 (name "python-vcversioner")
2571 (version "2.16.0.0")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (pypi-uri "vcversioner" version))
2576 (sha256
2577 (base32
2578 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2579 (build-system python-build-system)
2580 (synopsis "Python library for version number discovery")
2581 (description "Vcversioner is a Python library that inspects tagging
2582 information in a variety of version control systems in order to discover
2583 version numbers.")
2584 (home-page "https://github.com/habnabit/vcversioner")
2585 (license license:isc)))
2586
2587 (define-public python2-vcversioner
2588 (package-with-python2 python-vcversioner))
2589
2590 (define-public python-jsonschema
2591 (package
2592 (name "python-jsonschema")
2593 (version "2.5.1")
2594 (source (origin
2595 (method url-fetch)
2596 (uri
2597 (string-append
2598 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2599 version ".tar.gz"))
2600 (sha256
2601 (base32
2602 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2603 (build-system python-build-system)
2604 (arguments
2605 '(#:phases
2606 (modify-phases %standard-phases
2607 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2608 (native-inputs
2609 `(("python-nose" ,python-nose)
2610 ("python-vcversioner" ,python-vcversioner)))
2611 (home-page "https://github.com/Julian/jsonschema")
2612 (synopsis "Implementation of JSON Schema for Python")
2613 (description
2614 "Jsonschema is an implementation of JSON Schema for Python.")
2615 (license license:expat)
2616 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2617
2618 (define-public python2-jsonschema
2619 (let ((jsonschema (package-with-python2
2620 (strip-python2-variant python-jsonschema))))
2621 (package (inherit jsonschema)
2622 (native-inputs
2623 `(("python2-mock" ,python2-mock)
2624 ,@(package-native-inputs jsonschema)))
2625 (propagated-inputs
2626 `(("python2-functools32" ,python2-functools32))))))
2627
2628 (define-public python-kitchen
2629 (package
2630 (name "python-kitchen")
2631 (version "1.2.4")
2632 (source
2633 (origin
2634 (method url-fetch)
2635 (uri (pypi-uri "kitchen" version))
2636 (sha256
2637 (base32
2638 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2639 (build-system python-build-system)
2640 (propagated-inputs
2641 `(("python-chardet" ,python-chardet)))
2642 (home-page "https://fedorahosted.org/kitchen")
2643 (synopsis "Python API for snippets")
2644 (description "@code{kitchen} module provides a python API for all sorts of
2645 little useful snippets of code that everybody ends up writing for their projects
2646 but never seem big enough to build an independent release. Use kitchen and stop
2647 cutting and pasting that code over and over.")
2648 (license (list license:lgpl2.1+
2649 ;; subprocess.py, test_subprocess.py,
2650 ;; kitchen/pycompat25/defaultdict.py:
2651 license:psfl))))
2652
2653 (define-public python2-kitchen
2654 (package-with-python2 python-kitchen))
2655
2656 (define-public python-unidecode
2657 (package
2658 (name "python-unidecode")
2659 (version "0.04.20")
2660 (source (origin
2661 (method url-fetch)
2662 (uri (pypi-uri "Unidecode" version))
2663 (sha256
2664 (base32
2665 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2666 (build-system python-build-system)
2667 (home-page "https://pypi.python.org/pypi/Unidecode")
2668 (synopsis "ASCII transliterations of Unicode text")
2669 (description
2670 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2671 useful when integrating with legacy code that doesn't support Unicode, or for
2672 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2673 machine identifiers from human-readable Unicode strings that should still be
2674 somewhat intelligeble.")
2675 (license license:gpl2+)))
2676
2677 (define-public python2-unidecode
2678 (package-with-python2 python-unidecode))
2679
2680 (define-public python-pyjwt
2681 (package
2682 (name "python-pyjwt")
2683 (version "1.4.0")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "PyJWT" version))
2688 (sha256
2689 (base32
2690 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2691 (build-system python-build-system)
2692 (native-inputs
2693 `(("python-pytest" ,python-pytest)
2694 ("python-pytest-cov" ,python-pytest-cov)
2695 ("python-pytest-runner" ,python-pytest-runner)))
2696 (home-page "http://github.com/progrium/pyjwt")
2697 (synopsis "JSON Web Token implementation in Python")
2698 (description
2699 "PyJWT is a JSON Web Token implementation written in Python.")
2700 (license license:expat)))
2701
2702 (define-public python2-pyjwt
2703 (package-with-python2 python-pyjwt))
2704
2705 (define-public python-pykka
2706 (package
2707 (name "python-pykka")
2708 (version "1.2.1")
2709 (source
2710 (origin
2711 (method url-fetch)
2712 (uri (pypi-uri "Pykka" version))
2713 (sha256
2714 (base32
2715 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2716 (build-system python-build-system)
2717 (native-inputs
2718 `(("python-mock" ,python-mock)
2719 ("python-nose" ,python-nose)
2720 ("python-gevent" ,python-gevent)
2721 ("python-eventlet" ,python-eventlet)))
2722 (home-page "https://www.pykka.org/")
2723 (synopsis "Pykka is a Python implementation of the actor model")
2724 (description
2725 "Pykka is a Python implementation of the actor model.
2726 The actor model introduces some simple rules to control the sharing
2727 of state and cooperation between execution units, which makes it
2728 easier to build concurrent applications.")
2729 (license license:asl2.0)))
2730
2731 (define-public python2-pykka
2732 (package-with-python2 python-pykka))
2733
2734 (define-public python-oauthlib
2735 (package
2736 (name "python-oauthlib")
2737 (version "1.0.3")
2738 (source (origin
2739 (method url-fetch)
2740 (uri (pypi-uri "oauthlib" version))
2741 (sha256
2742 (base32
2743 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2744 (build-system python-build-system)
2745 (native-inputs
2746 `(("python-nose" ,python-nose)
2747 ("python-mock" ,python-mock)
2748 ("python-cryptography" ,python-cryptography)
2749 ("python-pyjwt" ,python-pyjwt)
2750 ("python-blinker" ,python-blinker)))
2751 (home-page "https://github.com/idan/oauthlib")
2752 (synopsis "OAuth implementation for Python")
2753 (description
2754 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2755 OAuth request-signing logic.")
2756 (license license:bsd-3)
2757 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2758
2759 (define-public python2-oauthlib
2760 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2761 (package
2762 (inherit base)
2763 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2764 ,@(package-native-inputs base))))))
2765
2766 (define-public python-itsdangerous
2767 (package
2768 (name "python-itsdangerous")
2769 (version "0.24")
2770 (source
2771 (origin
2772 (method url-fetch)
2773 (uri (string-append
2774 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2775 version ".tar.gz"))
2776 (sha256
2777 (base32
2778 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2779 (build-system python-build-system)
2780 (home-page "http://github.com/mitsuhiko/itsdangerous")
2781 (synopsis "Python library for passing data to/from untrusted environments")
2782 (description
2783 "Itsdangerous provides various helpers to pass trusted data to untrusted
2784 environments and back.")
2785 (license license:bsd-3)))
2786
2787 (define-public python2-itsdangerous
2788 (package-with-python2 python-itsdangerous))
2789
2790 (define-public python-pyyaml
2791 (package
2792 (name "python-pyyaml")
2793 (version "3.12")
2794 (source
2795 (origin
2796 (method url-fetch)
2797 (uri (pypi-uri "PyYAML" version))
2798 (sha256
2799 (base32
2800 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2801 (build-system python-build-system)
2802 (inputs
2803 `(("libyaml" ,libyaml)))
2804 (home-page "http://pyyaml.org/wiki/PyYAML")
2805 (synopsis "YAML parser and emitter for Python")
2806 (description
2807 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2808 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2809 API, and sensible error messages. PyYAML supports standard YAML tags and
2810 provides Python-specific tags that allow to represent an arbitrary Python
2811 object.")
2812 (license license:expat)))
2813
2814 (define-public python2-pyyaml
2815 (package-with-python2 python-pyyaml))
2816
2817 (define-public python-virtualenv
2818 (package
2819 (name "python-virtualenv")
2820 (version "15.0.3")
2821 (source
2822 (origin
2823 (method url-fetch)
2824 (uri (pypi-uri "virtualenv" version))
2825 (sha256
2826 (base32
2827 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2828 (build-system python-build-system)
2829 (arguments
2830 `(#:phases
2831 (modify-phases %standard-phases
2832 (replace 'check
2833 (lambda _
2834 ;; Disable failing test. See upstream bug report
2835 ;; https://github.com/pypa/virtualenv/issues/957
2836 (substitute* "tests/test_virtualenv.py"
2837 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2838 (zero? (system* "py.test")))))))
2839 (native-inputs
2840 `(("python-mock" ,python-mock)
2841 ("python-pytest" ,python-pytest)))
2842 (home-page "https://virtualenv.pypa.io/")
2843 (synopsis "Virtual Python environment builder")
2844 (description
2845 "Virtualenv is a tool to create isolated Python environments.")
2846 (license license:expat)))
2847
2848 (define-public python2-virtualenv
2849 (package-with-python2 python-virtualenv))
2850
2851 (define-public python-markupsafe
2852 (package
2853 (name "python-markupsafe")
2854 (version "0.23")
2855 (source
2856 (origin
2857 (method url-fetch)
2858 (uri (string-append
2859 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2860 version ".tar.gz"))
2861 (sha256
2862 (base32
2863 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2864 (build-system python-build-system)
2865 (home-page "http://github.com/mitsuhiko/markupsafe")
2866 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2867 (description
2868 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2869 for Python.")
2870 (license license:bsd-3)))
2871
2872 (define-public python2-markupsafe
2873 (package-with-python2 python-markupsafe))
2874
2875 (define-public python-jinja2
2876 (package
2877 (name "python-jinja2")
2878 (version "2.8")
2879 (source
2880 (origin
2881 (method url-fetch)
2882 (uri (pypi-uri "Jinja2" version))
2883 (sha256
2884 (base32
2885 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2886 (build-system python-build-system)
2887 (propagated-inputs
2888 `(("python-markupsafe" ,python-markupsafe)))
2889 (home-page "http://jinja.pocoo.org/")
2890 (synopsis "Python template engine")
2891 (description
2892 "Jinja2 is a small but fast and easy to use stand-alone template engine
2893 written in pure Python.")
2894 (license license:bsd-3)))
2895
2896 (define-public python2-jinja2
2897 (package-with-python2 python-jinja2))
2898
2899 (define-public python-pystache
2900 (package
2901 (name "python-pystache")
2902 (version "0.5.4")
2903 (source (origin
2904 (method url-fetch)
2905 (uri (pypi-uri "pystache" version))
2906 (sha256
2907 (base32
2908 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2909 (build-system python-build-system)
2910 (arguments
2911 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2912 (home-page "http://defunkt.io/pystache/")
2913 (synopsis "Python logic-less template engine")
2914 (description
2915 "Pystache is a Python implementation of the framework agnostic,
2916 logic-free templating system Mustache.")
2917 (license license:expat)
2918 (properties `((python2-variant . ,(delay python2-pystache))))))
2919
2920 (define-public python2-pystache
2921 (package (inherit (package-with-python2
2922 (strip-python2-variant python-pystache)))
2923 (arguments
2924 `(#:python ,python-2
2925 #:phases
2926 (modify-phases %standard-phases
2927 (replace 'check
2928 (lambda _
2929 (zero? (system* "python" "test_pystache.py")))))))))
2930
2931 (define-public python-joblib
2932 (package
2933 (name "python-joblib")
2934 (version "0.10.3")
2935 (source (origin
2936 (method url-fetch)
2937 (uri (pypi-uri "joblib" version))
2938 (sha256
2939 (base32
2940 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2941 (modules '((guix build utils)))
2942 (snippet
2943 '(begin
2944 ;; Remove pre-compiled .pyc files from source.
2945 (for-each delete-file-recursively
2946 (find-files "." "__pycache__" #:directories? #t))
2947 (for-each delete-file (find-files "." "\\.pyc$"))
2948 #t))))
2949 (build-system python-build-system)
2950 (arguments
2951 `(#:phases
2952 (modify-phases %standard-phases
2953 (add-before 'check 'disable-failing-tests
2954 (lambda _
2955 ;; This numpydoc tests fails for unknown reasons
2956 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2957 ;; This numpydoc test depends on matplotlib, which is not a
2958 ;; required input.
2959 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2960 ;; These tests fail to execute sys.executable
2961 (substitute* "joblib/test/test_parallel.py"
2962 (("import nose" line)
2963 (string-append "from nose.plugins.skip import SkipTest\n" line))
2964 (("def test_nested_parallel_warnings" line)
2965 (string-append "@SkipTest\n" line))
2966 (("def test_parallel_with_interactively_defined_functions" line)
2967 (string-append "@SkipTest\n" line)))
2968 #t)))))
2969 ;; Provide nose to enable tests command
2970 (native-inputs
2971 `(("python-nose" ,python-nose)
2972 ("python-sphinx" ,python-sphinx)
2973 ("python-docutils" ,python-docutils)
2974 ("python-numpydoc" ,python-numpydoc)))
2975 (home-page "http://pythonhosted.org/joblib/")
2976 (synopsis "Using Python functions as pipeline jobs")
2977 (description
2978 "Joblib is a set of tools to provide lightweight pipelining in Python.
2979 In particular, joblib offers: transparent disk-caching of the output values
2980 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2981 logging and tracing of the execution.")
2982 (license license:bsd-3)))
2983
2984 (define-public python2-joblib
2985 (package-with-python2 python-joblib))
2986
2987 (define-public python-docutils
2988 (package
2989 (name "python-docutils")
2990 (version "0.13.1")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "docutils" version))
2995 (sha256
2996 (base32
2997 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2998 (build-system python-build-system)
2999 (arguments
3000 '(#:tests? #f)) ; no setup.py test command
3001 (home-page "http://docutils.sourceforge.net/")
3002 (synopsis "Python Documentation Utilities")
3003 (description
3004 "Docutils is a modular system for processing documentation into useful
3005 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3006 reStructuredText.")
3007 ;; Most of the source code is public domain, but some source files are
3008 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3009 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3010
3011 (define-public python2-docutils
3012 (package-with-python2 python-docutils))
3013
3014 (define-public python-pygments
3015 (package
3016 (name "python-pygments")
3017 (version "2.1.3")
3018 (source
3019 (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "Pygments" version))
3022 (sha256
3023 (base32
3024 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3025 (build-system python-build-system)
3026 (arguments
3027 ;; FIXME: Tests require sphinx, which depends on this.
3028 '(#:tests? #f))
3029 (home-page "http://pygments.org/")
3030 (synopsis "Syntax highlighting")
3031 (description
3032 "Pygments is a syntax highlighting package written in Python.")
3033 (license license:bsd-2)))
3034
3035 (define-public python2-pygments
3036 (package-with-python2 python-pygments))
3037
3038 (define-public python-sphinx
3039 (package
3040 (name "python-sphinx")
3041 (version "1.5.1")
3042 (source
3043 (origin
3044 (method url-fetch)
3045 (uri (pypi-uri "Sphinx" version))
3046 (sha256
3047 (base32
3048 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3049 (build-system python-build-system)
3050 (arguments
3051 `(#:phases
3052 (modify-phases %standard-phases
3053 (replace 'check
3054 (lambda _
3055 ;; Requires Internet access.
3056 (delete-file "tests/test_build_linkcheck.py")
3057 (zero? (system* "make" "test")))))))
3058 (propagated-inputs
3059 `(("python-imagesize" ,python-imagesize)
3060 ("python-sphinx-alabaster-theme"
3061 ,python-sphinx-alabaster-theme)
3062 ("python-babel" ,python-babel)
3063 ("python-snowballstemmer" ,python-snowballstemmer)
3064 ("python-docutils" ,python-docutils)
3065 ("python-jinja2" ,python-jinja2)
3066 ("python-pygments" ,python-pygments)
3067 ("python-requests" ,python-requests)
3068 ("python-six" ,python-six)))
3069 (native-inputs
3070 `(("graphviz" ,graphviz)
3071 ("python-html5lib" ,python-html5lib)
3072 ("python-mock" ,python-mock)
3073 ("python-nose" ,python-nose)))
3074 (home-page "http://sphinx-doc.org/")
3075 (synopsis "Python documentation generator")
3076 (description "Sphinx is a tool that makes it easy to create documentation
3077 for Python projects or other documents consisting of multiple reStructuredText
3078 sources.")
3079 (license license:bsd-3)
3080 (properties `((python2-variant . ,(delay python2-sphinx))))))
3081
3082 (define-public python2-sphinx
3083 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3084 (package
3085 (inherit base)
3086 (native-inputs `(("python2-mock" ,python2-mock)
3087 ("python2-enum34" ,python2-enum34)
3088 ,@(package-native-inputs base)))
3089 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3090 ,@(package-propagated-inputs base))))))
3091
3092 (define-public python-sphinx-rtd-theme
3093 (package
3094 (name "python-sphinx-rtd-theme")
3095 (version "0.1.6")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (string-append "https://pypi.python.org/packages/source/s/"
3100 "sphinx_rtd_theme/sphinx_rtd_theme-"
3101 version ".tar.gz"))
3102 (sha256
3103 (base32
3104 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3105 (build-system python-build-system)
3106 (arguments '(#:tests? #f)) ; No tests.
3107 (propagated-inputs
3108 `(("python-sphinx" ,python-sphinx)))
3109 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3110 (synopsis "ReadTheDocs.org theme for Sphinx")
3111 (description "A theme for Sphinx used by ReadTheDocs.org.")
3112 (license license:expat)))
3113
3114 (define-public python2-sphinx-rtd-theme
3115 (package-with-python2 python-sphinx-rtd-theme))
3116
3117 (define-public python-rst.linker
3118 (package
3119 (name "python-rst.linker")
3120 (version "1.7")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (pypi-uri "rst.linker" version))
3125 (sha256
3126 (base32
3127 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3128 (build-system python-build-system)
3129 (propagated-inputs
3130 `(("python-dateutil" ,python-dateutil)
3131 ("python-six" ,python-six)))
3132 (native-inputs
3133 `(("python-setuptools-scm" ,python-setuptools-scm)))
3134 ;; Test would require path.py, which would introduce a cyclic dependence.
3135 (arguments `(#:tests? #f))
3136 ;; Note: As of version 1.7 the documentation is not worth building.
3137 (home-page "https://github.com/jaraco/rst.linker")
3138 (synopsis "Sphinx plugin to add links and timestamps")
3139 (description "rst.linker allows to automatically replace text by a
3140 reStructuredText external reference or timestamps. It's primary purpose is to
3141 augment the changelog, but it can be used for other documents, too.")
3142 (license license:expat)))
3143
3144 (define-public python2-rst.linker
3145 (package-with-python2 python-rst.linker))
3146
3147 (define-public python-feedgenerator
3148 (package
3149 (name "python-feedgenerator")
3150 (version "1.8")
3151 (source
3152 (origin
3153 (method url-fetch)
3154 (uri (pypi-uri "feedgenerator" version))
3155 (sha256
3156 (base32
3157 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3158 (modules '((guix build utils)))
3159 (snippet
3160 '(begin
3161 ;; Remove pre-compiled .pyc files from source.
3162 (for-each delete-file-recursively
3163 (find-files "." "__pycache__" #:directories? #t))
3164 (for-each delete-file (find-files "." "\\.pyc$"))
3165 #t))))
3166 (build-system python-build-system)
3167 (propagated-inputs
3168 `(("python-pytz" ,python-pytz)
3169 ("python-six" ,python-six)))
3170 (home-page "https://github.com/getpelican/feedgenerator")
3171 (synopsis
3172 "Standalone version of Django's Atom/RSS feed generator")
3173 (description
3174 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3175 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3176 (license license:bsd-3)))
3177
3178 (define-public python2-feedgenerator
3179 (package-with-python2 python-feedgenerator))
3180
3181 (define-public python-blinker
3182 (package
3183 (name "python-blinker")
3184 (version "1.4")
3185 (source
3186 (origin
3187 (method url-fetch)
3188 (uri (pypi-uri "blinker" version))
3189 (sha256
3190 (base32
3191 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3192 (build-system python-build-system)
3193 (home-page "http://pythonhosted.org/blinker/")
3194 (synopsis "Fast, simple object-to-object and broadcast signaling")
3195 (description
3196 "Blinker provides a fast dispatching system that allows any number of
3197 interested parties to subscribe to events, or \"signals\".")
3198 (license license:expat)))
3199
3200 (define-public python2-blinker
3201 (package-with-python2 python-blinker))
3202
3203 (define-public pelican
3204 (package
3205 (name "pelican")
3206 (version "3.6.3")
3207 (source
3208 (origin
3209 (method url-fetch)
3210 (uri (pypi-uri "pelican" version))
3211 (sha256
3212 (base32
3213 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3214 (build-system python-build-system)
3215 (propagated-inputs
3216 `(("python-feedgenerator" ,python-feedgenerator)
3217 ("python-jinja2" ,python-jinja2)
3218 ("python-pygments" ,python-pygments)
3219 ("python-docutils" ,python-docutils)
3220 ("python-pytz" ,python-pytz)
3221 ("python-blinker" ,python-blinker)
3222 ("python-unidecode" ,python-unidecode)
3223 ("python-six" ,python-six)
3224 ("python-dateutil" ,python-dateutil)))
3225 (home-page "http://getpelican.com/")
3226 (arguments
3227 `(;; XXX Requires a lot more packages to do unit tests :P
3228 #:tests? #f
3229 #:phases (modify-phases %standard-phases
3230 (add-before
3231 'install 'adjust-requires
3232 ;; Since feedgenerator is installed from git, it doesn't
3233 ;; conform to the version requirements.
3234 ;;
3235 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3236 ;; version requirement so setuptools doesn't get confused.
3237 (lambda _
3238 (substitute* "setup.py"
3239 (("['\"]feedgenerator.*?['\"]")
3240 "'feedgenerator'")))))))
3241 (synopsis "Python-based static site publishing system")
3242 (description
3243 "Pelican is a tool to generate a static blog from reStructuredText,
3244 Markdown input files, and more. Pelican uses Jinja2 for templating
3245 and is very extensible.")
3246 (license license:agpl3+)))
3247
3248 (define-public python-scikit-learn
3249 (package
3250 (name "python-scikit-learn")
3251 (version "0.18.1")
3252 (source
3253 (origin
3254 (method url-fetch)
3255 (uri (string-append
3256 "https://github.com/scikit-learn/scikit-learn/archive/"
3257 version ".tar.gz"))
3258 (file-name (string-append name "-" version ".tar.gz"))
3259 (sha256
3260 (base32
3261 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3262 (build-system python-build-system)
3263 (arguments
3264 `(#:phases
3265 (modify-phases %standard-phases
3266 (delete 'check)
3267 (add-after 'install 'check
3268 ;; Running tests from the source directory requires
3269 ;; an "inplace" build with paths relative to CWD.
3270 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3271 ;; Use the installed version instead.
3272 (lambda* (#:key inputs outputs #:allow-other-keys)
3273 (add-installed-pythonpath inputs outputs)
3274 ;; some tests require access to "$HOME"
3275 (setenv "HOME" "/tmp")
3276 ;; Step out of the source directory just to be sure.
3277 (chdir "..")
3278 (zero? (system* "nosetests" "-v" "sklearn")))))))
3279 (inputs
3280 `(("openblas" ,openblas)))
3281 (native-inputs
3282 `(("python-nose" ,python-nose)
3283 ("python-cython" ,python-cython)))
3284 (propagated-inputs
3285 `(("python-numpy" ,python-numpy)
3286 ("python-scipy" ,python-scipy)))
3287 (home-page "http://scikit-learn.org/")
3288 (synopsis "Machine Learning in Python")
3289 (description
3290 "Scikit-learn provides simple and efficient tools for data
3291 mining and data analysis.")
3292 (license license:bsd-3)))
3293
3294 (define-public python2-scikit-learn
3295 (package-with-python2 python-scikit-learn))
3296
3297 (define-public python-scikit-image
3298 (package
3299 (name "python-scikit-image")
3300 (version "0.11.3")
3301 (source
3302 (origin
3303 (method url-fetch)
3304 (uri (string-append
3305 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3306 version ".tar.gz"))
3307 (sha256
3308 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3309 (build-system python-build-system)
3310 (arguments
3311 ;; TODO: Some tests require running X11 server. Disable them?
3312 '(#:tests? #f))
3313 ;; See DEPENDS.txt for the list of build and run time requiremnts
3314 (propagated-inputs
3315 `(("python-matplotlib" ,python-matplotlib)
3316 ("python-networkx" ,python-networkx)
3317 ("python-scipy" ,python-scipy)
3318 ("python-pillow" ,python-pillow)))
3319 (native-inputs
3320 `(("python-numpy" ,python-numpy)
3321 ("python-cython" ,python-cython)
3322 ("python-six" ,python-six)))
3323 (home-page "http://scikit-image.org/")
3324 (synopsis "Image processing in Python")
3325 (description
3326 "Scikit-image is a collection of algorithms for image processing.")
3327 (license license:bsd-3)))
3328
3329 (define-public python2-scikit-image
3330 (package-with-python2 python-scikit-image))
3331
3332 (define-public python-redis
3333 (package
3334 (name "python-redis")
3335 (version "2.10.5")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (pypi-uri "redis" version))
3340 (sha256
3341 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3342 (build-system python-build-system)
3343 ;; Tests require a running Redis server
3344 (arguments '(#:tests? #f))
3345 ;; As long as we are not running test, we do not need this input :-)
3346 ;;(native-inputs
3347 ;; `(("python-pytest" ,python-pytest)))
3348 (home-page "https://github.com/andymccurdy/redis-py")
3349 (synopsis "Redis Python client")
3350 (description
3351 "This package provides a Python interface to the Redis key-value store.")
3352 (license license:expat)))
3353
3354 (define-public python2-redis
3355 (package-with-python2 python-redis))
3356
3357 (define-public python-rq
3358 (package
3359 (name "python-rq")
3360 (version "0.5.2")
3361 (source
3362 (origin
3363 (method url-fetch)
3364 (uri (string-append
3365 "https://pypi.python.org/packages/source/r/rq/rq-"
3366 version ".tar.gz"))
3367 (sha256
3368 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3369 (build-system python-build-system)
3370 (propagated-inputs
3371 `(("python-click" ,python-click)
3372 ("python-redis" ,python-redis)))
3373 (home-page "http://python-rq.org/")
3374 (synopsis "Simple job queues for Python")
3375 (description
3376 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3377 processing them in the background with workers. It is backed by Redis and it
3378 is designed to have a low barrier to entry.")
3379 (license license:bsd-2)))
3380
3381 (define-public python2-rq
3382 (package-with-python2 python-rq))
3383
3384 (define-public python-cython
3385 (package
3386 (name "python-cython")
3387 (version "0.24.1")
3388 (source
3389 (origin
3390 (method url-fetch)
3391 (uri (pypi-uri "Cython" version))
3392 (sha256
3393 (base32
3394 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3395 (build-system python-build-system)
3396 ;; we need the full python package and not just the python-wrapper
3397 ;; because we need libpython3.3m.so
3398 (inputs
3399 `(("python" ,python)))
3400 (arguments
3401 `(#:phases
3402 (modify-phases %standard-phases
3403 (add-before 'check 'set-HOME
3404 ;; some tests require access to "$HOME/.cython"
3405 (lambda _ (setenv "HOME" "/tmp")))
3406 (replace 'check
3407 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3408 (home-page "http://cython.org/")
3409 (synopsis "C extensions for Python")
3410 (description "Cython is an optimising static compiler for both the Python
3411 programming language and the extended Cython programming language. It makes
3412 writing C extensions for Python as easy as Python itself.")
3413 (license license:asl2.0)
3414 (properties `((python2-variant . ,(delay python2-cython))))))
3415
3416 (define-public python2-cython
3417 (package (inherit (package-with-python2
3418 (strip-python2-variant python-cython)))
3419 (name "python2-cython")
3420 (inputs
3421 `(("python-2" ,python-2))))) ; this is not automatically changed
3422
3423 ;; The RPython toolchain currently does not support Python 3.
3424 (define-public python2-rpython
3425 (package
3426 (name "python2-rpython")
3427 (version "0.1.4")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "rpython" version))
3432 (sha256
3433 (base32
3434 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3435 (build-system python-build-system)
3436 (arguments `(#:python ,python-2))
3437 (native-inputs
3438 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3439 (home-page "https://rpython.readthedocs.org")
3440 (synopsis "Framework for implementing interpreters and virtual machines")
3441 (description "RPython is a translation and support framework for
3442 producing implementations of dynamic languages, emphasizing a clean separation
3443 between language specification and implementation aspects.")
3444 (license license:expat)))
3445
3446 ;; This version of numpy is missing the documentation and is only used to
3447 ;; build matplotlib which is required to build numpy's documentation.
3448 (define-public python-numpy
3449 (package
3450 (name "python-numpy")
3451 (version "1.12.0")
3452 (source
3453 (origin
3454 (method url-fetch)
3455 (uri (string-append
3456 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3457 (file-name (string-append name "-" version ".tar.gz"))
3458 (sha256
3459 (base32
3460 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3461 (build-system python-build-system)
3462 (inputs
3463 `(("openblas" ,openblas)
3464 ("lapack" ,lapack)))
3465 (native-inputs
3466 `(("python-cython" ,python-cython)
3467 ("python-nose" ,python-nose)
3468 ("gfortran" ,gfortran)))
3469 (arguments
3470 `(#:phases
3471 (modify-phases %standard-phases
3472 (add-before 'build 'set-environment-variables
3473 (lambda* (#:key inputs #:allow-other-keys)
3474 (call-with-output-file "site.cfg"
3475 (lambda (port)
3476 (format port
3477 "[openblas]
3478 libraries = openblas
3479 library_dirs = ~a/lib
3480 include_dirs = ~a/include
3481
3482 # backslash-n to make emacs happy
3483 \n[lapack]
3484 lapack_libs = lapack
3485 library_dirs = ~a/lib
3486 include_dirs = ~a/include
3487 "
3488 (assoc-ref inputs "openblas")
3489 (assoc-ref inputs "openblas")
3490 (assoc-ref inputs "lapack")
3491 (assoc-ref inputs "lapack"))))
3492 ;; Use "gcc" executable, not "cc".
3493 (substitute* "numpy/distutils/system_info.py"
3494 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3495 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3496 #t))
3497 ;; Tests can only be run after the library has been installed and not
3498 ;; within the source directory.
3499 (delete 'check)
3500 (add-after 'install 'check
3501 (lambda* (#:key outputs inputs #:allow-other-keys)
3502 ;; Make installed package available for running the tests
3503 (add-installed-pythonpath inputs outputs)
3504 (with-directory-excursion "/tmp"
3505 (zero? (system* "python" "-c"
3506 "import numpy; numpy.test(verbose=2)"))))))))
3507 (home-page "http://www.numpy.org/")
3508 (synopsis "Fundamental package for scientific computing with Python")
3509 (description "NumPy is the fundamental package for scientific computing
3510 with Python. It contains among other things: a powerful N-dimensional array
3511 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3512 and Fortran code, useful linear algebra, Fourier transform, and random number
3513 capabilities.")
3514 (license license:bsd-3)))
3515
3516 (define-public python2-numpy
3517 (package-with-python2 python-numpy))
3518
3519 (define-public python-munch
3520 (package
3521 (name "python-munch")
3522 (version "2.0.4")
3523 (source
3524 (origin
3525 (method url-fetch)
3526 (uri (pypi-uri "munch" version))
3527 (sha256
3528 (base32
3529 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3530 (build-system python-build-system)
3531 (home-page "https://github.com/Infinidat/munch")
3532 (synopsis "Dot-accessible dictionary")
3533 (description "Munch is a dot-accessible dictionary similar to JavaScript
3534 objects.")
3535 (license license:expat)))
3536
3537 (define-public python2-munch
3538 (package-with-python2 python-munch))
3539
3540 (define-public python2-fastlmm
3541 (package
3542 (name "python2-fastlmm")
3543 (version "0.2.21")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (pypi-uri "fastlmm" version ".zip"))
3548 (sha256
3549 (base32
3550 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3551 (build-system python-build-system)
3552 (arguments
3553 `(#:python ,python-2)) ; only Python 2.7 is supported
3554 (propagated-inputs
3555 `(("python2-numpy" ,python2-numpy)
3556 ("python2-scipy" ,python2-scipy)
3557 ("python2-matplotlib" ,python2-matplotlib)
3558 ("python2-pandas" ,python2-pandas)
3559 ("python2-scikit-learn" ,python2-scikit-learn)
3560 ("python2-pysnptools" ,python2-pysnptools)))
3561 (native-inputs
3562 `(("unzip" ,unzip)
3563 ("python2-cython" ,python2-cython)
3564 ("python2-mock" ,python2-mock)
3565 ("python2-nose" ,python2-nose)))
3566 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3567 (synopsis "Perform genome-wide association studies on large data sets")
3568 (description
3569 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3570 Models, is a program for performing both single-SNP and SNP-set genome-wide
3571 association studies (GWAS) on extremely large data sets.")
3572 (license license:asl2.0)))
3573
3574 (define-public python-numpy-documentation
3575 (package
3576 (name "python-numpy-documentation")
3577 (version (package-version python-numpy))
3578 (source (package-source python-numpy))
3579 (build-system python-build-system)
3580 (native-inputs
3581 `(("python-matplotlib" ,python-matplotlib)
3582 ("python-numpy" ,python-numpy)
3583 ("pkg-config" ,pkg-config)
3584 ("python-sphinx" ,python-sphinx)
3585 ("python-numpydoc" ,python-numpydoc)
3586 ("texlive" ,texlive)
3587 ("texinfo" ,texinfo)
3588 ("perl" ,perl)
3589 ("scipy-sphinx-theme"
3590 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3591 (method git-fetch)
3592 (uri (git-reference
3593 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3594 (commit "c466764e22")))
3595 (sha256
3596 (base32
3597 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3598 ,@(package-native-inputs python-numpy)))
3599 (arguments
3600 `(#:tests? #f ; we're only generating the documentation
3601 #:phases
3602 (modify-phases %standard-phases
3603 (delete 'build)
3604 (replace 'install
3605 (lambda* (#:key inputs outputs #:allow-other-keys)
3606 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3607 (doc (string-append
3608 data "/doc/" ,name "-"
3609 ,(package-version python-numpy)))
3610 (info-reader (string-append data "/info"))
3611 (html (string-append doc "/html"))
3612 (scipy-sphinx-theme "scipy-sphinx-theme")
3613 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3614 (pyver ,(string-append "PYVER=")))
3615 (with-directory-excursion "doc"
3616 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3617 (mkdir-p html)
3618 (system* "make" "html" pyver)
3619 (system* "make" "latex" "PAPER=a4" pyver)
3620 (system* "make" "-C" "build/latex"
3621 "all-pdf" "PAPER=a4" pyver)
3622 ;; FIXME: Generation of the info file fails.
3623 ;; (system* "make" "info" pyver)
3624 ;; (mkdir-p info)
3625 ;; (copy-file "build/texinfo/numpy.info"
3626 ;; (string-append info "/numpy.info"))
3627 (for-each (lambda (file)
3628 (copy-file (string-append "build/latex" file)
3629 (string-append doc file)))
3630 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3631 (with-directory-excursion "build/html"
3632 (for-each (lambda (file)
3633 (let* ((dir (dirname file))
3634 (tgt-dir (string-append html "/" dir)))
3635 (unless (equal? "." dir)
3636 (mkdir-p tgt-dir))
3637 (install-file file html)))
3638 (find-files "." ".*")))))
3639 #t)))))
3640 (home-page (package-home-page python-numpy))
3641 (synopsis "Documentation for the python-numpy package")
3642 (description (package-description python-numpy))
3643 (license (package-license python-numpy))))
3644
3645 (define-public python2-numpy-documentation
3646 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3647 (package
3648 (inherit numpy-documentation)
3649 (native-inputs `(("python2-functools32" ,python2-functools32)
3650 ,@(package-native-inputs numpy-documentation))))))
3651
3652 (define-public python-pygit2
3653 (package
3654 (name "python-pygit2")
3655 (version "0.25.0")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (pypi-uri "pygit2" version))
3660 (sha256
3661 (base32
3662 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3663 (patches
3664 (search-patches "python-pygit2-disable-network-tests.patch"))))
3665 (build-system python-build-system)
3666 (propagated-inputs
3667 `(("python-six" ,python-six)
3668 ("python-cffi" ,python-cffi)
3669 ("libgit2" ,libgit2)
3670 ("python-tox" ,python-tox)))
3671 (home-page "https://github.com/libgit2/pygit2")
3672 (synopsis "Python bindings for libgit2")
3673 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3674 library, libgit2 implements Git plumbing.")
3675 ;; GPL2.0 only, with linking exception.
3676 (license license:gpl2)))
3677
3678 (define-public python2-pygit2
3679 (package-with-python2 python-pygit2))
3680
3681 (define-public python-pyparsing
3682 (package
3683 (name "python-pyparsing")
3684 (version "2.0.3")
3685 (source
3686 (origin
3687 (method url-fetch)
3688 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3689 "/pyparsing-" version
3690 "/pyparsing-" version ".tar.gz"))
3691 (sha256
3692 (base32
3693 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3694 (build-system python-build-system)
3695 (outputs '("out" "doc"))
3696 (arguments
3697 `(#:tests? #f ; no test target
3698 #:modules ((guix build python-build-system)
3699 (guix build utils))
3700 #:phases
3701 (alist-cons-after
3702 'install 'install-doc
3703 (lambda* (#:key outputs #:allow-other-keys)
3704 (let* ((doc (string-append (assoc-ref outputs "doc")
3705 "/share/doc/" ,name "-" ,version))
3706 (html-doc (string-append doc "/html"))
3707 (examples (string-append doc "/examples")))
3708 (mkdir-p html-doc)
3709 (mkdir-p examples)
3710 (for-each
3711 (lambda (dir tgt)
3712 (map (lambda (file)
3713 (install-file file tgt))
3714 (find-files dir ".*")))
3715 (list "docs" "htmldoc" "examples")
3716 (list doc html-doc examples))))
3717 %standard-phases)))
3718 (home-page "http://pyparsing.wikispaces.com")
3719 (synopsis "Python parsing class library")
3720 (description
3721 "The pyparsing module is an alternative approach to creating and
3722 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3723 of regular expressions. The pyparsing module provides a library of classes
3724 that client code uses to construct the grammar directly in Python code.")
3725 (license license:expat)))
3726
3727 (define-public python2-pyparsing
3728 (package-with-python2 python-pyparsing))
3729
3730 (define-public python-numpydoc
3731 (package
3732 (name "python-numpydoc")
3733 (version "0.5")
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (string-append
3738 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3739 version ".tar.gz"))
3740 (sha256
3741 (base32
3742 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3743 (modules '((guix build utils)))
3744 (snippet
3745 '(begin
3746 ;; Drop a test requiring matplotlib, which we cannot add as an
3747 ;; input since it would create a circular dependency: Extend the
3748 ;; test for Python 3, where it is already dropped, to Python 2.
3749 (substitute* "numpydoc/tests/test_plot_directive.py"
3750 (("3") "2"))))))
3751 (build-system python-build-system)
3752 (propagated-inputs
3753 `(("python-sphinx" ,python-sphinx)))
3754 (native-inputs
3755 `(("python-nose" ,python-nose)))
3756 (home-page "https://pypi.python.org/pypi/numpydoc")
3757 (synopsis
3758 "Numpy's Sphinx extensions")
3759 (description
3760 "Sphinx extension to support docstrings in Numpy format.")
3761 (license license:bsd-2)))
3762
3763 (define-public python2-numpydoc
3764 (package-with-python2 python-numpydoc))
3765
3766 (define-public python-numexpr
3767 (package
3768 (name "python-numexpr")
3769 (version "2.6.1")
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "numexpr" version))
3774 (sha256
3775 (base32
3776 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3777 (build-system python-build-system)
3778 (arguments `(#:tests? #f)) ; no tests included
3779 (propagated-inputs
3780 `(("python-numpy" ,python-numpy)))
3781 (home-page "https://github.com/pydata/numexpr")
3782 (synopsis "Fast numerical expression evaluator for NumPy")
3783 (description
3784 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3785 expressions that operate on arrays are accelerated and use less memory than
3786 doing the same calculation in Python. In addition, its multi-threaded
3787 capabilities can make use of all your cores, which may accelerate
3788 computations, most specially if they are not memory-bounded (e.g. those using
3789 transcendental functions).")
3790 (license license:expat)))
3791
3792 (define-public python2-numexpr
3793 (package-with-python2 python-numexpr))
3794
3795 (define-public python-cycler
3796 (package
3797 (name "python-cycler")
3798 (version "0.10.0")
3799 (source (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "cycler" version))
3802 (sha256
3803 (base32
3804 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3805 (build-system python-build-system)
3806 (arguments
3807 ;; XXX: The current version requires 'coveralls' which we don't have.
3808 ;; Enable this for the next release which uses 'python-pytest'.
3809 '(#:tests? #f))
3810 (propagated-inputs
3811 `(("python-six" ,python-six)))
3812 (home-page "http://matplotlib.org/cycler/")
3813 (synopsis "Composable keyword argument iterator")
3814 (description
3815 "When using @code{matplotlib} and plotting more than one line, it is
3816 common to want to be able to want to be able to cycle over one or more artist
3817 styles; but the plotting logic can quickly become involved.
3818 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3819 @code{Cycler} class was developed.")
3820 (license license:bsd-3)))
3821
3822 (define-public python2-cycler
3823 (package-with-python2 python-cycler))
3824
3825 (define-public python-colorspacious
3826 (package
3827 (name "python-colorspacious")
3828 (version "1.1.0")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3833 version ".tar.gz"))
3834 (file-name (string-append name "-" version))
3835 (sha256
3836 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3837 (build-system python-build-system)
3838 (propagated-inputs
3839 `(("python-numpy" ,python-numpy)))
3840 (native-inputs
3841 `(("python-nose" ,python-nose)))
3842 (arguments
3843 `(#:phases
3844 (modify-phases %standard-phases
3845 (replace 'check
3846 (lambda _
3847 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3848 (home-page "https://github.com/njsmith/colorspacious")
3849 (synopsis "Python library for colorspace conversions")
3850 (description "@code{colorspacious} is a Python library that lets you
3851 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3852 (license license:expat)))
3853
3854 (define-public python2-colorspacious
3855 (package-with-python2 python-colorspacious))
3856
3857 (define-public python-matplotlib
3858 (package
3859 (name "python-matplotlib")
3860 (version "2.0.0")
3861 (source
3862 (origin
3863 (method url-fetch)
3864 (uri (string-append
3865 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3866 (file-name (string-append name "-" version ".tar.gz"))
3867 (sha256
3868 (base32
3869 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3870 (build-system python-build-system)
3871 (propagated-inputs ; the following packages are all needed at run time
3872 `(("python-cycler" ,python-cycler)
3873 ("python-pyparsing" ,python-pyparsing)
3874 ("python-pygobject" ,python-pygobject)
3875 ("gobject-introspection" ,gobject-introspection)
3876 ("python-tkinter" ,python "tk")
3877 ("python-dateutil" ,python-dateutil)
3878 ("python-numpy" ,python-numpy)
3879 ("python-pillow" ,python-pillow)
3880 ("python-pytz" ,python-pytz)
3881 ("python-six" ,python-six)
3882 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3883 ;; from 'gtk+') provides the required 'typelib' files used by
3884 ;; 'gobject-introspection'. The location of these files is set with the
3885 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3886 ;; is done automatically by a 'native-search-path' procedure. However,
3887 ;; at run-time the user must set this variable as follows:
3888 ;;
3889 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3890 ("gtk+" ,gtk+)
3891 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3892 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3893 ;; object. For this reason we need to import both libraries.
3894 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3895 ("python-pycairo" ,python-pycairo)
3896 ("python-cairocffi" ,python-cairocffi)))
3897 (inputs
3898 `(("libpng" ,libpng)
3899 ("imagemagick" ,imagemagick)
3900 ("freetype" ,freetype)
3901 ("cairo" ,cairo)
3902 ("glib" ,glib)
3903 ;; FIXME: Add backends when available.
3904 ;("python-wxpython" ,python-wxpython)
3905 ("python-pyqt" ,python-pyqt)
3906 ("tcl" ,tcl)
3907 ("tk" ,tk)))
3908 (native-inputs
3909 `(("pkg-config" ,pkg-config)
3910 ("python-nose" ,python-nose)
3911 ("python-mock" ,python-mock)))
3912 (arguments
3913 `(#:phases
3914 (modify-phases %standard-phases
3915 (add-before 'build 'configure-environment
3916 (lambda* (#:key outputs inputs #:allow-other-keys)
3917 (let ((cairo (assoc-ref inputs "cairo"))
3918 (gtk+ (assoc-ref inputs "gtk+")))
3919 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3920 ;; has not effect.
3921 (setenv "LD_LIBRARY_PATH"
3922 (string-append cairo "/lib:" gtk+ "/lib"))
3923 (setenv "HOME" (getcwd))
3924 (call-with-output-file "setup.cfg"
3925 (lambda (port)
3926 (format port "[directories]~%
3927 basedirlist = ~a,~a~%
3928 [rc_options]~%
3929 backend = TkAgg~%"
3930 (assoc-ref inputs "tcl")
3931 (assoc-ref inputs "tk")))))
3932 #t)))))
3933 (home-page "http://matplotlib.org")
3934 (synopsis "2D plotting library for Python")
3935 (description
3936 "Matplotlib is a Python 2D plotting library which produces publication
3937 quality figures in a variety of hardcopy formats and interactive environments
3938 across platforms. Matplotlib can be used in Python scripts, the python and
3939 ipython shell, web application servers, and six graphical user interface
3940 toolkits.")
3941 (license license:psfl)
3942 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3943
3944 (define-public python2-matplotlib
3945 (let ((matplotlib (package-with-python2
3946 (strip-python2-variant python-matplotlib))))
3947 (package (inherit matplotlib)
3948 ;; Make sure to use special packages for Python 2 instead
3949 ;; of those automatically rewritten by package-with-python2.
3950 (propagated-inputs
3951 `(("python2-pycairo" ,python2-pycairo)
3952 ("python2-functools32" ,python2-functools32)
3953 ("python2-pygobject-2" ,python2-pygobject-2)
3954 ("python2-subprocess32" ,python2-subprocess32)
3955 ("python2-tkinter" ,python-2 "tk")
3956 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3957 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3958
3959 (define-public python-matplotlib-documentation
3960 (package
3961 (name "python-matplotlib-documentation")
3962 (version (package-version python-matplotlib))
3963 (source (package-source python-matplotlib))
3964 (build-system python-build-system)
3965 (native-inputs
3966 `(("python-matplotlib" ,python-matplotlib)
3967 ("python-colorspacious" ,python-colorspacious)
3968 ("python-sphinx" ,python-sphinx)
3969 ("python-numpydoc" ,python-numpydoc)
3970 ("python-ipython" ,python-ipython)
3971 ("python-mock" ,python-mock)
3972 ("graphviz" ,graphviz)
3973 ("texlive" ,texlive)
3974 ("texinfo" ,texinfo)
3975 ,@(package-native-inputs python-matplotlib)))
3976 (arguments
3977 `(#:tests? #f ; we're only generating documentation
3978 #:phases
3979 (modify-phases %standard-phases
3980 (replace 'build
3981 (lambda _
3982 (chdir "doc")
3983 ;; Produce pdf in 'A4' format.
3984 (substitute* "conf.py"
3985 (("latex_paper_size = 'letter'") "")
3986 ;; latex_paper_size is deprecated -> set paper size using
3987 ;; latex_elements
3988 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3989 ;; insert at a point where latex_elements{} is defined:
3990 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3991 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3992 (replace 'install
3993 (lambda* (#:key inputs outputs #:allow-other-keys)
3994 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3995 (doc (string-append data "/doc/python-matplotlib-" ,version))
3996 (info (string-append data "/info"))
3997 (html (string-append doc "/html")))
3998 (mkdir-p html)
3999 (mkdir-p info)
4000 (copy-recursively "build/html" html)
4001 (symlink (string-append html "/_images")
4002 (string-append info "/matplotlib-figures"))
4003 (with-directory-excursion "build/texinfo"
4004 (substitute* "matplotlib.texi"
4005 (("@image\\{([^,]*)" all file)
4006 (string-append "@image{matplotlib-figures/" file)))
4007 (symlink (string-append html "/_images")
4008 "./matplotlib-figures")
4009 (system* "makeinfo" "--no-split"
4010 "-o" "matplotlib.info" "matplotlib.texi"))
4011 (copy-file "build/texinfo/matplotlib.info"
4012 (string-append info "/matplotlib.info"))
4013 (copy-file "build/latex/Matplotlib.pdf"
4014 (string-append doc "/Matplotlib.pdf")))
4015 #t)))))
4016 (home-page (package-home-page python-matplotlib))
4017 (synopsis "Documentation for the python-matplotlib package")
4018 (description (package-description python-matplotlib))
4019 (license (package-license python-matplotlib))))
4020
4021 (define-public python2-matplotlib-documentation
4022 (package-with-python2 python-matplotlib-documentation))
4023
4024 (define-public python2-pysnptools
4025 (package
4026 (name "python2-pysnptools")
4027 (version "0.3.9")
4028 (source
4029 (origin
4030 (method url-fetch)
4031 (uri (pypi-uri "pysnptools" version ".zip"))
4032 (sha256
4033 (base32
4034 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4035 (build-system python-build-system)
4036 (arguments
4037 `(#:python ,python-2)) ; only Python 2.7 is supported
4038 (propagated-inputs
4039 `(("python2-numpy" ,python2-numpy)
4040 ("python2-scipy" ,python2-scipy)
4041 ("python2-pandas" ,python2-pandas)))
4042 (native-inputs
4043 `(("python2-cython" ,python2-cython)))
4044 (native-inputs
4045 `(("unzip" ,unzip)))
4046 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4047 (synopsis "Library for reading and manipulating genetic data")
4048 (description
4049 "PySnpTools is a library for reading and manipulating genetic data. It
4050 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4051 those files. It can also efficiently manipulate ranges of integers using set
4052 operators such as union, intersection, and difference.")
4053 (license license:asl2.0)))
4054
4055 (define-public python-rpy2
4056 (package
4057 (name "python-rpy2")
4058 (version "2.7.6")
4059 (source
4060 (origin
4061 (method url-fetch)
4062 (uri (pypi-uri "rpy2" version))
4063 (sha256
4064 (base32
4065 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4066 (build-system python-build-system)
4067 (arguments
4068 '(#:phases
4069 (modify-phases %standard-phases
4070 (delete 'check)
4071 (add-after 'install 'check
4072 (lambda* (#:key outputs inputs #:allow-other-keys)
4073 ;; It's easier to run tests after install.
4074 ;; Make installed package available for running the tests
4075 (add-installed-pythonpath inputs outputs)
4076 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4077 (propagated-inputs
4078 `(("python-six" ,python-six)))
4079 (inputs
4080 `(("readline" ,readline)
4081 ("icu4c" ,icu4c)
4082 ("pcre" ,pcre)
4083 ("r" ,r)))
4084 (native-inputs
4085 `(("zlib" ,zlib)))
4086 (home-page "http://rpy.sourceforge.net/")
4087 (synopsis "Python interface to the R language")
4088 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4089 low-level interface to R from Python, a proposed high-level interface,
4090 including wrappers to graphical libraries, as well as R-like structures and
4091 functions.")
4092 (license license:gpl3+)))
4093
4094 (define-public python2-rpy2
4095 (let ((rpy2 (package-with-python2 python-rpy2)))
4096 (package (inherit rpy2)
4097 (propagated-inputs
4098 `(("python2-singledispatch" ,python2-singledispatch)
4099 ,@(package-propagated-inputs rpy2))))))
4100
4101 (define-public python-scipy
4102 (package
4103 (name "python-scipy")
4104 (version "0.18.1")
4105 (source
4106 (origin
4107 (method url-fetch)
4108 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4109 version ".tar.gz"))
4110 (file-name (string-append name "-" version ".tar.gz"))
4111 (sha256
4112 (base32
4113 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4114 (build-system python-build-system)
4115 (propagated-inputs
4116 `(("python-numpy" ,python-numpy)
4117 ("python-matplotlib" ,python-matplotlib)
4118 ("python-pyparsing" ,python-pyparsing)))
4119 (inputs
4120 `(("lapack" ,lapack)
4121 ("openblas" ,openblas)))
4122 (native-inputs
4123 `(("python-cython" ,python-cython)
4124 ("python-nose" ,python-nose)
4125 ("python-sphinx" ,python-sphinx)
4126 ("python-numpydoc" ,python-numpydoc)
4127 ("gfortran" ,gfortran)
4128 ("perl" ,perl)))
4129 (outputs '("out" "doc"))
4130 (arguments
4131 `(#:phases
4132 (modify-phases %standard-phases
4133 (add-before 'build 'configure-openblas
4134 (lambda* (#:key inputs #:allow-other-keys)
4135 (call-with-output-file "site.cfg"
4136 (lambda (port)
4137 (format port
4138 "[blas]
4139 libraries = openblas
4140 library_dirs = ~a/lib
4141 include_dirs = ~a/include
4142
4143 # backslash-n to make emacs happy
4144 \n[atlas]
4145 library_dirs = ~a/lib
4146 atlas_libs = openblas
4147 "
4148 (assoc-ref inputs "openblas")
4149 (assoc-ref inputs "openblas")
4150 (assoc-ref inputs "openblas"))))
4151 #t))
4152 (add-after 'install 'install-doc
4153 (lambda* (#:key inputs outputs #:allow-other-keys)
4154 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4155 (doc (string-append data "/doc/" ,name "-" ,version))
4156 (html (string-append doc "/html"))
4157 (pyver ,(string-append "PYVER=")))
4158 ;; Make installed package available for building the
4159 ;; documentation
4160 (add-installed-pythonpath inputs outputs)
4161 (with-directory-excursion "doc"
4162 ;; Fix generation of images for mathematical expressions.
4163 (substitute* (find-files "source" "conf\\.py")
4164 (("pngmath_use_preview = True")
4165 "pngmath_use_preview = False"))
4166 (mkdir-p html)
4167 (system* "make" "html" pyver)
4168 (with-directory-excursion "build/html"
4169 (for-each (lambda (file)
4170 (let* ((dir (dirname file))
4171 (tgt-dir (string-append html "/" dir)))
4172 (install-file file html)))
4173 (find-files "." ".*")))))
4174 #t))
4175 (add-after 'unpack 'fix-tests
4176 (lambda _
4177 (substitute* "scipy/integrate/tests/test_quadpack.py"
4178 (("libm.so") "libm.so.6"))
4179 #t))
4180 ;; Tests can only be run after the library has been installed and not
4181 ;; within the source directory.
4182 (delete 'check)
4183 (add-after 'install 'check
4184 (lambda* (#:key inputs outputs #:allow-other-keys)
4185 (add-installed-pythonpath inputs outputs)
4186 (with-directory-excursion "/tmp"
4187 (zero? (system* "python" "-c"
4188 "import scipy; scipy.test('full')")))
4189 #t)))))
4190 (home-page "http://www.scipy.org/")
4191 (synopsis "The Scipy library provides efficient numerical routines")
4192 (description "The SciPy library is one of the core packages that make up
4193 the SciPy stack. It provides many user-friendly and efficient numerical
4194 routines such as routines for numerical integration and optimization.")
4195 (properties `((python2-variant . ,(delay python2-scipy))))
4196 (license license:bsd-3)))
4197
4198 (define-public python2-scipy
4199 (package-with-python2
4200 (strip-python2-variant python-scipy)))
4201
4202 (define-public python-socksipy-branch
4203 (package
4204 (name "python-socksipy-branch")
4205 (version "1.01")
4206 (source
4207 (origin
4208 (method url-fetch)
4209 (uri (pypi-uri "SocksiPy-branch" version))
4210 (sha256
4211 (base32
4212 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4213 (build-system python-build-system)
4214 (arguments
4215 `(#:tests? #f)) ; There are no tests
4216 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4217 (synopsis "Python SOCKS module")
4218 (description
4219 "SocksiPy - A Python SOCKS client module. It provides a
4220 socket-like interface that supports connections to any TCP
4221 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4222 The original version was developed by Dan Haim, this is a
4223 branch created by Mario Vilas to address some open issues,
4224 as the original project seems to have been abandoned circa 2007.")
4225 (license license:bsd-3)))
4226
4227 (define-public python2-socksipy-branch
4228 (package-with-python2 python-socksipy-branch))
4229
4230 (define-public python-sqlalchemy
4231 (package
4232 (name "python-sqlalchemy")
4233 (version "1.0.12")
4234 (source
4235 (origin
4236 (method url-fetch)
4237 (uri (string-append "https://pypi.python.org/packages/source/S/"
4238 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4239 (sha256
4240 (base32
4241 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4242 (build-system python-build-system)
4243 (native-inputs
4244 `(("python-cython" ,python-cython) ;for c extensions
4245 ("python-pytest" ,python-pytest)
4246 ("python-mock" ,python-mock))) ;for tests
4247 (arguments
4248 `(#:phases (alist-replace
4249 'check
4250 (lambda _ (zero? (system* "py.test")))
4251 %standard-phases)))
4252 (home-page "http://www.sqlalchemy.org")
4253 (synopsis "Database abstraction library")
4254 (description
4255 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4256 gives application developers the full power and flexibility of SQL. It
4257 provides a full suite of well known enterprise-level persistence patterns,
4258 designed for efficient and high-performing database access, adapted into a
4259 simple and Pythonic domain language.")
4260 (license license:x11)))
4261
4262 (define-public python2-sqlalchemy
4263 (package-with-python2 python-sqlalchemy))
4264
4265 (define-public python-pycodestyle
4266 (package
4267 (name "python-pycodestyle")
4268 (version "2.0.0")
4269 (source
4270 (origin
4271 (method url-fetch)
4272 (uri (pypi-uri "pycodestyle" version))
4273 (sha256
4274 (base32
4275 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4276 (build-system python-build-system)
4277 (home-page "https://pycodestyle.readthedocs.io/")
4278 (synopsis "Python style guide checker")
4279 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4280 Python code against some of the style conventions in
4281 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4282 (license license:expat)))
4283
4284 (define-public python2-pycodestyle
4285 (package-with-python2 python-pycodestyle))
4286
4287 (define-public python-orderedmultidict
4288 (package
4289 (name "python-orderedmultidict")
4290 (version "0.7.11")
4291 (source
4292 (origin
4293 (method url-fetch)
4294 (uri (pypi-uri "orderedmultidict" version))
4295 (sha256
4296 (base32
4297 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4298 (build-system python-build-system)
4299 (arguments
4300 `(#:phases
4301 (modify-phases %standard-phases
4302 (add-after 'unpack 'fix-tests
4303 (lambda _
4304 ;; The package uses nosetest for running the tests.
4305 ;; Adding this initfile allows to run the test suite
4306 ;; without requiring nosetest.
4307 (zero? (system* "touch" "tests/__init__.py")))))))
4308 (propagated-inputs
4309 `(("python-six" ,python-six)))
4310 (native-inputs
4311 `(("python-pycodestyle" ,python-pycodestyle)))
4312 (home-page "https://github.com/gruns/orderedmultidict")
4313 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4314 (description "This package contains a library for ordered multivalue
4315 dictionaries. A multivalue dictionary is a dictionary that can store
4316 multiple values for the same key. An ordered multivalue dictionary is a
4317 multivalue dictionary that retains the order of insertions and deletions.")
4318 (license license:unlicense)))
4319
4320 (define-public python2-orderedmultidict
4321 (package-with-python2 python-orderedmultidict))
4322
4323 (define-public python-furl
4324 (package
4325 (name "python-furl")
4326 (version "0.5.6")
4327 (source
4328 (origin
4329 (method url-fetch)
4330 (uri (pypi-uri "furl" version))
4331 (sha256
4332 (base32
4333 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4334 (build-system python-build-system)
4335 (propagated-inputs
4336 `(("python-six" ,python-six)
4337 ("python-orderedmultidict" ,python-orderedmultidict)))
4338 (native-inputs
4339 `(("python-pycodestyle" ,python-pycodestyle)))
4340 (home-page "https://github.com/gruns/furl")
4341 (synopsis "URL manipulation in Python")
4342 (description "Furl provides an easy-to-use alternative to the
4343 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4344 (license license:unlicense)))
4345
4346 (define-public python2-furl
4347 (package-with-python2 python-furl))
4348
4349 (define-public python-flask-babel
4350 (package
4351 (name "python-flask-babel")
4352 (version "0.11.1")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (pypi-uri "Flask-Babel" version))
4357 (sha256
4358 (base32
4359 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4360 (build-system python-build-system)
4361 (propagated-inputs
4362 `(("python-flask" ,python-flask)
4363 ("python-babel" ,python-babel)
4364 ("python-jinja2" ,python-jinja2)
4365 ("python-pytz" ,python-pytz)))
4366 (home-page "https://github.com/python-babel/flask-babel")
4367 (synopsis "Add i18n/l10n support to Flask applications")
4368 (description "This package implements internationalization and localization
4369 support for Flask. This is based on the Python babel module as well as pytz -
4370 both of which are installed automatically if you install this library.")
4371 (license license:bsd-3)))
4372
4373 (define-public python2-flask-babel
4374 (package-with-python2 python-flask-babel))
4375
4376 (define-public python-sqlalchemy-utils
4377 (package
4378 (name "python-sqlalchemy-utils")
4379 (version "0.32.11")
4380 (source
4381 (origin
4382 (method url-fetch)
4383 (uri (pypi-uri "SQLAlchemy-Utils" version))
4384 (sha256
4385 (base32
4386 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4387 (build-system python-build-system)
4388 (arguments
4389 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4390 ;; #:phases
4391 ;; (modify-phases %standard-phases
4392 ;; (replace 'check
4393 ;; (lambda _
4394 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4395 (propagated-inputs
4396 `(("python-six" ,python-six)
4397 ("python-sqlalchemy" ,python-sqlalchemy)))
4398 (native-inputs
4399 `(("python-dateutil" ,python-dateutil)
4400 ("python-flexmock" ,python-flexmock)
4401 ("python-psycopg2" ,python-psycopg2)
4402 ("python-pytest" ,python-pytest)
4403 ("python-pytz" ,python-pytz)))
4404 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4405 (synopsis "Various utility functions for SQLAlchemy")
4406 (description
4407 "SQLAlchemy-utils provides various utility functions and custom data types
4408 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4409
4410 You might also want to install the following optional dependencies:
4411 @enumerate
4412 @item @code{python-passlib}
4413 @item @code{python-babel}
4414 @item @code{python-cryptography}
4415 @item @code{python-pytz}
4416 @item @code{python-psycopg2}
4417 @item @code{python-furl}
4418 @item @code{python-flask-babel}
4419 @end enumerate
4420 ")
4421 (license license:bsd-3)))
4422
4423 (define-public python2-sqlalchemy-utils
4424 (package-with-python2 python-sqlalchemy-utils))
4425
4426 (define-public python-alembic
4427 (package
4428 (name "python-alembic")
4429 (version "0.8.10")
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (pypi-uri "alembic" version))
4434 (sha256
4435 (base32
4436 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4437 (build-system python-build-system)
4438 (native-inputs
4439 `(("python-mock" ,python-mock)
4440 ("python-pytest-cov" ,python-pytest-cov)))
4441 (propagated-inputs
4442 `(("python-sqlalchemy" ,python-sqlalchemy)
4443 ("python-mako" ,python-mako)
4444 ("python-editor" ,python-editor)))
4445 (home-page "http://bitbucket.org/zzzeek/alembic")
4446 (synopsis
4447 "Database migration tool for SQLAlchemy")
4448 (description
4449 "Alembic is a lightweight database migration tool for usage with the
4450 SQLAlchemy Database Toolkit for Python.")
4451 (license license:expat)))
4452
4453 (define-public python2-alembic
4454 (package-with-python2 python-alembic))
4455
4456 (define-public python-autopep8
4457 (package
4458 (name "python-autopep8")
4459 (version "1.2.4")
4460 (source
4461 (origin
4462 (method url-fetch)
4463 (uri (pypi-uri "autopep8" version))
4464 (sha256
4465 (base32
4466 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4467 (build-system python-build-system)
4468 (propagated-inputs
4469 `(("python-pep8" ,python-pep8)))
4470 (home-page "https://github.com/hhatto/autopep8")
4471 (synopsis "Format Python code according to the PEP 8 style guide")
4472 (description
4473 "@code{autopep8} automatically formats Python code to conform to
4474 the PEP 8 style guide. It uses the pycodestyle utility to determine
4475 what parts of the code needs to be formatted. @code{autopep8} is
4476 capable of fixing most of the formatting issues that can be reported
4477 by pycodestyle.")
4478 (license (license:non-copyleft
4479 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4480
4481 (define-public python2-autopep8
4482 (package-with-python2 python-autopep8))
4483
4484 (define-public python-distutils-extra
4485 (package
4486 (name "python-distutils-extra")
4487 (version "2.38")
4488 (source
4489 (origin
4490 (method url-fetch)
4491 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4492 version "/+download/python-distutils-extra-"
4493 version ".tar.gz"))
4494 (sha256
4495 (base32
4496 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4497 (build-system python-build-system)
4498 (home-page "https://launchpad.net/python-distutils-extra/")
4499 (synopsis "Enhancements to Python's distutils")
4500 (description
4501 "The python-distutils-extra module enables you to easily integrate
4502 gettext support, themed icons, and scrollkeeper-based documentation into
4503 Python's distutils.")
4504 (license license:gpl2)))
4505
4506 (define-public python2-distutils-extra
4507 (package-with-python2 python-distutils-extra))
4508
4509 (define-public python2-elib.intl
4510 (package
4511 (name "python2-elib.intl")
4512 (version "0.0.3")
4513 (source
4514 (origin
4515 ;; This project doesn't tag releases or publish tarballs, so we take
4516 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4517 (method git-fetch)
4518 (uri (git-reference
4519 (url "https://github.com/dieterv/elib.intl.git")
4520 (commit "d09997cfef")))
4521 (sha256
4522 (base32
4523 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4524 (build-system python-build-system)
4525 (arguments
4526 ;; incompatible with Python 3 (exception syntax)
4527 `(#:python ,python-2
4528 #:tests? #f))
4529 (home-page "https://github.com/dieterv/elib.intl")
4530 (synopsis "Enhanced internationalization for Python")
4531 (description
4532 "The elib.intl module provides enhanced internationalization (I18N)
4533 services for your Python modules and applications.")
4534 (license license:lgpl3+)))
4535
4536 (define-public python-pillow
4537 (package
4538 (name "python-pillow")
4539 (version "3.3.3")
4540 (source
4541 (origin
4542 (method url-fetch)
4543 (uri (pypi-uri "Pillow" version))
4544 (sha256
4545 (base32
4546 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4547 (build-system python-build-system)
4548 (native-inputs
4549 `(("python-nose" ,python-nose)))
4550 (inputs
4551 `(("freetype" ,freetype)
4552 ("lcms" ,lcms)
4553 ("zlib" ,zlib)
4554 ("libjpeg" ,libjpeg)
4555 ("openjpeg" ,openjpeg)
4556 ("libtiff" ,libtiff)
4557 ("libwebp" ,libwebp)))
4558 (arguments
4559 `(#:phases (modify-phases %standard-phases
4560 (add-after
4561 'install 'check-installed
4562 (lambda* (#:key outputs inputs #:allow-other-keys)
4563 (begin
4564 (setenv "HOME" (getcwd))
4565 ;; Make installed package available for running the
4566 ;; tests
4567 (add-installed-pythonpath inputs outputs)
4568 (and (zero? (system* "python" "selftest.py"
4569 "--installed"))
4570 (zero? (system* "python" "test-installed.py"))))))
4571 (delete 'check))))
4572 (home-page "https://pypi.python.org/pypi/Pillow")
4573 (synopsis "Fork of the Python Imaging Library")
4574 (description
4575 "The Python Imaging Library adds image processing capabilities to your
4576 Python interpreter. This library provides extensive file format support, an
4577 efficient internal representation, and fairly powerful image processing
4578 capabilities. The core image library is designed for fast access to data
4579 stored in a few basic pixel formats. It should provide a solid foundation for
4580 a general image processing tool.")
4581 (license (license:x11-style
4582 "http://www.pythonware.com/products/pil/license.htm"
4583 "The PIL Software License"))))
4584
4585 (define-public python2-pillow
4586 (package-with-python2 python-pillow))
4587
4588 (define-public python-pycparser
4589 (package
4590 (name "python-pycparser")
4591 (version "2.17")
4592 (source
4593 (origin
4594 (method url-fetch)
4595 (uri (pypi-uri "pycparser" version))
4596 (sha256
4597 (base32
4598 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4599 (outputs '("out" "doc"))
4600 (build-system python-build-system)
4601 (native-inputs
4602 `(("pkg-config" ,pkg-config)))
4603 (arguments
4604 `(#:phases
4605 (modify-phases %standard-phases
4606 (replace 'check
4607 (lambda _
4608 (with-directory-excursion "tests"
4609 (zero? (system* "python" "all_tests.py")))))
4610 (add-after 'install 'install-doc
4611 (lambda* (#:key outputs #:allow-other-keys)
4612 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4613 (doc (string-append data "/doc/" ,name "-" ,version))
4614 (examples (string-append doc "/examples")))
4615 (mkdir-p examples)
4616 (for-each (lambda (file)
4617 (copy-file (string-append "." file)
4618 (string-append doc file)))
4619 '("/README.rst" "/CHANGES" "/LICENSE"))
4620 (copy-recursively "examples" examples)))))))
4621 (home-page "https://github.com/eliben/pycparser")
4622 (synopsis "C parser in Python")
4623 (description
4624 "Pycparser is a complete parser of the C language, written in pure Python
4625 using the PLY parsing library. It parses C code into an AST and can serve as
4626 a front-end for C compilers or analysis tools.")
4627 (license license:bsd-3)))
4628
4629 (define-public python2-pycparser
4630 (package-with-python2 python-pycparser))
4631
4632 (define-public python-cffi
4633 (package
4634 (name "python-cffi")
4635 (version "1.4.2")
4636 (source
4637 (origin
4638 (method url-fetch)
4639 (uri (pypi-uri "cffi" version))
4640 (sha256
4641 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4642 (build-system python-build-system)
4643 (outputs '("out" "doc"))
4644 (inputs
4645 `(("libffi" ,libffi)))
4646 (propagated-inputs ; required at run-time
4647 `(("python-pycparser" ,python-pycparser)))
4648 (native-inputs
4649 `(("pkg-config" ,pkg-config)
4650 ("python-sphinx" ,python-sphinx)
4651 ("python-pytest" ,python-pytest)))
4652 (arguments
4653 `(#:phases
4654 (alist-cons-after
4655 'install 'install-doc
4656 (lambda* (#:key outputs #:allow-other-keys)
4657 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4658 (doc (string-append data "/doc/" ,name "-" ,version))
4659 (html (string-append doc "/html")))
4660 (with-directory-excursion "doc"
4661 (system* "make" "html")
4662 (mkdir-p html)
4663 (copy-recursively "build/html" html))
4664 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4665 %standard-phases)))
4666 (home-page "http://cffi.readthedocs.org")
4667 (synopsis "Foreign function interface for Python")
4668 (description
4669 "Foreign Function Interface for Python calling C code.")
4670 (license license:expat)))
4671
4672 (define-public python2-cffi
4673 (package-with-python2 python-cffi))
4674
4675 (define-public python-xcffib
4676 (package
4677 (name "python-xcffib")
4678 (version "0.1.9")
4679 (source
4680 (origin
4681 (method url-fetch)
4682 (uri (string-append "https://pypi.python.org/packages/source/x/"
4683 "xcffib/xcffib-" version ".tar.gz"))
4684 (sha256
4685 (base32
4686 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4687 (build-system python-build-system)
4688 (inputs
4689 `(("libxcb" ,libxcb)))
4690 (propagated-inputs
4691 `(("python-cffi" ,python-cffi) ; used at run time
4692 ("python-six" ,python-six)))
4693 (arguments
4694 `(;; FIXME: Tests cannot load libxcb.so.1
4695 #:tests? #f
4696 #:phases
4697 (modify-phases %standard-phases
4698 (add-after 'install 'install-doc
4699 (lambda* (#:key outputs #:allow-other-keys)
4700 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4701 "/doc/" ,name "-" ,version)))
4702 (mkdir-p doc)
4703 (copy-file "README.md"
4704 (string-append doc "/README.md"))
4705 #t))))))
4706 (home-page "https://github.com/tych0/xcffib")
4707 (synopsis "XCB Python bindings")
4708 (description
4709 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4710 support for Python 3 and PyPy. It is based on cffi.")
4711 (license license:expat)))
4712
4713 (define-public python2-xcffib
4714 (package-with-python2 python-xcffib))
4715
4716 (define-public python-cairocffi
4717 (package
4718 (name "python-cairocffi")
4719 (version "0.6")
4720 (source
4721 (origin
4722 (method url-fetch)
4723 ;; The archive on pypi is missing the 'utils' directory!
4724 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4725 version ".tar.gz"))
4726 (file-name (string-append name "-" version ".tar.gz"))
4727 (sha256
4728 (base32
4729 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4730 (build-system python-build-system)
4731 (outputs '("out" "doc"))
4732 (inputs
4733 `(("gdk-pixbuf" ,gdk-pixbuf)
4734 ("cairo" ,cairo)))
4735 (native-inputs
4736 `(("pkg-config" ,pkg-config)
4737 ("python-sphinx" ,python-sphinx)
4738 ("python-docutils" ,python-docutils)))
4739 (propagated-inputs
4740 `(("python-xcffib" ,python-xcffib))) ; used at run time
4741 (arguments
4742 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4743 #:tests? #f
4744 #:phases
4745 (modify-phases %standard-phases
4746 (add-after 'install 'install-doc
4747 (lambda* (#:key inputs outputs #:allow-other-keys)
4748 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4749 (doc (string-append data "/doc/" ,name "-" ,version))
4750 (html (string-append doc "/html")))
4751 (setenv "LD_LIBRARY_PATH"
4752 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4753 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4754 (setenv "LANG" "en_US.UTF-8")
4755 (mkdir-p html)
4756 (for-each (lambda (file)
4757 (copy-file (string-append "." file)
4758 (string-append doc file)))
4759 '("/README.rst" "/CHANGES" "/LICENSE"))
4760 (system* "python" "setup.py" "build_sphinx")
4761 (copy-recursively "docs/_build/html" html)
4762 #t))))))
4763 (home-page "https://github.com/SimonSapin/cairocffi")
4764 (synopsis "Python bindings and object-oriented API for Cairo")
4765 (description
4766 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4767 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4768 graphics library with support for multiple backends including image buffers,
4769 PNG, PostScript, PDF, and SVG file output.")
4770 (license license:bsd-3)))
4771
4772 (define-public python2-cairocffi
4773 (package-with-python2 python-cairocffi))
4774
4775 (define-public python-decorator
4776 (package
4777 (name "python-decorator")
4778 (version "4.0.10")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (pypi-uri "decorator" version))
4783 (sha256
4784 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4785 (build-system python-build-system)
4786 (arguments '(#:tests? #f)) ; no test target
4787 (home-page "https://pypi.python.org/pypi/decorator/")
4788 (synopsis "Python module to simplify usage of decorators")
4789 (description
4790 "The aim of the decorator module is to simplify the usage of decorators
4791 for the average programmer, and to popularize decorators usage giving examples
4792 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4793 etc. The core of this module is a decorator factory.")
4794 (license license:expat)))
4795
4796 (define-public python2-decorator
4797 (package-with-python2 python-decorator))
4798
4799 (define-public python-drmaa
4800 (package
4801 (name "python-drmaa")
4802 (version "0.7.6")
4803 (source
4804 (origin
4805 (method url-fetch)
4806 (uri (string-append
4807 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4808 version ".tar.gz"))
4809 (sha256
4810 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4811 (build-system python-build-system)
4812 ;; The test suite requires libdrmaa which is provided by the cluster
4813 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4814 ;; should be set to the path of the libdrmaa library.
4815 (arguments '(#:tests? #f))
4816 (native-inputs
4817 `(("python-nose" ,python-nose)))
4818 (home-page "https://pypi.python.org/pypi/drmaa")
4819 (synopsis "Python bindings for the DRMAA library")
4820 (description
4821 "A Python package for Distributed Resource Management (DRM) job
4822 submission and control. This package is an implementation of the DRMAA 1.0
4823 Python language binding specification.")
4824 (license license:bsd-3)))
4825
4826 (define-public python2-drmaa
4827 (package-with-python2 python-drmaa))
4828
4829 (define-public python-gridmap
4830 (package
4831 (name "python-gridmap")
4832 (version "0.13.0")
4833 (source
4834 (origin
4835 (method url-fetch)
4836 (uri (string-append
4837 "https://github.com/pygridtools/gridmap/archive/v"
4838 version ".tar.gz"))
4839 (file-name (string-append name "-" version ".tar.gz"))
4840 (sha256
4841 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4842 (build-system python-build-system)
4843 (arguments
4844 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4845 (propagated-inputs
4846 `(("python-psutil" ,python-psutil)
4847 ("python-drmaa" ,python-drmaa)
4848 ("python-pyzmq" ,python-pyzmq)))
4849 (home-page "https://github.com/pygridtools/gridmap")
4850 (synopsis "Create jobs on a cluster directly from Python")
4851 (description
4852 "Gridmap is a Python package to allow you to easily create jobs on the
4853 cluster directly from Python. You can directly map Python functions onto the
4854 cluster without needing to write any wrapper code yourself.")
4855 (license license:gpl3+)))
4856
4857 (define-public python2-gridmap
4858 (package-with-python2 python-gridmap))
4859
4860 (define-public python-pexpect
4861 (package
4862 (name "python-pexpect")
4863 (version "4.2.1")
4864 (source
4865 (origin
4866 (method url-fetch)
4867 (uri (pypi-uri "pexpect" version))
4868 (sha256
4869 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4870 (build-system python-build-system)
4871 (arguments
4872 `(#:phases
4873 (modify-phases %standard-phases
4874 (add-before 'check 'prepare-tests
4875 (lambda _
4876 (substitute* (find-files "tests")
4877 (("/bin/ls") (which "ls"))
4878 (("/bin/echo") (which "echo"))
4879 (("/bin/which") (which "which"))
4880 ;; Many tests try to use the /bin directory which
4881 ;; is not present in the build environment.
4882 ;; Use one that's non-empty and unlikely to change.
4883 (("/bin'") "/dev'"))
4884 ;; XXX: Socket connection test gets "Connection reset by peer".
4885 ;; Why does it not work? Delete for now.
4886 (delete-file "tests/test_socket.py")
4887 #t))
4888 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4889 (native-inputs
4890 `(("python-nose" ,python-nose)
4891 ("python-pytest" ,python-pytest)
4892 ("man-db" ,man-db)
4893 ("which" ,which)))
4894 (propagated-inputs
4895 `(("python-ptyprocess" ,python-ptyprocess)))
4896 (home-page "http://pexpect.readthedocs.org/")
4897 (synopsis "Controlling interactive console applications")
4898 (description
4899 "Pexpect is a pure Python module for spawning child applications;
4900 controlling them; and responding to expected patterns in their output.
4901 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4902 child application and control it as if a human were typing commands.")
4903 (license license:isc)))
4904
4905 (define-public python2-pexpect
4906 (package-with-python2 python-pexpect))
4907
4908 (define-public python-setuptools-scm
4909 (package
4910 (name "python-setuptools-scm")
4911 (version "1.15.0")
4912 (source (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "setuptools_scm" version))
4915 (sha256
4916 (base32
4917 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4918 (build-system python-build-system)
4919 (home-page "https://github.com/pypa/setuptools_scm/")
4920 (synopsis "Manage Python package versions in SCM metadata")
4921 (description
4922 "Setuptools_scm handles managing your Python package versions in
4923 @dfn{software configuration management} (SCM) metadata instead of declaring
4924 them as the version argument or in a SCM managed file.")
4925 (license license:expat)))
4926
4927 (define-public python2-setuptools-scm
4928 (package-with-python2 python-setuptools-scm))
4929
4930 (define-public python-pathpy
4931 (package
4932 (name "python-pathpy")
4933 (version "8.1.1")
4934 (source
4935 (origin
4936 (method url-fetch)
4937 (uri (string-append "https://pypi.python.org/packages/source/p/"
4938 "path.py/path.py-" version ".tar.gz"))
4939 (sha256
4940 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4941 (outputs '("out" "doc"))
4942 (build-system python-build-system)
4943 (propagated-inputs
4944 `(("python-appdirs" ,python-appdirs)))
4945 (native-inputs
4946 `(("python-setuptools-scm" ,python-setuptools-scm)
4947 ("python-sphinx" ,python-sphinx)
4948 ("python-rst.linker" ,python-rst.linker)
4949 ("python-pytest" ,python-pytest)
4950 ("python-pytest-runner" ,python-pytest-runner)))
4951 (arguments
4952 `(#:phases
4953 (modify-phases %standard-phases
4954 (add-after 'build 'build-doc
4955 (lambda _
4956 (setenv "LANG" "en_US.UTF-8")
4957 (zero? (system* "python" "setup.py" "build_sphinx"))))
4958 (add-after 'install 'install-doc
4959 (lambda* (#:key outputs #:allow-other-keys)
4960 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4961 (doc (string-append data "/doc/" ,name "-" ,version))
4962 (html (string-append doc "/html")))
4963 (mkdir-p html)
4964 (for-each (lambda (file)
4965 (copy-file file (string-append doc "/" file)))
4966 '("README.rst" "CHANGES.rst"))
4967 (copy-recursively "build/sphinx/html" html)))))))
4968 (home-page "http://github.com/jaraco/path.py")
4969 (synopsis "Python module wrapper for built-in os.path")
4970 (description
4971 "@code{path.py} implements path objects as first-class entities, allowing
4972 common operations on files to be invoked on those path objects directly.")
4973 (license license:expat)))
4974
4975 (define-public python2-pathpy
4976 (package-with-python2 python-pathpy))
4977
4978 (define-public python-pickleshare
4979 (package
4980 (name "python-pickleshare")
4981 (version "0.5")
4982 (source
4983 (origin
4984 (method url-fetch)
4985 (uri (string-append "https://pypi.python.org/packages/source/p/"
4986 "pickleshare/pickleshare-" version ".tar.gz"))
4987 (sha256
4988 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4989 (build-system python-build-system)
4990 (propagated-inputs
4991 `(("python-pathpy" ,python-pathpy)))
4992 (home-page "https://github.com/vivainio/pickleshare")
4993 (synopsis "Tiny key value database with concurrency support")
4994 (description
4995 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4996 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4997 shelve, many processes can access the database simultaneously. Changing a
4998 value in database is immediately visible to other processes accessing the same
4999 database. Concurrency is possible because the values are stored in separate
5000 files. Hence the “database” is a directory where all files are governed by
5001 PickleShare.")
5002 (license license:expat)))
5003
5004 (define-public python2-pickleshare
5005 (package-with-python2 python-pickleshare))
5006
5007 (define-public python-simplegeneric
5008 (package
5009 (name "python-simplegeneric")
5010 (version "0.8.1")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (string-append "https://pypi.python.org/packages/source/s/"
5015 "simplegeneric/simplegeneric-" version ".zip"))
5016 (sha256
5017 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5018 (build-system python-build-system)
5019 (native-inputs
5020 `(("unzip" ,unzip)))
5021 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5022 (synopsis "Python module for simple generic functions")
5023 (description
5024 "The simplegeneric module lets you define simple single-dispatch generic
5025 functions, akin to Python’s built-in generic functions like @code{len()},
5026 @code{iter()} and so on. However, instead of using specially-named methods,
5027 these generic functions use simple lookup tables, akin to those used by
5028 e.g. @code{pickle.dump()} and other generic functions found in the Python
5029 standard library.")
5030 (license license:zpl2.1)))
5031
5032 (define-public python2-simplegeneric
5033 (package-with-python2 python-simplegeneric))
5034
5035 (define-public python-ipython-genutils
5036 ;; TODO: This package is retired, check if can be removed, see description.
5037 (package
5038 (name "python-ipython-genutils")
5039 (version "0.1.0")
5040 (source
5041 (origin
5042 (method url-fetch)
5043 (uri (string-append "https://pypi.python.org/packages/source/i/"
5044 "ipython_genutils/ipython_genutils-"
5045 version ".tar.gz"))
5046 (sha256
5047 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5048 (build-system python-build-system)
5049 (arguments `(#:tests? #f)) ; no tests
5050 (home-page "http://ipython.org")
5051 (synopsis "Vestigial utilities from IPython")
5052 (description
5053 "This package provides retired utilities from IPython. No packages
5054 outside IPython/Jupyter should depend on it.
5055
5056 This package shouldn't exist. It contains some common utilities shared by
5057 Jupyter and IPython projects during The Big Split. As soon as possible, those
5058 packages will remove their dependency on this, and this package will go
5059 away.")
5060 (license license:bsd-3)))
5061
5062 (define-public python2-ipython-genutils
5063 (package-with-python2 python-ipython-genutils))
5064
5065 (define-public python-traitlets
5066 (package
5067 (name "python-traitlets")
5068 (version "4.2.0")
5069 (source
5070 (origin
5071 (method url-fetch)
5072 (uri (pypi-uri "traitlets" version))
5073 (sha256
5074 (base32
5075 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5076 (build-system python-build-system)
5077 (arguments
5078 `(#:phases
5079 (modify-phases %standard-phases
5080 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5081 (propagated-inputs
5082 `(("python-ipython-genutils" ,python-ipython-genutils)
5083 ("python-decorator" ,python-decorator)))
5084 (native-inputs
5085 `(("python-mock" ,python-mock)
5086 ("python-nose" ,python-nose)))
5087 (home-page "http://ipython.org")
5088 (synopsis "Configuration system for Python applications")
5089 (description
5090 "Traitlets is a framework that lets Python classes have attributes with
5091 type checking, dynamically calculated default values, and ‘on change’
5092 callbacks. The package also includes a mechanism to use traitlets for
5093 configuration, loading values from files or from command line arguments. This
5094 is a distinct layer on top of traitlets, so you can use traitlets in your code
5095 without using the configuration machinery.")
5096 (license license:bsd-3)))
5097
5098 (define-public python2-traitlets
5099 (package-with-python2 python-traitlets))
5100
5101 (define-public python-jupyter-core
5102 (package
5103 (name "python-jupyter-core")
5104 (version "4.2.1")
5105 (source
5106 (origin
5107 (method url-fetch)
5108 (uri (string-append (pypi-uri "jupyter_core" version)))
5109 (sha256
5110 (base32
5111 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5112 (build-system python-build-system)
5113 ;; FIXME: not sure how to run the tests
5114 (arguments `(#:tests? #f))
5115 (propagated-inputs
5116 `(("python-traitlets" ,python-traitlets)))
5117 (home-page "http://jupyter.org/")
5118 (synopsis "Jupyter base package")
5119 (description
5120 "Jupyter core is the base package on which Jupyter projects rely.")
5121 (license license:bsd-3)))
5122
5123 (define-public python2-jupyter-core
5124 (package-with-python2 python-jupyter-core))
5125
5126 (define-public python-jupyter-client
5127 (package
5128 (name "python-jupyter-client")
5129 (version "4.4.0")
5130 (source
5131 (origin
5132 (method url-fetch)
5133 (uri (pypi-uri "jupyter_client" version))
5134 (sha256
5135 (base32
5136 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5137 (build-system python-build-system)
5138 ;; Tests fail because of missing native python kernel which I assume is
5139 ;; provided by the ipython package, which we cannot use because it would
5140 ;; cause a dependency cycle.
5141 (arguments `(#:tests? #f))
5142 (propagated-inputs
5143 `(("python-pyzmq" ,python-pyzmq)
5144 ("python-traitlets" ,python-traitlets)
5145 ("python-jupyter-core" ,python-jupyter-core)))
5146 (home-page "http://jupyter.org/")
5147 (synopsis "Jupyter protocol implementation and client libraries")
5148 (description
5149 "The @code{jupyter_client} package contains the reference implementation
5150 of the Jupyter protocol. It also provides client and kernel management APIs
5151 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5152 installing @code{kernelspec}s for use with Jupyter frontends.")
5153 (license license:bsd-3)))
5154
5155 (define-public python2-jupyter-client
5156 (package-with-python2 python-jupyter-client))
5157
5158 (define-public python-ipykernel
5159 (package
5160 (name "python-ipykernel")
5161 (version "4.5.2")
5162 (source
5163 (origin
5164 (method url-fetch)
5165 (uri (pypi-uri "ipykernel" version))
5166 (sha256
5167 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5168 (build-system python-build-system)
5169 ;; The tests load a submodule of IPython. However, IPython itself depends
5170 ;; on ipykernel.
5171 (arguments `(#:tests? #f))
5172 (propagated-inputs
5173 ;; imported at runtime during connect
5174 `(("python-jupyter-client" ,python-jupyter-client)))
5175 (home-page "http://ipython.org")
5176 (synopsis "IPython Kernel for Jupyter")
5177 (description
5178 "This package provides the IPython kernel for Jupyter.")
5179 (license license:bsd-3)))
5180
5181 (define-public python2-ipykernel
5182 (package-with-python2 python-ipykernel))
5183
5184 (define-public python-testpath
5185 (package
5186 (name "python-testpath")
5187 (version "0.2")
5188 (source
5189 (origin
5190 (method url-fetch)
5191 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5192 version ".tar.gz"))
5193 (file-name (string-append name "-" version ".tar.gz"))
5194 (sha256
5195 (base32
5196 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5197 (build-system python-build-system)
5198 (arguments
5199 `(#:tests? #f ; this package does not even have a setup.py
5200 #:modules ((guix build python-build-system)
5201 (guix build utils)
5202 (srfi srfi-1))
5203 #:imported-modules (,@%python-build-system-modules
5204 (srfi srfi-1))
5205 #:phases
5206 (modify-phases %standard-phases
5207 (delete 'install)
5208 (replace 'build
5209 (lambda* (#:key inputs outputs #:allow-other-keys)
5210 (let* ((version (last
5211 (string-split (assoc-ref inputs "python") #\-)))
5212 (x.y (string-join (take (string-split version #\.) 2)
5213 "."))
5214 (dir (string-append
5215 (assoc-ref outputs "out")
5216 "/lib/python" x.y "/site-packages/testpath")))
5217 (mkdir-p dir)
5218 (copy-recursively "testpath" dir))
5219 #t)))))
5220 (home-page "https://github.com/takluyver/testpath")
5221 (synopsis "Test utilities for code working with files and commands")
5222 (description
5223 "Testpath is a collection of utilities for Python code working with files
5224 and commands. It contains functions to check things on the filesystem, and
5225 tools for mocking system commands and recording calls to those.")
5226 (license license:expat)))
5227
5228 (define-public python2-testpath
5229 (package-with-python2 python-testpath))
5230
5231 (define-public python-ipython
5232 (package
5233 (name "python-ipython")
5234 (version "5.2.2")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (pypi-uri "ipython" version ".tar.gz"))
5239 (sha256
5240 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5241 (build-system python-build-system)
5242 (outputs '("out" "doc"))
5243 (propagated-inputs
5244 `(("python-pyzmq" ,python-pyzmq)
5245 ("python-prompt-toolkit" ,python-prompt-toolkit)
5246 ("python-terminado" ,python-terminado)
5247 ("python-matplotlib" ,python-matplotlib)
5248 ("python-numpy" ,python-numpy)
5249 ("python-numpydoc" ,python-numpydoc)
5250 ("python-jinja2" ,python-jinja2)
5251 ("python-mistune" ,python-mistune)
5252 ("python-pexpect" ,python-pexpect)
5253 ("python-pickleshare" ,python-pickleshare)
5254 ("python-simplegeneric" ,python-simplegeneric)
5255 ("python-jsonschema" ,python-jsonschema)
5256 ("python-traitlets" ,python-traitlets)
5257 ("python-ipykernel" ,python-ipykernel)
5258 ("python-nbformat" ,python-nbformat)
5259 ("python-pygments" ,python-pygments)))
5260 (inputs
5261 `(("readline" ,readline)
5262 ("which" ,which)))
5263 (native-inputs
5264 `(("graphviz" ,graphviz)
5265 ("pkg-config" ,pkg-config)
5266 ("python-requests" ,python-requests) ;; for tests
5267 ("python-testpath" ,python-testpath)
5268 ("python-nose" ,python-nose)
5269 ("python-sphinx" ,python-sphinx)
5270 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5271 ("texlive" ,texlive)
5272 ("texinfo" ,texinfo)))
5273 (arguments
5274 `(#:phases
5275 (modify-phases %standard-phases
5276 (add-after
5277 'install 'install-doc
5278 (lambda* (#:key inputs outputs #:allow-other-keys)
5279 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5280 (doc (string-append data "/doc/" ,name "-" ,version))
5281 (html (string-append doc "/html"))
5282 (man1 (string-append data "/man/man1"))
5283 (info (string-append data "/info"))
5284 (examples (string-append doc "/examples"))
5285 (python-arg (string-append "PYTHON=" (which "python"))))
5286 (setenv "LANG" "en_US.utf8")
5287 ;; Make installed package available for running the tests
5288 (add-installed-pythonpath inputs outputs)
5289 (with-directory-excursion "docs"
5290 ;; FIXME: pdf fails to build
5291 ;;(system* "make" "pdf" "PAPER=a4")
5292 (system* "make" python-arg "html")
5293 (system* "make" python-arg "info"))
5294 (copy-recursively "docs/man" man1)
5295 (copy-recursively "examples" examples)
5296 (copy-recursively "docs/build/html" html)
5297 ;; (copy-file "docs/build/latex/ipython.pdf"
5298 ;; (string-append doc "/ipython.pdf"))
5299 (mkdir-p info)
5300 (copy-file "docs/build/texinfo/ipython.info"
5301 (string-append info "/ipython.info"))
5302 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5303 ;; Tests can only be run after the library has been installed and not
5304 ;; within the source directory.
5305 (delete 'check)
5306 (add-after
5307 'install 'check
5308 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5309 (if tests?
5310 (with-directory-excursion "/tmp"
5311 ;; Make installed package available for running the tests
5312 (add-installed-pythonpath inputs outputs)
5313 (setenv "HOME" "/tmp/") ;; required by a test
5314 (zero? (system* (string-append (assoc-ref outputs "out")
5315 "/bin/iptest"))))
5316 #t)))
5317 (add-before
5318 'install 'fix-tests
5319 (lambda* (#:key inputs #:allow-other-keys)
5320 (substitute* "./IPython/utils/_process_posix.py"
5321 (("/usr/bin/env', 'which") (which "which")))
5322 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5323 (("#!/usr/bin/env python")
5324 (string-append "#!" (which "python"))))
5325 ;; Disable 1 failing test
5326 (substitute* "./IPython/core/tests/test_magic.py"
5327 (("def test_dirops\\(\\):" all)
5328 (string-append "@dec.skipif(True)\n" all))))))))
5329 (home-page "http://ipython.org")
5330 (synopsis "IPython is a tool for interactive computing in Python")
5331 (description
5332 "IPython provides a rich architecture for interactive computing with:
5333 Powerful interactive shells, a browser-based notebook, support for interactive
5334 data visualization, embeddable interpreters and tools for parallel
5335 computing.")
5336 (license license:bsd-3)
5337 (properties `((python2-variant . ,(delay python2-ipython))))))
5338
5339 (define-public python2-ipython
5340 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5341 (package
5342 (inherit ipython)
5343 ;; FIXME: add pyreadline once available.
5344 (propagated-inputs
5345 `(("python2-backports-shutil-get-terminal-size"
5346 ,python2-backports-shutil-get-terminal-size)
5347 ("python2-pathlib2" ,python2-pathlib2)
5348 ,@(package-propagated-inputs ipython)))
5349 (native-inputs
5350 `(("python2-mock" ,python2-mock)
5351 ,@(package-native-inputs ipython))))))
5352
5353 (define-public python-isodate
5354 (package
5355 (name "python-isodate")
5356 (version "0.5.4")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (pypi-uri "isodate" version))
5361 (sha256
5362 (base32
5363 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5364 (build-system python-build-system)
5365 (home-page
5366 "http://cheeseshop.python.org/pypi/isodate")
5367 (synopsis
5368 "Python date parser and formatter")
5369 (description
5370 "Python-isodate is a python module for parsing and formatting
5371 ISO 8601 dates, time and duration.")
5372 (license license:bsd-3)))
5373
5374 (define-public python2-isodate
5375 (package-with-python2 python-isodate))
5376
5377 (define-public python-html5lib
5378 (package
5379 (name "python-html5lib")
5380 (version "1.0b10")
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (pypi-uri "html5lib" version))
5385 (sha256
5386 (base32
5387 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5388 (build-system python-build-system)
5389 (propagated-inputs
5390 `(("python-six" ,python-six)
5391 ("python-webencodings" ,python-webencodings)))
5392 (arguments
5393 `(#:test-target "check"))
5394 (home-page
5395 "https://github.com/html5lib/html5lib-python")
5396 (synopsis
5397 "Python HTML parser based on the WHATWG HTML specifcation")
5398 (description
5399 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5400 and written in Python.")
5401 (license license:expat)))
5402
5403 (define-public python2-html5lib
5404 (package-with-python2 python-html5lib))
5405
5406 ;; Needed for python-bleach, a dependency of python-notebook
5407 (define-public python-html5lib-0.9
5408 (package
5409 (inherit python-html5lib)
5410 (version "0.999")
5411 (source
5412 (origin
5413 (method url-fetch)
5414 (uri (pypi-uri "html5lib" version))
5415 (sha256
5416 (base32
5417 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5418
5419 (define-public python2-html5lib-0.9
5420 (package-with-python2 python-html5lib-0.9))
5421
5422 (define-public python-webencodings
5423 (package
5424 (name "python-webencodings")
5425 (version "0.5")
5426 (source (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "webencodings" version))
5429 (sha256
5430 (base32
5431 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5432 (build-system python-build-system)
5433 (arguments
5434 '(#:phases
5435 (modify-phases %standard-phases
5436 (replace 'check
5437 (lambda _
5438 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5439 (native-inputs
5440 `(("python-pytest" ,python-pytest)))
5441 (home-page "https://github.com/SimonSapin/python-webencodings")
5442 (synopsis "Character encoding aliases for legacy web content")
5443 (description
5444 "In order to be compatible with legacy web content when interpreting
5445 something like @code{Content-Type: text/html; charset=latin1}, tools need
5446 to use a particular set of aliases for encoding labels as well as some
5447 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5448 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5449 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5450 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5451 defines all such details so that implementations do not have to
5452 reverse-engineer each other.
5453
5454 This module implements the Encoding standard and has encoding labels and
5455 BOM detection, but the actual implementation for encoders and decoders
5456 is Python’s.")
5457 (license license:bsd-3)))
5458
5459 (define-public python2-webencodings
5460 (package-with-python2 python-webencodings))
5461
5462 (define-public python-urwid
5463 (package
5464 (name "python-urwid")
5465 (version "1.3.1")
5466 (source
5467 (origin
5468 (method url-fetch)
5469 (uri (pypi-uri "urwid" version))
5470 (sha256
5471 (base32
5472 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5473 (build-system python-build-system)
5474 (arguments
5475 `(#:phases
5476 (modify-phases %standard-phases
5477 ;; Disable failing test. Bug filed upstream:
5478 ;; https://github.com/wardi/urwid/issues/164
5479 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5480 (add-after 'unpack 'disable-failing-test
5481 (lambda _
5482 (substitute* "urwid/tests/test_event_loops.py"
5483 (("test_remove_watch_file")
5484 "disable_remove_watch_file")))))))
5485 (home-page "http://urwid.org")
5486 (synopsis "Console user interface library for Python")
5487 (description
5488 "Urwid is a curses-based UI/widget library for Python. It includes many
5489 features useful for text console applications.")
5490 (license license:lgpl2.1+)))
5491
5492 (define-public python2-urwid
5493 (package-with-python2 python-urwid))
5494
5495 (define-public python-openid
5496 (package
5497 (name "python-openid")
5498 (version "3.0.10")
5499 (source
5500 (origin
5501 (method url-fetch)
5502 (uri (pypi-uri "python3-openid" version))
5503 (sha256
5504 (base32
5505 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5506 (build-system python-build-system)
5507 (home-page "https://github.com/necaris/python3-openid")
5508 (synopsis "OpenID support for servers and consumers")
5509 (description "This library provides OpenID authentication for Python, both
5510 for clients and servers.")
5511 (license license:asl2.0)))
5512
5513 (define-public python2-openid
5514 (package
5515 (name "python2-openid")
5516 (version "2.2.5")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "python-openid" version))
5521 (sha256
5522 (base32
5523 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5524 (build-system python-build-system)
5525 (arguments
5526 ;; Python 3 support is in `python3-openid`, a separate package.
5527 `(#:python ,python-2))
5528 (home-page "https://github.com/openid/python-openid")
5529 (synopsis "OpenID support for servers and consumers")
5530 (description "This library provides OpenID authentication for Python, both
5531 for clients and servers.")
5532 (license license:asl2.0)))
5533
5534 (define-public python-urwidtrees
5535 (package
5536 (name "python-urwidtrees")
5537 (version "1.0.2")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 ;; package author intends on distributing via github rather than pypi:
5542 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5543 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5544 version ".tar.gz"))
5545 (file-name (string-append name "-" version ".tar.gz"))
5546 (sha256
5547 (base32
5548 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5549 (build-system python-build-system)
5550 (arguments
5551 '(#:tests? #f)) ; no tests
5552 (propagated-inputs `(("python-urwid" ,python-urwid)))
5553 (home-page "https://github.com/pazz/urwidtrees")
5554 (synopsis "Tree widgets for urwid")
5555 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5556 toolkit. Use it to build trees of widgets.")
5557 (license license:gpl3+)))
5558
5559 (define-public python2-urwidtrees
5560 (package-with-python2 python-urwidtrees))
5561
5562 (define-public python-dbus
5563 (package
5564 (name "python-dbus")
5565 (version "1.2.0")
5566 (source
5567 (origin
5568 (method url-fetch)
5569 (uri (string-append
5570 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5571 version ".tar.gz"))
5572 (sha256
5573 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5574 (build-system gnu-build-system)
5575 (arguments
5576 '(#:phases
5577 (modify-phases %standard-phases
5578 (add-before
5579 'check 'pre-check
5580 (lambda _
5581 ;; XXX: For the missing '/etc/machine-id'.
5582 (substitute* "test/run-test.sh"
5583 (("DBUS_FATAL_WARNINGS=1")
5584 "DBUS_FATAL_WARNINGS=0"))
5585 #t)))))
5586 (native-inputs
5587 `(("pkg-config" ,pkg-config)))
5588 (inputs
5589 `(("python" ,python)
5590 ("dbus-glib" ,dbus-glib)))
5591 (synopsis "Python bindings for D-bus")
5592 (description "python-dbus provides bindings for libdbus, the reference
5593 implementation of D-Bus.")
5594 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5595 (license license:expat)))
5596
5597 (define-public python2-dbus
5598 (package (inherit python-dbus)
5599 (name "python2-dbus")
5600 (inputs `(("python" ,python-2)
5601 ,@(alist-delete "python"
5602 (package-inputs python-dbus)
5603 equal?)))
5604 ;; FIXME: on Python 2, the test_utf8 fails with:
5605 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5606 (arguments `(#:tests? #f))))
5607
5608 (define-public python-apsw
5609 (package
5610 (name "python-apsw")
5611 (version "3.9.2-r1")
5612 (source
5613 (origin
5614 (method url-fetch)
5615 (uri (pypi-uri "apsw" version))
5616 (sha256
5617 (base32
5618 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5619 (build-system python-build-system)
5620 (inputs
5621 `(("sqlite" ,sqlite)))
5622 (arguments
5623 `(#:phases
5624 (modify-phases %standard-phases
5625 (delete 'check)
5626 (add-after 'install 'check
5627 (lambda* (#:key inputs outputs #:allow-other-keys)
5628 (add-installed-pythonpath inputs outputs)
5629 (zero? (system* "python" "setup.py" "test")))))))
5630 (home-page "https://github.com/rogerbinns/apsw/")
5631 (synopsis "Another Python SQLite Wrapper")
5632 (description "APSW is a Python wrapper for the SQLite
5633 embedded relational database engine. In contrast to other wrappers such as
5634 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5635 translate the complete SQLite API into Python.")
5636 (license license:zlib)))
5637
5638 (define-public python2-apsw
5639 (package-with-python2 python-apsw))
5640
5641 (define-public python-lxml
5642 (package
5643 (name "python-lxml")
5644 (version "3.6.0")
5645 (source
5646 (origin
5647 (method url-fetch)
5648 (uri (pypi-uri "lxml" version))
5649 (sha256
5650 (base32
5651 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5652 (build-system python-build-system)
5653 (inputs
5654 `(("libxml2" ,libxml2)
5655 ("libxslt" ,libxslt)))
5656 (home-page "http://lxml.de/")
5657 (synopsis
5658 "Python XML processing library")
5659 (description
5660 "The lxml XML toolkit is a Pythonic binding for the C libraries
5661 libxml2 and libxslt.")
5662 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5663
5664 (define-public python2-lxml
5665 (package-with-python2 python-lxml))
5666
5667 ;; beautifulsoup4 has a totally different namespace than 3.x,
5668 ;; and pypi seems to put it under its own name, so I guess we should too
5669 (define-public python-beautifulsoup4
5670 (package
5671 (name "python-beautifulsoup4")
5672 (version "4.5.1")
5673 (source
5674 (origin
5675 (method url-fetch)
5676 (uri (pypi-uri "beautifulsoup4" version))
5677 (sha256
5678 (base32
5679 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5680 (build-system python-build-system)
5681 (arguments
5682 `(#:phases
5683 (modify-phases %standard-phases
5684 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5685 ;; must use this conversion script when building with Python 3. The
5686 ;; conversion script also runs the tests.
5687 ;; For more information, see the file 'convert-py3k' in the source
5688 ;; distribution.
5689 (replace 'check
5690 (lambda _ (zero? (system* "./convert-py3k")))))))
5691 (home-page
5692 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5693 (synopsis
5694 "Python screen-scraping library")
5695 (description
5696 "Beautiful Soup is a Python library designed for rapidly setting up
5697 screen-scraping projects. It offers Pythonic idioms for navigating,
5698 searching, and modifying a parse tree, providing a toolkit for
5699 dissecting a document and extracting what you need. It automatically
5700 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5701 (license license:expat)
5702 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5703
5704 (define-public python2-beautifulsoup4
5705 (package
5706 (inherit (package-with-python2
5707 (strip-python2-variant python-beautifulsoup4)))
5708 (arguments `(#:python ,python-2))))
5709
5710 (define-public python-cssutils
5711 (package
5712 (name "python-cssutils")
5713 (version "1.0.1")
5714 (source
5715 (origin
5716 (method url-fetch)
5717 (uri (pypi-uri "cssutils" version))
5718 (sha256
5719 (base32
5720 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5721 (build-system python-build-system)
5722 (native-inputs
5723 `(("unzip" ,unzip))) ; for unpacking the source
5724 (arguments
5725 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5726 (home-page "http://cthedot.de/cssutils/")
5727 (synopsis
5728 "CSS Cascading Style Sheets library for Python")
5729 (description
5730 "Cssutils is a Python package for parsing and building CSS
5731 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5732 options.")
5733 (license license:lgpl3+)))
5734
5735 (define-public python2-cssutils
5736 (package-with-python2 python-cssutils))
5737
5738 (define-public python-cssselect
5739 (package
5740 (name "python-cssselect")
5741 (version "0.9.2")
5742 (source
5743 (origin
5744 (method url-fetch)
5745 (uri (pypi-uri "cssselect" version))
5746 (sha256
5747 (base32
5748 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5749 (build-system python-build-system)
5750 (arguments
5751 ;; tests fail with message
5752 ;; AttributeError: 'module' object has no attribute 'tests'
5753 `(#:tests? #f))
5754 (home-page
5755 "https://pythonhosted.org/cssselect/")
5756 (synopsis
5757 "CSS3 selector parser and translator to XPath 1.0")
5758 (description
5759 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5760 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5761 another XPath engine to find the matching elements in an XML or HTML document.")
5762 (license license:bsd-3)))
5763
5764 (define-public python2-cssselect
5765 (package-with-python2 python-cssselect))
5766
5767 (define-public python-openid-cla
5768 (package
5769 (name "python-openid-cla")
5770 (version "1.2")
5771 (source
5772 (origin
5773 (method url-fetch)
5774 (uri (pypi-uri "python-openid-cla" version))
5775 (sha256
5776 (base32
5777 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5778 (build-system python-build-system)
5779 (arguments '(#:tests? #f)) ; No tests.
5780 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5781 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5782 (description "@code{openid-cla} is an implementation of the OpenID
5783 contributor license agreement extension for python-openid.")
5784 (license license:bsd-3)))
5785
5786 (define-public python2-openid-cla
5787 (package-with-python2 python-openid-cla))
5788
5789 (define-public python-openid-teams
5790 (package
5791 (name "python-openid-teams")
5792 (version "1.1")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (pypi-uri "python-openid-teams" version))
5797 (sha256
5798 (base32
5799 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5800 (build-system python-build-system)
5801 (arguments '(#:tests? #f)) ; No tests.
5802 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5803 (synopsis "Implementation of the OpenID teams extension for python-openid")
5804 (description
5805 "@code{openid-teams} is an implementation of the OpenID
5806 teams extension for python-openid.")
5807 (license license:bsd-3)))
5808
5809 (define-public python2-openid-teams
5810 (package-with-python2 python-openid-teams))
5811
5812 (define-public python-netifaces
5813 (package
5814 (name "python-netifaces")
5815 (version "0.10.4")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (string-append
5820 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5821 version
5822 ".tar.gz"))
5823 (sha256
5824 (base32
5825 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5826 (build-system python-build-system)
5827 (home-page
5828 "https://bitbucket.org/al45tair/netifaces")
5829 (synopsis
5830 "Python module for portable network interface information")
5831 (description
5832 "Netifaces is a Python module providing information on network
5833 interfaces in an easy and portable manner.")
5834 (license license:expat)))
5835
5836 (define-public python2-netifaces
5837 (package-with-python2 python-netifaces))
5838
5839 (define-public python-networkx
5840 (package
5841 (name "python-networkx")
5842 (version "1.11")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "networkx" version))
5847 (sha256
5848 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5849 (build-system python-build-system)
5850 ;; python-decorator is needed at runtime
5851 (propagated-inputs
5852 `(("python-decorator" ,python-decorator)))
5853 (native-inputs
5854 `(("python-nose" ,python-nose)))
5855 (home-page "http://networkx.github.io/")
5856 (synopsis "Python module for creating and manipulating graphs and networks")
5857 (description
5858 "NetworkX is a Python package for the creation, manipulation, and study
5859 of the structure, dynamics, and functions of complex networks.")
5860 (license license:bsd-3)))
5861
5862 (define-public python2-networkx
5863 (package-with-python2 python-networkx))
5864
5865 (define-public snakemake
5866 (package
5867 (name "snakemake")
5868 (version "3.9.0")
5869 (source
5870 (origin
5871 (method url-fetch)
5872 (uri (pypi-uri "snakemake" version))
5873 (sha256
5874 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
5875 (build-system python-build-system)
5876 (arguments
5877 ;; TODO: Package missing test dependencies.
5878 '(#:tests? #f))
5879 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5880 (synopsis "Python-based execution environment for make-like workflows")
5881 (description
5882 "Snakemake aims to reduce the complexity of creating workflows by
5883 providing a clean and modern domain specific specification language (DSL) in
5884 Python style, together with a fast and comfortable execution environment.")
5885 (license license:expat)))
5886
5887 (define-public python-seaborn
5888 (package
5889 (name "python-seaborn")
5890 (version "0.7.1")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (pypi-uri "seaborn" version))
5895 (sha256
5896 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5897 (build-system python-build-system)
5898 (arguments
5899 '(#:tests? #f)) ; Tests requires a running X11 server.
5900 (propagated-inputs
5901 `(("python-pandas" ,python-pandas)
5902 ("python-matplotlib" ,python-matplotlib)
5903 ("python-scipy" ,python-scipy)))
5904 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5905 (synopsis "Statistical data visualization")
5906 (description
5907 "Seaborn is a library for making attractive and informative statistical
5908 graphics in Python. It is built on top of matplotlib and tightly integrated
5909 with the PyData stack, including support for numpy and pandas data structures
5910 and statistical routines from scipy and statsmodels.")
5911 (license license:bsd-3)
5912 (properties `((python2-variant . ,(delay python2-seaborn))))))
5913
5914 (define-public python2-seaborn
5915 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5916 (package
5917 (inherit base)
5918 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5919 ,@(package-propagated-inputs base))))))
5920
5921 (define-public python-mpmath
5922 (package
5923 (name "python-mpmath")
5924 (version "0.19")
5925 (source (origin
5926 (method url-fetch)
5927 (uri (string-append "http://mpmath.org/files/mpmath-"
5928 version ".tar.gz"))
5929 (sha256
5930 (base32
5931 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5932 (build-system python-build-system)
5933 (arguments
5934 '(#:phases
5935 (modify-phases %standard-phases
5936 (replace 'check
5937 (lambda _
5938 (zero?
5939 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5940 (home-page "http://mpmath.org")
5941 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5942 (description
5943 "@code{mpmath} can be used as an arbitrary-precision substitute for
5944 Python's float/complex types and math/cmath modules, but also does much
5945 more advanced mathematics.")
5946 (license license:bsd-3)))
5947
5948 (define-public python2-mpmath
5949 (package-with-python2 python-mpmath))
5950
5951 (define-public python-sympy
5952 (package
5953 (name "python-sympy")
5954 (version "1.0")
5955 (source
5956 (origin
5957 (method url-fetch)
5958 (uri (string-append
5959 "https://github.com/sympy/sympy/releases/download/sympy-"
5960 version "/sympy-" version ".tar.gz"))
5961 (sha256
5962 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
5963 (build-system python-build-system)
5964 (propagated-inputs
5965 `(("python-mpmath" ,python-mpmath)))
5966 (home-page "http://www.sympy.org/")
5967 (synopsis "Python library for symbolic mathematics")
5968 (description
5969 "SymPy is a Python library for symbolic mathematics. It aims to become a
5970 full-featured computer algebra system (CAS) while keeping the code as simple
5971 as possible in order to be comprehensible and easily extensible.")
5972 (license license:bsd-3)))
5973
5974 (define-public python2-sympy
5975 (package-with-python2 python-sympy))
5976
5977 (define-public python-q
5978 (package
5979 (name "python-q")
5980 (version "2.6")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "q" version))
5985 (sha256
5986 (base32
5987 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5988 (build-system python-build-system)
5989 (home-page "https://github.com/zestyping/q")
5990 (synopsis "Quick-and-dirty debugging output for tired programmers")
5991 (description
5992 "q is a Python module for \"print\" style of debugging Python code. It
5993 provides convenient short API for print out of values, tracebacks, and
5994 falling into the Python interpreter.")
5995 (license license:asl2.0)))
5996
5997 (define-public python2-q
5998 (package-with-python2 python-q))
5999
6000 (define-public python-testlib
6001 (package
6002 (name "python-testlib")
6003 (version "0.6.5")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (string-append
6008 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6009 version ".zip"))
6010 (sha256
6011 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6012 (build-system python-build-system)
6013 (native-inputs
6014 `(("unzip" ,unzip))) ; for unpacking the source
6015 (synopsis "Python micro test suite harness")
6016 (description "A micro unittest suite harness for Python.")
6017 (home-page "https://github.com/trentm/testlib")
6018 (license license:expat)))
6019
6020 (define-public python2-testlib
6021 (package-with-python2 python-testlib))
6022
6023 (define-public python2-xlib
6024 (package
6025 (name "python2-xlib")
6026 (version "0.14")
6027 (source (origin
6028 (method url-fetch)
6029 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6030 "/" version "/"
6031 "python-xlib-" version ".tar.gz"))
6032 (sha256
6033 (base32
6034 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6035 (build-system python-build-system)
6036 (arguments
6037 `(#:python ,python-2 ;Python 2 only
6038 #:tests? #f)) ;no tests
6039 (home-page "http://python-xlib.sourceforge.net/")
6040 (synopsis "Python X11 client library")
6041 (description
6042 "The Python X Library is intended to be a fully functional X client
6043 library for Python programs. It is useful to implement low-level X clients.
6044 It is written entirely in Python.")
6045 (license license:gpl2+)))
6046
6047 (define-public python-singledispatch
6048 (package
6049 (name "python-singledispatch")
6050 (version "3.4.0.3")
6051 (source
6052 (origin
6053 (method url-fetch)
6054 (uri (pypi-uri "singledispatch" version))
6055 (sha256
6056 (base32
6057 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6058 (build-system python-build-system)
6059 (native-inputs
6060 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6061 (home-page
6062 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6063 (synopsis "Backport of singledispatch feature from Python 3.4")
6064 (description
6065 "This library brings functools.singledispatch from Python 3.4 to Python
6066 2.6-3.3.")
6067 (license license:expat)))
6068
6069 (define-public python2-singledispatch
6070 (package-with-python2 python-singledispatch))
6071
6072 (define-public python-tornado
6073 (package
6074 (name "python-tornado")
6075 (version "4.3")
6076 (source
6077 (origin
6078 (method url-fetch)
6079 (uri (pypi-uri "tornado" version))
6080 (sha256
6081 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
6082 (build-system python-build-system)
6083 (arguments
6084 '(;; FIXME: Two tests error out with:
6085 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6086 ;; #:phases
6087 ;; (modify-phases %standard-phases
6088 ;; (replace 'check
6089 ;; (lambda _
6090 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6091 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6092 ;; (zero? (system* "python" "-m" "tornado.test")))))
6093 #:tests? #f))
6094 (native-inputs
6095 `(("python-certifi" ,python-certifi)))
6096 (propagated-inputs
6097 `(("python-backports-abc" ,python-backports-abc)))
6098 (home-page "http://www.tornadoweb.org/")
6099 (synopsis "Python web framework and asynchronous networking library")
6100 (description
6101 "Tornado is a Python web framework and asynchronous networking library,
6102 originally developed at FriendFeed. By using non-blocking network I/O,
6103 Tornado can scale to tens of thousands of open connections, making it ideal
6104 for long polling, WebSockets, and other applications that require a long-lived
6105 connection to each user.")
6106 (license license:asl2.0)
6107 (properties `((python2-variant . ,(delay python2-tornado))))))
6108
6109 (define-public python2-tornado
6110 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6111 (package (inherit tornado)
6112 (propagated-inputs
6113 `(("python2-backport-ssl-match-hostname"
6114 ,python2-backport-ssl-match-hostname)
6115 ("python2-singledispatch" ,python2-singledispatch)
6116 ,@(package-propagated-inputs tornado))))))
6117
6118 ;; the python- version can be removed with python-3.5
6119 (define-public python-backports-abc
6120 (package
6121 (name "python-backports-abc")
6122 (version "0.5")
6123 (source
6124 (origin
6125 (method url-fetch)
6126 (uri (pypi-uri "backports_abc" version))
6127 (sha256
6128 (base32
6129 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6130 (build-system python-build-system)
6131 (home-page "https://github.com/cython/backports_abc")
6132 (synopsis "Backport of additions to the 'collections.abc' module")
6133 (description
6134 "Python-backports-abc provides a backport of additions to the
6135 'collections.abc' module in Python-3.5.")
6136 (license license:psfl)))
6137
6138 (define-public python2-backports-abc
6139 (package-with-python2 python-backports-abc))
6140
6141 (define-public python2-backports-shutil-get-terminal-size
6142 (package
6143 (name "python2-backports-shutil-get-terminal-size")
6144 (version "1.0.0")
6145 (source
6146 (origin
6147 (method url-fetch)
6148 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6149 (sha256
6150 (base32
6151 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6152 (build-system python-build-system)
6153 (arguments
6154 `(#:python ,python-2
6155 #:phases
6156 (modify-phases %standard-phases
6157 (replace 'check
6158 (lambda _
6159 (zero? (system* "py.test" "-v")))))))
6160 (native-inputs
6161 `(("python2-pytest" ,python2-pytest)))
6162 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6163 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6164 (description
6165 "This package provides a backport of the @code{get_terminal_size
6166 function} from Python 3.3's @code{shutil}.
6167 Unlike the original version it is written in pure Python rather than C,
6168 so it might be a tiny bit slower.")
6169 (license license:expat)))
6170
6171 (define-public python-waf
6172 (package
6173 (name "python-waf")
6174 (version "1.9.5")
6175 (source (origin
6176 (method url-fetch)
6177 (uri (string-append "https://waf.io/"
6178 "waf-" version ".tar.bz2"))
6179 (sha256
6180 (base32
6181 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
6182 (build-system python-build-system)
6183 (arguments
6184 '(#:phases
6185 (modify-phases %standard-phases
6186 (replace 'build
6187 (lambda _
6188 (zero? (system* "python" "waf-light" "configure" "build"))))
6189 (replace 'check
6190 (lambda _
6191 (zero? (system* "python" "waf" "--version"))))
6192 (replace 'install
6193 (lambda _
6194 (copy-file "waf" %output))))))
6195 (home-page "http://waf.io/")
6196 (synopsis "Python-based build system")
6197 (description
6198 "Waf is a Python-based framework for configuring, compiling and installing
6199 applications.")
6200 (license license:bsd-3)))
6201
6202 (define-public python2-waf
6203 (package-with-python2 python-waf))
6204
6205 (define-public python-pyzmq
6206 (package
6207 (name "python-pyzmq")
6208 (version "15.1.0")
6209 (source
6210 (origin
6211 (method url-fetch)
6212 (uri (pypi-uri "pyzmq" version))
6213 (sha256
6214 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6215 (build-system python-build-system)
6216 (arguments
6217 `(#:configure-flags
6218 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6219 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6220 ;; --inplace' for 'python setup.py test' to work.
6221 #:tests? #f))
6222 (inputs
6223 `(("zeromq" ,zeromq)))
6224 (native-inputs
6225 `(("pkg-config" ,pkg-config)
6226 ("python-nose" ,python-nose)))
6227 (home-page "http://github.com/zeromq/pyzmq")
6228 (synopsis "Python bindings for 0MQ")
6229 (description
6230 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6231 (license license:bsd-4)))
6232
6233 (define-public python2-pyzmq
6234 (package-with-python2 python-pyzmq))
6235
6236 (define-public python-pep8
6237 (package
6238 (name "python-pep8")
6239 (version "1.7.0")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "pep8" version))
6244 (sha256
6245 (base32
6246 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6247 (build-system python-build-system)
6248 (home-page "http://pep8.readthedocs.org/")
6249 (synopsis "Python style guide checker")
6250 (description
6251 "This tools checks Python code against some of the style conventions in
6252 PEP 8.")
6253 (license license:expat)))
6254
6255 (define-public python2-pep8
6256 (package-with-python2 python-pep8))
6257
6258 (define-public python-pyflakes
6259 (package
6260 (name "python-pyflakes")
6261 (version "1.0.0")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "pyflakes" version))
6266 (sha256
6267 (base32
6268 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6269 (build-system python-build-system)
6270 (home-page
6271 "https://github.com/pyflakes/pyflakes")
6272 (synopsis "Passive checker of Python programs")
6273 (description
6274 "Pyflakes statically checks Python source code for common errors.")
6275 (license license:expat)))
6276
6277 (define-public python2-pyflakes
6278 (package-with-python2 python-pyflakes))
6279
6280 (define-public python-mccabe
6281 (package
6282 (name "python-mccabe")
6283 (version "0.4.0")
6284 (source
6285 (origin
6286 (method url-fetch)
6287 (uri (pypi-uri "mccabe" version))
6288 (sha256
6289 (base32
6290 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6291 (build-system python-build-system)
6292 (native-inputs
6293 `(("python-pytest" ,python-pytest)
6294 ("python-pytest-runner" ,python-pytest-runner)))
6295 (home-page "https://github.com/flintwork/mccabe")
6296 (synopsis "McCabe checker, plugin for flake8")
6297 (description
6298 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6299 complexity of Python source code.")
6300 (license license:expat)))
6301
6302 (define-public python2-mccabe
6303 (package-with-python2 python-mccabe))
6304
6305 (define-public python-mccabe-0.2.1
6306 (package (inherit python-mccabe)
6307 (version "0.2.1")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "mccabe" version))
6312 (sha256
6313 (base32
6314 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6315
6316 (define-public python2-mccabe-0.2.1
6317 (package-with-python2 python-mccabe-0.2.1))
6318
6319 ;; Flake8 2.4.1 requires an older version of pep8.
6320 ;; This should be removed ASAP.
6321 (define-public python-pep8-1.5.7
6322 (package (inherit python-pep8)
6323 (version "1.5.7")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (string-append
6328 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6329 version
6330 ".tar.gz"))
6331 (sha256
6332 (base32
6333 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6334 (arguments
6335 ;; XXX Tests not compatible with Python 3.5.
6336 '(#:tests? #f))))
6337
6338 (define-public python2-pep8-1.5.7
6339 (package-with-python2 python-pep8-1.5.7))
6340
6341 ;; Flake8 2.4.1 requires an older version of pyflakes.
6342 ;; This should be removed ASAP.
6343 (define-public python-pyflakes-0.8.1
6344 (package (inherit python-pyflakes)
6345 (version "0.8.1")
6346 (source
6347 (origin
6348 (method url-fetch)
6349 (uri (string-append
6350 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6351 version
6352 ".tar.gz"))
6353 (sha256
6354 (base32
6355 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6356 (arguments
6357 ;; XXX Tests not compatible with Python 3.5.
6358 '(#:tests? #f))))
6359
6360 (define-public python2-pyflakes-0.8.1
6361 (package-with-python2 python-pyflakes-0.8.1))
6362
6363 (define-public python-flake8
6364 (package
6365 (name "python-flake8")
6366 (version "2.5.4")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "flake8" version))
6371 (sha256
6372 (base32
6373 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6374 (modules '((guix build utils)))
6375 (snippet
6376 '(begin
6377 ;; Remove pre-compiled .pyc files from source.
6378 (for-each delete-file-recursively
6379 (find-files "." "__pycache__" #:directories? #t))
6380 (for-each delete-file (find-files "." "\\.pyc$"))
6381 #t))))
6382 (build-system python-build-system)
6383 (propagated-inputs
6384 `(("python-pep8" ,python-pep8)
6385 ("python-pyflakes" ,python-pyflakes)
6386 ("python-mccabe" ,python-mccabe)))
6387 (native-inputs
6388 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6389 ("python-nose" ,python-nose)))
6390 (home-page "https://gitlab.com/pycqa/flake8")
6391 (synopsis
6392 "The modular source code checker: pep8, pyflakes and co")
6393 (description
6394 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6395 (license license:expat)))
6396
6397 (define-public python2-flake8
6398 (package-with-python2 python-flake8))
6399
6400 ;; This will only be needed by the python-hacking package and will not be
6401 ;; necessary once python-hacking > 0.10.2 is released.
6402 (define-public python-flake8-2.2.4
6403 (package (inherit python-flake8)
6404 (propagated-inputs
6405 `(("python-pep8" ,python-pep8-1.5.7)
6406 ("python-pyflakes" ,python-pyflakes-0.8.1)
6407 ("python-mccabe" ,python-mccabe-0.2.1)))
6408 (native-inputs
6409 `(("python-mock" ,python-mock)
6410 ("python-nose" ,python-nose)))
6411 (version "2.2.4")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "flake8" version))
6416 (sha256
6417 (base32
6418 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6419 (modules '((guix build utils)))
6420 (snippet
6421 '(begin
6422 ;; Remove pre-compiled .pyc files from source.
6423 (for-each delete-file-recursively
6424 (find-files "." "__pycache__" #:directories? #t))
6425 (for-each delete-file (find-files "." "\\.pyc$"))
6426 #t))))
6427 (arguments
6428 ;; XXX Fails with Python 3.5.
6429 '(#:tests? #f))))
6430
6431 (define-public python2-flake8-2.2.4
6432 (package-with-python2 python-flake8-2.2.4))
6433
6434 (define-public python-flake8-polyfill
6435 (package
6436 (name "python-flake8-polyfill")
6437 (version "1.0.1")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "flake8-polyfill" version))
6442 (sha256
6443 (base32
6444 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6445 (build-system python-build-system)
6446 (arguments
6447 '(#:phases
6448 (modify-phases %standard-phases
6449 (replace 'check
6450 (lambda _
6451 (setenv "PYTHONPATH"
6452 (string-append (getcwd) "/build/lib:"
6453 (getenv "PYTHONPATH")))
6454 (zero? (system* "py.test" "-v")))))))
6455 (native-inputs
6456 `(("python-flake8" ,python-flake8)
6457 ("python-mock" ,python-mock)
6458 ("python-pycodestyle" ,python-pycodestyle)
6459 ("python-pytest" ,python-pytest)))
6460 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6461 (synopsis "Polyfill package for Flake8 plugins")
6462 (description
6463 "This package that provides some compatibility helpers for Flake8
6464 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6465 (license license:expat)))
6466
6467 (define-public python2-flake8-polyfill
6468 (package-with-python2 python-flake8-polyfill))
6469
6470 (define-public python-mistune
6471 (package
6472 (name "python-mistune")
6473 (version "0.7.3")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "mistune" version))
6478 (sha256
6479 (base32
6480 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6481 (build-system python-build-system)
6482 (native-inputs
6483 `(("python-nose" ,python-nose)
6484 ("python-cython" ,python-cython)))
6485 (home-page "https://github.com/lepture/mistune")
6486 (synopsis "Markdown parser in pure Python")
6487 (description "This package provides a fast markdown parser in pure
6488 Python.")
6489 (license license:bsd-3)))
6490
6491 (define-public python2-mistune
6492 (package-with-python2 python-mistune))
6493
6494 (define-public python-markdown
6495 (package
6496 (name "python-markdown")
6497 (version "2.6.7")
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (pypi-uri "Markdown" version))
6502 (sha256
6503 (base32
6504 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6505 (build-system python-build-system)
6506 (arguments
6507 `(#:phases
6508 (modify-phases %standard-phases
6509 (replace 'check
6510 (lambda _
6511 (zero? (system* "python" "run-tests.py")))))))
6512 (native-inputs
6513 `(("python-nose" ,python-nose)
6514 ("python-pyyaml" ,python-pyyaml)))
6515 (home-page "https://pythonhosted.org/Markdown/")
6516 (synopsis "Python implementation of Markdown")
6517 (description
6518 "This package provides a Python implementation of John Gruber's
6519 Markdown. The library features international input, various Markdown
6520 extensions, and several HTML output formats. A command line wrapper
6521 markdown_py is also provided to convert Markdown files to HTML.")
6522 (license license:bsd-3)))
6523
6524 (define-public python2-markdown
6525 (package-with-python2 python-markdown))
6526
6527 (define-public python-ptyprocess
6528 (package
6529 (name "python-ptyprocess")
6530 (version "0.5")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (string-append
6535 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6536 version ".tar.gz"))
6537 (sha256
6538 (base32
6539 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6540 (build-system python-build-system)
6541 (native-inputs
6542 `(("python-nose" ,python-nose)))
6543 (arguments
6544 `(#:phases
6545 (modify-phases %standard-phases
6546 (replace 'check
6547 (lambda _
6548 (zero? (system* "nosetests")))))))
6549 (home-page "https://github.com/pexpect/ptyprocess")
6550 (synopsis "Run a subprocess in a pseudo terminal")
6551 (description
6552 "This package provides a Python library used to launch a subprocess in a
6553 pseudo terminal (pty), and interact with both the process and its pty.")
6554 (license license:isc)))
6555
6556 (define-public python2-ptyprocess
6557 (package-with-python2 python-ptyprocess))
6558
6559 (define-public python-cram
6560 (package
6561 (name "python-cram")
6562 (version "0.7")
6563 (home-page "https://bitheap.org/cram/")
6564 (source (origin
6565 (method url-fetch)
6566 (uri (list (string-append home-page "cram-"
6567 version ".tar.gz")
6568 (pypi-uri "cram" version)))
6569 (sha256
6570 (base32
6571 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6572 (arguments
6573 '(#:phases
6574 (modify-phases %standard-phases
6575 (add-after 'unpack 'patch-source
6576 (lambda _
6577 (substitute* (find-files "cram" ".*\\.py$")
6578 ;; Replace default shell path.
6579 (("/bin/sh") (which "sh")))
6580 (substitute* (find-files "tests" ".*\\.t$")
6581 (("md5") "md5sum")
6582 (("/bin/bash") (which "bash"))
6583 (("/bin/sh") (which "sh")))
6584 (substitute* "cram/_test.py"
6585 ;; This hack works around a bug triggered by substituting
6586 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6587 ;; "cram -h", which breaks the output at 80 characters. This
6588 ;; causes the line showing the default shell to break into two
6589 ;; lines, but the test expects a single line...
6590 (("env\\['COLUMNS'\\] = '80'")
6591 "env['COLUMNS'] = '160'"))
6592 #t))
6593 (delete 'check)
6594 (add-after 'install 'check
6595 ;; The test phase uses the built library and executable.
6596 ;; It's easier to run it after install since the build
6597 ;; directory contains version-specific PATH.
6598 (lambda* (#:key inputs outputs #:allow-other-keys)
6599 (add-installed-pythonpath inputs outputs)
6600 (setenv "PATH" (string-append (getenv "PATH") ":"
6601 (assoc-ref outputs "out") "/bin"))
6602 (zero? (system* "make" "test")))))))
6603 (build-system python-build-system)
6604 (native-inputs
6605 `(("python-coverage" ,python-coverage)
6606 ("which" ,which)))
6607 (synopsis "Simple testing framework for command line applications")
6608 (description
6609 "Cram is a functional testing framework for command line applications.
6610 Cram tests look like snippets of interactive shell sessions. Cram runs each
6611 command and compares the command output in the test with the command’s actual
6612 output.")
6613 (license license:gpl2+)))
6614
6615 (define-public python2-cram
6616 (package-with-python2 python-cram))
6617
6618 (define-public python-terminado
6619 (package
6620 (name "python-terminado")
6621 (version "0.6")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "terminado" version))
6626 (sha256
6627 (base32
6628 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6629 (build-system python-build-system)
6630 (propagated-inputs
6631 `(("python-tornado" ,python-tornado)
6632 ("python-ptyprocess" ,python-ptyprocess)))
6633 (native-inputs
6634 `(("python-nose" ,python-nose)))
6635 (arguments
6636 `(#:phases
6637 (modify-phases %standard-phases
6638 (replace 'check
6639 (lambda _
6640 (zero? (system* "nosetests")))))))
6641 (home-page "https://github.com/takluyver/terminado")
6642 (synopsis "Terminals served to term.js using Tornado websockets")
6643 (description "This package provides a Tornado websocket backend for the
6644 term.js Javascript terminal emulator library.")
6645 (license license:bsd-2)
6646 (properties `((python2-variant . ,(delay python2-terminado))))))
6647
6648 (define-public python2-terminado
6649 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6650 (package (inherit terminado)
6651 (propagated-inputs
6652 `(("python2-backport-ssl-match-hostname"
6653 ,python2-backport-ssl-match-hostname)
6654 ,@(package-propagated-inputs terminado))))))
6655
6656 (define-public python-straight-plugin
6657 (package
6658 (name "python-straight-plugin")
6659 (version "1.4.1")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "straight.plugin" version))
6664 (sha256
6665 (base32
6666 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6667 (build-system python-build-system)
6668 (home-page "https://github.com/ironfroggy/straight.plugin")
6669 (synopsis "Simple namespaced plugin facility")
6670 (description "Straight Plugin provides a type of plugin you can create from
6671 almost any existing Python modules, and an easy way for outside developers to
6672 add functionality and customization to your projects with their own plugins.")
6673 (license license:expat)))
6674
6675 (define-public python2-straight-plugin
6676 (package-with-python2 python-straight-plugin))
6677
6678 (define-public python-fonttools
6679 (package
6680 (name "python-fonttools")
6681 (version "2.5")
6682 (source (origin
6683 (method url-fetch)
6684 (uri (string-append
6685 "https://pypi.python.org/packages/source/F/FontTools/"
6686 "fonttools-" version ".tar.gz"))
6687 (sha256
6688 (base32
6689 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6690 (build-system python-build-system)
6691 (arguments
6692 '(#:test-target "check"
6693 #:phases
6694 (modify-phases %standard-phases
6695 (add-after 'unpack 'patch-setuppy
6696 ;; Remove the undocumented "extra_path" argument, which adds an
6697 ;; intervening directories between site-packages and the package
6698 ;; directory.
6699 (lambda _
6700 (substitute* "setup.py"
6701 (("^[ \t]*extra_path *= *'FontTools',") ""))
6702 #t)))))
6703 (home-page "http://github.com/behdad/fonttools")
6704 (synopsis "Tools to manipulate font files")
6705 (description
6706 "FontTools/TTX is a library to manipulate font files from Python. It
6707 supports reading and writing of TrueType/OpenType fonts, reading and writing
6708 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6709 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6710 from an XML-based format.")
6711 (license (license:non-copyleft
6712 "file://LICENSE.txt"
6713 "See LICENSE.txt in the distribution."))))
6714
6715 (define-public python2-fonttools
6716 (package-with-python2 python-fonttools))
6717
6718 (define-public python-ly
6719 (package
6720 (name "python-ly")
6721 (version "0.9.4")
6722 (source
6723 (origin
6724 (method url-fetch)
6725 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6726 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6727 "/python-ly-" version ".tar.gz"))
6728 (sha256
6729 (base32
6730 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6731 (build-system python-build-system)
6732 (arguments
6733 ;; FIXME: Some tests need network access.
6734 '(#:tests? #f))
6735 (synopsis "Tool and library for manipulating LilyPond files")
6736 (description "This package provides a Python library to parse, manipulate
6737 or create documents in LilyPond format. A command line program ly is also
6738 provided that can be used to do various manipulations with LilyPond files.")
6739 (home-page "https://pypi.python.org/pypi/python-ly")
6740 (license license:gpl2+)))
6741
6742 (define-public python-appdirs
6743 (package
6744 (name "python-appdirs")
6745 (version "1.4.0")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (string-append
6750 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6751 version
6752 ".tar.gz"))
6753 (sha256
6754 (base32
6755 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6756 (build-system python-build-system)
6757 (home-page "http://github.com/ActiveState/appdirs")
6758 (synopsis
6759 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6760 (description
6761 "This module provides a portable way of finding out where user data
6762 should be stored on various operating systems.")
6763 (license license:expat)))
6764
6765 (define-public python2-appdirs
6766 (package-with-python2 python-appdirs))
6767
6768 (define-public python-llfuse
6769 (package
6770 (name "python-llfuse")
6771 (version "1.1.1")
6772 (source (origin
6773 (method url-fetch)
6774 (uri (string-append
6775 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6776 "llfuse-" version ".tar.bz2"))
6777 (sha256
6778 (base32
6779 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6780 (build-system python-build-system)
6781 (inputs
6782 `(("fuse" ,fuse)
6783 ("attr" ,attr)))
6784 (native-inputs
6785 `(("pkg-config" ,pkg-config)))
6786 (synopsis "Python bindings for FUSE")
6787 (description
6788 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6789 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6790 (license license:lgpl2.0+)
6791 (properties `((python2-variant . ,(delay python2-llfuse))))))
6792
6793 (define-public python2-llfuse
6794 (package (inherit (package-with-python2
6795 (strip-python2-variant python-llfuse)))
6796 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6797
6798 ;; For attic-0.16
6799 (define-public python-llfuse-0.41
6800 (package (inherit python-llfuse)
6801 (version "0.41.1")
6802 (source (origin
6803 (method url-fetch)
6804 (uri (string-append
6805 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6806 "llfuse-" version ".tar.bz2"))
6807 (sha256
6808 (base32
6809 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6810 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6811 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6812 (license (list license:expat license:lgpl2.0+))))
6813
6814 (define-public python-msgpack
6815 (package
6816 (name "python-msgpack")
6817 (version "0.4.8")
6818 (source (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "msgpack-python" version))
6821 (sha256
6822 (base32
6823 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6824 (build-system python-build-system)
6825 (synopsis "MessagePack (de)serializer")
6826 (description "MessagePack is a fast, compact binary serialization format,
6827 suitable for similar data to JSON. This package provides CPython bindings for
6828 reading and writing MessagePack data.")
6829 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6830 (license license:asl2.0)))
6831
6832 (define-public python2-msgpack
6833 (package-with-python2 python-msgpack))
6834
6835 (define-public python-netaddr
6836 (package
6837 (name "python-netaddr")
6838 (version "0.7.18")
6839 (source
6840 (origin
6841 (method url-fetch)
6842 (uri (string-append
6843 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6844 version
6845 ".tar.gz"))
6846 (sha256
6847 (base32
6848 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6849 (build-system python-build-system)
6850 (arguments `(#:tests? #f)) ;; No tests.
6851 (home-page "https://github.com/drkjam/netaddr/")
6852 (synopsis "Pythonic manipulation of network addresses")
6853 (description
6854 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6855 and MAC network addresses.")
6856 (license license:bsd-3)))
6857
6858 (define-public python2-netaddr
6859 (package-with-python2 python-netaddr))
6860
6861 (define-public python-wrapt
6862 (package
6863 (name "python-wrapt")
6864 (version "1.10.5")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (string-append
6869 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6870 version
6871 ".tar.gz"))
6872 (sha256
6873 (base32
6874 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6875 (build-system python-build-system)
6876 (arguments
6877 ;; Tests are not included in the tarball, they are only available in the
6878 ;; git repository.
6879 `(#:tests? #f))
6880 (home-page "https://github.com/GrahamDumpleton/wrapt")
6881 (synopsis "Module for decorators, wrappers and monkey patching")
6882 (description
6883 "The aim of the wrapt module is to provide a transparent object proxy for
6884 Python, which can be used as the basis for the construction of function
6885 wrappers and decorator functions.")
6886 (license license:bsd-2)))
6887
6888 (define-public python2-wrapt
6889 (package-with-python2 python-wrapt))
6890
6891 (define-public python-iso8601
6892 (package
6893 (name "python-iso8601")
6894 (version "0.1.11")
6895 (source
6896 (origin
6897 (method url-fetch)
6898 (uri (pypi-uri "iso8601" version))
6899 (sha256
6900 (base32
6901 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6902 (build-system python-build-system)
6903 (native-inputs
6904 `(("python-pytest" ,python-pytest)))
6905 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6906 (synopsis "Module to parse ISO 8601 dates")
6907 (description
6908 "This module parses the most common forms of ISO 8601 date strings (e.g.
6909 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6910 (license license:expat)))
6911
6912 (define-public python2-iso8601
6913 (package-with-python2 python-iso8601))
6914
6915 (define-public python-monotonic
6916 (package
6917 (name "python-monotonic")
6918 (version "0.3")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 (uri (string-append
6923 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6924 version
6925 ".tar.gz"))
6926 (sha256
6927 (base32
6928 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6929 (build-system python-build-system)
6930 (home-page "https://github.com/atdt/monotonic")
6931 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6932 (description
6933 "This module provides a monotonic() function which returns the value (in
6934 fractional seconds) of a clock which never goes backwards.")
6935 (license license:asl2.0)))
6936
6937 (define-public python2-monotonic
6938 (package-with-python2 python-monotonic))
6939
6940 (define-public python-webob
6941 (package
6942 (name "python-webob")
6943 (version "1.5.1")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "WebOb" version))
6948 (sha256
6949 (base32
6950 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6951 (build-system python-build-system)
6952 (native-inputs
6953 `(("python-nose" ,python-nose)))
6954 (home-page "http://webob.org/")
6955 (synopsis "WSGI request and response object")
6956 (description
6957 "WebOb provides wrappers around the WSGI request environment, and an
6958 object to help create WSGI responses.")
6959 (license license:expat)))
6960
6961 (define-public python2-webob
6962 (package-with-python2 python-webob))
6963
6964 (define-public python-xlrd
6965 (package
6966 (name "python-xlrd")
6967 (version "1.0.0")
6968 (source (origin
6969 (method url-fetch)
6970 (uri (pypi-uri "xlrd" version))
6971 (sha256
6972 (base32
6973 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6974 (build-system python-build-system)
6975 (arguments
6976 `(#:phases
6977 (modify-phases %standard-phases
6978 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6979 ;; run tests instead for now.
6980 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6981 (native-inputs `(("python-nose" ,python-nose)))
6982 (home-page "http://www.python-excel.org/")
6983 (synopsis "Library for extracting data from Excel files")
6984 (description "This packages provides a library to extract data from
6985 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6986 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6987 Unicode-aware. It is not intended as an end-user tool.")
6988 (license license:bsd-3)))
6989
6990 (define-public python2-xlrd
6991 (package-with-python2 python-xlrd))
6992
6993 (define-public python-prettytable
6994 (package
6995 (name "python-prettytable")
6996 (version "0.7.2")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (string-append
7001 "https://pypi.python.org/packages/source/P/PrettyTable/"
7002 "prettytable-" version ".tar.bz2"))
7003 (sha256
7004 (base32
7005 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7006 (build-system python-build-system)
7007 (home-page "http://code.google.com/p/prettytable/")
7008 (synopsis "Display tabular data in an ASCII table format")
7009 (description
7010 "A library designed to represent tabular data in visually appealing ASCII
7011 tables. PrettyTable allows for selection of which columns are to be printed,
7012 independent alignment of columns (left or right justified or centred) and
7013 printing of sub-tables by specifying a row range.")
7014 (license license:bsd-3)))
7015
7016 (define-public python2-prettytable
7017 (package-with-python2 python-prettytable))
7018
7019 (define-public python-tables
7020 (package
7021 (name "python-tables")
7022 (version "3.2.2")
7023 (source
7024 (origin
7025 (method url-fetch)
7026 (uri (pypi-uri "tables" version))
7027 (sha256
7028 (base32
7029 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7030 (modules '((guix build utils)))
7031 (snippet
7032 '(begin
7033 ;; Remove pre-compiled .pyc files from source.
7034 (for-each delete-file-recursively
7035 (find-files "." "__pycache__" #:directories? #t))
7036 (for-each delete-file (find-files "." "\\.pyc$"))
7037 #t))))
7038 (build-system python-build-system)
7039 (arguments
7040 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7041 ;; or "check", so we must override the build and check phases.
7042 #:phases
7043 (modify-phases %standard-phases
7044 (add-after 'unpack 'use-gcc
7045 (lambda _
7046 (substitute* "setup.py"
7047 (("compiler = new_compiler\\(\\)" line)
7048 (string-append line
7049 "\ncompiler.set_executables(compiler='gcc',"
7050 "compiler_so='gcc',"
7051 "linker_exe='gcc',"
7052 "linker_so='gcc -shared')")))
7053 #t))
7054 (replace 'build
7055 (lambda* (#:key inputs #:allow-other-keys)
7056 (zero? (system* "python" "setup.py" "build"
7057 (string-append "--hdf5="
7058 (assoc-ref inputs "hdf5"))))))
7059 (replace 'check
7060 (lambda* (#:key inputs #:allow-other-keys)
7061 (zero? (system* "python" "setup.py" "check"
7062 (string-append "--hdf5="
7063 (assoc-ref inputs "hdf5")))))))))
7064 (propagated-inputs
7065 `(("python-numexpr" ,python-numexpr)
7066 ("python-numpy" ,python-numpy)))
7067 (native-inputs
7068 `(("python-cython" ,python-cython)
7069 ("pkg-config" ,pkg-config)))
7070 (inputs
7071 `(("hdf5" ,hdf5)
7072 ("bzip2" ,bzip2)
7073 ("zlib" ,zlib)))
7074 (home-page "http://www.pytables.org/")
7075 (synopsis "Hierarchical datasets for Python")
7076 (description "PyTables is a package for managing hierarchical datasets and
7077 designed to efficently cope with extremely large amounts of data.")
7078 (license license:bsd-3)))
7079
7080 (define-public python2-tables
7081 (package-with-python2 python-tables))
7082
7083 (define-public python-pyasn1
7084 (package
7085 (name "python-pyasn1")
7086 (version "0.1.9")
7087 (source
7088 (origin
7089 (method url-fetch)
7090 (uri (pypi-uri "pyasn1" version))
7091 (sha256
7092 (base32
7093 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7094 (build-system python-build-system)
7095 (home-page "http://pyasn1.sourceforge.net/")
7096 (synopsis "ASN.1 types and codecs")
7097 (description
7098 "This is an implementation of ASN.1 types and codecs in Python. It is
7099 suitable for a wide range of protocols based on the ASN.1 specification.")
7100 (license license:bsd-2)))
7101
7102 (define-public python2-pyasn1
7103 (package-with-python2 python-pyasn1))
7104
7105 (define-public python-pyasn1-modules
7106 (package
7107 (name "python-pyasn1-modules")
7108 (version "0.0.8")
7109 (source
7110 (origin
7111 (method url-fetch)
7112 (uri (pypi-uri "pyasn1-modules" version))
7113 (sha256
7114 (base32
7115 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7116 (build-system python-build-system)
7117 (propagated-inputs
7118 `(("python-pyasn1" ,python-pyasn1)))
7119 (home-page "https://sourceforge.net/projects/pyasn1/")
7120 (synopsis "ASN.1 codec implementations")
7121 (description
7122 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7123 implementations of ASN.1-based codecs and protocols.")
7124 (license license:bsd-3)))
7125
7126 (define-public python2-pyasn1-modules
7127 (package-with-python2 python-pyasn1-modules))
7128
7129 (define-public python-ipaddress
7130 (package
7131 (name "python-ipaddress")
7132 (version "1.0.16")
7133 (source (origin
7134 (method url-fetch)
7135 (uri (pypi-uri "ipaddress" version))
7136 (sha256
7137 (base32
7138 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
7139 (build-system python-build-system)
7140 (home-page "https://github.com/phihag/ipaddress")
7141 (synopsis "IP address manipulation library")
7142 (description
7143 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7144 in Python. This library is used to create, poke at, and manipulate IPv4 and
7145 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7146 module to older versions of Python.")
7147 (license license:psfl)))
7148
7149 (define-public python2-ipaddress
7150 (package-with-python2 python-ipaddress))
7151
7152 (define-public python2-ipaddr
7153 (package
7154 (name "python2-ipaddr")
7155 (version "2.1.11")
7156 (source
7157 (origin
7158 (method url-fetch)
7159 (uri (pypi-uri "ipaddr" version))
7160 (sha256
7161 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7162 (build-system python-build-system)
7163 (arguments
7164 `(#:python ,python-2 ;version 2 only
7165 #:phases
7166 (modify-phases %standard-phases
7167 (replace 'check
7168 (lambda* _
7169 (zero? (system* "python" "ipaddr_test.py")))))))
7170 (home-page "https://github.com/google/ipaddr-py")
7171 (synopsis "IP address manipulation library")
7172 (description
7173 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7174 IPv6 addresses and networks.
7175
7176 For new implementations you may prefer to use the standard module
7177 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7178 versions of Python.")
7179 (license license:asl2.0)))
7180
7181 (define-public python-idna
7182 (package
7183 (name "python-idna")
7184 (version "2.0")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (string-append "https://pypi.python.org/packages/source/i/"
7189 "idna/idna-" version ".tar.gz"))
7190 (sha256
7191 (base32
7192 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7193 (build-system python-build-system)
7194 (home-page "https://github.com/kjd/idna")
7195 (synopsis "Internationalized domain names in applications")
7196 (description
7197 "This is a library to support the Internationalised Domain Names in
7198 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7199 protocol is often referred to as “IDNA2008” and can produce different results
7200 from the earlier standard from 2003. The library is also intended to act as a
7201 suitable drop-in replacement for the “encodings.idna” module that comes with
7202 the Python standard library but currently only supports the older 2003
7203 specification.")
7204 (license license:bsd-4)))
7205
7206 (define-public python2-idna
7207 (package-with-python2 python-idna))
7208
7209 (define-public python-pretend
7210 (package
7211 (name "python-pretend")
7212 (version "1.0.8")
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (string-append "https://pypi.python.org/packages/source/p/"
7217 "pretend/pretend-" version ".tar.gz"))
7218 (sha256
7219 (base32
7220 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7221 (build-system python-build-system)
7222 (home-page "https://github.com/alex/pretend")
7223 (synopsis "Library for stubbing in Python")
7224 (description
7225 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7226 technique for writing tests. You may hear the term mixed up with mocks,
7227 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7228 responses, rather than doing any computation.")
7229 (license license:bsd-3)))
7230
7231 (define-public python2-pretend
7232 (package-with-python2 python-pretend))
7233
7234 (define-public python-cryptography-vectors
7235 (package
7236 (name "python-cryptography-vectors")
7237 (version "1.7.1")
7238 (source
7239 (origin
7240 (method url-fetch)
7241 (uri (pypi-uri "cryptography_vectors" version))
7242 (sha256
7243 (base32
7244 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
7245 (build-system python-build-system)
7246 (home-page "https://github.com/pyca/cryptography")
7247 (synopsis "Test vectors for the cryptography package")
7248 (description
7249 "This package contains test vectors for the cryptography package.")
7250 ;; Distributed under either BSD-3 or ASL2.0
7251 (license (list license:bsd-3 license:asl2.0))))
7252
7253 (define-public python2-cryptography-vectors
7254 (package-with-python2 python-cryptography-vectors))
7255
7256 (define-public python-cryptography
7257 (package
7258 (name "python-cryptography")
7259 (version "1.7.1")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 (uri (pypi-uri "cryptography" version))
7264 (sha256
7265 (base32
7266 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
7267 (build-system python-build-system)
7268 (inputs
7269 `(("openssl" ,openssl)))
7270 (propagated-inputs
7271 `(("python-cffi" ,python-cffi)
7272 ("python-six" ,python-six)
7273 ("python-pyasn1" ,python-pyasn1)
7274 ("python-idna" ,python-idna)
7275 ("python-iso8601" ,python-iso8601)))
7276 (native-inputs
7277 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7278 ("python-hypothesis" ,python-hypothesis)
7279 ("python-pretend" ,python-pretend)
7280 ("python-pyasn1" ,python-pyasn1)
7281 ("python-pyasn1-modules" ,python-pyasn1-modules)
7282 ("python-pytz" ,python-pytz)
7283 ("python-pytest" ,python-pytest-2.9.2)))
7284 (home-page "https://github.com/pyca/cryptography")
7285 (synopsis "Cryptographic recipes and primitives for Python")
7286 (description
7287 "cryptography is a package which provides cryptographic recipes and
7288 primitives to Python developers. It aims to be the “cryptographic standard
7289 library” for Python. The package includes both high level recipes, and low
7290 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7291 message digests and key derivation functions.")
7292 ;; Distributed under either BSD-3 or ASL2.0
7293 (license (list license:bsd-3 license:asl2.0))
7294 (properties `((python2-variant . ,(delay python2-cryptography))))))
7295
7296 (define-public python2-cryptography
7297 (let ((crypto (package-with-python2
7298 (strip-python2-variant python-cryptography))))
7299 (package (inherit crypto)
7300 (propagated-inputs
7301 `(("python2-ipaddress" ,python2-ipaddress)
7302 ("python2-backport-ssl-match-hostname"
7303 ,python2-backport-ssl-match-hostname)
7304 ("python2-enum34" ,python2-enum34)
7305 ,@(package-propagated-inputs crypto))))))
7306
7307 (define-public python-pyopenssl
7308 (package
7309 (name "python-pyopenssl")
7310 (version "16.2.0")
7311 (source
7312 (origin
7313 (method url-fetch)
7314 (uri (pypi-uri "pyOpenSSL" version))
7315 (sha256
7316 (base32
7317 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7318 (patches
7319 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7320 (build-system python-build-system)
7321 (arguments
7322 '(#:phases
7323 (modify-phases %standard-phases
7324 (delete 'check)
7325 (add-after 'install 'check
7326 (lambda* (#:key inputs outputs #:allow-other-keys)
7327 (add-installed-pythonpath inputs outputs)
7328 (zero? (system* "py.test" "-v")))))))
7329 (propagated-inputs
7330 `(("python-cryptography" ,python-cryptography)
7331 ("python-six" ,python-six)))
7332 (inputs
7333 `(("openssl" ,openssl)))
7334 (native-inputs
7335 `(("python-pytest" ,python-pytest)))
7336 (home-page "https://github.com/pyca/pyopenssl")
7337 (synopsis "Python wrapper module around the OpenSSL library")
7338 (description
7339 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7340 library.")
7341 (license license:asl2.0)))
7342
7343 (define-public python2-pyopenssl
7344 (package-with-python2 python-pyopenssl))
7345
7346 (define-public python-pip
7347 (package
7348 (name "python-pip")
7349 (version "9.0.1")
7350 (source
7351 (origin
7352 (method url-fetch)
7353 (uri (pypi-uri "pip" version))
7354 (sha256
7355 (base32
7356 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7357 (build-system python-build-system)
7358 (arguments
7359 '(#:tests? #f)) ; there are no tests in the pypi archive.
7360 (home-page "https://pip.pypa.io/")
7361 (synopsis "Package manager for Python software")
7362 (description
7363 "Pip is a package manager for Python software, that finds packages on the
7364 Python Package Index (PyPI).")
7365 (license license:expat)))
7366
7367 (define-public python2-pip
7368 (package-with-python2 python-pip))
7369
7370 (define-public python-tlsh
7371 (package
7372 (name "python-tlsh")
7373 (version "3.4.4")
7374 (home-page "https://github.com/trendmicro/tlsh")
7375 (source (origin
7376 (method url-fetch)
7377 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7378 version ".tar.gz"))
7379 (sha256
7380 (base32
7381 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7382 (file-name (string-append name "-" version ".tar.gz"))))
7383 (build-system cmake-build-system)
7384 (arguments
7385 '(#:out-of-source? #f
7386 #:phases (modify-phases %standard-phases
7387 (replace
7388 'install
7389 (lambda* (#:key outputs #:allow-other-keys)
7390 ;; Build and install the Python bindings. The underlying
7391 ;; C++ library is apparently not meant to be installed.
7392 (let ((out (assoc-ref outputs "out")))
7393 (with-directory-excursion "py_ext"
7394 (and (system* "python" "setup.py" "build")
7395 (system* "python" "setup.py" "install"
7396 (string-append "--prefix=" out))))))))))
7397 (inputs `(("python" ,python-wrapper))) ;for the bindings
7398 (synopsis "Fuzzy matching library for Python")
7399 (description
7400 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7401 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7402 value which can be used for similarity comparisons. Similar objects have
7403 similar hash values, which allows for the detection of similar objects by
7404 comparing their hash values. The byte stream should have a sufficient amount
7405 of complexity; for example, a byte stream of identical bytes will not generate
7406 a hash value.")
7407 (license license:asl2.0)))
7408
7409 (define-public python2-tlsh
7410 (package
7411 (inherit python-tlsh)
7412 (name "python2-tlsh")
7413 (inputs `(("python" ,python-2)))))
7414
7415 (define-public python-termcolor
7416 (package
7417 (name "python-termcolor")
7418 (version "1.1.0")
7419 (source
7420 (origin
7421 (method url-fetch)
7422 (uri (pypi-uri "python-termcolor" version))
7423 (sha256
7424 (base32
7425 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7426 (build-system python-build-system)
7427 (arguments
7428 ;; There are no tests.
7429 `(#:tests? #f))
7430 (home-page "http://pypi.python.org/pypi/termcolor")
7431 (synopsis "ANSII Color formatting for terminal output")
7432 (description
7433 "This package provides ANSII Color formatting for output in terminals.")
7434 (license license:expat)))
7435
7436 (define-public python2-termcolor
7437 (package-with-python2 python-termcolor))
7438
7439 (define-public python-libarchive-c
7440 (package
7441 (name "python-libarchive-c")
7442 (version "2.2")
7443 (source (origin
7444 (method url-fetch)
7445 (uri (pypi-uri "libarchive-c" version))
7446 (sha256
7447 (base32
7448 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7449 (build-system python-build-system)
7450 (arguments
7451 '(#:phases (modify-phases %standard-phases
7452 (add-before
7453 'build 'reference-libarchive
7454 (lambda* (#:key inputs #:allow-other-keys)
7455 ;; Retain the absolute file name of libarchive.so.
7456 (let ((libarchive (assoc-ref inputs "libarchive")))
7457 (substitute* "libarchive/ffi.py"
7458 (("find_library\\('archive'\\)")
7459 (string-append "'" libarchive
7460 "/lib/libarchive.so'")))))))))
7461 (inputs
7462 `(("libarchive" ,libarchive)))
7463 (home-page "https://github.com/Changaco/python-libarchive-c")
7464 (synopsis "Python interface to libarchive")
7465 (description
7466 "This package provides Python bindings to libarchive, a C library to
7467 access possibly compressed archives in many different formats. It uses
7468 Python's @code{ctypes} foreign function interface (FFI).")
7469 (license license:lgpl2.0+)))
7470
7471 (define-public python2-libarchive-c
7472 (package-with-python2 python-libarchive-c))
7473
7474 (define-public python-file
7475 (package
7476 (inherit file)
7477 (name "python-file")
7478 (source (origin
7479 (inherit (package-source file))
7480 ;; This patch should not be applied to python2-file.
7481 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7482 (build-system python-build-system)
7483 (arguments
7484 '(#:tests? #f ;no tests
7485 #:configure-flags '("--single-version-externally-managed" "--root=/")
7486 #:phases (modify-phases %standard-phases
7487 (add-before 'build 'change-directory
7488 (lambda _
7489 (chdir "python")
7490 #t))
7491 (add-before 'build 'set-library-file-name
7492 (lambda* (#:key inputs #:allow-other-keys)
7493 (let ((file (assoc-ref inputs "file")))
7494 (substitute* "magic.py"
7495 (("find_library\\('magic'\\)")
7496 (string-append "'" file "/lib/libmagic.so'")))
7497 #t))))))
7498 (inputs `(("file" ,file)))
7499 (self-native-input? #f)
7500 (synopsis "Python bindings to the libmagic file type guesser. Note that
7501 this module and the python-magic module both provide a \"magic.py\" file;
7502 these two modules, which are different and were developed separately, both
7503 serve the same purpose: provide Python bindings for libmagic.")))
7504
7505 (define-public python2-file
7506 (package-with-python2 python-file))
7507
7508 (define-public python-debian
7509 (package
7510 (name "python-debian")
7511 (version "0.1.28")
7512 (source
7513 (origin
7514 (method url-fetch)
7515 (uri (pypi-uri name version))
7516 (sha256
7517 (base32
7518 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7519 (build-system python-build-system)
7520 (propagated-inputs
7521 `(("python-six" ,python-six)))
7522 (home-page "http://packages.debian.org/sid/python-debian")
7523 (synopsis "Debian package related modules")
7524 (description
7525 ;; XXX: Use @enumerate instead of @itemize to work around
7526 ;; <http://bugs.gnu.org/21772>.
7527 "This package provides Python modules that abstract many formats of
7528 Debian-related files, such as:
7529
7530 @enumerate
7531 @item Debtags information;
7532 @item @file{debian/changelog} files;
7533 @item packages files, pdiffs;
7534 @item control files of single or multiple RFC822-style paragraphs---e.g.
7535 @file{debian/control}, @file{.changes}, @file{.dsc};
7536 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7537 contained files and meta-information.
7538 @end enumerate\n")
7539
7540 ;; Modules are either GPLv2+ or GPLv3+.
7541 (license license:gpl3+)))
7542
7543 (define-public python2-debian
7544 (package-with-python2 python-debian))
7545
7546 (define-public python-nbformat
7547 (package
7548 (name "python-nbformat")
7549 (version "4.1.0")
7550 (source
7551 (origin
7552 (method url-fetch)
7553 (uri (pypi-uri "nbformat" version))
7554 (sha256
7555 (base32
7556 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7557 (build-system python-build-system)
7558 (arguments `(#:tests? #f)) ; no test target
7559 (propagated-inputs
7560 `(("python-ipython-genutils" ,python-ipython-genutils)
7561 ("python-jsonschema" ,python-jsonschema)
7562 ("python-jupyter-core" ,python-jupyter-core)
7563 ("python-traitlets" ,python-traitlets)))
7564 (home-page "http://jupyter.org")
7565 (synopsis "Jupyter Notebook format")
7566 (description "This package provides the reference implementation of the
7567 Jupyter Notebook format and Python APIs for working with notebooks.")
7568 (license license:bsd-3)))
7569
7570 (define-public python2-nbformat
7571 (package-with-python2 python-nbformat))
7572
7573 (define-public python-bleach
7574 (package
7575 (name "python-bleach")
7576 (version "1.4.3")
7577 (source
7578 (origin
7579 (method url-fetch)
7580 (uri (pypi-uri "bleach" version))
7581 (sha256
7582 (base32
7583 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7584 (build-system python-build-system)
7585 (propagated-inputs
7586 `(("python-html5lib" ,python-html5lib-0.9)
7587 ("python-six" ,python-six)))
7588 (native-inputs
7589 `(("python-nose" ,python-nose)))
7590 (home-page "http://github.com/jsocol/bleach")
7591 (synopsis "Whitelist-based HTML-sanitizing tool")
7592 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7593 (license license:asl2.0)))
7594
7595 (define-public python2-bleach
7596 (package-with-python2 python-bleach))
7597
7598 (define-public python-entrypoints
7599 (package
7600 (name "python-entrypoints")
7601 (version "0.2.2")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7606 version ".tar.gz"))
7607 (file-name (string-append name "-" version ".tar.gz"))
7608 (sha256
7609 (base32
7610 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7611 (build-system python-build-system)
7612 ;; The package does not come with a setup.py file, so we have to generate
7613 ;; one ourselves.
7614 (arguments
7615 `(#:tests? #f
7616 #:phases
7617 (modify-phases %standard-phases
7618 (add-after 'unpack 'create-setup.py
7619 (lambda _
7620 (call-with-output-file "setup.py"
7621 (lambda (port)
7622 (format port "\
7623 from setuptools import setup
7624 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7625 " ,version))))))))
7626 (home-page "https://github.com/takluyver/entrypoints")
7627 (synopsis "Discover and load entry points from installed Python packages")
7628 (description "Entry points are a way for Python packages to advertise
7629 objects with some common interface. The most common examples are
7630 @code{console_scripts} entry points, which define shell commands by
7631 identifying a Python function to run. The @code{entrypoints} module contains
7632 functions to find and load entry points.")
7633 (license license:expat)))
7634
7635 (define-public python2-entrypoints
7636 (package-with-python2 python-entrypoints))
7637
7638 (define-public python-nbconvert
7639 (package
7640 (name "python-nbconvert")
7641 (version "5.0.0b1")
7642 (source
7643 (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "nbconvert" version))
7646 (sha256
7647 (base32
7648 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7649 (build-system python-build-system)
7650 (arguments
7651 `(;; The "bdist_egg" target is disabled by default, causing the installation
7652 ;; to fail.
7653 #:configure-flags (list "bdist_egg")
7654 ;; FIXME: 5 failures, 40 errors.
7655 #:tests? #f))
7656 ;; #:phases
7657 ;; (modify-phases %standard-phases
7658 ;; (replace 'check
7659 ;; (lambda _
7660 ;; (zero? (system* "py.test" "-v")))))
7661 (native-inputs
7662 `(("python-pytest" ,python-pytest)))
7663 (propagated-inputs
7664 `(("python-bleach" ,python-bleach)
7665 ("python-entrypoints" ,python-entrypoints)
7666 ("python-jinja2" ,python-jinja2)
7667 ("python-jupyter-core" ,python-jupyter-core)
7668 ("python-mistune" ,python-mistune)
7669 ("python-nbformat" ,python-nbformat)
7670 ("python-pygments" ,python-pygments)
7671 ("python-traitlets" ,python-traitlets)))
7672 (home-page "http://jupyter.org")
7673 (synopsis "Converting Jupyter Notebooks")
7674 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7675 notebooks to various other formats via Jinja templates. It allows you to
7676 convert an @code{.ipynb} notebook file into various static formats including:
7677
7678 @enumerate
7679 @item HTML
7680 @item LaTeX
7681 @item PDF
7682 @item Reveal JS
7683 @item Markdown (md)
7684 @item ReStructured Text (rst)
7685 @item executable script
7686 @end enumerate\n")
7687 (license license:bsd-3)))
7688
7689 (define-public python2-nbconvert
7690 (package-with-python2 python-nbconvert))
7691
7692 (define-public python-notebook
7693 (package
7694 (name "python-notebook")
7695 (version "4.2.3")
7696 (source (origin
7697 (method url-fetch)
7698 (uri (pypi-uri "notebook" version))
7699 (sha256
7700 (base32
7701 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7702 (build-system python-build-system)
7703 (arguments
7704 `(#:phases
7705 (modify-phases %standard-phases
7706 (replace 'check
7707 (lambda _
7708 ;; HOME must be set for tests
7709 (setenv "HOME" "/tmp")
7710 (zero? (system* "nosetests")))))))
7711 (propagated-inputs
7712 `(("python-jupyter-core" ,python-jupyter-core)
7713 ("python-nbformat" ,python-nbformat)
7714 ("python-nbconvert" ,python-nbconvert)
7715 ("python-ipython" ,python-ipython)))
7716 (native-inputs
7717 `(("python-nose" ,python-nose)
7718 ("python-sphinx" ,python-sphinx)
7719 ("python-requests" ,python-requests)))
7720 (home-page "http://jupyter.org/")
7721 (synopsis "Web-based notebook environment for interactive computing")
7722 (description
7723 "The Jupyter HTML notebook is a web-based notebook environment for
7724 interactive computing.")
7725 (properties `((python2-variant . ,(delay python2-notebook))))
7726 (license license:bsd-3)))
7727
7728 (define-public python2-notebook
7729 (let ((base (package-with-python2
7730 (strip-python2-variant python-notebook))))
7731 (package (inherit base)
7732 (native-inputs
7733 `(("python2-mock" ,python2-mock)
7734 ,@(package-native-inputs base)))
7735 (arguments
7736 (substitute-keyword-arguments (package-arguments base)
7737 ((#:phases phases)
7738 `(modify-phases ,phases
7739 (add-before 'check 'disable-test-case
7740 ;; The test requires network access to localhost. Curiously it
7741 ;; fails with Python 2 only. Simply make the test-case return
7742 ;; immediately.
7743 (lambda _
7744 (substitute*
7745 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7746 (("formats = self.nbconvert_api") "return #")))))))))))
7747
7748 (define-public python-widgetsnbextension
7749 (package
7750 (name "python-widgetsnbextension")
7751 (version "1.2.6")
7752 (source
7753 (origin
7754 (method url-fetch)
7755 (uri (pypi-uri "widgetsnbextension" version))
7756 (sha256
7757 (base32
7758 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7759 (build-system python-build-system)
7760 (propagated-inputs
7761 `(("python-notebook" ,python-notebook)))
7762 (native-inputs
7763 `(("python-certifi" ,python-certifi)
7764 ("python-nose" ,python-nose)))
7765 (home-page "http://ipython.org")
7766 (synopsis "IPython HTML widgets for Jupyter")
7767 (description "This package provides interactive HTML widgets for Jupyter
7768 notebooks.")
7769 (license license:bsd-3)))
7770
7771 (define-public python2-widgetsnbextension
7772 (package-with-python2 python-widgetsnbextension))
7773
7774 (define-public python-ipywidgets
7775 (package
7776 (name "python-ipywidgets")
7777 (version "5.2.2")
7778 (source
7779 (origin
7780 (method url-fetch)
7781 (uri (pypi-uri "ipywidgets" version))
7782 (sha256
7783 (base32
7784 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7785 (build-system python-build-system)
7786 ;; FIXME: it's not clear how to run the tests.
7787 (arguments `(#:tests? #f))
7788 (propagated-inputs
7789 `(("python-ipykernel" ,python-ipykernel)
7790 ("python-ipython" ,python-ipython)
7791 ("python-traitlets" ,python-traitlets)
7792 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7793 (home-page "http://ipython.org")
7794 (synopsis "IPython HTML widgets for Jupyter")
7795 (description "Ipywidgets are interactive HTML widgets for Jupyter
7796 notebooks and the IPython kernel. Notebooks come alive when interactive
7797 widgets are used. Users gain control of their data and can visualize changes
7798 in the data.")
7799 (license license:bsd-3)))
7800
7801 (define-public python2-ipywidgets
7802 (package-with-python2 python-ipywidgets))
7803
7804 (define-public python-jupyter-console
7805 (package
7806 (name "python-jupyter-console")
7807 (version "5.0.0")
7808 (source
7809 (origin
7810 (method url-fetch)
7811 (uri (pypi-uri "jupyter_console" version))
7812 (sha256
7813 (base32
7814 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7815 (build-system python-build-system)
7816 ;; FIXME: it's not clear how to run the tests.
7817 (arguments `(#:tests? #f))
7818 (propagated-inputs
7819 `(("python-ipykernel" ,python-ipykernel)
7820 ("python-ipython" ,python-ipython)
7821 ("python-jupyter-client" ,python-jupyter-client)
7822 ("python-prompt-toolkit" ,python-prompt-toolkit)
7823 ("python-pygments" ,python-pygments)))
7824 (home-page "https://jupyter.org")
7825 (synopsis "Jupyter terminal console")
7826 (description "This package provides a terminal-based console frontend for
7827 Jupyter kernels. It also allows for console-based interaction with non-Python
7828 Jupyter kernels such as IJulia and IRKernel.")
7829 (license license:bsd-3)))
7830
7831 (define-public python2-jupyter-console
7832 (package-with-python2 python-jupyter-console))
7833
7834 (define-public jupyter
7835 (package
7836 (name "jupyter")
7837 (version "1.0.0")
7838 (source
7839 (origin
7840 (method url-fetch)
7841 (uri (pypi-uri "jupyter" version))
7842 (sha256
7843 (base32
7844 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7845 (build-system python-build-system)
7846 ;; FIXME: it's not clear how to run the tests.
7847 (arguments `(#:tests? #f))
7848 (propagated-inputs
7849 `(("python-ipykernel" ,python-ipykernel)
7850 ("python-ipywidgets" ,python-ipywidgets)
7851 ("python-jupyter-console" ,python-jupyter-console)
7852 ("python-nbconvert" ,python-nbconvert)
7853 ("python-notebook" ,python-notebook)))
7854 (home-page "http://jupyter.org")
7855 (synopsis "Web application for interactive documents")
7856 (description
7857 "The Jupyter Notebook is a web application that allows you to create and
7858 share documents that contain live code, equations, visualizations and
7859 explanatory text. Uses include: data cleaning and transformation, numerical
7860 simulation, statistical modeling, machine learning and much more.")
7861 (license license:bsd-3)))
7862
7863 (define-public python-chardet
7864 (package
7865 (name "python-chardet")
7866 (version "2.3.0")
7867 (source
7868 (origin
7869 (method url-fetch)
7870 (uri (string-append
7871 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7872 version
7873 ".tar.gz"))
7874 (sha256
7875 (base32
7876 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7877 (build-system python-build-system)
7878 (home-page "https://github.com/chardet/chardet")
7879 (synopsis "Universal encoding detector for Python 2 and 3")
7880 (description
7881 "This package provides @code{chardet}, a Python module that can
7882 automatically detect a wide range of file encodings.")
7883 (license license:lgpl2.1+)))
7884
7885 (define-public python2-chardet
7886 (package-with-python2 python-chardet))
7887
7888 (define-public python-docopt
7889 (package
7890 (name "python-docopt")
7891 (version "0.6.2")
7892 (source
7893 (origin
7894 (method url-fetch)
7895 ;; The release on PyPI does not include tests.
7896 (uri (string-append
7897 "https://github.com/docopt/docopt/archive/"
7898 version ".tar.gz"))
7899 (file-name (string-append name "-" version ".tar.gz"))
7900 (sha256
7901 (base32
7902 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7903 (build-system python-build-system)
7904 (native-inputs
7905 `(("python-pytest" ,python-pytest)))
7906 (arguments
7907 `(#:phases (alist-replace
7908 'check
7909 (lambda _ (zero? (system* "py.test")))
7910 %standard-phases)))
7911 (home-page "http://docopt.org")
7912 (synopsis "Command-line interface description language for Python")
7913 (description "This library allows the user to define a command-line
7914 interface from a program's help message rather than specifying it
7915 programatically with command-line parsers like @code{getopt} and
7916 @code{argparse}.")
7917 (license license:expat)))
7918
7919 (define-public python2-docopt
7920 (package-with-python2 python-docopt))
7921
7922 (define-public python-zope-event
7923 (package
7924 (name "python-zope-event")
7925 (version "4.1.0")
7926 (source
7927 (origin
7928 (method url-fetch)
7929 (uri (string-append "https://pypi.python.org/packages/source/z"
7930 "/zope.event/zope.event-" version ".tar.gz"))
7931 (sha256
7932 (base32
7933 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7934 (build-system python-build-system)
7935 (home-page "http://pypi.python.org/pypi/zope.event")
7936 (synopsis "Event publishing system for Python")
7937 (description "Zope.event provides an event publishing API, intended for
7938 use by applications which are unaware of any subscribers to their events. It
7939 is a simple event-dispatching system on which more sophisticated event
7940 dispatching systems can be built.")
7941 (license license:zpl2.1)))
7942
7943 (define-public python2-zope-event
7944 (package-with-python2 python-zope-event))
7945
7946 (define-public python-zope-interface
7947 (package
7948 (name "python-zope-interface")
7949 (version "4.1.3")
7950 (source
7951 (origin
7952 (method url-fetch)
7953 (uri (string-append "https://pypi.python.org/packages/source/z"
7954 "/zope.interface/zope.interface-" version ".tar.gz"))
7955 (sha256
7956 (base32
7957 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7958 (build-system python-build-system)
7959 (native-inputs
7960 `(("python-zope-event" ,python-zope-event)))
7961 (home-page "https://github.com/zopefoundation/zope.interface")
7962 (synopsis "Python implementation of the \"design by contract\"
7963 methodology")
7964 (description "Zope.interface provides an implementation of \"object
7965 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7966 conforming to a given API or contract.")
7967 (license license:zpl2.1)))
7968
7969 (define-public python2-zope-interface
7970 (package-with-python2 python-zope-interface))
7971
7972 (define-public python-zope-exceptions
7973 (package
7974 (name "python-zope-exceptions")
7975 (version "4.0.8")
7976 (source
7977 (origin
7978 (method url-fetch)
7979 (uri (string-append "https://pypi.python.org/packages/source/z"
7980 "/zope.exceptions/zope.exceptions-"
7981 version ".tar.gz"))
7982 (sha256
7983 (base32
7984 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7985 (build-system python-build-system)
7986 (arguments
7987 '(#:tests? #f)) ; circular dependency with zope.testrunner
7988 (propagated-inputs
7989 `(("python-zope-interface" ,python-zope-interface)))
7990 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7991 (synopsis "Zope exceptions")
7992 (description "Zope.exceptions provides general-purpose exception types
7993 that have uses outside of the Zope framework.")
7994 (license license:zpl2.1)))
7995
7996 (define-public python2-zope-exceptions
7997 (package-with-python2 python-zope-exceptions))
7998
7999 (define-public python-zope-testing
8000 (package
8001 (name "python-zope-testing")
8002 (version "4.5.0")
8003 (source
8004 (origin
8005 (method url-fetch)
8006 (uri (string-append "https://pypi.python.org/packages/source/z"
8007 "/zope.testing/zope.testing-" version ".tar.gz"))
8008 (sha256
8009 (base32
8010 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8011 (modules '((guix build utils)))
8012 (snippet
8013 '(begin
8014 ;; Remove pre-compiled .pyc files backup files from source.
8015 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8016 #t))))
8017 (build-system python-build-system)
8018 (native-inputs
8019 `(("python-zope-exceptions" ,python-zope-exceptions)))
8020 (propagated-inputs
8021 `(("python-zope-interface" ,python-zope-interface)))
8022 (home-page "http://pypi.python.org/pypi/zope.testing")
8023 (synopsis "Zope testing helpers")
8024 (description "Zope.testing provides a number of testing utilities for HTML
8025 forms, HTTP servers, regular expressions, and more.")
8026 (license license:zpl2.1)))
8027
8028 (define-public python2-zope-testing
8029 (package-with-python2 python-zope-testing))
8030
8031 (define-public python-zope-testrunner
8032 (package
8033 (name "python-zope-testrunner")
8034 (version "4.4.9")
8035 (source
8036 (origin
8037 (method url-fetch)
8038 (uri (string-append "https://pypi.python.org/packages/source/z"
8039 "/zope.testrunner/zope.testrunner-"
8040 version ".zip"))
8041 (sha256
8042 (base32
8043 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8044 (build-system python-build-system)
8045 (arguments
8046 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8047 (native-inputs
8048 `(("python-six" ,python-six)
8049 ;("python-zope-interface" ,python-zope-interface)
8050 ("python-zope-exceptions" ,python-zope-exceptions)
8051 ("python-zope-testing" ,python-zope-testing)
8052 ("unzip" ,unzip)))
8053 (propagated-inputs
8054 `(("python-zope-interface" ,python-zope-interface)))
8055 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8056 (synopsis "Zope testrunner script")
8057 (description "Zope.testrunner provides a script for running Python
8058 tests.")
8059 (license license:zpl2.1)))
8060
8061 (define-public python2-zope-testrunner
8062 (let ((base (package-with-python2 python-zope-testrunner)))
8063 (package
8064 (inherit base)
8065 (native-inputs
8066 (append (package-native-inputs base)
8067 `(("python2-subunit" ,python2-subunit)
8068 ("python2-mimeparse" ,python2-mimeparse)))))))
8069
8070 (define-public python-zope-i18nmessageid
8071 (package
8072 (name "python-zope-i18nmessageid")
8073 (version "4.0.3")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 (uri (string-append
8078 "https://pypi.python.org/packages/source/z"
8079 "/zope.i18nmessageid/zope.i18nmessageid-"
8080 version ".tar.gz"))
8081 (sha256
8082 (base32
8083 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8084 (build-system python-build-system)
8085 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8086 (synopsis "Message identifiers for internationalization")
8087 (description "Zope.i18nmessageid provides facilities for declaring
8088 internationalized messages within program source text.")
8089 (license license:zpl2.1)))
8090
8091 (define-public python2-zope-i18nmessageid
8092 (package-with-python2 python-zope-i18nmessageid))
8093
8094 (define-public python-zope-schema
8095 (package
8096 (name "python-zope-schema")
8097 (version "4.4.2")
8098 (source
8099 (origin
8100 (method url-fetch)
8101 (uri (string-append "https://pypi.python.org/packages/source/z"
8102 "/zope.schema/zope.schema-" version ".tar.gz"))
8103 (sha256
8104 (base32
8105 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8106 (build-system python-build-system)
8107 (arguments
8108 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8109 (propagated-inputs
8110 `(("python-zope-event" ,python-zope-event)
8111 ("python-zope-exceptions", python-zope-exceptions)
8112 ("python-zope-interface" ,python-zope-interface)))
8113 (native-inputs
8114 `(("python-zope-testing" ,python-zope-testing)
8115 ("python-coverage" ,python-coverage)
8116 ("python-nose" ,python-nose)))
8117 (home-page "http://pypi.python.org/pypi/zope.schema")
8118 (synopsis "Zope data schemas")
8119 (description "Zope.scheme provides extensions to zope.interface for
8120 defining data schemas.")
8121 (license license:zpl2.1)))
8122
8123 (define-public python2-zope-schema
8124 (package-with-python2 python-zope-schema))
8125
8126 (define-public python-zope-configuration
8127 (package
8128 (name "python-zope-configuration")
8129 (version "4.0.3")
8130 (source (origin
8131 (method url-fetch)
8132 (uri (string-append "https://pypi.python.org/packages/source/z"
8133 "/zope.configuration/zope.configuration-"
8134 version ".tar.gz"))
8135 (sha256
8136 (base32
8137 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8138 (build-system python-build-system)
8139 (arguments
8140 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8141 (propagated-inputs
8142 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8143 ("python-zope-schema" ,python-zope-schema)))
8144 (home-page "http://pypi.python.org/pypi/zope.configuration")
8145 (synopsis "Zope Configuration Markup Language")
8146 (description "Zope.configuration implements ZCML, the Zope Configuration
8147 Markup Language.")
8148 (license license:zpl2.1)))
8149
8150 (define-public python2-zope-configuration
8151 (package-with-python2 python-zope-configuration))
8152
8153 (define-public python-zope-proxy
8154 (package
8155 (name "python-zope-proxy")
8156 (version "4.1.6")
8157 (source
8158 (origin
8159 (method url-fetch)
8160 (uri (string-append "https://pypi.python.org/packages/source/z"
8161 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8162 (sha256
8163 (base32
8164 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8165 (build-system python-build-system)
8166 (arguments
8167 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8168 (propagated-inputs
8169 `(("python-zope-interface" ,python-zope-interface)))
8170 (home-page "http://pypi.python.org/pypi/zope.proxy")
8171 (synopsis "Generic, transparent proxies")
8172 (description "Zope.proxy provides generic, transparent proxies for Python.
8173 Proxies are special objects which serve as mostly-transparent wrappers around
8174 another object, intervening in the apparent behavior of the wrapped object
8175 only when necessary to apply the policy (e.g., access checking, location
8176 brokering, etc.) for which the proxy is responsible.")
8177 (license license:zpl2.1)))
8178
8179 (define-public python2-zope-proxy
8180 (package-with-python2 python-zope-proxy))
8181
8182 (define-public python-zope-location
8183 (package
8184 (name "python-zope-location")
8185 (version "4.0.3")
8186 (source
8187 (origin
8188 (method url-fetch)
8189 (uri (string-append "https://pypi.python.org/packages/source/z"
8190 "/zope.location/zope.location-" version ".tar.gz"))
8191 (sha256
8192 (base32
8193 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8194 (build-system python-build-system)
8195 (arguments
8196 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8197 (propagated-inputs
8198 `(("python-zope-proxy" ,python-zope-proxy)
8199 ("python-zope-schema" ,python-zope-schema)))
8200 (home-page "http://pypi.python.org/pypi/zope.location/")
8201 (synopsis "Zope location library")
8202 (description "Zope.location implements the concept of \"locations\" in
8203 Zope3, which are are special objects that have a structural location.")
8204 (license license:zpl2.1)))
8205
8206 (define-public python2-zope-location
8207 (package-with-python2 python-zope-location))
8208
8209 (define-public python-zope-security
8210 (package
8211 (name "python-zope-security")
8212 (version "4.0.3")
8213 (source
8214 (origin
8215 (method url-fetch)
8216 (uri (string-append "https://pypi.python.org/packages/source/z"
8217 "/zope.security/zope.security-" version ".tar.gz"))
8218 (sha256
8219 (base32
8220 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8221 (build-system python-build-system)
8222 (arguments
8223 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8224 (propagated-inputs
8225 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8226 ("python-zope-proxy" ,python-zope-proxy)
8227 ("python-zope-schema" ,python-zope-schema)))
8228 (native-inputs
8229 `(("python-six" ,python-six)
8230 ("python-zope-component" ,python-zope-component)
8231 ("python-zope-configuration" ,python-zope-configuration)
8232 ("python-zope-location" ,python-zope-location)
8233 ("python-zope-testrunner" ,python-zope-testrunner)
8234 ("python-zope-testing" ,python-zope-testing)))
8235 (home-page "http://pypi.python.org/pypi/zope.security")
8236 (synopsis "Zope security framework")
8237 (description "Zope.security provides a generic mechanism to implement
8238 security policies on Python objects.")
8239 (license license:zpl2.1)))
8240
8241 (define-public python2-zope-security
8242 (let ((zope-security (package-with-python2 python-zope-security)))
8243 (package (inherit zope-security)
8244 (propagated-inputs
8245 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8246 ,@(alist-delete
8247 "python-zope-testrunner"
8248 (package-propagated-inputs zope-security)))))))
8249
8250 (define-public python-zope-component
8251 (package
8252 (name "python-zope-component")
8253 (version "4.2.2")
8254 (source
8255 (origin
8256 (method url-fetch)
8257 (uri (string-append "https://pypi.python.org/packages/source/z"
8258 "/zope.component/zope.component-" version ".tar.gz"))
8259 (sha256
8260 (base32
8261 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8262 (build-system python-build-system)
8263 (arguments
8264 ;; Skip tests due to circular dependency with python-zope-security.
8265 '(#:tests? #f))
8266 (native-inputs
8267 `(("python-zope-testing" ,python-zope-testing)))
8268 (propagated-inputs
8269 `(("python-zope-event" ,python-zope-event)
8270 ("python-zope-interface" ,python-zope-interface)
8271 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8272 ("python-zope-configuration" ,python-zope-configuration)))
8273 (home-page "https://github.com/zopefoundation/zope.component")
8274 (synopsis "Zope Component Architecture")
8275 (description "Zope.component represents the core of the Zope Component
8276 Architecture. Together with the zope.interface package, it provides
8277 facilities for defining, registering and looking up components.")
8278 (license license:zpl2.1)))
8279
8280 (define-public python2-zope-component
8281 (package-with-python2 python-zope-component))
8282
8283 (define-public python-pythondialog
8284 (package
8285 (name "python-pythondialog")
8286 (version "3.4.0")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "pythondialog" version))
8291 (sha256
8292 (base32
8293 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8294 (build-system python-build-system)
8295 (arguments
8296 `(#:phases
8297 (modify-phases %standard-phases
8298 (add-after 'unpack 'patch-path
8299 (lambda* (#:key inputs #:allow-other-keys)
8300 (let* ((dialog (assoc-ref inputs "dialog")))
8301 ;; Since this library really wants to grovel the search path, we
8302 ;; must hardcode dialog's store path into it.
8303 (substitute* "dialog.py"
8304 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8305 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8306 #t))))
8307 #:tests? #f)) ; no test suite
8308 (propagated-inputs
8309 `(("dialog" ,dialog)))
8310 (home-page "http://pythondialog.sourceforge.net/")
8311 (synopsis "Python interface to the UNIX dialog utility")
8312 (description "A Python wrapper for the dialog utility. Its purpose is to
8313 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8314 This allows one to make simple text-mode user interfaces on Unix-like systems")
8315 (license license:lgpl2.1)
8316 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8317
8318 (define-public python2-pythondialog
8319 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8320 (package
8321 (inherit base)
8322 (version (package-version python-pythondialog))
8323 (source (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "python2-pythondialog" version))
8326 (sha256
8327 (base32
8328 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8329
8330 (define-public python-pyrfc3339
8331 (package
8332 (name "python-pyrfc3339")
8333 (version "1.0")
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "pyRFC3339" version))
8338 (sha256
8339 (base32
8340 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8341 (build-system python-build-system)
8342 (propagated-inputs
8343 `(("python-pytz" ,python-pytz)))
8344 (native-inputs
8345 `(("python-nose" ,python-nose)))
8346 (home-page "https://github.com/kurtraschke/pyRFC3339")
8347 (synopsis "Python timestamp library")
8348 (description "Python library for generating and parsing RFC 3339-compliant
8349 timestamps.")
8350 (license license:expat)))
8351
8352 (define-public python2-pyrfc3339
8353 (package-with-python2 python-pyrfc3339))
8354
8355 (define-public python-werkzeug
8356 (package
8357 (name "python-werkzeug")
8358 (version "0.11.15")
8359 (source
8360 (origin
8361 (method url-fetch)
8362 (uri (pypi-uri "Werkzeug" version))
8363 (sha256
8364 (base32
8365 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8366 (build-system python-build-system)
8367 (native-inputs
8368 `(("python-pytest" ,python-pytest)))
8369 (home-page "http://werkzeug.pocoo.org/")
8370 (synopsis "Utilities for WSGI applications")
8371 (description "One of the most advanced WSGI utility modules. It includes a
8372 powerful debugger, full-featured request and response objects, HTTP utilities to
8373 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8374 uploads, a powerful URL routing system and a bunch of community-contributed
8375 addon modules.")
8376 (license license:x11)))
8377
8378 (define-public python2-werkzeug
8379 (package-with-python2 python-werkzeug))
8380
8381 (define-public python-configobj
8382 (package
8383 (name "python-configobj")
8384 (version "5.0.6")
8385 (source (origin
8386 (method url-fetch)
8387 (uri (string-append
8388 "https://pypi.python.org/packages/source/c/configobj/"
8389 "configobj-" version ".tar.gz"))
8390 (sha256
8391 (base32
8392 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8393 ;; Patch setup.py so it looks for python-setuptools, which is
8394 ;; required to parse the keyword 'install_requires' in setup.py.
8395 (patches (search-patches "python-configobj-setuptools.patch"))))
8396 (build-system python-build-system)
8397 (propagated-inputs
8398 `(("python-six" ,python-six)))
8399 (synopsis "Config file reading, writing and validation")
8400 (description "ConfigObj is a simple but powerful config file reader and
8401 writer: an ini file round tripper. Its main feature is that it is very easy to
8402 use, with a straightforward programmer’s interface and a simple syntax for
8403 config files.")
8404 (home-page "https://github.com/DiffSK/configobj")
8405 (license license:bsd-3)))
8406
8407 (define-public python2-configobj
8408 (package-with-python2 python-configobj))
8409
8410 (define-public python-configargparse
8411 (package
8412 (name "python-configargparse")
8413 (version "0.10.0")
8414 (source (origin
8415 (method url-fetch)
8416 (uri (string-append
8417 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8418 "ConfigArgParse-" version ".tar.gz"))
8419 (sha256
8420 (base32
8421 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8422 (build-system python-build-system)
8423 (arguments
8424 ;; FIXME: Bug in test suite filed upstream:
8425 ;; https://github.com/bw2/ConfigArgParse/issues/32
8426 '(#:tests? #f))
8427 (synopsis "Replacement for argparse")
8428 (description "A drop-in replacement for argparse that allows options to also
8429 be set via config files and/or environment variables.")
8430 (home-page "https://github.com/bw2/ConfigArgParse")
8431 (license license:expat)))
8432
8433 (define-public python2-configargparse
8434 (package-with-python2 python-configargparse))
8435
8436 (define-public python-ndg-httpsclient
8437 (package
8438 (name "python-ndg-httpsclient")
8439 (version "0.4.2")
8440 (source (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "ndg_httpsclient" version))
8443 (sha256
8444 (base32
8445 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8446 (build-system python-build-system)
8447 (arguments
8448 '(;; The tests appear to require networking.
8449 #:tests? #f))
8450 (propagated-inputs
8451 `(("python-pyopenssl" ,python-pyopenssl)))
8452 (synopsis "HTTPS support for Python's httplib and urllib2")
8453 (description "This is a HTTPS client implementation for httplib and urllib2
8454 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8455 over the default provided with Python and importantly enables full verification
8456 of the SSL peer.")
8457 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8458 (license license:bsd-3)))
8459
8460 ;; python2-openssl requires special care, so package-with-python2 is
8461 ;; insufficient.
8462 (define-public python2-ndg-httpsclient
8463 (package (inherit python-ndg-httpsclient)
8464 (name "python2-ndg-httpsclient")
8465 (arguments `(#:python ,python-2))
8466 (propagated-inputs
8467 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8468
8469 (define-public python-contextlib2
8470 (package
8471 (name "python-contextlib2")
8472 (version "0.4.0")
8473 (source
8474 (origin
8475 (method url-fetch)
8476 (uri (pypi-uri "contextlib2" version))
8477 (sha256
8478 (base32
8479 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8480 (build-system python-build-system)
8481 (arguments
8482 `(#:phases
8483 (modify-phases %standard-phases
8484 (replace 'check
8485 (lambda _ (zero?
8486 (system*
8487 "python" "test_contextlib2.py" "-v")))))))
8488 (home-page "http://contextlib2.readthedocs.org/")
8489 (synopsis "Tools for decorators and context managers")
8490 (description "This module is primarily a backport of the Python
8491 3.2 contextlib to earlier Python versions. Like contextlib, it
8492 provides utilities for common tasks involving decorators and context
8493 managers. It also contains additional features that are not part of
8494 the standard library.")
8495 (license license:psfl)))
8496
8497 (define-public python2-contextlib2
8498 (package-with-python2 python-contextlib2))
8499
8500 (define-public python-texttable
8501 (package
8502 (name "python-texttable")
8503 (version "0.8.4")
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "texttable" version))
8508 (sha256
8509 (base32
8510 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8511 (build-system python-build-system)
8512 (arguments '(#:tests? #f)) ; no tests
8513 (home-page "https://github.com/foutaise/texttable/")
8514 (synopsis "Python module for creating simple ASCII tables")
8515 (description "Texttable is a Python module for creating simple ASCII
8516 tables.")
8517 (license license:lgpl2.1+)))
8518
8519 (define-public python2-texttable
8520 (package-with-python2 python-texttable))
8521
8522 (define-public python-websocket-client
8523 (package
8524 (name "python-websocket-client")
8525 (version "0.37.0")
8526 (source
8527 (origin
8528 (method url-fetch)
8529 (uri (pypi-uri "websocket_client" version))
8530 (sha256
8531 (base32
8532 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8533 (build-system python-build-system)
8534 (propagated-inputs
8535 `(("python-six" ,python-six)))
8536 (home-page "https://github.com/liris/websocket-client")
8537 (synopsis "WebSocket client for Python")
8538 (description "The Websocket-client module provides the low level APIs for
8539 WebSocket usage in Python programs.")
8540 (license license:lgpl2.1+)))
8541
8542 (define-public python2-websocket-client
8543 (package-with-python2 python-websocket-client))
8544
8545 (define-public python-atomicwrites
8546 (package
8547 (name "python-atomicwrites")
8548 (version "1.1.0")
8549 (source (origin
8550 (method url-fetch)
8551 (uri (pypi-uri "atomicwrites" version))
8552 (sha256
8553 (base32
8554 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
8555 (build-system python-build-system)
8556 (synopsis "Atomic file writes in Python")
8557 (description "Library for atomic file writes using platform dependent tools
8558 for atomic file system operations.")
8559 (home-page "https://github.com/untitaker/python-atomicwrites")
8560 (license license:expat)))
8561
8562 (define-public python2-atomicwrites
8563 (package-with-python2 python-atomicwrites))
8564
8565 (define-public python-requests-toolbelt
8566 (package
8567 (name "python-requests-toolbelt")
8568 (version "0.6.2")
8569 (source (origin
8570 (method url-fetch)
8571 (uri (string-append
8572 "https://pypi.python.org/packages/"
8573 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8574 "requests-toolbelt-" version ".tar.gz"))
8575 (sha256
8576 (base32
8577 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8578 (build-system python-build-system)
8579 (native-inputs
8580 `(("python-betamax" ,python-betamax)
8581 ("python-mock" ,python-mock)
8582 ("python-pytest" ,python-pytest)))
8583 (propagated-inputs
8584 `(("python-requests" ,python-requests)))
8585 (synopsis "Extensions to python-requests")
8586 (description "This is a toolbelt of useful classes and functions to be used
8587 with python-requests.")
8588 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8589 (license license:asl2.0)))
8590
8591 (define-public python-click-threading
8592 (package
8593 (name "python-click-threading")
8594 (version "0.2.0")
8595 (source (origin
8596 (method url-fetch)
8597 (uri (string-append
8598 "https://pypi.python.org/packages/"
8599 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8600 "click-threading-" version ".tar.gz"))
8601 (sha256
8602 (base32
8603 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8604 (build-system python-build-system)
8605 (propagated-inputs
8606 `(("python-click" ,python-click)))
8607 (synopsis "Utilities for multithreading in Click")
8608 (description "This package provides utilities for multithreading in Click
8609 applications.")
8610 (home-page "https://github.com/click-contrib/click-threading")
8611 (license license:expat)))
8612
8613 (define-public python-click-log
8614 (package
8615 (name "python-click-log")
8616 (version "0.1.8")
8617 (source (origin
8618 (method url-fetch)
8619 (uri (pypi-uri "click-log" version))
8620 (sha256
8621 (base32
8622 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8623 (build-system python-build-system)
8624 (propagated-inputs
8625 `(("python-click" ,python-click)))
8626 (synopsis "Logging for click applications")
8627 (description "This package provides a Python library for logging Click
8628 applications.")
8629 (home-page "https://github.com/click-contrib/click-log")
8630 (license license:expat)))
8631
8632 (define-public python-apipkg
8633 (package
8634 (name "python-apipkg")
8635 (version "1.4")
8636 (source (origin
8637 (method url-fetch)
8638 (uri (pypi-uri "apipkg" version))
8639 (sha256
8640 (base32
8641 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8642 (build-system python-build-system)
8643 (native-inputs
8644 `(("python-pytest" ,python-pytest)))
8645 (synopsis "Namespace control and lazy-import mechanism")
8646 (description "With apipkg you can control the exported namespace of a Python
8647 package and greatly reduce the number of imports for your users. It is a small
8648 pure Python module that works on virtually all Python versions.")
8649 (home-page "https://bitbucket.org/hpk42/apipkg")
8650 (license license:expat)))
8651
8652 (define-public python2-apipkg
8653 (package-with-python2 python-apipkg))
8654
8655 (define-public python-execnet
8656 (package
8657 (name "python-execnet")
8658 (version "1.4.1")
8659 (source (origin
8660 (method url-fetch)
8661 (uri (pypi-uri "execnet" version))
8662 (sha256
8663 (base32
8664 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8665 (build-system python-build-system)
8666 (arguments
8667 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8668 ;; The two test failures are caused by the lack of an `ssh` executable.
8669 ;; The test suite can be run with pytest after the 'install' phase.
8670 #:tests? #f))
8671 (native-inputs
8672 `(("python-pytest" ,python-pytest)
8673 ("python-setuptools-scm" ,python-setuptools-scm)))
8674 (propagated-inputs
8675 `(("python-apipkg" ,python-apipkg)))
8676 (synopsis "Rapid multi-Python deployment")
8677 (description "Execnet provides a share-nothing model with
8678 channel-send/receive communication for distributing execution across many
8679 Python interpreters across version, platform and network barriers. It has a
8680 minimal and fast API targetting the following uses:
8681 @enumerate
8682 @item distribute tasks to (many) local or remote CPUs
8683 @item write and deploy hybrid multi-process applications
8684 @item write scripts to administer multiple environments
8685 @end enumerate")
8686 (home-page "http://codespeak.net/execnet/")
8687 (license license:expat)))
8688
8689 (define-public python2-execnet
8690 (package-with-python2 python-execnet))
8691
8692 (define-public python-trollius-redis
8693 (package
8694 (name "python-trollius-redis")
8695 (version "0.1.4")
8696 (source
8697 (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "trollius_redis" version))
8700 (sha256
8701 (base32
8702 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8703 (build-system python-build-system)
8704 ;; TODO: Tests require packaging 'hiredis'.
8705 (arguments '(#:tests? #f))
8706 (home-page "https://github.com/benjolitz/trollius-redis")
8707 (synopsis "Port of asyncio-redis to trollius")
8708 (description "@code{trollius-redis} is a Redis client for Python
8709 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8710 Redis protocol.")
8711 (license license:bsd-2)))
8712
8713 (define-public python2-trollius-redis
8714 (package-with-python2 python-trollius-redis))
8715
8716 ;;; The software provided by this package was integrated into pytest 2.8.
8717 (define-public python-pytest-cache
8718 (package
8719 (name "python-pytest-cache")
8720 (version "1.0")
8721 (source (origin
8722 (method url-fetch)
8723 (uri (pypi-uri "pytest-cache" version))
8724 (sha256
8725 (base32
8726 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8727 (build-system python-build-system)
8728 (propagated-inputs
8729 `(("python-apipkg" ,python-apipkg)
8730 ("python-execnet" ,python-execnet)
8731 ("python-py" ,python-py)
8732 ("python-pytest" ,python-pytest)))
8733 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8734 (description "The pytest-cache plugin provides tools to rerun failures from
8735 the last py.test invocation.")
8736 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8737 (license license:expat)))
8738
8739 (define-public python2-pytest-cache
8740 (package-with-python2 python-pytest-cache))
8741
8742 (define-public python-pytest-localserver
8743 (package
8744 (name "python-pytest-localserver")
8745 (version "0.3.5")
8746 (source (origin
8747 (method url-fetch)
8748 (uri (pypi-uri "pytest-localserver" version))
8749 (sha256
8750 (base32
8751 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8752 (build-system python-build-system)
8753 (arguments
8754 `(#:phases (modify-phases %standard-phases
8755 (replace 'check
8756 (lambda _
8757 (zero? (system* "py.test" "--genscript=runtests.py"))
8758 (zero? (system* "py.test")))))))
8759 (native-inputs
8760 `(("python-pytest" ,python-pytest)
8761 ("python-requests" ,python-requests)
8762 ("python-six" ,python-six)))
8763 (propagated-inputs
8764 `(("python-werkzeug" ,python-werkzeug)))
8765 (synopsis "Py.test plugin to test server connections locally")
8766 (description "Pytest-localserver is a plugin for the pytest testing
8767 framework which enables you to test server connections locally.")
8768 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8769 (license license:expat)))
8770
8771 (define-public python-wsgi-intercept
8772 (package
8773 (name "python-wsgi-intercept")
8774 (version "1.2.2")
8775 (source (origin
8776 (method url-fetch)
8777 (uri (string-append
8778 "https://pypi.python.org/packages/"
8779 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8780 "wsgi_intercept-" version ".tar.gz"))
8781 (sha256
8782 (base32
8783 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8784 (build-system python-build-system)
8785 (propagated-inputs
8786 `(("python-six" ,python-six)))
8787 (native-inputs
8788 `(("python-pytest" ,python-pytest)
8789 ("python-httplib2" ,python-httplib2)
8790 ("python-requests" ,python-requests)
8791 ("python-urllib3" ,python-urllib3)))
8792 (synopsis "Puts a WSGI application in place of a real URI for testing")
8793 (description "Wsgi_intercept installs a WSGI application in place of a real
8794 URI for testing. Testing a WSGI application normally involves starting a
8795 server at a local host and port, then pointing your test code to that address.
8796 Instead, this library lets you intercept calls to any specific host/port
8797 combination and redirect them into a WSGI application importable by your test
8798 program. Thus, you can avoid spawning multiple processes or threads to test
8799 your Web app.")
8800 (home-page "https://github.com/cdent/wsgi-intercept")
8801 (license license:expat)))
8802
8803 (define-public python-pytest-xprocess
8804 (package
8805 (name "python-pytest-xprocess")
8806 (version "0.9.1")
8807 (source (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "pytest-xprocess" version))
8810 (sha256
8811 (base32
8812 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8813 (build-system python-build-system)
8814 (propagated-inputs
8815 `(("python-pytest" ,python-pytest)
8816 ("python-pytest-cache" ,python-pytest-cache)
8817 ("python-psutil" ,python-psutil)))
8818 (synopsis "Pytest plugin to manage external processes across test runs")
8819 (description "Pytest-xprocess is an experimental py.test plugin for managing
8820 processes across test runs.")
8821 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8822 (license license:expat)))
8823
8824 (define-public python-icalendar
8825 (package
8826 (name "python-icalendar")
8827 (version "3.11.3")
8828 (source (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "icalendar" version))
8831 (sha256
8832 (base32
8833 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
8834 (build-system python-build-system)
8835 (propagated-inputs
8836 `(("python-dateutil" ,python-dateutil)
8837 ("python-pytz" ,python-pytz)))
8838 (synopsis "Python library for parsing iCalendar files")
8839 (description "The icalendar package is a parser/generator of iCalendar
8840 files for use with Python.")
8841 (home-page "https://github.com/collective/icalendar")
8842 (license license:bsd-2)))
8843
8844 (define-public python-sphinxcontrib-newsfeed
8845 (package
8846 (name "python-sphinxcontrib-newsfeed")
8847 (version "0.1.4")
8848 (source (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8851 (sha256
8852 (base32
8853 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8854 (arguments '(#:tests? #f)) ; No tests.
8855 (build-system python-build-system)
8856 (propagated-inputs
8857 `(("python-sphinx" ,python-sphinx)))
8858 (synopsis "News Feed extension for Sphinx")
8859 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8860 Blog, News or Announcements section to a Sphinx website.")
8861 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8862 (license license:bsd-2)))
8863
8864 (define-public python-args
8865 (package
8866 (name "python-args")
8867 (version "0.1.0")
8868 (source (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "args" version))
8871 (sha256
8872 (base32
8873 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8874 (build-system python-build-system)
8875 (home-page "https://github.com/kennethreitz/args")
8876 (synopsis "Command-line argument parser")
8877 (description
8878 "This library provides a Python module to parse command-line arguments.")
8879 (license license:bsd-3)))
8880
8881 (define-public python2-args
8882 (package-with-python2 python-args))
8883
8884 (define-public python-clint
8885 (package
8886 (name "python-clint")
8887 (version "0.5.1")
8888 (source (origin
8889 (method url-fetch)
8890 (uri (pypi-uri "clint" version))
8891 (sha256
8892 (base32
8893 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8894 (build-system python-build-system)
8895 (arguments
8896 '(#:phases
8897 (modify-phases %standard-phases
8898 (replace 'check
8899 (lambda _
8900 (zero? (system* "py.test" "-v")))))))
8901 (native-inputs
8902 `(("python-pytest" ,python-pytest)))
8903 (propagated-inputs
8904 `(("python-args" ,python-args)))
8905 (home-page "https://github.com/kennethreitz/clint")
8906 (synopsis "Command-line interface tools")
8907 (description
8908 "Clint is a Python module filled with a set of tools for developing
8909 command-line applications, including tools for colored and indented
8910 output, progress bar display, and pipes.")
8911 (license license:isc)))
8912
8913 (define-public python2-clint
8914 (package-with-python2 python-clint))
8915
8916 (define-public python-astor
8917 (package
8918 (name "python-astor")
8919 (version "0.5")
8920 (source (origin
8921 (method url-fetch)
8922 (uri (pypi-uri "astor" version))
8923 (sha256
8924 (base32
8925 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8926 (build-system python-build-system)
8927 (home-page "https://github.com/berkerpeksag/astor")
8928 (synopsis "Read and write Python ASTs")
8929 (description
8930 "Astor is designed to allow easy manipulation of Python source via the
8931 Abstract Syntax Tree.")
8932 (license license:bsd-3)))
8933
8934 (define-public python2-astor
8935 (package-with-python2 python-astor))
8936
8937 (define-public python-rply
8938 (package
8939 (name "python-rply")
8940 (version "0.7.4")
8941 (source (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "rply" version))
8944 (sha256
8945 (base32
8946 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8947 (build-system python-build-system)
8948 (propagated-inputs
8949 `(("python-appdirs" ,python-appdirs)))
8950 (home-page "https://github.com/alex/rply")
8951 (synopsis "Parser generator for Python")
8952 (description
8953 "This package provides a pure Python based parser generator, that also
8954 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8955 with a new public API, and RPython support.")
8956 (license license:bsd-3)))
8957
8958 (define-public python2-rply
8959 (package-with-python2 python-rply))
8960
8961 (define-public python-hy
8962 (package
8963 (name "python-hy")
8964 (version "0.11.1")
8965 (source (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "hy" version))
8968 (sha256
8969 (base32
8970 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8971 (build-system python-build-system)
8972 (arguments
8973 '(#:phases
8974 (modify-phases %standard-phases
8975 (replace 'check
8976 (lambda _
8977 ;; Tests require write access to HOME.
8978 (setenv "HOME" "/tmp")
8979 (zero? (system* "nosetests")))))))
8980 (native-inputs
8981 `(("python-coverage" ,python-coverage)
8982 ("python-nose" ,python-nose)))
8983 (propagated-inputs
8984 `(("python-astor" ,python-astor)
8985 ("python-clint" ,python-clint)
8986 ("python-rply" ,python-rply)))
8987 (home-page "http://hylang.org/")
8988 (synopsis "Lisp frontend to Python")
8989 (description
8990 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8991 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8992 Python at your fingertips, in Lisp form.")
8993 (license license:expat)))
8994
8995 (define-public python2-hy
8996 (package-with-python2 python-hy))
8997
8998 (define-public python-rauth
8999 (package
9000 (name "python-rauth")
9001 (version "0.7.2")
9002 (source
9003 (origin
9004 (method url-fetch)
9005 (uri (pypi-uri "rauth" version))
9006 (sha256
9007 (base32
9008 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
9009 (build-system python-build-system)
9010 (arguments
9011 `(#:test-target "check"))
9012 (propagated-inputs
9013 `(("python-requests" ,python-requests)))
9014 (home-page "https://github.com/litl/rauth")
9015 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9016 (description
9017 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9018 provides service wrappers for convenient connection initialization and
9019 authenticated session objects providing things like keep-alive.")
9020 (license license:expat)
9021 (properties `((python2-variant . ,(delay python2-rauth))))))
9022
9023 (define-public python2-rauth
9024 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9025 (package
9026 (inherit base)
9027 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9028 ,@(package-native-inputs base))))))
9029
9030 (define-public python2-functools32
9031 (package
9032 (name "python2-functools32")
9033 (version "3.2.3-2")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "functools32" version))
9038 (sha256
9039 (base32
9040 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9041 (build-system python-build-system)
9042 (arguments
9043 `(#:python ,python-2
9044 #:tests? #f)) ; no test target
9045 (home-page "https://github.com/MiCHiLU/python-functools32")
9046 (synopsis
9047 "Backport of the functools module from Python 3.2.3")
9048 (description
9049 "This package is a backport of the @code{functools} module from Python
9050 3.2.3 for use with older versions of Python and PyPy.")
9051 (license license:expat)))
9052
9053 (define-public python2-subprocess32
9054 (package
9055 (name "python2-subprocess32")
9056 (version "3.2.7")
9057 (source (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "subprocess32" version))
9060 (sha256
9061 (base32
9062 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9063 (patches
9064 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9065 (build-system python-build-system)
9066 (arguments
9067 `(#:python ,python-2
9068 #:phases
9069 (modify-phases %standard-phases
9070 (add-after 'unpack 'patch-/bin/sh
9071 (lambda _
9072 (substitute* '("subprocess32.py"
9073 "test_subprocess32.py")
9074 (("/bin/sh") (which "sh")))
9075 #t))
9076 (delete 'check)
9077 (add-after 'install 'check
9078 (lambda* (#:key inputs outputs #:allow-other-keys)
9079 ;; For some reason this package fails to import
9080 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9081 ;; directory. Running tests after install is easier.
9082 (add-installed-pythonpath inputs outputs)
9083 (zero? (system* "python" "test_subprocess32.py")))))))
9084 (home-page "https://github.com/google/python-subprocess32")
9085 (synopsis "Backport of the subprocess module from Python 3.2")
9086 (description
9087 "This is a backport of the @code{subprocess} standard library module
9088 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9089 new features. On POSIX systems it is guaranteed to be reliable when used
9090 in threaded applications. It includes timeout support from Python 3.3 but
9091 otherwise matches 3.2’s API.")
9092 (license license:psfl)))
9093
9094 (define-public python2-futures
9095 (package
9096 (name "python2-futures")
9097 (version "3.0.3")
9098 (source
9099 (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "futures" version))
9102 (sha256
9103 (base32
9104 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
9105 (build-system python-build-system)
9106 (arguments `(#:python ,python-2))
9107 (home-page "https://github.com/agronholm/pythonfutures")
9108 (synopsis
9109 "Backport of the concurrent.futures package from Python 3.2")
9110 (description
9111 "The concurrent.futures module provides a high-level interface for
9112 asynchronously executing callables. This package backports the
9113 concurrent.futures package from Python 3.2")
9114 (license license:bsd-3)))
9115
9116 (define-public python-promise
9117 (package
9118 (name "python-promise")
9119 (version "0.4.2")
9120 (source
9121 (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "promise" version))
9124 (sha256
9125 (base32
9126 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9127 (build-system python-build-system)
9128 ;; Tests wants python-futures, which is a python2 only program, and
9129 ;; can't be found by python-promise at test time.
9130 (arguments `(#:tests? #f))
9131 (home-page "https://github.com/syrusakbary/promise")
9132 (synopsis "Promises/A+ implementation for Python")
9133 (description
9134 "Promises/A+ implementation for Python")
9135 (properties `((python2-variant . ,(delay python2-promise))))
9136 (license license:expat)))
9137
9138 (define-public python2-promise
9139 (let ((promise (package-with-python2
9140 (strip-python2-variant python-promise))))
9141 (package (inherit promise)
9142 (arguments (substitute-keyword-arguments (package-arguments promise)
9143 ((#:tests? _) #t)))
9144 (native-inputs
9145 `(("python2-futures" ,python2-futures)
9146 ("python2-pytest" ,python2-pytest)
9147 ,@(package-native-inputs promise))))))
9148
9149 (define-public python-urllib3
9150 (package
9151 (name "python-urllib3")
9152 (version "1.18.1")
9153 (source
9154 (origin
9155 (method url-fetch)
9156 (uri (pypi-uri "urllib3" version))
9157 (sha256
9158 (base32
9159 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9160 (build-system python-build-system)
9161 (arguments `(#:tests? #f))
9162 (native-inputs
9163 `(;; some packages for tests
9164 ("python-nose" ,python-nose)
9165 ("python-mock" ,python-mock)
9166 ("python-tornado" ,python-tornado)))
9167 (propagated-inputs
9168 `(;; extra packages for https security
9169 ("python-certifi" ,python-certifi)
9170 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9171 ("python-pyasn1" ,python-pyasn1)
9172 ("python-pyopenssl" ,python-pyopenssl)))
9173 (home-page "https://urllib3.readthedocs.org/")
9174 (synopsis "HTTP library with thread-safe connection pooling")
9175 (description
9176 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9177 can reuse the same socket connection for multiple requests, it can POST files,
9178 supports url redirection and retries, and also gzip and deflate decoding.")
9179 (license license:expat)))
9180
9181 (define-public python2-urllib3
9182 (package-with-python2 python-urllib3))
9183
9184 (define-public python-colorama
9185 (package
9186 (name "python-colorama")
9187 (version "0.3.7")
9188 (source
9189 (origin
9190 (method url-fetch)
9191 (uri (pypi-uri "colorama" version))
9192 (sha256
9193 (base32
9194 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9195 (build-system python-build-system)
9196 (synopsis "Colored terminal text rendering for Python")
9197 (description "Colorama is a Python library for rendering colored terminal
9198 text.")
9199 (home-page "https://pypi.python.org/pypi/colorama")
9200 (license license:bsd-3)))
9201
9202 (define-public python2-colorama
9203 (package-with-python2 python-colorama))
9204
9205 (define-public python-rsa
9206 (package
9207 (name "python-rsa")
9208 (version "3.4.2")
9209 (source
9210 (origin
9211 (method url-fetch)
9212 (uri (pypi-uri "rsa" version))
9213 (sha256
9214 (base32
9215 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9216 (build-system python-build-system)
9217 (propagated-inputs
9218 `(("python-pyasn1" ,python-pyasn1)))
9219 (synopsis "Pure-Python RSA implementation")
9220 (description "Python-RSA is a pure-Python RSA implementation. It supports
9221 encryption and decryption, signing and verifying signatures, and key
9222 generation according to PKCS#1 version 1.5. It can be used as a Python
9223 library as well as on the command line.")
9224 (home-page "http://stuvel.eu/rsa")
9225 (license license:asl2.0)))
9226
9227 (define-public python2-rsa
9228 (package-with-python2 python-rsa))
9229
9230 (define-public python-pluggy
9231 (package
9232 (name "python-pluggy")
9233 (version "0.3.1")
9234 (source
9235 (origin
9236 (method url-fetch)
9237 (uri (pypi-uri "pluggy" version))
9238 (sha256
9239 (base32
9240 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9241 (build-system python-build-system)
9242 (synopsis "Plugin and hook calling mechanism for Python")
9243 (description "Pluggy is an extraction of the plugin manager as used by
9244 Pytest but stripped of Pytest specific details.")
9245 (home-page "https://pypi.python.org/pypi/pluggy")
9246 (license license:expat)))
9247
9248 (define-public python2-pluggy
9249 (package-with-python2 python-pluggy))
9250
9251 (define-public python-tox
9252 (package
9253 (name "python-tox")
9254 (version "2.3.1")
9255 (source
9256 (origin
9257 (method url-fetch)
9258 (uri (pypi-uri "tox" version))
9259 (sha256
9260 (base32
9261 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9262 (build-system python-build-system)
9263 (arguments
9264 ;; FIXME: Tests require pytest-timeout, which itself requires
9265 ;; pytest>=2.8.0 for installation.
9266 '(#:tests? #f))
9267 (propagated-inputs
9268 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9269 ("python-py" ,python-py)
9270 ("python-virtualenv" ,python-virtualenv)))
9271 (native-inputs
9272 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9273 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9274 (home-page "http://tox.testrun.org/")
9275 (synopsis "Virtualenv-based automation of test activities")
9276 (description "Tox is a generic virtualenv management and test command line
9277 tool. It can be used to check that a package installs correctly with
9278 different Python versions and interpreters, or run tests in each type of
9279 supported environment, or act as a frontend to continuous integration
9280 servers.")
9281 (license license:expat)))
9282
9283 (define-public python2-tox
9284 (package-with-python2 python-tox))
9285
9286 (define-public python-jmespath
9287 (package
9288 (name "python-jmespath")
9289 (version "0.9.0")
9290 (source
9291 (origin
9292 (method url-fetch)
9293 (uri (pypi-uri "jmespath" version))
9294 (sha256
9295 (base32
9296 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9297 (build-system python-build-system)
9298 (native-inputs
9299 `(("python-nose" ,python-nose)))
9300 (synopsis "JSON Matching Expressions")
9301 (description "JMESPath (pronounced “james path”) is a Python library that
9302 allows one to declaratively specify how to extract elements from a JSON
9303 document.")
9304 (home-page "https://github.com/jmespath/jmespath.py")
9305 (license license:expat)))
9306
9307 (define-public python2-jmespath
9308 (package-with-python2 python-jmespath))
9309
9310 (define-public python-botocore
9311 (package
9312 (name "python-botocore")
9313 (version "1.5.10")
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "botocore" version))
9318 (sha256
9319 (base32
9320 "1hqvqwhgfcch4knm1l02ynx7qd1igxk3pj34c1x2b0r79jca524n"))))
9321 (build-system python-build-system)
9322 (arguments
9323 ;; FIXME: Many tests are failing.
9324 '(#:tests? #f))
9325 (propagated-inputs
9326 `(("python-dateutil" ,python-dateutil)
9327 ("python-docutils" ,python-docutils)
9328 ("python-jmespath" ,python-jmespath)))
9329 (native-inputs
9330 `(("python-mock" ,python-mock)
9331 ("python-nose" ,python-nose)
9332 ("behave" ,behave)
9333 ("python-tox" ,python-tox)
9334 ("python-wheel" ,python-wheel)))
9335 (home-page "https://github.com/boto/botocore")
9336 (synopsis "Low-level interface to AWS")
9337 (description "Botocore is a Python library that provides a low-level
9338 interface to the Amazon Web Services (AWS) API.")
9339 (license license:asl2.0)))
9340
9341 (define-public python2-botocore
9342 (package-with-python2 python-botocore))
9343
9344 (define-public awscli
9345 (package
9346 (name "awscli")
9347 (version "1.11.47")
9348 (source
9349 (origin
9350 (method url-fetch)
9351 (uri (pypi-uri name version))
9352 (sha256
9353 (base32
9354 "0p0pila0k99fm87q1gb24wyd34ags0vkh37h1fa6hklq4mi69i1w"))))
9355 (build-system python-build-system)
9356 (propagated-inputs
9357 `(("python-colorama" ,python-colorama)
9358 ("python-botocore" ,python-botocore)
9359 ("python-s3transfer" ,python-s3transfer)
9360 ("python-docutils" ,python-docutils)
9361 ("python-rsa" ,python-rsa)))
9362 (arguments
9363 ;; FIXME: The 'pypi' release does not contain tests.
9364 '(#:tests? #f))
9365 (home-page "https://aws.amazon.com/cli/")
9366 (synopsis "Command line client for AWS")
9367 (description "AWS CLI provides a unified command line interface to the
9368 Amazon Web Services (AWS) API.")
9369 (license license:asl2.0)))
9370
9371 (define-public python-hypothesis
9372 (package
9373 (name "python-hypothesis")
9374 (version "3.1.0")
9375 (source (origin
9376 (method url-fetch)
9377 (uri (pypi-uri "hypothesis" version))
9378 (sha256
9379 (base32
9380 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9381 (build-system python-build-system)
9382 (native-inputs
9383 `(("python-flake8" ,python-flake8)
9384 ("python-pytest" ,python-pytest)))
9385 (synopsis "Library for property based testing")
9386 (description "Hypothesis is a library for testing your Python code against a
9387 much larger range of examples than you would ever want to write by hand. It’s
9388 based on the Haskell library, Quickcheck, and is designed to integrate
9389 seamlessly into your existing Python unit testing work flow.")
9390 (home-page "https://github.com/DRMacIver/hypothesis")
9391 (license license:mpl2.0)
9392 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9393
9394 (define-public python2-hypothesis
9395 (let ((hypothesis (package-with-python2
9396 (strip-python2-variant python-hypothesis))))
9397 (package (inherit hypothesis)
9398 (native-inputs
9399 `(("python2-enum34" ,python2-enum34)
9400 ,@(package-native-inputs hypothesis))))))
9401
9402 (define-public python-pytest-subtesthack
9403 (package
9404 (name "python-pytest-subtesthack")
9405 (version "0.1.1")
9406 (source (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "pytest-subtesthack" version))
9409 (sha256
9410 (base32
9411 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9412 (build-system python-build-system)
9413 (propagated-inputs
9414 `(("python-pytest" ,python-pytest)))
9415 (synopsis "Set-up and tear-down fixtures for unit tests")
9416 (description "This plugin allows you to set up and tear down fixtures within
9417 unit test functions that use @code{py.test}. This is useful for using
9418 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9419 function multiple times, without setting up or tearing down fixture state as is
9420 normally the case.")
9421 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9422 (license license:unlicense)))
9423
9424 (define-public python2-pytest-subtesthack
9425 (package-with-python2 python-pytest-subtesthack))
9426
9427 (define-public python-xdo
9428 (package
9429 (name "python-xdo")
9430 (version "0.3")
9431 (source (origin
9432 (method url-fetch)
9433 (uri (string-append
9434 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9435 "python-xdo_" version ".orig.tar.gz"))
9436 (sha256
9437 (base32
9438 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9439 (build-system python-build-system)
9440 (arguments
9441 '(#:phases
9442 (modify-phases %standard-phases
9443 (add-before 'install 'patch-libxdo-path
9444 ;; Hardcode the path of dynamically loaded libxdo library.
9445 (lambda* (#:key inputs #:allow-other-keys)
9446 (let ((libxdo (string-append
9447 (assoc-ref inputs "xdotool")
9448 "/lib/libxdo.so")))
9449 (substitute* "xdo/_xdo.py"
9450 (("find_library\\(\"xdo\"\\)")
9451 (simple-format #f "\"~a\"" libxdo)))
9452 #t))))
9453 #:tests? #f)) ; no tests provided
9454 (propagated-inputs
9455 `(("python-six" ,python-six)))
9456 (inputs
9457 `(("xdotool" ,xdotool)
9458 ("libX11" ,libx11)))
9459 (home-page "https://tracker.debian.org/pkg/python-xdo")
9460 (synopsis "Python library for simulating X11 keyboard/mouse input")
9461 (description "Provides bindings to libxdo for manipulating X11 via simulated
9462 input. (Note that this is mostly a legacy library; you may wish to look at
9463 python-xdo for newer bindings.)")
9464 (license license:bsd-3)))
9465
9466 (define-public python2-xdo
9467 (package-with-python2 python-xdo))
9468
9469 (define-public python-wtforms
9470 (package
9471 (name "python-wtforms")
9472 (version "2.1")
9473 (source
9474 (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "WTForms" version ".zip"))
9477 (sha256
9478 (base32
9479 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9480 (build-system python-build-system)
9481 (arguments
9482 '(#:phases
9483 (modify-phases %standard-phases
9484 (add-after 'unpack 'remove-django-test
9485 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9486 (lambda _
9487 (substitute*
9488 "tests/runtests.py"
9489 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9490 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9491 #t)))))
9492 (native-inputs
9493 `(("unzip" ,unzip)))
9494 (home-page "http://wtforms.simplecodes.com/")
9495 (synopsis
9496 "Form validation and rendering library for Python web development")
9497 (description
9498 "WTForms is a flexible forms validation and rendering library
9499 for Python web development. It is very similar to the web form API
9500 available in Django, but is a standalone package.")
9501 (license license:bsd-3)))
9502
9503 (define-public python2-wtforms
9504 (package-with-python2 python-wtforms))
9505
9506 (define-public python-mako
9507 (package
9508 (name "python-mako")
9509 (version "1.0.6")
9510 (source
9511 (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "Mako" version))
9514 (sha256
9515 (base32
9516 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9517 (build-system python-build-system)
9518 (propagated-inputs
9519 `(("python-markupsafe" ,python-markupsafe)))
9520 (native-inputs
9521 `(("python-mock" ,python-mock)
9522 ("python-nose" ,python-nose)
9523 ("python-pytest" ,python-pytest)))
9524 (home-page "http://www.makotemplates.org/")
9525 (synopsis "Templating language for Python")
9526 (description "Mako is a templating language for Python that compiles
9527 templates into Python modules.")
9528 (license license:expat)))
9529
9530 (define-public python2-mako
9531 (package-with-python2 python-mako))
9532
9533 (define-public python-waitress
9534 (package
9535 (name "python-waitress")
9536 (version "0.8.10")
9537 (source
9538 (origin
9539 (method url-fetch)
9540 (uri (pypi-uri "waitress" version))
9541 (sha256
9542 (base32
9543 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9544 (build-system python-build-system)
9545 (home-page "https://github.com/Pylons/waitress")
9546 (synopsis "Waitress WSGI server")
9547 (description "Waitress is meant to be a production-quality pure-Python WSGI
9548 server with very acceptable performance.")
9549 (license license:zpl2.1)))
9550
9551 (define-public python2-waitress
9552 (package-with-python2 python-waitress))
9553
9554 (define-public python-wsgiproxy2
9555 (package
9556 (name "python-wsgiproxy2")
9557 (version "0.4.2")
9558 (source
9559 (origin
9560 (method url-fetch)
9561 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9562 (sha256
9563 (base32
9564 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9565 (build-system python-build-system)
9566 (arguments
9567 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9568 ;; support Python 3:
9569 ;; https://github.com/benoitc/restkit/issues/140
9570 #:tests? #f))
9571 (native-inputs
9572 `(("unzip" ,unzip)
9573 ("python-nose" ,python-nose)
9574 ("python-coverage" ,python-coverage)))
9575 (propagated-inputs
9576 `(("python-six" ,python-six)
9577 ("python-webob" ,python-webob)))
9578 (home-page
9579 "https://github.com/gawel/WSGIProxy2/")
9580 (synopsis "WSGI Proxy with various http client backends")
9581 (description "WSGI turns HTTP requests into WSGI function calls.
9582 WSGIProxy turns WSGI function calls into HTTP requests.
9583 It also includes code to sign requests and pass private data,
9584 and to spawn subprocesses to handle requests.")
9585 (license license:expat)))
9586
9587 (define-public python2-wsgiproxy2
9588 (package-with-python2 python-wsgiproxy2))
9589
9590 (define-public python-pastedeploy
9591 (package
9592 (name "python-pastedeploy")
9593 (version "1.5.2")
9594 (source
9595 (origin
9596 (method url-fetch)
9597 (uri (pypi-uri "PasteDeploy" version))
9598 (sha256
9599 (base32
9600 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9601 (build-system python-build-system)
9602 (native-inputs
9603 `(("python-nose" ,python-nose)))
9604 (home-page "http://pythonpaste.org/deploy/")
9605 (synopsis
9606 "Load, configure, and compose WSGI applications and servers")
9607 (description
9608 "This tool provides code to load WSGI applications and servers from URIs;
9609 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9610 Script provides commands to serve applications based on this configuration
9611 file.")
9612 (license license:expat)))
9613
9614 (define-public python2-pastedeploy
9615 (package-with-python2 python-pastedeploy))
9616
9617 (define-public python-paste
9618 (package
9619 (name "python-paste")
9620 (version "2.0.3")
9621 (source
9622 (origin
9623 (method url-fetch)
9624 (uri (pypi-uri "Paste" version))
9625 (sha256
9626 (base32
9627 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9628 (patches (search-patches "python-paste-remove-website-test.patch"
9629 "python-paste-remove-timing-test.patch"))))
9630 (build-system python-build-system)
9631 (native-inputs
9632 `(("python-nose" ,python-nose)))
9633 (propagated-inputs
9634 `(("python-six" ,python-six)))
9635 (home-page "http://pythonpaste.org")
9636 (synopsis
9637 "Python web development tools, focusing on WSGI")
9638 (description
9639 "Paste provides a variety of web development tools and middleware which
9640 can be nested together to build web applications. Paste's design closely
9641 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9642 (license license:expat)))
9643
9644 (define-public python2-paste
9645 (package-with-python2 python-paste))
9646
9647 (define-public python-pastescript
9648 (package
9649 (name "python-pastescript")
9650 (version "2.0.2")
9651 (source
9652 (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "PasteScript" version))
9655 (sha256
9656 (base32
9657 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9658 (build-system python-build-system)
9659 (native-inputs
9660 `(("python-nose" ,python-nose)))
9661 (propagated-inputs
9662 `(("python-paste" ,python-paste)
9663 ("python-pastedeploy" ,python-pastedeploy)))
9664 (home-page "http://pythonpaste.org/script/")
9665 (arguments
9666 '(;; Unfortunately, this requires the latest unittest2,
9667 ;; but that requires traceback2 which requires linecache2 which requires
9668 ;; unittest2. So we're skipping tests for now.
9669 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9670 ;; so in theory we could get around this situation somehow.)
9671 #:tests? #f))
9672 (synopsis
9673 "Pluggable command line tool for serving web applications and more")
9674 (description
9675 "PasteScript is a plugin-friendly command line tool which provides a
9676 variety of features, from launching web applications to bootstrapping project
9677 layouts.")
9678 (license license:expat)))
9679
9680 (define-public python2-pastescript
9681 (package-with-python2 python-pastescript))
9682
9683 (define-public python-pyquery
9684 (package
9685 (name "python-pyquery")
9686 (version "1.2.17")
9687 (source
9688 (origin
9689 (method url-fetch)
9690 (uri (pypi-uri "pyquery" version))
9691 (sha256
9692 (base32
9693 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9694 (build-system python-build-system)
9695 (native-inputs
9696 `(("python-webob" ,python-webob)
9697 ("python-webtest" ,python-webtest)))
9698 (propagated-inputs
9699 `(("python-lxml" ,python-lxml)
9700 ("python-cssselect" ,python-cssselect)))
9701 (home-page "https://github.com/gawel/pyquery")
9702 (synopsis "Make jQuery-like queries on xml documents")
9703 (description "pyquery allows you to make jQuery queries on xml documents.
9704 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9705 fast xml and html manipulation.")
9706 (license license:bsd-3)))
9707
9708 (define-public python2-pyquery
9709 (package-with-python2 python-pyquery))
9710
9711 (define-public python-webtest
9712 (package
9713 (name "python-webtest")
9714 (version "2.0.20")
9715 (source
9716 (origin
9717 (method url-fetch)
9718 (uri (pypi-uri "WebTest" version))
9719 (sha256
9720 (base32
9721 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9722 (build-system python-build-system)
9723 (arguments
9724 `(;; Unfortunately we have to disable tests!
9725 ;; This release of WebTest is pinned to python-nose < 1.3,
9726 ;; but older versions of python-nose are plagued with the following
9727 ;; bug(s), which rears its ugly head during test execution:
9728 ;; https://github.com/nose-devs/nose/issues/759
9729 ;; https://github.com/nose-devs/nose/pull/811
9730 #:tests? #f))
9731 ;; Commented out code is no good, but in this case, once tests
9732 ;; are ready to be enabled again, we should put the following
9733 ;; in place:
9734 ;; (native-inputs
9735 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9736 ;; ; but see above comment
9737 ;; ("python-coverage" ,python-coverage)
9738 ;; ("python-mock" ,python-mock)
9739 ;; ("python-pastedeploy" ,python-pastedeploy)
9740 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9741 ;; ("python-pyquery" ,python-pyquery)))
9742 (propagated-inputs
9743 `(("python-waitress" ,python-waitress)
9744 ("python-webob" ,python-webob)
9745 ("python-six" ,python-six)
9746 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9747 (home-page "http://webtest.pythonpaste.org/")
9748 (synopsis "Helper to test WSGI applications")
9749 (description "Webtest allows you to test your Python web applications
9750 without starting an HTTP server. It supports anything that supports the
9751 minimum of WSGI.")
9752 (license license:expat)))
9753
9754 (define-public python2-webtest
9755 (package-with-python2 python-webtest))
9756
9757 (define-public python-anyjson
9758 (package
9759 (name "python-anyjson")
9760 (version "0.3.3")
9761 (source
9762 (origin
9763 (method url-fetch)
9764 (uri (pypi-uri "anyjson" version))
9765 (sha256
9766 (base32
9767 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9768 (build-system python-build-system)
9769 (arguments
9770 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9771 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9772 ;; whatever) so this transformation needs to be done before the tests
9773 ;; can be run. Maybe we could add a build step to transform beforehand
9774 ;; but it could be annoying/difficult.
9775 ;; We can enable tests for the Python 2 version, though, and do below.
9776 #:tests? #f))
9777 (home-page "http://bitbucket.org/runeh/anyjson/")
9778 (synopsis
9779 "Wraps best available JSON implementation in a common interface")
9780 (description
9781 "Anyjson loads whichever is the fastest JSON module installed
9782 and provides a uniform API regardless of which JSON implementation is used.")
9783 (license license:bsd-3)
9784 (properties `((python2-variant . ,(delay python2-anyjson))))))
9785
9786 (define-public python2-anyjson
9787 (let ((anyjson (package-with-python2
9788 (strip-python2-variant python-anyjson))))
9789 (package
9790 (inherit anyjson)
9791 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9792 #:tests? #t
9793 ,@(package-arguments anyjson)))
9794 (native-inputs `(("python2-nose" ,python2-nose))))))
9795
9796 (define-public python-amqp
9797 (package
9798 (name "python-amqp")
9799 (version "1.4.9")
9800 (source
9801 (origin
9802 (method url-fetch)
9803 (uri (pypi-uri "amqp" version))
9804 (sha256
9805 (base32
9806 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9807 (build-system python-build-system)
9808 (native-inputs
9809 `(("python-nose" ,python-nose)
9810 ("python-mock" ,python-mock)))
9811 (home-page "http://github.com/celery/py-amqp")
9812 (synopsis
9813 "Low-level AMQP client for Python (fork of amqplib)")
9814 (description
9815 "This is a fork of amqplib which was originally written by Barry Pederson.
9816 It is maintained by the Celery project, and used by kombu as a pure python
9817 alternative when librabbitmq is not available.")
9818 (license license:lgpl2.1+)
9819 (properties `((python2-variant . ,(delay python2-amqp))))))
9820
9821 (define-public python2-amqp
9822 (let ((amqp (package-with-python2
9823 (strip-python2-variant python-amqp))))
9824 (package
9825 (inherit amqp)
9826 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9827 ;; unmaintained. Weirdly, does not do this on the python 3
9828 ;; version?
9829 #:tests? #f
9830 ,@(package-arguments amqp))))))
9831
9832 (define-public python-kombu
9833 (package
9834 (name "python-kombu")
9835 (version "3.0.37")
9836 (source
9837 (origin
9838 (method url-fetch)
9839 (uri (pypi-uri "kombu" version))
9840 (sha256
9841 (base32
9842 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9843 (build-system python-build-system)
9844 (native-inputs
9845 `(("python-mock" ,python-mock)
9846 ("python-nose" ,python-nose)))
9847 (propagated-inputs
9848 `(("python-anyjson" ,python-anyjson)
9849 ("python-amqp" ,python-amqp)
9850 ("python-redis" ,python-redis)))
9851 (home-page "http://kombu.readthedocs.org")
9852 (synopsis "Message passing library for Python")
9853 (description "The aim of Kombu is to make messaging in Python as easy as
9854 possible by providing an idiomatic high-level interface for the AMQ protocol,
9855 and also provide proven and tested solutions to common messaging problems.
9856 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9857 message orientation, queuing, routing, reliability and security, for which the
9858 RabbitMQ messaging server is the most popular implementation.")
9859 (license license:bsd-3)
9860 (properties `((python2-variant . ,(delay python2-kombu))))))
9861
9862 (define-public python2-kombu
9863 (let ((kombu (package-with-python2
9864 (strip-python2-variant python-kombu))))
9865 (package
9866 (inherit kombu)
9867 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9868 ;; It works fine on the python3 variant.
9869 #:tests? #f
9870 ,@(package-arguments kombu)))
9871 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9872 ,@(package-native-inputs kombu))))))
9873
9874 (define-public python-billiard
9875 (package
9876 (name "python-billiard")
9877 (version "3.3.0.23")
9878 (source
9879 (origin
9880 (method url-fetch)
9881 (uri (pypi-uri "billiard" version))
9882 (sha256
9883 (base32
9884 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9885 (build-system python-build-system)
9886 (native-inputs
9887 `(("python-nose" ,python-nose)))
9888 (home-page "http://github.com/celery/billiard")
9889 (synopsis
9890 "Python multiprocessing fork with improvements and bugfixes")
9891 (description
9892 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9893 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9894 pyprocessing package. This standalone variant is intended to be compatible with
9895 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9896 (license license:bsd-3)
9897 (properties `((python2-variant . ,(delay python2-billiard))))))
9898
9899 (define-public python2-billiard
9900 (let ((billiard (package-with-python2
9901 (strip-python2-variant python-billiard))))
9902 (package
9903 (inherit billiard)
9904 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9905 ("python2-mock" ,python2-mock)
9906 ,@(package-native-inputs billiard))))))
9907
9908 (define-public python-celery
9909 (package
9910 (name "python-celery")
9911 (version "3.1.24")
9912 (source
9913 (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "celery" version))
9916 (sha256
9917 (base32
9918 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9919 (build-system python-build-system)
9920 (arguments
9921 `(#:phases
9922 (modify-phases %standard-phases
9923 ;; These tests break with Python 3.5:
9924 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9925 (replace 'check
9926 (lambda _
9927 (zero?
9928 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9929 (native-inputs
9930 `(("python-nose" ,python-nose)))
9931 (propagated-inputs
9932 `(("python-pytz" ,python-pytz)
9933 ("python-billiard" ,python-billiard)
9934 ("python-kombu" ,python-kombu)))
9935 (home-page "http://celeryproject.org")
9936 (synopsis "Distributed Task Queue")
9937 (description "Celery is an asynchronous task queue/job queue based on
9938 distributed message passing. It is focused on real-time operation, but
9939 supports scheduling as well. The execution units, called tasks, are executed
9940 concurrently on a single or more worker servers using multiprocessing,
9941 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9942 synchronously (wait until ready).")
9943 (license license:bsd-3)
9944 (properties `((python2-variant . ,(delay python2-celery))))))
9945
9946 (define-public python2-celery
9947 (let ((celery (package-with-python2
9948 (strip-python2-variant python-celery))))
9949 (package
9950 (inherit celery)
9951 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9952 ("python2-mock" ,python2-mock)
9953 ,@(package-native-inputs celery))))))
9954
9955 (define-public python-translitcodec
9956 (package
9957 (name "python-translitcodec")
9958 (version "0.4.0")
9959 (source
9960 (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "translitcodec" version))
9963 (sha256
9964 (base32
9965 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9966 (build-system python-build-system)
9967 (arguments
9968 `(#:tests? #f)) ; no tests provided
9969 (home-page
9970 "https://github.com/claudep/translitcodec")
9971 (synopsis
9972 "Unicode to 8-bit charset transliteration codec")
9973 (description
9974 "This package contains codecs for transliterating ISO 10646 texts into
9975 best-effort representations using smaller coded character sets (ASCII,
9976 ISO 8859, etc.).")
9977 (license license:expat)))
9978
9979 (define-public python2-translitcodec
9980 (package-with-python2 python-translitcodec))
9981
9982 (define-public python-editor
9983 (package
9984 (name "python-editor")
9985 (version "0.5")
9986 (source
9987 (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "python-editor" version))
9990 (sha256
9991 (base32
9992 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9993 (build-system python-build-system)
9994 (home-page
9995 "https://github.com/fmoo/python-editor")
9996 (synopsis
9997 "Programmatically open an editor, capture the result")
9998 (description
9999 "python-editor is a library that provides the editor module for
10000 programmatically interfacing with your system's $EDITOR.")
10001 (license license:asl2.0)))
10002
10003 (define-public python2-editor
10004 (package-with-python2 python-editor))
10005
10006 (define-public python-sphinxcontrib-programoutput
10007 (package
10008 (name "python-sphinxcontrib-programoutput")
10009 (version "0.8")
10010 (source (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10013 (sha256
10014 (base32
10015 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10016 (build-system python-build-system)
10017 (arguments
10018 ;; FIXME: Many tests are failing and the upstream is gone.
10019 '(#:tests? #f))
10020 (propagated-inputs
10021 `(("python-sphinx" ,python-sphinx)))
10022 (synopsis "Sphinx extension to include program output")
10023 (description "A Sphinx extension to literally insert the output of arbitrary
10024 commands into documents, helping you to keep your command examples up to date.")
10025 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10026 (license license:bsd-2)))
10027
10028 (define-public python2-sphinxcontrib-programoutput
10029 (package-with-python2 python-sphinxcontrib-programoutput))
10030
10031 (define-public python-sphinx-repoze-autointerface
10032 (package
10033 (name "python-sphinx-repoze-autointerface")
10034 (version "0.8")
10035 (source (origin
10036 (method url-fetch)
10037 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10038 (sha256
10039 (base32
10040 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10041 (build-system python-build-system)
10042 (arguments '(#:tests? #f)) ; No tests.
10043 (propagated-inputs
10044 `(("python-sphinx" ,python-sphinx)
10045 ("python-zope-interface" ,python-zope-interface)))
10046 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10047 (description "This package defines an extension for the Sphinx documentation
10048 system. The extension allows generation of API documentation by
10049 introspection of @code{zope.interface} instances in code.")
10050 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10051 (license license:repoze)))
10052
10053 (define-public python2-sphinx-repoze-autointerface
10054 (package-with-python2 python-sphinx-repoze-autointerface))
10055
10056 (define-public python-psycopg2
10057 (package
10058 (name "python-psycopg2")
10059 (version "2.6.1")
10060 (source
10061 (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "psycopg2" version))
10064 (sha256
10065 (base32
10066 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
10067 (build-system python-build-system)
10068 (arguments
10069 ;; Tests would require a postgresql database "psycopg2_test"
10070 ;; and a running postgresql database management service.
10071 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10072 (inputs
10073 `(("postgresql" ,postgresql))) ; libpq
10074 (home-page "http://initd.org/psycopg/")
10075 (synopsis "Python PostgreSQL adapter")
10076 (description
10077 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10078 (license license:lgpl3+)))
10079
10080 (define-public python2-psycopg2
10081 (package-with-python2 python-psycopg2))
10082
10083 (define-public python-vobject
10084 (package
10085 (name "python-vobject")
10086 (version "0.9.2")
10087 (source (origin
10088 (method url-fetch)
10089 (uri (pypi-uri "vobject" version))
10090 (sha256
10091 (base32
10092 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10093 (build-system python-build-system)
10094 (arguments
10095 '(;; The test suite relies on some non-portable Windows interfaces.
10096 #:tests? #f))
10097 (propagated-inputs
10098 `(("python-dateutil" ,python-dateutil)
10099 ("python-pyicu" ,python-pyicu)))
10100 (synopsis "Parse and generate vCard and vCalendar files")
10101 (description "Vobject is intended to be a full featured Python package for
10102 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10103 are supported and well tested. vCard 3.0 files are supported, and all data
10104 should be imported, but only a few components are understood in a sophisticated
10105 way.")
10106 (home-page "http://eventable.github.io/vobject/")
10107 (license license:asl2.0)))
10108
10109 (define-public python2-vobject
10110 (package-with-python2 python-vobject))
10111
10112 (define-public python-munkres
10113 (package
10114 (name "python-munkres")
10115 (version "1.0.8")
10116 (source (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "munkres" version))
10119 (sha256
10120 (base32
10121 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10122 (build-system python-build-system)
10123 (arguments
10124 '(#:tests? #f)) ; no test suite
10125 (home-page "http://software.clapper.org/munkres/")
10126 (synopsis "Implementation of the Munkres algorithm")
10127 (description "The Munkres module provides an implementation of the Munkres
10128 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10129 useful for solving the Assignment Problem.")
10130 (license license:bsd-3)))
10131
10132 (define-public python2-munkres
10133 (package-with-python2 python-munkres))
10134
10135 (define-public python-flask
10136 (package
10137 (name "python-flask")
10138 (version "0.11.1")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "Flask" version))
10142 (sha256
10143 (base32
10144 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10145 (build-system python-build-system)
10146 (propagated-inputs
10147 `(("python-itsdangerous" ,python-itsdangerous)
10148 ("python-jinja2" ,python-jinja2)
10149 ("python-click" ,python-click)
10150 ("python-werkzeug" ,python-werkzeug)))
10151 (home-page "https://github.com/mitsuhiko/flask/")
10152 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10153 (description "Flask is a micro web framework based on the Werkzeug toolkit
10154 and Jinja2 template engine. It is called a micro framework because it does not
10155 presume or force a developer to use a particular tool or library.")
10156 (license license:bsd-3)))
10157
10158 (define-public python2-flask
10159 (package-with-python2 python-flask))
10160
10161 (define-public python-flask-wtf
10162 (package
10163 (name "python-flask-wtf")
10164 (version "0.13.1")
10165 (source
10166 (origin
10167 (method url-fetch)
10168 (uri (pypi-uri "Flask-WTF" version))
10169 (sha256
10170 (base32
10171 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10172 (build-system python-build-system)
10173 (arguments
10174 '(#:phases
10175 (modify-phases %standard-phases
10176 (add-before 'check 'drop-failing-test
10177 (lambda _
10178 ;; FIXME: This file tries resolving an external server, which
10179 ;; fails. Try to patch out the offending section instead of
10180 ;; deleting the whole thing.
10181 (delete-file "tests/test_recaptcha.py")
10182 #t)))))
10183 (propagated-inputs
10184 `(("python-flask-babel" ,python-flask-babel)
10185 ("python-babel" ,python-babel)
10186 ("python-wtforms" ,python-wtforms)))
10187 (native-inputs
10188 `(("python-nose" ,python-nose)))
10189 (home-page "https://github.com/lepture/flask-wtf")
10190 (synopsis "Simple integration of Flask and WTForms")
10191 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10192 upload, and reCAPTCHA.")
10193 (license license:bsd-3)))
10194
10195 (define-public python2-flask-wtf
10196 (package-with-python2 python-flask-wtf))
10197
10198 (define-public python-flask-multistatic
10199 (package
10200 (name "python-flask-multistatic")
10201 (version "1.0")
10202 (source
10203 (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "flask-multistatic" version))
10206 (sha256
10207 (base32
10208 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10209 (build-system python-build-system)
10210 (propagated-inputs
10211 `(("python-flask" ,python-flask)))
10212 (home-page "https://pagure.io/flask-multistatic")
10213 (synopsis "Flask plugin to allow overriding static files")
10214 (description "@code{flask-multistatic} is a flask plugin that adds support
10215 for overriding static files.")
10216 (license license:gpl3+)))
10217
10218 (define-public python2-flask-multistatic
10219 (package-with-python2 python-flask-multistatic))
10220
10221 (define-public python-cookies
10222 (package
10223 (name "python-cookies")
10224 (version "2.2.1")
10225 (source (origin
10226 (method url-fetch)
10227 (uri (pypi-uri "cookies" version))
10228 (sha256
10229 (base32
10230 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10231 (build-system python-build-system)
10232 (arguments
10233 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10234 #:tests? #f))
10235 (native-inputs
10236 `(("python-pytest" ,python2-pytest)))
10237 (synopsis "HTTP cookie parser and renderer")
10238 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10239 Python.")
10240 (home-page "https://gitlab.com/sashahart/cookies")
10241 (license license:expat)))
10242
10243 (define-public python2-cookies
10244 (package-with-python2 python-cookies))
10245
10246 (define-public python-responses
10247 (package
10248 (name "python-responses")
10249 (version "0.5.1")
10250 (source (origin
10251 (method url-fetch)
10252 (uri (pypi-uri "responses" version))
10253 (sha256
10254 (base32
10255 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10256 (build-system python-build-system)
10257 (arguments
10258 `(;; Test suite is not distributed:
10259 ;; https://github.com/getsentry/responses/issues/38
10260 #:tests? #f))
10261 (native-inputs
10262 `(("python-mock" ,python-mock)))
10263 (propagated-inputs
10264 `(("python-requests" ,python-requests)
10265 ("python-cookies" ,python-cookies)
10266 ("python-six" ,python-six)))
10267 (home-page "https://github.com/getsentry/responses")
10268 (synopsis "Utility for mocking out the `requests` Python library")
10269 (description "A utility library for mocking out the `requests` Python
10270 library.")
10271 (license license:asl2.0)))
10272
10273 (define-public python2-responses
10274 (package-with-python2 python-responses))
10275
10276 (define-public python-whoosh
10277 (package
10278 (name "python-whoosh")
10279 (version "2.7.4")
10280 (source
10281 (origin
10282 (method url-fetch)
10283 (uri (pypi-uri "Whoosh" version))
10284 (sha256
10285 (base32
10286 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10287 (build-system python-build-system)
10288 (native-inputs
10289 `(("python-pytest" ,python-pytest)))
10290 (home-page "http://bitbucket.org/mchaput/whoosh")
10291 (synopsis "Full text indexing, search, and spell checking library")
10292 (description
10293 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10294 checking library.")
10295 (license license:bsd-2)))
10296
10297 (define-public python2-whoosh
10298 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10299 (package (inherit whoosh)
10300 (propagated-inputs
10301 `(("python2-backport-ssl-match-hostname"
10302 ,python2-backport-ssl-match-hostname)
10303 ,@(package-propagated-inputs whoosh))))))
10304
10305 (define-public python-pathlib
10306 (package
10307 (name "python-pathlib")
10308 (version "1.0.1")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "pathlib" version))
10312 (sha256
10313 (base32
10314 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10315 (build-system python-build-system)
10316 ;; The tests depend on the internal "test" module, which does not provide
10317 ;; a stable interface.
10318 (arguments `(#:tests? #f))
10319 (home-page "https://pathlib.readthedocs.org/")
10320 (synopsis "Object-oriented file system paths")
10321 (description "Pathlib offers a set of classes to handle file system paths.
10322 It offers the following advantages over using string objects:
10323
10324 @enumerate
10325 @item No more cumbersome use of os and os.path functions. Everything can
10326 be done easily through operators, attribute accesses, and method calls.
10327 @item Embodies the semantics of different path types. For example,
10328 comparing Windows paths ignores casing.
10329 @item Well-defined semantics, eliminating any inconsistencies or
10330 ambiguities (forward vs. backward slashes, etc.).
10331 @end enumerate
10332
10333 Note: In Python 3.4, pathlib is now part of the standard library. For other
10334 Python versions please consider python-pathlib2 instead, which tracks the
10335 standard library module. This module (python-pathlib) isn't maintained
10336 anymore.")
10337 (license license:expat)))
10338
10339 (define-public python2-pathlib
10340 (package-with-python2 python-pathlib))
10341
10342 (define-public python2-pathlib2
10343 (package
10344 (name "python2-pathlib2")
10345 (version "2.1.0")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (pypi-uri "pathlib2" version))
10349 (sha256
10350 (base32
10351 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10352 (build-system python-build-system)
10353 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10354 ;; version is 3.4 which already includes this package as part of the
10355 ;; standard library.
10356 (arguments
10357 `(#:python ,python-2))
10358 (native-inputs
10359 `(("python2-six" ,python2-six)))
10360 (home-page "http://pypi.python.org/pypi/pathlib2/")
10361 (synopsis "Object-oriented file system paths - backport of standard
10362 pathlib module")
10363 (description "The goal of pathlib2 is to provide a backport of standard
10364 pathlib module which tracks the standard library module, so all the newest
10365 features of the standard pathlib can be used also on older Python versions.
10366
10367 Pathlib offers a set of classes to handle file system paths. It offers the
10368 following advantages over using string objects:
10369
10370 @enumerate
10371 @item No more cumbersome use of os and os.path functions. Everything can
10372 be done easily through operators, attribute accesses, and method calls.
10373 @item Embodies the semantics of different path types. For example,
10374 comparing Windows paths ignores casing.
10375 @item Well-defined semantics, eliminating any inconsistencies or
10376 ambiguities (forward vs. backward slashes, etc.).
10377 @end enumerate")
10378 (license license:expat)))
10379
10380 (define-public python-jellyfish
10381 (package
10382 (name "python-jellyfish")
10383 (version "0.5.6")
10384 (source (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "jellyfish" version))
10387 (sha256
10388 (base32
10389 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10390 (build-system python-build-system)
10391 (native-inputs
10392 `(("python-pytest" ,python-pytest)))
10393 (home-page "https://github.com/jamesturk/jellyfish")
10394 (synopsis "Approximate and phonetic matching of strings")
10395 (description "Jellyfish uses a variety of string comparison and phonetic
10396 encoding algorithms to do fuzzy string matching.")
10397 (license license:bsd-2)
10398 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10399
10400 (define-public python2-jellyfish
10401 (let ((jellyfish (package-with-python2
10402 (strip-python2-variant python-jellyfish))))
10403 (package (inherit jellyfish)
10404 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10405 ,@(package-native-inputs jellyfish))))))
10406
10407 (define-public python2-unicodecsv
10408 (package
10409 (name "python2-unicodecsv")
10410 (version "0.14.1")
10411 (source (origin
10412 (method url-fetch)
10413 ;; The test suite is not included in the PyPi release.
10414 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10415 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10416 "archive/" version ".tar.gz"))
10417 (file-name (string-append name "-" version ".tar.gz"))
10418 (sha256
10419 (base32
10420 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10421 (build-system python-build-system)
10422 (arguments
10423 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10424 #:python ,python-2))
10425 (native-inputs
10426 `(("python2-unittest2" ,python2-unittest2)))
10427 (home-page "https://github.com/jdunck/python-unicodecsv")
10428 (synopsis "Unicode CSV module for Python 2")
10429 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10430 module, adding support for Unicode strings.")
10431 (license license:bsd-2)))
10432
10433 (define-public python-rarfile
10434 (package
10435 (name "python-rarfile")
10436 (version "2.8")
10437 (source (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "rarfile" version))
10440 (sha256
10441 (base32
10442 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10443 (build-system python-build-system)
10444 (arguments
10445 '(#:phases
10446 (modify-phases %standard-phases
10447 (replace 'check
10448 ;; Many tests fail, but the installation proceeds.
10449 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10450 (native-inputs
10451 `(("which" ,which))) ; required for tests
10452 (propagated-inputs
10453 `(("libarchive" ,libarchive)))
10454 (home-page "https://github.com/markokr/rarfile")
10455 (synopsis "RAR archive reader for Python")
10456 (description "This is Python module for RAR archive reading. The interface
10457 is made as zipfile like as possible.")
10458 (license license:isc)))
10459
10460 (define-public python2-rarfile
10461 (package-with-python2 python-rarfile))
10462
10463 (define-public python-magic
10464 (package
10465 (name "python-magic")
10466 (version "0.4.3")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10471 version ".tar.gz"))
10472 (sha256
10473 (base32
10474 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10475 (file-name (string-append name "-" version "-checkout"))))
10476 (build-system python-build-system)
10477 (arguments
10478 ;; The tests are unreliable, so don't run them. The tests fail
10479 ;; under Python3 because they were written for Python2 and
10480 ;; contain import statements that do not work in Python3. One of
10481 ;; the tests fails under Python2 because its assertions are
10482 ;; overly stringent; it relies on comparing output strings which
10483 ;; are brittle and can change depending on the version of
10484 ;; libmagic being used and the system on which the test is
10485 ;; running. In my case, under GuixSD 0.10.0, only one test
10486 ;; failed, and it seems to have failed only because the version
10487 ;; of libmagic that is packaged in Guix outputs a slightly
10488 ;; different (but not wrong) string than the one that the test
10489 ;; expected.
10490 '(#:tests? #f
10491 #:phases (modify-phases %standard-phases
10492 ;; Replace a specific method call with a hard-coded
10493 ;; path to the necessary libmagic.so file in the
10494 ;; store. If we don't do this, then the method call
10495 ;; will fail to find the libmagic.so file, which in
10496 ;; turn will cause any application using
10497 ;; python-magic to fail.
10498 (add-before 'build 'hard-code-path-to-libmagic
10499 (lambda* (#:key inputs #:allow-other-keys)
10500 (let ((file (assoc-ref inputs "file")))
10501 (substitute* "magic.py"
10502 (("ctypes.util.find_library\\('magic'\\)")
10503 (string-append "'" file "/lib/libmagic.so'")))
10504 #t)))
10505 (add-before 'install 'disable-egg-compression
10506 (lambda _
10507 (let ((port (open-file "setup.cfg" "a")))
10508 (display "\n[easy_install]\nzip_ok = 0\n"
10509 port)
10510 (close-port port)
10511 #t))))))
10512 (inputs
10513 ;; python-magic needs to be able to find libmagic.so.
10514 `(("file" ,file)))
10515 (home-page "https://github.com/ahupp/python-magic")
10516 (synopsis "File type identification using libmagic")
10517 (description
10518 "This module uses ctypes to access the libmagic file type
10519 identification library. It makes use of the local magic database and
10520 supports both textual and MIME-type output. Note that this module and
10521 the python-file module both provide a \"magic.py\" file; these two
10522 modules, which are different and were developed separately, both serve
10523 the same purpose: to provide Python bindings for libmagic.")
10524 (license license:expat)))
10525
10526 (define-public python2-magic
10527 (package-with-python2 python-magic))
10528
10529 (define-public python2-s3cmd
10530 (package
10531 (name "python2-s3cmd")
10532 (version "1.6.1")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10537 "s3cmd-" version ".tar.gz"))
10538 (sha256
10539 (base32
10540 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10541 (build-system python-build-system)
10542 (arguments
10543 ;; s3cmd is written for python2 only and contains no tests.
10544 `(#:python ,python-2
10545 #:tests? #f))
10546 (propagated-inputs
10547 `(("python2-dateutil" ,python2-dateutil)
10548 ;; The python-file package also provides a magic.py module.
10549 ;; This is an unfortunate state of affairs; however, s3cmd
10550 ;; fails to install if it cannot find specifically the
10551 ;; python-magic package. Thus we include it, instead of using
10552 ;; python-file. Ironically, s3cmd sometimes works better
10553 ;; without libmagic bindings at all:
10554 ;; https://github.com/s3tools/s3cmd/issues/198
10555 ("python2-magic" ,python2-magic)))
10556 (home-page "http://s3tools.org/s3cmd")
10557 (synopsis "Command line tool for S3-compatible storage services")
10558 (description
10559 "S3cmd is a command line tool for uploading, retrieving and managing data
10560 in storage services that are compatible with the Amazon Simple Storage
10561 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10562 GnuPG encryption, and more. It also supports management of Amazon's
10563 CloudFront content delivery network.")
10564 (license license:gpl2+)))
10565
10566 (define-public python-pkgconfig
10567 (package
10568 (name "python-pkgconfig")
10569 (version "1.1.0")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "pkgconfig" version))
10574 (sha256
10575 (base32
10576 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `(("python-nose" ,python-nose)))
10580 (inputs
10581 `(("pkg-config" ,pkg-config)))
10582 (arguments
10583 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10584 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10585 #:tests? #f
10586 ;; Hard-code the path to pkg-config.
10587 #:phases
10588 (modify-phases %standard-phases
10589 (add-before
10590 'build 'patch
10591 (lambda _
10592 (substitute* "pkgconfig/pkgconfig.py"
10593 (("cmd = 'pkg-config")
10594 (string-append "cmd = '" (which "pkg-config"))))
10595 #t)))))
10596 (home-page "http://github.com/matze/pkgconfig")
10597 (synopsis "Python interface for pkg-config")
10598 (description "This module provides a Python interface to pkg-config. It
10599 can be used to find all pkg-config packages, check if a package exists,
10600 check if a package meets certain version requirements, query CFLAGS and
10601 LDFLAGS and parse the output to build extensions with setup.py.")
10602 (license license:expat)))
10603
10604 (define-public python2-pkgconfig
10605 (package-with-python2 python-pkgconfig))
10606
10607 (define-public python-bz2file
10608 (package
10609 (name "python-bz2file")
10610 (version "0.98")
10611 (source
10612 (origin
10613 (method url-fetch)
10614 (uri (pypi-uri "bz2file" version))
10615 (sha256
10616 (base32
10617 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10618 (build-system python-build-system)
10619 (arguments
10620 `(#:tests? #f)) ; Tests use deprecated python modules.
10621 (home-page "https://github.com/nvawda/bz2file")
10622 (synopsis "Read and write bzip2-compressed files")
10623 (description
10624 "Bz2file is a Python library for reading and writing bzip2-compressed
10625 files. It contains a drop-in replacement for the I/O interface in the
10626 standard library's @code{bz2} module, including features from the latest
10627 development version of CPython that are not available in older releases.")
10628 (license license:asl2.0)
10629 (properties `((python2-variant . ,(delay python2-bz2file))))))
10630
10631 (define-public python2-bz2file
10632 (let ((base (package-with-python2
10633 (strip-python2-variant python-bz2file))))
10634 (package
10635 (inherit base)
10636 (arguments
10637 `(#:python ,python-2
10638 #:phases
10639 (modify-phases %standard-phases
10640 ;; 'python setup.py test' does not work as of 0.98.
10641 ;; There is only the one test file, so we run it directly.
10642 (replace 'check
10643 (lambda _ (zero? (system* "python"
10644 "test_bz2file.py"))))))))))
10645
10646 (define-public python-future
10647 (package
10648 (name "python-future")
10649 (version "0.15.2")
10650 (source
10651 (origin
10652 (method url-fetch)
10653 (uri (pypi-uri "future" version))
10654 (sha256
10655 (base32
10656 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10657 (build-system python-build-system)
10658 ;; Many tests connect to the network or are otherwise flawed.
10659 ;; https://github.com/PythonCharmers/python-future/issues/210
10660 (arguments
10661 `(#:tests? #f))
10662 (home-page "http://python-future.org")
10663 (synopsis "Single-source support for Python 3 and 2")
10664 (description
10665 "@code{python-future} is the missing compatibility layer between Python 2 and
10666 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10667 to support both Python 2 and Python 3 with minimal overhead.")
10668 (license license:expat)))
10669
10670 (define-public python2-future
10671 (package-with-python2 python-future))
10672
10673 (define-public python-cysignals
10674 (package
10675 (name "python-cysignals")
10676 (version "1.1.0")
10677 (source
10678 (origin
10679 (method url-fetch)
10680 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10681 (sha256
10682 (base32
10683 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10684 (build-system python-build-system)
10685 (native-inputs
10686 `(("python-cython" ,python-cython)
10687 ("python-sphinx" ,python-sphinx)))
10688 (inputs
10689 `(("pari-gp" ,pari-gp)))
10690 (arguments
10691 `(#:modules ((guix build python-build-system)
10692 ((guix build gnu-build-system) #:prefix gnu:)
10693 (guix build utils))
10694 ;; FIXME: Tests are executed after installation and currently fail
10695 ;; when not installing into standard locations; the author is working
10696 ;; on a fix.
10697 #:tests? #f
10698 #:phases
10699 (modify-phases %standard-phases
10700 (add-before
10701 'build 'configure
10702 (assoc-ref gnu:%standard-phases 'configure)))))
10703 (home-page
10704 "https://github.com/sagemath/cysignals")
10705 (synopsis
10706 "Handling of interrupts and signals for Cython")
10707 (description
10708 "The cysignals package provides mechanisms to handle interrupts (and
10709 other signals and errors) in Cython code, using two related approaches,
10710 for mixed Cython/Python code or external C libraries and pure Cython code,
10711 respectively.")
10712 (license license:lgpl3+)))
10713
10714 (define-public python2-cysignals
10715 (package-with-python2 python-cysignals))
10716
10717 (define-public python2-shedskin
10718 (package
10719 (name "python2-shedskin")
10720 (version "0.9.4")
10721 (source
10722 (origin
10723 (method url-fetch)
10724 (uri (string-append "https://github.com/shedskin/shedskin/"
10725 "releases/download/v" version
10726 "/shedskin-" version ".tgz"))
10727 (sha256
10728 (base32
10729 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10730 (build-system python-build-system)
10731 (arguments
10732 `(#:python ,python-2
10733 #:phases (modify-phases %standard-phases
10734 (add-after 'unpack 'fix-resulting-include-libs
10735 (lambda* (#:key inputs #:allow-other-keys)
10736 (let ((libgc (assoc-ref inputs "libgc"))
10737 (pcre (assoc-ref inputs "pcre")))
10738 (substitute* "shedskin/makefile.py"
10739 (("variable == 'CCFLAGS':[ ]*")
10740 (string-append "variable == 'CCFLAGS':\n"
10741 " line += ' -I " pcre "/include"
10742 " -I " libgc "/include'"))
10743 (("variable == 'LFLAGS':[ ]*")
10744 (string-append "variable == 'LFLAGS':\n"
10745 " line += ' -L" pcre "/lib"
10746 " -L " libgc "/lib'")))
10747 #t))))))
10748 (inputs `(("pcre" ,pcre)
10749 ("libgc" ,libgc)))
10750 (home-page "https://shedskin.github.io/")
10751 (synopsis "Experimental Python-2 to C++ Compiler")
10752 (description (string-append "This is an experimental compiler for a subset of
10753 Python. It generates C++ code and a Makefile."))
10754 (license (list license:gpl3 license:bsd-3 license:expat))))
10755
10756 (define-public python2-rope
10757 (package
10758 (name "python2-rope")
10759 (version "0.10.3")
10760 (source
10761 (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "rope" version))
10764 (sha256
10765 (base32
10766 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10767 (arguments
10768 ;; Rope is currently python-2 only.
10769 ;; https://github.com/python-rope/rope/issues/57
10770 `(#:python ,python-2))
10771 (build-system python-build-system)
10772 (native-inputs
10773 `(("python2-unittest2" ,python2-unittest2)))
10774 (home-page "https://github.com/python-rope/rope")
10775 (synopsis "Refactoring library for Python")
10776 (description "Rope is a refactoring library for Python. It facilitates
10777 the renaming, moving and extracting of attributes, functions, modules, fields
10778 and parameters in Python 2 source code. These refactorings can also be applied
10779 to occurences in strings and comments.")
10780 (license license:gpl2)))
10781
10782 (define-public python-py3status
10783 (package
10784 (name "python-py3status")
10785 (version "3.1")
10786 (source
10787 (origin
10788 (method url-fetch)
10789 (uri (pypi-uri "py3status" version))
10790 (sha256
10791 (base32
10792 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10793 (build-system python-build-system)
10794 (arguments
10795 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10796 (home-page "https://github.com/ultrabug/py3status")
10797 (synopsis "Extensible i3status wrapper written in Python")
10798 (description "py3status is an i3status wrapper which extends i3status
10799 functionality in a modular way, allowing you to extend your panel with your
10800 own code, responding to click events and updating clock every second.")
10801 (license license:bsd-3)))
10802
10803 (define-public python-tblib
10804 (package
10805 (name "python-tblib")
10806 (version "1.3.0")
10807 (source (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "tblib" version))
10810 (sha256 (base32
10811 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10812 (build-system python-build-system)
10813 (arguments
10814 `(#:phases
10815 (modify-phases %standard-phases
10816 (replace 'check
10817 (lambda _
10818 ;; Upstream runs tests after installation and the package itself
10819 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10820 ;; found.
10821 (setenv "PYTHONPATH"
10822 (string-append (getcwd) "/build/lib:"
10823 (getenv "PYTHONPATH")))
10824 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10825 (native-inputs
10826 `(("python-pytest" ,python-pytest)
10827 ("python-six" ,python-six)))
10828 (home-page "https://github.com/ionelmc/python-tblib")
10829 (synopsis "Traceback serialization library")
10830 (description
10831 "Traceback serialization allows you to:
10832
10833 @enumerate
10834 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10835 different processes. This allows better error handling when running code over
10836 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10837
10838 @item Parse traceback strings and raise with the parsed tracebacks.
10839 @end enumerate\n")
10840 (license license:bsd-3)))
10841
10842 (define-public python2-tblib
10843 (package-with-python2 python-tblib))
10844
10845 (define-public python-sqlparse
10846 (package
10847 (name "python-sqlparse")
10848 (version "0.1.19")
10849 (source (origin
10850 (method url-fetch)
10851 (uri (pypi-uri "sqlparse" version))
10852 (sha256
10853 (base32
10854 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10855 (build-system python-build-system)
10856 (arguments
10857 `(#:phases
10858 (modify-phases %standard-phases
10859 (replace 'check
10860 (lambda* _
10861 ;; setup.py-integrated 2to3 only affects the build files, but
10862 ;; py.test is using the source files. So we need to convert them
10863 ;; manually.
10864 (when (zero? (system* "python3"))
10865 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10866 (zero? (system* "py.test")))))))
10867 (native-inputs
10868 `(("python-pytest" ,python-pytest)))
10869 (home-page "https://github.com/andialbrecht/sqlparse")
10870 (synopsis "Non-validating SQL parser")
10871 (description "Sqlparse is a non-validating SQL parser for Python. It
10872 provides support for parsing, splitting and formatting SQL statements.")
10873 (license license:bsd-3)))
10874
10875 (define-public python2-sqlparse
10876 (package-with-python2 python-sqlparse))
10877
10878 (define-public python-greenlet
10879 (package
10880 (name "python-greenlet")
10881 (version "0.4.11")
10882 (source (origin
10883 (method url-fetch)
10884 (uri (pypi-uri "greenlet" version))
10885 (sha256
10886 (base32
10887 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10888 (build-system python-build-system)
10889 (home-page "https://greenlet.readthedocs.io/")
10890 (synopsis "Lightweight in-process concurrent programming")
10891 (description
10892 "Greenlet package is a spin-off of Stackless, a version of CPython
10893 that supports micro-threads called \"tasklets\". Tasklets run
10894 pseudo-concurrently (typically in a single or a few OS-level threads) and
10895 are synchronized with data exchanges on \"channels\".")
10896 (license (list license:psfl license:expat))))
10897
10898 (define-public python2-greenlet
10899 (package-with-python2 python-greenlet))
10900
10901 (define-public python-gevent
10902 (package
10903 (name "python-gevent")
10904 (version "1.1.1")
10905 (source (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "gevent" version))
10908 (sha256
10909 (base32
10910 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10911 (modules '((guix build utils)))
10912 (snippet
10913 '(begin
10914 ;; unbunding libev and c-ares
10915 (for-each delete-file-recursively '("libev" "c-ares"))
10916 ;; fixing testsuite
10917 (call-with-output-file "greentest/__init__.py" noop)
10918 (substitute* "greentest/testrunner.py"
10919 (("import util") "from . import util")
10920 (("from util import log") "from .util import log"))))))
10921 (build-system python-build-system)
10922 (propagated-inputs
10923 `(("python-greenlet" ,python-greenlet)))
10924 (native-inputs
10925 `(("python-six" ,python-six)))
10926 (inputs
10927 `(("c-ares" ,c-ares)
10928 ("libev" ,libev)))
10929 (home-page "http://www.gevent.org/")
10930 (synopsis "Coroutine-based network library")
10931 (description
10932 "gevent is a coroutine-based Python networking library that uses greenlet
10933 to provide a high-level synchronous API on top of the libev event loop.")
10934 (license license:expat)))
10935
10936 (define-public python2-gevent
10937 (package-with-python2 python-gevent))
10938
10939 (define-public python-geventhttpclient
10940 (package
10941 (name "python-geventhttpclient")
10942 (version "1.3.1")
10943 (source (origin
10944 (method url-fetch)
10945 (uri (pypi-uri "geventhttpclient" version))
10946 (sha256
10947 (base32
10948 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10949 (modules '((guix build utils)))
10950 (snippet
10951 '(begin
10952 ;; Delete pre-compiled files.
10953 (for-each delete-file (find-files "src/geventhttpclient"
10954 ".*\\.pyc"))
10955 #t))))
10956 (build-system python-build-system)
10957 (arguments
10958 '(#:phases
10959 (modify-phases %standard-phases
10960 (add-after 'unpack 'delete-network-tests
10961 (lambda _
10962 (delete-file "src/geventhttpclient/tests/test_client.py")
10963 #t))
10964 (delete 'check)
10965 (add-after 'install 'check
10966 (lambda* (#:key inputs outputs #:allow-other-keys)
10967 (add-installed-pythonpath inputs outputs)
10968 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10969 (native-inputs
10970 `(("python-pytest" ,python-pytest)))
10971 (propagated-inputs
10972 `(("python-certifi" ,python-certifi)
10973 ("python-gevent" ,python-gevent)
10974 ("python-six" ,python-six)))
10975 (home-page "https://github.com/gwik/geventhttpclient")
10976 (synopsis "HTTP client library for gevent")
10977 (description "@code{python-geventhttpclient} is a high performance,
10978 concurrent HTTP client library for python using @code{gevent}.")
10979 (license license:expat)))
10980
10981 (define-public python2-geventhttpclient
10982 (package-with-python2 python-geventhttpclient))
10983
10984 (define-public python-fastimport
10985 (package
10986 (name "python-fastimport")
10987 (version "0.9.6")
10988 (source
10989 (origin
10990 (method url-fetch)
10991 (uri (pypi-uri "fastimport" version))
10992 (sha256
10993 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10994 (build-system python-build-system)
10995 (home-page "https://github.com/jelmer/python-fastimport")
10996 (synopsis "VCS fastimport parser and generator in Python")
10997 (description "This package provides a parser for and generator of the Git
10998 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10999 format.")
11000 (license license:gpl2+)))
11001
11002 (define-public python2-fastimport
11003 (package-with-python2 python-fastimport))
11004
11005 (define-public python-twisted
11006 (package
11007 (name "python-twisted")
11008 (version "16.2.0")
11009 (source (origin
11010 (method url-fetch)
11011 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11012 (sha256
11013 (base32
11014 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11015 (build-system python-build-system)
11016 (arguments
11017 '(#:tests? #f)) ; FIXME: Some tests are failing.
11018 ;; #:phases
11019 ;; (modify-phases %standard-phases
11020 ;; (replace 'check
11021 ;; (lambda _
11022 ;; (zero? (system* "./bin/trial" "twisted")))))
11023 (propagated-inputs
11024 `(("python-zope-interface" ,python-zope-interface)))
11025 (home-page "https://twistedmatrix.com/")
11026 (synopsis "Asynchronous networking framework written in Python")
11027 (description
11028 "Twisted is an extensible framework for Python programming, with special
11029 focus on event-based network programming and multiprotocol integration.")
11030 (license license:expat)))
11031
11032 (define-public python2-twisted
11033 (package-with-python2 python-twisted))
11034
11035 (define-public python-pika
11036 (package
11037 (name "python-pika")
11038 (version "0.10.0")
11039 (source
11040 (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "pika" version))
11043 (sha256
11044 (base32
11045 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11046 (build-system python-build-system)
11047 (native-inputs
11048 `(("python-pyev" ,python-pyev)
11049 ("python-tornado" ,python-tornado)
11050 ("python-twisted" ,python-twisted)))
11051 (home-page "https://pika.readthedocs.org")
11052 (synopsis "Pure Python AMQP Client Library")
11053 (description
11054 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11055 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11056 network support library.")
11057 (license license:bsd-3)))
11058
11059 (define-public python2-pika
11060 (package-with-python2 python-pika))
11061
11062 (define-public python-ply
11063 (package
11064 (name "python-ply")
11065 (version "3.9")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "ply" version))
11070 (sha256
11071 (base32
11072 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11073 (build-system python-build-system)
11074 (home-page "http://www.dabeaz.com/ply/")
11075 (synopsis "Python Lex & Yacc")
11076 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11077 It uses LR parsing and does extensive error checking.")
11078 (license license:bsd-3)))
11079
11080 (define-public python2-ply
11081 (package-with-python2 python-ply))
11082
11083 (define-public python-tabulate
11084 (package
11085 (name "python-tabulate")
11086 (version "0.7.7")
11087 (source (origin
11088 (method url-fetch)
11089 (uri (pypi-uri "tabulate" version))
11090 (sha256
11091 (base32
11092 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11093 (build-system python-build-system)
11094 (arguments
11095 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11096 ;; and the latest release is not tagged in the upstream repository.
11097 '(#:tests? #f))
11098 (home-page "https://bitbucket.org/astanin/python-tabulate")
11099 (synopsis "Pretty-print tabular data")
11100 (description
11101 "Tabulate is a library and command-line utility to pretty-print tabular
11102 data in Python.")
11103 (license license:expat)))
11104
11105 (define-public python2-tabulate
11106 (package-with-python2 python-tabulate))
11107
11108 (define-public python-kazoo
11109 (package
11110 (name "python-kazoo")
11111 (version "2.2.1")
11112 (source
11113 (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "kazoo" version))
11116 (sha256
11117 (base32
11118 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11119 (build-system python-build-system)
11120 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11121 (propagated-inputs
11122 `(("python-six" ,python-six)))
11123 (home-page "https://kazoo.readthedocs.org")
11124 (synopsis "High-level Zookeeper client library")
11125 (description
11126 "Kazoo is a Python client library for the Apache Zookeeper distributed
11127 application service. It is designed to be easy to use and to avoid common
11128 programming errors.")
11129 (license license:asl2.0)))
11130
11131 (define-public python2-kazoo
11132 (package-with-python2 python-kazoo))
11133
11134 (define-public python-pykafka
11135 (package
11136 (name "python-pykafka")
11137 (version "2.4.0")
11138 (source (origin
11139 (method url-fetch)
11140 (uri (string-append
11141 "https://pypi.python.org/packages/8b/3e/"
11142 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11143 "pykafka-" version ".tar.gz"))
11144 (sha256
11145 (base32
11146 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11147 (build-system python-build-system)
11148 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11149 (propagated-inputs
11150 `(("python-gevent" ,python-gevent)
11151 ("python-kazoo" ,python-kazoo)
11152 ("python-tabulate" ,python-tabulate)))
11153 (inputs
11154 `(("librdkafka" ,librdkafka)))
11155 (home-page "https://pykafka.readthedocs.io/")
11156 (synopsis "Apache Kafka client for Python")
11157 (description
11158 "PyKafka is a client for the Apache Kafka distributed messaging system.
11159 It includes Python implementations of Kafka producers and consumers, which
11160 are optionally backed by a C extension built on librdkafka.")
11161 (license license:asl2.0)))
11162
11163 (define-public python2-pykafka
11164 (package-with-python2 python-pykafka))
11165
11166 (define-public python-wcwidth
11167 (package
11168 (name "python-wcwidth")
11169 (version "0.1.6")
11170 (source
11171 (origin
11172 (method url-fetch)
11173 (uri (string-append
11174 "https://pypi.python.org/packages/"
11175 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
11176 "wcwidth-" version ".tar.gz"))
11177 (sha256
11178 (base32
11179 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
11180 (build-system python-build-system)
11181 (home-page "https://github.com/jquast/wcwidth")
11182 (synopsis "Measure number of terminal column cells of wide-character codes")
11183 (description "Wcwidth measures the number of terminal column cells of
11184 wide-character codes. It is useful for those implementing a terminal emulator,
11185 or programs that carefully produce output to be interpreted by one. It is a
11186 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11187 specified in POSIX.1-2001 and POSIX.1-2008.")
11188 (license license:expat)))
11189
11190 (define-public python2-wcwidth
11191 (package-with-python2 python-wcwidth))
11192
11193 (define-public python2-jsonrpclib
11194 (package
11195 (name "python2-jsonrpclib")
11196 (version "0.1.7")
11197 (source (origin
11198 (method url-fetch)
11199 (uri (string-append
11200 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11201 "jsonrpclib-" version ".tar.gz"))
11202 (sha256
11203 (base32
11204 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11205 (build-system python-build-system)
11206 (arguments
11207 `(#:tests? #f
11208 #:python ,python-2))
11209 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11210 (synopsis "Implementation of JSON-RPC specification for Python")
11211 (description
11212 "This library is an implementation of the JSON-RPC specification.
11213 It supports both the original 1.0 specification, as well as the
11214 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11215 etc.")
11216 (license license:asl2.0)))
11217
11218 (define-public python-chai
11219 (package
11220 (name "python-chai")
11221 (version "1.1.1")
11222 (source (origin
11223 (method url-fetch)
11224 (uri (pypi-uri "chai" version))
11225 (sha256
11226 (base32
11227 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11228 (build-system python-build-system)
11229 (home-page "https://github.com/agoragames/chai")
11230 (synopsis "Mocking framework for Python")
11231 (description
11232 "Chai provides an api for mocking, stubbing and spying your python
11233 objects, patterned after the Mocha library for Ruby.")
11234 (license license:bsd-3)))
11235
11236 (define-public python2-chai
11237 (package-with-python2 python-chai))
11238
11239 (define-public python-arrow
11240 (package
11241 (name "python-arrow")
11242 (version "0.8.0")
11243 (source (origin
11244 (method url-fetch)
11245 (uri (pypi-uri "arrow" version))
11246 (sha256
11247 (base32
11248 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11249 (build-system python-build-system)
11250 (native-inputs
11251 `(;; For testing
11252 ("python-chai" ,python-chai)
11253 ("python-simplejson" ,python-simplejson)))
11254 (propagated-inputs
11255 `(("python-dateutil" ,python-dateutil)))
11256 (home-page "https://github.com/crsmithdev/arrow/")
11257 (synopsis "Dates and times for Python")
11258 (description
11259 "Arrow is a Python library to creating, manipulating, formatting and
11260 converting dates, times, and timestamps. It implements and updates the
11261 datetime type.")
11262 (license license:asl2.0)))
11263
11264 (define-public python2-arrow
11265 (package-with-python2 python-arrow))
11266
11267 (define-public python-inflection
11268 (package
11269 (name "python-inflection")
11270 (version "0.3.1")
11271 (source
11272 (origin (method url-fetch)
11273 (uri (pypi-uri "inflection" version))
11274 (sha256
11275 (base32
11276 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11277 (build-system python-build-system)
11278 (native-inputs
11279 `(("python-pytest" ,python-pytest)))
11280 (home-page "http://github.com/jpvanhal/inflection")
11281 (synopsis "Python string transformation library")
11282 (description
11283 "Inflection is a string transformation library. It singularizes
11284 and pluralizes English words, and transforms strings from CamelCase to
11285 underscored string.")
11286 (license license:expat)))
11287
11288 (define-public python2-inflection
11289 (package-with-python2 python-inflection))
11290
11291 (define-public python-pylev
11292 (package
11293 (name "python-pylev")
11294 (version "1.3.0")
11295 (source (origin
11296 (method url-fetch)
11297 (uri (pypi-uri "pylev" version))
11298 (sha256
11299 (base32
11300 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11301 (build-system python-build-system)
11302 (home-page "http://github.com/toastdriven/pylev")
11303 (synopsis "Levenshtein distance implementation in Python")
11304 (description "Pure Python Levenshtein implementation, based off the
11305 Wikipedia code samples at
11306 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11307 (license license:bsd-3)))
11308
11309 (define-public python2-pylev
11310 (package-with-python2 python-pylev))
11311
11312 (define-public python-cleo
11313 (package
11314 (name "python-cleo")
11315 (version "0.4.1")
11316 (source (origin
11317 (method url-fetch)
11318 (uri (pypi-uri "cleo" version))
11319 (sha256
11320 (base32
11321 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11322 (build-system python-build-system)
11323 (native-inputs
11324 `(;; For testing
11325 ("python-mock" ,python-mock)
11326 ("python-pytest" ,python-pytest)))
11327 (propagated-inputs
11328 `(("python-psutil" ,python-psutil)
11329 ("python-pylev" ,python-pylev)))
11330 (home-page "https://github.com/sdispater/cleo")
11331 (synopsis "Command-line arguments library for Python")
11332 (description
11333 "Cleo allows you to create command-line commands with signature in
11334 docstring and colored output.")
11335 (license license:expat)))
11336
11337 (define-public python2-cleo
11338 (package-with-python2 python-cleo))
11339
11340 (define-public python-lazy-object-proxy
11341 (package
11342 (name "python-lazy-object-proxy")
11343 (version "1.2.2")
11344 (source (origin
11345 (method url-fetch)
11346 (uri (pypi-uri "lazy-object-proxy" version))
11347 (sha256
11348 (base32
11349 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11350 (build-system python-build-system)
11351 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11352 (synopsis "Lazy object proxy for python")
11353 (description
11354 "Lazy object proxy is an object that wraps a callable but defers the call
11355 until the object is actually required, and caches the result of said call.")
11356 (license license:bsd-2)))
11357
11358 (define-public python2-lazy-object-proxy
11359 (package-with-python2 python-lazy-object-proxy))
11360
11361 (define-public python-dnspython
11362 (package
11363 (name "python-dnspython")
11364 (version "1.15.0")
11365 (source (origin
11366 (method url-fetch)
11367 (uri (string-append "http://www.dnspython.org/kits/"
11368 version "/dnspython-" version ".tar.gz"))
11369 (sha256
11370 (base32
11371 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11372 (build-system python-build-system)
11373 (arguments '(#:tests? #f)) ; XXX: requires internet access
11374 (home-page "http://www.dnspython.org")
11375 (synopsis "DNS toolkit for Python")
11376 (description
11377 "dnspython is a DNS toolkit for Python. It supports almost all record
11378 types. It can be used for queries, zone transfers, and dynamic updates.
11379 It supports TSIG authenticated messages and EDNS0.")
11380 (license license:expat)))
11381
11382 (define-public python2-dnspython
11383 (package-with-python2 python-dnspython))
11384
11385 (define-public python-email-validator
11386 (package
11387 (name "python-email-validator")
11388 (version "1.0.2")
11389 (source
11390 (origin (method url-fetch)
11391 (uri (pypi-uri "email_validator" version))
11392 (sha256
11393 (base32
11394 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11395 (build-system python-build-system)
11396 (arguments
11397 '(#:phases
11398 (modify-phases %standard-phases
11399 (add-before 'build 'use-dnspython
11400 (lambda _
11401 (substitute* "setup.py"
11402 (("dnspython3") "dnspython"))
11403 #t)))))
11404 (propagated-inputs
11405 `(("python-dnspython" ,python-dnspython)
11406 ("python-idna" ,python-idna)))
11407 (home-page "https://github.com/JoshData/python-email-validator")
11408 (synopsis "Email address validation library for Python")
11409 (description
11410 "This library validates email address syntax and deliverability.")
11411 (license license:cc0)))
11412
11413 (define-public python2-email-validator
11414 (package-with-python2 python-email-validator))
11415
11416 (define-public python-ukpostcodeparser
11417 (package
11418 (name "python-ukpostcodeparser")
11419 (version "1.0.3")
11420 (source (origin
11421 (method url-fetch)
11422 (uri (pypi-uri "UkPostcodeParser" version))
11423 (sha256
11424 (base32
11425 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11426 (build-system python-build-system)
11427 (home-page "https://github.com/hamstah/ukpostcodeparser")
11428 (synopsis "UK Postcode parser for Python")
11429 (description
11430 "This library provides the @code{parse_uk_postcode} function for
11431 parsing UK postcodes.")
11432 (license license:expat)))
11433
11434 (define-public python2-ukpostcodeparser
11435 (package-with-python2 python-ukpostcodeparser))
11436
11437 (define-public python-faker
11438 (package
11439 (name "python-faker")
11440 (version "0.7.9")
11441 (source (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "Faker" version))
11444 (sha256
11445 (base32
11446 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11447 (patches
11448 (search-patches "python-faker-fix-build-32bit.patch"))
11449 (modules '((guix build utils)))
11450 (snippet
11451 '(begin
11452 (for-each delete-file (find-files "." "\\.pyc$"))
11453 #t))))
11454 (build-system python-build-system)
11455 (arguments
11456 '(#:phases
11457 (modify-phases %standard-phases
11458 (replace 'check
11459 (lambda _
11460 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11461 (native-inputs
11462 `(;; For testing
11463 ("python-email-validator" ,python-email-validator)
11464 ("python-mock" ,python-mock)
11465 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11466 (propagated-inputs
11467 `(("python-dateutil" ,python-dateutil)
11468 ("python-six" ,python-six)))
11469 (home-page "https://github.com/joke2k/faker")
11470 (synopsis "Python package that generates fake data")
11471 (description
11472 "Faker is a Python package that generates fake data such as names,
11473 addresses, and phone numbers.")
11474 (license license:expat)
11475 (properties `((python2-variant . ,(delay python2-faker))))))
11476
11477 (define-public python2-faker
11478 (let ((base (package-with-python2 (strip-python2-variant
11479 python-faker))))
11480 (package
11481 (inherit base)
11482 (propagated-inputs
11483 `(("python2-ipaddress" ,python2-ipaddress)
11484 ,@(package-propagated-inputs base))))))
11485
11486 (define-public python-fake-factory
11487 (package
11488 (name "python-fake-factory")
11489 (version "0.7.2")
11490 (source (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "fake-factory" version))
11493 (sha256
11494 (base32
11495 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11496 (patches
11497 (search-patches
11498 "python-fake-factory-fix-build-32bit.patch"))))
11499 (build-system python-build-system)
11500 (arguments
11501 '(#:phases
11502 (modify-phases %standard-phases
11503 (replace 'check
11504 (lambda _
11505 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11506 (native-inputs
11507 `(;; For testing
11508 ("python-email-validator" ,python-email-validator)
11509 ("python-mock" ,python-mock)
11510 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11511 (propagated-inputs
11512 `(("python-dateutil" ,python-dateutil)
11513 ("python-six" ,python-six)))
11514 (home-page "https://github.com/joke2k/faker")
11515 (synopsis "Python package that generates fake data")
11516 (description
11517 "Faker is a Python package that generates fake data such as names,
11518 addresses, and phone numbers.")
11519 (license license:expat)
11520 (properties `((python2-variant . ,(delay python2-fake-factory))
11521 (superseded . ,python-faker)))))
11522
11523 (define-public python2-fake-factory
11524 (let ((base (package-with-python2 (strip-python2-variant
11525 python-fake-factory))))
11526 (package
11527 (inherit base)
11528 (properties `((superseded . ,python2-faker)))
11529 (propagated-inputs
11530 `(("python2-ipaddress" ,python2-ipaddress)
11531 ,@(package-propagated-inputs base))))))
11532
11533 (define-public python-pyaml
11534 (package
11535 (name "python-pyaml")
11536 (version "15.8.2")
11537 (source (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "pyaml" version))
11540 (sha256
11541 (base32
11542 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11543 (build-system python-build-system)
11544 (native-inputs
11545 `(("python-unidecode" ,python-unidecode)))
11546 (propagated-inputs
11547 `(("python-pyyaml" ,python-pyyaml)))
11548 (home-page "https://github.com/mk-fg/pretty-yaml")
11549 (synopsis "YAML pretty-print library for Python")
11550 (description
11551 "pyaml is a PyYAML based python module to produce pretty and readable
11552 YAML-serialized data.")
11553 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11554
11555 (define-public python2-pyaml
11556 (package-with-python2 python-pyaml))
11557
11558 (define-public python-flexmock
11559 (package
11560 (name "python-flexmock")
11561 (version "0.10.2")
11562 (source (origin
11563 (method url-fetch)
11564 (uri (pypi-uri "flexmock" version))
11565 (sha256
11566 (base32
11567 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11568 (build-system python-build-system)
11569 (home-page "https://flexmock.readthedocs.org")
11570 (synopsis "Testing library for Python")
11571 (description
11572 "flexmock is a testing library for Python that makes it easy to create
11573 mocks, stubs and fakes.")
11574 (license license:bsd-3)))
11575
11576 (define-public python2-flexmock
11577 (package-with-python2 python-flexmock))
11578
11579 (define-public python-orator
11580 (package
11581 (name "python-orator")
11582 (version "0.8.2")
11583 (source (origin
11584 (method url-fetch)
11585 (uri (pypi-uri "orator" version))
11586 (sha256
11587 (base32
11588 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11589 (build-system python-build-system)
11590 (arguments '(#:tests? #f)) ; no tests
11591 (propagated-inputs
11592 `(("python-arrow" ,python-arrow)
11593 ("python-blinker" ,python-blinker)
11594 ("python-cleo" ,python-cleo)
11595 ("python-faker" ,python-faker)
11596 ("python-inflection" ,python-inflection)
11597 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11598 ("python-pyaml" ,python-pyaml)
11599 ("python-simplejson" ,python-simplejson)
11600 ("python-wrapt" ,python-wrapt)))
11601 (home-page "https://orator-orm.com/")
11602 (synopsis "ActiveRecord ORM for Python")
11603 (description
11604 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11605 implementation for Python.")
11606 (license license:expat)
11607 (properties `((python2-variant . ,(delay python2-orator))))))
11608
11609 (define-public python2-orator
11610 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11611 (package
11612 (inherit base)
11613 (propagated-inputs
11614 `(("python2-ipaddress" ,python2-ipaddress)
11615 ,@(package-propagated-inputs base))))))
11616
11617 (define-public python-prompt-toolkit
11618 (package
11619 (name "python-prompt-toolkit")
11620 (version "1.0.9")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11625 (sha256
11626 (base32
11627 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11628 (build-system python-build-system)
11629 (arguments
11630 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11631 (propagated-inputs
11632 `(("python-wcwidth" ,python-wcwidth)
11633 ("python-six" ,python-six)
11634 ("python-pygments" ,python-pygments)))
11635 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11636 (synopsis "Library for building command line interfaces in Python")
11637 (description
11638 "Prompt-Toolkit is a library for building interactive command line
11639 interfaces in Python. It's like GNU Readline but it also features syntax
11640 highlighting while typing, out-of-the-box multi-line input editing, advanced
11641 code completion, incremental search, support for Chinese double-width
11642 characters, mouse support, and auto suggestions.")
11643 (license license:bsd-3)))
11644
11645 (define-public python2-prompt-toolkit
11646 (package-with-python2 python-prompt-toolkit))
11647
11648 (define-public python-jedi
11649 (package
11650 (name "python-jedi")
11651 (version "0.9.0")
11652 (source
11653 (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "jedi" version))
11656 (sha256
11657 (base32
11658 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11659 (build-system python-build-system)
11660 (arguments
11661 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11662 '(#:tests? #f))
11663 (native-inputs
11664 `(("python-pytest" ,python-pytest)))
11665 (home-page "https://github.com/davidhalter/jedi")
11666 (synopsis
11667 "Autocompletion for Python that can be used for text editors")
11668 (description
11669 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11670 (license license:expat)))
11671
11672 (define-public python2-jedi
11673 (package-with-python2 python-jedi))
11674
11675 (define-public ptpython
11676 (package
11677 (name "ptpython")
11678 (version "0.34")
11679 (source (origin
11680 (method url-fetch)
11681 (uri (pypi-uri "ptpython" version))
11682 (sha256
11683 (base32
11684 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11685 (build-system python-build-system)
11686 (arguments
11687 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11688 (propagated-inputs
11689 `(("python-docopt" ,python-docopt)
11690 ("python-jedi" ,python-jedi)
11691 ("python-prompt-toolkit" ,python-prompt-toolkit)
11692 ("python-pygments" ,python-pygments)))
11693 (home-page "https://github.com/jonathanslenders/ptpython")
11694 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11695 (description
11696 "ptpython is a Python read-eval-print loop with IDE-like features.
11697 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11698 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11699 etc.")
11700 (license license:bsd-3)
11701 (properties `((python2-variant . ,(delay ptpython-2))))))
11702
11703 (define-public ptpython-2
11704 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11705 (package
11706 (inherit base)
11707 (name "ptpython2"))))
11708
11709 (define-public python-requests-oauthlib
11710 (package
11711 (name "python-requests-oauthlib")
11712 (version "0.6.2")
11713 (source
11714 (origin
11715 (method url-fetch)
11716 (uri (pypi-uri "requests-oauthlib" version))
11717 (sha256
11718 (base32
11719 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11720 (build-system python-build-system)
11721 (arguments
11722 `(#:phases
11723 (modify-phases %standard-phases
11724 ;; removes tests that require network access
11725 (add-before 'check 'pre-check
11726 (lambda _
11727 (delete-file "tests/test_core.py")
11728 #t)))))
11729 (native-inputs
11730 `(("python-requests-mock" ,python-requests-mock)
11731 ("python-mock" ,python-mock)))
11732 (propagated-inputs
11733 `(("python-oauthlib" ,python-oauthlib)
11734 ("python-requests" ,python-requests)))
11735 (home-page
11736 "https://github.com/requests/requests-oauthlib")
11737 (synopsis
11738 "OAuthlib authentication support for Requests")
11739 (description
11740 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11741 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11742 (license license:isc)))
11743
11744 (define-public python2-requests-oauthlib
11745 (package-with-python2 python-requests-oauthlib))
11746
11747 (define-public python-stem
11748 (package
11749 (name "python-stem")
11750 (version "1.5.4")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "stem" version))
11755 (sha256
11756 (base32
11757 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11758 (build-system python-build-system)
11759 (arguments
11760 `(#:phases
11761 (modify-phases %standard-phases
11762 (replace 'check
11763 (lambda _
11764 (zero? (system* "./run_tests.py" "--unit")))))))
11765 (native-inputs
11766 `(("python-mock" ,python-mock)
11767 ("python-pep8" ,python-pep8)
11768 ("python-pyflakes" ,python-pyflakes)))
11769 (home-page "https://stem.torproject.org/")
11770 (synopsis
11771 "Python controller library that allows applications to interact with Tor")
11772 (description
11773 "Stem is a Python controller library for Tor. With it you can use Tor's
11774 control protocol to script against the Tor process and read descriptor data
11775 relays publish about themselves.")
11776 (license license:lgpl3)))
11777
11778 (define-public python2-stem
11779 (package-with-python2 python-stem))
11780
11781 (define-public python-pyserial
11782 (package
11783 (name "python-pyserial")
11784 (version "3.1.1")
11785 (source
11786 (origin
11787 (method url-fetch)
11788 (uri (pypi-uri "pyserial" version))
11789 (sha256
11790 (base32
11791 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11792 (build-system python-build-system)
11793 (arguments
11794 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11795 ;; #:phases
11796 ;; (modify-phases %standard-phases
11797 ;; (replace 'check
11798 ;; (lambda _
11799 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11800 (home-page
11801 "https://github.com/pyserial/pyserial")
11802 (synopsis "Python Serial Port Bindings")
11803 (description "@code{pyserial} provide serial port bindings for Python. It
11804 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11805 and/or Xon/Xoff. The port is accessed in RAW mode.")
11806 (license license:bsd-3)))
11807
11808 (define-public python2-pyserial
11809 (package-with-python2 python-pyserial))
11810
11811 (define-public python-kivy
11812 (package
11813 (name "python-kivy")
11814 (version "1.9.1")
11815 (source
11816 (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "kivy" version))
11819 (file-name (string-append name "-" version ".tar.gz"))
11820 (sha256
11821 (base32
11822 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11823 (build-system python-build-system)
11824 (arguments
11825 `(#:tests? #f ; Tests require many optional packages
11826 #:phases
11827 (modify-phases %standard-phases
11828 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11829 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11830 (lambda* (#:key inputs #:allow-other-keys)
11831 (setenv "KIVY_SDL2_PATH"
11832 (string-append (assoc-ref inputs "sdl-union")
11833 "/include/SDL2"))
11834 #t)))))
11835 (native-inputs
11836 `(("pkg-config" ,pkg-config)
11837 ("python-cython" ,python-cython)))
11838 (inputs
11839 `(("gstreamer" ,gstreamer)
11840 ("mesa" ,mesa)
11841 ("sdl-union"
11842 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11843 (home-page "http://kivy.org")
11844 (synopsis
11845 "Multitouch application framework")
11846 (description
11847 "A software library for rapid development of
11848 hardware-accelerated multitouch applications.")
11849 (license license:expat)))
11850
11851 (define-public python2-kivy
11852 (package-with-python2 python-kivy))
11853
11854 (define-public python-kivy-next
11855 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11856 (revision "1"))
11857 (package (inherit python-kivy)
11858 (name "python-kivy-next")
11859 (version (string-append "1.9.1-" revision "."
11860 (string-take commit 7)))
11861 (source
11862 (origin
11863 (method git-fetch)
11864 (uri (git-reference
11865 (url "https://github.com/kivy/kivy")
11866 (commit commit)))
11867 (file-name (string-append name "-" version "-checkout"))
11868 (sha256
11869 (base32
11870 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11871
11872 (define-public python2-kivy-next
11873 (package-with-python2 python-kivy-next))
11874
11875 (define-public python-binaryornot
11876 (package
11877 (name "python-binaryornot")
11878 (version "0.4.0")
11879 (source (origin
11880 (method url-fetch)
11881 (uri (pypi-uri "binaryornot" version))
11882 (sha256
11883 (base32
11884 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11885 (build-system python-build-system)
11886 (propagated-inputs
11887 `(("python-chardet" ,python-chardet)
11888 ("python-hypothesis" ,python-hypothesis)))
11889 (home-page "https://github.com/audreyr/binaryornot")
11890 (synopsis "Package to check if a file is binary or text")
11891 (description "Ultra-lightweight pure Python package to check if a file is
11892 binary or text.")
11893 (license license:bsd-3)
11894 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11895
11896 (define-public python2-binaryornot
11897 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11898 (package (inherit base)
11899 (propagated-inputs
11900 `(("python2-enum34" ,python2-enum34)
11901 ,@(package-propagated-inputs base))))))
11902
11903 (define-public python-nltk
11904 (package
11905 (name "python-nltk")
11906 (version "3.2.1")
11907 (source (origin
11908 (method url-fetch)
11909 (uri (pypi-uri "nltk" version))
11910 (sha256
11911 (base32
11912 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11913 (build-system python-build-system)
11914 (arguments
11915 '(;; The tests require some extra resources to be downloaded.
11916 ;; TODO Try packaging these resources.
11917 #:tests? #f))
11918 (home-page "http://nltk.org/")
11919 (synopsis "Natural Language Toolkit")
11920 (description "It provides interfaces to over 50 corpora and lexical
11921 resources such as WordNet, along with a suite of text processing libraries
11922 for classification, tokenization, stemming, tagging, parsing, and semantic
11923 reasoning, wrappers for natural language processing libraries.")
11924 (license license:asl2.0)))
11925
11926 (define-public python2-nltk
11927 (package-with-python2 python-nltk))
11928
11929 (define-public python-pymongo
11930 (package
11931 (name "python-pymongo")
11932 (version "3.3.0")
11933 (source (origin
11934 (method url-fetch)
11935 (uri (pypi-uri "pymongo" version))
11936 (sha256
11937 (base32
11938 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11939 (build-system python-build-system)
11940 (propagated-inputs
11941 `(("python-certifi" ,python-certifi)))
11942 (home-page "http://github.com/mongodb/mongo-python-driver")
11943 (synopsis "Python driver for MongoDB")
11944 (description "Python driver for MongoDB.")
11945 (license license:asl2.0)))
11946
11947 (define-public python2-pymongo
11948 (package-with-python2 python-pymongo))
11949
11950 (define-public python-sh
11951 (package
11952 (name "python-sh")
11953 (version "1.11")
11954 (source (origin
11955 (method url-fetch)
11956 (uri (pypi-uri "sh" version))
11957 (sha256
11958 (base32
11959 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11960 (build-system python-build-system)
11961 (arguments
11962 `(#:tests? #f)) ; no tests
11963 (home-page "https://github.com/amoffat/sh")
11964 (synopsis "Python subprocess interface")
11965 (description "Abstracts process invocation by providing a function
11966 interface for programs.")
11967 (license license:expat)))
11968
11969 (define-public python2-sh
11970 (package-with-python2 python-sh))
11971
11972 (define-public python-consul
11973 (package
11974 (name "python-consul")
11975 (version "0.6.1")
11976 (source
11977 (origin
11978 (method url-fetch)
11979 (uri (pypi-uri "python-consul" version))
11980 (sha256
11981 (base32
11982 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11983 (build-system python-build-system)
11984 (native-inputs
11985 `(("python-pytest" ,python-pytest)))
11986 (propagated-inputs
11987 `(("python-requests" ,python-requests)
11988 ("python-six" ,python-six)))
11989 (home-page "https://github.com/cablehead/python-consul")
11990 (synopsis "Python client for Consul")
11991 (description
11992 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11993 discovery, monitoring and configuration.")
11994 (license license:expat)))
11995
11996 (define-public python2-consul
11997 (package-with-python2 python-consul))
11998
11999 (define-public python-schematics
12000 (package
12001 (name "python-schematics")
12002 (version "1.1.1")
12003 (source
12004 (origin
12005 (method url-fetch)
12006 (uri (string-append
12007 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12008 (file-name (string-append name "-" version ".tar.gz"))
12009 (sha256
12010 (base32
12011 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12012 (build-system python-build-system)
12013 (propagated-inputs
12014 `(("python-six" ,python-six)))
12015 (arguments
12016 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12017 ; version requirements (eg python-coveralls)
12018 (home-page "https://github.com/schematics/schematics")
12019 (synopsis "Python Data Structures for Humans")
12020 (description "Python Data Structures for Humans.")
12021 (license license:bsd-3)))
12022
12023 (define-public python2-schematics
12024 (package-with-python2 python-schematics))
12025
12026 (define-public python-publicsuffix
12027 (package
12028 (name "python-publicsuffix")
12029 (version "1.1.0")
12030 (source (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "publicsuffix" version))
12033 (sha256
12034 (base32
12035 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12036 (build-system python-build-system)
12037 (arguments
12038 `(#:tests? #f)) ; tests use the internet
12039 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12040 (synopsis "Get suffix for a domain name")
12041 (description "Get a public suffix for a domain name using the Public Suffix
12042 List.")
12043 (license license:expat)))
12044
12045 (define-public python2-publicsuffix
12046 (package-with-python2 python-publicsuffix))
12047
12048 (define-public python-publicsuffix2
12049 (package
12050 (name "python-publicsuffix2")
12051 (version "2.20160621")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12056 (sha256
12057 (base32
12058 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
12059 (build-system python-build-system)
12060 (arguments
12061 '(#:tests? #f)) ; The test suite requires network access.
12062 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12063 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12064 (description "Get a public suffix for a domain name using the Public Suffix
12065 List. Forked from and using the same API as the publicsuffix package.")
12066 (license (list license:expat license:mpl2.0))))
12067
12068 (define-public python2-publicsuffix2
12069 (package-with-python2 python-publicsuffix2))
12070
12071 (define-public python-url
12072 (package
12073 (name "python-url")
12074 (version "0.2.0")
12075 (source (origin
12076 (method url-fetch)
12077 (uri (pypi-uri "url" version))
12078 (sha256
12079 (base32
12080 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12081 (build-system python-build-system)
12082 (propagated-inputs
12083 `(("python-publicsuffix" ,python-publicsuffix)))
12084 (native-inputs
12085 `(("python-coverage" ,python-coverage)
12086 ("python-nose" ,python-nose)))
12087 (arguments
12088 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12089 (home-page "http://github.com/seomoz/url-py")
12090 (synopsis "URL Parsing")
12091 (description "Library for parsing urls.")
12092 (license license:expat)
12093 (properties `((python2-variant . ,(delay python2-url))))))
12094
12095 (define-public python2-url
12096 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12097 (package (inherit base)
12098 (propagated-inputs
12099 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12100
12101 (define-public python-freezegun
12102 (package
12103 (name "python-freezegun")
12104 (version "0.3.8")
12105 (source
12106 (origin
12107 (method url-fetch)
12108 (uri (pypi-uri "freezegun" version))
12109 (sha256
12110 (base32
12111 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12112 (build-system python-build-system)
12113 (native-inputs
12114 `(("python-mock" ,python-mock)
12115 ("python-nose" ,python-nose)
12116 ("python-coverage" ,python-coverage)))
12117 (propagated-inputs
12118 `(("python-six" ,python-six)
12119 ("python-dateutil" ,python-dateutil)))
12120 (arguments
12121 `(#:phases (modify-phases %standard-phases
12122 ;; The tests are normally executed via `make test`, but the PyPi
12123 ;; package does not include the Makefile.
12124 (replace 'check
12125 (lambda _
12126 (zero? (system* "nosetests" "./tests/")))))))
12127 (home-page "https://github.com/spulec/freezegun")
12128 (synopsis "Test utility for mocking the datetime module")
12129 (description
12130 "FreezeGun is a library that allows your python tests to travel through
12131 time by mocking the datetime module.")
12132 (license license:asl2.0)))
12133
12134 (define-public python2-freezegun
12135 (package-with-python2 python-freezegun))
12136
12137
12138 (define-public python-odfpy
12139 (package
12140 (name "python-odfpy")
12141 (version "1.3.3")
12142 (source (origin
12143 (method url-fetch)
12144 (uri (pypi-uri "odfpy" version))
12145 (sha256
12146 (base32
12147 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12148 (arguments
12149 `(#:modules ((srfi srfi-1)
12150 (guix build python-build-system)
12151 (guix build utils))
12152 #:phases
12153 (modify-phases %standard-phases
12154 (replace 'check
12155 ;; The test runner invokes python2 and python3 for test*.py.
12156 ;; To avoid having both in inputs, we replicate it here.
12157 (lambda _
12158 (every (lambda (test-file)
12159 (zero? (system* "python" test-file)))
12160 (find-files "tests" "^test.*\\.py$")))))))
12161 (build-system python-build-system)
12162 (home-page "https://github.com/eea/odfpy")
12163 (synopsis "Python API and tools to manipulate OpenDocument files")
12164 (description "Collection of libraries and utility programs written in
12165 Python to manipulate OpenDocument 1.2 files.")
12166 (license
12167 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12168 ;; number of files with other licenses.
12169 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12170
12171 (define-public python2-odfpy
12172 (package-with-python2 python-odfpy))
12173
12174 (define-public python-cachecontrol
12175 (package
12176 (name "python-cachecontrol")
12177 (version "0.11.6")
12178 (source
12179 (origin
12180 (method url-fetch)
12181 ;; Pypi does not have tests.
12182 (uri (string-append
12183 "https://github.com/ionrock/cachecontrol/archive/v"
12184 version ".tar.gz"))
12185 (file-name (string-append name "-" version ".tar.gz"))
12186 (sha256
12187 (base32
12188 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12189 (build-system python-build-system)
12190 (arguments
12191 `(#:phases
12192 (modify-phases %standard-phases
12193 (replace 'check
12194 (lambda _
12195 ;; Drop test that requires internet access.
12196 (delete-file "tests/test_regressions.py")
12197 (setenv "PYTHONPATH"
12198 (string-append (getcwd) "/build/lib:"
12199 (getenv "PYTHONPATH")))
12200 (zero? (system* "py.test" "-vv")))))))
12201 (native-inputs
12202 `(("python-pytest" ,python-pytest)
12203 ("python-redis" ,python-redis)
12204 ("python-webtest" ,python-webtest)
12205 ("python-mock" ,python-mock)))
12206 (propagated-inputs
12207 `(("python-requests" ,python-requests)
12208 ("python-lockfile" ,python-lockfile)))
12209 (home-page "https://github.com/ionrock/cachecontrol")
12210 (synopsis "The httplib2 caching algorithms for use with requests")
12211 (description "CacheControl is a port of the caching algorithms in
12212 @code{httplib2} for use with @code{requests} session objects.")
12213 (license license:asl2.0)))
12214
12215 (define-public python2-cachecontrol
12216 (package-with-python2 python-cachecontrol))
12217
12218 (define-public python-lit
12219 (package
12220 (name "python-lit")
12221 (version "0.5.0")
12222 (source
12223 (origin
12224 (method url-fetch)
12225 (uri (pypi-uri "lit" version))
12226 (sha256
12227 (base32
12228 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12229 (build-system python-build-system)
12230 (home-page "http://llvm.org/")
12231 (synopsis "LLVM Software Testing Tool")
12232 (description "@code{lit} is a portable tool for executing LLVM and Clang
12233 style test suites, summarizing their results, and providing indication of
12234 failures.")
12235 (license license:ncsa)))
12236
12237 (define-public python2-lit
12238 (package-with-python2 python-lit))
12239
12240 (define-public python-pytest-pep8
12241 (package
12242 (name "python-pytest-pep8")
12243 (version "1.0.6")
12244 (source (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "pytest-pep8" version))
12247 (sha256
12248 (base32
12249 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12250 (build-system python-build-system)
12251 (arguments
12252 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12253 (native-inputs
12254 `(("python-pytest" ,python-pytest)))
12255 (propagated-inputs
12256 `(("python-pep8" ,python-pep8)))
12257 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12258 (synopsis "Py.test plugin to check PEP8 requirements")
12259 (description "Pytest plugin for checking PEP8 compliance.")
12260 (license license:expat)))
12261
12262 (define-public python2-pytest-pep8
12263 (package-with-python2 python-pytest-pep8))
12264
12265 (define-public python-pytest-flakes
12266 (package
12267 (name "python-pytest-flakes")
12268 (version "1.0.1")
12269 (source (origin
12270 (method url-fetch)
12271 (uri (pypi-uri "pytest-flakes" version))
12272 (sha256
12273 (base32
12274 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12275 (build-system python-build-system)
12276 (arguments
12277 `(#:phases
12278 (modify-phases %standard-phases
12279 (delete 'check)
12280 (add-after 'install 'check
12281 (lambda* (#:key outputs inputs #:allow-other-keys)
12282 ;; It's easier to run tests after install.
12283 ;; Make installed package available for running the tests
12284 (add-installed-pythonpath inputs outputs)
12285 (zero? (system* "py.test" "-vv")))))))
12286 (native-inputs
12287 `(("python-coverage" ,python-coverage)
12288 ("python-pytest" ,python-pytest)
12289 ("python-pytest-cache" ,python-pytest-cache)
12290 ("python-pytest-pep8" ,python-pytest-pep8)))
12291 (propagated-inputs
12292 `(("python-pyflakes" ,python-pyflakes)))
12293 (home-page "https://github.com/fschulze/pytest-flakes")
12294 (synopsis "Py.test plugin to check source code with pyflakes")
12295 (description "Pytest plugin for checking Python source code with pyflakes.")
12296 (license license:expat)))
12297
12298 (define-public python2-pytest-flakes
12299 (package-with-python2 python-pytest-flakes))
12300
12301 (define-public python-natsort
12302 (package
12303 (name "python-natsort")
12304 (version "5.0.1")
12305 (source (origin
12306 (method url-fetch)
12307 (uri (pypi-uri "natsort" version))
12308 (sha256
12309 (base32
12310 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12311 (build-system python-build-system)
12312 (arguments
12313 `(#:phases
12314 (modify-phases %standard-phases
12315 (add-before 'check 'set-cachedir
12316 ;; Tests require write access to $HOME by default
12317 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12318 (native-inputs
12319 `(("python-hypothesis" ,python-hypothesis)
12320 ("python-pytest-cache" ,python-pytest-cache)
12321 ("python-pytest-cov" ,python-pytest-cov)
12322 ("python-pytest-flakes" ,python-pytest-flakes)
12323 ("python-pytest-pep8" ,python-pytest-pep8)))
12324 (propagated-inputs ; TODO: Add python-fastnumbers.
12325 `(("python-pyicu" ,python-pyicu)))
12326 (home-page "https://github.com/SethMMorton/natsort")
12327 (synopsis "Natural sorting for python and shell")
12328 (description
12329 "Natsort lets you apply natural sorting on lists instead of
12330 lexicographical. If you use the built-in @code{sorted} method in python
12331 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12332 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12333 function @code{natsorted} that identifies numbers and sorts them separately
12334 from strings. It can also sort version numbers, real numbers, mixed types
12335 and more, and comes with a shell command @command{natsort} that exposes this
12336 functionality in the command line.")
12337 (license license:expat)
12338 (properties `((python2-variant . ,(delay python2-natsort))))))
12339
12340 (define-public python2-natsort
12341 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12342 (package (inherit base)
12343 (native-inputs
12344 `(("python2-pathlib" ,python2-pathlib)
12345 ("python2-mock" ,python2-mock)
12346 ("python2-enum34" ,python2-enum34)
12347 ,@(package-native-inputs base))))))
12348
12349 (define-public python-glances
12350 (package
12351 (name "python-glances")
12352 (version "2.7.1")
12353 (source
12354 (origin
12355 (method url-fetch)
12356 (uri (pypi-uri "Glances" version))
12357 (sha256
12358 (base32
12359 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12360 (build-system python-build-system)
12361 (propagated-inputs
12362 `(("python-psutil" ,python-psutil)))
12363 (home-page
12364 "https://github.com/nicolargo/glances")
12365 (synopsis
12366 "A cross-platform curses-based monitoring tool")
12367 (description
12368 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12369 Glances uses the PsUtil library to get information from your system. It monitors
12370 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12371 (license license:lgpl3+)))
12372
12373 (define-public python2-glances
12374 (package-with-python2 python-glances))
12375
12376 (define-public python-graphql-core
12377 (package
12378 (name "python-graphql-core")
12379 (version "0.5.3")
12380 (source
12381 (origin
12382 (method url-fetch)
12383 (uri (pypi-uri "graphql-core" version))
12384 (sha256
12385 (base32
12386 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12387 (build-system python-build-system)
12388 (arguments
12389 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12390 #:phases
12391 (modify-phases %standard-phases
12392 (add-after 'unpack 'patch-hardcoded-version
12393 (lambda _ (substitute*
12394 "setup.py"
12395 (("'gevent==1.1rc1'") "'gevent'"))
12396 #t)))))
12397 (native-inputs
12398 `(("python-gevent" ,python-gevent)
12399 ("python-mock" ,python-mock)
12400 ("python-pytest-mock" ,python-pytest-mock)))
12401 (propagated-inputs
12402 `(("python-promise" ,python-promise)
12403 ("python-six" ,python-six)))
12404 (home-page "https://github.com/graphql-python/graphql-core")
12405 (synopsis "GraphQL implementation for Python")
12406 (description
12407 "GraphQL implementation for Python. GraphQL is a data query language and
12408 runtime designed and used to request and deliver data to mobile and web apps.
12409 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12410 to Python.")
12411 (license license:expat)))
12412
12413 (define-public python2-graphql-core
12414 (package-with-python2 python-graphql-core))
12415
12416 (define-public python-graphql-relay
12417 (package
12418 (name "python-graphql-relay")
12419 (version "0.4.5")
12420 (source
12421 (origin
12422 (method url-fetch)
12423 (uri (pypi-uri "graphql-relay" version))
12424 (sha256
12425 (base32
12426 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12427 (build-system python-build-system)
12428 (native-inputs
12429 `(("python-pytest" ,python-pytest)))
12430 (propagated-inputs
12431 `(("python-graphql-core" ,python-graphql-core)
12432 ("python-promise" ,python-promise)
12433 ("python-six" ,python-six)))
12434 (home-page "https://github.com/graphql-python/graphql-relay-py")
12435 (synopsis "Relay implementation for Python")
12436 (description
12437 "This is a library to allow the easy creation of Relay-compliant servers
12438 using the GraphQL Python reference implementation of a GraphQL server. It
12439 should be noted that the code is a exact port of the original
12440 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12441 from Facebook.")
12442 (license license:expat)))
12443
12444 (define-public python2-graphql-relay
12445 (package-with-python2 python-graphql-relay))
12446
12447 (define-public python-graphene
12448 (package
12449 (name "python-graphene")
12450 (version "0.10.2")
12451 (source
12452 (origin
12453 (method url-fetch)
12454 (uri (pypi-uri "graphene" version))
12455 (sha256
12456 (base32
12457 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12458 (build-system python-build-system)
12459 (native-inputs
12460 `(("python-django-filter" ,python-django-filter)
12461 ("python-mock" ,python-mock)
12462 ("python-psycopg2" ,python-psycopg2)
12463 ("python-pytest-django" ,python-pytest-django)
12464 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12465 (propagated-inputs
12466 `(("python-graphql-core" ,python-graphql-core)
12467 ("python-graphql-relay" ,python-graphql-relay)
12468 ("python-iso8601" ,python-iso8601)
12469 ("python-promise" ,python-promise)
12470 ("python-six" ,python-six)))
12471 (home-page "http://graphene-python.org/")
12472 (synopsis "GraphQL Framework for Python")
12473 (description
12474 "Graphene is a Python library for building GraphQL schemas/types.
12475 A GraphQL schema describes your data model, and provides a GraphQL server
12476 with an associated set of resolve methods that know how to fetch data.")
12477 (properties `((python2-variant . ,(delay python2-graphene))))
12478 (license license:expat)))
12479
12480 (define-public python2-graphene
12481 (let ((base (package-with-python2
12482 (strip-python2-variant python-graphene))))
12483 (package (inherit base)
12484 (native-inputs
12485 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12486 ,@(package-native-inputs base))))))
12487
12488 (define-public python-nautilus
12489 (package
12490 (name "python-nautilus")
12491 (version "0.4.9")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 (uri (pypi-uri "nautilus" version))
12496 (sha256
12497 (base32
12498 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12499 (build-system python-build-system)
12500 (arguments `(#:tests? #f)) ; fails to import test modules
12501 (propagated-inputs
12502 `(("python-bcrypt" ,python-bcrypt)
12503 ("python-click" ,python-click)
12504 ("python-consul" ,python-consul)
12505 ("python-graphene" ,python-graphene)
12506 ("python-jinja2" ,python-jinja2)
12507 ("python-peewee" ,python-peewee)
12508 ("python-pika" ,python-pika)
12509 ("python-tornado" ,python-tornado)
12510 ("python-wtforms" ,python-wtforms)))
12511 (native-inputs
12512 `(("python-nose2" ,python-nose2)))
12513 (home-page "https://github.com/AlecAivazis/nautilus")
12514 (synopsis "Library for creating microservice applications")
12515 (description
12516 "Nautilus is a framework for flux based microservices that looks to
12517 provide extendible implementations of common aspects of a cloud so that you can
12518 focus on building massively scalable web applications.")
12519 (license license:expat)))
12520
12521 (define-public python-snowballstemmer
12522 (package
12523 (name "python-snowballstemmer")
12524 (version "1.2.1")
12525 (source (origin
12526 (method url-fetch)
12527 (uri (pypi-uri "snowballstemmer" version))
12528 (sha256
12529 (base32
12530 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12531 (build-system python-build-system)
12532 (arguments
12533 `(;; No tests exist
12534 #:tests? #f))
12535 (home-page "https://github.com/shibukawa/snowball_py")
12536 (synopsis "Snowball stemming library collection for Python")
12537 (description "This package provides 16 word stemmer algorithms generated
12538 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12539 English stemmer.")
12540 (license license:bsd-3)))
12541
12542 (define-public python2-snowballstemmer
12543 (package-with-python2 python-snowballstemmer))
12544
12545 (define-public python-sphinx-cloud-sptheme
12546 (package
12547 (name "python-sphinx-cloud-sptheme")
12548 (version "1.7.1")
12549 (source (origin
12550 (method url-fetch)
12551 (uri (pypi-uri "cloud_sptheme" version))
12552 (sha256
12553 (base32
12554 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12555 (build-system python-build-system)
12556 ;; FIXME: The 'pypi' release archive does not contain tests.
12557 (arguments '(#:tests? #f))
12558 (native-inputs
12559 `(("python-sphinx" ,python-sphinx)))
12560 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12561 (synopsis "'Cloud' theme for Sphinx documenter")
12562 (description "This package contains the \"Cloud\" theme for Sphinx and some
12563 related extensions.")
12564 (license license:bsd-3)))
12565
12566 (define-public python2-sphinx-cloud-sptheme
12567 (package-with-python2 python-sphinx-cloud-sptheme))
12568
12569 (define-public python-sphinx-alabaster-theme
12570 (package
12571 (name "python-sphinx-alabaster-theme")
12572 (version "0.7.9")
12573 (source (origin
12574 (method url-fetch)
12575 (uri (pypi-uri "alabaster" version))
12576 (sha256
12577 (base32
12578 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12579 (build-system python-build-system)
12580 (propagated-inputs
12581 `(("python-pygments" ,python-pygments)))
12582 (home-page "https://alabaster.readthedocs.io/")
12583 (synopsis "Configurable sidebar-enabled Sphinx theme")
12584 (description "Alabaster is a visually (c)lean, responsive, configurable
12585 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12586 (license license:bsd-3)))
12587
12588 (define-public python2-sphinx-alabaster-theme
12589 (package-with-python2 python-sphinx-alabaster-theme))
12590
12591 (define-public python-betamax
12592 (package
12593 (name "python-betamax")
12594 (version "0.8.0")
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "betamax" version))
12599 (sha256
12600 (base32
12601 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12602 (build-system python-build-system)
12603 (arguments
12604 '(;; Many tests fail because they require networking.
12605 #:tests? #f))
12606 (propagated-inputs
12607 `(("python-requests" ,python-requests)))
12608 (home-page "https://github.com/sigmavirus24/betamax")
12609 (synopsis "Record HTTP interactions with python-requests")
12610 (description "Betamax will record your test suite's HTTP interactions and
12611 replay them during future tests. It is designed to work with python-requests.")
12612 (license license:expat)))
12613
12614 (define-public python2-betamax
12615 (package-with-python2 python-betamax))
12616
12617 (define-public python-s3transfer
12618 (package
12619 (name "python-s3transfer")
12620 (version "0.1.10")
12621 (source (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "s3transfer" version))
12624 (sha256
12625 (base32
12626 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12627 (build-system python-build-system)
12628 (arguments
12629 `(#:phases
12630 (modify-phases %standard-phases
12631 (replace 'check
12632 (lambda _
12633 ;; 7 of the 'integration' tests require network access or login
12634 ;; credentials.
12635 (zero? (system* "nosetests" "--exclude=integration")))))))
12636 (native-inputs
12637 `(("python-docutils" ,python-docutils)
12638 ("python-mock" ,python-mock)
12639 ("python-nose" ,python-nose)))
12640 (propagated-inputs
12641 `(("python-botocore" ,python-botocore)))
12642 (synopsis "Amazon S3 Transfer Manager")
12643 (description "S3transfer is a Python library for managing Amazon S3
12644 transfers.")
12645 (home-page "https://github.com/boto/s3transfer")
12646 (license license:asl2.0)
12647 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12648
12649 (define-public python2-s3transfer
12650 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12651 (package
12652 (inherit base)
12653 (native-inputs
12654 `(("python2-futures" ,python2-futures)
12655 ,@(package-native-inputs base))))))
12656
12657 (define-public python-setproctitle
12658 (package
12659 (name "python-setproctitle")
12660 (version "1.1.10")
12661 (source
12662 (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "setproctitle" version))
12665 (sha256
12666 (base32
12667 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12668 (build-system python-build-system)
12669 (arguments
12670 '(#:phases
12671 (modify-phases %standard-phases
12672 (add-before 'check 'patch-Makefile
12673 ;; Stricly this is only required for the python2 variant.
12674 ;; But adding a phase in an inherited package seems to be
12675 ;; cumbersum. So we patch even for python3.
12676 (lambda _
12677 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12678 (when nose
12679 (substitute* "Makefile"
12680 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12681 (string-append nose "/bin/nosetests "))))
12682 #t)))
12683 (replace 'check
12684 (lambda _
12685 (setenv "PYTHON" (or (which "python3") (which "python")))
12686 (setenv "PYCONFIG" (or (which "python3-config")
12687 (which "python-config")))
12688 (setenv "CC" "gcc")
12689 ;; No need to extend PYTHONPATH to find the built package, since
12690 ;; the Makefile will build anyway
12691 (zero? (system* "make" "check")))))))
12692 (native-inputs
12693 `(("procps" ,procps))) ; required for tests
12694 (home-page
12695 "https://github.com/dvarrazzo/py-setproctitle")
12696 (synopsis
12697 "Setproctitle implementation for Python to customize the process title")
12698 (description "The library allows a process to change its title (as displayed
12699 by system tools such as ps and top).
12700
12701 Changing the title is mostly useful in multi-process systems, for
12702 example when a master process is forked: changing the children's title
12703 allows to identify the task each process is busy with. The technique
12704 is used by PostgreSQL and the OpenSSH Server for example.")
12705 (license license:bsd-3)
12706 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12707
12708 (define-public python2-setproctitle
12709 (let ((base (package-with-python2
12710 (strip-python2-variant python-setproctitle))))
12711 (package
12712 (inherit base)
12713 (native-inputs `(("python2-nose" ,python2-nose)
12714 ,@(package-native-inputs base))))))
12715
12716 (define-public python-validictory
12717 (package
12718 (name "python-validictory")
12719 (version "1.0.1")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (pypi-uri "validictory" version))
12724 (sha256
12725 (base32
12726 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12727 (build-system python-build-system)
12728 (arguments
12729 '(#:phases
12730 (modify-phases %standard-phases
12731 (add-after 'unpack 'bootstrap
12732 ;; Move the tests out of the package directory to avoid
12733 ;; packaging them.
12734 (lambda* _
12735 (rename-file "validictory/tests" "tests")
12736 (delete-file "tests/__init__.py")))
12737 (replace 'check
12738 (lambda _
12739 ;; Extend PYTHONPATH so the built package will be found.
12740 (setenv "PYTHONPATH"
12741 (string-append (getcwd) "/build/lib:"
12742 (getenv "PYTHONPATH")))
12743 (zero? (system* "py.test" "-vv" )))))))
12744 (native-inputs
12745 `(("python-pytest" ,python-pytest)))
12746 (home-page
12747 "https://github.com/jamesturk/validictory")
12748 (synopsis "General purpose Python data validator")
12749 (description "It allows validation of arbitrary Python data structures.
12750
12751 The schema format is based on the JSON Schema
12752 proposal (http://json-schema.org), so combined with json the library is also
12753 useful as a validator for JSON data.")
12754 (license license:expat)))
12755
12756 (define-public python2-validictory
12757 (package-with-python2 python-validictory))
12758
12759 (define-public python-aniso8601
12760 (package
12761 (name "python-aniso8601")
12762 (version "1.1.0")
12763 (source
12764 (origin
12765 (method url-fetch)
12766 (uri (pypi-uri "aniso8601" version))
12767 (sha256
12768 (base32
12769 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12770 (build-system python-build-system)
12771 (propagated-inputs
12772 `(("python-dateutil" ,python-dateutil)))
12773 (home-page
12774 "https://bitbucket.org/nielsenb/aniso8601")
12775 (synopsis
12776 "Python library for parsing ISO 8601 strings")
12777 (description
12778 "This package contains a library for parsing ISO 8601 datetime strings.")
12779 (license license:bsd-3)))
12780
12781 (define-public python-flask-restful
12782 (package
12783 (name "python-flask-restful")
12784 (version "0.3.5")
12785 (source
12786 (origin
12787 (method url-fetch)
12788 (uri (pypi-uri "Flask-RESTful" version))
12789 (sha256
12790 (base32
12791 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12792 (build-system python-build-system)
12793 (propagated-inputs
12794 `(("python-aniso8601" ,python-aniso8601)
12795 ("python-flask" ,python-flask)
12796 ("python-pycrypto" ,python-pycrypto)
12797 ("python-pytz" ,python-pytz)))
12798 (native-inputs
12799 `(;; Optional dependency of Flask. Tests need it.
12800 ("python-blinker" ,python-blinker)
12801 ("python-mock" ,python-mock) ; For tests
12802 ("python-nose" ,python-nose) ; For tests
12803 ("python-sphinx" ,python-sphinx)))
12804 (home-page
12805 "https://www.github.com/flask-restful/flask-restful/")
12806 (synopsis
12807 "Flask module for creating REST APIs")
12808 (description
12809 "This package contains a Flask module for creating REST APIs.")
12810 (license license:bsd-3)))
12811
12812 (define-public python-flask-basicauth
12813 (package
12814 (name "python-flask-basicauth")
12815 (version "0.2.0")
12816 (source
12817 (origin
12818 (method url-fetch)
12819 (uri (pypi-uri "Flask-BasicAuth" version))
12820 (sha256
12821 (base32
12822 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12823 (build-system python-build-system)
12824 (propagated-inputs
12825 `(("python-flask" ,python-flask)))
12826 (home-page
12827 "https://github.com/jpvanhal/flask-basicauth")
12828 (synopsis
12829 "HTTP basic access authentication for Flask")
12830 (description
12831 "This package provides HTTP basic access authentication for Flask.")
12832 (license license:bsd-3)))
12833
12834 (define-public python-flask-sqlalchemy
12835 (package
12836 (name "python-flask-sqlalchemy")
12837 (version "2.1")
12838 (source
12839 (origin
12840 (method url-fetch)
12841 (uri (pypi-uri "Flask-SQLAlchemy" version))
12842 (sha256
12843 (base32
12844 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12845 (build-system python-build-system)
12846 (propagated-inputs
12847 `(("python-flask" ,python-flask)
12848 ("python-sqlalchemy" ,python-sqlalchemy)))
12849 (home-page
12850 "http://github.com/mitsuhiko/flask-sqlalchemy")
12851 (synopsis
12852 "Module adding SQLAlchemy support to your Flask application")
12853 (description
12854 "This package adds SQLAlchemy support to your Flask application.")
12855 (license license:bsd-3)))
12856
12857 (define-public python-pyev
12858 (package
12859 (name "python-pyev")
12860 (version "0.9.0")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "pyev" version))
12865 (sha256
12866 (base32
12867 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12868 (build-system python-build-system)
12869 (arguments
12870 `(#:tests? #f ; no test suite
12871 #:phases
12872 (modify-phases %standard-phases
12873 (add-after 'unpack 'patch
12874 (lambda* (#:key inputs #:allow-other-keys)
12875 (let ((libev (string-append (assoc-ref inputs "libev")
12876 "/lib/libev.so.4")))
12877 (substitute* "setup.py"
12878 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12879 (string-append "libev_dll_name = \"" libev "\"")))))))))
12880 (inputs
12881 `(("libev" ,libev)))
12882 (home-page "http://pythonhosted.org/pyev/")
12883 (synopsis "Python libev interface")
12884 (description "Pyev provides a Python interface to libev.")
12885 (license license:gpl3)))
12886
12887 (define-public python2-pyev
12888 (package-with-python2 python-pyev))
12889
12890 (define-public python-imagesize
12891 (package
12892 (name "python-imagesize")
12893 (version "0.7.1")
12894 (source
12895 (origin
12896 (method url-fetch)
12897 (uri (pypi-uri "imagesize" version))
12898 (sha256
12899 (base32
12900 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12901 (build-system python-build-system)
12902 (arguments
12903 '(;; Test files are not distributed on PyPi:
12904 ;; https://github.com/shibukawa/imagesize_py/issues/7
12905 #:tests? #f))
12906 (home-page "https://github.com/shibukawa/imagesize_py")
12907 (synopsis "Gets image size of files in variaous formats in Python")
12908 (description
12909 "This package allows determination of image size from
12910 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12911 (license license:expat)))
12912
12913 (define-public python2-imagesize
12914 (package-with-python2 python-imagesize))
12915
12916 (define-public python-axolotl-curve25519
12917 (package
12918 (name "python-axolotl-curve25519")
12919 (version "0.1")
12920 (source
12921 (origin
12922 (method git-fetch)
12923 (uri (git-reference
12924 (url "git://github.com/tgalal/python-axolotl-curve25519")
12925 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12926 (file-name (string-append name "-" version "-checkout"))
12927 (sha256
12928 (base32
12929 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12930 (build-system python-build-system)
12931 (arguments
12932 `(;; Prevent creation of the egg. This works around
12933 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12934 #:configure-flags '("--root=/")))
12935 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12936 (synopsis "Python wrapper for curve25519 library")
12937 (description "This is a python wrapper for the curve25519 library
12938 with ed25519 signatures. The C code was pulled from
12939 libaxolotl-android. At the moment this wrapper is meant for use by
12940 python-axolotl.")
12941 (license (list license:gpl3 ; Most files
12942 license:bsd-3)))) ; curve/curve25519-donna.c
12943
12944 (define-public python2-axolotl-curve25519
12945 (package-with-python2 python-axolotl-curve25519))
12946
12947 (define-public python-axolotl
12948 (package
12949 (name "python-axolotl")
12950 (version "0.1.35")
12951 (source
12952 (origin
12953 (method url-fetch)
12954 (uri (string-append
12955 "https://github.com/tgalal/python-axolotl/archive/"
12956 version ".tar.gz"))
12957 (file-name (string-append name "-" version ".tar.gz"))
12958 (sha256
12959 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12960 (build-system python-build-system)
12961 (arguments
12962 `(#:phases
12963 (modify-phases %standard-phases
12964 ;; Don't install tests
12965 (add-before 'install 'remove-tests
12966 (lambda _
12967 (for-each delete-file-recursively
12968 '("axolotl/tests" "build/lib/axolotl/tests"))
12969 #t)))))
12970 (propagated-inputs
12971 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12972 ("python-dateutil" ,python-dateutil)
12973 ("python-protobuf" ,python-protobuf)
12974 ("python-pycrypto" ,python-pycrypto)))
12975 (home-page "https://github.com/tgalal/python-axolotl")
12976 (synopsis "Python port of libaxolotl-android")
12977 (description "This is a python port of libaxolotl-android. This
12978 is a ratcheting forward secrecy protocol that works in synchronous and
12979 asynchronous messaging environments.")
12980 (license license:gpl3)))
12981
12982 (define-public python2-axolotl
12983 (package-with-python2 python-axolotl))
12984
12985 (define-public python-termstyle
12986 (package
12987 (name "python-termstyle")
12988 (version "0.1.11")
12989 (source
12990 (origin
12991 (method url-fetch)
12992 (uri (pypi-uri "termstyle" version))
12993 (sha256
12994 (base32
12995 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12996 (build-system python-build-system)
12997 (arguments
12998 '(#:phases
12999 (modify-phases %standard-phases
13000 (replace 'check
13001 (lambda _
13002 (zero? (system* "python" "test3.py")))))))
13003 (home-page "http://github.com/gfxmonk/termstyle")
13004 (synopsis "Console text coloring for Python")
13005 (description "This package provides console text coloring for Python.")
13006 (license license:bsd-3)))
13007
13008 (define-public python-rednose
13009 (package
13010 (name "python-rednose")
13011 (version "1.2.1")
13012 (source
13013 (origin
13014 (method url-fetch)
13015 (uri (pypi-uri "rednose" version))
13016 (sha256
13017 (base32
13018 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13019 (build-system python-build-system)
13020 (arguments
13021 `(#:phases
13022 (modify-phases %standard-phases
13023 (add-after 'unpack 'fix-deps
13024 (lambda _
13025 ;; See <https://github.com/JBKahn/rednose/issues/12>
13026 (substitute* "setup.py"
13027 (("python-termstyle") "termstyle"))
13028 #t)))))
13029 (propagated-inputs
13030 `(("python-colorama" ,python-colorama)
13031 ("python-termstyle" ,python-termstyle)))
13032 (native-inputs
13033 `(("python-six" ,python-six)
13034 ("python-nose" ,python-nose)))
13035 (home-page "https://github.com/JBKahn/rednose")
13036 (synopsis "Colored output for Python nosetests")
13037 (description "This package provides colored output for the
13038 @command{nosetests} command of the Python Nose unit test framework.")
13039 (license license:bsd-3)))
13040
13041 (define-public python-flask-restplus
13042 (package
13043 (name "python-flask-restplus")
13044 (version "0.9.2")
13045 (source
13046 (origin
13047 (method url-fetch)
13048 (uri (pypi-uri "flask-restplus" version))
13049 (sha256
13050 (base32
13051 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13052 (build-system python-build-system)
13053 (arguments
13054 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13055 ;; #:phases
13056 ;; (modify-phases %standard-phases
13057 ;; (replace 'check
13058 ;; (lambda _
13059 ;; (zero? (system* "nosetests")))))))
13060 (propagated-inputs
13061 `(("python-aniso8601" ,python-aniso8601)
13062 ("python-flask" ,python-flask)
13063 ("python-jsonschema" ,python-jsonschema)
13064 ("python-pytz" ,python-pytz)
13065 ("python-six" ,python-six)))
13066 (native-inputs
13067 `(("python-tzlocal" ,python-tzlocal)
13068 ("python-blinker" ,python-blinker)
13069 ("python-nose" ,python-nose)
13070 ("python-rednose" ,python-rednose)))
13071 (home-page "https://github.com/noirbizarre/flask-restplus")
13072 (synopsis "Framework for documented API development with Flask")
13073 (description "This package provides a framework for API development with
13074 the Flask web framework in Python. It is similar to package
13075 @code{python-flask-restful} but supports the @code{python-swagger}
13076 documentation builder.")
13077 (license license:expat)))
13078
13079 (define-public python-sadisplay
13080 (package
13081 (name "python-sadisplay")
13082 (version "0.4.6")
13083 (source
13084 (origin
13085 (method url-fetch)
13086 (uri (pypi-uri "sadisplay" version))
13087 (sha256
13088 (base32
13089 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13090 (build-system python-build-system)
13091 (propagated-inputs
13092 `(("python-sqlalchemy" ,python-sqlalchemy)))
13093 (native-inputs
13094 `(("python-nose" ,python-nose)))
13095 (home-page "https://bitbucket.org/estin/sadisplay")
13096 (synopsis "SQLAlchemy schema displayer")
13097 (description "This package provides a program to build Entity
13098 Relationship diagrams from a SQLAlchemy model (or directly from the
13099 database).")
13100 (license license:bsd-3)))
13101
13102 (define-public python2-sadisplay
13103 (package-with-python2 python-sadisplay))
13104
13105 (define-public python-flask-restful-swagger
13106 (package
13107 (name "python-flask-restful-swagger")
13108 (version "0.19")
13109 (source
13110 (origin
13111 (method url-fetch)
13112 (uri (pypi-uri "flask-restful-swagger" version))
13113 (sha256
13114 (base32
13115 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13116 (build-system python-build-system)
13117 (propagated-inputs
13118 `(("python-flask-restful" ,python-flask-restful)))
13119 (home-page "https://github.com/rantav/flask-restful-swagger")
13120 (synopsis "Extract Swagger specs from Flask-Restful projects")
13121 (description "This package lets you extract Swagger API documentation
13122 specs from your Flask-Restful projects.")
13123 (license license:expat)))
13124
13125 (define-public python2-flask-restful-swagger
13126 (package-with-python2 python-flask-restful-swagger))
13127
13128 (define-public python-argcomplete
13129 (package
13130 (name "python-argcomplete")
13131 (version "1.7.0")
13132 (source
13133 (origin
13134 (method url-fetch)
13135 (uri (pypi-uri "argcomplete" version))
13136 (sha256
13137 (base32
13138 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13139 (build-system python-build-system)
13140 (native-inputs
13141 `(("python-pexpect" ,python-pexpect)
13142 ("tcsh" ,tcsh)))
13143 (home-page "https://github.com/kislyuk/argcomplete")
13144 (synopsis "Shell tab completion for Python argparse")
13145 (description "argcomplete provides extensible command line tab completion
13146 of arguments and options for Python scripts using @code{argparse}. It's
13147 particularly useful for programs with many options or sub-parsers that can
13148 dynamically suggest completions; for example, when browsing resources over the
13149 network.")
13150 (license license:asl2.0)))
13151
13152 (define-public python2-argcomplete
13153 (package-with-python2 python-argcomplete))
13154
13155 (define-public python-xopen
13156 (package
13157 (name "python-xopen")
13158 (version "0.1.1")
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "xopen" version))
13163 (sha256
13164 (base32
13165 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13166 (file-name (string-append name "-" version ".tar.gz"))))
13167 (build-system python-build-system)
13168 (home-page "https://github.com/marcelm/xopen/")
13169 (synopsis "Open compressed files transparently")
13170 (description "This module provides an @code{xopen} function that works like
13171 Python's built-in @code{open} function, but can also deal with compressed files.
13172 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13173 recognized by their file extensions. The focus is on being as efficient as
13174 possible on all supported Python versions.")
13175 (license license:expat)))
13176
13177 (define-public python2-xopen
13178 (package-with-python2 python-xopen))
13179
13180 (define-public python2-cheetah
13181 (package
13182 (name "python2-cheetah")
13183 (version "2.4.4")
13184 (source
13185 (origin
13186 (method url-fetch)
13187 (uri (pypi-uri "Cheetah" version))
13188 (sha256
13189 (base32
13190 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13191 (build-system python-build-system)
13192 (arguments
13193 `(#:python ,python-2))
13194 (propagated-inputs
13195 `(("python2-markdown" ,python2-markdown)))
13196 (home-page "https://pythonhosted.org/Cheetah/")
13197 (synopsis "Template engine")
13198 (description "Cheetah is a text-based template engine and Python code
13199 generator.
13200
13201 Cheetah can be used as a standalone templating utility or referenced as
13202 a library from other Python applications. It has many potential uses,
13203 but web developers looking for a viable alternative to ASP, JSP, PHP and
13204 PSP are expected to be its principle user group.
13205
13206 Features:
13207 @enumerate
13208 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13209 text-based format.
13210 @item Cleanly separates content, graphic design, and program code.
13211 @item Blends the power and flexibility of Python with a simple template language
13212 that non-programmers can understand.
13213 @item Gives template writers full access to any Python data structure, module,
13214 function, object, or method in their templates.
13215 @item Makes code reuse easy by providing an object-orientated interface to
13216 templates that is accessible from Python code or other Cheetah templates.
13217 One template can subclass another and selectively reimplement sections of it.
13218 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13219 improve the performance of a dynamic website.
13220 @item Compiles templates into optimized, yet readable, Python code.
13221 @end enumerate")
13222 (license (license:x11-style "file://LICENSE"))))
13223
13224 (define-public python-dulwich
13225 (package
13226 (name "python-dulwich")
13227 (version "0.16.3")
13228 (source
13229 (origin
13230 (method url-fetch)
13231 (uri (list (string-append "https://www.dulwich.io/releases/"
13232 "dulwich-" version ".tar.gz")
13233 (pypi-uri "dulwich" version)))
13234 (sha256
13235 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13236 (build-system python-build-system)
13237 (arguments
13238 `(#:phases
13239 (modify-phases %standard-phases
13240 (add-before 'check 'fix-tests
13241 (lambda* (#:key inputs #:allow-other-keys)
13242 ;; The tests use Popen with a custom environment which doesn't
13243 ;; include PATH.
13244 (substitute* "dulwich/tests/compat/utils.py"
13245 (("'git'") (string-append "'"
13246 (which "git")
13247 "'")))
13248 (substitute* '("dulwich/tests/test_repository.py"
13249 "dulwich/tests/test_hooks.py")
13250 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13251 (setenv "TEST_RUNNER" "unittest")
13252 (setenv "PYTHONHASHSEED" "random")
13253 #t)))))
13254 (propagated-inputs
13255 `(("python-fastimport" ,python-fastimport)))
13256 (native-inputs
13257 `(("python-mock" ,python-mock)
13258 ("python-geventhttpclient" ,python-geventhttpclient)
13259 ("git" ,git)))
13260 (home-page "https://www.dulwich.io/")
13261 (synopsis "Git implementation in Python")
13262 (description "Dulwich is an implementation of the Git file formats and
13263 protocols written in pure Python.")
13264 ;; Can be used with either license.
13265 (license (list license:asl2.0 license:gpl2+))))
13266
13267 (define-public python2-dulwich
13268 (package-with-python2 python-dulwich))
13269
13270 (define-public python-pbkdf2
13271 (package
13272 (name "python-pbkdf2")
13273 (version "1.3")
13274 (source
13275 (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "pbkdf2" version))
13278 (sha256
13279 (base32
13280 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13281 (build-system python-build-system)
13282 (arguments
13283 '(#:phases
13284 (modify-phases %standard-phases
13285 (replace 'check
13286 (lambda _
13287 (setenv "PYTHONPATH"
13288 (string-append (getcwd) "/build/lib:"
13289 (getenv "PYTHONPATH")))
13290 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13291 (propagated-inputs
13292 `(("python-pycrypto" ,python-pycrypto))) ; optional
13293 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13294 (synopsis "Password-based key derivation")
13295 (description "This module implements the password-based key derivation
13296 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13297
13298 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13299 is part of the RSA Public Key Cryptography Standards series. The provided
13300 implementation takes a password or a passphrase and a salt value (and
13301 optionally a iteration count, a digest module, and a MAC module) and provides
13302 a file-like object from which an arbitrarly-sized key can be read.")
13303 (license license:expat)))
13304
13305 (define-public python2-pbkdf2
13306 (package-with-python2 python-pbkdf2))
13307
13308 (define-public python-qrcode
13309 (package
13310 (name "python-qrcode")
13311 (version "5.3")
13312 (source
13313 (origin
13314 (method url-fetch)
13315 (uri (pypi-uri "qrcode" version))
13316 (sha256
13317 (base32
13318 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13319 (build-system python-build-system)
13320 (arguments
13321 ;; FIXME: Tests require packaging 'pymaging'.
13322 '(#:tests? #f))
13323 (propagated-inputs
13324 `(("python-lxml" ,python-lxml) ; for SVG output
13325 ("python-pillow" ,python-pillow) ; for PNG output
13326 ("python-six" ,python-six)))
13327 (home-page "https://github.com/lincolnloop/python-qrcode")
13328 (synopsis "QR Code image generator")
13329 (description "This package provides a pure Python QR Code generator
13330 module. It uses the Python Imaging Library (PIL) to allow for the generation
13331 of QR Codes.
13332
13333 In addition this package provides a command line tool to generate QR codes and
13334 either write these QR codes to a file or do the output as ascii art at the
13335 console.")
13336 (license license:bsd-3)))
13337
13338 (define-public python2-qrcode
13339 (package-with-python2 python-qrcode))
13340
13341 ;; SlowAES isn't compatible with Python 3.
13342 (define-public python2-slowaes
13343 (package
13344 (name "python2-slowaes")
13345 (version "0.1a1")
13346 (source
13347 (origin
13348 (method url-fetch)
13349 (uri (pypi-uri "slowaes" version))
13350 (sha256
13351 (base32
13352 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13353 (build-system python-build-system)
13354 (arguments `(#:python ,python-2))
13355 (home-page "http://code.google.com/p/slowaes/")
13356 (synopsis "Implementation of AES in Python")
13357 (description "This package contains an implementation of AES in Python.
13358 This implementation is slow (hence the project name) but still useful when
13359 faster ones are not available.")
13360 (license license:asl2.0)))
13361
13362 (define-public python-rst2ansi
13363 (package
13364 (name "python-rst2ansi")
13365 (version "0.1.5")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "rst2ansi" version))
13370 (sha256
13371 (base32
13372 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13373 (build-system python-build-system)
13374 (propagated-inputs
13375 `(("python-docutils" ,python-docutils)))
13376 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13377 (synopsis "Convert RST to ANSI-decorated console output")
13378 (description
13379 "Python module dedicated to rendering RST (reStructuredText) documents
13380 to ansi-escaped strings suitable for display in a terminal.")
13381 (license license:expat)))
13382
13383 (define-public python-ddt
13384 (package
13385 (name "python-ddt")
13386 (version "1.1.1")
13387 (source
13388 (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "ddt" version))
13391 (sha256
13392 (base32
13393 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13394 (build-system python-build-system)
13395 (native-inputs
13396 `(("python-mock" ,python-mock)
13397 ("python-nose" ,python-nose)))
13398 (propagated-inputs
13399 `(("python-six" ,python-six)
13400 ("python-pyyaml" ,python-pyyaml)))
13401 (home-page "https://github.com/txels/ddt")
13402 (synopsis "Data-Driven Tests")
13403 (description
13404 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13405 it with different test data, and make it appear as multiple test cases.")
13406 (license license:expat)))
13407
13408 (define-public python2-ddt
13409 (package-with-python2 python-ddt))
13410
13411 (define-public python-pycosat
13412 (package
13413 (name "python-pycosat")
13414 (version "0.6.1")
13415 (source
13416 (origin
13417 (method url-fetch)
13418 (uri (pypi-uri "pycosat" version))
13419 (sha256
13420 (base32
13421 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13422 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13423 (build-system python-build-system)
13424 (home-page "https://github.com/ContinuumIO/pycosat")
13425 (synopsis "Bindings to picosat (a SAT solver)")
13426 (description
13427 "This package provides efficient Python bindings to @code{picosat} on
13428 the C level. When importing pycosat, the @code{picosat} solver becomes part
13429 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13430 Problem} (SAT) solver.")
13431 (license license:expat)))
13432
13433 (define-public python2-pycosat
13434 (package-with-python2 python-pycosat))
13435
13436 (define-public python2-ruamel.ordereddict
13437 (package
13438 (name "python2-ruamel.ordereddict")
13439 (version "0.4.9")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "ruamel.ordereddict" version))
13444 (sha256
13445 (base32
13446 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13447 (build-system python-build-system)
13448 (arguments
13449 `(#:python ,python-2
13450 #:phases
13451 (modify-phases %standard-phases
13452 (delete 'check)
13453 (add-after 'install 'check
13454 (lambda* (#:key inputs outputs #:allow-other-keys)
13455 (add-installed-pythonpath inputs outputs)
13456 (zero? (system* "python" "test/testordereddict.py")))))))
13457 (home-page "https://bitbucket.org/ruamel/ordereddict")
13458 (synopsis "Version of dict that keeps keys in insertion order")
13459 (description
13460 "This is an implementation of an ordered dictionary with @dfn{Key
13461 Insertion Order} (KIO: updates of values do not affect the position of the
13462 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13463 removed and put at the back). The standard library module @code{OrderedDict},
13464 implemented later, implements a subset of @code{ordereddict} functionality.
13465 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13466 Order} (KSO, no sorting function can be specified, but a transform can be
13467 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13468 (license license:expat)))
13469
13470 (define-public python-pypeg2
13471 (package
13472 (name "python-pypeg2")
13473 (version "2.15.2")
13474 (source
13475 (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "pyPEG2" version))
13478 (sha256
13479 (base32
13480 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13481 (build-system python-build-system)
13482 (propagated-inputs `(("python-lxml" ,python-lxml)))
13483 (arguments
13484 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13485 '(#:tests? #f))
13486 (home-page "https://fdik.org/pyPEG/")
13487 (synopsis "Parsering Expression Grammars in Python")
13488 (description "PyPEG is an intrinsic parser interpreter framework for
13489 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13490 parse many formal languages.")
13491 (license license:gpl2)))