gnu: python-pandas: Fix build on 32-bit.
[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 (patches
1176 (search-patches "python-pandas-skip-failing-tests.patch"))))
1177 (build-system python-build-system)
1178 (propagated-inputs
1179 `(("python-numpy" ,python-numpy)
1180 ("python-pytz" ,python-pytz)
1181 ("python-dateutil" ,python-dateutil)))
1182 (native-inputs
1183 `(("python-nose" ,python-nose)
1184 ("python-cython" ,python-cython)))
1185 (home-page "http://pandas.pydata.org")
1186 (synopsis "Data structures for data analysis, time series, and statistics")
1187 (description
1188 "Pandas is a Python package providing fast, flexible, and expressive data
1189 structures designed to make working with structured (tabular,
1190 multidimensional, potentially heterogeneous) and time series data both easy
1191 and intuitive. It aims to be the fundamental high-level building block for
1192 doing practical, real world data analysis in Python.")
1193 (license license:bsd-3)))
1194
1195 (define-public python2-pandas
1196 (package-with-python2 python-pandas))
1197
1198 (define-public python-tzlocal
1199 (package
1200 (name "python-tzlocal")
1201 (version "1.2.2")
1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (pypi-uri "tzlocal" version))
1206 (sha256
1207 (base32
1208 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1209 (build-system python-build-system)
1210 (propagated-inputs
1211 `(("python-pytz" ,python-pytz)))
1212 (home-page "https://github.com/regebro/tzlocal")
1213 (synopsis
1214 "Local timezone information for Python")
1215 (description
1216 "Tzlocal returns a tzinfo object with the local timezone information.
1217 This module attempts to fix a glaring hole in pytz, that there is no way to
1218 get the local timezone information, unless you know the zoneinfo name, and
1219 under several distributions that's hard or impossible to figure out.")
1220 (license license:cc0)))
1221
1222 (define-public python2-pysqlite
1223 (package
1224 (name "python2-pysqlite")
1225 (version "2.8.3")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "pysqlite" version))
1230 (sha256
1231 (base32
1232 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1233 (build-system python-build-system)
1234 (inputs
1235 `(("sqlite" ,sqlite)))
1236 (arguments
1237 `(#:python ,python-2 ; incompatible with Python 3
1238 #:tests? #f)) ; no test target
1239 (home-page "http://github.com/ghaering/pysqlite")
1240 (synopsis "SQLite bindings for Python")
1241 (description
1242 "Pysqlite provides SQLite bindings for Python that comply to the
1243 Database API 2.0T.")
1244 (license license:zlib)))
1245
1246
1247 (define-public python2-mechanize
1248 (package
1249 (name "python2-mechanize")
1250 (version "0.2.5")
1251 (source
1252 (origin
1253 (method url-fetch)
1254 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1255 version ".tar.gz"))
1256 (sha256
1257 (base32
1258 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1259 (build-system python-build-system)
1260 (arguments
1261 `(#:python ,python-2 ; apparently incompatible with Python 3
1262 #:tests? #f))
1263 ;; test fails with message
1264 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1265 ;; (python-3.3.2) or
1266 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1267 ;; (python-2.7.5).
1268 ;; The source code is from March 2011 and probably not up-to-date
1269 ;; with respect to python unit tests.
1270 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1271 (synopsis
1272 "Stateful programmatic web browsing in Python")
1273 (description
1274 "Mechanize implements stateful programmatic web browsing in Python,
1275 after Andy Lester’s Perl module WWW::Mechanize.")
1276 (license (license:non-copyleft
1277 "file://COPYING"
1278 "See COPYING in the distribution."))))
1279
1280
1281 (define-public python-simplejson
1282 (package
1283 (name "python-simplejson")
1284 (version "3.10.0")
1285 (source
1286 (origin
1287 (method url-fetch)
1288 (uri (pypi-uri "simplejson" version))
1289 (sha256
1290 (base32
1291 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1292 (build-system python-build-system)
1293 (home-page "http://simplejson.readthedocs.org/en/latest/")
1294 (synopsis
1295 "Json library for Python")
1296 (description
1297 "JSON (JavaScript Object Notation) is a subset of JavaScript
1298 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1299 format.
1300
1301 Simplejson exposes an API familiar to users of the standard library marshal
1302 and pickle modules. It is the externally maintained version of the json
1303 library contained in Python 2.6, but maintains compatibility with Python 2.5
1304 and (currently) has significant performance advantages, even without using
1305 the optional C extension for speedups. Simplejson is also supported on
1306 Python 3.3+.")
1307 (license license:x11)))
1308
1309 (define-public python2-simplejson
1310 (package-with-python2 python-simplejson))
1311
1312
1313 (define-public python-pyicu
1314 (package
1315 (name "python-pyicu")
1316 (version "1.9.5")
1317 (source
1318 (origin
1319 (method url-fetch)
1320 (uri (pypi-uri "PyICU" version))
1321 (sha256
1322 (base32
1323 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1324 (build-system python-build-system)
1325 (arguments
1326 '(#:phases
1327 (modify-phases %standard-phases
1328 (add-before 'check 'delete-failing-test
1329 (lambda _
1330 ;; XXX: These tests require locales that are unavailable
1331 ;; in the build environment.
1332 (delete-file "test/test_DateTimeParserGenerator.py")
1333 #t)))))
1334 (inputs
1335 `(("icu4c" ,icu4c)))
1336 (home-page "http://pyicu.osafoundation.org/")
1337 (synopsis "Python extension wrapping the ICU C++ API")
1338 (description
1339 "PyICU is a python extension wrapping the ICU C++ API.")
1340 (license license:x11)))
1341
1342 (define-public python2-pyicu
1343 (package-with-python2 python-pyicu))
1344
1345 (define-public python2-dogtail
1346 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1347 ;; spaces in indentation" with Python 3.
1348 (package
1349 (name "python2-dogtail")
1350 (version "0.8.2")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append
1354 "https://fedorahosted.org/released/dogtail/dogtail-"
1355 version ".tar.gz"))
1356 (sha256
1357 (base32
1358 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1359 (build-system python-build-system)
1360 (arguments `(#:python ,python-2
1361 #:tests? #f)) ; invalid command "test"
1362 (home-page "https://fedorahosted.org/dogtail/")
1363 (synopsis "GUI test tool and automation framework written in Python")
1364 (description
1365 "Dogtail is a GUI test tool and automation framework written in Python.
1366 It uses Accessibility (a11y) technologies to communicate with desktop
1367 applications. dogtail scripts are written in Python and executed like any
1368 other Python program.")
1369 (license license:gpl2+)))
1370
1371 (define-public python2-empy
1372 (package
1373 (name "python2-empy")
1374 (version "3.3")
1375 (source (origin
1376 (method url-fetch)
1377 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1378 version ".tar.gz"))
1379 (sha256
1380 (base32
1381 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1382 (build-system python-build-system)
1383 (arguments
1384 `(#:python ,python-2
1385 #:phases (alist-replace
1386 'check
1387 (lambda _
1388 (zero? (system* "./test.sh")))
1389 %standard-phases)))
1390 (home-page "http://www.alcyone.com/software/empy/")
1391 (synopsis "Templating system for Python")
1392 (description
1393 "EmPy is a system for embedding Python expressions and statements in
1394 template text; it takes an EmPy source file, processes it, and produces
1395 output. This is accomplished via expansions, which are special signals to the
1396 EmPy system and are set off by a special prefix (by default the at sign, @@).
1397 EmPy can expand arbitrary Python expressions and statements in this way, as
1398 well as a variety of special forms. Textual data not explicitly delimited in
1399 this way is sent unaffected to the output, allowing Python to be used in
1400 effect as a markup language. Also supported are callbacks via hooks,
1401 recording and playback via diversions, and dynamic, chainable filters. The
1402 system is highly configurable via command line options and embedded
1403 commands.")
1404 (license license:lgpl2.1+)))
1405
1406 (define-public python2-element-tree
1407 (package
1408 (name "python2-element-tree")
1409 (version "1.2.6")
1410 (source (origin
1411 (method url-fetch)
1412 (uri (string-append
1413 "http://effbot.org/media/downloads/elementtree-"
1414 version "-20050316.tar.gz"))
1415 (sha256
1416 (base32
1417 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1418 (build-system python-build-system)
1419 (arguments
1420 `(#:python ,python-2 ; seems to be part of Python 3
1421 #:tests? #f)) ; no 'test' sub-command
1422 (synopsis "Toolkit for XML processing in Python")
1423 (description
1424 "ElementTree is a Python library supporting lightweight XML processing.")
1425 (home-page "http://effbot.org/zone/element-index.htm")
1426 (license (license:x11-style
1427 "http://docs.python.org/2/license.html"
1428 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1429
1430 (define-public python2-pybugz
1431 (package
1432 (name "python2-pybugz")
1433 (version "0.6.11")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (string-append
1437 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1438 version ".tar.gz"))
1439 (sha256
1440 (base32
1441 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1442 (patches (search-patches "pybugz-stty.patch"
1443 "pybugz-encode-error.patch"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:python ,python-2 ; SyntaxError with Python 3
1447 #:tests? #f)) ; no 'test' sub-command
1448 (propagated-inputs
1449 `(("element-tree" ,python2-element-tree)))
1450 (synopsis "Python and command-line interface to Bugzilla")
1451 (description
1452 "PyBugz is a Python library and command-line tool to query the Bugzilla
1453 bug tracking system. It is meant as an aid to speed up interaction with the
1454 bug tracker.")
1455 (home-page "http://www.liquidx.net/pybugz/")
1456 (license license:gpl2)))
1457
1458 (define-public python-enum34
1459 (package
1460 (name "python-enum34")
1461 (version "1.1.0")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "enum34" version))
1466 (sha256
1467 (base32
1468 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1469 (build-system python-build-system)
1470 (arguments
1471 `(#:phases
1472 (alist-replace
1473 'check
1474 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1475 %standard-phases)))
1476 (home-page "https://pypi.python.org/pypi/enum34")
1477 (synopsis "Backported Python 3.4 Enum")
1478 (description
1479 "Enum34 is the new Python stdlib enum module available in Python 3.4
1480 backported for previous versions of Python from 2.4 to 3.3.")
1481 (license license:bsd-3)))
1482
1483 (define-public python2-enum34
1484 (package-with-python2 python-enum34))
1485
1486 (define-public python-parse-type
1487 (package
1488 (name "python-parse-type")
1489 (version "0.3.4")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (string-append "https://pypi.python.org/packages/source/p/"
1494 "parse_type/parse_type-" version ".tar.gz"))
1495 (sha256
1496 (base32
1497 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1498 (build-system python-build-system)
1499 (propagated-inputs
1500 `(("python-six" ,python-six)
1501 ("python-parse" ,python-parse)))
1502 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1503 (home-page "https://github.com/jenisys/parse_type")
1504 (synopsis "Extended parse module")
1505 (description
1506 "Parse_type extends the python parse module.")
1507 (license license:bsd-3)))
1508
1509 (define-public python-parse
1510 (package
1511 (name "python-parse")
1512 (version "1.6.6")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "parse" version))
1517 (sha256
1518 (base32
1519 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1520 (patches (search-patches "python-parse-too-many-fields.patch"))))
1521 (build-system python-build-system)
1522 (arguments
1523 `(#:phases
1524 (modify-phases %standard-phases
1525 (replace 'check
1526 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1527 (home-page "https://github.com/r1chardj0n3s/parse")
1528 (synopsis "Parse strings")
1529 (description
1530 "Parse strings using a specification based on the Python format()
1531 syntax.")
1532 (license license:x11)))
1533
1534 (define-public python-polib
1535 (package
1536 (name "python-polib")
1537 (version "1.0.8")
1538 (source (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "polib" version))
1541 (sha256
1542 (base32
1543 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1544 (build-system python-build-system)
1545 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1546 (synopsis "Manipulate, create and modify gettext files")
1547 (description "Polib can manipulate any gettext format (po, pot and mo)
1548 files. It can be used to create po files from scratch or to modify
1549 existing ones.")
1550 (license license:expat)))
1551
1552 (define-public python2-polib
1553 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1554 (package
1555 (inherit base)
1556 (arguments `(,@(package-arguments base)
1557 ;; Tests don't work with python2.
1558 #:tests? #f)))))
1559
1560 (define-public scons
1561 (package
1562 (name "scons")
1563 (version "2.3.4")
1564 (source (origin
1565 (method url-fetch)
1566 (uri (string-append "mirror://sourceforge/scons/scons/" version
1567 "/scons-" version ".tar.gz"))
1568 (sha256
1569 (base32
1570 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1571 (build-system python-build-system)
1572 (arguments
1573 ;; With Python 3.x, fails to build with a syntax error.
1574 `(#:python ,python-2
1575 #:use-setuptools? #f ; still relies on distutils
1576 #:tests? #f)) ; no 'python setup.py test' command
1577 (home-page "http://scons.org/")
1578 (synopsis "Software construction tool written in Python")
1579 (description
1580 "SCons is a software construction tool. Think of SCons as an improved,
1581 cross-platform substitute for the classic Make utility with integrated
1582 functionality similar to autoconf/automake and compiler caches such as ccache.
1583 In short, SCons is an easier, more reliable and faster way to build
1584 software.")
1585 (license license:x11)))
1586
1587 (define-public python-extras
1588 (package
1589 (name "python-extras")
1590 (version "0.0.3")
1591 (source
1592 (origin
1593 (method url-fetch)
1594 (uri (string-append
1595 "https://pypi.python.org/packages/source/e/extras/extras-"
1596 version ".tar.gz"))
1597 (sha256
1598 (base32
1599 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1600 (build-system python-build-system)
1601 (arguments
1602 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1603 '(#:tests? #f))
1604 (home-page "https://github.com/testing-cabal/extras")
1605 (synopsis "Useful extensions to the Python standard library")
1606 (description
1607 "Extras is a set of extensions to the Python standard library.")
1608 (license license:expat)))
1609
1610 (define-public python2-extras
1611 (package-with-python2 python-extras))
1612
1613 (define-public python-mimeparse
1614 (package
1615 (name "python-mimeparse")
1616 (version "0.1.4")
1617 (source
1618 (origin
1619 (method url-fetch)
1620 (uri (string-append
1621 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1622 version ".tar.gz"))
1623 (sha256
1624 (base32
1625 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1626 (build-system python-build-system)
1627 (arguments
1628 '(#:tests? #f)) ; no setup.py test command
1629 (home-page
1630 "https://github.com/dbtsai/python-mimeparse")
1631 (synopsis "Python library for parsing MIME types")
1632 (description
1633 "Mimeparse provides basic functions for parsing MIME type names and
1634 matching them against a list of media-ranges.")
1635 (license license:expat)))
1636
1637 (define-public python2-mimeparse
1638 (package-with-python2 python-mimeparse))
1639
1640 (define-public python-nose
1641 (package
1642 (name "python-nose")
1643 (version "1.3.7")
1644 (source
1645 (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "nose" version))
1648 (sha256
1649 (base32
1650 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1651 (build-system python-build-system)
1652 (arguments
1653 '(#:tests? #f)) ; FIXME: test suite fails
1654 (home-page "http://readthedocs.org/docs/nose/")
1655 (synopsis "Python testing library")
1656 (description
1657 "Nose extends the unittest library to make testing easier.")
1658 (license license:lgpl2.0+)))
1659
1660 (define-public python2-nose
1661 (package-with-python2 python-nose))
1662
1663 (define-public python-nose2
1664 (package
1665 (name "python-nose2")
1666 (version "0.6.5")
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "nose2" version))
1671 (sha256
1672 (base32
1673 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1674 (build-system python-build-system)
1675 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1676 (propagated-inputs
1677 `(("python-cov-core" ,python-cov-core)
1678 ("python-pytest-cov" ,python-pytest-cov)
1679 ("python-six" ,python-six)))
1680 (home-page "https://github.com/nose-devs/nose2")
1681 (synopsis "Next generation of nicer testing for Python")
1682 (description
1683 "Nose2 is the next generation of nicer testing for Python, based on the
1684 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1685 better plugin api, being easier for users to configure, and simplifying internal
1686 interfaces and processes.")
1687 (license license:bsd-2)))
1688
1689 (define-public python2-nose2
1690 (package-with-python2 python-nose2))
1691
1692 (define-public python-unittest2
1693 (package
1694 (name "python-unittest2")
1695 (version "0.5.1")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (string-append
1700 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1701 version ".tar.gz"))
1702 (sha256
1703 (base32
1704 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1705 (build-system python-build-system)
1706 (home-page "http://pypi.python.org/pypi/unittest2")
1707 (synopsis "Python unit testing library")
1708 (description
1709 "Unittest2 is a replacement for the unittest module in the Python
1710 standard library.")
1711 (license license:psfl)))
1712
1713 (define-public python2-unittest2
1714 (package (inherit python-unittest2)
1715 (name "python2-unittest2")
1716 (version "0.5.1")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (string-append
1721 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1722 version ".tar.gz"))
1723 (sha256
1724 (base32
1725 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1726 (arguments
1727 `(#:python ,python-2
1728 #:tests? #f)))) ; no setup.py test command
1729
1730 (define-public python-pafy
1731 (package
1732 (name "python-pafy")
1733 (version "0.5.2")
1734 (source
1735 (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "pafy" version))
1738 (sha256
1739 (base32
1740 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1741 (build-system python-build-system)
1742 (arguments
1743 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1744 (propagated-inputs
1745 ;; Youtube-dl is a python package which is imported in the file
1746 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1747 `(("youtube-dl" ,youtube-dl)))
1748 (home-page "https://np1.github.io/pafy/")
1749 (synopsis "Retrieve YouTube content and metadata")
1750 (description
1751 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1752 (license license:lgpl3+)))
1753
1754 (define-public python-py
1755 (package
1756 (name "python-py")
1757 (version "1.4.31")
1758 (source
1759 (origin
1760 (method url-fetch)
1761 (uri (pypi-uri "py" version))
1762 (sha256
1763 (base32
1764 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1765 (build-system python-build-system)
1766 (arguments
1767 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1768 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1769 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1770 ;; Is this module globally installed?"
1771 '(#:tests? #f))
1772 (home-page "http://pylib.readthedocs.org/")
1773 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1774 (description
1775 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1776 code introspection, and logging.")
1777 (license license:expat)))
1778
1779 (define-public python2-py
1780 (package-with-python2 python-py))
1781
1782 (define-public python-pytest
1783 (package
1784 (name "python-pytest")
1785 (version "2.7.3")
1786 (source
1787 (origin
1788 (method url-fetch)
1789 (uri (string-append
1790 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1791 version ".tar.gz"))
1792 (sha256
1793 (base32
1794 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1795 (modules '((guix build utils)))
1796 (snippet
1797 ;; One of the tests involves the /usr directory, so it fails.
1798 '(substitute* "testing/test_argcomplete.py"
1799 (("def test_remove_dir_prefix\\(self\\):")
1800 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1801 (build-system python-build-system)
1802 (propagated-inputs
1803 `(("python-py" ,python-py)))
1804 (native-inputs
1805 `(("python-nose" ,python-nose)
1806 ("python-mock" ,python-mock)))
1807 (home-page "http://pytest.org")
1808 (synopsis "Python testing library")
1809 (description
1810 "Pytest is a testing tool that provides auto-discovery of test modules
1811 and functions, detailed info on failing assert statements, modular fixtures,
1812 and many external plugins.")
1813 (license license:expat)))
1814
1815 (define-public python2-pytest
1816 (package-with-python2 python-pytest))
1817
1818 ;; This package is used by Borg until we can upgrade all our Python packages to
1819 ;; use a more recent pytest.
1820 (define-public python-pytest-2.9.2
1821 (package
1822 (inherit python-pytest)
1823 (name "python-pytest")
1824 (version "2.9.2")
1825 (source (origin
1826 (method url-fetch)
1827 (uri (pypi-uri "pytest" version))
1828 (sha256
1829 (base32
1830 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1831 (arguments
1832 `(#:phases
1833 (modify-phases %standard-phases
1834 (add-before 'check 'disable-invalid-test
1835 (lambda _
1836 (substitute* "testing/test_argcomplete.py"
1837 (("def test_remove_dir_prefix" line)
1838 (string-append "@pytest.mark.skip"
1839 "(reason=\"Assumes that /usr exists.\")\n "
1840 line)))
1841 #t)))))))
1842
1843 (define-public python-pytest-cov
1844 (package
1845 (name "python-pytest-cov")
1846 (version "2.2.1")
1847 (source
1848 (origin
1849 (method url-fetch)
1850 (uri (pypi-uri "pytest-cov" version))
1851 (sha256
1852 (base32
1853 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1854 (build-system python-build-system)
1855 (arguments
1856 `(#:phases
1857 (modify-phases %standard-phases
1858 (replace 'check
1859 (lambda _
1860 ;; options taken from tox.ini
1861 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1862 ;; with "Duplicate implicit target name"
1863 (zero? (system* "python" "./setup.py" "check"
1864 "--strict" "--metadata")))))))
1865 (propagated-inputs
1866 `(("python-coverage" ,python-coverage)
1867 ("python-pytest" ,python-pytest)))
1868 (home-page "https://github.com/pytest-dev/pytest-cov")
1869 (synopsis "Pytest plugin for measuring coverage")
1870 (description
1871 "Pytest-cov produces coverage reports. It supports centralised testing and
1872 distributed testing in both @code{load} and @code{each} modes. It also
1873 supports coverage of subprocesses.")
1874 (license license:expat)))
1875
1876 (define-public python2-pytest-cov
1877 (package-with-python2 python-pytest-cov))
1878
1879 (define-public python-pytest-runner
1880 (package
1881 (name "python-pytest-runner")
1882 (version "2.6.2")
1883 (source
1884 (origin
1885 (method url-fetch)
1886 (uri (pypi-uri "pytest-runner" version))
1887 (sha256
1888 (base32
1889 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1890 (build-system python-build-system)
1891 (arguments
1892 `(#:phases
1893 (modify-phases %standard-phases
1894 ;; The fancy way of setting the version with setuptools_scm does not
1895 ;; seem to work here.
1896 (add-after 'unpack 'set-version
1897 (lambda _
1898 (substitute* "docs/conf.py"
1899 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1900 (string-append "version = \"" ,version "\"")))
1901 #t)))))
1902 (native-inputs
1903 `(("python-pytest" ,python-pytest)
1904 ("python-setuptools-scm" ,python-setuptools-scm)))
1905 (home-page "https://github.com/pytest-dev/pytest-runner")
1906 (synopsis "Invoke py.test as a distutils command")
1907 (description
1908 "This package provides a @command{pytest-runner} command that
1909 @file{setup.py} files can use to run tests.")
1910 (license license:expat)))
1911
1912 (define-public python2-pytest-runner
1913 (package-with-python2 python-pytest-runner))
1914
1915 (define-public python-pytest-mock
1916 (package
1917 (name "python-pytest-mock")
1918 (version "1.2")
1919 (source
1920 (origin
1921 (method url-fetch)
1922 (uri (pypi-uri "pytest-mock" version ".zip"))
1923 (sha256
1924 (base32
1925 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1926 (build-system python-build-system)
1927 (native-inputs
1928 `(("unzip" ,unzip)))
1929 (propagated-inputs
1930 `(("python-pytest" ,python-pytest)))
1931 (home-page "https://github.com/pytest-dev/pytest-mock/")
1932 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1933 (description
1934 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1935 around the patching API provided by the @code{mock} package, but with the
1936 benefit of not having to worry about undoing patches at the end of a test.
1937 The mocker fixture has the same API as @code{mock.patch}, supporting the
1938 same arguments.")
1939 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1940 (license license:expat)))
1941
1942 (define-public python2-pytest-mock
1943 (let ((base (package-with-python2
1944 (strip-python2-variant python-pytest-mock))))
1945 (package (inherit base)
1946 (propagated-inputs
1947 `(("python2-mock" ,python2-mock)
1948 ,@(package-propagated-inputs base))))))
1949
1950 (define-public python-pytest-xdist
1951 (package
1952 (name "python-pytest-xdist")
1953 (version "1.14")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (pypi-uri "pytest-xdist" version ".zip"))
1958 (sha256
1959 (base32
1960 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1961 (modules '((guix build utils)))
1962 (snippet
1963 '(begin
1964 ;; Remove pre-compiled .pyc files from source.
1965 (for-each delete-file-recursively
1966 (find-files "." "__pycache__" #:directories? #t))
1967 (for-each delete-file (find-files "." "\\.pyc$"))
1968 #t))))
1969 (build-system python-build-system)
1970 (arguments
1971 '(#:tests? #f)) ;FIXME: Some tests are failing.
1972 ;; #:phases
1973 ;; (modify-phases %standard-phases
1974 ;; (delete 'check)
1975 ;; (add-after 'install 'check
1976 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1977 ;; (add-installed-pythonpath inputs outputs)
1978 ;; (zero? (system* "py.test" "-v")))))
1979 (native-inputs
1980 `(("unzip" ,unzip)
1981 ("python-setuptools-scm" ,python-setuptools-scm)))
1982 (propagated-inputs
1983 `(("python-execnet" ,python-execnet)
1984 ("python-pytest" ,python-pytest)
1985 ("python-py" ,python-py)))
1986 (home-page
1987 "https://github.com/pytest-dev/pytest-xdist")
1988 (synopsis
1989 "Plugin for py.test with distributed testing and loop-on-failing modes")
1990 (description
1991 "The pytest-xdist plugin extends py.test with some unique test execution
1992 modes: parallelization, running tests in boxed subprocesses, the ability
1993 to run tests repeatedly when failed, and the ability to run tests on multiple
1994 Python interpreters or platforms. It uses rsync to copy the existing
1995 program code to a remote location, executes there, and then syncs the
1996 result back.")
1997 (license license:expat)))
1998
1999 (define-public python2-pytest-xdist
2000 (package-with-python2 python-pytest-xdist))
2001
2002 (define-public python-scripttest
2003 (package
2004 (name "python-scripttest")
2005 (version "1.3")
2006 (source
2007 (origin
2008 (method url-fetch)
2009 (uri (string-append
2010 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2011 version ".tar.gz"))
2012 (sha256
2013 (base32
2014 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2015 (build-system python-build-system)
2016 (native-inputs
2017 `(("python-pytest" ,python-pytest)))
2018 (home-page "http://pythonpaste.org/scripttest/")
2019 (synopsis "Python library to test command-line scripts")
2020 (description "Scripttest is a Python helper library for testing
2021 interactive command-line applications. With it you can run a script in a
2022 subprocess and see the output as well as any file modifications.")
2023 (license license:expat)))
2024
2025 (define-public python2-scripttest
2026 (package-with-python2 python-scripttest))
2027
2028 (define-public python-testtools
2029 (package
2030 (name "python-testtools")
2031 (version "1.4.0")
2032 (source
2033 (origin
2034 (method url-fetch)
2035 (uri (pypi-uri "testtools" version))
2036 (sha256
2037 (base32
2038 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2039 (build-system python-build-system)
2040 (arguments
2041 `(#:phases
2042 (modify-phases %standard-phases
2043 (add-after 'unpack 'fix-module-imports
2044 (lambda _
2045 (substitute* "setup.py"
2046 (("'unittest2>=0.8.0',") ""))
2047 (substitute* '("testtools/testcase.py"
2048 "testtools/testsuite.py"
2049 "testtools/run.py"
2050 "testtools/tests/test_run.py"
2051 "testtools/tests/test_testsuite.py"
2052 "testtools/tests/test_deferredruntest.py")
2053 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2054 (("import unittest2 as unittest") "import unittest")
2055 (("import unittest2") "import unittest as unittest2")
2056 (("from unittest2 import") "from unittest import"))
2057 (substitute* "testtools/tests/test_testresult.py"
2058 ;; NUL in source code is not allowed (raises ValueError).
2059 (("\\x00\\x04") "\\x04"))
2060 #t)))))
2061 (propagated-inputs
2062 `(("python-mimeparse" ,python-mimeparse)
2063 ("python-extras" ,python-extras)))
2064 (home-page "https://github.com/testing-cabal/testtools")
2065 (synopsis
2066 "Extensions to the Python standard library unit testing framework")
2067 (description
2068 "Testtools extends the Python standard library unit testing framework to
2069 provide matchers, more debugging information, and cross-Python
2070 compatibility.")
2071 (license license:psfl)))
2072
2073 (define-public python2-testtools
2074 (package-with-python2 python-testtools))
2075
2076 (define-public python-testscenarios
2077 (package
2078 (name "python-testscenarios")
2079 (version "0.4")
2080 (source
2081 (origin
2082 (method url-fetch)
2083 (uri (string-append
2084 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2085 version ".tar.gz"))
2086 (sha256
2087 (base32
2088 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2089 (build-system python-build-system)
2090 (propagated-inputs
2091 `(("python-testtools" ,python-testtools)))
2092 (home-page "https://launchpad.net/testscenarios")
2093 (synopsis "Pyunit extension for dependency injection")
2094 (description
2095 "Testscenarios provides clean dependency injection for Python unittest
2096 style tests.")
2097 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2098
2099 (define-public python2-testscenarios
2100 (package-with-python2 python-testscenarios))
2101
2102 (define-public python-testresources
2103 (package
2104 (name "python-testresources")
2105 (version "0.2.7")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (string-append
2110 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2111 version ".tar.gz"))
2112 (sha256
2113 (base32
2114 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2115 (build-system python-build-system)
2116 (home-page "https://launchpad.net/testresources")
2117 (synopsis
2118 "Pyunit extension for managing test resources")
2119 (description
2120 "Testresources is an extension to Python's unittest to allow declarative
2121 use of resources by test cases.")
2122 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2123
2124 (define-public python2-testresources
2125 (package-with-python2 python-testresources))
2126
2127 (define-public python-subunit
2128 (package
2129 (name "python-subunit")
2130 (version "0.0.21")
2131 (source
2132 (origin
2133 (method url-fetch)
2134 (uri (string-append
2135 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2136 version ".tar.gz"))
2137 (sha256
2138 (base32
2139 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2140 (build-system python-build-system)
2141 (propagated-inputs
2142 `(("python-extras" ,python-extras)
2143 ("python-mimeparse" ,python-mimeparse)))
2144 (native-inputs
2145 `(("python-testscenarios" ,python-testscenarios)))
2146 (home-page "http://launchpad.net/subunit")
2147 (synopsis "Python implementation of the subunit protocol")
2148 (description
2149 "Python-subunit is a Python implementation of the subunit test streaming
2150 protocol.")
2151 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2152
2153 (define-public python2-subunit
2154 (package-with-python2 python-subunit))
2155
2156 ;; Recent versions of python-fixtures and python-testrepository need
2157 ;; python-pbr for packaging, which itself needs these two packages for
2158 ;; testing.
2159 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2160 ;; same source, just without any test dependencies and with tests disabled.
2161 ;; python-pbr-minmal is then used to package python-fixtures and
2162 ;; python-testrepository.
2163 ;; Strictly speaking we currently could remove the test-requirements from the
2164 ;; normal python-pbr package (and save this package) since test are disabled
2165 ;; there anyway. But this may change in future.
2166 (define python-pbr-minimal
2167 (package
2168 (name "python-pbr-minimal")
2169 (version "1.10.0")
2170 (source
2171 (origin
2172 (method url-fetch)
2173 (uri (pypi-uri "pbr" version))
2174 (sha256
2175 (base32
2176 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2177 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2178 (build-system python-build-system)
2179 (arguments
2180 `(#:tests? #f))
2181 (home-page "http://docs.openstack.org/developer/pbr/")
2182 (synopsis "Minimal build of python-pbr used for bootstrapping")
2183 (description
2184 "Used only for bootstrapping python2-pbr, you should not need this.")
2185 (license license:asl2.0)))
2186
2187 (define python2-pbr-minimal
2188 (package-with-python2 python-pbr-minimal))
2189
2190 (define-public python-pbr
2191 (package
2192 (inherit python-pbr-minimal)
2193 (name "python-pbr")
2194 (arguments
2195 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2196 (propagated-inputs
2197 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2198 (native-inputs
2199 `(("python-fixtures" ,python-fixtures)
2200 ;; discover, coverage, hacking, subunit
2201 ("python-mock" ,python-mock)
2202 ("python-six" ,python-six)
2203 ("python-sphinx" ,python-sphinx)
2204 ("python-testrepository" ,python-testrepository)
2205 ("python-testresources" ,python-testresources)
2206 ("python-testscenarios" ,python-testscenarios)
2207 ("python-testtools" ,python-testtools)
2208 ("python-virtualenv" ,python-virtualenv)))
2209 (synopsis "Enhance the default behavior of Python’s setuptools")
2210 (description
2211 "Python Build Reasonableness (PBR) is a library that injects some useful
2212 and sensible default behaviors into your setuptools run. It will set
2213 versions, process requirements files and generate AUTHORS and ChangeLog file
2214 from git information.
2215 ")))
2216
2217 (define-public python2-pbr
2218 (package-with-python2 python-pbr))
2219
2220 (define-public python-fixtures
2221 (package
2222 (name "python-fixtures")
2223 (version "1.4.0")
2224 (source
2225 (origin
2226 (method url-fetch)
2227 (uri (pypi-uri "fixtures" version))
2228 (sha256
2229 (base32
2230 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2231 (build-system python-build-system)
2232 (arguments
2233 '(#:phases
2234 (modify-phases %standard-phases
2235 (replace 'check
2236 (lambda _
2237 (zero? (system* "python" "-m" "testtools.run"
2238 "fixtures.test_suite")))))))
2239 (propagated-inputs
2240 `(("python-six" ,python-six)))
2241 (native-inputs
2242 `(("python-mock" ,python-mock)
2243 ("python-pbr-minimal" ,python-pbr-minimal)
2244 ("python-testtools" ,python-testtools)))
2245 (home-page "https://launchpad.net/python-fixtures")
2246 (synopsis "Python test fixture library")
2247 (description
2248 "Fixtures provides a way to create reusable state, useful when writing
2249 Python tests.")
2250 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2251
2252 (define-public python2-fixtures
2253 (package-with-python2 python-fixtures))
2254
2255 (define-public python-testrepository
2256 (package
2257 (name "python-testrepository")
2258 (version "0.0.20")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (string-append
2263 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2264 version ".tar.gz"))
2265 (sha256
2266 (base32
2267 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2268 (build-system python-build-system)
2269 (arguments
2270 ;; FIXME: Many tests are failing.
2271 '(#:tests? #f))
2272 (propagated-inputs
2273 `(("python-fixtures" ,python-fixtures)
2274 ("python-subunit" ,python-subunit)
2275 ("python-testtools" ,python-testtools)))
2276 (native-inputs
2277 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2278 ("python-mimeparse" ,python-mimeparse)))
2279 (home-page "https://launchpad.net/testrepository")
2280 (synopsis "Database for Python test results")
2281 (description "Testrepository provides a database of test results which can
2282 be used as part of a developer's workflow to check things such as what tests
2283 have failed since the last commit or what tests are currently failing.")
2284 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2285
2286 (define-public python2-testrepository
2287 (package-with-python2 python-testrepository))
2288
2289 (define-public python-coverage
2290 (package
2291 (name "python-coverage")
2292 (version "4.1")
2293 (source
2294 (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "coverage" version))
2297 (sha256
2298 (base32
2299 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2300 (build-system python-build-system)
2301 (arguments
2302 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2303 '(#:tests? #f))
2304 (home-page "http://nedbatchelder.com/code/coverage")
2305 (synopsis "Code coverage measurement for Python")
2306 (description
2307 "Coverage measures code coverage, typically during test execution. It
2308 uses the code analysis tools and tracing hooks provided in the Python standard
2309 library to determine which lines are executable, and which have been
2310 executed.")
2311 (license license:bsd-3)))
2312
2313 (define-public python2-coverage
2314 (package-with-python2 python-coverage))
2315
2316 (define-public python-cov-core
2317 (package
2318 (name "python-cov-core")
2319 (version "1.15.0")
2320 (source
2321 (origin
2322 (method url-fetch)
2323 (uri (pypi-uri "cov-core" version))
2324 (sha256
2325 (base32
2326 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2327 (build-system python-build-system)
2328 (propagated-inputs
2329 `(("python-coverage" ,python-coverage)))
2330 (home-page "https://github.com/schlamar/cov-core")
2331 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2332 (description
2333 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2334 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2335 testing frameworks.")
2336 (license license:expat)))
2337
2338 (define-public python2-cov-core
2339 (package-with-python2 python-cov-core))
2340
2341 (define-public python-discover
2342 (package
2343 (name "python-discover")
2344 (version "0.4.0")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (string-append
2349 "https://pypi.python.org/packages/source/d/discover/discover-"
2350 version ".tar.gz"))
2351 (sha256
2352 (base32
2353 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2354 (build-system python-build-system)
2355 (home-page "http://pypi.python.org/pypi/discover/")
2356 (synopsis
2357 "Python test discovery for unittest")
2358 (description
2359 "Discover provides test discovery for unittest, a feature that has been
2360 backported from Python 2.7 for Python 2.4+.")
2361 (license license:bsd-3)))
2362
2363 (define-public python2-discover
2364 (package-with-python2 python-discover))
2365
2366 (define-public behave
2367 (package
2368 (name "behave")
2369 (version "1.2.5")
2370 (source (origin
2371 (method url-fetch)
2372 (uri (pypi-uri "behave" version ".tar.bz2"))
2373 (sha256
2374 (base32
2375 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2376 (build-system python-build-system)
2377 (propagated-inputs
2378 `(("python-six" ,python-six)
2379 ("python-parse" ,python-parse)
2380 ("python-parse-type" ,python-parse-type)))
2381 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2382 ;PyHamcrest>=1.8
2383 (home-page "http://github.com/behave/behave")
2384 (synopsis "Python behavior-driven development")
2385 (description
2386 "Behave is a tool for behavior-driven development in python.
2387 Behavior-driven development (or BDD) is an agile software development
2388 technique that encourages collaboration between developers, QA and
2389 non-technical or business participants in a software project. Behave uses
2390 tests written in a natural language style, backed up by Python code.")
2391 (license license:x11)))
2392
2393 (define-public python-exif-read
2394 (package
2395 (name "python-exif-read")
2396 (version "2.1.2")
2397 (source (origin
2398 (method url-fetch)
2399 (uri (pypi-uri "ExifRead" version))
2400 (sha256
2401 (base32
2402 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2403 (build-system python-build-system)
2404 (arguments `(#:tests? #f)) ; no tests
2405 (home-page "https://github.com/ianare/exif-py")
2406 (synopsis "Python library to extract EXIF data from image files")
2407 (description
2408 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2409 files.")
2410 (license license:bsd-3)))
2411
2412 (define-public python2-exif-read
2413 (package-with-python2 python-exif-read))
2414
2415 (define-public python-pyld
2416 (package
2417 (name "python-pyld")
2418 (version "0.7.1")
2419 (source (origin
2420 (method url-fetch)
2421 (uri (pypi-uri "PyLD" version))
2422 (sha256
2423 (base32
2424 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2425 (build-system python-build-system)
2426 (arguments `(#:tests? #f)) ; no tests
2427 (home-page "http://github.com/digitalbazaar/pyld")
2428 (synopsis "Python implementation of the JSON-LD specification")
2429 (description
2430 "PyLD is an implementation of the JSON-LD specification.")
2431 (license license:bsd-3)))
2432
2433 (define-public python2-pyld
2434 (package-with-python2 python-pyld))
2435
2436 (define-public python-certifi
2437 (package
2438 (name "python-certifi")
2439 (version "2017.1.23")
2440 (source (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "certifi" version))
2443 (sha256
2444 (base32
2445 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2446 (build-system python-build-system)
2447 (home-page "https://certifi.io/")
2448 (synopsis "Python CA certificate bundle")
2449 (description
2450 "Certifi is a Python library that contains a CA certificate bundle, which
2451 is used by the Requests library to verify HTTPS requests.")
2452 (license license:asl2.0)))
2453
2454 (define-public python2-certifi
2455 (package-with-python2 python-certifi))
2456
2457 (define-public python-click
2458 (package
2459 (name "python-click")
2460 (version "6.7")
2461 (source
2462 (origin
2463 (method url-fetch)
2464 (uri (pypi-uri "click" version))
2465 (sha256
2466 (base32
2467 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2468 (build-system python-build-system)
2469 (arguments
2470 `(#:phases
2471 (modify-phases %standard-phases
2472 (add-after 'unpack 'fix-paths
2473 (lambda* (#:key inputs #:allow-other-keys)
2474 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2475 "cross-libc" "libc"))))
2476 (substitute* "click/_unicodefun.py"
2477 (("'locale'")
2478 (string-append "'" glibc "/bin/locale'"))))
2479 #t))
2480 (replace 'check
2481 (lambda _
2482 (zero? (system* "make" "test")))))))
2483 (native-inputs
2484 `(("python-pytest" ,python-pytest)))
2485 (home-page "http://click.pocoo.org")
2486 (synopsis "Command line library for Python")
2487 (description
2488 "Click is a Python package for creating command line interfaces in a
2489 composable way with as little code as necessary. Its name stands for
2490 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2491 with sensible defaults out of the box.")
2492 (license license:bsd-3)))
2493
2494 (define-public python2-click
2495 (package-with-python2 python-click))
2496
2497 (define-public python-wheel
2498 (package
2499 (name "python-wheel")
2500 (version "0.30.0a0")
2501 (source
2502 (origin
2503 (method url-fetch)
2504 (uri (pypi-uri "wheel" version))
2505 (sha256
2506 (base32
2507 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2508 (build-system python-build-system)
2509 (native-inputs
2510 `(("python-jsonschema" ,python-jsonschema)
2511 ("python-pytest-cov" ,python-pytest-cov)))
2512 (home-page "https://bitbucket.org/pypa/wheel/")
2513 (synopsis "Format for built Python packages")
2514 (description
2515 "A wheel is a ZIP-format archive with a specially formatted filename and
2516 the @code{.whl} extension. It is designed to contain all the files for a PEP
2517 376 compatible install in a way that is very close to the on-disk format. Many
2518 packages will be properly installed with only the @code{Unpack} step and the
2519 unpacked archive preserves enough information to @code{Spread} (copy data and
2520 scripts to their final locations) at any later time. Wheel files can be
2521 installed with a newer @code{pip} or with wheel's own command line utility.")
2522 (license license:expat)
2523 (properties `((python2-variant . ,(delay python2-wheel))))))
2524
2525 (define-public python2-wheel
2526 (let ((wheel (package-with-python2
2527 (strip-python2-variant python-wheel))))
2528 (package (inherit wheel)
2529 (native-inputs `(("python2-functools32" ,python2-functools32)
2530 ,@(package-native-inputs wheel))))))
2531
2532
2533 (define-public python-requests
2534 (package
2535 (name "python-requests")
2536 (version "2.13.0")
2537 (source (origin
2538 (method url-fetch)
2539 (uri (pypi-uri "requests" version))
2540 (sha256
2541 (base32
2542 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2543 ;; TODO: unbundle urllib3 and chardet.
2544 (build-system python-build-system)
2545 (arguments
2546 ;; FIXME: Some tests require network access.
2547 '(#:tests? #f))
2548 (home-page "http://python-requests.org/")
2549 (synopsis "Python HTTP library")
2550 (description
2551 "Requests is a Python HTTP client library. It aims to be easier to use
2552 than Python’s urllib2 library.")
2553 (license license:asl2.0)))
2554
2555 ;; Some software requires an older version of Requests, notably Docker
2556 ;; Compose.
2557 (define-public python-requests-2.7
2558 (package (inherit python-requests)
2559 (version "2.7.0")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (pypi-uri "requests" version))
2563 (sha256
2564 (base32
2565 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2566
2567 (define-public python2-requests
2568 (package-with-python2 python-requests))
2569
2570 (define-public python-vcversioner
2571 (package
2572 (name "python-vcversioner")
2573 (version "2.16.0.0")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "vcversioner" version))
2578 (sha256
2579 (base32
2580 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2581 (build-system python-build-system)
2582 (synopsis "Python library for version number discovery")
2583 (description "Vcversioner is a Python library that inspects tagging
2584 information in a variety of version control systems in order to discover
2585 version numbers.")
2586 (home-page "https://github.com/habnabit/vcversioner")
2587 (license license:isc)))
2588
2589 (define-public python2-vcversioner
2590 (package-with-python2 python-vcversioner))
2591
2592 (define-public python-jsonschema
2593 (package
2594 (name "python-jsonschema")
2595 (version "2.5.1")
2596 (source (origin
2597 (method url-fetch)
2598 (uri
2599 (string-append
2600 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2601 version ".tar.gz"))
2602 (sha256
2603 (base32
2604 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2605 (build-system python-build-system)
2606 (arguments
2607 '(#:phases
2608 (modify-phases %standard-phases
2609 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2610 (native-inputs
2611 `(("python-nose" ,python-nose)
2612 ("python-vcversioner" ,python-vcversioner)))
2613 (home-page "https://github.com/Julian/jsonschema")
2614 (synopsis "Implementation of JSON Schema for Python")
2615 (description
2616 "Jsonschema is an implementation of JSON Schema for Python.")
2617 (license license:expat)
2618 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2619
2620 (define-public python2-jsonschema
2621 (let ((jsonschema (package-with-python2
2622 (strip-python2-variant python-jsonschema))))
2623 (package (inherit jsonschema)
2624 (native-inputs
2625 `(("python2-mock" ,python2-mock)
2626 ,@(package-native-inputs jsonschema)))
2627 (propagated-inputs
2628 `(("python2-functools32" ,python2-functools32))))))
2629
2630 (define-public python-kitchen
2631 (package
2632 (name "python-kitchen")
2633 (version "1.2.4")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (pypi-uri "kitchen" version))
2638 (sha256
2639 (base32
2640 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2641 (build-system python-build-system)
2642 (propagated-inputs
2643 `(("python-chardet" ,python-chardet)))
2644 (home-page "https://fedorahosted.org/kitchen")
2645 (synopsis "Python API for snippets")
2646 (description "@code{kitchen} module provides a python API for all sorts of
2647 little useful snippets of code that everybody ends up writing for their projects
2648 but never seem big enough to build an independent release. Use kitchen and stop
2649 cutting and pasting that code over and over.")
2650 (license (list license:lgpl2.1+
2651 ;; subprocess.py, test_subprocess.py,
2652 ;; kitchen/pycompat25/defaultdict.py:
2653 license:psfl))))
2654
2655 (define-public python2-kitchen
2656 (package-with-python2 python-kitchen))
2657
2658 (define-public python-unidecode
2659 (package
2660 (name "python-unidecode")
2661 (version "0.04.20")
2662 (source (origin
2663 (method url-fetch)
2664 (uri (pypi-uri "Unidecode" version))
2665 (sha256
2666 (base32
2667 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2668 (build-system python-build-system)
2669 (home-page "https://pypi.python.org/pypi/Unidecode")
2670 (synopsis "ASCII transliterations of Unicode text")
2671 (description
2672 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2673 useful when integrating with legacy code that doesn't support Unicode, or for
2674 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2675 machine identifiers from human-readable Unicode strings that should still be
2676 somewhat intelligeble.")
2677 (license license:gpl2+)))
2678
2679 (define-public python2-unidecode
2680 (package-with-python2 python-unidecode))
2681
2682 (define-public python-pyjwt
2683 (package
2684 (name "python-pyjwt")
2685 (version "1.4.0")
2686 (source
2687 (origin
2688 (method url-fetch)
2689 (uri (pypi-uri "PyJWT" version))
2690 (sha256
2691 (base32
2692 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2693 (build-system python-build-system)
2694 (native-inputs
2695 `(("python-pytest" ,python-pytest)
2696 ("python-pytest-cov" ,python-pytest-cov)
2697 ("python-pytest-runner" ,python-pytest-runner)))
2698 (home-page "http://github.com/progrium/pyjwt")
2699 (synopsis "JSON Web Token implementation in Python")
2700 (description
2701 "PyJWT is a JSON Web Token implementation written in Python.")
2702 (license license:expat)))
2703
2704 (define-public python2-pyjwt
2705 (package-with-python2 python-pyjwt))
2706
2707 (define-public python-pykka
2708 (package
2709 (name "python-pykka")
2710 (version "1.2.1")
2711 (source
2712 (origin
2713 (method url-fetch)
2714 (uri (pypi-uri "Pykka" version))
2715 (sha256
2716 (base32
2717 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2718 (build-system python-build-system)
2719 (native-inputs
2720 `(("python-mock" ,python-mock)
2721 ("python-nose" ,python-nose)
2722 ("python-gevent" ,python-gevent)
2723 ("python-eventlet" ,python-eventlet)))
2724 (home-page "https://www.pykka.org/")
2725 (synopsis "Pykka is a Python implementation of the actor model")
2726 (description
2727 "Pykka is a Python implementation of the actor model.
2728 The actor model introduces some simple rules to control the sharing
2729 of state and cooperation between execution units, which makes it
2730 easier to build concurrent applications.")
2731 (license license:asl2.0)))
2732
2733 (define-public python2-pykka
2734 (package-with-python2 python-pykka))
2735
2736 (define-public python-oauthlib
2737 (package
2738 (name "python-oauthlib")
2739 (version "1.0.3")
2740 (source (origin
2741 (method url-fetch)
2742 (uri (pypi-uri "oauthlib" version))
2743 (sha256
2744 (base32
2745 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2746 (build-system python-build-system)
2747 (native-inputs
2748 `(("python-nose" ,python-nose)
2749 ("python-mock" ,python-mock)
2750 ("python-cryptography" ,python-cryptography)
2751 ("python-pyjwt" ,python-pyjwt)
2752 ("python-blinker" ,python-blinker)))
2753 (home-page "https://github.com/idan/oauthlib")
2754 (synopsis "OAuth implementation for Python")
2755 (description
2756 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2757 OAuth request-signing logic.")
2758 (license license:bsd-3)
2759 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2760
2761 (define-public python2-oauthlib
2762 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2763 (package
2764 (inherit base)
2765 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2766 ,@(package-native-inputs base))))))
2767
2768 (define-public python-itsdangerous
2769 (package
2770 (name "python-itsdangerous")
2771 (version "0.24")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (string-append
2776 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2777 version ".tar.gz"))
2778 (sha256
2779 (base32
2780 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2781 (build-system python-build-system)
2782 (home-page "http://github.com/mitsuhiko/itsdangerous")
2783 (synopsis "Python library for passing data to/from untrusted environments")
2784 (description
2785 "Itsdangerous provides various helpers to pass trusted data to untrusted
2786 environments and back.")
2787 (license license:bsd-3)))
2788
2789 (define-public python2-itsdangerous
2790 (package-with-python2 python-itsdangerous))
2791
2792 (define-public python-pyyaml
2793 (package
2794 (name "python-pyyaml")
2795 (version "3.12")
2796 (source
2797 (origin
2798 (method url-fetch)
2799 (uri (pypi-uri "PyYAML" version))
2800 (sha256
2801 (base32
2802 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2803 (build-system python-build-system)
2804 (inputs
2805 `(("libyaml" ,libyaml)))
2806 (home-page "http://pyyaml.org/wiki/PyYAML")
2807 (synopsis "YAML parser and emitter for Python")
2808 (description
2809 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2810 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2811 API, and sensible error messages. PyYAML supports standard YAML tags and
2812 provides Python-specific tags that allow to represent an arbitrary Python
2813 object.")
2814 (license license:expat)))
2815
2816 (define-public python2-pyyaml
2817 (package-with-python2 python-pyyaml))
2818
2819 (define-public python-virtualenv
2820 (package
2821 (name "python-virtualenv")
2822 (version "15.0.3")
2823 (source
2824 (origin
2825 (method url-fetch)
2826 (uri (pypi-uri "virtualenv" version))
2827 (sha256
2828 (base32
2829 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2830 (build-system python-build-system)
2831 (arguments
2832 `(#:phases
2833 (modify-phases %standard-phases
2834 (replace 'check
2835 (lambda _
2836 ;; Disable failing test. See upstream bug report
2837 ;; https://github.com/pypa/virtualenv/issues/957
2838 (substitute* "tests/test_virtualenv.py"
2839 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2840 (zero? (system* "py.test")))))))
2841 (native-inputs
2842 `(("python-mock" ,python-mock)
2843 ("python-pytest" ,python-pytest)))
2844 (home-page "https://virtualenv.pypa.io/")
2845 (synopsis "Virtual Python environment builder")
2846 (description
2847 "Virtualenv is a tool to create isolated Python environments.")
2848 (license license:expat)))
2849
2850 (define-public python2-virtualenv
2851 (package-with-python2 python-virtualenv))
2852
2853 (define-public python-markupsafe
2854 (package
2855 (name "python-markupsafe")
2856 (version "0.23")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (string-append
2861 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2862 version ".tar.gz"))
2863 (sha256
2864 (base32
2865 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2866 (build-system python-build-system)
2867 (home-page "http://github.com/mitsuhiko/markupsafe")
2868 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2869 (description
2870 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2871 for Python.")
2872 (license license:bsd-3)))
2873
2874 (define-public python2-markupsafe
2875 (package-with-python2 python-markupsafe))
2876
2877 (define-public python-jinja2
2878 (package
2879 (name "python-jinja2")
2880 (version "2.8")
2881 (source
2882 (origin
2883 (method url-fetch)
2884 (uri (pypi-uri "Jinja2" version))
2885 (sha256
2886 (base32
2887 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2888 (build-system python-build-system)
2889 (propagated-inputs
2890 `(("python-markupsafe" ,python-markupsafe)))
2891 (home-page "http://jinja.pocoo.org/")
2892 (synopsis "Python template engine")
2893 (description
2894 "Jinja2 is a small but fast and easy to use stand-alone template engine
2895 written in pure Python.")
2896 (license license:bsd-3)))
2897
2898 (define-public python2-jinja2
2899 (package-with-python2 python-jinja2))
2900
2901 (define-public python-pystache
2902 (package
2903 (name "python-pystache")
2904 (version "0.5.4")
2905 (source (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "pystache" version))
2908 (sha256
2909 (base32
2910 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2911 (build-system python-build-system)
2912 (arguments
2913 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2914 (home-page "http://defunkt.io/pystache/")
2915 (synopsis "Python logic-less template engine")
2916 (description
2917 "Pystache is a Python implementation of the framework agnostic,
2918 logic-free templating system Mustache.")
2919 (license license:expat)
2920 (properties `((python2-variant . ,(delay python2-pystache))))))
2921
2922 (define-public python2-pystache
2923 (package (inherit (package-with-python2
2924 (strip-python2-variant python-pystache)))
2925 (arguments
2926 `(#:python ,python-2
2927 #:phases
2928 (modify-phases %standard-phases
2929 (replace 'check
2930 (lambda _
2931 (zero? (system* "python" "test_pystache.py")))))))))
2932
2933 (define-public python-joblib
2934 (package
2935 (name "python-joblib")
2936 (version "0.10.3")
2937 (source (origin
2938 (method url-fetch)
2939 (uri (pypi-uri "joblib" version))
2940 (sha256
2941 (base32
2942 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2943 (modules '((guix build utils)))
2944 (snippet
2945 '(begin
2946 ;; Remove pre-compiled .pyc files from source.
2947 (for-each delete-file-recursively
2948 (find-files "." "__pycache__" #:directories? #t))
2949 (for-each delete-file (find-files "." "\\.pyc$"))
2950 #t))))
2951 (build-system python-build-system)
2952 (arguments
2953 `(#:phases
2954 (modify-phases %standard-phases
2955 (add-before 'check 'disable-failing-tests
2956 (lambda _
2957 ;; This numpydoc tests fails for unknown reasons
2958 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2959 ;; This numpydoc test depends on matplotlib, which is not a
2960 ;; required input.
2961 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2962 ;; These tests fail to execute sys.executable
2963 (substitute* "joblib/test/test_parallel.py"
2964 (("import nose" line)
2965 (string-append "from nose.plugins.skip import SkipTest\n" line))
2966 (("def test_nested_parallel_warnings" line)
2967 (string-append "@SkipTest\n" line))
2968 (("def test_parallel_with_interactively_defined_functions" line)
2969 (string-append "@SkipTest\n" line)))
2970 #t)))))
2971 ;; Provide nose to enable tests command
2972 (native-inputs
2973 `(("python-nose" ,python-nose)
2974 ("python-sphinx" ,python-sphinx)
2975 ("python-docutils" ,python-docutils)
2976 ("python-numpydoc" ,python-numpydoc)))
2977 (home-page "http://pythonhosted.org/joblib/")
2978 (synopsis "Using Python functions as pipeline jobs")
2979 (description
2980 "Joblib is a set of tools to provide lightweight pipelining in Python.
2981 In particular, joblib offers: transparent disk-caching of the output values
2982 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2983 logging and tracing of the execution.")
2984 (license license:bsd-3)))
2985
2986 (define-public python2-joblib
2987 (package-with-python2 python-joblib))
2988
2989 (define-public python-docutils
2990 (package
2991 (name "python-docutils")
2992 (version "0.13.1")
2993 (source
2994 (origin
2995 (method url-fetch)
2996 (uri (pypi-uri "docutils" version))
2997 (sha256
2998 (base32
2999 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3000 (build-system python-build-system)
3001 (arguments
3002 '(#:tests? #f)) ; no setup.py test command
3003 (home-page "http://docutils.sourceforge.net/")
3004 (synopsis "Python Documentation Utilities")
3005 (description
3006 "Docutils is a modular system for processing documentation into useful
3007 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3008 reStructuredText.")
3009 ;; Most of the source code is public domain, but some source files are
3010 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3011 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3012
3013 (define-public python2-docutils
3014 (package-with-python2 python-docutils))
3015
3016 (define-public python-pygments
3017 (package
3018 (name "python-pygments")
3019 (version "2.1.3")
3020 (source
3021 (origin
3022 (method url-fetch)
3023 (uri (pypi-uri "Pygments" version))
3024 (sha256
3025 (base32
3026 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3027 (build-system python-build-system)
3028 (arguments
3029 ;; FIXME: Tests require sphinx, which depends on this.
3030 '(#:tests? #f))
3031 (home-page "http://pygments.org/")
3032 (synopsis "Syntax highlighting")
3033 (description
3034 "Pygments is a syntax highlighting package written in Python.")
3035 (license license:bsd-2)))
3036
3037 (define-public python2-pygments
3038 (package-with-python2 python-pygments))
3039
3040 (define-public python-sphinx
3041 (package
3042 (name "python-sphinx")
3043 (version "1.5.1")
3044 (source
3045 (origin
3046 (method url-fetch)
3047 (uri (pypi-uri "Sphinx" version))
3048 (sha256
3049 (base32
3050 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3051 (build-system python-build-system)
3052 (arguments
3053 `(#:phases
3054 (modify-phases %standard-phases
3055 (replace 'check
3056 (lambda _
3057 ;; Requires Internet access.
3058 (delete-file "tests/test_build_linkcheck.py")
3059 (zero? (system* "make" "test")))))))
3060 (propagated-inputs
3061 `(("python-imagesize" ,python-imagesize)
3062 ("python-sphinx-alabaster-theme"
3063 ,python-sphinx-alabaster-theme)
3064 ("python-babel" ,python-babel)
3065 ("python-snowballstemmer" ,python-snowballstemmer)
3066 ("python-docutils" ,python-docutils)
3067 ("python-jinja2" ,python-jinja2)
3068 ("python-pygments" ,python-pygments)
3069 ("python-requests" ,python-requests)
3070 ("python-six" ,python-six)))
3071 (native-inputs
3072 `(("graphviz" ,graphviz)
3073 ("python-html5lib" ,python-html5lib)
3074 ("python-mock" ,python-mock)
3075 ("python-nose" ,python-nose)))
3076 (home-page "http://sphinx-doc.org/")
3077 (synopsis "Python documentation generator")
3078 (description "Sphinx is a tool that makes it easy to create documentation
3079 for Python projects or other documents consisting of multiple reStructuredText
3080 sources.")
3081 (license license:bsd-3)
3082 (properties `((python2-variant . ,(delay python2-sphinx))))))
3083
3084 (define-public python2-sphinx
3085 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3086 (package
3087 (inherit base)
3088 (native-inputs `(("python2-mock" ,python2-mock)
3089 ("python2-enum34" ,python2-enum34)
3090 ,@(package-native-inputs base)))
3091 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3092 ,@(package-propagated-inputs base))))))
3093
3094 (define-public python-sphinx-rtd-theme
3095 (package
3096 (name "python-sphinx-rtd-theme")
3097 (version "0.1.6")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (string-append "https://pypi.python.org/packages/source/s/"
3102 "sphinx_rtd_theme/sphinx_rtd_theme-"
3103 version ".tar.gz"))
3104 (sha256
3105 (base32
3106 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3107 (build-system python-build-system)
3108 (arguments '(#:tests? #f)) ; No tests.
3109 (propagated-inputs
3110 `(("python-sphinx" ,python-sphinx)))
3111 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3112 (synopsis "ReadTheDocs.org theme for Sphinx")
3113 (description "A theme for Sphinx used by ReadTheDocs.org.")
3114 (license license:expat)))
3115
3116 (define-public python2-sphinx-rtd-theme
3117 (package-with-python2 python-sphinx-rtd-theme))
3118
3119 (define-public python-rst.linker
3120 (package
3121 (name "python-rst.linker")
3122 (version "1.7")
3123 (source
3124 (origin
3125 (method url-fetch)
3126 (uri (pypi-uri "rst.linker" version))
3127 (sha256
3128 (base32
3129 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3130 (build-system python-build-system)
3131 (propagated-inputs
3132 `(("python-dateutil" ,python-dateutil)
3133 ("python-six" ,python-six)))
3134 (native-inputs
3135 `(("python-setuptools-scm" ,python-setuptools-scm)))
3136 ;; Test would require path.py, which would introduce a cyclic dependence.
3137 (arguments `(#:tests? #f))
3138 ;; Note: As of version 1.7 the documentation is not worth building.
3139 (home-page "https://github.com/jaraco/rst.linker")
3140 (synopsis "Sphinx plugin to add links and timestamps")
3141 (description "rst.linker allows to automatically replace text by a
3142 reStructuredText external reference or timestamps. It's primary purpose is to
3143 augment the changelog, but it can be used for other documents, too.")
3144 (license license:expat)))
3145
3146 (define-public python2-rst.linker
3147 (package-with-python2 python-rst.linker))
3148
3149 (define-public python-feedgenerator
3150 (package
3151 (name "python-feedgenerator")
3152 (version "1.8")
3153 (source
3154 (origin
3155 (method url-fetch)
3156 (uri (pypi-uri "feedgenerator" version))
3157 (sha256
3158 (base32
3159 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3160 (modules '((guix build utils)))
3161 (snippet
3162 '(begin
3163 ;; Remove pre-compiled .pyc files from source.
3164 (for-each delete-file-recursively
3165 (find-files "." "__pycache__" #:directories? #t))
3166 (for-each delete-file (find-files "." "\\.pyc$"))
3167 #t))))
3168 (build-system python-build-system)
3169 (propagated-inputs
3170 `(("python-pytz" ,python-pytz)
3171 ("python-six" ,python-six)))
3172 (home-page "https://github.com/getpelican/feedgenerator")
3173 (synopsis
3174 "Standalone version of Django's Atom/RSS feed generator")
3175 (description
3176 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3177 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3178 (license license:bsd-3)))
3179
3180 (define-public python2-feedgenerator
3181 (package-with-python2 python-feedgenerator))
3182
3183 (define-public python-blinker
3184 (package
3185 (name "python-blinker")
3186 (version "1.4")
3187 (source
3188 (origin
3189 (method url-fetch)
3190 (uri (pypi-uri "blinker" version))
3191 (sha256
3192 (base32
3193 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3194 (build-system python-build-system)
3195 (home-page "http://pythonhosted.org/blinker/")
3196 (synopsis "Fast, simple object-to-object and broadcast signaling")
3197 (description
3198 "Blinker provides a fast dispatching system that allows any number of
3199 interested parties to subscribe to events, or \"signals\".")
3200 (license license:expat)))
3201
3202 (define-public python2-blinker
3203 (package-with-python2 python-blinker))
3204
3205 (define-public pelican
3206 (package
3207 (name "pelican")
3208 (version "3.6.3")
3209 (source
3210 (origin
3211 (method url-fetch)
3212 (uri (pypi-uri "pelican" version))
3213 (sha256
3214 (base32
3215 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3216 (build-system python-build-system)
3217 (propagated-inputs
3218 `(("python-feedgenerator" ,python-feedgenerator)
3219 ("python-jinja2" ,python-jinja2)
3220 ("python-pygments" ,python-pygments)
3221 ("python-docutils" ,python-docutils)
3222 ("python-pytz" ,python-pytz)
3223 ("python-blinker" ,python-blinker)
3224 ("python-unidecode" ,python-unidecode)
3225 ("python-six" ,python-six)
3226 ("python-dateutil" ,python-dateutil)))
3227 (home-page "http://getpelican.com/")
3228 (arguments
3229 `(;; XXX Requires a lot more packages to do unit tests :P
3230 #:tests? #f
3231 #:phases (modify-phases %standard-phases
3232 (add-before
3233 'install 'adjust-requires
3234 ;; Since feedgenerator is installed from git, it doesn't
3235 ;; conform to the version requirements.
3236 ;;
3237 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3238 ;; version requirement so setuptools doesn't get confused.
3239 (lambda _
3240 (substitute* "setup.py"
3241 (("['\"]feedgenerator.*?['\"]")
3242 "'feedgenerator'")))))))
3243 (synopsis "Python-based static site publishing system")
3244 (description
3245 "Pelican is a tool to generate a static blog from reStructuredText,
3246 Markdown input files, and more. Pelican uses Jinja2 for templating
3247 and is very extensible.")
3248 (license license:agpl3+)))
3249
3250 (define-public python-scikit-learn
3251 (package
3252 (name "python-scikit-learn")
3253 (version "0.18.1")
3254 (source
3255 (origin
3256 (method url-fetch)
3257 (uri (string-append
3258 "https://github.com/scikit-learn/scikit-learn/archive/"
3259 version ".tar.gz"))
3260 (file-name (string-append name "-" version ".tar.gz"))
3261 (sha256
3262 (base32
3263 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3264 (build-system python-build-system)
3265 (arguments
3266 `(#:phases
3267 (modify-phases %standard-phases
3268 (delete 'check)
3269 (add-after 'install 'check
3270 ;; Running tests from the source directory requires
3271 ;; an "inplace" build with paths relative to CWD.
3272 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3273 ;; Use the installed version instead.
3274 (lambda* (#:key inputs outputs #:allow-other-keys)
3275 (add-installed-pythonpath inputs outputs)
3276 ;; some tests require access to "$HOME"
3277 (setenv "HOME" "/tmp")
3278 ;; Step out of the source directory just to be sure.
3279 (chdir "..")
3280 (zero? (system* "nosetests" "-v" "sklearn")))))))
3281 (inputs
3282 `(("openblas" ,openblas)))
3283 (native-inputs
3284 `(("python-nose" ,python-nose)
3285 ("python-cython" ,python-cython)))
3286 (propagated-inputs
3287 `(("python-numpy" ,python-numpy)
3288 ("python-scipy" ,python-scipy)))
3289 (home-page "http://scikit-learn.org/")
3290 (synopsis "Machine Learning in Python")
3291 (description
3292 "Scikit-learn provides simple and efficient tools for data
3293 mining and data analysis.")
3294 (license license:bsd-3)))
3295
3296 (define-public python2-scikit-learn
3297 (package-with-python2 python-scikit-learn))
3298
3299 (define-public python-scikit-image
3300 (package
3301 (name "python-scikit-image")
3302 (version "0.11.3")
3303 (source
3304 (origin
3305 (method url-fetch)
3306 (uri (string-append
3307 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3308 version ".tar.gz"))
3309 (sha256
3310 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3311 (build-system python-build-system)
3312 (arguments
3313 ;; TODO: Some tests require running X11 server. Disable them?
3314 '(#:tests? #f))
3315 ;; See DEPENDS.txt for the list of build and run time requiremnts
3316 (propagated-inputs
3317 `(("python-matplotlib" ,python-matplotlib)
3318 ("python-networkx" ,python-networkx)
3319 ("python-scipy" ,python-scipy)
3320 ("python-pillow" ,python-pillow)))
3321 (native-inputs
3322 `(("python-numpy" ,python-numpy)
3323 ("python-cython" ,python-cython)
3324 ("python-six" ,python-six)))
3325 (home-page "http://scikit-image.org/")
3326 (synopsis "Image processing in Python")
3327 (description
3328 "Scikit-image is a collection of algorithms for image processing.")
3329 (license license:bsd-3)))
3330
3331 (define-public python2-scikit-image
3332 (package-with-python2 python-scikit-image))
3333
3334 (define-public python-redis
3335 (package
3336 (name "python-redis")
3337 (version "2.10.5")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (pypi-uri "redis" version))
3342 (sha256
3343 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3344 (build-system python-build-system)
3345 ;; Tests require a running Redis server
3346 (arguments '(#:tests? #f))
3347 ;; As long as we are not running test, we do not need this input :-)
3348 ;;(native-inputs
3349 ;; `(("python-pytest" ,python-pytest)))
3350 (home-page "https://github.com/andymccurdy/redis-py")
3351 (synopsis "Redis Python client")
3352 (description
3353 "This package provides a Python interface to the Redis key-value store.")
3354 (license license:expat)))
3355
3356 (define-public python2-redis
3357 (package-with-python2 python-redis))
3358
3359 (define-public python-rq
3360 (package
3361 (name "python-rq")
3362 (version "0.5.2")
3363 (source
3364 (origin
3365 (method url-fetch)
3366 (uri (string-append
3367 "https://pypi.python.org/packages/source/r/rq/rq-"
3368 version ".tar.gz"))
3369 (sha256
3370 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3371 (build-system python-build-system)
3372 (propagated-inputs
3373 `(("python-click" ,python-click)
3374 ("python-redis" ,python-redis)))
3375 (home-page "http://python-rq.org/")
3376 (synopsis "Simple job queues for Python")
3377 (description
3378 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3379 processing them in the background with workers. It is backed by Redis and it
3380 is designed to have a low barrier to entry.")
3381 (license license:bsd-2)))
3382
3383 (define-public python2-rq
3384 (package-with-python2 python-rq))
3385
3386 (define-public python-cython
3387 (package
3388 (name "python-cython")
3389 (version "0.24.1")
3390 (source
3391 (origin
3392 (method url-fetch)
3393 (uri (pypi-uri "Cython" version))
3394 (sha256
3395 (base32
3396 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3397 (build-system python-build-system)
3398 ;; we need the full python package and not just the python-wrapper
3399 ;; because we need libpython3.3m.so
3400 (inputs
3401 `(("python" ,python)))
3402 (arguments
3403 `(#:phases
3404 (modify-phases %standard-phases
3405 (add-before 'check 'set-HOME
3406 ;; some tests require access to "$HOME/.cython"
3407 (lambda _ (setenv "HOME" "/tmp")))
3408 (replace 'check
3409 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3410 (home-page "http://cython.org/")
3411 (synopsis "C extensions for Python")
3412 (description "Cython is an optimising static compiler for both the Python
3413 programming language and the extended Cython programming language. It makes
3414 writing C extensions for Python as easy as Python itself.")
3415 (license license:asl2.0)
3416 (properties `((python2-variant . ,(delay python2-cython))))))
3417
3418 (define-public python2-cython
3419 (package (inherit (package-with-python2
3420 (strip-python2-variant python-cython)))
3421 (name "python2-cython")
3422 (inputs
3423 `(("python-2" ,python-2))))) ; this is not automatically changed
3424
3425 ;; The RPython toolchain currently does not support Python 3.
3426 (define-public python2-rpython
3427 (package
3428 (name "python2-rpython")
3429 (version "0.1.4")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "rpython" version))
3434 (sha256
3435 (base32
3436 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3437 (build-system python-build-system)
3438 (arguments `(#:python ,python-2))
3439 (native-inputs
3440 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3441 (home-page "https://rpython.readthedocs.org")
3442 (synopsis "Framework for implementing interpreters and virtual machines")
3443 (description "RPython is a translation and support framework for
3444 producing implementations of dynamic languages, emphasizing a clean separation
3445 between language specification and implementation aspects.")
3446 (license license:expat)))
3447
3448 ;; This version of numpy is missing the documentation and is only used to
3449 ;; build matplotlib which is required to build numpy's documentation.
3450 (define-public python-numpy
3451 (package
3452 (name "python-numpy")
3453 (version "1.12.0")
3454 (source
3455 (origin
3456 (method url-fetch)
3457 (uri (string-append
3458 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3459 (file-name (string-append name "-" version ".tar.gz"))
3460 (sha256
3461 (base32
3462 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3463 (build-system python-build-system)
3464 (inputs
3465 `(("openblas" ,openblas)
3466 ("lapack" ,lapack)))
3467 (native-inputs
3468 `(("python-cython" ,python-cython)
3469 ("python-nose" ,python-nose)
3470 ("gfortran" ,gfortran)))
3471 (arguments
3472 `(#:phases
3473 (modify-phases %standard-phases
3474 (add-before 'build 'set-environment-variables
3475 (lambda* (#:key inputs #:allow-other-keys)
3476 (call-with-output-file "site.cfg"
3477 (lambda (port)
3478 (format port
3479 "[openblas]
3480 libraries = openblas
3481 library_dirs = ~a/lib
3482 include_dirs = ~a/include
3483
3484 # backslash-n to make emacs happy
3485 \n[lapack]
3486 lapack_libs = lapack
3487 library_dirs = ~a/lib
3488 include_dirs = ~a/include
3489 "
3490 (assoc-ref inputs "openblas")
3491 (assoc-ref inputs "openblas")
3492 (assoc-ref inputs "lapack")
3493 (assoc-ref inputs "lapack"))))
3494 ;; Use "gcc" executable, not "cc".
3495 (substitute* "numpy/distutils/system_info.py"
3496 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3497 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3498 #t))
3499 ;; Tests can only be run after the library has been installed and not
3500 ;; within the source directory.
3501 (delete 'check)
3502 (add-after 'install 'check
3503 (lambda* (#:key outputs inputs #:allow-other-keys)
3504 ;; Make installed package available for running the tests
3505 (add-installed-pythonpath inputs outputs)
3506 (with-directory-excursion "/tmp"
3507 (zero? (system* "python" "-c"
3508 "import numpy; numpy.test(verbose=2)"))))))))
3509 (home-page "http://www.numpy.org/")
3510 (synopsis "Fundamental package for scientific computing with Python")
3511 (description "NumPy is the fundamental package for scientific computing
3512 with Python. It contains among other things: a powerful N-dimensional array
3513 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3514 and Fortran code, useful linear algebra, Fourier transform, and random number
3515 capabilities.")
3516 (license license:bsd-3)))
3517
3518 (define-public python2-numpy
3519 (package-with-python2 python-numpy))
3520
3521 (define-public python-munch
3522 (package
3523 (name "python-munch")
3524 (version "2.0.4")
3525 (source
3526 (origin
3527 (method url-fetch)
3528 (uri (pypi-uri "munch" version))
3529 (sha256
3530 (base32
3531 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3532 (build-system python-build-system)
3533 (home-page "https://github.com/Infinidat/munch")
3534 (synopsis "Dot-accessible dictionary")
3535 (description "Munch is a dot-accessible dictionary similar to JavaScript
3536 objects.")
3537 (license license:expat)))
3538
3539 (define-public python2-munch
3540 (package-with-python2 python-munch))
3541
3542 (define-public python2-fastlmm
3543 (package
3544 (name "python2-fastlmm")
3545 (version "0.2.21")
3546 (source
3547 (origin
3548 (method url-fetch)
3549 (uri (pypi-uri "fastlmm" version ".zip"))
3550 (sha256
3551 (base32
3552 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3553 (build-system python-build-system)
3554 (arguments
3555 `(#:python ,python-2)) ; only Python 2.7 is supported
3556 (propagated-inputs
3557 `(("python2-numpy" ,python2-numpy)
3558 ("python2-scipy" ,python2-scipy)
3559 ("python2-matplotlib" ,python2-matplotlib)
3560 ("python2-pandas" ,python2-pandas)
3561 ("python2-scikit-learn" ,python2-scikit-learn)
3562 ("python2-pysnptools" ,python2-pysnptools)))
3563 (native-inputs
3564 `(("unzip" ,unzip)
3565 ("python2-cython" ,python2-cython)
3566 ("python2-mock" ,python2-mock)
3567 ("python2-nose" ,python2-nose)))
3568 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3569 (synopsis "Perform genome-wide association studies on large data sets")
3570 (description
3571 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3572 Models, is a program for performing both single-SNP and SNP-set genome-wide
3573 association studies (GWAS) on extremely large data sets.")
3574 (license license:asl2.0)))
3575
3576 (define-public python-numpy-documentation
3577 (package
3578 (name "python-numpy-documentation")
3579 (version (package-version python-numpy))
3580 (source (package-source python-numpy))
3581 (build-system python-build-system)
3582 (native-inputs
3583 `(("python-matplotlib" ,python-matplotlib)
3584 ("python-numpy" ,python-numpy)
3585 ("pkg-config" ,pkg-config)
3586 ("python-sphinx" ,python-sphinx)
3587 ("python-numpydoc" ,python-numpydoc)
3588 ("texlive" ,texlive)
3589 ("texinfo" ,texinfo)
3590 ("perl" ,perl)
3591 ("scipy-sphinx-theme"
3592 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3593 (method git-fetch)
3594 (uri (git-reference
3595 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3596 (commit "c466764e22")))
3597 (sha256
3598 (base32
3599 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3600 ,@(package-native-inputs python-numpy)))
3601 (arguments
3602 `(#:tests? #f ; we're only generating the documentation
3603 #:phases
3604 (modify-phases %standard-phases
3605 (delete 'build)
3606 (replace 'install
3607 (lambda* (#:key inputs outputs #:allow-other-keys)
3608 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3609 (doc (string-append
3610 data "/doc/" ,name "-"
3611 ,(package-version python-numpy)))
3612 (info-reader (string-append data "/info"))
3613 (html (string-append doc "/html"))
3614 (scipy-sphinx-theme "scipy-sphinx-theme")
3615 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3616 (pyver ,(string-append "PYVER=")))
3617 (with-directory-excursion "doc"
3618 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3619 (mkdir-p html)
3620 (system* "make" "html" pyver)
3621 (system* "make" "latex" "PAPER=a4" pyver)
3622 (system* "make" "-C" "build/latex"
3623 "all-pdf" "PAPER=a4" pyver)
3624 ;; FIXME: Generation of the info file fails.
3625 ;; (system* "make" "info" pyver)
3626 ;; (mkdir-p info)
3627 ;; (copy-file "build/texinfo/numpy.info"
3628 ;; (string-append info "/numpy.info"))
3629 (for-each (lambda (file)
3630 (copy-file (string-append "build/latex" file)
3631 (string-append doc file)))
3632 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3633 (with-directory-excursion "build/html"
3634 (for-each (lambda (file)
3635 (let* ((dir (dirname file))
3636 (tgt-dir (string-append html "/" dir)))
3637 (unless (equal? "." dir)
3638 (mkdir-p tgt-dir))
3639 (install-file file html)))
3640 (find-files "." ".*")))))
3641 #t)))))
3642 (home-page (package-home-page python-numpy))
3643 (synopsis "Documentation for the python-numpy package")
3644 (description (package-description python-numpy))
3645 (license (package-license python-numpy))))
3646
3647 (define-public python2-numpy-documentation
3648 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3649 (package
3650 (inherit numpy-documentation)
3651 (native-inputs `(("python2-functools32" ,python2-functools32)
3652 ,@(package-native-inputs numpy-documentation))))))
3653
3654 (define-public python-pygit2
3655 (package
3656 (name "python-pygit2")
3657 (version "0.25.0")
3658 (source
3659 (origin
3660 (method url-fetch)
3661 (uri (pypi-uri "pygit2" version))
3662 (sha256
3663 (base32
3664 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3665 (patches
3666 (search-patches "python-pygit2-disable-network-tests.patch"))))
3667 (build-system python-build-system)
3668 (propagated-inputs
3669 `(("python-six" ,python-six)
3670 ("python-cffi" ,python-cffi)
3671 ("libgit2" ,libgit2)
3672 ("python-tox" ,python-tox)))
3673 (home-page "https://github.com/libgit2/pygit2")
3674 (synopsis "Python bindings for libgit2")
3675 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3676 library, libgit2 implements Git plumbing.")
3677 ;; GPL2.0 only, with linking exception.
3678 (license license:gpl2)))
3679
3680 (define-public python2-pygit2
3681 (package-with-python2 python-pygit2))
3682
3683 (define-public python-pyparsing
3684 (package
3685 (name "python-pyparsing")
3686 (version "2.0.3")
3687 (source
3688 (origin
3689 (method url-fetch)
3690 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3691 "/pyparsing-" version
3692 "/pyparsing-" version ".tar.gz"))
3693 (sha256
3694 (base32
3695 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3696 (build-system python-build-system)
3697 (outputs '("out" "doc"))
3698 (arguments
3699 `(#:tests? #f ; no test target
3700 #:modules ((guix build python-build-system)
3701 (guix build utils))
3702 #:phases
3703 (alist-cons-after
3704 'install 'install-doc
3705 (lambda* (#:key outputs #:allow-other-keys)
3706 (let* ((doc (string-append (assoc-ref outputs "doc")
3707 "/share/doc/" ,name "-" ,version))
3708 (html-doc (string-append doc "/html"))
3709 (examples (string-append doc "/examples")))
3710 (mkdir-p html-doc)
3711 (mkdir-p examples)
3712 (for-each
3713 (lambda (dir tgt)
3714 (map (lambda (file)
3715 (install-file file tgt))
3716 (find-files dir ".*")))
3717 (list "docs" "htmldoc" "examples")
3718 (list doc html-doc examples))))
3719 %standard-phases)))
3720 (home-page "http://pyparsing.wikispaces.com")
3721 (synopsis "Python parsing class library")
3722 (description
3723 "The pyparsing module is an alternative approach to creating and
3724 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3725 of regular expressions. The pyparsing module provides a library of classes
3726 that client code uses to construct the grammar directly in Python code.")
3727 (license license:expat)))
3728
3729 (define-public python2-pyparsing
3730 (package-with-python2 python-pyparsing))
3731
3732 (define-public python-numpydoc
3733 (package
3734 (name "python-numpydoc")
3735 (version "0.5")
3736 (source
3737 (origin
3738 (method url-fetch)
3739 (uri (string-append
3740 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3741 version ".tar.gz"))
3742 (sha256
3743 (base32
3744 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3745 (modules '((guix build utils)))
3746 (snippet
3747 '(begin
3748 ;; Drop a test requiring matplotlib, which we cannot add as an
3749 ;; input since it would create a circular dependency: Extend the
3750 ;; test for Python 3, where it is already dropped, to Python 2.
3751 (substitute* "numpydoc/tests/test_plot_directive.py"
3752 (("3") "2"))))))
3753 (build-system python-build-system)
3754 (propagated-inputs
3755 `(("python-sphinx" ,python-sphinx)))
3756 (native-inputs
3757 `(("python-nose" ,python-nose)))
3758 (home-page "https://pypi.python.org/pypi/numpydoc")
3759 (synopsis
3760 "Numpy's Sphinx extensions")
3761 (description
3762 "Sphinx extension to support docstrings in Numpy format.")
3763 (license license:bsd-2)))
3764
3765 (define-public python2-numpydoc
3766 (package-with-python2 python-numpydoc))
3767
3768 (define-public python-numexpr
3769 (package
3770 (name "python-numexpr")
3771 (version "2.6.1")
3772 (source
3773 (origin
3774 (method url-fetch)
3775 (uri (pypi-uri "numexpr" version))
3776 (sha256
3777 (base32
3778 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3779 (build-system python-build-system)
3780 (arguments `(#:tests? #f)) ; no tests included
3781 (propagated-inputs
3782 `(("python-numpy" ,python-numpy)))
3783 (home-page "https://github.com/pydata/numexpr")
3784 (synopsis "Fast numerical expression evaluator for NumPy")
3785 (description
3786 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3787 expressions that operate on arrays are accelerated and use less memory than
3788 doing the same calculation in Python. In addition, its multi-threaded
3789 capabilities can make use of all your cores, which may accelerate
3790 computations, most specially if they are not memory-bounded (e.g. those using
3791 transcendental functions).")
3792 (license license:expat)))
3793
3794 (define-public python2-numexpr
3795 (package-with-python2 python-numexpr))
3796
3797 (define-public python-cycler
3798 (package
3799 (name "python-cycler")
3800 (version "0.10.0")
3801 (source (origin
3802 (method url-fetch)
3803 (uri (pypi-uri "cycler" version))
3804 (sha256
3805 (base32
3806 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3807 (build-system python-build-system)
3808 (arguments
3809 ;; XXX: The current version requires 'coveralls' which we don't have.
3810 ;; Enable this for the next release which uses 'python-pytest'.
3811 '(#:tests? #f))
3812 (propagated-inputs
3813 `(("python-six" ,python-six)))
3814 (home-page "http://matplotlib.org/cycler/")
3815 (synopsis "Composable keyword argument iterator")
3816 (description
3817 "When using @code{matplotlib} and plotting more than one line, it is
3818 common to want to be able to want to be able to cycle over one or more artist
3819 styles; but the plotting logic can quickly become involved.
3820 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3821 @code{Cycler} class was developed.")
3822 (license license:bsd-3)))
3823
3824 (define-public python2-cycler
3825 (package-with-python2 python-cycler))
3826
3827 (define-public python-colorspacious
3828 (package
3829 (name "python-colorspacious")
3830 (version "1.1.0")
3831 (source
3832 (origin
3833 (method url-fetch)
3834 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3835 version ".tar.gz"))
3836 (file-name (string-append name "-" version))
3837 (sha256
3838 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3839 (build-system python-build-system)
3840 (propagated-inputs
3841 `(("python-numpy" ,python-numpy)))
3842 (native-inputs
3843 `(("python-nose" ,python-nose)))
3844 (arguments
3845 `(#:phases
3846 (modify-phases %standard-phases
3847 (replace 'check
3848 (lambda _
3849 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3850 (home-page "https://github.com/njsmith/colorspacious")
3851 (synopsis "Python library for colorspace conversions")
3852 (description "@code{colorspacious} is a Python library that lets you
3853 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3854 (license license:expat)))
3855
3856 (define-public python2-colorspacious
3857 (package-with-python2 python-colorspacious))
3858
3859 (define-public python-matplotlib
3860 (package
3861 (name "python-matplotlib")
3862 (version "2.0.0")
3863 (source
3864 (origin
3865 (method url-fetch)
3866 (uri (string-append
3867 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3868 (file-name (string-append name "-" version ".tar.gz"))
3869 (sha256
3870 (base32
3871 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3872 (build-system python-build-system)
3873 (propagated-inputs ; the following packages are all needed at run time
3874 `(("python-cycler" ,python-cycler)
3875 ("python-pyparsing" ,python-pyparsing)
3876 ("python-pygobject" ,python-pygobject)
3877 ("gobject-introspection" ,gobject-introspection)
3878 ("python-tkinter" ,python "tk")
3879 ("python-dateutil" ,python-dateutil)
3880 ("python-numpy" ,python-numpy)
3881 ("python-pillow" ,python-pillow)
3882 ("python-pytz" ,python-pytz)
3883 ("python-six" ,python-six)
3884 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3885 ;; from 'gtk+') provides the required 'typelib' files used by
3886 ;; 'gobject-introspection'. The location of these files is set with the
3887 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3888 ;; is done automatically by a 'native-search-path' procedure. However,
3889 ;; at run-time the user must set this variable as follows:
3890 ;;
3891 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3892 ("gtk+" ,gtk+)
3893 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3894 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3895 ;; object. For this reason we need to import both libraries.
3896 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3897 ("python-pycairo" ,python-pycairo)
3898 ("python-cairocffi" ,python-cairocffi)))
3899 (inputs
3900 `(("libpng" ,libpng)
3901 ("imagemagick" ,imagemagick)
3902 ("freetype" ,freetype)
3903 ("cairo" ,cairo)
3904 ("glib" ,glib)
3905 ;; FIXME: Add backends when available.
3906 ;("python-wxpython" ,python-wxpython)
3907 ("python-pyqt" ,python-pyqt)
3908 ("tcl" ,tcl)
3909 ("tk" ,tk)))
3910 (native-inputs
3911 `(("pkg-config" ,pkg-config)
3912 ("python-nose" ,python-nose)
3913 ("python-mock" ,python-mock)))
3914 (arguments
3915 `(#:phases
3916 (modify-phases %standard-phases
3917 (add-before 'build 'configure-environment
3918 (lambda* (#:key outputs inputs #:allow-other-keys)
3919 (let ((cairo (assoc-ref inputs "cairo"))
3920 (gtk+ (assoc-ref inputs "gtk+")))
3921 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3922 ;; has not effect.
3923 (setenv "LD_LIBRARY_PATH"
3924 (string-append cairo "/lib:" gtk+ "/lib"))
3925 (setenv "HOME" (getcwd))
3926 (call-with-output-file "setup.cfg"
3927 (lambda (port)
3928 (format port "[directories]~%
3929 basedirlist = ~a,~a~%
3930 [rc_options]~%
3931 backend = TkAgg~%"
3932 (assoc-ref inputs "tcl")
3933 (assoc-ref inputs "tk")))))
3934 #t)))))
3935 (home-page "http://matplotlib.org")
3936 (synopsis "2D plotting library for Python")
3937 (description
3938 "Matplotlib is a Python 2D plotting library which produces publication
3939 quality figures in a variety of hardcopy formats and interactive environments
3940 across platforms. Matplotlib can be used in Python scripts, the python and
3941 ipython shell, web application servers, and six graphical user interface
3942 toolkits.")
3943 (license license:psfl)
3944 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3945
3946 (define-public python2-matplotlib
3947 (let ((matplotlib (package-with-python2
3948 (strip-python2-variant python-matplotlib))))
3949 (package (inherit matplotlib)
3950 ;; Make sure to use special packages for Python 2 instead
3951 ;; of those automatically rewritten by package-with-python2.
3952 (propagated-inputs
3953 `(("python2-pycairo" ,python2-pycairo)
3954 ("python2-functools32" ,python2-functools32)
3955 ("python2-pygobject-2" ,python2-pygobject-2)
3956 ("python2-subprocess32" ,python2-subprocess32)
3957 ("python2-tkinter" ,python-2 "tk")
3958 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3959 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3960
3961 (define-public python-matplotlib-documentation
3962 (package
3963 (name "python-matplotlib-documentation")
3964 (version (package-version python-matplotlib))
3965 (source (package-source python-matplotlib))
3966 (build-system python-build-system)
3967 (native-inputs
3968 `(("python-matplotlib" ,python-matplotlib)
3969 ("python-colorspacious" ,python-colorspacious)
3970 ("python-sphinx" ,python-sphinx)
3971 ("python-numpydoc" ,python-numpydoc)
3972 ("python-ipython" ,python-ipython)
3973 ("python-mock" ,python-mock)
3974 ("graphviz" ,graphviz)
3975 ("texlive" ,texlive)
3976 ("texinfo" ,texinfo)
3977 ,@(package-native-inputs python-matplotlib)))
3978 (arguments
3979 `(#:tests? #f ; we're only generating documentation
3980 #:phases
3981 (modify-phases %standard-phases
3982 (replace 'build
3983 (lambda _
3984 (chdir "doc")
3985 ;; Produce pdf in 'A4' format.
3986 (substitute* "conf.py"
3987 (("latex_paper_size = 'letter'") "")
3988 ;; latex_paper_size is deprecated -> set paper size using
3989 ;; latex_elements
3990 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3991 ;; insert at a point where latex_elements{} is defined:
3992 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3993 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3994 (replace 'install
3995 (lambda* (#:key inputs outputs #:allow-other-keys)
3996 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3997 (doc (string-append data "/doc/python-matplotlib-" ,version))
3998 (info (string-append data "/info"))
3999 (html (string-append doc "/html")))
4000 (mkdir-p html)
4001 (mkdir-p info)
4002 (copy-recursively "build/html" html)
4003 (symlink (string-append html "/_images")
4004 (string-append info "/matplotlib-figures"))
4005 (with-directory-excursion "build/texinfo"
4006 (substitute* "matplotlib.texi"
4007 (("@image\\{([^,]*)" all file)
4008 (string-append "@image{matplotlib-figures/" file)))
4009 (symlink (string-append html "/_images")
4010 "./matplotlib-figures")
4011 (system* "makeinfo" "--no-split"
4012 "-o" "matplotlib.info" "matplotlib.texi"))
4013 (copy-file "build/texinfo/matplotlib.info"
4014 (string-append info "/matplotlib.info"))
4015 (copy-file "build/latex/Matplotlib.pdf"
4016 (string-append doc "/Matplotlib.pdf")))
4017 #t)))))
4018 (home-page (package-home-page python-matplotlib))
4019 (synopsis "Documentation for the python-matplotlib package")
4020 (description (package-description python-matplotlib))
4021 (license (package-license python-matplotlib))))
4022
4023 (define-public python2-matplotlib-documentation
4024 (package-with-python2 python-matplotlib-documentation))
4025
4026 (define-public python2-pysnptools
4027 (package
4028 (name "python2-pysnptools")
4029 (version "0.3.9")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (pypi-uri "pysnptools" version ".zip"))
4034 (sha256
4035 (base32
4036 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4037 (build-system python-build-system)
4038 (arguments
4039 `(#:python ,python-2)) ; only Python 2.7 is supported
4040 (propagated-inputs
4041 `(("python2-numpy" ,python2-numpy)
4042 ("python2-scipy" ,python2-scipy)
4043 ("python2-pandas" ,python2-pandas)))
4044 (native-inputs
4045 `(("python2-cython" ,python2-cython)))
4046 (native-inputs
4047 `(("unzip" ,unzip)))
4048 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4049 (synopsis "Library for reading and manipulating genetic data")
4050 (description
4051 "PySnpTools is a library for reading and manipulating genetic data. It
4052 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4053 those files. It can also efficiently manipulate ranges of integers using set
4054 operators such as union, intersection, and difference.")
4055 (license license:asl2.0)))
4056
4057 (define-public python-rpy2
4058 (package
4059 (name "python-rpy2")
4060 (version "2.7.6")
4061 (source
4062 (origin
4063 (method url-fetch)
4064 (uri (pypi-uri "rpy2" version))
4065 (sha256
4066 (base32
4067 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4068 (build-system python-build-system)
4069 (arguments
4070 '(#:phases
4071 (modify-phases %standard-phases
4072 (delete 'check)
4073 (add-after 'install 'check
4074 (lambda* (#:key outputs inputs #:allow-other-keys)
4075 ;; It's easier to run tests after install.
4076 ;; Make installed package available for running the tests
4077 (add-installed-pythonpath inputs outputs)
4078 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4079 (propagated-inputs
4080 `(("python-six" ,python-six)))
4081 (inputs
4082 `(("readline" ,readline)
4083 ("icu4c" ,icu4c)
4084 ("pcre" ,pcre)
4085 ("r" ,r)))
4086 (native-inputs
4087 `(("zlib" ,zlib)))
4088 (home-page "http://rpy.sourceforge.net/")
4089 (synopsis "Python interface to the R language")
4090 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4091 low-level interface to R from Python, a proposed high-level interface,
4092 including wrappers to graphical libraries, as well as R-like structures and
4093 functions.")
4094 (license license:gpl3+)))
4095
4096 (define-public python2-rpy2
4097 (let ((rpy2 (package-with-python2 python-rpy2)))
4098 (package (inherit rpy2)
4099 (propagated-inputs
4100 `(("python2-singledispatch" ,python2-singledispatch)
4101 ,@(package-propagated-inputs rpy2))))))
4102
4103 (define-public python-scipy
4104 (package
4105 (name "python-scipy")
4106 (version "0.18.1")
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4111 version ".tar.gz"))
4112 (file-name (string-append name "-" version ".tar.gz"))
4113 (sha256
4114 (base32
4115 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4116 (build-system python-build-system)
4117 (propagated-inputs
4118 `(("python-numpy" ,python-numpy)
4119 ("python-matplotlib" ,python-matplotlib)
4120 ("python-pyparsing" ,python-pyparsing)))
4121 (inputs
4122 `(("lapack" ,lapack)
4123 ("openblas" ,openblas)))
4124 (native-inputs
4125 `(("python-cython" ,python-cython)
4126 ("python-nose" ,python-nose)
4127 ("python-sphinx" ,python-sphinx)
4128 ("python-numpydoc" ,python-numpydoc)
4129 ("gfortran" ,gfortran)
4130 ("perl" ,perl)))
4131 (outputs '("out" "doc"))
4132 (arguments
4133 `(#:phases
4134 (modify-phases %standard-phases
4135 (add-before 'build 'configure-openblas
4136 (lambda* (#:key inputs #:allow-other-keys)
4137 (call-with-output-file "site.cfg"
4138 (lambda (port)
4139 (format port
4140 "[blas]
4141 libraries = openblas
4142 library_dirs = ~a/lib
4143 include_dirs = ~a/include
4144
4145 # backslash-n to make emacs happy
4146 \n[atlas]
4147 library_dirs = ~a/lib
4148 atlas_libs = openblas
4149 "
4150 (assoc-ref inputs "openblas")
4151 (assoc-ref inputs "openblas")
4152 (assoc-ref inputs "openblas"))))
4153 #t))
4154 (add-after 'install 'install-doc
4155 (lambda* (#:key inputs outputs #:allow-other-keys)
4156 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4157 (doc (string-append data "/doc/" ,name "-" ,version))
4158 (html (string-append doc "/html"))
4159 (pyver ,(string-append "PYVER=")))
4160 ;; Make installed package available for building the
4161 ;; documentation
4162 (add-installed-pythonpath inputs outputs)
4163 (with-directory-excursion "doc"
4164 ;; Fix generation of images for mathematical expressions.
4165 (substitute* (find-files "source" "conf\\.py")
4166 (("pngmath_use_preview = True")
4167 "pngmath_use_preview = False"))
4168 (mkdir-p html)
4169 (system* "make" "html" pyver)
4170 (with-directory-excursion "build/html"
4171 (for-each (lambda (file)
4172 (let* ((dir (dirname file))
4173 (tgt-dir (string-append html "/" dir)))
4174 (install-file file html)))
4175 (find-files "." ".*")))))
4176 #t))
4177 (add-after 'unpack 'fix-tests
4178 (lambda _
4179 (substitute* "scipy/integrate/tests/test_quadpack.py"
4180 (("libm.so") "libm.so.6"))
4181 #t))
4182 ;; Tests can only be run after the library has been installed and not
4183 ;; within the source directory.
4184 (delete 'check)
4185 (add-after 'install 'check
4186 (lambda* (#:key inputs outputs #:allow-other-keys)
4187 (add-installed-pythonpath inputs outputs)
4188 (with-directory-excursion "/tmp"
4189 (zero? (system* "python" "-c"
4190 "import scipy; scipy.test('full')")))
4191 #t)))))
4192 (home-page "http://www.scipy.org/")
4193 (synopsis "The Scipy library provides efficient numerical routines")
4194 (description "The SciPy library is one of the core packages that make up
4195 the SciPy stack. It provides many user-friendly and efficient numerical
4196 routines such as routines for numerical integration and optimization.")
4197 (properties `((python2-variant . ,(delay python2-scipy))))
4198 (license license:bsd-3)))
4199
4200 (define-public python2-scipy
4201 (package-with-python2
4202 (strip-python2-variant python-scipy)))
4203
4204 (define-public python-socksipy-branch
4205 (package
4206 (name "python-socksipy-branch")
4207 (version "1.01")
4208 (source
4209 (origin
4210 (method url-fetch)
4211 (uri (pypi-uri "SocksiPy-branch" version))
4212 (sha256
4213 (base32
4214 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4215 (build-system python-build-system)
4216 (arguments
4217 `(#:tests? #f)) ; There are no tests
4218 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4219 (synopsis "Python SOCKS module")
4220 (description
4221 "SocksiPy - A Python SOCKS client module. It provides a
4222 socket-like interface that supports connections to any TCP
4223 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4224 The original version was developed by Dan Haim, this is a
4225 branch created by Mario Vilas to address some open issues,
4226 as the original project seems to have been abandoned circa 2007.")
4227 (license license:bsd-3)))
4228
4229 (define-public python2-socksipy-branch
4230 (package-with-python2 python-socksipy-branch))
4231
4232 (define-public python-sqlalchemy
4233 (package
4234 (name "python-sqlalchemy")
4235 (version "1.0.12")
4236 (source
4237 (origin
4238 (method url-fetch)
4239 (uri (string-append "https://pypi.python.org/packages/source/S/"
4240 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4241 (sha256
4242 (base32
4243 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4244 (build-system python-build-system)
4245 (native-inputs
4246 `(("python-cython" ,python-cython) ;for c extensions
4247 ("python-pytest" ,python-pytest)
4248 ("python-mock" ,python-mock))) ;for tests
4249 (arguments
4250 `(#:phases (alist-replace
4251 'check
4252 (lambda _ (zero? (system* "py.test")))
4253 %standard-phases)))
4254 (home-page "http://www.sqlalchemy.org")
4255 (synopsis "Database abstraction library")
4256 (description
4257 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4258 gives application developers the full power and flexibility of SQL. It
4259 provides a full suite of well known enterprise-level persistence patterns,
4260 designed for efficient and high-performing database access, adapted into a
4261 simple and Pythonic domain language.")
4262 (license license:x11)))
4263
4264 (define-public python2-sqlalchemy
4265 (package-with-python2 python-sqlalchemy))
4266
4267 (define-public python-pycodestyle
4268 (package
4269 (name "python-pycodestyle")
4270 (version "2.0.0")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (pypi-uri "pycodestyle" version))
4275 (sha256
4276 (base32
4277 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4278 (build-system python-build-system)
4279 (home-page "https://pycodestyle.readthedocs.io/")
4280 (synopsis "Python style guide checker")
4281 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4282 Python code against some of the style conventions in
4283 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4284 (license license:expat)))
4285
4286 (define-public python2-pycodestyle
4287 (package-with-python2 python-pycodestyle))
4288
4289 (define-public python-orderedmultidict
4290 (package
4291 (name "python-orderedmultidict")
4292 (version "0.7.11")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (pypi-uri "orderedmultidict" version))
4297 (sha256
4298 (base32
4299 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4300 (build-system python-build-system)
4301 (arguments
4302 `(#:phases
4303 (modify-phases %standard-phases
4304 (add-after 'unpack 'fix-tests
4305 (lambda _
4306 ;; The package uses nosetest for running the tests.
4307 ;; Adding this initfile allows to run the test suite
4308 ;; without requiring nosetest.
4309 (zero? (system* "touch" "tests/__init__.py")))))))
4310 (propagated-inputs
4311 `(("python-six" ,python-six)))
4312 (native-inputs
4313 `(("python-pycodestyle" ,python-pycodestyle)))
4314 (home-page "https://github.com/gruns/orderedmultidict")
4315 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4316 (description "This package contains a library for ordered multivalue
4317 dictionaries. A multivalue dictionary is a dictionary that can store
4318 multiple values for the same key. An ordered multivalue dictionary is a
4319 multivalue dictionary that retains the order of insertions and deletions.")
4320 (license license:unlicense)))
4321
4322 (define-public python2-orderedmultidict
4323 (package-with-python2 python-orderedmultidict))
4324
4325 (define-public python-furl
4326 (package
4327 (name "python-furl")
4328 (version "0.5.6")
4329 (source
4330 (origin
4331 (method url-fetch)
4332 (uri (pypi-uri "furl" version))
4333 (sha256
4334 (base32
4335 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4336 (build-system python-build-system)
4337 (propagated-inputs
4338 `(("python-six" ,python-six)
4339 ("python-orderedmultidict" ,python-orderedmultidict)))
4340 (native-inputs
4341 `(("python-pycodestyle" ,python-pycodestyle)))
4342 (home-page "https://github.com/gruns/furl")
4343 (synopsis "URL manipulation in Python")
4344 (description "Furl provides an easy-to-use alternative to the
4345 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4346 (license license:unlicense)))
4347
4348 (define-public python2-furl
4349 (package-with-python2 python-furl))
4350
4351 (define-public python-flask-babel
4352 (package
4353 (name "python-flask-babel")
4354 (version "0.11.1")
4355 (source
4356 (origin
4357 (method url-fetch)
4358 (uri (pypi-uri "Flask-Babel" version))
4359 (sha256
4360 (base32
4361 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4362 (build-system python-build-system)
4363 (propagated-inputs
4364 `(("python-flask" ,python-flask)
4365 ("python-babel" ,python-babel)
4366 ("python-jinja2" ,python-jinja2)
4367 ("python-pytz" ,python-pytz)))
4368 (home-page "https://github.com/python-babel/flask-babel")
4369 (synopsis "Add i18n/l10n support to Flask applications")
4370 (description "This package implements internationalization and localization
4371 support for Flask. This is based on the Python babel module as well as pytz -
4372 both of which are installed automatically if you install this library.")
4373 (license license:bsd-3)))
4374
4375 (define-public python2-flask-babel
4376 (package-with-python2 python-flask-babel))
4377
4378 (define-public python-sqlalchemy-utils
4379 (package
4380 (name "python-sqlalchemy-utils")
4381 (version "0.32.11")
4382 (source
4383 (origin
4384 (method url-fetch)
4385 (uri (pypi-uri "SQLAlchemy-Utils" version))
4386 (sha256
4387 (base32
4388 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4389 (build-system python-build-system)
4390 (arguments
4391 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4392 ;; #:phases
4393 ;; (modify-phases %standard-phases
4394 ;; (replace 'check
4395 ;; (lambda _
4396 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4397 (propagated-inputs
4398 `(("python-six" ,python-six)
4399 ("python-sqlalchemy" ,python-sqlalchemy)))
4400 (native-inputs
4401 `(("python-dateutil" ,python-dateutil)
4402 ("python-flexmock" ,python-flexmock)
4403 ("python-psycopg2" ,python-psycopg2)
4404 ("python-pytest" ,python-pytest)
4405 ("python-pytz" ,python-pytz)))
4406 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4407 (synopsis "Various utility functions for SQLAlchemy")
4408 (description
4409 "SQLAlchemy-utils provides various utility functions and custom data types
4410 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4411
4412 You might also want to install the following optional dependencies:
4413 @enumerate
4414 @item @code{python-passlib}
4415 @item @code{python-babel}
4416 @item @code{python-cryptography}
4417 @item @code{python-pytz}
4418 @item @code{python-psycopg2}
4419 @item @code{python-furl}
4420 @item @code{python-flask-babel}
4421 @end enumerate
4422 ")
4423 (license license:bsd-3)))
4424
4425 (define-public python2-sqlalchemy-utils
4426 (package-with-python2 python-sqlalchemy-utils))
4427
4428 (define-public python-alembic
4429 (package
4430 (name "python-alembic")
4431 (version "0.8.10")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (pypi-uri "alembic" version))
4436 (sha256
4437 (base32
4438 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4439 (build-system python-build-system)
4440 (native-inputs
4441 `(("python-mock" ,python-mock)
4442 ("python-pytest-cov" ,python-pytest-cov)))
4443 (propagated-inputs
4444 `(("python-sqlalchemy" ,python-sqlalchemy)
4445 ("python-mako" ,python-mako)
4446 ("python-editor" ,python-editor)))
4447 (home-page "http://bitbucket.org/zzzeek/alembic")
4448 (synopsis
4449 "Database migration tool for SQLAlchemy")
4450 (description
4451 "Alembic is a lightweight database migration tool for usage with the
4452 SQLAlchemy Database Toolkit for Python.")
4453 (license license:expat)))
4454
4455 (define-public python2-alembic
4456 (package-with-python2 python-alembic))
4457
4458 (define-public python-autopep8
4459 (package
4460 (name "python-autopep8")
4461 (version "1.2.4")
4462 (source
4463 (origin
4464 (method url-fetch)
4465 (uri (pypi-uri "autopep8" version))
4466 (sha256
4467 (base32
4468 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4469 (build-system python-build-system)
4470 (propagated-inputs
4471 `(("python-pep8" ,python-pep8)))
4472 (home-page "https://github.com/hhatto/autopep8")
4473 (synopsis "Format Python code according to the PEP 8 style guide")
4474 (description
4475 "@code{autopep8} automatically formats Python code to conform to
4476 the PEP 8 style guide. It uses the pycodestyle utility to determine
4477 what parts of the code needs to be formatted. @code{autopep8} is
4478 capable of fixing most of the formatting issues that can be reported
4479 by pycodestyle.")
4480 (license (license:non-copyleft
4481 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4482
4483 (define-public python2-autopep8
4484 (package-with-python2 python-autopep8))
4485
4486 (define-public python-distutils-extra
4487 (package
4488 (name "python-distutils-extra")
4489 (version "2.38")
4490 (source
4491 (origin
4492 (method url-fetch)
4493 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4494 version "/+download/python-distutils-extra-"
4495 version ".tar.gz"))
4496 (sha256
4497 (base32
4498 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4499 (build-system python-build-system)
4500 (home-page "https://launchpad.net/python-distutils-extra/")
4501 (synopsis "Enhancements to Python's distutils")
4502 (description
4503 "The python-distutils-extra module enables you to easily integrate
4504 gettext support, themed icons, and scrollkeeper-based documentation into
4505 Python's distutils.")
4506 (license license:gpl2)))
4507
4508 (define-public python2-distutils-extra
4509 (package-with-python2 python-distutils-extra))
4510
4511 (define-public python2-elib.intl
4512 (package
4513 (name "python2-elib.intl")
4514 (version "0.0.3")
4515 (source
4516 (origin
4517 ;; This project doesn't tag releases or publish tarballs, so we take
4518 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4519 (method git-fetch)
4520 (uri (git-reference
4521 (url "https://github.com/dieterv/elib.intl.git")
4522 (commit "d09997cfef")))
4523 (sha256
4524 (base32
4525 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4526 (build-system python-build-system)
4527 (arguments
4528 ;; incompatible with Python 3 (exception syntax)
4529 `(#:python ,python-2
4530 #:tests? #f))
4531 (home-page "https://github.com/dieterv/elib.intl")
4532 (synopsis "Enhanced internationalization for Python")
4533 (description
4534 "The elib.intl module provides enhanced internationalization (I18N)
4535 services for your Python modules and applications.")
4536 (license license:lgpl3+)))
4537
4538 (define-public python-pillow
4539 (package
4540 (name "python-pillow")
4541 (version "3.3.3")
4542 (source
4543 (origin
4544 (method url-fetch)
4545 (uri (pypi-uri "Pillow" version))
4546 (sha256
4547 (base32
4548 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4549 (build-system python-build-system)
4550 (native-inputs
4551 `(("python-nose" ,python-nose)))
4552 (inputs
4553 `(("freetype" ,freetype)
4554 ("lcms" ,lcms)
4555 ("zlib" ,zlib)
4556 ("libjpeg" ,libjpeg)
4557 ("openjpeg" ,openjpeg)
4558 ("libtiff" ,libtiff)
4559 ("libwebp" ,libwebp)))
4560 (arguments
4561 `(#:phases (modify-phases %standard-phases
4562 (add-after
4563 'install 'check-installed
4564 (lambda* (#:key outputs inputs #:allow-other-keys)
4565 (begin
4566 (setenv "HOME" (getcwd))
4567 ;; Make installed package available for running the
4568 ;; tests
4569 (add-installed-pythonpath inputs outputs)
4570 (and (zero? (system* "python" "selftest.py"
4571 "--installed"))
4572 (zero? (system* "python" "test-installed.py"))))))
4573 (delete 'check))))
4574 (home-page "https://pypi.python.org/pypi/Pillow")
4575 (synopsis "Fork of the Python Imaging Library")
4576 (description
4577 "The Python Imaging Library adds image processing capabilities to your
4578 Python interpreter. This library provides extensive file format support, an
4579 efficient internal representation, and fairly powerful image processing
4580 capabilities. The core image library is designed for fast access to data
4581 stored in a few basic pixel formats. It should provide a solid foundation for
4582 a general image processing tool.")
4583 (license (license:x11-style
4584 "http://www.pythonware.com/products/pil/license.htm"
4585 "The PIL Software License"))))
4586
4587 (define-public python2-pillow
4588 (package-with-python2 python-pillow))
4589
4590 (define-public python-pycparser
4591 (package
4592 (name "python-pycparser")
4593 (version "2.17")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (pypi-uri "pycparser" version))
4598 (sha256
4599 (base32
4600 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4601 (outputs '("out" "doc"))
4602 (build-system python-build-system)
4603 (native-inputs
4604 `(("pkg-config" ,pkg-config)))
4605 (arguments
4606 `(#:phases
4607 (modify-phases %standard-phases
4608 (replace 'check
4609 (lambda _
4610 (with-directory-excursion "tests"
4611 (zero? (system* "python" "all_tests.py")))))
4612 (add-after 'install 'install-doc
4613 (lambda* (#:key outputs #:allow-other-keys)
4614 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4615 (doc (string-append data "/doc/" ,name "-" ,version))
4616 (examples (string-append doc "/examples")))
4617 (mkdir-p examples)
4618 (for-each (lambda (file)
4619 (copy-file (string-append "." file)
4620 (string-append doc file)))
4621 '("/README.rst" "/CHANGES" "/LICENSE"))
4622 (copy-recursively "examples" examples)))))))
4623 (home-page "https://github.com/eliben/pycparser")
4624 (synopsis "C parser in Python")
4625 (description
4626 "Pycparser is a complete parser of the C language, written in pure Python
4627 using the PLY parsing library. It parses C code into an AST and can serve as
4628 a front-end for C compilers or analysis tools.")
4629 (license license:bsd-3)))
4630
4631 (define-public python2-pycparser
4632 (package-with-python2 python-pycparser))
4633
4634 (define-public python-cffi
4635 (package
4636 (name "python-cffi")
4637 (version "1.4.2")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "cffi" version))
4642 (sha256
4643 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4644 (build-system python-build-system)
4645 (outputs '("out" "doc"))
4646 (inputs
4647 `(("libffi" ,libffi)))
4648 (propagated-inputs ; required at run-time
4649 `(("python-pycparser" ,python-pycparser)))
4650 (native-inputs
4651 `(("pkg-config" ,pkg-config)
4652 ("python-sphinx" ,python-sphinx)
4653 ("python-pytest" ,python-pytest)))
4654 (arguments
4655 `(#:phases
4656 (alist-cons-after
4657 'install 'install-doc
4658 (lambda* (#:key outputs #:allow-other-keys)
4659 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4660 (doc (string-append data "/doc/" ,name "-" ,version))
4661 (html (string-append doc "/html")))
4662 (with-directory-excursion "doc"
4663 (system* "make" "html")
4664 (mkdir-p html)
4665 (copy-recursively "build/html" html))
4666 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4667 %standard-phases)))
4668 (home-page "http://cffi.readthedocs.org")
4669 (synopsis "Foreign function interface for Python")
4670 (description
4671 "Foreign Function Interface for Python calling C code.")
4672 (license license:expat)))
4673
4674 (define-public python2-cffi
4675 (package-with-python2 python-cffi))
4676
4677 (define-public python-xcffib
4678 (package
4679 (name "python-xcffib")
4680 (version "0.1.9")
4681 (source
4682 (origin
4683 (method url-fetch)
4684 (uri (string-append "https://pypi.python.org/packages/source/x/"
4685 "xcffib/xcffib-" version ".tar.gz"))
4686 (sha256
4687 (base32
4688 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4689 (build-system python-build-system)
4690 (inputs
4691 `(("libxcb" ,libxcb)))
4692 (propagated-inputs
4693 `(("python-cffi" ,python-cffi) ; used at run time
4694 ("python-six" ,python-six)))
4695 (arguments
4696 `(;; FIXME: Tests cannot load libxcb.so.1
4697 #:tests? #f
4698 #:phases
4699 (modify-phases %standard-phases
4700 (add-after 'install 'install-doc
4701 (lambda* (#:key outputs #:allow-other-keys)
4702 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4703 "/doc/" ,name "-" ,version)))
4704 (mkdir-p doc)
4705 (copy-file "README.md"
4706 (string-append doc "/README.md"))
4707 #t))))))
4708 (home-page "https://github.com/tych0/xcffib")
4709 (synopsis "XCB Python bindings")
4710 (description
4711 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4712 support for Python 3 and PyPy. It is based on cffi.")
4713 (license license:expat)))
4714
4715 (define-public python2-xcffib
4716 (package-with-python2 python-xcffib))
4717
4718 (define-public python-cairocffi
4719 (package
4720 (name "python-cairocffi")
4721 (version "0.6")
4722 (source
4723 (origin
4724 (method url-fetch)
4725 ;; The archive on pypi is missing the 'utils' directory!
4726 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4727 version ".tar.gz"))
4728 (file-name (string-append name "-" version ".tar.gz"))
4729 (sha256
4730 (base32
4731 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4732 (build-system python-build-system)
4733 (outputs '("out" "doc"))
4734 (inputs
4735 `(("gdk-pixbuf" ,gdk-pixbuf)
4736 ("cairo" ,cairo)))
4737 (native-inputs
4738 `(("pkg-config" ,pkg-config)
4739 ("python-sphinx" ,python-sphinx)
4740 ("python-docutils" ,python-docutils)))
4741 (propagated-inputs
4742 `(("python-xcffib" ,python-xcffib))) ; used at run time
4743 (arguments
4744 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4745 #:tests? #f
4746 #:phases
4747 (modify-phases %standard-phases
4748 (add-after 'install 'install-doc
4749 (lambda* (#:key inputs outputs #:allow-other-keys)
4750 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4751 (doc (string-append data "/doc/" ,name "-" ,version))
4752 (html (string-append doc "/html")))
4753 (setenv "LD_LIBRARY_PATH"
4754 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4755 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4756 (setenv "LANG" "en_US.UTF-8")
4757 (mkdir-p html)
4758 (for-each (lambda (file)
4759 (copy-file (string-append "." file)
4760 (string-append doc file)))
4761 '("/README.rst" "/CHANGES" "/LICENSE"))
4762 (system* "python" "setup.py" "build_sphinx")
4763 (copy-recursively "docs/_build/html" html)
4764 #t))))))
4765 (home-page "https://github.com/SimonSapin/cairocffi")
4766 (synopsis "Python bindings and object-oriented API for Cairo")
4767 (description
4768 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4769 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4770 graphics library with support for multiple backends including image buffers,
4771 PNG, PostScript, PDF, and SVG file output.")
4772 (license license:bsd-3)))
4773
4774 (define-public python2-cairocffi
4775 (package-with-python2 python-cairocffi))
4776
4777 (define-public python-decorator
4778 (package
4779 (name "python-decorator")
4780 (version "4.0.10")
4781 (source
4782 (origin
4783 (method url-fetch)
4784 (uri (pypi-uri "decorator" version))
4785 (sha256
4786 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4787 (build-system python-build-system)
4788 (arguments '(#:tests? #f)) ; no test target
4789 (home-page "https://pypi.python.org/pypi/decorator/")
4790 (synopsis "Python module to simplify usage of decorators")
4791 (description
4792 "The aim of the decorator module is to simplify the usage of decorators
4793 for the average programmer, and to popularize decorators usage giving examples
4794 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4795 etc. The core of this module is a decorator factory.")
4796 (license license:expat)))
4797
4798 (define-public python2-decorator
4799 (package-with-python2 python-decorator))
4800
4801 (define-public python-drmaa
4802 (package
4803 (name "python-drmaa")
4804 (version "0.7.6")
4805 (source
4806 (origin
4807 (method url-fetch)
4808 (uri (string-append
4809 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4810 version ".tar.gz"))
4811 (sha256
4812 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4813 (build-system python-build-system)
4814 ;; The test suite requires libdrmaa which is provided by the cluster
4815 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4816 ;; should be set to the path of the libdrmaa library.
4817 (arguments '(#:tests? #f))
4818 (native-inputs
4819 `(("python-nose" ,python-nose)))
4820 (home-page "https://pypi.python.org/pypi/drmaa")
4821 (synopsis "Python bindings for the DRMAA library")
4822 (description
4823 "A Python package for Distributed Resource Management (DRM) job
4824 submission and control. This package is an implementation of the DRMAA 1.0
4825 Python language binding specification.")
4826 (license license:bsd-3)))
4827
4828 (define-public python2-drmaa
4829 (package-with-python2 python-drmaa))
4830
4831 (define-public python-gridmap
4832 (package
4833 (name "python-gridmap")
4834 (version "0.13.0")
4835 (source
4836 (origin
4837 (method url-fetch)
4838 (uri (string-append
4839 "https://github.com/pygridtools/gridmap/archive/v"
4840 version ".tar.gz"))
4841 (file-name (string-append name "-" version ".tar.gz"))
4842 (sha256
4843 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4844 (build-system python-build-system)
4845 (arguments
4846 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4847 (propagated-inputs
4848 `(("python-psutil" ,python-psutil)
4849 ("python-drmaa" ,python-drmaa)
4850 ("python-pyzmq" ,python-pyzmq)))
4851 (home-page "https://github.com/pygridtools/gridmap")
4852 (synopsis "Create jobs on a cluster directly from Python")
4853 (description
4854 "Gridmap is a Python package to allow you to easily create jobs on the
4855 cluster directly from Python. You can directly map Python functions onto the
4856 cluster without needing to write any wrapper code yourself.")
4857 (license license:gpl3+)))
4858
4859 (define-public python2-gridmap
4860 (package-with-python2 python-gridmap))
4861
4862 (define-public python-pexpect
4863 (package
4864 (name "python-pexpect")
4865 (version "4.2.1")
4866 (source
4867 (origin
4868 (method url-fetch)
4869 (uri (pypi-uri "pexpect" version))
4870 (sha256
4871 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4872 (build-system python-build-system)
4873 (arguments
4874 `(#:phases
4875 (modify-phases %standard-phases
4876 (add-before 'check 'prepare-tests
4877 (lambda _
4878 (substitute* (find-files "tests")
4879 (("/bin/ls") (which "ls"))
4880 (("/bin/echo") (which "echo"))
4881 (("/bin/which") (which "which"))
4882 ;; Many tests try to use the /bin directory which
4883 ;; is not present in the build environment.
4884 ;; Use one that's non-empty and unlikely to change.
4885 (("/bin'") "/dev'"))
4886 ;; XXX: Socket connection test gets "Connection reset by peer".
4887 ;; Why does it not work? Delete for now.
4888 (delete-file "tests/test_socket.py")
4889 #t))
4890 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4891 (native-inputs
4892 `(("python-nose" ,python-nose)
4893 ("python-pytest" ,python-pytest)
4894 ("man-db" ,man-db)
4895 ("which" ,which)))
4896 (propagated-inputs
4897 `(("python-ptyprocess" ,python-ptyprocess)))
4898 (home-page "http://pexpect.readthedocs.org/")
4899 (synopsis "Controlling interactive console applications")
4900 (description
4901 "Pexpect is a pure Python module for spawning child applications;
4902 controlling them; and responding to expected patterns in their output.
4903 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4904 child application and control it as if a human were typing commands.")
4905 (license license:isc)))
4906
4907 (define-public python2-pexpect
4908 (package-with-python2 python-pexpect))
4909
4910 (define-public python-setuptools-scm
4911 (package
4912 (name "python-setuptools-scm")
4913 (version "1.15.0")
4914 (source (origin
4915 (method url-fetch)
4916 (uri (pypi-uri "setuptools_scm" version))
4917 (sha256
4918 (base32
4919 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4920 (build-system python-build-system)
4921 (home-page "https://github.com/pypa/setuptools_scm/")
4922 (synopsis "Manage Python package versions in SCM metadata")
4923 (description
4924 "Setuptools_scm handles managing your Python package versions in
4925 @dfn{software configuration management} (SCM) metadata instead of declaring
4926 them as the version argument or in a SCM managed file.")
4927 (license license:expat)))
4928
4929 (define-public python2-setuptools-scm
4930 (package-with-python2 python-setuptools-scm))
4931
4932 (define-public python-pathpy
4933 (package
4934 (name "python-pathpy")
4935 (version "8.1.1")
4936 (source
4937 (origin
4938 (method url-fetch)
4939 (uri (string-append "https://pypi.python.org/packages/source/p/"
4940 "path.py/path.py-" version ".tar.gz"))
4941 (sha256
4942 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4943 (outputs '("out" "doc"))
4944 (build-system python-build-system)
4945 (propagated-inputs
4946 `(("python-appdirs" ,python-appdirs)))
4947 (native-inputs
4948 `(("python-setuptools-scm" ,python-setuptools-scm)
4949 ("python-sphinx" ,python-sphinx)
4950 ("python-rst.linker" ,python-rst.linker)
4951 ("python-pytest" ,python-pytest)
4952 ("python-pytest-runner" ,python-pytest-runner)))
4953 (arguments
4954 `(#:phases
4955 (modify-phases %standard-phases
4956 (add-after 'build 'build-doc
4957 (lambda _
4958 (setenv "LANG" "en_US.UTF-8")
4959 (zero? (system* "python" "setup.py" "build_sphinx"))))
4960 (add-after 'install 'install-doc
4961 (lambda* (#:key outputs #:allow-other-keys)
4962 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4963 (doc (string-append data "/doc/" ,name "-" ,version))
4964 (html (string-append doc "/html")))
4965 (mkdir-p html)
4966 (for-each (lambda (file)
4967 (copy-file file (string-append doc "/" file)))
4968 '("README.rst" "CHANGES.rst"))
4969 (copy-recursively "build/sphinx/html" html)))))))
4970 (home-page "http://github.com/jaraco/path.py")
4971 (synopsis "Python module wrapper for built-in os.path")
4972 (description
4973 "@code{path.py} implements path objects as first-class entities, allowing
4974 common operations on files to be invoked on those path objects directly.")
4975 (license license:expat)))
4976
4977 (define-public python2-pathpy
4978 (package-with-python2 python-pathpy))
4979
4980 (define-public python-pickleshare
4981 (package
4982 (name "python-pickleshare")
4983 (version "0.5")
4984 (source
4985 (origin
4986 (method url-fetch)
4987 (uri (string-append "https://pypi.python.org/packages/source/p/"
4988 "pickleshare/pickleshare-" version ".tar.gz"))
4989 (sha256
4990 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4991 (build-system python-build-system)
4992 (propagated-inputs
4993 `(("python-pathpy" ,python-pathpy)))
4994 (home-page "https://github.com/vivainio/pickleshare")
4995 (synopsis "Tiny key value database with concurrency support")
4996 (description
4997 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4998 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4999 shelve, many processes can access the database simultaneously. Changing a
5000 value in database is immediately visible to other processes accessing the same
5001 database. Concurrency is possible because the values are stored in separate
5002 files. Hence the “database” is a directory where all files are governed by
5003 PickleShare.")
5004 (license license:expat)))
5005
5006 (define-public python2-pickleshare
5007 (package-with-python2 python-pickleshare))
5008
5009 (define-public python-simplegeneric
5010 (package
5011 (name "python-simplegeneric")
5012 (version "0.8.1")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (string-append "https://pypi.python.org/packages/source/s/"
5017 "simplegeneric/simplegeneric-" version ".zip"))
5018 (sha256
5019 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5020 (build-system python-build-system)
5021 (native-inputs
5022 `(("unzip" ,unzip)))
5023 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5024 (synopsis "Python module for simple generic functions")
5025 (description
5026 "The simplegeneric module lets you define simple single-dispatch generic
5027 functions, akin to Python’s built-in generic functions like @code{len()},
5028 @code{iter()} and so on. However, instead of using specially-named methods,
5029 these generic functions use simple lookup tables, akin to those used by
5030 e.g. @code{pickle.dump()} and other generic functions found in the Python
5031 standard library.")
5032 (license license:zpl2.1)))
5033
5034 (define-public python2-simplegeneric
5035 (package-with-python2 python-simplegeneric))
5036
5037 (define-public python-ipython-genutils
5038 ;; TODO: This package is retired, check if can be removed, see description.
5039 (package
5040 (name "python-ipython-genutils")
5041 (version "0.1.0")
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (string-append "https://pypi.python.org/packages/source/i/"
5046 "ipython_genutils/ipython_genutils-"
5047 version ".tar.gz"))
5048 (sha256
5049 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5050 (build-system python-build-system)
5051 (arguments `(#:tests? #f)) ; no tests
5052 (home-page "http://ipython.org")
5053 (synopsis "Vestigial utilities from IPython")
5054 (description
5055 "This package provides retired utilities from IPython. No packages
5056 outside IPython/Jupyter should depend on it.
5057
5058 This package shouldn't exist. It contains some common utilities shared by
5059 Jupyter and IPython projects during The Big Split. As soon as possible, those
5060 packages will remove their dependency on this, and this package will go
5061 away.")
5062 (license license:bsd-3)))
5063
5064 (define-public python2-ipython-genutils
5065 (package-with-python2 python-ipython-genutils))
5066
5067 (define-public python-traitlets
5068 (package
5069 (name "python-traitlets")
5070 (version "4.2.0")
5071 (source
5072 (origin
5073 (method url-fetch)
5074 (uri (pypi-uri "traitlets" version))
5075 (sha256
5076 (base32
5077 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5078 (build-system python-build-system)
5079 (arguments
5080 `(#:phases
5081 (modify-phases %standard-phases
5082 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5083 (propagated-inputs
5084 `(("python-ipython-genutils" ,python-ipython-genutils)
5085 ("python-decorator" ,python-decorator)))
5086 (native-inputs
5087 `(("python-mock" ,python-mock)
5088 ("python-nose" ,python-nose)))
5089 (home-page "http://ipython.org")
5090 (synopsis "Configuration system for Python applications")
5091 (description
5092 "Traitlets is a framework that lets Python classes have attributes with
5093 type checking, dynamically calculated default values, and ‘on change’
5094 callbacks. The package also includes a mechanism to use traitlets for
5095 configuration, loading values from files or from command line arguments. This
5096 is a distinct layer on top of traitlets, so you can use traitlets in your code
5097 without using the configuration machinery.")
5098 (license license:bsd-3)))
5099
5100 (define-public python2-traitlets
5101 (package-with-python2 python-traitlets))
5102
5103 (define-public python-jupyter-core
5104 (package
5105 (name "python-jupyter-core")
5106 (version "4.2.1")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (string-append (pypi-uri "jupyter_core" version)))
5111 (sha256
5112 (base32
5113 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5114 (build-system python-build-system)
5115 ;; FIXME: not sure how to run the tests
5116 (arguments `(#:tests? #f))
5117 (propagated-inputs
5118 `(("python-traitlets" ,python-traitlets)))
5119 (home-page "http://jupyter.org/")
5120 (synopsis "Jupyter base package")
5121 (description
5122 "Jupyter core is the base package on which Jupyter projects rely.")
5123 (license license:bsd-3)))
5124
5125 (define-public python2-jupyter-core
5126 (package-with-python2 python-jupyter-core))
5127
5128 (define-public python-jupyter-client
5129 (package
5130 (name "python-jupyter-client")
5131 (version "4.4.0")
5132 (source
5133 (origin
5134 (method url-fetch)
5135 (uri (pypi-uri "jupyter_client" version))
5136 (sha256
5137 (base32
5138 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5139 (build-system python-build-system)
5140 ;; Tests fail because of missing native python kernel which I assume is
5141 ;; provided by the ipython package, which we cannot use because it would
5142 ;; cause a dependency cycle.
5143 (arguments `(#:tests? #f))
5144 (propagated-inputs
5145 `(("python-pyzmq" ,python-pyzmq)
5146 ("python-traitlets" ,python-traitlets)
5147 ("python-jupyter-core" ,python-jupyter-core)))
5148 (home-page "http://jupyter.org/")
5149 (synopsis "Jupyter protocol implementation and client libraries")
5150 (description
5151 "The @code{jupyter_client} package contains the reference implementation
5152 of the Jupyter protocol. It also provides client and kernel management APIs
5153 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5154 installing @code{kernelspec}s for use with Jupyter frontends.")
5155 (license license:bsd-3)))
5156
5157 (define-public python2-jupyter-client
5158 (package-with-python2 python-jupyter-client))
5159
5160 (define-public python-ipykernel
5161 (package
5162 (name "python-ipykernel")
5163 (version "4.5.2")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (pypi-uri "ipykernel" version))
5168 (sha256
5169 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5170 (build-system python-build-system)
5171 ;; The tests load a submodule of IPython. However, IPython itself depends
5172 ;; on ipykernel.
5173 (arguments `(#:tests? #f))
5174 (propagated-inputs
5175 ;; imported at runtime during connect
5176 `(("python-jupyter-client" ,python-jupyter-client)))
5177 (home-page "http://ipython.org")
5178 (synopsis "IPython Kernel for Jupyter")
5179 (description
5180 "This package provides the IPython kernel for Jupyter.")
5181 (license license:bsd-3)))
5182
5183 (define-public python2-ipykernel
5184 (package-with-python2 python-ipykernel))
5185
5186 (define-public python-testpath
5187 (package
5188 (name "python-testpath")
5189 (version "0.2")
5190 (source
5191 (origin
5192 (method url-fetch)
5193 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5194 version ".tar.gz"))
5195 (file-name (string-append name "-" version ".tar.gz"))
5196 (sha256
5197 (base32
5198 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5199 (build-system python-build-system)
5200 (arguments
5201 `(#:tests? #f ; this package does not even have a setup.py
5202 #:modules ((guix build python-build-system)
5203 (guix build utils)
5204 (srfi srfi-1))
5205 #:imported-modules (,@%python-build-system-modules
5206 (srfi srfi-1))
5207 #:phases
5208 (modify-phases %standard-phases
5209 (delete 'install)
5210 (replace 'build
5211 (lambda* (#:key inputs outputs #:allow-other-keys)
5212 (let* ((version (last
5213 (string-split (assoc-ref inputs "python") #\-)))
5214 (x.y (string-join (take (string-split version #\.) 2)
5215 "."))
5216 (dir (string-append
5217 (assoc-ref outputs "out")
5218 "/lib/python" x.y "/site-packages/testpath")))
5219 (mkdir-p dir)
5220 (copy-recursively "testpath" dir))
5221 #t)))))
5222 (home-page "https://github.com/takluyver/testpath")
5223 (synopsis "Test utilities for code working with files and commands")
5224 (description
5225 "Testpath is a collection of utilities for Python code working with files
5226 and commands. It contains functions to check things on the filesystem, and
5227 tools for mocking system commands and recording calls to those.")
5228 (license license:expat)))
5229
5230 (define-public python2-testpath
5231 (package-with-python2 python-testpath))
5232
5233 (define-public python-ipython
5234 (package
5235 (name "python-ipython")
5236 (version "5.2.2")
5237 (source
5238 (origin
5239 (method url-fetch)
5240 (uri (pypi-uri "ipython" version ".tar.gz"))
5241 (sha256
5242 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5243 (build-system python-build-system)
5244 (outputs '("out" "doc"))
5245 (propagated-inputs
5246 `(("python-pyzmq" ,python-pyzmq)
5247 ("python-prompt-toolkit" ,python-prompt-toolkit)
5248 ("python-terminado" ,python-terminado)
5249 ("python-matplotlib" ,python-matplotlib)
5250 ("python-numpy" ,python-numpy)
5251 ("python-numpydoc" ,python-numpydoc)
5252 ("python-jinja2" ,python-jinja2)
5253 ("python-mistune" ,python-mistune)
5254 ("python-pexpect" ,python-pexpect)
5255 ("python-pickleshare" ,python-pickleshare)
5256 ("python-simplegeneric" ,python-simplegeneric)
5257 ("python-jsonschema" ,python-jsonschema)
5258 ("python-traitlets" ,python-traitlets)
5259 ("python-ipykernel" ,python-ipykernel)
5260 ("python-nbformat" ,python-nbformat)
5261 ("python-pygments" ,python-pygments)))
5262 (inputs
5263 `(("readline" ,readline)
5264 ("which" ,which)))
5265 (native-inputs
5266 `(("graphviz" ,graphviz)
5267 ("pkg-config" ,pkg-config)
5268 ("python-requests" ,python-requests) ;; for tests
5269 ("python-testpath" ,python-testpath)
5270 ("python-nose" ,python-nose)
5271 ("python-sphinx" ,python-sphinx)
5272 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5273 ("texlive" ,texlive)
5274 ("texinfo" ,texinfo)))
5275 (arguments
5276 `(#:phases
5277 (modify-phases %standard-phases
5278 (add-after
5279 'install 'install-doc
5280 (lambda* (#:key inputs outputs #:allow-other-keys)
5281 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5282 (doc (string-append data "/doc/" ,name "-" ,version))
5283 (html (string-append doc "/html"))
5284 (man1 (string-append data "/man/man1"))
5285 (info (string-append data "/info"))
5286 (examples (string-append doc "/examples"))
5287 (python-arg (string-append "PYTHON=" (which "python"))))
5288 (setenv "LANG" "en_US.utf8")
5289 ;; Make installed package available for running the tests
5290 (add-installed-pythonpath inputs outputs)
5291 (with-directory-excursion "docs"
5292 ;; FIXME: pdf fails to build
5293 ;;(system* "make" "pdf" "PAPER=a4")
5294 (system* "make" python-arg "html")
5295 (system* "make" python-arg "info"))
5296 (copy-recursively "docs/man" man1)
5297 (copy-recursively "examples" examples)
5298 (copy-recursively "docs/build/html" html)
5299 ;; (copy-file "docs/build/latex/ipython.pdf"
5300 ;; (string-append doc "/ipython.pdf"))
5301 (mkdir-p info)
5302 (copy-file "docs/build/texinfo/ipython.info"
5303 (string-append info "/ipython.info"))
5304 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5305 ;; Tests can only be run after the library has been installed and not
5306 ;; within the source directory.
5307 (delete 'check)
5308 (add-after
5309 'install 'check
5310 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5311 (if tests?
5312 (with-directory-excursion "/tmp"
5313 ;; Make installed package available for running the tests
5314 (add-installed-pythonpath inputs outputs)
5315 (setenv "HOME" "/tmp/") ;; required by a test
5316 (zero? (system* (string-append (assoc-ref outputs "out")
5317 "/bin/iptest"))))
5318 #t)))
5319 (add-before
5320 'install 'fix-tests
5321 (lambda* (#:key inputs #:allow-other-keys)
5322 (substitute* "./IPython/utils/_process_posix.py"
5323 (("/usr/bin/env', 'which") (which "which")))
5324 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5325 (("#!/usr/bin/env python")
5326 (string-append "#!" (which "python"))))
5327 ;; Disable 1 failing test
5328 (substitute* "./IPython/core/tests/test_magic.py"
5329 (("def test_dirops\\(\\):" all)
5330 (string-append "@dec.skipif(True)\n" all))))))))
5331 (home-page "http://ipython.org")
5332 (synopsis "IPython is a tool for interactive computing in Python")
5333 (description
5334 "IPython provides a rich architecture for interactive computing with:
5335 Powerful interactive shells, a browser-based notebook, support for interactive
5336 data visualization, embeddable interpreters and tools for parallel
5337 computing.")
5338 (license license:bsd-3)
5339 (properties `((python2-variant . ,(delay python2-ipython))))))
5340
5341 (define-public python2-ipython
5342 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5343 (package
5344 (inherit ipython)
5345 ;; FIXME: add pyreadline once available.
5346 (propagated-inputs
5347 `(("python2-backports-shutil-get-terminal-size"
5348 ,python2-backports-shutil-get-terminal-size)
5349 ("python2-pathlib2" ,python2-pathlib2)
5350 ,@(package-propagated-inputs ipython)))
5351 (native-inputs
5352 `(("python2-mock" ,python2-mock)
5353 ,@(package-native-inputs ipython))))))
5354
5355 (define-public python-isodate
5356 (package
5357 (name "python-isodate")
5358 (version "0.5.4")
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (pypi-uri "isodate" version))
5363 (sha256
5364 (base32
5365 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5366 (build-system python-build-system)
5367 (home-page
5368 "http://cheeseshop.python.org/pypi/isodate")
5369 (synopsis
5370 "Python date parser and formatter")
5371 (description
5372 "Python-isodate is a python module for parsing and formatting
5373 ISO 8601 dates, time and duration.")
5374 (license license:bsd-3)))
5375
5376 (define-public python2-isodate
5377 (package-with-python2 python-isodate))
5378
5379 (define-public python-html5lib
5380 (package
5381 (name "python-html5lib")
5382 (version "1.0b10")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "html5lib" version))
5387 (sha256
5388 (base32
5389 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5390 (build-system python-build-system)
5391 (propagated-inputs
5392 `(("python-six" ,python-six)
5393 ("python-webencodings" ,python-webencodings)))
5394 (arguments
5395 `(#:test-target "check"))
5396 (home-page
5397 "https://github.com/html5lib/html5lib-python")
5398 (synopsis
5399 "Python HTML parser based on the WHATWG HTML specifcation")
5400 (description
5401 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5402 and written in Python.")
5403 (license license:expat)))
5404
5405 (define-public python2-html5lib
5406 (package-with-python2 python-html5lib))
5407
5408 ;; Needed for python-bleach, a dependency of python-notebook
5409 (define-public python-html5lib-0.9
5410 (package
5411 (inherit python-html5lib)
5412 (version "0.999")
5413 (source
5414 (origin
5415 (method url-fetch)
5416 (uri (pypi-uri "html5lib" version))
5417 (sha256
5418 (base32
5419 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5420
5421 (define-public python2-html5lib-0.9
5422 (package-with-python2 python-html5lib-0.9))
5423
5424 (define-public python-webencodings
5425 (package
5426 (name "python-webencodings")
5427 (version "0.5")
5428 (source (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "webencodings" version))
5431 (sha256
5432 (base32
5433 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5434 (build-system python-build-system)
5435 (arguments
5436 '(#:phases
5437 (modify-phases %standard-phases
5438 (replace 'check
5439 (lambda _
5440 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5441 (native-inputs
5442 `(("python-pytest" ,python-pytest)))
5443 (home-page "https://github.com/SimonSapin/python-webencodings")
5444 (synopsis "Character encoding aliases for legacy web content")
5445 (description
5446 "In order to be compatible with legacy web content when interpreting
5447 something like @code{Content-Type: text/html; charset=latin1}, tools need
5448 to use a particular set of aliases for encoding labels as well as some
5449 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5450 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5451 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5452 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5453 defines all such details so that implementations do not have to
5454 reverse-engineer each other.
5455
5456 This module implements the Encoding standard and has encoding labels and
5457 BOM detection, but the actual implementation for encoders and decoders
5458 is Python’s.")
5459 (license license:bsd-3)))
5460
5461 (define-public python2-webencodings
5462 (package-with-python2 python-webencodings))
5463
5464 (define-public python-urwid
5465 (package
5466 (name "python-urwid")
5467 (version "1.3.1")
5468 (source
5469 (origin
5470 (method url-fetch)
5471 (uri (pypi-uri "urwid" version))
5472 (sha256
5473 (base32
5474 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5475 (build-system python-build-system)
5476 (arguments
5477 `(#:phases
5478 (modify-phases %standard-phases
5479 ;; Disable failing test. Bug filed upstream:
5480 ;; https://github.com/wardi/urwid/issues/164
5481 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5482 (add-after 'unpack 'disable-failing-test
5483 (lambda _
5484 (substitute* "urwid/tests/test_event_loops.py"
5485 (("test_remove_watch_file")
5486 "disable_remove_watch_file")))))))
5487 (home-page "http://urwid.org")
5488 (synopsis "Console user interface library for Python")
5489 (description
5490 "Urwid is a curses-based UI/widget library for Python. It includes many
5491 features useful for text console applications.")
5492 (license license:lgpl2.1+)))
5493
5494 (define-public python2-urwid
5495 (package-with-python2 python-urwid))
5496
5497 (define-public python-openid
5498 (package
5499 (name "python-openid")
5500 (version "3.0.10")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "python3-openid" version))
5505 (sha256
5506 (base32
5507 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5508 (build-system python-build-system)
5509 (home-page "https://github.com/necaris/python3-openid")
5510 (synopsis "OpenID support for servers and consumers")
5511 (description "This library provides OpenID authentication for Python, both
5512 for clients and servers.")
5513 (license license:asl2.0)))
5514
5515 (define-public python2-openid
5516 (package
5517 (name "python2-openid")
5518 (version "2.2.5")
5519 (source
5520 (origin
5521 (method url-fetch)
5522 (uri (pypi-uri "python-openid" version))
5523 (sha256
5524 (base32
5525 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5526 (build-system python-build-system)
5527 (arguments
5528 ;; Python 3 support is in `python3-openid`, a separate package.
5529 `(#:python ,python-2))
5530 (home-page "https://github.com/openid/python-openid")
5531 (synopsis "OpenID support for servers and consumers")
5532 (description "This library provides OpenID authentication for Python, both
5533 for clients and servers.")
5534 (license license:asl2.0)))
5535
5536 (define-public python-urwidtrees
5537 (package
5538 (name "python-urwidtrees")
5539 (version "1.0.2")
5540 (source
5541 (origin
5542 (method url-fetch)
5543 ;; package author intends on distributing via github rather than pypi:
5544 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5545 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5546 version ".tar.gz"))
5547 (file-name (string-append name "-" version ".tar.gz"))
5548 (sha256
5549 (base32
5550 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5551 (build-system python-build-system)
5552 (arguments
5553 '(#:tests? #f)) ; no tests
5554 (propagated-inputs `(("python-urwid" ,python-urwid)))
5555 (home-page "https://github.com/pazz/urwidtrees")
5556 (synopsis "Tree widgets for urwid")
5557 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5558 toolkit. Use it to build trees of widgets.")
5559 (license license:gpl3+)))
5560
5561 (define-public python2-urwidtrees
5562 (package-with-python2 python-urwidtrees))
5563
5564 (define-public python-dbus
5565 (package
5566 (name "python-dbus")
5567 (version "1.2.0")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (string-append
5572 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5573 version ".tar.gz"))
5574 (sha256
5575 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5576 (build-system gnu-build-system)
5577 (arguments
5578 '(#:phases
5579 (modify-phases %standard-phases
5580 (add-before
5581 'check 'pre-check
5582 (lambda _
5583 ;; XXX: For the missing '/etc/machine-id'.
5584 (substitute* "test/run-test.sh"
5585 (("DBUS_FATAL_WARNINGS=1")
5586 "DBUS_FATAL_WARNINGS=0"))
5587 #t)))))
5588 (native-inputs
5589 `(("pkg-config" ,pkg-config)))
5590 (inputs
5591 `(("python" ,python)
5592 ("dbus-glib" ,dbus-glib)))
5593 (synopsis "Python bindings for D-bus")
5594 (description "python-dbus provides bindings for libdbus, the reference
5595 implementation of D-Bus.")
5596 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5597 (license license:expat)))
5598
5599 (define-public python2-dbus
5600 (package (inherit python-dbus)
5601 (name "python2-dbus")
5602 (inputs `(("python" ,python-2)
5603 ,@(alist-delete "python"
5604 (package-inputs python-dbus)
5605 equal?)))
5606 ;; FIXME: on Python 2, the test_utf8 fails with:
5607 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5608 (arguments `(#:tests? #f))))
5609
5610 (define-public python-apsw
5611 (package
5612 (name "python-apsw")
5613 (version "3.9.2-r1")
5614 (source
5615 (origin
5616 (method url-fetch)
5617 (uri (pypi-uri "apsw" version))
5618 (sha256
5619 (base32
5620 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5621 (build-system python-build-system)
5622 (inputs
5623 `(("sqlite" ,sqlite)))
5624 (arguments
5625 `(#:phases
5626 (modify-phases %standard-phases
5627 (delete 'check)
5628 (add-after 'install 'check
5629 (lambda* (#:key inputs outputs #:allow-other-keys)
5630 (add-installed-pythonpath inputs outputs)
5631 (zero? (system* "python" "setup.py" "test")))))))
5632 (home-page "https://github.com/rogerbinns/apsw/")
5633 (synopsis "Another Python SQLite Wrapper")
5634 (description "APSW is a Python wrapper for the SQLite
5635 embedded relational database engine. In contrast to other wrappers such as
5636 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5637 translate the complete SQLite API into Python.")
5638 (license license:zlib)))
5639
5640 (define-public python2-apsw
5641 (package-with-python2 python-apsw))
5642
5643 (define-public python-lxml
5644 (package
5645 (name "python-lxml")
5646 (version "3.6.0")
5647 (source
5648 (origin
5649 (method url-fetch)
5650 (uri (pypi-uri "lxml" version))
5651 (sha256
5652 (base32
5653 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5654 (build-system python-build-system)
5655 (inputs
5656 `(("libxml2" ,libxml2)
5657 ("libxslt" ,libxslt)))
5658 (home-page "http://lxml.de/")
5659 (synopsis
5660 "Python XML processing library")
5661 (description
5662 "The lxml XML toolkit is a Pythonic binding for the C libraries
5663 libxml2 and libxslt.")
5664 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5665
5666 (define-public python2-lxml
5667 (package-with-python2 python-lxml))
5668
5669 ;; beautifulsoup4 has a totally different namespace than 3.x,
5670 ;; and pypi seems to put it under its own name, so I guess we should too
5671 (define-public python-beautifulsoup4
5672 (package
5673 (name "python-beautifulsoup4")
5674 (version "4.5.1")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (pypi-uri "beautifulsoup4" version))
5679 (sha256
5680 (base32
5681 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5682 (build-system python-build-system)
5683 (arguments
5684 `(#:phases
5685 (modify-phases %standard-phases
5686 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5687 ;; must use this conversion script when building with Python 3. The
5688 ;; conversion script also runs the tests.
5689 ;; For more information, see the file 'convert-py3k' in the source
5690 ;; distribution.
5691 (replace 'check
5692 (lambda _ (zero? (system* "./convert-py3k")))))))
5693 (home-page
5694 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5695 (synopsis
5696 "Python screen-scraping library")
5697 (description
5698 "Beautiful Soup is a Python library designed for rapidly setting up
5699 screen-scraping projects. It offers Pythonic idioms for navigating,
5700 searching, and modifying a parse tree, providing a toolkit for
5701 dissecting a document and extracting what you need. It automatically
5702 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5703 (license license:expat)
5704 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5705
5706 (define-public python2-beautifulsoup4
5707 (package
5708 (inherit (package-with-python2
5709 (strip-python2-variant python-beautifulsoup4)))
5710 (arguments `(#:python ,python-2))))
5711
5712 (define-public python-cssutils
5713 (package
5714 (name "python-cssutils")
5715 (version "1.0.1")
5716 (source
5717 (origin
5718 (method url-fetch)
5719 (uri (pypi-uri "cssutils" version))
5720 (sha256
5721 (base32
5722 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5723 (build-system python-build-system)
5724 (native-inputs
5725 `(("unzip" ,unzip))) ; for unpacking the source
5726 (arguments
5727 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5728 (home-page "http://cthedot.de/cssutils/")
5729 (synopsis
5730 "CSS Cascading Style Sheets library for Python")
5731 (description
5732 "Cssutils is a Python package for parsing and building CSS
5733 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5734 options.")
5735 (license license:lgpl3+)))
5736
5737 (define-public python2-cssutils
5738 (package-with-python2 python-cssutils))
5739
5740 (define-public python-cssselect
5741 (package
5742 (name "python-cssselect")
5743 (version "0.9.2")
5744 (source
5745 (origin
5746 (method url-fetch)
5747 (uri (pypi-uri "cssselect" version))
5748 (sha256
5749 (base32
5750 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5751 (build-system python-build-system)
5752 (arguments
5753 ;; tests fail with message
5754 ;; AttributeError: 'module' object has no attribute 'tests'
5755 `(#:tests? #f))
5756 (home-page
5757 "https://pythonhosted.org/cssselect/")
5758 (synopsis
5759 "CSS3 selector parser and translator to XPath 1.0")
5760 (description
5761 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5762 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5763 another XPath engine to find the matching elements in an XML or HTML document.")
5764 (license license:bsd-3)))
5765
5766 (define-public python2-cssselect
5767 (package-with-python2 python-cssselect))
5768
5769 (define-public python-openid-cla
5770 (package
5771 (name "python-openid-cla")
5772 (version "1.2")
5773 (source
5774 (origin
5775 (method url-fetch)
5776 (uri (pypi-uri "python-openid-cla" version))
5777 (sha256
5778 (base32
5779 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5780 (build-system python-build-system)
5781 (arguments '(#:tests? #f)) ; No tests.
5782 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5783 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5784 (description "@code{openid-cla} is an implementation of the OpenID
5785 contributor license agreement extension for python-openid.")
5786 (license license:bsd-3)))
5787
5788 (define-public python2-openid-cla
5789 (package-with-python2 python-openid-cla))
5790
5791 (define-public python-openid-teams
5792 (package
5793 (name "python-openid-teams")
5794 (version "1.1")
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (pypi-uri "python-openid-teams" version))
5799 (sha256
5800 (base32
5801 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5802 (build-system python-build-system)
5803 (arguments '(#:tests? #f)) ; No tests.
5804 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5805 (synopsis "Implementation of the OpenID teams extension for python-openid")
5806 (description
5807 "@code{openid-teams} is an implementation of the OpenID
5808 teams extension for python-openid.")
5809 (license license:bsd-3)))
5810
5811 (define-public python2-openid-teams
5812 (package-with-python2 python-openid-teams))
5813
5814 (define-public python-netifaces
5815 (package
5816 (name "python-netifaces")
5817 (version "0.10.4")
5818 (source
5819 (origin
5820 (method url-fetch)
5821 (uri (string-append
5822 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5823 version
5824 ".tar.gz"))
5825 (sha256
5826 (base32
5827 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5828 (build-system python-build-system)
5829 (home-page
5830 "https://bitbucket.org/al45tair/netifaces")
5831 (synopsis
5832 "Python module for portable network interface information")
5833 (description
5834 "Netifaces is a Python module providing information on network
5835 interfaces in an easy and portable manner.")
5836 (license license:expat)))
5837
5838 (define-public python2-netifaces
5839 (package-with-python2 python-netifaces))
5840
5841 (define-public python-networkx
5842 (package
5843 (name "python-networkx")
5844 (version "1.11")
5845 (source
5846 (origin
5847 (method url-fetch)
5848 (uri (pypi-uri "networkx" version))
5849 (sha256
5850 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5851 (build-system python-build-system)
5852 ;; python-decorator is needed at runtime
5853 (propagated-inputs
5854 `(("python-decorator" ,python-decorator)))
5855 (native-inputs
5856 `(("python-nose" ,python-nose)))
5857 (home-page "http://networkx.github.io/")
5858 (synopsis "Python module for creating and manipulating graphs and networks")
5859 (description
5860 "NetworkX is a Python package for the creation, manipulation, and study
5861 of the structure, dynamics, and functions of complex networks.")
5862 (license license:bsd-3)))
5863
5864 (define-public python2-networkx
5865 (package-with-python2 python-networkx))
5866
5867 (define-public snakemake
5868 (package
5869 (name "snakemake")
5870 (version "3.9.0")
5871 (source
5872 (origin
5873 (method url-fetch)
5874 (uri (pypi-uri "snakemake" version))
5875 (sha256
5876 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
5877 (build-system python-build-system)
5878 (arguments
5879 ;; TODO: Package missing test dependencies.
5880 '(#:tests? #f))
5881 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5882 (synopsis "Python-based execution environment for make-like workflows")
5883 (description
5884 "Snakemake aims to reduce the complexity of creating workflows by
5885 providing a clean and modern domain specific specification language (DSL) in
5886 Python style, together with a fast and comfortable execution environment.")
5887 (license license:expat)))
5888
5889 (define-public python-seaborn
5890 (package
5891 (name "python-seaborn")
5892 (version "0.7.1")
5893 (source
5894 (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "seaborn" version))
5897 (sha256
5898 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5899 (build-system python-build-system)
5900 (arguments
5901 '(#:tests? #f)) ; Tests requires a running X11 server.
5902 (propagated-inputs
5903 `(("python-pandas" ,python-pandas)
5904 ("python-matplotlib" ,python-matplotlib)
5905 ("python-scipy" ,python-scipy)))
5906 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5907 (synopsis "Statistical data visualization")
5908 (description
5909 "Seaborn is a library for making attractive and informative statistical
5910 graphics in Python. It is built on top of matplotlib and tightly integrated
5911 with the PyData stack, including support for numpy and pandas data structures
5912 and statistical routines from scipy and statsmodels.")
5913 (license license:bsd-3)
5914 (properties `((python2-variant . ,(delay python2-seaborn))))))
5915
5916 (define-public python2-seaborn
5917 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5918 (package
5919 (inherit base)
5920 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5921 ,@(package-propagated-inputs base))))))
5922
5923 (define-public python-mpmath
5924 (package
5925 (name "python-mpmath")
5926 (version "0.19")
5927 (source (origin
5928 (method url-fetch)
5929 (uri (string-append "http://mpmath.org/files/mpmath-"
5930 version ".tar.gz"))
5931 (sha256
5932 (base32
5933 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5934 (build-system python-build-system)
5935 (arguments
5936 '(#:phases
5937 (modify-phases %standard-phases
5938 (replace 'check
5939 (lambda _
5940 (zero?
5941 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5942 (home-page "http://mpmath.org")
5943 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5944 (description
5945 "@code{mpmath} can be used as an arbitrary-precision substitute for
5946 Python's float/complex types and math/cmath modules, but also does much
5947 more advanced mathematics.")
5948 (license license:bsd-3)))
5949
5950 (define-public python2-mpmath
5951 (package-with-python2 python-mpmath))
5952
5953 (define-public python-sympy
5954 (package
5955 (name "python-sympy")
5956 (version "1.0")
5957 (source
5958 (origin
5959 (method url-fetch)
5960 (uri (string-append
5961 "https://github.com/sympy/sympy/releases/download/sympy-"
5962 version "/sympy-" version ".tar.gz"))
5963 (sha256
5964 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
5965 (build-system python-build-system)
5966 (propagated-inputs
5967 `(("python-mpmath" ,python-mpmath)))
5968 (home-page "http://www.sympy.org/")
5969 (synopsis "Python library for symbolic mathematics")
5970 (description
5971 "SymPy is a Python library for symbolic mathematics. It aims to become a
5972 full-featured computer algebra system (CAS) while keeping the code as simple
5973 as possible in order to be comprehensible and easily extensible.")
5974 (license license:bsd-3)))
5975
5976 (define-public python2-sympy
5977 (package-with-python2 python-sympy))
5978
5979 (define-public python-q
5980 (package
5981 (name "python-q")
5982 (version "2.6")
5983 (source
5984 (origin
5985 (method url-fetch)
5986 (uri (pypi-uri "q" version))
5987 (sha256
5988 (base32
5989 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5990 (build-system python-build-system)
5991 (home-page "https://github.com/zestyping/q")
5992 (synopsis "Quick-and-dirty debugging output for tired programmers")
5993 (description
5994 "q is a Python module for \"print\" style of debugging Python code. It
5995 provides convenient short API for print out of values, tracebacks, and
5996 falling into the Python interpreter.")
5997 (license license:asl2.0)))
5998
5999 (define-public python2-q
6000 (package-with-python2 python-q))
6001
6002 (define-public python-testlib
6003 (package
6004 (name "python-testlib")
6005 (version "0.6.5")
6006 (source
6007 (origin
6008 (method url-fetch)
6009 (uri (string-append
6010 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6011 version ".zip"))
6012 (sha256
6013 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6014 (build-system python-build-system)
6015 (native-inputs
6016 `(("unzip" ,unzip))) ; for unpacking the source
6017 (synopsis "Python micro test suite harness")
6018 (description "A micro unittest suite harness for Python.")
6019 (home-page "https://github.com/trentm/testlib")
6020 (license license:expat)))
6021
6022 (define-public python2-testlib
6023 (package-with-python2 python-testlib))
6024
6025 (define-public python2-xlib
6026 (package
6027 (name "python2-xlib")
6028 (version "0.14")
6029 (source (origin
6030 (method url-fetch)
6031 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6032 "/" version "/"
6033 "python-xlib-" version ".tar.gz"))
6034 (sha256
6035 (base32
6036 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6037 (build-system python-build-system)
6038 (arguments
6039 `(#:python ,python-2 ;Python 2 only
6040 #:tests? #f)) ;no tests
6041 (home-page "http://python-xlib.sourceforge.net/")
6042 (synopsis "Python X11 client library")
6043 (description
6044 "The Python X Library is intended to be a fully functional X client
6045 library for Python programs. It is useful to implement low-level X clients.
6046 It is written entirely in Python.")
6047 (license license:gpl2+)))
6048
6049 (define-public python-singledispatch
6050 (package
6051 (name "python-singledispatch")
6052 (version "3.4.0.3")
6053 (source
6054 (origin
6055 (method url-fetch)
6056 (uri (pypi-uri "singledispatch" version))
6057 (sha256
6058 (base32
6059 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6060 (build-system python-build-system)
6061 (native-inputs
6062 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6063 (home-page
6064 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6065 (synopsis "Backport of singledispatch feature from Python 3.4")
6066 (description
6067 "This library brings functools.singledispatch from Python 3.4 to Python
6068 2.6-3.3.")
6069 (license license:expat)))
6070
6071 (define-public python2-singledispatch
6072 (package-with-python2 python-singledispatch))
6073
6074 (define-public python-tornado
6075 (package
6076 (name "python-tornado")
6077 (version "4.3")
6078 (source
6079 (origin
6080 (method url-fetch)
6081 (uri (pypi-uri "tornado" version))
6082 (sha256
6083 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
6084 (build-system python-build-system)
6085 (arguments
6086 '(;; FIXME: Two tests error out with:
6087 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6088 ;; #:phases
6089 ;; (modify-phases %standard-phases
6090 ;; (replace 'check
6091 ;; (lambda _
6092 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6093 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6094 ;; (zero? (system* "python" "-m" "tornado.test")))))
6095 #:tests? #f))
6096 (native-inputs
6097 `(("python-certifi" ,python-certifi)))
6098 (propagated-inputs
6099 `(("python-backports-abc" ,python-backports-abc)))
6100 (home-page "http://www.tornadoweb.org/")
6101 (synopsis "Python web framework and asynchronous networking library")
6102 (description
6103 "Tornado is a Python web framework and asynchronous networking library,
6104 originally developed at FriendFeed. By using non-blocking network I/O,
6105 Tornado can scale to tens of thousands of open connections, making it ideal
6106 for long polling, WebSockets, and other applications that require a long-lived
6107 connection to each user.")
6108 (license license:asl2.0)
6109 (properties `((python2-variant . ,(delay python2-tornado))))))
6110
6111 (define-public python2-tornado
6112 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6113 (package (inherit tornado)
6114 (propagated-inputs
6115 `(("python2-backport-ssl-match-hostname"
6116 ,python2-backport-ssl-match-hostname)
6117 ("python2-singledispatch" ,python2-singledispatch)
6118 ,@(package-propagated-inputs tornado))))))
6119
6120 ;; the python- version can be removed with python-3.5
6121 (define-public python-backports-abc
6122 (package
6123 (name "python-backports-abc")
6124 (version "0.5")
6125 (source
6126 (origin
6127 (method url-fetch)
6128 (uri (pypi-uri "backports_abc" version))
6129 (sha256
6130 (base32
6131 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6132 (build-system python-build-system)
6133 (home-page "https://github.com/cython/backports_abc")
6134 (synopsis "Backport of additions to the 'collections.abc' module")
6135 (description
6136 "Python-backports-abc provides a backport of additions to the
6137 'collections.abc' module in Python-3.5.")
6138 (license license:psfl)))
6139
6140 (define-public python2-backports-abc
6141 (package-with-python2 python-backports-abc))
6142
6143 (define-public python2-backports-shutil-get-terminal-size
6144 (package
6145 (name "python2-backports-shutil-get-terminal-size")
6146 (version "1.0.0")
6147 (source
6148 (origin
6149 (method url-fetch)
6150 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6151 (sha256
6152 (base32
6153 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6154 (build-system python-build-system)
6155 (arguments
6156 `(#:python ,python-2
6157 #:phases
6158 (modify-phases %standard-phases
6159 (replace 'check
6160 (lambda _
6161 (zero? (system* "py.test" "-v")))))))
6162 (native-inputs
6163 `(("python2-pytest" ,python2-pytest)))
6164 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6165 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6166 (description
6167 "This package provides a backport of the @code{get_terminal_size
6168 function} from Python 3.3's @code{shutil}.
6169 Unlike the original version it is written in pure Python rather than C,
6170 so it might be a tiny bit slower.")
6171 (license license:expat)))
6172
6173 (define-public python-waf
6174 (package
6175 (name "python-waf")
6176 (version "1.9.5")
6177 (source (origin
6178 (method url-fetch)
6179 (uri (string-append "https://waf.io/"
6180 "waf-" version ".tar.bz2"))
6181 (sha256
6182 (base32
6183 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
6184 (build-system python-build-system)
6185 (arguments
6186 '(#:phases
6187 (modify-phases %standard-phases
6188 (replace 'build
6189 (lambda _
6190 (zero? (system* "python" "waf-light" "configure" "build"))))
6191 (replace 'check
6192 (lambda _
6193 (zero? (system* "python" "waf" "--version"))))
6194 (replace 'install
6195 (lambda _
6196 (copy-file "waf" %output))))))
6197 (home-page "http://waf.io/")
6198 (synopsis "Python-based build system")
6199 (description
6200 "Waf is a Python-based framework for configuring, compiling and installing
6201 applications.")
6202 (license license:bsd-3)))
6203
6204 (define-public python2-waf
6205 (package-with-python2 python-waf))
6206
6207 (define-public python-pyzmq
6208 (package
6209 (name "python-pyzmq")
6210 (version "15.1.0")
6211 (source
6212 (origin
6213 (method url-fetch)
6214 (uri (pypi-uri "pyzmq" version))
6215 (sha256
6216 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6217 (build-system python-build-system)
6218 (arguments
6219 `(#:configure-flags
6220 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6221 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6222 ;; --inplace' for 'python setup.py test' to work.
6223 #:tests? #f))
6224 (inputs
6225 `(("zeromq" ,zeromq)))
6226 (native-inputs
6227 `(("pkg-config" ,pkg-config)
6228 ("python-nose" ,python-nose)))
6229 (home-page "http://github.com/zeromq/pyzmq")
6230 (synopsis "Python bindings for 0MQ")
6231 (description
6232 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6233 (license license:bsd-4)))
6234
6235 (define-public python2-pyzmq
6236 (package-with-python2 python-pyzmq))
6237
6238 (define-public python-pep8
6239 (package
6240 (name "python-pep8")
6241 (version "1.7.0")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 (uri (pypi-uri "pep8" version))
6246 (sha256
6247 (base32
6248 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6249 (build-system python-build-system)
6250 (home-page "http://pep8.readthedocs.org/")
6251 (synopsis "Python style guide checker")
6252 (description
6253 "This tools checks Python code against some of the style conventions in
6254 PEP 8.")
6255 (license license:expat)))
6256
6257 (define-public python2-pep8
6258 (package-with-python2 python-pep8))
6259
6260 (define-public python-pyflakes
6261 (package
6262 (name "python-pyflakes")
6263 (version "1.0.0")
6264 (source
6265 (origin
6266 (method url-fetch)
6267 (uri (pypi-uri "pyflakes" version))
6268 (sha256
6269 (base32
6270 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6271 (build-system python-build-system)
6272 (home-page
6273 "https://github.com/pyflakes/pyflakes")
6274 (synopsis "Passive checker of Python programs")
6275 (description
6276 "Pyflakes statically checks Python source code for common errors.")
6277 (license license:expat)))
6278
6279 (define-public python2-pyflakes
6280 (package-with-python2 python-pyflakes))
6281
6282 (define-public python-mccabe
6283 (package
6284 (name "python-mccabe")
6285 (version "0.4.0")
6286 (source
6287 (origin
6288 (method url-fetch)
6289 (uri (pypi-uri "mccabe" version))
6290 (sha256
6291 (base32
6292 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6293 (build-system python-build-system)
6294 (native-inputs
6295 `(("python-pytest" ,python-pytest)
6296 ("python-pytest-runner" ,python-pytest-runner)))
6297 (home-page "https://github.com/flintwork/mccabe")
6298 (synopsis "McCabe checker, plugin for flake8")
6299 (description
6300 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6301 complexity of Python source code.")
6302 (license license:expat)))
6303
6304 (define-public python2-mccabe
6305 (package-with-python2 python-mccabe))
6306
6307 (define-public python-mccabe-0.2.1
6308 (package (inherit python-mccabe)
6309 (version "0.2.1")
6310 (source
6311 (origin
6312 (method url-fetch)
6313 (uri (pypi-uri "mccabe" version))
6314 (sha256
6315 (base32
6316 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6317
6318 (define-public python2-mccabe-0.2.1
6319 (package-with-python2 python-mccabe-0.2.1))
6320
6321 ;; Flake8 2.4.1 requires an older version of pep8.
6322 ;; This should be removed ASAP.
6323 (define-public python-pep8-1.5.7
6324 (package (inherit python-pep8)
6325 (version "1.5.7")
6326 (source
6327 (origin
6328 (method url-fetch)
6329 (uri (string-append
6330 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6331 version
6332 ".tar.gz"))
6333 (sha256
6334 (base32
6335 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6336 (arguments
6337 ;; XXX Tests not compatible with Python 3.5.
6338 '(#:tests? #f))))
6339
6340 (define-public python2-pep8-1.5.7
6341 (package-with-python2 python-pep8-1.5.7))
6342
6343 ;; Flake8 2.4.1 requires an older version of pyflakes.
6344 ;; This should be removed ASAP.
6345 (define-public python-pyflakes-0.8.1
6346 (package (inherit python-pyflakes)
6347 (version "0.8.1")
6348 (source
6349 (origin
6350 (method url-fetch)
6351 (uri (string-append
6352 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6353 version
6354 ".tar.gz"))
6355 (sha256
6356 (base32
6357 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6358 (arguments
6359 ;; XXX Tests not compatible with Python 3.5.
6360 '(#:tests? #f))))
6361
6362 (define-public python2-pyflakes-0.8.1
6363 (package-with-python2 python-pyflakes-0.8.1))
6364
6365 (define-public python-flake8
6366 (package
6367 (name "python-flake8")
6368 (version "2.5.4")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "flake8" version))
6373 (sha256
6374 (base32
6375 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6376 (modules '((guix build utils)))
6377 (snippet
6378 '(begin
6379 ;; Remove pre-compiled .pyc files from source.
6380 (for-each delete-file-recursively
6381 (find-files "." "__pycache__" #:directories? #t))
6382 (for-each delete-file (find-files "." "\\.pyc$"))
6383 #t))))
6384 (build-system python-build-system)
6385 (propagated-inputs
6386 `(("python-pep8" ,python-pep8)
6387 ("python-pyflakes" ,python-pyflakes)
6388 ("python-mccabe" ,python-mccabe)))
6389 (native-inputs
6390 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6391 ("python-nose" ,python-nose)))
6392 (home-page "https://gitlab.com/pycqa/flake8")
6393 (synopsis
6394 "The modular source code checker: pep8, pyflakes and co")
6395 (description
6396 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6397 (license license:expat)))
6398
6399 (define-public python2-flake8
6400 (package-with-python2 python-flake8))
6401
6402 ;; This will only be needed by the python-hacking package and will not be
6403 ;; necessary once python-hacking > 0.10.2 is released.
6404 (define-public python-flake8-2.2.4
6405 (package (inherit python-flake8)
6406 (propagated-inputs
6407 `(("python-pep8" ,python-pep8-1.5.7)
6408 ("python-pyflakes" ,python-pyflakes-0.8.1)
6409 ("python-mccabe" ,python-mccabe-0.2.1)))
6410 (native-inputs
6411 `(("python-mock" ,python-mock)
6412 ("python-nose" ,python-nose)))
6413 (version "2.2.4")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "flake8" version))
6418 (sha256
6419 (base32
6420 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6421 (modules '((guix build utils)))
6422 (snippet
6423 '(begin
6424 ;; Remove pre-compiled .pyc files from source.
6425 (for-each delete-file-recursively
6426 (find-files "." "__pycache__" #:directories? #t))
6427 (for-each delete-file (find-files "." "\\.pyc$"))
6428 #t))))
6429 (arguments
6430 ;; XXX Fails with Python 3.5.
6431 '(#:tests? #f))))
6432
6433 (define-public python2-flake8-2.2.4
6434 (package-with-python2 python-flake8-2.2.4))
6435
6436 (define-public python-flake8-polyfill
6437 (package
6438 (name "python-flake8-polyfill")
6439 (version "1.0.1")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "flake8-polyfill" version))
6444 (sha256
6445 (base32
6446 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6447 (build-system python-build-system)
6448 (arguments
6449 '(#:phases
6450 (modify-phases %standard-phases
6451 (replace 'check
6452 (lambda _
6453 (setenv "PYTHONPATH"
6454 (string-append (getcwd) "/build/lib:"
6455 (getenv "PYTHONPATH")))
6456 (zero? (system* "py.test" "-v")))))))
6457 (native-inputs
6458 `(("python-flake8" ,python-flake8)
6459 ("python-mock" ,python-mock)
6460 ("python-pycodestyle" ,python-pycodestyle)
6461 ("python-pytest" ,python-pytest)))
6462 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6463 (synopsis "Polyfill package for Flake8 plugins")
6464 (description
6465 "This package that provides some compatibility helpers for Flake8
6466 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6467 (license license:expat)))
6468
6469 (define-public python2-flake8-polyfill
6470 (package-with-python2 python-flake8-polyfill))
6471
6472 (define-public python-mistune
6473 (package
6474 (name "python-mistune")
6475 (version "0.7.3")
6476 (source
6477 (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "mistune" version))
6480 (sha256
6481 (base32
6482 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6483 (build-system python-build-system)
6484 (native-inputs
6485 `(("python-nose" ,python-nose)
6486 ("python-cython" ,python-cython)))
6487 (home-page "https://github.com/lepture/mistune")
6488 (synopsis "Markdown parser in pure Python")
6489 (description "This package provides a fast markdown parser in pure
6490 Python.")
6491 (license license:bsd-3)))
6492
6493 (define-public python2-mistune
6494 (package-with-python2 python-mistune))
6495
6496 (define-public python-markdown
6497 (package
6498 (name "python-markdown")
6499 (version "2.6.7")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "Markdown" version))
6504 (sha256
6505 (base32
6506 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6507 (build-system python-build-system)
6508 (arguments
6509 `(#:phases
6510 (modify-phases %standard-phases
6511 (replace 'check
6512 (lambda _
6513 (zero? (system* "python" "run-tests.py")))))))
6514 (native-inputs
6515 `(("python-nose" ,python-nose)
6516 ("python-pyyaml" ,python-pyyaml)))
6517 (home-page "https://pythonhosted.org/Markdown/")
6518 (synopsis "Python implementation of Markdown")
6519 (description
6520 "This package provides a Python implementation of John Gruber's
6521 Markdown. The library features international input, various Markdown
6522 extensions, and several HTML output formats. A command line wrapper
6523 markdown_py is also provided to convert Markdown files to HTML.")
6524 (license license:bsd-3)))
6525
6526 (define-public python2-markdown
6527 (package-with-python2 python-markdown))
6528
6529 (define-public python-ptyprocess
6530 (package
6531 (name "python-ptyprocess")
6532 (version "0.5")
6533 (source
6534 (origin
6535 (method url-fetch)
6536 (uri (string-append
6537 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6538 version ".tar.gz"))
6539 (sha256
6540 (base32
6541 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6542 (build-system python-build-system)
6543 (native-inputs
6544 `(("python-nose" ,python-nose)))
6545 (arguments
6546 `(#:phases
6547 (modify-phases %standard-phases
6548 (replace 'check
6549 (lambda _
6550 (zero? (system* "nosetests")))))))
6551 (home-page "https://github.com/pexpect/ptyprocess")
6552 (synopsis "Run a subprocess in a pseudo terminal")
6553 (description
6554 "This package provides a Python library used to launch a subprocess in a
6555 pseudo terminal (pty), and interact with both the process and its pty.")
6556 (license license:isc)))
6557
6558 (define-public python2-ptyprocess
6559 (package-with-python2 python-ptyprocess))
6560
6561 (define-public python-cram
6562 (package
6563 (name "python-cram")
6564 (version "0.7")
6565 (home-page "https://bitheap.org/cram/")
6566 (source (origin
6567 (method url-fetch)
6568 (uri (list (string-append home-page "cram-"
6569 version ".tar.gz")
6570 (pypi-uri "cram" version)))
6571 (sha256
6572 (base32
6573 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6574 (arguments
6575 '(#:phases
6576 (modify-phases %standard-phases
6577 (add-after 'unpack 'patch-source
6578 (lambda _
6579 (substitute* (find-files "cram" ".*\\.py$")
6580 ;; Replace default shell path.
6581 (("/bin/sh") (which "sh")))
6582 (substitute* (find-files "tests" ".*\\.t$")
6583 (("md5") "md5sum")
6584 (("/bin/bash") (which "bash"))
6585 (("/bin/sh") (which "sh")))
6586 (substitute* "cram/_test.py"
6587 ;; This hack works around a bug triggered by substituting
6588 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6589 ;; "cram -h", which breaks the output at 80 characters. This
6590 ;; causes the line showing the default shell to break into two
6591 ;; lines, but the test expects a single line...
6592 (("env\\['COLUMNS'\\] = '80'")
6593 "env['COLUMNS'] = '160'"))
6594 #t))
6595 (delete 'check)
6596 (add-after 'install 'check
6597 ;; The test phase uses the built library and executable.
6598 ;; It's easier to run it after install since the build
6599 ;; directory contains version-specific PATH.
6600 (lambda* (#:key inputs outputs #:allow-other-keys)
6601 (add-installed-pythonpath inputs outputs)
6602 (setenv "PATH" (string-append (getenv "PATH") ":"
6603 (assoc-ref outputs "out") "/bin"))
6604 (zero? (system* "make" "test")))))))
6605 (build-system python-build-system)
6606 (native-inputs
6607 `(("python-coverage" ,python-coverage)
6608 ("which" ,which)))
6609 (synopsis "Simple testing framework for command line applications")
6610 (description
6611 "Cram is a functional testing framework for command line applications.
6612 Cram tests look like snippets of interactive shell sessions. Cram runs each
6613 command and compares the command output in the test with the command’s actual
6614 output.")
6615 (license license:gpl2+)))
6616
6617 (define-public python2-cram
6618 (package-with-python2 python-cram))
6619
6620 (define-public python-terminado
6621 (package
6622 (name "python-terminado")
6623 (version "0.6")
6624 (source
6625 (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "terminado" version))
6628 (sha256
6629 (base32
6630 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6631 (build-system python-build-system)
6632 (propagated-inputs
6633 `(("python-tornado" ,python-tornado)
6634 ("python-ptyprocess" ,python-ptyprocess)))
6635 (native-inputs
6636 `(("python-nose" ,python-nose)))
6637 (arguments
6638 `(#:phases
6639 (modify-phases %standard-phases
6640 (replace 'check
6641 (lambda _
6642 (zero? (system* "nosetests")))))))
6643 (home-page "https://github.com/takluyver/terminado")
6644 (synopsis "Terminals served to term.js using Tornado websockets")
6645 (description "This package provides a Tornado websocket backend for the
6646 term.js Javascript terminal emulator library.")
6647 (license license:bsd-2)
6648 (properties `((python2-variant . ,(delay python2-terminado))))))
6649
6650 (define-public python2-terminado
6651 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6652 (package (inherit terminado)
6653 (propagated-inputs
6654 `(("python2-backport-ssl-match-hostname"
6655 ,python2-backport-ssl-match-hostname)
6656 ,@(package-propagated-inputs terminado))))))
6657
6658 (define-public python-straight-plugin
6659 (package
6660 (name "python-straight-plugin")
6661 (version "1.4.1")
6662 (source
6663 (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "straight.plugin" version))
6666 (sha256
6667 (base32
6668 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6669 (build-system python-build-system)
6670 (home-page "https://github.com/ironfroggy/straight.plugin")
6671 (synopsis "Simple namespaced plugin facility")
6672 (description "Straight Plugin provides a type of plugin you can create from
6673 almost any existing Python modules, and an easy way for outside developers to
6674 add functionality and customization to your projects with their own plugins.")
6675 (license license:expat)))
6676
6677 (define-public python2-straight-plugin
6678 (package-with-python2 python-straight-plugin))
6679
6680 (define-public python-fonttools
6681 (package
6682 (name "python-fonttools")
6683 (version "2.5")
6684 (source (origin
6685 (method url-fetch)
6686 (uri (string-append
6687 "https://pypi.python.org/packages/source/F/FontTools/"
6688 "fonttools-" version ".tar.gz"))
6689 (sha256
6690 (base32
6691 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6692 (build-system python-build-system)
6693 (arguments
6694 '(#:test-target "check"
6695 #:phases
6696 (modify-phases %standard-phases
6697 (add-after 'unpack 'patch-setuppy
6698 ;; Remove the undocumented "extra_path" argument, which adds an
6699 ;; intervening directories between site-packages and the package
6700 ;; directory.
6701 (lambda _
6702 (substitute* "setup.py"
6703 (("^[ \t]*extra_path *= *'FontTools',") ""))
6704 #t)))))
6705 (home-page "http://github.com/behdad/fonttools")
6706 (synopsis "Tools to manipulate font files")
6707 (description
6708 "FontTools/TTX is a library to manipulate font files from Python. It
6709 supports reading and writing of TrueType/OpenType fonts, reading and writing
6710 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6711 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6712 from an XML-based format.")
6713 (license (license:non-copyleft
6714 "file://LICENSE.txt"
6715 "See LICENSE.txt in the distribution."))))
6716
6717 (define-public python2-fonttools
6718 (package-with-python2 python-fonttools))
6719
6720 (define-public python-ly
6721 (package
6722 (name "python-ly")
6723 (version "0.9.4")
6724 (source
6725 (origin
6726 (method url-fetch)
6727 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6728 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6729 "/python-ly-" version ".tar.gz"))
6730 (sha256
6731 (base32
6732 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6733 (build-system python-build-system)
6734 (arguments
6735 ;; FIXME: Some tests need network access.
6736 '(#:tests? #f))
6737 (synopsis "Tool and library for manipulating LilyPond files")
6738 (description "This package provides a Python library to parse, manipulate
6739 or create documents in LilyPond format. A command line program ly is also
6740 provided that can be used to do various manipulations with LilyPond files.")
6741 (home-page "https://pypi.python.org/pypi/python-ly")
6742 (license license:gpl2+)))
6743
6744 (define-public python-appdirs
6745 (package
6746 (name "python-appdirs")
6747 (version "1.4.0")
6748 (source
6749 (origin
6750 (method url-fetch)
6751 (uri (string-append
6752 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6753 version
6754 ".tar.gz"))
6755 (sha256
6756 (base32
6757 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6758 (build-system python-build-system)
6759 (home-page "http://github.com/ActiveState/appdirs")
6760 (synopsis
6761 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6762 (description
6763 "This module provides a portable way of finding out where user data
6764 should be stored on various operating systems.")
6765 (license license:expat)))
6766
6767 (define-public python2-appdirs
6768 (package-with-python2 python-appdirs))
6769
6770 (define-public python-llfuse
6771 (package
6772 (name "python-llfuse")
6773 (version "1.1.1")
6774 (source (origin
6775 (method url-fetch)
6776 (uri (string-append
6777 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6778 "llfuse-" version ".tar.bz2"))
6779 (sha256
6780 (base32
6781 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6782 (build-system python-build-system)
6783 (inputs
6784 `(("fuse" ,fuse)
6785 ("attr" ,attr)))
6786 (native-inputs
6787 `(("pkg-config" ,pkg-config)))
6788 (synopsis "Python bindings for FUSE")
6789 (description
6790 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6791 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6792 (license license:lgpl2.0+)
6793 (properties `((python2-variant . ,(delay python2-llfuse))))))
6794
6795 (define-public python2-llfuse
6796 (package (inherit (package-with-python2
6797 (strip-python2-variant python-llfuse)))
6798 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6799
6800 ;; For attic-0.16
6801 (define-public python-llfuse-0.41
6802 (package (inherit python-llfuse)
6803 (version "0.41.1")
6804 (source (origin
6805 (method url-fetch)
6806 (uri (string-append
6807 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6808 "llfuse-" version ".tar.bz2"))
6809 (sha256
6810 (base32
6811 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6812 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6813 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6814 (license (list license:expat license:lgpl2.0+))))
6815
6816 (define-public python-msgpack
6817 (package
6818 (name "python-msgpack")
6819 (version "0.4.8")
6820 (source (origin
6821 (method url-fetch)
6822 (uri (pypi-uri "msgpack-python" version))
6823 (sha256
6824 (base32
6825 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6826 (build-system python-build-system)
6827 (synopsis "MessagePack (de)serializer")
6828 (description "MessagePack is a fast, compact binary serialization format,
6829 suitable for similar data to JSON. This package provides CPython bindings for
6830 reading and writing MessagePack data.")
6831 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6832 (license license:asl2.0)))
6833
6834 (define-public python2-msgpack
6835 (package-with-python2 python-msgpack))
6836
6837 (define-public python-netaddr
6838 (package
6839 (name "python-netaddr")
6840 (version "0.7.18")
6841 (source
6842 (origin
6843 (method url-fetch)
6844 (uri (string-append
6845 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6846 version
6847 ".tar.gz"))
6848 (sha256
6849 (base32
6850 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6851 (build-system python-build-system)
6852 (arguments `(#:tests? #f)) ;; No tests.
6853 (home-page "https://github.com/drkjam/netaddr/")
6854 (synopsis "Pythonic manipulation of network addresses")
6855 (description
6856 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6857 and MAC network addresses.")
6858 (license license:bsd-3)))
6859
6860 (define-public python2-netaddr
6861 (package-with-python2 python-netaddr))
6862
6863 (define-public python-wrapt
6864 (package
6865 (name "python-wrapt")
6866 (version "1.10.5")
6867 (source
6868 (origin
6869 (method url-fetch)
6870 (uri (string-append
6871 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6872 version
6873 ".tar.gz"))
6874 (sha256
6875 (base32
6876 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6877 (build-system python-build-system)
6878 (arguments
6879 ;; Tests are not included in the tarball, they are only available in the
6880 ;; git repository.
6881 `(#:tests? #f))
6882 (home-page "https://github.com/GrahamDumpleton/wrapt")
6883 (synopsis "Module for decorators, wrappers and monkey patching")
6884 (description
6885 "The aim of the wrapt module is to provide a transparent object proxy for
6886 Python, which can be used as the basis for the construction of function
6887 wrappers and decorator functions.")
6888 (license license:bsd-2)))
6889
6890 (define-public python2-wrapt
6891 (package-with-python2 python-wrapt))
6892
6893 (define-public python-iso8601
6894 (package
6895 (name "python-iso8601")
6896 (version "0.1.11")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri "iso8601" version))
6901 (sha256
6902 (base32
6903 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6904 (build-system python-build-system)
6905 (native-inputs
6906 `(("python-pytest" ,python-pytest)))
6907 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6908 (synopsis "Module to parse ISO 8601 dates")
6909 (description
6910 "This module parses the most common forms of ISO 8601 date strings (e.g.
6911 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6912 (license license:expat)))
6913
6914 (define-public python2-iso8601
6915 (package-with-python2 python-iso8601))
6916
6917 (define-public python-monotonic
6918 (package
6919 (name "python-monotonic")
6920 (version "0.3")
6921 (source
6922 (origin
6923 (method url-fetch)
6924 (uri (string-append
6925 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6926 version
6927 ".tar.gz"))
6928 (sha256
6929 (base32
6930 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6931 (build-system python-build-system)
6932 (home-page "https://github.com/atdt/monotonic")
6933 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6934 (description
6935 "This module provides a monotonic() function which returns the value (in
6936 fractional seconds) of a clock which never goes backwards.")
6937 (license license:asl2.0)))
6938
6939 (define-public python2-monotonic
6940 (package-with-python2 python-monotonic))
6941
6942 (define-public python-webob
6943 (package
6944 (name "python-webob")
6945 (version "1.5.1")
6946 (source
6947 (origin
6948 (method url-fetch)
6949 (uri (pypi-uri "WebOb" version))
6950 (sha256
6951 (base32
6952 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6953 (build-system python-build-system)
6954 (native-inputs
6955 `(("python-nose" ,python-nose)))
6956 (home-page "http://webob.org/")
6957 (synopsis "WSGI request and response object")
6958 (description
6959 "WebOb provides wrappers around the WSGI request environment, and an
6960 object to help create WSGI responses.")
6961 (license license:expat)))
6962
6963 (define-public python2-webob
6964 (package-with-python2 python-webob))
6965
6966 (define-public python-xlrd
6967 (package
6968 (name "python-xlrd")
6969 (version "1.0.0")
6970 (source (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "xlrd" version))
6973 (sha256
6974 (base32
6975 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6976 (build-system python-build-system)
6977 (arguments
6978 `(#:phases
6979 (modify-phases %standard-phases
6980 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6981 ;; run tests instead for now.
6982 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6983 (native-inputs `(("python-nose" ,python-nose)))
6984 (home-page "http://www.python-excel.org/")
6985 (synopsis "Library for extracting data from Excel files")
6986 (description "This packages provides a library to extract data from
6987 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6988 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6989 Unicode-aware. It is not intended as an end-user tool.")
6990 (license license:bsd-3)))
6991
6992 (define-public python2-xlrd
6993 (package-with-python2 python-xlrd))
6994
6995 (define-public python-prettytable
6996 (package
6997 (name "python-prettytable")
6998 (version "0.7.2")
6999 (source
7000 (origin
7001 (method url-fetch)
7002 (uri (string-append
7003 "https://pypi.python.org/packages/source/P/PrettyTable/"
7004 "prettytable-" version ".tar.bz2"))
7005 (sha256
7006 (base32
7007 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7008 (build-system python-build-system)
7009 (home-page "http://code.google.com/p/prettytable/")
7010 (synopsis "Display tabular data in an ASCII table format")
7011 (description
7012 "A library designed to represent tabular data in visually appealing ASCII
7013 tables. PrettyTable allows for selection of which columns are to be printed,
7014 independent alignment of columns (left or right justified or centred) and
7015 printing of sub-tables by specifying a row range.")
7016 (license license:bsd-3)))
7017
7018 (define-public python2-prettytable
7019 (package-with-python2 python-prettytable))
7020
7021 (define-public python-tables
7022 (package
7023 (name "python-tables")
7024 (version "3.2.2")
7025 (source
7026 (origin
7027 (method url-fetch)
7028 (uri (pypi-uri "tables" version))
7029 (sha256
7030 (base32
7031 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7032 (modules '((guix build utils)))
7033 (snippet
7034 '(begin
7035 ;; Remove pre-compiled .pyc files from source.
7036 (for-each delete-file-recursively
7037 (find-files "." "__pycache__" #:directories? #t))
7038 (for-each delete-file (find-files "." "\\.pyc$"))
7039 #t))))
7040 (build-system python-build-system)
7041 (arguments
7042 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7043 ;; or "check", so we must override the build and check phases.
7044 #:phases
7045 (modify-phases %standard-phases
7046 (add-after 'unpack 'use-gcc
7047 (lambda _
7048 (substitute* "setup.py"
7049 (("compiler = new_compiler\\(\\)" line)
7050 (string-append line
7051 "\ncompiler.set_executables(compiler='gcc',"
7052 "compiler_so='gcc',"
7053 "linker_exe='gcc',"
7054 "linker_so='gcc -shared')")))
7055 #t))
7056 (replace 'build
7057 (lambda* (#:key inputs #:allow-other-keys)
7058 (zero? (system* "python" "setup.py" "build"
7059 (string-append "--hdf5="
7060 (assoc-ref inputs "hdf5"))))))
7061 (replace 'check
7062 (lambda* (#:key inputs #:allow-other-keys)
7063 (zero? (system* "python" "setup.py" "check"
7064 (string-append "--hdf5="
7065 (assoc-ref inputs "hdf5")))))))))
7066 (propagated-inputs
7067 `(("python-numexpr" ,python-numexpr)
7068 ("python-numpy" ,python-numpy)))
7069 (native-inputs
7070 `(("python-cython" ,python-cython)
7071 ("pkg-config" ,pkg-config)))
7072 (inputs
7073 `(("hdf5" ,hdf5)
7074 ("bzip2" ,bzip2)
7075 ("zlib" ,zlib)))
7076 (home-page "http://www.pytables.org/")
7077 (synopsis "Hierarchical datasets for Python")
7078 (description "PyTables is a package for managing hierarchical datasets and
7079 designed to efficently cope with extremely large amounts of data.")
7080 (license license:bsd-3)))
7081
7082 (define-public python2-tables
7083 (package-with-python2 python-tables))
7084
7085 (define-public python-pyasn1
7086 (package
7087 (name "python-pyasn1")
7088 (version "0.1.9")
7089 (source
7090 (origin
7091 (method url-fetch)
7092 (uri (pypi-uri "pyasn1" version))
7093 (sha256
7094 (base32
7095 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7096 (build-system python-build-system)
7097 (home-page "http://pyasn1.sourceforge.net/")
7098 (synopsis "ASN.1 types and codecs")
7099 (description
7100 "This is an implementation of ASN.1 types and codecs in Python. It is
7101 suitable for a wide range of protocols based on the ASN.1 specification.")
7102 (license license:bsd-2)))
7103
7104 (define-public python2-pyasn1
7105 (package-with-python2 python-pyasn1))
7106
7107 (define-public python-pyasn1-modules
7108 (package
7109 (name "python-pyasn1-modules")
7110 (version "0.0.8")
7111 (source
7112 (origin
7113 (method url-fetch)
7114 (uri (pypi-uri "pyasn1-modules" version))
7115 (sha256
7116 (base32
7117 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7118 (build-system python-build-system)
7119 (propagated-inputs
7120 `(("python-pyasn1" ,python-pyasn1)))
7121 (home-page "https://sourceforge.net/projects/pyasn1/")
7122 (synopsis "ASN.1 codec implementations")
7123 (description
7124 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7125 implementations of ASN.1-based codecs and protocols.")
7126 (license license:bsd-3)))
7127
7128 (define-public python2-pyasn1-modules
7129 (package-with-python2 python-pyasn1-modules))
7130
7131 (define-public python-ipaddress
7132 (package
7133 (name "python-ipaddress")
7134 (version "1.0.16")
7135 (source (origin
7136 (method url-fetch)
7137 (uri (pypi-uri "ipaddress" version))
7138 (sha256
7139 (base32
7140 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
7141 (build-system python-build-system)
7142 (home-page "https://github.com/phihag/ipaddress")
7143 (synopsis "IP address manipulation library")
7144 (description
7145 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7146 in Python. This library is used to create, poke at, and manipulate IPv4 and
7147 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7148 module to older versions of Python.")
7149 (license license:psfl)))
7150
7151 (define-public python2-ipaddress
7152 (package-with-python2 python-ipaddress))
7153
7154 (define-public python2-ipaddr
7155 (package
7156 (name "python2-ipaddr")
7157 (version "2.1.11")
7158 (source
7159 (origin
7160 (method url-fetch)
7161 (uri (pypi-uri "ipaddr" version))
7162 (sha256
7163 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7164 (build-system python-build-system)
7165 (arguments
7166 `(#:python ,python-2 ;version 2 only
7167 #:phases
7168 (modify-phases %standard-phases
7169 (replace 'check
7170 (lambda* _
7171 (zero? (system* "python" "ipaddr_test.py")))))))
7172 (home-page "https://github.com/google/ipaddr-py")
7173 (synopsis "IP address manipulation library")
7174 (description
7175 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7176 IPv6 addresses and networks.
7177
7178 For new implementations you may prefer to use the standard module
7179 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7180 versions of Python.")
7181 (license license:asl2.0)))
7182
7183 (define-public python-idna
7184 (package
7185 (name "python-idna")
7186 (version "2.0")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (string-append "https://pypi.python.org/packages/source/i/"
7191 "idna/idna-" version ".tar.gz"))
7192 (sha256
7193 (base32
7194 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7195 (build-system python-build-system)
7196 (home-page "https://github.com/kjd/idna")
7197 (synopsis "Internationalized domain names in applications")
7198 (description
7199 "This is a library to support the Internationalised Domain Names in
7200 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7201 protocol is often referred to as “IDNA2008” and can produce different results
7202 from the earlier standard from 2003. The library is also intended to act as a
7203 suitable drop-in replacement for the “encodings.idna” module that comes with
7204 the Python standard library but currently only supports the older 2003
7205 specification.")
7206 (license license:bsd-4)))
7207
7208 (define-public python2-idna
7209 (package-with-python2 python-idna))
7210
7211 (define-public python-pretend
7212 (package
7213 (name "python-pretend")
7214 (version "1.0.8")
7215 (source
7216 (origin
7217 (method url-fetch)
7218 (uri (string-append "https://pypi.python.org/packages/source/p/"
7219 "pretend/pretend-" version ".tar.gz"))
7220 (sha256
7221 (base32
7222 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7223 (build-system python-build-system)
7224 (home-page "https://github.com/alex/pretend")
7225 (synopsis "Library for stubbing in Python")
7226 (description
7227 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7228 technique for writing tests. You may hear the term mixed up with mocks,
7229 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7230 responses, rather than doing any computation.")
7231 (license license:bsd-3)))
7232
7233 (define-public python2-pretend
7234 (package-with-python2 python-pretend))
7235
7236 (define-public python-cryptography-vectors
7237 (package
7238 (name "python-cryptography-vectors")
7239 (version "1.7.1")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "cryptography_vectors" version))
7244 (sha256
7245 (base32
7246 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
7247 (build-system python-build-system)
7248 (home-page "https://github.com/pyca/cryptography")
7249 (synopsis "Test vectors for the cryptography package")
7250 (description
7251 "This package contains test vectors for the cryptography package.")
7252 ;; Distributed under either BSD-3 or ASL2.0
7253 (license (list license:bsd-3 license:asl2.0))))
7254
7255 (define-public python2-cryptography-vectors
7256 (package-with-python2 python-cryptography-vectors))
7257
7258 (define-public python-cryptography
7259 (package
7260 (name "python-cryptography")
7261 (version "1.7.1")
7262 (source
7263 (origin
7264 (method url-fetch)
7265 (uri (pypi-uri "cryptography" version))
7266 (sha256
7267 (base32
7268 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
7269 (build-system python-build-system)
7270 (inputs
7271 `(("openssl" ,openssl)))
7272 (propagated-inputs
7273 `(("python-cffi" ,python-cffi)
7274 ("python-six" ,python-six)
7275 ("python-pyasn1" ,python-pyasn1)
7276 ("python-idna" ,python-idna)
7277 ("python-iso8601" ,python-iso8601)))
7278 (native-inputs
7279 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7280 ("python-hypothesis" ,python-hypothesis)
7281 ("python-pretend" ,python-pretend)
7282 ("python-pyasn1" ,python-pyasn1)
7283 ("python-pyasn1-modules" ,python-pyasn1-modules)
7284 ("python-pytz" ,python-pytz)
7285 ("python-pytest" ,python-pytest-2.9.2)))
7286 (home-page "https://github.com/pyca/cryptography")
7287 (synopsis "Cryptographic recipes and primitives for Python")
7288 (description
7289 "cryptography is a package which provides cryptographic recipes and
7290 primitives to Python developers. It aims to be the “cryptographic standard
7291 library” for Python. The package includes both high level recipes, and low
7292 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7293 message digests and key derivation functions.")
7294 ;; Distributed under either BSD-3 or ASL2.0
7295 (license (list license:bsd-3 license:asl2.0))
7296 (properties `((python2-variant . ,(delay python2-cryptography))))))
7297
7298 (define-public python2-cryptography
7299 (let ((crypto (package-with-python2
7300 (strip-python2-variant python-cryptography))))
7301 (package (inherit crypto)
7302 (propagated-inputs
7303 `(("python2-ipaddress" ,python2-ipaddress)
7304 ("python2-backport-ssl-match-hostname"
7305 ,python2-backport-ssl-match-hostname)
7306 ("python2-enum34" ,python2-enum34)
7307 ,@(package-propagated-inputs crypto))))))
7308
7309 (define-public python-pyopenssl
7310 (package
7311 (name "python-pyopenssl")
7312 (version "16.2.0")
7313 (source
7314 (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "pyOpenSSL" version))
7317 (sha256
7318 (base32
7319 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7320 (patches
7321 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7322 (build-system python-build-system)
7323 (arguments
7324 '(#:phases
7325 (modify-phases %standard-phases
7326 (delete 'check)
7327 (add-after 'install 'check
7328 (lambda* (#:key inputs outputs #:allow-other-keys)
7329 (add-installed-pythonpath inputs outputs)
7330 (zero? (system* "py.test" "-v")))))))
7331 (propagated-inputs
7332 `(("python-cryptography" ,python-cryptography)
7333 ("python-six" ,python-six)))
7334 (inputs
7335 `(("openssl" ,openssl)))
7336 (native-inputs
7337 `(("python-pytest" ,python-pytest)))
7338 (home-page "https://github.com/pyca/pyopenssl")
7339 (synopsis "Python wrapper module around the OpenSSL library")
7340 (description
7341 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7342 library.")
7343 (license license:asl2.0)))
7344
7345 (define-public python2-pyopenssl
7346 (package-with-python2 python-pyopenssl))
7347
7348 (define-public python-pip
7349 (package
7350 (name "python-pip")
7351 (version "9.0.1")
7352 (source
7353 (origin
7354 (method url-fetch)
7355 (uri (pypi-uri "pip" version))
7356 (sha256
7357 (base32
7358 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7359 (build-system python-build-system)
7360 (arguments
7361 '(#:tests? #f)) ; there are no tests in the pypi archive.
7362 (home-page "https://pip.pypa.io/")
7363 (synopsis "Package manager for Python software")
7364 (description
7365 "Pip is a package manager for Python software, that finds packages on the
7366 Python Package Index (PyPI).")
7367 (license license:expat)))
7368
7369 (define-public python2-pip
7370 (package-with-python2 python-pip))
7371
7372 (define-public python-tlsh
7373 (package
7374 (name "python-tlsh")
7375 (version "3.4.4")
7376 (home-page "https://github.com/trendmicro/tlsh")
7377 (source (origin
7378 (method url-fetch)
7379 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7380 version ".tar.gz"))
7381 (sha256
7382 (base32
7383 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7384 (file-name (string-append name "-" version ".tar.gz"))))
7385 (build-system cmake-build-system)
7386 (arguments
7387 '(#:out-of-source? #f
7388 #:phases (modify-phases %standard-phases
7389 (replace
7390 'install
7391 (lambda* (#:key outputs #:allow-other-keys)
7392 ;; Build and install the Python bindings. The underlying
7393 ;; C++ library is apparently not meant to be installed.
7394 (let ((out (assoc-ref outputs "out")))
7395 (with-directory-excursion "py_ext"
7396 (and (system* "python" "setup.py" "build")
7397 (system* "python" "setup.py" "install"
7398 (string-append "--prefix=" out))))))))))
7399 (inputs `(("python" ,python-wrapper))) ;for the bindings
7400 (synopsis "Fuzzy matching library for Python")
7401 (description
7402 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7403 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7404 value which can be used for similarity comparisons. Similar objects have
7405 similar hash values, which allows for the detection of similar objects by
7406 comparing their hash values. The byte stream should have a sufficient amount
7407 of complexity; for example, a byte stream of identical bytes will not generate
7408 a hash value.")
7409 (license license:asl2.0)))
7410
7411 (define-public python2-tlsh
7412 (package
7413 (inherit python-tlsh)
7414 (name "python2-tlsh")
7415 (inputs `(("python" ,python-2)))))
7416
7417 (define-public python-termcolor
7418 (package
7419 (name "python-termcolor")
7420 (version "1.1.0")
7421 (source
7422 (origin
7423 (method url-fetch)
7424 (uri (pypi-uri "python-termcolor" version))
7425 (sha256
7426 (base32
7427 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7428 (build-system python-build-system)
7429 (arguments
7430 ;; There are no tests.
7431 `(#:tests? #f))
7432 (home-page "http://pypi.python.org/pypi/termcolor")
7433 (synopsis "ANSII Color formatting for terminal output")
7434 (description
7435 "This package provides ANSII Color formatting for output in terminals.")
7436 (license license:expat)))
7437
7438 (define-public python2-termcolor
7439 (package-with-python2 python-termcolor))
7440
7441 (define-public python-libarchive-c
7442 (package
7443 (name "python-libarchive-c")
7444 (version "2.2")
7445 (source (origin
7446 (method url-fetch)
7447 (uri (pypi-uri "libarchive-c" version))
7448 (sha256
7449 (base32
7450 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7451 (build-system python-build-system)
7452 (arguments
7453 '(#:phases (modify-phases %standard-phases
7454 (add-before
7455 'build 'reference-libarchive
7456 (lambda* (#:key inputs #:allow-other-keys)
7457 ;; Retain the absolute file name of libarchive.so.
7458 (let ((libarchive (assoc-ref inputs "libarchive")))
7459 (substitute* "libarchive/ffi.py"
7460 (("find_library\\('archive'\\)")
7461 (string-append "'" libarchive
7462 "/lib/libarchive.so'")))))))))
7463 (inputs
7464 `(("libarchive" ,libarchive)))
7465 (home-page "https://github.com/Changaco/python-libarchive-c")
7466 (synopsis "Python interface to libarchive")
7467 (description
7468 "This package provides Python bindings to libarchive, a C library to
7469 access possibly compressed archives in many different formats. It uses
7470 Python's @code{ctypes} foreign function interface (FFI).")
7471 (license license:lgpl2.0+)))
7472
7473 (define-public python2-libarchive-c
7474 (package-with-python2 python-libarchive-c))
7475
7476 (define-public python-file
7477 (package
7478 (inherit file)
7479 (name "python-file")
7480 (source (origin
7481 (inherit (package-source file))
7482 ;; This patch should not be applied to python2-file.
7483 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7484 (build-system python-build-system)
7485 (arguments
7486 '(#:tests? #f ;no tests
7487 #:configure-flags '("--single-version-externally-managed" "--root=/")
7488 #:phases (modify-phases %standard-phases
7489 (add-before 'build 'change-directory
7490 (lambda _
7491 (chdir "python")
7492 #t))
7493 (add-before 'build 'set-library-file-name
7494 (lambda* (#:key inputs #:allow-other-keys)
7495 (let ((file (assoc-ref inputs "file")))
7496 (substitute* "magic.py"
7497 (("find_library\\('magic'\\)")
7498 (string-append "'" file "/lib/libmagic.so'")))
7499 #t))))))
7500 (inputs `(("file" ,file)))
7501 (self-native-input? #f)
7502 (synopsis "Python bindings to the libmagic file type guesser. Note that
7503 this module and the python-magic module both provide a \"magic.py\" file;
7504 these two modules, which are different and were developed separately, both
7505 serve the same purpose: provide Python bindings for libmagic.")))
7506
7507 (define-public python2-file
7508 (package-with-python2 python-file))
7509
7510 (define-public python-debian
7511 (package
7512 (name "python-debian")
7513 (version "0.1.28")
7514 (source
7515 (origin
7516 (method url-fetch)
7517 (uri (pypi-uri name version))
7518 (sha256
7519 (base32
7520 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7521 (build-system python-build-system)
7522 (propagated-inputs
7523 `(("python-six" ,python-six)))
7524 (home-page "http://packages.debian.org/sid/python-debian")
7525 (synopsis "Debian package related modules")
7526 (description
7527 ;; XXX: Use @enumerate instead of @itemize to work around
7528 ;; <http://bugs.gnu.org/21772>.
7529 "This package provides Python modules that abstract many formats of
7530 Debian-related files, such as:
7531
7532 @enumerate
7533 @item Debtags information;
7534 @item @file{debian/changelog} files;
7535 @item packages files, pdiffs;
7536 @item control files of single or multiple RFC822-style paragraphs---e.g.
7537 @file{debian/control}, @file{.changes}, @file{.dsc};
7538 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7539 contained files and meta-information.
7540 @end enumerate\n")
7541
7542 ;; Modules are either GPLv2+ or GPLv3+.
7543 (license license:gpl3+)))
7544
7545 (define-public python2-debian
7546 (package-with-python2 python-debian))
7547
7548 (define-public python-nbformat
7549 (package
7550 (name "python-nbformat")
7551 (version "4.1.0")
7552 (source
7553 (origin
7554 (method url-fetch)
7555 (uri (pypi-uri "nbformat" version))
7556 (sha256
7557 (base32
7558 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7559 (build-system python-build-system)
7560 (arguments `(#:tests? #f)) ; no test target
7561 (propagated-inputs
7562 `(("python-ipython-genutils" ,python-ipython-genutils)
7563 ("python-jsonschema" ,python-jsonschema)
7564 ("python-jupyter-core" ,python-jupyter-core)
7565 ("python-traitlets" ,python-traitlets)))
7566 (home-page "http://jupyter.org")
7567 (synopsis "Jupyter Notebook format")
7568 (description "This package provides the reference implementation of the
7569 Jupyter Notebook format and Python APIs for working with notebooks.")
7570 (license license:bsd-3)))
7571
7572 (define-public python2-nbformat
7573 (package-with-python2 python-nbformat))
7574
7575 (define-public python-bleach
7576 (package
7577 (name "python-bleach")
7578 (version "1.4.3")
7579 (source
7580 (origin
7581 (method url-fetch)
7582 (uri (pypi-uri "bleach" version))
7583 (sha256
7584 (base32
7585 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7586 (build-system python-build-system)
7587 (propagated-inputs
7588 `(("python-html5lib" ,python-html5lib-0.9)
7589 ("python-six" ,python-six)))
7590 (native-inputs
7591 `(("python-nose" ,python-nose)))
7592 (home-page "http://github.com/jsocol/bleach")
7593 (synopsis "Whitelist-based HTML-sanitizing tool")
7594 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7595 (license license:asl2.0)))
7596
7597 (define-public python2-bleach
7598 (package-with-python2 python-bleach))
7599
7600 (define-public python-entrypoints
7601 (package
7602 (name "python-entrypoints")
7603 (version "0.2.2")
7604 (source
7605 (origin
7606 (method url-fetch)
7607 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7608 version ".tar.gz"))
7609 (file-name (string-append name "-" version ".tar.gz"))
7610 (sha256
7611 (base32
7612 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7613 (build-system python-build-system)
7614 ;; The package does not come with a setup.py file, so we have to generate
7615 ;; one ourselves.
7616 (arguments
7617 `(#:tests? #f
7618 #:phases
7619 (modify-phases %standard-phases
7620 (add-after 'unpack 'create-setup.py
7621 (lambda _
7622 (call-with-output-file "setup.py"
7623 (lambda (port)
7624 (format port "\
7625 from setuptools import setup
7626 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7627 " ,version))))))))
7628 (home-page "https://github.com/takluyver/entrypoints")
7629 (synopsis "Discover and load entry points from installed Python packages")
7630 (description "Entry points are a way for Python packages to advertise
7631 objects with some common interface. The most common examples are
7632 @code{console_scripts} entry points, which define shell commands by
7633 identifying a Python function to run. The @code{entrypoints} module contains
7634 functions to find and load entry points.")
7635 (license license:expat)))
7636
7637 (define-public python2-entrypoints
7638 (package-with-python2 python-entrypoints))
7639
7640 (define-public python-nbconvert
7641 (package
7642 (name "python-nbconvert")
7643 (version "5.0.0b1")
7644 (source
7645 (origin
7646 (method url-fetch)
7647 (uri (pypi-uri "nbconvert" version))
7648 (sha256
7649 (base32
7650 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7651 (build-system python-build-system)
7652 (arguments
7653 `(;; The "bdist_egg" target is disabled by default, causing the installation
7654 ;; to fail.
7655 #:configure-flags (list "bdist_egg")
7656 ;; FIXME: 5 failures, 40 errors.
7657 #:tests? #f))
7658 ;; #:phases
7659 ;; (modify-phases %standard-phases
7660 ;; (replace 'check
7661 ;; (lambda _
7662 ;; (zero? (system* "py.test" "-v")))))
7663 (native-inputs
7664 `(("python-pytest" ,python-pytest)))
7665 (propagated-inputs
7666 `(("python-bleach" ,python-bleach)
7667 ("python-entrypoints" ,python-entrypoints)
7668 ("python-jinja2" ,python-jinja2)
7669 ("python-jupyter-core" ,python-jupyter-core)
7670 ("python-mistune" ,python-mistune)
7671 ("python-nbformat" ,python-nbformat)
7672 ("python-pygments" ,python-pygments)
7673 ("python-traitlets" ,python-traitlets)))
7674 (home-page "http://jupyter.org")
7675 (synopsis "Converting Jupyter Notebooks")
7676 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7677 notebooks to various other formats via Jinja templates. It allows you to
7678 convert an @code{.ipynb} notebook file into various static formats including:
7679
7680 @enumerate
7681 @item HTML
7682 @item LaTeX
7683 @item PDF
7684 @item Reveal JS
7685 @item Markdown (md)
7686 @item ReStructured Text (rst)
7687 @item executable script
7688 @end enumerate\n")
7689 (license license:bsd-3)))
7690
7691 (define-public python2-nbconvert
7692 (package-with-python2 python-nbconvert))
7693
7694 (define-public python-notebook
7695 (package
7696 (name "python-notebook")
7697 (version "4.2.3")
7698 (source (origin
7699 (method url-fetch)
7700 (uri (pypi-uri "notebook" version))
7701 (sha256
7702 (base32
7703 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7704 (build-system python-build-system)
7705 (arguments
7706 `(#:phases
7707 (modify-phases %standard-phases
7708 (replace 'check
7709 (lambda _
7710 ;; HOME must be set for tests
7711 (setenv "HOME" "/tmp")
7712 (zero? (system* "nosetests")))))))
7713 (propagated-inputs
7714 `(("python-jupyter-core" ,python-jupyter-core)
7715 ("python-nbformat" ,python-nbformat)
7716 ("python-nbconvert" ,python-nbconvert)
7717 ("python-ipython" ,python-ipython)))
7718 (native-inputs
7719 `(("python-nose" ,python-nose)
7720 ("python-sphinx" ,python-sphinx)
7721 ("python-requests" ,python-requests)))
7722 (home-page "http://jupyter.org/")
7723 (synopsis "Web-based notebook environment for interactive computing")
7724 (description
7725 "The Jupyter HTML notebook is a web-based notebook environment for
7726 interactive computing.")
7727 (properties `((python2-variant . ,(delay python2-notebook))))
7728 (license license:bsd-3)))
7729
7730 (define-public python2-notebook
7731 (let ((base (package-with-python2
7732 (strip-python2-variant python-notebook))))
7733 (package (inherit base)
7734 (native-inputs
7735 `(("python2-mock" ,python2-mock)
7736 ,@(package-native-inputs base)))
7737 (arguments
7738 (substitute-keyword-arguments (package-arguments base)
7739 ((#:phases phases)
7740 `(modify-phases ,phases
7741 (add-before 'check 'disable-test-case
7742 ;; The test requires network access to localhost. Curiously it
7743 ;; fails with Python 2 only. Simply make the test-case return
7744 ;; immediately.
7745 (lambda _
7746 (substitute*
7747 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7748 (("formats = self.nbconvert_api") "return #")))))))))))
7749
7750 (define-public python-widgetsnbextension
7751 (package
7752 (name "python-widgetsnbextension")
7753 (version "1.2.6")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "widgetsnbextension" version))
7758 (sha256
7759 (base32
7760 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7761 (build-system python-build-system)
7762 (propagated-inputs
7763 `(("python-notebook" ,python-notebook)))
7764 (native-inputs
7765 `(("python-certifi" ,python-certifi)
7766 ("python-nose" ,python-nose)))
7767 (home-page "http://ipython.org")
7768 (synopsis "IPython HTML widgets for Jupyter")
7769 (description "This package provides interactive HTML widgets for Jupyter
7770 notebooks.")
7771 (license license:bsd-3)))
7772
7773 (define-public python2-widgetsnbextension
7774 (package-with-python2 python-widgetsnbextension))
7775
7776 (define-public python-ipywidgets
7777 (package
7778 (name "python-ipywidgets")
7779 (version "5.2.2")
7780 (source
7781 (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "ipywidgets" version))
7784 (sha256
7785 (base32
7786 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7787 (build-system python-build-system)
7788 ;; FIXME: it's not clear how to run the tests.
7789 (arguments `(#:tests? #f))
7790 (propagated-inputs
7791 `(("python-ipykernel" ,python-ipykernel)
7792 ("python-ipython" ,python-ipython)
7793 ("python-traitlets" ,python-traitlets)
7794 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7795 (home-page "http://ipython.org")
7796 (synopsis "IPython HTML widgets for Jupyter")
7797 (description "Ipywidgets are interactive HTML widgets for Jupyter
7798 notebooks and the IPython kernel. Notebooks come alive when interactive
7799 widgets are used. Users gain control of their data and can visualize changes
7800 in the data.")
7801 (license license:bsd-3)))
7802
7803 (define-public python2-ipywidgets
7804 (package-with-python2 python-ipywidgets))
7805
7806 (define-public python-jupyter-console
7807 (package
7808 (name "python-jupyter-console")
7809 (version "5.0.0")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "jupyter_console" version))
7814 (sha256
7815 (base32
7816 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7817 (build-system python-build-system)
7818 ;; FIXME: it's not clear how to run the tests.
7819 (arguments `(#:tests? #f))
7820 (propagated-inputs
7821 `(("python-ipykernel" ,python-ipykernel)
7822 ("python-ipython" ,python-ipython)
7823 ("python-jupyter-client" ,python-jupyter-client)
7824 ("python-prompt-toolkit" ,python-prompt-toolkit)
7825 ("python-pygments" ,python-pygments)))
7826 (home-page "https://jupyter.org")
7827 (synopsis "Jupyter terminal console")
7828 (description "This package provides a terminal-based console frontend for
7829 Jupyter kernels. It also allows for console-based interaction with non-Python
7830 Jupyter kernels such as IJulia and IRKernel.")
7831 (license license:bsd-3)))
7832
7833 (define-public python2-jupyter-console
7834 (package-with-python2 python-jupyter-console))
7835
7836 (define-public jupyter
7837 (package
7838 (name "jupyter")
7839 (version "1.0.0")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "jupyter" version))
7844 (sha256
7845 (base32
7846 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7847 (build-system python-build-system)
7848 ;; FIXME: it's not clear how to run the tests.
7849 (arguments `(#:tests? #f))
7850 (propagated-inputs
7851 `(("python-ipykernel" ,python-ipykernel)
7852 ("python-ipywidgets" ,python-ipywidgets)
7853 ("python-jupyter-console" ,python-jupyter-console)
7854 ("python-nbconvert" ,python-nbconvert)
7855 ("python-notebook" ,python-notebook)))
7856 (home-page "http://jupyter.org")
7857 (synopsis "Web application for interactive documents")
7858 (description
7859 "The Jupyter Notebook is a web application that allows you to create and
7860 share documents that contain live code, equations, visualizations and
7861 explanatory text. Uses include: data cleaning and transformation, numerical
7862 simulation, statistical modeling, machine learning and much more.")
7863 (license license:bsd-3)))
7864
7865 (define-public python-chardet
7866 (package
7867 (name "python-chardet")
7868 (version "2.3.0")
7869 (source
7870 (origin
7871 (method url-fetch)
7872 (uri (string-append
7873 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7874 version
7875 ".tar.gz"))
7876 (sha256
7877 (base32
7878 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7879 (build-system python-build-system)
7880 (home-page "https://github.com/chardet/chardet")
7881 (synopsis "Universal encoding detector for Python 2 and 3")
7882 (description
7883 "This package provides @code{chardet}, a Python module that can
7884 automatically detect a wide range of file encodings.")
7885 (license license:lgpl2.1+)))
7886
7887 (define-public python2-chardet
7888 (package-with-python2 python-chardet))
7889
7890 (define-public python-docopt
7891 (package
7892 (name "python-docopt")
7893 (version "0.6.2")
7894 (source
7895 (origin
7896 (method url-fetch)
7897 ;; The release on PyPI does not include tests.
7898 (uri (string-append
7899 "https://github.com/docopt/docopt/archive/"
7900 version ".tar.gz"))
7901 (file-name (string-append name "-" version ".tar.gz"))
7902 (sha256
7903 (base32
7904 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7905 (build-system python-build-system)
7906 (native-inputs
7907 `(("python-pytest" ,python-pytest)))
7908 (arguments
7909 `(#:phases (alist-replace
7910 'check
7911 (lambda _ (zero? (system* "py.test")))
7912 %standard-phases)))
7913 (home-page "http://docopt.org")
7914 (synopsis "Command-line interface description language for Python")
7915 (description "This library allows the user to define a command-line
7916 interface from a program's help message rather than specifying it
7917 programatically with command-line parsers like @code{getopt} and
7918 @code{argparse}.")
7919 (license license:expat)))
7920
7921 (define-public python2-docopt
7922 (package-with-python2 python-docopt))
7923
7924 (define-public python-zope-event
7925 (package
7926 (name "python-zope-event")
7927 (version "4.1.0")
7928 (source
7929 (origin
7930 (method url-fetch)
7931 (uri (string-append "https://pypi.python.org/packages/source/z"
7932 "/zope.event/zope.event-" version ".tar.gz"))
7933 (sha256
7934 (base32
7935 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7936 (build-system python-build-system)
7937 (home-page "http://pypi.python.org/pypi/zope.event")
7938 (synopsis "Event publishing system for Python")
7939 (description "Zope.event provides an event publishing API, intended for
7940 use by applications which are unaware of any subscribers to their events. It
7941 is a simple event-dispatching system on which more sophisticated event
7942 dispatching systems can be built.")
7943 (license license:zpl2.1)))
7944
7945 (define-public python2-zope-event
7946 (package-with-python2 python-zope-event))
7947
7948 (define-public python-zope-interface
7949 (package
7950 (name "python-zope-interface")
7951 (version "4.1.3")
7952 (source
7953 (origin
7954 (method url-fetch)
7955 (uri (string-append "https://pypi.python.org/packages/source/z"
7956 "/zope.interface/zope.interface-" version ".tar.gz"))
7957 (sha256
7958 (base32
7959 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7960 (build-system python-build-system)
7961 (native-inputs
7962 `(("python-zope-event" ,python-zope-event)))
7963 (home-page "https://github.com/zopefoundation/zope.interface")
7964 (synopsis "Python implementation of the \"design by contract\"
7965 methodology")
7966 (description "Zope.interface provides an implementation of \"object
7967 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7968 conforming to a given API or contract.")
7969 (license license:zpl2.1)))
7970
7971 (define-public python2-zope-interface
7972 (package-with-python2 python-zope-interface))
7973
7974 (define-public python-zope-exceptions
7975 (package
7976 (name "python-zope-exceptions")
7977 (version "4.0.8")
7978 (source
7979 (origin
7980 (method url-fetch)
7981 (uri (string-append "https://pypi.python.org/packages/source/z"
7982 "/zope.exceptions/zope.exceptions-"
7983 version ".tar.gz"))
7984 (sha256
7985 (base32
7986 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7987 (build-system python-build-system)
7988 (arguments
7989 '(#:tests? #f)) ; circular dependency with zope.testrunner
7990 (propagated-inputs
7991 `(("python-zope-interface" ,python-zope-interface)))
7992 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7993 (synopsis "Zope exceptions")
7994 (description "Zope.exceptions provides general-purpose exception types
7995 that have uses outside of the Zope framework.")
7996 (license license:zpl2.1)))
7997
7998 (define-public python2-zope-exceptions
7999 (package-with-python2 python-zope-exceptions))
8000
8001 (define-public python-zope-testing
8002 (package
8003 (name "python-zope-testing")
8004 (version "4.5.0")
8005 (source
8006 (origin
8007 (method url-fetch)
8008 (uri (string-append "https://pypi.python.org/packages/source/z"
8009 "/zope.testing/zope.testing-" version ".tar.gz"))
8010 (sha256
8011 (base32
8012 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8013 (modules '((guix build utils)))
8014 (snippet
8015 '(begin
8016 ;; Remove pre-compiled .pyc files backup files from source.
8017 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8018 #t))))
8019 (build-system python-build-system)
8020 (native-inputs
8021 `(("python-zope-exceptions" ,python-zope-exceptions)))
8022 (propagated-inputs
8023 `(("python-zope-interface" ,python-zope-interface)))
8024 (home-page "http://pypi.python.org/pypi/zope.testing")
8025 (synopsis "Zope testing helpers")
8026 (description "Zope.testing provides a number of testing utilities for HTML
8027 forms, HTTP servers, regular expressions, and more.")
8028 (license license:zpl2.1)))
8029
8030 (define-public python2-zope-testing
8031 (package-with-python2 python-zope-testing))
8032
8033 (define-public python-zope-testrunner
8034 (package
8035 (name "python-zope-testrunner")
8036 (version "4.4.9")
8037 (source
8038 (origin
8039 (method url-fetch)
8040 (uri (string-append "https://pypi.python.org/packages/source/z"
8041 "/zope.testrunner/zope.testrunner-"
8042 version ".zip"))
8043 (sha256
8044 (base32
8045 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8046 (build-system python-build-system)
8047 (arguments
8048 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8049 (native-inputs
8050 `(("python-six" ,python-six)
8051 ;("python-zope-interface" ,python-zope-interface)
8052 ("python-zope-exceptions" ,python-zope-exceptions)
8053 ("python-zope-testing" ,python-zope-testing)
8054 ("unzip" ,unzip)))
8055 (propagated-inputs
8056 `(("python-zope-interface" ,python-zope-interface)))
8057 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8058 (synopsis "Zope testrunner script")
8059 (description "Zope.testrunner provides a script for running Python
8060 tests.")
8061 (license license:zpl2.1)))
8062
8063 (define-public python2-zope-testrunner
8064 (let ((base (package-with-python2 python-zope-testrunner)))
8065 (package
8066 (inherit base)
8067 (native-inputs
8068 (append (package-native-inputs base)
8069 `(("python2-subunit" ,python2-subunit)
8070 ("python2-mimeparse" ,python2-mimeparse)))))))
8071
8072 (define-public python-zope-i18nmessageid
8073 (package
8074 (name "python-zope-i18nmessageid")
8075 (version "4.0.3")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (string-append
8080 "https://pypi.python.org/packages/source/z"
8081 "/zope.i18nmessageid/zope.i18nmessageid-"
8082 version ".tar.gz"))
8083 (sha256
8084 (base32
8085 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8086 (build-system python-build-system)
8087 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8088 (synopsis "Message identifiers for internationalization")
8089 (description "Zope.i18nmessageid provides facilities for declaring
8090 internationalized messages within program source text.")
8091 (license license:zpl2.1)))
8092
8093 (define-public python2-zope-i18nmessageid
8094 (package-with-python2 python-zope-i18nmessageid))
8095
8096 (define-public python-zope-schema
8097 (package
8098 (name "python-zope-schema")
8099 (version "4.4.2")
8100 (source
8101 (origin
8102 (method url-fetch)
8103 (uri (string-append "https://pypi.python.org/packages/source/z"
8104 "/zope.schema/zope.schema-" version ".tar.gz"))
8105 (sha256
8106 (base32
8107 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8108 (build-system python-build-system)
8109 (arguments
8110 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8111 (propagated-inputs
8112 `(("python-zope-event" ,python-zope-event)
8113 ("python-zope-exceptions", python-zope-exceptions)
8114 ("python-zope-interface" ,python-zope-interface)))
8115 (native-inputs
8116 `(("python-zope-testing" ,python-zope-testing)
8117 ("python-coverage" ,python-coverage)
8118 ("python-nose" ,python-nose)))
8119 (home-page "http://pypi.python.org/pypi/zope.schema")
8120 (synopsis "Zope data schemas")
8121 (description "Zope.scheme provides extensions to zope.interface for
8122 defining data schemas.")
8123 (license license:zpl2.1)))
8124
8125 (define-public python2-zope-schema
8126 (package-with-python2 python-zope-schema))
8127
8128 (define-public python-zope-configuration
8129 (package
8130 (name "python-zope-configuration")
8131 (version "4.0.3")
8132 (source (origin
8133 (method url-fetch)
8134 (uri (string-append "https://pypi.python.org/packages/source/z"
8135 "/zope.configuration/zope.configuration-"
8136 version ".tar.gz"))
8137 (sha256
8138 (base32
8139 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8140 (build-system python-build-system)
8141 (arguments
8142 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8143 (propagated-inputs
8144 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8145 ("python-zope-schema" ,python-zope-schema)))
8146 (home-page "http://pypi.python.org/pypi/zope.configuration")
8147 (synopsis "Zope Configuration Markup Language")
8148 (description "Zope.configuration implements ZCML, the Zope Configuration
8149 Markup Language.")
8150 (license license:zpl2.1)))
8151
8152 (define-public python2-zope-configuration
8153 (package-with-python2 python-zope-configuration))
8154
8155 (define-public python-zope-proxy
8156 (package
8157 (name "python-zope-proxy")
8158 (version "4.1.6")
8159 (source
8160 (origin
8161 (method url-fetch)
8162 (uri (string-append "https://pypi.python.org/packages/source/z"
8163 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8164 (sha256
8165 (base32
8166 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8167 (build-system python-build-system)
8168 (arguments
8169 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8170 (propagated-inputs
8171 `(("python-zope-interface" ,python-zope-interface)))
8172 (home-page "http://pypi.python.org/pypi/zope.proxy")
8173 (synopsis "Generic, transparent proxies")
8174 (description "Zope.proxy provides generic, transparent proxies for Python.
8175 Proxies are special objects which serve as mostly-transparent wrappers around
8176 another object, intervening in the apparent behavior of the wrapped object
8177 only when necessary to apply the policy (e.g., access checking, location
8178 brokering, etc.) for which the proxy is responsible.")
8179 (license license:zpl2.1)))
8180
8181 (define-public python2-zope-proxy
8182 (package-with-python2 python-zope-proxy))
8183
8184 (define-public python-zope-location
8185 (package
8186 (name "python-zope-location")
8187 (version "4.0.3")
8188 (source
8189 (origin
8190 (method url-fetch)
8191 (uri (string-append "https://pypi.python.org/packages/source/z"
8192 "/zope.location/zope.location-" version ".tar.gz"))
8193 (sha256
8194 (base32
8195 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8196 (build-system python-build-system)
8197 (arguments
8198 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8199 (propagated-inputs
8200 `(("python-zope-proxy" ,python-zope-proxy)
8201 ("python-zope-schema" ,python-zope-schema)))
8202 (home-page "http://pypi.python.org/pypi/zope.location/")
8203 (synopsis "Zope location library")
8204 (description "Zope.location implements the concept of \"locations\" in
8205 Zope3, which are are special objects that have a structural location.")
8206 (license license:zpl2.1)))
8207
8208 (define-public python2-zope-location
8209 (package-with-python2 python-zope-location))
8210
8211 (define-public python-zope-security
8212 (package
8213 (name "python-zope-security")
8214 (version "4.0.3")
8215 (source
8216 (origin
8217 (method url-fetch)
8218 (uri (string-append "https://pypi.python.org/packages/source/z"
8219 "/zope.security/zope.security-" version ".tar.gz"))
8220 (sha256
8221 (base32
8222 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8223 (build-system python-build-system)
8224 (arguments
8225 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8226 (propagated-inputs
8227 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8228 ("python-zope-proxy" ,python-zope-proxy)
8229 ("python-zope-schema" ,python-zope-schema)))
8230 (native-inputs
8231 `(("python-six" ,python-six)
8232 ("python-zope-component" ,python-zope-component)
8233 ("python-zope-configuration" ,python-zope-configuration)
8234 ("python-zope-location" ,python-zope-location)
8235 ("python-zope-testrunner" ,python-zope-testrunner)
8236 ("python-zope-testing" ,python-zope-testing)))
8237 (home-page "http://pypi.python.org/pypi/zope.security")
8238 (synopsis "Zope security framework")
8239 (description "Zope.security provides a generic mechanism to implement
8240 security policies on Python objects.")
8241 (license license:zpl2.1)))
8242
8243 (define-public python2-zope-security
8244 (let ((zope-security (package-with-python2 python-zope-security)))
8245 (package (inherit zope-security)
8246 (propagated-inputs
8247 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8248 ,@(alist-delete
8249 "python-zope-testrunner"
8250 (package-propagated-inputs zope-security)))))))
8251
8252 (define-public python-zope-component
8253 (package
8254 (name "python-zope-component")
8255 (version "4.2.2")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (string-append "https://pypi.python.org/packages/source/z"
8260 "/zope.component/zope.component-" version ".tar.gz"))
8261 (sha256
8262 (base32
8263 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8264 (build-system python-build-system)
8265 (arguments
8266 ;; Skip tests due to circular dependency with python-zope-security.
8267 '(#:tests? #f))
8268 (native-inputs
8269 `(("python-zope-testing" ,python-zope-testing)))
8270 (propagated-inputs
8271 `(("python-zope-event" ,python-zope-event)
8272 ("python-zope-interface" ,python-zope-interface)
8273 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8274 ("python-zope-configuration" ,python-zope-configuration)))
8275 (home-page "https://github.com/zopefoundation/zope.component")
8276 (synopsis "Zope Component Architecture")
8277 (description "Zope.component represents the core of the Zope Component
8278 Architecture. Together with the zope.interface package, it provides
8279 facilities for defining, registering and looking up components.")
8280 (license license:zpl2.1)))
8281
8282 (define-public python2-zope-component
8283 (package-with-python2 python-zope-component))
8284
8285 (define-public python-pythondialog
8286 (package
8287 (name "python-pythondialog")
8288 (version "3.4.0")
8289 (source
8290 (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "pythondialog" version))
8293 (sha256
8294 (base32
8295 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8296 (build-system python-build-system)
8297 (arguments
8298 `(#:phases
8299 (modify-phases %standard-phases
8300 (add-after 'unpack 'patch-path
8301 (lambda* (#:key inputs #:allow-other-keys)
8302 (let* ((dialog (assoc-ref inputs "dialog")))
8303 ;; Since this library really wants to grovel the search path, we
8304 ;; must hardcode dialog's store path into it.
8305 (substitute* "dialog.py"
8306 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8307 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8308 #t))))
8309 #:tests? #f)) ; no test suite
8310 (propagated-inputs
8311 `(("dialog" ,dialog)))
8312 (home-page "http://pythondialog.sourceforge.net/")
8313 (synopsis "Python interface to the UNIX dialog utility")
8314 (description "A Python wrapper for the dialog utility. Its purpose is to
8315 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8316 This allows one to make simple text-mode user interfaces on Unix-like systems")
8317 (license license:lgpl2.1)
8318 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8319
8320 (define-public python2-pythondialog
8321 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8322 (package
8323 (inherit base)
8324 (version (package-version python-pythondialog))
8325 (source (origin
8326 (method url-fetch)
8327 (uri (pypi-uri "python2-pythondialog" version))
8328 (sha256
8329 (base32
8330 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8331
8332 (define-public python-pyrfc3339
8333 (package
8334 (name "python-pyrfc3339")
8335 (version "1.0")
8336 (source
8337 (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "pyRFC3339" version))
8340 (sha256
8341 (base32
8342 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8343 (build-system python-build-system)
8344 (propagated-inputs
8345 `(("python-pytz" ,python-pytz)))
8346 (native-inputs
8347 `(("python-nose" ,python-nose)))
8348 (home-page "https://github.com/kurtraschke/pyRFC3339")
8349 (synopsis "Python timestamp library")
8350 (description "Python library for generating and parsing RFC 3339-compliant
8351 timestamps.")
8352 (license license:expat)))
8353
8354 (define-public python2-pyrfc3339
8355 (package-with-python2 python-pyrfc3339))
8356
8357 (define-public python-werkzeug
8358 (package
8359 (name "python-werkzeug")
8360 (version "0.11.15")
8361 (source
8362 (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "Werkzeug" version))
8365 (sha256
8366 (base32
8367 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8368 (build-system python-build-system)
8369 (native-inputs
8370 `(("python-pytest" ,python-pytest)))
8371 (home-page "http://werkzeug.pocoo.org/")
8372 (synopsis "Utilities for WSGI applications")
8373 (description "One of the most advanced WSGI utility modules. It includes a
8374 powerful debugger, full-featured request and response objects, HTTP utilities to
8375 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8376 uploads, a powerful URL routing system and a bunch of community-contributed
8377 addon modules.")
8378 (license license:x11)))
8379
8380 (define-public python2-werkzeug
8381 (package-with-python2 python-werkzeug))
8382
8383 (define-public python-configobj
8384 (package
8385 (name "python-configobj")
8386 (version "5.0.6")
8387 (source (origin
8388 (method url-fetch)
8389 (uri (string-append
8390 "https://pypi.python.org/packages/source/c/configobj/"
8391 "configobj-" version ".tar.gz"))
8392 (sha256
8393 (base32
8394 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8395 ;; Patch setup.py so it looks for python-setuptools, which is
8396 ;; required to parse the keyword 'install_requires' in setup.py.
8397 (patches (search-patches "python-configobj-setuptools.patch"))))
8398 (build-system python-build-system)
8399 (propagated-inputs
8400 `(("python-six" ,python-six)))
8401 (synopsis "Config file reading, writing and validation")
8402 (description "ConfigObj is a simple but powerful config file reader and
8403 writer: an ini file round tripper. Its main feature is that it is very easy to
8404 use, with a straightforward programmer’s interface and a simple syntax for
8405 config files.")
8406 (home-page "https://github.com/DiffSK/configobj")
8407 (license license:bsd-3)))
8408
8409 (define-public python2-configobj
8410 (package-with-python2 python-configobj))
8411
8412 (define-public python-configargparse
8413 (package
8414 (name "python-configargparse")
8415 (version "0.10.0")
8416 (source (origin
8417 (method url-fetch)
8418 (uri (string-append
8419 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8420 "ConfigArgParse-" version ".tar.gz"))
8421 (sha256
8422 (base32
8423 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8424 (build-system python-build-system)
8425 (arguments
8426 ;; FIXME: Bug in test suite filed upstream:
8427 ;; https://github.com/bw2/ConfigArgParse/issues/32
8428 '(#:tests? #f))
8429 (synopsis "Replacement for argparse")
8430 (description "A drop-in replacement for argparse that allows options to also
8431 be set via config files and/or environment variables.")
8432 (home-page "https://github.com/bw2/ConfigArgParse")
8433 (license license:expat)))
8434
8435 (define-public python2-configargparse
8436 (package-with-python2 python-configargparse))
8437
8438 (define-public python-ndg-httpsclient
8439 (package
8440 (name "python-ndg-httpsclient")
8441 (version "0.4.2")
8442 (source (origin
8443 (method url-fetch)
8444 (uri (pypi-uri "ndg_httpsclient" version))
8445 (sha256
8446 (base32
8447 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8448 (build-system python-build-system)
8449 (arguments
8450 '(;; The tests appear to require networking.
8451 #:tests? #f))
8452 (propagated-inputs
8453 `(("python-pyopenssl" ,python-pyopenssl)))
8454 (synopsis "HTTPS support for Python's httplib and urllib2")
8455 (description "This is a HTTPS client implementation for httplib and urllib2
8456 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8457 over the default provided with Python and importantly enables full verification
8458 of the SSL peer.")
8459 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8460 (license license:bsd-3)))
8461
8462 ;; python2-openssl requires special care, so package-with-python2 is
8463 ;; insufficient.
8464 (define-public python2-ndg-httpsclient
8465 (package (inherit python-ndg-httpsclient)
8466 (name "python2-ndg-httpsclient")
8467 (arguments `(#:python ,python-2))
8468 (propagated-inputs
8469 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8470
8471 (define-public python-contextlib2
8472 (package
8473 (name "python-contextlib2")
8474 (version "0.4.0")
8475 (source
8476 (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "contextlib2" version))
8479 (sha256
8480 (base32
8481 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8482 (build-system python-build-system)
8483 (arguments
8484 `(#:phases
8485 (modify-phases %standard-phases
8486 (replace 'check
8487 (lambda _ (zero?
8488 (system*
8489 "python" "test_contextlib2.py" "-v")))))))
8490 (home-page "http://contextlib2.readthedocs.org/")
8491 (synopsis "Tools for decorators and context managers")
8492 (description "This module is primarily a backport of the Python
8493 3.2 contextlib to earlier Python versions. Like contextlib, it
8494 provides utilities for common tasks involving decorators and context
8495 managers. It also contains additional features that are not part of
8496 the standard library.")
8497 (license license:psfl)))
8498
8499 (define-public python2-contextlib2
8500 (package-with-python2 python-contextlib2))
8501
8502 (define-public python-texttable
8503 (package
8504 (name "python-texttable")
8505 (version "0.8.4")
8506 (source
8507 (origin
8508 (method url-fetch)
8509 (uri (pypi-uri "texttable" version))
8510 (sha256
8511 (base32
8512 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8513 (build-system python-build-system)
8514 (arguments '(#:tests? #f)) ; no tests
8515 (home-page "https://github.com/foutaise/texttable/")
8516 (synopsis "Python module for creating simple ASCII tables")
8517 (description "Texttable is a Python module for creating simple ASCII
8518 tables.")
8519 (license license:lgpl2.1+)))
8520
8521 (define-public python2-texttable
8522 (package-with-python2 python-texttable))
8523
8524 (define-public python-websocket-client
8525 (package
8526 (name "python-websocket-client")
8527 (version "0.37.0")
8528 (source
8529 (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "websocket_client" version))
8532 (sha256
8533 (base32
8534 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8535 (build-system python-build-system)
8536 (propagated-inputs
8537 `(("python-six" ,python-six)))
8538 (home-page "https://github.com/liris/websocket-client")
8539 (synopsis "WebSocket client for Python")
8540 (description "The Websocket-client module provides the low level APIs for
8541 WebSocket usage in Python programs.")
8542 (license license:lgpl2.1+)))
8543
8544 (define-public python2-websocket-client
8545 (package-with-python2 python-websocket-client))
8546
8547 (define-public python-atomicwrites
8548 (package
8549 (name "python-atomicwrites")
8550 (version "1.1.0")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (pypi-uri "atomicwrites" version))
8554 (sha256
8555 (base32
8556 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
8557 (build-system python-build-system)
8558 (synopsis "Atomic file writes in Python")
8559 (description "Library for atomic file writes using platform dependent tools
8560 for atomic file system operations.")
8561 (home-page "https://github.com/untitaker/python-atomicwrites")
8562 (license license:expat)))
8563
8564 (define-public python2-atomicwrites
8565 (package-with-python2 python-atomicwrites))
8566
8567 (define-public python-requests-toolbelt
8568 (package
8569 (name "python-requests-toolbelt")
8570 (version "0.6.2")
8571 (source (origin
8572 (method url-fetch)
8573 (uri (string-append
8574 "https://pypi.python.org/packages/"
8575 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8576 "requests-toolbelt-" version ".tar.gz"))
8577 (sha256
8578 (base32
8579 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8580 (build-system python-build-system)
8581 (native-inputs
8582 `(("python-betamax" ,python-betamax)
8583 ("python-mock" ,python-mock)
8584 ("python-pytest" ,python-pytest)))
8585 (propagated-inputs
8586 `(("python-requests" ,python-requests)))
8587 (synopsis "Extensions to python-requests")
8588 (description "This is a toolbelt of useful classes and functions to be used
8589 with python-requests.")
8590 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8591 (license license:asl2.0)))
8592
8593 (define-public python-click-threading
8594 (package
8595 (name "python-click-threading")
8596 (version "0.2.0")
8597 (source (origin
8598 (method url-fetch)
8599 (uri (string-append
8600 "https://pypi.python.org/packages/"
8601 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8602 "click-threading-" version ".tar.gz"))
8603 (sha256
8604 (base32
8605 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8606 (build-system python-build-system)
8607 (propagated-inputs
8608 `(("python-click" ,python-click)))
8609 (synopsis "Utilities for multithreading in Click")
8610 (description "This package provides utilities for multithreading in Click
8611 applications.")
8612 (home-page "https://github.com/click-contrib/click-threading")
8613 (license license:expat)))
8614
8615 (define-public python-click-log
8616 (package
8617 (name "python-click-log")
8618 (version "0.1.8")
8619 (source (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "click-log" version))
8622 (sha256
8623 (base32
8624 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8625 (build-system python-build-system)
8626 (propagated-inputs
8627 `(("python-click" ,python-click)))
8628 (synopsis "Logging for click applications")
8629 (description "This package provides a Python library for logging Click
8630 applications.")
8631 (home-page "https://github.com/click-contrib/click-log")
8632 (license license:expat)))
8633
8634 (define-public python-apipkg
8635 (package
8636 (name "python-apipkg")
8637 (version "1.4")
8638 (source (origin
8639 (method url-fetch)
8640 (uri (pypi-uri "apipkg" version))
8641 (sha256
8642 (base32
8643 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8644 (build-system python-build-system)
8645 (native-inputs
8646 `(("python-pytest" ,python-pytest)))
8647 (synopsis "Namespace control and lazy-import mechanism")
8648 (description "With apipkg you can control the exported namespace of a Python
8649 package and greatly reduce the number of imports for your users. It is a small
8650 pure Python module that works on virtually all Python versions.")
8651 (home-page "https://bitbucket.org/hpk42/apipkg")
8652 (license license:expat)))
8653
8654 (define-public python2-apipkg
8655 (package-with-python2 python-apipkg))
8656
8657 (define-public python-execnet
8658 (package
8659 (name "python-execnet")
8660 (version "1.4.1")
8661 (source (origin
8662 (method url-fetch)
8663 (uri (pypi-uri "execnet" version))
8664 (sha256
8665 (base32
8666 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8667 (build-system python-build-system)
8668 (arguments
8669 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8670 ;; The two test failures are caused by the lack of an `ssh` executable.
8671 ;; The test suite can be run with pytest after the 'install' phase.
8672 #:tests? #f))
8673 (native-inputs
8674 `(("python-pytest" ,python-pytest)
8675 ("python-setuptools-scm" ,python-setuptools-scm)))
8676 (propagated-inputs
8677 `(("python-apipkg" ,python-apipkg)))
8678 (synopsis "Rapid multi-Python deployment")
8679 (description "Execnet provides a share-nothing model with
8680 channel-send/receive communication for distributing execution across many
8681 Python interpreters across version, platform and network barriers. It has a
8682 minimal and fast API targetting the following uses:
8683 @enumerate
8684 @item distribute tasks to (many) local or remote CPUs
8685 @item write and deploy hybrid multi-process applications
8686 @item write scripts to administer multiple environments
8687 @end enumerate")
8688 (home-page "http://codespeak.net/execnet/")
8689 (license license:expat)))
8690
8691 (define-public python2-execnet
8692 (package-with-python2 python-execnet))
8693
8694 (define-public python-trollius-redis
8695 (package
8696 (name "python-trollius-redis")
8697 (version "0.1.4")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (pypi-uri "trollius_redis" version))
8702 (sha256
8703 (base32
8704 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8705 (build-system python-build-system)
8706 ;; TODO: Tests require packaging 'hiredis'.
8707 (arguments '(#:tests? #f))
8708 (home-page "https://github.com/benjolitz/trollius-redis")
8709 (synopsis "Port of asyncio-redis to trollius")
8710 (description "@code{trollius-redis} is a Redis client for Python
8711 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8712 Redis protocol.")
8713 (license license:bsd-2)))
8714
8715 (define-public python2-trollius-redis
8716 (package-with-python2 python-trollius-redis))
8717
8718 ;;; The software provided by this package was integrated into pytest 2.8.
8719 (define-public python-pytest-cache
8720 (package
8721 (name "python-pytest-cache")
8722 (version "1.0")
8723 (source (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "pytest-cache" version))
8726 (sha256
8727 (base32
8728 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8729 (build-system python-build-system)
8730 (propagated-inputs
8731 `(("python-apipkg" ,python-apipkg)
8732 ("python-execnet" ,python-execnet)
8733 ("python-py" ,python-py)
8734 ("python-pytest" ,python-pytest)))
8735 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8736 (description "The pytest-cache plugin provides tools to rerun failures from
8737 the last py.test invocation.")
8738 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8739 (license license:expat)))
8740
8741 (define-public python2-pytest-cache
8742 (package-with-python2 python-pytest-cache))
8743
8744 (define-public python-pytest-localserver
8745 (package
8746 (name "python-pytest-localserver")
8747 (version "0.3.5")
8748 (source (origin
8749 (method url-fetch)
8750 (uri (pypi-uri "pytest-localserver" version))
8751 (sha256
8752 (base32
8753 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8754 (build-system python-build-system)
8755 (arguments
8756 `(#:phases (modify-phases %standard-phases
8757 (replace 'check
8758 (lambda _
8759 (zero? (system* "py.test" "--genscript=runtests.py"))
8760 (zero? (system* "py.test")))))))
8761 (native-inputs
8762 `(("python-pytest" ,python-pytest)
8763 ("python-requests" ,python-requests)
8764 ("python-six" ,python-six)))
8765 (propagated-inputs
8766 `(("python-werkzeug" ,python-werkzeug)))
8767 (synopsis "Py.test plugin to test server connections locally")
8768 (description "Pytest-localserver is a plugin for the pytest testing
8769 framework which enables you to test server connections locally.")
8770 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8771 (license license:expat)))
8772
8773 (define-public python-wsgi-intercept
8774 (package
8775 (name "python-wsgi-intercept")
8776 (version "1.2.2")
8777 (source (origin
8778 (method url-fetch)
8779 (uri (string-append
8780 "https://pypi.python.org/packages/"
8781 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8782 "wsgi_intercept-" version ".tar.gz"))
8783 (sha256
8784 (base32
8785 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8786 (build-system python-build-system)
8787 (propagated-inputs
8788 `(("python-six" ,python-six)))
8789 (native-inputs
8790 `(("python-pytest" ,python-pytest)
8791 ("python-httplib2" ,python-httplib2)
8792 ("python-requests" ,python-requests)
8793 ("python-urllib3" ,python-urllib3)))
8794 (synopsis "Puts a WSGI application in place of a real URI for testing")
8795 (description "Wsgi_intercept installs a WSGI application in place of a real
8796 URI for testing. Testing a WSGI application normally involves starting a
8797 server at a local host and port, then pointing your test code to that address.
8798 Instead, this library lets you intercept calls to any specific host/port
8799 combination and redirect them into a WSGI application importable by your test
8800 program. Thus, you can avoid spawning multiple processes or threads to test
8801 your Web app.")
8802 (home-page "https://github.com/cdent/wsgi-intercept")
8803 (license license:expat)))
8804
8805 (define-public python-pytest-xprocess
8806 (package
8807 (name "python-pytest-xprocess")
8808 (version "0.9.1")
8809 (source (origin
8810 (method url-fetch)
8811 (uri (pypi-uri "pytest-xprocess" version))
8812 (sha256
8813 (base32
8814 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8815 (build-system python-build-system)
8816 (propagated-inputs
8817 `(("python-pytest" ,python-pytest)
8818 ("python-pytest-cache" ,python-pytest-cache)
8819 ("python-psutil" ,python-psutil)))
8820 (synopsis "Pytest plugin to manage external processes across test runs")
8821 (description "Pytest-xprocess is an experimental py.test plugin for managing
8822 processes across test runs.")
8823 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8824 (license license:expat)))
8825
8826 (define-public python-icalendar
8827 (package
8828 (name "python-icalendar")
8829 (version "3.11.3")
8830 (source (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "icalendar" version))
8833 (sha256
8834 (base32
8835 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
8836 (build-system python-build-system)
8837 (propagated-inputs
8838 `(("python-dateutil" ,python-dateutil)
8839 ("python-pytz" ,python-pytz)))
8840 (synopsis "Python library for parsing iCalendar files")
8841 (description "The icalendar package is a parser/generator of iCalendar
8842 files for use with Python.")
8843 (home-page "https://github.com/collective/icalendar")
8844 (license license:bsd-2)))
8845
8846 (define-public python-sphinxcontrib-newsfeed
8847 (package
8848 (name "python-sphinxcontrib-newsfeed")
8849 (version "0.1.4")
8850 (source (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8853 (sha256
8854 (base32
8855 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8856 (arguments '(#:tests? #f)) ; No tests.
8857 (build-system python-build-system)
8858 (propagated-inputs
8859 `(("python-sphinx" ,python-sphinx)))
8860 (synopsis "News Feed extension for Sphinx")
8861 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8862 Blog, News or Announcements section to a Sphinx website.")
8863 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8864 (license license:bsd-2)))
8865
8866 (define-public python-args
8867 (package
8868 (name "python-args")
8869 (version "0.1.0")
8870 (source (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "args" version))
8873 (sha256
8874 (base32
8875 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8876 (build-system python-build-system)
8877 (home-page "https://github.com/kennethreitz/args")
8878 (synopsis "Command-line argument parser")
8879 (description
8880 "This library provides a Python module to parse command-line arguments.")
8881 (license license:bsd-3)))
8882
8883 (define-public python2-args
8884 (package-with-python2 python-args))
8885
8886 (define-public python-clint
8887 (package
8888 (name "python-clint")
8889 (version "0.5.1")
8890 (source (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "clint" version))
8893 (sha256
8894 (base32
8895 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8896 (build-system python-build-system)
8897 (arguments
8898 '(#:phases
8899 (modify-phases %standard-phases
8900 (replace 'check
8901 (lambda _
8902 (zero? (system* "py.test" "-v")))))))
8903 (native-inputs
8904 `(("python-pytest" ,python-pytest)))
8905 (propagated-inputs
8906 `(("python-args" ,python-args)))
8907 (home-page "https://github.com/kennethreitz/clint")
8908 (synopsis "Command-line interface tools")
8909 (description
8910 "Clint is a Python module filled with a set of tools for developing
8911 command-line applications, including tools for colored and indented
8912 output, progress bar display, and pipes.")
8913 (license license:isc)))
8914
8915 (define-public python2-clint
8916 (package-with-python2 python-clint))
8917
8918 (define-public python-astor
8919 (package
8920 (name "python-astor")
8921 (version "0.5")
8922 (source (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "astor" version))
8925 (sha256
8926 (base32
8927 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8928 (build-system python-build-system)
8929 (home-page "https://github.com/berkerpeksag/astor")
8930 (synopsis "Read and write Python ASTs")
8931 (description
8932 "Astor is designed to allow easy manipulation of Python source via the
8933 Abstract Syntax Tree.")
8934 (license license:bsd-3)))
8935
8936 (define-public python2-astor
8937 (package-with-python2 python-astor))
8938
8939 (define-public python-rply
8940 (package
8941 (name "python-rply")
8942 (version "0.7.4")
8943 (source (origin
8944 (method url-fetch)
8945 (uri (pypi-uri "rply" version))
8946 (sha256
8947 (base32
8948 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8949 (build-system python-build-system)
8950 (propagated-inputs
8951 `(("python-appdirs" ,python-appdirs)))
8952 (home-page "https://github.com/alex/rply")
8953 (synopsis "Parser generator for Python")
8954 (description
8955 "This package provides a pure Python based parser generator, that also
8956 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8957 with a new public API, and RPython support.")
8958 (license license:bsd-3)))
8959
8960 (define-public python2-rply
8961 (package-with-python2 python-rply))
8962
8963 (define-public python-hy
8964 (package
8965 (name "python-hy")
8966 (version "0.11.1")
8967 (source (origin
8968 (method url-fetch)
8969 (uri (pypi-uri "hy" version))
8970 (sha256
8971 (base32
8972 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8973 (build-system python-build-system)
8974 (arguments
8975 '(#:phases
8976 (modify-phases %standard-phases
8977 (replace 'check
8978 (lambda _
8979 ;; Tests require write access to HOME.
8980 (setenv "HOME" "/tmp")
8981 (zero? (system* "nosetests")))))))
8982 (native-inputs
8983 `(("python-coverage" ,python-coverage)
8984 ("python-nose" ,python-nose)))
8985 (propagated-inputs
8986 `(("python-astor" ,python-astor)
8987 ("python-clint" ,python-clint)
8988 ("python-rply" ,python-rply)))
8989 (home-page "http://hylang.org/")
8990 (synopsis "Lisp frontend to Python")
8991 (description
8992 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8993 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8994 Python at your fingertips, in Lisp form.")
8995 (license license:expat)))
8996
8997 (define-public python2-hy
8998 (package-with-python2 python-hy))
8999
9000 (define-public python-rauth
9001 (package
9002 (name "python-rauth")
9003 (version "0.7.2")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "rauth" version))
9008 (sha256
9009 (base32
9010 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
9011 (build-system python-build-system)
9012 (arguments
9013 `(#:test-target "check"))
9014 (propagated-inputs
9015 `(("python-requests" ,python-requests)))
9016 (home-page "https://github.com/litl/rauth")
9017 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9018 (description
9019 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9020 provides service wrappers for convenient connection initialization and
9021 authenticated session objects providing things like keep-alive.")
9022 (license license:expat)
9023 (properties `((python2-variant . ,(delay python2-rauth))))))
9024
9025 (define-public python2-rauth
9026 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9027 (package
9028 (inherit base)
9029 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9030 ,@(package-native-inputs base))))))
9031
9032 (define-public python2-functools32
9033 (package
9034 (name "python2-functools32")
9035 (version "3.2.3-2")
9036 (source
9037 (origin
9038 (method url-fetch)
9039 (uri (pypi-uri "functools32" version))
9040 (sha256
9041 (base32
9042 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9043 (build-system python-build-system)
9044 (arguments
9045 `(#:python ,python-2
9046 #:tests? #f)) ; no test target
9047 (home-page "https://github.com/MiCHiLU/python-functools32")
9048 (synopsis
9049 "Backport of the functools module from Python 3.2.3")
9050 (description
9051 "This package is a backport of the @code{functools} module from Python
9052 3.2.3 for use with older versions of Python and PyPy.")
9053 (license license:expat)))
9054
9055 (define-public python2-subprocess32
9056 (package
9057 (name "python2-subprocess32")
9058 (version "3.2.7")
9059 (source (origin
9060 (method url-fetch)
9061 (uri (pypi-uri "subprocess32" version))
9062 (sha256
9063 (base32
9064 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9065 (patches
9066 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9067 (build-system python-build-system)
9068 (arguments
9069 `(#:python ,python-2
9070 #:phases
9071 (modify-phases %standard-phases
9072 (add-after 'unpack 'patch-/bin/sh
9073 (lambda _
9074 (substitute* '("subprocess32.py"
9075 "test_subprocess32.py")
9076 (("/bin/sh") (which "sh")))
9077 #t))
9078 (delete 'check)
9079 (add-after 'install 'check
9080 (lambda* (#:key inputs outputs #:allow-other-keys)
9081 ;; For some reason this package fails to import
9082 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9083 ;; directory. Running tests after install is easier.
9084 (add-installed-pythonpath inputs outputs)
9085 (zero? (system* "python" "test_subprocess32.py")))))))
9086 (home-page "https://github.com/google/python-subprocess32")
9087 (synopsis "Backport of the subprocess module from Python 3.2")
9088 (description
9089 "This is a backport of the @code{subprocess} standard library module
9090 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9091 new features. On POSIX systems it is guaranteed to be reliable when used
9092 in threaded applications. It includes timeout support from Python 3.3 but
9093 otherwise matches 3.2’s API.")
9094 (license license:psfl)))
9095
9096 (define-public python2-futures
9097 (package
9098 (name "python2-futures")
9099 (version "3.0.3")
9100 (source
9101 (origin
9102 (method url-fetch)
9103 (uri (pypi-uri "futures" version))
9104 (sha256
9105 (base32
9106 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
9107 (build-system python-build-system)
9108 (arguments `(#:python ,python-2))
9109 (home-page "https://github.com/agronholm/pythonfutures")
9110 (synopsis
9111 "Backport of the concurrent.futures package from Python 3.2")
9112 (description
9113 "The concurrent.futures module provides a high-level interface for
9114 asynchronously executing callables. This package backports the
9115 concurrent.futures package from Python 3.2")
9116 (license license:bsd-3)))
9117
9118 (define-public python-promise
9119 (package
9120 (name "python-promise")
9121 (version "0.4.2")
9122 (source
9123 (origin
9124 (method url-fetch)
9125 (uri (pypi-uri "promise" version))
9126 (sha256
9127 (base32
9128 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9129 (build-system python-build-system)
9130 ;; Tests wants python-futures, which is a python2 only program, and
9131 ;; can't be found by python-promise at test time.
9132 (arguments `(#:tests? #f))
9133 (home-page "https://github.com/syrusakbary/promise")
9134 (synopsis "Promises/A+ implementation for Python")
9135 (description
9136 "Promises/A+ implementation for Python")
9137 (properties `((python2-variant . ,(delay python2-promise))))
9138 (license license:expat)))
9139
9140 (define-public python2-promise
9141 (let ((promise (package-with-python2
9142 (strip-python2-variant python-promise))))
9143 (package (inherit promise)
9144 (arguments (substitute-keyword-arguments (package-arguments promise)
9145 ((#:tests? _) #t)))
9146 (native-inputs
9147 `(("python2-futures" ,python2-futures)
9148 ("python2-pytest" ,python2-pytest)
9149 ,@(package-native-inputs promise))))))
9150
9151 (define-public python-urllib3
9152 (package
9153 (name "python-urllib3")
9154 (version "1.18.1")
9155 (source
9156 (origin
9157 (method url-fetch)
9158 (uri (pypi-uri "urllib3" version))
9159 (sha256
9160 (base32
9161 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9162 (build-system python-build-system)
9163 (arguments `(#:tests? #f))
9164 (native-inputs
9165 `(;; some packages for tests
9166 ("python-nose" ,python-nose)
9167 ("python-mock" ,python-mock)
9168 ("python-tornado" ,python-tornado)))
9169 (propagated-inputs
9170 `(;; extra packages for https security
9171 ("python-certifi" ,python-certifi)
9172 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9173 ("python-pyasn1" ,python-pyasn1)
9174 ("python-pyopenssl" ,python-pyopenssl)))
9175 (home-page "https://urllib3.readthedocs.org/")
9176 (synopsis "HTTP library with thread-safe connection pooling")
9177 (description
9178 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9179 can reuse the same socket connection for multiple requests, it can POST files,
9180 supports url redirection and retries, and also gzip and deflate decoding.")
9181 (license license:expat)))
9182
9183 (define-public python2-urllib3
9184 (package-with-python2 python-urllib3))
9185
9186 (define-public python-colorama
9187 (package
9188 (name "python-colorama")
9189 (version "0.3.7")
9190 (source
9191 (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "colorama" version))
9194 (sha256
9195 (base32
9196 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9197 (build-system python-build-system)
9198 (synopsis "Colored terminal text rendering for Python")
9199 (description "Colorama is a Python library for rendering colored terminal
9200 text.")
9201 (home-page "https://pypi.python.org/pypi/colorama")
9202 (license license:bsd-3)))
9203
9204 (define-public python2-colorama
9205 (package-with-python2 python-colorama))
9206
9207 (define-public python-rsa
9208 (package
9209 (name "python-rsa")
9210 (version "3.4.2")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "rsa" version))
9215 (sha256
9216 (base32
9217 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9218 (build-system python-build-system)
9219 (propagated-inputs
9220 `(("python-pyasn1" ,python-pyasn1)))
9221 (synopsis "Pure-Python RSA implementation")
9222 (description "Python-RSA is a pure-Python RSA implementation. It supports
9223 encryption and decryption, signing and verifying signatures, and key
9224 generation according to PKCS#1 version 1.5. It can be used as a Python
9225 library as well as on the command line.")
9226 (home-page "http://stuvel.eu/rsa")
9227 (license license:asl2.0)))
9228
9229 (define-public python2-rsa
9230 (package-with-python2 python-rsa))
9231
9232 (define-public python-pluggy
9233 (package
9234 (name "python-pluggy")
9235 (version "0.3.1")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "pluggy" version))
9240 (sha256
9241 (base32
9242 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9243 (build-system python-build-system)
9244 (synopsis "Plugin and hook calling mechanism for Python")
9245 (description "Pluggy is an extraction of the plugin manager as used by
9246 Pytest but stripped of Pytest specific details.")
9247 (home-page "https://pypi.python.org/pypi/pluggy")
9248 (license license:expat)))
9249
9250 (define-public python2-pluggy
9251 (package-with-python2 python-pluggy))
9252
9253 (define-public python-tox
9254 (package
9255 (name "python-tox")
9256 (version "2.3.1")
9257 (source
9258 (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "tox" version))
9261 (sha256
9262 (base32
9263 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9264 (build-system python-build-system)
9265 (arguments
9266 ;; FIXME: Tests require pytest-timeout, which itself requires
9267 ;; pytest>=2.8.0 for installation.
9268 '(#:tests? #f))
9269 (propagated-inputs
9270 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9271 ("python-py" ,python-py)
9272 ("python-virtualenv" ,python-virtualenv)))
9273 (native-inputs
9274 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9275 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9276 (home-page "http://tox.testrun.org/")
9277 (synopsis "Virtualenv-based automation of test activities")
9278 (description "Tox is a generic virtualenv management and test command line
9279 tool. It can be used to check that a package installs correctly with
9280 different Python versions and interpreters, or run tests in each type of
9281 supported environment, or act as a frontend to continuous integration
9282 servers.")
9283 (license license:expat)))
9284
9285 (define-public python2-tox
9286 (package-with-python2 python-tox))
9287
9288 (define-public python-jmespath
9289 (package
9290 (name "python-jmespath")
9291 (version "0.9.0")
9292 (source
9293 (origin
9294 (method url-fetch)
9295 (uri (pypi-uri "jmespath" version))
9296 (sha256
9297 (base32
9298 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9299 (build-system python-build-system)
9300 (native-inputs
9301 `(("python-nose" ,python-nose)))
9302 (synopsis "JSON Matching Expressions")
9303 (description "JMESPath (pronounced “james path”) is a Python library that
9304 allows one to declaratively specify how to extract elements from a JSON
9305 document.")
9306 (home-page "https://github.com/jmespath/jmespath.py")
9307 (license license:expat)))
9308
9309 (define-public python2-jmespath
9310 (package-with-python2 python-jmespath))
9311
9312 (define-public python-botocore
9313 (package
9314 (name "python-botocore")
9315 (version "1.5.10")
9316 (source
9317 (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "botocore" version))
9320 (sha256
9321 (base32
9322 "1hqvqwhgfcch4knm1l02ynx7qd1igxk3pj34c1x2b0r79jca524n"))))
9323 (build-system python-build-system)
9324 (arguments
9325 ;; FIXME: Many tests are failing.
9326 '(#:tests? #f))
9327 (propagated-inputs
9328 `(("python-dateutil" ,python-dateutil)
9329 ("python-docutils" ,python-docutils)
9330 ("python-jmespath" ,python-jmespath)))
9331 (native-inputs
9332 `(("python-mock" ,python-mock)
9333 ("python-nose" ,python-nose)
9334 ("behave" ,behave)
9335 ("python-tox" ,python-tox)
9336 ("python-wheel" ,python-wheel)))
9337 (home-page "https://github.com/boto/botocore")
9338 (synopsis "Low-level interface to AWS")
9339 (description "Botocore is a Python library that provides a low-level
9340 interface to the Amazon Web Services (AWS) API.")
9341 (license license:asl2.0)))
9342
9343 (define-public python2-botocore
9344 (package-with-python2 python-botocore))
9345
9346 (define-public awscli
9347 (package
9348 (name "awscli")
9349 (version "1.11.47")
9350 (source
9351 (origin
9352 (method url-fetch)
9353 (uri (pypi-uri name version))
9354 (sha256
9355 (base32
9356 "0p0pila0k99fm87q1gb24wyd34ags0vkh37h1fa6hklq4mi69i1w"))))
9357 (build-system python-build-system)
9358 (propagated-inputs
9359 `(("python-colorama" ,python-colorama)
9360 ("python-botocore" ,python-botocore)
9361 ("python-s3transfer" ,python-s3transfer)
9362 ("python-docutils" ,python-docutils)
9363 ("python-rsa" ,python-rsa)))
9364 (arguments
9365 ;; FIXME: The 'pypi' release does not contain tests.
9366 '(#:tests? #f))
9367 (home-page "https://aws.amazon.com/cli/")
9368 (synopsis "Command line client for AWS")
9369 (description "AWS CLI provides a unified command line interface to the
9370 Amazon Web Services (AWS) API.")
9371 (license license:asl2.0)))
9372
9373 (define-public python-hypothesis
9374 (package
9375 (name "python-hypothesis")
9376 (version "3.1.0")
9377 (source (origin
9378 (method url-fetch)
9379 (uri (pypi-uri "hypothesis" version))
9380 (sha256
9381 (base32
9382 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9383 (build-system python-build-system)
9384 (native-inputs
9385 `(("python-flake8" ,python-flake8)
9386 ("python-pytest" ,python-pytest)))
9387 (synopsis "Library for property based testing")
9388 (description "Hypothesis is a library for testing your Python code against a
9389 much larger range of examples than you would ever want to write by hand. It’s
9390 based on the Haskell library, Quickcheck, and is designed to integrate
9391 seamlessly into your existing Python unit testing work flow.")
9392 (home-page "https://github.com/DRMacIver/hypothesis")
9393 (license license:mpl2.0)
9394 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9395
9396 (define-public python2-hypothesis
9397 (let ((hypothesis (package-with-python2
9398 (strip-python2-variant python-hypothesis))))
9399 (package (inherit hypothesis)
9400 (native-inputs
9401 `(("python2-enum34" ,python2-enum34)
9402 ,@(package-native-inputs hypothesis))))))
9403
9404 (define-public python-pytest-subtesthack
9405 (package
9406 (name "python-pytest-subtesthack")
9407 (version "0.1.1")
9408 (source (origin
9409 (method url-fetch)
9410 (uri (pypi-uri "pytest-subtesthack" version))
9411 (sha256
9412 (base32
9413 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9414 (build-system python-build-system)
9415 (propagated-inputs
9416 `(("python-pytest" ,python-pytest)))
9417 (synopsis "Set-up and tear-down fixtures for unit tests")
9418 (description "This plugin allows you to set up and tear down fixtures within
9419 unit test functions that use @code{py.test}. This is useful for using
9420 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9421 function multiple times, without setting up or tearing down fixture state as is
9422 normally the case.")
9423 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9424 (license license:unlicense)))
9425
9426 (define-public python2-pytest-subtesthack
9427 (package-with-python2 python-pytest-subtesthack))
9428
9429 (define-public python-xdo
9430 (package
9431 (name "python-xdo")
9432 (version "0.3")
9433 (source (origin
9434 (method url-fetch)
9435 (uri (string-append
9436 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9437 "python-xdo_" version ".orig.tar.gz"))
9438 (sha256
9439 (base32
9440 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9441 (build-system python-build-system)
9442 (arguments
9443 '(#:phases
9444 (modify-phases %standard-phases
9445 (add-before 'install 'patch-libxdo-path
9446 ;; Hardcode the path of dynamically loaded libxdo library.
9447 (lambda* (#:key inputs #:allow-other-keys)
9448 (let ((libxdo (string-append
9449 (assoc-ref inputs "xdotool")
9450 "/lib/libxdo.so")))
9451 (substitute* "xdo/_xdo.py"
9452 (("find_library\\(\"xdo\"\\)")
9453 (simple-format #f "\"~a\"" libxdo)))
9454 #t))))
9455 #:tests? #f)) ; no tests provided
9456 (propagated-inputs
9457 `(("python-six" ,python-six)))
9458 (inputs
9459 `(("xdotool" ,xdotool)
9460 ("libX11" ,libx11)))
9461 (home-page "https://tracker.debian.org/pkg/python-xdo")
9462 (synopsis "Python library for simulating X11 keyboard/mouse input")
9463 (description "Provides bindings to libxdo for manipulating X11 via simulated
9464 input. (Note that this is mostly a legacy library; you may wish to look at
9465 python-xdo for newer bindings.)")
9466 (license license:bsd-3)))
9467
9468 (define-public python2-xdo
9469 (package-with-python2 python-xdo))
9470
9471 (define-public python-wtforms
9472 (package
9473 (name "python-wtforms")
9474 (version "2.1")
9475 (source
9476 (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "WTForms" version ".zip"))
9479 (sha256
9480 (base32
9481 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9482 (build-system python-build-system)
9483 (arguments
9484 '(#:phases
9485 (modify-phases %standard-phases
9486 (add-after 'unpack 'remove-django-test
9487 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9488 (lambda _
9489 (substitute*
9490 "tests/runtests.py"
9491 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9492 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9493 #t)))))
9494 (native-inputs
9495 `(("unzip" ,unzip)))
9496 (home-page "http://wtforms.simplecodes.com/")
9497 (synopsis
9498 "Form validation and rendering library for Python web development")
9499 (description
9500 "WTForms is a flexible forms validation and rendering library
9501 for Python web development. It is very similar to the web form API
9502 available in Django, but is a standalone package.")
9503 (license license:bsd-3)))
9504
9505 (define-public python2-wtforms
9506 (package-with-python2 python-wtforms))
9507
9508 (define-public python-mako
9509 (package
9510 (name "python-mako")
9511 (version "1.0.6")
9512 (source
9513 (origin
9514 (method url-fetch)
9515 (uri (pypi-uri "Mako" version))
9516 (sha256
9517 (base32
9518 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9519 (build-system python-build-system)
9520 (propagated-inputs
9521 `(("python-markupsafe" ,python-markupsafe)))
9522 (native-inputs
9523 `(("python-mock" ,python-mock)
9524 ("python-nose" ,python-nose)
9525 ("python-pytest" ,python-pytest)))
9526 (home-page "http://www.makotemplates.org/")
9527 (synopsis "Templating language for Python")
9528 (description "Mako is a templating language for Python that compiles
9529 templates into Python modules.")
9530 (license license:expat)))
9531
9532 (define-public python2-mako
9533 (package-with-python2 python-mako))
9534
9535 (define-public python-waitress
9536 (package
9537 (name "python-waitress")
9538 (version "0.8.10")
9539 (source
9540 (origin
9541 (method url-fetch)
9542 (uri (pypi-uri "waitress" version))
9543 (sha256
9544 (base32
9545 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9546 (build-system python-build-system)
9547 (home-page "https://github.com/Pylons/waitress")
9548 (synopsis "Waitress WSGI server")
9549 (description "Waitress is meant to be a production-quality pure-Python WSGI
9550 server with very acceptable performance.")
9551 (license license:zpl2.1)))
9552
9553 (define-public python2-waitress
9554 (package-with-python2 python-waitress))
9555
9556 (define-public python-wsgiproxy2
9557 (package
9558 (name "python-wsgiproxy2")
9559 (version "0.4.2")
9560 (source
9561 (origin
9562 (method url-fetch)
9563 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9564 (sha256
9565 (base32
9566 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9567 (build-system python-build-system)
9568 (arguments
9569 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9570 ;; support Python 3:
9571 ;; https://github.com/benoitc/restkit/issues/140
9572 #:tests? #f))
9573 (native-inputs
9574 `(("unzip" ,unzip)
9575 ("python-nose" ,python-nose)
9576 ("python-coverage" ,python-coverage)))
9577 (propagated-inputs
9578 `(("python-six" ,python-six)
9579 ("python-webob" ,python-webob)))
9580 (home-page
9581 "https://github.com/gawel/WSGIProxy2/")
9582 (synopsis "WSGI Proxy with various http client backends")
9583 (description "WSGI turns HTTP requests into WSGI function calls.
9584 WSGIProxy turns WSGI function calls into HTTP requests.
9585 It also includes code to sign requests and pass private data,
9586 and to spawn subprocesses to handle requests.")
9587 (license license:expat)))
9588
9589 (define-public python2-wsgiproxy2
9590 (package-with-python2 python-wsgiproxy2))
9591
9592 (define-public python-pastedeploy
9593 (package
9594 (name "python-pastedeploy")
9595 (version "1.5.2")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "PasteDeploy" version))
9600 (sha256
9601 (base32
9602 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9603 (build-system python-build-system)
9604 (native-inputs
9605 `(("python-nose" ,python-nose)))
9606 (home-page "http://pythonpaste.org/deploy/")
9607 (synopsis
9608 "Load, configure, and compose WSGI applications and servers")
9609 (description
9610 "This tool provides code to load WSGI applications and servers from URIs;
9611 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9612 Script provides commands to serve applications based on this configuration
9613 file.")
9614 (license license:expat)))
9615
9616 (define-public python2-pastedeploy
9617 (package-with-python2 python-pastedeploy))
9618
9619 (define-public python-paste
9620 (package
9621 (name "python-paste")
9622 (version "2.0.3")
9623 (source
9624 (origin
9625 (method url-fetch)
9626 (uri (pypi-uri "Paste" version))
9627 (sha256
9628 (base32
9629 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9630 (patches (search-patches "python-paste-remove-website-test.patch"
9631 "python-paste-remove-timing-test.patch"))))
9632 (build-system python-build-system)
9633 (native-inputs
9634 `(("python-nose" ,python-nose)))
9635 (propagated-inputs
9636 `(("python-six" ,python-six)))
9637 (home-page "http://pythonpaste.org")
9638 (synopsis
9639 "Python web development tools, focusing on WSGI")
9640 (description
9641 "Paste provides a variety of web development tools and middleware which
9642 can be nested together to build web applications. Paste's design closely
9643 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9644 (license license:expat)))
9645
9646 (define-public python2-paste
9647 (package-with-python2 python-paste))
9648
9649 (define-public python-pastescript
9650 (package
9651 (name "python-pastescript")
9652 (version "2.0.2")
9653 (source
9654 (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "PasteScript" version))
9657 (sha256
9658 (base32
9659 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9660 (build-system python-build-system)
9661 (native-inputs
9662 `(("python-nose" ,python-nose)))
9663 (propagated-inputs
9664 `(("python-paste" ,python-paste)
9665 ("python-pastedeploy" ,python-pastedeploy)))
9666 (home-page "http://pythonpaste.org/script/")
9667 (arguments
9668 '(;; Unfortunately, this requires the latest unittest2,
9669 ;; but that requires traceback2 which requires linecache2 which requires
9670 ;; unittest2. So we're skipping tests for now.
9671 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9672 ;; so in theory we could get around this situation somehow.)
9673 #:tests? #f))
9674 (synopsis
9675 "Pluggable command line tool for serving web applications and more")
9676 (description
9677 "PasteScript is a plugin-friendly command line tool which provides a
9678 variety of features, from launching web applications to bootstrapping project
9679 layouts.")
9680 (license license:expat)))
9681
9682 (define-public python2-pastescript
9683 (package-with-python2 python-pastescript))
9684
9685 (define-public python-pyquery
9686 (package
9687 (name "python-pyquery")
9688 (version "1.2.17")
9689 (source
9690 (origin
9691 (method url-fetch)
9692 (uri (pypi-uri "pyquery" version))
9693 (sha256
9694 (base32
9695 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9696 (build-system python-build-system)
9697 (native-inputs
9698 `(("python-webob" ,python-webob)
9699 ("python-webtest" ,python-webtest)))
9700 (propagated-inputs
9701 `(("python-lxml" ,python-lxml)
9702 ("python-cssselect" ,python-cssselect)))
9703 (home-page "https://github.com/gawel/pyquery")
9704 (synopsis "Make jQuery-like queries on xml documents")
9705 (description "pyquery allows you to make jQuery queries on xml documents.
9706 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9707 fast xml and html manipulation.")
9708 (license license:bsd-3)))
9709
9710 (define-public python2-pyquery
9711 (package-with-python2 python-pyquery))
9712
9713 (define-public python-webtest
9714 (package
9715 (name "python-webtest")
9716 (version "2.0.20")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "WebTest" version))
9721 (sha256
9722 (base32
9723 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9724 (build-system python-build-system)
9725 (arguments
9726 `(;; Unfortunately we have to disable tests!
9727 ;; This release of WebTest is pinned to python-nose < 1.3,
9728 ;; but older versions of python-nose are plagued with the following
9729 ;; bug(s), which rears its ugly head during test execution:
9730 ;; https://github.com/nose-devs/nose/issues/759
9731 ;; https://github.com/nose-devs/nose/pull/811
9732 #:tests? #f))
9733 ;; Commented out code is no good, but in this case, once tests
9734 ;; are ready to be enabled again, we should put the following
9735 ;; in place:
9736 ;; (native-inputs
9737 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9738 ;; ; but see above comment
9739 ;; ("python-coverage" ,python-coverage)
9740 ;; ("python-mock" ,python-mock)
9741 ;; ("python-pastedeploy" ,python-pastedeploy)
9742 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9743 ;; ("python-pyquery" ,python-pyquery)))
9744 (propagated-inputs
9745 `(("python-waitress" ,python-waitress)
9746 ("python-webob" ,python-webob)
9747 ("python-six" ,python-six)
9748 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9749 (home-page "http://webtest.pythonpaste.org/")
9750 (synopsis "Helper to test WSGI applications")
9751 (description "Webtest allows you to test your Python web applications
9752 without starting an HTTP server. It supports anything that supports the
9753 minimum of WSGI.")
9754 (license license:expat)))
9755
9756 (define-public python2-webtest
9757 (package-with-python2 python-webtest))
9758
9759 (define-public python-anyjson
9760 (package
9761 (name "python-anyjson")
9762 (version "0.3.3")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "anyjson" version))
9767 (sha256
9768 (base32
9769 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9770 (build-system python-build-system)
9771 (arguments
9772 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9773 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9774 ;; whatever) so this transformation needs to be done before the tests
9775 ;; can be run. Maybe we could add a build step to transform beforehand
9776 ;; but it could be annoying/difficult.
9777 ;; We can enable tests for the Python 2 version, though, and do below.
9778 #:tests? #f))
9779 (home-page "http://bitbucket.org/runeh/anyjson/")
9780 (synopsis
9781 "Wraps best available JSON implementation in a common interface")
9782 (description
9783 "Anyjson loads whichever is the fastest JSON module installed
9784 and provides a uniform API regardless of which JSON implementation is used.")
9785 (license license:bsd-3)
9786 (properties `((python2-variant . ,(delay python2-anyjson))))))
9787
9788 (define-public python2-anyjson
9789 (let ((anyjson (package-with-python2
9790 (strip-python2-variant python-anyjson))))
9791 (package
9792 (inherit anyjson)
9793 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9794 #:tests? #t
9795 ,@(package-arguments anyjson)))
9796 (native-inputs `(("python2-nose" ,python2-nose))))))
9797
9798 (define-public python-amqp
9799 (package
9800 (name "python-amqp")
9801 (version "1.4.9")
9802 (source
9803 (origin
9804 (method url-fetch)
9805 (uri (pypi-uri "amqp" version))
9806 (sha256
9807 (base32
9808 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9809 (build-system python-build-system)
9810 (native-inputs
9811 `(("python-nose" ,python-nose)
9812 ("python-mock" ,python-mock)))
9813 (home-page "http://github.com/celery/py-amqp")
9814 (synopsis
9815 "Low-level AMQP client for Python (fork of amqplib)")
9816 (description
9817 "This is a fork of amqplib which was originally written by Barry Pederson.
9818 It is maintained by the Celery project, and used by kombu as a pure python
9819 alternative when librabbitmq is not available.")
9820 (license license:lgpl2.1+)
9821 (properties `((python2-variant . ,(delay python2-amqp))))))
9822
9823 (define-public python2-amqp
9824 (let ((amqp (package-with-python2
9825 (strip-python2-variant python-amqp))))
9826 (package
9827 (inherit amqp)
9828 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9829 ;; unmaintained. Weirdly, does not do this on the python 3
9830 ;; version?
9831 #:tests? #f
9832 ,@(package-arguments amqp))))))
9833
9834 (define-public python-kombu
9835 (package
9836 (name "python-kombu")
9837 (version "3.0.37")
9838 (source
9839 (origin
9840 (method url-fetch)
9841 (uri (pypi-uri "kombu" version))
9842 (sha256
9843 (base32
9844 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9845 (build-system python-build-system)
9846 (native-inputs
9847 `(("python-mock" ,python-mock)
9848 ("python-nose" ,python-nose)))
9849 (propagated-inputs
9850 `(("python-anyjson" ,python-anyjson)
9851 ("python-amqp" ,python-amqp)
9852 ("python-redis" ,python-redis)))
9853 (home-page "http://kombu.readthedocs.org")
9854 (synopsis "Message passing library for Python")
9855 (description "The aim of Kombu is to make messaging in Python as easy as
9856 possible by providing an idiomatic high-level interface for the AMQ protocol,
9857 and also provide proven and tested solutions to common messaging problems.
9858 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9859 message orientation, queuing, routing, reliability and security, for which the
9860 RabbitMQ messaging server is the most popular implementation.")
9861 (license license:bsd-3)
9862 (properties `((python2-variant . ,(delay python2-kombu))))))
9863
9864 (define-public python2-kombu
9865 (let ((kombu (package-with-python2
9866 (strip-python2-variant python-kombu))))
9867 (package
9868 (inherit kombu)
9869 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9870 ;; It works fine on the python3 variant.
9871 #:tests? #f
9872 ,@(package-arguments kombu)))
9873 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9874 ,@(package-native-inputs kombu))))))
9875
9876 (define-public python-billiard
9877 (package
9878 (name "python-billiard")
9879 (version "3.3.0.23")
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "billiard" version))
9884 (sha256
9885 (base32
9886 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9887 (build-system python-build-system)
9888 (native-inputs
9889 `(("python-nose" ,python-nose)))
9890 (home-page "http://github.com/celery/billiard")
9891 (synopsis
9892 "Python multiprocessing fork with improvements and bugfixes")
9893 (description
9894 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9895 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9896 pyprocessing package. This standalone variant is intended to be compatible with
9897 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9898 (license license:bsd-3)
9899 (properties `((python2-variant . ,(delay python2-billiard))))))
9900
9901 (define-public python2-billiard
9902 (let ((billiard (package-with-python2
9903 (strip-python2-variant python-billiard))))
9904 (package
9905 (inherit billiard)
9906 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9907 ("python2-mock" ,python2-mock)
9908 ,@(package-native-inputs billiard))))))
9909
9910 (define-public python-celery
9911 (package
9912 (name "python-celery")
9913 (version "3.1.24")
9914 (source
9915 (origin
9916 (method url-fetch)
9917 (uri (pypi-uri "celery" version))
9918 (sha256
9919 (base32
9920 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9921 (build-system python-build-system)
9922 (arguments
9923 `(#:phases
9924 (modify-phases %standard-phases
9925 ;; These tests break with Python 3.5:
9926 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9927 (replace 'check
9928 (lambda _
9929 (zero?
9930 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9931 (native-inputs
9932 `(("python-nose" ,python-nose)))
9933 (propagated-inputs
9934 `(("python-pytz" ,python-pytz)
9935 ("python-billiard" ,python-billiard)
9936 ("python-kombu" ,python-kombu)))
9937 (home-page "http://celeryproject.org")
9938 (synopsis "Distributed Task Queue")
9939 (description "Celery is an asynchronous task queue/job queue based on
9940 distributed message passing. It is focused on real-time operation, but
9941 supports scheduling as well. The execution units, called tasks, are executed
9942 concurrently on a single or more worker servers using multiprocessing,
9943 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9944 synchronously (wait until ready).")
9945 (license license:bsd-3)
9946 (properties `((python2-variant . ,(delay python2-celery))))))
9947
9948 (define-public python2-celery
9949 (let ((celery (package-with-python2
9950 (strip-python2-variant python-celery))))
9951 (package
9952 (inherit celery)
9953 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9954 ("python2-mock" ,python2-mock)
9955 ,@(package-native-inputs celery))))))
9956
9957 (define-public python-translitcodec
9958 (package
9959 (name "python-translitcodec")
9960 (version "0.4.0")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "translitcodec" version))
9965 (sha256
9966 (base32
9967 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9968 (build-system python-build-system)
9969 (arguments
9970 `(#:tests? #f)) ; no tests provided
9971 (home-page
9972 "https://github.com/claudep/translitcodec")
9973 (synopsis
9974 "Unicode to 8-bit charset transliteration codec")
9975 (description
9976 "This package contains codecs for transliterating ISO 10646 texts into
9977 best-effort representations using smaller coded character sets (ASCII,
9978 ISO 8859, etc.).")
9979 (license license:expat)))
9980
9981 (define-public python2-translitcodec
9982 (package-with-python2 python-translitcodec))
9983
9984 (define-public python-editor
9985 (package
9986 (name "python-editor")
9987 (version "0.5")
9988 (source
9989 (origin
9990 (method url-fetch)
9991 (uri (pypi-uri "python-editor" version))
9992 (sha256
9993 (base32
9994 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9995 (build-system python-build-system)
9996 (home-page
9997 "https://github.com/fmoo/python-editor")
9998 (synopsis
9999 "Programmatically open an editor, capture the result")
10000 (description
10001 "python-editor is a library that provides the editor module for
10002 programmatically interfacing with your system's $EDITOR.")
10003 (license license:asl2.0)))
10004
10005 (define-public python2-editor
10006 (package-with-python2 python-editor))
10007
10008 (define-public python-sphinxcontrib-programoutput
10009 (package
10010 (name "python-sphinxcontrib-programoutput")
10011 (version "0.8")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10015 (sha256
10016 (base32
10017 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10018 (build-system python-build-system)
10019 (arguments
10020 ;; FIXME: Many tests are failing and the upstream is gone.
10021 '(#:tests? #f))
10022 (propagated-inputs
10023 `(("python-sphinx" ,python-sphinx)))
10024 (synopsis "Sphinx extension to include program output")
10025 (description "A Sphinx extension to literally insert the output of arbitrary
10026 commands into documents, helping you to keep your command examples up to date.")
10027 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10028 (license license:bsd-2)))
10029
10030 (define-public python2-sphinxcontrib-programoutput
10031 (package-with-python2 python-sphinxcontrib-programoutput))
10032
10033 (define-public python-sphinx-repoze-autointerface
10034 (package
10035 (name "python-sphinx-repoze-autointerface")
10036 (version "0.8")
10037 (source (origin
10038 (method url-fetch)
10039 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10040 (sha256
10041 (base32
10042 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10043 (build-system python-build-system)
10044 (arguments '(#:tests? #f)) ; No tests.
10045 (propagated-inputs
10046 `(("python-sphinx" ,python-sphinx)
10047 ("python-zope-interface" ,python-zope-interface)))
10048 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10049 (description "This package defines an extension for the Sphinx documentation
10050 system. The extension allows generation of API documentation by
10051 introspection of @code{zope.interface} instances in code.")
10052 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10053 (license license:repoze)))
10054
10055 (define-public python2-sphinx-repoze-autointerface
10056 (package-with-python2 python-sphinx-repoze-autointerface))
10057
10058 (define-public python-psycopg2
10059 (package
10060 (name "python-psycopg2")
10061 (version "2.6.1")
10062 (source
10063 (origin
10064 (method url-fetch)
10065 (uri (pypi-uri "psycopg2" version))
10066 (sha256
10067 (base32
10068 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
10069 (build-system python-build-system)
10070 (arguments
10071 ;; Tests would require a postgresql database "psycopg2_test"
10072 ;; and a running postgresql database management service.
10073 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10074 (inputs
10075 `(("postgresql" ,postgresql))) ; libpq
10076 (home-page "http://initd.org/psycopg/")
10077 (synopsis "Python PostgreSQL adapter")
10078 (description
10079 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10080 (license license:lgpl3+)))
10081
10082 (define-public python2-psycopg2
10083 (package-with-python2 python-psycopg2))
10084
10085 (define-public python-vobject
10086 (package
10087 (name "python-vobject")
10088 (version "0.9.2")
10089 (source (origin
10090 (method url-fetch)
10091 (uri (pypi-uri "vobject" version))
10092 (sha256
10093 (base32
10094 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10095 (build-system python-build-system)
10096 (arguments
10097 '(;; The test suite relies on some non-portable Windows interfaces.
10098 #:tests? #f))
10099 (propagated-inputs
10100 `(("python-dateutil" ,python-dateutil)
10101 ("python-pyicu" ,python-pyicu)))
10102 (synopsis "Parse and generate vCard and vCalendar files")
10103 (description "Vobject is intended to be a full featured Python package for
10104 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10105 are supported and well tested. vCard 3.0 files are supported, and all data
10106 should be imported, but only a few components are understood in a sophisticated
10107 way.")
10108 (home-page "http://eventable.github.io/vobject/")
10109 (license license:asl2.0)))
10110
10111 (define-public python2-vobject
10112 (package-with-python2 python-vobject))
10113
10114 (define-public python-munkres
10115 (package
10116 (name "python-munkres")
10117 (version "1.0.8")
10118 (source (origin
10119 (method url-fetch)
10120 (uri (pypi-uri "munkres" version))
10121 (sha256
10122 (base32
10123 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10124 (build-system python-build-system)
10125 (arguments
10126 '(#:tests? #f)) ; no test suite
10127 (home-page "http://software.clapper.org/munkres/")
10128 (synopsis "Implementation of the Munkres algorithm")
10129 (description "The Munkres module provides an implementation of the Munkres
10130 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10131 useful for solving the Assignment Problem.")
10132 (license license:bsd-3)))
10133
10134 (define-public python2-munkres
10135 (package-with-python2 python-munkres))
10136
10137 (define-public python-flask
10138 (package
10139 (name "python-flask")
10140 (version "0.11.1")
10141 (source (origin
10142 (method url-fetch)
10143 (uri (pypi-uri "Flask" version))
10144 (sha256
10145 (base32
10146 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10147 (build-system python-build-system)
10148 (propagated-inputs
10149 `(("python-itsdangerous" ,python-itsdangerous)
10150 ("python-jinja2" ,python-jinja2)
10151 ("python-click" ,python-click)
10152 ("python-werkzeug" ,python-werkzeug)))
10153 (home-page "https://github.com/mitsuhiko/flask/")
10154 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10155 (description "Flask is a micro web framework based on the Werkzeug toolkit
10156 and Jinja2 template engine. It is called a micro framework because it does not
10157 presume or force a developer to use a particular tool or library.")
10158 (license license:bsd-3)))
10159
10160 (define-public python2-flask
10161 (package-with-python2 python-flask))
10162
10163 (define-public python-flask-wtf
10164 (package
10165 (name "python-flask-wtf")
10166 (version "0.13.1")
10167 (source
10168 (origin
10169 (method url-fetch)
10170 (uri (pypi-uri "Flask-WTF" version))
10171 (sha256
10172 (base32
10173 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10174 (build-system python-build-system)
10175 (arguments
10176 '(#:phases
10177 (modify-phases %standard-phases
10178 (add-before 'check 'drop-failing-test
10179 (lambda _
10180 ;; FIXME: This file tries resolving an external server, which
10181 ;; fails. Try to patch out the offending section instead of
10182 ;; deleting the whole thing.
10183 (delete-file "tests/test_recaptcha.py")
10184 #t)))))
10185 (propagated-inputs
10186 `(("python-flask-babel" ,python-flask-babel)
10187 ("python-babel" ,python-babel)
10188 ("python-wtforms" ,python-wtforms)))
10189 (native-inputs
10190 `(("python-nose" ,python-nose)))
10191 (home-page "https://github.com/lepture/flask-wtf")
10192 (synopsis "Simple integration of Flask and WTForms")
10193 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10194 upload, and reCAPTCHA.")
10195 (license license:bsd-3)))
10196
10197 (define-public python2-flask-wtf
10198 (package-with-python2 python-flask-wtf))
10199
10200 (define-public python-flask-multistatic
10201 (package
10202 (name "python-flask-multistatic")
10203 (version "1.0")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "flask-multistatic" version))
10208 (sha256
10209 (base32
10210 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10211 (build-system python-build-system)
10212 (propagated-inputs
10213 `(("python-flask" ,python-flask)))
10214 (home-page "https://pagure.io/flask-multistatic")
10215 (synopsis "Flask plugin to allow overriding static files")
10216 (description "@code{flask-multistatic} is a flask plugin that adds support
10217 for overriding static files.")
10218 (license license:gpl3+)))
10219
10220 (define-public python2-flask-multistatic
10221 (package-with-python2 python-flask-multistatic))
10222
10223 (define-public python-cookies
10224 (package
10225 (name "python-cookies")
10226 (version "2.2.1")
10227 (source (origin
10228 (method url-fetch)
10229 (uri (pypi-uri "cookies" version))
10230 (sha256
10231 (base32
10232 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10233 (build-system python-build-system)
10234 (arguments
10235 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10236 #:tests? #f))
10237 (native-inputs
10238 `(("python-pytest" ,python2-pytest)))
10239 (synopsis "HTTP cookie parser and renderer")
10240 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10241 Python.")
10242 (home-page "https://gitlab.com/sashahart/cookies")
10243 (license license:expat)))
10244
10245 (define-public python2-cookies
10246 (package-with-python2 python-cookies))
10247
10248 (define-public python-responses
10249 (package
10250 (name "python-responses")
10251 (version "0.5.1")
10252 (source (origin
10253 (method url-fetch)
10254 (uri (pypi-uri "responses" version))
10255 (sha256
10256 (base32
10257 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10258 (build-system python-build-system)
10259 (arguments
10260 `(;; Test suite is not distributed:
10261 ;; https://github.com/getsentry/responses/issues/38
10262 #:tests? #f))
10263 (native-inputs
10264 `(("python-mock" ,python-mock)))
10265 (propagated-inputs
10266 `(("python-requests" ,python-requests)
10267 ("python-cookies" ,python-cookies)
10268 ("python-six" ,python-six)))
10269 (home-page "https://github.com/getsentry/responses")
10270 (synopsis "Utility for mocking out the `requests` Python library")
10271 (description "A utility library for mocking out the `requests` Python
10272 library.")
10273 (license license:asl2.0)))
10274
10275 (define-public python2-responses
10276 (package-with-python2 python-responses))
10277
10278 (define-public python-whoosh
10279 (package
10280 (name "python-whoosh")
10281 (version "2.7.4")
10282 (source
10283 (origin
10284 (method url-fetch)
10285 (uri (pypi-uri "Whoosh" version))
10286 (sha256
10287 (base32
10288 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10289 (build-system python-build-system)
10290 (native-inputs
10291 `(("python-pytest" ,python-pytest)))
10292 (home-page "http://bitbucket.org/mchaput/whoosh")
10293 (synopsis "Full text indexing, search, and spell checking library")
10294 (description
10295 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10296 checking library.")
10297 (license license:bsd-2)))
10298
10299 (define-public python2-whoosh
10300 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10301 (package (inherit whoosh)
10302 (propagated-inputs
10303 `(("python2-backport-ssl-match-hostname"
10304 ,python2-backport-ssl-match-hostname)
10305 ,@(package-propagated-inputs whoosh))))))
10306
10307 (define-public python-pathlib
10308 (package
10309 (name "python-pathlib")
10310 (version "1.0.1")
10311 (source (origin
10312 (method url-fetch)
10313 (uri (pypi-uri "pathlib" version))
10314 (sha256
10315 (base32
10316 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10317 (build-system python-build-system)
10318 ;; The tests depend on the internal "test" module, which does not provide
10319 ;; a stable interface.
10320 (arguments `(#:tests? #f))
10321 (home-page "https://pathlib.readthedocs.org/")
10322 (synopsis "Object-oriented file system paths")
10323 (description "Pathlib offers a set of classes to handle file system paths.
10324 It offers the following advantages over using string objects:
10325
10326 @enumerate
10327 @item No more cumbersome use of os and os.path functions. Everything can
10328 be done easily through operators, attribute accesses, and method calls.
10329 @item Embodies the semantics of different path types. For example,
10330 comparing Windows paths ignores casing.
10331 @item Well-defined semantics, eliminating any inconsistencies or
10332 ambiguities (forward vs. backward slashes, etc.).
10333 @end enumerate
10334
10335 Note: In Python 3.4, pathlib is now part of the standard library. For other
10336 Python versions please consider python-pathlib2 instead, which tracks the
10337 standard library module. This module (python-pathlib) isn't maintained
10338 anymore.")
10339 (license license:expat)))
10340
10341 (define-public python2-pathlib
10342 (package-with-python2 python-pathlib))
10343
10344 (define-public python2-pathlib2
10345 (package
10346 (name "python2-pathlib2")
10347 (version "2.1.0")
10348 (source (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "pathlib2" version))
10351 (sha256
10352 (base32
10353 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10354 (build-system python-build-system)
10355 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10356 ;; version is 3.4 which already includes this package as part of the
10357 ;; standard library.
10358 (arguments
10359 `(#:python ,python-2))
10360 (native-inputs
10361 `(("python2-six" ,python2-six)))
10362 (home-page "http://pypi.python.org/pypi/pathlib2/")
10363 (synopsis "Object-oriented file system paths - backport of standard
10364 pathlib module")
10365 (description "The goal of pathlib2 is to provide a backport of standard
10366 pathlib module which tracks the standard library module, so all the newest
10367 features of the standard pathlib can be used also on older Python versions.
10368
10369 Pathlib offers a set of classes to handle file system paths. It offers the
10370 following advantages over using string objects:
10371
10372 @enumerate
10373 @item No more cumbersome use of os and os.path functions. Everything can
10374 be done easily through operators, attribute accesses, and method calls.
10375 @item Embodies the semantics of different path types. For example,
10376 comparing Windows paths ignores casing.
10377 @item Well-defined semantics, eliminating any inconsistencies or
10378 ambiguities (forward vs. backward slashes, etc.).
10379 @end enumerate")
10380 (license license:expat)))
10381
10382 (define-public python-jellyfish
10383 (package
10384 (name "python-jellyfish")
10385 (version "0.5.6")
10386 (source (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "jellyfish" version))
10389 (sha256
10390 (base32
10391 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10392 (build-system python-build-system)
10393 (native-inputs
10394 `(("python-pytest" ,python-pytest)))
10395 (home-page "https://github.com/jamesturk/jellyfish")
10396 (synopsis "Approximate and phonetic matching of strings")
10397 (description "Jellyfish uses a variety of string comparison and phonetic
10398 encoding algorithms to do fuzzy string matching.")
10399 (license license:bsd-2)
10400 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10401
10402 (define-public python2-jellyfish
10403 (let ((jellyfish (package-with-python2
10404 (strip-python2-variant python-jellyfish))))
10405 (package (inherit jellyfish)
10406 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10407 ,@(package-native-inputs jellyfish))))))
10408
10409 (define-public python2-unicodecsv
10410 (package
10411 (name "python2-unicodecsv")
10412 (version "0.14.1")
10413 (source (origin
10414 (method url-fetch)
10415 ;; The test suite is not included in the PyPi release.
10416 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10417 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10418 "archive/" version ".tar.gz"))
10419 (file-name (string-append name "-" version ".tar.gz"))
10420 (sha256
10421 (base32
10422 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10423 (build-system python-build-system)
10424 (arguments
10425 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10426 #:python ,python-2))
10427 (native-inputs
10428 `(("python2-unittest2" ,python2-unittest2)))
10429 (home-page "https://github.com/jdunck/python-unicodecsv")
10430 (synopsis "Unicode CSV module for Python 2")
10431 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10432 module, adding support for Unicode strings.")
10433 (license license:bsd-2)))
10434
10435 (define-public python-rarfile
10436 (package
10437 (name "python-rarfile")
10438 (version "2.8")
10439 (source (origin
10440 (method url-fetch)
10441 (uri (pypi-uri "rarfile" version))
10442 (sha256
10443 (base32
10444 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10445 (build-system python-build-system)
10446 (arguments
10447 '(#:phases
10448 (modify-phases %standard-phases
10449 (replace 'check
10450 ;; Many tests fail, but the installation proceeds.
10451 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10452 (native-inputs
10453 `(("which" ,which))) ; required for tests
10454 (propagated-inputs
10455 `(("libarchive" ,libarchive)))
10456 (home-page "https://github.com/markokr/rarfile")
10457 (synopsis "RAR archive reader for Python")
10458 (description "This is Python module for RAR archive reading. The interface
10459 is made as zipfile like as possible.")
10460 (license license:isc)))
10461
10462 (define-public python2-rarfile
10463 (package-with-python2 python-rarfile))
10464
10465 (define-public python-magic
10466 (package
10467 (name "python-magic")
10468 (version "0.4.3")
10469 (source
10470 (origin
10471 (method url-fetch)
10472 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10473 version ".tar.gz"))
10474 (sha256
10475 (base32
10476 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10477 (file-name (string-append name "-" version "-checkout"))))
10478 (build-system python-build-system)
10479 (arguments
10480 ;; The tests are unreliable, so don't run them. The tests fail
10481 ;; under Python3 because they were written for Python2 and
10482 ;; contain import statements that do not work in Python3. One of
10483 ;; the tests fails under Python2 because its assertions are
10484 ;; overly stringent; it relies on comparing output strings which
10485 ;; are brittle and can change depending on the version of
10486 ;; libmagic being used and the system on which the test is
10487 ;; running. In my case, under GuixSD 0.10.0, only one test
10488 ;; failed, and it seems to have failed only because the version
10489 ;; of libmagic that is packaged in Guix outputs a slightly
10490 ;; different (but not wrong) string than the one that the test
10491 ;; expected.
10492 '(#:tests? #f
10493 #:phases (modify-phases %standard-phases
10494 ;; Replace a specific method call with a hard-coded
10495 ;; path to the necessary libmagic.so file in the
10496 ;; store. If we don't do this, then the method call
10497 ;; will fail to find the libmagic.so file, which in
10498 ;; turn will cause any application using
10499 ;; python-magic to fail.
10500 (add-before 'build 'hard-code-path-to-libmagic
10501 (lambda* (#:key inputs #:allow-other-keys)
10502 (let ((file (assoc-ref inputs "file")))
10503 (substitute* "magic.py"
10504 (("ctypes.util.find_library\\('magic'\\)")
10505 (string-append "'" file "/lib/libmagic.so'")))
10506 #t)))
10507 (add-before 'install 'disable-egg-compression
10508 (lambda _
10509 (let ((port (open-file "setup.cfg" "a")))
10510 (display "\n[easy_install]\nzip_ok = 0\n"
10511 port)
10512 (close-port port)
10513 #t))))))
10514 (inputs
10515 ;; python-magic needs to be able to find libmagic.so.
10516 `(("file" ,file)))
10517 (home-page "https://github.com/ahupp/python-magic")
10518 (synopsis "File type identification using libmagic")
10519 (description
10520 "This module uses ctypes to access the libmagic file type
10521 identification library. It makes use of the local magic database and
10522 supports both textual and MIME-type output. Note that this module and
10523 the python-file module both provide a \"magic.py\" file; these two
10524 modules, which are different and were developed separately, both serve
10525 the same purpose: to provide Python bindings for libmagic.")
10526 (license license:expat)))
10527
10528 (define-public python2-magic
10529 (package-with-python2 python-magic))
10530
10531 (define-public python2-s3cmd
10532 (package
10533 (name "python2-s3cmd")
10534 (version "1.6.1")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10539 "s3cmd-" version ".tar.gz"))
10540 (sha256
10541 (base32
10542 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10543 (build-system python-build-system)
10544 (arguments
10545 ;; s3cmd is written for python2 only and contains no tests.
10546 `(#:python ,python-2
10547 #:tests? #f))
10548 (propagated-inputs
10549 `(("python2-dateutil" ,python2-dateutil)
10550 ;; The python-file package also provides a magic.py module.
10551 ;; This is an unfortunate state of affairs; however, s3cmd
10552 ;; fails to install if it cannot find specifically the
10553 ;; python-magic package. Thus we include it, instead of using
10554 ;; python-file. Ironically, s3cmd sometimes works better
10555 ;; without libmagic bindings at all:
10556 ;; https://github.com/s3tools/s3cmd/issues/198
10557 ("python2-magic" ,python2-magic)))
10558 (home-page "http://s3tools.org/s3cmd")
10559 (synopsis "Command line tool for S3-compatible storage services")
10560 (description
10561 "S3cmd is a command line tool for uploading, retrieving and managing data
10562 in storage services that are compatible with the Amazon Simple Storage
10563 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10564 GnuPG encryption, and more. It also supports management of Amazon's
10565 CloudFront content delivery network.")
10566 (license license:gpl2+)))
10567
10568 (define-public python-pkgconfig
10569 (package
10570 (name "python-pkgconfig")
10571 (version "1.1.0")
10572 (source
10573 (origin
10574 (method url-fetch)
10575 (uri (pypi-uri "pkgconfig" version))
10576 (sha256
10577 (base32
10578 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10579 (build-system python-build-system)
10580 (native-inputs
10581 `(("python-nose" ,python-nose)))
10582 (inputs
10583 `(("pkg-config" ,pkg-config)))
10584 (arguments
10585 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10586 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10587 #:tests? #f
10588 ;; Hard-code the path to pkg-config.
10589 #:phases
10590 (modify-phases %standard-phases
10591 (add-before
10592 'build 'patch
10593 (lambda _
10594 (substitute* "pkgconfig/pkgconfig.py"
10595 (("cmd = 'pkg-config")
10596 (string-append "cmd = '" (which "pkg-config"))))
10597 #t)))))
10598 (home-page "http://github.com/matze/pkgconfig")
10599 (synopsis "Python interface for pkg-config")
10600 (description "This module provides a Python interface to pkg-config. It
10601 can be used to find all pkg-config packages, check if a package exists,
10602 check if a package meets certain version requirements, query CFLAGS and
10603 LDFLAGS and parse the output to build extensions with setup.py.")
10604 (license license:expat)))
10605
10606 (define-public python2-pkgconfig
10607 (package-with-python2 python-pkgconfig))
10608
10609 (define-public python-bz2file
10610 (package
10611 (name "python-bz2file")
10612 (version "0.98")
10613 (source
10614 (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "bz2file" version))
10617 (sha256
10618 (base32
10619 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10620 (build-system python-build-system)
10621 (arguments
10622 `(#:tests? #f)) ; Tests use deprecated python modules.
10623 (home-page "https://github.com/nvawda/bz2file")
10624 (synopsis "Read and write bzip2-compressed files")
10625 (description
10626 "Bz2file is a Python library for reading and writing bzip2-compressed
10627 files. It contains a drop-in replacement for the I/O interface in the
10628 standard library's @code{bz2} module, including features from the latest
10629 development version of CPython that are not available in older releases.")
10630 (license license:asl2.0)
10631 (properties `((python2-variant . ,(delay python2-bz2file))))))
10632
10633 (define-public python2-bz2file
10634 (let ((base (package-with-python2
10635 (strip-python2-variant python-bz2file))))
10636 (package
10637 (inherit base)
10638 (arguments
10639 `(#:python ,python-2
10640 #:phases
10641 (modify-phases %standard-phases
10642 ;; 'python setup.py test' does not work as of 0.98.
10643 ;; There is only the one test file, so we run it directly.
10644 (replace 'check
10645 (lambda _ (zero? (system* "python"
10646 "test_bz2file.py"))))))))))
10647
10648 (define-public python-future
10649 (package
10650 (name "python-future")
10651 (version "0.15.2")
10652 (source
10653 (origin
10654 (method url-fetch)
10655 (uri (pypi-uri "future" version))
10656 (sha256
10657 (base32
10658 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10659 (build-system python-build-system)
10660 ;; Many tests connect to the network or are otherwise flawed.
10661 ;; https://github.com/PythonCharmers/python-future/issues/210
10662 (arguments
10663 `(#:tests? #f))
10664 (home-page "http://python-future.org")
10665 (synopsis "Single-source support for Python 3 and 2")
10666 (description
10667 "@code{python-future} is the missing compatibility layer between Python 2 and
10668 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10669 to support both Python 2 and Python 3 with minimal overhead.")
10670 (license license:expat)))
10671
10672 (define-public python2-future
10673 (package-with-python2 python-future))
10674
10675 (define-public python-cysignals
10676 (package
10677 (name "python-cysignals")
10678 (version "1.1.0")
10679 (source
10680 (origin
10681 (method url-fetch)
10682 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10683 (sha256
10684 (base32
10685 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10686 (build-system python-build-system)
10687 (native-inputs
10688 `(("python-cython" ,python-cython)
10689 ("python-sphinx" ,python-sphinx)))
10690 (inputs
10691 `(("pari-gp" ,pari-gp)))
10692 (arguments
10693 `(#:modules ((guix build python-build-system)
10694 ((guix build gnu-build-system) #:prefix gnu:)
10695 (guix build utils))
10696 ;; FIXME: Tests are executed after installation and currently fail
10697 ;; when not installing into standard locations; the author is working
10698 ;; on a fix.
10699 #:tests? #f
10700 #:phases
10701 (modify-phases %standard-phases
10702 (add-before
10703 'build 'configure
10704 (assoc-ref gnu:%standard-phases 'configure)))))
10705 (home-page
10706 "https://github.com/sagemath/cysignals")
10707 (synopsis
10708 "Handling of interrupts and signals for Cython")
10709 (description
10710 "The cysignals package provides mechanisms to handle interrupts (and
10711 other signals and errors) in Cython code, using two related approaches,
10712 for mixed Cython/Python code or external C libraries and pure Cython code,
10713 respectively.")
10714 (license license:lgpl3+)))
10715
10716 (define-public python2-cysignals
10717 (package-with-python2 python-cysignals))
10718
10719 (define-public python2-shedskin
10720 (package
10721 (name "python2-shedskin")
10722 (version "0.9.4")
10723 (source
10724 (origin
10725 (method url-fetch)
10726 (uri (string-append "https://github.com/shedskin/shedskin/"
10727 "releases/download/v" version
10728 "/shedskin-" version ".tgz"))
10729 (sha256
10730 (base32
10731 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10732 (build-system python-build-system)
10733 (arguments
10734 `(#:python ,python-2
10735 #:phases (modify-phases %standard-phases
10736 (add-after 'unpack 'fix-resulting-include-libs
10737 (lambda* (#:key inputs #:allow-other-keys)
10738 (let ((libgc (assoc-ref inputs "libgc"))
10739 (pcre (assoc-ref inputs "pcre")))
10740 (substitute* "shedskin/makefile.py"
10741 (("variable == 'CCFLAGS':[ ]*")
10742 (string-append "variable == 'CCFLAGS':\n"
10743 " line += ' -I " pcre "/include"
10744 " -I " libgc "/include'"))
10745 (("variable == 'LFLAGS':[ ]*")
10746 (string-append "variable == 'LFLAGS':\n"
10747 " line += ' -L" pcre "/lib"
10748 " -L " libgc "/lib'")))
10749 #t))))))
10750 (inputs `(("pcre" ,pcre)
10751 ("libgc" ,libgc)))
10752 (home-page "https://shedskin.github.io/")
10753 (synopsis "Experimental Python-2 to C++ Compiler")
10754 (description (string-append "This is an experimental compiler for a subset of
10755 Python. It generates C++ code and a Makefile."))
10756 (license (list license:gpl3 license:bsd-3 license:expat))))
10757
10758 (define-public python2-rope
10759 (package
10760 (name "python2-rope")
10761 (version "0.10.3")
10762 (source
10763 (origin
10764 (method url-fetch)
10765 (uri (pypi-uri "rope" version))
10766 (sha256
10767 (base32
10768 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10769 (arguments
10770 ;; Rope is currently python-2 only.
10771 ;; https://github.com/python-rope/rope/issues/57
10772 `(#:python ,python-2))
10773 (build-system python-build-system)
10774 (native-inputs
10775 `(("python2-unittest2" ,python2-unittest2)))
10776 (home-page "https://github.com/python-rope/rope")
10777 (synopsis "Refactoring library for Python")
10778 (description "Rope is a refactoring library for Python. It facilitates
10779 the renaming, moving and extracting of attributes, functions, modules, fields
10780 and parameters in Python 2 source code. These refactorings can also be applied
10781 to occurences in strings and comments.")
10782 (license license:gpl2)))
10783
10784 (define-public python-py3status
10785 (package
10786 (name "python-py3status")
10787 (version "3.1")
10788 (source
10789 (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "py3status" version))
10792 (sha256
10793 (base32
10794 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10795 (build-system python-build-system)
10796 (arguments
10797 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10798 (home-page "https://github.com/ultrabug/py3status")
10799 (synopsis "Extensible i3status wrapper written in Python")
10800 (description "py3status is an i3status wrapper which extends i3status
10801 functionality in a modular way, allowing you to extend your panel with your
10802 own code, responding to click events and updating clock every second.")
10803 (license license:bsd-3)))
10804
10805 (define-public python-tblib
10806 (package
10807 (name "python-tblib")
10808 (version "1.3.0")
10809 (source (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "tblib" version))
10812 (sha256 (base32
10813 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10814 (build-system python-build-system)
10815 (arguments
10816 `(#:phases
10817 (modify-phases %standard-phases
10818 (replace 'check
10819 (lambda _
10820 ;; Upstream runs tests after installation and the package itself
10821 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10822 ;; found.
10823 (setenv "PYTHONPATH"
10824 (string-append (getcwd) "/build/lib:"
10825 (getenv "PYTHONPATH")))
10826 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10827 (native-inputs
10828 `(("python-pytest" ,python-pytest)
10829 ("python-six" ,python-six)))
10830 (home-page "https://github.com/ionelmc/python-tblib")
10831 (synopsis "Traceback serialization library")
10832 (description
10833 "Traceback serialization allows you to:
10834
10835 @enumerate
10836 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10837 different processes. This allows better error handling when running code over
10838 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10839
10840 @item Parse traceback strings and raise with the parsed tracebacks.
10841 @end enumerate\n")
10842 (license license:bsd-3)))
10843
10844 (define-public python2-tblib
10845 (package-with-python2 python-tblib))
10846
10847 (define-public python-sqlparse
10848 (package
10849 (name "python-sqlparse")
10850 (version "0.1.19")
10851 (source (origin
10852 (method url-fetch)
10853 (uri (pypi-uri "sqlparse" version))
10854 (sha256
10855 (base32
10856 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10857 (build-system python-build-system)
10858 (arguments
10859 `(#:phases
10860 (modify-phases %standard-phases
10861 (replace 'check
10862 (lambda* _
10863 ;; setup.py-integrated 2to3 only affects the build files, but
10864 ;; py.test is using the source files. So we need to convert them
10865 ;; manually.
10866 (when (zero? (system* "python3"))
10867 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10868 (zero? (system* "py.test")))))))
10869 (native-inputs
10870 `(("python-pytest" ,python-pytest)))
10871 (home-page "https://github.com/andialbrecht/sqlparse")
10872 (synopsis "Non-validating SQL parser")
10873 (description "Sqlparse is a non-validating SQL parser for Python. It
10874 provides support for parsing, splitting and formatting SQL statements.")
10875 (license license:bsd-3)))
10876
10877 (define-public python2-sqlparse
10878 (package-with-python2 python-sqlparse))
10879
10880 (define-public python-greenlet
10881 (package
10882 (name "python-greenlet")
10883 (version "0.4.11")
10884 (source (origin
10885 (method url-fetch)
10886 (uri (pypi-uri "greenlet" version))
10887 (sha256
10888 (base32
10889 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10890 (build-system python-build-system)
10891 (home-page "https://greenlet.readthedocs.io/")
10892 (synopsis "Lightweight in-process concurrent programming")
10893 (description
10894 "Greenlet package is a spin-off of Stackless, a version of CPython
10895 that supports micro-threads called \"tasklets\". Tasklets run
10896 pseudo-concurrently (typically in a single or a few OS-level threads) and
10897 are synchronized with data exchanges on \"channels\".")
10898 (license (list license:psfl license:expat))))
10899
10900 (define-public python2-greenlet
10901 (package-with-python2 python-greenlet))
10902
10903 (define-public python-gevent
10904 (package
10905 (name "python-gevent")
10906 (version "1.1.1")
10907 (source (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "gevent" version))
10910 (sha256
10911 (base32
10912 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10913 (modules '((guix build utils)))
10914 (snippet
10915 '(begin
10916 ;; unbunding libev and c-ares
10917 (for-each delete-file-recursively '("libev" "c-ares"))
10918 ;; fixing testsuite
10919 (call-with-output-file "greentest/__init__.py" noop)
10920 (substitute* "greentest/testrunner.py"
10921 (("import util") "from . import util")
10922 (("from util import log") "from .util import log"))))))
10923 (build-system python-build-system)
10924 (propagated-inputs
10925 `(("python-greenlet" ,python-greenlet)))
10926 (native-inputs
10927 `(("python-six" ,python-six)))
10928 (inputs
10929 `(("c-ares" ,c-ares)
10930 ("libev" ,libev)))
10931 (home-page "http://www.gevent.org/")
10932 (synopsis "Coroutine-based network library")
10933 (description
10934 "gevent is a coroutine-based Python networking library that uses greenlet
10935 to provide a high-level synchronous API on top of the libev event loop.")
10936 (license license:expat)))
10937
10938 (define-public python2-gevent
10939 (package-with-python2 python-gevent))
10940
10941 (define-public python-geventhttpclient
10942 (package
10943 (name "python-geventhttpclient")
10944 (version "1.3.1")
10945 (source (origin
10946 (method url-fetch)
10947 (uri (pypi-uri "geventhttpclient" version))
10948 (sha256
10949 (base32
10950 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10951 (modules '((guix build utils)))
10952 (snippet
10953 '(begin
10954 ;; Delete pre-compiled files.
10955 (for-each delete-file (find-files "src/geventhttpclient"
10956 ".*\\.pyc"))
10957 #t))))
10958 (build-system python-build-system)
10959 (arguments
10960 '(#:phases
10961 (modify-phases %standard-phases
10962 (add-after 'unpack 'delete-network-tests
10963 (lambda _
10964 (delete-file "src/geventhttpclient/tests/test_client.py")
10965 #t))
10966 (delete 'check)
10967 (add-after 'install 'check
10968 (lambda* (#:key inputs outputs #:allow-other-keys)
10969 (add-installed-pythonpath inputs outputs)
10970 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10971 (native-inputs
10972 `(("python-pytest" ,python-pytest)))
10973 (propagated-inputs
10974 `(("python-certifi" ,python-certifi)
10975 ("python-gevent" ,python-gevent)
10976 ("python-six" ,python-six)))
10977 (home-page "https://github.com/gwik/geventhttpclient")
10978 (synopsis "HTTP client library for gevent")
10979 (description "@code{python-geventhttpclient} is a high performance,
10980 concurrent HTTP client library for python using @code{gevent}.")
10981 (license license:expat)))
10982
10983 (define-public python2-geventhttpclient
10984 (package-with-python2 python-geventhttpclient))
10985
10986 (define-public python-fastimport
10987 (package
10988 (name "python-fastimport")
10989 (version "0.9.6")
10990 (source
10991 (origin
10992 (method url-fetch)
10993 (uri (pypi-uri "fastimport" version))
10994 (sha256
10995 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10996 (build-system python-build-system)
10997 (home-page "https://github.com/jelmer/python-fastimport")
10998 (synopsis "VCS fastimport parser and generator in Python")
10999 (description "This package provides a parser for and generator of the Git
11000 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11001 format.")
11002 (license license:gpl2+)))
11003
11004 (define-public python2-fastimport
11005 (package-with-python2 python-fastimport))
11006
11007 (define-public python-twisted
11008 (package
11009 (name "python-twisted")
11010 (version "16.2.0")
11011 (source (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11014 (sha256
11015 (base32
11016 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11017 (build-system python-build-system)
11018 (arguments
11019 '(#:tests? #f)) ; FIXME: Some tests are failing.
11020 ;; #:phases
11021 ;; (modify-phases %standard-phases
11022 ;; (replace 'check
11023 ;; (lambda _
11024 ;; (zero? (system* "./bin/trial" "twisted")))))
11025 (propagated-inputs
11026 `(("python-zope-interface" ,python-zope-interface)))
11027 (home-page "https://twistedmatrix.com/")
11028 (synopsis "Asynchronous networking framework written in Python")
11029 (description
11030 "Twisted is an extensible framework for Python programming, with special
11031 focus on event-based network programming and multiprotocol integration.")
11032 (license license:expat)))
11033
11034 (define-public python2-twisted
11035 (package-with-python2 python-twisted))
11036
11037 (define-public python-pika
11038 (package
11039 (name "python-pika")
11040 (version "0.10.0")
11041 (source
11042 (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "pika" version))
11045 (sha256
11046 (base32
11047 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11048 (build-system python-build-system)
11049 (native-inputs
11050 `(("python-pyev" ,python-pyev)
11051 ("python-tornado" ,python-tornado)
11052 ("python-twisted" ,python-twisted)))
11053 (home-page "https://pika.readthedocs.org")
11054 (synopsis "Pure Python AMQP Client Library")
11055 (description
11056 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11057 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11058 network support library.")
11059 (license license:bsd-3)))
11060
11061 (define-public python2-pika
11062 (package-with-python2 python-pika))
11063
11064 (define-public python-ply
11065 (package
11066 (name "python-ply")
11067 (version "3.9")
11068 (source
11069 (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "ply" version))
11072 (sha256
11073 (base32
11074 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11075 (build-system python-build-system)
11076 (home-page "http://www.dabeaz.com/ply/")
11077 (synopsis "Python Lex & Yacc")
11078 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11079 It uses LR parsing and does extensive error checking.")
11080 (license license:bsd-3)))
11081
11082 (define-public python2-ply
11083 (package-with-python2 python-ply))
11084
11085 (define-public python-tabulate
11086 (package
11087 (name "python-tabulate")
11088 (version "0.7.7")
11089 (source (origin
11090 (method url-fetch)
11091 (uri (pypi-uri "tabulate" version))
11092 (sha256
11093 (base32
11094 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11095 (build-system python-build-system)
11096 (arguments
11097 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11098 ;; and the latest release is not tagged in the upstream repository.
11099 '(#:tests? #f))
11100 (home-page "https://bitbucket.org/astanin/python-tabulate")
11101 (synopsis "Pretty-print tabular data")
11102 (description
11103 "Tabulate is a library and command-line utility to pretty-print tabular
11104 data in Python.")
11105 (license license:expat)))
11106
11107 (define-public python2-tabulate
11108 (package-with-python2 python-tabulate))
11109
11110 (define-public python-kazoo
11111 (package
11112 (name "python-kazoo")
11113 (version "2.2.1")
11114 (source
11115 (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "kazoo" version))
11118 (sha256
11119 (base32
11120 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11121 (build-system python-build-system)
11122 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11123 (propagated-inputs
11124 `(("python-six" ,python-six)))
11125 (home-page "https://kazoo.readthedocs.org")
11126 (synopsis "High-level Zookeeper client library")
11127 (description
11128 "Kazoo is a Python client library for the Apache Zookeeper distributed
11129 application service. It is designed to be easy to use and to avoid common
11130 programming errors.")
11131 (license license:asl2.0)))
11132
11133 (define-public python2-kazoo
11134 (package-with-python2 python-kazoo))
11135
11136 (define-public python-pykafka
11137 (package
11138 (name "python-pykafka")
11139 (version "2.4.0")
11140 (source (origin
11141 (method url-fetch)
11142 (uri (string-append
11143 "https://pypi.python.org/packages/8b/3e/"
11144 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11145 "pykafka-" version ".tar.gz"))
11146 (sha256
11147 (base32
11148 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11149 (build-system python-build-system)
11150 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11151 (propagated-inputs
11152 `(("python-gevent" ,python-gevent)
11153 ("python-kazoo" ,python-kazoo)
11154 ("python-tabulate" ,python-tabulate)))
11155 (inputs
11156 `(("librdkafka" ,librdkafka)))
11157 (home-page "https://pykafka.readthedocs.io/")
11158 (synopsis "Apache Kafka client for Python")
11159 (description
11160 "PyKafka is a client for the Apache Kafka distributed messaging system.
11161 It includes Python implementations of Kafka producers and consumers, which
11162 are optionally backed by a C extension built on librdkafka.")
11163 (license license:asl2.0)))
11164
11165 (define-public python2-pykafka
11166 (package-with-python2 python-pykafka))
11167
11168 (define-public python-wcwidth
11169 (package
11170 (name "python-wcwidth")
11171 (version "0.1.6")
11172 (source
11173 (origin
11174 (method url-fetch)
11175 (uri (string-append
11176 "https://pypi.python.org/packages/"
11177 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
11178 "wcwidth-" version ".tar.gz"))
11179 (sha256
11180 (base32
11181 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
11182 (build-system python-build-system)
11183 (home-page "https://github.com/jquast/wcwidth")
11184 (synopsis "Measure number of terminal column cells of wide-character codes")
11185 (description "Wcwidth measures the number of terminal column cells of
11186 wide-character codes. It is useful for those implementing a terminal emulator,
11187 or programs that carefully produce output to be interpreted by one. It is a
11188 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11189 specified in POSIX.1-2001 and POSIX.1-2008.")
11190 (license license:expat)))
11191
11192 (define-public python2-wcwidth
11193 (package-with-python2 python-wcwidth))
11194
11195 (define-public python2-jsonrpclib
11196 (package
11197 (name "python2-jsonrpclib")
11198 (version "0.1.7")
11199 (source (origin
11200 (method url-fetch)
11201 (uri (string-append
11202 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11203 "jsonrpclib-" version ".tar.gz"))
11204 (sha256
11205 (base32
11206 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11207 (build-system python-build-system)
11208 (arguments
11209 `(#:tests? #f
11210 #:python ,python-2))
11211 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11212 (synopsis "Implementation of JSON-RPC specification for Python")
11213 (description
11214 "This library is an implementation of the JSON-RPC specification.
11215 It supports both the original 1.0 specification, as well as the
11216 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11217 etc.")
11218 (license license:asl2.0)))
11219
11220 (define-public python-chai
11221 (package
11222 (name "python-chai")
11223 (version "1.1.1")
11224 (source (origin
11225 (method url-fetch)
11226 (uri (pypi-uri "chai" version))
11227 (sha256
11228 (base32
11229 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11230 (build-system python-build-system)
11231 (home-page "https://github.com/agoragames/chai")
11232 (synopsis "Mocking framework for Python")
11233 (description
11234 "Chai provides an api for mocking, stubbing and spying your python
11235 objects, patterned after the Mocha library for Ruby.")
11236 (license license:bsd-3)))
11237
11238 (define-public python2-chai
11239 (package-with-python2 python-chai))
11240
11241 (define-public python-arrow
11242 (package
11243 (name "python-arrow")
11244 (version "0.8.0")
11245 (source (origin
11246 (method url-fetch)
11247 (uri (pypi-uri "arrow" version))
11248 (sha256
11249 (base32
11250 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11251 (build-system python-build-system)
11252 (native-inputs
11253 `(;; For testing
11254 ("python-chai" ,python-chai)
11255 ("python-simplejson" ,python-simplejson)))
11256 (propagated-inputs
11257 `(("python-dateutil" ,python-dateutil)))
11258 (home-page "https://github.com/crsmithdev/arrow/")
11259 (synopsis "Dates and times for Python")
11260 (description
11261 "Arrow is a Python library to creating, manipulating, formatting and
11262 converting dates, times, and timestamps. It implements and updates the
11263 datetime type.")
11264 (license license:asl2.0)))
11265
11266 (define-public python2-arrow
11267 (package-with-python2 python-arrow))
11268
11269 (define-public python-inflection
11270 (package
11271 (name "python-inflection")
11272 (version "0.3.1")
11273 (source
11274 (origin (method url-fetch)
11275 (uri (pypi-uri "inflection" version))
11276 (sha256
11277 (base32
11278 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11279 (build-system python-build-system)
11280 (native-inputs
11281 `(("python-pytest" ,python-pytest)))
11282 (home-page "http://github.com/jpvanhal/inflection")
11283 (synopsis "Python string transformation library")
11284 (description
11285 "Inflection is a string transformation library. It singularizes
11286 and pluralizes English words, and transforms strings from CamelCase to
11287 underscored string.")
11288 (license license:expat)))
11289
11290 (define-public python2-inflection
11291 (package-with-python2 python-inflection))
11292
11293 (define-public python-pylev
11294 (package
11295 (name "python-pylev")
11296 (version "1.3.0")
11297 (source (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "pylev" version))
11300 (sha256
11301 (base32
11302 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11303 (build-system python-build-system)
11304 (home-page "http://github.com/toastdriven/pylev")
11305 (synopsis "Levenshtein distance implementation in Python")
11306 (description "Pure Python Levenshtein implementation, based off the
11307 Wikipedia code samples at
11308 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11309 (license license:bsd-3)))
11310
11311 (define-public python2-pylev
11312 (package-with-python2 python-pylev))
11313
11314 (define-public python-cleo
11315 (package
11316 (name "python-cleo")
11317 (version "0.4.1")
11318 (source (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "cleo" version))
11321 (sha256
11322 (base32
11323 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11324 (build-system python-build-system)
11325 (native-inputs
11326 `(;; For testing
11327 ("python-mock" ,python-mock)
11328 ("python-pytest" ,python-pytest)))
11329 (propagated-inputs
11330 `(("python-psutil" ,python-psutil)
11331 ("python-pylev" ,python-pylev)))
11332 (home-page "https://github.com/sdispater/cleo")
11333 (synopsis "Command-line arguments library for Python")
11334 (description
11335 "Cleo allows you to create command-line commands with signature in
11336 docstring and colored output.")
11337 (license license:expat)))
11338
11339 (define-public python2-cleo
11340 (package-with-python2 python-cleo))
11341
11342 (define-public python-lazy-object-proxy
11343 (package
11344 (name "python-lazy-object-proxy")
11345 (version "1.2.2")
11346 (source (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "lazy-object-proxy" version))
11349 (sha256
11350 (base32
11351 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11352 (build-system python-build-system)
11353 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11354 (synopsis "Lazy object proxy for python")
11355 (description
11356 "Lazy object proxy is an object that wraps a callable but defers the call
11357 until the object is actually required, and caches the result of said call.")
11358 (license license:bsd-2)))
11359
11360 (define-public python2-lazy-object-proxy
11361 (package-with-python2 python-lazy-object-proxy))
11362
11363 (define-public python-dnspython
11364 (package
11365 (name "python-dnspython")
11366 (version "1.15.0")
11367 (source (origin
11368 (method url-fetch)
11369 (uri (string-append "http://www.dnspython.org/kits/"
11370 version "/dnspython-" version ".tar.gz"))
11371 (sha256
11372 (base32
11373 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11374 (build-system python-build-system)
11375 (arguments '(#:tests? #f)) ; XXX: requires internet access
11376 (home-page "http://www.dnspython.org")
11377 (synopsis "DNS toolkit for Python")
11378 (description
11379 "dnspython is a DNS toolkit for Python. It supports almost all record
11380 types. It can be used for queries, zone transfers, and dynamic updates.
11381 It supports TSIG authenticated messages and EDNS0.")
11382 (license license:expat)))
11383
11384 (define-public python2-dnspython
11385 (package-with-python2 python-dnspython))
11386
11387 (define-public python-email-validator
11388 (package
11389 (name "python-email-validator")
11390 (version "1.0.2")
11391 (source
11392 (origin (method url-fetch)
11393 (uri (pypi-uri "email_validator" version))
11394 (sha256
11395 (base32
11396 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11397 (build-system python-build-system)
11398 (arguments
11399 '(#:phases
11400 (modify-phases %standard-phases
11401 (add-before 'build 'use-dnspython
11402 (lambda _
11403 (substitute* "setup.py"
11404 (("dnspython3") "dnspython"))
11405 #t)))))
11406 (propagated-inputs
11407 `(("python-dnspython" ,python-dnspython)
11408 ("python-idna" ,python-idna)))
11409 (home-page "https://github.com/JoshData/python-email-validator")
11410 (synopsis "Email address validation library for Python")
11411 (description
11412 "This library validates email address syntax and deliverability.")
11413 (license license:cc0)))
11414
11415 (define-public python2-email-validator
11416 (package-with-python2 python-email-validator))
11417
11418 (define-public python-ukpostcodeparser
11419 (package
11420 (name "python-ukpostcodeparser")
11421 (version "1.0.3")
11422 (source (origin
11423 (method url-fetch)
11424 (uri (pypi-uri "UkPostcodeParser" version))
11425 (sha256
11426 (base32
11427 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11428 (build-system python-build-system)
11429 (home-page "https://github.com/hamstah/ukpostcodeparser")
11430 (synopsis "UK Postcode parser for Python")
11431 (description
11432 "This library provides the @code{parse_uk_postcode} function for
11433 parsing UK postcodes.")
11434 (license license:expat)))
11435
11436 (define-public python2-ukpostcodeparser
11437 (package-with-python2 python-ukpostcodeparser))
11438
11439 (define-public python-faker
11440 (package
11441 (name "python-faker")
11442 (version "0.7.9")
11443 (source (origin
11444 (method url-fetch)
11445 (uri (pypi-uri "Faker" version))
11446 (sha256
11447 (base32
11448 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11449 (patches
11450 (search-patches "python-faker-fix-build-32bit.patch"))
11451 (modules '((guix build utils)))
11452 (snippet
11453 '(begin
11454 (for-each delete-file (find-files "." "\\.pyc$"))
11455 #t))))
11456 (build-system python-build-system)
11457 (arguments
11458 '(#:phases
11459 (modify-phases %standard-phases
11460 (replace 'check
11461 (lambda _
11462 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11463 (native-inputs
11464 `(;; For testing
11465 ("python-email-validator" ,python-email-validator)
11466 ("python-mock" ,python-mock)
11467 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11468 (propagated-inputs
11469 `(("python-dateutil" ,python-dateutil)
11470 ("python-six" ,python-six)))
11471 (home-page "https://github.com/joke2k/faker")
11472 (synopsis "Python package that generates fake data")
11473 (description
11474 "Faker is a Python package that generates fake data such as names,
11475 addresses, and phone numbers.")
11476 (license license:expat)
11477 (properties `((python2-variant . ,(delay python2-faker))))))
11478
11479 (define-public python2-faker
11480 (let ((base (package-with-python2 (strip-python2-variant
11481 python-faker))))
11482 (package
11483 (inherit base)
11484 (propagated-inputs
11485 `(("python2-ipaddress" ,python2-ipaddress)
11486 ,@(package-propagated-inputs base))))))
11487
11488 (define-public python-fake-factory
11489 (package
11490 (name "python-fake-factory")
11491 (version "0.7.2")
11492 (source (origin
11493 (method url-fetch)
11494 (uri (pypi-uri "fake-factory" version))
11495 (sha256
11496 (base32
11497 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11498 (patches
11499 (search-patches
11500 "python-fake-factory-fix-build-32bit.patch"))))
11501 (build-system python-build-system)
11502 (arguments
11503 '(#:phases
11504 (modify-phases %standard-phases
11505 (replace 'check
11506 (lambda _
11507 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11508 (native-inputs
11509 `(;; For testing
11510 ("python-email-validator" ,python-email-validator)
11511 ("python-mock" ,python-mock)
11512 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11513 (propagated-inputs
11514 `(("python-dateutil" ,python-dateutil)
11515 ("python-six" ,python-six)))
11516 (home-page "https://github.com/joke2k/faker")
11517 (synopsis "Python package that generates fake data")
11518 (description
11519 "Faker is a Python package that generates fake data such as names,
11520 addresses, and phone numbers.")
11521 (license license:expat)
11522 (properties `((python2-variant . ,(delay python2-fake-factory))
11523 (superseded . ,python-faker)))))
11524
11525 (define-public python2-fake-factory
11526 (let ((base (package-with-python2 (strip-python2-variant
11527 python-fake-factory))))
11528 (package
11529 (inherit base)
11530 (properties `((superseded . ,python2-faker)))
11531 (propagated-inputs
11532 `(("python2-ipaddress" ,python2-ipaddress)
11533 ,@(package-propagated-inputs base))))))
11534
11535 (define-public python-pyaml
11536 (package
11537 (name "python-pyaml")
11538 (version "15.8.2")
11539 (source (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "pyaml" version))
11542 (sha256
11543 (base32
11544 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11545 (build-system python-build-system)
11546 (native-inputs
11547 `(("python-unidecode" ,python-unidecode)))
11548 (propagated-inputs
11549 `(("python-pyyaml" ,python-pyyaml)))
11550 (home-page "https://github.com/mk-fg/pretty-yaml")
11551 (synopsis "YAML pretty-print library for Python")
11552 (description
11553 "pyaml is a PyYAML based python module to produce pretty and readable
11554 YAML-serialized data.")
11555 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11556
11557 (define-public python2-pyaml
11558 (package-with-python2 python-pyaml))
11559
11560 (define-public python-flexmock
11561 (package
11562 (name "python-flexmock")
11563 (version "0.10.2")
11564 (source (origin
11565 (method url-fetch)
11566 (uri (pypi-uri "flexmock" version))
11567 (sha256
11568 (base32
11569 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11570 (build-system python-build-system)
11571 (home-page "https://flexmock.readthedocs.org")
11572 (synopsis "Testing library for Python")
11573 (description
11574 "flexmock is a testing library for Python that makes it easy to create
11575 mocks, stubs and fakes.")
11576 (license license:bsd-3)))
11577
11578 (define-public python2-flexmock
11579 (package-with-python2 python-flexmock))
11580
11581 (define-public python-orator
11582 (package
11583 (name "python-orator")
11584 (version "0.8.2")
11585 (source (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "orator" version))
11588 (sha256
11589 (base32
11590 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11591 (build-system python-build-system)
11592 (arguments '(#:tests? #f)) ; no tests
11593 (propagated-inputs
11594 `(("python-arrow" ,python-arrow)
11595 ("python-blinker" ,python-blinker)
11596 ("python-cleo" ,python-cleo)
11597 ("python-faker" ,python-faker)
11598 ("python-inflection" ,python-inflection)
11599 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11600 ("python-pyaml" ,python-pyaml)
11601 ("python-simplejson" ,python-simplejson)
11602 ("python-wrapt" ,python-wrapt)))
11603 (home-page "https://orator-orm.com/")
11604 (synopsis "ActiveRecord ORM for Python")
11605 (description
11606 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11607 implementation for Python.")
11608 (license license:expat)
11609 (properties `((python2-variant . ,(delay python2-orator))))))
11610
11611 (define-public python2-orator
11612 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11613 (package
11614 (inherit base)
11615 (propagated-inputs
11616 `(("python2-ipaddress" ,python2-ipaddress)
11617 ,@(package-propagated-inputs base))))))
11618
11619 (define-public python-prompt-toolkit
11620 (package
11621 (name "python-prompt-toolkit")
11622 (version "1.0.9")
11623 (source
11624 (origin
11625 (method url-fetch)
11626 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11627 (sha256
11628 (base32
11629 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11630 (build-system python-build-system)
11631 (arguments
11632 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11633 (propagated-inputs
11634 `(("python-wcwidth" ,python-wcwidth)
11635 ("python-six" ,python-six)
11636 ("python-pygments" ,python-pygments)))
11637 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11638 (synopsis "Library for building command line interfaces in Python")
11639 (description
11640 "Prompt-Toolkit is a library for building interactive command line
11641 interfaces in Python. It's like GNU Readline but it also features syntax
11642 highlighting while typing, out-of-the-box multi-line input editing, advanced
11643 code completion, incremental search, support for Chinese double-width
11644 characters, mouse support, and auto suggestions.")
11645 (license license:bsd-3)))
11646
11647 (define-public python2-prompt-toolkit
11648 (package-with-python2 python-prompt-toolkit))
11649
11650 (define-public python-jedi
11651 (package
11652 (name "python-jedi")
11653 (version "0.9.0")
11654 (source
11655 (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "jedi" version))
11658 (sha256
11659 (base32
11660 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11661 (build-system python-build-system)
11662 (arguments
11663 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11664 '(#:tests? #f))
11665 (native-inputs
11666 `(("python-pytest" ,python-pytest)))
11667 (home-page "https://github.com/davidhalter/jedi")
11668 (synopsis
11669 "Autocompletion for Python that can be used for text editors")
11670 (description
11671 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11672 (license license:expat)))
11673
11674 (define-public python2-jedi
11675 (package-with-python2 python-jedi))
11676
11677 (define-public ptpython
11678 (package
11679 (name "ptpython")
11680 (version "0.34")
11681 (source (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "ptpython" version))
11684 (sha256
11685 (base32
11686 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11687 (build-system python-build-system)
11688 (arguments
11689 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11690 (propagated-inputs
11691 `(("python-docopt" ,python-docopt)
11692 ("python-jedi" ,python-jedi)
11693 ("python-prompt-toolkit" ,python-prompt-toolkit)
11694 ("python-pygments" ,python-pygments)))
11695 (home-page "https://github.com/jonathanslenders/ptpython")
11696 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11697 (description
11698 "ptpython is a Python read-eval-print loop with IDE-like features.
11699 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11700 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11701 etc.")
11702 (license license:bsd-3)
11703 (properties `((python2-variant . ,(delay ptpython-2))))))
11704
11705 (define-public ptpython-2
11706 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11707 (package
11708 (inherit base)
11709 (name "ptpython2"))))
11710
11711 (define-public python-requests-oauthlib
11712 (package
11713 (name "python-requests-oauthlib")
11714 (version "0.6.2")
11715 (source
11716 (origin
11717 (method url-fetch)
11718 (uri (pypi-uri "requests-oauthlib" version))
11719 (sha256
11720 (base32
11721 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11722 (build-system python-build-system)
11723 (arguments
11724 `(#:phases
11725 (modify-phases %standard-phases
11726 ;; removes tests that require network access
11727 (add-before 'check 'pre-check
11728 (lambda _
11729 (delete-file "tests/test_core.py")
11730 #t)))))
11731 (native-inputs
11732 `(("python-requests-mock" ,python-requests-mock)
11733 ("python-mock" ,python-mock)))
11734 (propagated-inputs
11735 `(("python-oauthlib" ,python-oauthlib)
11736 ("python-requests" ,python-requests)))
11737 (home-page
11738 "https://github.com/requests/requests-oauthlib")
11739 (synopsis
11740 "OAuthlib authentication support for Requests")
11741 (description
11742 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11743 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11744 (license license:isc)))
11745
11746 (define-public python2-requests-oauthlib
11747 (package-with-python2 python-requests-oauthlib))
11748
11749 (define-public python-stem
11750 (package
11751 (name "python-stem")
11752 (version "1.5.4")
11753 (source
11754 (origin
11755 (method url-fetch)
11756 (uri (pypi-uri "stem" version))
11757 (sha256
11758 (base32
11759 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11760 (build-system python-build-system)
11761 (arguments
11762 `(#:phases
11763 (modify-phases %standard-phases
11764 (replace 'check
11765 (lambda _
11766 (zero? (system* "./run_tests.py" "--unit")))))))
11767 (native-inputs
11768 `(("python-mock" ,python-mock)
11769 ("python-pep8" ,python-pep8)
11770 ("python-pyflakes" ,python-pyflakes)))
11771 (home-page "https://stem.torproject.org/")
11772 (synopsis
11773 "Python controller library that allows applications to interact with Tor")
11774 (description
11775 "Stem is a Python controller library for Tor. With it you can use Tor's
11776 control protocol to script against the Tor process and read descriptor data
11777 relays publish about themselves.")
11778 (license license:lgpl3)))
11779
11780 (define-public python2-stem
11781 (package-with-python2 python-stem))
11782
11783 (define-public python-pyserial
11784 (package
11785 (name "python-pyserial")
11786 (version "3.1.1")
11787 (source
11788 (origin
11789 (method url-fetch)
11790 (uri (pypi-uri "pyserial" version))
11791 (sha256
11792 (base32
11793 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11794 (build-system python-build-system)
11795 (arguments
11796 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11797 ;; #:phases
11798 ;; (modify-phases %standard-phases
11799 ;; (replace 'check
11800 ;; (lambda _
11801 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11802 (home-page
11803 "https://github.com/pyserial/pyserial")
11804 (synopsis "Python Serial Port Bindings")
11805 (description "@code{pyserial} provide serial port bindings for Python. It
11806 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11807 and/or Xon/Xoff. The port is accessed in RAW mode.")
11808 (license license:bsd-3)))
11809
11810 (define-public python2-pyserial
11811 (package-with-python2 python-pyserial))
11812
11813 (define-public python-kivy
11814 (package
11815 (name "python-kivy")
11816 (version "1.9.1")
11817 (source
11818 (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "kivy" version))
11821 (file-name (string-append name "-" version ".tar.gz"))
11822 (sha256
11823 (base32
11824 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11825 (build-system python-build-system)
11826 (arguments
11827 `(#:tests? #f ; Tests require many optional packages
11828 #:phases
11829 (modify-phases %standard-phases
11830 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11831 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11832 (lambda* (#:key inputs #:allow-other-keys)
11833 (setenv "KIVY_SDL2_PATH"
11834 (string-append (assoc-ref inputs "sdl-union")
11835 "/include/SDL2"))
11836 #t)))))
11837 (native-inputs
11838 `(("pkg-config" ,pkg-config)
11839 ("python-cython" ,python-cython)))
11840 (inputs
11841 `(("gstreamer" ,gstreamer)
11842 ("mesa" ,mesa)
11843 ("sdl-union"
11844 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11845 (home-page "http://kivy.org")
11846 (synopsis
11847 "Multitouch application framework")
11848 (description
11849 "A software library for rapid development of
11850 hardware-accelerated multitouch applications.")
11851 (license license:expat)))
11852
11853 (define-public python2-kivy
11854 (package-with-python2 python-kivy))
11855
11856 (define-public python-kivy-next
11857 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11858 (revision "1"))
11859 (package (inherit python-kivy)
11860 (name "python-kivy-next")
11861 (version (string-append "1.9.1-" revision "."
11862 (string-take commit 7)))
11863 (source
11864 (origin
11865 (method git-fetch)
11866 (uri (git-reference
11867 (url "https://github.com/kivy/kivy")
11868 (commit commit)))
11869 (file-name (string-append name "-" version "-checkout"))
11870 (sha256
11871 (base32
11872 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11873
11874 (define-public python2-kivy-next
11875 (package-with-python2 python-kivy-next))
11876
11877 (define-public python-binaryornot
11878 (package
11879 (name "python-binaryornot")
11880 (version "0.4.0")
11881 (source (origin
11882 (method url-fetch)
11883 (uri (pypi-uri "binaryornot" version))
11884 (sha256
11885 (base32
11886 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11887 (build-system python-build-system)
11888 (propagated-inputs
11889 `(("python-chardet" ,python-chardet)
11890 ("python-hypothesis" ,python-hypothesis)))
11891 (home-page "https://github.com/audreyr/binaryornot")
11892 (synopsis "Package to check if a file is binary or text")
11893 (description "Ultra-lightweight pure Python package to check if a file is
11894 binary or text.")
11895 (license license:bsd-3)
11896 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11897
11898 (define-public python2-binaryornot
11899 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11900 (package (inherit base)
11901 (propagated-inputs
11902 `(("python2-enum34" ,python2-enum34)
11903 ,@(package-propagated-inputs base))))))
11904
11905 (define-public python-nltk
11906 (package
11907 (name "python-nltk")
11908 (version "3.2.1")
11909 (source (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "nltk" version))
11912 (sha256
11913 (base32
11914 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11915 (build-system python-build-system)
11916 (arguments
11917 '(;; The tests require some extra resources to be downloaded.
11918 ;; TODO Try packaging these resources.
11919 #:tests? #f))
11920 (home-page "http://nltk.org/")
11921 (synopsis "Natural Language Toolkit")
11922 (description "It provides interfaces to over 50 corpora and lexical
11923 resources such as WordNet, along with a suite of text processing libraries
11924 for classification, tokenization, stemming, tagging, parsing, and semantic
11925 reasoning, wrappers for natural language processing libraries.")
11926 (license license:asl2.0)))
11927
11928 (define-public python2-nltk
11929 (package-with-python2 python-nltk))
11930
11931 (define-public python-pymongo
11932 (package
11933 (name "python-pymongo")
11934 (version "3.3.0")
11935 (source (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "pymongo" version))
11938 (sha256
11939 (base32
11940 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11941 (build-system python-build-system)
11942 (propagated-inputs
11943 `(("python-certifi" ,python-certifi)))
11944 (home-page "http://github.com/mongodb/mongo-python-driver")
11945 (synopsis "Python driver for MongoDB")
11946 (description "Python driver for MongoDB.")
11947 (license license:asl2.0)))
11948
11949 (define-public python2-pymongo
11950 (package-with-python2 python-pymongo))
11951
11952 (define-public python-sh
11953 (package
11954 (name "python-sh")
11955 (version "1.11")
11956 (source (origin
11957 (method url-fetch)
11958 (uri (pypi-uri "sh" version))
11959 (sha256
11960 (base32
11961 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11962 (build-system python-build-system)
11963 (arguments
11964 `(#:tests? #f)) ; no tests
11965 (home-page "https://github.com/amoffat/sh")
11966 (synopsis "Python subprocess interface")
11967 (description "Abstracts process invocation by providing a function
11968 interface for programs.")
11969 (license license:expat)))
11970
11971 (define-public python2-sh
11972 (package-with-python2 python-sh))
11973
11974 (define-public python-consul
11975 (package
11976 (name "python-consul")
11977 (version "0.6.1")
11978 (source
11979 (origin
11980 (method url-fetch)
11981 (uri (pypi-uri "python-consul" version))
11982 (sha256
11983 (base32
11984 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11985 (build-system python-build-system)
11986 (native-inputs
11987 `(("python-pytest" ,python-pytest)))
11988 (propagated-inputs
11989 `(("python-requests" ,python-requests)
11990 ("python-six" ,python-six)))
11991 (home-page "https://github.com/cablehead/python-consul")
11992 (synopsis "Python client for Consul")
11993 (description
11994 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11995 discovery, monitoring and configuration.")
11996 (license license:expat)))
11997
11998 (define-public python2-consul
11999 (package-with-python2 python-consul))
12000
12001 (define-public python-schematics
12002 (package
12003 (name "python-schematics")
12004 (version "1.1.1")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 (uri (string-append
12009 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12010 (file-name (string-append name "-" version ".tar.gz"))
12011 (sha256
12012 (base32
12013 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12014 (build-system python-build-system)
12015 (propagated-inputs
12016 `(("python-six" ,python-six)))
12017 (arguments
12018 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12019 ; version requirements (eg python-coveralls)
12020 (home-page "https://github.com/schematics/schematics")
12021 (synopsis "Python Data Structures for Humans")
12022 (description "Python Data Structures for Humans.")
12023 (license license:bsd-3)))
12024
12025 (define-public python2-schematics
12026 (package-with-python2 python-schematics))
12027
12028 (define-public python-publicsuffix
12029 (package
12030 (name "python-publicsuffix")
12031 (version "1.1.0")
12032 (source (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "publicsuffix" version))
12035 (sha256
12036 (base32
12037 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12038 (build-system python-build-system)
12039 (arguments
12040 `(#:tests? #f)) ; tests use the internet
12041 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12042 (synopsis "Get suffix for a domain name")
12043 (description "Get a public suffix for a domain name using the Public Suffix
12044 List.")
12045 (license license:expat)))
12046
12047 (define-public python2-publicsuffix
12048 (package-with-python2 python-publicsuffix))
12049
12050 (define-public python-publicsuffix2
12051 (package
12052 (name "python-publicsuffix2")
12053 (version "2.20160621")
12054 (source
12055 (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12058 (sha256
12059 (base32
12060 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
12061 (build-system python-build-system)
12062 (arguments
12063 '(#:tests? #f)) ; The test suite requires network access.
12064 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12065 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12066 (description "Get a public suffix for a domain name using the Public Suffix
12067 List. Forked from and using the same API as the publicsuffix package.")
12068 (license (list license:expat license:mpl2.0))))
12069
12070 (define-public python2-publicsuffix2
12071 (package-with-python2 python-publicsuffix2))
12072
12073 (define-public python-url
12074 (package
12075 (name "python-url")
12076 (version "0.2.0")
12077 (source (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "url" version))
12080 (sha256
12081 (base32
12082 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12083 (build-system python-build-system)
12084 (propagated-inputs
12085 `(("python-publicsuffix" ,python-publicsuffix)))
12086 (native-inputs
12087 `(("python-coverage" ,python-coverage)
12088 ("python-nose" ,python-nose)))
12089 (arguments
12090 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12091 (home-page "http://github.com/seomoz/url-py")
12092 (synopsis "URL Parsing")
12093 (description "Library for parsing urls.")
12094 (license license:expat)
12095 (properties `((python2-variant . ,(delay python2-url))))))
12096
12097 (define-public python2-url
12098 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12099 (package (inherit base)
12100 (propagated-inputs
12101 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12102
12103 (define-public python-freezegun
12104 (package
12105 (name "python-freezegun")
12106 (version "0.3.8")
12107 (source
12108 (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "freezegun" version))
12111 (sha256
12112 (base32
12113 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12114 (build-system python-build-system)
12115 (native-inputs
12116 `(("python-mock" ,python-mock)
12117 ("python-nose" ,python-nose)
12118 ("python-coverage" ,python-coverage)))
12119 (propagated-inputs
12120 `(("python-six" ,python-six)
12121 ("python-dateutil" ,python-dateutil)))
12122 (arguments
12123 `(#:phases (modify-phases %standard-phases
12124 ;; The tests are normally executed via `make test`, but the PyPi
12125 ;; package does not include the Makefile.
12126 (replace 'check
12127 (lambda _
12128 (zero? (system* "nosetests" "./tests/")))))))
12129 (home-page "https://github.com/spulec/freezegun")
12130 (synopsis "Test utility for mocking the datetime module")
12131 (description
12132 "FreezeGun is a library that allows your python tests to travel through
12133 time by mocking the datetime module.")
12134 (license license:asl2.0)))
12135
12136 (define-public python2-freezegun
12137 (package-with-python2 python-freezegun))
12138
12139
12140 (define-public python-odfpy
12141 (package
12142 (name "python-odfpy")
12143 (version "1.3.3")
12144 (source (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "odfpy" version))
12147 (sha256
12148 (base32
12149 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12150 (arguments
12151 `(#:modules ((srfi srfi-1)
12152 (guix build python-build-system)
12153 (guix build utils))
12154 #:phases
12155 (modify-phases %standard-phases
12156 (replace 'check
12157 ;; The test runner invokes python2 and python3 for test*.py.
12158 ;; To avoid having both in inputs, we replicate it here.
12159 (lambda _
12160 (every (lambda (test-file)
12161 (zero? (system* "python" test-file)))
12162 (find-files "tests" "^test.*\\.py$")))))))
12163 (build-system python-build-system)
12164 (home-page "https://github.com/eea/odfpy")
12165 (synopsis "Python API and tools to manipulate OpenDocument files")
12166 (description "Collection of libraries and utility programs written in
12167 Python to manipulate OpenDocument 1.2 files.")
12168 (license
12169 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12170 ;; number of files with other licenses.
12171 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12172
12173 (define-public python2-odfpy
12174 (package-with-python2 python-odfpy))
12175
12176 (define-public python-cachecontrol
12177 (package
12178 (name "python-cachecontrol")
12179 (version "0.11.6")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 ;; Pypi does not have tests.
12184 (uri (string-append
12185 "https://github.com/ionrock/cachecontrol/archive/v"
12186 version ".tar.gz"))
12187 (file-name (string-append name "-" version ".tar.gz"))
12188 (sha256
12189 (base32
12190 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12191 (build-system python-build-system)
12192 (arguments
12193 `(#:phases
12194 (modify-phases %standard-phases
12195 (replace 'check
12196 (lambda _
12197 ;; Drop test that requires internet access.
12198 (delete-file "tests/test_regressions.py")
12199 (setenv "PYTHONPATH"
12200 (string-append (getcwd) "/build/lib:"
12201 (getenv "PYTHONPATH")))
12202 (zero? (system* "py.test" "-vv")))))))
12203 (native-inputs
12204 `(("python-pytest" ,python-pytest)
12205 ("python-redis" ,python-redis)
12206 ("python-webtest" ,python-webtest)
12207 ("python-mock" ,python-mock)))
12208 (propagated-inputs
12209 `(("python-requests" ,python-requests)
12210 ("python-lockfile" ,python-lockfile)))
12211 (home-page "https://github.com/ionrock/cachecontrol")
12212 (synopsis "The httplib2 caching algorithms for use with requests")
12213 (description "CacheControl is a port of the caching algorithms in
12214 @code{httplib2} for use with @code{requests} session objects.")
12215 (license license:asl2.0)))
12216
12217 (define-public python2-cachecontrol
12218 (package-with-python2 python-cachecontrol))
12219
12220 (define-public python-lit
12221 (package
12222 (name "python-lit")
12223 (version "0.5.0")
12224 (source
12225 (origin
12226 (method url-fetch)
12227 (uri (pypi-uri "lit" version))
12228 (sha256
12229 (base32
12230 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12231 (build-system python-build-system)
12232 (home-page "http://llvm.org/")
12233 (synopsis "LLVM Software Testing Tool")
12234 (description "@code{lit} is a portable tool for executing LLVM and Clang
12235 style test suites, summarizing their results, and providing indication of
12236 failures.")
12237 (license license:ncsa)))
12238
12239 (define-public python2-lit
12240 (package-with-python2 python-lit))
12241
12242 (define-public python-pytest-pep8
12243 (package
12244 (name "python-pytest-pep8")
12245 (version "1.0.6")
12246 (source (origin
12247 (method url-fetch)
12248 (uri (pypi-uri "pytest-pep8" version))
12249 (sha256
12250 (base32
12251 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12252 (build-system python-build-system)
12253 (arguments
12254 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12255 (native-inputs
12256 `(("python-pytest" ,python-pytest)))
12257 (propagated-inputs
12258 `(("python-pep8" ,python-pep8)))
12259 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12260 (synopsis "Py.test plugin to check PEP8 requirements")
12261 (description "Pytest plugin for checking PEP8 compliance.")
12262 (license license:expat)))
12263
12264 (define-public python2-pytest-pep8
12265 (package-with-python2 python-pytest-pep8))
12266
12267 (define-public python-pytest-flakes
12268 (package
12269 (name "python-pytest-flakes")
12270 (version "1.0.1")
12271 (source (origin
12272 (method url-fetch)
12273 (uri (pypi-uri "pytest-flakes" version))
12274 (sha256
12275 (base32
12276 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12277 (build-system python-build-system)
12278 (arguments
12279 `(#:phases
12280 (modify-phases %standard-phases
12281 (delete 'check)
12282 (add-after 'install 'check
12283 (lambda* (#:key outputs inputs #:allow-other-keys)
12284 ;; It's easier to run tests after install.
12285 ;; Make installed package available for running the tests
12286 (add-installed-pythonpath inputs outputs)
12287 (zero? (system* "py.test" "-vv")))))))
12288 (native-inputs
12289 `(("python-coverage" ,python-coverage)
12290 ("python-pytest" ,python-pytest)
12291 ("python-pytest-cache" ,python-pytest-cache)
12292 ("python-pytest-pep8" ,python-pytest-pep8)))
12293 (propagated-inputs
12294 `(("python-pyflakes" ,python-pyflakes)))
12295 (home-page "https://github.com/fschulze/pytest-flakes")
12296 (synopsis "Py.test plugin to check source code with pyflakes")
12297 (description "Pytest plugin for checking Python source code with pyflakes.")
12298 (license license:expat)))
12299
12300 (define-public python2-pytest-flakes
12301 (package-with-python2 python-pytest-flakes))
12302
12303 (define-public python-natsort
12304 (package
12305 (name "python-natsort")
12306 (version "5.0.1")
12307 (source (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "natsort" version))
12310 (sha256
12311 (base32
12312 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12313 (build-system python-build-system)
12314 (arguments
12315 `(#:phases
12316 (modify-phases %standard-phases
12317 (add-before 'check 'set-cachedir
12318 ;; Tests require write access to $HOME by default
12319 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12320 (native-inputs
12321 `(("python-hypothesis" ,python-hypothesis)
12322 ("python-pytest-cache" ,python-pytest-cache)
12323 ("python-pytest-cov" ,python-pytest-cov)
12324 ("python-pytest-flakes" ,python-pytest-flakes)
12325 ("python-pytest-pep8" ,python-pytest-pep8)))
12326 (propagated-inputs ; TODO: Add python-fastnumbers.
12327 `(("python-pyicu" ,python-pyicu)))
12328 (home-page "https://github.com/SethMMorton/natsort")
12329 (synopsis "Natural sorting for python and shell")
12330 (description
12331 "Natsort lets you apply natural sorting on lists instead of
12332 lexicographical. If you use the built-in @code{sorted} method in python
12333 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12334 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12335 function @code{natsorted} that identifies numbers and sorts them separately
12336 from strings. It can also sort version numbers, real numbers, mixed types
12337 and more, and comes with a shell command @command{natsort} that exposes this
12338 functionality in the command line.")
12339 (license license:expat)
12340 (properties `((python2-variant . ,(delay python2-natsort))))))
12341
12342 (define-public python2-natsort
12343 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12344 (package (inherit base)
12345 (native-inputs
12346 `(("python2-pathlib" ,python2-pathlib)
12347 ("python2-mock" ,python2-mock)
12348 ("python2-enum34" ,python2-enum34)
12349 ,@(package-native-inputs base))))))
12350
12351 (define-public python-glances
12352 (package
12353 (name "python-glances")
12354 (version "2.7.1")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "Glances" version))
12359 (sha256
12360 (base32
12361 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12362 (build-system python-build-system)
12363 (propagated-inputs
12364 `(("python-psutil" ,python-psutil)))
12365 (home-page
12366 "https://github.com/nicolargo/glances")
12367 (synopsis
12368 "A cross-platform curses-based monitoring tool")
12369 (description
12370 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12371 Glances uses the PsUtil library to get information from your system. It monitors
12372 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12373 (license license:lgpl3+)))
12374
12375 (define-public python2-glances
12376 (package-with-python2 python-glances))
12377
12378 (define-public python-graphql-core
12379 (package
12380 (name "python-graphql-core")
12381 (version "0.5.3")
12382 (source
12383 (origin
12384 (method url-fetch)
12385 (uri (pypi-uri "graphql-core" version))
12386 (sha256
12387 (base32
12388 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12389 (build-system python-build-system)
12390 (arguments
12391 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12392 #:phases
12393 (modify-phases %standard-phases
12394 (add-after 'unpack 'patch-hardcoded-version
12395 (lambda _ (substitute*
12396 "setup.py"
12397 (("'gevent==1.1rc1'") "'gevent'"))
12398 #t)))))
12399 (native-inputs
12400 `(("python-gevent" ,python-gevent)
12401 ("python-mock" ,python-mock)
12402 ("python-pytest-mock" ,python-pytest-mock)))
12403 (propagated-inputs
12404 `(("python-promise" ,python-promise)
12405 ("python-six" ,python-six)))
12406 (home-page "https://github.com/graphql-python/graphql-core")
12407 (synopsis "GraphQL implementation for Python")
12408 (description
12409 "GraphQL implementation for Python. GraphQL is a data query language and
12410 runtime designed and used to request and deliver data to mobile and web apps.
12411 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12412 to Python.")
12413 (license license:expat)))
12414
12415 (define-public python2-graphql-core
12416 (package-with-python2 python-graphql-core))
12417
12418 (define-public python-graphql-relay
12419 (package
12420 (name "python-graphql-relay")
12421 (version "0.4.5")
12422 (source
12423 (origin
12424 (method url-fetch)
12425 (uri (pypi-uri "graphql-relay" version))
12426 (sha256
12427 (base32
12428 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12429 (build-system python-build-system)
12430 (native-inputs
12431 `(("python-pytest" ,python-pytest)))
12432 (propagated-inputs
12433 `(("python-graphql-core" ,python-graphql-core)
12434 ("python-promise" ,python-promise)
12435 ("python-six" ,python-six)))
12436 (home-page "https://github.com/graphql-python/graphql-relay-py")
12437 (synopsis "Relay implementation for Python")
12438 (description
12439 "This is a library to allow the easy creation of Relay-compliant servers
12440 using the GraphQL Python reference implementation of a GraphQL server. It
12441 should be noted that the code is a exact port of the original
12442 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12443 from Facebook.")
12444 (license license:expat)))
12445
12446 (define-public python2-graphql-relay
12447 (package-with-python2 python-graphql-relay))
12448
12449 (define-public python-graphene
12450 (package
12451 (name "python-graphene")
12452 (version "0.10.2")
12453 (source
12454 (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "graphene" version))
12457 (sha256
12458 (base32
12459 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12460 (build-system python-build-system)
12461 (native-inputs
12462 `(("python-django-filter" ,python-django-filter)
12463 ("python-mock" ,python-mock)
12464 ("python-psycopg2" ,python-psycopg2)
12465 ("python-pytest-django" ,python-pytest-django)
12466 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12467 (propagated-inputs
12468 `(("python-graphql-core" ,python-graphql-core)
12469 ("python-graphql-relay" ,python-graphql-relay)
12470 ("python-iso8601" ,python-iso8601)
12471 ("python-promise" ,python-promise)
12472 ("python-six" ,python-six)))
12473 (home-page "http://graphene-python.org/")
12474 (synopsis "GraphQL Framework for Python")
12475 (description
12476 "Graphene is a Python library for building GraphQL schemas/types.
12477 A GraphQL schema describes your data model, and provides a GraphQL server
12478 with an associated set of resolve methods that know how to fetch data.")
12479 (properties `((python2-variant . ,(delay python2-graphene))))
12480 (license license:expat)))
12481
12482 (define-public python2-graphene
12483 (let ((base (package-with-python2
12484 (strip-python2-variant python-graphene))))
12485 (package (inherit base)
12486 (native-inputs
12487 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12488 ,@(package-native-inputs base))))))
12489
12490 (define-public python-nautilus
12491 (package
12492 (name "python-nautilus")
12493 (version "0.4.9")
12494 (source
12495 (origin
12496 (method url-fetch)
12497 (uri (pypi-uri "nautilus" version))
12498 (sha256
12499 (base32
12500 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12501 (build-system python-build-system)
12502 (arguments `(#:tests? #f)) ; fails to import test modules
12503 (propagated-inputs
12504 `(("python-bcrypt" ,python-bcrypt)
12505 ("python-click" ,python-click)
12506 ("python-consul" ,python-consul)
12507 ("python-graphene" ,python-graphene)
12508 ("python-jinja2" ,python-jinja2)
12509 ("python-peewee" ,python-peewee)
12510 ("python-pika" ,python-pika)
12511 ("python-tornado" ,python-tornado)
12512 ("python-wtforms" ,python-wtforms)))
12513 (native-inputs
12514 `(("python-nose2" ,python-nose2)))
12515 (home-page "https://github.com/AlecAivazis/nautilus")
12516 (synopsis "Library for creating microservice applications")
12517 (description
12518 "Nautilus is a framework for flux based microservices that looks to
12519 provide extendible implementations of common aspects of a cloud so that you can
12520 focus on building massively scalable web applications.")
12521 (license license:expat)))
12522
12523 (define-public python-snowballstemmer
12524 (package
12525 (name "python-snowballstemmer")
12526 (version "1.2.1")
12527 (source (origin
12528 (method url-fetch)
12529 (uri (pypi-uri "snowballstemmer" version))
12530 (sha256
12531 (base32
12532 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12533 (build-system python-build-system)
12534 (arguments
12535 `(;; No tests exist
12536 #:tests? #f))
12537 (home-page "https://github.com/shibukawa/snowball_py")
12538 (synopsis "Snowball stemming library collection for Python")
12539 (description "This package provides 16 word stemmer algorithms generated
12540 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12541 English stemmer.")
12542 (license license:bsd-3)))
12543
12544 (define-public python2-snowballstemmer
12545 (package-with-python2 python-snowballstemmer))
12546
12547 (define-public python-sphinx-cloud-sptheme
12548 (package
12549 (name "python-sphinx-cloud-sptheme")
12550 (version "1.7.1")
12551 (source (origin
12552 (method url-fetch)
12553 (uri (pypi-uri "cloud_sptheme" version))
12554 (sha256
12555 (base32
12556 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12557 (build-system python-build-system)
12558 ;; FIXME: The 'pypi' release archive does not contain tests.
12559 (arguments '(#:tests? #f))
12560 (native-inputs
12561 `(("python-sphinx" ,python-sphinx)))
12562 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12563 (synopsis "'Cloud' theme for Sphinx documenter")
12564 (description "This package contains the \"Cloud\" theme for Sphinx and some
12565 related extensions.")
12566 (license license:bsd-3)))
12567
12568 (define-public python2-sphinx-cloud-sptheme
12569 (package-with-python2 python-sphinx-cloud-sptheme))
12570
12571 (define-public python-sphinx-alabaster-theme
12572 (package
12573 (name "python-sphinx-alabaster-theme")
12574 (version "0.7.9")
12575 (source (origin
12576 (method url-fetch)
12577 (uri (pypi-uri "alabaster" version))
12578 (sha256
12579 (base32
12580 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12581 (build-system python-build-system)
12582 (propagated-inputs
12583 `(("python-pygments" ,python-pygments)))
12584 (home-page "https://alabaster.readthedocs.io/")
12585 (synopsis "Configurable sidebar-enabled Sphinx theme")
12586 (description "Alabaster is a visually (c)lean, responsive, configurable
12587 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12588 (license license:bsd-3)))
12589
12590 (define-public python2-sphinx-alabaster-theme
12591 (package-with-python2 python-sphinx-alabaster-theme))
12592
12593 (define-public python-betamax
12594 (package
12595 (name "python-betamax")
12596 (version "0.8.0")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "betamax" version))
12601 (sha256
12602 (base32
12603 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12604 (build-system python-build-system)
12605 (arguments
12606 '(;; Many tests fail because they require networking.
12607 #:tests? #f))
12608 (propagated-inputs
12609 `(("python-requests" ,python-requests)))
12610 (home-page "https://github.com/sigmavirus24/betamax")
12611 (synopsis "Record HTTP interactions with python-requests")
12612 (description "Betamax will record your test suite's HTTP interactions and
12613 replay them during future tests. It is designed to work with python-requests.")
12614 (license license:expat)))
12615
12616 (define-public python2-betamax
12617 (package-with-python2 python-betamax))
12618
12619 (define-public python-s3transfer
12620 (package
12621 (name "python-s3transfer")
12622 (version "0.1.10")
12623 (source (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "s3transfer" version))
12626 (sha256
12627 (base32
12628 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12629 (build-system python-build-system)
12630 (arguments
12631 `(#:phases
12632 (modify-phases %standard-phases
12633 (replace 'check
12634 (lambda _
12635 ;; 7 of the 'integration' tests require network access or login
12636 ;; credentials.
12637 (zero? (system* "nosetests" "--exclude=integration")))))))
12638 (native-inputs
12639 `(("python-docutils" ,python-docutils)
12640 ("python-mock" ,python-mock)
12641 ("python-nose" ,python-nose)))
12642 (propagated-inputs
12643 `(("python-botocore" ,python-botocore)))
12644 (synopsis "Amazon S3 Transfer Manager")
12645 (description "S3transfer is a Python library for managing Amazon S3
12646 transfers.")
12647 (home-page "https://github.com/boto/s3transfer")
12648 (license license:asl2.0)
12649 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12650
12651 (define-public python2-s3transfer
12652 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12653 (package
12654 (inherit base)
12655 (native-inputs
12656 `(("python2-futures" ,python2-futures)
12657 ,@(package-native-inputs base))))))
12658
12659 (define-public python-setproctitle
12660 (package
12661 (name "python-setproctitle")
12662 (version "1.1.10")
12663 (source
12664 (origin
12665 (method url-fetch)
12666 (uri (pypi-uri "setproctitle" version))
12667 (sha256
12668 (base32
12669 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12670 (build-system python-build-system)
12671 (arguments
12672 '(#:phases
12673 (modify-phases %standard-phases
12674 (add-before 'check 'patch-Makefile
12675 ;; Stricly this is only required for the python2 variant.
12676 ;; But adding a phase in an inherited package seems to be
12677 ;; cumbersum. So we patch even for python3.
12678 (lambda _
12679 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12680 (when nose
12681 (substitute* "Makefile"
12682 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12683 (string-append nose "/bin/nosetests "))))
12684 #t)))
12685 (replace 'check
12686 (lambda _
12687 (setenv "PYTHON" (or (which "python3") (which "python")))
12688 (setenv "PYCONFIG" (or (which "python3-config")
12689 (which "python-config")))
12690 (setenv "CC" "gcc")
12691 ;; No need to extend PYTHONPATH to find the built package, since
12692 ;; the Makefile will build anyway
12693 (zero? (system* "make" "check")))))))
12694 (native-inputs
12695 `(("procps" ,procps))) ; required for tests
12696 (home-page
12697 "https://github.com/dvarrazzo/py-setproctitle")
12698 (synopsis
12699 "Setproctitle implementation for Python to customize the process title")
12700 (description "The library allows a process to change its title (as displayed
12701 by system tools such as ps and top).
12702
12703 Changing the title is mostly useful in multi-process systems, for
12704 example when a master process is forked: changing the children's title
12705 allows to identify the task each process is busy with. The technique
12706 is used by PostgreSQL and the OpenSSH Server for example.")
12707 (license license:bsd-3)
12708 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12709
12710 (define-public python2-setproctitle
12711 (let ((base (package-with-python2
12712 (strip-python2-variant python-setproctitle))))
12713 (package
12714 (inherit base)
12715 (native-inputs `(("python2-nose" ,python2-nose)
12716 ,@(package-native-inputs base))))))
12717
12718 (define-public python-validictory
12719 (package
12720 (name "python-validictory")
12721 (version "1.0.1")
12722 (source
12723 (origin
12724 (method url-fetch)
12725 (uri (pypi-uri "validictory" version))
12726 (sha256
12727 (base32
12728 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12729 (build-system python-build-system)
12730 (arguments
12731 '(#:phases
12732 (modify-phases %standard-phases
12733 (add-after 'unpack 'bootstrap
12734 ;; Move the tests out of the package directory to avoid
12735 ;; packaging them.
12736 (lambda* _
12737 (rename-file "validictory/tests" "tests")
12738 (delete-file "tests/__init__.py")))
12739 (replace 'check
12740 (lambda _
12741 ;; Extend PYTHONPATH so the built package will be found.
12742 (setenv "PYTHONPATH"
12743 (string-append (getcwd) "/build/lib:"
12744 (getenv "PYTHONPATH")))
12745 (zero? (system* "py.test" "-vv" )))))))
12746 (native-inputs
12747 `(("python-pytest" ,python-pytest)))
12748 (home-page
12749 "https://github.com/jamesturk/validictory")
12750 (synopsis "General purpose Python data validator")
12751 (description "It allows validation of arbitrary Python data structures.
12752
12753 The schema format is based on the JSON Schema
12754 proposal (http://json-schema.org), so combined with json the library is also
12755 useful as a validator for JSON data.")
12756 (license license:expat)))
12757
12758 (define-public python2-validictory
12759 (package-with-python2 python-validictory))
12760
12761 (define-public python-aniso8601
12762 (package
12763 (name "python-aniso8601")
12764 (version "1.1.0")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "aniso8601" version))
12769 (sha256
12770 (base32
12771 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12772 (build-system python-build-system)
12773 (propagated-inputs
12774 `(("python-dateutil" ,python-dateutil)))
12775 (home-page
12776 "https://bitbucket.org/nielsenb/aniso8601")
12777 (synopsis
12778 "Python library for parsing ISO 8601 strings")
12779 (description
12780 "This package contains a library for parsing ISO 8601 datetime strings.")
12781 (license license:bsd-3)))
12782
12783 (define-public python-flask-restful
12784 (package
12785 (name "python-flask-restful")
12786 (version "0.3.5")
12787 (source
12788 (origin
12789 (method url-fetch)
12790 (uri (pypi-uri "Flask-RESTful" version))
12791 (sha256
12792 (base32
12793 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12794 (build-system python-build-system)
12795 (propagated-inputs
12796 `(("python-aniso8601" ,python-aniso8601)
12797 ("python-flask" ,python-flask)
12798 ("python-pycrypto" ,python-pycrypto)
12799 ("python-pytz" ,python-pytz)))
12800 (native-inputs
12801 `(;; Optional dependency of Flask. Tests need it.
12802 ("python-blinker" ,python-blinker)
12803 ("python-mock" ,python-mock) ; For tests
12804 ("python-nose" ,python-nose) ; For tests
12805 ("python-sphinx" ,python-sphinx)))
12806 (home-page
12807 "https://www.github.com/flask-restful/flask-restful/")
12808 (synopsis
12809 "Flask module for creating REST APIs")
12810 (description
12811 "This package contains a Flask module for creating REST APIs.")
12812 (license license:bsd-3)))
12813
12814 (define-public python-flask-basicauth
12815 (package
12816 (name "python-flask-basicauth")
12817 (version "0.2.0")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "Flask-BasicAuth" version))
12822 (sha256
12823 (base32
12824 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12825 (build-system python-build-system)
12826 (propagated-inputs
12827 `(("python-flask" ,python-flask)))
12828 (home-page
12829 "https://github.com/jpvanhal/flask-basicauth")
12830 (synopsis
12831 "HTTP basic access authentication for Flask")
12832 (description
12833 "This package provides HTTP basic access authentication for Flask.")
12834 (license license:bsd-3)))
12835
12836 (define-public python-flask-sqlalchemy
12837 (package
12838 (name "python-flask-sqlalchemy")
12839 (version "2.1")
12840 (source
12841 (origin
12842 (method url-fetch)
12843 (uri (pypi-uri "Flask-SQLAlchemy" version))
12844 (sha256
12845 (base32
12846 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12847 (build-system python-build-system)
12848 (propagated-inputs
12849 `(("python-flask" ,python-flask)
12850 ("python-sqlalchemy" ,python-sqlalchemy)))
12851 (home-page
12852 "http://github.com/mitsuhiko/flask-sqlalchemy")
12853 (synopsis
12854 "Module adding SQLAlchemy support to your Flask application")
12855 (description
12856 "This package adds SQLAlchemy support to your Flask application.")
12857 (license license:bsd-3)))
12858
12859 (define-public python-pyev
12860 (package
12861 (name "python-pyev")
12862 (version "0.9.0")
12863 (source
12864 (origin
12865 (method url-fetch)
12866 (uri (pypi-uri "pyev" version))
12867 (sha256
12868 (base32
12869 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12870 (build-system python-build-system)
12871 (arguments
12872 `(#:tests? #f ; no test suite
12873 #:phases
12874 (modify-phases %standard-phases
12875 (add-after 'unpack 'patch
12876 (lambda* (#:key inputs #:allow-other-keys)
12877 (let ((libev (string-append (assoc-ref inputs "libev")
12878 "/lib/libev.so.4")))
12879 (substitute* "setup.py"
12880 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12881 (string-append "libev_dll_name = \"" libev "\"")))))))))
12882 (inputs
12883 `(("libev" ,libev)))
12884 (home-page "http://pythonhosted.org/pyev/")
12885 (synopsis "Python libev interface")
12886 (description "Pyev provides a Python interface to libev.")
12887 (license license:gpl3)))
12888
12889 (define-public python2-pyev
12890 (package-with-python2 python-pyev))
12891
12892 (define-public python-imagesize
12893 (package
12894 (name "python-imagesize")
12895 (version "0.7.1")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "imagesize" version))
12900 (sha256
12901 (base32
12902 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12903 (build-system python-build-system)
12904 (arguments
12905 '(;; Test files are not distributed on PyPi:
12906 ;; https://github.com/shibukawa/imagesize_py/issues/7
12907 #:tests? #f))
12908 (home-page "https://github.com/shibukawa/imagesize_py")
12909 (synopsis "Gets image size of files in variaous formats in Python")
12910 (description
12911 "This package allows determination of image size from
12912 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12913 (license license:expat)))
12914
12915 (define-public python2-imagesize
12916 (package-with-python2 python-imagesize))
12917
12918 (define-public python-axolotl-curve25519
12919 (package
12920 (name "python-axolotl-curve25519")
12921 (version "0.1")
12922 (source
12923 (origin
12924 (method git-fetch)
12925 (uri (git-reference
12926 (url "git://github.com/tgalal/python-axolotl-curve25519")
12927 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12928 (file-name (string-append name "-" version "-checkout"))
12929 (sha256
12930 (base32
12931 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12932 (build-system python-build-system)
12933 (arguments
12934 `(;; Prevent creation of the egg. This works around
12935 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12936 #:configure-flags '("--root=/")))
12937 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12938 (synopsis "Python wrapper for curve25519 library")
12939 (description "This is a python wrapper for the curve25519 library
12940 with ed25519 signatures. The C code was pulled from
12941 libaxolotl-android. At the moment this wrapper is meant for use by
12942 python-axolotl.")
12943 (license (list license:gpl3 ; Most files
12944 license:bsd-3)))) ; curve/curve25519-donna.c
12945
12946 (define-public python2-axolotl-curve25519
12947 (package-with-python2 python-axolotl-curve25519))
12948
12949 (define-public python-axolotl
12950 (package
12951 (name "python-axolotl")
12952 (version "0.1.35")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (string-append
12957 "https://github.com/tgalal/python-axolotl/archive/"
12958 version ".tar.gz"))
12959 (file-name (string-append name "-" version ".tar.gz"))
12960 (sha256
12961 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12962 (build-system python-build-system)
12963 (arguments
12964 `(#:phases
12965 (modify-phases %standard-phases
12966 ;; Don't install tests
12967 (add-before 'install 'remove-tests
12968 (lambda _
12969 (for-each delete-file-recursively
12970 '("axolotl/tests" "build/lib/axolotl/tests"))
12971 #t)))))
12972 (propagated-inputs
12973 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12974 ("python-dateutil" ,python-dateutil)
12975 ("python-protobuf" ,python-protobuf)
12976 ("python-pycrypto" ,python-pycrypto)))
12977 (home-page "https://github.com/tgalal/python-axolotl")
12978 (synopsis "Python port of libaxolotl-android")
12979 (description "This is a python port of libaxolotl-android. This
12980 is a ratcheting forward secrecy protocol that works in synchronous and
12981 asynchronous messaging environments.")
12982 (license license:gpl3)))
12983
12984 (define-public python2-axolotl
12985 (package-with-python2 python-axolotl))
12986
12987 (define-public python-termstyle
12988 (package
12989 (name "python-termstyle")
12990 (version "0.1.11")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "termstyle" version))
12995 (sha256
12996 (base32
12997 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12998 (build-system python-build-system)
12999 (arguments
13000 '(#:phases
13001 (modify-phases %standard-phases
13002 (replace 'check
13003 (lambda _
13004 (zero? (system* "python" "test3.py")))))))
13005 (home-page "http://github.com/gfxmonk/termstyle")
13006 (synopsis "Console text coloring for Python")
13007 (description "This package provides console text coloring for Python.")
13008 (license license:bsd-3)))
13009
13010 (define-public python-rednose
13011 (package
13012 (name "python-rednose")
13013 (version "1.2.1")
13014 (source
13015 (origin
13016 (method url-fetch)
13017 (uri (pypi-uri "rednose" version))
13018 (sha256
13019 (base32
13020 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13021 (build-system python-build-system)
13022 (arguments
13023 `(#:phases
13024 (modify-phases %standard-phases
13025 (add-after 'unpack 'fix-deps
13026 (lambda _
13027 ;; See <https://github.com/JBKahn/rednose/issues/12>
13028 (substitute* "setup.py"
13029 (("python-termstyle") "termstyle"))
13030 #t)))))
13031 (propagated-inputs
13032 `(("python-colorama" ,python-colorama)
13033 ("python-termstyle" ,python-termstyle)))
13034 (native-inputs
13035 `(("python-six" ,python-six)
13036 ("python-nose" ,python-nose)))
13037 (home-page "https://github.com/JBKahn/rednose")
13038 (synopsis "Colored output for Python nosetests")
13039 (description "This package provides colored output for the
13040 @command{nosetests} command of the Python Nose unit test framework.")
13041 (license license:bsd-3)))
13042
13043 (define-public python-flask-restplus
13044 (package
13045 (name "python-flask-restplus")
13046 (version "0.9.2")
13047 (source
13048 (origin
13049 (method url-fetch)
13050 (uri (pypi-uri "flask-restplus" version))
13051 (sha256
13052 (base32
13053 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13054 (build-system python-build-system)
13055 (arguments
13056 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13057 ;; #:phases
13058 ;; (modify-phases %standard-phases
13059 ;; (replace 'check
13060 ;; (lambda _
13061 ;; (zero? (system* "nosetests")))))))
13062 (propagated-inputs
13063 `(("python-aniso8601" ,python-aniso8601)
13064 ("python-flask" ,python-flask)
13065 ("python-jsonschema" ,python-jsonschema)
13066 ("python-pytz" ,python-pytz)
13067 ("python-six" ,python-six)))
13068 (native-inputs
13069 `(("python-tzlocal" ,python-tzlocal)
13070 ("python-blinker" ,python-blinker)
13071 ("python-nose" ,python-nose)
13072 ("python-rednose" ,python-rednose)))
13073 (home-page "https://github.com/noirbizarre/flask-restplus")
13074 (synopsis "Framework for documented API development with Flask")
13075 (description "This package provides a framework for API development with
13076 the Flask web framework in Python. It is similar to package
13077 @code{python-flask-restful} but supports the @code{python-swagger}
13078 documentation builder.")
13079 (license license:expat)))
13080
13081 (define-public python-sadisplay
13082 (package
13083 (name "python-sadisplay")
13084 (version "0.4.6")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "sadisplay" version))
13089 (sha256
13090 (base32
13091 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13092 (build-system python-build-system)
13093 (propagated-inputs
13094 `(("python-sqlalchemy" ,python-sqlalchemy)))
13095 (native-inputs
13096 `(("python-nose" ,python-nose)))
13097 (home-page "https://bitbucket.org/estin/sadisplay")
13098 (synopsis "SQLAlchemy schema displayer")
13099 (description "This package provides a program to build Entity
13100 Relationship diagrams from a SQLAlchemy model (or directly from the
13101 database).")
13102 (license license:bsd-3)))
13103
13104 (define-public python2-sadisplay
13105 (package-with-python2 python-sadisplay))
13106
13107 (define-public python-flask-restful-swagger
13108 (package
13109 (name "python-flask-restful-swagger")
13110 (version "0.19")
13111 (source
13112 (origin
13113 (method url-fetch)
13114 (uri (pypi-uri "flask-restful-swagger" version))
13115 (sha256
13116 (base32
13117 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13118 (build-system python-build-system)
13119 (propagated-inputs
13120 `(("python-flask-restful" ,python-flask-restful)))
13121 (home-page "https://github.com/rantav/flask-restful-swagger")
13122 (synopsis "Extract Swagger specs from Flask-Restful projects")
13123 (description "This package lets you extract Swagger API documentation
13124 specs from your Flask-Restful projects.")
13125 (license license:expat)))
13126
13127 (define-public python2-flask-restful-swagger
13128 (package-with-python2 python-flask-restful-swagger))
13129
13130 (define-public python-argcomplete
13131 (package
13132 (name "python-argcomplete")
13133 (version "1.7.0")
13134 (source
13135 (origin
13136 (method url-fetch)
13137 (uri (pypi-uri "argcomplete" version))
13138 (sha256
13139 (base32
13140 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13141 (build-system python-build-system)
13142 (native-inputs
13143 `(("python-pexpect" ,python-pexpect)
13144 ("tcsh" ,tcsh)))
13145 (home-page "https://github.com/kislyuk/argcomplete")
13146 (synopsis "Shell tab completion for Python argparse")
13147 (description "argcomplete provides extensible command line tab completion
13148 of arguments and options for Python scripts using @code{argparse}. It's
13149 particularly useful for programs with many options or sub-parsers that can
13150 dynamically suggest completions; for example, when browsing resources over the
13151 network.")
13152 (license license:asl2.0)))
13153
13154 (define-public python2-argcomplete
13155 (package-with-python2 python-argcomplete))
13156
13157 (define-public python-xopen
13158 (package
13159 (name "python-xopen")
13160 (version "0.1.1")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "xopen" version))
13165 (sha256
13166 (base32
13167 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13168 (file-name (string-append name "-" version ".tar.gz"))))
13169 (build-system python-build-system)
13170 (home-page "https://github.com/marcelm/xopen/")
13171 (synopsis "Open compressed files transparently")
13172 (description "This module provides an @code{xopen} function that works like
13173 Python's built-in @code{open} function, but can also deal with compressed files.
13174 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13175 recognized by their file extensions. The focus is on being as efficient as
13176 possible on all supported Python versions.")
13177 (license license:expat)))
13178
13179 (define-public python2-xopen
13180 (package-with-python2 python-xopen))
13181
13182 (define-public python2-cheetah
13183 (package
13184 (name "python2-cheetah")
13185 (version "2.4.4")
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "Cheetah" version))
13190 (sha256
13191 (base32
13192 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13193 (build-system python-build-system)
13194 (arguments
13195 `(#:python ,python-2))
13196 (propagated-inputs
13197 `(("python2-markdown" ,python2-markdown)))
13198 (home-page "https://pythonhosted.org/Cheetah/")
13199 (synopsis "Template engine")
13200 (description "Cheetah is a text-based template engine and Python code
13201 generator.
13202
13203 Cheetah can be used as a standalone templating utility or referenced as
13204 a library from other Python applications. It has many potential uses,
13205 but web developers looking for a viable alternative to ASP, JSP, PHP and
13206 PSP are expected to be its principle user group.
13207
13208 Features:
13209 @enumerate
13210 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13211 text-based format.
13212 @item Cleanly separates content, graphic design, and program code.
13213 @item Blends the power and flexibility of Python with a simple template language
13214 that non-programmers can understand.
13215 @item Gives template writers full access to any Python data structure, module,
13216 function, object, or method in their templates.
13217 @item Makes code reuse easy by providing an object-orientated interface to
13218 templates that is accessible from Python code or other Cheetah templates.
13219 One template can subclass another and selectively reimplement sections of it.
13220 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13221 improve the performance of a dynamic website.
13222 @item Compiles templates into optimized, yet readable, Python code.
13223 @end enumerate")
13224 (license (license:x11-style "file://LICENSE"))))
13225
13226 (define-public python-dulwich
13227 (package
13228 (name "python-dulwich")
13229 (version "0.16.3")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (list (string-append "https://www.dulwich.io/releases/"
13234 "dulwich-" version ".tar.gz")
13235 (pypi-uri "dulwich" version)))
13236 (sha256
13237 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13238 (build-system python-build-system)
13239 (arguments
13240 `(#:phases
13241 (modify-phases %standard-phases
13242 (add-before 'check 'fix-tests
13243 (lambda* (#:key inputs #:allow-other-keys)
13244 ;; The tests use Popen with a custom environment which doesn't
13245 ;; include PATH.
13246 (substitute* "dulwich/tests/compat/utils.py"
13247 (("'git'") (string-append "'"
13248 (which "git")
13249 "'")))
13250 (substitute* '("dulwich/tests/test_repository.py"
13251 "dulwich/tests/test_hooks.py")
13252 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13253 (setenv "TEST_RUNNER" "unittest")
13254 (setenv "PYTHONHASHSEED" "random")
13255 #t)))))
13256 (propagated-inputs
13257 `(("python-fastimport" ,python-fastimport)))
13258 (native-inputs
13259 `(("python-mock" ,python-mock)
13260 ("python-geventhttpclient" ,python-geventhttpclient)
13261 ("git" ,git)))
13262 (home-page "https://www.dulwich.io/")
13263 (synopsis "Git implementation in Python")
13264 (description "Dulwich is an implementation of the Git file formats and
13265 protocols written in pure Python.")
13266 ;; Can be used with either license.
13267 (license (list license:asl2.0 license:gpl2+))))
13268
13269 (define-public python2-dulwich
13270 (package-with-python2 python-dulwich))
13271
13272 (define-public python-pbkdf2
13273 (package
13274 (name "python-pbkdf2")
13275 (version "1.3")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "pbkdf2" version))
13280 (sha256
13281 (base32
13282 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13283 (build-system python-build-system)
13284 (arguments
13285 '(#:phases
13286 (modify-phases %standard-phases
13287 (replace 'check
13288 (lambda _
13289 (setenv "PYTHONPATH"
13290 (string-append (getcwd) "/build/lib:"
13291 (getenv "PYTHONPATH")))
13292 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13293 (propagated-inputs
13294 `(("python-pycrypto" ,python-pycrypto))) ; optional
13295 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13296 (synopsis "Password-based key derivation")
13297 (description "This module implements the password-based key derivation
13298 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13299
13300 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13301 is part of the RSA Public Key Cryptography Standards series. The provided
13302 implementation takes a password or a passphrase and a salt value (and
13303 optionally a iteration count, a digest module, and a MAC module) and provides
13304 a file-like object from which an arbitrarly-sized key can be read.")
13305 (license license:expat)))
13306
13307 (define-public python2-pbkdf2
13308 (package-with-python2 python-pbkdf2))
13309
13310 (define-public python-qrcode
13311 (package
13312 (name "python-qrcode")
13313 (version "5.3")
13314 (source
13315 (origin
13316 (method url-fetch)
13317 (uri (pypi-uri "qrcode" version))
13318 (sha256
13319 (base32
13320 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13321 (build-system python-build-system)
13322 (arguments
13323 ;; FIXME: Tests require packaging 'pymaging'.
13324 '(#:tests? #f))
13325 (propagated-inputs
13326 `(("python-lxml" ,python-lxml) ; for SVG output
13327 ("python-pillow" ,python-pillow) ; for PNG output
13328 ("python-six" ,python-six)))
13329 (home-page "https://github.com/lincolnloop/python-qrcode")
13330 (synopsis "QR Code image generator")
13331 (description "This package provides a pure Python QR Code generator
13332 module. It uses the Python Imaging Library (PIL) to allow for the generation
13333 of QR Codes.
13334
13335 In addition this package provides a command line tool to generate QR codes and
13336 either write these QR codes to a file or do the output as ascii art at the
13337 console.")
13338 (license license:bsd-3)))
13339
13340 (define-public python2-qrcode
13341 (package-with-python2 python-qrcode))
13342
13343 ;; SlowAES isn't compatible with Python 3.
13344 (define-public python2-slowaes
13345 (package
13346 (name "python2-slowaes")
13347 (version "0.1a1")
13348 (source
13349 (origin
13350 (method url-fetch)
13351 (uri (pypi-uri "slowaes" version))
13352 (sha256
13353 (base32
13354 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13355 (build-system python-build-system)
13356 (arguments `(#:python ,python-2))
13357 (home-page "http://code.google.com/p/slowaes/")
13358 (synopsis "Implementation of AES in Python")
13359 (description "This package contains an implementation of AES in Python.
13360 This implementation is slow (hence the project name) but still useful when
13361 faster ones are not available.")
13362 (license license:asl2.0)))
13363
13364 (define-public python-rst2ansi
13365 (package
13366 (name "python-rst2ansi")
13367 (version "0.1.5")
13368 (source
13369 (origin
13370 (method url-fetch)
13371 (uri (pypi-uri "rst2ansi" version))
13372 (sha256
13373 (base32
13374 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13375 (build-system python-build-system)
13376 (propagated-inputs
13377 `(("python-docutils" ,python-docutils)))
13378 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13379 (synopsis "Convert RST to ANSI-decorated console output")
13380 (description
13381 "Python module dedicated to rendering RST (reStructuredText) documents
13382 to ansi-escaped strings suitable for display in a terminal.")
13383 (license license:expat)))
13384
13385 (define-public python-ddt
13386 (package
13387 (name "python-ddt")
13388 (version "1.1.1")
13389 (source
13390 (origin
13391 (method url-fetch)
13392 (uri (pypi-uri "ddt" version))
13393 (sha256
13394 (base32
13395 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13396 (build-system python-build-system)
13397 (native-inputs
13398 `(("python-mock" ,python-mock)
13399 ("python-nose" ,python-nose)))
13400 (propagated-inputs
13401 `(("python-six" ,python-six)
13402 ("python-pyyaml" ,python-pyyaml)))
13403 (home-page "https://github.com/txels/ddt")
13404 (synopsis "Data-Driven Tests")
13405 (description
13406 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13407 it with different test data, and make it appear as multiple test cases.")
13408 (license license:expat)))
13409
13410 (define-public python2-ddt
13411 (package-with-python2 python-ddt))
13412
13413 (define-public python-pycosat
13414 (package
13415 (name "python-pycosat")
13416 (version "0.6.1")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "pycosat" version))
13421 (sha256
13422 (base32
13423 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13424 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13425 (build-system python-build-system)
13426 (home-page "https://github.com/ContinuumIO/pycosat")
13427 (synopsis "Bindings to picosat (a SAT solver)")
13428 (description
13429 "This package provides efficient Python bindings to @code{picosat} on
13430 the C level. When importing pycosat, the @code{picosat} solver becomes part
13431 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13432 Problem} (SAT) solver.")
13433 (license license:expat)))
13434
13435 (define-public python2-pycosat
13436 (package-with-python2 python-pycosat))
13437
13438 (define-public python2-ruamel.ordereddict
13439 (package
13440 (name "python2-ruamel.ordereddict")
13441 (version "0.4.9")
13442 (source
13443 (origin
13444 (method url-fetch)
13445 (uri (pypi-uri "ruamel.ordereddict" version))
13446 (sha256
13447 (base32
13448 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13449 (build-system python-build-system)
13450 (arguments
13451 `(#:python ,python-2
13452 #:phases
13453 (modify-phases %standard-phases
13454 (delete 'check)
13455 (add-after 'install 'check
13456 (lambda* (#:key inputs outputs #:allow-other-keys)
13457 (add-installed-pythonpath inputs outputs)
13458 (zero? (system* "python" "test/testordereddict.py")))))))
13459 (home-page "https://bitbucket.org/ruamel/ordereddict")
13460 (synopsis "Version of dict that keeps keys in insertion order")
13461 (description
13462 "This is an implementation of an ordered dictionary with @dfn{Key
13463 Insertion Order} (KIO: updates of values do not affect the position of the
13464 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13465 removed and put at the back). The standard library module @code{OrderedDict},
13466 implemented later, implements a subset of @code{ordereddict} functionality.
13467 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13468 Order} (KSO, no sorting function can be specified, but a transform can be
13469 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13470 (license license:expat)))
13471
13472 (define-public python-pypeg2
13473 (package
13474 (name "python-pypeg2")
13475 (version "2.15.2")
13476 (source
13477 (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "pyPEG2" version))
13480 (sha256
13481 (base32
13482 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13483 (build-system python-build-system)
13484 (propagated-inputs `(("python-lxml" ,python-lxml)))
13485 (arguments
13486 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13487 '(#:tests? #f))
13488 (home-page "https://fdik.org/pyPEG/")
13489 (synopsis "Parsering Expression Grammars in Python")
13490 (description "PyPEG is an intrinsic parser interpreter framework for
13491 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13492 parse many formal languages.")
13493 (license license:gpl2)))