Merge remote-tracking branch 'origin/master' into core-updates
[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, 2017 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, 2017 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 ;;; Copyright © 2017 humanitiesNerd <catonano@gmail.com>
40 ;;;
41 ;;; This file is part of GNU Guix.
42 ;;;
43 ;;; GNU Guix is free software; you can redistribute it and/or modify it
44 ;;; under the terms of the GNU General Public License as published by
45 ;;; the Free Software Foundation; either version 3 of the License, or (at
46 ;;; your option) any later version.
47 ;;;
48 ;;; GNU Guix is distributed in the hope that it will be useful, but
49 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 ;;; GNU General Public License for more details.
52 ;;;
53 ;;; You should have received a copy of the GNU General Public License
54 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55
56 (define-module (gnu packages python)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages algebra)
60 #:use-module (gnu packages adns)
61 #:use-module (gnu packages attr)
62 #:use-module (gnu packages backup)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages django)
67 #:use-module (gnu packages file)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages ghostscript)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages graphviz)
74 #:use-module (gnu packages gstreamer)
75 #:use-module (gnu packages gtk)
76 #:use-module (gnu packages icu4c)
77 #:use-module (gnu packages image)
78 #:use-module (gnu packages imagemagick)
79 #:use-module (gnu packages libevent)
80 #:use-module (gnu packages libffi)
81 #:use-module (gnu packages linux)
82 #:use-module (gnu packages man)
83 #:use-module (gnu packages maths)
84 #:use-module (gnu packages multiprecision)
85 #:use-module (gnu packages networking)
86 #:use-module (gnu packages ncurses)
87 #:use-module (gnu packages openstack)
88 #:use-module (gnu packages password-utils)
89 #:use-module (gnu packages pcre)
90 #:use-module (gnu packages perl)
91 #:use-module (gnu packages pkg-config)
92 #:use-module (gnu packages protobuf)
93 #:use-module (gnu packages qt)
94 #:use-module (gnu packages readline)
95 #:use-module (gnu packages sdl)
96 #:use-module (gnu packages shells)
97 #:use-module (gnu packages statistics)
98 #:use-module (gnu packages tex)
99 #:use-module (gnu packages texinfo)
100 #:use-module (gnu packages tls)
101 #:use-module (gnu packages version-control)
102 #:use-module (gnu packages video)
103 #:use-module (gnu packages web)
104 #:use-module (gnu packages base)
105 #:use-module (gnu packages xml)
106 #:use-module (gnu packages xorg)
107 #:use-module (gnu packages xdisorg)
108 #:use-module (gnu packages zip)
109 #:use-module (gnu packages tcl)
110 #:use-module (gnu packages bdw-gc)
111 #:use-module (guix packages)
112 #:use-module (guix download)
113 #:use-module (guix git-download)
114 #:use-module (guix utils)
115 #:use-module (guix build-system gnu)
116 #:use-module (guix build-system cmake)
117 #:use-module (guix build-system python)
118 #:use-module (guix build-system trivial)
119 #:use-module (srfi srfi-1))
120
121 (define-public python-2.7
122 (package
123 (name "python")
124 (version "2.7.13")
125 (source
126 (origin
127 (method url-fetch)
128 (uri (string-append "https://www.python.org/ftp/python/"
129 version "/Python-" version ".tar.xz"))
130 (sha256
131 (base32
132 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
133 (patches (search-patches "python-2.7-search-paths.patch"
134 "python-2-deterministic-build-info.patch"
135 "python-2.7-site-prefixes.patch"
136 "python-2.7-source-date-epoch.patch"
137 "python-2.7-getentropy-on-old-kernels.patch"))
138 (modules '((guix build utils)))
139 ;; suboptimal to delete failing tests here, but if we delete them in the
140 ;; arguments then we need to make sure to strip out that phase when it
141 ;; gets inherited by python and python-minimal.
142 (snippet
143 '(begin
144 (for-each delete-file
145 '("Lib/test/test_compileall.py"
146 "Lib/test/test_ctypes.py" ; fails on mips64el
147 "Lib/test/test_distutils.py"
148 "Lib/test/test_import.py"
149 "Lib/test/test_shutil.py"
150 "Lib/test/test_socket.py"
151 "Lib/test/test_subprocess.py"))
152 #t))))
153 (outputs '("out"
154 "tk")) ;tkinter; adds 50 MiB to the closure
155 (build-system gnu-build-system)
156 (arguments
157 `(;; 356 tests OK.
158 ;; 6 tests failed:
159 ;; test_compileall test_distutils test_import test_shutil test_socket
160 ;; test_subprocess
161 ;; 39 tests skipped:
162 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
163 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
164 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
165 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
166 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
167 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
168 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
169 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
170 ;; test_winreg test_winsound test_zipfile64
171 ;; 4 skips unexpected on linux2:
172 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
173 #:test-target "test"
174 #:configure-flags
175 (list "--enable-shared" ;allow embedding
176 "--with-system-ffi" ;build ctypes
177 "--with-ensurepip=install" ;install pip and setuptools
178 "--enable-unicode=ucs4"
179 (string-append "LDFLAGS=-Wl,-rpath="
180 (assoc-ref %outputs "out") "/lib"))
181
182 #:modules ((ice-9 ftw) (ice-9 match)
183 (guix build utils) (guix build gnu-build-system))
184 #:phases
185 (modify-phases %standard-phases
186 (add-before
187 'configure 'patch-lib-shells
188 (lambda _
189 ;; Filter for existing files, since some may not exist in all
190 ;; versions of python that are built with this recipe.
191 (substitute* (filter file-exists?
192 '("Lib/subprocess.py"
193 "Lib/popen2.py"
194 "Lib/distutils/tests/test_spawn.py"
195 "Lib/test/test_subprocess.py"))
196 (("/bin/sh") (which "sh")))
197
198 ;; Use zero as the timestamp in .pyc files so that builds are
199 ;; deterministic. TODO: Remove it when this variable is set in
200 ;; gnu-build-system.scm.
201 (setenv "SOURCE_DATE_EPOCH" "1")
202 #t))
203 (add-before 'configure 'do-not-record-configure-flags
204 (lambda* (#:key configure-flags #:allow-other-keys)
205 ;; Remove configure flags from the installed '_sysconfigdata.py'
206 ;; and 'Makefile' so we don't end up keeping references to the
207 ;; build tools.
208 ;;
209 ;; Preserve at least '--with-system-ffi' since otherwise the
210 ;; thing tries to build libffi, fails, and we end up with a
211 ;; Python that lacks ctypes.
212 (substitute* "configure"
213 (("^CONFIG_ARGS=.*$")
214 (format #f "CONFIG_ARGS='~a'\n"
215 (if (member "--with-system-ffi" configure-flags)
216 "--with-system-ffi"
217 ""))))
218 #t))
219 (add-before
220 'check 'pre-check
221 (lambda _
222 ;; 'Lib/test/test_site.py' needs a valid $HOME
223 (setenv "HOME" (getcwd))
224 #t))
225 (add-after
226 'unpack 'set-source-file-times-to-1980
227 ;; XXX One of the tests uses a ZIP library to pack up some of the
228 ;; source tree, and fails with "ZIP does not support timestamps
229 ;; before 1980". Work around this by setting the file times in the
230 ;; source tree to sometime in early 1980.
231 (lambda _
232 (let ((circa-1980 (* 10 366 24 60 60)))
233 (ftw "." (lambda (file stat flag)
234 (utime file circa-1980 circa-1980)
235 #t))
236 #t)))
237 (add-after 'install 'remove-tests
238 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
239 ;; because these files are used by some libraries out there.
240 (lambda* (#:key outputs #:allow-other-keys)
241 (let ((out (assoc-ref outputs "out")))
242 (match (scandir (string-append out "/lib")
243 (lambda (name)
244 (string-prefix? "python" name)))
245 ((pythonX.Y)
246 (let ((testdir (string-append out "/lib/" pythonX.Y
247 "/test")))
248 (with-directory-excursion testdir
249 (for-each delete-file-recursively
250 (scandir testdir
251 (match-lambda
252 ((or "." "..") #f)
253 (file
254 (not
255 (string-prefix? "test_support."
256 file))))))
257 (call-with-output-file "__init__.py" (const #t))
258 #t)))))))
259 (add-before 'strip 'make-libraries-writable
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; Make .so files writable so they can be stripped.
262 (let ((out (assoc-ref outputs "out")))
263 (for-each (lambda (file)
264 (chmod file #o755))
265 (find-files (string-append out "/lib")
266 "\\.so"))
267 #t)))
268 (add-after 'install 'move-tk-inter
269 (lambda* (#:key outputs #:allow-other-keys)
270 ;; When Tkinter support is built move it to a separate output so
271 ;; that the main output doesn't contain a reference to Tcl/Tk.
272 (let ((out (assoc-ref outputs "out"))
273 (tk (assoc-ref outputs "tk")))
274 (when tk
275 (match (find-files out "tkinter.*\\.so")
276 ((tkinter.so)
277 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
278 ;; want it under TK/lib/pythonX.Y/site-packages.
279 (let* ((len (string-length out))
280 (target (string-append
281 tk "/"
282 (string-drop
283 (dirname (dirname tkinter.so))
284 len)
285 "/site-packages")))
286 (install-file tkinter.so target)
287 (delete-file tkinter.so)))))
288 #t))))))
289 (inputs
290 `(("bzip2" ,bzip2)
291 ("gdbm" ,gdbm)
292 ("libffi" ,libffi) ; for ctypes
293 ("sqlite" ,sqlite) ; for sqlite extension
294 ("openssl" ,openssl)
295 ("readline" ,readline)
296 ("zlib" ,zlib)
297 ("tcl" ,tcl)
298 ("tk" ,tk))) ; for tkinter
299 (native-inputs
300 `(("pkg-config" ,pkg-config)))
301 (native-search-paths
302 (list (search-path-specification
303 (variable "PYTHONPATH")
304 (files '("lib/python2.7/site-packages")))))
305 (home-page "https://www.python.org")
306 (synopsis "High-level, dynamically-typed programming language")
307 (description
308 "Python is a remarkably powerful dynamic programming language that
309 is used in a wide variety of application domains. Some of its key
310 distinguishing features include: clear, readable syntax; strong
311 introspection capabilities; intuitive object orientation; natural
312 expression of procedural code; full modularity, supporting hierarchical
313 packages; exception-based error handling; and very high level dynamic
314 data types.")
315 (license license:psfl)))
316
317 ;; Current 2.x version.
318 (define-public python-2 python-2.7)
319
320 (define-public python-3.5
321 (package (inherit python-2)
322 (version "3.5.3")
323 (source (origin
324 (method url-fetch)
325 (uri (string-append "https://www.python.org/ftp/python/"
326 version "/Python-" version ".tar.xz"))
327 (patches (search-patches
328 "python-fix-tests.patch"
329 "python-3.5-fix-tests.patch"
330 "python-3.5-getentropy-on-old-kernels.patch"
331 "python-3-deterministic-build-info.patch"
332 "python-3-search-paths.patch"))
333 (patch-flags '("-p0"))
334 (sha256
335 (base32
336 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
337 (snippet
338 '(delete-file
339 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
340 (arguments (substitute-keyword-arguments (package-arguments python-2)
341 ((#:tests? _) #t)))
342 (native-search-paths
343 (list (search-path-specification
344 (variable "PYTHONPATH")
345 (files (list (string-append "lib/python"
346 (version-major+minor version)
347 "/site-packages"))))))))
348
349 ;; Current 3.x version.
350 (define-public python-3 python-3.5)
351
352 ;; Current major version.
353 (define-public python python-3)
354
355 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
356 ;; Python (Tk -> libxcb -> Python.)
357
358 (define-public python2-minimal
359 (package (inherit python-2)
360 (name "python-minimal")
361 (outputs '("out"))
362
363 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
364 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
365 ;; libffi.
366 (inputs `(("libffi" ,libffi)
367 ("zlib" ,zlib)))))
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (arguments
439 ;; FIXME: some tests does not return and times out.
440 '(#:tests? #f))
441 (home-page "https://www.github.com/giampaolo/psutil")
442 (synopsis "Library for retrieving information on running processes")
443 (description
444 "psutil (Python system and process utilities) is a library for retrieving
445 information on running processes and system utilization (CPU, memory, disks,
446 network) in Python. It is useful mainly for system monitoring, profiling and
447 limiting process resources and management of running processes. It implements
448 many functionalities offered by command line tools such as: ps, top, lsof,
449 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
450 pidof, tty, taskset, pmap.")
451 (license license:bsd-3)))
452
453 (define-public python2-psutil
454 (package-with-python2 python-psutil))
455
456 (define-public python-passlib
457 (package
458 (name "python-passlib")
459 (version "1.7.1")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (pypi-uri "passlib" version))
464 (sha256
465 (base32
466 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
467 (build-system python-build-system)
468 (native-inputs
469 `(("python-nose" ,python-nose)))
470 (propagated-inputs
471 `(("python-py-bcrypt" ,python-py-bcrypt)))
472 (arguments
473 `(#:phases
474 (alist-cons-before
475 'check 'set-PYTHON_EGG_CACHE
476 ;; some tests require access to "$HOME/.cython"
477 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
478 %standard-phases)))
479 (home-page "https://bitbucket.org/ecollins/passlib")
480 (synopsis
481 "Comprehensive password hashing framework")
482 (description
483 "Passlib is a password hashing library for Python 2 & 3, which provides
484 cross-platform implementations of over 30 password hashing algorithms, as well
485 as a framework for managing existing password hashes. It's designed to be
486 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
487 to providing full-strength password hashing for multi-user application.")
488 (license license:bsd-3)))
489
490 (define-public python2-passlib
491 (package-with-python2 python-passlib))
492
493 (define-public python-py-bcrypt
494 (package
495 (name "python-py-bcrypt")
496 (version "0.4")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append
501 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
502 version
503 ".tar.gz"))
504 (sha256
505 (base32
506 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
507 (build-system python-build-system)
508 (home-page "https://code.google.com/p/py-bcrypt")
509 (synopsis
510 "Bcrypt password hashing and key derivation")
511 (description
512 "A python wrapper of OpenBSD's Blowfish password hashing code. This
513 system hashes passwords using a version of Bruce Schneier's Blowfish block
514 cipher with modifications designed to raise the cost of off-line password
515 cracking and frustrate fast hardware implementation. The computation cost of
516 the algorithm is parametised, so it can be increased as computers get faster.
517 The intent is to make a compromise of a password database less likely to
518 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
519 John the Ripper).")
520 ;; "sha2.c" is under BSD-3;
521 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
522 ;; the rest is under ISC.
523 (license (list license:isc license:bsd-3 license:bsd-4))))
524
525 (define-public python2-py-bcrypt
526 (package-with-python2 python-py-bcrypt))
527
528
529 (define-public python-paramiko
530 (package
531 (name "python-paramiko")
532 (version "1.16.0")
533 (source
534 (origin
535 (method url-fetch)
536 (uri (pypi-uri "paramiko" version))
537 (sha256
538 (base32
539 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
540 (build-system python-build-system)
541 (arguments
542 '(;; FIXME: One test fails with "EOFError not raised by connect".
543 #:tests? #f))
544 ;; #:phases
545 ;; (modify-phases %standard-phases
546 ;; (replace 'check
547 ;; (lambda _
548 ;; (zero? (system* "python" "test.py")))))))
549 (propagated-inputs
550 `(("python-pycrypto" ,python-pycrypto)
551 ("python-ecdsa" ,python-ecdsa)))
552 (home-page "http://www.paramiko.org/")
553 (synopsis "SSHv2 protocol library")
554 (description "Paramiko is a python implementation of the SSHv2 protocol,
555 providing both client and server functionality. While it leverages a Python C
556 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
557 Python interface around SSH networking concepts.")
558 (license license:lgpl2.1+)))
559
560 (define-public python2-paramiko
561 (package-with-python2 python-paramiko))
562
563
564 (define-public python-httplib2
565 (package
566 (name "python-httplib2")
567 (version "0.9.2")
568 (source
569 (origin
570 (method url-fetch)
571 (uri (pypi-uri "httplib2" version))
572 (sha256
573 (base32
574 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
575 (build-system python-build-system)
576 (home-page "https://github.com/jcgregorio/httplib2")
577 (synopsis "Comprehensive HTTP client library")
578 (description
579 "A comprehensive HTTP client library supporting many features left out of
580 other HTTP libraries.")
581 (license license:expat)))
582
583 (define-public python2-httplib2
584 (package-with-python2 python-httplib2))
585
586 (define-public python-ecdsa
587 (package
588 (name "python-ecdsa")
589 (version "0.13")
590 (source
591 (origin
592 (method url-fetch)
593 (uri (string-append
594 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
595 version
596 ".tar.gz"))
597 (sha256
598 (base32
599 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
600 (build-system python-build-system)
601 (inputs
602 `(("openssl" ,openssl)))
603 (home-page
604 "http://github.com/warner/python-ecdsa")
605 (synopsis
606 "ECDSA cryptographic signature library (pure python)")
607 (description
608 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
609 Curve Digital Signature Algorithm), implemented purely in Python. With this
610 library, you can quickly create keypairs (signing key and verifying key), sign
611 messages, and verify the signatures. The keys and signatures are very short,
612 making them easy to handle and incorporate into other protocols.")
613 (license license:expat)))
614
615 (define-public python2-ecdsa
616 (package-with-python2 python-ecdsa))
617
618 (define-public python-ccm
619 (package
620 (name "python-ccm")
621 (version "2.1.6")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "ccm" version))
626 (sha256
627 (base32
628 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
629 (build-system python-build-system)
630 (propagated-inputs
631 `(("python-pyyaml" ,python-pyyaml)
632 ;; Not listed in setup.py, but used in ccmlib/node.py for full
633 ;; functionality
634 ("python-psutil" ,python-psutil)
635 ("python-six" ,python-six)))
636 (home-page "https://github.com/pcmanus/ccm")
637 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
638 localhost")
639 (description "Cassandra Cluster Manager is a development tool for testing
640 local Cassandra clusters. It creates, launches and removes Cassandra clusters
641 on localhost.")
642 (license license:asl2.0)))
643
644 (define-public python2-ccm
645 (package-with-python2 python-ccm))
646
647 (define-public python-pytz
648 (package
649 (name "python-pytz")
650 (version "2016.10")
651 (source
652 (origin
653 (method url-fetch)
654 (uri (pypi-uri "pytz" version ".tar.bz2"))
655 (sha256
656 (base32
657 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
658 (build-system python-build-system)
659 (arguments `(#:tests? #f)) ; no test target
660 (home-page "http://pythonhosted.org/pytz")
661 (synopsis "Python timezone library")
662 (description
663 "This library allows accurate and cross platform timezone calculations
664 using Python 2.4 or higher and provides access to the Olson timezone database.")
665 (license license:expat)))
666
667 (define-public python2-pytz
668 (package-with-python2 python-pytz))
669
670
671 (define-public python-babel
672 (package
673 (name "python-babel")
674 (version "2.3.4")
675 (source
676 (origin
677 (method url-fetch)
678 (uri (pypi-uri "Babel" version))
679 (sha256
680 (base32
681 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
682 (build-system python-build-system)
683 (propagated-inputs
684 `(("python-pytz" ,python-pytz)))
685 (arguments `(#:tests? #f)) ; no test target
686 (home-page "http://babel.pocoo.org/")
687 (synopsis
688 "Tools for internationalizing Python applications")
689 (description
690 "Babel is composed of two major parts:
691 - tools to build and work with gettext message catalogs
692 - a Python interface to the CLDR (Common Locale Data Repository), providing
693 access to various locale display names, localized number and date formatting,
694 etc. ")
695 (license license:bsd-3)))
696
697 (define-public python2-babel
698 (package-with-python2 python-babel))
699
700 (define-public python2-backport-ssl-match-hostname
701 (package
702 (name "python2-backport-ssl-match-hostname")
703 (version "3.5.0.1")
704 (source
705 (origin
706 (method url-fetch)
707 (uri (string-append
708 "https://pypi.python.org/packages/source/b/"
709 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
710 version ".tar.gz"))
711 (sha256
712 (base32
713 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
714 (build-system python-build-system)
715 (arguments
716 `(#:python ,python-2
717 #:tests? #f)) ; no test target
718 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
719 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
720 (description
721 "This backport brings the ssl.match_hostname() function to users of
722 earlier versions of Python. The function checks the hostname in the
723 certificate returned by the server to which a connection has been established,
724 and verifies that it matches the intended target hostname.")
725 (license license:psfl)))
726
727 (define-public python-hdf4
728 (package
729 (name "python-hdf4")
730 (version "0.9")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (pypi-uri name version))
735 (sha256
736 (base32
737 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
738 (build-system python-build-system)
739 (native-inputs `(("nose" ,python-nose)))
740 (propagated-inputs `(("numpy" ,python-numpy)))
741 (inputs
742 `(("hdf4" ,hdf4)
743 ("libjpeg" ,libjpeg)
744 ("zlib" ,zlib)))
745 (arguments
746 `(#:phases
747 (modify-phases %standard-phases
748 (replace 'check
749 (lambda _
750 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
751 ;; on to import numpy. Somehow this works on their CI system.
752 ;; Let's just manage PYTHONPATH here instead.
753 (substitute* "runexamples.sh"
754 (("export PYTHONPATH=.*") ""))
755 (setenv "PYTHONPATH"
756 (string-append (getcwd) ":"
757 (getenv "PYTHONPATH")))
758 (and (zero? (system* "./runexamples.sh"))
759 (zero? (system* "nosetests" "-v"))))))))
760 (home-page "https://github.com/fhs/python-hdf4")
761 (synopsis "Python interface to the NCSA HDF4 library")
762 (description
763 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
764 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
765 NetCDF files can also be read and modified. Python-HDF4 is a fork of
766 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
767 (license license:expat)))
768
769 (define-public python2-hdf4
770 (package-with-python2 python-hdf4))
771
772 (define-public python-h5py
773 (package
774 (name "python-h5py")
775 (version "2.6.0")
776 (source
777 (origin
778 (method url-fetch)
779 (uri (pypi-uri "h5py" version))
780 (sha256
781 (base32
782 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
783 (build-system python-build-system)
784 (arguments
785 `(#:tests? #f ; no test target
786 #:phases
787 (modify-phases %standard-phases
788 (add-after 'unpack 'fix-hdf5-paths
789 (lambda* (#:key inputs #:allow-other-keys)
790 (let ((prefix (assoc-ref inputs "hdf5")))
791 (substitute* "setup_build.py"
792 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
793 (string-append "['" prefix "/lib" "']"))
794 (("'/opt/local/include', '/usr/local/include'")
795 (string-append "'" prefix "/include" "'")))
796 (substitute* "setup_configure.py"
797 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']")))
799 #t))))))
800 (propagated-inputs
801 `(("python-six" ,python-six)
802 ("python-numpy" ,python-numpy)))
803 (inputs
804 `(("hdf5" ,hdf5)))
805 (native-inputs
806 `(("python-cython" ,python-cython)
807 ("python-pkgconfig" ,python-pkgconfig)))
808 (home-page "http://www.h5py.org/")
809 (synopsis "Read and write HDF5 files from Python")
810 (description
811 "The h5py package provides both a high- and low-level interface to the
812 HDF5 library from Python. The low-level interface is intended to be a
813 complete wrapping of the HDF5 API, while the high-level component supports
814 access to HDF5 files, datasets and groups using established Python and NumPy
815 concepts.")
816 (license license:bsd-3)))
817
818 (define-public python2-h5py
819 (package-with-python2 python-h5py))
820
821 (define-public python-netcdf4
822 (package
823 (name "python-netcdf4")
824 (version "1.2.7")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (pypi-uri "netCDF4" version))
829 (sha256
830 (base32
831 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
832 (build-system python-build-system)
833 (native-inputs
834 `(("python-cython" ,python-cython)))
835 (propagated-inputs
836 `(("python-numpy" ,python-numpy)))
837 (inputs
838 `(("netcdf" ,netcdf)
839 ("hdf4" ,hdf4)
840 ("hdf5" ,hdf5)))
841 (arguments
842 '(#:phases
843 (modify-phases %standard-phases
844 (replace 'check
845 (lambda _
846 (setenv "NO_NET" "1") ; disable opendap tests
847 (with-directory-excursion "test"
848 (setenv "PYTHONPATH" ; find and add the library we just built
849 (string-append
850 (car (find-files "../build" "lib.*"
851 #:directories? #:t
852 #:fail-on-error? #:t))
853 ":" (getenv "PYTHONPATH")))
854 (zero? (system* "python" "run_all.py"))))))))
855 (home-page
856 "https://github.com/Unidata/netcdf4-python")
857 (synopsis "Python/numpy interface to the netCDF library")
858 (description "Netcdf4-python is a Python interface to the netCDF C
859 library. netCDF version 4 has many features not found in earlier
860 versions of the library and is implemented on top of HDF5. This module
861 can read and write files in both the new netCDF 4 and the old netCDF 3
862 format, and can create files that are readable by HDF5 clients. The
863 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
864 to users of that module.")
865 ;; The software is mainly ISC, but includes some files covered
866 ;; by the Expat license.
867 (license (list license:isc license:expat))))
868
869 (define-public python2-netcdf4
870 (package-with-python2 python-netcdf4))
871
872 (define-public python-lockfile
873 (package
874 (name "python-lockfile")
875 (version "0.12.2")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
880 "lockfile-" version ".tar.gz"))
881 (sha256
882 (base32
883 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
884 (build-system python-build-system)
885 (arguments '(#:test-target "check"))
886 (native-inputs
887 `(("python-pbr" ,python-pbr)))
888 (home-page "https://launchpad.net/pylockfile")
889 (synopsis "Platform-independent file locking module")
890 (description
891 "The lockfile package exports a LockFile class which provides a simple
892 API for locking files.")
893 (license license:expat)))
894
895 (define-public python2-lockfile
896 (package-with-python2 python-lockfile))
897
898 (define-public python-mock
899 (package
900 (name "python-mock")
901 (version "1.0.1")
902 (source
903 (origin
904 (method url-fetch)
905 (uri (pypi-uri "mock" version))
906 (sha256
907 (base32
908 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
909 (build-system python-build-system)
910 (arguments '(#:test-target "check"))
911 (home-page "https://github.com/testing-cabal/mock")
912 (synopsis "Python mocking and patching library for testing")
913 (description
914 "Mock is a library for testing in Python. It allows you to replace parts
915 of your system under test with mock objects and make assertions about how they
916 have been used.")
917 (license license:expat)))
918
919 (define-public python2-mock
920 (package-with-python2 python-mock))
921
922
923 (define-public python-setuptools
924 (package
925 (name "python-setuptools")
926 (version "31.0.0")
927 (source
928 (origin
929 (method url-fetch)
930 (uri (pypi-uri "setuptools" version))
931 (sha256
932 (base32
933 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
934 (modules '((guix build utils)))
935 (snippet
936 '(begin
937 ;; Remove included binaries which are used to build self-extracting
938 ;; installers for Windows.
939 ;; TODO: Find some way to build them ourself so we can include them.
940 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
941 #t))))
942 (build-system python-build-system)
943 ;; FIXME: Tests require pytest, which itself relies on setuptools.
944 ;; One could bootstrap with an internal untested setuptools.
945 (arguments
946 `(#:tests? #f))
947 (home-page "https://pypi.python.org/pypi/setuptools")
948 (synopsis
949 "Library designed to facilitate packaging Python projects")
950 (description
951 "Setuptools is a fully-featured, stable library designed to facilitate
952 packaging Python projects, where packaging includes:
953 Python package and module definitions,
954 distribution package metadata,
955 test hooks,
956 project installation,
957 platform-specific details,
958 Python 3 support.")
959 ;; TODO: setuptools now bundles the following libraries:
960 ;; packaging, pyparsing, six and appdirs. How to unbundle?
961 (license (list license:psfl ; setuptools itself
962 license:expat ; six, appdirs, pyparsing
963 license:asl2.0 ; packaging is dual ASL2/BSD-2
964 license:bsd-2))))
965
966 (define-public python2-setuptools
967 (package-with-python2 python-setuptools))
968
969 ;;; Pycrypto is abandoned upstream:
970 ;;;
971 ;;; https://github.com/dlitz/pycrypto/issues/173
972 ;;;
973 ;;; TODO Remove this package from GNU Guix.
974 (define-public python-pycrypto
975 (package
976 (name "python-pycrypto")
977 (version "2.6.1")
978 (source
979 (origin
980 (method url-fetch)
981 (uri (pypi-uri "pycrypto" version))
982 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
983 (sha256
984 (base32
985 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
986 (build-system python-build-system)
987 (inputs
988 `(("python" ,python)
989 ("gmp" ,gmp)))
990 (arguments
991 `(#:phases
992 (alist-cons-before
993 'build 'set-build-env
994 ;; pycrypto runs an autoconf configure script behind the scenes
995 (lambda _
996 (setenv "CONFIG_SHELL" (which "bash")))
997 %standard-phases)))
998 (home-page "http://www.pycrypto.org/")
999 (synopsis "Cryptographic modules for Python")
1000 (description
1001 "Pycrypto is a collection of both secure hash functions (such as SHA256
1002 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1003 etc.). The package is structured to make adding new modules easy.")
1004 (license license:public-domain)))
1005
1006 (define-public python2-pycrypto
1007 (let ((pycrypto (package-with-python2 python-pycrypto)))
1008 (package (inherit pycrypto)
1009 (inputs
1010 `(("python" ,python-2)
1011 ,@(alist-delete
1012 "python"
1013 (package-inputs pycrypto)))))))
1014
1015 (define-public python-eventlet
1016 (package
1017 (name "python-eventlet")
1018 (version "0.20.1")
1019 (source
1020 (origin
1021 (method url-fetch)
1022 (uri (pypi-uri "eventlet" version))
1023 (sha256
1024 (base32
1025 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1026 (build-system python-build-system)
1027 (propagated-inputs
1028 `(("python-greenlet" ,python-greenlet)))
1029 (home-page "http://eventlet.net")
1030 (synopsis "Concurrent networking library for Python")
1031 (description
1032 "Eventlet is a concurrent networking library for Python that
1033 allows you to change how you run your code, not how you write it.
1034 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1035 Coroutines ensure that the developer uses a blocking style of programming
1036 that is similar to threading, but provide the benefits of non-blocking I/O.
1037 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1038 from the Python interpreter, or as a small part of a larger application.")
1039 (license license:expat)))
1040
1041 (define-public python2-eventlet
1042 (let ((base (package-with-python2
1043 (strip-python2-variant python-eventlet))))
1044 (package (inherit base)
1045 (propagated-inputs
1046 `(("python2-enum34" ,python2-enum34)
1047 ,@(package-propagated-inputs base))))))
1048
1049 (define-public python-keyring
1050 (package
1051 (name "python-keyring")
1052 (version "8.7")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "keyring" version))
1057 (sha256
1058 (base32
1059 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1060 (build-system python-build-system)
1061 (native-inputs
1062 `(("python-setuptools-scm" ,python-setuptools-scm)))
1063 (propagated-inputs
1064 `(("python-pycrypto" ,python-pycrypto)))
1065 (arguments
1066 `(#:tests? #f)) ;TODO: tests require pytest
1067 (home-page "https://github.com/jaraco/keyring")
1068 (synopsis "Store and access your passwords safely")
1069 (description
1070 "The Python keyring lib provides a easy way to access the system keyring
1071 service from python. It can be used in any application that needs safe
1072 password storage.")
1073 ;; "MIT" and PSF dual license
1074 (license license:x11)))
1075
1076 (define-public python2-keyring
1077 (package-with-python2 python-keyring))
1078
1079 (define-public python-six
1080 (package
1081 (name "python-six")
1082 (version "1.10.0")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "six" version))
1087 (sha256
1088 (base32
1089 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1090 (build-system python-build-system)
1091 (native-inputs
1092 `(("python-py" ,python-py)
1093 ("python-pytest" ,python-pytest)))
1094 (home-page "http://pypi.python.org/pypi/six/")
1095 (synopsis "Python 2 and 3 compatibility utilities")
1096 (description
1097 "Six is a Python 2 and 3 compatibility library. It provides utility
1098 functions for smoothing over the differences between the Python versions with
1099 the goal of writing Python code that is compatible on both Python versions.
1100 Six supports every Python version since 2.5. It is contained in only one
1101 Python file, so it can be easily copied into your project.")
1102 (license license:x11)))
1103
1104 (define-public python2-six
1105 (package-with-python2 python-six))
1106
1107 (define-public python-dateutil
1108 (package
1109 (name "python-dateutil")
1110 (version "2.5.3")
1111 (source
1112 (origin
1113 (method url-fetch)
1114 (uri (pypi-uri "python-dateutil" version))
1115 (sha256
1116 (base32
1117 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
1118 (build-system python-build-system)
1119 (propagated-inputs
1120 `(("python-six" ,python-six)))
1121 (home-page "https://dateutil.readthedocs.io/en/stable/")
1122 (synopsis "Extensions to the standard datetime module")
1123 (description
1124 "The dateutil module provides powerful extensions to the standard
1125 datetime module, available in Python 2.3+.")
1126 (license license:bsd-3)))
1127
1128 (define-public python2-dateutil
1129 (package-with-python2 python-dateutil))
1130
1131 (define-public python-parsedatetime
1132 (package
1133 (name "python-parsedatetime")
1134 (version "2.3")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "parsedatetime" version))
1139 (sha256
1140 (base32
1141 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1142 (build-system python-build-system)
1143 (native-inputs
1144 `(("python-nose" ,python-nose)
1145 ("python-pyicu" ,python-pyicu)
1146 ("python-pytest" ,python-pytest)
1147 ("python-pytest-runner" ,python-pytest-runner)))
1148 (propagated-inputs
1149 `(("python-future" ,python-future)))
1150 (home-page "http://github.com/bear/parsedatetime/")
1151 (synopsis
1152 "Parse human-readable date/time text")
1153 (description
1154 "Parse human-readable date/time text.")
1155 (license license:asl2.0)))
1156
1157 (define-public python2-parsedatetime
1158 (package-with-python2 python-parsedatetime))
1159
1160 (define-public python-pandas
1161 (package
1162 (name "python-pandas")
1163 (version "0.19.2")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (pypi-uri "pandas" version))
1168 (sha256
1169 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1170 (patches
1171 (search-patches "python-pandas-skip-failing-tests.patch"))))
1172 (build-system python-build-system)
1173 (propagated-inputs
1174 `(("python-numpy" ,python-numpy)
1175 ("python-pytz" ,python-pytz)
1176 ("python-dateutil" ,python-dateutil)))
1177 (native-inputs
1178 `(("python-nose" ,python-nose)
1179 ("python-cython" ,python-cython)))
1180 (home-page "http://pandas.pydata.org")
1181 (synopsis "Data structures for data analysis, time series, and statistics")
1182 (description
1183 "Pandas is a Python package providing fast, flexible, and expressive data
1184 structures designed to make working with structured (tabular,
1185 multidimensional, potentially heterogeneous) and time series data both easy
1186 and intuitive. It aims to be the fundamental high-level building block for
1187 doing practical, real world data analysis in Python.")
1188 (license license:bsd-3)))
1189
1190 (define-public python2-pandas
1191 (package-with-python2 python-pandas))
1192
1193 (define-public python-tzlocal
1194 (package
1195 (name "python-tzlocal")
1196 (version "1.2.2")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "tzlocal" version))
1201 (sha256
1202 (base32
1203 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1204 (build-system python-build-system)
1205 (propagated-inputs
1206 `(("python-pytz" ,python-pytz)))
1207 (home-page "https://github.com/regebro/tzlocal")
1208 (synopsis
1209 "Local timezone information for Python")
1210 (description
1211 "Tzlocal returns a tzinfo object with the local timezone information.
1212 This module attempts to fix a glaring hole in pytz, that there is no way to
1213 get the local timezone information, unless you know the zoneinfo name, and
1214 under several distributions that's hard or impossible to figure out.")
1215 (license license:cc0)))
1216
1217 (define-public python2-pysqlite
1218 (package
1219 (name "python2-pysqlite")
1220 (version "2.8.3")
1221 (source
1222 (origin
1223 (method url-fetch)
1224 (uri (pypi-uri "pysqlite" version))
1225 (sha256
1226 (base32
1227 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1228 (build-system python-build-system)
1229 (inputs
1230 `(("sqlite" ,sqlite)))
1231 (arguments
1232 `(#:python ,python-2 ; incompatible with Python 3
1233 #:tests? #f)) ; no test target
1234 (home-page "http://github.com/ghaering/pysqlite")
1235 (synopsis "SQLite bindings for Python")
1236 (description
1237 "Pysqlite provides SQLite bindings for Python that comply to the
1238 Database API 2.0T.")
1239 (license license:zlib)))
1240
1241
1242 (define-public python2-mechanize
1243 (package
1244 (name "python2-mechanize")
1245 (version "0.2.5")
1246 (source
1247 (origin
1248 (method url-fetch)
1249 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1250 version ".tar.gz"))
1251 (sha256
1252 (base32
1253 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1254 (build-system python-build-system)
1255 (arguments
1256 `(#:python ,python-2 ; apparently incompatible with Python 3
1257 #:tests? #f))
1258 ;; test fails with message
1259 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1260 ;; (python-3.3.2) or
1261 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1262 ;; (python-2.7.5).
1263 ;; The source code is from March 2011 and probably not up-to-date
1264 ;; with respect to python unit tests.
1265 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1266 (synopsis
1267 "Stateful programmatic web browsing in Python")
1268 (description
1269 "Mechanize implements stateful programmatic web browsing in Python,
1270 after Andy Lester’s Perl module WWW::Mechanize.")
1271 (license (license:non-copyleft
1272 "file://COPYING"
1273 "See COPYING in the distribution."))))
1274
1275
1276 (define-public python-simplejson
1277 (package
1278 (name "python-simplejson")
1279 (version "3.10.0")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "simplejson" version))
1284 (sha256
1285 (base32
1286 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1287 (build-system python-build-system)
1288 (home-page "http://simplejson.readthedocs.org/en/latest/")
1289 (synopsis
1290 "Json library for Python")
1291 (description
1292 "JSON (JavaScript Object Notation) is a subset of JavaScript
1293 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1294 format.
1295
1296 Simplejson exposes an API familiar to users of the standard library marshal
1297 and pickle modules. It is the externally maintained version of the json
1298 library contained in Python 2.6, but maintains compatibility with Python 2.5
1299 and (currently) has significant performance advantages, even without using
1300 the optional C extension for speedups. Simplejson is also supported on
1301 Python 3.3+.")
1302 (license license:x11)))
1303
1304 (define-public python2-simplejson
1305 (package-with-python2 python-simplejson))
1306
1307
1308 (define-public python-pyicu
1309 (package
1310 (name "python-pyicu")
1311 (version "1.9.5")
1312 (source
1313 (origin
1314 (method url-fetch)
1315 (uri (pypi-uri "PyICU" version))
1316 (sha256
1317 (base32
1318 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1319 (build-system python-build-system)
1320 (arguments
1321 '(#:phases
1322 (modify-phases %standard-phases
1323 (add-before 'check 'delete-failing-test
1324 (lambda _
1325 ;; XXX: These tests require locales that are unavailable
1326 ;; in the build environment.
1327 (delete-file "test/test_DateTimeParserGenerator.py")
1328 #t)))))
1329 (inputs
1330 `(("icu4c" ,icu4c)))
1331 (home-page "http://pyicu.osafoundation.org/")
1332 (synopsis "Python extension wrapping the ICU C++ API")
1333 (description
1334 "PyICU is a python extension wrapping the ICU C++ API.")
1335 (license license:x11)))
1336
1337 (define-public python2-pyicu
1338 (package-with-python2 python-pyicu))
1339
1340 (define-public python2-dogtail
1341 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1342 ;; spaces in indentation" with Python 3.
1343 (package
1344 (name "python2-dogtail")
1345 (version "0.8.2")
1346 (source (origin
1347 (method url-fetch)
1348 (uri (string-append
1349 "https://fedorahosted.org/released/dogtail/dogtail-"
1350 version ".tar.gz"))
1351 (sha256
1352 (base32
1353 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1354 (build-system python-build-system)
1355 (arguments `(#:python ,python-2
1356 #:tests? #f)) ; invalid command "test"
1357 (home-page "https://fedorahosted.org/dogtail/")
1358 (synopsis "GUI test tool and automation framework written in Python")
1359 (description
1360 "Dogtail is a GUI test tool and automation framework written in Python.
1361 It uses Accessibility (a11y) technologies to communicate with desktop
1362 applications. dogtail scripts are written in Python and executed like any
1363 other Python program.")
1364 (license license:gpl2+)))
1365
1366 (define-public python2-empy
1367 (package
1368 (name "python2-empy")
1369 (version "3.3")
1370 (source (origin
1371 (method url-fetch)
1372 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1373 version ".tar.gz"))
1374 (sha256
1375 (base32
1376 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1377 (build-system python-build-system)
1378 (arguments
1379 `(#:python ,python-2
1380 #:phases (alist-replace
1381 'check
1382 (lambda _
1383 (zero? (system* "./test.sh")))
1384 %standard-phases)))
1385 (home-page "http://www.alcyone.com/software/empy/")
1386 (synopsis "Templating system for Python")
1387 (description
1388 "EmPy is a system for embedding Python expressions and statements in
1389 template text; it takes an EmPy source file, processes it, and produces
1390 output. This is accomplished via expansions, which are special signals to the
1391 EmPy system and are set off by a special prefix (by default the at sign, @@).
1392 EmPy can expand arbitrary Python expressions and statements in this way, as
1393 well as a variety of special forms. Textual data not explicitly delimited in
1394 this way is sent unaffected to the output, allowing Python to be used in
1395 effect as a markup language. Also supported are callbacks via hooks,
1396 recording and playback via diversions, and dynamic, chainable filters. The
1397 system is highly configurable via command line options and embedded
1398 commands.")
1399 (license license:lgpl2.1+)))
1400
1401 (define-public python2-element-tree
1402 (package
1403 (name "python2-element-tree")
1404 (version "1.2.6")
1405 (source (origin
1406 (method url-fetch)
1407 (uri (string-append
1408 "http://effbot.org/media/downloads/elementtree-"
1409 version "-20050316.tar.gz"))
1410 (sha256
1411 (base32
1412 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1413 (build-system python-build-system)
1414 (arguments
1415 `(#:python ,python-2 ; seems to be part of Python 3
1416 #:tests? #f)) ; no 'test' sub-command
1417 (synopsis "Toolkit for XML processing in Python")
1418 (description
1419 "ElementTree is a Python library supporting lightweight XML processing.")
1420 (home-page "http://effbot.org/zone/element-index.htm")
1421 (license (license:x11-style
1422 "http://docs.python.org/2/license.html"
1423 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1424
1425 (define-public python2-pybugz
1426 (package
1427 (name "python2-pybugz")
1428 (version "0.6.11")
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append
1432 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1433 version ".tar.gz"))
1434 (sha256
1435 (base32
1436 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1437 (patches (search-patches "pybugz-stty.patch"
1438 "pybugz-encode-error.patch"))))
1439 (build-system python-build-system)
1440 (arguments
1441 `(#:python ,python-2 ; SyntaxError with Python 3
1442 #:tests? #f)) ; no 'test' sub-command
1443 (propagated-inputs
1444 `(("element-tree" ,python2-element-tree)))
1445 (synopsis "Python and command-line interface to Bugzilla")
1446 (description
1447 "PyBugz is a Python library and command-line tool to query the Bugzilla
1448 bug tracking system. It is meant as an aid to speed up interaction with the
1449 bug tracker.")
1450 (home-page "http://www.liquidx.net/pybugz/")
1451 (license license:gpl2)))
1452
1453 (define-public python-enum34
1454 (package
1455 (name "python-enum34")
1456 (version "1.1.0")
1457 (source
1458 (origin
1459 (method url-fetch)
1460 (uri (pypi-uri "enum34" version))
1461 (sha256
1462 (base32
1463 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1464 (build-system python-build-system)
1465 (arguments
1466 `(#:phases
1467 (alist-replace
1468 'check
1469 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1470 %standard-phases)))
1471 (home-page "https://pypi.python.org/pypi/enum34")
1472 (synopsis "Backported Python 3.4 Enum")
1473 (description
1474 "Enum34 is the new Python stdlib enum module available in Python 3.4
1475 backported for previous versions of Python from 2.4 to 3.3.")
1476 (license license:bsd-3)))
1477
1478 (define-public python2-enum34
1479 (package-with-python2 python-enum34))
1480
1481 (define-public python-parse-type
1482 (package
1483 (name "python-parse-type")
1484 (version "0.3.4")
1485 (source
1486 (origin
1487 (method url-fetch)
1488 (uri (string-append "https://pypi.python.org/packages/source/p/"
1489 "parse_type/parse_type-" version ".tar.gz"))
1490 (sha256
1491 (base32
1492 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1493 (build-system python-build-system)
1494 (propagated-inputs
1495 `(("python-six" ,python-six)
1496 ("python-parse" ,python-parse)))
1497 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1498 (home-page "https://github.com/jenisys/parse_type")
1499 (synopsis "Extended parse module")
1500 (description
1501 "Parse_type extends the python parse module.")
1502 (license license:bsd-3)))
1503
1504 (define-public python-parse
1505 (package
1506 (name "python-parse")
1507 (version "1.6.6")
1508 (source
1509 (origin
1510 (method url-fetch)
1511 (uri (pypi-uri "parse" version))
1512 (sha256
1513 (base32
1514 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1515 (patches (search-patches "python-parse-too-many-fields.patch"))))
1516 (build-system python-build-system)
1517 (arguments
1518 `(#:phases
1519 (modify-phases %standard-phases
1520 (replace 'check
1521 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1522 (home-page "https://github.com/r1chardj0n3s/parse")
1523 (synopsis "Parse strings")
1524 (description
1525 "Parse strings using a specification based on the Python format()
1526 syntax.")
1527 (license license:x11)))
1528
1529 (define-public python-polib
1530 (package
1531 (name "python-polib")
1532 (version "1.0.8")
1533 (source (origin
1534 (method url-fetch)
1535 (uri (pypi-uri "polib" version))
1536 (sha256
1537 (base32
1538 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1539 (build-system python-build-system)
1540 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1541 (synopsis "Manipulate, create and modify gettext files")
1542 (description "Polib can manipulate any gettext format (po, pot and mo)
1543 files. It can be used to create po files from scratch or to modify
1544 existing ones.")
1545 (license license:expat)))
1546
1547 (define-public python2-polib
1548 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1549 (package
1550 (inherit base)
1551 (arguments `(,@(package-arguments base)
1552 ;; Tests don't work with python2.
1553 #:tests? #f)))))
1554
1555 (define-public scons
1556 (package
1557 (name "scons")
1558 (version "2.3.4")
1559 (source (origin
1560 (method url-fetch)
1561 (uri (string-append "mirror://sourceforge/scons/scons/" version
1562 "/scons-" version ".tar.gz"))
1563 (sha256
1564 (base32
1565 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1566 (build-system python-build-system)
1567 (arguments
1568 ;; With Python 3.x, fails to build with a syntax error.
1569 `(#:python ,python-2
1570 #:use-setuptools? #f ; still relies on distutils
1571 #:tests? #f)) ; no 'python setup.py test' command
1572 (home-page "http://scons.org/")
1573 (synopsis "Software construction tool written in Python")
1574 (description
1575 "SCons is a software construction tool. Think of SCons as an improved,
1576 cross-platform substitute for the classic Make utility with integrated
1577 functionality similar to autoconf/automake and compiler caches such as ccache.
1578 In short, SCons is an easier, more reliable and faster way to build
1579 software.")
1580 (license license:x11)))
1581
1582 (define-public python-extras
1583 (package
1584 (name "python-extras")
1585 (version "0.0.3")
1586 (source
1587 (origin
1588 (method url-fetch)
1589 (uri (string-append
1590 "https://pypi.python.org/packages/source/e/extras/extras-"
1591 version ".tar.gz"))
1592 (sha256
1593 (base32
1594 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1595 (build-system python-build-system)
1596 (arguments
1597 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1598 '(#:tests? #f))
1599 (home-page "https://github.com/testing-cabal/extras")
1600 (synopsis "Useful extensions to the Python standard library")
1601 (description
1602 "Extras is a set of extensions to the Python standard library.")
1603 (license license:expat)))
1604
1605 (define-public python2-extras
1606 (package-with-python2 python-extras))
1607
1608 (define-public python-mimeparse
1609 (package
1610 (name "python-mimeparse")
1611 (version "0.1.4")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (string-append
1616 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1617 version ".tar.gz"))
1618 (sha256
1619 (base32
1620 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1621 (build-system python-build-system)
1622 (arguments
1623 '(#:tests? #f)) ; no setup.py test command
1624 (home-page
1625 "https://github.com/dbtsai/python-mimeparse")
1626 (synopsis "Python library for parsing MIME types")
1627 (description
1628 "Mimeparse provides basic functions for parsing MIME type names and
1629 matching them against a list of media-ranges.")
1630 (license license:expat)))
1631
1632 (define-public python2-mimeparse
1633 (package-with-python2 python-mimeparse))
1634
1635 (define-public python-nose
1636 (package
1637 (name "python-nose")
1638 (version "1.3.7")
1639 (source
1640 (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "nose" version))
1643 (sha256
1644 (base32
1645 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1646 (build-system python-build-system)
1647 (arguments
1648 '(#:tests? #f)) ; FIXME: test suite fails
1649 (home-page "http://readthedocs.org/docs/nose/")
1650 (synopsis "Python testing library")
1651 (description
1652 "Nose extends the unittest library to make testing easier.")
1653 (license license:lgpl2.0+)))
1654
1655 (define-public python2-nose
1656 (package-with-python2 python-nose))
1657
1658 (define-public python-nose2
1659 (package
1660 (name "python-nose2")
1661 (version "0.6.5")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "nose2" version))
1666 (sha256
1667 (base32
1668 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1669 (build-system python-build-system)
1670 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1671 (propagated-inputs
1672 `(("python-cov-core" ,python-cov-core)
1673 ("python-pytest-cov" ,python-pytest-cov)
1674 ("python-six" ,python-six)))
1675 (home-page "https://github.com/nose-devs/nose2")
1676 (synopsis "Next generation of nicer testing for Python")
1677 (description
1678 "Nose2 is the next generation of nicer testing for Python, based on the
1679 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1680 better plugin api, being easier for users to configure, and simplifying internal
1681 interfaces and processes.")
1682 (license license:bsd-2)))
1683
1684 (define-public python2-nose2
1685 (package-with-python2 python-nose2))
1686
1687 (define-public python-unittest2
1688 (package
1689 (name "python-unittest2")
1690 (version "0.5.1")
1691 (source
1692 (origin
1693 (method url-fetch)
1694 (uri (string-append
1695 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1696 version ".tar.gz"))
1697 (sha256
1698 (base32
1699 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1700 (build-system python-build-system)
1701 (home-page "http://pypi.python.org/pypi/unittest2")
1702 (synopsis "Python unit testing library")
1703 (description
1704 "Unittest2 is a replacement for the unittest module in the Python
1705 standard library.")
1706 (license license:psfl)))
1707
1708 (define-public python2-unittest2
1709 (package (inherit python-unittest2)
1710 (name "python2-unittest2")
1711 (version "0.5.1")
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (string-append
1716 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1717 version ".tar.gz"))
1718 (sha256
1719 (base32
1720 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1721 (arguments
1722 `(#:python ,python-2
1723 #:tests? #f)))) ; no setup.py test command
1724
1725 (define-public python-pafy
1726 (package
1727 (name "python-pafy")
1728 (version "0.5.3.1")
1729 (source
1730 (origin
1731 (method url-fetch)
1732 (uri (pypi-uri "pafy" version))
1733 (sha256
1734 (base32
1735 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1736 (build-system python-build-system)
1737 (arguments
1738 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1739 (propagated-inputs
1740 ;; Youtube-dl is a python package which is imported in the file
1741 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1742 `(("youtube-dl" ,youtube-dl)))
1743 (home-page "https://np1.github.io/pafy/")
1744 (synopsis "Retrieve YouTube content and metadata")
1745 (description
1746 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1747 (license license:lgpl3+)))
1748
1749 (define-public python-py
1750 (package
1751 (name "python-py")
1752 (version "1.4.32")
1753 (source
1754 (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "py" version))
1757 (sha256
1758 (base32
1759 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1760 (build-system python-build-system)
1761 (arguments
1762 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1763 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1764 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1765 ;; Is this module globally installed?"
1766 '(#:tests? #f))
1767 (home-page "http://pylib.readthedocs.org/")
1768 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1769 (description
1770 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1771 code introspection, and logging.")
1772 (license license:expat)))
1773
1774 (define-public python2-py
1775 (package-with-python2 python-py))
1776
1777 (define-public python-pytest
1778 (package
1779 (name "python-pytest")
1780 (version "2.7.3")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (string-append
1785 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1786 version ".tar.gz"))
1787 (sha256
1788 (base32
1789 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1790 (modules '((guix build utils)))
1791 (snippet
1792 ;; One of the tests involves the /usr directory, so it fails.
1793 '(substitute* "testing/test_argcomplete.py"
1794 (("def test_remove_dir_prefix\\(self\\):")
1795 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1796 (build-system python-build-system)
1797 (propagated-inputs
1798 `(("python-py" ,python-py)))
1799 (native-inputs
1800 `(("python-nose" ,python-nose)
1801 ("python-mock" ,python-mock)))
1802 (home-page "http://pytest.org")
1803 (synopsis "Python testing library")
1804 (description
1805 "Pytest is a testing tool that provides auto-discovery of test modules
1806 and functions, detailed info on failing assert statements, modular fixtures,
1807 and many external plugins.")
1808 (license license:expat)))
1809
1810 (define-public python2-pytest
1811 (package-with-python2 python-pytest))
1812
1813 ;; This package is used by Borg until we can upgrade all our Python packages to
1814 ;; use a more recent pytest.
1815 (define-public python-pytest-2.9.2
1816 (package
1817 (inherit python-pytest)
1818 (name "python-pytest")
1819 (version "2.9.2")
1820 (source (origin
1821 (method url-fetch)
1822 (uri (pypi-uri "pytest" version))
1823 (sha256
1824 (base32
1825 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1826 (arguments
1827 `(#:phases
1828 (modify-phases %standard-phases
1829 (add-before 'check 'disable-invalid-test
1830 (lambda _
1831 (substitute* "testing/test_argcomplete.py"
1832 (("def test_remove_dir_prefix" line)
1833 (string-append "@pytest.mark.skip"
1834 "(reason=\"Assumes that /usr exists.\")\n "
1835 line)))
1836 #t)))))))
1837
1838 (define-public python-pytest-cov
1839 (package
1840 (name "python-pytest-cov")
1841 (version "2.2.1")
1842 (source
1843 (origin
1844 (method url-fetch)
1845 (uri (pypi-uri "pytest-cov" version))
1846 (sha256
1847 (base32
1848 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1849 (build-system python-build-system)
1850 (arguments
1851 `(#:phases
1852 (modify-phases %standard-phases
1853 (replace 'check
1854 (lambda _
1855 ;; options taken from tox.ini
1856 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1857 ;; with "Duplicate implicit target name"
1858 (zero? (system* "python" "./setup.py" "check"
1859 "--strict" "--metadata")))))))
1860 (propagated-inputs
1861 `(("python-coverage" ,python-coverage)
1862 ("python-pytest" ,python-pytest)))
1863 (home-page "https://github.com/pytest-dev/pytest-cov")
1864 (synopsis "Pytest plugin for measuring coverage")
1865 (description
1866 "Pytest-cov produces coverage reports. It supports centralised testing and
1867 distributed testing in both @code{load} and @code{each} modes. It also
1868 supports coverage of subprocesses.")
1869 (license license:expat)))
1870
1871 (define-public python2-pytest-cov
1872 (package-with-python2 python-pytest-cov))
1873
1874 (define-public python-pytest-runner
1875 (package
1876 (name "python-pytest-runner")
1877 (version "2.6.2")
1878 (source
1879 (origin
1880 (method url-fetch)
1881 (uri (pypi-uri "pytest-runner" version))
1882 (sha256
1883 (base32
1884 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1885 (build-system python-build-system)
1886 (arguments
1887 `(#:phases
1888 (modify-phases %standard-phases
1889 ;; The fancy way of setting the version with setuptools_scm does not
1890 ;; seem to work here.
1891 (add-after 'unpack 'set-version
1892 (lambda _
1893 (substitute* "docs/conf.py"
1894 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1895 (string-append "version = \"" ,version "\"")))
1896 #t)))))
1897 (native-inputs
1898 `(("python-pytest" ,python-pytest)
1899 ("python-setuptools-scm" ,python-setuptools-scm)))
1900 (home-page "https://github.com/pytest-dev/pytest-runner")
1901 (synopsis "Invoke py.test as a distutils command")
1902 (description
1903 "This package provides a @command{pytest-runner} command that
1904 @file{setup.py} files can use to run tests.")
1905 (license license:expat)))
1906
1907 (define-public python2-pytest-runner
1908 (package-with-python2 python-pytest-runner))
1909
1910 (define-public python-pytest-mock
1911 (package
1912 (name "python-pytest-mock")
1913 (version "1.2")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "pytest-mock" version ".zip"))
1918 (sha256
1919 (base32
1920 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1921 (build-system python-build-system)
1922 (native-inputs
1923 `(("unzip" ,unzip)))
1924 (propagated-inputs
1925 `(("python-pytest" ,python-pytest)))
1926 (home-page "https://github.com/pytest-dev/pytest-mock/")
1927 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1928 (description
1929 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1930 around the patching API provided by the @code{mock} package, but with the
1931 benefit of not having to worry about undoing patches at the end of a test.
1932 The mocker fixture has the same API as @code{mock.patch}, supporting the
1933 same arguments.")
1934 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1935 (license license:expat)))
1936
1937 (define-public python2-pytest-mock
1938 (let ((base (package-with-python2
1939 (strip-python2-variant python-pytest-mock))))
1940 (package (inherit base)
1941 (propagated-inputs
1942 `(("python2-mock" ,python2-mock)
1943 ,@(package-propagated-inputs base))))))
1944
1945 (define-public python-pytest-xdist
1946 (package
1947 (name "python-pytest-xdist")
1948 (version "1.14")
1949 (source
1950 (origin
1951 (method url-fetch)
1952 (uri (pypi-uri "pytest-xdist" version ".zip"))
1953 (sha256
1954 (base32
1955 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1956 (modules '((guix build utils)))
1957 (snippet
1958 '(begin
1959 ;; Remove pre-compiled .pyc files from source.
1960 (for-each delete-file-recursively
1961 (find-files "." "__pycache__" #:directories? #t))
1962 (for-each delete-file (find-files "." "\\.pyc$"))
1963 #t))))
1964 (build-system python-build-system)
1965 (arguments
1966 '(#:tests? #f)) ;FIXME: Some tests are failing.
1967 ;; #:phases
1968 ;; (modify-phases %standard-phases
1969 ;; (delete 'check)
1970 ;; (add-after 'install 'check
1971 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1972 ;; (add-installed-pythonpath inputs outputs)
1973 ;; (zero? (system* "py.test" "-v")))))
1974 (native-inputs
1975 `(("unzip" ,unzip)
1976 ("python-setuptools-scm" ,python-setuptools-scm)))
1977 (propagated-inputs
1978 `(("python-execnet" ,python-execnet)
1979 ("python-pytest" ,python-pytest)
1980 ("python-py" ,python-py)))
1981 (home-page
1982 "https://github.com/pytest-dev/pytest-xdist")
1983 (synopsis
1984 "Plugin for py.test with distributed testing and loop-on-failing modes")
1985 (description
1986 "The pytest-xdist plugin extends py.test with some unique test execution
1987 modes: parallelization, running tests in boxed subprocesses, the ability
1988 to run tests repeatedly when failed, and the ability to run tests on multiple
1989 Python interpreters or platforms. It uses rsync to copy the existing
1990 program code to a remote location, executes there, and then syncs the
1991 result back.")
1992 (license license:expat)))
1993
1994 (define-public python2-pytest-xdist
1995 (package-with-python2 python-pytest-xdist))
1996
1997 (define-public python-scripttest
1998 (package
1999 (name "python-scripttest")
2000 (version "1.3")
2001 (source
2002 (origin
2003 (method url-fetch)
2004 (uri (string-append
2005 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2006 version ".tar.gz"))
2007 (sha256
2008 (base32
2009 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2010 (build-system python-build-system)
2011 (native-inputs
2012 `(("python-pytest" ,python-pytest)))
2013 (home-page "http://pythonpaste.org/scripttest/")
2014 (synopsis "Python library to test command-line scripts")
2015 (description "Scripttest is a Python helper library for testing
2016 interactive command-line applications. With it you can run a script in a
2017 subprocess and see the output as well as any file modifications.")
2018 (license license:expat)))
2019
2020 (define-public python2-scripttest
2021 (package-with-python2 python-scripttest))
2022
2023 (define-public python-testtools
2024 (package
2025 (name "python-testtools")
2026 (version "1.4.0")
2027 (source
2028 (origin
2029 (method url-fetch)
2030 (uri (pypi-uri "testtools" version))
2031 (sha256
2032 (base32
2033 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2034 (build-system python-build-system)
2035 (arguments
2036 `(#:phases
2037 (modify-phases %standard-phases
2038 (add-after 'unpack 'fix-module-imports
2039 (lambda _
2040 (substitute* "setup.py"
2041 (("'unittest2>=0.8.0',") ""))
2042 (substitute* '("testtools/testcase.py"
2043 "testtools/testsuite.py"
2044 "testtools/run.py"
2045 "testtools/tests/test_run.py"
2046 "testtools/tests/test_testsuite.py"
2047 "testtools/tests/test_deferredruntest.py")
2048 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2049 (("import unittest2 as unittest") "import unittest")
2050 (("import unittest2") "import unittest as unittest2")
2051 (("from unittest2 import") "from unittest import"))
2052 (substitute* "testtools/tests/test_testresult.py"
2053 ;; NUL in source code is not allowed (raises ValueError).
2054 (("\\x00\\x04") "\\x04"))
2055 #t)))))
2056 (propagated-inputs
2057 `(("python-mimeparse" ,python-mimeparse)
2058 ("python-extras" ,python-extras)))
2059 (home-page "https://github.com/testing-cabal/testtools")
2060 (synopsis
2061 "Extensions to the Python standard library unit testing framework")
2062 (description
2063 "Testtools extends the Python standard library unit testing framework to
2064 provide matchers, more debugging information, and cross-Python
2065 compatibility.")
2066 (license license:psfl)))
2067
2068 (define-public python2-testtools
2069 (package-with-python2 python-testtools))
2070
2071 (define-public python-testscenarios
2072 (package
2073 (name "python-testscenarios")
2074 (version "0.4")
2075 (source
2076 (origin
2077 (method url-fetch)
2078 (uri (string-append
2079 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2080 version ".tar.gz"))
2081 (sha256
2082 (base32
2083 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2084 (build-system python-build-system)
2085 (propagated-inputs
2086 `(("python-testtools" ,python-testtools)))
2087 (home-page "https://launchpad.net/testscenarios")
2088 (synopsis "Pyunit extension for dependency injection")
2089 (description
2090 "Testscenarios provides clean dependency injection for Python unittest
2091 style tests.")
2092 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2093
2094 (define-public python2-testscenarios
2095 (package-with-python2 python-testscenarios))
2096
2097 (define-public python-testresources
2098 (package
2099 (name "python-testresources")
2100 (version "0.2.7")
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri (string-append
2105 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2106 version ".tar.gz"))
2107 (sha256
2108 (base32
2109 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2110 (build-system python-build-system)
2111 (home-page "https://launchpad.net/testresources")
2112 (synopsis
2113 "Pyunit extension for managing test resources")
2114 (description
2115 "Testresources is an extension to Python's unittest to allow declarative
2116 use of resources by test cases.")
2117 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2118
2119 (define-public python2-testresources
2120 (package-with-python2 python-testresources))
2121
2122 (define-public python-subunit
2123 (package
2124 (name "python-subunit")
2125 (version "0.0.21")
2126 (source
2127 (origin
2128 (method url-fetch)
2129 (uri (string-append
2130 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2131 version ".tar.gz"))
2132 (sha256
2133 (base32
2134 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2135 (build-system python-build-system)
2136 (propagated-inputs
2137 `(("python-extras" ,python-extras)
2138 ("python-mimeparse" ,python-mimeparse)))
2139 (native-inputs
2140 `(("python-testscenarios" ,python-testscenarios)))
2141 (home-page "http://launchpad.net/subunit")
2142 (synopsis "Python implementation of the subunit protocol")
2143 (description
2144 "Python-subunit is a Python implementation of the subunit test streaming
2145 protocol.")
2146 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2147
2148 (define-public python2-subunit
2149 (package-with-python2 python-subunit))
2150
2151 ;; Recent versions of python-fixtures and python-testrepository need
2152 ;; python-pbr for packaging, which itself needs these two packages for
2153 ;; testing.
2154 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2155 ;; same source, just without any test dependencies and with tests disabled.
2156 ;; python-pbr-minmal is then used to package python-fixtures and
2157 ;; python-testrepository.
2158 ;; Strictly speaking we currently could remove the test-requirements from the
2159 ;; normal python-pbr package (and save this package) since test are disabled
2160 ;; there anyway. But this may change in future.
2161 (define python-pbr-minimal
2162 (package
2163 (name "python-pbr-minimal")
2164 (version "1.10.0")
2165 (source
2166 (origin
2167 (method url-fetch)
2168 (uri (pypi-uri "pbr" version))
2169 (sha256
2170 (base32
2171 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2172 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2173 (build-system python-build-system)
2174 (arguments
2175 `(#:tests? #f))
2176 (home-page "http://docs.openstack.org/developer/pbr/")
2177 (synopsis "Minimal build of python-pbr used for bootstrapping")
2178 (description
2179 "Used only for bootstrapping python2-pbr, you should not need this.")
2180 (license license:asl2.0)))
2181
2182 (define python2-pbr-minimal
2183 (package-with-python2 python-pbr-minimal))
2184
2185 (define-public python-pbr
2186 (package
2187 (inherit python-pbr-minimal)
2188 (name "python-pbr")
2189 (arguments
2190 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2191 (propagated-inputs
2192 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2193 (native-inputs
2194 `(("python-fixtures" ,python-fixtures)
2195 ;; discover, coverage, hacking, subunit
2196 ("python-mock" ,python-mock)
2197 ("python-six" ,python-six)
2198 ("python-sphinx" ,python-sphinx)
2199 ("python-testrepository" ,python-testrepository)
2200 ("python-testresources" ,python-testresources)
2201 ("python-testscenarios" ,python-testscenarios)
2202 ("python-testtools" ,python-testtools)
2203 ("python-virtualenv" ,python-virtualenv)))
2204 (synopsis "Enhance the default behavior of Python’s setuptools")
2205 (description
2206 "Python Build Reasonableness (PBR) is a library that injects some useful
2207 and sensible default behaviors into your setuptools run. It will set
2208 versions, process requirements files and generate AUTHORS and ChangeLog file
2209 from git information.
2210 ")))
2211
2212 (define-public python2-pbr
2213 (package-with-python2 python-pbr))
2214
2215 (define-public python-fixtures
2216 (package
2217 (name "python-fixtures")
2218 (version "1.4.0")
2219 (source
2220 (origin
2221 (method url-fetch)
2222 (uri (pypi-uri "fixtures" version))
2223 (sha256
2224 (base32
2225 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2226 (build-system python-build-system)
2227 (arguments
2228 '(#:phases
2229 (modify-phases %standard-phases
2230 (replace 'check
2231 (lambda _
2232 (zero? (system* "python" "-m" "testtools.run"
2233 "fixtures.test_suite")))))))
2234 (propagated-inputs
2235 `(("python-six" ,python-six)))
2236 (native-inputs
2237 `(("python-mock" ,python-mock)
2238 ("python-pbr-minimal" ,python-pbr-minimal)
2239 ("python-testtools" ,python-testtools)))
2240 (home-page "https://launchpad.net/python-fixtures")
2241 (synopsis "Python test fixture library")
2242 (description
2243 "Fixtures provides a way to create reusable state, useful when writing
2244 Python tests.")
2245 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2246
2247 (define-public python2-fixtures
2248 (package-with-python2 python-fixtures))
2249
2250 (define-public python-testrepository
2251 (package
2252 (name "python-testrepository")
2253 (version "0.0.20")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (string-append
2258 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2259 version ".tar.gz"))
2260 (sha256
2261 (base32
2262 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2263 (build-system python-build-system)
2264 (arguments
2265 ;; FIXME: Many tests are failing.
2266 '(#:tests? #f))
2267 (propagated-inputs
2268 `(("python-fixtures" ,python-fixtures)
2269 ("python-subunit" ,python-subunit)
2270 ("python-testtools" ,python-testtools)))
2271 (native-inputs
2272 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2273 ("python-mimeparse" ,python-mimeparse)))
2274 (home-page "https://launchpad.net/testrepository")
2275 (synopsis "Database for Python test results")
2276 (description "Testrepository provides a database of test results which can
2277 be used as part of a developer's workflow to check things such as what tests
2278 have failed since the last commit or what tests are currently failing.")
2279 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2280
2281 (define-public python2-testrepository
2282 (package-with-python2 python-testrepository))
2283
2284 (define-public python-coverage
2285 (package
2286 (name "python-coverage")
2287 (version "4.1")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "coverage" version))
2292 (sha256
2293 (base32
2294 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2295 (build-system python-build-system)
2296 (arguments
2297 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2298 '(#:tests? #f))
2299 (home-page "http://nedbatchelder.com/code/coverage")
2300 (synopsis "Code coverage measurement for Python")
2301 (description
2302 "Coverage measures code coverage, typically during test execution. It
2303 uses the code analysis tools and tracing hooks provided in the Python standard
2304 library to determine which lines are executable, and which have been
2305 executed.")
2306 (license license:bsd-3)))
2307
2308 (define-public python2-coverage
2309 (package-with-python2 python-coverage))
2310
2311 (define-public python-cov-core
2312 (package
2313 (name "python-cov-core")
2314 (version "1.15.0")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "cov-core" version))
2319 (sha256
2320 (base32
2321 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2322 (build-system python-build-system)
2323 (propagated-inputs
2324 `(("python-coverage" ,python-coverage)))
2325 (home-page "https://github.com/schlamar/cov-core")
2326 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2327 (description
2328 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2329 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2330 testing frameworks.")
2331 (license license:expat)))
2332
2333 (define-public python2-cov-core
2334 (package-with-python2 python-cov-core))
2335
2336 (define-public python-discover
2337 (package
2338 (name "python-discover")
2339 (version "0.4.0")
2340 (source
2341 (origin
2342 (method url-fetch)
2343 (uri (string-append
2344 "https://pypi.python.org/packages/source/d/discover/discover-"
2345 version ".tar.gz"))
2346 (sha256
2347 (base32
2348 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2349 (build-system python-build-system)
2350 (home-page "http://pypi.python.org/pypi/discover/")
2351 (synopsis
2352 "Python test discovery for unittest")
2353 (description
2354 "Discover provides test discovery for unittest, a feature that has been
2355 backported from Python 2.7 for Python 2.4+.")
2356 (license license:bsd-3)))
2357
2358 (define-public python2-discover
2359 (package-with-python2 python-discover))
2360
2361 (define-public behave
2362 (package
2363 (name "behave")
2364 (version "1.2.5")
2365 (source (origin
2366 (method url-fetch)
2367 (uri (pypi-uri "behave" version ".tar.bz2"))
2368 (sha256
2369 (base32
2370 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2371 (build-system python-build-system)
2372 (propagated-inputs
2373 `(("python-six" ,python-six)
2374 ("python-parse" ,python-parse)
2375 ("python-parse-type" ,python-parse-type)))
2376 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2377 ;PyHamcrest>=1.8
2378 (home-page "http://github.com/behave/behave")
2379 (synopsis "Python behavior-driven development")
2380 (description
2381 "Behave is a tool for behavior-driven development in python.
2382 Behavior-driven development (or BDD) is an agile software development
2383 technique that encourages collaboration between developers, QA and
2384 non-technical or business participants in a software project. Behave uses
2385 tests written in a natural language style, backed up by Python code.")
2386 (license license:x11)))
2387
2388 (define-public python-exif-read
2389 (package
2390 (name "python-exif-read")
2391 (version "2.1.2")
2392 (source (origin
2393 (method url-fetch)
2394 (uri (pypi-uri "ExifRead" version))
2395 (sha256
2396 (base32
2397 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2398 (build-system python-build-system)
2399 (arguments `(#:tests? #f)) ; no tests
2400 (home-page "https://github.com/ianare/exif-py")
2401 (synopsis "Python library to extract EXIF data from image files")
2402 (description
2403 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2404 files.")
2405 (license license:bsd-3)))
2406
2407 (define-public python2-exif-read
2408 (package-with-python2 python-exif-read))
2409
2410 (define-public python-pyld
2411 (package
2412 (name "python-pyld")
2413 (version "0.7.1")
2414 (source (origin
2415 (method url-fetch)
2416 (uri (pypi-uri "PyLD" version))
2417 (sha256
2418 (base32
2419 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2420 (build-system python-build-system)
2421 (arguments `(#:tests? #f)) ; no tests
2422 (home-page "http://github.com/digitalbazaar/pyld")
2423 (synopsis "Python implementation of the JSON-LD specification")
2424 (description
2425 "PyLD is an implementation of the JSON-LD specification.")
2426 (license license:bsd-3)))
2427
2428 (define-public python2-pyld
2429 (package-with-python2 python-pyld))
2430
2431 (define-public python-certifi
2432 (package
2433 (name "python-certifi")
2434 (version "2017.1.23")
2435 (source (origin
2436 (method url-fetch)
2437 (uri (pypi-uri "certifi" version))
2438 (sha256
2439 (base32
2440 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2441 (build-system python-build-system)
2442 (home-page "https://certifi.io/")
2443 (synopsis "Python CA certificate bundle")
2444 (description
2445 "Certifi is a Python library that contains a CA certificate bundle, which
2446 is used by the Requests library to verify HTTPS requests.")
2447 (license license:asl2.0)))
2448
2449 (define-public python2-certifi
2450 (package-with-python2 python-certifi))
2451
2452 (define-public python-click
2453 (package
2454 (name "python-click")
2455 (version "6.7")
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "click" version))
2460 (sha256
2461 (base32
2462 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2463 (build-system python-build-system)
2464 (arguments
2465 `(#:phases
2466 (modify-phases %standard-phases
2467 (add-after 'unpack 'fix-paths
2468 (lambda* (#:key inputs #:allow-other-keys)
2469 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2470 "cross-libc" "libc"))))
2471 (substitute* "click/_unicodefun.py"
2472 (("'locale'")
2473 (string-append "'" glibc "/bin/locale'"))))
2474 #t))
2475 (replace 'check
2476 (lambda _
2477 (zero? (system* "make" "test")))))))
2478 (native-inputs
2479 `(("python-pytest" ,python-pytest)))
2480 (home-page "http://click.pocoo.org")
2481 (synopsis "Command line library for Python")
2482 (description
2483 "Click is a Python package for creating command line interfaces in a
2484 composable way with as little code as necessary. Its name stands for
2485 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2486 with sensible defaults out of the box.")
2487 (license license:bsd-3)))
2488
2489 (define-public python2-click
2490 (package-with-python2 python-click))
2491
2492 (define-public python-wheel
2493 (package
2494 (name "python-wheel")
2495 (version "0.30.0a0")
2496 (source
2497 (origin
2498 (method url-fetch)
2499 (uri (pypi-uri "wheel" version))
2500 (sha256
2501 (base32
2502 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2503 (build-system python-build-system)
2504 (native-inputs
2505 `(("python-jsonschema" ,python-jsonschema)
2506 ("python-pytest-cov" ,python-pytest-cov)))
2507 (home-page "https://bitbucket.org/pypa/wheel/")
2508 (synopsis "Format for built Python packages")
2509 (description
2510 "A wheel is a ZIP-format archive with a specially formatted filename and
2511 the @code{.whl} extension. It is designed to contain all the files for a PEP
2512 376 compatible install in a way that is very close to the on-disk format. Many
2513 packages will be properly installed with only the @code{Unpack} step and the
2514 unpacked archive preserves enough information to @code{Spread} (copy data and
2515 scripts to their final locations) at any later time. Wheel files can be
2516 installed with a newer @code{pip} or with wheel's own command line utility.")
2517 (license license:expat)
2518 (properties `((python2-variant . ,(delay python2-wheel))))))
2519
2520 (define-public python2-wheel
2521 (let ((wheel (package-with-python2
2522 (strip-python2-variant python-wheel))))
2523 (package (inherit wheel)
2524 (native-inputs `(("python2-functools32" ,python2-functools32)
2525 ,@(package-native-inputs wheel))))))
2526
2527
2528 (define-public python-requests
2529 (package
2530 (name "python-requests")
2531 (version "2.13.0")
2532 (source (origin
2533 (method url-fetch)
2534 (uri (pypi-uri "requests" version))
2535 (sha256
2536 (base32
2537 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2538 ;; TODO: unbundle urllib3 and chardet.
2539 (build-system python-build-system)
2540 (arguments
2541 ;; FIXME: Some tests require network access.
2542 '(#:tests? #f))
2543 (home-page "http://python-requests.org/")
2544 (synopsis "Python HTTP library")
2545 (description
2546 "Requests is a Python HTTP client library. It aims to be easier to use
2547 than Python’s urllib2 library.")
2548 (license license:asl2.0)))
2549
2550 ;; Some software requires an older version of Requests, notably Docker
2551 ;; Compose.
2552 (define-public python-requests-2.7
2553 (package (inherit python-requests)
2554 (version "2.7.0")
2555 (source (origin
2556 (method url-fetch)
2557 (uri (pypi-uri "requests" version))
2558 (sha256
2559 (base32
2560 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2561
2562 (define-public python2-requests
2563 (package-with-python2 python-requests))
2564
2565 (define-public python-vcversioner
2566 (package
2567 (name "python-vcversioner")
2568 (version "2.16.0.0")
2569 (source
2570 (origin
2571 (method url-fetch)
2572 (uri (pypi-uri "vcversioner" version))
2573 (sha256
2574 (base32
2575 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2576 (build-system python-build-system)
2577 (synopsis "Python library for version number discovery")
2578 (description "Vcversioner is a Python library that inspects tagging
2579 information in a variety of version control systems in order to discover
2580 version numbers.")
2581 (home-page "https://github.com/habnabit/vcversioner")
2582 (license license:isc)))
2583
2584 (define-public python2-vcversioner
2585 (package-with-python2 python-vcversioner))
2586
2587 (define-public python-jsonschema
2588 (package
2589 (name "python-jsonschema")
2590 (version "2.5.1")
2591 (source (origin
2592 (method url-fetch)
2593 (uri
2594 (string-append
2595 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2596 version ".tar.gz"))
2597 (sha256
2598 (base32
2599 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2600 (build-system python-build-system)
2601 (arguments
2602 '(#:phases
2603 (modify-phases %standard-phases
2604 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2605 (native-inputs
2606 `(("python-nose" ,python-nose)
2607 ("python-vcversioner" ,python-vcversioner)))
2608 (home-page "https://github.com/Julian/jsonschema")
2609 (synopsis "Implementation of JSON Schema for Python")
2610 (description
2611 "Jsonschema is an implementation of JSON Schema for Python.")
2612 (license license:expat)
2613 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2614
2615 (define-public python2-jsonschema
2616 (let ((jsonschema (package-with-python2
2617 (strip-python2-variant python-jsonschema))))
2618 (package (inherit jsonschema)
2619 (native-inputs
2620 `(("python2-mock" ,python2-mock)
2621 ,@(package-native-inputs jsonschema)))
2622 (propagated-inputs
2623 `(("python2-functools32" ,python2-functools32))))))
2624
2625 (define-public python-kitchen
2626 (package
2627 (name "python-kitchen")
2628 (version "1.2.4")
2629 (source
2630 (origin
2631 (method url-fetch)
2632 (uri (pypi-uri "kitchen" version))
2633 (sha256
2634 (base32
2635 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2636 (build-system python-build-system)
2637 (propagated-inputs
2638 `(("python-chardet" ,python-chardet)))
2639 (home-page "https://fedorahosted.org/kitchen")
2640 (synopsis "Python API for snippets")
2641 (description "@code{kitchen} module provides a python API for all sorts of
2642 little useful snippets of code that everybody ends up writing for their projects
2643 but never seem big enough to build an independent release. Use kitchen and stop
2644 cutting and pasting that code over and over.")
2645 (license (list license:lgpl2.1+
2646 ;; subprocess.py, test_subprocess.py,
2647 ;; kitchen/pycompat25/defaultdict.py:
2648 license:psfl))))
2649
2650 (define-public python2-kitchen
2651 (package-with-python2 python-kitchen))
2652
2653 (define-public python-unidecode
2654 (package
2655 (name "python-unidecode")
2656 (version "0.04.20")
2657 (source (origin
2658 (method url-fetch)
2659 (uri (pypi-uri "Unidecode" version))
2660 (sha256
2661 (base32
2662 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2663 (build-system python-build-system)
2664 (home-page "https://pypi.python.org/pypi/Unidecode")
2665 (synopsis "ASCII transliterations of Unicode text")
2666 (description
2667 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2668 useful when integrating with legacy code that doesn't support Unicode, or for
2669 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2670 machine identifiers from human-readable Unicode strings that should still be
2671 somewhat intelligeble.")
2672 (license license:gpl2+)))
2673
2674 (define-public python2-unidecode
2675 (package-with-python2 python-unidecode))
2676
2677 (define-public python-pyjwt
2678 (package
2679 (name "python-pyjwt")
2680 (version "1.4.0")
2681 (source
2682 (origin
2683 (method url-fetch)
2684 (uri (pypi-uri "PyJWT" version))
2685 (sha256
2686 (base32
2687 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2688 (build-system python-build-system)
2689 (native-inputs
2690 `(("python-pytest" ,python-pytest)
2691 ("python-pytest-cov" ,python-pytest-cov)
2692 ("python-pytest-runner" ,python-pytest-runner)))
2693 (home-page "http://github.com/progrium/pyjwt")
2694 (synopsis "JSON Web Token implementation in Python")
2695 (description
2696 "PyJWT is a JSON Web Token implementation written in Python.")
2697 (license license:expat)))
2698
2699 (define-public python2-pyjwt
2700 (package-with-python2 python-pyjwt))
2701
2702 (define-public python-pykka
2703 (package
2704 (name "python-pykka")
2705 (version "1.2.1")
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "Pykka" version))
2710 (sha256
2711 (base32
2712 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2713 (build-system python-build-system)
2714 (native-inputs
2715 `(("python-mock" ,python-mock)
2716 ("python-nose" ,python-nose)
2717 ("python-gevent" ,python-gevent)
2718 ("python-eventlet" ,python-eventlet)))
2719 (home-page "https://www.pykka.org/")
2720 (synopsis "Pykka is a Python implementation of the actor model")
2721 (description
2722 "Pykka is a Python implementation of the actor model.
2723 The actor model introduces some simple rules to control the sharing
2724 of state and cooperation between execution units, which makes it
2725 easier to build concurrent applications.")
2726 (license license:asl2.0)))
2727
2728 (define-public python2-pykka
2729 (package-with-python2 python-pykka))
2730
2731 (define-public python-oauthlib
2732 (package
2733 (name "python-oauthlib")
2734 (version "1.0.3")
2735 (source (origin
2736 (method url-fetch)
2737 (uri (pypi-uri "oauthlib" version))
2738 (sha256
2739 (base32
2740 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2741 (build-system python-build-system)
2742 (native-inputs
2743 `(("python-nose" ,python-nose)
2744 ("python-mock" ,python-mock)
2745 ("python-cryptography" ,python-cryptography)
2746 ("python-pyjwt" ,python-pyjwt)
2747 ("python-blinker" ,python-blinker)))
2748 (home-page "https://github.com/idan/oauthlib")
2749 (synopsis "OAuth implementation for Python")
2750 (description
2751 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2752 OAuth request-signing logic.")
2753 (license license:bsd-3)
2754 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2755
2756 (define-public python2-oauthlib
2757 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2758 (package
2759 (inherit base)
2760 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2761 ,@(package-native-inputs base))))))
2762
2763 (define-public python-itsdangerous
2764 (package
2765 (name "python-itsdangerous")
2766 (version "0.24")
2767 (source
2768 (origin
2769 (method url-fetch)
2770 (uri (string-append
2771 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2772 version ".tar.gz"))
2773 (sha256
2774 (base32
2775 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2776 (build-system python-build-system)
2777 (home-page "http://github.com/mitsuhiko/itsdangerous")
2778 (synopsis "Python library for passing data to/from untrusted environments")
2779 (description
2780 "Itsdangerous provides various helpers to pass trusted data to untrusted
2781 environments and back.")
2782 (license license:bsd-3)))
2783
2784 (define-public python2-itsdangerous
2785 (package-with-python2 python-itsdangerous))
2786
2787 (define-public python-pyyaml
2788 (package
2789 (name "python-pyyaml")
2790 (version "3.12")
2791 (source
2792 (origin
2793 (method url-fetch)
2794 (uri (pypi-uri "PyYAML" version))
2795 (sha256
2796 (base32
2797 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2798 (build-system python-build-system)
2799 (inputs
2800 `(("libyaml" ,libyaml)))
2801 (home-page "http://pyyaml.org/wiki/PyYAML")
2802 (synopsis "YAML parser and emitter for Python")
2803 (description
2804 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2805 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2806 API, and sensible error messages. PyYAML supports standard YAML tags and
2807 provides Python-specific tags that allow to represent an arbitrary Python
2808 object.")
2809 (license license:expat)))
2810
2811 (define-public python2-pyyaml
2812 (package-with-python2 python-pyyaml))
2813
2814 (define-public python-virtualenv
2815 (package
2816 (name "python-virtualenv")
2817 (version "15.0.3")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (pypi-uri "virtualenv" version))
2822 (sha256
2823 (base32
2824 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2825 (build-system python-build-system)
2826 (arguments
2827 `(#:phases
2828 (modify-phases %standard-phases
2829 (replace 'check
2830 (lambda _
2831 ;; Disable failing test. See upstream bug report
2832 ;; https://github.com/pypa/virtualenv/issues/957
2833 (substitute* "tests/test_virtualenv.py"
2834 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2835 (zero? (system* "py.test")))))))
2836 (native-inputs
2837 `(("python-mock" ,python-mock)
2838 ("python-pytest" ,python-pytest)))
2839 (home-page "https://virtualenv.pypa.io/")
2840 (synopsis "Virtual Python environment builder")
2841 (description
2842 "Virtualenv is a tool to create isolated Python environments.")
2843 (license license:expat)))
2844
2845 (define-public python2-virtualenv
2846 (package-with-python2 python-virtualenv))
2847
2848 (define-public python-markupsafe
2849 (package
2850 (name "python-markupsafe")
2851 (version "0.23")
2852 (source
2853 (origin
2854 (method url-fetch)
2855 (uri (string-append
2856 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2857 version ".tar.gz"))
2858 (sha256
2859 (base32
2860 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2861 (build-system python-build-system)
2862 (home-page "http://github.com/mitsuhiko/markupsafe")
2863 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2864 (description
2865 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2866 for Python.")
2867 (license license:bsd-3)))
2868
2869 (define-public python2-markupsafe
2870 (package-with-python2 python-markupsafe))
2871
2872 (define-public python-jinja2
2873 (package
2874 (name "python-jinja2")
2875 (version "2.8")
2876 (source
2877 (origin
2878 (method url-fetch)
2879 (uri (pypi-uri "Jinja2" version))
2880 (sha256
2881 (base32
2882 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2883 (build-system python-build-system)
2884 (propagated-inputs
2885 `(("python-markupsafe" ,python-markupsafe)))
2886 (home-page "http://jinja.pocoo.org/")
2887 (synopsis "Python template engine")
2888 (description
2889 "Jinja2 is a small but fast and easy to use stand-alone template engine
2890 written in pure Python.")
2891 (license license:bsd-3)))
2892
2893 (define-public python2-jinja2
2894 (package-with-python2 python-jinja2))
2895
2896 (define-public python-pystache
2897 (package
2898 (name "python-pystache")
2899 (version "0.5.4")
2900 (source (origin
2901 (method url-fetch)
2902 (uri (pypi-uri "pystache" version))
2903 (sha256
2904 (base32
2905 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2906 (build-system python-build-system)
2907 (arguments
2908 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2909 (home-page "http://defunkt.io/pystache/")
2910 (synopsis "Python logic-less template engine")
2911 (description
2912 "Pystache is a Python implementation of the framework agnostic,
2913 logic-free templating system Mustache.")
2914 (license license:expat)
2915 (properties `((python2-variant . ,(delay python2-pystache))))))
2916
2917 (define-public python2-pystache
2918 (package (inherit (package-with-python2
2919 (strip-python2-variant python-pystache)))
2920 (arguments
2921 `(#:python ,python-2
2922 #:phases
2923 (modify-phases %standard-phases
2924 (replace 'check
2925 (lambda _
2926 (zero? (system* "python" "test_pystache.py")))))))))
2927
2928 (define-public python-joblib
2929 (package
2930 (name "python-joblib")
2931 (version "0.10.3")
2932 (source (origin
2933 (method url-fetch)
2934 (uri (pypi-uri "joblib" version))
2935 (sha256
2936 (base32
2937 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2938 (modules '((guix build utils)))
2939 (snippet
2940 '(begin
2941 ;; Remove pre-compiled .pyc files from source.
2942 (for-each delete-file-recursively
2943 (find-files "." "__pycache__" #:directories? #t))
2944 (for-each delete-file (find-files "." "\\.pyc$"))
2945 #t))))
2946 (build-system python-build-system)
2947 (arguments
2948 `(#:phases
2949 (modify-phases %standard-phases
2950 (add-before 'check 'disable-failing-tests
2951 (lambda _
2952 ;; This numpydoc tests fails for unknown reasons
2953 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2954 ;; This numpydoc test depends on matplotlib, which is not a
2955 ;; required input.
2956 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2957 ;; These tests fail to execute sys.executable
2958 (substitute* "joblib/test/test_parallel.py"
2959 (("import nose" line)
2960 (string-append "from nose.plugins.skip import SkipTest\n" line))
2961 (("def test_nested_parallel_warnings" line)
2962 (string-append "@SkipTest\n" line))
2963 (("def test_parallel_with_interactively_defined_functions" line)
2964 (string-append "@SkipTest\n" line)))
2965 #t)))))
2966 ;; Provide nose to enable tests command
2967 (native-inputs
2968 `(("python-nose" ,python-nose)
2969 ("python-sphinx" ,python-sphinx)
2970 ("python-docutils" ,python-docutils)
2971 ("python-numpydoc" ,python-numpydoc)))
2972 (home-page "http://pythonhosted.org/joblib/")
2973 (synopsis "Using Python functions as pipeline jobs")
2974 (description
2975 "Joblib is a set of tools to provide lightweight pipelining in Python.
2976 In particular, joblib offers: transparent disk-caching of the output values
2977 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2978 logging and tracing of the execution.")
2979 (license license:bsd-3)))
2980
2981 (define-public python2-joblib
2982 (package-with-python2 python-joblib))
2983
2984 (define-public python-docutils
2985 (package
2986 (name "python-docutils")
2987 (version "0.13.1")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "docutils" version))
2992 (sha256
2993 (base32
2994 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2995 (build-system python-build-system)
2996 (arguments
2997 '(#:tests? #f)) ; no setup.py test command
2998 (home-page "http://docutils.sourceforge.net/")
2999 (synopsis "Python Documentation Utilities")
3000 (description
3001 "Docutils is a modular system for processing documentation into useful
3002 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3003 reStructuredText.")
3004 ;; Most of the source code is public domain, but some source files are
3005 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3006 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3007
3008 (define-public python2-docutils
3009 (package-with-python2 python-docutils))
3010
3011 (define-public python-pygments
3012 (package
3013 (name "python-pygments")
3014 (version "2.1.3")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "Pygments" version))
3019 (sha256
3020 (base32
3021 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3022 (build-system python-build-system)
3023 (arguments
3024 ;; FIXME: Tests require sphinx, which depends on this.
3025 '(#:tests? #f))
3026 (home-page "http://pygments.org/")
3027 (synopsis "Syntax highlighting")
3028 (description
3029 "Pygments is a syntax highlighting package written in Python.")
3030 (license license:bsd-2)))
3031
3032 (define-public python2-pygments
3033 (package-with-python2 python-pygments))
3034
3035 (define-public python-sphinx
3036 (package
3037 (name "python-sphinx")
3038 (version "1.5.1")
3039 (source
3040 (origin
3041 (method url-fetch)
3042 (uri (pypi-uri "Sphinx" version))
3043 (sha256
3044 (base32
3045 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3046 (build-system python-build-system)
3047 (arguments
3048 `(#:phases
3049 (modify-phases %standard-phases
3050 (replace 'check
3051 (lambda _
3052 ;; Requires Internet access.
3053 (delete-file "tests/test_build_linkcheck.py")
3054 (zero? (system* "make" "test")))))))
3055 (propagated-inputs
3056 `(("python-imagesize" ,python-imagesize)
3057 ("python-sphinx-alabaster-theme"
3058 ,python-sphinx-alabaster-theme)
3059 ("python-babel" ,python-babel)
3060 ("python-snowballstemmer" ,python-snowballstemmer)
3061 ("python-docutils" ,python-docutils)
3062 ("python-jinja2" ,python-jinja2)
3063 ("python-pygments" ,python-pygments)
3064 ("python-requests" ,python-requests)
3065 ("python-six" ,python-six)))
3066 (native-inputs
3067 `(("graphviz" ,graphviz)
3068 ("python-html5lib" ,python-html5lib)
3069 ("python-mock" ,python-mock)
3070 ("python-nose" ,python-nose)))
3071 (home-page "http://sphinx-doc.org/")
3072 (synopsis "Python documentation generator")
3073 (description "Sphinx is a tool that makes it easy to create documentation
3074 for Python projects or other documents consisting of multiple reStructuredText
3075 sources.")
3076 (license license:bsd-3)
3077 (properties `((python2-variant . ,(delay python2-sphinx))))))
3078
3079 (define-public python2-sphinx
3080 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3081 (package
3082 (inherit base)
3083 (native-inputs `(("python2-mock" ,python2-mock)
3084 ("python2-enum34" ,python2-enum34)
3085 ,@(package-native-inputs base)))
3086 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3087 ,@(package-propagated-inputs base))))))
3088
3089 (define-public python-sphinx-rtd-theme
3090 (package
3091 (name "python-sphinx-rtd-theme")
3092 (version "0.1.6")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (string-append "https://pypi.python.org/packages/source/s/"
3097 "sphinx_rtd_theme/sphinx_rtd_theme-"
3098 version ".tar.gz"))
3099 (sha256
3100 (base32
3101 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3102 (build-system python-build-system)
3103 (arguments '(#:tests? #f)) ; No tests.
3104 (propagated-inputs
3105 `(("python-sphinx" ,python-sphinx)))
3106 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3107 (synopsis "ReadTheDocs.org theme for Sphinx")
3108 (description "A theme for Sphinx used by ReadTheDocs.org.")
3109 (license license:expat)))
3110
3111 (define-public python2-sphinx-rtd-theme
3112 (package-with-python2 python-sphinx-rtd-theme))
3113
3114 (define-public python-rst.linker
3115 (package
3116 (name "python-rst.linker")
3117 (version "1.7")
3118 (source
3119 (origin
3120 (method url-fetch)
3121 (uri (pypi-uri "rst.linker" version))
3122 (sha256
3123 (base32
3124 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3125 (build-system python-build-system)
3126 (propagated-inputs
3127 `(("python-dateutil" ,python-dateutil)
3128 ("python-six" ,python-six)))
3129 (native-inputs
3130 `(("python-setuptools-scm" ,python-setuptools-scm)))
3131 ;; Test would require path.py, which would introduce a cyclic dependence.
3132 (arguments `(#:tests? #f))
3133 ;; Note: As of version 1.7 the documentation is not worth building.
3134 (home-page "https://github.com/jaraco/rst.linker")
3135 (synopsis "Sphinx plugin to add links and timestamps")
3136 (description "rst.linker allows to automatically replace text by a
3137 reStructuredText external reference or timestamps. It's primary purpose is to
3138 augment the changelog, but it can be used for other documents, too.")
3139 (license license:expat)))
3140
3141 (define-public python2-rst.linker
3142 (package-with-python2 python-rst.linker))
3143
3144 (define-public python-feedgenerator
3145 (package
3146 (name "python-feedgenerator")
3147 (version "1.9")
3148 (source
3149 (origin
3150 (method url-fetch)
3151 (uri (pypi-uri "feedgenerator" version))
3152 (sha256
3153 (base32
3154 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3155 (modules '((guix build utils)))
3156 (snippet
3157 '(begin
3158 ;; Remove pre-compiled .pyc files from source.
3159 (for-each delete-file-recursively
3160 (find-files "." "__pycache__" #:directories? #t))
3161 (for-each delete-file (find-files "." "\\.pyc$"))
3162 #t))))
3163 (build-system python-build-system)
3164 (propagated-inputs
3165 `(("python-pytz" ,python-pytz)
3166 ("python-six" ,python-six)))
3167 (home-page "https://github.com/getpelican/feedgenerator")
3168 (synopsis
3169 "Standalone version of Django's Atom/RSS feed generator")
3170 (description
3171 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3172 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3173 (license license:bsd-3)))
3174
3175 (define-public python2-feedgenerator
3176 (package-with-python2 python-feedgenerator))
3177
3178 (define-public python-blinker
3179 (package
3180 (name "python-blinker")
3181 (version "1.4")
3182 (source
3183 (origin
3184 (method url-fetch)
3185 (uri (pypi-uri "blinker" version))
3186 (sha256
3187 (base32
3188 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3189 (build-system python-build-system)
3190 (home-page "http://pythonhosted.org/blinker/")
3191 (synopsis "Fast, simple object-to-object and broadcast signaling")
3192 (description
3193 "Blinker provides a fast dispatching system that allows any number of
3194 interested parties to subscribe to events, or \"signals\".")
3195 (license license:expat)))
3196
3197 (define-public python2-blinker
3198 (package-with-python2 python-blinker))
3199
3200 (define-public pelican
3201 (package
3202 (name "pelican")
3203 (version "3.6.3")
3204 (source
3205 (origin
3206 (method url-fetch)
3207 (uri (pypi-uri "pelican" version))
3208 (sha256
3209 (base32
3210 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3211 (build-system python-build-system)
3212 (propagated-inputs
3213 `(("python-feedgenerator" ,python-feedgenerator)
3214 ("python-jinja2" ,python-jinja2)
3215 ("python-pygments" ,python-pygments)
3216 ("python-docutils" ,python-docutils)
3217 ("python-pytz" ,python-pytz)
3218 ("python-blinker" ,python-blinker)
3219 ("python-unidecode" ,python-unidecode)
3220 ("python-six" ,python-six)
3221 ("python-dateutil" ,python-dateutil)))
3222 (home-page "http://getpelican.com/")
3223 (arguments
3224 `(;; XXX Requires a lot more packages to do unit tests :P
3225 #:tests? #f
3226 #:phases (modify-phases %standard-phases
3227 (add-before
3228 'install 'adjust-requires
3229 ;; Since feedgenerator is installed from git, it doesn't
3230 ;; conform to the version requirements.
3231 ;;
3232 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3233 ;; version requirement so setuptools doesn't get confused.
3234 (lambda _
3235 (substitute* "setup.py"
3236 (("['\"]feedgenerator.*?['\"]")
3237 "'feedgenerator'")))))))
3238 (synopsis "Python-based static site publishing system")
3239 (description
3240 "Pelican is a tool to generate a static blog from reStructuredText,
3241 Markdown input files, and more. Pelican uses Jinja2 for templating
3242 and is very extensible.")
3243 (license license:agpl3+)))
3244
3245 (define-public python-scikit-learn
3246 (package
3247 (name "python-scikit-learn")
3248 (version "0.18.1")
3249 (source
3250 (origin
3251 (method url-fetch)
3252 (uri (string-append
3253 "https://github.com/scikit-learn/scikit-learn/archive/"
3254 version ".tar.gz"))
3255 (file-name (string-append name "-" version ".tar.gz"))
3256 (sha256
3257 (base32
3258 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3259 (build-system python-build-system)
3260 (arguments
3261 `(#:phases
3262 (modify-phases %standard-phases
3263 (delete 'check)
3264 (add-after 'install 'check
3265 ;; Running tests from the source directory requires
3266 ;; an "inplace" build with paths relative to CWD.
3267 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3268 ;; Use the installed version instead.
3269 (lambda* (#:key inputs outputs #:allow-other-keys)
3270 (add-installed-pythonpath inputs outputs)
3271 ;; some tests require access to "$HOME"
3272 (setenv "HOME" "/tmp")
3273 ;; Step out of the source directory just to be sure.
3274 (chdir "..")
3275 (zero? (system* "nosetests" "-v" "sklearn")))))))
3276 (inputs
3277 `(("openblas" ,openblas)))
3278 (native-inputs
3279 `(("python-nose" ,python-nose)
3280 ("python-cython" ,python-cython)))
3281 (propagated-inputs
3282 `(("python-numpy" ,python-numpy)
3283 ("python-scipy" ,python-scipy)))
3284 (home-page "http://scikit-learn.org/")
3285 (synopsis "Machine Learning in Python")
3286 (description
3287 "Scikit-learn provides simple and efficient tools for data
3288 mining and data analysis.")
3289 (license license:bsd-3)))
3290
3291 (define-public python2-scikit-learn
3292 (package-with-python2 python-scikit-learn))
3293
3294 (define-public python-scikit-image
3295 (package
3296 (name "python-scikit-image")
3297 (version "0.11.3")
3298 (source
3299 (origin
3300 (method url-fetch)
3301 (uri (string-append
3302 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3303 version ".tar.gz"))
3304 (sha256
3305 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3306 (build-system python-build-system)
3307 (arguments
3308 ;; TODO: Some tests require running X11 server. Disable them?
3309 '(#:tests? #f))
3310 ;; See DEPENDS.txt for the list of build and run time requiremnts
3311 (propagated-inputs
3312 `(("python-matplotlib" ,python-matplotlib)
3313 ("python-networkx" ,python-networkx)
3314 ("python-scipy" ,python-scipy)
3315 ("python-pillow" ,python-pillow)))
3316 (native-inputs
3317 `(("python-numpy" ,python-numpy)
3318 ("python-cython" ,python-cython)
3319 ("python-six" ,python-six)))
3320 (home-page "http://scikit-image.org/")
3321 (synopsis "Image processing in Python")
3322 (description
3323 "Scikit-image is a collection of algorithms for image processing.")
3324 (license license:bsd-3)))
3325
3326 (define-public python2-scikit-image
3327 (package-with-python2 python-scikit-image))
3328
3329 (define-public python-redis
3330 (package
3331 (name "python-redis")
3332 (version "2.10.5")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "redis" version))
3337 (sha256
3338 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3339 (build-system python-build-system)
3340 ;; Tests require a running Redis server
3341 (arguments '(#:tests? #f))
3342 ;; As long as we are not running test, we do not need this input :-)
3343 ;;(native-inputs
3344 ;; `(("python-pytest" ,python-pytest)))
3345 (home-page "https://github.com/andymccurdy/redis-py")
3346 (synopsis "Redis Python client")
3347 (description
3348 "This package provides a Python interface to the Redis key-value store.")
3349 (license license:expat)))
3350
3351 (define-public python2-redis
3352 (package-with-python2 python-redis))
3353
3354 (define-public python-rq
3355 (package
3356 (name "python-rq")
3357 (version "0.5.2")
3358 (source
3359 (origin
3360 (method url-fetch)
3361 (uri (string-append
3362 "https://pypi.python.org/packages/source/r/rq/rq-"
3363 version ".tar.gz"))
3364 (sha256
3365 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3366 (build-system python-build-system)
3367 (propagated-inputs
3368 `(("python-click" ,python-click)
3369 ("python-redis" ,python-redis)))
3370 (home-page "http://python-rq.org/")
3371 (synopsis "Simple job queues for Python")
3372 (description
3373 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3374 processing them in the background with workers. It is backed by Redis and it
3375 is designed to have a low barrier to entry.")
3376 (license license:bsd-2)))
3377
3378 (define-public python2-rq
3379 (package-with-python2 python-rq))
3380
3381 (define-public python-cython
3382 (package
3383 (name "python-cython")
3384 (version "0.24.1")
3385 (source
3386 (origin
3387 (method url-fetch)
3388 (uri (pypi-uri "Cython" version))
3389 (sha256
3390 (base32
3391 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3392 (build-system python-build-system)
3393 ;; we need the full python package and not just the python-wrapper
3394 ;; because we need libpython3.3m.so
3395 (inputs
3396 `(("python" ,python)))
3397 (arguments
3398 `(#:phases
3399 (modify-phases %standard-phases
3400 (add-before 'check 'set-HOME
3401 ;; some tests require access to "$HOME/.cython"
3402 (lambda _ (setenv "HOME" "/tmp")))
3403 (replace 'check
3404 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3405 (home-page "http://cython.org/")
3406 (synopsis "C extensions for Python")
3407 (description "Cython is an optimising static compiler for both the Python
3408 programming language and the extended Cython programming language. It makes
3409 writing C extensions for Python as easy as Python itself.")
3410 (license license:asl2.0)
3411 (properties `((python2-variant . ,(delay python2-cython))))))
3412
3413 (define-public python2-cython
3414 (package (inherit (package-with-python2
3415 (strip-python2-variant python-cython)))
3416 (name "python2-cython")
3417 (inputs
3418 `(("python-2" ,python-2))))) ; this is not automatically changed
3419
3420 ;; The RPython toolchain currently does not support Python 3.
3421 (define-public python2-rpython
3422 (package
3423 (name "python2-rpython")
3424 (version "0.1.4")
3425 (source
3426 (origin
3427 (method url-fetch)
3428 (uri (pypi-uri "rpython" version))
3429 (sha256
3430 (base32
3431 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3432 (build-system python-build-system)
3433 (arguments `(#:python ,python-2))
3434 (native-inputs
3435 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3436 (home-page "https://rpython.readthedocs.org")
3437 (synopsis "Framework for implementing interpreters and virtual machines")
3438 (description "RPython is a translation and support framework for
3439 producing implementations of dynamic languages, emphasizing a clean separation
3440 between language specification and implementation aspects.")
3441 (license license:expat)))
3442
3443 (define-public python-numpy
3444 (package
3445 (name "python-numpy")
3446 (version "1.12.0")
3447 (source
3448 (origin
3449 (method url-fetch)
3450 (uri (string-append
3451 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3452 (file-name (string-append name "-" version ".tar.gz"))
3453 (sha256
3454 (base32
3455 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3456 (build-system python-build-system)
3457 (inputs
3458 `(("openblas" ,openblas)
3459 ("lapack" ,lapack)))
3460 (native-inputs
3461 `(("python-cython" ,python-cython)
3462 ("python-nose" ,python-nose)
3463 ("gfortran" ,gfortran)))
3464 (arguments
3465 `(#:phases
3466 (modify-phases %standard-phases
3467 (add-before 'build 'set-environment-variables
3468 (lambda* (#:key inputs #:allow-other-keys)
3469 (call-with-output-file "site.cfg"
3470 (lambda (port)
3471 (format port
3472 "[openblas]
3473 libraries = openblas
3474 library_dirs = ~a/lib
3475 include_dirs = ~a/include
3476
3477 # backslash-n to make emacs happy
3478 \n[lapack]
3479 lapack_libs = lapack
3480 library_dirs = ~a/lib
3481 include_dirs = ~a/include
3482 "
3483 (assoc-ref inputs "openblas")
3484 (assoc-ref inputs "openblas")
3485 (assoc-ref inputs "lapack")
3486 (assoc-ref inputs "lapack"))))
3487 ;; Use "gcc" executable, not "cc".
3488 (substitute* "numpy/distutils/system_info.py"
3489 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3490 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3491 #t))
3492 ;; Tests can only be run after the library has been installed and not
3493 ;; within the source directory.
3494 (delete 'check)
3495 (add-after 'install 'check
3496 (lambda* (#:key outputs inputs #:allow-other-keys)
3497 ;; Make installed package available for running the tests
3498 (add-installed-pythonpath inputs outputs)
3499 (with-directory-excursion "/tmp"
3500 (zero? (system* "python" "-c"
3501 "import numpy; numpy.test(verbose=2)"))))))))
3502 (home-page "http://www.numpy.org/")
3503 (synopsis "Fundamental package for scientific computing with Python")
3504 (description "NumPy is the fundamental package for scientific computing
3505 with Python. It contains among other things: a powerful N-dimensional array
3506 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3507 and Fortran code, useful linear algebra, Fourier transform, and random number
3508 capabilities.")
3509 (license license:bsd-3)))
3510
3511 (define-public python2-numpy
3512 (package-with-python2 python-numpy))
3513
3514 (define-public python-munch
3515 (package
3516 (name "python-munch")
3517 (version "2.0.4")
3518 (source
3519 (origin
3520 (method url-fetch)
3521 (uri (pypi-uri "munch" version))
3522 (sha256
3523 (base32
3524 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3525 (build-system python-build-system)
3526 (home-page "https://github.com/Infinidat/munch")
3527 (synopsis "Dot-accessible dictionary")
3528 (description "Munch is a dot-accessible dictionary similar to JavaScript
3529 objects.")
3530 (license license:expat)))
3531
3532 (define-public python2-munch
3533 (package-with-python2 python-munch))
3534
3535 (define-public python2-fastlmm
3536 (package
3537 (name "python2-fastlmm")
3538 (version "0.2.21")
3539 (source
3540 (origin
3541 (method url-fetch)
3542 (uri (pypi-uri "fastlmm" version ".zip"))
3543 (sha256
3544 (base32
3545 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3546 (build-system python-build-system)
3547 (arguments
3548 `(#:python ,python-2)) ; only Python 2.7 is supported
3549 (propagated-inputs
3550 `(("python2-numpy" ,python2-numpy)
3551 ("python2-scipy" ,python2-scipy)
3552 ("python2-matplotlib" ,python2-matplotlib)
3553 ("python2-pandas" ,python2-pandas)
3554 ("python2-scikit-learn" ,python2-scikit-learn)
3555 ("python2-pysnptools" ,python2-pysnptools)))
3556 (native-inputs
3557 `(("unzip" ,unzip)
3558 ("python2-cython" ,python2-cython)
3559 ("python2-mock" ,python2-mock)
3560 ("python2-nose" ,python2-nose)))
3561 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3562 (synopsis "Perform genome-wide association studies on large data sets")
3563 (description
3564 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3565 Models, is a program for performing both single-SNP and SNP-set genome-wide
3566 association studies (GWAS) on extremely large data sets.")
3567 (license license:asl2.0)))
3568
3569 (define-public python-numpy-documentation
3570 (package
3571 (name "python-numpy-documentation")
3572 (version (package-version python-numpy))
3573 (source (package-source python-numpy))
3574 (build-system python-build-system)
3575 (native-inputs
3576 `(("python-matplotlib" ,python-matplotlib)
3577 ("python-numpy" ,python-numpy)
3578 ("pkg-config" ,pkg-config)
3579 ("python-sphinx" ,python-sphinx)
3580 ("python-numpydoc" ,python-numpydoc)
3581 ("texlive" ,texlive)
3582 ("texinfo" ,texinfo)
3583 ("perl" ,perl)
3584 ("scipy-sphinx-theme"
3585 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3586 (method git-fetch)
3587 (uri (git-reference
3588 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3589 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3590 (sha256
3591 (base32
3592 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3593 ,@(package-native-inputs python-numpy)))
3594 (arguments
3595 `(#:tests? #f ; we're only generating the documentation
3596 #:phases
3597 (modify-phases %standard-phases
3598 (delete 'build)
3599 (replace 'install
3600 (lambda* (#:key inputs outputs #:allow-other-keys)
3601 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3602 (doc (string-append
3603 data "/doc/" ,name "-"
3604 ,(package-version python-numpy)))
3605 (info-reader (string-append data "/info"))
3606 (html (string-append doc "/html"))
3607 (scipy-sphinx-theme "scipy-sphinx-theme")
3608 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3609 (pyver ,(string-append "PYVER=")))
3610 (with-directory-excursion "doc"
3611 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3612 (mkdir-p html)
3613 (system* "make" "html" pyver)
3614 (system* "make" "latex" "PAPER=a4" pyver)
3615 (system* "make" "-C" "build/latex"
3616 "all-pdf" "PAPER=a4" pyver)
3617 ;; FIXME: Generation of the info file fails.
3618 ;; (system* "make" "info" pyver)
3619 ;; (mkdir-p info)
3620 ;; (copy-file "build/texinfo/numpy.info"
3621 ;; (string-append info "/numpy.info"))
3622 (for-each (lambda (file)
3623 (copy-file (string-append "build/latex" file)
3624 (string-append doc file)))
3625 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3626 (with-directory-excursion "build/html"
3627 (for-each (lambda (file)
3628 (let* ((dir (dirname file))
3629 (tgt-dir (string-append html "/" dir)))
3630 (unless (equal? "." dir)
3631 (mkdir-p tgt-dir))
3632 (install-file file html)))
3633 (find-files "." ".*")))))
3634 #t)))))
3635 (home-page (package-home-page python-numpy))
3636 (synopsis "Documentation for the python-numpy package")
3637 (description (package-description python-numpy))
3638 (license (package-license python-numpy))))
3639
3640 (define-public python2-numpy-documentation
3641 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3642 (package
3643 (inherit numpy-documentation)
3644 (native-inputs `(("python2-functools32" ,python2-functools32)
3645 ,@(package-native-inputs numpy-documentation))))))
3646
3647 (define-public python-pygit2
3648 (package
3649 (name "python-pygit2")
3650 (version "0.25.0")
3651 (source
3652 (origin
3653 (method url-fetch)
3654 (uri (pypi-uri "pygit2" version))
3655 (sha256
3656 (base32
3657 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3658 (patches
3659 (search-patches "python-pygit2-disable-network-tests.patch"))))
3660 (build-system python-build-system)
3661 (propagated-inputs
3662 `(("python-six" ,python-six)
3663 ("python-cffi" ,python-cffi)
3664 ("libgit2" ,libgit2)
3665 ("python-tox" ,python-tox)))
3666 (home-page "https://github.com/libgit2/pygit2")
3667 (synopsis "Python bindings for libgit2")
3668 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3669 library, libgit2 implements Git plumbing.")
3670 ;; GPL2.0 only, with linking exception.
3671 (license license:gpl2)))
3672
3673 (define-public python2-pygit2
3674 (package-with-python2 python-pygit2))
3675
3676 (define-public python-pyparsing
3677 (package
3678 (name "python-pyparsing")
3679 (version "2.0.3")
3680 (source
3681 (origin
3682 (method url-fetch)
3683 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3684 "/pyparsing-" version
3685 "/pyparsing-" version ".tar.gz"))
3686 (sha256
3687 (base32
3688 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3689 (build-system python-build-system)
3690 (outputs '("out" "doc"))
3691 (arguments
3692 `(#:tests? #f ; no test target
3693 #:modules ((guix build python-build-system)
3694 (guix build utils))
3695 #:phases
3696 (alist-cons-after
3697 'install 'install-doc
3698 (lambda* (#:key outputs #:allow-other-keys)
3699 (let* ((doc (string-append (assoc-ref outputs "doc")
3700 "/share/doc/" ,name "-" ,version))
3701 (html-doc (string-append doc "/html"))
3702 (examples (string-append doc "/examples")))
3703 (mkdir-p html-doc)
3704 (mkdir-p examples)
3705 (for-each
3706 (lambda (dir tgt)
3707 (map (lambda (file)
3708 (install-file file tgt))
3709 (find-files dir ".*")))
3710 (list "docs" "htmldoc" "examples")
3711 (list doc html-doc examples))))
3712 %standard-phases)))
3713 (home-page "http://pyparsing.wikispaces.com")
3714 (synopsis "Python parsing class library")
3715 (description
3716 "The pyparsing module is an alternative approach to creating and
3717 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3718 of regular expressions. The pyparsing module provides a library of classes
3719 that client code uses to construct the grammar directly in Python code.")
3720 (license license:expat)))
3721
3722 (define-public python2-pyparsing
3723 (package-with-python2 python-pyparsing))
3724
3725 (define-public python-numpydoc
3726 (package
3727 (name "python-numpydoc")
3728 (version "0.5")
3729 (source
3730 (origin
3731 (method url-fetch)
3732 (uri (string-append
3733 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3734 version ".tar.gz"))
3735 (sha256
3736 (base32
3737 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3738 (modules '((guix build utils)))
3739 (snippet
3740 '(begin
3741 ;; Drop a test requiring matplotlib, which we cannot add as an
3742 ;; input since it would create a circular dependency: Extend the
3743 ;; test for Python 3, where it is already dropped, to Python 2.
3744 (substitute* "numpydoc/tests/test_plot_directive.py"
3745 (("3") "2"))))))
3746 (build-system python-build-system)
3747 (propagated-inputs
3748 `(("python-sphinx" ,python-sphinx)))
3749 (native-inputs
3750 `(("python-nose" ,python-nose)))
3751 (home-page "https://pypi.python.org/pypi/numpydoc")
3752 (synopsis
3753 "Numpy's Sphinx extensions")
3754 (description
3755 "Sphinx extension to support docstrings in Numpy format.")
3756 (license license:bsd-2)))
3757
3758 (define-public python2-numpydoc
3759 (package-with-python2 python-numpydoc))
3760
3761 (define-public python-numexpr
3762 (package
3763 (name "python-numexpr")
3764 (version "2.6.1")
3765 (source
3766 (origin
3767 (method url-fetch)
3768 (uri (pypi-uri "numexpr" version))
3769 (sha256
3770 (base32
3771 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3772 (build-system python-build-system)
3773 (arguments `(#:tests? #f)) ; no tests included
3774 (propagated-inputs
3775 `(("python-numpy" ,python-numpy)))
3776 (home-page "https://github.com/pydata/numexpr")
3777 (synopsis "Fast numerical expression evaluator for NumPy")
3778 (description
3779 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3780 expressions that operate on arrays are accelerated and use less memory than
3781 doing the same calculation in Python. In addition, its multi-threaded
3782 capabilities can make use of all your cores, which may accelerate
3783 computations, most specially if they are not memory-bounded (e.g. those using
3784 transcendental functions).")
3785 (license license:expat)))
3786
3787 (define-public python2-numexpr
3788 (package-with-python2 python-numexpr))
3789
3790 (define-public python-cycler
3791 (package
3792 (name "python-cycler")
3793 (version "0.10.0")
3794 (source (origin
3795 (method url-fetch)
3796 (uri (pypi-uri "cycler" version))
3797 (sha256
3798 (base32
3799 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3800 (build-system python-build-system)
3801 (arguments
3802 ;; XXX: The current version requires 'coveralls' which we don't have.
3803 ;; Enable this for the next release which uses 'python-pytest'.
3804 '(#:tests? #f))
3805 (propagated-inputs
3806 `(("python-six" ,python-six)))
3807 (home-page "http://matplotlib.org/cycler/")
3808 (synopsis "Composable keyword argument iterator")
3809 (description
3810 "When using @code{matplotlib} and plotting more than one line, it is
3811 common to want to be able to want to be able to cycle over one or more artist
3812 styles; but the plotting logic can quickly become involved.
3813 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3814 @code{Cycler} class was developed.")
3815 (license license:bsd-3)))
3816
3817 (define-public python2-cycler
3818 (package-with-python2 python-cycler))
3819
3820 (define-public python-colorspacious
3821 (package
3822 (name "python-colorspacious")
3823 (version "1.1.0")
3824 (source
3825 (origin
3826 (method url-fetch)
3827 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3828 version ".tar.gz"))
3829 (file-name (string-append name "-" version))
3830 (sha256
3831 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3832 (build-system python-build-system)
3833 (propagated-inputs
3834 `(("python-numpy" ,python-numpy)))
3835 (native-inputs
3836 `(("python-nose" ,python-nose)))
3837 (arguments
3838 `(#:phases
3839 (modify-phases %standard-phases
3840 (replace 'check
3841 (lambda _
3842 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3843 (home-page "https://github.com/njsmith/colorspacious")
3844 (synopsis "Python library for colorspace conversions")
3845 (description "@code{colorspacious} is a Python library that lets you
3846 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3847 (license license:expat)))
3848
3849 (define-public python2-colorspacious
3850 (package-with-python2 python-colorspacious))
3851
3852 (define-public python-matplotlib
3853 (package
3854 (name "python-matplotlib")
3855 (version "2.0.0")
3856 (source
3857 (origin
3858 (method url-fetch)
3859 (uri (string-append
3860 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3861 (file-name (string-append name "-" version ".tar.gz"))
3862 (sha256
3863 (base32
3864 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3865 (build-system python-build-system)
3866 (propagated-inputs ; the following packages are all needed at run time
3867 `(("python-cycler" ,python-cycler)
3868 ("python-pyparsing" ,python-pyparsing)
3869 ("python-pygobject" ,python-pygobject)
3870 ("gobject-introspection" ,gobject-introspection)
3871 ("python-tkinter" ,python "tk")
3872 ("python-dateutil" ,python-dateutil)
3873 ("python-numpy" ,python-numpy)
3874 ("python-pillow" ,python-pillow)
3875 ("python-pytz" ,python-pytz)
3876 ("python-six" ,python-six)
3877 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3878 ;; from 'gtk+') provides the required 'typelib' files used by
3879 ;; 'gobject-introspection'. The location of these files is set with the
3880 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3881 ;; is done automatically by a 'native-search-path' procedure. However,
3882 ;; at run-time the user must set this variable as follows:
3883 ;;
3884 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3885 ("gtk+" ,gtk+)
3886 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3887 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3888 ;; object. For this reason we need to import both libraries.
3889 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3890 ("python-pycairo" ,python-pycairo)
3891 ("python-cairocffi" ,python-cairocffi)))
3892 (inputs
3893 `(("libpng" ,libpng)
3894 ("imagemagick" ,imagemagick)
3895 ("freetype" ,freetype)
3896 ("cairo" ,cairo)
3897 ("glib" ,glib)
3898 ;; FIXME: Add backends when available.
3899 ;("python-wxpython" ,python-wxpython)
3900 ("python-pyqt" ,python-pyqt)
3901 ("tcl" ,tcl)
3902 ("tk" ,tk)))
3903 (native-inputs
3904 `(("pkg-config" ,pkg-config)
3905 ("python-nose" ,python-nose)
3906 ("python-mock" ,python-mock)))
3907 (arguments
3908 `(#:phases
3909 (modify-phases %standard-phases
3910 (add-before 'build 'configure-environment
3911 (lambda* (#:key outputs inputs #:allow-other-keys)
3912 (let ((cairo (assoc-ref inputs "cairo"))
3913 (gtk+ (assoc-ref inputs "gtk+")))
3914 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3915 ;; has not effect.
3916 (setenv "LD_LIBRARY_PATH"
3917 (string-append cairo "/lib:" gtk+ "/lib"))
3918 (setenv "HOME" (getcwd))
3919 (call-with-output-file "setup.cfg"
3920 (lambda (port)
3921 (format port "[directories]~%
3922 basedirlist = ~a,~a~%
3923 [rc_options]~%
3924 backend = TkAgg~%"
3925 (assoc-ref inputs "tcl")
3926 (assoc-ref inputs "tk")))))
3927 #t)))))
3928 (home-page "http://matplotlib.org")
3929 (synopsis "2D plotting library for Python")
3930 (description
3931 "Matplotlib is a Python 2D plotting library which produces publication
3932 quality figures in a variety of hardcopy formats and interactive environments
3933 across platforms. Matplotlib can be used in Python scripts, the python and
3934 ipython shell, web application servers, and six graphical user interface
3935 toolkits.")
3936 (license license:psfl)
3937 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3938
3939 (define-public python2-matplotlib
3940 (let ((matplotlib (package-with-python2
3941 (strip-python2-variant python-matplotlib))))
3942 (package (inherit matplotlib)
3943 ;; Make sure to use special packages for Python 2 instead
3944 ;; of those automatically rewritten by package-with-python2.
3945 (propagated-inputs
3946 `(("python2-pycairo" ,python2-pycairo)
3947 ("python2-functools32" ,python2-functools32)
3948 ("python2-pygobject-2" ,python2-pygobject-2)
3949 ("python2-subprocess32" ,python2-subprocess32)
3950 ("python2-tkinter" ,python-2 "tk")
3951 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3952 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3953
3954 (define-public python-matplotlib-documentation
3955 (package
3956 (name "python-matplotlib-documentation")
3957 (version (package-version python-matplotlib))
3958 (source (package-source python-matplotlib))
3959 (build-system python-build-system)
3960 (native-inputs
3961 `(("python-matplotlib" ,python-matplotlib)
3962 ("python-colorspacious" ,python-colorspacious)
3963 ("python-sphinx" ,python-sphinx)
3964 ("python-numpydoc" ,python-numpydoc)
3965 ("python-ipython" ,python-ipython)
3966 ("python-mock" ,python-mock)
3967 ("graphviz" ,graphviz)
3968 ("texlive" ,texlive)
3969 ("texinfo" ,texinfo)
3970 ,@(package-native-inputs python-matplotlib)))
3971 (arguments
3972 `(#:tests? #f ; we're only generating documentation
3973 #:phases
3974 (modify-phases %standard-phases
3975 (replace 'build
3976 (lambda _
3977 (chdir "doc")
3978 ;; Produce pdf in 'A4' format.
3979 (substitute* "conf.py"
3980 (("latex_paper_size = 'letter'") "")
3981 ;; latex_paper_size is deprecated -> set paper size using
3982 ;; latex_elements
3983 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3984 ;; insert at a point where latex_elements{} is defined:
3985 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3986 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3987 (replace 'install
3988 (lambda* (#:key inputs outputs #:allow-other-keys)
3989 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3990 (doc (string-append data "/doc/python-matplotlib-" ,version))
3991 (info (string-append data "/info"))
3992 (html (string-append doc "/html")))
3993 (mkdir-p html)
3994 (mkdir-p info)
3995 (copy-recursively "build/html" html)
3996 (symlink (string-append html "/_images")
3997 (string-append info "/matplotlib-figures"))
3998 (with-directory-excursion "build/texinfo"
3999 (substitute* "matplotlib.texi"
4000 (("@image\\{([^,]*)" all file)
4001 (string-append "@image{matplotlib-figures/" file)))
4002 (symlink (string-append html "/_images")
4003 "./matplotlib-figures")
4004 (system* "makeinfo" "--no-split"
4005 "-o" "matplotlib.info" "matplotlib.texi"))
4006 (copy-file "build/texinfo/matplotlib.info"
4007 (string-append info "/matplotlib.info"))
4008 (copy-file "build/latex/Matplotlib.pdf"
4009 (string-append doc "/Matplotlib.pdf")))
4010 #t)))))
4011 (home-page (package-home-page python-matplotlib))
4012 (synopsis "Documentation for the python-matplotlib package")
4013 (description (package-description python-matplotlib))
4014 (license (package-license python-matplotlib))))
4015
4016 (define-public python2-matplotlib-documentation
4017 (package-with-python2 python-matplotlib-documentation))
4018
4019 (define-public python2-pysnptools
4020 (package
4021 (name "python2-pysnptools")
4022 (version "0.3.9")
4023 (source
4024 (origin
4025 (method url-fetch)
4026 (uri (pypi-uri "pysnptools" version ".zip"))
4027 (sha256
4028 (base32
4029 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4030 (build-system python-build-system)
4031 (arguments
4032 `(#:python ,python-2)) ; only Python 2.7 is supported
4033 (propagated-inputs
4034 `(("python2-numpy" ,python2-numpy)
4035 ("python2-scipy" ,python2-scipy)
4036 ("python2-pandas" ,python2-pandas)))
4037 (native-inputs
4038 `(("python2-cython" ,python2-cython)))
4039 (native-inputs
4040 `(("unzip" ,unzip)))
4041 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4042 (synopsis "Library for reading and manipulating genetic data")
4043 (description
4044 "PySnpTools is a library for reading and manipulating genetic data. It
4045 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4046 those files. It can also efficiently manipulate ranges of integers using set
4047 operators such as union, intersection, and difference.")
4048 (license license:asl2.0)))
4049
4050 (define-public python-rpy2
4051 (package
4052 (name "python-rpy2")
4053 (version "2.7.6")
4054 (source
4055 (origin
4056 (method url-fetch)
4057 (uri (pypi-uri "rpy2" version))
4058 (sha256
4059 (base32
4060 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4061 (build-system python-build-system)
4062 (arguments
4063 '(#:phases
4064 (modify-phases %standard-phases
4065 (delete 'check)
4066 (add-after 'install 'check
4067 (lambda* (#:key outputs inputs #:allow-other-keys)
4068 ;; It's easier to run tests after install.
4069 ;; Make installed package available for running the tests
4070 (add-installed-pythonpath inputs outputs)
4071 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4072 (propagated-inputs
4073 `(("python-six" ,python-six)))
4074 (inputs
4075 `(("readline" ,readline)
4076 ("icu4c" ,icu4c)
4077 ("pcre" ,pcre)
4078 ("r-minimal" ,r-minimal)
4079 ("r-survival" ,r-survival)))
4080 (native-inputs
4081 `(("zlib" ,zlib)))
4082 (home-page "http://rpy.sourceforge.net/")
4083 (synopsis "Python interface to the R language")
4084 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4085 low-level interface to R from Python, a proposed high-level interface,
4086 including wrappers to graphical libraries, as well as R-like structures and
4087 functions.")
4088 (license license:gpl3+)))
4089
4090 (define-public python2-rpy2
4091 (let ((rpy2 (package-with-python2 python-rpy2)))
4092 (package (inherit rpy2)
4093 (propagated-inputs
4094 `(("python2-singledispatch" ,python2-singledispatch)
4095 ,@(package-propagated-inputs rpy2))))))
4096
4097 (define-public python-scipy
4098 (package
4099 (name "python-scipy")
4100 (version "0.18.1")
4101 (source
4102 (origin
4103 (method url-fetch)
4104 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4105 version ".tar.gz"))
4106 (file-name (string-append name "-" version ".tar.gz"))
4107 (sha256
4108 (base32
4109 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4110 (build-system python-build-system)
4111 (propagated-inputs
4112 `(("python-numpy" ,python-numpy)
4113 ("python-matplotlib" ,python-matplotlib)
4114 ("python-pyparsing" ,python-pyparsing)))
4115 (inputs
4116 `(("lapack" ,lapack)
4117 ("openblas" ,openblas)))
4118 (native-inputs
4119 `(("python-cython" ,python-cython)
4120 ("python-nose" ,python-nose)
4121 ("python-sphinx" ,python-sphinx)
4122 ("python-numpydoc" ,python-numpydoc)
4123 ("gfortran" ,gfortran)
4124 ("perl" ,perl)))
4125 (outputs '("out" "doc"))
4126 (arguments
4127 `(#:phases
4128 (modify-phases %standard-phases
4129 (add-before 'build 'configure-openblas
4130 (lambda* (#:key inputs #:allow-other-keys)
4131 (call-with-output-file "site.cfg"
4132 (lambda (port)
4133 (format port
4134 "[blas]
4135 libraries = openblas
4136 library_dirs = ~a/lib
4137 include_dirs = ~a/include
4138
4139 # backslash-n to make emacs happy
4140 \n[atlas]
4141 library_dirs = ~a/lib
4142 atlas_libs = openblas
4143 "
4144 (assoc-ref inputs "openblas")
4145 (assoc-ref inputs "openblas")
4146 (assoc-ref inputs "openblas"))))
4147 #t))
4148 (add-after 'install 'install-doc
4149 (lambda* (#:key inputs outputs #:allow-other-keys)
4150 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4151 (doc (string-append data "/doc/" ,name "-" ,version))
4152 (html (string-append doc "/html"))
4153 (pyver ,(string-append "PYVER=")))
4154 ;; Make installed package available for building the
4155 ;; documentation
4156 (add-installed-pythonpath inputs outputs)
4157 (with-directory-excursion "doc"
4158 ;; Fix generation of images for mathematical expressions.
4159 (substitute* (find-files "source" "conf\\.py")
4160 (("pngmath_use_preview = True")
4161 "pngmath_use_preview = False"))
4162 (mkdir-p html)
4163 (system* "make" "html" pyver)
4164 (with-directory-excursion "build/html"
4165 (for-each (lambda (file)
4166 (let* ((dir (dirname file))
4167 (tgt-dir (string-append html "/" dir)))
4168 (install-file file html)))
4169 (find-files "." ".*")))))
4170 #t))
4171 (add-after 'unpack 'fix-tests
4172 (lambda _
4173 (substitute* "scipy/integrate/tests/test_quadpack.py"
4174 (("libm.so") "libm.so.6"))
4175 #t))
4176 ;; Tests can only be run after the library has been installed and not
4177 ;; within the source directory.
4178 (delete 'check)
4179 (add-after 'install 'check
4180 (lambda* (#:key inputs outputs #:allow-other-keys)
4181 (add-installed-pythonpath inputs outputs)
4182 (with-directory-excursion "/tmp"
4183 (zero? (system* "python" "-c"
4184 "import scipy; scipy.test('full')")))
4185 #t)))))
4186 (home-page "http://www.scipy.org/")
4187 (synopsis "The Scipy library provides efficient numerical routines")
4188 (description "The SciPy library is one of the core packages that make up
4189 the SciPy stack. It provides many user-friendly and efficient numerical
4190 routines such as routines for numerical integration and optimization.")
4191 (properties `((python2-variant . ,(delay python2-scipy))))
4192 (license license:bsd-3)))
4193
4194 (define-public python2-scipy
4195 (package-with-python2
4196 (strip-python2-variant python-scipy)))
4197
4198 (define-public python-socksipy-branch
4199 (package
4200 (name "python-socksipy-branch")
4201 (version "1.01")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (pypi-uri "SocksiPy-branch" version))
4206 (sha256
4207 (base32
4208 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4209 (build-system python-build-system)
4210 (arguments
4211 `(#:tests? #f)) ; There are no tests
4212 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4213 (synopsis "Python SOCKS module")
4214 (description
4215 "SocksiPy - A Python SOCKS client module. It provides a
4216 socket-like interface that supports connections to any TCP
4217 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4218 The original version was developed by Dan Haim, this is a
4219 branch created by Mario Vilas to address some open issues,
4220 as the original project seems to have been abandoned circa 2007.")
4221 (license license:bsd-3)))
4222
4223 (define-public python2-socksipy-branch
4224 (package-with-python2 python-socksipy-branch))
4225
4226 (define-public python-sqlalchemy
4227 (package
4228 (name "python-sqlalchemy")
4229 (version "1.0.12")
4230 (source
4231 (origin
4232 (method url-fetch)
4233 (uri (string-append "https://pypi.python.org/packages/source/S/"
4234 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4235 (sha256
4236 (base32
4237 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4238 (build-system python-build-system)
4239 (native-inputs
4240 `(("python-cython" ,python-cython) ;for c extensions
4241 ("python-pytest" ,python-pytest)
4242 ("python-mock" ,python-mock))) ;for tests
4243 (arguments
4244 `(#:phases (alist-replace
4245 'check
4246 (lambda _ (zero? (system* "py.test")))
4247 %standard-phases)))
4248 (home-page "http://www.sqlalchemy.org")
4249 (synopsis "Database abstraction library")
4250 (description
4251 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4252 gives application developers the full power and flexibility of SQL. It
4253 provides a full suite of well known enterprise-level persistence patterns,
4254 designed for efficient and high-performing database access, adapted into a
4255 simple and Pythonic domain language.")
4256 (license license:x11)))
4257
4258 (define-public python2-sqlalchemy
4259 (package-with-python2 python-sqlalchemy))
4260
4261 (define-public python-pycodestyle
4262 (package
4263 (name "python-pycodestyle")
4264 (version "2.0.0")
4265 (source
4266 (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "pycodestyle" version))
4269 (sha256
4270 (base32
4271 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4272 (build-system python-build-system)
4273 (home-page "https://pycodestyle.readthedocs.io/")
4274 (synopsis "Python style guide checker")
4275 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4276 Python code against some of the style conventions in
4277 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4278 (license license:expat)))
4279
4280 (define-public python2-pycodestyle
4281 (package-with-python2 python-pycodestyle))
4282
4283 (define-public python-orderedmultidict
4284 (package
4285 (name "python-orderedmultidict")
4286 (version "0.7.11")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "orderedmultidict" version))
4291 (sha256
4292 (base32
4293 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4294 (build-system python-build-system)
4295 (arguments
4296 `(#:phases
4297 (modify-phases %standard-phases
4298 (add-after 'unpack 'fix-tests
4299 (lambda _
4300 ;; The package uses nosetest for running the tests.
4301 ;; Adding this initfile allows to run the test suite
4302 ;; without requiring nosetest.
4303 (zero? (system* "touch" "tests/__init__.py")))))))
4304 (propagated-inputs
4305 `(("python-six" ,python-six)))
4306 (native-inputs
4307 `(("python-pycodestyle" ,python-pycodestyle)))
4308 (home-page "https://github.com/gruns/orderedmultidict")
4309 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4310 (description "This package contains a library for ordered multivalue
4311 dictionaries. A multivalue dictionary is a dictionary that can store
4312 multiple values for the same key. An ordered multivalue dictionary is a
4313 multivalue dictionary that retains the order of insertions and deletions.")
4314 (license license:unlicense)))
4315
4316 (define-public python2-orderedmultidict
4317 (package-with-python2 python-orderedmultidict))
4318
4319 (define-public python-furl
4320 (package
4321 (name "python-furl")
4322 (version "0.5.6")
4323 (source
4324 (origin
4325 (method url-fetch)
4326 (uri (pypi-uri "furl" version))
4327 (sha256
4328 (base32
4329 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4330 (build-system python-build-system)
4331 (propagated-inputs
4332 `(("python-six" ,python-six)
4333 ("python-orderedmultidict" ,python-orderedmultidict)))
4334 (native-inputs
4335 `(("python-pycodestyle" ,python-pycodestyle)))
4336 (home-page "https://github.com/gruns/furl")
4337 (synopsis "URL manipulation in Python")
4338 (description "Furl provides an easy-to-use alternative to the
4339 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4340 (license license:unlicense)))
4341
4342 (define-public python2-furl
4343 (package-with-python2 python-furl))
4344
4345 (define-public python-flask-babel
4346 (package
4347 (name "python-flask-babel")
4348 (version "0.11.1")
4349 (source
4350 (origin
4351 (method url-fetch)
4352 (uri (pypi-uri "Flask-Babel" version))
4353 (sha256
4354 (base32
4355 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4356 (build-system python-build-system)
4357 (propagated-inputs
4358 `(("python-flask" ,python-flask)
4359 ("python-babel" ,python-babel)
4360 ("python-jinja2" ,python-jinja2)
4361 ("python-pytz" ,python-pytz)))
4362 (home-page "https://github.com/python-babel/flask-babel")
4363 (synopsis "Add i18n/l10n support to Flask applications")
4364 (description "This package implements internationalization and localization
4365 support for Flask. This is based on the Python babel module as well as pytz -
4366 both of which are installed automatically if you install this library.")
4367 (license license:bsd-3)))
4368
4369 (define-public python2-flask-babel
4370 (package-with-python2 python-flask-babel))
4371
4372 (define-public python-sqlalchemy-utils
4373 (package
4374 (name "python-sqlalchemy-utils")
4375 (version "0.32.13")
4376 (source
4377 (origin
4378 (method url-fetch)
4379 (uri (pypi-uri "SQLAlchemy-Utils" version))
4380 (sha256
4381 (base32
4382 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4383 (build-system python-build-system)
4384 (arguments
4385 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4386 ;; #:phases
4387 ;; (modify-phases %standard-phases
4388 ;; (replace 'check
4389 ;; (lambda _
4390 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4391 (propagated-inputs
4392 `(("python-six" ,python-six)
4393 ("python-sqlalchemy" ,python-sqlalchemy)))
4394 (native-inputs
4395 `(("python-dateutil" ,python-dateutil)
4396 ("python-flexmock" ,python-flexmock)
4397 ("python-psycopg2" ,python-psycopg2)
4398 ("python-pytest" ,python-pytest)
4399 ("python-pytz" ,python-pytz)))
4400 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4401 (synopsis "Various utility functions for SQLAlchemy")
4402 (description
4403 "SQLAlchemy-utils provides various utility functions and custom data types
4404 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4405
4406 You might also want to install the following optional dependencies:
4407 @enumerate
4408 @item @code{python-passlib}
4409 @item @code{python-babel}
4410 @item @code{python-cryptography}
4411 @item @code{python-pytz}
4412 @item @code{python-psycopg2}
4413 @item @code{python-furl}
4414 @item @code{python-flask-babel}
4415 @end enumerate
4416 ")
4417 (license license:bsd-3)))
4418
4419 (define-public python2-sqlalchemy-utils
4420 (package-with-python2 python-sqlalchemy-utils))
4421
4422 (define-public python-alembic
4423 (package
4424 (name "python-alembic")
4425 (version "0.8.10")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (pypi-uri "alembic" version))
4430 (sha256
4431 (base32
4432 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4433 (build-system python-build-system)
4434 (native-inputs
4435 `(("python-mock" ,python-mock)
4436 ("python-pytest-cov" ,python-pytest-cov)))
4437 (propagated-inputs
4438 `(("python-sqlalchemy" ,python-sqlalchemy)
4439 ("python-mako" ,python-mako)
4440 ("python-editor" ,python-editor)))
4441 (home-page "http://bitbucket.org/zzzeek/alembic")
4442 (synopsis
4443 "Database migration tool for SQLAlchemy")
4444 (description
4445 "Alembic is a lightweight database migration tool for usage with the
4446 SQLAlchemy Database Toolkit for Python.")
4447 (license license:expat)))
4448
4449 (define-public python2-alembic
4450 (package-with-python2 python-alembic))
4451
4452 (define-public python-autopep8
4453 (package
4454 (name "python-autopep8")
4455 (version "1.2.4")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (pypi-uri "autopep8" version))
4460 (sha256
4461 (base32
4462 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4463 (build-system python-build-system)
4464 (propagated-inputs
4465 `(("python-pep8" ,python-pep8)))
4466 (home-page "https://github.com/hhatto/autopep8")
4467 (synopsis "Format Python code according to the PEP 8 style guide")
4468 (description
4469 "@code{autopep8} automatically formats Python code to conform to
4470 the PEP 8 style guide. It uses the pycodestyle utility to determine
4471 what parts of the code needs to be formatted. @code{autopep8} is
4472 capable of fixing most of the formatting issues that can be reported
4473 by pycodestyle.")
4474 (license (license:non-copyleft
4475 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4476
4477 (define-public python2-autopep8
4478 (package-with-python2 python-autopep8))
4479
4480 (define-public python-distutils-extra
4481 (package
4482 (name "python-distutils-extra")
4483 (version "2.38")
4484 (source
4485 (origin
4486 (method url-fetch)
4487 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4488 version "/+download/python-distutils-extra-"
4489 version ".tar.gz"))
4490 (sha256
4491 (base32
4492 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4493 (build-system python-build-system)
4494 (home-page "https://launchpad.net/python-distutils-extra/")
4495 (synopsis "Enhancements to Python's distutils")
4496 (description
4497 "The python-distutils-extra module enables you to easily integrate
4498 gettext support, themed icons, and scrollkeeper-based documentation into
4499 Python's distutils.")
4500 (license license:gpl2)))
4501
4502 (define-public python2-distutils-extra
4503 (package-with-python2 python-distutils-extra))
4504
4505 (define-public python2-elib.intl
4506 (package
4507 (name "python2-elib.intl")
4508 (version "0.0.3")
4509 (source
4510 (origin
4511 ;; This project doesn't tag releases or publish tarballs, so we take
4512 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4513 (method git-fetch)
4514 (uri (git-reference
4515 (url "https://github.com/dieterv/elib.intl.git")
4516 (commit "d09997cfef")))
4517 (sha256
4518 (base32
4519 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4520 (build-system python-build-system)
4521 (arguments
4522 ;; incompatible with Python 3 (exception syntax)
4523 `(#:python ,python-2
4524 #:tests? #f))
4525 (home-page "https://github.com/dieterv/elib.intl")
4526 (synopsis "Enhanced internationalization for Python")
4527 (description
4528 "The elib.intl module provides enhanced internationalization (I18N)
4529 services for your Python modules and applications.")
4530 (license license:lgpl3+)))
4531
4532 (define-public python-pillow
4533 (package
4534 (name "python-pillow")
4535 (version "3.3.3")
4536 (source
4537 (origin
4538 (method url-fetch)
4539 (uri (pypi-uri "Pillow" version))
4540 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4541 (sha256
4542 (base32
4543 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4544 (build-system python-build-system)
4545 (native-inputs
4546 `(("python-nose" ,python-nose)))
4547 (inputs
4548 `(("freetype" ,freetype)
4549 ("lcms" ,lcms)
4550 ("zlib" ,zlib)
4551 ("libjpeg" ,libjpeg)
4552 ("openjpeg" ,openjpeg)
4553 ("libtiff" ,libtiff)
4554 ("libwebp" ,libwebp)))
4555 (arguments
4556 `(#:phases (modify-phases %standard-phases
4557 (add-after
4558 'install 'check-installed
4559 (lambda* (#:key outputs inputs #:allow-other-keys)
4560 (begin
4561 (setenv "HOME" (getcwd))
4562 ;; Make installed package available for running the
4563 ;; tests
4564 (add-installed-pythonpath inputs outputs)
4565 (and (zero? (system* "python" "selftest.py"
4566 "--installed"))
4567 (zero? (system* "python" "test-installed.py"))))))
4568 (delete 'check))))
4569 (home-page "https://pypi.python.org/pypi/Pillow")
4570 (synopsis "Fork of the Python Imaging Library")
4571 (description
4572 "The Python Imaging Library adds image processing capabilities to your
4573 Python interpreter. This library provides extensive file format support, an
4574 efficient internal representation, and fairly powerful image processing
4575 capabilities. The core image library is designed for fast access to data
4576 stored in a few basic pixel formats. It should provide a solid foundation for
4577 a general image processing tool.")
4578 (license (license:x11-style
4579 "http://www.pythonware.com/products/pil/license.htm"
4580 "The PIL Software License"))))
4581
4582 (define-public python2-pillow
4583 (package-with-python2 python-pillow))
4584
4585 (define-public python-pycparser
4586 (package
4587 (name "python-pycparser")
4588 (version "2.17")
4589 (source
4590 (origin
4591 (method url-fetch)
4592 (uri (pypi-uri "pycparser" version))
4593 (sha256
4594 (base32
4595 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4596 (outputs '("out" "doc"))
4597 (build-system python-build-system)
4598 (native-inputs
4599 `(("pkg-config" ,pkg-config)))
4600 (arguments
4601 `(#:phases
4602 (modify-phases %standard-phases
4603 (replace 'check
4604 (lambda _
4605 (with-directory-excursion "tests"
4606 (zero? (system* "python" "all_tests.py")))))
4607 (add-after 'install 'install-doc
4608 (lambda* (#:key outputs #:allow-other-keys)
4609 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4610 (doc (string-append data "/doc/" ,name "-" ,version))
4611 (examples (string-append doc "/examples")))
4612 (mkdir-p examples)
4613 (for-each (lambda (file)
4614 (copy-file (string-append "." file)
4615 (string-append doc file)))
4616 '("/README.rst" "/CHANGES" "/LICENSE"))
4617 (copy-recursively "examples" examples)))))))
4618 (home-page "https://github.com/eliben/pycparser")
4619 (synopsis "C parser in Python")
4620 (description
4621 "Pycparser is a complete parser of the C language, written in pure Python
4622 using the PLY parsing library. It parses C code into an AST and can serve as
4623 a front-end for C compilers or analysis tools.")
4624 (license license:bsd-3)))
4625
4626 (define-public python2-pycparser
4627 (package-with-python2 python-pycparser))
4628
4629 (define-public python-cffi
4630 (package
4631 (name "python-cffi")
4632 (version "1.4.2")
4633 (source
4634 (origin
4635 (method url-fetch)
4636 (uri (pypi-uri "cffi" version))
4637 (sha256
4638 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4639 (build-system python-build-system)
4640 (outputs '("out" "doc"))
4641 (inputs
4642 `(("libffi" ,libffi)))
4643 (propagated-inputs ; required at run-time
4644 `(("python-pycparser" ,python-pycparser)))
4645 (native-inputs
4646 `(("pkg-config" ,pkg-config)
4647 ("python-sphinx" ,python-sphinx)
4648 ("python-pytest" ,python-pytest)))
4649 (arguments
4650 `(#:phases
4651 (alist-cons-after
4652 'install 'install-doc
4653 (lambda* (#:key outputs #:allow-other-keys)
4654 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4655 (doc (string-append data "/doc/" ,name "-" ,version))
4656 (html (string-append doc "/html")))
4657 (with-directory-excursion "doc"
4658 (system* "make" "html")
4659 (mkdir-p html)
4660 (copy-recursively "build/html" html))
4661 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4662 %standard-phases)))
4663 (home-page "http://cffi.readthedocs.org")
4664 (synopsis "Foreign function interface for Python")
4665 (description
4666 "Foreign Function Interface for Python calling C code.")
4667 (license license:expat)))
4668
4669 (define-public python2-cffi
4670 (package-with-python2 python-cffi))
4671
4672 (define-public python-xcffib
4673 (package
4674 (name "python-xcffib")
4675 (version "0.1.9")
4676 (source
4677 (origin
4678 (method url-fetch)
4679 (uri (string-append "https://pypi.python.org/packages/source/x/"
4680 "xcffib/xcffib-" version ".tar.gz"))
4681 (sha256
4682 (base32
4683 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4684 (build-system python-build-system)
4685 (inputs
4686 `(("libxcb" ,libxcb)))
4687 (propagated-inputs
4688 `(("python-cffi" ,python-cffi) ; used at run time
4689 ("python-six" ,python-six)))
4690 (arguments
4691 `(;; FIXME: Tests cannot load libxcb.so.1
4692 #:tests? #f
4693 #:phases
4694 (modify-phases %standard-phases
4695 (add-after 'install 'install-doc
4696 (lambda* (#:key outputs #:allow-other-keys)
4697 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4698 "/doc/" ,name "-" ,version)))
4699 (mkdir-p doc)
4700 (copy-file "README.md"
4701 (string-append doc "/README.md"))
4702 #t))))))
4703 (home-page "https://github.com/tych0/xcffib")
4704 (synopsis "XCB Python bindings")
4705 (description
4706 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4707 support for Python 3 and PyPy. It is based on cffi.")
4708 (license license:expat)))
4709
4710 (define-public python2-xcffib
4711 (package-with-python2 python-xcffib))
4712
4713 (define-public python-cairocffi
4714 (package
4715 (name "python-cairocffi")
4716 (version "0.6")
4717 (source
4718 (origin
4719 (method url-fetch)
4720 ;; The archive on pypi is missing the 'utils' directory!
4721 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4722 version ".tar.gz"))
4723 (file-name (string-append name "-" version ".tar.gz"))
4724 (sha256
4725 (base32
4726 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4727 (build-system python-build-system)
4728 (outputs '("out" "doc"))
4729 (inputs
4730 `(("gdk-pixbuf" ,gdk-pixbuf)
4731 ("cairo" ,cairo)))
4732 (native-inputs
4733 `(("pkg-config" ,pkg-config)
4734 ("python-sphinx" ,python-sphinx)
4735 ("python-docutils" ,python-docutils)))
4736 (propagated-inputs
4737 `(("python-xcffib" ,python-xcffib))) ; used at run time
4738 (arguments
4739 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4740 #:tests? #f
4741 #:phases
4742 (modify-phases %standard-phases
4743 (add-after 'install 'install-doc
4744 (lambda* (#:key inputs outputs #:allow-other-keys)
4745 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4746 (doc (string-append data "/doc/" ,name "-" ,version))
4747 (html (string-append doc "/html")))
4748 (setenv "LD_LIBRARY_PATH"
4749 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4750 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4751 (setenv "LANG" "en_US.UTF-8")
4752 (mkdir-p html)
4753 (for-each (lambda (file)
4754 (copy-file (string-append "." file)
4755 (string-append doc file)))
4756 '("/README.rst" "/CHANGES" "/LICENSE"))
4757 (system* "python" "setup.py" "build_sphinx")
4758 (copy-recursively "docs/_build/html" html)
4759 #t))))))
4760 (home-page "https://github.com/SimonSapin/cairocffi")
4761 (synopsis "Python bindings and object-oriented API for Cairo")
4762 (description
4763 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4764 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4765 graphics library with support for multiple backends including image buffers,
4766 PNG, PostScript, PDF, and SVG file output.")
4767 (license license:bsd-3)))
4768
4769 (define-public python2-cairocffi
4770 (package-with-python2 python-cairocffi))
4771
4772 (define-public python-decorator
4773 (package
4774 (name "python-decorator")
4775 (version "4.0.10")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "decorator" version))
4780 (sha256
4781 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4782 (build-system python-build-system)
4783 (arguments '(#:tests? #f)) ; no test target
4784 (home-page "https://pypi.python.org/pypi/decorator/")
4785 (synopsis "Python module to simplify usage of decorators")
4786 (description
4787 "The aim of the decorator module is to simplify the usage of decorators
4788 for the average programmer, and to popularize decorators usage giving examples
4789 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4790 etc. The core of this module is a decorator factory.")
4791 (license license:expat)))
4792
4793 (define-public python2-decorator
4794 (package-with-python2 python-decorator))
4795
4796 (define-public python-drmaa
4797 (package
4798 (name "python-drmaa")
4799 (version "0.7.7")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (string-append
4804 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4805 version ".tar.gz"))
4806 (sha256
4807 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4808 (build-system python-build-system)
4809 ;; The test suite requires libdrmaa which is provided by the cluster
4810 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4811 ;; should be set to the path of the libdrmaa library.
4812 (arguments '(#:tests? #f))
4813 (native-inputs
4814 `(("python-nose" ,python-nose)))
4815 (home-page "https://pypi.python.org/pypi/drmaa")
4816 (synopsis "Python bindings for the DRMAA library")
4817 (description
4818 "A Python package for Distributed Resource Management (DRM) job
4819 submission and control. This package is an implementation of the DRMAA 1.0
4820 Python language binding specification.")
4821 (license license:bsd-3)))
4822
4823 (define-public python2-drmaa
4824 (package-with-python2 python-drmaa))
4825
4826 (define-public python-gridmap
4827 (package
4828 (name "python-gridmap")
4829 (version "0.13.0")
4830 (source
4831 (origin
4832 (method url-fetch)
4833 (uri (string-append
4834 "https://github.com/pygridtools/gridmap/archive/v"
4835 version ".tar.gz"))
4836 (file-name (string-append name "-" version ".tar.gz"))
4837 (sha256
4838 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4839 (build-system python-build-system)
4840 (arguments
4841 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4842 (propagated-inputs
4843 `(("python-psutil" ,python-psutil)
4844 ("python-drmaa" ,python-drmaa)
4845 ("python-pyzmq" ,python-pyzmq)))
4846 (home-page "https://github.com/pygridtools/gridmap")
4847 (synopsis "Create jobs on a cluster directly from Python")
4848 (description
4849 "Gridmap is a Python package to allow you to easily create jobs on the
4850 cluster directly from Python. You can directly map Python functions onto the
4851 cluster without needing to write any wrapper code yourself.")
4852 (license license:gpl3+)))
4853
4854 (define-public python2-gridmap
4855 (package-with-python2 python-gridmap))
4856
4857 (define-public python-pexpect
4858 (package
4859 (name "python-pexpect")
4860 (version "4.2.1")
4861 (source
4862 (origin
4863 (method url-fetch)
4864 (uri (pypi-uri "pexpect" version))
4865 (sha256
4866 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4867 (build-system python-build-system)
4868 (arguments
4869 `(#:phases
4870 (modify-phases %standard-phases
4871 (add-before 'check 'prepare-tests
4872 (lambda _
4873 (substitute* (find-files "tests")
4874 (("/bin/ls") (which "ls"))
4875 (("/bin/echo") (which "echo"))
4876 (("/bin/which") (which "which"))
4877 ;; Many tests try to use the /bin directory which
4878 ;; is not present in the build environment.
4879 ;; Use one that's non-empty and unlikely to change.
4880 (("/bin'") "/dev'"))
4881 ;; XXX: Socket connection test gets "Connection reset by peer".
4882 ;; Why does it not work? Delete for now.
4883 (delete-file "tests/test_socket.py")
4884 #t))
4885 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4886 (native-inputs
4887 `(("python-nose" ,python-nose)
4888 ("python-pytest" ,python-pytest)
4889 ("man-db" ,man-db)
4890 ("which" ,which)))
4891 (propagated-inputs
4892 `(("python-ptyprocess" ,python-ptyprocess)))
4893 (home-page "http://pexpect.readthedocs.org/")
4894 (synopsis "Controlling interactive console applications")
4895 (description
4896 "Pexpect is a pure Python module for spawning child applications;
4897 controlling them; and responding to expected patterns in their output.
4898 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4899 child application and control it as if a human were typing commands.")
4900 (license license:isc)))
4901
4902 (define-public python2-pexpect
4903 (package-with-python2 python-pexpect))
4904
4905 (define-public python-setuptools-scm
4906 (package
4907 (name "python-setuptools-scm")
4908 (version "1.15.0")
4909 (source (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "setuptools_scm" version))
4912 (sha256
4913 (base32
4914 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4915 (build-system python-build-system)
4916 (home-page "https://github.com/pypa/setuptools_scm/")
4917 (synopsis "Manage Python package versions in SCM metadata")
4918 (description
4919 "Setuptools_scm handles managing your Python package versions in
4920 @dfn{software configuration management} (SCM) metadata instead of declaring
4921 them as the version argument or in a SCM managed file.")
4922 (license license:expat)))
4923
4924 (define-public python2-setuptools-scm
4925 (package-with-python2 python-setuptools-scm))
4926
4927 (define-public python-pathpy
4928 (package
4929 (name "python-pathpy")
4930 (version "8.1.1")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 (uri (string-append "https://pypi.python.org/packages/source/p/"
4935 "path.py/path.py-" version ".tar.gz"))
4936 (sha256
4937 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4938 (outputs '("out" "doc"))
4939 (build-system python-build-system)
4940 (propagated-inputs
4941 `(("python-appdirs" ,python-appdirs)))
4942 (native-inputs
4943 `(("python-setuptools-scm" ,python-setuptools-scm)
4944 ("python-sphinx" ,python-sphinx)
4945 ("python-rst.linker" ,python-rst.linker)
4946 ("python-pytest" ,python-pytest)
4947 ("python-pytest-runner" ,python-pytest-runner)))
4948 (arguments
4949 `(#:phases
4950 (modify-phases %standard-phases
4951 (add-after 'build 'build-doc
4952 (lambda _
4953 (setenv "LANG" "en_US.UTF-8")
4954 (zero? (system* "python" "setup.py" "build_sphinx"))))
4955 (add-after 'install 'install-doc
4956 (lambda* (#:key outputs #:allow-other-keys)
4957 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4958 (doc (string-append data "/doc/" ,name "-" ,version))
4959 (html (string-append doc "/html")))
4960 (mkdir-p html)
4961 (for-each (lambda (file)
4962 (copy-file file (string-append doc "/" file)))
4963 '("README.rst" "CHANGES.rst"))
4964 (copy-recursively "build/sphinx/html" html)))))))
4965 (home-page "http://github.com/jaraco/path.py")
4966 (synopsis "Python module wrapper for built-in os.path")
4967 (description
4968 "@code{path.py} implements path objects as first-class entities, allowing
4969 common operations on files to be invoked on those path objects directly.")
4970 (license license:expat)))
4971
4972 (define-public python2-pathpy
4973 (package-with-python2 python-pathpy))
4974
4975 (define-public python-pickleshare
4976 (package
4977 (name "python-pickleshare")
4978 (version "0.5")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (string-append "https://pypi.python.org/packages/source/p/"
4983 "pickleshare/pickleshare-" version ".tar.gz"))
4984 (sha256
4985 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4986 (build-system python-build-system)
4987 (propagated-inputs
4988 `(("python-pathpy" ,python-pathpy)))
4989 (home-page "https://github.com/vivainio/pickleshare")
4990 (synopsis "Tiny key value database with concurrency support")
4991 (description
4992 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4993 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4994 shelve, many processes can access the database simultaneously. Changing a
4995 value in database is immediately visible to other processes accessing the same
4996 database. Concurrency is possible because the values are stored in separate
4997 files. Hence the “database” is a directory where all files are governed by
4998 PickleShare.")
4999 (license license:expat)))
5000
5001 (define-public python2-pickleshare
5002 (package-with-python2 python-pickleshare))
5003
5004 (define-public python-simplegeneric
5005 (package
5006 (name "python-simplegeneric")
5007 (version "0.8.1")
5008 (source
5009 (origin
5010 (method url-fetch)
5011 (uri (string-append "https://pypi.python.org/packages/source/s/"
5012 "simplegeneric/simplegeneric-" version ".zip"))
5013 (sha256
5014 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5015 (build-system python-build-system)
5016 (native-inputs
5017 `(("unzip" ,unzip)))
5018 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5019 (synopsis "Python module for simple generic functions")
5020 (description
5021 "The simplegeneric module lets you define simple single-dispatch generic
5022 functions, akin to Python’s built-in generic functions like @code{len()},
5023 @code{iter()} and so on. However, instead of using specially-named methods,
5024 these generic functions use simple lookup tables, akin to those used by
5025 e.g. @code{pickle.dump()} and other generic functions found in the Python
5026 standard library.")
5027 (license license:zpl2.1)))
5028
5029 (define-public python2-simplegeneric
5030 (package-with-python2 python-simplegeneric))
5031
5032 (define-public python-ipython-genutils
5033 ;; TODO: This package is retired, check if can be removed, see description.
5034 (package
5035 (name "python-ipython-genutils")
5036 (version "0.1.0")
5037 (source
5038 (origin
5039 (method url-fetch)
5040 (uri (string-append "https://pypi.python.org/packages/source/i/"
5041 "ipython_genutils/ipython_genutils-"
5042 version ".tar.gz"))
5043 (sha256
5044 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5045 (build-system python-build-system)
5046 (arguments `(#:tests? #f)) ; no tests
5047 (home-page "http://ipython.org")
5048 (synopsis "Vestigial utilities from IPython")
5049 (description
5050 "This package provides retired utilities from IPython. No packages
5051 outside IPython/Jupyter should depend on it.
5052
5053 This package shouldn't exist. It contains some common utilities shared by
5054 Jupyter and IPython projects during The Big Split. As soon as possible, those
5055 packages will remove their dependency on this, and this package will go
5056 away.")
5057 (license license:bsd-3)))
5058
5059 (define-public python2-ipython-genutils
5060 (package-with-python2 python-ipython-genutils))
5061
5062 (define-public python-traitlets
5063 (package
5064 (name "python-traitlets")
5065 (version "4.2.0")
5066 (source
5067 (origin
5068 (method url-fetch)
5069 (uri (pypi-uri "traitlets" version))
5070 (sha256
5071 (base32
5072 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5073 (build-system python-build-system)
5074 (arguments
5075 `(#:phases
5076 (modify-phases %standard-phases
5077 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5078 (propagated-inputs
5079 `(("python-ipython-genutils" ,python-ipython-genutils)
5080 ("python-decorator" ,python-decorator)))
5081 (native-inputs
5082 `(("python-mock" ,python-mock)
5083 ("python-nose" ,python-nose)))
5084 (home-page "http://ipython.org")
5085 (synopsis "Configuration system for Python applications")
5086 (description
5087 "Traitlets is a framework that lets Python classes have attributes with
5088 type checking, dynamically calculated default values, and ‘on change’
5089 callbacks. The package also includes a mechanism to use traitlets for
5090 configuration, loading values from files or from command line arguments. This
5091 is a distinct layer on top of traitlets, so you can use traitlets in your code
5092 without using the configuration machinery.")
5093 (license license:bsd-3)))
5094
5095 (define-public python2-traitlets
5096 (package-with-python2 python-traitlets))
5097
5098 (define-public python-jupyter-core
5099 (package
5100 (name "python-jupyter-core")
5101 (version "4.2.1")
5102 (source
5103 (origin
5104 (method url-fetch)
5105 (uri (string-append (pypi-uri "jupyter_core" version)))
5106 (sha256
5107 (base32
5108 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5109 (build-system python-build-system)
5110 ;; FIXME: not sure how to run the tests
5111 (arguments `(#:tests? #f))
5112 (propagated-inputs
5113 `(("python-traitlets" ,python-traitlets)))
5114 (home-page "http://jupyter.org/")
5115 (synopsis "Jupyter base package")
5116 (description
5117 "Jupyter core is the base package on which Jupyter projects rely.")
5118 (license license:bsd-3)))
5119
5120 (define-public python2-jupyter-core
5121 (package-with-python2 python-jupyter-core))
5122
5123 (define-public python-jupyter-client
5124 (package
5125 (name "python-jupyter-client")
5126 (version "4.4.0")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "jupyter_client" version))
5131 (sha256
5132 (base32
5133 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5134 (build-system python-build-system)
5135 ;; Tests fail because of missing native python kernel which I assume is
5136 ;; provided by the ipython package, which we cannot use because it would
5137 ;; cause a dependency cycle.
5138 (arguments `(#:tests? #f))
5139 (propagated-inputs
5140 `(("python-pyzmq" ,python-pyzmq)
5141 ("python-traitlets" ,python-traitlets)
5142 ("python-jupyter-core" ,python-jupyter-core)))
5143 (home-page "http://jupyter.org/")
5144 (synopsis "Jupyter protocol implementation and client libraries")
5145 (description
5146 "The @code{jupyter_client} package contains the reference implementation
5147 of the Jupyter protocol. It also provides client and kernel management APIs
5148 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5149 installing @code{kernelspec}s for use with Jupyter frontends.")
5150 (license license:bsd-3)))
5151
5152 (define-public python2-jupyter-client
5153 (package-with-python2 python-jupyter-client))
5154
5155 (define-public python-ipykernel
5156 (package
5157 (name "python-ipykernel")
5158 (version "4.5.2")
5159 (source
5160 (origin
5161 (method url-fetch)
5162 (uri (pypi-uri "ipykernel" version))
5163 (sha256
5164 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5165 (build-system python-build-system)
5166 ;; The tests load a submodule of IPython. However, IPython itself depends
5167 ;; on ipykernel.
5168 (arguments `(#:tests? #f))
5169 (propagated-inputs
5170 ;; imported at runtime during connect
5171 `(("python-jupyter-client" ,python-jupyter-client)))
5172 (home-page "http://ipython.org")
5173 (synopsis "IPython Kernel for Jupyter")
5174 (description
5175 "This package provides the IPython kernel for Jupyter.")
5176 (license license:bsd-3)))
5177
5178 (define-public python2-ipykernel
5179 (package-with-python2 python-ipykernel))
5180
5181 (define-public python-testpath
5182 (package
5183 (name "python-testpath")
5184 (version "0.2")
5185 (source
5186 (origin
5187 (method url-fetch)
5188 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5189 version ".tar.gz"))
5190 (file-name (string-append name "-" version ".tar.gz"))
5191 (sha256
5192 (base32
5193 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5194 (build-system python-build-system)
5195 (arguments
5196 `(#:tests? #f ; this package does not even have a setup.py
5197 #:modules ((guix build python-build-system)
5198 (guix build utils)
5199 (srfi srfi-1))
5200 #:imported-modules (,@%python-build-system-modules
5201 (srfi srfi-1))
5202 #:phases
5203 (modify-phases %standard-phases
5204 (delete 'install)
5205 (replace 'build
5206 (lambda* (#:key inputs outputs #:allow-other-keys)
5207 (let* ((version (last
5208 (string-split (assoc-ref inputs "python") #\-)))
5209 (x.y (string-join (take (string-split version #\.) 2)
5210 "."))
5211 (dir (string-append
5212 (assoc-ref outputs "out")
5213 "/lib/python" x.y "/site-packages/testpath")))
5214 (mkdir-p dir)
5215 (copy-recursively "testpath" dir))
5216 #t)))))
5217 (home-page "https://github.com/takluyver/testpath")
5218 (synopsis "Test utilities for code working with files and commands")
5219 (description
5220 "Testpath is a collection of utilities for Python code working with files
5221 and commands. It contains functions to check things on the filesystem, and
5222 tools for mocking system commands and recording calls to those.")
5223 (license license:expat)))
5224
5225 (define-public python2-testpath
5226 (package-with-python2 python-testpath))
5227
5228 (define-public python-ipython
5229 (package
5230 (name "python-ipython")
5231 (version "5.2.2")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (pypi-uri "ipython" version ".tar.gz"))
5236 (sha256
5237 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5238 (build-system python-build-system)
5239 (outputs '("out" "doc"))
5240 (propagated-inputs
5241 `(("python-pyzmq" ,python-pyzmq)
5242 ("python-prompt-toolkit" ,python-prompt-toolkit)
5243 ("python-terminado" ,python-terminado)
5244 ("python-matplotlib" ,python-matplotlib)
5245 ("python-numpy" ,python-numpy)
5246 ("python-numpydoc" ,python-numpydoc)
5247 ("python-jinja2" ,python-jinja2)
5248 ("python-mistune" ,python-mistune)
5249 ("python-pexpect" ,python-pexpect)
5250 ("python-pickleshare" ,python-pickleshare)
5251 ("python-simplegeneric" ,python-simplegeneric)
5252 ("python-jsonschema" ,python-jsonschema)
5253 ("python-traitlets" ,python-traitlets)
5254 ("python-ipykernel" ,python-ipykernel)
5255 ("python-nbformat" ,python-nbformat)
5256 ("python-pygments" ,python-pygments)))
5257 (inputs
5258 `(("readline" ,readline)
5259 ("which" ,which)))
5260 (native-inputs
5261 `(("graphviz" ,graphviz)
5262 ("pkg-config" ,pkg-config)
5263 ("python-requests" ,python-requests) ;; for tests
5264 ("python-testpath" ,python-testpath)
5265 ("python-nose" ,python-nose)
5266 ("python-sphinx" ,python-sphinx)
5267 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5268 ("texlive" ,texlive)
5269 ("texinfo" ,texinfo)))
5270 (arguments
5271 `(#:phases
5272 (modify-phases %standard-phases
5273 (add-after
5274 'install 'install-doc
5275 (lambda* (#:key inputs outputs #:allow-other-keys)
5276 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5277 (doc (string-append data "/doc/" ,name "-" ,version))
5278 (html (string-append doc "/html"))
5279 (man1 (string-append data "/man/man1"))
5280 (info (string-append data "/info"))
5281 (examples (string-append doc "/examples"))
5282 (python-arg (string-append "PYTHON=" (which "python"))))
5283 (setenv "LANG" "en_US.utf8")
5284 ;; Make installed package available for running the tests
5285 (add-installed-pythonpath inputs outputs)
5286 (with-directory-excursion "docs"
5287 ;; FIXME: pdf fails to build
5288 ;;(system* "make" "pdf" "PAPER=a4")
5289 (system* "make" python-arg "html")
5290 (system* "make" python-arg "info"))
5291 (copy-recursively "docs/man" man1)
5292 (copy-recursively "examples" examples)
5293 (copy-recursively "docs/build/html" html)
5294 ;; (copy-file "docs/build/latex/ipython.pdf"
5295 ;; (string-append doc "/ipython.pdf"))
5296 (mkdir-p info)
5297 (copy-file "docs/build/texinfo/ipython.info"
5298 (string-append info "/ipython.info"))
5299 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5300 ;; Tests can only be run after the library has been installed and not
5301 ;; within the source directory.
5302 (delete 'check)
5303 (add-after
5304 'install 'check
5305 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5306 (if tests?
5307 (with-directory-excursion "/tmp"
5308 ;; Make installed package available for running the tests
5309 (add-installed-pythonpath inputs outputs)
5310 (setenv "HOME" "/tmp/") ;; required by a test
5311 (zero? (system* (string-append (assoc-ref outputs "out")
5312 "/bin/iptest"))))
5313 #t)))
5314 (add-before
5315 'install 'fix-tests
5316 (lambda* (#:key inputs #:allow-other-keys)
5317 (substitute* "./IPython/utils/_process_posix.py"
5318 (("/usr/bin/env', 'which") (which "which")))
5319 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5320 (("#!/usr/bin/env python")
5321 (string-append "#!" (which "python"))))
5322 ;; Disable 1 failing test
5323 (substitute* "./IPython/core/tests/test_magic.py"
5324 (("def test_dirops\\(\\):" all)
5325 (string-append "@dec.skipif(True)\n" all))))))))
5326 (home-page "http://ipython.org")
5327 (synopsis "IPython is a tool for interactive computing in Python")
5328 (description
5329 "IPython provides a rich architecture for interactive computing with:
5330 Powerful interactive shells, a browser-based notebook, support for interactive
5331 data visualization, embeddable interpreters and tools for parallel
5332 computing.")
5333 (license license:bsd-3)
5334 (properties `((python2-variant . ,(delay python2-ipython))))))
5335
5336 (define-public python2-ipython
5337 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5338 (package
5339 (inherit ipython)
5340 ;; FIXME: add pyreadline once available.
5341 (propagated-inputs
5342 `(("python2-backports-shutil-get-terminal-size"
5343 ,python2-backports-shutil-get-terminal-size)
5344 ("python2-pathlib2" ,python2-pathlib2)
5345 ,@(package-propagated-inputs ipython)))
5346 (native-inputs
5347 `(("python2-mock" ,python2-mock)
5348 ,@(package-native-inputs ipython))))))
5349
5350 (define-public python-isodate
5351 (package
5352 (name "python-isodate")
5353 (version "0.5.4")
5354 (source
5355 (origin
5356 (method url-fetch)
5357 (uri (pypi-uri "isodate" version))
5358 (sha256
5359 (base32
5360 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5361 (build-system python-build-system)
5362 (home-page
5363 "http://cheeseshop.python.org/pypi/isodate")
5364 (synopsis
5365 "Python date parser and formatter")
5366 (description
5367 "Python-isodate is a python module for parsing and formatting
5368 ISO 8601 dates, time and duration.")
5369 (license license:bsd-3)))
5370
5371 (define-public python2-isodate
5372 (package-with-python2 python-isodate))
5373
5374 (define-public python-html5lib
5375 (package
5376 (name "python-html5lib")
5377 (version "1.0b10")
5378 (source
5379 (origin
5380 (method url-fetch)
5381 (uri (pypi-uri "html5lib" version))
5382 (sha256
5383 (base32
5384 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5385 (build-system python-build-system)
5386 (propagated-inputs
5387 `(("python-six" ,python-six)
5388 ("python-webencodings" ,python-webencodings)))
5389 (arguments
5390 `(#:test-target "check"))
5391 (home-page
5392 "https://github.com/html5lib/html5lib-python")
5393 (synopsis
5394 "Python HTML parser based on the WHATWG HTML specifcation")
5395 (description
5396 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5397 and written in Python.")
5398 (license license:expat)))
5399
5400 (define-public python2-html5lib
5401 (package-with-python2 python-html5lib))
5402
5403 ;; Needed for python-bleach, a dependency of python-notebook
5404 (define-public python-html5lib-0.9
5405 (package
5406 (inherit python-html5lib)
5407 (version "0.999")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "html5lib" version))
5412 (sha256
5413 (base32
5414 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5415
5416 (define-public python2-html5lib-0.9
5417 (package-with-python2 python-html5lib-0.9))
5418
5419 (define-public python-webencodings
5420 (package
5421 (name "python-webencodings")
5422 (version "0.5")
5423 (source (origin
5424 (method url-fetch)
5425 (uri (pypi-uri "webencodings" version))
5426 (sha256
5427 (base32
5428 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5429 (build-system python-build-system)
5430 (arguments
5431 '(#:phases
5432 (modify-phases %standard-phases
5433 (replace 'check
5434 (lambda _
5435 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5436 (native-inputs
5437 `(("python-pytest" ,python-pytest)))
5438 (home-page "https://github.com/SimonSapin/python-webencodings")
5439 (synopsis "Character encoding aliases for legacy web content")
5440 (description
5441 "In order to be compatible with legacy web content when interpreting
5442 something like @code{Content-Type: text/html; charset=latin1}, tools need
5443 to use a particular set of aliases for encoding labels as well as some
5444 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5445 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5446 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5447 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5448 defines all such details so that implementations do not have to
5449 reverse-engineer each other.
5450
5451 This module implements the Encoding standard and has encoding labels and
5452 BOM detection, but the actual implementation for encoders and decoders
5453 is Python’s.")
5454 (license license:bsd-3)))
5455
5456 (define-public python2-webencodings
5457 (package-with-python2 python-webencodings))
5458
5459 (define-public python-urwid
5460 (package
5461 (name "python-urwid")
5462 (version "1.3.1")
5463 (source
5464 (origin
5465 (method url-fetch)
5466 (uri (pypi-uri "urwid" version))
5467 (sha256
5468 (base32
5469 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5470 (build-system python-build-system)
5471 (arguments
5472 `(#:phases
5473 (modify-phases %standard-phases
5474 ;; Disable failing test. Bug filed upstream:
5475 ;; https://github.com/wardi/urwid/issues/164
5476 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5477 (add-after 'unpack 'disable-failing-test
5478 (lambda _
5479 (substitute* "urwid/tests/test_event_loops.py"
5480 (("test_remove_watch_file")
5481 "disable_remove_watch_file")))))))
5482 (home-page "http://urwid.org")
5483 (synopsis "Console user interface library for Python")
5484 (description
5485 "Urwid is a curses-based UI/widget library for Python. It includes many
5486 features useful for text console applications.")
5487 (license license:lgpl2.1+)))
5488
5489 (define-public python2-urwid
5490 (package-with-python2 python-urwid))
5491
5492 (define-public python-openid
5493 (package
5494 (name "python-openid")
5495 (version "3.0.10")
5496 (source
5497 (origin
5498 (method url-fetch)
5499 (uri (pypi-uri "python3-openid" version))
5500 (sha256
5501 (base32
5502 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5503 (build-system python-build-system)
5504 (home-page "https://github.com/necaris/python3-openid")
5505 (synopsis "OpenID support for servers and consumers")
5506 (description "This library provides OpenID authentication for Python, both
5507 for clients and servers.")
5508 (license license:asl2.0)))
5509
5510 (define-public python2-openid
5511 (package
5512 (name "python2-openid")
5513 (version "2.2.5")
5514 (source
5515 (origin
5516 (method url-fetch)
5517 (uri (pypi-uri "python-openid" version))
5518 (sha256
5519 (base32
5520 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5521 (build-system python-build-system)
5522 (arguments
5523 ;; Python 3 support is in `python3-openid`, a separate package.
5524 `(#:python ,python-2))
5525 (home-page "https://github.com/openid/python-openid")
5526 (synopsis "OpenID support for servers and consumers")
5527 (description "This library provides OpenID authentication for Python, both
5528 for clients and servers.")
5529 (license license:asl2.0)))
5530
5531 (define-public python-urwidtrees
5532 (package
5533 (name "python-urwidtrees")
5534 (version "1.0.2")
5535 (source
5536 (origin
5537 (method url-fetch)
5538 ;; package author intends on distributing via github rather than pypi:
5539 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5540 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5541 version ".tar.gz"))
5542 (file-name (string-append name "-" version ".tar.gz"))
5543 (sha256
5544 (base32
5545 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5546 (build-system python-build-system)
5547 (arguments
5548 '(#:tests? #f)) ; no tests
5549 (propagated-inputs `(("python-urwid" ,python-urwid)))
5550 (home-page "https://github.com/pazz/urwidtrees")
5551 (synopsis "Tree widgets for urwid")
5552 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5553 toolkit. Use it to build trees of widgets.")
5554 (license license:gpl3+)))
5555
5556 (define-public python2-urwidtrees
5557 (package-with-python2 python-urwidtrees))
5558
5559 (define-public python-dbus
5560 (package
5561 (name "python-dbus")
5562 (version "1.2.0")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (string-append
5567 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5568 version ".tar.gz"))
5569 (sha256
5570 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5571 (build-system gnu-build-system)
5572 (arguments
5573 '(#:phases
5574 (modify-phases %standard-phases
5575 (add-before
5576 'check 'pre-check
5577 (lambda _
5578 ;; XXX: For the missing '/etc/machine-id'.
5579 (substitute* "test/run-test.sh"
5580 (("DBUS_FATAL_WARNINGS=1")
5581 "DBUS_FATAL_WARNINGS=0"))
5582 #t)))))
5583 (native-inputs
5584 `(("pkg-config" ,pkg-config)))
5585 (inputs
5586 `(("python" ,python)
5587 ("dbus-glib" ,dbus-glib)))
5588 (synopsis "Python bindings for D-bus")
5589 (description "python-dbus provides bindings for libdbus, the reference
5590 implementation of D-Bus.")
5591 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5592 (license license:expat)))
5593
5594 (define-public python2-dbus
5595 (package (inherit python-dbus)
5596 (name "python2-dbus")
5597 (inputs `(("python" ,python-2)
5598 ,@(alist-delete "python"
5599 (package-inputs python-dbus)
5600 equal?)))
5601 ;; FIXME: on Python 2, the test_utf8 fails with:
5602 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5603 (arguments `(#:tests? #f))))
5604
5605 (define-public python-apsw
5606 (package
5607 (name "python-apsw")
5608 (version "3.9.2-r1")
5609 (source
5610 (origin
5611 (method url-fetch)
5612 (uri (pypi-uri "apsw" version))
5613 (sha256
5614 (base32
5615 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5616 (build-system python-build-system)
5617 (inputs
5618 `(("sqlite" ,sqlite)))
5619 (arguments
5620 `(#:phases
5621 (modify-phases %standard-phases
5622 (delete 'check)
5623 (add-after 'install 'check
5624 (lambda* (#:key inputs outputs #:allow-other-keys)
5625 (add-installed-pythonpath inputs outputs)
5626 (zero? (system* "python" "setup.py" "test")))))))
5627 (home-page "https://github.com/rogerbinns/apsw/")
5628 (synopsis "Another Python SQLite Wrapper")
5629 (description "APSW is a Python wrapper for the SQLite
5630 embedded relational database engine. In contrast to other wrappers such as
5631 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5632 translate the complete SQLite API into Python.")
5633 (license license:zlib)))
5634
5635 (define-public python2-apsw
5636 (package-with-python2 python-apsw))
5637
5638 (define-public python-lxml
5639 (package
5640 (name "python-lxml")
5641 (version "3.6.0")
5642 (source
5643 (origin
5644 (method url-fetch)
5645 (uri (pypi-uri "lxml" version))
5646 (sha256
5647 (base32
5648 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5649 (build-system python-build-system)
5650 (inputs
5651 `(("libxml2" ,libxml2)
5652 ("libxslt" ,libxslt)))
5653 (home-page "http://lxml.de/")
5654 (synopsis
5655 "Python XML processing library")
5656 (description
5657 "The lxml XML toolkit is a Pythonic binding for the C libraries
5658 libxml2 and libxslt.")
5659 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5660
5661 (define-public python2-lxml
5662 (package-with-python2 python-lxml))
5663
5664 ;; beautifulsoup4 has a totally different namespace than 3.x,
5665 ;; and pypi seems to put it under its own name, so I guess we should too
5666 (define-public python-beautifulsoup4
5667 (package
5668 (name "python-beautifulsoup4")
5669 (version "4.5.3")
5670 (source
5671 (origin
5672 (method url-fetch)
5673 (uri (pypi-uri "beautifulsoup4" version))
5674 (sha256
5675 (base32
5676 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5677 (build-system python-build-system)
5678 (arguments
5679 `(#:phases
5680 (modify-phases %standard-phases
5681 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5682 ;; must use this conversion script when building with Python 3. The
5683 ;; conversion script also runs the tests.
5684 ;; For more information, see the file 'convert-py3k' in the source
5685 ;; distribution.
5686 (replace 'check
5687 (lambda _ (zero? (system* "./convert-py3k")))))))
5688 (home-page
5689 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5690 (synopsis
5691 "Python screen-scraping library")
5692 (description
5693 "Beautiful Soup is a Python library designed for rapidly setting up
5694 screen-scraping projects. It offers Pythonic idioms for navigating,
5695 searching, and modifying a parse tree, providing a toolkit for
5696 dissecting a document and extracting what you need. It automatically
5697 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5698 (license license:expat)
5699 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5700
5701 (define-public python2-beautifulsoup4
5702 (package
5703 (inherit (package-with-python2
5704 (strip-python2-variant python-beautifulsoup4)))
5705 (arguments `(#:python ,python-2))))
5706
5707 (define-public python-cssutils
5708 (package
5709 (name "python-cssutils")
5710 (version "1.0.1")
5711 (source
5712 (origin
5713 (method url-fetch)
5714 (uri (pypi-uri "cssutils" version))
5715 (sha256
5716 (base32
5717 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5718 (build-system python-build-system)
5719 (native-inputs
5720 `(("unzip" ,unzip))) ; for unpacking the source
5721 (arguments
5722 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5723 (home-page "http://cthedot.de/cssutils/")
5724 (synopsis
5725 "CSS Cascading Style Sheets library for Python")
5726 (description
5727 "Cssutils is a Python package for parsing and building CSS
5728 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5729 options.")
5730 (license license:lgpl3+)))
5731
5732 (define-public python2-cssutils
5733 (package-with-python2 python-cssutils))
5734
5735 (define-public python-cssselect
5736 (package
5737 (name "python-cssselect")
5738 (version "0.9.2")
5739 (source
5740 (origin
5741 (method url-fetch)
5742 (uri (pypi-uri "cssselect" version))
5743 (sha256
5744 (base32
5745 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5746 (build-system python-build-system)
5747 (arguments
5748 ;; tests fail with message
5749 ;; AttributeError: 'module' object has no attribute 'tests'
5750 `(#:tests? #f))
5751 (home-page
5752 "https://pythonhosted.org/cssselect/")
5753 (synopsis
5754 "CSS3 selector parser and translator to XPath 1.0")
5755 (description
5756 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5757 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5758 another XPath engine to find the matching elements in an XML or HTML document.")
5759 (license license:bsd-3)))
5760
5761 (define-public python2-cssselect
5762 (package-with-python2 python-cssselect))
5763
5764 (define-public python-openid-cla
5765 (package
5766 (name "python-openid-cla")
5767 (version "1.2")
5768 (source
5769 (origin
5770 (method url-fetch)
5771 (uri (pypi-uri "python-openid-cla" version))
5772 (sha256
5773 (base32
5774 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5775 (build-system python-build-system)
5776 (arguments '(#:tests? #f)) ; No tests.
5777 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5778 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5779 (description "@code{openid-cla} is an implementation of the OpenID
5780 contributor license agreement extension for python-openid.")
5781 (license license:bsd-3)))
5782
5783 (define-public python2-openid-cla
5784 (package-with-python2 python-openid-cla))
5785
5786 (define-public python-openid-teams
5787 (package
5788 (name "python-openid-teams")
5789 (version "1.1")
5790 (source
5791 (origin
5792 (method url-fetch)
5793 (uri (pypi-uri "python-openid-teams" version))
5794 (sha256
5795 (base32
5796 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5797 (build-system python-build-system)
5798 (arguments '(#:tests? #f)) ; No tests.
5799 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5800 (synopsis "Implementation of the OpenID teams extension for python-openid")
5801 (description
5802 "@code{openid-teams} is an implementation of the OpenID
5803 teams extension for python-openid.")
5804 (license license:bsd-3)))
5805
5806 (define-public python2-openid-teams
5807 (package-with-python2 python-openid-teams))
5808
5809 (define-public python-netifaces
5810 (package
5811 (name "python-netifaces")
5812 (version "0.10.4")
5813 (source
5814 (origin
5815 (method url-fetch)
5816 (uri (string-append
5817 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5818 version
5819 ".tar.gz"))
5820 (sha256
5821 (base32
5822 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5823 (build-system python-build-system)
5824 (home-page
5825 "https://bitbucket.org/al45tair/netifaces")
5826 (synopsis
5827 "Python module for portable network interface information")
5828 (description
5829 "Netifaces is a Python module providing information on network
5830 interfaces in an easy and portable manner.")
5831 (license license:expat)))
5832
5833 (define-public python2-netifaces
5834 (package-with-python2 python-netifaces))
5835
5836 (define-public python-networkx
5837 (package
5838 (name "python-networkx")
5839 (version "1.11")
5840 (source
5841 (origin
5842 (method url-fetch)
5843 (uri (pypi-uri "networkx" version))
5844 (sha256
5845 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5846 (build-system python-build-system)
5847 ;; python-decorator is needed at runtime
5848 (propagated-inputs
5849 `(("python-decorator" ,python-decorator)))
5850 (native-inputs
5851 `(("python-nose" ,python-nose)))
5852 (home-page "http://networkx.github.io/")
5853 (synopsis "Python module for creating and manipulating graphs and networks")
5854 (description
5855 "NetworkX is a Python package for the creation, manipulation, and study
5856 of the structure, dynamics, and functions of complex networks.")
5857 (license license:bsd-3)))
5858
5859 (define-public python2-networkx
5860 (package-with-python2 python-networkx))
5861
5862 (define-public snakemake
5863 (package
5864 (name "snakemake")
5865 (version "3.11.2")
5866 (source
5867 (origin
5868 (method url-fetch)
5869 (uri (pypi-uri "snakemake" version))
5870 (sha256
5871 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
5872 (build-system python-build-system)
5873 (arguments
5874 ;; TODO: Package missing test dependencies.
5875 '(#:tests? #f))
5876 (propagated-inputs
5877 `(("python-wrapt" ,python-wrapt)
5878 ("python-requests" ,python-requests)))
5879 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5880 (synopsis "Python-based execution environment for make-like workflows")
5881 (description
5882 "Snakemake aims to reduce the complexity of creating workflows by
5883 providing a clean and modern domain specific specification language (DSL) in
5884 Python style, together with a fast and comfortable execution environment.")
5885 (license license:expat)))
5886
5887 (define-public python-seaborn
5888 (package
5889 (name "python-seaborn")
5890 (version "0.7.1")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (pypi-uri "seaborn" version))
5895 (sha256
5896 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5897 (build-system python-build-system)
5898 (arguments
5899 '(#:tests? #f)) ; Tests requires a running X11 server.
5900 (propagated-inputs
5901 `(("python-pandas" ,python-pandas)
5902 ("python-matplotlib" ,python-matplotlib)
5903 ("python-scipy" ,python-scipy)))
5904 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5905 (synopsis "Statistical data visualization")
5906 (description
5907 "Seaborn is a library for making attractive and informative statistical
5908 graphics in Python. It is built on top of matplotlib and tightly integrated
5909 with the PyData stack, including support for numpy and pandas data structures
5910 and statistical routines from scipy and statsmodels.")
5911 (license license:bsd-3)
5912 (properties `((python2-variant . ,(delay python2-seaborn))))))
5913
5914 (define-public python2-seaborn
5915 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5916 (package
5917 (inherit base)
5918 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5919 ,@(package-propagated-inputs base))))))
5920
5921 (define-public python-mpmath
5922 (package
5923 (name "python-mpmath")
5924 (version "0.19")
5925 (source (origin
5926 (method url-fetch)
5927 (uri (string-append "http://mpmath.org/files/mpmath-"
5928 version ".tar.gz"))
5929 (sha256
5930 (base32
5931 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5932 (build-system python-build-system)
5933 (arguments
5934 '(#:phases
5935 (modify-phases %standard-phases
5936 (replace 'check
5937 (lambda _
5938 (zero?
5939 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5940 (home-page "http://mpmath.org")
5941 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5942 (description
5943 "@code{mpmath} can be used as an arbitrary-precision substitute for
5944 Python's float/complex types and math/cmath modules, but also does much
5945 more advanced mathematics.")
5946 (license license:bsd-3)))
5947
5948 (define-public python2-mpmath
5949 (package-with-python2 python-mpmath))
5950
5951 (define-public python-sympy
5952 (package
5953 (name "python-sympy")
5954 (version "1.0")
5955 (source
5956 (origin
5957 (method url-fetch)
5958 (uri (string-append
5959 "https://github.com/sympy/sympy/releases/download/sympy-"
5960 version "/sympy-" version ".tar.gz"))
5961 (sha256
5962 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
5963 (build-system python-build-system)
5964 (propagated-inputs
5965 `(("python-mpmath" ,python-mpmath)))
5966 (home-page "http://www.sympy.org/")
5967 (synopsis "Python library for symbolic mathematics")
5968 (description
5969 "SymPy is a Python library for symbolic mathematics. It aims to become a
5970 full-featured computer algebra system (CAS) while keeping the code as simple
5971 as possible in order to be comprehensible and easily extensible.")
5972 (license license:bsd-3)))
5973
5974 (define-public python2-sympy
5975 (package-with-python2 python-sympy))
5976
5977 (define-public python-q
5978 (package
5979 (name "python-q")
5980 (version "2.6")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "q" version))
5985 (sha256
5986 (base32
5987 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5988 (build-system python-build-system)
5989 (home-page "https://github.com/zestyping/q")
5990 (synopsis "Quick-and-dirty debugging output for tired programmers")
5991 (description
5992 "q is a Python module for \"print\" style of debugging Python code. It
5993 provides convenient short API for print out of values, tracebacks, and
5994 falling into the Python interpreter.")
5995 (license license:asl2.0)))
5996
5997 (define-public python2-q
5998 (package-with-python2 python-q))
5999
6000 (define-public python-testlib
6001 (package
6002 (name "python-testlib")
6003 (version "0.6.5")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (string-append
6008 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6009 version ".zip"))
6010 (sha256
6011 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6012 (build-system python-build-system)
6013 (native-inputs
6014 `(("unzip" ,unzip))) ; for unpacking the source
6015 (synopsis "Python micro test suite harness")
6016 (description "A micro unittest suite harness for Python.")
6017 (home-page "https://github.com/trentm/testlib")
6018 (license license:expat)))
6019
6020 (define-public python2-testlib
6021 (package-with-python2 python-testlib))
6022
6023 (define-public python2-xlib
6024 (package
6025 (name "python2-xlib")
6026 (version "0.14")
6027 (source (origin
6028 (method url-fetch)
6029 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6030 "/" version "/"
6031 "python-xlib-" version ".tar.gz"))
6032 (sha256
6033 (base32
6034 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6035 (build-system python-build-system)
6036 (arguments
6037 `(#:python ,python-2 ;Python 2 only
6038 #:tests? #f)) ;no tests
6039 (home-page "http://python-xlib.sourceforge.net/")
6040 (synopsis "Python X11 client library")
6041 (description
6042 "The Python X Library is intended to be a fully functional X client
6043 library for Python programs. It is useful to implement low-level X clients.
6044 It is written entirely in Python.")
6045 (license license:gpl2+)))
6046
6047 (define-public python-singledispatch
6048 (package
6049 (name "python-singledispatch")
6050 (version "3.4.0.3")
6051 (source
6052 (origin
6053 (method url-fetch)
6054 (uri (pypi-uri "singledispatch" version))
6055 (sha256
6056 (base32
6057 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6058 (build-system python-build-system)
6059 (native-inputs
6060 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6061 (home-page
6062 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6063 (synopsis "Backport of singledispatch feature from Python 3.4")
6064 (description
6065 "This library brings functools.singledispatch from Python 3.4 to Python
6066 2.6-3.3.")
6067 (license license:expat)))
6068
6069 (define-public python2-singledispatch
6070 (package-with-python2 python-singledispatch))
6071
6072 (define-public python-tornado
6073 (package
6074 (name "python-tornado")
6075 (version "4.3")
6076 (source
6077 (origin
6078 (method url-fetch)
6079 (uri (pypi-uri "tornado" version))
6080 (sha256
6081 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
6082 (build-system python-build-system)
6083 (arguments
6084 '(;; FIXME: Two tests error out with:
6085 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6086 ;; #:phases
6087 ;; (modify-phases %standard-phases
6088 ;; (replace 'check
6089 ;; (lambda _
6090 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6091 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6092 ;; (zero? (system* "python" "-m" "tornado.test")))))
6093 #:tests? #f))
6094 (native-inputs
6095 `(("python-certifi" ,python-certifi)))
6096 (propagated-inputs
6097 `(("python-backports-abc" ,python-backports-abc)))
6098 (home-page "http://www.tornadoweb.org/")
6099 (synopsis "Python web framework and asynchronous networking library")
6100 (description
6101 "Tornado is a Python web framework and asynchronous networking library,
6102 originally developed at FriendFeed. By using non-blocking network I/O,
6103 Tornado can scale to tens of thousands of open connections, making it ideal
6104 for long polling, WebSockets, and other applications that require a long-lived
6105 connection to each user.")
6106 (license license:asl2.0)
6107 (properties `((python2-variant . ,(delay python2-tornado))))))
6108
6109 (define-public python2-tornado
6110 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6111 (package (inherit tornado)
6112 (propagated-inputs
6113 `(("python2-backport-ssl-match-hostname"
6114 ,python2-backport-ssl-match-hostname)
6115 ("python2-singledispatch" ,python2-singledispatch)
6116 ,@(package-propagated-inputs tornado))))))
6117
6118 ;; the python- version can be removed with python-3.5
6119 (define-public python-backports-abc
6120 (package
6121 (name "python-backports-abc")
6122 (version "0.5")
6123 (source
6124 (origin
6125 (method url-fetch)
6126 (uri (pypi-uri "backports_abc" version))
6127 (sha256
6128 (base32
6129 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6130 (build-system python-build-system)
6131 (home-page "https://github.com/cython/backports_abc")
6132 (synopsis "Backport of additions to the 'collections.abc' module")
6133 (description
6134 "Python-backports-abc provides a backport of additions to the
6135 'collections.abc' module in Python-3.5.")
6136 (license license:psfl)))
6137
6138 (define-public python2-backports-abc
6139 (package-with-python2 python-backports-abc))
6140
6141 (define-public python2-backports-shutil-get-terminal-size
6142 (package
6143 (name "python2-backports-shutil-get-terminal-size")
6144 (version "1.0.0")
6145 (source
6146 (origin
6147 (method url-fetch)
6148 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6149 (sha256
6150 (base32
6151 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6152 (build-system python-build-system)
6153 (arguments
6154 `(#:python ,python-2
6155 #:phases
6156 (modify-phases %standard-phases
6157 (replace 'check
6158 (lambda _
6159 (zero? (system* "py.test" "-v")))))))
6160 (native-inputs
6161 `(("python2-pytest" ,python2-pytest)))
6162 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6163 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6164 (description
6165 "This package provides a backport of the @code{get_terminal_size
6166 function} from Python 3.3's @code{shutil}.
6167 Unlike the original version it is written in pure Python rather than C,
6168 so it might be a tiny bit slower.")
6169 (license license:expat)))
6170
6171 (define-public python-waf
6172 (package
6173 (name "python-waf")
6174 (version "1.9.8")
6175 (source (origin
6176 (method url-fetch)
6177 (uri (string-append "https://waf.io/"
6178 "waf-" version ".tar.bz2"))
6179 (sha256
6180 (base32
6181 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6182 (build-system python-build-system)
6183 (arguments
6184 '(#:phases
6185 (modify-phases %standard-phases
6186 (replace 'build
6187 (lambda _
6188 (zero? (system* "python" "waf-light" "configure" "build"))))
6189 (replace 'check
6190 (lambda _
6191 (zero? (system* "python" "waf" "--version"))))
6192 (replace 'install
6193 (lambda _
6194 (copy-file "waf" %output))))))
6195 (home-page "https://waf.io/")
6196 (synopsis "Python-based build system")
6197 (description
6198 "Waf is a Python-based framework for configuring, compiling and installing
6199 applications.")
6200 (license license:bsd-3)))
6201
6202 (define-public python2-waf
6203 (package-with-python2 python-waf))
6204
6205 (define-public python-pyzmq
6206 (package
6207 (name "python-pyzmq")
6208 (version "15.1.0")
6209 (source
6210 (origin
6211 (method url-fetch)
6212 (uri (pypi-uri "pyzmq" version))
6213 (sha256
6214 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6215 (build-system python-build-system)
6216 (arguments
6217 `(#:configure-flags
6218 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6219 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6220 ;; --inplace' for 'python setup.py test' to work.
6221 #:tests? #f))
6222 (inputs
6223 `(("zeromq" ,zeromq)))
6224 (native-inputs
6225 `(("pkg-config" ,pkg-config)
6226 ("python-nose" ,python-nose)))
6227 (home-page "http://github.com/zeromq/pyzmq")
6228 (synopsis "Python bindings for 0MQ")
6229 (description
6230 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6231 (license license:bsd-4)))
6232
6233 (define-public python2-pyzmq
6234 (package-with-python2 python-pyzmq))
6235
6236 (define-public python-pep8
6237 (package
6238 (name "python-pep8")
6239 (version "1.7.0")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "pep8" version))
6244 (sha256
6245 (base32
6246 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6247 (build-system python-build-system)
6248 (home-page "http://pep8.readthedocs.org/")
6249 (synopsis "Python style guide checker")
6250 (description
6251 "This tools checks Python code against some of the style conventions in
6252 PEP 8.")
6253 (license license:expat)))
6254
6255 (define-public python2-pep8
6256 (package-with-python2 python-pep8))
6257
6258 (define-public python-pyflakes
6259 (package
6260 (name "python-pyflakes")
6261 (version "1.0.0")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "pyflakes" version))
6266 (sha256
6267 (base32
6268 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6269 (build-system python-build-system)
6270 (home-page
6271 "https://github.com/pyflakes/pyflakes")
6272 (synopsis "Passive checker of Python programs")
6273 (description
6274 "Pyflakes statically checks Python source code for common errors.")
6275 (license license:expat)))
6276
6277 (define-public python2-pyflakes
6278 (package-with-python2 python-pyflakes))
6279
6280 (define-public python-mccabe
6281 (package
6282 (name "python-mccabe")
6283 (version "0.4.0")
6284 (source
6285 (origin
6286 (method url-fetch)
6287 (uri (pypi-uri "mccabe" version))
6288 (sha256
6289 (base32
6290 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6291 (build-system python-build-system)
6292 (native-inputs
6293 `(("python-pytest" ,python-pytest)
6294 ("python-pytest-runner" ,python-pytest-runner)))
6295 (home-page "https://github.com/flintwork/mccabe")
6296 (synopsis "McCabe checker, plugin for flake8")
6297 (description
6298 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6299 complexity of Python source code.")
6300 (license license:expat)))
6301
6302 (define-public python2-mccabe
6303 (package-with-python2 python-mccabe))
6304
6305 (define-public python-mccabe-0.2.1
6306 (package (inherit python-mccabe)
6307 (version "0.2.1")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "mccabe" version))
6312 (sha256
6313 (base32
6314 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6315
6316 (define-public python2-mccabe-0.2.1
6317 (package-with-python2 python-mccabe-0.2.1))
6318
6319 ;; Flake8 2.4.1 requires an older version of pep8.
6320 ;; This should be removed ASAP.
6321 (define-public python-pep8-1.5.7
6322 (package (inherit python-pep8)
6323 (version "1.5.7")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (string-append
6328 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6329 version
6330 ".tar.gz"))
6331 (sha256
6332 (base32
6333 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6334 (arguments
6335 ;; XXX Tests not compatible with Python 3.5.
6336 '(#:tests? #f))))
6337
6338 (define-public python2-pep8-1.5.7
6339 (package-with-python2 python-pep8-1.5.7))
6340
6341 ;; Flake8 2.4.1 requires an older version of pyflakes.
6342 ;; This should be removed ASAP.
6343 (define-public python-pyflakes-0.8.1
6344 (package (inherit python-pyflakes)
6345 (version "0.8.1")
6346 (source
6347 (origin
6348 (method url-fetch)
6349 (uri (string-append
6350 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6351 version
6352 ".tar.gz"))
6353 (sha256
6354 (base32
6355 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6356 (arguments
6357 ;; XXX Tests not compatible with Python 3.5.
6358 '(#:tests? #f))))
6359
6360 (define-public python2-pyflakes-0.8.1
6361 (package-with-python2 python-pyflakes-0.8.1))
6362
6363 (define-public python-flake8
6364 (package
6365 (name "python-flake8")
6366 (version "2.5.4")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "flake8" version))
6371 (sha256
6372 (base32
6373 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6374 (modules '((guix build utils)))
6375 (snippet
6376 '(begin
6377 ;; Remove pre-compiled .pyc files from source.
6378 (for-each delete-file-recursively
6379 (find-files "." "__pycache__" #:directories? #t))
6380 (for-each delete-file (find-files "." "\\.pyc$"))
6381 #t))))
6382 (build-system python-build-system)
6383 (propagated-inputs
6384 `(("python-pep8" ,python-pep8)
6385 ("python-pyflakes" ,python-pyflakes)
6386 ("python-mccabe" ,python-mccabe)))
6387 (native-inputs
6388 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6389 ("python-nose" ,python-nose)))
6390 (home-page "https://gitlab.com/pycqa/flake8")
6391 (synopsis
6392 "The modular source code checker: pep8, pyflakes and co")
6393 (description
6394 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6395 (license license:expat)))
6396
6397 (define-public python2-flake8
6398 (package-with-python2 python-flake8))
6399
6400 ;; This will only be needed by the python-hacking package and will not be
6401 ;; necessary once python-hacking > 0.10.2 is released.
6402 (define-public python-flake8-2.2.4
6403 (package (inherit python-flake8)
6404 (propagated-inputs
6405 `(("python-pep8" ,python-pep8-1.5.7)
6406 ("python-pyflakes" ,python-pyflakes-0.8.1)
6407 ("python-mccabe" ,python-mccabe-0.2.1)))
6408 (native-inputs
6409 `(("python-mock" ,python-mock)
6410 ("python-nose" ,python-nose)))
6411 (version "2.2.4")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "flake8" version))
6416 (sha256
6417 (base32
6418 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6419 (modules '((guix build utils)))
6420 (snippet
6421 '(begin
6422 ;; Remove pre-compiled .pyc files from source.
6423 (for-each delete-file-recursively
6424 (find-files "." "__pycache__" #:directories? #t))
6425 (for-each delete-file (find-files "." "\\.pyc$"))
6426 #t))))
6427 (arguments
6428 ;; XXX Fails with Python 3.5.
6429 '(#:tests? #f))))
6430
6431 (define-public python2-flake8-2.2.4
6432 (package-with-python2 python-flake8-2.2.4))
6433
6434 (define-public python-flake8-polyfill
6435 (package
6436 (name "python-flake8-polyfill")
6437 (version "1.0.1")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "flake8-polyfill" version))
6442 (sha256
6443 (base32
6444 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6445 (build-system python-build-system)
6446 (arguments
6447 '(#:phases
6448 (modify-phases %standard-phases
6449 (replace 'check
6450 (lambda _
6451 (setenv "PYTHONPATH"
6452 (string-append (getcwd) "/build/lib:"
6453 (getenv "PYTHONPATH")))
6454 (zero? (system* "py.test" "-v")))))))
6455 (native-inputs
6456 `(("python-flake8" ,python-flake8)
6457 ("python-mock" ,python-mock)
6458 ("python-pycodestyle" ,python-pycodestyle)
6459 ("python-pytest" ,python-pytest)))
6460 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6461 (synopsis "Polyfill package for Flake8 plugins")
6462 (description
6463 "This package that provides some compatibility helpers for Flake8
6464 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6465 (license license:expat)))
6466
6467 (define-public python2-flake8-polyfill
6468 (package-with-python2 python-flake8-polyfill))
6469
6470 (define-public python-mistune
6471 (package
6472 (name "python-mistune")
6473 (version "0.7.3")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "mistune" version))
6478 (sha256
6479 (base32
6480 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6481 (build-system python-build-system)
6482 (native-inputs
6483 `(("python-nose" ,python-nose)
6484 ("python-cython" ,python-cython)))
6485 (home-page "https://github.com/lepture/mistune")
6486 (synopsis "Markdown parser in pure Python")
6487 (description "This package provides a fast markdown parser in pure
6488 Python.")
6489 (license license:bsd-3)))
6490
6491 (define-public python2-mistune
6492 (package-with-python2 python-mistune))
6493
6494 (define-public python-markdown
6495 (package
6496 (name "python-markdown")
6497 (version "2.6.8")
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (pypi-uri "Markdown" version))
6502 (sha256
6503 (base32
6504 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6505 (build-system python-build-system)
6506 (arguments
6507 `(#:phases
6508 (modify-phases %standard-phases
6509 (replace 'check
6510 (lambda _
6511 (zero? (system* "python" "run-tests.py")))))))
6512 (native-inputs
6513 `(("python-nose" ,python-nose)
6514 ("python-pyyaml" ,python-pyyaml)))
6515 (home-page "https://pythonhosted.org/Markdown/")
6516 (synopsis "Python implementation of Markdown")
6517 (description
6518 "This package provides a Python implementation of John Gruber's
6519 Markdown. The library features international input, various Markdown
6520 extensions, and several HTML output formats. A command line wrapper
6521 markdown_py is also provided to convert Markdown files to HTML.")
6522 (license license:bsd-3)))
6523
6524 (define-public python2-markdown
6525 (package-with-python2 python-markdown))
6526
6527 (define-public python-ptyprocess
6528 (package
6529 (name "python-ptyprocess")
6530 (version "0.5.1")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (string-append
6535 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6536 version ".tar.gz"))
6537 (sha256
6538 (base32
6539 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6540 (build-system python-build-system)
6541 (native-inputs
6542 `(("python-nose" ,python-nose)))
6543 (arguments
6544 `(#:phases
6545 (modify-phases %standard-phases
6546 (replace 'check
6547 (lambda _
6548 (zero? (system* "nosetests")))))))
6549 (home-page "https://github.com/pexpect/ptyprocess")
6550 (synopsis "Run a subprocess in a pseudo terminal")
6551 (description
6552 "This package provides a Python library used to launch a subprocess in a
6553 pseudo terminal (pty), and interact with both the process and its pty.")
6554 (license license:isc)))
6555
6556 (define-public python2-ptyprocess
6557 (package-with-python2 python-ptyprocess))
6558
6559 (define-public python-cram
6560 (package
6561 (name "python-cram")
6562 (version "0.7")
6563 (home-page "https://bitheap.org/cram/")
6564 (source (origin
6565 (method url-fetch)
6566 (uri (list (string-append home-page "cram-"
6567 version ".tar.gz")
6568 (pypi-uri "cram" version)))
6569 (sha256
6570 (base32
6571 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6572 (arguments
6573 '(#:phases
6574 (modify-phases %standard-phases
6575 (add-after 'unpack 'patch-source
6576 (lambda _
6577 (substitute* (find-files "cram" ".*\\.py$")
6578 ;; Replace default shell path.
6579 (("/bin/sh") (which "sh")))
6580 (substitute* (find-files "tests" ".*\\.t$")
6581 (("md5") "md5sum")
6582 (("/bin/bash") (which "bash"))
6583 (("/bin/sh") (which "sh")))
6584 (substitute* "cram/_test.py"
6585 ;; This hack works around a bug triggered by substituting
6586 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6587 ;; "cram -h", which breaks the output at 80 characters. This
6588 ;; causes the line showing the default shell to break into two
6589 ;; lines, but the test expects a single line...
6590 (("env\\['COLUMNS'\\] = '80'")
6591 "env['COLUMNS'] = '160'"))
6592 #t))
6593 (delete 'check)
6594 (add-after 'install 'check
6595 ;; The test phase uses the built library and executable.
6596 ;; It's easier to run it after install since the build
6597 ;; directory contains version-specific PATH.
6598 (lambda* (#:key inputs outputs #:allow-other-keys)
6599 (add-installed-pythonpath inputs outputs)
6600 (setenv "PATH" (string-append (getenv "PATH") ":"
6601 (assoc-ref outputs "out") "/bin"))
6602 (zero? (system* "make" "test")))))))
6603 (build-system python-build-system)
6604 (native-inputs
6605 `(("python-coverage" ,python-coverage)
6606 ("which" ,which)))
6607 (synopsis "Simple testing framework for command line applications")
6608 (description
6609 "Cram is a functional testing framework for command line applications.
6610 Cram tests look like snippets of interactive shell sessions. Cram runs each
6611 command and compares the command output in the test with the command’s actual
6612 output.")
6613 (license license:gpl2+)))
6614
6615 (define-public python2-cram
6616 (package-with-python2 python-cram))
6617
6618 (define-public python-terminado
6619 (package
6620 (name "python-terminado")
6621 (version "0.6")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "terminado" version))
6626 (sha256
6627 (base32
6628 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6629 (build-system python-build-system)
6630 (propagated-inputs
6631 `(("python-tornado" ,python-tornado)
6632 ("python-ptyprocess" ,python-ptyprocess)))
6633 (native-inputs
6634 `(("python-nose" ,python-nose)))
6635 (arguments
6636 `(#:phases
6637 (modify-phases %standard-phases
6638 (replace 'check
6639 (lambda _
6640 (zero? (system* "nosetests")))))))
6641 (home-page "https://github.com/takluyver/terminado")
6642 (synopsis "Terminals served to term.js using Tornado websockets")
6643 (description "This package provides a Tornado websocket backend for the
6644 term.js Javascript terminal emulator library.")
6645 (license license:bsd-2)
6646 (properties `((python2-variant . ,(delay python2-terminado))))))
6647
6648 (define-public python2-terminado
6649 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6650 (package (inherit terminado)
6651 (propagated-inputs
6652 `(("python2-backport-ssl-match-hostname"
6653 ,python2-backport-ssl-match-hostname)
6654 ,@(package-propagated-inputs terminado))))))
6655
6656 (define-public python-straight-plugin
6657 (package
6658 (name "python-straight-plugin")
6659 (version "1.4.1")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "straight.plugin" version))
6664 (sha256
6665 (base32
6666 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6667 (build-system python-build-system)
6668 (home-page "https://github.com/ironfroggy/straight.plugin")
6669 (synopsis "Simple namespaced plugin facility")
6670 (description "Straight Plugin provides a type of plugin you can create from
6671 almost any existing Python modules, and an easy way for outside developers to
6672 add functionality and customization to your projects with their own plugins.")
6673 (license license:expat)))
6674
6675 (define-public python2-straight-plugin
6676 (package-with-python2 python-straight-plugin))
6677
6678 (define-public python-fonttools
6679 (package
6680 (name "python-fonttools")
6681 (version "2.5")
6682 (source (origin
6683 (method url-fetch)
6684 (uri (string-append
6685 "https://pypi.python.org/packages/source/F/FontTools/"
6686 "fonttools-" version ".tar.gz"))
6687 (sha256
6688 (base32
6689 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6690 (build-system python-build-system)
6691 (arguments
6692 '(#:test-target "check"
6693 #:phases
6694 (modify-phases %standard-phases
6695 (add-after 'unpack 'patch-setuppy
6696 ;; Remove the undocumented "extra_path" argument, which adds an
6697 ;; intervening directories between site-packages and the package
6698 ;; directory.
6699 (lambda _
6700 (substitute* "setup.py"
6701 (("^[ \t]*extra_path *= *'FontTools',") ""))
6702 #t)))))
6703 (home-page "http://github.com/behdad/fonttools")
6704 (synopsis "Tools to manipulate font files")
6705 (description
6706 "FontTools/TTX is a library to manipulate font files from Python. It
6707 supports reading and writing of TrueType/OpenType fonts, reading and writing
6708 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6709 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6710 from an XML-based format.")
6711 (license (license:non-copyleft
6712 "file://LICENSE.txt"
6713 "See LICENSE.txt in the distribution."))))
6714
6715 (define-public python2-fonttools
6716 (package-with-python2 python-fonttools))
6717
6718 (define-public python-ly
6719 (package
6720 (name "python-ly")
6721 (version "0.9.4")
6722 (source
6723 (origin
6724 (method url-fetch)
6725 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6726 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6727 "/python-ly-" version ".tar.gz"))
6728 (sha256
6729 (base32
6730 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6731 (build-system python-build-system)
6732 (arguments
6733 ;; FIXME: Some tests need network access.
6734 '(#:tests? #f))
6735 (synopsis "Tool and library for manipulating LilyPond files")
6736 (description "This package provides a Python library to parse, manipulate
6737 or create documents in LilyPond format. A command line program ly is also
6738 provided that can be used to do various manipulations with LilyPond files.")
6739 (home-page "https://pypi.python.org/pypi/python-ly")
6740 (license license:gpl2+)))
6741
6742 (define-public python-appdirs
6743 (package
6744 (name "python-appdirs")
6745 (version "1.4.3")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (string-append
6750 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6751 version
6752 ".tar.gz"))
6753 (sha256
6754 (base32
6755 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6756 (build-system python-build-system)
6757 (home-page "http://github.com/ActiveState/appdirs")
6758 (synopsis
6759 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6760 (description
6761 "This module provides a portable way of finding out where user data
6762 should be stored on various operating systems.")
6763 (license license:expat)))
6764
6765 (define-public python2-appdirs
6766 (package-with-python2 python-appdirs))
6767
6768 (define-public python-llfuse
6769 (package
6770 (name "python-llfuse")
6771 (version "1.1.1")
6772 (source (origin
6773 (method url-fetch)
6774 (uri (string-append
6775 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6776 "llfuse-" version ".tar.bz2"))
6777 (sha256
6778 (base32
6779 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6780 (build-system python-build-system)
6781 (inputs
6782 `(("fuse" ,fuse)
6783 ("attr" ,attr)))
6784 (native-inputs
6785 `(("pkg-config" ,pkg-config)))
6786 (synopsis "Python bindings for FUSE")
6787 (description
6788 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6789 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6790 (license license:lgpl2.0+)
6791 (properties `((python2-variant . ,(delay python2-llfuse))))))
6792
6793 (define-public python2-llfuse
6794 (package (inherit (package-with-python2
6795 (strip-python2-variant python-llfuse)))
6796 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6797
6798 ;; For attic-0.16
6799 (define-public python-llfuse-0.41
6800 (package (inherit python-llfuse)
6801 (version "0.41.1")
6802 (source (origin
6803 (method url-fetch)
6804 (uri (string-append
6805 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6806 "llfuse-" version ".tar.bz2"))
6807 (sha256
6808 (base32
6809 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6810 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6811 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6812 (license (list license:expat license:lgpl2.0+))))
6813
6814 (define-public python-msgpack
6815 (package
6816 (name "python-msgpack")
6817 (version "0.4.8")
6818 (source (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "msgpack-python" version))
6821 (sha256
6822 (base32
6823 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6824 (build-system python-build-system)
6825 (synopsis "MessagePack (de)serializer")
6826 (description "MessagePack is a fast, compact binary serialization format,
6827 suitable for similar data to JSON. This package provides CPython bindings for
6828 reading and writing MessagePack data.")
6829 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6830 (license license:asl2.0)))
6831
6832 (define-public python2-msgpack
6833 (package-with-python2 python-msgpack))
6834
6835 (define-public python-netaddr
6836 (package
6837 (name "python-netaddr")
6838 (version "0.7.18")
6839 (source
6840 (origin
6841 (method url-fetch)
6842 (uri (string-append
6843 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6844 version
6845 ".tar.gz"))
6846 (sha256
6847 (base32
6848 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6849 (build-system python-build-system)
6850 (arguments `(#:tests? #f)) ;; No tests.
6851 (home-page "https://github.com/drkjam/netaddr/")
6852 (synopsis "Pythonic manipulation of network addresses")
6853 (description
6854 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6855 and MAC network addresses.")
6856 (license license:bsd-3)))
6857
6858 (define-public python2-netaddr
6859 (package-with-python2 python-netaddr))
6860
6861 (define-public python-wrapt
6862 (package
6863 (name "python-wrapt")
6864 (version "1.10.8")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "wrapt" version))
6869 (sha256
6870 (base32
6871 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
6872 (build-system python-build-system)
6873 (arguments
6874 ;; Tests are not included in the tarball, they are only available in the
6875 ;; git repository.
6876 `(#:tests? #f))
6877 (home-page "https://github.com/GrahamDumpleton/wrapt")
6878 (synopsis "Module for decorators, wrappers and monkey patching")
6879 (description
6880 "The aim of the wrapt module is to provide a transparent object proxy for
6881 Python, which can be used as the basis for the construction of function
6882 wrappers and decorator functions.")
6883 (license license:bsd-2)))
6884
6885 (define-public python2-wrapt
6886 (package-with-python2 python-wrapt))
6887
6888 (define-public python-iso8601
6889 (package
6890 (name "python-iso8601")
6891 (version "0.1.11")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (pypi-uri "iso8601" version))
6896 (sha256
6897 (base32
6898 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6899 (build-system python-build-system)
6900 (native-inputs
6901 `(("python-pytest" ,python-pytest)))
6902 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6903 (synopsis "Module to parse ISO 8601 dates")
6904 (description
6905 "This module parses the most common forms of ISO 8601 date strings (e.g.
6906 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6907 (license license:expat)))
6908
6909 (define-public python2-iso8601
6910 (package-with-python2 python-iso8601))
6911
6912 (define-public python-monotonic
6913 (package
6914 (name "python-monotonic")
6915 (version "0.3")
6916 (source
6917 (origin
6918 (method url-fetch)
6919 (uri (string-append
6920 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6921 version
6922 ".tar.gz"))
6923 (sha256
6924 (base32
6925 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6926 (build-system python-build-system)
6927 (home-page "https://github.com/atdt/monotonic")
6928 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6929 (description
6930 "This module provides a monotonic() function which returns the value (in
6931 fractional seconds) of a clock which never goes backwards.")
6932 (license license:asl2.0)))
6933
6934 (define-public python2-monotonic
6935 (package-with-python2 python-monotonic))
6936
6937 (define-public python-webob
6938 (package
6939 (name "python-webob")
6940 (version "1.5.1")
6941 (source
6942 (origin
6943 (method url-fetch)
6944 (uri (pypi-uri "WebOb" version))
6945 (sha256
6946 (base32
6947 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6948 (build-system python-build-system)
6949 (native-inputs
6950 `(("python-nose" ,python-nose)))
6951 (home-page "http://webob.org/")
6952 (synopsis "WSGI request and response object")
6953 (description
6954 "WebOb provides wrappers around the WSGI request environment, and an
6955 object to help create WSGI responses.")
6956 (license license:expat)))
6957
6958 (define-public python2-webob
6959 (package-with-python2 python-webob))
6960
6961 (define-public python-xlrd
6962 (package
6963 (name "python-xlrd")
6964 (version "1.0.0")
6965 (source (origin
6966 (method url-fetch)
6967 (uri (pypi-uri "xlrd" version))
6968 (sha256
6969 (base32
6970 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6971 (build-system python-build-system)
6972 (arguments
6973 `(#:phases
6974 (modify-phases %standard-phases
6975 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6976 ;; run tests instead for now.
6977 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6978 (native-inputs `(("python-nose" ,python-nose)))
6979 (home-page "http://www.python-excel.org/")
6980 (synopsis "Library for extracting data from Excel files")
6981 (description "This packages provides a library to extract data from
6982 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6983 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6984 Unicode-aware. It is not intended as an end-user tool.")
6985 (license license:bsd-3)))
6986
6987 (define-public python2-xlrd
6988 (package-with-python2 python-xlrd))
6989
6990 (define-public python-prettytable
6991 (package
6992 (name "python-prettytable")
6993 (version "0.7.2")
6994 (source
6995 (origin
6996 (method url-fetch)
6997 (uri (string-append
6998 "https://pypi.python.org/packages/source/P/PrettyTable/"
6999 "prettytable-" version ".tar.bz2"))
7000 (sha256
7001 (base32
7002 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7003 (build-system python-build-system)
7004 (home-page "http://code.google.com/p/prettytable/")
7005 (synopsis "Display tabular data in an ASCII table format")
7006 (description
7007 "A library designed to represent tabular data in visually appealing ASCII
7008 tables. PrettyTable allows for selection of which columns are to be printed,
7009 independent alignment of columns (left or right justified or centred) and
7010 printing of sub-tables by specifying a row range.")
7011 (license license:bsd-3)))
7012
7013 (define-public python2-prettytable
7014 (package-with-python2 python-prettytable))
7015
7016 (define-public python-tables
7017 (package
7018 (name "python-tables")
7019 (version "3.2.2")
7020 (source
7021 (origin
7022 (method url-fetch)
7023 (uri (pypi-uri "tables" version))
7024 (sha256
7025 (base32
7026 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7027 (modules '((guix build utils)))
7028 (snippet
7029 '(begin
7030 ;; Remove pre-compiled .pyc files from source.
7031 (for-each delete-file-recursively
7032 (find-files "." "__pycache__" #:directories? #t))
7033 (for-each delete-file (find-files "." "\\.pyc$"))
7034 #t))))
7035 (build-system python-build-system)
7036 (arguments
7037 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7038 ;; or "check", so we must override the build and check phases.
7039 #:phases
7040 (modify-phases %standard-phases
7041 (add-after 'unpack 'use-gcc
7042 (lambda _
7043 (substitute* "setup.py"
7044 (("compiler = new_compiler\\(\\)" line)
7045 (string-append line
7046 "\ncompiler.set_executables(compiler='gcc',"
7047 "compiler_so='gcc',"
7048 "linker_exe='gcc',"
7049 "linker_so='gcc -shared')")))
7050 #t))
7051 (replace 'build
7052 (lambda* (#:key inputs #:allow-other-keys)
7053 (zero? (system* "python" "setup.py" "build"
7054 (string-append "--hdf5="
7055 (assoc-ref inputs "hdf5"))))))
7056 (replace 'check
7057 (lambda* (#:key inputs #:allow-other-keys)
7058 (zero? (system* "python" "setup.py" "check"
7059 (string-append "--hdf5="
7060 (assoc-ref inputs "hdf5")))))))))
7061 (propagated-inputs
7062 `(("python-numexpr" ,python-numexpr)
7063 ("python-numpy" ,python-numpy)))
7064 (native-inputs
7065 `(("python-cython" ,python-cython)
7066 ("pkg-config" ,pkg-config)))
7067 (inputs
7068 `(("hdf5" ,hdf5)
7069 ("bzip2" ,bzip2)
7070 ("zlib" ,zlib)))
7071 (home-page "http://www.pytables.org/")
7072 (synopsis "Hierarchical datasets for Python")
7073 (description "PyTables is a package for managing hierarchical datasets and
7074 designed to efficently cope with extremely large amounts of data.")
7075 (license license:bsd-3)))
7076
7077 (define-public python2-tables
7078 (package-with-python2 python-tables))
7079
7080 (define-public python-pyasn1
7081 (package
7082 (name "python-pyasn1")
7083 (version "0.1.9")
7084 (source
7085 (origin
7086 (method url-fetch)
7087 (uri (pypi-uri "pyasn1" version))
7088 (sha256
7089 (base32
7090 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7091 (build-system python-build-system)
7092 (home-page "http://pyasn1.sourceforge.net/")
7093 (synopsis "ASN.1 types and codecs")
7094 (description
7095 "This is an implementation of ASN.1 types and codecs in Python. It is
7096 suitable for a wide range of protocols based on the ASN.1 specification.")
7097 (license license:bsd-2)))
7098
7099 (define-public python2-pyasn1
7100 (package-with-python2 python-pyasn1))
7101
7102 (define-public python-pyasn1-modules
7103 (package
7104 (name "python-pyasn1-modules")
7105 (version "0.0.8")
7106 (source
7107 (origin
7108 (method url-fetch)
7109 (uri (pypi-uri "pyasn1-modules" version))
7110 (sha256
7111 (base32
7112 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7113 (build-system python-build-system)
7114 (propagated-inputs
7115 `(("python-pyasn1" ,python-pyasn1)))
7116 (home-page "https://sourceforge.net/projects/pyasn1/")
7117 (synopsis "ASN.1 codec implementations")
7118 (description
7119 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7120 implementations of ASN.1-based codecs and protocols.")
7121 (license license:bsd-3)))
7122
7123 (define-public python2-pyasn1-modules
7124 (package-with-python2 python-pyasn1-modules))
7125
7126 (define-public python-ipaddress
7127 (package
7128 (name "python-ipaddress")
7129 (version "1.0.18")
7130 (source (origin
7131 (method url-fetch)
7132 (uri (pypi-uri "ipaddress" version))
7133 (sha256
7134 (base32
7135 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7136 (build-system python-build-system)
7137 (home-page "https://github.com/phihag/ipaddress")
7138 (synopsis "IP address manipulation library")
7139 (description
7140 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7141 in Python. This library is used to create, poke at, and manipulate IPv4 and
7142 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7143 module to older versions of Python.")
7144 (license license:psfl)))
7145
7146 (define-public python2-ipaddress
7147 (package-with-python2 python-ipaddress))
7148
7149 (define-public python2-ipaddr
7150 (package
7151 (name "python2-ipaddr")
7152 (version "2.1.11")
7153 (source
7154 (origin
7155 (method url-fetch)
7156 (uri (pypi-uri "ipaddr" version))
7157 (sha256
7158 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7159 (build-system python-build-system)
7160 (arguments
7161 `(#:python ,python-2 ;version 2 only
7162 #:phases
7163 (modify-phases %standard-phases
7164 (replace 'check
7165 (lambda* _
7166 (zero? (system* "python" "ipaddr_test.py")))))))
7167 (home-page "https://github.com/google/ipaddr-py")
7168 (synopsis "IP address manipulation library")
7169 (description
7170 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7171 IPv6 addresses and networks.
7172
7173 For new implementations you may prefer to use the standard module
7174 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7175 versions of Python.")
7176 (license license:asl2.0)))
7177
7178 (define-public python-idna
7179 (package
7180 (name "python-idna")
7181 (version "2.0")
7182 (source
7183 (origin
7184 (method url-fetch)
7185 (uri (string-append "https://pypi.python.org/packages/source/i/"
7186 "idna/idna-" version ".tar.gz"))
7187 (sha256
7188 (base32
7189 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7190 (build-system python-build-system)
7191 (home-page "https://github.com/kjd/idna")
7192 (synopsis "Internationalized domain names in applications")
7193 (description
7194 "This is a library to support the Internationalised Domain Names in
7195 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7196 protocol is often referred to as “IDNA2008” and can produce different results
7197 from the earlier standard from 2003. The library is also intended to act as a
7198 suitable drop-in replacement for the “encodings.idna” module that comes with
7199 the Python standard library but currently only supports the older 2003
7200 specification.")
7201 (license license:bsd-4)))
7202
7203 (define-public python2-idna
7204 (package-with-python2 python-idna))
7205
7206 (define-public python-pretend
7207 (package
7208 (name "python-pretend")
7209 (version "1.0.8")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (string-append "https://pypi.python.org/packages/source/p/"
7214 "pretend/pretend-" version ".tar.gz"))
7215 (sha256
7216 (base32
7217 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7218 (build-system python-build-system)
7219 (home-page "https://github.com/alex/pretend")
7220 (synopsis "Library for stubbing in Python")
7221 (description
7222 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7223 technique for writing tests. You may hear the term mixed up with mocks,
7224 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7225 responses, rather than doing any computation.")
7226 (license license:bsd-3)))
7227
7228 (define-public python2-pretend
7229 (package-with-python2 python-pretend))
7230
7231 (define-public python-cryptography-vectors
7232 (package
7233 (name "python-cryptography-vectors")
7234 (version "1.7.1")
7235 (source
7236 (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "cryptography_vectors" version))
7239 (sha256
7240 (base32
7241 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
7242 (build-system python-build-system)
7243 (home-page "https://github.com/pyca/cryptography")
7244 (synopsis "Test vectors for the cryptography package")
7245 (description
7246 "This package contains test vectors for the cryptography package.")
7247 ;; Distributed under either BSD-3 or ASL2.0
7248 (license (list license:bsd-3 license:asl2.0))))
7249
7250 (define-public python2-cryptography-vectors
7251 (package-with-python2 python-cryptography-vectors))
7252
7253 (define-public python-cryptography
7254 (package
7255 (name "python-cryptography")
7256 (version "1.7.1")
7257 (source
7258 (origin
7259 (method url-fetch)
7260 (uri (pypi-uri "cryptography" version))
7261 (sha256
7262 (base32
7263 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
7264 (build-system python-build-system)
7265 (inputs
7266 `(("openssl" ,openssl)))
7267 (propagated-inputs
7268 `(("python-cffi" ,python-cffi)
7269 ("python-six" ,python-six)
7270 ("python-pyasn1" ,python-pyasn1)
7271 ("python-idna" ,python-idna)
7272 ("python-iso8601" ,python-iso8601)))
7273 (native-inputs
7274 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7275 ("python-hypothesis" ,python-hypothesis)
7276 ("python-pretend" ,python-pretend)
7277 ("python-pyasn1" ,python-pyasn1)
7278 ("python-pyasn1-modules" ,python-pyasn1-modules)
7279 ("python-pytz" ,python-pytz)
7280 ("python-pytest" ,python-pytest-2.9.2)))
7281 (home-page "https://github.com/pyca/cryptography")
7282 (synopsis "Cryptographic recipes and primitives for Python")
7283 (description
7284 "cryptography is a package which provides cryptographic recipes and
7285 primitives to Python developers. It aims to be the “cryptographic standard
7286 library” for Python. The package includes both high level recipes, and low
7287 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7288 message digests and key derivation functions.")
7289 ;; Distributed under either BSD-3 or ASL2.0
7290 (license (list license:bsd-3 license:asl2.0))
7291 (properties `((python2-variant . ,(delay python2-cryptography))))))
7292
7293 (define-public python2-cryptography
7294 (let ((crypto (package-with-python2
7295 (strip-python2-variant python-cryptography))))
7296 (package (inherit crypto)
7297 (propagated-inputs
7298 `(("python2-ipaddress" ,python2-ipaddress)
7299 ("python2-backport-ssl-match-hostname"
7300 ,python2-backport-ssl-match-hostname)
7301 ("python2-enum34" ,python2-enum34)
7302 ,@(package-propagated-inputs crypto))))))
7303
7304 (define-public python-pyopenssl
7305 (package
7306 (name "python-pyopenssl")
7307 (version "16.2.0")
7308 (source
7309 (origin
7310 (method url-fetch)
7311 (uri (pypi-uri "pyOpenSSL" version))
7312 (sha256
7313 (base32
7314 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7315 (patches
7316 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7317 (build-system python-build-system)
7318 (arguments
7319 '(#:phases
7320 (modify-phases %standard-phases
7321 (delete 'check)
7322 (add-after 'install 'check
7323 (lambda* (#:key inputs outputs #:allow-other-keys)
7324 (add-installed-pythonpath inputs outputs)
7325 (zero? (system* "py.test" "-v")))))))
7326 (propagated-inputs
7327 `(("python-cryptography" ,python-cryptography)
7328 ("python-six" ,python-six)))
7329 (inputs
7330 `(("openssl" ,openssl)))
7331 (native-inputs
7332 `(("python-pytest" ,python-pytest)))
7333 (home-page "https://github.com/pyca/pyopenssl")
7334 (synopsis "Python wrapper module around the OpenSSL library")
7335 (description
7336 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7337 library.")
7338 (license license:asl2.0)))
7339
7340 (define-public python2-pyopenssl
7341 (package-with-python2 python-pyopenssl))
7342
7343 (define-public python-pip
7344 (package
7345 (name "python-pip")
7346 (version "9.0.1")
7347 (source
7348 (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "pip" version))
7351 (sha256
7352 (base32
7353 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7354 (build-system python-build-system)
7355 (arguments
7356 '(#:tests? #f)) ; there are no tests in the pypi archive.
7357 (home-page "https://pip.pypa.io/")
7358 (synopsis "Package manager for Python software")
7359 (description
7360 "Pip is a package manager for Python software, that finds packages on the
7361 Python Package Index (PyPI).")
7362 (license license:expat)))
7363
7364 (define-public python2-pip
7365 (package-with-python2 python-pip))
7366
7367 (define-public python-tlsh
7368 (package
7369 (name "python-tlsh")
7370 (version "3.4.4")
7371 (home-page "https://github.com/trendmicro/tlsh")
7372 (source (origin
7373 (method url-fetch)
7374 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7375 version ".tar.gz"))
7376 (sha256
7377 (base32
7378 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7379 (file-name (string-append name "-" version ".tar.gz"))))
7380 (build-system cmake-build-system)
7381 (arguments
7382 '(#:out-of-source? #f
7383 #:phases (modify-phases %standard-phases
7384 (replace
7385 'install
7386 (lambda* (#:key outputs #:allow-other-keys)
7387 ;; Build and install the Python bindings. The underlying
7388 ;; C++ library is apparently not meant to be installed.
7389 (let ((out (assoc-ref outputs "out")))
7390 (with-directory-excursion "py_ext"
7391 (and (system* "python" "setup.py" "build")
7392 (system* "python" "setup.py" "install"
7393 (string-append "--prefix=" out))))))))))
7394 (inputs `(("python" ,python-wrapper))) ;for the bindings
7395 (synopsis "Fuzzy matching library for Python")
7396 (description
7397 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7398 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7399 value which can be used for similarity comparisons. Similar objects have
7400 similar hash values, which allows for the detection of similar objects by
7401 comparing their hash values. The byte stream should have a sufficient amount
7402 of complexity; for example, a byte stream of identical bytes will not generate
7403 a hash value.")
7404 (license license:asl2.0)))
7405
7406 (define-public python2-tlsh
7407 (package
7408 (inherit python-tlsh)
7409 (name "python2-tlsh")
7410 (inputs `(("python" ,python-2)))))
7411
7412 (define-public python-termcolor
7413 (package
7414 (name "python-termcolor")
7415 (version "1.1.0")
7416 (source
7417 (origin
7418 (method url-fetch)
7419 (uri (pypi-uri "python-termcolor" version))
7420 (sha256
7421 (base32
7422 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7423 (build-system python-build-system)
7424 (arguments
7425 ;; There are no tests.
7426 `(#:tests? #f))
7427 (home-page "http://pypi.python.org/pypi/termcolor")
7428 (synopsis "ANSII Color formatting for terminal output")
7429 (description
7430 "This package provides ANSII Color formatting for output in terminals.")
7431 (license license:expat)))
7432
7433 (define-public python2-termcolor
7434 (package-with-python2 python-termcolor))
7435
7436 (define-public python-libarchive-c
7437 (package
7438 (name "python-libarchive-c")
7439 (version "2.2")
7440 (source (origin
7441 (method url-fetch)
7442 (uri (pypi-uri "libarchive-c" version))
7443 (sha256
7444 (base32
7445 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7446 (build-system python-build-system)
7447 (arguments
7448 '(#:phases (modify-phases %standard-phases
7449 (add-before
7450 'build 'reference-libarchive
7451 (lambda* (#:key inputs #:allow-other-keys)
7452 ;; Retain the absolute file name of libarchive.so.
7453 (let ((libarchive (assoc-ref inputs "libarchive")))
7454 (substitute* "libarchive/ffi.py"
7455 (("find_library\\('archive'\\)")
7456 (string-append "'" libarchive
7457 "/lib/libarchive.so'")))))))))
7458 (inputs
7459 `(("libarchive" ,libarchive)))
7460 (home-page "https://github.com/Changaco/python-libarchive-c")
7461 (synopsis "Python interface to libarchive")
7462 (description
7463 "This package provides Python bindings to libarchive, a C library to
7464 access possibly compressed archives in many different formats. It uses
7465 Python's @code{ctypes} foreign function interface (FFI).")
7466 (license license:lgpl2.0+)))
7467
7468 (define-public python2-libarchive-c
7469 (package-with-python2 python-libarchive-c))
7470
7471 (define-public python-file
7472 (package
7473 (inherit file)
7474 (name "python-file")
7475 (source (origin
7476 (inherit (package-source file))
7477 ;; This patch should not be applied to python2-file.
7478 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7479 (build-system python-build-system)
7480 (arguments
7481 '(#:tests? #f ;no tests
7482 #:configure-flags '("--single-version-externally-managed" "--root=/")
7483 #:phases (modify-phases %standard-phases
7484 (add-before 'build 'change-directory
7485 (lambda _
7486 (chdir "python")
7487 #t))
7488 (add-before 'build 'set-library-file-name
7489 (lambda* (#:key inputs #:allow-other-keys)
7490 (let ((file (assoc-ref inputs "file")))
7491 (substitute* "magic.py"
7492 (("find_library\\('magic'\\)")
7493 (string-append "'" file "/lib/libmagic.so'")))
7494 #t))))))
7495 (inputs `(("file" ,file)))
7496 (self-native-input? #f)
7497 (synopsis "Python bindings to the libmagic file type guesser. Note that
7498 this module and the python-magic module both provide a \"magic.py\" file;
7499 these two modules, which are different and were developed separately, both
7500 serve the same purpose: provide Python bindings for libmagic.")))
7501
7502 (define-public python2-file
7503 (package-with-python2 python-file))
7504
7505 (define-public python-debian
7506 (package
7507 (name "python-debian")
7508 (version "0.1.28")
7509 (source
7510 (origin
7511 (method url-fetch)
7512 (uri (pypi-uri name version))
7513 (sha256
7514 (base32
7515 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7516 (build-system python-build-system)
7517 (propagated-inputs
7518 `(("python-six" ,python-six)))
7519 (home-page "http://packages.debian.org/sid/python-debian")
7520 (synopsis "Debian package related modules")
7521 (description
7522 ;; XXX: Use @enumerate instead of @itemize to work around
7523 ;; <http://bugs.gnu.org/21772>.
7524 "This package provides Python modules that abstract many formats of
7525 Debian-related files, such as:
7526
7527 @enumerate
7528 @item Debtags information;
7529 @item @file{debian/changelog} files;
7530 @item packages files, pdiffs;
7531 @item control files of single or multiple RFC822-style paragraphs---e.g.
7532 @file{debian/control}, @file{.changes}, @file{.dsc};
7533 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7534 contained files and meta-information.
7535 @end enumerate\n")
7536
7537 ;; Modules are either GPLv2+ or GPLv3+.
7538 (license license:gpl3+)))
7539
7540 (define-public python2-debian
7541 (package-with-python2 python-debian))
7542
7543 (define-public python-nbformat
7544 (package
7545 (name "python-nbformat")
7546 (version "4.1.0")
7547 (source
7548 (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "nbformat" version))
7551 (sha256
7552 (base32
7553 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7554 (build-system python-build-system)
7555 (arguments `(#:tests? #f)) ; no test target
7556 (propagated-inputs
7557 `(("python-ipython-genutils" ,python-ipython-genutils)
7558 ("python-jsonschema" ,python-jsonschema)
7559 ("python-jupyter-core" ,python-jupyter-core)
7560 ("python-traitlets" ,python-traitlets)))
7561 (home-page "http://jupyter.org")
7562 (synopsis "Jupyter Notebook format")
7563 (description "This package provides the reference implementation of the
7564 Jupyter Notebook format and Python APIs for working with notebooks.")
7565 (license license:bsd-3)))
7566
7567 (define-public python2-nbformat
7568 (package-with-python2 python-nbformat))
7569
7570 (define-public python-bleach
7571 (package
7572 (name "python-bleach")
7573 (version "1.4.3")
7574 (source
7575 (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "bleach" version))
7578 (sha256
7579 (base32
7580 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7581 (build-system python-build-system)
7582 (propagated-inputs
7583 `(("python-html5lib" ,python-html5lib-0.9)
7584 ("python-six" ,python-six)))
7585 (native-inputs
7586 `(("python-nose" ,python-nose)))
7587 (home-page "http://github.com/jsocol/bleach")
7588 (synopsis "Whitelist-based HTML-sanitizing tool")
7589 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7590 (license license:asl2.0)))
7591
7592 (define-public python2-bleach
7593 (package-with-python2 python-bleach))
7594
7595 (define-public python-entrypoints
7596 (package
7597 (name "python-entrypoints")
7598 (version "0.2.2")
7599 (source
7600 (origin
7601 (method url-fetch)
7602 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7603 version ".tar.gz"))
7604 (file-name (string-append name "-" version ".tar.gz"))
7605 (sha256
7606 (base32
7607 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7608 (build-system python-build-system)
7609 ;; The package does not come with a setup.py file, so we have to generate
7610 ;; one ourselves.
7611 (arguments
7612 `(#:tests? #f
7613 #:phases
7614 (modify-phases %standard-phases
7615 (add-after 'unpack 'create-setup.py
7616 (lambda _
7617 (call-with-output-file "setup.py"
7618 (lambda (port)
7619 (format port "\
7620 from setuptools import setup
7621 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7622 " ,version))))))))
7623 (home-page "https://github.com/takluyver/entrypoints")
7624 (synopsis "Discover and load entry points from installed Python packages")
7625 (description "Entry points are a way for Python packages to advertise
7626 objects with some common interface. The most common examples are
7627 @code{console_scripts} entry points, which define shell commands by
7628 identifying a Python function to run. The @code{entrypoints} module contains
7629 functions to find and load entry points.")
7630 (license license:expat)))
7631
7632 (define-public python2-entrypoints
7633 (package-with-python2 python-entrypoints))
7634
7635 (define-public python-nbconvert
7636 (package
7637 (name "python-nbconvert")
7638 (version "5.0.0b1")
7639 (source
7640 (origin
7641 (method url-fetch)
7642 (uri (pypi-uri "nbconvert" version))
7643 (sha256
7644 (base32
7645 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7646 (build-system python-build-system)
7647 (arguments
7648 `(;; The "bdist_egg" target is disabled by default, causing the installation
7649 ;; to fail.
7650 #:configure-flags (list "bdist_egg")
7651 ;; FIXME: 5 failures, 40 errors.
7652 #:tests? #f))
7653 ;; #:phases
7654 ;; (modify-phases %standard-phases
7655 ;; (replace 'check
7656 ;; (lambda _
7657 ;; (zero? (system* "py.test" "-v")))))
7658 (native-inputs
7659 `(("python-pytest" ,python-pytest)))
7660 (propagated-inputs
7661 `(("python-bleach" ,python-bleach)
7662 ("python-entrypoints" ,python-entrypoints)
7663 ("python-jinja2" ,python-jinja2)
7664 ("python-jupyter-core" ,python-jupyter-core)
7665 ("python-mistune" ,python-mistune)
7666 ("python-nbformat" ,python-nbformat)
7667 ("python-pygments" ,python-pygments)
7668 ("python-traitlets" ,python-traitlets)))
7669 (home-page "http://jupyter.org")
7670 (synopsis "Converting Jupyter Notebooks")
7671 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7672 notebooks to various other formats via Jinja templates. It allows you to
7673 convert an @code{.ipynb} notebook file into various static formats including:
7674
7675 @enumerate
7676 @item HTML
7677 @item LaTeX
7678 @item PDF
7679 @item Reveal JS
7680 @item Markdown (md)
7681 @item ReStructured Text (rst)
7682 @item executable script
7683 @end enumerate\n")
7684 (license license:bsd-3)))
7685
7686 (define-public python2-nbconvert
7687 (package-with-python2 python-nbconvert))
7688
7689 (define-public python-notebook
7690 (package
7691 (name "python-notebook")
7692 (version "4.2.3")
7693 (source (origin
7694 (method url-fetch)
7695 (uri (pypi-uri "notebook" version))
7696 (sha256
7697 (base32
7698 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7699 (build-system python-build-system)
7700 (arguments
7701 `(#:phases
7702 (modify-phases %standard-phases
7703 (replace 'check
7704 (lambda _
7705 ;; HOME must be set for tests
7706 (setenv "HOME" "/tmp")
7707 (zero? (system* "nosetests")))))))
7708 (propagated-inputs
7709 `(("python-jupyter-core" ,python-jupyter-core)
7710 ("python-nbformat" ,python-nbformat)
7711 ("python-nbconvert" ,python-nbconvert)
7712 ("python-ipython" ,python-ipython)))
7713 (native-inputs
7714 `(("python-nose" ,python-nose)
7715 ("python-sphinx" ,python-sphinx)
7716 ("python-requests" ,python-requests)))
7717 (home-page "http://jupyter.org/")
7718 (synopsis "Web-based notebook environment for interactive computing")
7719 (description
7720 "The Jupyter HTML notebook is a web-based notebook environment for
7721 interactive computing.")
7722 (properties `((python2-variant . ,(delay python2-notebook))))
7723 (license license:bsd-3)))
7724
7725 (define-public python2-notebook
7726 (let ((base (package-with-python2
7727 (strip-python2-variant python-notebook))))
7728 (package (inherit base)
7729 (native-inputs
7730 `(("python2-mock" ,python2-mock)
7731 ,@(package-native-inputs base)))
7732 (arguments
7733 (substitute-keyword-arguments (package-arguments base)
7734 ((#:phases phases)
7735 `(modify-phases ,phases
7736 (add-before 'check 'disable-test-case
7737 ;; The test requires network access to localhost. Curiously it
7738 ;; fails with Python 2 only. Simply make the test-case return
7739 ;; immediately.
7740 (lambda _
7741 (substitute*
7742 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7743 (("formats = self.nbconvert_api") "return #")))))))))))
7744
7745 (define-public python-widgetsnbextension
7746 (package
7747 (name "python-widgetsnbextension")
7748 (version "1.2.6")
7749 (source
7750 (origin
7751 (method url-fetch)
7752 (uri (pypi-uri "widgetsnbextension" version))
7753 (sha256
7754 (base32
7755 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7756 (build-system python-build-system)
7757 (propagated-inputs
7758 `(("python-notebook" ,python-notebook)))
7759 (native-inputs
7760 `(("python-certifi" ,python-certifi)
7761 ("python-nose" ,python-nose)))
7762 (home-page "http://ipython.org")
7763 (synopsis "IPython HTML widgets for Jupyter")
7764 (description "This package provides interactive HTML widgets for Jupyter
7765 notebooks.")
7766 (license license:bsd-3)))
7767
7768 (define-public python2-widgetsnbextension
7769 (package-with-python2 python-widgetsnbextension))
7770
7771 (define-public python-ipywidgets
7772 (package
7773 (name "python-ipywidgets")
7774 (version "5.2.2")
7775 (source
7776 (origin
7777 (method url-fetch)
7778 (uri (pypi-uri "ipywidgets" version))
7779 (sha256
7780 (base32
7781 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7782 (build-system python-build-system)
7783 ;; FIXME: it's not clear how to run the tests.
7784 (arguments `(#:tests? #f))
7785 (propagated-inputs
7786 `(("python-ipykernel" ,python-ipykernel)
7787 ("python-ipython" ,python-ipython)
7788 ("python-traitlets" ,python-traitlets)
7789 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7790 (home-page "http://ipython.org")
7791 (synopsis "IPython HTML widgets for Jupyter")
7792 (description "Ipywidgets are interactive HTML widgets for Jupyter
7793 notebooks and the IPython kernel. Notebooks come alive when interactive
7794 widgets are used. Users gain control of their data and can visualize changes
7795 in the data.")
7796 (license license:bsd-3)))
7797
7798 (define-public python2-ipywidgets
7799 (package-with-python2 python-ipywidgets))
7800
7801 (define-public python-jupyter-console
7802 (package
7803 (name "python-jupyter-console")
7804 (version "5.0.0")
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "jupyter_console" version))
7809 (sha256
7810 (base32
7811 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7812 (build-system python-build-system)
7813 ;; FIXME: it's not clear how to run the tests.
7814 (arguments `(#:tests? #f))
7815 (propagated-inputs
7816 `(("python-ipykernel" ,python-ipykernel)
7817 ("python-ipython" ,python-ipython)
7818 ("python-jupyter-client" ,python-jupyter-client)
7819 ("python-prompt-toolkit" ,python-prompt-toolkit)
7820 ("python-pygments" ,python-pygments)))
7821 (home-page "https://jupyter.org")
7822 (synopsis "Jupyter terminal console")
7823 (description "This package provides a terminal-based console frontend for
7824 Jupyter kernels. It also allows for console-based interaction with non-Python
7825 Jupyter kernels such as IJulia and IRKernel.")
7826 (license license:bsd-3)))
7827
7828 (define-public python2-jupyter-console
7829 (package-with-python2 python-jupyter-console))
7830
7831 (define-public jupyter
7832 (package
7833 (name "jupyter")
7834 (version "1.0.0")
7835 (source
7836 (origin
7837 (method url-fetch)
7838 (uri (pypi-uri "jupyter" version))
7839 (sha256
7840 (base32
7841 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7842 (build-system python-build-system)
7843 ;; FIXME: it's not clear how to run the tests.
7844 (arguments `(#:tests? #f))
7845 (propagated-inputs
7846 `(("python-ipykernel" ,python-ipykernel)
7847 ("python-ipywidgets" ,python-ipywidgets)
7848 ("python-jupyter-console" ,python-jupyter-console)
7849 ("python-nbconvert" ,python-nbconvert)
7850 ("python-notebook" ,python-notebook)))
7851 (home-page "http://jupyter.org")
7852 (synopsis "Web application for interactive documents")
7853 (description
7854 "The Jupyter Notebook is a web application that allows you to create and
7855 share documents that contain live code, equations, visualizations and
7856 explanatory text. Uses include: data cleaning and transformation, numerical
7857 simulation, statistical modeling, machine learning and much more.")
7858 (license license:bsd-3)))
7859
7860 (define-public python-chardet
7861 (package
7862 (name "python-chardet")
7863 (version "2.3.0")
7864 (source
7865 (origin
7866 (method url-fetch)
7867 (uri (string-append
7868 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7869 version
7870 ".tar.gz"))
7871 (sha256
7872 (base32
7873 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7874 (build-system python-build-system)
7875 (home-page "https://github.com/chardet/chardet")
7876 (synopsis "Universal encoding detector for Python 2 and 3")
7877 (description
7878 "This package provides @code{chardet}, a Python module that can
7879 automatically detect a wide range of file encodings.")
7880 (license license:lgpl2.1+)))
7881
7882 (define-public python2-chardet
7883 (package-with-python2 python-chardet))
7884
7885 (define-public python-docopt
7886 (package
7887 (name "python-docopt")
7888 (version "0.6.2")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 ;; The release on PyPI does not include tests.
7893 (uri (string-append
7894 "https://github.com/docopt/docopt/archive/"
7895 version ".tar.gz"))
7896 (file-name (string-append name "-" version ".tar.gz"))
7897 (sha256
7898 (base32
7899 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7900 (build-system python-build-system)
7901 (native-inputs
7902 `(("python-pytest" ,python-pytest)))
7903 (arguments
7904 `(#:phases (alist-replace
7905 'check
7906 (lambda _ (zero? (system* "py.test")))
7907 %standard-phases)))
7908 (home-page "http://docopt.org")
7909 (synopsis "Command-line interface description language for Python")
7910 (description "This library allows the user to define a command-line
7911 interface from a program's help message rather than specifying it
7912 programatically with command-line parsers like @code{getopt} and
7913 @code{argparse}.")
7914 (license license:expat)))
7915
7916 (define-public python2-docopt
7917 (package-with-python2 python-docopt))
7918
7919 (define-public python-zope-event
7920 (package
7921 (name "python-zope-event")
7922 (version "4.1.0")
7923 (source
7924 (origin
7925 (method url-fetch)
7926 (uri (string-append "https://pypi.python.org/packages/source/z"
7927 "/zope.event/zope.event-" version ".tar.gz"))
7928 (sha256
7929 (base32
7930 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7931 (build-system python-build-system)
7932 (home-page "http://pypi.python.org/pypi/zope.event")
7933 (synopsis "Event publishing system for Python")
7934 (description "Zope.event provides an event publishing API, intended for
7935 use by applications which are unaware of any subscribers to their events. It
7936 is a simple event-dispatching system on which more sophisticated event
7937 dispatching systems can be built.")
7938 (license license:zpl2.1)))
7939
7940 (define-public python2-zope-event
7941 (package-with-python2 python-zope-event))
7942
7943 (define-public python-zope-interface
7944 (package
7945 (name "python-zope-interface")
7946 (version "4.1.3")
7947 (source
7948 (origin
7949 (method url-fetch)
7950 (uri (string-append "https://pypi.python.org/packages/source/z"
7951 "/zope.interface/zope.interface-" version ".tar.gz"))
7952 (sha256
7953 (base32
7954 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7955 (build-system python-build-system)
7956 (native-inputs
7957 `(("python-zope-event" ,python-zope-event)))
7958 (home-page "https://github.com/zopefoundation/zope.interface")
7959 (synopsis "Python implementation of the \"design by contract\"
7960 methodology")
7961 (description "Zope.interface provides an implementation of \"object
7962 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7963 conforming to a given API or contract.")
7964 (license license:zpl2.1)))
7965
7966 (define-public python2-zope-interface
7967 (package-with-python2 python-zope-interface))
7968
7969 (define-public python-zope-exceptions
7970 (package
7971 (name "python-zope-exceptions")
7972 (version "4.0.8")
7973 (source
7974 (origin
7975 (method url-fetch)
7976 (uri (string-append "https://pypi.python.org/packages/source/z"
7977 "/zope.exceptions/zope.exceptions-"
7978 version ".tar.gz"))
7979 (sha256
7980 (base32
7981 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7982 (build-system python-build-system)
7983 (arguments
7984 '(#:tests? #f)) ; circular dependency with zope.testrunner
7985 (propagated-inputs
7986 `(("python-zope-interface" ,python-zope-interface)))
7987 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7988 (synopsis "Zope exceptions")
7989 (description "Zope.exceptions provides general-purpose exception types
7990 that have uses outside of the Zope framework.")
7991 (license license:zpl2.1)))
7992
7993 (define-public python2-zope-exceptions
7994 (package-with-python2 python-zope-exceptions))
7995
7996 (define-public python-zope-testing
7997 (package
7998 (name "python-zope-testing")
7999 (version "4.5.0")
8000 (source
8001 (origin
8002 (method url-fetch)
8003 (uri (string-append "https://pypi.python.org/packages/source/z"
8004 "/zope.testing/zope.testing-" version ".tar.gz"))
8005 (sha256
8006 (base32
8007 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8008 (modules '((guix build utils)))
8009 (snippet
8010 '(begin
8011 ;; Remove pre-compiled .pyc files backup files from source.
8012 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8013 #t))))
8014 (build-system python-build-system)
8015 (native-inputs
8016 `(("python-zope-exceptions" ,python-zope-exceptions)))
8017 (propagated-inputs
8018 `(("python-zope-interface" ,python-zope-interface)))
8019 (home-page "http://pypi.python.org/pypi/zope.testing")
8020 (synopsis "Zope testing helpers")
8021 (description "Zope.testing provides a number of testing utilities for HTML
8022 forms, HTTP servers, regular expressions, and more.")
8023 (license license:zpl2.1)))
8024
8025 (define-public python2-zope-testing
8026 (package-with-python2 python-zope-testing))
8027
8028 (define-public python-zope-testrunner
8029 (package
8030 (name "python-zope-testrunner")
8031 (version "4.4.9")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (string-append "https://pypi.python.org/packages/source/z"
8036 "/zope.testrunner/zope.testrunner-"
8037 version ".zip"))
8038 (sha256
8039 (base32
8040 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8041 (build-system python-build-system)
8042 (arguments
8043 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8044 (native-inputs
8045 `(("python-six" ,python-six)
8046 ;("python-zope-interface" ,python-zope-interface)
8047 ("python-zope-exceptions" ,python-zope-exceptions)
8048 ("python-zope-testing" ,python-zope-testing)
8049 ("unzip" ,unzip)))
8050 (propagated-inputs
8051 `(("python-zope-interface" ,python-zope-interface)))
8052 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8053 (synopsis "Zope testrunner script")
8054 (description "Zope.testrunner provides a script for running Python
8055 tests.")
8056 (license license:zpl2.1)))
8057
8058 (define-public python2-zope-testrunner
8059 (let ((base (package-with-python2 python-zope-testrunner)))
8060 (package
8061 (inherit base)
8062 (native-inputs
8063 (append (package-native-inputs base)
8064 `(("python2-subunit" ,python2-subunit)
8065 ("python2-mimeparse" ,python2-mimeparse)))))))
8066
8067 (define-public python-zope-i18nmessageid
8068 (package
8069 (name "python-zope-i18nmessageid")
8070 (version "4.0.3")
8071 (source
8072 (origin
8073 (method url-fetch)
8074 (uri (string-append
8075 "https://pypi.python.org/packages/source/z"
8076 "/zope.i18nmessageid/zope.i18nmessageid-"
8077 version ".tar.gz"))
8078 (sha256
8079 (base32
8080 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8081 (build-system python-build-system)
8082 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8083 (synopsis "Message identifiers for internationalization")
8084 (description "Zope.i18nmessageid provides facilities for declaring
8085 internationalized messages within program source text.")
8086 (license license:zpl2.1)))
8087
8088 (define-public python2-zope-i18nmessageid
8089 (package-with-python2 python-zope-i18nmessageid))
8090
8091 (define-public python-zope-schema
8092 (package
8093 (name "python-zope-schema")
8094 (version "4.4.2")
8095 (source
8096 (origin
8097 (method url-fetch)
8098 (uri (string-append "https://pypi.python.org/packages/source/z"
8099 "/zope.schema/zope.schema-" version ".tar.gz"))
8100 (sha256
8101 (base32
8102 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8103 (build-system python-build-system)
8104 (arguments
8105 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8106 (propagated-inputs
8107 `(("python-zope-event" ,python-zope-event)
8108 ("python-zope-exceptions", python-zope-exceptions)
8109 ("python-zope-interface" ,python-zope-interface)))
8110 (native-inputs
8111 `(("python-zope-testing" ,python-zope-testing)
8112 ("python-coverage" ,python-coverage)
8113 ("python-nose" ,python-nose)))
8114 (home-page "http://pypi.python.org/pypi/zope.schema")
8115 (synopsis "Zope data schemas")
8116 (description "Zope.scheme provides extensions to zope.interface for
8117 defining data schemas.")
8118 (license license:zpl2.1)))
8119
8120 (define-public python2-zope-schema
8121 (package-with-python2 python-zope-schema))
8122
8123 (define-public python-zope-configuration
8124 (package
8125 (name "python-zope-configuration")
8126 (version "4.0.3")
8127 (source (origin
8128 (method url-fetch)
8129 (uri (string-append "https://pypi.python.org/packages/source/z"
8130 "/zope.configuration/zope.configuration-"
8131 version ".tar.gz"))
8132 (sha256
8133 (base32
8134 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8135 (build-system python-build-system)
8136 (arguments
8137 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8138 (propagated-inputs
8139 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8140 ("python-zope-schema" ,python-zope-schema)))
8141 (home-page "http://pypi.python.org/pypi/zope.configuration")
8142 (synopsis "Zope Configuration Markup Language")
8143 (description "Zope.configuration implements ZCML, the Zope Configuration
8144 Markup Language.")
8145 (license license:zpl2.1)))
8146
8147 (define-public python2-zope-configuration
8148 (package-with-python2 python-zope-configuration))
8149
8150 (define-public python-zope-proxy
8151 (package
8152 (name "python-zope-proxy")
8153 (version "4.1.6")
8154 (source
8155 (origin
8156 (method url-fetch)
8157 (uri (string-append "https://pypi.python.org/packages/source/z"
8158 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8159 (sha256
8160 (base32
8161 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8162 (build-system python-build-system)
8163 (arguments
8164 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8165 (propagated-inputs
8166 `(("python-zope-interface" ,python-zope-interface)))
8167 (home-page "http://pypi.python.org/pypi/zope.proxy")
8168 (synopsis "Generic, transparent proxies")
8169 (description "Zope.proxy provides generic, transparent proxies for Python.
8170 Proxies are special objects which serve as mostly-transparent wrappers around
8171 another object, intervening in the apparent behavior of the wrapped object
8172 only when necessary to apply the policy (e.g., access checking, location
8173 brokering, etc.) for which the proxy is responsible.")
8174 (license license:zpl2.1)))
8175
8176 (define-public python2-zope-proxy
8177 (package-with-python2 python-zope-proxy))
8178
8179 (define-public python-zope-location
8180 (package
8181 (name "python-zope-location")
8182 (version "4.0.3")
8183 (source
8184 (origin
8185 (method url-fetch)
8186 (uri (string-append "https://pypi.python.org/packages/source/z"
8187 "/zope.location/zope.location-" version ".tar.gz"))
8188 (sha256
8189 (base32
8190 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8191 (build-system python-build-system)
8192 (arguments
8193 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8194 (propagated-inputs
8195 `(("python-zope-proxy" ,python-zope-proxy)
8196 ("python-zope-schema" ,python-zope-schema)))
8197 (home-page "http://pypi.python.org/pypi/zope.location/")
8198 (synopsis "Zope location library")
8199 (description "Zope.location implements the concept of \"locations\" in
8200 Zope3, which are are special objects that have a structural location.")
8201 (license license:zpl2.1)))
8202
8203 (define-public python2-zope-location
8204 (package-with-python2 python-zope-location))
8205
8206 (define-public python-zope-security
8207 (package
8208 (name "python-zope-security")
8209 (version "4.0.3")
8210 (source
8211 (origin
8212 (method url-fetch)
8213 (uri (string-append "https://pypi.python.org/packages/source/z"
8214 "/zope.security/zope.security-" version ".tar.gz"))
8215 (sha256
8216 (base32
8217 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8218 (build-system python-build-system)
8219 (arguments
8220 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8221 (propagated-inputs
8222 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8223 ("python-zope-proxy" ,python-zope-proxy)
8224 ("python-zope-schema" ,python-zope-schema)))
8225 (native-inputs
8226 `(("python-six" ,python-six)
8227 ("python-zope-component" ,python-zope-component)
8228 ("python-zope-configuration" ,python-zope-configuration)
8229 ("python-zope-location" ,python-zope-location)
8230 ("python-zope-testrunner" ,python-zope-testrunner)
8231 ("python-zope-testing" ,python-zope-testing)))
8232 (home-page "http://pypi.python.org/pypi/zope.security")
8233 (synopsis "Zope security framework")
8234 (description "Zope.security provides a generic mechanism to implement
8235 security policies on Python objects.")
8236 (license license:zpl2.1)))
8237
8238 (define-public python2-zope-security
8239 (let ((zope-security (package-with-python2 python-zope-security)))
8240 (package (inherit zope-security)
8241 (propagated-inputs
8242 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8243 ,@(alist-delete
8244 "python-zope-testrunner"
8245 (package-propagated-inputs zope-security)))))))
8246
8247 (define-public python-zope-component
8248 (package
8249 (name "python-zope-component")
8250 (version "4.3.0")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "zope.component" version))
8255 (sha256
8256 (base32
8257 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8258 (build-system python-build-system)
8259 (arguments
8260 ;; Skip tests due to circular dependency with python-zope-security.
8261 '(#:tests? #f))
8262 (native-inputs
8263 `(("python-zope-testing" ,python-zope-testing)))
8264 (propagated-inputs
8265 `(("python-zope-event" ,python-zope-event)
8266 ("python-zope-interface" ,python-zope-interface)
8267 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8268 ("python-zope-configuration" ,python-zope-configuration)))
8269 (home-page "https://github.com/zopefoundation/zope.component")
8270 (synopsis "Zope Component Architecture")
8271 (description "Zope.component represents the core of the Zope Component
8272 Architecture. Together with the zope.interface package, it provides
8273 facilities for defining, registering and looking up components.")
8274 (license license:zpl2.1)))
8275
8276 (define-public python2-zope-component
8277 (package-with-python2 python-zope-component))
8278
8279 (define-public python-pythondialog
8280 (package
8281 (name "python-pythondialog")
8282 (version "3.4.0")
8283 (source
8284 (origin
8285 (method url-fetch)
8286 (uri (pypi-uri "pythondialog" version))
8287 (sha256
8288 (base32
8289 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8290 (build-system python-build-system)
8291 (arguments
8292 `(#:phases
8293 (modify-phases %standard-phases
8294 (add-after 'unpack 'patch-path
8295 (lambda* (#:key inputs #:allow-other-keys)
8296 (let* ((dialog (assoc-ref inputs "dialog")))
8297 ;; Since this library really wants to grovel the search path, we
8298 ;; must hardcode dialog's store path into it.
8299 (substitute* "dialog.py"
8300 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8301 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8302 #t))))
8303 #:tests? #f)) ; no test suite
8304 (propagated-inputs
8305 `(("dialog" ,dialog)))
8306 (home-page "http://pythondialog.sourceforge.net/")
8307 (synopsis "Python interface to the UNIX dialog utility")
8308 (description "A Python wrapper for the dialog utility. Its purpose is to
8309 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8310 This allows one to make simple text-mode user interfaces on Unix-like systems")
8311 (license license:lgpl2.1)
8312 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8313
8314 (define-public python2-pythondialog
8315 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8316 (package
8317 (inherit base)
8318 (version (package-version python-pythondialog))
8319 (source (origin
8320 (method url-fetch)
8321 (uri (pypi-uri "python2-pythondialog" version))
8322 (sha256
8323 (base32
8324 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8325
8326 (define-public python-pyrfc3339
8327 (package
8328 (name "python-pyrfc3339")
8329 (version "1.0")
8330 (source
8331 (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "pyRFC3339" version))
8334 (sha256
8335 (base32
8336 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8337 (build-system python-build-system)
8338 (propagated-inputs
8339 `(("python-pytz" ,python-pytz)))
8340 (native-inputs
8341 `(("python-nose" ,python-nose)))
8342 (home-page "https://github.com/kurtraschke/pyRFC3339")
8343 (synopsis "Python timestamp library")
8344 (description "Python library for generating and parsing RFC 3339-compliant
8345 timestamps.")
8346 (license license:expat)))
8347
8348 (define-public python2-pyrfc3339
8349 (package-with-python2 python-pyrfc3339))
8350
8351 (define-public python-werkzeug
8352 (package
8353 (name "python-werkzeug")
8354 (version "0.11.15")
8355 (source
8356 (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "Werkzeug" version))
8359 (sha256
8360 (base32
8361 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8362 (build-system python-build-system)
8363 (native-inputs
8364 `(("python-pytest" ,python-pytest)))
8365 (home-page "http://werkzeug.pocoo.org/")
8366 (synopsis "Utilities for WSGI applications")
8367 (description "One of the most advanced WSGI utility modules. It includes a
8368 powerful debugger, full-featured request and response objects, HTTP utilities to
8369 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8370 uploads, a powerful URL routing system and a bunch of community-contributed
8371 addon modules.")
8372 (license license:x11)))
8373
8374 (define-public python2-werkzeug
8375 (package-with-python2 python-werkzeug))
8376
8377 (define-public python-configobj
8378 (package
8379 (name "python-configobj")
8380 (version "5.0.6")
8381 (source (origin
8382 (method url-fetch)
8383 (uri (string-append
8384 "https://pypi.python.org/packages/source/c/configobj/"
8385 "configobj-" version ".tar.gz"))
8386 (sha256
8387 (base32
8388 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8389 ;; Patch setup.py so it looks for python-setuptools, which is
8390 ;; required to parse the keyword 'install_requires' in setup.py.
8391 (patches (search-patches "python-configobj-setuptools.patch"))))
8392 (build-system python-build-system)
8393 (propagated-inputs
8394 `(("python-six" ,python-six)))
8395 (synopsis "Config file reading, writing and validation")
8396 (description "ConfigObj is a simple but powerful config file reader and
8397 writer: an ini file round tripper. Its main feature is that it is very easy to
8398 use, with a straightforward programmer’s interface and a simple syntax for
8399 config files.")
8400 (home-page "https://github.com/DiffSK/configobj")
8401 (license license:bsd-3)))
8402
8403 (define-public python2-configobj
8404 (package-with-python2 python-configobj))
8405
8406 (define-public python-configargparse
8407 (package
8408 (name "python-configargparse")
8409 (version "0.10.0")
8410 (source (origin
8411 (method url-fetch)
8412 (uri (string-append
8413 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8414 "ConfigArgParse-" version ".tar.gz"))
8415 (sha256
8416 (base32
8417 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8418 (build-system python-build-system)
8419 (arguments
8420 ;; FIXME: Bug in test suite filed upstream:
8421 ;; https://github.com/bw2/ConfigArgParse/issues/32
8422 '(#:tests? #f))
8423 (synopsis "Replacement for argparse")
8424 (description "A drop-in replacement for argparse that allows options to also
8425 be set via config files and/or environment variables.")
8426 (home-page "https://github.com/bw2/ConfigArgParse")
8427 (license license:expat)))
8428
8429 (define-public python2-configargparse
8430 (package-with-python2 python-configargparse))
8431
8432 (define-public python-ndg-httpsclient
8433 (package
8434 (name "python-ndg-httpsclient")
8435 (version "0.4.2")
8436 (source (origin
8437 (method url-fetch)
8438 (uri (pypi-uri "ndg_httpsclient" version))
8439 (sha256
8440 (base32
8441 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8442 (build-system python-build-system)
8443 (arguments
8444 '(;; The tests appear to require networking.
8445 #:tests? #f))
8446 (propagated-inputs
8447 `(("python-pyopenssl" ,python-pyopenssl)))
8448 (synopsis "HTTPS support for Python's httplib and urllib2")
8449 (description "This is a HTTPS client implementation for httplib and urllib2
8450 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8451 over the default provided with Python and importantly enables full verification
8452 of the SSL peer.")
8453 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8454 (license license:bsd-3)))
8455
8456 ;; python2-openssl requires special care, so package-with-python2 is
8457 ;; insufficient.
8458 (define-public python2-ndg-httpsclient
8459 (package (inherit python-ndg-httpsclient)
8460 (name "python2-ndg-httpsclient")
8461 (arguments `(#:python ,python-2))
8462 (propagated-inputs
8463 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8464
8465 (define-public python-contextlib2
8466 (package
8467 (name "python-contextlib2")
8468 (version "0.4.0")
8469 (source
8470 (origin
8471 (method url-fetch)
8472 (uri (pypi-uri "contextlib2" version))
8473 (sha256
8474 (base32
8475 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8476 (build-system python-build-system)
8477 (arguments
8478 `(#:phases
8479 (modify-phases %standard-phases
8480 (replace 'check
8481 (lambda _ (zero?
8482 (system*
8483 "python" "test_contextlib2.py" "-v")))))))
8484 (home-page "http://contextlib2.readthedocs.org/")
8485 (synopsis "Tools for decorators and context managers")
8486 (description "This module is primarily a backport of the Python
8487 3.2 contextlib to earlier Python versions. Like contextlib, it
8488 provides utilities for common tasks involving decorators and context
8489 managers. It also contains additional features that are not part of
8490 the standard library.")
8491 (license license:psfl)))
8492
8493 (define-public python2-contextlib2
8494 (package-with-python2 python-contextlib2))
8495
8496 (define-public python-texttable
8497 (package
8498 (name "python-texttable")
8499 (version "0.8.7")
8500 (source
8501 (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "texttable" version))
8504 (sha256
8505 (base32
8506 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8507 (build-system python-build-system)
8508 (arguments '(#:tests? #f)) ; no tests
8509 (home-page "https://github.com/foutaise/texttable/")
8510 (synopsis "Python module for creating simple ASCII tables")
8511 (description "Texttable is a Python module for creating simple ASCII
8512 tables.")
8513 (license license:lgpl2.1+)))
8514
8515 (define-public python2-texttable
8516 (package-with-python2 python-texttable))
8517
8518 (define-public python-websocket-client
8519 (package
8520 (name "python-websocket-client")
8521 (version "0.37.0")
8522 (source
8523 (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "websocket_client" version))
8526 (sha256
8527 (base32
8528 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8529 (build-system python-build-system)
8530 (propagated-inputs
8531 `(("python-six" ,python-six)))
8532 (home-page "https://github.com/liris/websocket-client")
8533 (synopsis "WebSocket client for Python")
8534 (description "The Websocket-client module provides the low level APIs for
8535 WebSocket usage in Python programs.")
8536 (license license:lgpl2.1+)))
8537
8538 (define-public python2-websocket-client
8539 (package-with-python2 python-websocket-client))
8540
8541 (define-public python-atomicwrites
8542 (package
8543 (name "python-atomicwrites")
8544 (version "1.1.5")
8545 (source (origin
8546 (method url-fetch)
8547 (uri (pypi-uri "atomicwrites" version))
8548 (sha256
8549 (base32
8550 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8551 (build-system python-build-system)
8552 (synopsis "Atomic file writes in Python")
8553 (description "Library for atomic file writes using platform dependent tools
8554 for atomic file system operations.")
8555 (home-page "https://github.com/untitaker/python-atomicwrites")
8556 (license license:expat)))
8557
8558 (define-public python2-atomicwrites
8559 (package-with-python2 python-atomicwrites))
8560
8561 (define-public python-requests-toolbelt
8562 (package
8563 (name "python-requests-toolbelt")
8564 (version "0.6.2")
8565 (source (origin
8566 (method url-fetch)
8567 (uri (string-append
8568 "https://pypi.python.org/packages/"
8569 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8570 "requests-toolbelt-" version ".tar.gz"))
8571 (sha256
8572 (base32
8573 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8574 (build-system python-build-system)
8575 (native-inputs
8576 `(("python-betamax" ,python-betamax)
8577 ("python-mock" ,python-mock)
8578 ("python-pytest" ,python-pytest)))
8579 (propagated-inputs
8580 `(("python-requests" ,python-requests)))
8581 (synopsis "Extensions to python-requests")
8582 (description "This is a toolbelt of useful classes and functions to be used
8583 with python-requests.")
8584 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8585 (license license:asl2.0)))
8586
8587 (define-public python-click-threading
8588 (package
8589 (name "python-click-threading")
8590 (version "0.2.0")
8591 (source (origin
8592 (method url-fetch)
8593 (uri (string-append
8594 "https://pypi.python.org/packages/"
8595 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8596 "click-threading-" version ".tar.gz"))
8597 (sha256
8598 (base32
8599 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8600 (build-system python-build-system)
8601 (propagated-inputs
8602 `(("python-click" ,python-click)))
8603 (synopsis "Utilities for multithreading in Click")
8604 (description "This package provides utilities for multithreading in Click
8605 applications.")
8606 (home-page "https://github.com/click-contrib/click-threading")
8607 (license license:expat)))
8608
8609 (define-public python-click-log
8610 (package
8611 (name "python-click-log")
8612 (version "0.1.8")
8613 (source (origin
8614 (method url-fetch)
8615 (uri (pypi-uri "click-log" version))
8616 (sha256
8617 (base32
8618 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8619 (build-system python-build-system)
8620 (propagated-inputs
8621 `(("python-click" ,python-click)))
8622 (synopsis "Logging for click applications")
8623 (description "This package provides a Python library for logging Click
8624 applications.")
8625 (home-page "https://github.com/click-contrib/click-log")
8626 (license license:expat)))
8627
8628 (define-public python-apipkg
8629 (package
8630 (name "python-apipkg")
8631 (version "1.4")
8632 (source (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "apipkg" version))
8635 (sha256
8636 (base32
8637 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8638 (build-system python-build-system)
8639 (native-inputs
8640 `(("python-pytest" ,python-pytest)))
8641 (synopsis "Namespace control and lazy-import mechanism")
8642 (description "With apipkg you can control the exported namespace of a Python
8643 package and greatly reduce the number of imports for your users. It is a small
8644 pure Python module that works on virtually all Python versions.")
8645 (home-page "https://bitbucket.org/hpk42/apipkg")
8646 (license license:expat)))
8647
8648 (define-public python2-apipkg
8649 (package-with-python2 python-apipkg))
8650
8651 (define-public python-execnet
8652 (package
8653 (name "python-execnet")
8654 (version "1.4.1")
8655 (source (origin
8656 (method url-fetch)
8657 (uri (pypi-uri "execnet" version))
8658 (sha256
8659 (base32
8660 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8661 (build-system python-build-system)
8662 (arguments
8663 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8664 ;; The two test failures are caused by the lack of an `ssh` executable.
8665 ;; The test suite can be run with pytest after the 'install' phase.
8666 #:tests? #f))
8667 (native-inputs
8668 `(("python-pytest" ,python-pytest)
8669 ("python-setuptools-scm" ,python-setuptools-scm)))
8670 (propagated-inputs
8671 `(("python-apipkg" ,python-apipkg)))
8672 (synopsis "Rapid multi-Python deployment")
8673 (description "Execnet provides a share-nothing model with
8674 channel-send/receive communication for distributing execution across many
8675 Python interpreters across version, platform and network barriers. It has a
8676 minimal and fast API targetting the following uses:
8677 @enumerate
8678 @item distribute tasks to (many) local or remote CPUs
8679 @item write and deploy hybrid multi-process applications
8680 @item write scripts to administer multiple environments
8681 @end enumerate")
8682 (home-page "http://codespeak.net/execnet/")
8683 (license license:expat)))
8684
8685 (define-public python2-execnet
8686 (package-with-python2 python-execnet))
8687
8688 (define-public python-trollius-redis
8689 (package
8690 (name "python-trollius-redis")
8691 (version "0.1.4")
8692 (source
8693 (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "trollius_redis" version))
8696 (sha256
8697 (base32
8698 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8699 (build-system python-build-system)
8700 ;; TODO: Tests require packaging 'hiredis'.
8701 (arguments '(#:tests? #f))
8702 (home-page "https://github.com/benjolitz/trollius-redis")
8703 (synopsis "Port of asyncio-redis to trollius")
8704 (description "@code{trollius-redis} is a Redis client for Python
8705 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8706 Redis protocol.")
8707 (license license:bsd-2)))
8708
8709 (define-public python2-trollius-redis
8710 (package-with-python2 python-trollius-redis))
8711
8712 ;;; The software provided by this package was integrated into pytest 2.8.
8713 (define-public python-pytest-cache
8714 (package
8715 (name "python-pytest-cache")
8716 (version "1.0")
8717 (source (origin
8718 (method url-fetch)
8719 (uri (pypi-uri "pytest-cache" version))
8720 (sha256
8721 (base32
8722 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8723 (build-system python-build-system)
8724 (propagated-inputs
8725 `(("python-apipkg" ,python-apipkg)
8726 ("python-execnet" ,python-execnet)
8727 ("python-py" ,python-py)
8728 ("python-pytest" ,python-pytest)))
8729 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8730 (description "The pytest-cache plugin provides tools to rerun failures from
8731 the last py.test invocation.")
8732 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8733 (license license:expat)))
8734
8735 (define-public python2-pytest-cache
8736 (package-with-python2 python-pytest-cache))
8737
8738 (define-public python-pytest-localserver
8739 (package
8740 (name "python-pytest-localserver")
8741 (version "0.3.5")
8742 (source (origin
8743 (method url-fetch)
8744 (uri (pypi-uri "pytest-localserver" version))
8745 (sha256
8746 (base32
8747 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8748 (build-system python-build-system)
8749 (arguments
8750 `(#:phases (modify-phases %standard-phases
8751 (replace 'check
8752 (lambda _
8753 (zero? (system* "py.test" "--genscript=runtests.py"))
8754 (zero? (system* "py.test")))))))
8755 (native-inputs
8756 `(("python-pytest" ,python-pytest)
8757 ("python-requests" ,python-requests)
8758 ("python-six" ,python-six)))
8759 (propagated-inputs
8760 `(("python-werkzeug" ,python-werkzeug)))
8761 (synopsis "Py.test plugin to test server connections locally")
8762 (description "Pytest-localserver is a plugin for the pytest testing
8763 framework which enables you to test server connections locally.")
8764 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8765 (license license:expat)))
8766
8767 (define-public python-wsgi-intercept
8768 (package
8769 (name "python-wsgi-intercept")
8770 (version "1.2.2")
8771 (source (origin
8772 (method url-fetch)
8773 (uri (string-append
8774 "https://pypi.python.org/packages/"
8775 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8776 "wsgi_intercept-" version ".tar.gz"))
8777 (sha256
8778 (base32
8779 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8780 (build-system python-build-system)
8781 (propagated-inputs
8782 `(("python-six" ,python-six)))
8783 (native-inputs
8784 `(("python-pytest" ,python-pytest)
8785 ("python-httplib2" ,python-httplib2)
8786 ("python-requests" ,python-requests)
8787 ("python-urllib3" ,python-urllib3)))
8788 (synopsis "Puts a WSGI application in place of a real URI for testing")
8789 (description "Wsgi_intercept installs a WSGI application in place of a real
8790 URI for testing. Testing a WSGI application normally involves starting a
8791 server at a local host and port, then pointing your test code to that address.
8792 Instead, this library lets you intercept calls to any specific host/port
8793 combination and redirect them into a WSGI application importable by your test
8794 program. Thus, you can avoid spawning multiple processes or threads to test
8795 your Web app.")
8796 (home-page "https://github.com/cdent/wsgi-intercept")
8797 (license license:expat)))
8798
8799 (define-public python-pytest-xprocess
8800 (package
8801 (name "python-pytest-xprocess")
8802 (version "0.9.1")
8803 (source (origin
8804 (method url-fetch)
8805 (uri (pypi-uri "pytest-xprocess" version))
8806 (sha256
8807 (base32
8808 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8809 (build-system python-build-system)
8810 (propagated-inputs
8811 `(("python-pytest" ,python-pytest)
8812 ("python-pytest-cache" ,python-pytest-cache)
8813 ("python-psutil" ,python-psutil)))
8814 (synopsis "Pytest plugin to manage external processes across test runs")
8815 (description "Pytest-xprocess is an experimental py.test plugin for managing
8816 processes across test runs.")
8817 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8818 (license license:expat)))
8819
8820 (define-public python-icalendar
8821 (package
8822 (name "python-icalendar")
8823 (version "3.11.3")
8824 (source (origin
8825 (method url-fetch)
8826 (uri (pypi-uri "icalendar" version))
8827 (sha256
8828 (base32
8829 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
8830 (build-system python-build-system)
8831 (propagated-inputs
8832 `(("python-dateutil" ,python-dateutil)
8833 ("python-pytz" ,python-pytz)))
8834 (synopsis "Python library for parsing iCalendar files")
8835 (description "The icalendar package is a parser/generator of iCalendar
8836 files for use with Python.")
8837 (home-page "https://github.com/collective/icalendar")
8838 (license license:bsd-2)))
8839
8840 (define-public python-sphinxcontrib-newsfeed
8841 (package
8842 (name "python-sphinxcontrib-newsfeed")
8843 (version "0.1.4")
8844 (source (origin
8845 (method url-fetch)
8846 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8847 (sha256
8848 (base32
8849 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8850 (arguments '(#:tests? #f)) ; No tests.
8851 (build-system python-build-system)
8852 (propagated-inputs
8853 `(("python-sphinx" ,python-sphinx)))
8854 (synopsis "News Feed extension for Sphinx")
8855 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8856 Blog, News or Announcements section to a Sphinx website.")
8857 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8858 (license license:bsd-2)))
8859
8860 (define-public python-args
8861 (package
8862 (name "python-args")
8863 (version "0.1.0")
8864 (source (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "args" version))
8867 (sha256
8868 (base32
8869 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8870 (build-system python-build-system)
8871 (home-page "https://github.com/kennethreitz/args")
8872 (synopsis "Command-line argument parser")
8873 (description
8874 "This library provides a Python module to parse command-line arguments.")
8875 (license license:bsd-3)))
8876
8877 (define-public python2-args
8878 (package-with-python2 python-args))
8879
8880 (define-public python-clint
8881 (package
8882 (name "python-clint")
8883 (version "0.5.1")
8884 (source (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "clint" version))
8887 (sha256
8888 (base32
8889 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8890 (build-system python-build-system)
8891 (arguments
8892 '(#:phases
8893 (modify-phases %standard-phases
8894 (replace 'check
8895 (lambda _
8896 (zero? (system* "py.test" "-v")))))))
8897 (native-inputs
8898 `(("python-pytest" ,python-pytest)))
8899 (propagated-inputs
8900 `(("python-args" ,python-args)))
8901 (home-page "https://github.com/kennethreitz/clint")
8902 (synopsis "Command-line interface tools")
8903 (description
8904 "Clint is a Python module filled with a set of tools for developing
8905 command-line applications, including tools for colored and indented
8906 output, progress bar display, and pipes.")
8907 (license license:isc)))
8908
8909 (define-public python2-clint
8910 (package-with-python2 python-clint))
8911
8912 (define-public python-astor
8913 (package
8914 (name "python-astor")
8915 (version "0.5")
8916 (source (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "astor" version))
8919 (sha256
8920 (base32
8921 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8922 (build-system python-build-system)
8923 (home-page "https://github.com/berkerpeksag/astor")
8924 (synopsis "Read and write Python ASTs")
8925 (description
8926 "Astor is designed to allow easy manipulation of Python source via the
8927 Abstract Syntax Tree.")
8928 (license license:bsd-3)))
8929
8930 (define-public python2-astor
8931 (package-with-python2 python-astor))
8932
8933 (define-public python-rply
8934 (package
8935 (name "python-rply")
8936 (version "0.7.4")
8937 (source (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "rply" version))
8940 (sha256
8941 (base32
8942 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8943 (build-system python-build-system)
8944 (propagated-inputs
8945 `(("python-appdirs" ,python-appdirs)))
8946 (home-page "https://github.com/alex/rply")
8947 (synopsis "Parser generator for Python")
8948 (description
8949 "This package provides a pure Python based parser generator, that also
8950 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8951 with a new public API, and RPython support.")
8952 (license license:bsd-3)))
8953
8954 (define-public python2-rply
8955 (package-with-python2 python-rply))
8956
8957 (define-public python-hy
8958 (package
8959 (name "python-hy")
8960 (version "0.11.1")
8961 (source (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "hy" version))
8964 (sha256
8965 (base32
8966 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8967 (build-system python-build-system)
8968 (arguments
8969 '(#:phases
8970 (modify-phases %standard-phases
8971 (replace 'check
8972 (lambda _
8973 ;; Tests require write access to HOME.
8974 (setenv "HOME" "/tmp")
8975 (zero? (system* "nosetests")))))))
8976 (native-inputs
8977 `(("python-coverage" ,python-coverage)
8978 ("python-nose" ,python-nose)))
8979 (propagated-inputs
8980 `(("python-astor" ,python-astor)
8981 ("python-clint" ,python-clint)
8982 ("python-rply" ,python-rply)))
8983 (home-page "http://hylang.org/")
8984 (synopsis "Lisp frontend to Python")
8985 (description
8986 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8987 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8988 Python at your fingertips, in Lisp form.")
8989 (license license:expat)))
8990
8991 (define-public python2-hy
8992 (package-with-python2 python-hy))
8993
8994 (define-public python-rauth
8995 (package
8996 (name "python-rauth")
8997 (version "0.7.3")
8998 (source
8999 (origin
9000 (method url-fetch)
9001 (uri (pypi-uri "rauth" version))
9002 (sha256
9003 (base32
9004 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9005 (build-system python-build-system)
9006 (arguments
9007 `(#:test-target "check"))
9008 (propagated-inputs
9009 `(("python-requests" ,python-requests)))
9010 (home-page "https://github.com/litl/rauth")
9011 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9012 (description
9013 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9014 provides service wrappers for convenient connection initialization and
9015 authenticated session objects providing things like keep-alive.")
9016 (license license:expat)
9017 (properties `((python2-variant . ,(delay python2-rauth))))))
9018
9019 (define-public python2-rauth
9020 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9021 (package
9022 (inherit base)
9023 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9024 ,@(package-native-inputs base))))))
9025
9026 (define-public python2-functools32
9027 (package
9028 (name "python2-functools32")
9029 (version "3.2.3-2")
9030 (source
9031 (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "functools32" version))
9034 (sha256
9035 (base32
9036 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9037 (build-system python-build-system)
9038 (arguments
9039 `(#:python ,python-2
9040 #:tests? #f)) ; no test target
9041 (home-page "https://github.com/MiCHiLU/python-functools32")
9042 (synopsis
9043 "Backport of the functools module from Python 3.2.3")
9044 (description
9045 "This package is a backport of the @code{functools} module from Python
9046 3.2.3 for use with older versions of Python and PyPy.")
9047 (license license:expat)))
9048
9049 (define-public python2-subprocess32
9050 (package
9051 (name "python2-subprocess32")
9052 (version "3.2.7")
9053 (source (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "subprocess32" version))
9056 (sha256
9057 (base32
9058 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9059 (patches
9060 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9061 (build-system python-build-system)
9062 (arguments
9063 `(#:python ,python-2
9064 #:phases
9065 (modify-phases %standard-phases
9066 (add-after 'unpack 'patch-/bin/sh
9067 (lambda _
9068 (substitute* '("subprocess32.py"
9069 "test_subprocess32.py")
9070 (("/bin/sh") (which "sh")))
9071 #t))
9072 (delete 'check)
9073 (add-after 'install 'check
9074 (lambda* (#:key inputs outputs #:allow-other-keys)
9075 ;; For some reason this package fails to import
9076 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9077 ;; directory. Running tests after install is easier.
9078 (add-installed-pythonpath inputs outputs)
9079 (zero? (system* "python" "test_subprocess32.py")))))))
9080 (home-page "https://github.com/google/python-subprocess32")
9081 (synopsis "Backport of the subprocess module from Python 3.2")
9082 (description
9083 "This is a backport of the @code{subprocess} standard library module
9084 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9085 new features. On POSIX systems it is guaranteed to be reliable when used
9086 in threaded applications. It includes timeout support from Python 3.3 but
9087 otherwise matches 3.2’s API.")
9088 (license license:psfl)))
9089
9090 (define-public python2-futures
9091 (package
9092 (name "python2-futures")
9093 (version "3.0.5")
9094 (source
9095 (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "futures" version))
9098 (sha256
9099 (base32
9100 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9101 (build-system python-build-system)
9102 (arguments `(#:python ,python-2))
9103 (home-page "https://github.com/agronholm/pythonfutures")
9104 (synopsis
9105 "Backport of the concurrent.futures package from Python 3.2")
9106 (description
9107 "The concurrent.futures module provides a high-level interface for
9108 asynchronously executing callables. This package backports the
9109 concurrent.futures package from Python 3.2")
9110 (license license:bsd-3)))
9111
9112 (define-public python-promise
9113 (package
9114 (name "python-promise")
9115 (version "0.4.2")
9116 (source
9117 (origin
9118 (method url-fetch)
9119 (uri (pypi-uri "promise" version))
9120 (sha256
9121 (base32
9122 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9123 (build-system python-build-system)
9124 ;; Tests wants python-futures, which is a python2 only program, and
9125 ;; can't be found by python-promise at test time.
9126 (arguments `(#:tests? #f))
9127 (home-page "https://github.com/syrusakbary/promise")
9128 (synopsis "Promises/A+ implementation for Python")
9129 (description
9130 "Promises/A+ implementation for Python")
9131 (properties `((python2-variant . ,(delay python2-promise))))
9132 (license license:expat)))
9133
9134 (define-public python2-promise
9135 (let ((promise (package-with-python2
9136 (strip-python2-variant python-promise))))
9137 (package (inherit promise)
9138 (arguments (substitute-keyword-arguments (package-arguments promise)
9139 ((#:tests? _) #t)))
9140 (native-inputs
9141 `(("python2-futures" ,python2-futures)
9142 ("python2-pytest" ,python2-pytest)
9143 ,@(package-native-inputs promise))))))
9144
9145 (define-public python-urllib3
9146 (package
9147 (name "python-urllib3")
9148 (version "1.18.1")
9149 (source
9150 (origin
9151 (method url-fetch)
9152 (uri (pypi-uri "urllib3" version))
9153 (sha256
9154 (base32
9155 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9156 (build-system python-build-system)
9157 (arguments `(#:tests? #f))
9158 (native-inputs
9159 `(;; some packages for tests
9160 ("python-nose" ,python-nose)
9161 ("python-mock" ,python-mock)
9162 ("python-tornado" ,python-tornado)))
9163 (propagated-inputs
9164 `(;; extra packages for https security
9165 ("python-certifi" ,python-certifi)
9166 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9167 ("python-pyasn1" ,python-pyasn1)
9168 ("python-pyopenssl" ,python-pyopenssl)))
9169 (home-page "https://urllib3.readthedocs.org/")
9170 (synopsis "HTTP library with thread-safe connection pooling")
9171 (description
9172 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9173 can reuse the same socket connection for multiple requests, it can POST files,
9174 supports url redirection and retries, and also gzip and deflate decoding.")
9175 (license license:expat)))
9176
9177 (define-public python2-urllib3
9178 (package-with-python2 python-urllib3))
9179
9180 (define-public python-colorama
9181 (package
9182 (name "python-colorama")
9183 (version "0.3.7")
9184 (source
9185 (origin
9186 (method url-fetch)
9187 (uri (pypi-uri "colorama" version))
9188 (sha256
9189 (base32
9190 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9191 (build-system python-build-system)
9192 (synopsis "Colored terminal text rendering for Python")
9193 (description "Colorama is a Python library for rendering colored terminal
9194 text.")
9195 (home-page "https://pypi.python.org/pypi/colorama")
9196 (license license:bsd-3)))
9197
9198 (define-public python2-colorama
9199 (package-with-python2 python-colorama))
9200
9201 (define-public python-rsa
9202 (package
9203 (name "python-rsa")
9204 (version "3.4.2")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "rsa" version))
9209 (sha256
9210 (base32
9211 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9212 (build-system python-build-system)
9213 (propagated-inputs
9214 `(("python-pyasn1" ,python-pyasn1)))
9215 (synopsis "Pure-Python RSA implementation")
9216 (description "Python-RSA is a pure-Python RSA implementation. It supports
9217 encryption and decryption, signing and verifying signatures, and key
9218 generation according to PKCS#1 version 1.5. It can be used as a Python
9219 library as well as on the command line.")
9220 (home-page "http://stuvel.eu/rsa")
9221 (license license:asl2.0)))
9222
9223 (define-public python2-rsa
9224 (package-with-python2 python-rsa))
9225
9226 (define-public python-pluggy
9227 (package
9228 (name "python-pluggy")
9229 (version "0.3.1")
9230 (source
9231 (origin
9232 (method url-fetch)
9233 (uri (pypi-uri "pluggy" version))
9234 (sha256
9235 (base32
9236 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9237 (build-system python-build-system)
9238 (synopsis "Plugin and hook calling mechanism for Python")
9239 (description "Pluggy is an extraction of the plugin manager as used by
9240 Pytest but stripped of Pytest specific details.")
9241 (home-page "https://pypi.python.org/pypi/pluggy")
9242 (license license:expat)))
9243
9244 (define-public python2-pluggy
9245 (package-with-python2 python-pluggy))
9246
9247 (define-public python-tox
9248 (package
9249 (name "python-tox")
9250 (version "2.3.1")
9251 (source
9252 (origin
9253 (method url-fetch)
9254 (uri (pypi-uri "tox" version))
9255 (sha256
9256 (base32
9257 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9258 (build-system python-build-system)
9259 (arguments
9260 ;; FIXME: Tests require pytest-timeout, which itself requires
9261 ;; pytest>=2.8.0 for installation.
9262 '(#:tests? #f))
9263 (propagated-inputs
9264 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9265 ("python-py" ,python-py)
9266 ("python-virtualenv" ,python-virtualenv)))
9267 (native-inputs
9268 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9269 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9270 (home-page "http://tox.testrun.org/")
9271 (synopsis "Virtualenv-based automation of test activities")
9272 (description "Tox is a generic virtualenv management and test command line
9273 tool. It can be used to check that a package installs correctly with
9274 different Python versions and interpreters, or run tests in each type of
9275 supported environment, or act as a frontend to continuous integration
9276 servers.")
9277 (license license:expat)))
9278
9279 (define-public python2-tox
9280 (package-with-python2 python-tox))
9281
9282 (define-public python-jmespath
9283 (package
9284 (name "python-jmespath")
9285 (version "0.9.0")
9286 (source
9287 (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "jmespath" version))
9290 (sha256
9291 (base32
9292 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9293 (build-system python-build-system)
9294 (native-inputs
9295 `(("python-nose" ,python-nose)))
9296 (synopsis "JSON Matching Expressions")
9297 (description "JMESPath (pronounced “james path”) is a Python library that
9298 allows one to declaratively specify how to extract elements from a JSON
9299 document.")
9300 (home-page "https://github.com/jmespath/jmespath.py")
9301 (license license:expat)))
9302
9303 (define-public python2-jmespath
9304 (package-with-python2 python-jmespath))
9305
9306 (define-public python-botocore
9307 (package
9308 (name "python-botocore")
9309 (version "1.5.26")
9310 (source
9311 (origin
9312 (method url-fetch)
9313 (uri (pypi-uri "botocore" version))
9314 (sha256
9315 (base32
9316 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9317 (build-system python-build-system)
9318 (arguments
9319 ;; FIXME: Many tests are failing.
9320 '(#:tests? #f))
9321 (propagated-inputs
9322 `(("python-dateutil" ,python-dateutil)
9323 ("python-docutils" ,python-docutils)
9324 ("python-jmespath" ,python-jmespath)))
9325 (native-inputs
9326 `(("python-mock" ,python-mock)
9327 ("python-nose" ,python-nose)
9328 ("behave" ,behave)
9329 ("python-tox" ,python-tox)
9330 ("python-wheel" ,python-wheel)))
9331 (home-page "https://github.com/boto/botocore")
9332 (synopsis "Low-level interface to AWS")
9333 (description "Botocore is a Python library that provides a low-level
9334 interface to the Amazon Web Services (AWS) API.")
9335 (license license:asl2.0)))
9336
9337 (define-public python2-botocore
9338 (package-with-python2 python-botocore))
9339
9340 (define-public awscli
9341 (package
9342 (name "awscli")
9343 (version "1.11.63")
9344 (source
9345 (origin
9346 (method url-fetch)
9347 (uri (pypi-uri name version))
9348 (sha256
9349 (base32
9350 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9351 (build-system python-build-system)
9352 (propagated-inputs
9353 `(("python-colorama" ,python-colorama)
9354 ("python-botocore" ,python-botocore)
9355 ("python-s3transfer" ,python-s3transfer)
9356 ("python-docutils" ,python-docutils)
9357 ("python-rsa" ,python-rsa)))
9358 (arguments
9359 ;; FIXME: The 'pypi' release does not contain tests.
9360 '(#:tests? #f))
9361 (home-page "https://aws.amazon.com/cli/")
9362 (synopsis "Command line client for AWS")
9363 (description "AWS CLI provides a unified command line interface to the
9364 Amazon Web Services (AWS) API.")
9365 (license license:asl2.0)))
9366
9367 (define-public python-hypothesis
9368 (package
9369 (name "python-hypothesis")
9370 (version "3.1.0")
9371 (source (origin
9372 (method url-fetch)
9373 (uri (pypi-uri "hypothesis" version))
9374 (sha256
9375 (base32
9376 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9377 (build-system python-build-system)
9378 (native-inputs
9379 `(("python-flake8" ,python-flake8)
9380 ("python-pytest" ,python-pytest)))
9381 (synopsis "Library for property based testing")
9382 (description "Hypothesis is a library for testing your Python code against a
9383 much larger range of examples than you would ever want to write by hand. It’s
9384 based on the Haskell library, Quickcheck, and is designed to integrate
9385 seamlessly into your existing Python unit testing work flow.")
9386 (home-page "https://github.com/DRMacIver/hypothesis")
9387 (license license:mpl2.0)
9388 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9389
9390 (define-public python2-hypothesis
9391 (let ((hypothesis (package-with-python2
9392 (strip-python2-variant python-hypothesis))))
9393 (package (inherit hypothesis)
9394 (native-inputs
9395 `(("python2-enum34" ,python2-enum34)
9396 ,@(package-native-inputs hypothesis))))))
9397
9398 (define-public python-pytest-subtesthack
9399 (package
9400 (name "python-pytest-subtesthack")
9401 (version "0.1.1")
9402 (source (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "pytest-subtesthack" version))
9405 (sha256
9406 (base32
9407 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9408 (build-system python-build-system)
9409 (propagated-inputs
9410 `(("python-pytest" ,python-pytest)))
9411 (synopsis "Set-up and tear-down fixtures for unit tests")
9412 (description "This plugin allows you to set up and tear down fixtures within
9413 unit test functions that use @code{py.test}. This is useful for using
9414 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9415 function multiple times, without setting up or tearing down fixture state as is
9416 normally the case.")
9417 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9418 (license license:unlicense)))
9419
9420 (define-public python2-pytest-subtesthack
9421 (package-with-python2 python-pytest-subtesthack))
9422
9423 (define-public python-xdo
9424 (package
9425 (name "python-xdo")
9426 (version "0.3")
9427 (source (origin
9428 (method url-fetch)
9429 (uri (string-append
9430 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9431 "python-xdo_" version ".orig.tar.gz"))
9432 (sha256
9433 (base32
9434 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9435 (build-system python-build-system)
9436 (arguments
9437 '(#:phases
9438 (modify-phases %standard-phases
9439 (add-before 'install 'patch-libxdo-path
9440 ;; Hardcode the path of dynamically loaded libxdo library.
9441 (lambda* (#:key inputs #:allow-other-keys)
9442 (let ((libxdo (string-append
9443 (assoc-ref inputs "xdotool")
9444 "/lib/libxdo.so")))
9445 (substitute* "xdo/_xdo.py"
9446 (("find_library\\(\"xdo\"\\)")
9447 (simple-format #f "\"~a\"" libxdo)))
9448 #t))))
9449 #:tests? #f)) ; no tests provided
9450 (propagated-inputs
9451 `(("python-six" ,python-six)))
9452 (inputs
9453 `(("xdotool" ,xdotool)
9454 ("libX11" ,libx11)))
9455 (home-page "https://tracker.debian.org/pkg/python-xdo")
9456 (synopsis "Python library for simulating X11 keyboard/mouse input")
9457 (description "Provides bindings to libxdo for manipulating X11 via simulated
9458 input. (Note that this is mostly a legacy library; you may wish to look at
9459 python-xdo for newer bindings.)")
9460 (license license:bsd-3)))
9461
9462 (define-public python2-xdo
9463 (package-with-python2 python-xdo))
9464
9465 (define-public python-wtforms
9466 (package
9467 (name "python-wtforms")
9468 (version "2.1")
9469 (source
9470 (origin
9471 (method url-fetch)
9472 (uri (pypi-uri "WTForms" version ".zip"))
9473 (sha256
9474 (base32
9475 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9476 (build-system python-build-system)
9477 (arguments
9478 '(#:phases
9479 (modify-phases %standard-phases
9480 (add-after 'unpack 'remove-django-test
9481 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9482 (lambda _
9483 (substitute*
9484 "tests/runtests.py"
9485 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9486 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9487 #t)))))
9488 (native-inputs
9489 `(("unzip" ,unzip)))
9490 (home-page "http://wtforms.simplecodes.com/")
9491 (synopsis
9492 "Form validation and rendering library for Python web development")
9493 (description
9494 "WTForms is a flexible forms validation and rendering library
9495 for Python web development. It is very similar to the web form API
9496 available in Django, but is a standalone package.")
9497 (license license:bsd-3)))
9498
9499 (define-public python2-wtforms
9500 (package-with-python2 python-wtforms))
9501
9502 (define-public python-mako
9503 (package
9504 (name "python-mako")
9505 (version "1.0.6")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "Mako" version))
9510 (sha256
9511 (base32
9512 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9513 (build-system python-build-system)
9514 (propagated-inputs
9515 `(("python-markupsafe" ,python-markupsafe)))
9516 (native-inputs
9517 `(("python-mock" ,python-mock)
9518 ("python-nose" ,python-nose)
9519 ("python-pytest" ,python-pytest)))
9520 (home-page "http://www.makotemplates.org/")
9521 (synopsis "Templating language for Python")
9522 (description "Mako is a templating language for Python that compiles
9523 templates into Python modules.")
9524 (license license:expat)))
9525
9526 (define-public python2-mako
9527 (package-with-python2 python-mako))
9528
9529 (define-public python-waitress
9530 (package
9531 (name "python-waitress")
9532 (version "0.8.10")
9533 (source
9534 (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "waitress" version))
9537 (sha256
9538 (base32
9539 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9540 (build-system python-build-system)
9541 (home-page "https://github.com/Pylons/waitress")
9542 (synopsis "Waitress WSGI server")
9543 (description "Waitress is meant to be a production-quality pure-Python WSGI
9544 server with very acceptable performance.")
9545 (license license:zpl2.1)))
9546
9547 (define-public python2-waitress
9548 (package-with-python2 python-waitress))
9549
9550 (define-public python-wsgiproxy2
9551 (package
9552 (name "python-wsgiproxy2")
9553 (version "0.4.2")
9554 (source
9555 (origin
9556 (method url-fetch)
9557 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9558 (sha256
9559 (base32
9560 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9561 (build-system python-build-system)
9562 (arguments
9563 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9564 ;; support Python 3:
9565 ;; https://github.com/benoitc/restkit/issues/140
9566 #:tests? #f))
9567 (native-inputs
9568 `(("unzip" ,unzip)
9569 ("python-nose" ,python-nose)
9570 ("python-coverage" ,python-coverage)))
9571 (propagated-inputs
9572 `(("python-six" ,python-six)
9573 ("python-webob" ,python-webob)))
9574 (home-page
9575 "https://github.com/gawel/WSGIProxy2/")
9576 (synopsis "WSGI Proxy with various http client backends")
9577 (description "WSGI turns HTTP requests into WSGI function calls.
9578 WSGIProxy turns WSGI function calls into HTTP requests.
9579 It also includes code to sign requests and pass private data,
9580 and to spawn subprocesses to handle requests.")
9581 (license license:expat)))
9582
9583 (define-public python2-wsgiproxy2
9584 (package-with-python2 python-wsgiproxy2))
9585
9586 (define-public python-pastedeploy
9587 (package
9588 (name "python-pastedeploy")
9589 (version "1.5.2")
9590 (source
9591 (origin
9592 (method url-fetch)
9593 (uri (pypi-uri "PasteDeploy" version))
9594 (sha256
9595 (base32
9596 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9597 (build-system python-build-system)
9598 (native-inputs
9599 `(("python-nose" ,python-nose)))
9600 (home-page "http://pythonpaste.org/deploy/")
9601 (synopsis
9602 "Load, configure, and compose WSGI applications and servers")
9603 (description
9604 "This tool provides code to load WSGI applications and servers from URIs;
9605 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9606 Script provides commands to serve applications based on this configuration
9607 file.")
9608 (license license:expat)))
9609
9610 (define-public python2-pastedeploy
9611 (package-with-python2 python-pastedeploy))
9612
9613 (define-public python-paste
9614 (package
9615 (name "python-paste")
9616 (version "2.0.3")
9617 (source
9618 (origin
9619 (method url-fetch)
9620 (uri (pypi-uri "Paste" version))
9621 (sha256
9622 (base32
9623 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9624 (patches (search-patches "python-paste-remove-website-test.patch"
9625 "python-paste-remove-timing-test.patch"))))
9626 (build-system python-build-system)
9627 (native-inputs
9628 `(("python-nose" ,python-nose)))
9629 (propagated-inputs
9630 `(("python-six" ,python-six)))
9631 (home-page "http://pythonpaste.org")
9632 (synopsis
9633 "Python web development tools, focusing on WSGI")
9634 (description
9635 "Paste provides a variety of web development tools and middleware which
9636 can be nested together to build web applications. Paste's design closely
9637 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9638 (license license:expat)))
9639
9640 (define-public python2-paste
9641 (package-with-python2 python-paste))
9642
9643 (define-public python-pastescript
9644 (package
9645 (name "python-pastescript")
9646 (version "2.0.2")
9647 (source
9648 (origin
9649 (method url-fetch)
9650 (uri (pypi-uri "PasteScript" version))
9651 (sha256
9652 (base32
9653 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9654 (build-system python-build-system)
9655 (native-inputs
9656 `(("python-nose" ,python-nose)))
9657 (propagated-inputs
9658 `(("python-paste" ,python-paste)
9659 ("python-pastedeploy" ,python-pastedeploy)))
9660 (home-page "http://pythonpaste.org/script/")
9661 (arguments
9662 '(;; Unfortunately, this requires the latest unittest2,
9663 ;; but that requires traceback2 which requires linecache2 which requires
9664 ;; unittest2. So we're skipping tests for now.
9665 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9666 ;; so in theory we could get around this situation somehow.)
9667 #:tests? #f))
9668 (synopsis
9669 "Pluggable command line tool for serving web applications and more")
9670 (description
9671 "PasteScript is a plugin-friendly command line tool which provides a
9672 variety of features, from launching web applications to bootstrapping project
9673 layouts.")
9674 (license license:expat)))
9675
9676 (define-public python2-pastescript
9677 (package-with-python2 python-pastescript))
9678
9679 (define-public python-pyquery
9680 (package
9681 (name "python-pyquery")
9682 (version "1.2.17")
9683 (source
9684 (origin
9685 (method url-fetch)
9686 (uri (pypi-uri "pyquery" version))
9687 (sha256
9688 (base32
9689 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9690 (build-system python-build-system)
9691 (native-inputs
9692 `(("python-webob" ,python-webob)
9693 ("python-webtest" ,python-webtest)))
9694 (propagated-inputs
9695 `(("python-lxml" ,python-lxml)
9696 ("python-cssselect" ,python-cssselect)))
9697 (home-page "https://github.com/gawel/pyquery")
9698 (synopsis "Make jQuery-like queries on xml documents")
9699 (description "pyquery allows you to make jQuery queries on xml documents.
9700 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9701 fast xml and html manipulation.")
9702 (license license:bsd-3)))
9703
9704 (define-public python2-pyquery
9705 (package-with-python2 python-pyquery))
9706
9707 (define-public python-webtest
9708 (package
9709 (name "python-webtest")
9710 (version "2.0.20")
9711 (source
9712 (origin
9713 (method url-fetch)
9714 (uri (pypi-uri "WebTest" version))
9715 (sha256
9716 (base32
9717 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9718 (build-system python-build-system)
9719 (arguments
9720 `(;; Unfortunately we have to disable tests!
9721 ;; This release of WebTest is pinned to python-nose < 1.3,
9722 ;; but older versions of python-nose are plagued with the following
9723 ;; bug(s), which rears its ugly head during test execution:
9724 ;; https://github.com/nose-devs/nose/issues/759
9725 ;; https://github.com/nose-devs/nose/pull/811
9726 #:tests? #f))
9727 ;; Commented out code is no good, but in this case, once tests
9728 ;; are ready to be enabled again, we should put the following
9729 ;; in place:
9730 ;; (native-inputs
9731 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9732 ;; ; but see above comment
9733 ;; ("python-coverage" ,python-coverage)
9734 ;; ("python-mock" ,python-mock)
9735 ;; ("python-pastedeploy" ,python-pastedeploy)
9736 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9737 ;; ("python-pyquery" ,python-pyquery)))
9738 (propagated-inputs
9739 `(("python-waitress" ,python-waitress)
9740 ("python-webob" ,python-webob)
9741 ("python-six" ,python-six)
9742 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9743 (home-page "http://webtest.pythonpaste.org/")
9744 (synopsis "Helper to test WSGI applications")
9745 (description "Webtest allows you to test your Python web applications
9746 without starting an HTTP server. It supports anything that supports the
9747 minimum of WSGI.")
9748 (license license:expat)))
9749
9750 (define-public python2-webtest
9751 (package-with-python2 python-webtest))
9752
9753 (define-public python-anyjson
9754 (package
9755 (name "python-anyjson")
9756 (version "0.3.3")
9757 (source
9758 (origin
9759 (method url-fetch)
9760 (uri (pypi-uri "anyjson" version))
9761 (sha256
9762 (base32
9763 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9764 (build-system python-build-system)
9765 (arguments
9766 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9767 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9768 ;; whatever) so this transformation needs to be done before the tests
9769 ;; can be run. Maybe we could add a build step to transform beforehand
9770 ;; but it could be annoying/difficult.
9771 ;; We can enable tests for the Python 2 version, though, and do below.
9772 #:tests? #f))
9773 (home-page "http://bitbucket.org/runeh/anyjson/")
9774 (synopsis
9775 "Wraps best available JSON implementation in a common interface")
9776 (description
9777 "Anyjson loads whichever is the fastest JSON module installed
9778 and provides a uniform API regardless of which JSON implementation is used.")
9779 (license license:bsd-3)
9780 (properties `((python2-variant . ,(delay python2-anyjson))))))
9781
9782 (define-public python2-anyjson
9783 (let ((anyjson (package-with-python2
9784 (strip-python2-variant python-anyjson))))
9785 (package
9786 (inherit anyjson)
9787 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9788 #:tests? #t
9789 ,@(package-arguments anyjson)))
9790 (native-inputs `(("python2-nose" ,python2-nose))))))
9791
9792 (define-public python-amqp
9793 (package
9794 (name "python-amqp")
9795 (version "1.4.9")
9796 (source
9797 (origin
9798 (method url-fetch)
9799 (uri (pypi-uri "amqp" version))
9800 (sha256
9801 (base32
9802 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9803 (build-system python-build-system)
9804 (native-inputs
9805 `(("python-nose" ,python-nose)
9806 ("python-mock" ,python-mock)))
9807 (home-page "http://github.com/celery/py-amqp")
9808 (synopsis
9809 "Low-level AMQP client for Python (fork of amqplib)")
9810 (description
9811 "This is a fork of amqplib which was originally written by Barry Pederson.
9812 It is maintained by the Celery project, and used by kombu as a pure python
9813 alternative when librabbitmq is not available.")
9814 (license license:lgpl2.1+)
9815 (properties `((python2-variant . ,(delay python2-amqp))))))
9816
9817 (define-public python2-amqp
9818 (let ((amqp (package-with-python2
9819 (strip-python2-variant python-amqp))))
9820 (package
9821 (inherit amqp)
9822 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9823 ;; unmaintained. Weirdly, does not do this on the python 3
9824 ;; version?
9825 #:tests? #f
9826 ,@(package-arguments amqp))))))
9827
9828 (define-public python-kombu
9829 (package
9830 (name "python-kombu")
9831 (version "3.0.37")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "kombu" version))
9836 (sha256
9837 (base32
9838 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9839 (build-system python-build-system)
9840 (native-inputs
9841 `(("python-mock" ,python-mock)
9842 ("python-nose" ,python-nose)))
9843 (propagated-inputs
9844 `(("python-anyjson" ,python-anyjson)
9845 ("python-amqp" ,python-amqp)
9846 ("python-redis" ,python-redis)))
9847 (home-page "http://kombu.readthedocs.org")
9848 (synopsis "Message passing library for Python")
9849 (description "The aim of Kombu is to make messaging in Python as easy as
9850 possible by providing an idiomatic high-level interface for the AMQ protocol,
9851 and also provide proven and tested solutions to common messaging problems.
9852 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9853 message orientation, queuing, routing, reliability and security, for which the
9854 RabbitMQ messaging server is the most popular implementation.")
9855 (license license:bsd-3)
9856 (properties `((python2-variant . ,(delay python2-kombu))))))
9857
9858 (define-public python2-kombu
9859 (let ((kombu (package-with-python2
9860 (strip-python2-variant python-kombu))))
9861 (package
9862 (inherit kombu)
9863 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9864 ;; It works fine on the python3 variant.
9865 #:tests? #f
9866 ,@(package-arguments kombu)))
9867 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9868 ,@(package-native-inputs kombu))))))
9869
9870 (define-public python-billiard
9871 (package
9872 (name "python-billiard")
9873 (version "3.3.0.23")
9874 (source
9875 (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "billiard" version))
9878 (sha256
9879 (base32
9880 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9881 (build-system python-build-system)
9882 (native-inputs
9883 `(("python-nose" ,python-nose)))
9884 (home-page "http://github.com/celery/billiard")
9885 (synopsis
9886 "Python multiprocessing fork with improvements and bugfixes")
9887 (description
9888 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9889 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9890 pyprocessing package. This standalone variant is intended to be compatible with
9891 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9892 (license license:bsd-3)
9893 (properties `((python2-variant . ,(delay python2-billiard))))))
9894
9895 (define-public python2-billiard
9896 (let ((billiard (package-with-python2
9897 (strip-python2-variant python-billiard))))
9898 (package
9899 (inherit billiard)
9900 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9901 ("python2-mock" ,python2-mock)
9902 ,@(package-native-inputs billiard))))))
9903
9904 (define-public python-celery
9905 (package
9906 (name "python-celery")
9907 (version "3.1.24")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "celery" version))
9912 (sha256
9913 (base32
9914 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9915 (build-system python-build-system)
9916 (arguments
9917 `(#:phases
9918 (modify-phases %standard-phases
9919 ;; These tests break with Python 3.5:
9920 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9921 (replace 'check
9922 (lambda _
9923 (zero?
9924 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9925 (native-inputs
9926 `(("python-nose" ,python-nose)))
9927 (propagated-inputs
9928 `(("python-pytz" ,python-pytz)
9929 ("python-billiard" ,python-billiard)
9930 ("python-kombu" ,python-kombu)))
9931 (home-page "http://celeryproject.org")
9932 (synopsis "Distributed Task Queue")
9933 (description "Celery is an asynchronous task queue/job queue based on
9934 distributed message passing. It is focused on real-time operation, but
9935 supports scheduling as well. The execution units, called tasks, are executed
9936 concurrently on a single or more worker servers using multiprocessing,
9937 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9938 synchronously (wait until ready).")
9939 (license license:bsd-3)
9940 (properties `((python2-variant . ,(delay python2-celery))))))
9941
9942 (define-public python2-celery
9943 (let ((celery (package-with-python2
9944 (strip-python2-variant python-celery))))
9945 (package
9946 (inherit celery)
9947 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9948 ("python2-mock" ,python2-mock)
9949 ,@(package-native-inputs celery))))))
9950
9951 (define-public python-translitcodec
9952 (package
9953 (name "python-translitcodec")
9954 (version "0.4.0")
9955 (source
9956 (origin
9957 (method url-fetch)
9958 (uri (pypi-uri "translitcodec" version))
9959 (sha256
9960 (base32
9961 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9962 (build-system python-build-system)
9963 (arguments
9964 `(#:tests? #f)) ; no tests provided
9965 (home-page
9966 "https://github.com/claudep/translitcodec")
9967 (synopsis
9968 "Unicode to 8-bit charset transliteration codec")
9969 (description
9970 "This package contains codecs for transliterating ISO 10646 texts into
9971 best-effort representations using smaller coded character sets (ASCII,
9972 ISO 8859, etc.).")
9973 (license license:expat)))
9974
9975 (define-public python2-translitcodec
9976 (package-with-python2 python-translitcodec))
9977
9978 (define-public python-editor
9979 (package
9980 (name "python-editor")
9981 (version "0.5")
9982 (source
9983 (origin
9984 (method url-fetch)
9985 (uri (pypi-uri "python-editor" version))
9986 (sha256
9987 (base32
9988 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9989 (build-system python-build-system)
9990 (home-page
9991 "https://github.com/fmoo/python-editor")
9992 (synopsis
9993 "Programmatically open an editor, capture the result")
9994 (description
9995 "python-editor is a library that provides the editor module for
9996 programmatically interfacing with your system's $EDITOR.")
9997 (license license:asl2.0)))
9998
9999 (define-public python2-editor
10000 (package-with-python2 python-editor))
10001
10002 (define-public python-sphinxcontrib-programoutput
10003 (package
10004 (name "python-sphinxcontrib-programoutput")
10005 (version "0.8")
10006 (source (origin
10007 (method url-fetch)
10008 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10009 (sha256
10010 (base32
10011 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10012 (build-system python-build-system)
10013 (arguments
10014 ;; FIXME: Many tests are failing and the upstream is gone.
10015 '(#:tests? #f))
10016 (propagated-inputs
10017 `(("python-sphinx" ,python-sphinx)))
10018 (synopsis "Sphinx extension to include program output")
10019 (description "A Sphinx extension to literally insert the output of arbitrary
10020 commands into documents, helping you to keep your command examples up to date.")
10021 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10022 (license license:bsd-2)))
10023
10024 (define-public python2-sphinxcontrib-programoutput
10025 (package-with-python2 python-sphinxcontrib-programoutput))
10026
10027 (define-public python-sphinx-repoze-autointerface
10028 (package
10029 (name "python-sphinx-repoze-autointerface")
10030 (version "0.8")
10031 (source (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10034 (sha256
10035 (base32
10036 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10037 (build-system python-build-system)
10038 (arguments '(#:tests? #f)) ; No tests.
10039 (propagated-inputs
10040 `(("python-sphinx" ,python-sphinx)
10041 ("python-zope-interface" ,python-zope-interface)))
10042 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10043 (description "This package defines an extension for the Sphinx documentation
10044 system. The extension allows generation of API documentation by
10045 introspection of @code{zope.interface} instances in code.")
10046 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10047 (license license:repoze)))
10048
10049 (define-public python2-sphinx-repoze-autointerface
10050 (package-with-python2 python-sphinx-repoze-autointerface))
10051
10052 (define-public python-psycopg2
10053 (package
10054 (name "python-psycopg2")
10055 (version "2.6.2")
10056 (source
10057 (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "psycopg2" version))
10060 (sha256
10061 (base32
10062 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10063 (build-system python-build-system)
10064 (arguments
10065 ;; Tests would require a postgresql database "psycopg2_test"
10066 ;; and a running postgresql database management service.
10067 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10068 (inputs
10069 `(("postgresql" ,postgresql))) ; libpq
10070 (home-page "http://initd.org/psycopg/")
10071 (synopsis "Python PostgreSQL adapter")
10072 (description
10073 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10074 (license license:lgpl3+)))
10075
10076 (define-public python2-psycopg2
10077 (package-with-python2 python-psycopg2))
10078
10079 (define-public python-vobject
10080 (package
10081 (name "python-vobject")
10082 (version "0.9.2")
10083 (source (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "vobject" version))
10086 (sha256
10087 (base32
10088 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10089 (build-system python-build-system)
10090 (arguments
10091 '(;; The test suite relies on some non-portable Windows interfaces.
10092 #:tests? #f))
10093 (propagated-inputs
10094 `(("python-dateutil" ,python-dateutil)
10095 ("python-pyicu" ,python-pyicu)))
10096 (synopsis "Parse and generate vCard and vCalendar files")
10097 (description "Vobject is intended to be a full featured Python package for
10098 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10099 are supported and well tested. vCard 3.0 files are supported, and all data
10100 should be imported, but only a few components are understood in a sophisticated
10101 way.")
10102 (home-page "http://eventable.github.io/vobject/")
10103 (license license:asl2.0)))
10104
10105 (define-public python2-vobject
10106 (package-with-python2 python-vobject))
10107
10108 (define-public python-munkres
10109 (package
10110 (name "python-munkres")
10111 (version "1.0.8")
10112 (source (origin
10113 (method url-fetch)
10114 (uri (pypi-uri "munkres" version))
10115 (sha256
10116 (base32
10117 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10118 (build-system python-build-system)
10119 (arguments
10120 '(#:tests? #f)) ; no test suite
10121 (home-page "http://software.clapper.org/munkres/")
10122 (synopsis "Implementation of the Munkres algorithm")
10123 (description "The Munkres module provides an implementation of the Munkres
10124 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10125 useful for solving the Assignment Problem.")
10126 (license license:bsd-3)))
10127
10128 (define-public python2-munkres
10129 (package-with-python2 python-munkres))
10130
10131 (define-public python-flask
10132 (package
10133 (name "python-flask")
10134 (version "0.11.1")
10135 (source (origin
10136 (method url-fetch)
10137 (uri (pypi-uri "Flask" version))
10138 (sha256
10139 (base32
10140 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10141 (build-system python-build-system)
10142 (propagated-inputs
10143 `(("python-itsdangerous" ,python-itsdangerous)
10144 ("python-jinja2" ,python-jinja2)
10145 ("python-click" ,python-click)
10146 ("python-werkzeug" ,python-werkzeug)))
10147 (home-page "https://github.com/mitsuhiko/flask/")
10148 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10149 (description "Flask is a micro web framework based on the Werkzeug toolkit
10150 and Jinja2 template engine. It is called a micro framework because it does not
10151 presume or force a developer to use a particular tool or library.")
10152 (license license:bsd-3)))
10153
10154 (define-public python2-flask
10155 (package-with-python2 python-flask))
10156
10157 (define-public python-flask-wtf
10158 (package
10159 (name "python-flask-wtf")
10160 (version "0.13.1")
10161 (source
10162 (origin
10163 (method url-fetch)
10164 (uri (pypi-uri "Flask-WTF" version))
10165 (sha256
10166 (base32
10167 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10168 (build-system python-build-system)
10169 (arguments
10170 '(#:phases
10171 (modify-phases %standard-phases
10172 (add-before 'check 'drop-failing-test
10173 (lambda _
10174 ;; FIXME: This file tries resolving an external server, which
10175 ;; fails. Try to patch out the offending section instead of
10176 ;; deleting the whole thing.
10177 (delete-file "tests/test_recaptcha.py")
10178 #t)))))
10179 (propagated-inputs
10180 `(("python-flask-babel" ,python-flask-babel)
10181 ("python-babel" ,python-babel)
10182 ("python-wtforms" ,python-wtforms)))
10183 (native-inputs
10184 `(("python-nose" ,python-nose)))
10185 (home-page "https://github.com/lepture/flask-wtf")
10186 (synopsis "Simple integration of Flask and WTForms")
10187 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10188 upload, and reCAPTCHA.")
10189 (license license:bsd-3)))
10190
10191 (define-public python2-flask-wtf
10192 (package-with-python2 python-flask-wtf))
10193
10194 (define-public python-flask-multistatic
10195 (package
10196 (name "python-flask-multistatic")
10197 (version "1.0")
10198 (source
10199 (origin
10200 (method url-fetch)
10201 (uri (pypi-uri "flask-multistatic" version))
10202 (sha256
10203 (base32
10204 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10205 (build-system python-build-system)
10206 (propagated-inputs
10207 `(("python-flask" ,python-flask)))
10208 (home-page "https://pagure.io/flask-multistatic")
10209 (synopsis "Flask plugin to allow overriding static files")
10210 (description "@code{flask-multistatic} is a flask plugin that adds support
10211 for overriding static files.")
10212 (license license:gpl3+)))
10213
10214 (define-public python2-flask-multistatic
10215 (package-with-python2 python-flask-multistatic))
10216
10217 (define-public python-cookies
10218 (package
10219 (name "python-cookies")
10220 (version "2.2.1")
10221 (source (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "cookies" version))
10224 (sha256
10225 (base32
10226 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10227 (build-system python-build-system)
10228 (arguments
10229 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10230 #:tests? #f))
10231 (native-inputs
10232 `(("python-pytest" ,python2-pytest)))
10233 (synopsis "HTTP cookie parser and renderer")
10234 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10235 Python.")
10236 (home-page "https://gitlab.com/sashahart/cookies")
10237 (license license:expat)))
10238
10239 (define-public python2-cookies
10240 (package-with-python2 python-cookies))
10241
10242 (define-public python-responses
10243 (package
10244 (name "python-responses")
10245 (version "0.5.1")
10246 (source (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "responses" version))
10249 (sha256
10250 (base32
10251 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10252 (build-system python-build-system)
10253 (arguments
10254 `(;; Test suite is not distributed:
10255 ;; https://github.com/getsentry/responses/issues/38
10256 #:tests? #f))
10257 (native-inputs
10258 `(("python-mock" ,python-mock)))
10259 (propagated-inputs
10260 `(("python-requests" ,python-requests)
10261 ("python-cookies" ,python-cookies)
10262 ("python-six" ,python-six)))
10263 (home-page "https://github.com/getsentry/responses")
10264 (synopsis "Utility for mocking out the `requests` Python library")
10265 (description "A utility library for mocking out the `requests` Python
10266 library.")
10267 (license license:asl2.0)))
10268
10269 (define-public python2-responses
10270 (package-with-python2 python-responses))
10271
10272 (define-public python-whoosh
10273 (package
10274 (name "python-whoosh")
10275 (version "2.7.4")
10276 (source
10277 (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "Whoosh" version))
10280 (sha256
10281 (base32
10282 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10283 (build-system python-build-system)
10284 (native-inputs
10285 `(("python-pytest" ,python-pytest)))
10286 (home-page "http://bitbucket.org/mchaput/whoosh")
10287 (synopsis "Full text indexing, search, and spell checking library")
10288 (description
10289 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10290 checking library.")
10291 (license license:bsd-2)))
10292
10293 (define-public python2-whoosh
10294 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10295 (package (inherit whoosh)
10296 (propagated-inputs
10297 `(("python2-backport-ssl-match-hostname"
10298 ,python2-backport-ssl-match-hostname)
10299 ,@(package-propagated-inputs whoosh))))))
10300
10301 (define-public python-pathlib
10302 (package
10303 (name "python-pathlib")
10304 (version "1.0.1")
10305 (source (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "pathlib" version))
10308 (sha256
10309 (base32
10310 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10311 (build-system python-build-system)
10312 ;; The tests depend on the internal "test" module, which does not provide
10313 ;; a stable interface.
10314 (arguments `(#:tests? #f))
10315 (home-page "https://pathlib.readthedocs.org/")
10316 (synopsis "Object-oriented file system paths")
10317 (description "Pathlib offers a set of classes to handle file system paths.
10318 It offers the following advantages over using string objects:
10319
10320 @enumerate
10321 @item No more cumbersome use of os and os.path functions. Everything can
10322 be done easily through operators, attribute accesses, and method calls.
10323 @item Embodies the semantics of different path types. For example,
10324 comparing Windows paths ignores casing.
10325 @item Well-defined semantics, eliminating any inconsistencies or
10326 ambiguities (forward vs. backward slashes, etc.).
10327 @end enumerate
10328
10329 Note: In Python 3.4, pathlib is now part of the standard library. For other
10330 Python versions please consider python-pathlib2 instead, which tracks the
10331 standard library module. This module (python-pathlib) isn't maintained
10332 anymore.")
10333 (license license:expat)))
10334
10335 (define-public python2-pathlib
10336 (package-with-python2 python-pathlib))
10337
10338 (define-public python2-pathlib2
10339 (package
10340 (name "python2-pathlib2")
10341 (version "2.1.0")
10342 (source (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "pathlib2" version))
10345 (sha256
10346 (base32
10347 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10348 (build-system python-build-system)
10349 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10350 ;; version is 3.4 which already includes this package as part of the
10351 ;; standard library.
10352 (arguments
10353 `(#:python ,python-2))
10354 (native-inputs
10355 `(("python2-six" ,python2-six)))
10356 (home-page "http://pypi.python.org/pypi/pathlib2/")
10357 (synopsis "Object-oriented file system paths - backport of standard
10358 pathlib module")
10359 (description "The goal of pathlib2 is to provide a backport of standard
10360 pathlib module which tracks the standard library module, so all the newest
10361 features of the standard pathlib can be used also on older Python versions.
10362
10363 Pathlib offers a set of classes to handle file system paths. It offers the
10364 following advantages over using string objects:
10365
10366 @enumerate
10367 @item No more cumbersome use of os and os.path functions. Everything can
10368 be done easily through operators, attribute accesses, and method calls.
10369 @item Embodies the semantics of different path types. For example,
10370 comparing Windows paths ignores casing.
10371 @item Well-defined semantics, eliminating any inconsistencies or
10372 ambiguities (forward vs. backward slashes, etc.).
10373 @end enumerate")
10374 (license license:expat)))
10375
10376 (define-public python-jellyfish
10377 (package
10378 (name "python-jellyfish")
10379 (version "0.5.6")
10380 (source (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "jellyfish" version))
10383 (sha256
10384 (base32
10385 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10386 (build-system python-build-system)
10387 (native-inputs
10388 `(("python-pytest" ,python-pytest)))
10389 (home-page "https://github.com/jamesturk/jellyfish")
10390 (synopsis "Approximate and phonetic matching of strings")
10391 (description "Jellyfish uses a variety of string comparison and phonetic
10392 encoding algorithms to do fuzzy string matching.")
10393 (license license:bsd-2)
10394 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10395
10396 (define-public python2-jellyfish
10397 (let ((jellyfish (package-with-python2
10398 (strip-python2-variant python-jellyfish))))
10399 (package (inherit jellyfish)
10400 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10401 ,@(package-native-inputs jellyfish))))))
10402
10403 (define-public python2-unicodecsv
10404 (package
10405 (name "python2-unicodecsv")
10406 (version "0.14.1")
10407 (source (origin
10408 (method url-fetch)
10409 ;; The test suite is not included in the PyPi release.
10410 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10411 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10412 "archive/" version ".tar.gz"))
10413 (file-name (string-append name "-" version ".tar.gz"))
10414 (sha256
10415 (base32
10416 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10417 (build-system python-build-system)
10418 (arguments
10419 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10420 #:python ,python-2))
10421 (native-inputs
10422 `(("python2-unittest2" ,python2-unittest2)))
10423 (home-page "https://github.com/jdunck/python-unicodecsv")
10424 (synopsis "Unicode CSV module for Python 2")
10425 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10426 module, adding support for Unicode strings.")
10427 (license license:bsd-2)))
10428
10429 (define-public python-rarfile
10430 (package
10431 (name "python-rarfile")
10432 (version "2.8")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "rarfile" version))
10436 (sha256
10437 (base32
10438 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10439 (build-system python-build-system)
10440 (arguments
10441 '(#:phases
10442 (modify-phases %standard-phases
10443 (replace 'check
10444 ;; Many tests fail, but the installation proceeds.
10445 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10446 (native-inputs
10447 `(("which" ,which))) ; required for tests
10448 (propagated-inputs
10449 `(("libarchive" ,libarchive)))
10450 (home-page "https://github.com/markokr/rarfile")
10451 (synopsis "RAR archive reader for Python")
10452 (description "This is Python module for RAR archive reading. The interface
10453 is made as zipfile like as possible.")
10454 (license license:isc)))
10455
10456 (define-public python2-rarfile
10457 (package-with-python2 python-rarfile))
10458
10459 (define-public python-magic
10460 (package
10461 (name "python-magic")
10462 (version "0.4.3")
10463 (source
10464 (origin
10465 (method url-fetch)
10466 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10467 version ".tar.gz"))
10468 (sha256
10469 (base32
10470 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10471 (file-name (string-append name "-" version "-checkout"))))
10472 (build-system python-build-system)
10473 (arguments
10474 ;; The tests are unreliable, so don't run them. The tests fail
10475 ;; under Python3 because they were written for Python2 and
10476 ;; contain import statements that do not work in Python3. One of
10477 ;; the tests fails under Python2 because its assertions are
10478 ;; overly stringent; it relies on comparing output strings which
10479 ;; are brittle and can change depending on the version of
10480 ;; libmagic being used and the system on which the test is
10481 ;; running. In my case, under GuixSD 0.10.0, only one test
10482 ;; failed, and it seems to have failed only because the version
10483 ;; of libmagic that is packaged in Guix outputs a slightly
10484 ;; different (but not wrong) string than the one that the test
10485 ;; expected.
10486 '(#:tests? #f
10487 #:phases (modify-phases %standard-phases
10488 ;; Replace a specific method call with a hard-coded
10489 ;; path to the necessary libmagic.so file in the
10490 ;; store. If we don't do this, then the method call
10491 ;; will fail to find the libmagic.so file, which in
10492 ;; turn will cause any application using
10493 ;; python-magic to fail.
10494 (add-before 'build 'hard-code-path-to-libmagic
10495 (lambda* (#:key inputs #:allow-other-keys)
10496 (let ((file (assoc-ref inputs "file")))
10497 (substitute* "magic.py"
10498 (("ctypes.util.find_library\\('magic'\\)")
10499 (string-append "'" file "/lib/libmagic.so'")))
10500 #t)))
10501 (add-before 'install 'disable-egg-compression
10502 (lambda _
10503 (let ((port (open-file "setup.cfg" "a")))
10504 (display "\n[easy_install]\nzip_ok = 0\n"
10505 port)
10506 (close-port port)
10507 #t))))))
10508 (inputs
10509 ;; python-magic needs to be able to find libmagic.so.
10510 `(("file" ,file)))
10511 (home-page "https://github.com/ahupp/python-magic")
10512 (synopsis "File type identification using libmagic")
10513 (description
10514 "This module uses ctypes to access the libmagic file type
10515 identification library. It makes use of the local magic database and
10516 supports both textual and MIME-type output. Note that this module and
10517 the python-file module both provide a \"magic.py\" file; these two
10518 modules, which are different and were developed separately, both serve
10519 the same purpose: to provide Python bindings for libmagic.")
10520 (license license:expat)))
10521
10522 (define-public python2-magic
10523 (package-with-python2 python-magic))
10524
10525 (define-public python2-s3cmd
10526 (package
10527 (name "python2-s3cmd")
10528 (version "1.6.1")
10529 (source
10530 (origin
10531 (method url-fetch)
10532 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10533 "s3cmd-" version ".tar.gz"))
10534 (sha256
10535 (base32
10536 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10537 (build-system python-build-system)
10538 (arguments
10539 ;; s3cmd is written for python2 only and contains no tests.
10540 `(#:python ,python-2
10541 #:tests? #f))
10542 (propagated-inputs
10543 `(("python2-dateutil" ,python2-dateutil)
10544 ;; The python-file package also provides a magic.py module.
10545 ;; This is an unfortunate state of affairs; however, s3cmd
10546 ;; fails to install if it cannot find specifically the
10547 ;; python-magic package. Thus we include it, instead of using
10548 ;; python-file. Ironically, s3cmd sometimes works better
10549 ;; without libmagic bindings at all:
10550 ;; https://github.com/s3tools/s3cmd/issues/198
10551 ("python2-magic" ,python2-magic)))
10552 (home-page "http://s3tools.org/s3cmd")
10553 (synopsis "Command line tool for S3-compatible storage services")
10554 (description
10555 "S3cmd is a command line tool for uploading, retrieving and managing data
10556 in storage services that are compatible with the Amazon Simple Storage
10557 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10558 GnuPG encryption, and more. It also supports management of Amazon's
10559 CloudFront content delivery network.")
10560 (license license:gpl2+)))
10561
10562 (define-public python-pkgconfig
10563 (package
10564 (name "python-pkgconfig")
10565 (version "1.1.0")
10566 (source
10567 (origin
10568 (method url-fetch)
10569 (uri (pypi-uri "pkgconfig" version))
10570 (sha256
10571 (base32
10572 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10573 (build-system python-build-system)
10574 (native-inputs
10575 `(("python-nose" ,python-nose)))
10576 (inputs
10577 `(("pkg-config" ,pkg-config)))
10578 (arguments
10579 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10580 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10581 #:tests? #f
10582 ;; Hard-code the path to pkg-config.
10583 #:phases
10584 (modify-phases %standard-phases
10585 (add-before
10586 'build 'patch
10587 (lambda _
10588 (substitute* "pkgconfig/pkgconfig.py"
10589 (("cmd = 'pkg-config")
10590 (string-append "cmd = '" (which "pkg-config"))))
10591 #t)))))
10592 (home-page "http://github.com/matze/pkgconfig")
10593 (synopsis "Python interface for pkg-config")
10594 (description "This module provides a Python interface to pkg-config. It
10595 can be used to find all pkg-config packages, check if a package exists,
10596 check if a package meets certain version requirements, query CFLAGS and
10597 LDFLAGS and parse the output to build extensions with setup.py.")
10598 (license license:expat)))
10599
10600 (define-public python2-pkgconfig
10601 (package-with-python2 python-pkgconfig))
10602
10603 (define-public python-bz2file
10604 (package
10605 (name "python-bz2file")
10606 (version "0.98")
10607 (source
10608 (origin
10609 (method url-fetch)
10610 (uri (pypi-uri "bz2file" version))
10611 (sha256
10612 (base32
10613 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10614 (build-system python-build-system)
10615 (arguments
10616 `(#:tests? #f)) ; Tests use deprecated python modules.
10617 (home-page "https://github.com/nvawda/bz2file")
10618 (synopsis "Read and write bzip2-compressed files")
10619 (description
10620 "Bz2file is a Python library for reading and writing bzip2-compressed
10621 files. It contains a drop-in replacement for the I/O interface in the
10622 standard library's @code{bz2} module, including features from the latest
10623 development version of CPython that are not available in older releases.")
10624 (license license:asl2.0)
10625 (properties `((python2-variant . ,(delay python2-bz2file))))))
10626
10627 (define-public python2-bz2file
10628 (let ((base (package-with-python2
10629 (strip-python2-variant python-bz2file))))
10630 (package
10631 (inherit base)
10632 (arguments
10633 `(#:python ,python-2
10634 #:phases
10635 (modify-phases %standard-phases
10636 ;; 'python setup.py test' does not work as of 0.98.
10637 ;; There is only the one test file, so we run it directly.
10638 (replace 'check
10639 (lambda _ (zero? (system* "python"
10640 "test_bz2file.py"))))))))))
10641
10642 (define-public python-future
10643 (package
10644 (name "python-future")
10645 (version "0.15.2")
10646 (source
10647 (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "future" version))
10650 (sha256
10651 (base32
10652 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10653 (build-system python-build-system)
10654 ;; Many tests connect to the network or are otherwise flawed.
10655 ;; https://github.com/PythonCharmers/python-future/issues/210
10656 (arguments
10657 `(#:tests? #f))
10658 (home-page "http://python-future.org")
10659 (synopsis "Single-source support for Python 3 and 2")
10660 (description
10661 "@code{python-future} is the missing compatibility layer between Python 2 and
10662 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10663 to support both Python 2 and Python 3 with minimal overhead.")
10664 (license license:expat)))
10665
10666 (define-public python2-future
10667 (package-with-python2 python-future))
10668
10669 (define-public python-cysignals
10670 (package
10671 (name "python-cysignals")
10672 (version "1.1.0")
10673 (source
10674 (origin
10675 (method url-fetch)
10676 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10677 (sha256
10678 (base32
10679 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10680 (build-system python-build-system)
10681 (native-inputs
10682 `(("python-cython" ,python-cython)
10683 ("python-sphinx" ,python-sphinx)))
10684 (inputs
10685 `(("pari-gp" ,pari-gp)))
10686 (arguments
10687 `(#:modules ((guix build python-build-system)
10688 ((guix build gnu-build-system) #:prefix gnu:)
10689 (guix build utils))
10690 ;; FIXME: Tests are executed after installation and currently fail
10691 ;; when not installing into standard locations; the author is working
10692 ;; on a fix.
10693 #:tests? #f
10694 #:phases
10695 (modify-phases %standard-phases
10696 (add-before
10697 'build 'configure
10698 (assoc-ref gnu:%standard-phases 'configure)))))
10699 (home-page
10700 "https://github.com/sagemath/cysignals")
10701 (synopsis
10702 "Handling of interrupts and signals for Cython")
10703 (description
10704 "The cysignals package provides mechanisms to handle interrupts (and
10705 other signals and errors) in Cython code, using two related approaches,
10706 for mixed Cython/Python code or external C libraries and pure Cython code,
10707 respectively.")
10708 (license license:lgpl3+)))
10709
10710 (define-public python2-cysignals
10711 (package-with-python2 python-cysignals))
10712
10713 (define-public python2-shedskin
10714 (package
10715 (name "python2-shedskin")
10716 (version "0.9.4")
10717 (source
10718 (origin
10719 (method url-fetch)
10720 (uri (string-append "https://github.com/shedskin/shedskin/"
10721 "releases/download/v" version
10722 "/shedskin-" version ".tgz"))
10723 (sha256
10724 (base32
10725 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10726 (build-system python-build-system)
10727 (arguments
10728 `(#:python ,python-2
10729 #:phases (modify-phases %standard-phases
10730 (add-after 'unpack 'fix-resulting-include-libs
10731 (lambda* (#:key inputs #:allow-other-keys)
10732 (let ((libgc (assoc-ref inputs "libgc"))
10733 (pcre (assoc-ref inputs "pcre")))
10734 (substitute* "shedskin/makefile.py"
10735 (("variable == 'CCFLAGS':[ ]*")
10736 (string-append "variable == 'CCFLAGS':\n"
10737 " line += ' -I " pcre "/include"
10738 " -I " libgc "/include'"))
10739 (("variable == 'LFLAGS':[ ]*")
10740 (string-append "variable == 'LFLAGS':\n"
10741 " line += ' -L" pcre "/lib"
10742 " -L " libgc "/lib'")))
10743 #t))))))
10744 (inputs `(("pcre" ,pcre)
10745 ("libgc" ,libgc)))
10746 (home-page "https://shedskin.github.io/")
10747 (synopsis "Experimental Python-2 to C++ Compiler")
10748 (description (string-append "This is an experimental compiler for a subset of
10749 Python. It generates C++ code and a Makefile."))
10750 (license (list license:gpl3 license:bsd-3 license:expat))))
10751
10752 (define-public python2-rope
10753 (package
10754 (name "python2-rope")
10755 (version "0.10.3")
10756 (source
10757 (origin
10758 (method url-fetch)
10759 (uri (pypi-uri "rope" version))
10760 (sha256
10761 (base32
10762 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10763 (arguments
10764 ;; Rope is currently python-2 only.
10765 ;; https://github.com/python-rope/rope/issues/57
10766 `(#:python ,python-2))
10767 (build-system python-build-system)
10768 (native-inputs
10769 `(("python2-unittest2" ,python2-unittest2)))
10770 (home-page "https://github.com/python-rope/rope")
10771 (synopsis "Refactoring library for Python")
10772 (description "Rope is a refactoring library for Python. It facilitates
10773 the renaming, moving and extracting of attributes, functions, modules, fields
10774 and parameters in Python 2 source code. These refactorings can also be applied
10775 to occurences in strings and comments.")
10776 (license license:gpl2)))
10777
10778 (define-public python-py3status
10779 (package
10780 (name "python-py3status")
10781 (version "3.1")
10782 (source
10783 (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "py3status" version))
10786 (sha256
10787 (base32
10788 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10789 (build-system python-build-system)
10790 (arguments
10791 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10792 (home-page "https://github.com/ultrabug/py3status")
10793 (synopsis "Extensible i3status wrapper written in Python")
10794 (description "py3status is an i3status wrapper which extends i3status
10795 functionality in a modular way, allowing you to extend your panel with your
10796 own code, responding to click events and updating clock every second.")
10797 (license license:bsd-3)))
10798
10799 (define-public python-tblib
10800 (package
10801 (name "python-tblib")
10802 (version "1.3.0")
10803 (source (origin
10804 (method url-fetch)
10805 (uri (pypi-uri "tblib" version))
10806 (sha256 (base32
10807 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10808 (build-system python-build-system)
10809 (arguments
10810 `(#:phases
10811 (modify-phases %standard-phases
10812 (replace 'check
10813 (lambda _
10814 ;; Upstream runs tests after installation and the package itself
10815 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10816 ;; found.
10817 (setenv "PYTHONPATH"
10818 (string-append (getcwd) "/build/lib:"
10819 (getenv "PYTHONPATH")))
10820 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10821 (native-inputs
10822 `(("python-pytest" ,python-pytest)
10823 ("python-six" ,python-six)))
10824 (home-page "https://github.com/ionelmc/python-tblib")
10825 (synopsis "Traceback serialization library")
10826 (description
10827 "Traceback serialization allows you to:
10828
10829 @enumerate
10830 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10831 different processes. This allows better error handling when running code over
10832 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10833
10834 @item Parse traceback strings and raise with the parsed tracebacks.
10835 @end enumerate\n")
10836 (license license:bsd-3)))
10837
10838 (define-public python2-tblib
10839 (package-with-python2 python-tblib))
10840
10841 (define-public python-sqlparse
10842 (package
10843 (name "python-sqlparse")
10844 (version "0.1.19")
10845 (source (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "sqlparse" version))
10848 (sha256
10849 (base32
10850 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10851 (build-system python-build-system)
10852 (arguments
10853 `(#:phases
10854 (modify-phases %standard-phases
10855 (replace 'check
10856 (lambda* _
10857 ;; setup.py-integrated 2to3 only affects the build files, but
10858 ;; py.test is using the source files. So we need to convert them
10859 ;; manually.
10860 (when (zero? (system* "python3"))
10861 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10862 (zero? (system* "py.test")))))))
10863 (native-inputs
10864 `(("python-pytest" ,python-pytest)))
10865 (home-page "https://github.com/andialbrecht/sqlparse")
10866 (synopsis "Non-validating SQL parser")
10867 (description "Sqlparse is a non-validating SQL parser for Python. It
10868 provides support for parsing, splitting and formatting SQL statements.")
10869 (license license:bsd-3)))
10870
10871 (define-public python2-sqlparse
10872 (package-with-python2 python-sqlparse))
10873
10874 (define-public python-greenlet
10875 (package
10876 (name "python-greenlet")
10877 (version "0.4.11")
10878 (source (origin
10879 (method url-fetch)
10880 (uri (pypi-uri "greenlet" version))
10881 (sha256
10882 (base32
10883 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10884 (build-system python-build-system)
10885 (home-page "https://greenlet.readthedocs.io/")
10886 (synopsis "Lightweight in-process concurrent programming")
10887 (description
10888 "Greenlet package is a spin-off of Stackless, a version of CPython
10889 that supports micro-threads called \"tasklets\". Tasklets run
10890 pseudo-concurrently (typically in a single or a few OS-level threads) and
10891 are synchronized with data exchanges on \"channels\".")
10892 (license (list license:psfl license:expat))))
10893
10894 (define-public python2-greenlet
10895 (package-with-python2 python-greenlet))
10896
10897 (define-public python-gevent
10898 (package
10899 (name "python-gevent")
10900 (version "1.1.1")
10901 (source (origin
10902 (method url-fetch)
10903 (uri (pypi-uri "gevent" version))
10904 (sha256
10905 (base32
10906 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10907 (modules '((guix build utils)))
10908 (snippet
10909 '(begin
10910 ;; unbunding libev and c-ares
10911 (for-each delete-file-recursively '("libev" "c-ares"))
10912 ;; fixing testsuite
10913 (call-with-output-file "greentest/__init__.py" noop)
10914 (substitute* "greentest/testrunner.py"
10915 (("import util") "from . import util")
10916 (("from util import log") "from .util import log"))))))
10917 (build-system python-build-system)
10918 (propagated-inputs
10919 `(("python-greenlet" ,python-greenlet)))
10920 (native-inputs
10921 `(("python-six" ,python-six)))
10922 (inputs
10923 `(("c-ares" ,c-ares)
10924 ("libev" ,libev)))
10925 (home-page "http://www.gevent.org/")
10926 (synopsis "Coroutine-based network library")
10927 (description
10928 "gevent is a coroutine-based Python networking library that uses greenlet
10929 to provide a high-level synchronous API on top of the libev event loop.")
10930 (license license:expat)))
10931
10932 (define-public python2-gevent
10933 (package-with-python2 python-gevent))
10934
10935 (define-public python-geventhttpclient
10936 (package
10937 (name "python-geventhttpclient")
10938 (version "1.3.1")
10939 (source (origin
10940 (method url-fetch)
10941 (uri (pypi-uri "geventhttpclient" version))
10942 (sha256
10943 (base32
10944 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10945 (modules '((guix build utils)))
10946 (snippet
10947 '(begin
10948 ;; Delete pre-compiled files.
10949 (for-each delete-file (find-files "src/geventhttpclient"
10950 ".*\\.pyc"))
10951 #t))))
10952 (build-system python-build-system)
10953 (arguments
10954 '(#:phases
10955 (modify-phases %standard-phases
10956 (add-after 'unpack 'delete-network-tests
10957 (lambda _
10958 (delete-file "src/geventhttpclient/tests/test_client.py")
10959 #t))
10960 (delete 'check)
10961 (add-after 'install 'check
10962 (lambda* (#:key inputs outputs #:allow-other-keys)
10963 (add-installed-pythonpath inputs outputs)
10964 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10965 (native-inputs
10966 `(("python-pytest" ,python-pytest)))
10967 (propagated-inputs
10968 `(("python-certifi" ,python-certifi)
10969 ("python-gevent" ,python-gevent)
10970 ("python-six" ,python-six)))
10971 (home-page "https://github.com/gwik/geventhttpclient")
10972 (synopsis "HTTP client library for gevent")
10973 (description "@code{python-geventhttpclient} is a high performance,
10974 concurrent HTTP client library for python using @code{gevent}.")
10975 (license license:expat)))
10976
10977 (define-public python2-geventhttpclient
10978 (package-with-python2 python-geventhttpclient))
10979
10980 (define-public python-fastimport
10981 (package
10982 (name "python-fastimport")
10983 (version "0.9.6")
10984 (source
10985 (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "fastimport" version))
10988 (sha256
10989 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10990 (build-system python-build-system)
10991 (home-page "https://github.com/jelmer/python-fastimport")
10992 (synopsis "VCS fastimport parser and generator in Python")
10993 (description "This package provides a parser for and generator of the Git
10994 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10995 format.")
10996 (license license:gpl2+)))
10997
10998 (define-public python2-fastimport
10999 (package-with-python2 python-fastimport))
11000
11001 (define-public python-twisted
11002 (package
11003 (name "python-twisted")
11004 (version "16.2.0")
11005 (source (origin
11006 (method url-fetch)
11007 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11008 (sha256
11009 (base32
11010 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11011 (build-system python-build-system)
11012 (arguments
11013 '(#:tests? #f)) ; FIXME: Some tests are failing.
11014 ;; #:phases
11015 ;; (modify-phases %standard-phases
11016 ;; (replace 'check
11017 ;; (lambda _
11018 ;; (zero? (system* "./bin/trial" "twisted")))))
11019 (propagated-inputs
11020 `(("python-zope-interface" ,python-zope-interface)))
11021 (home-page "https://twistedmatrix.com/")
11022 (synopsis "Asynchronous networking framework written in Python")
11023 (description
11024 "Twisted is an extensible framework for Python programming, with special
11025 focus on event-based network programming and multiprotocol integration.")
11026 (license license:expat)))
11027
11028 (define-public python2-twisted
11029 (package-with-python2 python-twisted))
11030
11031 (define-public python-pika
11032 (package
11033 (name "python-pika")
11034 (version "0.10.0")
11035 (source
11036 (origin
11037 (method url-fetch)
11038 (uri (pypi-uri "pika" version))
11039 (sha256
11040 (base32
11041 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11042 (build-system python-build-system)
11043 (native-inputs
11044 `(("python-pyev" ,python-pyev)
11045 ("python-tornado" ,python-tornado)
11046 ("python-twisted" ,python-twisted)))
11047 (home-page "https://pika.readthedocs.org")
11048 (synopsis "Pure Python AMQP Client Library")
11049 (description
11050 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11051 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11052 network support library.")
11053 (license license:bsd-3)))
11054
11055 (define-public python2-pika
11056 (package-with-python2 python-pika))
11057
11058 (define-public python-ply
11059 (package
11060 (name "python-ply")
11061 (version "3.9")
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "ply" version))
11066 (sha256
11067 (base32
11068 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11069 (build-system python-build-system)
11070 (home-page "http://www.dabeaz.com/ply/")
11071 (synopsis "Python Lex & Yacc")
11072 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11073 It uses LR parsing and does extensive error checking.")
11074 (license license:bsd-3)))
11075
11076 (define-public python2-ply
11077 (package-with-python2 python-ply))
11078
11079 (define-public python-tabulate
11080 (package
11081 (name "python-tabulate")
11082 (version "0.7.7")
11083 (source (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "tabulate" version))
11086 (sha256
11087 (base32
11088 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11089 (build-system python-build-system)
11090 (arguments
11091 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11092 ;; and the latest release is not tagged in the upstream repository.
11093 '(#:tests? #f))
11094 (home-page "https://bitbucket.org/astanin/python-tabulate")
11095 (synopsis "Pretty-print tabular data")
11096 (description
11097 "Tabulate is a library and command-line utility to pretty-print tabular
11098 data in Python.")
11099 (license license:expat)))
11100
11101 (define-public python2-tabulate
11102 (package-with-python2 python-tabulate))
11103
11104 (define-public python-kazoo
11105 (package
11106 (name "python-kazoo")
11107 (version "2.2.1")
11108 (source
11109 (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "kazoo" version))
11112 (sha256
11113 (base32
11114 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11115 (build-system python-build-system)
11116 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11117 (propagated-inputs
11118 `(("python-six" ,python-six)))
11119 (home-page "https://kazoo.readthedocs.org")
11120 (synopsis "High-level Zookeeper client library")
11121 (description
11122 "Kazoo is a Python client library for the Apache Zookeeper distributed
11123 application service. It is designed to be easy to use and to avoid common
11124 programming errors.")
11125 (license license:asl2.0)))
11126
11127 (define-public python2-kazoo
11128 (package-with-python2 python-kazoo))
11129
11130 (define-public python-pykafka
11131 (package
11132 (name "python-pykafka")
11133 (version "2.4.0")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (string-append
11137 "https://pypi.python.org/packages/8b/3e/"
11138 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11139 "pykafka-" version ".tar.gz"))
11140 (sha256
11141 (base32
11142 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11143 (build-system python-build-system)
11144 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11145 (propagated-inputs
11146 `(("python-gevent" ,python-gevent)
11147 ("python-kazoo" ,python-kazoo)
11148 ("python-tabulate" ,python-tabulate)))
11149 (inputs
11150 `(("librdkafka" ,librdkafka)))
11151 (home-page "https://pykafka.readthedocs.io/")
11152 (synopsis "Apache Kafka client for Python")
11153 (description
11154 "PyKafka is a client for the Apache Kafka distributed messaging system.
11155 It includes Python implementations of Kafka producers and consumers, which
11156 are optionally backed by a C extension built on librdkafka.")
11157 (license license:asl2.0)))
11158
11159 (define-public python2-pykafka
11160 (package-with-python2 python-pykafka))
11161
11162 (define-public python-wcwidth
11163 (package
11164 (name "python-wcwidth")
11165 (version "0.1.7")
11166 (source
11167 (origin
11168 (method url-fetch)
11169 (uri (pypi-uri "wcwidth" version))
11170 (sha256
11171 (base32
11172 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11173 (build-system python-build-system)
11174 (home-page "https://github.com/jquast/wcwidth")
11175 (synopsis "Measure number of terminal column cells of wide-character codes")
11176 (description "Wcwidth measures the number of terminal column cells of
11177 wide-character codes. It is useful for those implementing a terminal emulator,
11178 or programs that carefully produce output to be interpreted by one. It is a
11179 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11180 specified in POSIX.1-2001 and POSIX.1-2008.")
11181 (license license:expat)))
11182
11183 (define-public python2-wcwidth
11184 (package-with-python2 python-wcwidth))
11185
11186 (define-public python2-jsonrpclib
11187 (package
11188 (name "python2-jsonrpclib")
11189 (version "0.1.7")
11190 (source (origin
11191 (method url-fetch)
11192 (uri (string-append
11193 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11194 "jsonrpclib-" version ".tar.gz"))
11195 (sha256
11196 (base32
11197 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11198 (build-system python-build-system)
11199 (arguments
11200 `(#:tests? #f
11201 #:python ,python-2))
11202 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11203 (synopsis "Implementation of JSON-RPC specification for Python")
11204 (description
11205 "This library is an implementation of the JSON-RPC specification.
11206 It supports both the original 1.0 specification, as well as the
11207 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11208 etc.")
11209 (license license:asl2.0)))
11210
11211 (define-public python-chai
11212 (package
11213 (name "python-chai")
11214 (version "1.1.1")
11215 (source (origin
11216 (method url-fetch)
11217 (uri (pypi-uri "chai" version))
11218 (sha256
11219 (base32
11220 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11221 (build-system python-build-system)
11222 (home-page "https://github.com/agoragames/chai")
11223 (synopsis "Mocking framework for Python")
11224 (description
11225 "Chai provides an api for mocking, stubbing and spying your python
11226 objects, patterned after the Mocha library for Ruby.")
11227 (license license:bsd-3)))
11228
11229 (define-public python2-chai
11230 (package-with-python2 python-chai))
11231
11232 (define-public python-arrow
11233 (package
11234 (name "python-arrow")
11235 (version "0.8.0")
11236 (source (origin
11237 (method url-fetch)
11238 (uri (pypi-uri "arrow" version))
11239 (sha256
11240 (base32
11241 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11242 (build-system python-build-system)
11243 (native-inputs
11244 `(;; For testing
11245 ("python-chai" ,python-chai)
11246 ("python-simplejson" ,python-simplejson)))
11247 (propagated-inputs
11248 `(("python-dateutil" ,python-dateutil)))
11249 (home-page "https://github.com/crsmithdev/arrow/")
11250 (synopsis "Dates and times for Python")
11251 (description
11252 "Arrow is a Python library to creating, manipulating, formatting and
11253 converting dates, times, and timestamps. It implements and updates the
11254 datetime type.")
11255 (license license:asl2.0)))
11256
11257 (define-public python2-arrow
11258 (package-with-python2 python-arrow))
11259
11260 (define-public python-inflection
11261 (package
11262 (name "python-inflection")
11263 (version "0.3.1")
11264 (source
11265 (origin (method url-fetch)
11266 (uri (pypi-uri "inflection" version))
11267 (sha256
11268 (base32
11269 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11270 (build-system python-build-system)
11271 (native-inputs
11272 `(("python-pytest" ,python-pytest)))
11273 (home-page "http://github.com/jpvanhal/inflection")
11274 (synopsis "Python string transformation library")
11275 (description
11276 "Inflection is a string transformation library. It singularizes
11277 and pluralizes English words, and transforms strings from CamelCase to
11278 underscored string.")
11279 (license license:expat)))
11280
11281 (define-public python2-inflection
11282 (package-with-python2 python-inflection))
11283
11284 (define-public python-pylev
11285 (package
11286 (name "python-pylev")
11287 (version "1.3.0")
11288 (source (origin
11289 (method url-fetch)
11290 (uri (pypi-uri "pylev" version))
11291 (sha256
11292 (base32
11293 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11294 (build-system python-build-system)
11295 (home-page "http://github.com/toastdriven/pylev")
11296 (synopsis "Levenshtein distance implementation in Python")
11297 (description "Pure Python Levenshtein implementation, based off the
11298 Wikipedia code samples at
11299 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11300 (license license:bsd-3)))
11301
11302 (define-public python2-pylev
11303 (package-with-python2 python-pylev))
11304
11305 (define-public python-cleo
11306 (package
11307 (name "python-cleo")
11308 (version "0.4.1")
11309 (source (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "cleo" version))
11312 (sha256
11313 (base32
11314 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11315 (build-system python-build-system)
11316 (native-inputs
11317 `(;; For testing
11318 ("python-mock" ,python-mock)
11319 ("python-pytest" ,python-pytest)))
11320 (propagated-inputs
11321 `(("python-psutil" ,python-psutil)
11322 ("python-pylev" ,python-pylev)))
11323 (home-page "https://github.com/sdispater/cleo")
11324 (synopsis "Command-line arguments library for Python")
11325 (description
11326 "Cleo allows you to create command-line commands with signature in
11327 docstring and colored output.")
11328 (license license:expat)))
11329
11330 (define-public python2-cleo
11331 (package-with-python2 python-cleo))
11332
11333 (define-public python-lazy-object-proxy
11334 (package
11335 (name "python-lazy-object-proxy")
11336 (version "1.2.2")
11337 (source (origin
11338 (method url-fetch)
11339 (uri (pypi-uri "lazy-object-proxy" version))
11340 (sha256
11341 (base32
11342 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11343 (build-system python-build-system)
11344 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11345 (synopsis "Lazy object proxy for python")
11346 (description
11347 "Lazy object proxy is an object that wraps a callable but defers the call
11348 until the object is actually required, and caches the result of said call.")
11349 (license license:bsd-2)))
11350
11351 (define-public python2-lazy-object-proxy
11352 (package-with-python2 python-lazy-object-proxy))
11353
11354 (define-public python-dnspython
11355 (package
11356 (name "python-dnspython")
11357 (version "1.15.0")
11358 (source (origin
11359 (method url-fetch)
11360 (uri (string-append "http://www.dnspython.org/kits/"
11361 version "/dnspython-" version ".tar.gz"))
11362 (sha256
11363 (base32
11364 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11365 (build-system python-build-system)
11366 (arguments '(#:tests? #f)) ; XXX: requires internet access
11367 (home-page "http://www.dnspython.org")
11368 (synopsis "DNS toolkit for Python")
11369 (description
11370 "dnspython is a DNS toolkit for Python. It supports almost all record
11371 types. It can be used for queries, zone transfers, and dynamic updates.
11372 It supports TSIG authenticated messages and EDNS0.")
11373 (license license:expat)))
11374
11375 (define-public python2-dnspython
11376 (package-with-python2 python-dnspython))
11377
11378 (define-public python-email-validator
11379 (package
11380 (name "python-email-validator")
11381 (version "1.0.2")
11382 (source
11383 (origin (method url-fetch)
11384 (uri (pypi-uri "email_validator" version))
11385 (sha256
11386 (base32
11387 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11388 (build-system python-build-system)
11389 (arguments
11390 '(#:phases
11391 (modify-phases %standard-phases
11392 (add-before 'build 'use-dnspython
11393 (lambda _
11394 (substitute* "setup.py"
11395 (("dnspython3") "dnspython"))
11396 #t)))))
11397 (propagated-inputs
11398 `(("python-dnspython" ,python-dnspython)
11399 ("python-idna" ,python-idna)))
11400 (home-page "https://github.com/JoshData/python-email-validator")
11401 (synopsis "Email address validation library for Python")
11402 (description
11403 "This library validates email address syntax and deliverability.")
11404 (license license:cc0)))
11405
11406 (define-public python2-email-validator
11407 (package-with-python2 python-email-validator))
11408
11409 (define-public python-ukpostcodeparser
11410 (package
11411 (name "python-ukpostcodeparser")
11412 (version "1.0.3")
11413 (source (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "UkPostcodeParser" version))
11416 (sha256
11417 (base32
11418 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11419 (build-system python-build-system)
11420 (home-page "https://github.com/hamstah/ukpostcodeparser")
11421 (synopsis "UK Postcode parser for Python")
11422 (description
11423 "This library provides the @code{parse_uk_postcode} function for
11424 parsing UK postcodes.")
11425 (license license:expat)))
11426
11427 (define-public python2-ukpostcodeparser
11428 (package-with-python2 python-ukpostcodeparser))
11429
11430 (define-public python-faker
11431 (package
11432 (name "python-faker")
11433 (version "0.7.9")
11434 (source (origin
11435 (method url-fetch)
11436 (uri (pypi-uri "Faker" version))
11437 (sha256
11438 (base32
11439 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11440 (patches
11441 (search-patches "python-faker-fix-build-32bit.patch"))
11442 (modules '((guix build utils)))
11443 (snippet
11444 '(begin
11445 (for-each delete-file (find-files "." "\\.pyc$"))
11446 #t))))
11447 (build-system python-build-system)
11448 (arguments
11449 '(#:phases
11450 (modify-phases %standard-phases
11451 (replace 'check
11452 (lambda _
11453 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11454 (native-inputs
11455 `(;; For testing
11456 ("python-email-validator" ,python-email-validator)
11457 ("python-mock" ,python-mock)
11458 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11459 (propagated-inputs
11460 `(("python-dateutil" ,python-dateutil)
11461 ("python-six" ,python-six)))
11462 (home-page "https://github.com/joke2k/faker")
11463 (synopsis "Python package that generates fake data")
11464 (description
11465 "Faker is a Python package that generates fake data such as names,
11466 addresses, and phone numbers.")
11467 (license license:expat)
11468 (properties `((python2-variant . ,(delay python2-faker))))))
11469
11470 (define-public python2-faker
11471 (let ((base (package-with-python2 (strip-python2-variant
11472 python-faker))))
11473 (package
11474 (inherit base)
11475 (propagated-inputs
11476 `(("python2-ipaddress" ,python2-ipaddress)
11477 ,@(package-propagated-inputs base))))))
11478
11479 (define-public python-fake-factory
11480 (package
11481 (name "python-fake-factory")
11482 (version "0.7.2")
11483 (source (origin
11484 (method url-fetch)
11485 (uri (pypi-uri "fake-factory" version))
11486 (sha256
11487 (base32
11488 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11489 (patches
11490 (search-patches
11491 "python-fake-factory-fix-build-32bit.patch"))))
11492 (build-system python-build-system)
11493 (arguments
11494 '(#:phases
11495 (modify-phases %standard-phases
11496 (replace 'check
11497 (lambda _
11498 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11499 (native-inputs
11500 `(;; For testing
11501 ("python-email-validator" ,python-email-validator)
11502 ("python-mock" ,python-mock)
11503 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11504 (propagated-inputs
11505 `(("python-dateutil" ,python-dateutil)
11506 ("python-six" ,python-six)))
11507 (home-page "https://github.com/joke2k/faker")
11508 (synopsis "Python package that generates fake data")
11509 (description
11510 "Faker is a Python package that generates fake data such as names,
11511 addresses, and phone numbers.")
11512 (license license:expat)
11513 (properties `((python2-variant . ,(delay python2-fake-factory))
11514 (superseded . ,python-faker)))))
11515
11516 (define-public python2-fake-factory
11517 (let ((base (package-with-python2 (strip-python2-variant
11518 python-fake-factory))))
11519 (package
11520 (inherit base)
11521 (properties `((superseded . ,python2-faker)))
11522 (propagated-inputs
11523 `(("python2-ipaddress" ,python2-ipaddress)
11524 ,@(package-propagated-inputs base))))))
11525
11526 (define-public python-pyaml
11527 (package
11528 (name "python-pyaml")
11529 (version "15.8.2")
11530 (source (origin
11531 (method url-fetch)
11532 (uri (pypi-uri "pyaml" version))
11533 (sha256
11534 (base32
11535 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11536 (build-system python-build-system)
11537 (native-inputs
11538 `(("python-unidecode" ,python-unidecode)))
11539 (propagated-inputs
11540 `(("python-pyyaml" ,python-pyyaml)))
11541 (home-page "https://github.com/mk-fg/pretty-yaml")
11542 (synopsis "YAML pretty-print library for Python")
11543 (description
11544 "pyaml is a PyYAML based python module to produce pretty and readable
11545 YAML-serialized data.")
11546 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11547
11548 (define-public python2-pyaml
11549 (package-with-python2 python-pyaml))
11550
11551 (define-public python-flexmock
11552 (package
11553 (name "python-flexmock")
11554 (version "0.10.2")
11555 (source (origin
11556 (method url-fetch)
11557 (uri (pypi-uri "flexmock" version))
11558 (sha256
11559 (base32
11560 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11561 (build-system python-build-system)
11562 (home-page "https://flexmock.readthedocs.org")
11563 (synopsis "Testing library for Python")
11564 (description
11565 "flexmock is a testing library for Python that makes it easy to create
11566 mocks, stubs and fakes.")
11567 (license license:bsd-3)))
11568
11569 (define-public python2-flexmock
11570 (package-with-python2 python-flexmock))
11571
11572 (define-public python-orator
11573 (package
11574 (name "python-orator")
11575 (version "0.8.2")
11576 (source (origin
11577 (method url-fetch)
11578 (uri (pypi-uri "orator" version))
11579 (sha256
11580 (base32
11581 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11582 (build-system python-build-system)
11583 (arguments '(#:tests? #f)) ; no tests
11584 (propagated-inputs
11585 `(("python-arrow" ,python-arrow)
11586 ("python-blinker" ,python-blinker)
11587 ("python-cleo" ,python-cleo)
11588 ("python-faker" ,python-faker)
11589 ("python-inflection" ,python-inflection)
11590 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11591 ("python-pyaml" ,python-pyaml)
11592 ("python-simplejson" ,python-simplejson)
11593 ("python-wrapt" ,python-wrapt)))
11594 (home-page "https://orator-orm.com/")
11595 (synopsis "ActiveRecord ORM for Python")
11596 (description
11597 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11598 implementation for Python.")
11599 (license license:expat)
11600 (properties `((python2-variant . ,(delay python2-orator))))))
11601
11602 (define-public python2-orator
11603 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11604 (package
11605 (inherit base)
11606 (propagated-inputs
11607 `(("python2-ipaddress" ,python2-ipaddress)
11608 ,@(package-propagated-inputs base))))))
11609
11610 (define-public python-prompt-toolkit
11611 (package
11612 (name "python-prompt-toolkit")
11613 (version "1.0.9")
11614 (source
11615 (origin
11616 (method url-fetch)
11617 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11618 (sha256
11619 (base32
11620 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11621 (build-system python-build-system)
11622 (arguments
11623 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11624 (propagated-inputs
11625 `(("python-wcwidth" ,python-wcwidth)
11626 ("python-six" ,python-six)
11627 ("python-pygments" ,python-pygments)))
11628 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11629 (synopsis "Library for building command line interfaces in Python")
11630 (description
11631 "Prompt-Toolkit is a library for building interactive command line
11632 interfaces in Python. It's like GNU Readline but it also features syntax
11633 highlighting while typing, out-of-the-box multi-line input editing, advanced
11634 code completion, incremental search, support for Chinese double-width
11635 characters, mouse support, and auto suggestions.")
11636 (license license:bsd-3)))
11637
11638 (define-public python2-prompt-toolkit
11639 (package-with-python2 python-prompt-toolkit))
11640
11641 (define-public python-jedi
11642 (package
11643 (name "python-jedi")
11644 (version "0.9.0")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "jedi" version))
11649 (sha256
11650 (base32
11651 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11652 (build-system python-build-system)
11653 (arguments
11654 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11655 '(#:tests? #f))
11656 (native-inputs
11657 `(("python-pytest" ,python-pytest)))
11658 (home-page "https://github.com/davidhalter/jedi")
11659 (synopsis
11660 "Autocompletion for Python that can be used for text editors")
11661 (description
11662 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11663 (license license:expat)))
11664
11665 (define-public python2-jedi
11666 (package-with-python2 python-jedi))
11667
11668 (define-public ptpython
11669 (package
11670 (name "ptpython")
11671 (version "0.34")
11672 (source (origin
11673 (method url-fetch)
11674 (uri (pypi-uri "ptpython" version))
11675 (sha256
11676 (base32
11677 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11678 (build-system python-build-system)
11679 (arguments
11680 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11681 (propagated-inputs
11682 `(("python-docopt" ,python-docopt)
11683 ("python-jedi" ,python-jedi)
11684 ("python-prompt-toolkit" ,python-prompt-toolkit)
11685 ("python-pygments" ,python-pygments)))
11686 (home-page "https://github.com/jonathanslenders/ptpython")
11687 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11688 (description
11689 "ptpython is a Python read-eval-print loop with IDE-like features.
11690 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11691 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11692 etc.")
11693 (license license:bsd-3)
11694 (properties `((python2-variant . ,(delay ptpython-2))))))
11695
11696 (define-public ptpython-2
11697 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11698 (package
11699 (inherit base)
11700 (name "ptpython2"))))
11701
11702 (define-public python-requests-oauthlib
11703 (package
11704 (name "python-requests-oauthlib")
11705 (version "0.6.2")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "requests-oauthlib" version))
11710 (sha256
11711 (base32
11712 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11713 (build-system python-build-system)
11714 (arguments
11715 `(#:phases
11716 (modify-phases %standard-phases
11717 ;; removes tests that require network access
11718 (add-before 'check 'pre-check
11719 (lambda _
11720 (delete-file "tests/test_core.py")
11721 #t)))))
11722 (native-inputs
11723 `(("python-requests-mock" ,python-requests-mock)
11724 ("python-mock" ,python-mock)))
11725 (propagated-inputs
11726 `(("python-oauthlib" ,python-oauthlib)
11727 ("python-requests" ,python-requests)))
11728 (home-page
11729 "https://github.com/requests/requests-oauthlib")
11730 (synopsis
11731 "OAuthlib authentication support for Requests")
11732 (description
11733 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11734 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11735 (license license:isc)))
11736
11737 (define-public python2-requests-oauthlib
11738 (package-with-python2 python-requests-oauthlib))
11739
11740 (define-public python-stem
11741 (package
11742 (name "python-stem")
11743 (version "1.5.4")
11744 (source
11745 (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "stem" version))
11748 (sha256
11749 (base32
11750 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11751 (build-system python-build-system)
11752 (arguments
11753 `(#:phases
11754 (modify-phases %standard-phases
11755 (replace 'check
11756 (lambda _
11757 (zero? (system* "./run_tests.py" "--unit")))))))
11758 (native-inputs
11759 `(("python-mock" ,python-mock)
11760 ("python-pep8" ,python-pep8)
11761 ("python-pyflakes" ,python-pyflakes)))
11762 (home-page "https://stem.torproject.org/")
11763 (synopsis
11764 "Python controller library that allows applications to interact with Tor")
11765 (description
11766 "Stem is a Python controller library for Tor. With it you can use Tor's
11767 control protocol to script against the Tor process and read descriptor data
11768 relays publish about themselves.")
11769 (license license:lgpl3)))
11770
11771 (define-public python2-stem
11772 (package-with-python2 python-stem))
11773
11774 (define-public python-pyserial
11775 (package
11776 (name "python-pyserial")
11777 (version "3.1.1")
11778 (source
11779 (origin
11780 (method url-fetch)
11781 (uri (pypi-uri "pyserial" version))
11782 (sha256
11783 (base32
11784 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11785 (build-system python-build-system)
11786 (arguments
11787 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11788 ;; #:phases
11789 ;; (modify-phases %standard-phases
11790 ;; (replace 'check
11791 ;; (lambda _
11792 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11793 (home-page
11794 "https://github.com/pyserial/pyserial")
11795 (synopsis "Python Serial Port Bindings")
11796 (description "@code{pyserial} provide serial port bindings for Python. It
11797 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11798 and/or Xon/Xoff. The port is accessed in RAW mode.")
11799 (license license:bsd-3)))
11800
11801 (define-public python2-pyserial
11802 (package-with-python2 python-pyserial))
11803
11804 (define-public python-kivy
11805 (package
11806 (name "python-kivy")
11807 (version "1.9.1")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "kivy" version))
11812 (file-name (string-append name "-" version ".tar.gz"))
11813 (sha256
11814 (base32
11815 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11816 (build-system python-build-system)
11817 (arguments
11818 `(#:tests? #f ; Tests require many optional packages
11819 #:phases
11820 (modify-phases %standard-phases
11821 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11822 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11823 (lambda* (#:key inputs #:allow-other-keys)
11824 (setenv "KIVY_SDL2_PATH"
11825 (string-append (assoc-ref inputs "sdl-union")
11826 "/include/SDL2"))
11827 #t)))))
11828 (native-inputs
11829 `(("pkg-config" ,pkg-config)
11830 ("python-cython" ,python-cython)))
11831 (inputs
11832 `(("gstreamer" ,gstreamer)
11833 ("mesa" ,mesa)
11834 ("sdl-union"
11835 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11836 (home-page "http://kivy.org")
11837 (synopsis
11838 "Multitouch application framework")
11839 (description
11840 "A software library for rapid development of
11841 hardware-accelerated multitouch applications.")
11842 (license license:expat)))
11843
11844 (define-public python2-kivy
11845 (package-with-python2 python-kivy))
11846
11847 (define-public python-kivy-next
11848 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11849 (revision "1"))
11850 (package (inherit python-kivy)
11851 (name "python-kivy-next")
11852 (version (string-append "1.9.1-" revision "."
11853 (string-take commit 7)))
11854 (source
11855 (origin
11856 (method git-fetch)
11857 (uri (git-reference
11858 (url "https://github.com/kivy/kivy")
11859 (commit commit)))
11860 (file-name (string-append name "-" version "-checkout"))
11861 (sha256
11862 (base32
11863 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11864
11865 (define-public python2-kivy-next
11866 (package-with-python2 python-kivy-next))
11867
11868 (define-public python-binaryornot
11869 (package
11870 (name "python-binaryornot")
11871 (version "0.4.0")
11872 (source (origin
11873 (method url-fetch)
11874 (uri (pypi-uri "binaryornot" version))
11875 (sha256
11876 (base32
11877 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11878 (build-system python-build-system)
11879 (propagated-inputs
11880 `(("python-chardet" ,python-chardet)
11881 ("python-hypothesis" ,python-hypothesis)))
11882 (home-page "https://github.com/audreyr/binaryornot")
11883 (synopsis "Package to check if a file is binary or text")
11884 (description "Ultra-lightweight pure Python package to check if a file is
11885 binary or text.")
11886 (license license:bsd-3)
11887 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11888
11889 (define-public python2-binaryornot
11890 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11891 (package (inherit base)
11892 (propagated-inputs
11893 `(("python2-enum34" ,python2-enum34)
11894 ,@(package-propagated-inputs base))))))
11895
11896 (define-public python-nltk
11897 (package
11898 (name "python-nltk")
11899 (version "3.2.1")
11900 (source (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "nltk" version))
11903 (sha256
11904 (base32
11905 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11906 (build-system python-build-system)
11907 (arguments
11908 '(;; The tests require some extra resources to be downloaded.
11909 ;; TODO Try packaging these resources.
11910 #:tests? #f))
11911 (home-page "http://nltk.org/")
11912 (synopsis "Natural Language Toolkit")
11913 (description "It provides interfaces to over 50 corpora and lexical
11914 resources such as WordNet, along with a suite of text processing libraries
11915 for classification, tokenization, stemming, tagging, parsing, and semantic
11916 reasoning, wrappers for natural language processing libraries.")
11917 (license license:asl2.0)))
11918
11919 (define-public python2-nltk
11920 (package-with-python2 python-nltk))
11921
11922 (define-public python-pymongo
11923 (package
11924 (name "python-pymongo")
11925 (version "3.3.0")
11926 (source (origin
11927 (method url-fetch)
11928 (uri (pypi-uri "pymongo" version))
11929 (sha256
11930 (base32
11931 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11932 (build-system python-build-system)
11933 (propagated-inputs
11934 `(("python-certifi" ,python-certifi)))
11935 (home-page "http://github.com/mongodb/mongo-python-driver")
11936 (synopsis "Python driver for MongoDB")
11937 (description "Python driver for MongoDB.")
11938 (license license:asl2.0)))
11939
11940 (define-public python2-pymongo
11941 (package-with-python2 python-pymongo))
11942
11943 (define-public python-sh
11944 (package
11945 (name "python-sh")
11946 (version "1.11")
11947 (source (origin
11948 (method url-fetch)
11949 (uri (pypi-uri "sh" version))
11950 (sha256
11951 (base32
11952 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11953 (build-system python-build-system)
11954 (arguments
11955 `(#:tests? #f)) ; no tests
11956 (home-page "https://github.com/amoffat/sh")
11957 (synopsis "Python subprocess interface")
11958 (description "Abstracts process invocation by providing a function
11959 interface for programs.")
11960 (license license:expat)))
11961
11962 (define-public python2-sh
11963 (package-with-python2 python-sh))
11964
11965 (define-public python-consul
11966 (package
11967 (name "python-consul")
11968 (version "0.6.1")
11969 (source
11970 (origin
11971 (method url-fetch)
11972 (uri (pypi-uri "python-consul" version))
11973 (sha256
11974 (base32
11975 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11976 (build-system python-build-system)
11977 (native-inputs
11978 `(("python-pytest" ,python-pytest)))
11979 (propagated-inputs
11980 `(("python-requests" ,python-requests)
11981 ("python-six" ,python-six)))
11982 (home-page "https://github.com/cablehead/python-consul")
11983 (synopsis "Python client for Consul")
11984 (description
11985 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11986 discovery, monitoring and configuration.")
11987 (license license:expat)))
11988
11989 (define-public python2-consul
11990 (package-with-python2 python-consul))
11991
11992 (define-public python-schematics
11993 (package
11994 (name "python-schematics")
11995 (version "1.1.1")
11996 (source
11997 (origin
11998 (method url-fetch)
11999 (uri (string-append
12000 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12001 (file-name (string-append name "-" version ".tar.gz"))
12002 (sha256
12003 (base32
12004 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12005 (build-system python-build-system)
12006 (propagated-inputs
12007 `(("python-six" ,python-six)))
12008 (arguments
12009 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12010 ; version requirements (eg python-coveralls)
12011 (home-page "https://github.com/schematics/schematics")
12012 (synopsis "Python Data Structures for Humans")
12013 (description "Python Data Structures for Humans.")
12014 (license license:bsd-3)))
12015
12016 (define-public python2-schematics
12017 (package-with-python2 python-schematics))
12018
12019 (define-public python-publicsuffix
12020 (package
12021 (name "python-publicsuffix")
12022 (version "1.1.0")
12023 (source (origin
12024 (method url-fetch)
12025 (uri (pypi-uri "publicsuffix" version))
12026 (sha256
12027 (base32
12028 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12029 (build-system python-build-system)
12030 (arguments
12031 `(#:tests? #f)) ; tests use the internet
12032 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12033 (synopsis "Get suffix for a domain name")
12034 (description "Get a public suffix for a domain name using the Public Suffix
12035 List.")
12036 (license license:expat)))
12037
12038 (define-public python2-publicsuffix
12039 (package-with-python2 python-publicsuffix))
12040
12041 (define-public python-publicsuffix2
12042 (package
12043 (name "python-publicsuffix2")
12044 (version "2.20160818")
12045 (source
12046 (origin
12047 (method url-fetch)
12048 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12049 (sha256
12050 (base32
12051 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12052 (build-system python-build-system)
12053 (arguments
12054 '(#:tests? #f)) ; The test suite requires network access.
12055 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12056 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12057 (description "Get a public suffix for a domain name using the Public Suffix
12058 List. Forked from and using the same API as the publicsuffix package.")
12059 (license (list license:expat license:mpl2.0))))
12060
12061 (define-public python2-publicsuffix2
12062 (package-with-python2 python-publicsuffix2))
12063
12064 (define-public python-url
12065 (package
12066 (name "python-url")
12067 (version "0.2.0")
12068 (source (origin
12069 (method url-fetch)
12070 (uri (pypi-uri "url" version))
12071 (sha256
12072 (base32
12073 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12074 (build-system python-build-system)
12075 (propagated-inputs
12076 `(("python-publicsuffix" ,python-publicsuffix)))
12077 (native-inputs
12078 `(("python-coverage" ,python-coverage)
12079 ("python-nose" ,python-nose)))
12080 (arguments
12081 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12082 (home-page "http://github.com/seomoz/url-py")
12083 (synopsis "URL Parsing")
12084 (description "Library for parsing urls.")
12085 (license license:expat)
12086 (properties `((python2-variant . ,(delay python2-url))))))
12087
12088 (define-public python2-url
12089 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12090 (package (inherit base)
12091 (propagated-inputs
12092 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12093
12094 (define-public python-freezegun
12095 (package
12096 (name "python-freezegun")
12097 (version "0.3.8")
12098 (source
12099 (origin
12100 (method url-fetch)
12101 (uri (pypi-uri "freezegun" version))
12102 (sha256
12103 (base32
12104 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12105 (build-system python-build-system)
12106 (native-inputs
12107 `(("python-mock" ,python-mock)
12108 ("python-nose" ,python-nose)
12109 ("python-coverage" ,python-coverage)))
12110 (propagated-inputs
12111 `(("python-six" ,python-six)
12112 ("python-dateutil" ,python-dateutil)))
12113 (arguments
12114 `(#:phases (modify-phases %standard-phases
12115 ;; The tests are normally executed via `make test`, but the PyPi
12116 ;; package does not include the Makefile.
12117 (replace 'check
12118 (lambda _
12119 (zero? (system* "nosetests" "./tests/")))))))
12120 (home-page "https://github.com/spulec/freezegun")
12121 (synopsis "Test utility for mocking the datetime module")
12122 (description
12123 "FreezeGun is a library that allows your python tests to travel through
12124 time by mocking the datetime module.")
12125 (license license:asl2.0)))
12126
12127 (define-public python2-freezegun
12128 (package-with-python2 python-freezegun))
12129
12130
12131 (define-public python-odfpy
12132 (package
12133 (name "python-odfpy")
12134 (version "1.3.3")
12135 (source (origin
12136 (method url-fetch)
12137 (uri (pypi-uri "odfpy" version))
12138 (sha256
12139 (base32
12140 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12141 (arguments
12142 `(#:modules ((srfi srfi-1)
12143 (guix build python-build-system)
12144 (guix build utils))
12145 #:phases
12146 (modify-phases %standard-phases
12147 (replace 'check
12148 ;; The test runner invokes python2 and python3 for test*.py.
12149 ;; To avoid having both in inputs, we replicate it here.
12150 (lambda _
12151 (every (lambda (test-file)
12152 (zero? (system* "python" test-file)))
12153 (find-files "tests" "^test.*\\.py$")))))))
12154 (build-system python-build-system)
12155 (home-page "https://github.com/eea/odfpy")
12156 (synopsis "Python API and tools to manipulate OpenDocument files")
12157 (description "Collection of libraries and utility programs written in
12158 Python to manipulate OpenDocument 1.2 files.")
12159 (license
12160 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12161 ;; number of files with other licenses.
12162 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12163
12164 (define-public python2-odfpy
12165 (package-with-python2 python-odfpy))
12166
12167 (define-public python-cachecontrol
12168 (package
12169 (name "python-cachecontrol")
12170 (version "0.11.6")
12171 (source
12172 (origin
12173 (method url-fetch)
12174 ;; Pypi does not have tests.
12175 (uri (string-append
12176 "https://github.com/ionrock/cachecontrol/archive/v"
12177 version ".tar.gz"))
12178 (file-name (string-append name "-" version ".tar.gz"))
12179 (sha256
12180 (base32
12181 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12182 (build-system python-build-system)
12183 (arguments
12184 `(#:phases
12185 (modify-phases %standard-phases
12186 (replace 'check
12187 (lambda _
12188 ;; Drop test that requires internet access.
12189 (delete-file "tests/test_regressions.py")
12190 (setenv "PYTHONPATH"
12191 (string-append (getcwd) "/build/lib:"
12192 (getenv "PYTHONPATH")))
12193 (zero? (system* "py.test" "-vv")))))))
12194 (native-inputs
12195 `(("python-pytest" ,python-pytest)
12196 ("python-redis" ,python-redis)
12197 ("python-webtest" ,python-webtest)
12198 ("python-mock" ,python-mock)))
12199 (propagated-inputs
12200 `(("python-requests" ,python-requests)
12201 ("python-lockfile" ,python-lockfile)))
12202 (home-page "https://github.com/ionrock/cachecontrol")
12203 (synopsis "The httplib2 caching algorithms for use with requests")
12204 (description "CacheControl is a port of the caching algorithms in
12205 @code{httplib2} for use with @code{requests} session objects.")
12206 (license license:asl2.0)))
12207
12208 (define-public python2-cachecontrol
12209 (package-with-python2 python-cachecontrol))
12210
12211 (define-public python-lit
12212 (package
12213 (name "python-lit")
12214 (version "0.5.0")
12215 (source
12216 (origin
12217 (method url-fetch)
12218 (uri (pypi-uri "lit" version))
12219 (sha256
12220 (base32
12221 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12222 (build-system python-build-system)
12223 (home-page "http://llvm.org/")
12224 (synopsis "LLVM Software Testing Tool")
12225 (description "@code{lit} is a portable tool for executing LLVM and Clang
12226 style test suites, summarizing their results, and providing indication of
12227 failures.")
12228 (license license:ncsa)))
12229
12230 (define-public python2-lit
12231 (package-with-python2 python-lit))
12232
12233 (define-public python-pytest-pep8
12234 (package
12235 (name "python-pytest-pep8")
12236 (version "1.0.6")
12237 (source (origin
12238 (method url-fetch)
12239 (uri (pypi-uri "pytest-pep8" version))
12240 (sha256
12241 (base32
12242 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12243 (build-system python-build-system)
12244 (arguments
12245 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12246 (native-inputs
12247 `(("python-pytest" ,python-pytest)))
12248 (propagated-inputs
12249 `(("python-pep8" ,python-pep8)))
12250 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12251 (synopsis "Py.test plugin to check PEP8 requirements")
12252 (description "Pytest plugin for checking PEP8 compliance.")
12253 (license license:expat)))
12254
12255 (define-public python2-pytest-pep8
12256 (package-with-python2 python-pytest-pep8))
12257
12258 (define-public python-pytest-flakes
12259 (package
12260 (name "python-pytest-flakes")
12261 (version "1.0.1")
12262 (source (origin
12263 (method url-fetch)
12264 (uri (pypi-uri "pytest-flakes" version))
12265 (sha256
12266 (base32
12267 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12268 (build-system python-build-system)
12269 (arguments
12270 `(#:phases
12271 (modify-phases %standard-phases
12272 (delete 'check)
12273 (add-after 'install 'check
12274 (lambda* (#:key outputs inputs #:allow-other-keys)
12275 ;; It's easier to run tests after install.
12276 ;; Make installed package available for running the tests
12277 (add-installed-pythonpath inputs outputs)
12278 (zero? (system* "py.test" "-vv")))))))
12279 (native-inputs
12280 `(("python-coverage" ,python-coverage)
12281 ("python-pytest" ,python-pytest)
12282 ("python-pytest-cache" ,python-pytest-cache)
12283 ("python-pytest-pep8" ,python-pytest-pep8)))
12284 (propagated-inputs
12285 `(("python-pyflakes" ,python-pyflakes)))
12286 (home-page "https://github.com/fschulze/pytest-flakes")
12287 (synopsis "Py.test plugin to check source code with pyflakes")
12288 (description "Pytest plugin for checking Python source code with pyflakes.")
12289 (license license:expat)))
12290
12291 (define-public python2-pytest-flakes
12292 (package-with-python2 python-pytest-flakes))
12293
12294 (define-public python-natsort
12295 (package
12296 (name "python-natsort")
12297 (version "5.0.2")
12298 (source (origin
12299 (method url-fetch)
12300 (uri (pypi-uri "natsort" version))
12301 (sha256
12302 (base32
12303 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12304 (build-system python-build-system)
12305 (arguments
12306 `(#:phases
12307 (modify-phases %standard-phases
12308 (add-before 'check 'set-cachedir
12309 ;; Tests require write access to $HOME by default
12310 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12311 (native-inputs
12312 `(("python-hypothesis" ,python-hypothesis)
12313 ("python-pytest-cache" ,python-pytest-cache)
12314 ("python-pytest-cov" ,python-pytest-cov)
12315 ("python-pytest-flakes" ,python-pytest-flakes)
12316 ("python-pytest-pep8" ,python-pytest-pep8)))
12317 (propagated-inputs ; TODO: Add python-fastnumbers.
12318 `(("python-pyicu" ,python-pyicu)))
12319 (home-page "https://github.com/SethMMorton/natsort")
12320 (synopsis "Natural sorting for python and shell")
12321 (description
12322 "Natsort lets you apply natural sorting on lists instead of
12323 lexicographical. If you use the built-in @code{sorted} method in python
12324 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12325 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12326 function @code{natsorted} that identifies numbers and sorts them separately
12327 from strings. It can also sort version numbers, real numbers, mixed types
12328 and more, and comes with a shell command @command{natsort} that exposes this
12329 functionality in the command line.")
12330 (license license:expat)
12331 (properties `((python2-variant . ,(delay python2-natsort))))))
12332
12333 (define-public python2-natsort
12334 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12335 (package (inherit base)
12336 (native-inputs
12337 `(("python2-pathlib" ,python2-pathlib)
12338 ("python2-mock" ,python2-mock)
12339 ("python2-enum34" ,python2-enum34)
12340 ,@(package-native-inputs base))))))
12341
12342 (define-public python-glances
12343 (package
12344 (name "python-glances")
12345 (version "2.7.1")
12346 (source
12347 (origin
12348 (method url-fetch)
12349 (uri (pypi-uri "Glances" version))
12350 (sha256
12351 (base32
12352 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12353 (build-system python-build-system)
12354 (propagated-inputs
12355 `(("python-psutil" ,python-psutil)))
12356 (home-page
12357 "https://github.com/nicolargo/glances")
12358 (synopsis
12359 "A cross-platform curses-based monitoring tool")
12360 (description
12361 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12362 Glances uses the PsUtil library to get information from your system. It monitors
12363 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12364 (license license:lgpl3+)))
12365
12366 (define-public python2-glances
12367 (package-with-python2 python-glances))
12368
12369 (define-public python-graphql-core
12370 (package
12371 (name "python-graphql-core")
12372 (version "0.5.3")
12373 (source
12374 (origin
12375 (method url-fetch)
12376 (uri (pypi-uri "graphql-core" version))
12377 (sha256
12378 (base32
12379 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12380 (build-system python-build-system)
12381 (arguments
12382 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12383 #:phases
12384 (modify-phases %standard-phases
12385 (add-after 'unpack 'patch-hardcoded-version
12386 (lambda _ (substitute*
12387 "setup.py"
12388 (("'gevent==1.1rc1'") "'gevent'"))
12389 #t)))))
12390 (native-inputs
12391 `(("python-gevent" ,python-gevent)
12392 ("python-mock" ,python-mock)
12393 ("python-pytest-mock" ,python-pytest-mock)))
12394 (propagated-inputs
12395 `(("python-promise" ,python-promise)
12396 ("python-six" ,python-six)))
12397 (home-page "https://github.com/graphql-python/graphql-core")
12398 (synopsis "GraphQL implementation for Python")
12399 (description
12400 "GraphQL implementation for Python. GraphQL is a data query language and
12401 runtime designed and used to request and deliver data to mobile and web apps.
12402 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12403 to Python.")
12404 (license license:expat)))
12405
12406 (define-public python2-graphql-core
12407 (package-with-python2 python-graphql-core))
12408
12409 (define-public python-graphql-relay
12410 (package
12411 (name "python-graphql-relay")
12412 (version "0.4.5")
12413 (source
12414 (origin
12415 (method url-fetch)
12416 (uri (pypi-uri "graphql-relay" version))
12417 (sha256
12418 (base32
12419 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12420 (build-system python-build-system)
12421 (native-inputs
12422 `(("python-pytest" ,python-pytest)))
12423 (propagated-inputs
12424 `(("python-graphql-core" ,python-graphql-core)
12425 ("python-promise" ,python-promise)
12426 ("python-six" ,python-six)))
12427 (home-page "https://github.com/graphql-python/graphql-relay-py")
12428 (synopsis "Relay implementation for Python")
12429 (description
12430 "This is a library to allow the easy creation of Relay-compliant servers
12431 using the GraphQL Python reference implementation of a GraphQL server. It
12432 should be noted that the code is a exact port of the original
12433 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12434 from Facebook.")
12435 (license license:expat)))
12436
12437 (define-public python2-graphql-relay
12438 (package-with-python2 python-graphql-relay))
12439
12440 (define-public python-graphene
12441 (package
12442 (name "python-graphene")
12443 (version "0.10.2")
12444 (source
12445 (origin
12446 (method url-fetch)
12447 (uri (pypi-uri "graphene" version))
12448 (sha256
12449 (base32
12450 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12451 (build-system python-build-system)
12452 (native-inputs
12453 `(("python-django-filter" ,python-django-filter)
12454 ("python-mock" ,python-mock)
12455 ("python-psycopg2" ,python-psycopg2)
12456 ("python-pytest-django" ,python-pytest-django)
12457 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12458 (propagated-inputs
12459 `(("python-graphql-core" ,python-graphql-core)
12460 ("python-graphql-relay" ,python-graphql-relay)
12461 ("python-iso8601" ,python-iso8601)
12462 ("python-promise" ,python-promise)
12463 ("python-six" ,python-six)))
12464 (home-page "http://graphene-python.org/")
12465 (synopsis "GraphQL Framework for Python")
12466 (description
12467 "Graphene is a Python library for building GraphQL schemas/types.
12468 A GraphQL schema describes your data model, and provides a GraphQL server
12469 with an associated set of resolve methods that know how to fetch data.")
12470 (properties `((python2-variant . ,(delay python2-graphene))))
12471 (license license:expat)))
12472
12473 (define-public python2-graphene
12474 (let ((base (package-with-python2
12475 (strip-python2-variant python-graphene))))
12476 (package (inherit base)
12477 (native-inputs
12478 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12479 ,@(package-native-inputs base))))))
12480
12481 (define-public python-nautilus
12482 (package
12483 (name "python-nautilus")
12484 (version "0.4.9")
12485 (source
12486 (origin
12487 (method url-fetch)
12488 (uri (pypi-uri "nautilus" version))
12489 (sha256
12490 (base32
12491 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12492 (build-system python-build-system)
12493 (arguments `(#:tests? #f)) ; fails to import test modules
12494 (propagated-inputs
12495 `(("python-bcrypt" ,python-bcrypt)
12496 ("python-click" ,python-click)
12497 ("python-consul" ,python-consul)
12498 ("python-graphene" ,python-graphene)
12499 ("python-jinja2" ,python-jinja2)
12500 ("python-peewee" ,python-peewee)
12501 ("python-pika" ,python-pika)
12502 ("python-tornado" ,python-tornado)
12503 ("python-wtforms" ,python-wtforms)))
12504 (native-inputs
12505 `(("python-nose2" ,python-nose2)))
12506 (home-page "https://github.com/AlecAivazis/nautilus")
12507 (synopsis "Library for creating microservice applications")
12508 (description
12509 "Nautilus is a framework for flux based microservices that looks to
12510 provide extendible implementations of common aspects of a cloud so that you can
12511 focus on building massively scalable web applications.")
12512 (license license:expat)))
12513
12514 (define-public python-snowballstemmer
12515 (package
12516 (name "python-snowballstemmer")
12517 (version "1.2.1")
12518 (source (origin
12519 (method url-fetch)
12520 (uri (pypi-uri "snowballstemmer" version))
12521 (sha256
12522 (base32
12523 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12524 (build-system python-build-system)
12525 (arguments
12526 `(;; No tests exist
12527 #:tests? #f))
12528 (home-page "https://github.com/shibukawa/snowball_py")
12529 (synopsis "Snowball stemming library collection for Python")
12530 (description "This package provides 16 word stemmer algorithms generated
12531 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12532 English stemmer.")
12533 (license license:bsd-3)))
12534
12535 (define-public python2-snowballstemmer
12536 (package-with-python2 python-snowballstemmer))
12537
12538 (define-public python-sphinx-cloud-sptheme
12539 (package
12540 (name "python-sphinx-cloud-sptheme")
12541 (version "1.8.0")
12542 (source (origin
12543 (method url-fetch)
12544 (uri (pypi-uri "cloud_sptheme" version))
12545 (sha256
12546 (base32
12547 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12548 (build-system python-build-system)
12549 ;; FIXME: The 'pypi' release archive does not contain tests.
12550 (arguments '(#:tests? #f))
12551 (native-inputs
12552 `(("python-sphinx" ,python-sphinx)))
12553 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12554 (synopsis "'Cloud' theme for Sphinx documenter")
12555 (description "This package contains the \"Cloud\" theme for Sphinx and some
12556 related extensions.")
12557 (license license:bsd-3)))
12558
12559 (define-public python2-sphinx-cloud-sptheme
12560 (package-with-python2 python-sphinx-cloud-sptheme))
12561
12562 (define-public python-sphinx-alabaster-theme
12563 (package
12564 (name "python-sphinx-alabaster-theme")
12565 (version "0.7.9")
12566 (source (origin
12567 (method url-fetch)
12568 (uri (pypi-uri "alabaster" version))
12569 (sha256
12570 (base32
12571 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12572 (build-system python-build-system)
12573 (propagated-inputs
12574 `(("python-pygments" ,python-pygments)))
12575 (home-page "https://alabaster.readthedocs.io/")
12576 (synopsis "Configurable sidebar-enabled Sphinx theme")
12577 (description "Alabaster is a visually (c)lean, responsive, configurable
12578 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12579 (license license:bsd-3)))
12580
12581 (define-public python2-sphinx-alabaster-theme
12582 (package-with-python2 python-sphinx-alabaster-theme))
12583
12584 (define-public python-betamax
12585 (package
12586 (name "python-betamax")
12587 (version "0.8.0")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "betamax" version))
12592 (sha256
12593 (base32
12594 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12595 (build-system python-build-system)
12596 (arguments
12597 '(;; Many tests fail because they require networking.
12598 #:tests? #f))
12599 (propagated-inputs
12600 `(("python-requests" ,python-requests)))
12601 (home-page "https://github.com/sigmavirus24/betamax")
12602 (synopsis "Record HTTP interactions with python-requests")
12603 (description "Betamax will record your test suite's HTTP interactions and
12604 replay them during future tests. It is designed to work with python-requests.")
12605 (license license:expat)))
12606
12607 (define-public python2-betamax
12608 (package-with-python2 python-betamax))
12609
12610 (define-public python-s3transfer
12611 (package
12612 (name "python-s3transfer")
12613 (version "0.1.10")
12614 (source (origin
12615 (method url-fetch)
12616 (uri (pypi-uri "s3transfer" version))
12617 (sha256
12618 (base32
12619 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12620 (build-system python-build-system)
12621 (arguments
12622 `(#:phases
12623 (modify-phases %standard-phases
12624 (replace 'check
12625 (lambda _
12626 ;; 7 of the 'integration' tests require network access or login
12627 ;; credentials.
12628 (zero? (system* "nosetests" "--exclude=integration")))))))
12629 (native-inputs
12630 `(("python-docutils" ,python-docutils)
12631 ("python-mock" ,python-mock)
12632 ("python-nose" ,python-nose)))
12633 (propagated-inputs
12634 `(("python-botocore" ,python-botocore)))
12635 (synopsis "Amazon S3 Transfer Manager")
12636 (description "S3transfer is a Python library for managing Amazon S3
12637 transfers.")
12638 (home-page "https://github.com/boto/s3transfer")
12639 (license license:asl2.0)
12640 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12641
12642 (define-public python2-s3transfer
12643 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12644 (package
12645 (inherit base)
12646 (native-inputs
12647 `(("python2-futures" ,python2-futures)
12648 ,@(package-native-inputs base))))))
12649
12650 (define-public python-setproctitle
12651 (package
12652 (name "python-setproctitle")
12653 (version "1.1.10")
12654 (source
12655 (origin
12656 (method url-fetch)
12657 (uri (pypi-uri "setproctitle" version))
12658 (sha256
12659 (base32
12660 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12661 (build-system python-build-system)
12662 (arguments
12663 '(#:phases
12664 (modify-phases %standard-phases
12665 (add-before 'check 'patch-Makefile
12666 ;; Stricly this is only required for the python2 variant.
12667 ;; But adding a phase in an inherited package seems to be
12668 ;; cumbersum. So we patch even for python3.
12669 (lambda _
12670 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12671 (when nose
12672 (substitute* "Makefile"
12673 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12674 (string-append nose "/bin/nosetests "))))
12675 #t)))
12676 (replace 'check
12677 (lambda _
12678 (setenv "PYTHON" (or (which "python3") (which "python")))
12679 (setenv "PYCONFIG" (or (which "python3-config")
12680 (which "python-config")))
12681 (setenv "CC" "gcc")
12682 ;; No need to extend PYTHONPATH to find the built package, since
12683 ;; the Makefile will build anyway
12684 (zero? (system* "make" "check")))))))
12685 (native-inputs
12686 `(("procps" ,procps))) ; required for tests
12687 (home-page
12688 "https://github.com/dvarrazzo/py-setproctitle")
12689 (synopsis
12690 "Setproctitle implementation for Python to customize the process title")
12691 (description "The library allows a process to change its title (as displayed
12692 by system tools such as ps and top).
12693
12694 Changing the title is mostly useful in multi-process systems, for
12695 example when a master process is forked: changing the children's title
12696 allows to identify the task each process is busy with. The technique
12697 is used by PostgreSQL and the OpenSSH Server for example.")
12698 (license license:bsd-3)
12699 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12700
12701 (define-public python2-setproctitle
12702 (let ((base (package-with-python2
12703 (strip-python2-variant python-setproctitle))))
12704 (package
12705 (inherit base)
12706 (native-inputs `(("python2-nose" ,python2-nose)
12707 ,@(package-native-inputs base))))))
12708
12709 (define-public python-validictory
12710 (package
12711 (name "python-validictory")
12712 (version "1.0.1")
12713 (source
12714 (origin
12715 (method url-fetch)
12716 (uri (pypi-uri "validictory" version))
12717 (sha256
12718 (base32
12719 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12720 (build-system python-build-system)
12721 (arguments
12722 '(#:phases
12723 (modify-phases %standard-phases
12724 (add-after 'unpack 'bootstrap
12725 ;; Move the tests out of the package directory to avoid
12726 ;; packaging them.
12727 (lambda* _
12728 (rename-file "validictory/tests" "tests")
12729 (delete-file "tests/__init__.py")))
12730 (replace 'check
12731 (lambda _
12732 ;; Extend PYTHONPATH so the built package will be found.
12733 (setenv "PYTHONPATH"
12734 (string-append (getcwd) "/build/lib:"
12735 (getenv "PYTHONPATH")))
12736 (zero? (system* "py.test" "-vv" )))))))
12737 (native-inputs
12738 `(("python-pytest" ,python-pytest)))
12739 (home-page
12740 "https://github.com/jamesturk/validictory")
12741 (synopsis "General purpose Python data validator")
12742 (description "It allows validation of arbitrary Python data structures.
12743
12744 The schema format is based on the JSON Schema
12745 proposal (http://json-schema.org), so combined with json the library is also
12746 useful as a validator for JSON data.")
12747 (license license:expat)))
12748
12749 (define-public python2-validictory
12750 (package-with-python2 python-validictory))
12751
12752 (define-public python-aniso8601
12753 (package
12754 (name "python-aniso8601")
12755 (version "1.1.0")
12756 (source
12757 (origin
12758 (method url-fetch)
12759 (uri (pypi-uri "aniso8601" version))
12760 (sha256
12761 (base32
12762 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12763 (build-system python-build-system)
12764 (propagated-inputs
12765 `(("python-dateutil" ,python-dateutil)))
12766 (home-page
12767 "https://bitbucket.org/nielsenb/aniso8601")
12768 (synopsis
12769 "Python library for parsing ISO 8601 strings")
12770 (description
12771 "This package contains a library for parsing ISO 8601 datetime strings.")
12772 (license license:bsd-3)))
12773
12774 (define-public python-flask-restful
12775 (package
12776 (name "python-flask-restful")
12777 (version "0.3.5")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "Flask-RESTful" version))
12782 (sha256
12783 (base32
12784 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12785 (build-system python-build-system)
12786 (propagated-inputs
12787 `(("python-aniso8601" ,python-aniso8601)
12788 ("python-flask" ,python-flask)
12789 ("python-pycrypto" ,python-pycrypto)
12790 ("python-pytz" ,python-pytz)))
12791 (native-inputs
12792 `(;; Optional dependency of Flask. Tests need it.
12793 ("python-blinker" ,python-blinker)
12794 ("python-mock" ,python-mock) ; For tests
12795 ("python-nose" ,python-nose) ; For tests
12796 ("python-sphinx" ,python-sphinx)))
12797 (home-page
12798 "https://www.github.com/flask-restful/flask-restful/")
12799 (synopsis
12800 "Flask module for creating REST APIs")
12801 (description
12802 "This package contains a Flask module for creating REST APIs.")
12803 (license license:bsd-3)))
12804
12805 (define-public python-flask-basicauth
12806 (package
12807 (name "python-flask-basicauth")
12808 (version "0.2.0")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "Flask-BasicAuth" version))
12813 (sha256
12814 (base32
12815 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12816 (build-system python-build-system)
12817 (propagated-inputs
12818 `(("python-flask" ,python-flask)))
12819 (home-page
12820 "https://github.com/jpvanhal/flask-basicauth")
12821 (synopsis
12822 "HTTP basic access authentication for Flask")
12823 (description
12824 "This package provides HTTP basic access authentication for Flask.")
12825 (license license:bsd-3)))
12826
12827 (define-public python-flask-sqlalchemy
12828 (package
12829 (name "python-flask-sqlalchemy")
12830 (version "2.1")
12831 (source
12832 (origin
12833 (method url-fetch)
12834 (uri (pypi-uri "Flask-SQLAlchemy" version))
12835 (sha256
12836 (base32
12837 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12838 (build-system python-build-system)
12839 (propagated-inputs
12840 `(("python-flask" ,python-flask)
12841 ("python-sqlalchemy" ,python-sqlalchemy)))
12842 (home-page
12843 "http://github.com/mitsuhiko/flask-sqlalchemy")
12844 (synopsis
12845 "Module adding SQLAlchemy support to your Flask application")
12846 (description
12847 "This package adds SQLAlchemy support to your Flask application.")
12848 (license license:bsd-3)))
12849
12850 (define-public python-pyev
12851 (package
12852 (name "python-pyev")
12853 (version "0.9.0")
12854 (source
12855 (origin
12856 (method url-fetch)
12857 (uri (pypi-uri "pyev" version))
12858 (sha256
12859 (base32
12860 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12861 (build-system python-build-system)
12862 (arguments
12863 `(#:tests? #f ; no test suite
12864 #:phases
12865 (modify-phases %standard-phases
12866 (add-after 'unpack 'patch
12867 (lambda* (#:key inputs #:allow-other-keys)
12868 (let ((libev (string-append (assoc-ref inputs "libev")
12869 "/lib/libev.so.4")))
12870 (substitute* "setup.py"
12871 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12872 (string-append "libev_dll_name = \"" libev "\"")))))))))
12873 (inputs
12874 `(("libev" ,libev)))
12875 (home-page "http://pythonhosted.org/pyev/")
12876 (synopsis "Python libev interface")
12877 (description "Pyev provides a Python interface to libev.")
12878 (license license:gpl3)))
12879
12880 (define-public python2-pyev
12881 (package-with-python2 python-pyev))
12882
12883 (define-public python-imagesize
12884 (package
12885 (name "python-imagesize")
12886 (version "0.7.1")
12887 (source
12888 (origin
12889 (method url-fetch)
12890 (uri (pypi-uri "imagesize" version))
12891 (sha256
12892 (base32
12893 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12894 (build-system python-build-system)
12895 (arguments
12896 '(;; Test files are not distributed on PyPi:
12897 ;; https://github.com/shibukawa/imagesize_py/issues/7
12898 #:tests? #f))
12899 (home-page "https://github.com/shibukawa/imagesize_py")
12900 (synopsis "Gets image size of files in variaous formats in Python")
12901 (description
12902 "This package allows determination of image size from
12903 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12904 (license license:expat)))
12905
12906 (define-public python2-imagesize
12907 (package-with-python2 python-imagesize))
12908
12909 (define-public python-axolotl-curve25519
12910 (package
12911 (name "python-axolotl-curve25519")
12912 (version "0.1")
12913 (source
12914 (origin
12915 (method git-fetch)
12916 (uri (git-reference
12917 (url "git://github.com/tgalal/python-axolotl-curve25519")
12918 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12919 (file-name (string-append name "-" version "-checkout"))
12920 (sha256
12921 (base32
12922 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12923 (build-system python-build-system)
12924 (arguments
12925 `(;; Prevent creation of the egg. This works around
12926 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12927 #:configure-flags '("--root=/")))
12928 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12929 (synopsis "Python wrapper for curve25519 library")
12930 (description "This is a python wrapper for the curve25519 library
12931 with ed25519 signatures. The C code was pulled from
12932 libaxolotl-android. At the moment this wrapper is meant for use by
12933 python-axolotl.")
12934 (license (list license:gpl3 ; Most files
12935 license:bsd-3)))) ; curve/curve25519-donna.c
12936
12937 (define-public python2-axolotl-curve25519
12938 (package-with-python2 python-axolotl-curve25519))
12939
12940 (define-public python-axolotl
12941 (package
12942 (name "python-axolotl")
12943 (version "0.1.35")
12944 (source
12945 (origin
12946 (method url-fetch)
12947 (uri (string-append
12948 "https://github.com/tgalal/python-axolotl/archive/"
12949 version ".tar.gz"))
12950 (file-name (string-append name "-" version ".tar.gz"))
12951 (sha256
12952 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12953 (build-system python-build-system)
12954 (arguments
12955 `(#:phases
12956 (modify-phases %standard-phases
12957 ;; Don't install tests
12958 (add-before 'install 'remove-tests
12959 (lambda _
12960 (for-each delete-file-recursively
12961 '("axolotl/tests" "build/lib/axolotl/tests"))
12962 #t)))))
12963 (propagated-inputs
12964 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12965 ("python-dateutil" ,python-dateutil)
12966 ("python-protobuf" ,python-protobuf)
12967 ("python-pycrypto" ,python-pycrypto)))
12968 (home-page "https://github.com/tgalal/python-axolotl")
12969 (synopsis "Python port of libaxolotl-android")
12970 (description "This is a python port of libaxolotl-android. This
12971 is a ratcheting forward secrecy protocol that works in synchronous and
12972 asynchronous messaging environments.")
12973 (license license:gpl3)))
12974
12975 (define-public python2-axolotl
12976 (package-with-python2 python-axolotl))
12977
12978 (define-public python-termstyle
12979 (package
12980 (name "python-termstyle")
12981 (version "0.1.11")
12982 (source
12983 (origin
12984 (method url-fetch)
12985 (uri (pypi-uri "termstyle" version))
12986 (sha256
12987 (base32
12988 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12989 (build-system python-build-system)
12990 (arguments
12991 '(#:phases
12992 (modify-phases %standard-phases
12993 (replace 'check
12994 (lambda _
12995 (zero? (system* "python" "test3.py")))))))
12996 (home-page "http://github.com/gfxmonk/termstyle")
12997 (synopsis "Console text coloring for Python")
12998 (description "This package provides console text coloring for Python.")
12999 (license license:bsd-3)))
13000
13001 (define-public python-rednose
13002 (package
13003 (name "python-rednose")
13004 (version "1.2.1")
13005 (source
13006 (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "rednose" version))
13009 (sha256
13010 (base32
13011 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13012 (build-system python-build-system)
13013 (arguments
13014 `(#:phases
13015 (modify-phases %standard-phases
13016 (add-after 'unpack 'fix-deps
13017 (lambda _
13018 ;; See <https://github.com/JBKahn/rednose/issues/12>
13019 (substitute* "setup.py"
13020 (("python-termstyle") "termstyle"))
13021 #t)))))
13022 (propagated-inputs
13023 `(("python-colorama" ,python-colorama)
13024 ("python-termstyle" ,python-termstyle)))
13025 (native-inputs
13026 `(("python-six" ,python-six)
13027 ("python-nose" ,python-nose)))
13028 (home-page "https://github.com/JBKahn/rednose")
13029 (synopsis "Colored output for Python nosetests")
13030 (description "This package provides colored output for the
13031 @command{nosetests} command of the Python Nose unit test framework.")
13032 (license license:bsd-3)))
13033
13034 (define-public python-flask-restplus
13035 (package
13036 (name "python-flask-restplus")
13037 (version "0.9.2")
13038 (source
13039 (origin
13040 (method url-fetch)
13041 (uri (pypi-uri "flask-restplus" version))
13042 (sha256
13043 (base32
13044 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13045 (build-system python-build-system)
13046 (arguments
13047 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13048 ;; #:phases
13049 ;; (modify-phases %standard-phases
13050 ;; (replace 'check
13051 ;; (lambda _
13052 ;; (zero? (system* "nosetests")))))))
13053 (propagated-inputs
13054 `(("python-aniso8601" ,python-aniso8601)
13055 ("python-flask" ,python-flask)
13056 ("python-jsonschema" ,python-jsonschema)
13057 ("python-pytz" ,python-pytz)
13058 ("python-six" ,python-six)))
13059 (native-inputs
13060 `(("python-tzlocal" ,python-tzlocal)
13061 ("python-blinker" ,python-blinker)
13062 ("python-nose" ,python-nose)
13063 ("python-rednose" ,python-rednose)))
13064 (home-page "https://github.com/noirbizarre/flask-restplus")
13065 (synopsis "Framework for documented API development with Flask")
13066 (description "This package provides a framework for API development with
13067 the Flask web framework in Python. It is similar to package
13068 @code{python-flask-restful} but supports the @code{python-swagger}
13069 documentation builder.")
13070 (license license:expat)))
13071
13072 (define-public python-sadisplay
13073 (package
13074 (name "python-sadisplay")
13075 (version "0.4.6")
13076 (source
13077 (origin
13078 (method url-fetch)
13079 (uri (pypi-uri "sadisplay" version))
13080 (sha256
13081 (base32
13082 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13083 (build-system python-build-system)
13084 (propagated-inputs
13085 `(("python-sqlalchemy" ,python-sqlalchemy)))
13086 (native-inputs
13087 `(("python-nose" ,python-nose)))
13088 (home-page "https://bitbucket.org/estin/sadisplay")
13089 (synopsis "SQLAlchemy schema displayer")
13090 (description "This package provides a program to build Entity
13091 Relationship diagrams from a SQLAlchemy model (or directly from the
13092 database).")
13093 (license license:bsd-3)))
13094
13095 (define-public python2-sadisplay
13096 (package-with-python2 python-sadisplay))
13097
13098 (define-public python-flask-restful-swagger
13099 (package
13100 (name "python-flask-restful-swagger")
13101 (version "0.19")
13102 (source
13103 (origin
13104 (method url-fetch)
13105 (uri (pypi-uri "flask-restful-swagger" version))
13106 (sha256
13107 (base32
13108 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13109 (build-system python-build-system)
13110 (propagated-inputs
13111 `(("python-flask-restful" ,python-flask-restful)))
13112 (home-page "https://github.com/rantav/flask-restful-swagger")
13113 (synopsis "Extract Swagger specs from Flask-Restful projects")
13114 (description "This package lets you extract Swagger API documentation
13115 specs from your Flask-Restful projects.")
13116 (license license:expat)))
13117
13118 (define-public python2-flask-restful-swagger
13119 (package-with-python2 python-flask-restful-swagger))
13120
13121 (define-public python-argcomplete
13122 (package
13123 (name "python-argcomplete")
13124 (version "1.7.0")
13125 (source
13126 (origin
13127 (method url-fetch)
13128 (uri (pypi-uri "argcomplete" version))
13129 (sha256
13130 (base32
13131 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13132 (build-system python-build-system)
13133 (native-inputs
13134 `(("python-pexpect" ,python-pexpect)
13135 ("tcsh" ,tcsh)))
13136 (home-page "https://github.com/kislyuk/argcomplete")
13137 (synopsis "Shell tab completion for Python argparse")
13138 (description "argcomplete provides extensible command line tab completion
13139 of arguments and options for Python scripts using @code{argparse}. It's
13140 particularly useful for programs with many options or sub-parsers that can
13141 dynamically suggest completions; for example, when browsing resources over the
13142 network.")
13143 (license license:asl2.0)))
13144
13145 (define-public python2-argcomplete
13146 (package-with-python2 python-argcomplete))
13147
13148 (define-public python-xopen
13149 (package
13150 (name "python-xopen")
13151 (version "0.1.1")
13152 (source
13153 (origin
13154 (method url-fetch)
13155 (uri (pypi-uri "xopen" version))
13156 (sha256
13157 (base32
13158 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13159 (file-name (string-append name "-" version ".tar.gz"))))
13160 (build-system python-build-system)
13161 (home-page "https://github.com/marcelm/xopen/")
13162 (synopsis "Open compressed files transparently")
13163 (description "This module provides an @code{xopen} function that works like
13164 Python's built-in @code{open} function, but can also deal with compressed files.
13165 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13166 recognized by their file extensions. The focus is on being as efficient as
13167 possible on all supported Python versions.")
13168 (license license:expat)))
13169
13170 (define-public python2-xopen
13171 (package-with-python2 python-xopen))
13172
13173 (define-public python2-cheetah
13174 (package
13175 (name "python2-cheetah")
13176 (version "2.4.4")
13177 (source
13178 (origin
13179 (method url-fetch)
13180 (uri (pypi-uri "Cheetah" version))
13181 (sha256
13182 (base32
13183 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13184 (build-system python-build-system)
13185 (arguments
13186 `(#:python ,python-2))
13187 (propagated-inputs
13188 `(("python2-markdown" ,python2-markdown)))
13189 (home-page "https://pythonhosted.org/Cheetah/")
13190 (synopsis "Template engine")
13191 (description "Cheetah is a text-based template engine and Python code
13192 generator.
13193
13194 Cheetah can be used as a standalone templating utility or referenced as
13195 a library from other Python applications. It has many potential uses,
13196 but web developers looking for a viable alternative to ASP, JSP, PHP and
13197 PSP are expected to be its principle user group.
13198
13199 Features:
13200 @enumerate
13201 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13202 text-based format.
13203 @item Cleanly separates content, graphic design, and program code.
13204 @item Blends the power and flexibility of Python with a simple template language
13205 that non-programmers can understand.
13206 @item Gives template writers full access to any Python data structure, module,
13207 function, object, or method in their templates.
13208 @item Makes code reuse easy by providing an object-orientated interface to
13209 templates that is accessible from Python code or other Cheetah templates.
13210 One template can subclass another and selectively reimplement sections of it.
13211 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13212 improve the performance of a dynamic website.
13213 @item Compiles templates into optimized, yet readable, Python code.
13214 @end enumerate")
13215 (license (license:x11-style "file://LICENSE"))))
13216
13217 (define-public python-dulwich
13218 (package
13219 (name "python-dulwich")
13220 (version "0.16.3")
13221 (source
13222 (origin
13223 (method url-fetch)
13224 (uri (list (string-append "https://www.dulwich.io/releases/"
13225 "dulwich-" version ".tar.gz")
13226 (pypi-uri "dulwich" version)))
13227 (sha256
13228 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13229 (build-system python-build-system)
13230 (arguments
13231 `(#:phases
13232 (modify-phases %standard-phases
13233 (add-before 'check 'fix-tests
13234 (lambda* (#:key inputs #:allow-other-keys)
13235 ;; The tests use Popen with a custom environment which doesn't
13236 ;; include PATH.
13237 (substitute* "dulwich/tests/compat/utils.py"
13238 (("'git'") (string-append "'"
13239 (which "git")
13240 "'")))
13241 (substitute* '("dulwich/tests/test_repository.py"
13242 "dulwich/tests/test_hooks.py")
13243 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13244 (setenv "TEST_RUNNER" "unittest")
13245 (setenv "PYTHONHASHSEED" "random")
13246 #t)))))
13247 (propagated-inputs
13248 `(("python-fastimport" ,python-fastimport)))
13249 (native-inputs
13250 `(("python-mock" ,python-mock)
13251 ("python-geventhttpclient" ,python-geventhttpclient)
13252 ("git" ,git)))
13253 (home-page "https://www.dulwich.io/")
13254 (synopsis "Git implementation in Python")
13255 (description "Dulwich is an implementation of the Git file formats and
13256 protocols written in pure Python.")
13257 ;; Can be used with either license.
13258 (license (list license:asl2.0 license:gpl2+))))
13259
13260 (define-public python2-dulwich
13261 (package-with-python2 python-dulwich))
13262
13263 (define-public python-pbkdf2
13264 (package
13265 (name "python-pbkdf2")
13266 (version "1.3")
13267 (source
13268 (origin
13269 (method url-fetch)
13270 (uri (pypi-uri "pbkdf2" version))
13271 (sha256
13272 (base32
13273 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13274 (build-system python-build-system)
13275 (arguments
13276 '(#:phases
13277 (modify-phases %standard-phases
13278 (replace 'check
13279 (lambda _
13280 (setenv "PYTHONPATH"
13281 (string-append (getcwd) "/build/lib:"
13282 (getenv "PYTHONPATH")))
13283 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13284 (propagated-inputs
13285 `(("python-pycrypto" ,python-pycrypto))) ; optional
13286 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13287 (synopsis "Password-based key derivation")
13288 (description "This module implements the password-based key derivation
13289 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13290
13291 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13292 is part of the RSA Public Key Cryptography Standards series. The provided
13293 implementation takes a password or a passphrase and a salt value (and
13294 optionally a iteration count, a digest module, and a MAC module) and provides
13295 a file-like object from which an arbitrarly-sized key can be read.")
13296 (license license:expat)))
13297
13298 (define-public python2-pbkdf2
13299 (package-with-python2 python-pbkdf2))
13300
13301 (define-public python-qrcode
13302 (package
13303 (name "python-qrcode")
13304 (version "5.3")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 (uri (pypi-uri "qrcode" version))
13309 (sha256
13310 (base32
13311 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13312 (build-system python-build-system)
13313 (arguments
13314 ;; FIXME: Tests require packaging 'pymaging'.
13315 '(#:tests? #f))
13316 (propagated-inputs
13317 `(("python-lxml" ,python-lxml) ; for SVG output
13318 ("python-pillow" ,python-pillow) ; for PNG output
13319 ("python-six" ,python-six)))
13320 (home-page "https://github.com/lincolnloop/python-qrcode")
13321 (synopsis "QR Code image generator")
13322 (description "This package provides a pure Python QR Code generator
13323 module. It uses the Python Imaging Library (PIL) to allow for the generation
13324 of QR Codes.
13325
13326 In addition this package provides a command line tool to generate QR codes and
13327 either write these QR codes to a file or do the output as ascii art at the
13328 console.")
13329 (license license:bsd-3)))
13330
13331 (define-public python2-qrcode
13332 (package-with-python2 python-qrcode))
13333
13334 ;; SlowAES isn't compatible with Python 3.
13335 (define-public python2-slowaes
13336 (package
13337 (name "python2-slowaes")
13338 (version "0.1a1")
13339 (source
13340 (origin
13341 (method url-fetch)
13342 (uri (pypi-uri "slowaes" version))
13343 (sha256
13344 (base32
13345 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13346 (build-system python-build-system)
13347 (arguments `(#:python ,python-2))
13348 (home-page "http://code.google.com/p/slowaes/")
13349 (synopsis "Implementation of AES in Python")
13350 (description "This package contains an implementation of AES in Python.
13351 This implementation is slow (hence the project name) but still useful when
13352 faster ones are not available.")
13353 (license license:asl2.0)))
13354
13355 (define-public python-rst2ansi
13356 (package
13357 (name "python-rst2ansi")
13358 (version "0.1.5")
13359 (source
13360 (origin
13361 (method url-fetch)
13362 (uri (pypi-uri "rst2ansi" version))
13363 (sha256
13364 (base32
13365 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13366 (build-system python-build-system)
13367 (propagated-inputs
13368 `(("python-docutils" ,python-docutils)))
13369 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13370 (synopsis "Convert RST to ANSI-decorated console output")
13371 (description
13372 "Python module dedicated to rendering RST (reStructuredText) documents
13373 to ansi-escaped strings suitable for display in a terminal.")
13374 (license license:expat)))
13375
13376 (define-public python-ddt
13377 (package
13378 (name "python-ddt")
13379 (version "1.1.1")
13380 (source
13381 (origin
13382 (method url-fetch)
13383 (uri (pypi-uri "ddt" version))
13384 (sha256
13385 (base32
13386 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13387 (build-system python-build-system)
13388 (native-inputs
13389 `(("python-mock" ,python-mock)
13390 ("python-nose" ,python-nose)))
13391 (propagated-inputs
13392 `(("python-six" ,python-six)
13393 ("python-pyyaml" ,python-pyyaml)))
13394 (home-page "https://github.com/txels/ddt")
13395 (synopsis "Data-Driven Tests")
13396 (description
13397 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13398 it with different test data, and make it appear as multiple test cases.")
13399 (license license:expat)))
13400
13401 (define-public python2-ddt
13402 (package-with-python2 python-ddt))
13403
13404 (define-public python-pycosat
13405 (package
13406 (name "python-pycosat")
13407 (version "0.6.1")
13408 (source
13409 (origin
13410 (method url-fetch)
13411 (uri (pypi-uri "pycosat" version))
13412 (sha256
13413 (base32
13414 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13415 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13416 (build-system python-build-system)
13417 (home-page "https://github.com/ContinuumIO/pycosat")
13418 (synopsis "Bindings to picosat (a SAT solver)")
13419 (description
13420 "This package provides efficient Python bindings to @code{picosat} on
13421 the C level. When importing pycosat, the @code{picosat} solver becomes part
13422 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13423 Problem} (SAT) solver.")
13424 (license license:expat)))
13425
13426 (define-public python2-pycosat
13427 (package-with-python2 python-pycosat))
13428
13429 (define-public python2-ruamel.ordereddict
13430 (package
13431 (name "python2-ruamel.ordereddict")
13432 (version "0.4.9")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (pypi-uri "ruamel.ordereddict" version))
13437 (sha256
13438 (base32
13439 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13440 (build-system python-build-system)
13441 (arguments
13442 `(#:python ,python-2
13443 #:phases
13444 (modify-phases %standard-phases
13445 (delete 'check)
13446 (add-after 'install 'check
13447 (lambda* (#:key inputs outputs #:allow-other-keys)
13448 (add-installed-pythonpath inputs outputs)
13449 (zero? (system* "python" "test/testordereddict.py")))))))
13450 (home-page "https://bitbucket.org/ruamel/ordereddict")
13451 (synopsis "Version of dict that keeps keys in insertion order")
13452 (description
13453 "This is an implementation of an ordered dictionary with @dfn{Key
13454 Insertion Order} (KIO: updates of values do not affect the position of the
13455 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13456 removed and put at the back). The standard library module @code{OrderedDict},
13457 implemented later, implements a subset of @code{ordereddict} functionality.
13458 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13459 Order} (KSO, no sorting function can be specified, but a transform can be
13460 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13461 (license license:expat)))
13462
13463 (define-public python-pypeg2
13464 (package
13465 (name "python-pypeg2")
13466 (version "2.15.2")
13467 (source
13468 (origin
13469 (method url-fetch)
13470 (uri (pypi-uri "pyPEG2" version))
13471 (sha256
13472 (base32
13473 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13474 (build-system python-build-system)
13475 (propagated-inputs `(("python-lxml" ,python-lxml)))
13476 (arguments
13477 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13478 '(#:tests? #f))
13479 (home-page "https://fdik.org/pyPEG/")
13480 (synopsis "Parsering Expression Grammars in Python")
13481 (description "PyPEG is an intrinsic parser interpreter framework for
13482 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13483 parse many formal languages.")
13484 (license license:gpl2)))
13485
13486 (define-public python2-cliapp
13487 (package
13488 (name "python2-cliapp")
13489 (version "1.20160724")
13490 (source
13491 (origin
13492 (method url-fetch)
13493 (uri (string-append
13494 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13495 version ".tar.gz"))
13496 (sha256
13497 (base32
13498 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13499 (build-system python-build-system)
13500 (arguments
13501 `(#:python ,python-2))
13502 (propagated-inputs
13503 `(("python2-pyaml" ,python2-pyaml)))
13504 (home-page "https://liw.fi/cliapp/")
13505 (synopsis "Python framework for command line programs")
13506 (description "@code{python2-cliapp} is a python framework for
13507 command line programs. It contains the typical stuff such programs
13508 need to do, such as parsing the command line for options, and
13509 iterating over input files.")
13510 (license license:gpl2+)))
13511
13512 (define-public python2-ttystatus
13513 (package
13514 (name "python2-ttystatus")
13515 (version "0.32")
13516 (source
13517 (origin
13518 (method url-fetch)
13519 (uri (string-append
13520 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13521 version ".tar.gz"))
13522 (sha256
13523 (base32
13524 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13525 (build-system python-build-system)
13526 (arguments
13527 `(#:python ,python-2))
13528 (home-page "https://liw.fi/ttystatus/")
13529 (synopsis "Python library for showing progress reporting and
13530 status updates on terminals")
13531 (description "@code{python2-ttystatus} is a python library for
13532 showing progress reporting and status updates on terminals, for
13533 command line programs. Output is automatically adapted to the width
13534 of the terminal: truncated if it does not fit, and resized if the
13535 terminal size changes.")
13536 (license license:gpl3+)))
13537
13538 (define-public python2-tracing
13539 (package
13540 (name "python2-tracing")
13541 (version "0.10")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (string-append
13546 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13547 version ".tar.gz"))
13548 (sha256
13549 (base32
13550 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13551 (build-system python-build-system)
13552 (arguments
13553 `(#:python ,python-2))
13554 (home-page "https://liw.fi/tracing/")
13555 (synopsis "Python debug logging helper")
13556 (description "@code{python2-tracing} is a python library for
13557 logging debug messages. It provides a way to turn debugging messages
13558 on and off, based on the filename they occur in. It is much faster
13559 than using @code{logging.Filter} to accomplish the same thing, which
13560 matters when code is run in production mode. The actual logging still
13561 happens using the @code{logging} library.")
13562 (license license:gpl3+)))
13563
13564 (define-public python2-larch
13565 (package
13566 (name "python2-larch")
13567 (version "1.20151025")
13568 (source
13569 (origin
13570 (method url-fetch)
13571 (uri (string-append
13572 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13573 version ".tar.gz"))
13574 (sha256
13575 (base32
13576 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13577 (build-system python-build-system)
13578 (arguments
13579 `(#:python ,python-2))
13580 (propagated-inputs
13581 `(("python2-tracing" ,python2-tracing)))
13582 (home-page "https://liw.fi/larch/")
13583 (synopsis "Python copy-on-write B-tree library")
13584 (description "@code{python2-larch} is an implementation of
13585 particular kind of B-tree, based on research by Ohad Rodeh. See
13586 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13587 on the data structure.
13588
13589 The distinctive feature of this B-tree is that a node is never
13590 (conceptually) modified. Instead, all updates are done by
13591 copy-on-write. This makes it easy to clone a tree, and modify only the
13592 clone, while other processes access the original tree.")
13593 (license license:gpl3+)))
13594
13595 (define-public python-htmlmin
13596 (package
13597 (name "python-htmlmin")
13598 (version "0.1.10")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "htmlmin" version))
13603 (sha256
13604 (base32
13605 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13606 (arguments
13607 `(#:tests? #f)) ;htmlmin has no tests
13608 (build-system python-build-system)
13609 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13610 (synopsis "HTML minifier")
13611 (description "@code{htmlmin} is an HTML minifier that just works.
13612 It comes with safe defaults and easily configurable options.")
13613 (license license:bsd-3)))
13614
13615 (define-public python2-htmlmin
13616 (package-with-python2 python-htmlmin))
13617
13618 (define-public python-flask-htmlmin
13619 (package
13620 (name "python-flask-htmlmin")
13621 (version "1.2")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "Flask-HTMLmin" version))
13626 (sha256
13627 (base32
13628 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13629 (propagated-inputs
13630 `(("python-flask" ,python-flask)
13631 ("python-htmlmin" ,python-htmlmin)))
13632 (build-system python-build-system)
13633 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13634 (synopsis "HTML response minifier for Flask")
13635 (description
13636 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13637 (license license:bsd-3)))
13638
13639 (define-public python2-flask-htmlmin
13640 (package-with-python2 python-flask-htmlmin))
13641
13642 (define-public python-flask-login
13643 (package
13644 (name "python-flask-login")
13645 (version "0.4.0")
13646 (source
13647 (origin
13648 (method url-fetch)
13649 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13650 version ".tar.gz"))
13651 (file-name (string-append name "-" version ".tar.gz"))
13652 (sha256
13653 (base32
13654 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13655 (arguments
13656 ;; Tests fail PEP8 compliance. See:
13657 ;; https://github.com/maxcountryman/flask-login/issues/340
13658 `(#:tests? #f))
13659 (build-system python-build-system)
13660 (home-page "https://github.com/maxcountryman/flask-login")
13661 (synopsis "User session management for Flask")
13662 (description
13663 "@code{Flask-Login} provides user session management for Flask. It
13664 handles the common tasks of logging in, logging out, and remembering your
13665 users' sessions over extended periods of time.")
13666 (license license:expat)))
13667
13668 (define-public python2-flask-login
13669 (package-with-python2 python-flask-login))
13670
13671 (define-public python-astroid
13672 (package
13673 (name "python-astroid")
13674 (version "1.4.9")
13675 (source
13676 (origin
13677 (method url-fetch)
13678 (uri (string-append
13679 "https://github.com/PyCQA/astroid/archive/astroid-"
13680 version ".tar.gz"))
13681 (sha256
13682 (base32
13683 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13684 (build-system python-build-system)
13685 (propagated-inputs
13686 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13687 ("python-six" ,python-six)
13688 ("python-wrapt" ,python-wrapt)))
13689 (arguments
13690 `(#:phases
13691 (modify-phases %standard-phases
13692 (replace 'check
13693 (lambda _
13694 (zero? (system* "python" "-m" "unittest" "discover"
13695 "-p" "unittest*.py")))))))
13696 (home-page "https://github.com/PyCQA/astroid")
13697 (synopsis "Common base representation of python source code for pylint and
13698 other projects")
13699 (description "@code{python-astroid} provides a common base representation
13700 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13701
13702 It provides a compatible representation which comes from the _ast module. It
13703 rebuilds the tree generated by the builtin _ast module by recursively walking
13704 down the AST and building an extended ast. The new node classes have
13705 additional methods and attributes for different usages. They include some
13706 support for static inference and local name scopes. Furthermore, astroid
13707 builds partial trees by inspecting living objects.")
13708 (license license:lgpl2.1+)))
13709
13710 (define-public python2-astroid
13711 (package-with-python2 python-astroid))
13712
13713 (define-public python-isort
13714 (package
13715 (name "python-isort")
13716 (version "4.2.5")
13717 (source
13718 (origin
13719 (method url-fetch)
13720 (uri (string-append
13721 "https://github.com/timothycrosley/isort/archive/"
13722 version ".tar.gz"))
13723 (file-name (string-append name "-" version ".tar.gz"))
13724 (sha256
13725 (base32
13726 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13727 (build-system python-build-system)
13728 (native-inputs
13729 `(("python-mock" ,python-mock)
13730 ("python-pytest" ,python-pytest)))
13731 (home-page "https://github.com/timothycrosley/isort")
13732 (synopsis "Python utility/library to sort python imports")
13733 (description "@code{python-isort} is a python utility/library to sort
13734 imports alphabetically, and automatically separated into sections. It
13735 provides a command line utility, a python library and plugins for various
13736 editors.")
13737 (license license:expat)))
13738
13739 (define-public python2-isort
13740 (package-with-python2 python-isort))
13741
13742 (define-public python2-backports-functools-lru-cache
13743 (package
13744 (name "python2-backports-functools-lru-cache")
13745 (version "1.3")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 ;; only the pypi tarballs contain the necessary metadata
13750 (uri (pypi-uri "backports.functools_lru_cache" version))
13751 (sha256
13752 (base32
13753 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13754 (build-system python-build-system)
13755 (native-inputs
13756 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13757 (arguments
13758 `(#:python ,python-2))
13759 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13760 (synopsis "Backport of functools.lru_cache from Python 3.3")
13761 (description "@code{python2-backports-functools-lru-cache} is a backport
13762 of @code{functools.lru_cache} from python 3.3.")
13763 (license license:expat)))
13764
13765 (define-public python-configparser
13766 (package
13767 (name "python-configparser")
13768 (version "3.5.0")
13769 (source
13770 (origin
13771 (method url-fetch)
13772 (uri (string-append
13773 "https://bitbucket.org/ambv/configparser/get/"
13774 version ".tar.bz2"))
13775 (file-name (string-append name "-" version ".tar.gz"))
13776 (sha256
13777 (base32
13778 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13779 (build-system python-build-system)
13780 (home-page "http://docs.python.org/py3k/library/configparser.html")
13781 (synopsis "Backport of configparser from python 3.5")
13782 (description "@code{python-configparser} is a backport of
13783 @code{configparser} from Python 3.5 so that it can be used directly
13784 in other versions.")
13785 (license license:expat)))
13786
13787 (define-public python2-configparser
13788 (package-with-python2 python-configparser))
13789
13790 (define-public python2-coverage-test-runner
13791 (package
13792 (name "python2-coverage-test-runner")
13793 (version "1.11")
13794 (source
13795 (origin
13796 (method url-fetch)
13797 (uri (string-append
13798 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13799 "coverage-test-runner/snapshot/coverage-test-runner-"
13800 version ".tar.gz"))
13801 (sha256
13802 (base32
13803 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13804 (build-system python-build-system)
13805 (arguments
13806 `(#:python ,python-2
13807 #:phases
13808 (modify-phases %standard-phases
13809 (replace 'check
13810 (lambda _
13811 (zero? (system* "./testrun")))))))
13812 (propagated-inputs
13813 `(("python2-coverage" ,python2-coverage)))
13814 (home-page "https://liw.fi/coverage-test-runner/")
13815 (synopsis "Python module for running unit tests")
13816 (description "@code{CoverageTestRunner} is a python module for running
13817 unit tests and failing them if the unit test module does not excercise all
13818 statements in the module it tests.")
13819 (license license:gpl3+)))
13820
13821 (define-public python-pylint
13822 (package
13823 (name "python-pylint")
13824 (version "1.6.5")
13825 (source
13826 (origin
13827 (method url-fetch)
13828 (uri (string-append
13829 "https://github.com/PyCQA/pylint/archive/pylint-"
13830 version ".tar.gz"))
13831 (sha256
13832 (base32
13833 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13834 (build-system python-build-system)
13835 (native-inputs
13836 `(("python-tox" ,python-tox)))
13837 (propagated-inputs
13838 `(("python-astroid" ,python-astroid)
13839 ("python-isort" ,python-isort)
13840 ("python-mccabe" ,python-mccabe)
13841 ("python-six" ,python-six)))
13842 (arguments
13843 `(#:phases
13844 (modify-phases %standard-phases
13845 (replace 'check
13846 (lambda _
13847 ;; Somehow, tests for python2-pylint
13848 ;; fail if run from the build directory
13849 (let ((work "/tmp/work"))
13850 (mkdir-p work)
13851 (setenv "PYTHONPATH"
13852 (string-append (getenv "PYTHONPATH") ":" work))
13853 (copy-recursively "." work)
13854 (with-directory-excursion "/tmp"
13855 (zero? (system* "python" "-m" "unittest" "discover"
13856 "-s" (string-append work "/pylint/test")
13857 "-p" "*test_*.py")))))))))
13858 (home-page "https://github.com/PyCQA/pylint")
13859 (synopsis "Python source code analyzer which looks for coding standard
13860 errors")
13861 (description "Pylint is a Python source code analyzer which looks
13862 for programming errors, helps enforcing a coding standard and sniffs
13863 for some code smells (as defined in Martin Fowler's Refactoring book).
13864
13865 Pylint has many rules enabled by default, way too much to silence them
13866 all on a minimally sized program. It's highly configurable and handle
13867 pragmas to control it from within your code. Additionally, it is
13868 possible to write plugins to add your own checks.")
13869 (license license:gpl2+)))
13870
13871 (define-public python2-pylint
13872 (let ((pylint (package-with-python2 python-pylint)))
13873 (package (inherit pylint)
13874 (propagated-inputs
13875 `(("python2-backports-functools-lru-cache"
13876 ,python2-backports-functools-lru-cache)
13877 ("python2-configparser" ,python2-configparser)
13878 ,@(package-propagated-inputs pylint))))))