7f72ed13da0012f73a788a6fc90d293b8eb526b0
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 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 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;;
38 ;;; This file is part of GNU Guix.
39 ;;;
40 ;;; GNU Guix is free software; you can redistribute it and/or modify it
41 ;;; under the terms of the GNU General Public License as published by
42 ;;; the Free Software Foundation; either version 3 of the License, or (at
43 ;;; your option) any later version.
44 ;;;
45 ;;; GNU Guix is distributed in the hope that it will be useful, but
46 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 ;;; GNU General Public License for more details.
49 ;;;
50 ;;; You should have received a copy of the GNU General Public License
51 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
53 (define-module (gnu packages python)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages algebra)
57 #:use-module (gnu packages adns)
58 #:use-module (gnu packages attr)
59 #:use-module (gnu packages backup)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages databases)
63 #:use-module (gnu packages django)
64 #:use-module (gnu packages file)
65 #:use-module (gnu packages fontutils)
66 #:use-module (gnu packages gcc)
67 #:use-module (gnu packages ghostscript)
68 #:use-module (gnu packages gl)
69 #:use-module (gnu packages glib)
70 #:use-module (gnu packages gstreamer)
71 #:use-module (gnu packages gtk)
72 #:use-module (gnu packages icu4c)
73 #:use-module (gnu packages image)
74 #:use-module (gnu packages imagemagick)
75 #:use-module (gnu packages libevent)
76 #:use-module (gnu packages libffi)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages man)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages networking)
82 #:use-module (gnu packages ncurses)
83 #:use-module (gnu packages openstack)
84 #:use-module (gnu packages password-utils)
85 #:use-module (gnu packages pcre)
86 #:use-module (gnu packages perl)
87 #:use-module (gnu packages pkg-config)
88 #:use-module (gnu packages protobuf)
89 #:use-module (gnu packages readline)
90 #:use-module (gnu packages sdl)
91 #:use-module (gnu packages shells)
92 #:use-module (gnu packages statistics)
93 #:use-module (gnu packages tex)
94 #:use-module (gnu packages texinfo)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages version-control)
97 #:use-module (gnu packages video)
98 #:use-module (gnu packages web)
99 #:use-module (gnu packages base)
100 #:use-module (gnu packages xml)
101 #:use-module (gnu packages xorg)
102 #:use-module (gnu packages xdisorg)
103 #:use-module (gnu packages zip)
104 #:use-module (gnu packages tcl)
105 #:use-module (gnu packages bdw-gc)
106 #:use-module (guix packages)
107 #:use-module (guix download)
108 #:use-module (guix git-download)
109 #:use-module (guix utils)
110 #:use-module (guix build-system gnu)
111 #:use-module (guix build-system cmake)
112 #:use-module (guix build-system python)
113 #:use-module (guix build-system trivial)
114 #:use-module (srfi srfi-1))
115
116 (define-public python-2.7
117 (package
118 (name "python")
119 (version "2.7.12")
120 (source
121 (origin
122 (method url-fetch)
123 (uri (string-append "https://www.python.org/ftp/python/"
124 version "/Python-" version ".tar.xz"))
125 (sha256
126 (base32
127 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
128 (patches (search-patches "python-2.7-search-paths.patch"
129 "python-2-deterministic-build-info.patch"
130 "python-2.7-site-prefixes.patch"
131 "python-2.7-source-date-epoch.patch"))
132 (modules '((guix build utils)))
133 ;; suboptimal to delete failing tests here, but if we delete them in the
134 ;; arguments then we need to make sure to strip out that phase when it
135 ;; gets inherited by python and python-minimal.
136 (snippet
137 '(begin
138 (for-each delete-file
139 '("Lib/test/test_compileall.py"
140 "Lib/test/test_ctypes.py" ; fails on mips64el
141 "Lib/test/test_distutils.py"
142 "Lib/test/test_import.py"
143 "Lib/test/test_shutil.py"
144 "Lib/test/test_socket.py"
145 "Lib/test/test_subprocess.py"))
146 #t))))
147 (outputs '("out"
148 "tk")) ;tkinter; adds 50 MiB to the closure
149 (build-system gnu-build-system)
150 (arguments
151 `(;; 356 tests OK.
152 ;; 6 tests failed:
153 ;; test_compileall test_distutils test_import test_shutil test_socket
154 ;; test_subprocess
155 ;; 39 tests skipped:
156 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
157 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
158 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
159 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
160 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
161 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
162 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
163 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
164 ;; test_winreg test_winsound test_zipfile64
165 ;; 4 skips unexpected on linux2:
166 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
167 #:test-target "test"
168 #:configure-flags
169 (list "--enable-shared" ;allow embedding
170 "--with-system-ffi" ;build ctypes
171 "--with-ensurepip=install" ;install pip and setuptools
172 (string-append "LDFLAGS=-Wl,-rpath="
173 (assoc-ref %outputs "out") "/lib"))
174
175 #:modules ((ice-9 ftw) (ice-9 match)
176 (guix build utils) (guix build gnu-build-system))
177 #:phases
178 (modify-phases %standard-phases
179 (add-before
180 'configure 'patch-lib-shells
181 (lambda _
182 ;; Filter for existing files, since some may not exist in all
183 ;; versions of python that are built with this recipe.
184 (substitute* (filter file-exists?
185 '("Lib/subprocess.py"
186 "Lib/popen2.py"
187 "Lib/distutils/tests/test_spawn.py"
188 "Lib/test/test_subprocess.py"))
189 (("/bin/sh") (which "sh")))
190
191 ;; Use zero as the timestamp in .pyc files so that builds are
192 ;; deterministic. TODO: Remove it when this variable is set in
193 ;; gnu-build-system.scm.
194 (setenv "SOURCE_DATE_EPOCH" "1")
195 #t))
196 (add-before 'configure 'do-not-record-configure-flags
197 (lambda* (#:key configure-flags #:allow-other-keys)
198 ;; Remove configure flags from the installed '_sysconfigdata.py'
199 ;; and 'Makefile' so we don't end up keeping references to the
200 ;; build tools.
201 ;;
202 ;; Preserve at least '--with-system-ffi' since otherwise the
203 ;; thing tries to build libffi, fails, and we end up with a
204 ;; Python that lacks ctypes.
205 (substitute* "configure"
206 (("^CONFIG_ARGS=.*$")
207 (format #f "CONFIG_ARGS='~a'\n"
208 (if (member "--with-system-ffi" configure-flags)
209 "--with-system-ffi"
210 ""))))
211 #t))
212 (add-before
213 'check 'pre-check
214 (lambda _
215 ;; 'Lib/test/test_site.py' needs a valid $HOME
216 (setenv "HOME" (getcwd))
217 #t))
218 (add-after
219 'unpack 'set-source-file-times-to-1980
220 ;; XXX One of the tests uses a ZIP library to pack up some of the
221 ;; source tree, and fails with "ZIP does not support timestamps
222 ;; before 1980". Work around this by setting the file times in the
223 ;; source tree to sometime in early 1980.
224 (lambda _
225 (let ((circa-1980 (* 10 366 24 60 60)))
226 (ftw "." (lambda (file stat flag)
227 (utime file circa-1980 circa-1980)
228 #t))
229 #t)))
230 (add-after 'install 'remove-tests
231 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
232 ;; because these files are used by some libraries out there.
233 (lambda* (#:key outputs #:allow-other-keys)
234 (let ((out (assoc-ref outputs "out")))
235 (match (scandir (string-append out "/lib")
236 (lambda (name)
237 (string-prefix? "python" name)))
238 ((pythonX.Y)
239 (let ((testdir (string-append out "/lib/" pythonX.Y
240 "/test")))
241 (with-directory-excursion testdir
242 (for-each delete-file-recursively
243 (scandir testdir
244 (match-lambda
245 ((or "." "..") #f)
246 (file
247 (not
248 (string-prefix? "test_support."
249 file))))))
250 (call-with-output-file "__init__.py" (const #t))
251 #t)))))))
252 (add-before 'strip 'make-libraries-writable
253 (lambda* (#:key outputs #:allow-other-keys)
254 ;; Make .so files writable so they can be stripped.
255 (let ((out (assoc-ref outputs "out")))
256 (for-each (lambda (file)
257 (chmod file #o755))
258 (find-files (string-append out "/lib")
259 "\\.so"))
260 #t)))
261 (add-after 'install 'move-tk-inter
262 (lambda* (#:key outputs #:allow-other-keys)
263 ;; When Tkinter support is built move it to a separate output so
264 ;; that the main output doesn't contain a reference to Tcl/Tk.
265 (let ((out (assoc-ref outputs "out"))
266 (tk (assoc-ref outputs "tk")))
267 (when tk
268 (match (find-files out "tkinter.*\\.so")
269 ((tkinter.so)
270 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
271 ;; want it under TK/lib/pythonX.Y/site-packages.
272 (let* ((len (string-length out))
273 (target (string-append
274 tk "/"
275 (string-drop
276 (dirname (dirname tkinter.so))
277 len)
278 "/site-packages")))
279 (install-file tkinter.so target)
280 (delete-file tkinter.so)))))
281 #t))))))
282 (inputs
283 `(("bzip2" ,bzip2)
284 ("gdbm" ,gdbm)
285 ("libffi" ,libffi) ; for ctypes
286 ("sqlite" ,sqlite) ; for sqlite extension
287 ("openssl" ,openssl)
288 ("readline" ,readline)
289 ("zlib" ,zlib)
290 ("tcl" ,tcl)
291 ("tk" ,tk))) ; for tkinter
292 (native-inputs
293 `(("pkg-config" ,pkg-config)))
294 (native-search-paths
295 (list (search-path-specification
296 (variable "PYTHONPATH")
297 (files '("lib/python2.7/site-packages")))))
298 (home-page "https://www.python.org")
299 (synopsis "High-level, dynamically-typed programming language")
300 (description
301 "Python is a remarkably powerful dynamic programming language that
302 is used in a wide variety of application domains. Some of its key
303 distinguishing features include: clear, readable syntax; strong
304 introspection capabilities; intuitive object orientation; natural
305 expression of procedural code; full modularity, supporting hierarchical
306 packages; exception-based error handling; and very high level dynamic
307 data types.")
308 (license license:psfl)))
309
310 ;; Current 2.x version.
311 (define-public python-2 python-2.7)
312
313 (define-public python-3.5
314 (package (inherit python-2)
315 (version "3.5.2")
316 (source (origin
317 (method url-fetch)
318 (uri (string-append "https://www.python.org/ftp/python/"
319 version "/Python-" version ".tar.xz"))
320 (patches (search-patches
321 "python-fix-tests.patch"
322 "python-3.5-fix-tests.patch"
323 "python-3-deterministic-build-info.patch"
324 "python-3-search-paths.patch"))
325 (patch-flags '("-p0"))
326 (sha256
327 (base32
328 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
329 (arguments (substitute-keyword-arguments (package-arguments python-2)
330 ((#:tests? _) #t)))
331 (native-search-paths
332 (list (search-path-specification
333 (variable "PYTHONPATH")
334 (files (list (string-append "lib/python"
335 (version-major+minor version)
336 "/site-packages"))))))))
337
338 (define-public python-3.4
339 (package (inherit python-3.5)
340 (version "3.4.5")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "https://www.python.org/ftp/python/"
344 version "/Python-" version ".tar.xz"))
345 (patches (search-patches
346 "python-fix-tests.patch"
347 "python-3.4-fix-tests.patch"
348 "python-3-deterministic-build-info.patch"
349 "python-3-search-paths.patch"))
350 (patch-flags '("-p0"))
351 (sha256
352 (base32
353 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
354
355 ;; Current 3.x version.
356 (define-public python-3 python-3.5)
357
358 ;; Current major version.
359 (define-public python python-3)
360
361 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
362 ;; Python (Tk -> libxcb -> Python.)
363
364 (define-public python2-minimal
365 (package (inherit python-2)
366 (name "python-minimal")
367 (outputs '("out"))
368 (arguments
369 (substitute-keyword-arguments (package-arguments python-2)
370 ((#:configure-flags cf)
371 `(append ,cf '("--without-system-ffi")))))
372 (inputs '()))) ;none of the optional dependencies
373
374 (define-public python-minimal
375 (package (inherit python)
376 (name "python-minimal")
377 (outputs '("out"))
378
379 ;; Build fails due to missing ctypes without libffi.
380 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
381 ;; zlib is required by 'zipimport', used by pip.
382 (inputs `(("libffi" ,libffi)
383 ("openssl" ,openssl)
384 ("zlib" ,zlib)))))
385
386 (define* (wrap-python3 python
387 #:optional
388 (name (string-append (package-name python) "-wrapper")))
389 (package (inherit python)
390 (name name)
391 (source #f)
392 (build-system trivial-build-system)
393 (outputs '("out"))
394 (inputs `(("bash" ,bash)))
395 (propagated-inputs `(("python" ,python)))
396 (arguments
397 `(#:modules ((guix build utils))
398 #:builder
399 (begin
400 (use-modules (guix build utils))
401 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
402 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
403 (mkdir-p bin)
404 (for-each
405 (lambda (old new)
406 (symlink (string-append python old)
407 (string-append bin "/" new)))
408 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
409 `("python" ,"pydoc" ,"idle" ,"pip"))
410 ;; python-config outputs search paths based upon its location,
411 ;; use a bash wrapper to avoid changing its outputs.
412 (let ((bash (string-append (assoc-ref %build-inputs "bash")
413 "/bin/bash"))
414 (old (string-append python "python3-config"))
415 (new (string-append bin "/python-config")))
416 (with-output-to-file new
417 (lambda ()
418 (format #t "#!~a~%" bash)
419 (format #t "exec \"~a\" \"$@\"~%" old)
420 (chmod new #o755)
421 #t)))))))
422 (synopsis "Wrapper for the Python 3 commands")
423 (description
424 "This package provides wrappers for the commands of Python@tie{}3.x such
425 that they can be invoked under their usual name---e.g., @command{python}
426 instead of @command{python3}.")))
427
428 (define-public python-wrapper (wrap-python3 python))
429 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
430
431 (define-public python-psutil
432 (package
433 (name "python-psutil")
434 (version "4.3.0")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (pypi-uri "psutil" version))
439 (sha256
440 (base32
441 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
442 (build-system python-build-system)
443 (arguments
444 ;; FIXME: some tests does not return and times out.
445 '(#:tests? #f))
446 (home-page "https://www.github.com/giampaolo/psutil")
447 (synopsis "Library for retrieving information on running processes")
448 (description
449 "psutil (Python system and process utilities) is a library for retrieving
450 information on running processes and system utilization (CPU, memory, disks,
451 network) in Python. It is useful mainly for system monitoring, profiling and
452 limiting process resources and management of running processes. It implements
453 many functionalities offered by command line tools such as: ps, top, lsof,
454 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
455 pidof, tty, taskset, pmap.")
456 (license license:bsd-3)))
457
458 (define-public python2-psutil
459 (package-with-python2 python-psutil))
460
461 (define-public python-passlib
462 (package
463 (name "python-passlib")
464 (version "1.7.0")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (pypi-uri "passlib" version))
469 (sha256
470 (base32
471 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
472 (build-system python-build-system)
473 (native-inputs
474 `(("python-nose" ,python-nose)))
475 (propagated-inputs
476 `(("python-py-bcrypt" ,python-py-bcrypt)))
477 (arguments
478 `(#:phases
479 (alist-cons-before
480 'check 'set-PYTHON_EGG_CACHE
481 ;; some tests require access to "$HOME/.cython"
482 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
483 %standard-phases)))
484 (home-page "https://bitbucket.org/ecollins/passlib")
485 (synopsis
486 "Comprehensive password hashing framework")
487 (description
488 "Passlib is a password hashing library for Python 2 & 3, which provides
489 cross-platform implementations of over 30 password hashing algorithms, as well
490 as a framework for managing existing password hashes. It's designed to be
491 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
492 to providing full-strength password hashing for multi-user application.")
493 (license license:bsd-3)))
494
495 (define-public python2-passlib
496 (package-with-python2 python-passlib))
497
498 (define-public python-py-bcrypt
499 (package
500 (name "python-py-bcrypt")
501 (version "0.4")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (string-append
506 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
507 version
508 ".tar.gz"))
509 (sha256
510 (base32
511 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
512 (build-system python-build-system)
513 (home-page "https://code.google.com/p/py-bcrypt")
514 (synopsis
515 "Bcrypt password hashing and key derivation")
516 (description
517 "A python wrapper of OpenBSD's Blowfish password hashing code. This
518 system hashes passwords using a version of Bruce Schneier's Blowfish block
519 cipher with modifications designed to raise the cost of off-line password
520 cracking and frustrate fast hardware implementation. The computation cost of
521 the algorithm is parametised, so it can be increased as computers get faster.
522 The intent is to make a compromise of a password database less likely to
523 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
524 John the Ripper).")
525 ;; "sha2.c" is under BSD-3;
526 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
527 ;; the rest is under ISC.
528 (license (list license:isc license:bsd-3 license:bsd-4))))
529
530 (define-public python2-py-bcrypt
531 (package-with-python2 python-py-bcrypt))
532
533
534 (define-public python-paramiko
535 (package
536 (name "python-paramiko")
537 (version "1.16.0")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (pypi-uri "paramiko" version))
542 (sha256
543 (base32
544 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
545 (build-system python-build-system)
546 (arguments
547 '(;; FIXME: One test fails with "EOFError not raised by connect".
548 #:tests? #f))
549 ;; #:phases
550 ;; (modify-phases %standard-phases
551 ;; (replace 'check
552 ;; (lambda _
553 ;; (zero? (system* "python" "test.py")))))))
554 (propagated-inputs
555 `(("python-pycrypto" ,python-pycrypto)
556 ("python-ecdsa" ,python-ecdsa)))
557 (home-page "http://www.paramiko.org/")
558 (synopsis "SSHv2 protocol library")
559 (description "Paramiko is a python implementation of the SSHv2 protocol,
560 providing both client and server functionality. While it leverages a Python C
561 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
562 Python interface around SSH networking concepts.")
563 (license license:lgpl2.1+)))
564
565 (define-public python2-paramiko
566 (package-with-python2 python-paramiko))
567
568
569 (define-public python-httplib2
570 (package
571 (name "python-httplib2")
572 (version "0.9.2")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (pypi-uri "httplib2" version))
577 (sha256
578 (base32
579 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
580 (build-system python-build-system)
581 (home-page "https://github.com/jcgregorio/httplib2")
582 (synopsis "Comprehensive HTTP client library")
583 (description
584 "A comprehensive HTTP client library supporting many features left out of
585 other HTTP libraries.")
586 (license license:expat)))
587
588 (define-public python2-httplib2
589 (package-with-python2 python-httplib2))
590
591 (define-public python-ecdsa
592 (package
593 (name "python-ecdsa")
594 (version "0.13")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (string-append
599 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
600 version
601 ".tar.gz"))
602 (sha256
603 (base32
604 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
605 (build-system python-build-system)
606 (inputs
607 `(("openssl" ,openssl)))
608 (home-page
609 "http://github.com/warner/python-ecdsa")
610 (synopsis
611 "ECDSA cryptographic signature library (pure python)")
612 (description
613 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
614 Curve Digital Signature Algorithm), implemented purely in Python. With this
615 library, you can quickly create keypairs (signing key and verifying key), sign
616 messages, and verify the signatures. The keys and signatures are very short,
617 making them easy to handle and incorporate into other protocols.")
618 (license license:expat)))
619
620 (define-public python2-ecdsa
621 (package-with-python2 python-ecdsa))
622
623 (define-public python-ccm
624 (package
625 (name "python-ccm")
626 (version "2.1.6")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "ccm" version))
631 (sha256
632 (base32
633 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
634 (build-system python-build-system)
635 (propagated-inputs
636 `(("python-pyyaml" ,python-pyyaml)
637 ;; Not listed in setup.py, but used in ccmlib/node.py for full
638 ;; functionality
639 ("python-psutil" ,python-psutil)
640 ("python-six" ,python-six)))
641 (home-page "https://github.com/pcmanus/ccm")
642 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
643 localhost")
644 (description "Cassandra Cluster Manager is a development tool for testing
645 local Cassandra clusters. It creates, launches and removes Cassandra clusters
646 on localhost.")
647 (license license:asl2.0)))
648
649 (define-public python2-ccm
650 (package-with-python2 python-ccm))
651
652 (define-public python-pytz
653 (package
654 (name "python-pytz")
655 (version "2016.10")
656 (source
657 (origin
658 (method url-fetch)
659 (uri (pypi-uri "pytz" version ".tar.bz2"))
660 (sha256
661 (base32
662 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
663 (build-system python-build-system)
664 (arguments `(#:tests? #f)) ; no test target
665 (home-page "http://pythonhosted.org/pytz")
666 (synopsis "Python timezone library")
667 (description
668 "This library allows accurate and cross platform timezone calculations
669 using Python 2.4 or higher and provides access to the Olson timezone database.")
670 (license license:expat)))
671
672 (define-public python2-pytz
673 (package-with-python2 python-pytz))
674
675
676 (define-public python-babel
677 (package
678 (name "python-babel")
679 (version "2.3.4")
680 (source
681 (origin
682 (method url-fetch)
683 (uri (pypi-uri "Babel" version))
684 (sha256
685 (base32
686 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
687 (build-system python-build-system)
688 (propagated-inputs
689 `(("python-pytz" ,python-pytz)))
690 (arguments `(#:tests? #f)) ; no test target
691 (home-page "http://babel.pocoo.org/")
692 (synopsis
693 "Tools for internationalizing Python applications")
694 (description
695 "Babel is composed of two major parts:
696 - tools to build and work with gettext message catalogs
697 - a Python interface to the CLDR (Common Locale Data Repository), providing
698 access to various locale display names, localized number and date formatting,
699 etc. ")
700 (license license:bsd-3)))
701
702 (define-public python2-babel
703 (package-with-python2 python-babel))
704
705 (define-public python2-backport-ssl-match-hostname
706 (package
707 (name "python2-backport-ssl-match-hostname")
708 (version "3.5.0.1")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://pypi.python.org/packages/source/b/"
714 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
715 version ".tar.gz"))
716 (sha256
717 (base32
718 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
719 (build-system python-build-system)
720 (arguments
721 `(#:python ,python-2
722 #:tests? #f)) ; no test target
723 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
724 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
725 (description
726 "This backport brings the ssl.match_hostname() function to users of
727 earlier versions of Python. The function checks the hostname in the
728 certificate returned by the server to which a connection has been established,
729 and verifies that it matches the intended target hostname.")
730 (license license:psfl)))
731
732 (define-public python-hdf4
733 (package
734 (name "python-hdf4")
735 (version "0.9")
736 (source
737 (origin
738 (method url-fetch)
739 (uri (pypi-uri name version))
740 (sha256
741 (base32
742 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
743 (build-system python-build-system)
744 (native-inputs `(("nose" ,python-nose)))
745 (propagated-inputs `(("numpy" ,python-numpy)))
746 (inputs
747 `(("hdf4" ,hdf4)
748 ("libjpeg" ,libjpeg)
749 ("zlib" ,zlib)))
750 (arguments
751 `(#:phases
752 (modify-phases %standard-phases
753 (replace 'check
754 (lambda _
755 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
756 ;; on to import numpy. Somehow this works on their CI system.
757 ;; Let's just manage PYTHONPATH here instead.
758 (substitute* "runexamples.sh"
759 (("export PYTHONPATH=.*") ""))
760 (setenv "PYTHONPATH"
761 (string-append (getcwd) ":"
762 (getenv "PYTHONPATH")))
763 (and (zero? (system* "./runexamples.sh"))
764 (zero? (system* "nosetests" "-v"))))))))
765 (home-page "https://github.com/fhs/python-hdf4")
766 (synopsis "Python interface to the NCSA HDF4 library")
767 (description
768 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
769 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
770 NetCDF files can also be read and modified. Python-HDF4 is a fork of
771 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
772 (license license:expat)))
773
774 (define-public python2-hdf4
775 (package-with-python2 python-hdf4))
776
777 (define-public python-h5py
778 (package
779 (name "python-h5py")
780 (version "2.6.0")
781 (source
782 (origin
783 (method url-fetch)
784 (uri (pypi-uri "h5py" version))
785 (sha256
786 (base32
787 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
788 (build-system python-build-system)
789 (arguments
790 `(#:tests? #f ; no test target
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'unpack 'fix-hdf5-paths
794 (lambda* (#:key inputs #:allow-other-keys)
795 (let ((prefix (assoc-ref inputs "hdf5")))
796 (substitute* "setup_build.py"
797 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']"))
799 (("'/opt/local/include', '/usr/local/include'")
800 (string-append "'" prefix "/include" "'")))
801 (substitute* "setup_configure.py"
802 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']")))
804 #t))))))
805 (propagated-inputs
806 `(("python-six" ,python-six)
807 ("python-numpy" ,python-numpy)))
808 (inputs
809 `(("hdf5" ,hdf5)))
810 (native-inputs
811 `(("python-cython" ,python-cython)
812 ("python-pkgconfig" ,python-pkgconfig)))
813 (home-page "http://www.h5py.org/")
814 (synopsis "Read and write HDF5 files from Python")
815 (description
816 "The h5py package provides both a high- and low-level interface to the
817 HDF5 library from Python. The low-level interface is intended to be a
818 complete wrapping of the HDF5 API, while the high-level component supports
819 access to HDF5 files, datasets and groups using established Python and NumPy
820 concepts.")
821 (license license:bsd-3)))
822
823 (define-public python2-h5py
824 (package-with-python2 python-h5py))
825
826 (define-public python-netcdf4
827 (package
828 (name "python-netcdf4")
829 (version "1.2.6")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (pypi-uri "netCDF4" version))
834 (sha256
835 (base32
836 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
837 (build-system python-build-system)
838 (native-inputs
839 `(("python-cython" ,python-cython)))
840 (propagated-inputs
841 `(("python-numpy" ,python-numpy)))
842 (inputs
843 `(("netcdf" ,netcdf)
844 ("hdf4" ,hdf4)
845 ("hdf5" ,hdf5)))
846 (arguments
847 '(#:phases
848 (modify-phases %standard-phases
849 (replace 'check
850 (lambda _
851 (setenv "NO_NET" "1") ; disable opendap tests
852 (with-directory-excursion "test"
853 (setenv "PYTHONPATH" ; find and add the library we just built
854 (string-append
855 (car (find-files "../build" "lib.*"
856 #:directories? #:t
857 #:fail-on-error? #:t))
858 ":" (getenv "PYTHONPATH")))
859 (zero? (system* "python" "run_all.py"))))))))
860 (home-page
861 "https://github.com/Unidata/netcdf4-python")
862 (synopsis "Python/numpy interface to the netCDF library")
863 (description "Netcdf4-python is a Python interface to the netCDF C
864 library. netCDF version 4 has many features not found in earlier
865 versions of the library and is implemented on top of HDF5. This module
866 can read and write files in both the new netCDF 4 and the old netCDF 3
867 format, and can create files that are readable by HDF5 clients. The
868 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
869 to users of that module.")
870 ;; The software is mainly ISC, but includes some files covered
871 ;; by the Expat license.
872 (license (list license:isc license:expat))))
873
874 (define-public python2-netcdf4
875 (package-with-python2 python-netcdf4))
876
877 (define-public python-lockfile
878 (package
879 (name "python-lockfile")
880 (version "0.12.2")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
885 "lockfile-" version ".tar.gz"))
886 (sha256
887 (base32
888 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
889 (build-system python-build-system)
890 (arguments '(#:test-target "check"))
891 (native-inputs
892 `(("python-pbr" ,python-pbr)))
893 (home-page "https://launchpad.net/pylockfile")
894 (synopsis "Platform-independent file locking module")
895 (description
896 "The lockfile package exports a LockFile class which provides a simple
897 API for locking files.")
898 (license license:expat)))
899
900 (define-public python2-lockfile
901 (package-with-python2 python-lockfile))
902
903 (define-public python-mock
904 (package
905 (name "python-mock")
906 (version "1.0.1")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "mock" version))
911 (sha256
912 (base32
913 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
914 (build-system python-build-system)
915 (arguments '(#:test-target "check"))
916 (home-page "https://github.com/testing-cabal/mock")
917 (synopsis "Python mocking and patching library for testing")
918 (description
919 "Mock is a library for testing in Python. It allows you to replace parts
920 of your system under test with mock objects and make assertions about how they
921 have been used.")
922 (license license:expat)))
923
924 (define-public python2-mock
925 (package-with-python2 python-mock))
926
927
928 (define-public python-setuptools
929 (package
930 (name "python-setuptools")
931 (version "31.0.0")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "setuptools" version))
936 (sha256
937 (base32
938 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
939 (modules '((guix build utils)))
940 (snippet
941 '(begin
942 ;; Remove included binaries which are used to build self-extracting
943 ;; installers for Windows.
944 ;; TODO: Find some way to build them ourself so we can include them.
945 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
946 #t))))
947 (build-system python-build-system)
948 ;; FIXME: Tests require pytest, which itself relies on setuptools.
949 ;; One could bootstrap with an internal untested setuptools.
950 (arguments
951 `(#:tests? #f))
952 (home-page "https://pypi.python.org/pypi/setuptools")
953 (synopsis
954 "Library designed to facilitate packaging Python projects")
955 (description
956 "Setuptools is a fully-featured, stable library designed to facilitate
957 packaging Python projects, where packaging includes:
958 Python package and module definitions,
959 distribution package metadata,
960 test hooks,
961 project installation,
962 platform-specific details,
963 Python 3 support.")
964 ;; TODO: setuptools now bundles the following libraries:
965 ;; packaging, pyparsing, six and appdirs. How to unbundle?
966 (license (list license:psfl ; setuptools itself
967 license:expat ; six, appdirs, pyparsing
968 license:asl2.0 ; packaging is dual ASL2/BSD-2
969 license:bsd-2))))
970
971 (define-public python2-setuptools
972 (package-with-python2 python-setuptools))
973
974 ;;; Pycrypto is abandoned upstream:
975 ;;;
976 ;;; https://github.com/dlitz/pycrypto/issues/173
977 ;;;
978 ;;; TODO Remove this package from GNU Guix.
979 (define-public python-pycrypto
980 (package
981 (name "python-pycrypto")
982 (version "2.6.1")
983 (source
984 (origin
985 (method url-fetch)
986 (uri (pypi-uri "pycrypto" version))
987 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
988 (sha256
989 (base32
990 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
991 (build-system python-build-system)
992 (inputs
993 `(("python" ,python)
994 ("gmp" ,gmp)))
995 (arguments
996 `(#:phases
997 (alist-cons-before
998 'build 'set-build-env
999 ;; pycrypto runs an autoconf configure script behind the scenes
1000 (lambda _
1001 (setenv "CONFIG_SHELL" (which "bash")))
1002 %standard-phases)))
1003 (home-page "http://www.pycrypto.org/")
1004 (synopsis "Cryptographic modules for Python")
1005 (description
1006 "Pycrypto is a collection of both secure hash functions (such as SHA256
1007 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1008 etc.). The package is structured to make adding new modules easy.")
1009 (license license:public-domain)))
1010
1011 (define-public python2-pycrypto
1012 (let ((pycrypto (package-with-python2 python-pycrypto)))
1013 (package (inherit pycrypto)
1014 (inputs
1015 `(("python" ,python-2)
1016 ,@(alist-delete
1017 "python"
1018 (package-inputs pycrypto)))))))
1019
1020 (define-public python-keyring
1021 (package
1022 (name "python-keyring")
1023 (version "8.7")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (pypi-uri "keyring" version))
1028 (sha256
1029 (base32
1030 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1031 (build-system python-build-system)
1032 (native-inputs
1033 `(("python-setuptools-scm" ,python-setuptools-scm)))
1034 (propagated-inputs
1035 `(("python-pycrypto" ,python-pycrypto)))
1036 (arguments
1037 `(#:tests? #f)) ;TODO: tests require pytest
1038 (home-page "https://github.com/jaraco/keyring")
1039 (synopsis "Store and access your passwords safely")
1040 (description
1041 "The Python keyring lib provides a easy way to access the system keyring
1042 service from python. It can be used in any application that needs safe
1043 password storage.")
1044 ;; "MIT" and PSF dual license
1045 (license license:x11)))
1046
1047 (define-public python2-keyring
1048 (package-with-python2 python-keyring))
1049
1050 (define-public python-six
1051 (package
1052 (name "python-six")
1053 (version "1.10.0")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (pypi-uri "six" version))
1058 (sha256
1059 (base32
1060 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1061 (build-system python-build-system)
1062 (native-inputs
1063 `(("python-py" ,python-py)
1064 ("python-pytest" ,python-pytest)))
1065 (home-page "http://pypi.python.org/pypi/six/")
1066 (synopsis "Python 2 and 3 compatibility utilities")
1067 (description
1068 "Six is a Python 2 and 3 compatibility library. It provides utility
1069 functions for smoothing over the differences between the Python versions with
1070 the goal of writing Python code that is compatible on both Python versions.
1071 Six supports every Python version since 2.5. It is contained in only one
1072 Python file, so it can be easily copied into your project.")
1073 (license license:x11)))
1074
1075 (define-public python2-six
1076 (package-with-python2 python-six))
1077
1078 (define-public python-dateutil
1079 (package
1080 (name "python-dateutil")
1081 (version "2.5.2")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "python-dateutil" version))
1086 (sha256
1087 (base32
1088 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
1089 (build-system python-build-system)
1090 (propagated-inputs
1091 `(("python-six" ,python-six)))
1092 (home-page "https://dateutil.readthedocs.io/en/stable/")
1093 (synopsis "Extensions to the standard datetime module")
1094 (description
1095 "The dateutil module provides powerful extensions to the standard
1096 datetime module, available in Python 2.3+.")
1097 (license license:bsd-3)))
1098
1099 (define-public python2-dateutil
1100 (package-with-python2 python-dateutil))
1101
1102 (define-public python-parsedatetime
1103 (package
1104 (name "python-parsedatetime")
1105 (version "2.1")
1106 (source
1107 (origin
1108 (method url-fetch)
1109 (uri (pypi-uri "parsedatetime" version))
1110 (sha256
1111 (base32
1112 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1113 (build-system python-build-system)
1114 (native-inputs
1115 `(("python-nose" ,python-nose)
1116 ("python-pyicu" ,python-pyicu)))
1117 (home-page "http://github.com/bear/parsedatetime/")
1118 (synopsis
1119 "Parse human-readable date/time text")
1120 (description
1121 "Parse human-readable date/time text.")
1122 (license license:asl2.0)))
1123
1124 (define-public python2-parsedatetime
1125 (package-with-python2 python-parsedatetime))
1126
1127 (define-public python-pandas
1128 (package
1129 (name "python-pandas")
1130 (version "0.18.1")
1131 (source
1132 (origin
1133 (method url-fetch)
1134 (uri (string-append
1135 "https://pypi.python.org/packages/11/09/"
1136 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1137 "pandas-" version ".tar.gz"))
1138 (sha256
1139 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1140 (build-system python-build-system)
1141 (propagated-inputs
1142 `(("python-numpy" ,python-numpy)
1143 ("python-pytz" ,python-pytz)
1144 ("python-dateutil" ,python-dateutil)))
1145 (native-inputs
1146 `(("python-nose" ,python-nose)
1147 ("python-cython" ,python-cython)))
1148 (home-page "http://pandas.pydata.org")
1149 (synopsis "Data structures for data analysis, time series, and statistics")
1150 (description
1151 "Pandas is a Python package providing fast, flexible, and expressive data
1152 structures designed to make working with structured (tabular,
1153 multidimensional, potentially heterogeneous) and time series data both easy
1154 and intuitive. It aims to be the fundamental high-level building block for
1155 doing practical, real world data analysis in Python.")
1156 (license license:bsd-3)))
1157
1158 (define-public python2-pandas
1159 (package-with-python2 python-pandas))
1160
1161 (define-public python-tzlocal
1162 (package
1163 (name "python-tzlocal")
1164 (version "1.2.2")
1165 (source
1166 (origin
1167 (method url-fetch)
1168 (uri (pypi-uri "tzlocal" version))
1169 (sha256
1170 (base32
1171 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1172 (build-system python-build-system)
1173 (propagated-inputs
1174 `(("python-pytz" ,python-pytz)))
1175 (home-page "https://github.com/regebro/tzlocal")
1176 (synopsis
1177 "Local timezone information for Python")
1178 (description
1179 "Tzlocal returns a tzinfo object with the local timezone information.
1180 This module attempts to fix a glaring hole in pytz, that there is no way to
1181 get the local timezone information, unless you know the zoneinfo name, and
1182 under several distributions that's hard or impossible to figure out.")
1183 (license license:cc0)))
1184
1185 (define-public python2-pysqlite
1186 (package
1187 (name "python2-pysqlite")
1188 (version "2.8.1")
1189 (source
1190 (origin
1191 (method url-fetch)
1192 (uri (pypi-uri "pysqlite" version))
1193 (sha256
1194 (base32
1195 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1196 (build-system python-build-system)
1197 (inputs
1198 `(("sqlite" ,sqlite)))
1199 (arguments
1200 `(#:python ,python-2 ; incompatible with Python 3
1201 #:tests? #f)) ; no test target
1202 (home-page "http://github.com/ghaering/pysqlite")
1203 (synopsis "SQLite bindings for Python")
1204 (description
1205 "Pysqlite provides SQLite bindings for Python that comply to the
1206 Database API 2.0T.")
1207 (license license:zlib)))
1208
1209
1210 (define-public python2-mechanize
1211 (package
1212 (name "python2-mechanize")
1213 (version "0.2.5")
1214 (source
1215 (origin
1216 (method url-fetch)
1217 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1218 version ".tar.gz"))
1219 (sha256
1220 (base32
1221 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1222 (build-system python-build-system)
1223 (arguments
1224 `(#:python ,python-2 ; apparently incompatible with Python 3
1225 #:tests? #f))
1226 ;; test fails with message
1227 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1228 ;; (python-3.3.2) or
1229 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1230 ;; (python-2.7.5).
1231 ;; The source code is from March 2011 and probably not up-to-date
1232 ;; with respect to python unit tests.
1233 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1234 (synopsis
1235 "Stateful programmatic web browsing in Python")
1236 (description
1237 "Mechanize implements stateful programmatic web browsing in Python,
1238 after Andy Lester’s Perl module WWW::Mechanize.")
1239 (license (license:non-copyleft
1240 "file://COPYING"
1241 "See COPYING in the distribution."))))
1242
1243
1244 (define-public python-simplejson
1245 (package
1246 (name "python-simplejson")
1247 (version "3.10.0")
1248 (source
1249 (origin
1250 (method url-fetch)
1251 (uri (pypi-uri "simplejson" version))
1252 (sha256
1253 (base32
1254 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1255 (build-system python-build-system)
1256 (home-page "http://simplejson.readthedocs.org/en/latest/")
1257 (synopsis
1258 "Json library for Python")
1259 (description
1260 "JSON (JavaScript Object Notation) is a subset of JavaScript
1261 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1262 format.
1263
1264 Simplejson exposes an API familiar to users of the standard library marshal
1265 and pickle modules. It is the externally maintained version of the json
1266 library contained in Python 2.6, but maintains compatibility with Python 2.5
1267 and (currently) has significant performance advantages, even without using
1268 the optional C extension for speedups. Simplejson is also supported on
1269 Python 3.3+.")
1270 (license license:x11)))
1271
1272 (define-public python2-simplejson
1273 (package-with-python2 python-simplejson))
1274
1275
1276 (define-public python-pyicu
1277 (package
1278 (name "python-pyicu")
1279 (version "1.9.5")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "PyICU" version))
1284 (sha256
1285 (base32
1286 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1287 (build-system python-build-system)
1288 (inputs
1289 `(("icu4c" ,icu4c)))
1290 (home-page "http://pyicu.osafoundation.org/")
1291 (synopsis "Python extension wrapping the ICU C++ API")
1292 (description
1293 "PyICU is a python extension wrapping the ICU C++ API.")
1294 (license license:x11)))
1295
1296 (define-public python2-pyicu
1297 (package-with-python2 python-pyicu))
1298
1299 (define-public python2-dogtail
1300 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1301 ;; spaces in indentation" with Python 3.
1302 (package
1303 (name "python2-dogtail")
1304 (version "0.8.2")
1305 (source (origin
1306 (method url-fetch)
1307 (uri (string-append
1308 "https://fedorahosted.org/released/dogtail/dogtail-"
1309 version ".tar.gz"))
1310 (sha256
1311 (base32
1312 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1313 (build-system python-build-system)
1314 (arguments `(#:python ,python-2
1315 #:tests? #f)) ; invalid command "test"
1316 (home-page "https://fedorahosted.org/dogtail/")
1317 (synopsis "GUI test tool and automation framework written in ​Python")
1318 (description
1319 "Dogtail is a GUI test tool and automation framework written in Python.
1320 It uses Accessibility (a11y) technologies to communicate with desktop
1321 applications. dogtail scripts are written in Python and executed like any
1322 other Python program.")
1323 (license license:gpl2+)))
1324
1325 (define-public python2-empy
1326 (package
1327 (name "python2-empy")
1328 (version "3.3")
1329 (source (origin
1330 (method url-fetch)
1331 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1332 version ".tar.gz"))
1333 (sha256
1334 (base32
1335 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1336 (build-system python-build-system)
1337 (arguments
1338 `(#:python ,python-2
1339 #:phases (alist-replace
1340 'check
1341 (lambda _
1342 (zero? (system* "./test.sh")))
1343 %standard-phases)))
1344 (home-page "http://www.alcyone.com/software/empy/")
1345 (synopsis "Templating system for Python")
1346 (description
1347 "EmPy is a system for embedding Python expressions and statements in
1348 template text; it takes an EmPy source file, processes it, and produces
1349 output. This is accomplished via expansions, which are special signals to the
1350 EmPy system and are set off by a special prefix (by default the at sign, @@).
1351 EmPy can expand arbitrary Python expressions and statements in this way, as
1352 well as a variety of special forms. Textual data not explicitly delimited in
1353 this way is sent unaffected to the output, allowing Python to be used in
1354 effect as a markup language. Also supported are callbacks via hooks,
1355 recording and playback via diversions, and dynamic, chainable filters. The
1356 system is highly configurable via command line options and embedded
1357 commands.")
1358 (license license:lgpl2.1+)))
1359
1360 (define-public python2-element-tree
1361 (package
1362 (name "python2-element-tree")
1363 (version "1.2.6")
1364 (source (origin
1365 (method url-fetch)
1366 (uri (string-append
1367 "http://effbot.org/media/downloads/elementtree-"
1368 version "-20050316.tar.gz"))
1369 (sha256
1370 (base32
1371 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1372 (build-system python-build-system)
1373 (arguments
1374 `(#:python ,python-2 ; seems to be part of Python 3
1375 #:tests? #f)) ; no 'test' sub-command
1376 (synopsis "Toolkit for XML processing in Python")
1377 (description
1378 "ElementTree is a Python library supporting lightweight XML processing.")
1379 (home-page "http://effbot.org/zone/element-index.htm")
1380 (license (license:x11-style
1381 "http://docs.python.org/2/license.html"
1382 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1383
1384 (define-public python2-pybugz
1385 (package
1386 (name "python2-pybugz")
1387 (version "0.6.11")
1388 (source (origin
1389 (method url-fetch)
1390 (uri (string-append
1391 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1392 version ".tar.gz"))
1393 (sha256
1394 (base32
1395 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1396 (patches (search-patches "pybugz-stty.patch"
1397 "pybugz-encode-error.patch"))))
1398 (build-system python-build-system)
1399 (arguments
1400 `(#:python ,python-2 ; SyntaxError with Python 3
1401 #:tests? #f)) ; no 'test' sub-command
1402 (propagated-inputs
1403 `(("element-tree" ,python2-element-tree)))
1404 (synopsis "Python and command-line interface to Bugzilla")
1405 (description
1406 "PyBugz is a Python library and command-line tool to query the Bugzilla
1407 bug tracking system. It is meant as an aid to speed up interaction with the
1408 bug tracker.")
1409 (home-page "http://www.liquidx.net/pybugz/")
1410 (license license:gpl2)))
1411
1412 (define-public python-enum34
1413 (package
1414 (name "python-enum34")
1415 (version "1.1.0")
1416 (source
1417 (origin
1418 (method url-fetch)
1419 (uri (pypi-uri "enum34" version))
1420 (sha256
1421 (base32
1422 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1423 (build-system python-build-system)
1424 (arguments
1425 `(#:phases
1426 (alist-replace
1427 'check
1428 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1429 %standard-phases)))
1430 (home-page "https://pypi.python.org/pypi/enum34")
1431 (synopsis "Backported Python 3.4 Enum")
1432 (description
1433 "Enum34 is the new Python stdlib enum module available in Python 3.4
1434 backported for previous versions of Python from 2.4 to 3.3.")
1435 (license license:bsd-3)))
1436
1437 (define-public python2-enum34
1438 (package-with-python2 python-enum34))
1439
1440 (define-public python-parse-type
1441 (package
1442 (name "python-parse-type")
1443 (version "0.3.4")
1444 (source
1445 (origin
1446 (method url-fetch)
1447 (uri (string-append "https://pypi.python.org/packages/source/p/"
1448 "parse_type/parse_type-" version ".tar.gz"))
1449 (sha256
1450 (base32
1451 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1452 (build-system python-build-system)
1453 (propagated-inputs
1454 `(("python-six" ,python-six)
1455 ("python-parse" ,python-parse)))
1456 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1457 (home-page "https://github.com/jenisys/parse_type")
1458 (synopsis "Extended parse module")
1459 (description
1460 "Parse_type extends the python parse module.")
1461 (license license:bsd-3)))
1462
1463 (define-public python-parse
1464 (package
1465 (name "python-parse")
1466 (version "1.6.6")
1467 (source
1468 (origin
1469 (method url-fetch)
1470 (uri (pypi-uri "parse" version))
1471 (sha256
1472 (base32
1473 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1474 (patches (search-patches "python-parse-too-many-fields.patch"))))
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:phases
1478 (modify-phases %standard-phases
1479 (replace 'check
1480 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1481 (home-page "https://github.com/r1chardj0n3s/parse")
1482 (synopsis "Parse strings")
1483 (description
1484 "Parse strings using a specification based on the Python format()
1485 syntax.")
1486 (license license:x11)))
1487
1488 (define-public python-polib
1489 (package
1490 (name "python-polib")
1491 (version "1.0.8")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (pypi-uri "polib" version))
1495 (sha256
1496 (base32
1497 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1498 (build-system python-build-system)
1499 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1500 (synopsis "Manipulate, create and modify gettext files")
1501 (description "Polib can manipulate any gettext format (po, pot and mo)
1502 files. It can be used to create po files from scratch or to modify
1503 existing ones.")
1504 (license license:expat)))
1505
1506 (define-public python2-polib
1507 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1508 (package
1509 (inherit base)
1510 (arguments `(,@(package-arguments base)
1511 ;; Tests don't work with python2.
1512 #:tests? #f)))))
1513
1514 (define-public scons
1515 (package
1516 (name "scons")
1517 (version "2.3.4")
1518 (source (origin
1519 (method url-fetch)
1520 (uri (string-append "mirror://sourceforge/scons/scons/" version
1521 "/scons-" version ".tar.gz"))
1522 (sha256
1523 (base32
1524 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1525 (build-system python-build-system)
1526 (arguments
1527 ;; With Python 3.x, fails to build with a syntax error.
1528 `(#:python ,python-2
1529 #:use-setuptools? #f ; still relies on distutils
1530 #:tests? #f)) ; no 'python setup.py test' command
1531 (home-page "http://scons.org/")
1532 (synopsis "Software construction tool written in Python")
1533 (description
1534 "SCons is a software construction tool. Think of SCons as an improved,
1535 cross-platform substitute for the classic Make utility with integrated
1536 functionality similar to autoconf/automake and compiler caches such as ccache.
1537 In short, SCons is an easier, more reliable and faster way to build
1538 software.")
1539 (license license:x11)))
1540
1541 (define-public python-extras
1542 (package
1543 (name "python-extras")
1544 (version "0.0.3")
1545 (source
1546 (origin
1547 (method url-fetch)
1548 (uri (string-append
1549 "https://pypi.python.org/packages/source/e/extras/extras-"
1550 version ".tar.gz"))
1551 (sha256
1552 (base32
1553 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1554 (build-system python-build-system)
1555 (arguments
1556 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1557 '(#:tests? #f))
1558 (home-page "https://github.com/testing-cabal/extras")
1559 (synopsis "Useful extensions to the Python standard library")
1560 (description
1561 "Extras is a set of extensions to the Python standard library.")
1562 (license license:expat)))
1563
1564 (define-public python2-extras
1565 (package-with-python2 python-extras))
1566
1567 (define-public python-mimeparse
1568 (package
1569 (name "python-mimeparse")
1570 (version "0.1.4")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1580 (build-system python-build-system)
1581 (arguments
1582 '(#:tests? #f)) ; no setup.py test command
1583 (home-page
1584 "https://github.com/dbtsai/python-mimeparse")
1585 (synopsis "Python library for parsing MIME types")
1586 (description
1587 "Mimeparse provides basic functions for parsing MIME type names and
1588 matching them against a list of media-ranges.")
1589 (license license:expat)))
1590
1591 (define-public python2-mimeparse
1592 (package-with-python2 python-mimeparse))
1593
1594 (define-public python-nose
1595 (package
1596 (name "python-nose")
1597 (version "1.3.7")
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (pypi-uri "nose" version))
1602 (sha256
1603 (base32
1604 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1605 (build-system python-build-system)
1606 (arguments
1607 '(#:tests? #f)) ; FIXME: test suite fails
1608 (home-page "http://readthedocs.org/docs/nose/")
1609 (synopsis "Python testing library")
1610 (description
1611 "Nose extends the unittest library to make testing easier.")
1612 (license license:lgpl2.0+)))
1613
1614 (define-public python2-nose
1615 (package-with-python2 python-nose))
1616
1617 (define-public python-nose2
1618 (package
1619 (name "python-nose2")
1620 (version "0.6.5")
1621 (source
1622 (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "nose2" version))
1625 (sha256
1626 (base32
1627 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1628 (build-system python-build-system)
1629 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1630 (propagated-inputs
1631 `(("python-cov-core" ,python-cov-core)
1632 ("python-pytest-cov" ,python-pytest-cov)
1633 ("python-six" ,python-six)))
1634 (home-page "https://github.com/nose-devs/nose2")
1635 (synopsis "Next generation of nicer testing for Python")
1636 (description
1637 "Nose2 is the next generation of nicer testing for Python, based on the
1638 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1639 better plugin api, being easier for users to configure, and simplifying internal
1640 interfaces and processes.")
1641 (license license:bsd-2)))
1642
1643 (define-public python2-nose2
1644 (package-with-python2 python-nose2))
1645
1646 (define-public python-unittest2
1647 (package
1648 (name "python-unittest2")
1649 (version "0.5.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (string-append
1654 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1655 version ".tar.gz"))
1656 (sha256
1657 (base32
1658 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1659 (build-system python-build-system)
1660 (home-page "http://pypi.python.org/pypi/unittest2")
1661 (synopsis "Python unit testing library")
1662 (description
1663 "Unittest2 is a replacement for the unittest module in the Python
1664 standard library.")
1665 (license license:psfl)))
1666
1667 (define-public python2-unittest2
1668 (package (inherit python-unittest2)
1669 (name "python2-unittest2")
1670 (version "0.5.1")
1671 (source
1672 (origin
1673 (method url-fetch)
1674 (uri (string-append
1675 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1676 version ".tar.gz"))
1677 (sha256
1678 (base32
1679 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1680 (arguments
1681 `(#:python ,python-2
1682 #:tests? #f)))) ; no setup.py test command
1683
1684 (define-public python-pafy
1685 (package
1686 (name "python-pafy")
1687 (version "0.5.2")
1688 (source
1689 (origin
1690 (method url-fetch)
1691 (uri (pypi-uri "pafy" version))
1692 (sha256
1693 (base32
1694 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1695 (build-system python-build-system)
1696 (arguments
1697 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1698 (propagated-inputs
1699 ;; Youtube-dl is a python package which is imported in the file
1700 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1701 `(("youtube-dl" ,youtube-dl)))
1702 (home-page "https://np1.github.io/pafy/")
1703 (synopsis "Retrieve YouTube content and metadata")
1704 (description
1705 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1706 (license license:lgpl3+)))
1707
1708 (define-public python-py
1709 (package
1710 (name "python-py")
1711 (version "1.4.31")
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (pypi-uri "py" version))
1716 (sha256
1717 (base32
1718 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1719 (build-system python-build-system)
1720 (arguments
1721 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1722 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1723 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1724 ;; Is this module globally installed?"
1725 '(#:tests? #f))
1726 (home-page "http://pylib.readthedocs.org/")
1727 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1728 (description
1729 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1730 code introspection, and logging.")
1731 (license license:expat)))
1732
1733 (define-public python2-py
1734 (package-with-python2 python-py))
1735
1736 (define-public python-pytest
1737 (package
1738 (name "python-pytest")
1739 (version "2.7.3")
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri (string-append
1744 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1745 version ".tar.gz"))
1746 (sha256
1747 (base32
1748 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1749 (modules '((guix build utils)))
1750 (snippet
1751 ;; One of the tests involves the /usr directory, so it fails.
1752 '(substitute* "testing/test_argcomplete.py"
1753 (("def test_remove_dir_prefix\\(self\\):")
1754 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1755 (build-system python-build-system)
1756 (propagated-inputs
1757 `(("python-py" ,python-py)))
1758 (native-inputs
1759 `(("python-nose" ,python-nose)
1760 ("python-mock" ,python-mock)))
1761 (home-page "http://pytest.org")
1762 (synopsis "Python testing library")
1763 (description
1764 "Pytest is a testing tool that provides auto-discovery of test modules
1765 and functions, detailed info on failing assert statements, modular fixtures,
1766 and many external plugins.")
1767 (license license:expat)))
1768
1769 (define-public python2-pytest
1770 (package-with-python2 python-pytest))
1771
1772 ;; This package is used by Borg until we can upgrade all our Python packages to
1773 ;; use a more recent pytest.
1774 (define-public python-pytest-2.9.2
1775 (package
1776 (inherit python-pytest)
1777 (name "python-pytest")
1778 (version "2.9.2")
1779 (source (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "pytest" version))
1782 (sha256
1783 (base32
1784 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1785 (arguments
1786 `(#:phases
1787 (modify-phases %standard-phases
1788 (add-before 'check 'disable-invalid-test
1789 (lambda _
1790 (substitute* "testing/test_argcomplete.py"
1791 (("def test_remove_dir_prefix" line)
1792 (string-append "@pytest.mark.skip"
1793 "(reason=\"Assumes that /usr exists.\")\n "
1794 line)))
1795 #t)))))))
1796
1797 (define-public python-pytest-cov
1798 (package
1799 (name "python-pytest-cov")
1800 (version "2.2.1")
1801 (source
1802 (origin
1803 (method url-fetch)
1804 (uri (pypi-uri "pytest-cov" version))
1805 (sha256
1806 (base32
1807 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1808 (build-system python-build-system)
1809 (arguments
1810 `(#:phases
1811 (modify-phases %standard-phases
1812 (replace 'check
1813 (lambda _
1814 ;; options taken from tox.ini
1815 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1816 ;; with "Duplicate implicit target name"
1817 (zero? (system* "python" "./setup.py" "check"
1818 "--strict" "--metadata")))))))
1819 (propagated-inputs
1820 `(("python-coverage" ,python-coverage)
1821 ("python-pytest" ,python-pytest)))
1822 (home-page "https://github.com/pytest-dev/pytest-cov")
1823 (synopsis "Pytest plugin for measuring coverage")
1824 (description
1825 "Pytest-cov produces coverage reports. It supports centralised testing and
1826 distributed testing in both @code{load} and @code{each} modes. It also
1827 supports coverage of subprocesses.")
1828 (license license:expat)))
1829
1830 (define-public python2-pytest-cov
1831 (package-with-python2 python-pytest-cov))
1832
1833 (define-public python-pytest-runner
1834 (package
1835 (name "python-pytest-runner")
1836 (version "2.6.2")
1837 (source
1838 (origin
1839 (method url-fetch)
1840 (uri (pypi-uri "pytest-runner" version))
1841 (sha256
1842 (base32
1843 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1844 (build-system python-build-system)
1845 (arguments
1846 `(#:phases
1847 (modify-phases %standard-phases
1848 ;; The fancy way of setting the version with setuptools_scm does not
1849 ;; seem to work here.
1850 (add-after 'unpack 'set-version
1851 (lambda _
1852 (substitute* "docs/conf.py"
1853 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1854 (string-append "version = \"" ,version "\"")))
1855 #t)))))
1856 (native-inputs
1857 `(("python-pytest" ,python-pytest)
1858 ("python-setuptools-scm" ,python-setuptools-scm)))
1859 (home-page "https://github.com/pytest-dev/pytest-runner")
1860 (synopsis "Invoke py.test as a distutils command")
1861 (description
1862 "This package provides a @command{pytest-runner} command that
1863 @file{setup.py} files can use to run tests.")
1864 (license license:expat)))
1865
1866 (define-public python2-pytest-runner
1867 (package-with-python2 python-pytest-runner))
1868
1869 (define-public python-pytest-mock
1870 (package
1871 (name "python-pytest-mock")
1872 (version "1.2")
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "pytest-mock" version ".zip"))
1877 (sha256
1878 (base32
1879 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1880 (build-system python-build-system)
1881 (native-inputs
1882 `(("unzip" ,unzip)))
1883 (propagated-inputs
1884 `(("python-pytest" ,python-pytest)))
1885 (home-page "https://github.com/pytest-dev/pytest-mock/")
1886 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1887 (description
1888 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1889 around the patching API provided by the @code{mock} package, but with the
1890 benefit of not having to worry about undoing patches at the end of a test.
1891 The mocker fixture has the same API as @code{mock.patch}, supporting the
1892 same arguments.")
1893 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1894 (license license:expat)))
1895
1896 (define-public python2-pytest-mock
1897 (let ((base (package-with-python2
1898 (strip-python2-variant python-pytest-mock))))
1899 (package (inherit base)
1900 (propagated-inputs
1901 `(("python2-mock" ,python2-mock)
1902 ,@(package-propagated-inputs base))))))
1903
1904 (define-public python-pytest-xdist
1905 (package
1906 (name "python-pytest-xdist")
1907 (version "1.14")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "pytest-xdist" version ".zip"))
1912 (sha256
1913 (base32
1914 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1915 (modules '((guix build utils)))
1916 (snippet
1917 '(begin
1918 ;; Remove pre-compiled .pyc files from source.
1919 (for-each delete-file-recursively
1920 (find-files "." "__pycache__" #:directories? #t))
1921 (for-each delete-file (find-files "." "\\.pyc$"))
1922 #t))))
1923 (build-system python-build-system)
1924 (arguments
1925 '(#:tests? #f)) ;FIXME: Some tests are failing.
1926 ;; #:phases
1927 ;; (modify-phases %standard-phases
1928 ;; (delete 'check)
1929 ;; (add-after 'install 'check
1930 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1931 ;; (add-installed-pythonpath inputs outputs)
1932 ;; (zero? (system* "py.test" "-v")))))
1933 (native-inputs
1934 `(("unzip" ,unzip)
1935 ("python-setuptools-scm" ,python-setuptools-scm)))
1936 (propagated-inputs
1937 `(("python-execnet" ,python-execnet)
1938 ("python-pytest" ,python-pytest)
1939 ("python-py" ,python-py)))
1940 (home-page
1941 "https://github.com/pytest-dev/pytest-xdist")
1942 (synopsis
1943 "Plugin for py.test with distributed testing and loop-on-failing modes")
1944 (description
1945 "The pytest-xdist plugin extends py.test with some unique test execution
1946 modes: parallelization, running tests in boxed subprocesses, the ability
1947 to run tests repeatedly when failed, and the ability to run tests on multiple
1948 Python interpreters or platforms. It uses rsync to copy the existing
1949 program code to a remote location, executes there, and then syncs the
1950 result back.")
1951 (license license:expat)))
1952
1953 (define-public python2-pytest-xdist
1954 (package-with-python2 python-pytest-xdist))
1955
1956 (define-public python-scripttest
1957 (package
1958 (name "python-scripttest")
1959 (version "1.3")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (string-append
1964 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1965 version ".tar.gz"))
1966 (sha256
1967 (base32
1968 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1969 (build-system python-build-system)
1970 (native-inputs
1971 `(("python-pytest" ,python-pytest)))
1972 (home-page "http://pythonpaste.org/scripttest/")
1973 (synopsis "Python library to test command-line scripts")
1974 (description "Scripttest is a Python helper library for testing
1975 interactive command-line applications. With it you can run a script in a
1976 subprocess and see the output as well as any file modifications.")
1977 (license license:expat)))
1978
1979 (define-public python2-scripttest
1980 (package-with-python2 python-scripttest))
1981
1982 (define-public python-testtools
1983 (package
1984 (name "python-testtools")
1985 (version "1.0.0")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (string-append
1990 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1991 version ".tar.gz"))
1992 (sha256
1993 (base32
1994 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1995 (build-system python-build-system)
1996 (propagated-inputs
1997 `(("python-mimeparse" ,python-mimeparse)
1998 ("python-extras" ,python-extras)))
1999 (home-page "https://github.com/testing-cabal/testtools")
2000 (synopsis
2001 "Extensions to the Python standard library unit testing framework")
2002 (description
2003 "Testtools extends the Python standard library unit testing framework to
2004 provide matchers, more debugging information, and cross-Python
2005 compatibility.")
2006 (license license:psfl)))
2007
2008 (define-public python2-testtools
2009 (package-with-python2 python-testtools))
2010
2011 (define-public python-testscenarios
2012 (package
2013 (name "python-testscenarios")
2014 (version "0.4")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (string-append
2019 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2020 version ".tar.gz"))
2021 (sha256
2022 (base32
2023 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2024 (build-system python-build-system)
2025 (propagated-inputs
2026 `(("python-testtools" ,python-testtools)))
2027 (home-page "https://launchpad.net/testscenarios")
2028 (synopsis "Pyunit extension for dependency injection")
2029 (description
2030 "Testscenarios provides clean dependency injection for Python unittest
2031 style tests.")
2032 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2033
2034 (define-public python2-testscenarios
2035 (package-with-python2 python-testscenarios))
2036
2037 (define-public python-testresources
2038 (package
2039 (name "python-testresources")
2040 (version "0.2.7")
2041 (source
2042 (origin
2043 (method url-fetch)
2044 (uri (string-append
2045 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2046 version ".tar.gz"))
2047 (sha256
2048 (base32
2049 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2050 (build-system python-build-system)
2051 (home-page "https://launchpad.net/testresources")
2052 (synopsis
2053 "Pyunit extension for managing test resources")
2054 (description
2055 "Testresources is an extension to Python's unittest to allow declarative
2056 use of resources by test cases.")
2057 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2058
2059 (define-public python2-testresources
2060 (package-with-python2 python-testresources))
2061
2062 (define-public python-subunit
2063 (package
2064 (name "python-subunit")
2065 (version "0.0.21")
2066 (source
2067 (origin
2068 (method url-fetch)
2069 (uri (string-append
2070 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2071 version ".tar.gz"))
2072 (sha256
2073 (base32
2074 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2075 (build-system python-build-system)
2076 (propagated-inputs
2077 `(("python-extras" ,python-extras)
2078 ("python-mimeparse" ,python-mimeparse)))
2079 (native-inputs
2080 `(("python-testscenarios" ,python-testscenarios)))
2081 (home-page "http://launchpad.net/subunit")
2082 (synopsis "Python implementation of the subunit protocol")
2083 (description
2084 "Python-subunit is a Python implementation of the subunit test streaming
2085 protocol.")
2086 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2087
2088 (define-public python2-subunit
2089 (package-with-python2 python-subunit))
2090
2091 ;; Recent versions of python-fixtures and python-testrepository need
2092 ;; python-pbr for packaging, which itself needs these two packages for
2093 ;; testing.
2094 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2095 ;; same source, just without any test dependencies and with tests disabled.
2096 ;; python-pbr-minmal is then used to package python-fixtures and
2097 ;; python-testrepository.
2098 ;; Strictly speaking we currently could remove the test-requirements from the
2099 ;; normal python-pbr package (and save this package) since test are disabled
2100 ;; there anyway. But this may change in future.
2101 (define python-pbr-minimal
2102 (package
2103 (name "python-pbr-minimal")
2104 (version "1.8.1")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "pbr" version))
2109 (sha256
2110 (base32
2111 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2112 (build-system python-build-system)
2113 (arguments
2114 `(#:tests? #f))
2115 (home-page "http://docs.openstack.org/developer/pbr/")
2116 (synopsis "Minimal build of python-pbr used for bootstrapping")
2117 (description
2118 "Used only for bootstrapping python2-pbr, you should not need this.")
2119 (license license:asl2.0)))
2120
2121 (define python2-pbr-minimal
2122 (package-with-python2 python-pbr-minimal))
2123
2124 (define-public python-pbr
2125 (package
2126 (inherit python-pbr-minimal)
2127 (name "python-pbr")
2128 (arguments
2129 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2130 (propagated-inputs
2131 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2132 (native-inputs
2133 `(("python-fixtures" ,python-fixtures)
2134 ;; discover, coverage, hacking, subunit
2135 ("python-mock" ,python-mock)
2136 ("python-six" ,python-six)
2137 ("python-sphinx" ,python-sphinx)
2138 ("python-testrepository" ,python-testrepository)
2139 ("python-testresources" ,python-testresources)
2140 ("python-testscenarios" ,python-testscenarios)
2141 ("python-testtools" ,python-testtools)
2142 ("python-virtualenv" ,python-virtualenv)))
2143 (synopsis "Enhance the default behavior of Python’s setuptools")
2144 (description
2145 "Python Build Reasonableness (PBR) is a library that injects some useful
2146 and sensible default behaviors into your setuptools run. It will set
2147 versions, process requirements files and generate AUTHORS and ChangeLog file
2148 from git information.
2149 ")))
2150
2151 (define-public python2-pbr
2152 (package-with-python2 python-pbr))
2153
2154 (define-public python-fixtures
2155 (package
2156 (name "python-fixtures")
2157 (version "1.4.0")
2158 (source
2159 (origin
2160 (method url-fetch)
2161 (uri (pypi-uri "fixtures" version))
2162 (sha256
2163 (base32
2164 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2165 (build-system python-build-system)
2166 (arguments
2167 '(#:phases
2168 (modify-phases %standard-phases
2169 (replace 'check
2170 (lambda _
2171 (zero? (system* "python" "-m" "testtools.run"
2172 "fixtures.test_suite")))))))
2173 (propagated-inputs
2174 `(("python-six" ,python-six)))
2175 (native-inputs
2176 `(("python-mock" ,python-mock)
2177 ("python-pbr-minimal" ,python-pbr-minimal)
2178 ("python-testtools" ,python-testtools)))
2179 (home-page "https://launchpad.net/python-fixtures")
2180 (synopsis "Python test fixture library")
2181 (description
2182 "Fixtures provides a way to create reusable state, useful when writing
2183 Python tests.")
2184 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2185
2186 (define-public python2-fixtures
2187 (package-with-python2 python-fixtures))
2188
2189 (define-public python-testrepository
2190 (package
2191 (name "python-testrepository")
2192 (version "0.0.20")
2193 (source
2194 (origin
2195 (method url-fetch)
2196 (uri (string-append
2197 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2198 version ".tar.gz"))
2199 (sha256
2200 (base32
2201 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2202 (build-system python-build-system)
2203 (arguments
2204 ;; FIXME: Many tests are failing.
2205 '(#:tests? #f))
2206 (propagated-inputs
2207 `(("python-fixtures" ,python-fixtures)
2208 ("python-subunit" ,python-subunit)
2209 ("python-testtools" ,python-testtools)))
2210 (native-inputs
2211 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2212 ("python-mimeparse" ,python-mimeparse)))
2213 (home-page "https://launchpad.net/testrepository")
2214 (synopsis "Database for Python test results")
2215 (description "Testrepository provides a database of test results which can
2216 be used as part of a developer's workflow to check things such as what tests
2217 have failed since the last commit or what tests are currently failing.")
2218 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2219
2220 (define-public python2-testrepository
2221 (package-with-python2 python-testrepository))
2222
2223 (define-public python-coverage
2224 (package
2225 (name "python-coverage")
2226 (version "4.1")
2227 (source
2228 (origin
2229 (method url-fetch)
2230 (uri (pypi-uri "coverage" version))
2231 (sha256
2232 (base32
2233 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2234 (build-system python-build-system)
2235 (arguments
2236 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2237 '(#:tests? #f))
2238 (home-page "http://nedbatchelder.com/code/coverage")
2239 (synopsis "Code coverage measurement for Python")
2240 (description
2241 "Coverage measures code coverage, typically during test execution. It
2242 uses the code analysis tools and tracing hooks provided in the Python standard
2243 library to determine which lines are executable, and which have been
2244 executed.")
2245 (license license:bsd-3)))
2246
2247 (define-public python2-coverage
2248 (package-with-python2 python-coverage))
2249
2250 (define-public python-cov-core
2251 (package
2252 (name "python-cov-core")
2253 (version "1.15.0")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "cov-core" version))
2258 (sha256
2259 (base32
2260 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2261 (build-system python-build-system)
2262 (propagated-inputs
2263 `(("python-coverage" ,python-coverage)))
2264 (home-page "https://github.com/schlamar/cov-core")
2265 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2266 (description
2267 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2268 It is useful for developing coverage plugins for these testing frameworks.")
2269 (license license:expat)))
2270
2271 (define-public python2-cov-core
2272 (package-with-python2 python-cov-core))
2273
2274 (define-public python-discover
2275 (package
2276 (name "python-discover")
2277 (version "0.4.0")
2278 (source
2279 (origin
2280 (method url-fetch)
2281 (uri (string-append
2282 "https://pypi.python.org/packages/source/d/discover/discover-"
2283 version ".tar.gz"))
2284 (sha256
2285 (base32
2286 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2287 (build-system python-build-system)
2288 (home-page "http://pypi.python.org/pypi/discover/")
2289 (synopsis
2290 "Python test discovery for unittest")
2291 (description
2292 "Discover provides test discovery for unittest, a feature that has been
2293 backported from Python 2.7 for Python 2.4+.")
2294 (license license:bsd-3)))
2295
2296 (define-public python2-discover
2297 (package-with-python2 python-discover))
2298
2299 (define-public behave
2300 (package
2301 (name "behave")
2302 (version "1.2.5")
2303 (source (origin
2304 (method url-fetch)
2305 (uri (pypi-uri "behave" version ".tar.bz2"))
2306 (sha256
2307 (base32
2308 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2309 (build-system python-build-system)
2310 (propagated-inputs
2311 `(("python-six" ,python-six)
2312 ("python-parse" ,python-parse)
2313 ("python-parse-type" ,python-parse-type)))
2314 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2315 ;PyHamcrest>=1.8
2316 (home-page "http://github.com/behave/behave")
2317 (synopsis "Python behavior-driven development")
2318 (description
2319 "Behave is a tool for behavior-driven development in python.
2320 Behavior-driven development (or BDD) is an agile software development
2321 technique that encourages collaboration between developers, QA and
2322 non-technical or business participants in a software project. Behave uses
2323 tests written in a natural language style, backed up by Python code.")
2324 (license license:x11)))
2325
2326 (define-public python-exif-read
2327 (package
2328 (name "python-exif-read")
2329 (version "2.1.2")
2330 (source (origin
2331 (method url-fetch)
2332 (uri (pypi-uri "ExifRead" version))
2333 (sha256
2334 (base32
2335 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2336 (build-system python-build-system)
2337 (arguments `(#:tests? #f)) ; no tests
2338 (home-page "https://github.com/ianare/exif-py")
2339 (synopsis "Python library to extract EXIF data from image files")
2340 (description
2341 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2342 files.")
2343 (license license:bsd-3)))
2344
2345 (define-public python2-exif-read
2346 (package-with-python2 python-exif-read))
2347
2348 (define-public python-pyld
2349 (package
2350 (name "python-pyld")
2351 (version "0.7.1")
2352 (source (origin
2353 (method url-fetch)
2354 (uri (pypi-uri "PyLD" version))
2355 (sha256
2356 (base32
2357 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2358 (build-system python-build-system)
2359 (arguments `(#:tests? #f)) ; no tests
2360 (home-page "http://github.com/digitalbazaar/pyld")
2361 (synopsis "Python implementation of the JSON-LD specification")
2362 (description
2363 "PyLD is an implementation of the JSON-LD specification.")
2364 (license license:bsd-3)))
2365
2366 (define-public python2-pyld
2367 (package-with-python2 python-pyld))
2368
2369 (define-public python-certifi
2370 (package
2371 (name "python-certifi")
2372 (version "2016.8.31")
2373 (source (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "certifi" version))
2376 (sha256
2377 (base32
2378 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2379 (build-system python-build-system)
2380 (arguments `(#:tests? #f)) ; no tests
2381 (home-page "http://python-requests.org/")
2382 (synopsis "Python CA certificate bundle")
2383 (description
2384 "Certifi is a Python library that contains a CA certificate bundle, which
2385 is used by the Requests library to verify HTTPS requests.")
2386 (license license:asl2.0)))
2387
2388 (define-public python2-certifi
2389 (package-with-python2 python-certifi))
2390
2391 (define-public python-click
2392 (package
2393 (name "python-click")
2394 (version "6.7")
2395 (source
2396 (origin
2397 (method url-fetch)
2398 (uri (pypi-uri "click" version))
2399 (sha256
2400 (base32
2401 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2402 (build-system python-build-system)
2403 (arguments
2404 `(#:phases
2405 (modify-phases %standard-phases
2406 (add-after 'unpack 'fix-paths
2407 (lambda* (#:key inputs #:allow-other-keys)
2408 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2409 "cross-libc" "libc"))))
2410 (substitute* "click/_unicodefun.py"
2411 (("'locale'")
2412 (string-append "'" glibc "/bin/locale'"))))
2413 #t))
2414 (replace 'check
2415 (lambda _
2416 (zero? (system* "make" "test")))))))
2417 (native-inputs
2418 `(("python-pytest" ,python-pytest)))
2419 (home-page "http://click.pocoo.org")
2420 (synopsis "Command line library for Python")
2421 (description
2422 "Click is a Python package for creating command line interfaces in a
2423 composable way with as little code as necessary. Its name stands for
2424 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2425 with sensible defaults out of the box.")
2426 (license license:bsd-3)))
2427
2428 (define-public python2-click
2429 (package-with-python2 python-click))
2430
2431 (define-public python-wheel
2432 (package
2433 (name "python-wheel")
2434 (version "0.29.0")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "wheel" version))
2439 (sha256
2440 (base32
2441 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2442 (build-system python-build-system)
2443 (native-inputs
2444 `(("python-jsonschema" ,python-jsonschema)
2445 ("python-pytest-cov" ,python-pytest-cov)))
2446 (home-page "https://bitbucket.org/pypa/wheel/")
2447 (synopsis "Format for built Python packages")
2448 (description
2449 "A wheel is a ZIP-format archive with a specially formatted filename and
2450 the @code{.whl} extension. It is designed to contain all the files for a PEP
2451 376 compatible install in a way that is very close to the on-disk format. Many
2452 packages will be properly installed with only the @code{Unpack} step and the
2453 unpacked archive preserves enough information to @code{Spread} (copy data and
2454 scripts to their final locations) at any later time. Wheel files can be
2455 installed with a newer @code{pip} or with wheel's own command line utility.")
2456 (license license:expat)
2457 (properties `((python2-variant . ,(delay python2-wheel))))))
2458
2459 (define-public python2-wheel
2460 (let ((wheel (package-with-python2
2461 (strip-python2-variant python-wheel))))
2462 (package (inherit wheel)
2463 (native-inputs `(("python2-functools32" ,python2-functools32)
2464 ,@(package-native-inputs wheel))))))
2465
2466
2467 (define-public python-requests
2468 (package
2469 (name "python-requests")
2470 (version "2.12.4")
2471 (source (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "requests" version))
2474 (sha256
2475 (base32
2476 "0d5fwxmw4ibynk3imph3n4n84m0n3ib1vj339fxhkqri0qd4767d"))))
2477 ;; TODO: unbundle urllib3 and chardet.
2478 (build-system python-build-system)
2479 (arguments
2480 ;; FIXME: Some tests require network access.
2481 '(#:tests? #f))
2482 (home-page "http://python-requests.org/")
2483 (synopsis "Python HTTP library")
2484 (description
2485 "Requests is a Python HTTP client library. It aims to be easier to use
2486 than Python’s urllib2 library.")
2487 (license license:asl2.0)))
2488
2489 ;; Some software requires an older version of Requests, notably Docker
2490 ;; Compose.
2491 (define-public python-requests-2.7
2492 (package (inherit python-requests)
2493 (version "2.7.0")
2494 (source (origin
2495 (method url-fetch)
2496 (uri (pypi-uri "requests" version))
2497 (sha256
2498 (base32
2499 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2500
2501 (define-public python2-requests
2502 (package-with-python2 python-requests))
2503
2504 (define-public python-vcversioner
2505 (package
2506 (name "python-vcversioner")
2507 (version "2.16.0.0")
2508 (source
2509 (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "vcversioner" version))
2512 (sha256
2513 (base32
2514 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2515 (build-system python-build-system)
2516 (synopsis "Python library for version number discovery")
2517 (description "Vcversioner is a Python library that inspects tagging
2518 information in a variety of version control systems in order to discover
2519 version numbers.")
2520 (home-page "https://github.com/habnabit/vcversioner")
2521 (license license:isc)))
2522
2523 (define-public python2-vcversioner
2524 (package-with-python2 python-vcversioner))
2525
2526 (define-public python-jsonschema
2527 (package
2528 (name "python-jsonschema")
2529 (version "2.5.1")
2530 (source (origin
2531 (method url-fetch)
2532 (uri
2533 (string-append
2534 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2535 version ".tar.gz"))
2536 (sha256
2537 (base32
2538 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2539 (build-system python-build-system)
2540 (arguments
2541 '(#:phases
2542 (modify-phases %standard-phases
2543 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2544 (native-inputs
2545 `(("python-nose" ,python-nose)
2546 ("python-vcversioner" ,python-vcversioner)))
2547 (home-page "https://github.com/Julian/jsonschema")
2548 (synopsis "Implementation of JSON Schema for Python")
2549 (description
2550 "Jsonschema is an implementation of JSON Schema for Python.")
2551 (license license:expat)
2552 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2553
2554 (define-public python2-jsonschema
2555 (let ((jsonschema (package-with-python2
2556 (strip-python2-variant python-jsonschema))))
2557 (package (inherit jsonschema)
2558 (native-inputs
2559 `(("python2-mock" ,python2-mock)
2560 ,@(package-native-inputs jsonschema)))
2561 (propagated-inputs
2562 `(("python2-functools32" ,python2-functools32))))))
2563
2564 (define-public python-kitchen
2565 (package
2566 (name "python-kitchen")
2567 (version "1.2.4")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "kitchen" version))
2572 (sha256
2573 (base32
2574 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2575 (build-system python-build-system)
2576 (propagated-inputs
2577 `(("python-chardet" ,python-chardet)))
2578 (home-page "https://fedorahosted.org/kitchen")
2579 (synopsis "Python API for snippets")
2580 (description "@code{kitchen} module provides a python API for all sorts of
2581 little useful snippets of code that everybody ends up writing for their projects
2582 but never seem big enough to build an independent release. Use kitchen and stop
2583 cutting and pasting that code over and over.")
2584 (license (list license:lgpl2.1+
2585 ;; subprocess.py, test_subprocess.py,
2586 ;; kitchen/pycompat25/defaultdict.py:
2587 license:psfl))))
2588
2589 (define-public python2-kitchen
2590 (package-with-python2 python-kitchen))
2591
2592 (define-public python-unidecode
2593 (package
2594 (name "python-unidecode")
2595 (version "0.04.18")
2596 (source (origin
2597 (method url-fetch)
2598 (uri (pypi-uri "Unidecode" version))
2599 (sha256
2600 (base32
2601 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2602 (build-system python-build-system)
2603 (home-page "https://pypi.python.org/pypi/Unidecode")
2604 (synopsis "ASCII transliterations of Unicode text")
2605 (description
2606 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2607 useful when integrating with legacy code that doesn't support Unicode, or for
2608 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2609 machine identifiers from human-readable Unicode strings that should still be
2610 somewhat intelligeble.")
2611 (license license:gpl2+)))
2612
2613 (define-public python2-unidecode
2614 (package-with-python2 python-unidecode))
2615
2616 (define-public python-pyjwt
2617 (package
2618 (name "python-pyjwt")
2619 (version "1.4.0")
2620 (source
2621 (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "PyJWT" version))
2624 (sha256
2625 (base32
2626 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2627 (build-system python-build-system)
2628 (native-inputs
2629 `(("python-pytest" ,python-pytest)
2630 ("python-pytest-cov" ,python-pytest-cov)
2631 ("python-pytest-runner" ,python-pytest-runner)))
2632 (home-page "http://github.com/progrium/pyjwt")
2633 (synopsis "JSON Web Token implementation in Python")
2634 (description
2635 "PyJWT is a JSON Web Token implementation written in Python.")
2636 (license license:expat)))
2637
2638 (define-public python2-pyjwt
2639 (package-with-python2 python-pyjwt))
2640
2641 (define-public python-oauthlib
2642 (package
2643 (name "python-oauthlib")
2644 (version "1.0.3")
2645 (source (origin
2646 (method url-fetch)
2647 (uri (pypi-uri "oauthlib" version))
2648 (sha256
2649 (base32
2650 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2651 (build-system python-build-system)
2652 (native-inputs
2653 `(("python-nose" ,python-nose)
2654 ("python-mock" ,python-mock)
2655 ("python-cryptography" ,python-cryptography)
2656 ("python-pyjwt" ,python-pyjwt)
2657 ("python-blinker" ,python-blinker)))
2658 (home-page "https://github.com/idan/oauthlib")
2659 (synopsis "OAuth implementation for Python")
2660 (description
2661 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2662 OAuth request-signing logic.")
2663 (license license:bsd-3)
2664 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2665
2666 (define-public python2-oauthlib
2667 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2668 (package
2669 (inherit base)
2670 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2671 ,@(package-native-inputs base))))))
2672
2673 (define-public python-itsdangerous
2674 (package
2675 (name "python-itsdangerous")
2676 (version "0.24")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (string-append
2681 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2682 version ".tar.gz"))
2683 (sha256
2684 (base32
2685 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2686 (build-system python-build-system)
2687 (home-page "http://github.com/mitsuhiko/itsdangerous")
2688 (synopsis "Python library for passing data to/from untrusted environments")
2689 (description
2690 "Itsdangerous provides various helpers to pass trusted data to untrusted
2691 environments and back.")
2692 (license license:bsd-3)))
2693
2694 (define-public python2-itsdangerous
2695 (package-with-python2 python-itsdangerous))
2696
2697 (define-public python-pyyaml
2698 (package
2699 (name "python-pyyaml")
2700 (version "3.12")
2701 (source
2702 (origin
2703 (method url-fetch)
2704 (uri (pypi-uri "PyYAML" version))
2705 (sha256
2706 (base32
2707 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2708 (build-system python-build-system)
2709 (inputs
2710 `(("libyaml" ,libyaml)))
2711 (home-page "http://pyyaml.org/wiki/PyYAML")
2712 (synopsis "YAML parser and emitter for Python")
2713 (description
2714 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2715 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2716 API, and sensible error messages. PyYAML supports standard YAML tags and
2717 provides Python-specific tags that allow to represent an arbitrary Python
2718 object.")
2719 (license license:expat)))
2720
2721 (define-public python2-pyyaml
2722 (package-with-python2 python-pyyaml))
2723
2724 (define-public python-virtualenv
2725 (package
2726 (name "python-virtualenv")
2727 (version "15.0.3")
2728 (source
2729 (origin
2730 (method url-fetch)
2731 (uri (pypi-uri "virtualenv" version))
2732 (sha256
2733 (base32
2734 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2735 (build-system python-build-system)
2736 (arguments
2737 `(#:phases
2738 (modify-phases %standard-phases
2739 (replace 'check
2740 (lambda _
2741 ;; Disable failing test. See upstream bug report
2742 ;; https://github.com/pypa/virtualenv/issues/957
2743 (substitute* "tests/test_virtualenv.py"
2744 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2745 (zero? (system* "py.test")))))))
2746 (native-inputs
2747 `(("python-mock" ,python-mock)
2748 ("python-pytest" ,python-pytest)))
2749 (home-page "https://virtualenv.pypa.io/")
2750 (synopsis "Virtual Python environment builder")
2751 (description
2752 "Virtualenv is a tool to create isolated Python environments.")
2753 (license license:expat)))
2754
2755 (define-public python2-virtualenv
2756 (package-with-python2 python-virtualenv))
2757
2758 (define-public python-markupsafe
2759 (package
2760 (name "python-markupsafe")
2761 (version "0.23")
2762 (source
2763 (origin
2764 (method url-fetch)
2765 (uri (string-append
2766 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2767 version ".tar.gz"))
2768 (sha256
2769 (base32
2770 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2771 (build-system python-build-system)
2772 (home-page "http://github.com/mitsuhiko/markupsafe")
2773 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2774 (description
2775 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2776 for Python.")
2777 (license license:bsd-3)))
2778
2779 (define-public python2-markupsafe
2780 (package-with-python2 python-markupsafe))
2781
2782 (define-public python-jinja2
2783 (package
2784 (name "python-jinja2")
2785 (version "2.8")
2786 (source
2787 (origin
2788 (method url-fetch)
2789 (uri (pypi-uri "Jinja2" version))
2790 (sha256
2791 (base32
2792 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2793 (build-system python-build-system)
2794 (propagated-inputs
2795 `(("python-markupsafe" ,python-markupsafe)))
2796 (home-page "http://jinja.pocoo.org/")
2797 (synopsis "Python template engine")
2798 (description
2799 "Jinja2 is a small but fast and easy to use stand-alone template engine
2800 written in pure Python.")
2801 (license license:bsd-3)))
2802
2803 (define-public python2-jinja2
2804 (package-with-python2 python-jinja2))
2805
2806 (define-public python-pystache
2807 (package
2808 (name "python-pystache")
2809 (version "0.5.4")
2810 (source (origin
2811 (method url-fetch)
2812 (uri (pypi-uri "pystache" version))
2813 (sha256
2814 (base32
2815 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2816 (build-system python-build-system)
2817 (arguments
2818 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2819 (home-page "http://defunkt.io/pystache/")
2820 (synopsis "Python logic-less template engine")
2821 (description
2822 "Pystache is a Python implementation of the framework agnostic,
2823 logic-free templating system Mustache.")
2824 (license license:expat)
2825 (properties `((python2-variant . ,(delay python2-pystache))))))
2826
2827 (define-public python2-pystache
2828 (package (inherit (package-with-python2
2829 (strip-python2-variant python-pystache)))
2830 (arguments
2831 `(#:python ,python-2
2832 #:phases
2833 (modify-phases %standard-phases
2834 (replace 'check
2835 (lambda _
2836 (zero? (system* "python" "test_pystache.py")))))))))
2837
2838 (define-public python-joblib
2839 (package
2840 (name "python-joblib")
2841 (version "0.10.3")
2842 (source (origin
2843 (method url-fetch)
2844 (uri (pypi-uri "joblib" version))
2845 (sha256
2846 (base32
2847 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2848 (modules '((guix build utils)))
2849 (snippet
2850 '(begin
2851 ;; Remove pre-compiled .pyc files from source.
2852 (for-each delete-file-recursively
2853 (find-files "." "__pycache__" #:directories? #t))
2854 (for-each delete-file (find-files "." "\\.pyc$"))
2855 #t))))
2856 (build-system python-build-system)
2857 (arguments
2858 `(#:phases
2859 (modify-phases %standard-phases
2860 (add-before 'check 'disable-failing-tests
2861 (lambda _
2862 ;; This numpydoc tests fails for unknown reasons
2863 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2864 ;; This numpydoc test depends on matplotlib, which is not a
2865 ;; required input.
2866 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2867 ;; These tests fail to execute sys.executable
2868 (substitute* "joblib/test/test_parallel.py"
2869 (("import nose" line)
2870 (string-append "from nose.plugins.skip import SkipTest\n" line))
2871 (("def test_nested_parallel_warnings" line)
2872 (string-append "@SkipTest\n" line))
2873 (("def test_parallel_with_interactively_defined_functions" line)
2874 (string-append "@SkipTest\n" line)))
2875 #t)))))
2876 ;; Provide nose to enable tests command
2877 (native-inputs
2878 `(("python-nose" ,python-nose)
2879 ("python-sphinx" ,python-sphinx)
2880 ("python-docutils" ,python-docutils)
2881 ("python-numpydoc" ,python-numpydoc)))
2882 (home-page "http://pythonhosted.org/joblib/")
2883 (synopsis "Using Python functions as pipeline jobs")
2884 (description
2885 "Joblib is a set of tools to provide lightweight pipelining in Python.
2886 In particular, joblib offers: transparent disk-caching of the output values
2887 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2888 logging and tracing of the execution.")
2889 (license license:bsd-3)))
2890
2891 (define-public python2-joblib
2892 (package-with-python2 python-joblib))
2893
2894 (define-public python-docutils
2895 (package
2896 (name "python-docutils")
2897 (version "0.13.1")
2898 (source
2899 (origin
2900 (method url-fetch)
2901 (uri (pypi-uri "docutils" version))
2902 (sha256
2903 (base32
2904 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2905 (build-system python-build-system)
2906 (arguments
2907 '(#:tests? #f)) ; no setup.py test command
2908 (home-page "http://docutils.sourceforge.net/")
2909 (synopsis "Python Documentation Utilities")
2910 (description
2911 "Docutils is a modular system for processing documentation into useful
2912 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2913 reStructuredText.")
2914 ;; Most of the source code is public domain, but some source files are
2915 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2916 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2917
2918 (define-public python2-docutils
2919 (package-with-python2 python-docutils))
2920
2921 (define-public python-pygments
2922 (package
2923 (name "python-pygments")
2924 (version "2.1.3")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "Pygments" version))
2929 (sha256
2930 (base32
2931 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
2932 (build-system python-build-system)
2933 (arguments
2934 ;; FIXME: Tests require sphinx, which depends on this.
2935 '(#:tests? #f))
2936 (home-page "http://pygments.org/")
2937 (synopsis "Syntax highlighting")
2938 (description
2939 "Pygments is a syntax highlighting package written in Python.")
2940 (license license:bsd-2)))
2941
2942 (define-public python2-pygments
2943 (package-with-python2 python-pygments))
2944
2945 (define-public python-sphinx
2946 (package
2947 (name "python-sphinx")
2948 (version "1.4.8")
2949 (source
2950 (origin
2951 (method url-fetch)
2952 (uri (pypi-uri "Sphinx" version))
2953 (sha256
2954 (base32
2955 "0zvh8wwhm6gy21rr0cg42znsy4zzv2mnsxxk9gmn5y1ycn7rgbs1"))))
2956 (build-system python-build-system)
2957 (arguments
2958 ;; FIXME: Missing dependencies.
2959 '(#:tests? #f))
2960 (propagated-inputs
2961 `(("python-imagesize" ,python-imagesize)
2962 ("python-sphinx-alabaster-theme"
2963 ,python-sphinx-alabaster-theme)
2964 ("python-babel" ,python-babel)
2965 ("python-snowballstemmer" ,python-snowballstemmer)
2966 ("python-docutils" ,python-docutils)
2967 ("python-jinja2" ,python-jinja2)
2968 ("python-pygments" ,python-pygments)
2969 ("python-six" ,python-six)))
2970 (home-page "http://sphinx-doc.org/")
2971 (synopsis "Python documentation generator")
2972 (description "Sphinx is a tool that makes it easy to create documentation
2973 for Python projects or other documents consisting of multiple reStructuredText
2974 sources.")
2975 (license license:bsd-3)
2976 (properties `((python2-variant . ,(delay python2-sphinx))))))
2977
2978 (define-public python2-sphinx
2979 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2980 (package
2981 (inherit base)
2982 (native-inputs `(("python2-mock" ,python2-mock)
2983 ,@(package-native-inputs base)))
2984 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2985 ,@(package-propagated-inputs base))))))
2986
2987 (define-public python-sphinx-rtd-theme
2988 (package
2989 (name "python-sphinx-rtd-theme")
2990 (version "0.1.6")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (string-append "https://pypi.python.org/packages/source/s/"
2995 "sphinx_rtd_theme/sphinx_rtd_theme-"
2996 version ".tar.gz"))
2997 (sha256
2998 (base32
2999 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3000 (build-system python-build-system)
3001 (propagated-inputs
3002 `(("python-sphinx" ,python-sphinx)))
3003 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3004 (synopsis "ReadTheDocs.org theme for Sphinx")
3005 (description "A theme for Sphinx used by ReadTheDocs.org.")
3006 (license license:expat)))
3007
3008 (define-public python2-sphinx-rtd-theme
3009 (package-with-python2 python-sphinx-rtd-theme))
3010
3011 (define-public python-rst.linker
3012 (package
3013 (name "python-rst.linker")
3014 (version "1.7")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "rst.linker" version))
3019 (sha256
3020 (base32
3021 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3022 (build-system python-build-system)
3023 (propagated-inputs
3024 `(("python-dateutil" ,python-dateutil)
3025 ("python-six" ,python-six)))
3026 (native-inputs
3027 `(("python-setuptools-scm" ,python-setuptools-scm)))
3028 ;; Test would require path.py, which would introduce a cyclic dependence.
3029 (arguments `(#:tests? #f))
3030 ;; Note: As of version 1.7 the documentation is not worth building.
3031 (home-page "https://github.com/jaraco/rst.linker")
3032 (synopsis "Sphinx plugin to add links and timestamps")
3033 (description "rst.linker allows to automatically replace text by a
3034 reStructuredText external reference or timestamps. It's primary purpose is to
3035 augment the changelog, but it can be used for other documents, too.")
3036 (license license:expat)))
3037
3038 (define-public python2-rst.linker
3039 (package-with-python2 python-rst.linker))
3040
3041 (define-public python-feedgenerator
3042 (package
3043 (name "python-feedgenerator")
3044 (version "1.8")
3045 (source
3046 (origin
3047 (method url-fetch)
3048 (uri (pypi-uri "feedgenerator" version))
3049 (sha256
3050 (base32
3051 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3052 (modules '((guix build utils)))
3053 (snippet
3054 '(begin
3055 ;; Remove pre-compiled .pyc files from source.
3056 (for-each delete-file-recursively
3057 (find-files "." "__pycache__" #:directories? #t))
3058 (for-each delete-file (find-files "." "\\.pyc$"))
3059 #t))))
3060 (build-system python-build-system)
3061 (propagated-inputs
3062 `(("python-pytz" ,python-pytz)
3063 ("python-six" ,python-six)))
3064 (home-page "https://github.com/getpelican/feedgenerator")
3065 (synopsis
3066 "Standalone version of Django's Atom/RSS feed generator")
3067 (description
3068 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3069 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3070 (license license:bsd-3)))
3071
3072 (define-public python2-feedgenerator
3073 (package-with-python2 python-feedgenerator))
3074
3075 (define-public python-blinker
3076 (package
3077 (name "python-blinker")
3078 (version "1.4")
3079 (source
3080 (origin
3081 (method url-fetch)
3082 (uri (pypi-uri "blinker" version))
3083 (sha256
3084 (base32
3085 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3086 (build-system python-build-system)
3087 (home-page "http://pythonhosted.org/blinker/")
3088 (synopsis "Fast, simple object-to-object and broadcast signaling")
3089 (description
3090 "Blinker provides a fast dispatching system that allows any number of
3091 interested parties to subscribe to events, or \"signals\".")
3092 (license license:expat)))
3093
3094 (define-public python2-blinker
3095 (package-with-python2 python-blinker))
3096
3097 (define-public pelican
3098 (package
3099 (name "pelican")
3100 (version "3.6.3")
3101 (source
3102 (origin
3103 (method url-fetch)
3104 (uri (pypi-uri "pelican" version))
3105 (sha256
3106 (base32
3107 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3108 (build-system python-build-system)
3109 (propagated-inputs
3110 `(("python-feedgenerator" ,python-feedgenerator)
3111 ("python-jinja2" ,python-jinja2)
3112 ("python-pygments" ,python-pygments)
3113 ("python-docutils" ,python-docutils)
3114 ("python-pytz" ,python-pytz)
3115 ("python-blinker" ,python-blinker)
3116 ("python-unidecode" ,python-unidecode)
3117 ("python-six" ,python-six)
3118 ("python-dateutil" ,python-dateutil)))
3119 (home-page "http://getpelican.com/")
3120 (arguments
3121 `(;; XXX Requires a lot more packages to do unit tests :P
3122 #:tests? #f
3123 #:phases (modify-phases %standard-phases
3124 (add-before
3125 'install 'adjust-requires
3126 ;; Since feedgenerator is installed from git, it doesn't
3127 ;; conform to the version requirements.
3128 ;;
3129 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3130 ;; version requirement so setuptools doesn't get confused.
3131 (lambda _
3132 (substitute* "setup.py"
3133 (("['\"]feedgenerator.*?['\"]")
3134 "'feedgenerator'")))))))
3135 (synopsis "Python-based static site publishing system")
3136 (description
3137 "Pelican is a tool to generate a static blog from reStructuredText,
3138 Markdown input files, and more. Pelican uses Jinja2 for templating
3139 and is very extensible.")
3140 (license license:agpl3+)))
3141
3142 (define-public python-scikit-learn
3143 (package
3144 (name "python-scikit-learn")
3145 (version "0.18.1")
3146 (source
3147 (origin
3148 (method url-fetch)
3149 (uri (string-append
3150 "https://github.com/scikit-learn/scikit-learn/archive/"
3151 version ".tar.gz"))
3152 (file-name (string-append name "-" version ".tar.gz"))
3153 (sha256
3154 (base32
3155 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3156 (build-system python-build-system)
3157 (arguments
3158 `(#:phases
3159 (alist-cons-before
3160 'check 'set-HOME
3161 ;; some tests require access to "$HOME"
3162 (lambda _ (setenv "HOME" "/tmp"))
3163 %standard-phases)))
3164 (inputs
3165 `(("openblas" ,openblas)))
3166 (native-inputs
3167 `(("python-nose" ,python-nose)
3168 ("python-cython" ,python-cython)))
3169 (propagated-inputs
3170 `(("python-numpy" ,python-numpy)
3171 ("python-scipy" ,python-scipy)))
3172 (home-page "http://scikit-learn.org/")
3173 (synopsis "Machine Learning in Python")
3174 (description
3175 "Scikit-learn provides simple and efficient tools for data
3176 mining and data analysis.")
3177 (license license:bsd-3)))
3178
3179 (define-public python2-scikit-learn
3180 (package-with-python2 python-scikit-learn))
3181
3182 (define-public python-scikit-image
3183 (package
3184 (name "python-scikit-image")
3185 (version "0.11.3")
3186 (source
3187 (origin
3188 (method url-fetch)
3189 (uri (string-append
3190 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3191 version ".tar.gz"))
3192 (sha256
3193 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3194 (build-system python-build-system)
3195 (arguments
3196 ;; TODO: Some tests require running X11 server. Disable them?
3197 '(#:tests? #f))
3198 ;; See DEPENDS.txt for the list of build and run time requiremnts
3199 (propagated-inputs
3200 `(("python-matplotlib" ,python-matplotlib)
3201 ("python-networkx" ,python-networkx)
3202 ("python-scipy" ,python-scipy)
3203 ("python-pillow" ,python-pillow)))
3204 (native-inputs
3205 `(("python-numpy" ,python-numpy)
3206 ("python-cython" ,python-cython)
3207 ("python-six" ,python-six)))
3208 (home-page "http://scikit-image.org/")
3209 (synopsis "Image processing in Python")
3210 (description
3211 "Scikit-image is a collection of algorithms for image processing.")
3212 (license license:bsd-3)))
3213
3214 (define-public python2-scikit-image
3215 (package-with-python2 python-scikit-image))
3216
3217 (define-public python-redis
3218 (package
3219 (name "python-redis")
3220 (version "2.10.3")
3221 (source
3222 (origin
3223 (method url-fetch)
3224 (uri (string-append
3225 "https://pypi.python.org/packages/source/r/redis/redis-"
3226 version ".tar.gz"))
3227 (sha256
3228 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3229 (build-system python-build-system)
3230 ;; Tests require a running Redis server
3231 (arguments '(#:tests? #f))
3232 ;; As long as we are not running test, we do not need this input :-)
3233 ;;(native-inputs
3234 ;; `(("python-pytest" ,python-pytest)))
3235 (home-page "https://github.com/andymccurdy/redis-py")
3236 (synopsis "Redis Python client")
3237 (description
3238 "This package provides a Python interface to the Redis key-value store.")
3239 (license license:expat)))
3240
3241 (define-public python2-redis
3242 (package-with-python2 python-redis))
3243
3244 (define-public python-rq
3245 (package
3246 (name "python-rq")
3247 (version "0.5.2")
3248 (source
3249 (origin
3250 (method url-fetch)
3251 (uri (string-append
3252 "https://pypi.python.org/packages/source/r/rq/rq-"
3253 version ".tar.gz"))
3254 (sha256
3255 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3256 (build-system python-build-system)
3257 (propagated-inputs
3258 `(("python-click" ,python-click)
3259 ("python-redis" ,python-redis)))
3260 (home-page "http://python-rq.org/")
3261 (synopsis "Simple job queues for Python")
3262 (description
3263 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3264 processing them in the background with workers. It is backed by Redis and it
3265 is designed to have a low barrier to entry.")
3266 (license license:bsd-2)))
3267
3268 (define-public python2-rq
3269 (package-with-python2 python-rq))
3270
3271 (define-public python-cython
3272 (package
3273 (name "python-cython")
3274 (version "0.24.1")
3275 (source
3276 (origin
3277 (method url-fetch)
3278 (uri (pypi-uri "Cython" version))
3279 (sha256
3280 (base32
3281 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3282 (build-system python-build-system)
3283 ;; we need the full python package and not just the python-wrapper
3284 ;; because we need libpython3.3m.so
3285 (inputs
3286 `(("python" ,python)))
3287 (arguments
3288 `(#:phases
3289 (modify-phases %standard-phases
3290 (add-before 'check 'set-HOME
3291 ;; some tests require access to "$HOME/.cython"
3292 (lambda _ (setenv "HOME" "/tmp")))
3293 (replace 'check
3294 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3295 (home-page "http://cython.org/")
3296 (synopsis "C extensions for Python")
3297 (description "Cython is an optimising static compiler for both the Python
3298 programming language and the extended Cython programming language. It makes
3299 writing C extensions for Python as easy as Python itself.")
3300 (license license:asl2.0)
3301 (properties `((python2-variant . ,(delay python2-cython))))))
3302
3303 (define-public python2-cython
3304 (package (inherit (package-with-python2
3305 (strip-python2-variant python-cython)))
3306 (name "python2-cython")
3307 (inputs
3308 `(("python-2" ,python-2))))) ; this is not automatically changed
3309
3310 ;; The RPython toolchain currently does not support Python 3.
3311 (define-public python2-rpython
3312 (package
3313 (name "python2-rpython")
3314 (version "0.1.4")
3315 (source
3316 (origin
3317 (method url-fetch)
3318 (uri (pypi-uri "rpython" version))
3319 (sha256
3320 (base32
3321 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3322 (build-system python-build-system)
3323 (arguments `(#:python ,python-2))
3324 (native-inputs
3325 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3326 (home-page "https://rpython.readthedocs.org")
3327 (synopsis "Framework for implementing interpreters and virtual machines")
3328 (description "RPython is a translation and support framework for
3329 producing implementations of dynamic languages, emphasizing a clean separation
3330 between language specification and implementation aspects.")
3331 (license license:expat)))
3332
3333 ;; This version of numpy is missing the documentation and is only used to
3334 ;; build matplotlib which is required to build numpy's documentation.
3335 (define python-numpy-bootstrap
3336 (package
3337 (name "python-numpy-bootstrap")
3338 (version "1.10.4")
3339 (source
3340 (origin
3341 (method url-fetch)
3342 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3343 "/numpy-" version ".tar.gz"))
3344 (sha256
3345 (base32
3346 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3347 (build-system python-build-system)
3348 (inputs
3349 `(("openblas" ,openblas)
3350 ("lapack" ,lapack)))
3351 (native-inputs
3352 `(("python-nose" ,python-nose)
3353 ("gfortran" ,gfortran)))
3354 (arguments
3355 `(#:phases
3356 (modify-phases %standard-phases
3357 (add-before 'build 'set-environment-variables
3358 (lambda* (#:key inputs #:allow-other-keys)
3359 (call-with-output-file "site.cfg"
3360 (lambda (port)
3361 (format port
3362 "[openblas]
3363 libraries = openblas
3364 library_dirs = ~a/lib
3365 include_dirs = ~a/include
3366
3367 # backslash-n to make emacs happy
3368 \n[lapack]
3369 lapack_libs = lapack
3370 library_dirs = ~a/lib
3371 include_dirs = ~a/include
3372 "
3373 (assoc-ref inputs "openblas")
3374 (assoc-ref inputs "openblas")
3375 (assoc-ref inputs "lapack")
3376 (assoc-ref inputs "lapack"))))
3377 ;; Use "gcc" executable, not "cc".
3378 (substitute* "numpy/distutils/system_info.py"
3379 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3380 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3381 #t))
3382 ;; Tests can only be run after the library has been installed and not
3383 ;; within the source directory.
3384 (delete 'check)
3385 (add-after 'install 'check
3386 (lambda* (#:key outputs inputs #:allow-other-keys)
3387 ;; Make installed package available for running the tests
3388 (add-installed-pythonpath inputs outputs)
3389 (with-directory-excursion "/tmp"
3390 (zero? (system* "python" "-c"
3391 "import numpy; numpy.test(verbose=2)"))))))))
3392 (home-page "http://www.numpy.org/")
3393 (synopsis "Fundamental package for scientific computing with Python")
3394 (description "NumPy is the fundamental package for scientific computing
3395 with Python. It contains among other things: a powerful N-dimensional array
3396 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3397 and Fortran code, useful linear algebra, Fourier transform, and random number
3398 capabilities.")
3399 (license license:bsd-3)))
3400
3401 (define python2-numpy-bootstrap
3402 (package-with-python2 python-numpy-bootstrap))
3403
3404 (define-public python-munch
3405 (package
3406 (name "python-munch")
3407 (version "2.0.4")
3408 (source
3409 (origin
3410 (method url-fetch)
3411 (uri (pypi-uri "munch" version))
3412 (sha256
3413 (base32
3414 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3415 (build-system python-build-system)
3416 (home-page "https://github.com/Infinidat/munch")
3417 (synopsis "Dot-accessible dictionary")
3418 (description "Munch is a dot-accessible dictionary similar to JavaScript
3419 objects.")
3420 (license license:expat)))
3421
3422 (define-public python2-munch
3423 (package-with-python2 python-munch))
3424
3425 (define-public python2-fastlmm
3426 (package
3427 (name "python2-fastlmm")
3428 (version "0.2.26")
3429 (source
3430 (origin
3431 (method url-fetch)
3432 (uri (pypi-uri "fastlmm" version ".zip"))
3433 (sha256
3434 (base32
3435 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3436 (build-system python-build-system)
3437 (arguments
3438 `(#:python ,python-2)) ; only Python 2.7 is supported
3439 (propagated-inputs
3440 `(("python2-numpy" ,python2-numpy)
3441 ("python2-scipy" ,python2-scipy)
3442 ("python2-matplotlib" ,python2-matplotlib)
3443 ("python2-pandas" ,python2-pandas)
3444 ("python2-scikit-learn" ,python2-scikit-learn)
3445 ("python2-pysnptools" ,python2-pysnptools)))
3446 (native-inputs
3447 `(("unzip" ,unzip)
3448 ("python2-cython" ,python2-cython)
3449 ("python2-mock" ,python2-mock)
3450 ("python2-nose" ,python2-nose)))
3451 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3452 (synopsis "Perform genome-wide association studies on large data sets")
3453 (description
3454 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3455 Models, is a program for performing both single-SNP and SNP-set genome-wide
3456 association studies (GWAS) on extremely large data sets.")
3457 (license license:asl2.0)))
3458
3459 (define-public python-numpy
3460 (package (inherit python-numpy-bootstrap)
3461 (name "python-numpy")
3462 (outputs '("out" "doc"))
3463 (inputs
3464 `(("which" ,which)
3465 ,@(package-inputs python-numpy-bootstrap)))
3466 (propagated-inputs
3467 `(("python-matplotlib" ,python-matplotlib)
3468 ("python-pyparsing" ,python-pyparsing)
3469 ,@(package-propagated-inputs python-numpy-bootstrap)))
3470 (native-inputs
3471 `(("pkg-config" ,pkg-config)
3472 ("python-sphinx" ,python-sphinx)
3473 ("python-numpydoc" ,python-numpydoc)
3474 ("texlive" ,texlive)
3475 ("texinfo" ,texinfo)
3476 ("perl" ,perl)
3477 ,@(package-native-inputs python-numpy-bootstrap)))
3478 (arguments
3479 `(,@(substitute-keyword-arguments
3480 (package-arguments python-numpy-bootstrap)
3481 ((#:phases phases)
3482 `(alist-cons-after
3483 'install 'install-doc
3484 (lambda* (#:key inputs outputs #:allow-other-keys)
3485 ;; Make installed package available for building the
3486 ;; documentation
3487 (add-installed-pythonpath inputs outputs)
3488 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3489 (doc (string-append
3490 data "/doc/" ,name "-"
3491 ,(package-version python-numpy-bootstrap)))
3492 (info (string-append data "/info"))
3493 (html (string-append doc "/html"))
3494 (pyver ,(string-append "PYVER=")))
3495 (with-directory-excursion "doc"
3496 (mkdir-p html)
3497 (system* "make" "html" pyver)
3498 (system* "make" "latex" "PAPER=a4" pyver)
3499 (system* "make" "-C" "build/latex"
3500 "all-pdf" "PAPER=a4" pyver)
3501 ;; FIXME: Generation of the info file fails.
3502 ;; (system* "make" "info" pyver)
3503 ;; (mkdir-p info)
3504 ;; (copy-file "build/texinfo/numpy.info"
3505 ;; (string-append info "/numpy.info"))
3506 (for-each (lambda (file)
3507 (copy-file (string-append "build/latex" file)
3508 (string-append doc file)))
3509 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3510 (with-directory-excursion "build/html"
3511 (for-each (lambda (file)
3512 (let* ((dir (dirname file))
3513 (tgt-dir (string-append html "/" dir)))
3514 (unless (equal? "." dir)
3515 (mkdir-p tgt-dir))
3516 (install-file file html)))
3517 (find-files "." ".*"))))))
3518 ,phases)))))))
3519
3520 (define-public python2-numpy
3521 (package-with-python2 python-numpy))
3522
3523 (define-public python-pygit2
3524 (package
3525 (name "python-pygit2")
3526 (version "0.25.0")
3527 (source
3528 (origin
3529 (method url-fetch)
3530 (uri (pypi-uri "pygit2" version))
3531 (sha256
3532 (base32
3533 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))))
3534 (build-system python-build-system)
3535 (propagated-inputs
3536 `(("python-six" ,python-six)
3537 ("python-cffi" ,python-cffi)
3538 ("libgit2" ,libgit2)
3539 ("python-tox" ,python-tox)))
3540 (home-page "https://github.com/libgit2/pygit2")
3541 (synopsis "Python bindings for libgit2")
3542 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3543 library, libgit2 implements Git plumbing.")
3544 ;; GPL2.0 only, with linking exception.
3545 (license license:gpl2)))
3546
3547 (define-public python2-pygit2
3548 (package-with-python2 python-pygit2))
3549
3550 (define-public python-pyparsing
3551 (package
3552 (name "python-pyparsing")
3553 (version "2.0.3")
3554 (source
3555 (origin
3556 (method url-fetch)
3557 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3558 "/pyparsing-" version
3559 "/pyparsing-" version ".tar.gz"))
3560 (sha256
3561 (base32
3562 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3563 (build-system python-build-system)
3564 (outputs '("out" "doc"))
3565 (arguments
3566 `(#:tests? #f ; no test target
3567 #:modules ((guix build python-build-system)
3568 (guix build utils))
3569 #:phases
3570 (alist-cons-after
3571 'install 'install-doc
3572 (lambda* (#:key outputs #:allow-other-keys)
3573 (let* ((doc (string-append (assoc-ref outputs "doc")
3574 "/share/doc/" ,name "-" ,version))
3575 (html-doc (string-append doc "/html"))
3576 (examples (string-append doc "/examples")))
3577 (mkdir-p html-doc)
3578 (mkdir-p examples)
3579 (for-each
3580 (lambda (dir tgt)
3581 (map (lambda (file)
3582 (install-file file tgt))
3583 (find-files dir ".*")))
3584 (list "docs" "htmldoc" "examples")
3585 (list doc html-doc examples))))
3586 %standard-phases)))
3587 (home-page "http://pyparsing.wikispaces.com")
3588 (synopsis "Python parsing class library")
3589 (description
3590 "The pyparsing module is an alternative approach to creating and
3591 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3592 of regular expressions. The pyparsing module provides a library of classes
3593 that client code uses to construct the grammar directly in Python code.")
3594 (license license:expat)))
3595
3596 (define-public python2-pyparsing
3597 (package-with-python2 python-pyparsing))
3598
3599 (define-public python-numpydoc
3600 (package
3601 (name "python-numpydoc")
3602 (version "0.5")
3603 (source
3604 (origin
3605 (method url-fetch)
3606 (uri (string-append
3607 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3608 version ".tar.gz"))
3609 (sha256
3610 (base32
3611 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3612 (modules '((guix build utils)))
3613 (snippet
3614 '(begin
3615 ;; Drop a test requiring matplotlib, which we cannot add as an
3616 ;; input since it would create a circular dependency: Extend the
3617 ;; test for Python 3, where it is already dropped, to Python 2.
3618 (substitute* "numpydoc/tests/test_plot_directive.py"
3619 (("3") "2"))))))
3620 (build-system python-build-system)
3621 (propagated-inputs
3622 `(("python-sphinx" ,python-sphinx)))
3623 (native-inputs
3624 `(("python-nose" ,python-nose)))
3625 (home-page "https://pypi.python.org/pypi/numpydoc")
3626 (synopsis
3627 "Numpy's Sphinx extensions")
3628 (description
3629 "Sphinx extension to support docstrings in Numpy format.")
3630 (license license:bsd-2)))
3631
3632 (define-public python2-numpydoc
3633 (package-with-python2 python-numpydoc))
3634
3635 (define-public python-numexpr
3636 (package
3637 (name "python-numexpr")
3638 (version "2.6.1")
3639 (source
3640 (origin
3641 (method url-fetch)
3642 (uri (pypi-uri "numexpr" version))
3643 (sha256
3644 (base32
3645 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3646 (build-system python-build-system)
3647 (arguments `(#:tests? #f)) ; no tests included
3648 (propagated-inputs
3649 `(("python-numpy" ,python-numpy)))
3650 (home-page "https://github.com/pydata/numexpr")
3651 (synopsis "Fast numerical expression evaluator for NumPy")
3652 (description
3653 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3654 expressions that operate on arrays are accelerated and use less memory than
3655 doing the same calculation in Python. In addition, its multi-threaded
3656 capabilities can make use of all your cores, which may accelerate
3657 computations, most specially if they are not memory-bounded (e.g. those using
3658 transcendental functions).")
3659 (license license:expat)))
3660
3661 (define-public python2-numexpr
3662 (package-with-python2 python-numexpr))
3663
3664 (define-public python-matplotlib
3665 (package
3666 (name "python-matplotlib")
3667 (version "1.4.3")
3668 (source
3669 (origin
3670 (method url-fetch)
3671 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3672 "/matplotlib-" version
3673 "/matplotlib-" version ".tar.gz"))
3674 (sha256
3675 (base32
3676 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3677 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3678 (build-system python-build-system)
3679 (outputs '("out" "doc"))
3680 (propagated-inputs ; the following packages are all needed at run time
3681 `(("python-pyparsing" ,python-pyparsing)
3682 ("python-pygobject" ,python-pygobject)
3683 ("gobject-introspection" ,gobject-introspection)
3684 ("python-tkinter" ,python "tk")
3685 ("python-dateutil" ,python-dateutil)
3686 ("python-numpy" ,python-numpy-bootstrap)
3687 ("python-pillow" ,python-pillow)
3688 ("python-pytz" ,python-pytz)
3689 ("python-six" ,python-six)
3690 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3691 ;; from 'gtk+') provides the required 'typelib' files used by
3692 ;; 'gobject-introspection'. The location of these files is set with the
3693 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3694 ;; is done automatically by a 'native-search-path' procedure. However,
3695 ;; at run-time the user must set this variable as follows:
3696 ;;
3697 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3698 ("gtk+" ,gtk+)
3699 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3700 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3701 ;; object. For this reason we need to import both libraries.
3702 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3703 ("python-pycairo" ,python-pycairo)
3704 ("python-cairocffi" ,python-cairocffi)))
3705 (inputs
3706 `(("libpng" ,libpng)
3707 ("imagemagick" ,imagemagick)
3708 ("freetype" ,freetype)
3709 ("cairo" ,cairo)
3710 ("glib" ,glib)
3711 ;; FIXME: Add backends when available.
3712 ;("python-wxpython" ,python-wxpython)
3713 ;("python-pyqt" ,python-pyqt)
3714 ("tcl" ,tcl)
3715 ("tk" ,tk)))
3716 (native-inputs
3717 `(("pkg-config" ,pkg-config)
3718 ("python-sphinx" ,python-sphinx)
3719 ("python-numpydoc" ,python-numpydoc)
3720 ("python-nose" ,python-nose)
3721 ("python-mock" ,python-mock)
3722 ("texlive" ,texlive)
3723 ("texinfo" ,texinfo)))
3724 (arguments
3725 `(#:phases
3726 (modify-phases %standard-phases
3727 (add-before 'build 'configure-environment
3728 (lambda* (#:key outputs inputs #:allow-other-keys)
3729 (let ((cairo (assoc-ref inputs "cairo"))
3730 (gtk+ (assoc-ref inputs "gtk+")))
3731 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3732 ;; has not effect.
3733 (setenv "LD_LIBRARY_PATH"
3734 (string-append cairo "/lib:" gtk+ "/lib"))
3735 (setenv "HOME" (getcwd))
3736 (call-with-output-file "setup.cfg"
3737 (lambda (port)
3738 (format port "[directories]~%
3739 basedirlist = ~a,~a~%
3740 [rc_options]~%
3741 backend = TkAgg~%"
3742 (assoc-ref inputs "tcl")
3743 (assoc-ref inputs "tk"))))
3744 #t)))
3745 (add-after 'install 'install-doc
3746 (lambda* (#:key inputs outputs #:allow-other-keys)
3747 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3748 (doc (string-append data "/doc/" ,name "-" ,version))
3749 (info (string-append data "/info"))
3750 (html (string-append doc "/html")))
3751 ;; Make installed package available for building the
3752 ;; documentation
3753 (add-installed-pythonpath inputs outputs)
3754 (with-directory-excursion "doc"
3755 ;; Produce pdf in 'A4' format.
3756 (substitute* (find-files "." "conf\\.py")
3757 (("latex_paper_size = 'letter'")
3758 "latex_paper_size = 'a4'"))
3759 (substitute* "users/intro.rst"
3760 ;; Fix reST markup error (see <https://github.com/sphinx-doc/sphinx/issues/3044>)
3761 (("[[][*][]]") "[#]"))
3762 (mkdir-p html)
3763 (mkdir-p info)
3764 ;; The doc recommends to run the 'html' target twice.
3765 (system* "python" "make.py" "html")
3766 (system* "python" "make.py" "html")
3767 (copy-recursively "build/html" html)
3768 (system* "python" "make.py" "latex")
3769 (system* "python" "make.py" "texinfo")
3770 (symlink (string-append html "/_images")
3771 (string-append info "/matplotlib-figures"))
3772 (with-directory-excursion "build/texinfo"
3773 (substitute* "matplotlib.texi"
3774 (("@image\\{([^,]*)" all file)
3775 (string-append "@image{matplotlib-figures/" file)))
3776 (symlink (string-append html "/_images")
3777 "./matplotlib-figures")
3778 (system* "makeinfo" "--no-split"
3779 "-o" "matplotlib.info" "matplotlib.texi"))
3780 (copy-file "build/texinfo/matplotlib.info"
3781 (string-append info "/matplotlib.info"))
3782 (copy-file "build/latex/Matplotlib.pdf"
3783 (string-append doc "/Matplotlib.pdf")))
3784 #t))))))
3785 (home-page "http://matplotlib.org")
3786 (synopsis "2D plotting library for Python")
3787 (description
3788 "Matplotlib is a Python 2D plotting library which produces publication
3789 quality figures in a variety of hardcopy formats and interactive environments
3790 across platforms. Matplotlib can be used in Python scripts, the python and
3791 ipython shell, web application servers, and six graphical user interface
3792 toolkits.")
3793 (license license:psfl)
3794 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3795
3796 (define-public python2-matplotlib
3797 (let ((matplotlib (package-with-python2
3798 (strip-python2-variant python-matplotlib))))
3799 (package (inherit matplotlib)
3800 ;; Make sure to use special packages for Python 2 instead
3801 ;; of those automatically rewritten by package-with-python2.
3802 (propagated-inputs
3803 `(("python2-pycairo" ,python2-pycairo)
3804 ("python2-pygobject-2" ,python2-pygobject-2)
3805 ("python2-tkinter" ,python-2 "tk")
3806 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3807 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3808
3809 (define-public python2-pysnptools
3810 (package
3811 (name "python2-pysnptools")
3812 (version "0.3.9")
3813 (source
3814 (origin
3815 (method url-fetch)
3816 (uri (pypi-uri "pysnptools" version ".zip"))
3817 (sha256
3818 (base32
3819 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3820 (build-system python-build-system)
3821 (arguments
3822 `(#:python ,python-2)) ; only Python 2.7 is supported
3823 (propagated-inputs
3824 `(("python2-numpy" ,python2-numpy)
3825 ("python2-scipy" ,python2-scipy)
3826 ("python2-pandas" ,python2-pandas)))
3827 (native-inputs
3828 `(("python2-cython" ,python2-cython)))
3829 (native-inputs
3830 `(("unzip" ,unzip)))
3831 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3832 (synopsis "Library for reading and manipulating genetic data")
3833 (description
3834 "PySnpTools is a library for reading and manipulating genetic data. It
3835 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3836 those files. It can also efficiently manipulate ranges of integers using set
3837 operators such as union, intersection, and difference.")
3838 (license license:asl2.0)))
3839
3840 (define-public python-rpy2
3841 (package
3842 (name "python-rpy2")
3843 (version "2.7.6")
3844 (source
3845 (origin
3846 (method url-fetch)
3847 (uri (pypi-uri "rpy2" version))
3848 (sha256
3849 (base32
3850 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3851 (build-system python-build-system)
3852 (arguments
3853 '(#:phases
3854 (modify-phases %standard-phases
3855 (delete 'check)
3856 (add-after 'install 'check
3857 (lambda* (#:key outputs inputs #:allow-other-keys)
3858 ;; It's easier to run tests after install.
3859 ;; Make installed package available for running the tests
3860 (add-installed-pythonpath inputs outputs)
3861 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
3862 (propagated-inputs
3863 `(("python-six" ,python-six)))
3864 (inputs
3865 `(("readline" ,readline)
3866 ("icu4c" ,icu4c)
3867 ("pcre" ,pcre)
3868 ("r" ,r)))
3869 (native-inputs
3870 `(("zlib" ,zlib)))
3871 (home-page "http://rpy.sourceforge.net/")
3872 (synopsis "Python interface to the R language")
3873 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3874 low-level interface to R from Python, a proposed high-level interface,
3875 including wrappers to graphical libraries, as well as R-like structures and
3876 functions.")
3877 (license license:gpl3+)))
3878
3879 (define-public python2-rpy2
3880 (let ((rpy2 (package-with-python2 python-rpy2)))
3881 (package (inherit rpy2)
3882 (native-inputs
3883 `(("python2-singledispatch" ,python2-singledispatch)
3884 ,@(package-native-inputs rpy2))))))
3885
3886 (define-public python-scipy
3887 (package
3888 (name "python-scipy")
3889 (version "0.16.0")
3890 (source
3891 (origin
3892 (method url-fetch)
3893 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3894 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3895 "/scipy-" version ".tar.xz"))
3896 (sha256
3897 (base32
3898 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3899 (build-system python-build-system)
3900 (propagated-inputs
3901 `(("python-numpy" ,python-numpy)
3902 ("python-matplotlib" ,python-matplotlib)
3903 ("python-pyparsing" ,python-pyparsing)))
3904 (inputs
3905 `(("lapack" ,lapack)
3906 ("openblas" ,openblas)))
3907 (native-inputs
3908 `(("python-nose" ,python-nose)
3909 ("python-sphinx" ,python-sphinx)
3910 ("python-numpydoc" ,python-numpydoc)
3911 ("gfortran" ,gfortran)
3912 ("texlive" ,texlive)
3913 ("perl" ,perl)))
3914 (outputs '("out" "doc"))
3915 (arguments
3916 `(#:phases
3917 (alist-cons-before
3918 'build 'configure-openblas
3919 (lambda* (#:key inputs #:allow-other-keys)
3920 (call-with-output-file "site.cfg"
3921 (lambda (port)
3922 (format port
3923 "[blas]
3924 libraries = openblas
3925 library_dirs = ~a/lib
3926 include_dirs = ~a/include
3927
3928 # backslash-n to make emacs happy
3929 \n[atlas]
3930 library_dirs = ~a/lib
3931 atlas_libs = openblas
3932 "
3933 (assoc-ref inputs "openblas")
3934 (assoc-ref inputs "openblas")
3935 (assoc-ref inputs "openblas"))))
3936 #t)
3937 (alist-cons-after
3938 'install 'install-doc
3939 (lambda* (#:key inputs outputs #:allow-other-keys)
3940 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3941 (doc (string-append data "/doc/" ,name "-" ,version))
3942 (html (string-append doc "/html"))
3943 (pyver ,(string-append "PYVER=")))
3944 ;; Make installed package available for building the
3945 ;; documentation
3946 (add-installed-pythonpath inputs outputs)
3947 (with-directory-excursion "doc"
3948 ;; Fix generation of images for mathematical expressions.
3949 (substitute* (find-files "source" "conf\\.py")
3950 (("pngmath_use_preview = True")
3951 "pngmath_use_preview = False"))
3952 (mkdir-p html)
3953 (system* "make" "html" pyver)
3954 (system* "make" "latex" "PAPER=a4" pyver)
3955 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3956 (copy-file "build/latex/scipy-ref.pdf"
3957 (string-append doc "/scipy-ref.pdf"))
3958 (with-directory-excursion "build/html"
3959 (for-each (lambda (file)
3960 (let* ((dir (dirname file))
3961 (tgt-dir (string-append html "/" dir)))
3962 (install-file file html)))
3963 (find-files "." ".*"))))))
3964 ;; Tests can only be run after the library has been installed and not
3965 ;; within the source directory.
3966 (alist-cons-after
3967 'install 'check
3968 (lambda _
3969 (with-directory-excursion "/tmp"
3970 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3971 (alist-delete
3972 'check
3973 (alist-cons-after
3974 'unpack 'fix-tests
3975 (lambda _
3976 (substitute* "scipy/integrate/tests/test_quadpack.py"
3977 (("libm.so") "libm.so.6"))
3978 #t)
3979 %standard-phases)))))))
3980 (home-page "http://www.scipy.org/")
3981 (synopsis "The Scipy library provides efficient numerical routines")
3982 (description "The SciPy library is one of the core packages that make up
3983 the SciPy stack. It provides many user-friendly and efficient numerical
3984 routines such as routines for numerical integration and optimization.")
3985 (license license:bsd-3)))
3986
3987 (define-public python2-scipy
3988 (package-with-python2 python-scipy))
3989
3990 (define-public python-socksipy-branch
3991 (package
3992 (name "python-socksipy-branch")
3993 (version "1.01")
3994 (source
3995 (origin
3996 (method url-fetch)
3997 (uri (pypi-uri "SocksiPy-branch" version))
3998 (sha256
3999 (base32
4000 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4001 (build-system python-build-system)
4002 (arguments
4003 `(#:tests? #f)) ; There are no tests
4004 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4005 (synopsis "Python SOCKS module")
4006 (description
4007 "SocksiPy - A Python SOCKS client module. It provides a
4008 socket-like interface that supports connections to any TCP
4009 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4010 The original version was developed by Dan Haim, this is a
4011 branch created by Mario Vilas to address some open issues,
4012 as the original project seems to have been abandoned circa 2007.")
4013 (license license:bsd-3)))
4014
4015 (define-public python2-socksipy-branch
4016 (package-with-python2 python-socksipy-branch))
4017
4018 (define-public python-sqlalchemy
4019 (package
4020 (name "python-sqlalchemy")
4021 (version "1.0.12")
4022 (source
4023 (origin
4024 (method url-fetch)
4025 (uri (string-append "https://pypi.python.org/packages/source/S/"
4026 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4027 (sha256
4028 (base32
4029 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4030 (build-system python-build-system)
4031 (native-inputs
4032 `(("python-cython" ,python-cython) ;for c extensions
4033 ("python-pytest" ,python-pytest)
4034 ("python-mock" ,python-mock))) ;for tests
4035 (arguments
4036 `(#:phases (alist-replace
4037 'check
4038 (lambda _ (zero? (system* "py.test")))
4039 %standard-phases)))
4040 (home-page "http://www.sqlalchemy.org")
4041 (synopsis "Database abstraction library")
4042 (description
4043 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4044 gives application developers the full power and flexibility of SQL. It
4045 provides a full suite of well known enterprise-level persistence patterns,
4046 designed for efficient and high-performing database access, adapted into a
4047 simple and Pythonic domain language.")
4048 (license license:x11)))
4049
4050 (define-public python2-sqlalchemy
4051 (package-with-python2 python-sqlalchemy))
4052
4053 (define-public python-pycodestyle
4054 (package
4055 (name "python-pycodestyle")
4056 (version "2.0.0")
4057 (source
4058 (origin
4059 (method url-fetch)
4060 (uri (pypi-uri "pycodestyle" version))
4061 (sha256
4062 (base32
4063 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4064 (build-system python-build-system)
4065 (home-page "https://pycodestyle.readthedocs.io/")
4066 (synopsis "Python style guide checker")
4067 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4068 Python code against some of the style conventions in
4069 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4070 (license license:expat)))
4071
4072 (define-public python2-pycodestyle
4073 (package-with-python2 python-pycodestyle))
4074
4075 (define-public python-orderedmultidict
4076 (package
4077 (name "python-orderedmultidict")
4078 (version "0.7.10")
4079 (source
4080 (origin
4081 (method url-fetch)
4082 (uri (pypi-uri "orderedmultidict" version))
4083 (sha256
4084 (base32
4085 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
4086 (build-system python-build-system)
4087 (arguments
4088 `(#:phases
4089 (modify-phases %standard-phases
4090 (add-after 'unpack 'fix-tests
4091 (lambda _
4092 ;; The package uses nosetest for running the tests.
4093 ;; Adding this initfile allows to run the test suite
4094 ;; without requiring nosetest.
4095 (zero? (system* "touch" "tests/__init__.py")))))))
4096 (propagated-inputs
4097 `(("python-six" ,python-six)))
4098 (native-inputs
4099 `(("python-pycodestyle" ,python-pycodestyle)))
4100 (home-page "https://github.com/gruns/orderedmultidict")
4101 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4102 (description "This package contains a library for ordered multivalue
4103 dictionaries. A multivalue dictionary is a dictionary that can store
4104 multiple values for the same key. An ordered multivalue dictionary is a
4105 multivalue dictionary that retains the order of insertions and deletions.")
4106 (license license:unlicense)))
4107
4108 (define-public python2-orderedmultidict
4109 (package-with-python2 python-orderedmultidict))
4110
4111 (define-public python-furl
4112 (package
4113 (name "python-furl")
4114 (version "0.5.6")
4115 (source
4116 (origin
4117 (method url-fetch)
4118 (uri (pypi-uri "furl" version))
4119 (sha256
4120 (base32
4121 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4122 (build-system python-build-system)
4123 (propagated-inputs
4124 `(("python-six" ,python-six)
4125 ("python-orderedmultidict" ,python-orderedmultidict)))
4126 (native-inputs
4127 `(("python-pycodestyle" ,python-pycodestyle)))
4128 (home-page "https://github.com/gruns/furl")
4129 (synopsis "URL manipulation in Python")
4130 (description "Furl provides an easy-to-use alternative to the
4131 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4132 (license license:unlicense)))
4133
4134 (define-public python2-furl
4135 (package-with-python2 python-furl))
4136
4137 (define-public python-flask-babel
4138 (package
4139 (name "python-flask-babel")
4140 (version "0.11.1")
4141 (source
4142 (origin
4143 (method url-fetch)
4144 (uri (pypi-uri "Flask-Babel" version))
4145 (sha256
4146 (base32
4147 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4148 (build-system python-build-system)
4149 (propagated-inputs
4150 `(("python-flask" ,python-flask)
4151 ("python-babel" ,python-babel)
4152 ("python-jinja2" ,python-jinja2)
4153 ("python-pytz" ,python-pytz)))
4154 (home-page "https://github.com/python-babel/flask-babel")
4155 (synopsis "Add i18n/l10n support to Flask applications")
4156 (description "This package implements internationalization and localization
4157 support for Flask. This is based on the Python babel module as well as pytz -
4158 both of which are installed automatically if you install this library.")
4159 (license license:bsd-3)))
4160
4161 (define-public python2-flask-babel
4162 (package-with-python2 python-flask-babel))
4163
4164 (define-public python-sqlalchemy-utils
4165 (package
4166 (name "python-sqlalchemy-utils")
4167 (version "0.32.11")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (pypi-uri "SQLAlchemy-Utils" version))
4172 (sha256
4173 (base32
4174 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4175 (build-system python-build-system)
4176 (arguments
4177 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4178 ;; #:phases
4179 ;; (modify-phases %standard-phases
4180 ;; (replace 'check
4181 ;; (lambda _
4182 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4183 (propagated-inputs
4184 `(("python-six" ,python-six)
4185 ("python-sqlalchemy" ,python-sqlalchemy)))
4186 (native-inputs
4187 `(("python-dateutil" ,python-dateutil)
4188 ("python-flexmock" ,python-flexmock)
4189 ("python-psycopg2" ,python-psycopg2)
4190 ("python-pytest" ,python-pytest)
4191 ("python-pytz" ,python-pytz)))
4192 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4193 (synopsis "Various utility functions for SQLAlchemy")
4194 (description
4195 "SQLAlchemy-utils provides various utility functions and custom data types
4196 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4197
4198 You might also want to install the following optional dependencies:
4199 @enumerate
4200 @item @code{python-passlib}
4201 @item @code{python-babel}
4202 @item @code{python-cryptography}
4203 @item @code{python-pytz}
4204 @item @code{python-psycopg2}
4205 @item @code{python-furl}
4206 @item @code{python-flask-babel}
4207 @end enumerate
4208 ")
4209 (license license:bsd-3)))
4210
4211 (define-public python2-sqlalchemy-utils
4212 (package-with-python2 python-sqlalchemy-utils))
4213
4214 (define-public python-alembic
4215 (package
4216 (name "python-alembic")
4217 (version "0.8.7")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (pypi-uri "alembic" version))
4222 (sha256
4223 (base32
4224 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
4225 (build-system python-build-system)
4226 (native-inputs
4227 `(("python-mock" ,python-mock)
4228 ("python-pytest-cov" ,python-pytest-cov)))
4229 (propagated-inputs
4230 `(("python-sqlalchemy" ,python-sqlalchemy)
4231 ("python-mako" ,python-mako)
4232 ("python-editor" ,python-editor)))
4233 (home-page "http://bitbucket.org/zzzeek/alembic")
4234 (synopsis
4235 "Database migration tool for SQLAlchemy")
4236 (description
4237 "Alembic is a lightweight database migration tool for usage with the
4238 SQLAlchemy Database Toolkit for Python.")
4239 (license license:expat)))
4240
4241 (define-public python2-alembic
4242 (package-with-python2 python-alembic))
4243
4244 (define-public python-distutils-extra
4245 (package
4246 (name "python-distutils-extra")
4247 (version "2.38")
4248 (source
4249 (origin
4250 (method url-fetch)
4251 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4252 version "/+download/python-distutils-extra-"
4253 version ".tar.gz"))
4254 (sha256
4255 (base32
4256 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4257 (build-system python-build-system)
4258 (home-page "https://launchpad.net/python-distutils-extra/")
4259 (synopsis "Enhancements to Python's distutils")
4260 (description
4261 "The python-distutils-extra module enables you to easily integrate
4262 gettext support, themed icons, and scrollkeeper-based documentation into
4263 Python's distutils.")
4264 (license license:gpl2)))
4265
4266 (define-public python2-distutils-extra
4267 (package-with-python2 python-distutils-extra))
4268
4269 (define-public python2-elib.intl
4270 (package
4271 (name "python2-elib.intl")
4272 (version "0.0.3")
4273 (source
4274 (origin
4275 ;; This project doesn't tag releases or publish tarballs, so we take
4276 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4277 (method git-fetch)
4278 (uri (git-reference
4279 (url "https://github.com/dieterv/elib.intl.git")
4280 (commit "d09997cfef")))
4281 (sha256
4282 (base32
4283 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4284 (build-system python-build-system)
4285 (arguments
4286 ;; incompatible with Python 3 (exception syntax)
4287 `(#:python ,python-2
4288 #:tests? #f))
4289 (home-page "https://github.com/dieterv/elib.intl")
4290 (synopsis "Enhanced internationalization for Python")
4291 (description
4292 "The elib.intl module provides enhanced internationalization (I18N)
4293 services for your Python modules and applications.")
4294 (license license:lgpl3+)))
4295
4296 (define-public python-pillow
4297 (package
4298 (name "python-pillow")
4299 (version "3.3.3")
4300 (source
4301 (origin
4302 (method url-fetch)
4303 (uri (pypi-uri "Pillow" version))
4304 (sha256
4305 (base32
4306 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4307 (build-system python-build-system)
4308 (native-inputs
4309 `(("python-nose" ,python-nose)))
4310 (inputs
4311 `(("freetype" ,freetype)
4312 ("lcms" ,lcms)
4313 ("zlib" ,zlib)
4314 ("libjpeg" ,libjpeg)
4315 ("openjpeg" ,openjpeg)
4316 ("libtiff" ,libtiff)
4317 ("libwebp" ,libwebp)))
4318 (arguments
4319 `(#:phases (modify-phases %standard-phases
4320 (add-after
4321 'install 'check-installed
4322 (lambda* (#:key outputs inputs #:allow-other-keys)
4323 (begin
4324 (setenv "HOME" (getcwd))
4325 ;; Make installed package available for running the
4326 ;; tests
4327 (add-installed-pythonpath inputs outputs)
4328 (and (zero? (system* "python" "selftest.py"
4329 "--installed"))
4330 (zero? (system* "python" "test-installed.py"))))))
4331 (delete 'check))))
4332 (home-page "https://pypi.python.org/pypi/Pillow")
4333 (synopsis "Fork of the Python Imaging Library")
4334 (description
4335 "The Python Imaging Library adds image processing capabilities to your
4336 Python interpreter. This library provides extensive file format support, an
4337 efficient internal representation, and fairly powerful image processing
4338 capabilities. The core image library is designed for fast access to data
4339 stored in a few basic pixel formats. It should provide a solid foundation for
4340 a general image processing tool.")
4341 (license (license:x11-style
4342 "http://www.pythonware.com/products/pil/license.htm"
4343 "The PIL Software License"))))
4344
4345 (define-public python2-pillow
4346 (package-with-python2 python-pillow))
4347
4348 (define-public python-pycparser
4349 (package
4350 (name "python-pycparser")
4351 (version "2.17")
4352 (source
4353 (origin
4354 (method url-fetch)
4355 (uri (pypi-uri "pycparser" version))
4356 (sha256
4357 (base32
4358 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4359 (outputs '("out" "doc"))
4360 (build-system python-build-system)
4361 (native-inputs
4362 `(("pkg-config" ,pkg-config)))
4363 (arguments
4364 `(#:phases
4365 (modify-phases %standard-phases
4366 (replace 'check
4367 (lambda _
4368 (with-directory-excursion "tests"
4369 (zero? (system* "python" "all_tests.py")))))
4370 (add-after 'install 'install-doc
4371 (lambda* (#:key outputs #:allow-other-keys)
4372 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4373 (doc (string-append data "/doc/" ,name "-" ,version))
4374 (examples (string-append doc "/examples")))
4375 (mkdir-p examples)
4376 (for-each (lambda (file)
4377 (copy-file (string-append "." file)
4378 (string-append doc file)))
4379 '("/README.rst" "/CHANGES" "/LICENSE"))
4380 (copy-recursively "examples" examples)))))))
4381 (home-page "https://github.com/eliben/pycparser")
4382 (synopsis "C parser in Python")
4383 (description
4384 "Pycparser is a complete parser of the C language, written in pure Python
4385 using the PLY parsing library. It parses C code into an AST and can serve as
4386 a front-end for C compilers or analysis tools.")
4387 (license license:bsd-3)))
4388
4389 (define-public python2-pycparser
4390 (package-with-python2 python-pycparser))
4391
4392 (define-public python-cffi
4393 (package
4394 (name "python-cffi")
4395 (version "1.4.2")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "cffi" version))
4400 (sha256
4401 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4402 (build-system python-build-system)
4403 (outputs '("out" "doc"))
4404 (inputs
4405 `(("libffi" ,libffi)))
4406 (propagated-inputs ; required at run-time
4407 `(("python-pycparser" ,python-pycparser)))
4408 (native-inputs
4409 `(("pkg-config" ,pkg-config)
4410 ("python-sphinx" ,python-sphinx)
4411 ("python-pytest" ,python-pytest)))
4412 (arguments
4413 `(#:phases
4414 (alist-cons-after
4415 'install 'install-doc
4416 (lambda* (#:key outputs #:allow-other-keys)
4417 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4418 (doc (string-append data "/doc/" ,name "-" ,version))
4419 (html (string-append doc "/html")))
4420 (with-directory-excursion "doc"
4421 (system* "make" "html")
4422 (mkdir-p html)
4423 (copy-recursively "build/html" html))
4424 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4425 %standard-phases)))
4426 (home-page "http://cffi.readthedocs.org")
4427 (synopsis "Foreign function interface for Python")
4428 (description
4429 "Foreign Function Interface for Python calling C code.")
4430 (license license:expat)))
4431
4432 (define-public python2-cffi
4433 (package-with-python2 python-cffi))
4434
4435 (define-public python-xcffib
4436 (package
4437 (name "python-xcffib")
4438 (version "0.1.9")
4439 (source
4440 (origin
4441 (method url-fetch)
4442 (uri (string-append "https://pypi.python.org/packages/source/x/"
4443 "xcffib/xcffib-" version ".tar.gz"))
4444 (sha256
4445 (base32
4446 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4447 (build-system python-build-system)
4448 (inputs
4449 `(("libxcb" ,libxcb)))
4450 (propagated-inputs
4451 `(("python-cffi" ,python-cffi) ; used at run time
4452 ("python-six" ,python-six)))
4453 (arguments
4454 `(;; FIXME: Tests cannot load libxcb.so.1
4455 #:tests? #f
4456 #:phases
4457 (modify-phases %standard-phases
4458 (add-after 'install 'install-doc
4459 (lambda* (#:key outputs #:allow-other-keys)
4460 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4461 "/doc/" ,name "-" ,version)))
4462 (mkdir-p doc)
4463 (copy-file "README.md"
4464 (string-append doc "/README.md"))
4465 #t))))))
4466 (home-page "https://github.com/tych0/xcffib")
4467 (synopsis "XCB Python bindings")
4468 (description
4469 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4470 support for Python 3 and PyPy. It is based on cffi.")
4471 (license license:expat)))
4472
4473 (define-public python2-xcffib
4474 (package-with-python2 python-xcffib))
4475
4476 (define-public python-cairocffi
4477 (package
4478 (name "python-cairocffi")
4479 (version "0.6")
4480 (source
4481 (origin
4482 (method url-fetch)
4483 ;; The archive on pypi is missing the 'utils' directory!
4484 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4485 version ".tar.gz"))
4486 (file-name (string-append name "-" version ".tar.gz"))
4487 (sha256
4488 (base32
4489 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4490 (build-system python-build-system)
4491 (outputs '("out" "doc"))
4492 (inputs
4493 `(("gdk-pixbuf" ,gdk-pixbuf)
4494 ("cairo" ,cairo)))
4495 (native-inputs
4496 `(("pkg-config" ,pkg-config)
4497 ("python-sphinx" ,python-sphinx)
4498 ("python-docutils" ,python-docutils)))
4499 (propagated-inputs
4500 `(("python-xcffib" ,python-xcffib))) ; used at run time
4501 (arguments
4502 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4503 #:tests? #f
4504 #:phases
4505 (modify-phases %standard-phases
4506 (add-after 'install 'install-doc
4507 (lambda* (#:key inputs outputs #:allow-other-keys)
4508 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4509 (doc (string-append data "/doc/" ,name "-" ,version))
4510 (html (string-append doc "/html")))
4511 (setenv "LD_LIBRARY_PATH"
4512 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4513 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4514 (setenv "LANG" "en_US.UTF-8")
4515 (mkdir-p html)
4516 (for-each (lambda (file)
4517 (copy-file (string-append "." file)
4518 (string-append doc file)))
4519 '("/README.rst" "/CHANGES" "/LICENSE"))
4520 (system* "python" "setup.py" "build_sphinx")
4521 (copy-recursively "docs/_build/html" html)
4522 #t))))))
4523 (home-page "https://github.com/SimonSapin/cairocffi")
4524 (synopsis "Python bindings and object-oriented API for Cairo")
4525 (description
4526 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4527 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4528 graphics library with support for multiple backends including image buffers,
4529 PNG, PostScript, PDF, and SVG file output.")
4530 (license license:bsd-3)))
4531
4532 (define-public python2-cairocffi
4533 (package-with-python2 python-cairocffi))
4534
4535 (define-public python-decorator
4536 (package
4537 (name "python-decorator")
4538 (version "4.0.10")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (pypi-uri "decorator" version))
4543 (sha256
4544 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4545 (build-system python-build-system)
4546 (arguments '(#:tests? #f)) ; no test target
4547 (home-page "https://pypi.python.org/pypi/decorator/")
4548 (synopsis "Python module to simplify usage of decorators")
4549 (description
4550 "The aim of the decorator module is to simplify the usage of decorators
4551 for the average programmer, and to popularize decorators usage giving examples
4552 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4553 etc. The core of this module is a decorator factory.")
4554 (license license:expat)))
4555
4556 (define-public python2-decorator
4557 (package-with-python2 python-decorator))
4558
4559 (define-public python-drmaa
4560 (package
4561 (name "python-drmaa")
4562 (version "0.7.6")
4563 (source
4564 (origin
4565 (method url-fetch)
4566 (uri (string-append
4567 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4568 version ".tar.gz"))
4569 (sha256
4570 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4571 (build-system python-build-system)
4572 ;; The test suite requires libdrmaa which is provided by the cluster
4573 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4574 ;; should be set to the path of the libdrmaa library.
4575 (arguments '(#:tests? #f))
4576 (native-inputs
4577 `(("python-nose" ,python-nose)))
4578 (home-page "https://pypi.python.org/pypi/drmaa")
4579 (synopsis "Python bindings for the DRMAA library")
4580 (description
4581 "A Python package for Distributed Resource Management (DRM) job
4582 submission and control. This package is an implementation of the DRMAA 1.0
4583 Python language binding specification.")
4584 (license license:bsd-3)))
4585
4586 (define-public python2-drmaa
4587 (package-with-python2 python-drmaa))
4588
4589 (define-public python-gridmap
4590 (package
4591 (name "python-gridmap")
4592 (version "0.13.0")
4593 (source
4594 (origin
4595 (method url-fetch)
4596 (uri (string-append
4597 "https://github.com/pygridtools/gridmap/archive/v"
4598 version ".tar.gz"))
4599 (file-name (string-append name "-" version ".tar.gz"))
4600 (sha256
4601 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4602 (build-system python-build-system)
4603 (arguments
4604 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4605 (propagated-inputs
4606 `(("python-psutil" ,python-psutil)
4607 ("python-drmaa" ,python-drmaa)
4608 ("python-pyzmq" ,python-pyzmq)))
4609 (home-page "https://github.com/pygridtools/gridmap")
4610 (synopsis "Create jobs on a cluster directly from Python")
4611 (description
4612 "Gridmap is a Python package to allow you to easily create jobs on the
4613 cluster directly from Python. You can directly map Python functions onto the
4614 cluster without needing to write any wrapper code yourself.")
4615 (license license:gpl3+)))
4616
4617 (define-public python2-gridmap
4618 (package-with-python2 python-gridmap))
4619
4620 (define-public python-pexpect
4621 (package
4622 (name "python-pexpect")
4623 (version "4.2.1")
4624 (source
4625 (origin
4626 (method url-fetch)
4627 (uri (pypi-uri "pexpect" version))
4628 (sha256
4629 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4630 (build-system python-build-system)
4631 (arguments
4632 `(#:phases
4633 (modify-phases %standard-phases
4634 (add-before 'check 'prepare-tests
4635 (lambda _
4636 (substitute* (find-files "tests")
4637 (("/bin/ls") (which "ls"))
4638 (("/bin/echo") (which "echo"))
4639 (("/bin/which") (which "which"))
4640 ;; Many tests try to use the /bin directory which
4641 ;; is not present in the build environment.
4642 ;; Use one that's non-empty and unlikely to change.
4643 (("/bin'") "/dev'"))
4644 ;; XXX: Socket connection test gets "Connection reset by peer".
4645 ;; Why does it not work? Delete for now.
4646 (delete-file "tests/test_socket.py")
4647 #t))
4648 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4649 (native-inputs
4650 `(("python-nose" ,python-nose)
4651 ("python-pytest" ,python-pytest)
4652 ("man-db" ,man-db)
4653 ("which" ,which)))
4654 (propagated-inputs
4655 `(("python-ptyprocess" ,python-ptyprocess)))
4656 (home-page "http://pexpect.readthedocs.org/")
4657 (synopsis "Controlling interactive console applications")
4658 (description
4659 "Pexpect is a pure Python module for spawning child applications;
4660 controlling them; and responding to expected patterns in their output.
4661 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4662 child application and control it as if a human were typing commands.")
4663 (license license:isc)))
4664
4665 (define-public python2-pexpect
4666 (package-with-python2 python-pexpect))
4667
4668 (define-public python-setuptools-scm
4669 (package
4670 (name "python-setuptools-scm")
4671 (version "1.11.1")
4672 (source (origin
4673 (method url-fetch)
4674 (uri (pypi-uri "setuptools_scm" version))
4675 (sha256
4676 (base32
4677 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4678 (build-system python-build-system)
4679 (home-page "https://github.com/pypa/setuptools_scm/")
4680 (synopsis "Manage Python package versions in SCM metadata")
4681 (description
4682 "Setuptools_scm handles managing your Python package versions in
4683 @dfn{software configuration management} (SCM) metadata instead of declaring
4684 them as the version argument or in a SCM managed file.")
4685 (license license:expat)))
4686
4687 (define-public python2-setuptools-scm
4688 (package-with-python2 python-setuptools-scm))
4689
4690 (define-public python-pathpy
4691 (package
4692 (name "python-pathpy")
4693 (version "8.1.1")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (string-append "https://pypi.python.org/packages/source/p/"
4698 "path.py/path.py-" version ".tar.gz"))
4699 (sha256
4700 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4701 (outputs '("out" "doc"))
4702 (build-system python-build-system)
4703 (propagated-inputs
4704 `(("python-appdirs" ,python-appdirs)))
4705 (native-inputs
4706 `(("python-setuptools-scm" ,python-setuptools-scm)
4707 ("python-sphinx" ,python-sphinx)
4708 ("python-rst.linker" ,python-rst.linker)
4709 ("python-pytest" ,python-pytest)
4710 ("python-pytest-runner" ,python-pytest-runner)))
4711 (arguments
4712 `(#:phases
4713 (modify-phases %standard-phases
4714 (add-after 'build 'build-doc
4715 (lambda _
4716 (setenv "LANG" "en_US.UTF-8")
4717 (zero? (system* "python" "setup.py" "build_sphinx"))))
4718 (add-after 'install 'install-doc
4719 (lambda* (#:key outputs #:allow-other-keys)
4720 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4721 (doc (string-append data "/doc/" ,name "-" ,version))
4722 (html (string-append doc "/html")))
4723 (mkdir-p html)
4724 (for-each (lambda (file)
4725 (copy-file file (string-append doc "/" file)))
4726 '("README.rst" "CHANGES.rst"))
4727 (copy-recursively "build/sphinx/html" html)))))))
4728 (home-page "http://github.com/jaraco/path.py")
4729 (synopsis "Python module wrapper for built-in os.path")
4730 (description
4731 "@code{path.py} implements path objects as first-class entities, allowing
4732 common operations on files to be invoked on those path objects directly.")
4733 (license license:expat)))
4734
4735 (define-public python2-pathpy
4736 (package-with-python2 python-pathpy))
4737
4738 (define-public python-pickleshare
4739 (package
4740 (name "python-pickleshare")
4741 (version "0.5")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (string-append "https://pypi.python.org/packages/source/p/"
4746 "pickleshare/pickleshare-" version ".tar.gz"))
4747 (sha256
4748 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4749 (build-system python-build-system)
4750 (propagated-inputs
4751 `(("python-pathpy" ,python-pathpy)))
4752 (home-page "https://github.com/vivainio/pickleshare")
4753 (synopsis "Tiny key value database with concurrency support")
4754 (description
4755 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4756 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4757 shelve, many processes can access the database simultaneously. Changing a
4758 value in database is immediately visible to other processes accessing the same
4759 database. Concurrency is possible because the values are stored in separate
4760 files. Hence the “database” is a directory where all files are governed by
4761 PickleShare.")
4762 (license license:expat)))
4763
4764 (define-public python2-pickleshare
4765 (package-with-python2 python-pickleshare))
4766
4767 (define-public python-simplegeneric
4768 (package
4769 (name "python-simplegeneric")
4770 (version "0.8.1")
4771 (source
4772 (origin
4773 (method url-fetch)
4774 (uri (string-append "https://pypi.python.org/packages/source/s/"
4775 "simplegeneric/simplegeneric-" version ".zip"))
4776 (sha256
4777 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4778 (build-system python-build-system)
4779 (native-inputs
4780 `(("unzip" ,unzip)))
4781 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4782 (synopsis "Python module for simple generic functions")
4783 (description
4784 "The simplegeneric module lets you define simple single-dispatch generic
4785 functions, akin to Python’s built-in generic functions like @code{len()},
4786 @code{iter()} and so on. However, instead of using specially-named methods,
4787 these generic functions use simple lookup tables, akin to those used by
4788 e.g. @code{pickle.dump()} and other generic functions found in the Python
4789 standard library.")
4790 (license license:zpl2.1)))
4791
4792 (define-public python2-simplegeneric
4793 (package-with-python2 python-simplegeneric))
4794
4795 (define-public python-ipython-genutils
4796 ;; TODO: This package is retired, check if can be removed, see description.
4797 (package
4798 (name "python-ipython-genutils")
4799 (version "0.1.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (string-append "https://pypi.python.org/packages/source/i/"
4804 "ipython_genutils/ipython_genutils-"
4805 version ".tar.gz"))
4806 (sha256
4807 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4808 (build-system python-build-system)
4809 (arguments `(#:tests? #f)) ; no tests
4810 (home-page "http://ipython.org")
4811 (synopsis "Vestigial utilities from IPython")
4812 (description
4813 "This package provides retired utilities from IPython. No packages
4814 outside IPython/Jupyter should depend on it.
4815
4816 This package shouldn't exist. It contains some common utilities shared by
4817 Jupyter and IPython projects during The Big Split. As soon as possible, those
4818 packages will remove their dependency on this, and this package will go
4819 away.")
4820 (license license:bsd-3)))
4821
4822 (define-public python2-ipython-genutils
4823 (package-with-python2 python-ipython-genutils))
4824
4825 (define-public python-traitlets
4826 (package
4827 (name "python-traitlets")
4828 (version "4.2.0")
4829 (source
4830 (origin
4831 (method url-fetch)
4832 (uri (pypi-uri "traitlets" version))
4833 (sha256
4834 (base32
4835 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4836 (build-system python-build-system)
4837 (arguments
4838 `(#:phases
4839 (modify-phases %standard-phases
4840 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4841 (propagated-inputs
4842 `(("python-ipython-genutils" ,python-ipython-genutils)
4843 ("python-decorator" ,python-decorator)))
4844 (native-inputs
4845 `(("python-mock" ,python-mock)
4846 ("python-nose" ,python-nose)))
4847 (home-page "http://ipython.org")
4848 (synopsis "Configuration system for Python applications")
4849 (description
4850 "Traitlets is a framework that lets Python classes have attributes with
4851 type checking, dynamically calculated default values, and ‘on change’
4852 callbacks. The package also includes a mechanism to use traitlets for
4853 configuration, loading values from files or from command line arguments. This
4854 is a distinct layer on top of traitlets, so you can use traitlets in your code
4855 without using the configuration machinery.")
4856 (license license:bsd-3)))
4857
4858 (define-public python2-traitlets
4859 (package-with-python2 python-traitlets))
4860
4861 (define-public python-jupyter-core
4862 (package
4863 (name "python-jupyter-core")
4864 (version "4.2.1")
4865 (source
4866 (origin
4867 (method url-fetch)
4868 (uri (string-append (pypi-uri "jupyter_core" version)))
4869 (sha256
4870 (base32
4871 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4872 (build-system python-build-system)
4873 ;; FIXME: not sure how to run the tests
4874 (arguments `(#:tests? #f))
4875 (propagated-inputs
4876 `(("python-traitlets" ,python-traitlets)))
4877 (home-page "http://jupyter.org/")
4878 (synopsis "Jupyter base package")
4879 (description
4880 "Jupyter core is the base package on which Jupyter projects rely.")
4881 (license license:bsd-3)))
4882
4883 (define-public python2-jupyter-core
4884 (package-with-python2 python-jupyter-core))
4885
4886 (define-public python-jupyter-client
4887 (package
4888 (name "python-jupyter-client")
4889 (version "4.4.0")
4890 (source
4891 (origin
4892 (method url-fetch)
4893 (uri (pypi-uri "jupyter_client" version))
4894 (sha256
4895 (base32
4896 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4897 (build-system python-build-system)
4898 ;; Tests fail because of missing native python kernel which I assume is
4899 ;; provided by the ipython package, which we cannot use because it would
4900 ;; cause a dependency cycle.
4901 (arguments `(#:tests? #f))
4902 (propagated-inputs
4903 `(("python-pyzmq" ,python-pyzmq)
4904 ("python-traitlets" ,python-traitlets)
4905 ("python-jupyter-core" ,python-jupyter-core)))
4906 (home-page "http://jupyter.org/")
4907 (synopsis "Jupyter protocol implementation and client libraries")
4908 (description
4909 "The @code{jupyter_client} package contains the reference implementation
4910 of the Jupyter protocol. It also provides client and kernel management APIs
4911 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4912 installing @code{kernelspec}s for use with Jupyter frontends.")
4913 (license license:bsd-3)))
4914
4915 (define-public python2-jupyter-client
4916 (package-with-python2 python-jupyter-client))
4917
4918 (define-public python-ipykernel
4919 (package
4920 (name "python-ipykernel")
4921 (version "4.5.2")
4922 (source
4923 (origin
4924 (method url-fetch)
4925 (uri (pypi-uri "ipykernel" version))
4926 (sha256
4927 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4928 (build-system python-build-system)
4929 ;; The tests load a submodule of IPython. However, IPython itself depends
4930 ;; on ipykernel.
4931 (arguments `(#:tests? #f))
4932 (propagated-inputs
4933 ;; imported at runtime during connect
4934 `(("python-jupyter-client" ,python-jupyter-client)))
4935 (home-page "http://ipython.org")
4936 (synopsis "IPython Kernel for Jupyter")
4937 (description
4938 "This package provides the IPython kernel for Jupyter.")
4939 (license license:bsd-3)))
4940
4941 (define-public python2-ipykernel
4942 (package-with-python2 python-ipykernel))
4943
4944 (define-public python-testpath
4945 (package
4946 (name "python-testpath")
4947 (version "0.2")
4948 (source
4949 (origin
4950 (method url-fetch)
4951 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4952 version ".tar.gz"))
4953 (file-name (string-append name "-" version ".tar.gz"))
4954 (sha256
4955 (base32
4956 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4957 (build-system python-build-system)
4958 (arguments
4959 `(#:tests? #f ; this package does not even have a setup.py
4960 #:phases
4961 (modify-phases %standard-phases
4962 (delete 'install)
4963 (replace 'build
4964 (lambda* (#:key inputs outputs #:allow-other-keys)
4965 (let ((dir (string-append
4966 (assoc-ref outputs "out")
4967 "/lib/python"
4968 (string-take (string-take-right
4969 (assoc-ref inputs "python") 5) 3)
4970 "/site-packages/testpath")))
4971 (mkdir-p dir)
4972 (copy-recursively "testpath" dir))
4973 #t)))))
4974 (home-page "https://github.com/takluyver/testpath")
4975 (synopsis "Test utilities for code working with files and commands")
4976 (description
4977 "Testpath is a collection of utilities for Python code working with files
4978 and commands. It contains functions to check things on the filesystem, and
4979 tools for mocking system commands and recording calls to those.")
4980 (license license:expat)))
4981
4982 (define-public python2-testpath
4983 (package-with-python2 python-testpath))
4984
4985 (define-public python-ipython
4986 (package
4987 (name "python-ipython")
4988 (version "4.0.3")
4989 (source
4990 (origin
4991 (method url-fetch)
4992 (uri (pypi-uri "ipython" version ".tar.gz"))
4993 (sha256
4994 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
4995 (build-system python-build-system)
4996 (outputs '("out" "doc"))
4997 (propagated-inputs
4998 `(("python-pyzmq" ,python-pyzmq)
4999 ("python-terminado" ,python-terminado)
5000 ("python-matplotlib" ,python-matplotlib)
5001 ("python-numpy" ,python-numpy)
5002 ("python-numpydoc" ,python-numpydoc)
5003 ("python-jinja2" ,python-jinja2)
5004 ("python-mistune" ,python-mistune)
5005 ("python-pexpect" ,python-pexpect)
5006 ("python-pickleshare" ,python-pickleshare)
5007 ("python-simplegeneric" ,python-simplegeneric)
5008 ("python-jsonschema" ,python-jsonschema)
5009 ("python-traitlets" ,python-traitlets)
5010 ("python-ipykernel" ,python-ipykernel)
5011 ("python-pygments" ,python-pygments)))
5012 (inputs
5013 `(("readline" ,readline)
5014 ("which" ,which)))
5015 (native-inputs
5016 `(("pkg-config" ,pkg-config)
5017 ("python-requests" ,python-requests) ;; for tests
5018 ("python-testpath" ,python-testpath)
5019 ("python-nose" ,python-nose)
5020 ("python-sphinx" ,python-sphinx)
5021 ("texlive" ,texlive)
5022 ("texinfo" ,texinfo)))
5023 (arguments
5024 `(#:phases
5025 (modify-phases %standard-phases
5026 (add-after
5027 'install 'install-doc
5028 (lambda* (#:key inputs outputs #:allow-other-keys)
5029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5030 (doc (string-append data "/doc/" ,name "-" ,version))
5031 (html (string-append doc "/html"))
5032 (man1 (string-append data "/man/man1"))
5033 (info (string-append data "/info"))
5034 (examples (string-append doc "/examples")))
5035 (setenv "LANG" "en_US.utf8")
5036 ;; Make installed package available for running the tests
5037 (add-installed-pythonpath inputs outputs)
5038 (with-directory-excursion "docs"
5039 ;; FIXME: pdf fails to build
5040 ;;(system* "make" "pdf" "PAPER=a4")
5041 (system* "make" "html")
5042 (system* "make" "info"))
5043 (copy-recursively "docs/man" man1)
5044 (copy-recursively "examples" examples)
5045 (copy-recursively "docs/build/html" html)
5046 ;; (copy-file "docs/build/latex/ipython.pdf"
5047 ;; (string-append doc "/ipython.pdf"))
5048 (mkdir-p info)
5049 (copy-file "docs/build/texinfo/ipython.info"
5050 (string-append info "/ipython.info"))
5051 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5052 ;; Tests can only be run after the library has been installed and not
5053 ;; within the source directory.
5054 (delete 'check)
5055 (add-after
5056 'install 'check
5057 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5058 (if tests?
5059 (with-directory-excursion "/tmp"
5060 ;; Make installed package available for running the tests
5061 (add-installed-pythonpath inputs outputs)
5062 (setenv "HOME" "/tmp/") ;; required by a test
5063 (zero? (system* (string-append (assoc-ref outputs "out")
5064 "/bin/iptest"))))
5065 #t)))
5066 (add-before
5067 'install 'fix-tests
5068 (lambda* (#:key inputs #:allow-other-keys)
5069 (substitute* "./IPython/utils/_process_posix.py"
5070 (("/usr/bin/env', 'which") (which "which")))
5071 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5072 (("#!/usr/bin/env python")
5073 (string-append "#!" (which "python"))))
5074 ;; Disable 1 failing test
5075 (substitute* "./IPython/core/tests/test_magic.py"
5076 (("def test_dirops\\(\\):" all)
5077 (string-append "@dec.skipif(True)\n" all))))))))
5078 (home-page "http://ipython.org")
5079 (synopsis "IPython is a tool for interactive computing in Python")
5080 (description
5081 "IPython provides a rich architecture for interactive computing with:
5082 Powerful interactive shells, a browser-based notebook, support for interactive
5083 data visualization, embeddable interpreters and tools for parallel
5084 computing.")
5085 (license license:bsd-3)
5086 (properties `((python2-variant . ,(delay python2-ipython))))))
5087
5088 (define-public python2-ipython
5089 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5090 (package
5091 (inherit ipython)
5092 ;; FIXME: some tests are failing
5093 (arguments
5094 `(#:tests? #f ,@(package-arguments ipython)))
5095 ;; FIXME: add pyreadline once available.
5096 (native-inputs
5097 `(("python2-mock" ,python2-mock)
5098 ,@(package-native-inputs ipython))))))
5099
5100 (define-public python-isodate
5101 (package
5102 (name "python-isodate")
5103 (version "0.5.4")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (pypi-uri "isodate" version))
5108 (sha256
5109 (base32
5110 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5111 (build-system python-build-system)
5112 (home-page
5113 "http://cheeseshop.python.org/pypi/isodate")
5114 (synopsis
5115 "Python date parser and formatter")
5116 (description
5117 "Python-isodate is a python module for parsing and formatting
5118 ISO 8601 dates, time and duration.")
5119 (license license:bsd-3)))
5120
5121 (define-public python2-isodate
5122 (package-with-python2 python-isodate))
5123
5124 (define-public python-html5lib
5125 (package
5126 (name "python-html5lib")
5127 (version "1.0b10")
5128 (source
5129 (origin
5130 (method url-fetch)
5131 (uri (pypi-uri "html5lib" version))
5132 (sha256
5133 (base32
5134 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5135 (build-system python-build-system)
5136 (propagated-inputs
5137 `(("python-six" ,python-six)
5138 ("python-webencodings" ,python-webencodings)))
5139 (arguments
5140 `(#:test-target "check"))
5141 (home-page
5142 "https://github.com/html5lib/html5lib-python")
5143 (synopsis
5144 "Python HTML parser based on the WHATWG HTML specifcation")
5145 (description
5146 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5147 and written in Python.")
5148 (license license:expat)))
5149
5150 (define-public python2-html5lib
5151 (package-with-python2 python-html5lib))
5152
5153 ;; Needed for python-bleach, a dependency of python-notebook
5154 (define-public python-html5lib-0.9
5155 (package
5156 (inherit python-html5lib)
5157 (version "0.999")
5158 (source
5159 (origin
5160 (method url-fetch)
5161 (uri (pypi-uri "html5lib" version))
5162 (sha256
5163 (base32
5164 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5165
5166 (define-public python2-html5lib-0.9
5167 (package-with-python2 python-html5lib-0.9))
5168
5169 (define-public python-webencodings
5170 (package
5171 (name "python-webencodings")
5172 (version "0.5")
5173 (source (origin
5174 (method url-fetch)
5175 (uri (pypi-uri "webencodings" version))
5176 (sha256
5177 (base32
5178 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5179 (build-system python-build-system)
5180 (arguments
5181 '(#:phases
5182 (modify-phases %standard-phases
5183 (replace 'check
5184 (lambda _
5185 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5186 (native-inputs
5187 `(("python-pytest" ,python-pytest)))
5188 (home-page "https://github.com/SimonSapin/python-webencodings")
5189 (synopsis "Character encoding aliases for legacy web content")
5190 (description
5191 "In order to be compatible with legacy web content when interpreting
5192 something like @code{Content-Type: text/html; charset=latin1}, tools need
5193 to use a particular set of aliases for encoding labels as well as some
5194 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5195 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5196 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5197 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5198 defines all such details so that implementations do not have to
5199 reverse-engineer each other.
5200
5201 This module implements the Encoding standard and has encoding labels and
5202 BOM detection, but the actual implementation for encoders and decoders
5203 is Python’s.")
5204 (license license:bsd-3)))
5205
5206 (define-public python2-webencodings
5207 (package-with-python2 python-webencodings))
5208
5209 (define-public python-urwid
5210 (package
5211 (name "python-urwid")
5212 (version "1.3.1")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (pypi-uri "urwid" version))
5217 (sha256
5218 (base32
5219 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5220 (build-system python-build-system)
5221 (arguments
5222 `(#:phases
5223 (modify-phases %standard-phases
5224 ;; Disable failing test. Bug filed upstream:
5225 ;; https://github.com/wardi/urwid/issues/164
5226 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5227 (add-after 'unpack 'disable-failing-test
5228 (lambda _
5229 (substitute* "urwid/tests/test_event_loops.py"
5230 (("test_remove_watch_file")
5231 "disable_remove_watch_file")))))))
5232 (home-page "http://urwid.org")
5233 (synopsis "Console user interface library for Python")
5234 (description
5235 "Urwid is a curses-based UI/widget library for Python. It includes many
5236 features useful for text console applications.")
5237 (license license:lgpl2.1+)))
5238
5239 (define-public python2-urwid
5240 (package-with-python2 python-urwid))
5241
5242 (define-public python2-openid
5243 (package
5244 (name "python2-openid")
5245 (version "2.2.5")
5246 (source
5247 (origin
5248 (method url-fetch)
5249 (uri (pypi-uri "python-openid" version))
5250 (sha256
5251 (base32
5252 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5253 (build-system python-build-system)
5254 (arguments
5255 ;; Python 3 support is in `python3-openid`, a separate package.
5256 `(#:python ,python-2))
5257 (home-page "https://github.com/openid/python-openid")
5258 (synopsis "OpenID support for servers and consumers")
5259 (description "This library provides OpenID authentication for Python, both
5260 for clients and servers.")
5261 (license license:asl2.0)))
5262
5263 (define-public python-urwidtrees
5264 (package
5265 (name "python-urwidtrees")
5266 (version "1.0.2")
5267 (source
5268 (origin
5269 (method url-fetch)
5270 ;; package author intends on distributing via github rather than pypi:
5271 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5272 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5273 version ".tar.gz"))
5274 (file-name (string-append name "-" version ".tar.gz"))
5275 (sha256
5276 (base32
5277 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5278 (build-system python-build-system)
5279 (arguments
5280 '(#:tests? #f)) ; no tests
5281 (propagated-inputs `(("python-urwid" ,python-urwid)))
5282 (home-page "https://github.com/pazz/urwidtrees")
5283 (synopsis "Tree widgets for urwid")
5284 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5285 toolkit. Use it to build trees of widgets.")
5286 (license license:gpl3+)))
5287
5288 (define-public python2-urwidtrees
5289 (package-with-python2 python-urwidtrees))
5290
5291 (define-public python-dbus
5292 (package
5293 (name "python-dbus")
5294 (version "1.2.0")
5295 (source
5296 (origin
5297 (method url-fetch)
5298 (uri (string-append
5299 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5300 version ".tar.gz"))
5301 (sha256
5302 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5303 (build-system gnu-build-system)
5304 (arguments
5305 '(#:phases
5306 (modify-phases %standard-phases
5307 (add-before
5308 'check 'pre-check
5309 (lambda _
5310 ;; XXX: For the missing '/etc/machine-id'.
5311 (substitute* "test/run-test.sh"
5312 (("DBUS_FATAL_WARNINGS=1")
5313 "DBUS_FATAL_WARNINGS=0"))
5314 #t)))))
5315 (native-inputs
5316 `(("pkg-config" ,pkg-config)))
5317 (inputs
5318 `(("python" ,python)
5319 ("dbus-glib" ,dbus-glib)))
5320 (synopsis "Python bindings for D-bus")
5321 (description "python-dbus provides bindings for libdbus, the reference
5322 implementation of D-Bus.")
5323 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5324 (license license:expat)))
5325
5326 (define-public python2-dbus
5327 (package (inherit python-dbus)
5328 (name "python2-dbus")
5329 (inputs `(("python" ,python-2)
5330 ,@(alist-delete "python"
5331 (package-inputs python-dbus)
5332 equal?)))
5333 ;; FIXME: on Python 2, the test_utf8 fails with:
5334 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5335 (arguments `(#:tests? #f))))
5336
5337 (define-public python-apsw
5338 (package
5339 (name "python-apsw")
5340 (version "3.9.2-r1")
5341 (source
5342 (origin
5343 (method url-fetch)
5344 (uri (pypi-uri "apsw" version))
5345 (sha256
5346 (base32
5347 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5348 (build-system python-build-system)
5349 (inputs
5350 `(("sqlite" ,sqlite)))
5351 (arguments
5352 `(#:phases
5353 (modify-phases %standard-phases
5354 (delete 'check)
5355 (add-after 'install 'check
5356 (lambda* (#:key inputs outputs #:allow-other-keys)
5357 (add-installed-pythonpath inputs outputs)
5358 (zero? (system* "python" "setup.py" "test")))))))
5359 (home-page "https://github.com/rogerbinns/apsw/")
5360 (synopsis "Another Python SQLite Wrapper")
5361 (description "APSW is a Python wrapper for the SQLite
5362 embedded relational database engine. In contrast to other wrappers such as
5363 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5364 translate the complete SQLite API into Python.")
5365 (license license:zlib)))
5366
5367 (define-public python2-apsw
5368 (package-with-python2 python-apsw))
5369
5370 (define-public python-lxml
5371 (package
5372 (name "python-lxml")
5373 (version "3.6.0")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (pypi-uri "lxml" version))
5378 (sha256
5379 (base32
5380 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5381 (build-system python-build-system)
5382 (inputs
5383 `(("libxml2" ,libxml2)
5384 ("libxslt" ,libxslt)))
5385 (home-page "http://lxml.de/")
5386 (synopsis
5387 "Python XML processing library")
5388 (description
5389 "The lxml XML toolkit is a Pythonic binding for the C libraries
5390 libxml2 and libxslt.")
5391 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5392
5393 (define-public python2-lxml
5394 (package-with-python2 python-lxml))
5395
5396 ;; beautifulsoup4 has a totally different namespace than 3.x,
5397 ;; and pypi seems to put it under its own name, so I guess we should too
5398 (define-public python-beautifulsoup4
5399 (package
5400 (name "python-beautifulsoup4")
5401 (version "4.5.1")
5402 (source
5403 (origin
5404 (method url-fetch)
5405 (uri (pypi-uri "beautifulsoup4" version))
5406 (sha256
5407 (base32
5408 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5409 (build-system python-build-system)
5410 (arguments
5411 `(#:phases
5412 (modify-phases %standard-phases
5413 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5414 ;; must use this conversion script when building with Python 3. The
5415 ;; conversion script also runs the tests.
5416 ;; For more information, see the file 'convert-py3k' in the source
5417 ;; distribution.
5418 (replace 'check
5419 (lambda _ (zero? (system* "./convert-py3k")))))))
5420 (home-page
5421 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5422 (synopsis
5423 "Python screen-scraping library")
5424 (description
5425 "Beautiful Soup is a Python library designed for rapidly setting up
5426 screen-scraping projects. It offers Pythonic idioms for navigating,
5427 searching, and modifying a parse tree, providing a toolkit for
5428 dissecting a document and extracting what you need. It automatically
5429 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5430 (license license:expat)
5431 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5432
5433 (define-public python2-beautifulsoup4
5434 (package
5435 (inherit (package-with-python2
5436 (strip-python2-variant python-beautifulsoup4)))
5437 (arguments `(#:python ,python-2))))
5438
5439 (define-public python2-cssutils
5440 (package
5441 (name "python2-cssutils")
5442 (version "1.0.1")
5443 (source
5444 (origin
5445 (method url-fetch)
5446 (uri (pypi-uri "cssutils" version))
5447 (sha256
5448 (base32
5449 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5450 (build-system python-build-system)
5451 (native-inputs
5452 `(("python2-mock" ,python2-mock) ; for the tests
5453 ("unzip" ,unzip))) ; for unpacking the source
5454 (arguments
5455 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5456 #:tests? #f ; The tests apparently download an external URL.
5457 ))
5458 (home-page "http://cthedot.de/cssutils/")
5459 (synopsis
5460 "CSS Cascading Style Sheets library for Python")
5461 (description
5462 "Cssutils is a Python package for parsing and building CSS
5463 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5464 options.")
5465 (license license:lgpl3+)))
5466
5467 (define-public python-cssselect
5468 (package
5469 (name "python-cssselect")
5470 (version "0.9.2")
5471 (source
5472 (origin
5473 (method url-fetch)
5474 (uri (pypi-uri "cssselect" version))
5475 (sha256
5476 (base32
5477 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5478 (build-system python-build-system)
5479 (arguments
5480 ;; tests fail with message
5481 ;; AttributeError: 'module' object has no attribute 'tests'
5482 `(#:tests? #f))
5483 (home-page
5484 "https://pythonhosted.org/cssselect/")
5485 (synopsis
5486 "CSS3 selector parser and translator to XPath 1.0")
5487 (description
5488 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5489 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5490 another XPath engine to find the matching elements in an XML or HTML document.")
5491 (license license:bsd-3)))
5492
5493 (define-public python2-cssselect
5494 (package-with-python2 python-cssselect))
5495
5496 (define-public python-openid-cla
5497 (package
5498 (name "python-openid-cla")
5499 (version "1.2")
5500 (source
5501 (origin
5502 (method url-fetch)
5503 (uri (pypi-uri "python-openid-cla" version))
5504 (sha256
5505 (base32
5506 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5507 (build-system python-build-system)
5508 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5509 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5510 (description "@code{openid-cla} is an implementation of the OpenID
5511 contributor license agreement extension for python-openid.")
5512 (license license:bsd-3)))
5513
5514 (define-public python2-openid-cla
5515 (package-with-python2 python-openid-cla))
5516
5517 (define-public python-openid-teams
5518 (package
5519 (name "python-openid-teams")
5520 (version "1.1")
5521 (source
5522 (origin
5523 (method url-fetch)
5524 (uri (pypi-uri "python-openid-teams" version))
5525 (sha256
5526 (base32
5527 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5528 (build-system python-build-system)
5529 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5530 (synopsis "Implementation of the OpenID teams extension for python-openid")
5531 (description
5532 "@code{openid-teams} is an implementation of the OpenID
5533 teams extension for python-openid.")
5534 (license license:bsd-3)))
5535
5536 (define-public python2-openid-teams
5537 (package-with-python2 python-openid-teams))
5538
5539 (define-public python-netifaces
5540 (package
5541 (name "python-netifaces")
5542 (version "0.10.4")
5543 (source
5544 (origin
5545 (method url-fetch)
5546 (uri (string-append
5547 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5548 version
5549 ".tar.gz"))
5550 (sha256
5551 (base32
5552 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5553 (build-system python-build-system)
5554 (home-page
5555 "https://bitbucket.org/al45tair/netifaces")
5556 (synopsis
5557 "Python module for portable network interface information")
5558 (description
5559 "Netifaces is a Python module providing information on network
5560 interfaces in an easy and portable manner.")
5561 (license license:expat)))
5562
5563 (define-public python2-netifaces
5564 (package-with-python2 python-netifaces))
5565
5566 (define-public python-networkx
5567 (package
5568 (name "python-networkx")
5569 (version "1.11")
5570 (source
5571 (origin
5572 (method url-fetch)
5573 (uri (pypi-uri "networkx" version))
5574 (sha256
5575 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5576 (build-system python-build-system)
5577 ;; python-decorator is needed at runtime
5578 (propagated-inputs
5579 `(("python-decorator" ,python-decorator)))
5580 (native-inputs
5581 `(("python-nose" ,python-nose)))
5582 (home-page "http://networkx.github.io/")
5583 (synopsis "Python module for creating and manipulating graphs and networks")
5584 (description
5585 "NetworkX is a Python package for the creation, manipulation, and study
5586 of the structure, dynamics, and functions of complex networks.")
5587 (license license:bsd-3)))
5588
5589 (define-public python2-networkx
5590 (package-with-python2 python-networkx))
5591
5592 (define-public snakemake
5593 (package
5594 (name "snakemake")
5595 (version "3.9.0")
5596 (source
5597 (origin
5598 (method url-fetch)
5599 (uri (pypi-uri "snakemake" version))
5600 (sha256
5601 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
5602 (build-system python-build-system)
5603 (arguments
5604 ;; TODO: Package missing test dependencies.
5605 '(#:tests? #f))
5606 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5607 (synopsis "Python-based execution environment for make-like workflows")
5608 (description
5609 "Snakemake aims to reduce the complexity of creating workflows by
5610 providing a clean and modern domain specific specification language (DSL) in
5611 Python style, together with a fast and comfortable execution environment.")
5612 (license license:expat)))
5613
5614 (define-public python-seaborn
5615 (package
5616 (name "python-seaborn")
5617 (version "0.7.0")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 (uri (pypi-uri "seaborn" version))
5622 (sha256
5623 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5624 (build-system python-build-system)
5625 (arguments
5626 '(#:tests? #f)) ; Tests requires a running X11 server.
5627 (propagated-inputs
5628 `(("python-pandas" ,python-pandas)
5629 ("python-matplotlib" ,python-matplotlib)
5630 ("python-scipy" ,python-scipy)))
5631 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5632 (synopsis "Statistical data visualization")
5633 (description
5634 "Seaborn is a library for making attractive and informative statistical
5635 graphics in Python. It is built on top of matplotlib and tightly integrated
5636 with the PyData stack, including support for numpy and pandas data structures
5637 and statistical routines from scipy and statsmodels.")
5638 (license license:bsd-3)
5639 (properties `((python2-variant . ,(delay python2-seaborn))))))
5640
5641 (define-public python2-seaborn
5642 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5643 (package
5644 (inherit base)
5645 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5646 ,@(package-propagated-inputs base))))))
5647
5648 (define-public python-mpmath
5649 (package
5650 (name "python-mpmath")
5651 (version "0.19")
5652 (source (origin
5653 (method url-fetch)
5654 (uri (string-append "http://mpmath.org/files/mpmath-"
5655 version ".tar.gz"))
5656 (sha256
5657 (base32
5658 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5659 (build-system python-build-system)
5660 (arguments
5661 '(#:phases
5662 (modify-phases %standard-phases
5663 (replace 'check
5664 (lambda _
5665 (zero?
5666 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5667 (home-page "http://mpmath.org")
5668 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5669 (description
5670 "@code{mpmath} can be used as an arbitrary-precision substitute for
5671 Python's float/complex types and math/cmath modules, but also does much
5672 more advanced mathematics.")
5673 (license license:bsd-3)))
5674
5675 (define-public python2-mpmath
5676 (package-with-python2 python-mpmath))
5677
5678 (define-public python-sympy
5679 (package
5680 (name "python-sympy")
5681 (version "1.0")
5682 (source
5683 (origin
5684 (method url-fetch)
5685 (uri (string-append
5686 "https://github.com/sympy/sympy/releases/download/sympy-"
5687 version "/sympy-" version ".tar.gz"))
5688 (sha256
5689 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
5690 (build-system python-build-system)
5691 (propagated-inputs
5692 `(("python-mpmath" ,python-mpmath)))
5693 (home-page "http://www.sympy.org/")
5694 (synopsis "Python library for symbolic mathematics")
5695 (description
5696 "SymPy is a Python library for symbolic mathematics. It aims to become a
5697 full-featured computer algebra system (CAS) while keeping the code as simple
5698 as possible in order to be comprehensible and easily extensible.")
5699 (license license:bsd-3)))
5700
5701 (define-public python2-sympy
5702 (package-with-python2 python-sympy))
5703
5704 (define-public python-q
5705 (package
5706 (name "python-q")
5707 (version "2.6")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "q" version))
5712 (sha256
5713 (base32
5714 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5715 (build-system python-build-system)
5716 (home-page "https://github.com/zestyping/q")
5717 (synopsis "Quick-and-dirty debugging output for tired programmers")
5718 (description
5719 "q is a Python module for \"print\" style of debugging Python code. It
5720 provides convenient short API for print out of values, tracebacks, and
5721 falling into the Python interpreter.")
5722 (license license:asl2.0)))
5723
5724 (define-public python2-q
5725 (package-with-python2 python-q))
5726
5727 (define-public python-testlib
5728 (package
5729 (name "python-testlib")
5730 (version "0.6.5")
5731 (source
5732 (origin
5733 (method url-fetch)
5734 (uri (string-append
5735 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5736 version ".zip"))
5737 (sha256
5738 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5739 (build-system python-build-system)
5740 (native-inputs
5741 `(("unzip" ,unzip))) ; for unpacking the source
5742 (synopsis "Python micro test suite harness")
5743 (description "A micro unittest suite harness for Python.")
5744 (home-page "https://github.com/trentm/testlib")
5745 (license license:expat)))
5746
5747 (define-public python2-testlib
5748 (package-with-python2 python-testlib))
5749
5750 (define-public python2-xlib
5751 (package
5752 (name "python2-xlib")
5753 (version "0.14")
5754 (source (origin
5755 (method url-fetch)
5756 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5757 "/" version "/"
5758 "python-xlib-" version ".tar.gz"))
5759 (sha256
5760 (base32
5761 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5762 (build-system python-build-system)
5763 (arguments
5764 `(#:python ,python-2 ;Python 2 only
5765 #:tests? #f)) ;no tests
5766 (home-page "http://python-xlib.sourceforge.net/")
5767 (synopsis "Python X11 client library")
5768 (description
5769 "The Python X Library is intended to be a fully functional X client
5770 library for Python programs. It is useful to implement low-level X clients.
5771 It is written entirely in Python.")
5772 (license license:gpl2+)))
5773
5774 (define-public python-singledispatch
5775 (package
5776 (name "python-singledispatch")
5777 (version "3.4.0.3")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (pypi-uri "singledispatch" version))
5782 (sha256
5783 (base32
5784 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5785 (build-system python-build-system)
5786 (native-inputs
5787 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5788 (home-page
5789 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5790 (synopsis "Backport of singledispatch feature from Python 3.4")
5791 (description
5792 "This library brings functools.singledispatch from Python 3.4 to Python
5793 2.6-3.3.")
5794 (license license:expat)))
5795
5796 (define-public python2-singledispatch
5797 (package-with-python2 python-singledispatch))
5798
5799 (define-public python-tornado
5800 (package
5801 (name "python-tornado")
5802 (version "4.3")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (pypi-uri "tornado" version))
5807 (sha256
5808 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5809 (build-system python-build-system)
5810 (arguments
5811 '(;; FIXME: Two tests error out with:
5812 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5813 ;; #:phases
5814 ;; (modify-phases %standard-phases
5815 ;; (replace 'check
5816 ;; (lambda _
5817 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5818 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5819 ;; (zero? (system* "python" "-m" "tornado.test")))))
5820 #:tests? #f))
5821 (native-inputs
5822 `(("python-certifi" ,python-certifi)))
5823 (propagated-inputs
5824 `(("python-backports-abc" ,python-backports-abc)))
5825 (home-page "http://www.tornadoweb.org/")
5826 (synopsis "Python web framework and asynchronous networking library")
5827 (description
5828 "Tornado is a Python web framework and asynchronous networking library,
5829 originally developed at FriendFeed. By using non-blocking network I/O,
5830 Tornado can scale to tens of thousands of open connections, making it ideal
5831 for long polling, WebSockets, and other applications that require a long-lived
5832 connection to each user.")
5833 (license license:asl2.0)
5834 (properties `((python2-variant . ,(delay python2-tornado))))))
5835
5836 (define-public python2-tornado
5837 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5838 (package (inherit tornado)
5839 (propagated-inputs
5840 `(("python2-backport-ssl-match-hostname"
5841 ,python2-backport-ssl-match-hostname)
5842 ("python2-singledispatch" ,python2-singledispatch)
5843 ,@(package-propagated-inputs tornado))))))
5844
5845 ;; the python- version can be removed with python-3.5
5846 (define-public python-backports-abc
5847 (package
5848 (name "python-backports-abc")
5849 (version "0.5")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "backports_abc" version))
5854 (sha256
5855 (base32
5856 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5857 (build-system python-build-system)
5858 (home-page "https://github.com/cython/backports_abc")
5859 (synopsis "Backport of additions to the 'collections.abc' module")
5860 (description
5861 "Python-backports-abc provides a backport of additions to the
5862 'collections.abc' module in Python-3.5.")
5863 (license license:psfl)))
5864
5865 (define-public python2-backports-abc
5866 (package-with-python2 python-backports-abc))
5867
5868 (define-public python-waf
5869 (package
5870 (name "python-waf")
5871 (version "1.9.5")
5872 (source (origin
5873 (method url-fetch)
5874 (uri (string-append "https://waf.io/"
5875 "waf-" version ".tar.bz2"))
5876 (sha256
5877 (base32
5878 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5879 (build-system python-build-system)
5880 (arguments
5881 '(#:phases
5882 (modify-phases %standard-phases
5883 (replace 'build
5884 (lambda _
5885 (zero? (system* "python" "waf-light" "configure" "build"))))
5886 (replace 'check
5887 (lambda _
5888 (zero? (system* "python" "waf" "--version"))))
5889 (replace 'install
5890 (lambda _
5891 (copy-file "waf" %output))))))
5892 (home-page "http://waf.io/")
5893 (synopsis "Python-based build system")
5894 (description
5895 "Waf is a Python-based framework for configuring, compiling and installing
5896 applications.")
5897 (license license:bsd-3)))
5898
5899 (define-public python2-waf
5900 (package-with-python2 python-waf))
5901
5902 (define-public python-pyzmq
5903 (package
5904 (name "python-pyzmq")
5905 (version "15.1.0")
5906 (source
5907 (origin
5908 (method url-fetch)
5909 (uri (pypi-uri "pyzmq" version))
5910 (sha256
5911 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5912 (build-system python-build-system)
5913 (arguments
5914 `(#:configure-flags
5915 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5916 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5917 ;; --inplace' for 'python setup.py test' to work.
5918 #:tests? #f))
5919 (inputs
5920 `(("zeromq" ,zeromq)))
5921 (native-inputs
5922 `(("pkg-config" ,pkg-config)
5923 ("python-nose" ,python-nose)))
5924 (home-page "http://github.com/zeromq/pyzmq")
5925 (synopsis "Python bindings for 0MQ")
5926 (description
5927 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5928 (license license:bsd-4)))
5929
5930 (define-public python2-pyzmq
5931 (package-with-python2 python-pyzmq))
5932
5933 (define-public python-pep8
5934 (package
5935 (name "python-pep8")
5936 (version "1.7.0")
5937 (source
5938 (origin
5939 (method url-fetch)
5940 (uri (pypi-uri "pep8" version))
5941 (sha256
5942 (base32
5943 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5944 (build-system python-build-system)
5945 (home-page "http://pep8.readthedocs.org/")
5946 (synopsis "Python style guide checker")
5947 (description
5948 "This tools checks Python code against some of the style conventions in
5949 PEP 8.")
5950 (license license:expat)))
5951
5952 (define-public python2-pep8
5953 (package-with-python2 python-pep8))
5954
5955 (define-public python-pyflakes
5956 (package
5957 (name "python-pyflakes")
5958 (version "1.0.0")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "pyflakes" version))
5963 (sha256
5964 (base32
5965 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5966 (build-system python-build-system)
5967 (home-page
5968 "https://github.com/pyflakes/pyflakes")
5969 (synopsis "Passive checker of Python programs")
5970 (description
5971 "Pyflakes statically checks Python source code for common errors.")
5972 (license license:expat)))
5973
5974 (define-public python2-pyflakes
5975 (package-with-python2 python-pyflakes))
5976
5977 (define-public python-mccabe
5978 (package
5979 (name "python-mccabe")
5980 (version "0.4.0")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "mccabe" version))
5985 (sha256
5986 (base32
5987 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5988 (build-system python-build-system)
5989 (native-inputs
5990 `(("python-pytest" ,python-pytest)
5991 ("python-pytest-runner" ,python-pytest-runner)))
5992 (home-page "https://github.com/flintwork/mccabe")
5993 (synopsis "McCabe checker, plugin for flake8")
5994 (description
5995 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5996 complexity of Python source code.")
5997 (license license:expat)))
5998
5999 (define-public python2-mccabe
6000 (package-with-python2 python-mccabe))
6001
6002 (define-public python-mccabe-0.2.1
6003 (package (inherit python-mccabe)
6004 (version "0.2.1")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (pypi-uri "mccabe" version))
6009 (sha256
6010 (base32
6011 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6012
6013 (define-public python2-mccabe-0.2.1
6014 (package-with-python2 python-mccabe-0.2.1))
6015
6016 ;; Flake8 2.4.1 requires an older version of pep8.
6017 ;; This should be removed ASAP.
6018 (define-public python-pep8-1.5.7
6019 (package (inherit python-pep8)
6020 (version "1.5.7")
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (string-append
6025 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6026 version
6027 ".tar.gz"))
6028 (sha256
6029 (base32
6030 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6031 (arguments
6032 ;; XXX Tests not compatible with Python 3.5.
6033 '(#:tests? #f))))
6034
6035 (define-public python2-pep8-1.5.7
6036 (package-with-python2 python-pep8-1.5.7))
6037
6038 ;; Flake8 2.4.1 requires an older version of pyflakes.
6039 ;; This should be removed ASAP.
6040 (define-public python-pyflakes-0.8.1
6041 (package (inherit python-pyflakes)
6042 (version "0.8.1")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (string-append
6047 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6048 version
6049 ".tar.gz"))
6050 (sha256
6051 (base32
6052 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6053 (arguments
6054 ;; XXX Tests not compatible with Python 3.5.
6055 '(#:tests? #f))))
6056
6057 (define-public python2-pyflakes-0.8.1
6058 (package-with-python2 python-pyflakes-0.8.1))
6059
6060 (define-public python-flake8
6061 (package
6062 (name "python-flake8")
6063 (version "2.5.4")
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (pypi-uri "flake8" version))
6068 (sha256
6069 (base32
6070 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6071 (modules '((guix build utils)))
6072 (snippet
6073 '(begin
6074 ;; Remove pre-compiled .pyc files from source.
6075 (for-each delete-file-recursively
6076 (find-files "." "__pycache__" #:directories? #t))
6077 (for-each delete-file (find-files "." "\\.pyc$"))
6078 #t))))
6079 (build-system python-build-system)
6080 (propagated-inputs
6081 `(("python-pep8" ,python-pep8)
6082 ("python-pyflakes" ,python-pyflakes)
6083 ("python-mccabe" ,python-mccabe)))
6084 (native-inputs
6085 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6086 ("python-nose" ,python-nose)))
6087 (home-page "https://gitlab.com/pycqa/flake8")
6088 (synopsis
6089 "The modular source code checker: pep8, pyflakes and co")
6090 (description
6091 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6092 (license license:expat)))
6093
6094 (define-public python2-flake8
6095 (package-with-python2 python-flake8))
6096
6097 ;; This will only be needed by the python-hacking package and will not be
6098 ;; necessary once python-hacking > 0.10.2 is released.
6099 (define-public python-flake8-2.2.4
6100 (package (inherit python-flake8)
6101 (propagated-inputs
6102 `(("python-pep8" ,python-pep8-1.5.7)
6103 ("python-pyflakes" ,python-pyflakes-0.8.1)
6104 ("python-mccabe" ,python-mccabe-0.2.1)))
6105 (native-inputs
6106 `(("python-mock" ,python-mock)
6107 ("python-nose" ,python-nose)))
6108 (version "2.2.4")
6109 (source
6110 (origin
6111 (method url-fetch)
6112 (uri (pypi-uri "flake8" version))
6113 (sha256
6114 (base32
6115 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6116 (modules '((guix build utils)))
6117 (snippet
6118 '(begin
6119 ;; Remove pre-compiled .pyc files from source.
6120 (for-each delete-file-recursively
6121 (find-files "." "__pycache__" #:directories? #t))
6122 (for-each delete-file (find-files "." "\\.pyc$"))
6123 #t))))
6124 (arguments
6125 ;; XXX Fails with Python 3.5.
6126 '(#:tests? #f))))
6127
6128 (define-public python2-flake8-2.2.4
6129 (package-with-python2 python-flake8-2.2.4))
6130
6131 (define-public python-mistune
6132 (package
6133 (name "python-mistune")
6134 (version "0.7")
6135 (source
6136 (origin
6137 (method url-fetch)
6138 (uri (string-append
6139 "https://pypi.python.org/packages/source/m/mistune/mistune-"
6140 version
6141 ".tar.gz"))
6142 (sha256
6143 (base32
6144 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
6145 (build-system python-build-system)
6146 (native-inputs
6147 `(("python-nose" ,python-nose)
6148 ("python-cython" ,python-cython)))
6149 (home-page "https://github.com/lepture/mistune")
6150 (synopsis "Markdown parser in pure Python")
6151 (description "This package provides a fast markdown parser in pure
6152 Python.")
6153 (license license:bsd-3)))
6154
6155 (define-public python2-mistune
6156 (package-with-python2 python-mistune))
6157
6158 (define-public python-markdown
6159 (package
6160 (name "python-markdown")
6161 (version "2.6.7")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "Markdown" version))
6166 (sha256
6167 (base32
6168 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6169 (build-system python-build-system)
6170 (arguments
6171 `(#:phases
6172 (modify-phases %standard-phases
6173 (replace 'check
6174 (lambda _
6175 (zero? (system* "python" "run-tests.py")))))))
6176 (native-inputs
6177 `(("python-nose" ,python-nose)
6178 ("python-pyyaml" ,python-pyyaml)))
6179 (home-page "https://pythonhosted.org/Markdown/")
6180 (synopsis "Python implementation of Markdown")
6181 (description
6182 "This package provides a Python implementation of John Gruber's
6183 Markdown. The library features international input, various Markdown
6184 extensions, and several HTML output formats. A command line wrapper
6185 markdown_py is also provided to convert Markdown files to HTML.")
6186 (license license:bsd-3)))
6187
6188 (define-public python2-markdown
6189 (package-with-python2 python-markdown))
6190
6191 (define-public python-ptyprocess
6192 (package
6193 (name "python-ptyprocess")
6194 (version "0.5")
6195 (source
6196 (origin
6197 (method url-fetch)
6198 (uri (string-append
6199 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6200 version ".tar.gz"))
6201 (sha256
6202 (base32
6203 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6204 (build-system python-build-system)
6205 (native-inputs
6206 `(("python-nose" ,python-nose)))
6207 (arguments
6208 `(#:phases
6209 (modify-phases %standard-phases
6210 (replace 'check
6211 (lambda _
6212 (zero? (system* "nosetests")))))))
6213 (home-page "https://github.com/pexpect/ptyprocess")
6214 (synopsis "Run a subprocess in a pseudo terminal")
6215 (description
6216 "This package provides a Python library used to launch a subprocess in a
6217 pseudo terminal (pty), and interact with both the process and its pty.")
6218 (license license:isc)))
6219
6220 (define-public python2-ptyprocess
6221 (package-with-python2 python-ptyprocess))
6222
6223 (define-public python-terminado
6224 (package
6225 (name "python-terminado")
6226 (version "0.6")
6227 (source
6228 (origin
6229 (method url-fetch)
6230 (uri (pypi-uri "terminado" version))
6231 (sha256
6232 (base32
6233 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6234 (build-system python-build-system)
6235 (propagated-inputs
6236 `(("python-tornado" ,python-tornado)
6237 ("python-ptyprocess" ,python-ptyprocess)))
6238 (native-inputs
6239 `(("python-nose" ,python-nose)))
6240 (arguments
6241 `(#:phases
6242 (modify-phases %standard-phases
6243 (replace 'check
6244 (lambda _
6245 (zero? (system* "nosetests")))))))
6246 (home-page "https://github.com/takluyver/terminado")
6247 (synopsis "Terminals served to term.js using Tornado websockets")
6248 (description "This package provides a Tornado websocket backend for the
6249 term.js Javascript terminal emulator library.")
6250 (license license:bsd-2)
6251 (properties `((python2-variant . ,(delay python2-terminado))))))
6252
6253 (define-public python2-terminado
6254 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6255 (package (inherit terminado)
6256 (propagated-inputs
6257 `(("python2-backport-ssl-match-hostname"
6258 ,python2-backport-ssl-match-hostname)
6259 ,@(package-propagated-inputs terminado))))))
6260
6261 (define-public python-straight-plugin
6262 (package
6263 (name "python-straight-plugin")
6264 (version "1.4.1")
6265 (source
6266 (origin
6267 (method url-fetch)
6268 (uri (pypi-uri "straight.plugin" version))
6269 (sha256
6270 (base32
6271 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6272 (build-system python-build-system)
6273 (home-page "https://github.com/ironfroggy/straight.plugin")
6274 (synopsis "Simple namespaced plugin facility")
6275 (description "Straight Plugin provides a type of plugin you can create from
6276 almost any existing Python modules, and an easy way for outside developers to
6277 add functionality and customization to your projects with their own plugins.")
6278 (license license:expat)))
6279
6280 (define-public python2-straight-plugin
6281 (package-with-python2 python-straight-plugin))
6282
6283 (define-public python-fonttools
6284 (package
6285 (name "python-fonttools")
6286 (version "2.5")
6287 (source (origin
6288 (method url-fetch)
6289 (uri (string-append
6290 "https://pypi.python.org/packages/source/F/FontTools/"
6291 "fonttools-" version ".tar.gz"))
6292 (sha256
6293 (base32
6294 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6295 (build-system python-build-system)
6296 (arguments
6297 '(#:test-target "check"
6298 #:phases
6299 (modify-phases %standard-phases
6300 (add-after 'unpack 'patch-setuppy
6301 ;; Remove the undocumented "extra_path" argument, which adds an
6302 ;; intervening directories between site-packages and the package
6303 ;; directory.
6304 (lambda _
6305 (substitute* "setup.py"
6306 (("^[ \t]*extra_path *= *'FontTools',") ""))
6307 #t)))))
6308 (home-page "http://github.com/behdad/fonttools")
6309 (synopsis "Tools to manipulate font files")
6310 (description
6311 "FontTools/TTX is a library to manipulate font files from Python. It
6312 supports reading and writing of TrueType/OpenType fonts, reading and writing
6313 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6314 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6315 from an XML-based format.")
6316 (license (license:non-copyleft
6317 "file://LICENSE.txt"
6318 "See LICENSE.txt in the distribution."))))
6319
6320 (define-public python2-fonttools
6321 (package-with-python2 python-fonttools))
6322
6323 (define-public python-ly
6324 (package
6325 (name "python-ly")
6326 (version "0.9.4")
6327 (source
6328 (origin
6329 (method url-fetch)
6330 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6331 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6332 "/python-ly-" version ".tar.gz"))
6333 (sha256
6334 (base32
6335 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6336 (build-system python-build-system)
6337 (arguments
6338 ;; FIXME: Some tests need network access.
6339 '(#:tests? #f))
6340 (synopsis "Tool and library for manipulating LilyPond files")
6341 (description "This package provides a Python library to parse, manipulate
6342 or create documents in LilyPond format. A command line program ly is also
6343 provided that can be used to do various manipulations with LilyPond files.")
6344 (home-page "https://pypi.python.org/pypi/python-ly")
6345 (license license:gpl2+)))
6346
6347 (define-public python-appdirs
6348 (package
6349 (name "python-appdirs")
6350 (version "1.4.0")
6351 (source
6352 (origin
6353 (method url-fetch)
6354 (uri (string-append
6355 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6356 version
6357 ".tar.gz"))
6358 (sha256
6359 (base32
6360 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6361 (build-system python-build-system)
6362 (home-page "http://github.com/ActiveState/appdirs")
6363 (synopsis
6364 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6365 (description
6366 "This module provides a portable way of finding out where user data
6367 should be stored on various operating systems.")
6368 (license license:expat)))
6369
6370 (define-public python2-appdirs
6371 (package-with-python2 python-appdirs))
6372
6373 (define-public python-llfuse
6374 (package
6375 (name "python-llfuse")
6376 (version "1.1.1")
6377 (source (origin
6378 (method url-fetch)
6379 (uri (string-append
6380 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6381 "llfuse-" version ".tar.bz2"))
6382 (sha256
6383 (base32
6384 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6385 (build-system python-build-system)
6386 (inputs
6387 `(("fuse" ,fuse)
6388 ("attr" ,attr)))
6389 (native-inputs
6390 `(("pkg-config" ,pkg-config)))
6391 (synopsis "Python bindings for FUSE")
6392 (description
6393 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6394 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6395 (license license:lgpl2.0+)
6396 (properties `((python2-variant . ,(delay python2-llfuse))))))
6397
6398 (define-public python2-llfuse
6399 (package (inherit (package-with-python2
6400 (strip-python2-variant python-llfuse)))
6401 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6402
6403 ;; For attic-0.16
6404 (define-public python-llfuse-0.41
6405 (package (inherit python-llfuse)
6406 (version "0.41.1")
6407 (source (origin
6408 (method url-fetch)
6409 (uri (string-append
6410 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6411 "llfuse-" version ".tar.bz2"))
6412 (sha256
6413 (base32
6414 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6415 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6416 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6417 (license (list license:expat license:lgpl2.0+))))
6418
6419 (define-public python-msgpack
6420 (package
6421 (name "python-msgpack")
6422 (version "0.4.8")
6423 (source (origin
6424 (method url-fetch)
6425 (uri (pypi-uri "msgpack-python" version))
6426 (sha256
6427 (base32
6428 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6429 (build-system python-build-system)
6430 (synopsis "MessagePack (de)serializer")
6431 (description "MessagePack is a fast, compact binary serialization format,
6432 suitable for similar data to JSON. This package provides CPython bindings for
6433 reading and writing MessagePack data.")
6434 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6435 (license license:asl2.0)))
6436
6437 (define-public python2-msgpack
6438 (package-with-python2 python-msgpack))
6439
6440 (define-public python-netaddr
6441 (package
6442 (name "python-netaddr")
6443 (version "0.7.18")
6444 (source
6445 (origin
6446 (method url-fetch)
6447 (uri (string-append
6448 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6449 version
6450 ".tar.gz"))
6451 (sha256
6452 (base32
6453 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6454 (build-system python-build-system)
6455 (arguments `(#:tests? #f)) ;; No tests.
6456 (home-page "https://github.com/drkjam/netaddr/")
6457 (synopsis "Pythonic manipulation of network addresses")
6458 (description
6459 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6460 and MAC network addresses.")
6461 (license license:bsd-3)))
6462
6463 (define-public python2-netaddr
6464 (package-with-python2 python-netaddr))
6465
6466 (define-public python-wrapt
6467 (package
6468 (name "python-wrapt")
6469 (version "1.10.5")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (string-append
6474 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6475 version
6476 ".tar.gz"))
6477 (sha256
6478 (base32
6479 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6480 (build-system python-build-system)
6481 (arguments
6482 ;; Tests are not included in the tarball, they are only available in the
6483 ;; git repository.
6484 `(#:tests? #f))
6485 (home-page "https://github.com/GrahamDumpleton/wrapt")
6486 (synopsis "Module for decorators, wrappers and monkey patching")
6487 (description
6488 "The aim of the wrapt module is to provide a transparent object proxy for
6489 Python, which can be used as the basis for the construction of function
6490 wrappers and decorator functions.")
6491 (license license:bsd-2)))
6492
6493 (define-public python2-wrapt
6494 (package-with-python2 python-wrapt))
6495
6496 (define-public python-iso8601
6497 (package
6498 (name "python-iso8601")
6499 (version "0.1.11")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "iso8601" version))
6504 (sha256
6505 (base32
6506 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6507 (build-system python-build-system)
6508 (native-inputs
6509 `(("python-pytest" ,python-pytest)))
6510 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6511 (synopsis "Module to parse ISO 8601 dates")
6512 (description
6513 "This module parses the most common forms of ISO 8601 date strings (e.g.
6514 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6515 (license license:expat)))
6516
6517 (define-public python2-iso8601
6518 (package-with-python2 python-iso8601))
6519
6520 (define-public python-monotonic
6521 (package
6522 (name "python-monotonic")
6523 (version "0.3")
6524 (source
6525 (origin
6526 (method url-fetch)
6527 (uri (string-append
6528 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6529 version
6530 ".tar.gz"))
6531 (sha256
6532 (base32
6533 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6534 (build-system python-build-system)
6535 (home-page "https://github.com/atdt/monotonic")
6536 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6537 (description
6538 "This module provides a monotonic() function which returns the value (in
6539 fractional seconds) of a clock which never goes backwards.")
6540 (license license:asl2.0)))
6541
6542 (define-public python2-monotonic
6543 (package-with-python2 python-monotonic))
6544
6545 (define-public python-webob
6546 (package
6547 (name "python-webob")
6548 (version "1.5.1")
6549 (source
6550 (origin
6551 (method url-fetch)
6552 (uri (pypi-uri "WebOb" version))
6553 (sha256
6554 (base32
6555 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6556 (build-system python-build-system)
6557 (native-inputs
6558 `(("python-nose" ,python-nose)))
6559 (home-page "http://webob.org/")
6560 (synopsis "WSGI request and response object")
6561 (description
6562 "WebOb provides wrappers around the WSGI request environment, and an
6563 object to help create WSGI responses.")
6564 (license license:expat)))
6565
6566 (define-public python2-webob
6567 (package-with-python2 python-webob))
6568
6569 (define-public python-xlrd
6570 (package
6571 (name "python-xlrd")
6572 (version "1.0.0")
6573 (source (origin
6574 (method url-fetch)
6575 (uri (pypi-uri "xlrd" version))
6576 (sha256
6577 (base32
6578 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6579 (build-system python-build-system)
6580 (arguments
6581 `(#:phases
6582 (modify-phases %standard-phases
6583 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6584 ;; run tests instead for now.
6585 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6586 (native-inputs `(("python-nose" ,python-nose)))
6587 (home-page "http://www.python-excel.org/")
6588 (synopsis "Library for extracting data from Excel files")
6589 (description "This packages provides a library to extract data from
6590 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6591 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6592 Unicode-aware. It is not intended as an end-user tool.")
6593 (license license:bsd-3)))
6594
6595 (define-public python2-xlrd
6596 (package-with-python2 python-xlrd))
6597
6598 (define-public python-prettytable
6599 (package
6600 (name "python-prettytable")
6601 (version "0.7.2")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (string-append
6606 "https://pypi.python.org/packages/source/P/PrettyTable/"
6607 "prettytable-" version ".tar.bz2"))
6608 (sha256
6609 (base32
6610 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6611 (build-system python-build-system)
6612 (home-page "http://code.google.com/p/prettytable/")
6613 (synopsis "Display tabular data in an ASCII table format")
6614 (description
6615 "A library designed to represent tabular data in visually appealing ASCII
6616 tables. PrettyTable allows for selection of which columns are to be printed,
6617 independent alignment of columns (left or right justified or centred) and
6618 printing of sub-tables by specifying a row range.")
6619 (license license:bsd-3)))
6620
6621 (define-public python2-prettytable
6622 (package-with-python2 python-prettytable))
6623
6624 (define-public python-tables
6625 (package
6626 (name "python-tables")
6627 (version "3.2.2")
6628 (source
6629 (origin
6630 (method url-fetch)
6631 (uri (pypi-uri "tables" version))
6632 (sha256
6633 (base32
6634 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6635 (modules '((guix build utils)))
6636 (snippet
6637 '(begin
6638 ;; Remove pre-compiled .pyc files from source.
6639 (for-each delete-file-recursively
6640 (find-files "." "__pycache__" #:directories? #t))
6641 (for-each delete-file (find-files "." "\\.pyc$"))
6642 #t))))
6643 (build-system python-build-system)
6644 (arguments
6645 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6646 ;; or "check", so we must override the build and check phases.
6647 #:phases
6648 (modify-phases %standard-phases
6649 (add-after 'unpack 'use-gcc
6650 (lambda _
6651 (substitute* "setup.py"
6652 (("compiler = new_compiler\\(\\)" line)
6653 (string-append line
6654 "\ncompiler.set_executables(compiler='gcc',"
6655 "compiler_so='gcc',"
6656 "linker_exe='gcc',"
6657 "linker_so='gcc -shared')")))
6658 #t))
6659 (replace 'build
6660 (lambda* (#:key inputs #:allow-other-keys)
6661 (zero? (system* "python" "setup.py" "build"
6662 (string-append "--hdf5="
6663 (assoc-ref inputs "hdf5"))))))
6664 (replace 'check
6665 (lambda* (#:key inputs #:allow-other-keys)
6666 (zero? (system* "python" "setup.py" "check"
6667 (string-append "--hdf5="
6668 (assoc-ref inputs "hdf5")))))))))
6669 (propagated-inputs
6670 `(("python-numexpr" ,python-numexpr)
6671 ("python-numpy" ,python-numpy)))
6672 (native-inputs
6673 `(("python-cython" ,python-cython)
6674 ("pkg-config" ,pkg-config)))
6675 (inputs
6676 `(("hdf5" ,hdf5)
6677 ("bzip2" ,bzip2)
6678 ("zlib" ,zlib)))
6679 (home-page "http://www.pytables.org/")
6680 (synopsis "Hierarchical datasets for Python")
6681 (description "PyTables is a package for managing hierarchical datasets and
6682 designed to efficently cope with extremely large amounts of data.")
6683 (license license:bsd-3)))
6684
6685 (define-public python2-tables
6686 (package-with-python2 python-tables))
6687
6688 (define-public python-pyasn1
6689 (package
6690 (name "python-pyasn1")
6691 (version "0.1.9")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "pyasn1" version))
6696 (sha256
6697 (base32
6698 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6699 (build-system python-build-system)
6700 (home-page "http://pyasn1.sourceforge.net/")
6701 (synopsis "ASN.1 types and codecs")
6702 (description
6703 "This is an implementation of ASN.1 types and codecs in Python. It is
6704 suitable for a wide range of protocols based on the ASN.1 specification.")
6705 (license license:bsd-2)))
6706
6707 (define-public python2-pyasn1
6708 (package-with-python2 python-pyasn1))
6709
6710 (define-public python-pyasn1-modules
6711 (package
6712 (name "python-pyasn1-modules")
6713 (version "0.0.8")
6714 (source
6715 (origin
6716 (method url-fetch)
6717 (uri (pypi-uri "pyasn1-modules" version))
6718 (sha256
6719 (base32
6720 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6721 (build-system python-build-system)
6722 (propagated-inputs
6723 `(("python-pyasn1" ,python-pyasn1)))
6724 (home-page "https://sourceforge.net/projects/pyasn1/")
6725 (synopsis "ASN.1 codec implementations")
6726 (description
6727 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6728 implementations of ASN.1-based codecs and protocols.")
6729 (license license:bsd-3)))
6730
6731 (define-public python2-pyasn1-modules
6732 (package-with-python2 python-pyasn1-modules))
6733
6734 (define-public python-ipaddress
6735 (package
6736 (name "python-ipaddress")
6737 (version "1.0.16")
6738 (source (origin
6739 (method url-fetch)
6740 (uri (pypi-uri "ipaddress" version))
6741 (sha256
6742 (base32
6743 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6744 (build-system python-build-system)
6745 (home-page "https://github.com/phihag/ipaddress")
6746 (synopsis "IP address manipulation library")
6747 (description
6748 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6749 in Python. This library is used to create, poke at, and manipulate IPv4 and
6750 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6751 module to older versions of Python.")
6752 (license license:psfl)))
6753
6754 (define-public python2-ipaddress
6755 (package-with-python2 python-ipaddress))
6756
6757 (define-public python2-ipaddr
6758 (package
6759 (name "python2-ipaddr")
6760 (version "2.1.11")
6761 (source
6762 (origin
6763 (method url-fetch)
6764 (uri (pypi-uri "ipaddr" version))
6765 (sha256
6766 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6767 (build-system python-build-system)
6768 (arguments
6769 `(#:python ,python-2 ;version 2 only
6770 #:phases
6771 (modify-phases %standard-phases
6772 (replace 'check
6773 (lambda* _
6774 (zero? (system* "python" "ipaddr_test.py")))))))
6775 (home-page "https://github.com/google/ipaddr-py")
6776 (synopsis "IP address manipulation library")
6777 (description
6778 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6779 IPv6 addresses and networks.
6780
6781 For new implementations you may prefer to use the standard module
6782 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6783 versions of Python.")
6784 (license license:asl2.0)))
6785
6786 (define-public python-idna
6787 (package
6788 (name "python-idna")
6789 (version "2.0")
6790 (source
6791 (origin
6792 (method url-fetch)
6793 (uri (string-append "https://pypi.python.org/packages/source/i/"
6794 "idna/idna-" version ".tar.gz"))
6795 (sha256
6796 (base32
6797 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6798 (build-system python-build-system)
6799 (home-page "https://github.com/kjd/idna")
6800 (synopsis "Internationalized domain names in applications")
6801 (description
6802 "This is a library to support the Internationalised Domain Names in
6803 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6804 protocol is often referred to as “IDNA2008” and can produce different results
6805 from the earlier standard from 2003. The library is also intended to act as a
6806 suitable drop-in replacement for the “encodings.idna” module that comes with
6807 the Python standard library but currently only supports the older 2003
6808 specification.")
6809 (license license:bsd-4)))
6810
6811 (define-public python2-idna
6812 (package-with-python2 python-idna))
6813
6814 (define-public python-pretend
6815 (package
6816 (name "python-pretend")
6817 (version "1.0.8")
6818 (source
6819 (origin
6820 (method url-fetch)
6821 (uri (string-append "https://pypi.python.org/packages/source/p/"
6822 "pretend/pretend-" version ".tar.gz"))
6823 (sha256
6824 (base32
6825 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6826 (build-system python-build-system)
6827 (home-page "https://github.com/alex/pretend")
6828 (synopsis "Library for stubbing in Python")
6829 (description
6830 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6831 technique for writing tests. You may hear the term mixed up with mocks,
6832 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6833 responses, rather than doing any computation.")
6834 (license license:bsd-3)))
6835
6836 (define-public python2-pretend
6837 (package-with-python2 python-pretend))
6838
6839 (define-public python-cryptography-vectors
6840 (package
6841 (name "python-cryptography-vectors")
6842 (version "1.7.1")
6843 (source
6844 (origin
6845 (method url-fetch)
6846 (uri (pypi-uri "cryptography_vectors" version))
6847 (sha256
6848 (base32
6849 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
6850 (build-system python-build-system)
6851 (home-page "https://github.com/pyca/cryptography")
6852 (synopsis "Test vectors for the cryptography package")
6853 (description
6854 "This package contains test vectors for the cryptography package.")
6855 ;; Distributed under either BSD-3 or ASL2.0
6856 (license (list license:bsd-3 license:asl2.0))))
6857
6858 (define-public python2-cryptography-vectors
6859 (package-with-python2 python-cryptography-vectors))
6860
6861 (define-public python-cryptography
6862 (package
6863 (name "python-cryptography")
6864 (version "1.7.1")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "cryptography" version))
6869 (sha256
6870 (base32
6871 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
6872 (build-system python-build-system)
6873 (inputs
6874 `(("openssl" ,openssl)))
6875 (propagated-inputs
6876 `(("python-cffi" ,python-cffi)
6877 ("python-six" ,python-six)
6878 ("python-pyasn1" ,python-pyasn1)
6879 ("python-idna" ,python-idna)
6880 ("python-iso8601" ,python-iso8601)))
6881 (native-inputs
6882 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6883 ("python-hypothesis" ,python-hypothesis)
6884 ("python-pretend" ,python-pretend)
6885 ("python-pyasn1" ,python-pyasn1)
6886 ("python-pyasn1-modules" ,python-pyasn1-modules)
6887 ("python-pytz" ,python-pytz)
6888 ("python-pytest" ,python-pytest-2.9.2)))
6889 (home-page "https://github.com/pyca/cryptography")
6890 (synopsis "Cryptographic recipes and primitives for Python")
6891 (description
6892 "cryptography is a package which provides cryptographic recipes and
6893 primitives to Python developers. It aims to be the “cryptographic standard
6894 library” for Python. The package includes both high level recipes, and low
6895 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6896 message digests and key derivation functions.")
6897 ;; Distributed under either BSD-3 or ASL2.0
6898 (license (list license:bsd-3 license:asl2.0))
6899 (properties `((python2-variant . ,(delay python2-cryptography))))))
6900
6901 (define-public python2-cryptography
6902 (let ((crypto (package-with-python2
6903 (strip-python2-variant python-cryptography))))
6904 (package (inherit crypto)
6905 (propagated-inputs
6906 `(("python2-ipaddress" ,python2-ipaddress)
6907 ("python2-backport-ssl-match-hostname"
6908 ,python2-backport-ssl-match-hostname)
6909 ("python2-enum34" ,python2-enum34)
6910 ,@(package-propagated-inputs crypto))))))
6911
6912 (define-public python-pyopenssl
6913 (package
6914 (name "python-pyopenssl")
6915 (version "16.2.0")
6916 (source
6917 (origin
6918 (method url-fetch)
6919 (uri (pypi-uri "pyOpenSSL" version))
6920 (sha256
6921 (base32
6922 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
6923 (patches
6924 (search-patches "python-pyopenssl-skip-network-test.patch"))))
6925 (build-system python-build-system)
6926 (arguments
6927 '(#:phases
6928 (modify-phases %standard-phases
6929 (delete 'check)
6930 (add-after 'install 'check
6931 (lambda* (#:key inputs outputs #:allow-other-keys)
6932 (add-installed-pythonpath inputs outputs)
6933 (zero? (system* "py.test" "-v")))))))
6934 (propagated-inputs
6935 `(("python-cryptography" ,python-cryptography)
6936 ("python-six" ,python-six)))
6937 (inputs
6938 `(("openssl" ,openssl)))
6939 (native-inputs
6940 `(("python-pytest" ,python-pytest)))
6941 (home-page "https://github.com/pyca/pyopenssl")
6942 (synopsis "Python wrapper module around the OpenSSL library")
6943 (description
6944 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6945 library.")
6946 (license license:asl2.0)))
6947
6948 (define-public python2-pyopenssl
6949 (package-with-python2 python-pyopenssl))
6950
6951 (define-public python-pip
6952 (package
6953 (name "python-pip")
6954 (version "9.0.1")
6955 (source
6956 (origin
6957 (method url-fetch)
6958 (uri (pypi-uri "pip" version))
6959 (sha256
6960 (base32
6961 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6962 (build-system python-build-system)
6963 (arguments
6964 '(#:tests? #f)) ; there are no tests in the pypi archive.
6965 (home-page "https://pip.pypa.io/")
6966 (synopsis "Package manager for Python software")
6967 (description
6968 "Pip is a package manager for Python software, that finds packages on the
6969 Python Package Index (PyPI).")
6970 (license license:expat)))
6971
6972 (define-public python2-pip
6973 (package-with-python2 python-pip))
6974
6975 (define-public python-tlsh
6976 (package
6977 (name "python-tlsh")
6978 (version "3.4.4")
6979 (home-page "https://github.com/trendmicro/tlsh")
6980 (source (origin
6981 (method url-fetch)
6982 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6983 version ".tar.gz"))
6984 (sha256
6985 (base32
6986 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6987 (file-name (string-append name "-" version ".tar.gz"))))
6988 (build-system cmake-build-system)
6989 (arguments
6990 '(#:out-of-source? #f
6991 #:phases (modify-phases %standard-phases
6992 (replace
6993 'install
6994 (lambda* (#:key outputs #:allow-other-keys)
6995 ;; Build and install the Python bindings. The underlying
6996 ;; C++ library is apparently not meant to be installed.
6997 (let ((out (assoc-ref outputs "out")))
6998 (with-directory-excursion "py_ext"
6999 (and (system* "python" "setup.py" "build")
7000 (system* "python" "setup.py" "install"
7001 (string-append "--prefix=" out))))))))))
7002 (inputs `(("python" ,python-wrapper))) ;for the bindings
7003 (synopsis "Fuzzy matching library for Python")
7004 (description
7005 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7006 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7007 value which can be used for similarity comparisons. Similar objects have
7008 similar hash values, which allows for the detection of similar objects by
7009 comparing their hash values. The byte stream should have a sufficient amount
7010 of complexity; for example, a byte stream of identical bytes will not generate
7011 a hash value.")
7012 (license license:asl2.0)))
7013
7014 (define-public python2-tlsh
7015 (package
7016 (inherit python-tlsh)
7017 (name "python2-tlsh")
7018 (inputs `(("python" ,python-2)))))
7019
7020 (define-public python-termcolor
7021 (package
7022 (name "python-termcolor")
7023 (version "1.1.0")
7024 (source
7025 (origin
7026 (method url-fetch)
7027 (uri (pypi-uri "python-termcolor" version))
7028 (sha256
7029 (base32
7030 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7031 (build-system python-build-system)
7032 (arguments
7033 ;; There are no tests.
7034 `(#:tests? #f))
7035 (home-page "http://pypi.python.org/pypi/termcolor")
7036 (synopsis "ANSII Color formatting for terminal output")
7037 (description
7038 "This package provides ANSII Color formatting for output in terminals.")
7039 (license license:expat)))
7040
7041 (define-public python2-termcolor
7042 (package-with-python2 python-termcolor))
7043
7044 (define-public python-libarchive-c
7045 (package
7046 (name "python-libarchive-c")
7047 (version "2.2")
7048 (source (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "libarchive-c" version))
7051 (sha256
7052 (base32
7053 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7054 (build-system python-build-system)
7055 (arguments
7056 '(#:phases (modify-phases %standard-phases
7057 (add-before
7058 'build 'reference-libarchive
7059 (lambda* (#:key inputs #:allow-other-keys)
7060 ;; Retain the absolute file name of libarchive.so.
7061 (let ((libarchive (assoc-ref inputs "libarchive")))
7062 (substitute* "libarchive/ffi.py"
7063 (("find_library\\('archive'\\)")
7064 (string-append "'" libarchive
7065 "/lib/libarchive.so'")))))))))
7066 (inputs
7067 `(("libarchive" ,libarchive)))
7068 (home-page "https://github.com/Changaco/python-libarchive-c")
7069 (synopsis "Python interface to libarchive")
7070 (description
7071 "This package provides Python bindings to libarchive, a C library to
7072 access possibly compressed archives in many different formats. It uses
7073 Python's @code{ctypes} foreign function interface (FFI).")
7074 (license license:lgpl2.0+)))
7075
7076 (define-public python2-libarchive-c
7077 (package-with-python2 python-libarchive-c))
7078
7079 (define-public python-file
7080 (package
7081 (inherit file)
7082 (name "python-file")
7083 (source (origin
7084 (inherit (package-source file))
7085 ;; This patch should not be applied to python2-file.
7086 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7087 (build-system python-build-system)
7088 (arguments
7089 '(#:tests? #f ;no tests
7090 #:configure-flags '("--single-version-externally-managed" "--root=/")
7091 #:phases (modify-phases %standard-phases
7092 (add-before 'build 'change-directory
7093 (lambda _
7094 (chdir "python")
7095 #t))
7096 (add-before 'build 'set-library-file-name
7097 (lambda* (#:key inputs #:allow-other-keys)
7098 (let ((file (assoc-ref inputs "file")))
7099 (substitute* "magic.py"
7100 (("find_library\\('magic'\\)")
7101 (string-append "'" file "/lib/libmagic.so'")))
7102 #t))))))
7103 (inputs `(("file" ,file)))
7104 (self-native-input? #f)
7105 (synopsis "Python bindings to the libmagic file type guesser. Note that
7106 this module and the python-magic module both provide a \"magic.py\" file;
7107 these two modules, which are different and were developed separately, both
7108 serve the same purpose: provide Python bindings for libmagic.")))
7109
7110 (define-public python2-file
7111 (package-with-python2 python-file))
7112
7113 (define-public python-debian
7114 (package
7115 (name "python-debian")
7116 (version "0.1.23")
7117 (source
7118 (origin
7119 (method url-fetch)
7120 (uri (string-append
7121 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
7122 version ".tar.gz"))
7123 (sha256
7124 (base32
7125 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
7126 (build-system python-build-system)
7127 (propagated-inputs
7128 `(("python-six" ,python-six)))
7129 (home-page "http://packages.debian.org/sid/python-debian")
7130 (synopsis "Debian package related modules")
7131 (description
7132 ;; XXX: Use @enumerate instead of @itemize to work around
7133 ;; <http://bugs.gnu.org/21772>.
7134 "This package provides Python modules that abstract many formats of
7135 Debian-related files, such as:
7136
7137 @enumerate
7138 @item Debtags information;
7139 @item @file{debian/changelog} files;
7140 @item packages files, pdiffs;
7141 @item control files of single or multiple RFC822-style paragraphs---e.g.
7142 @file{debian/control}, @file{.changes}, @file{.dsc};
7143 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7144 contained files and meta-information.
7145 @end enumerate\n")
7146
7147 ;; Modules are either GPLv2+ or GPLv3+.
7148 (license license:gpl3+)))
7149
7150 (define-public python2-debian
7151 (package-with-python2 python-debian))
7152
7153 (define-public python-nbformat
7154 (package
7155 (name "python-nbformat")
7156 (version "4.1.0")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (pypi-uri "nbformat" version))
7161 (sha256
7162 (base32
7163 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7164 (build-system python-build-system)
7165 (arguments `(#:tests? #f)) ; no test target
7166 (propagated-inputs
7167 `(("python-ipython-genutils" ,python-ipython-genutils)
7168 ("python-jsonschema" ,python-jsonschema)
7169 ("python-jupyter-core" ,python-jupyter-core)
7170 ("python-traitlets" ,python-traitlets)))
7171 (home-page "http://jupyter.org")
7172 (synopsis "Jupyter Notebook format")
7173 (description "This package provides the reference implementation of the
7174 Jupyter Notebook format and Python APIs for working with notebooks.")
7175 (license license:bsd-3)))
7176
7177 (define-public python2-nbformat
7178 (package-with-python2 python-nbformat))
7179
7180 (define-public python-bleach
7181 (package
7182 (name "python-bleach")
7183 (version "1.4.3")
7184 (source
7185 (origin
7186 (method url-fetch)
7187 (uri (pypi-uri "bleach" version))
7188 (sha256
7189 (base32
7190 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7191 (build-system python-build-system)
7192 (propagated-inputs
7193 `(("python-html5lib" ,python-html5lib-0.9)
7194 ("python-six" ,python-six)))
7195 (native-inputs
7196 `(("python-nose" ,python-nose)))
7197 (home-page "http://github.com/jsocol/bleach")
7198 (synopsis "Whitelist-based HTML-sanitizing tool")
7199 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7200 (license license:asl2.0)))
7201
7202 (define-public python2-bleach
7203 (package-with-python2 python-bleach))
7204
7205 (define-public python-entrypoints
7206 (package
7207 (name "python-entrypoints")
7208 (version "0.2.2")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7213 version ".tar.gz"))
7214 (file-name (string-append name "-" version ".tar.gz"))
7215 (sha256
7216 (base32
7217 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7218 (build-system python-build-system)
7219 ;; The package does not come with a setup.py file, so we have to generate
7220 ;; one ourselves.
7221 (arguments
7222 `(#:tests? #f
7223 #:phases
7224 (modify-phases %standard-phases
7225 (add-after 'unpack 'create-setup.py
7226 (lambda _
7227 (call-with-output-file "setup.py"
7228 (lambda (port)
7229 (format port "\
7230 from setuptools import setup
7231 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7232 " ,version))))))))
7233 (home-page "https://github.com/takluyver/entrypoints")
7234 (synopsis "Discover and load entry points from installed Python packages")
7235 (description "Entry points are a way for Python packages to advertise
7236 objects with some common interface. The most common examples are
7237 @code{console_scripts} entry points, which define shell commands by
7238 identifying a Python function to run. The @code{entrypoints} module contains
7239 functions to find and load entry points.")
7240 (license license:expat)))
7241
7242 (define-public python2-entrypoints
7243 (package-with-python2 python-entrypoints))
7244
7245 (define-public python-nbconvert
7246 (package
7247 (name "python-nbconvert")
7248 (version "5.0.0b1")
7249 (source
7250 (origin
7251 (method url-fetch)
7252 (uri (pypi-uri "nbconvert" version))
7253 (sha256
7254 (base32
7255 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7256 (build-system python-build-system)
7257 (arguments
7258 `(;; The "bdist_egg" target is disabled by default, causing the installation
7259 ;; to fail.
7260 #:configure-flags (list "bdist_egg")
7261 ;; FIXME: 5 failures, 40 errors.
7262 #:tests? #f))
7263 ;; #:phases
7264 ;; (modify-phases %standard-phases
7265 ;; (replace 'check
7266 ;; (lambda _
7267 ;; (zero? (system* "py.test" "-v")))))
7268 (native-inputs
7269 `(("python-pytest" ,python-pytest)))
7270 (propagated-inputs
7271 `(("python-bleach" ,python-bleach)
7272 ("python-entrypoints" ,python-entrypoints)
7273 ("python-jinja2" ,python-jinja2)
7274 ("python-jupyter-core" ,python-jupyter-core)
7275 ("python-mistune" ,python-mistune)
7276 ("python-nbformat" ,python-nbformat)
7277 ("python-pygments" ,python-pygments)
7278 ("python-traitlets" ,python-traitlets)))
7279 (home-page "http://jupyter.org")
7280 (synopsis "Converting Jupyter Notebooks")
7281 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7282 notebooks to various other formats via Jinja templates. It allows you to
7283 convert an @code{.ipynb} notebook file into various static formats including:
7284
7285 @enumerate
7286 @item HTML
7287 @item LaTeX
7288 @item PDF
7289 @item Reveal JS
7290 @item Markdown (md)
7291 @item ReStructured Text (rst)
7292 @item executable script
7293 @end enumerate\n")
7294 (license license:bsd-3)))
7295
7296 (define-public python2-nbconvert
7297 (package-with-python2 python-nbconvert))
7298
7299 (define-public python-notebook
7300 (package
7301 (name "python-notebook")
7302 (version "4.2.3")
7303 (source (origin
7304 (method url-fetch)
7305 (uri (pypi-uri "notebook" version))
7306 (sha256
7307 (base32
7308 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7309 (build-system python-build-system)
7310 (arguments
7311 `(#:phases
7312 (modify-phases %standard-phases
7313 (replace 'check
7314 (lambda _
7315 ;; HOME must be set for tests
7316 (setenv "HOME" "/tmp")
7317 (zero? (system* "nosetests")))))))
7318 (propagated-inputs
7319 `(("python-jupyter-core" ,python-jupyter-core)
7320 ("python-nbformat" ,python-nbformat)
7321 ("python-nbconvert" ,python-nbconvert)
7322 ("python-ipython" ,python-ipython)))
7323 (native-inputs
7324 `(("python-nose" ,python-nose)
7325 ("python-sphinx" ,python-sphinx)
7326 ("python-requests" ,python-requests)))
7327 (home-page "http://jupyter.org/")
7328 (synopsis "Web-based notebook environment for interactive computing")
7329 (description
7330 "The Jupyter HTML notebook is a web-based notebook environment for
7331 interactive computing.")
7332 (properties `((python2-variant . ,(delay python2-notebook))))
7333 (license license:bsd-3)))
7334
7335 (define-public python2-notebook
7336 (let ((base (package-with-python2
7337 (strip-python2-variant python-notebook))))
7338 (package (inherit base)
7339 (native-inputs
7340 `(("python2-mock" ,python2-mock)
7341 ,@(package-native-inputs base)))
7342 (arguments
7343 (substitute-keyword-arguments (package-arguments base)
7344 ((#:phases phases)
7345 `(modify-phases ,phases
7346 (add-before 'check 'disable-test-case
7347 ;; The test requires network access to localhost. Curiously it
7348 ;; fails with Python 2 only. Simply make the test-case return
7349 ;; immediately.
7350 (lambda _
7351 (substitute*
7352 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7353 (("formats = self.nbconvert_api") "return #")))))))))))
7354
7355 (define-public python-widgetsnbextension
7356 (package
7357 (name "python-widgetsnbextension")
7358 (version "1.2.6")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "widgetsnbextension" version))
7363 (sha256
7364 (base32
7365 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7366 (build-system python-build-system)
7367 (propagated-inputs
7368 `(("python-notebook" ,python-notebook)))
7369 (native-inputs
7370 `(("python-certifi" ,python-certifi)
7371 ("python-nose" ,python-nose)))
7372 (home-page "http://ipython.org")
7373 (synopsis "IPython HTML widgets for Jupyter")
7374 (description "This package provides interactive HTML widgets for Jupyter
7375 notebooks.")
7376 (license license:bsd-3)))
7377
7378 (define-public python2-widgetsnbextension
7379 (package-with-python2 python-widgetsnbextension))
7380
7381 (define-public python-ipywidgets
7382 (package
7383 (name "python-ipywidgets")
7384 (version "5.2.2")
7385 (source
7386 (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "ipywidgets" version))
7389 (sha256
7390 (base32
7391 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7392 (build-system python-build-system)
7393 ;; FIXME: it's not clear how to run the tests.
7394 (arguments `(#:tests? #f))
7395 (propagated-inputs
7396 `(("python-ipykernel" ,python-ipykernel)
7397 ("python-ipython" ,python-ipython)
7398 ("python-traitlets" ,python-traitlets)
7399 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7400 (home-page "http://ipython.org")
7401 (synopsis "IPython HTML widgets for Jupyter")
7402 (description "Ipywidgets are interactive HTML widgets for Jupyter
7403 notebooks and the IPython kernel. Notebooks come alive when interactive
7404 widgets are used. Users gain control of their data and can visualize changes
7405 in the data.")
7406 (license license:bsd-3)))
7407
7408 (define-public python2-ipywidgets
7409 (package-with-python2 python-ipywidgets))
7410
7411 (define-public python-jupyter-console
7412 (package
7413 (name "python-jupyter-console")
7414 (version "5.0.0")
7415 (source
7416 (origin
7417 (method url-fetch)
7418 (uri (pypi-uri "jupyter_console" version))
7419 (sha256
7420 (base32
7421 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7422 (build-system python-build-system)
7423 ;; FIXME: it's not clear how to run the tests.
7424 (arguments `(#:tests? #f))
7425 (propagated-inputs
7426 `(("python-ipykernel" ,python-ipykernel)
7427 ("python-ipython" ,python-ipython)
7428 ("python-jupyter-client" ,python-jupyter-client)
7429 ("python-prompt-toolkit" ,python-prompt-toolkit)
7430 ("python-pygments" ,python-pygments)))
7431 (home-page "https://jupyter.org")
7432 (synopsis "Jupyter terminal console")
7433 (description "This package provides a terminal-based console frontend for
7434 Jupyter kernels. It also allows for console-based interaction with non-Python
7435 Jupyter kernels such as IJulia and IRKernel.")
7436 (license license:bsd-3)))
7437
7438 (define-public python2-jupyter-console
7439 (package-with-python2 python-jupyter-console))
7440
7441 (define-public jupyter
7442 (package
7443 (name "jupyter")
7444 (version "1.0.0")
7445 (source
7446 (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "jupyter" version))
7449 (sha256
7450 (base32
7451 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7452 (build-system python-build-system)
7453 ;; FIXME: it's not clear how to run the tests.
7454 (arguments `(#:tests? #f))
7455 (propagated-inputs
7456 `(("python-ipykernel" ,python-ipykernel)
7457 ("python-ipywidgets" ,python-ipywidgets)
7458 ("python-jupyter-console" ,python-jupyter-console)
7459 ("python-nbconvert" ,python-nbconvert)
7460 ("python-notebook" ,python-notebook)))
7461 (home-page "http://jupyter.org")
7462 (synopsis "Web application for interactive documents")
7463 (description
7464 "The Jupyter Notebook is a web application that allows you to create and
7465 share documents that contain live code, equations, visualizations and
7466 explanatory text. Uses include: data cleaning and transformation, numerical
7467 simulation, statistical modeling, machine learning and much more.")
7468 (license license:bsd-3)))
7469
7470 (define-public python-chardet
7471 (package
7472 (name "python-chardet")
7473 (version "2.3.0")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (string-append
7478 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7479 version
7480 ".tar.gz"))
7481 (sha256
7482 (base32
7483 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7484 (build-system python-build-system)
7485 (home-page "https://github.com/chardet/chardet")
7486 (synopsis "Universal encoding detector for Python 2 and 3")
7487 (description
7488 "This package provides @code{chardet}, a Python module that can
7489 automatically detect a wide range of file encodings.")
7490 (license license:lgpl2.1+)))
7491
7492 (define-public python2-chardet
7493 (package-with-python2 python-chardet))
7494
7495 (define-public python-docopt
7496 (package
7497 (name "python-docopt")
7498 (version "0.6.2")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 ;; The release on PyPI does not include tests.
7503 (uri (string-append
7504 "https://github.com/docopt/docopt/archive/"
7505 version ".tar.gz"))
7506 (file-name (string-append name "-" version ".tar.gz"))
7507 (sha256
7508 (base32
7509 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7510 (build-system python-build-system)
7511 (native-inputs
7512 `(("python-pytest" ,python-pytest)))
7513 (arguments
7514 `(#:phases (alist-replace
7515 'check
7516 (lambda _ (zero? (system* "py.test")))
7517 %standard-phases)))
7518 (home-page "http://docopt.org")
7519 (synopsis "Command-line interface description language for Python")
7520 (description "This library allows the user to define a command-line
7521 interface from a program's help message rather than specifying it
7522 programatically with command-line parsers like @code{getopt} and
7523 @code{argparse}.")
7524 (license license:expat)))
7525
7526 (define-public python2-docopt
7527 (package-with-python2 python-docopt))
7528
7529 (define-public python-zope-event
7530 (package
7531 (name "python-zope-event")
7532 (version "4.1.0")
7533 (source
7534 (origin
7535 (method url-fetch)
7536 (uri (string-append "https://pypi.python.org/packages/source/z"
7537 "/zope.event/zope.event-" version ".tar.gz"))
7538 (sha256
7539 (base32
7540 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7541 (build-system python-build-system)
7542 (home-page "http://pypi.python.org/pypi/zope.event")
7543 (synopsis "Event publishing system for Python")
7544 (description "Zope.event provides an event publishing API, intended for
7545 use by applications which are unaware of any subscribers to their events. It
7546 is a simple event-dispatching system on which more sophisticated event
7547 dispatching systems can be built.")
7548 (license license:zpl2.1)))
7549
7550 (define-public python2-zope-event
7551 (package-with-python2 python-zope-event))
7552
7553 (define-public python-zope-interface
7554 (package
7555 (name "python-zope-interface")
7556 (version "4.1.3")
7557 (source
7558 (origin
7559 (method url-fetch)
7560 (uri (string-append "https://pypi.python.org/packages/source/z"
7561 "/zope.interface/zope.interface-" version ".tar.gz"))
7562 (sha256
7563 (base32
7564 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7565 (build-system python-build-system)
7566 (native-inputs
7567 `(("python-zope-event" ,python-zope-event)))
7568 (home-page "https://github.com/zopefoundation/zope.interface")
7569 (synopsis "Python implementation of the \"design by contract\"
7570 methodology")
7571 (description "Zope.interface provides an implementation of \"object
7572 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7573 conforming to a given API or contract.")
7574 (license license:zpl2.1)))
7575
7576 (define-public python2-zope-interface
7577 (package-with-python2 python-zope-interface))
7578
7579 (define-public python-zope-exceptions
7580 (package
7581 (name "python-zope-exceptions")
7582 (version "4.0.8")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (string-append "https://pypi.python.org/packages/source/z"
7587 "/zope.exceptions/zope.exceptions-"
7588 version ".tar.gz"))
7589 (sha256
7590 (base32
7591 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7592 (build-system python-build-system)
7593 (arguments
7594 '(#:tests? #f)) ; circular dependency with zope.testrunner
7595 (propagated-inputs
7596 `(("python-zope-interface" ,python-zope-interface)))
7597 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7598 (synopsis "Zope exceptions")
7599 (description "Zope.exceptions provides general-purpose exception types
7600 that have uses outside of the Zope framework.")
7601 (license license:zpl2.1)))
7602
7603 (define-public python2-zope-exceptions
7604 (package-with-python2 python-zope-exceptions))
7605
7606 (define-public python-zope-testing
7607 (package
7608 (name "python-zope-testing")
7609 (version "4.5.0")
7610 (source
7611 (origin
7612 (method url-fetch)
7613 (uri (string-append "https://pypi.python.org/packages/source/z"
7614 "/zope.testing/zope.testing-" version ".tar.gz"))
7615 (sha256
7616 (base32
7617 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7618 (modules '((guix build utils)))
7619 (snippet
7620 '(begin
7621 ;; Remove pre-compiled .pyc files backup files from source.
7622 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7623 #t))))
7624 (build-system python-build-system)
7625 (native-inputs
7626 `(("python-zope-exceptions" ,python-zope-exceptions)))
7627 (propagated-inputs
7628 `(("python-zope-interface" ,python-zope-interface)))
7629 (home-page "http://pypi.python.org/pypi/zope.testing")
7630 (synopsis "Zope testing helpers")
7631 (description "Zope.testing provides a number of testing utilities for HTML
7632 forms, HTTP servers, regular expressions, and more.")
7633 (license license:zpl2.1)))
7634
7635 (define-public python2-zope-testing
7636 (package-with-python2 python-zope-testing))
7637
7638 (define-public python-zope-testrunner
7639 (package
7640 (name "python-zope-testrunner")
7641 (version "4.4.9")
7642 (source
7643 (origin
7644 (method url-fetch)
7645 (uri (string-append "https://pypi.python.org/packages/source/z"
7646 "/zope.testrunner/zope.testrunner-"
7647 version ".zip"))
7648 (sha256
7649 (base32
7650 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7651 (build-system python-build-system)
7652 (arguments
7653 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
7654 (native-inputs
7655 `(("python-six" ,python-six)
7656 ;("python-zope-interface" ,python-zope-interface)
7657 ("python-zope-exceptions" ,python-zope-exceptions)
7658 ("python-zope-testing" ,python-zope-testing)
7659 ("unzip" ,unzip)))
7660 (propagated-inputs
7661 `(("python-zope-interface" ,python-zope-interface)))
7662 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7663 (synopsis "Zope testrunner script")
7664 (description "Zope.testrunner provides a script for running Python
7665 tests.")
7666 (license license:zpl2.1)))
7667
7668 (define-public python2-zope-testrunner
7669 (let ((base (package-with-python2 python-zope-testrunner)))
7670 (package
7671 (inherit base)
7672 (native-inputs
7673 (append (package-native-inputs base)
7674 `(("python2-subunit" ,python2-subunit)
7675 ("python2-mimeparse" ,python2-mimeparse)))))))
7676
7677 (define-public python-zope-i18nmessageid
7678 (package
7679 (name "python-zope-i18nmessageid")
7680 (version "4.0.3")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (string-append
7685 "https://pypi.python.org/packages/source/z"
7686 "/zope.i18nmessageid/zope.i18nmessageid-"
7687 version ".tar.gz"))
7688 (sha256
7689 (base32
7690 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7691 (build-system python-build-system)
7692 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7693 (synopsis "Message identifiers for internationalization")
7694 (description "Zope.i18nmessageid provides facilities for declaring
7695 internationalized messages within program source text.")
7696 (license license:zpl2.1)))
7697
7698 (define-public python2-zope-i18nmessageid
7699 (package-with-python2 python-zope-i18nmessageid))
7700
7701 (define-public python-zope-schema
7702 (package
7703 (name "python-zope-schema")
7704 (version "4.4.2")
7705 (source
7706 (origin
7707 (method url-fetch)
7708 (uri (string-append "https://pypi.python.org/packages/source/z"
7709 "/zope.schema/zope.schema-" version ".tar.gz"))
7710 (sha256
7711 (base32
7712 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7713 (build-system python-build-system)
7714 (arguments
7715 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
7716 (propagated-inputs
7717 `(("python-zope-event" ,python-zope-event)
7718 ("python-zope-exceptions", python-zope-exceptions)
7719 ("python-zope-interface" ,python-zope-interface)))
7720 (native-inputs
7721 `(("python-zope-testing" ,python-zope-testing)
7722 ("python-coverage" ,python-coverage)
7723 ("python-nose" ,python-nose)))
7724 (home-page "http://pypi.python.org/pypi/zope.schema")
7725 (synopsis "Zope data schemas")
7726 (description "Zope.scheme provides extensions to zope.interface for
7727 defining data schemas.")
7728 (license license:zpl2.1)))
7729
7730 (define-public python2-zope-schema
7731 (package-with-python2 python-zope-schema))
7732
7733 (define-public python-zope-configuration
7734 (package
7735 (name "python-zope-configuration")
7736 (version "4.0.3")
7737 (source (origin
7738 (method url-fetch)
7739 (uri (string-append "https://pypi.python.org/packages/source/z"
7740 "/zope.configuration/zope.configuration-"
7741 version ".tar.gz"))
7742 (sha256
7743 (base32
7744 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7745 (build-system python-build-system)
7746 (arguments
7747 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
7748 (propagated-inputs
7749 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7750 ("python-zope-schema" ,python-zope-schema)))
7751 (home-page "http://pypi.python.org/pypi/zope.configuration")
7752 (synopsis "Zope Configuration Markup Language")
7753 (description "Zope.configuration implements ZCML, the Zope Configuration
7754 Markup Language.")
7755 (license license:zpl2.1)))
7756
7757 (define-public python2-zope-configuration
7758 (package-with-python2 python-zope-configuration))
7759
7760 (define-public python-zope-proxy
7761 (package
7762 (name "python-zope-proxy")
7763 (version "4.1.6")
7764 (source
7765 (origin
7766 (method url-fetch)
7767 (uri (string-append "https://pypi.python.org/packages/source/z"
7768 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7769 (sha256
7770 (base32
7771 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7772 (build-system python-build-system)
7773 (arguments
7774 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
7775 (propagated-inputs
7776 `(("python-zope-interface" ,python-zope-interface)))
7777 (home-page "http://pypi.python.org/pypi/zope.proxy")
7778 (synopsis "Generic, transparent proxies")
7779 (description "Zope.proxy provides generic, transparent proxies for Python.
7780 Proxies are special objects which serve as mostly-transparent wrappers around
7781 another object, intervening in the apparent behavior of the wrapped object
7782 only when necessary to apply the policy (e.g., access checking, location
7783 brokering, etc.) for which the proxy is responsible.")
7784 (license license:zpl2.1)))
7785
7786 (define-public python2-zope-proxy
7787 (package-with-python2 python-zope-proxy))
7788
7789 (define-public python-zope-location
7790 (package
7791 (name "python-zope-location")
7792 (version "4.0.3")
7793 (source
7794 (origin
7795 (method url-fetch)
7796 (uri (string-append "https://pypi.python.org/packages/source/z"
7797 "/zope.location/zope.location-" version ".tar.gz"))
7798 (sha256
7799 (base32
7800 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7801 (build-system python-build-system)
7802 (arguments
7803 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
7804 (propagated-inputs
7805 `(("python-zope-proxy" ,python-zope-proxy)
7806 ("python-zope-schema" ,python-zope-schema)))
7807 (home-page "http://pypi.python.org/pypi/zope.location/")
7808 (synopsis "Zope location library")
7809 (description "Zope.location implements the concept of \"locations\" in
7810 Zope3, which are are special objects that have a structural location.")
7811 (license license:zpl2.1)))
7812
7813 (define-public python2-zope-location
7814 (package-with-python2 python-zope-location))
7815
7816 (define-public python-zope-security
7817 (package
7818 (name "python-zope-security")
7819 (version "4.0.3")
7820 (source
7821 (origin
7822 (method url-fetch)
7823 (uri (string-append "https://pypi.python.org/packages/source/z"
7824 "/zope.security/zope.security-" version ".tar.gz"))
7825 (sha256
7826 (base32
7827 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7828 (build-system python-build-system)
7829 (arguments
7830 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
7831 (propagated-inputs
7832 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7833 ("python-zope-proxy" ,python-zope-proxy)
7834 ("python-zope-schema" ,python-zope-schema)))
7835 (native-inputs
7836 `(("python-six" ,python-six)
7837 ("python-zope-component" ,python-zope-component)
7838 ("python-zope-configuration" ,python-zope-configuration)
7839 ("python-zope-location" ,python-zope-location)
7840 ("python-zope-testrunner" ,python-zope-testrunner)
7841 ("python-zope-testing" ,python-zope-testing)))
7842 (home-page "http://pypi.python.org/pypi/zope.security")
7843 (synopsis "Zope security framework")
7844 (description "Zope.security provides a generic mechanism to implement
7845 security policies on Python objects.")
7846 (license license:zpl2.1)))
7847
7848 (define-public python2-zope-security
7849 (let ((zope-security (package-with-python2 python-zope-security)))
7850 (package (inherit zope-security)
7851 (propagated-inputs
7852 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7853 ,@(alist-delete
7854 "python-zope-testrunner"
7855 (package-propagated-inputs zope-security)))))))
7856
7857 (define-public python-zope-component
7858 (package
7859 (name "python-zope-component")
7860 (version "4.2.2")
7861 (source
7862 (origin
7863 (method url-fetch)
7864 (uri (string-append "https://pypi.python.org/packages/source/z"
7865 "/zope.component/zope.component-" version ".tar.gz"))
7866 (sha256
7867 (base32
7868 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7869 (build-system python-build-system)
7870 (arguments
7871 ;; Skip tests due to circular dependency with python-zope-security.
7872 '(#:tests? #f))
7873 (native-inputs
7874 `(("python-zope-testing" ,python-zope-testing)))
7875 (propagated-inputs
7876 `(("python-zope-event" ,python-zope-event)
7877 ("python-zope-interface" ,python-zope-interface)
7878 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7879 ("python-zope-configuration" ,python-zope-configuration)))
7880 (home-page "https://github.com/zopefoundation/zope.component")
7881 (synopsis "Zope Component Architecture")
7882 (description "Zope.component represents the core of the Zope Component
7883 Architecture. Together with the zope.interface package, it provides
7884 facilities for defining, registering and looking up components.")
7885 (license license:zpl2.1)))
7886
7887 (define-public python2-zope-component
7888 (package-with-python2 python-zope-component))
7889
7890 (define-public python-pythondialog
7891 (package
7892 (name "python-pythondialog")
7893 (version "3.4.0")
7894 (source
7895 (origin
7896 (method url-fetch)
7897 (uri (pypi-uri "pythondialog" version))
7898 (sha256
7899 (base32
7900 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7901 (build-system python-build-system)
7902 (arguments
7903 `(#:phases
7904 (modify-phases %standard-phases
7905 (add-after 'unpack 'patch-path
7906 (lambda* (#:key inputs #:allow-other-keys)
7907 (let* ((dialog (assoc-ref inputs "dialog")))
7908 ;; Since this library really wants to grovel the search path, we
7909 ;; must hardcode dialog's store path into it.
7910 (substitute* "dialog.py"
7911 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7912 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7913 #t))))
7914 #:tests? #f)) ; no test suite
7915 (propagated-inputs
7916 `(("dialog" ,dialog)))
7917 (home-page "http://pythondialog.sourceforge.net/")
7918 (synopsis "Python interface to the UNIX dialog utility")
7919 (description "A Python wrapper for the dialog utility. Its purpose is to
7920 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7921 This allows one to make simple text-mode user interfaces on Unix-like systems")
7922 (license license:lgpl2.1)
7923 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7924
7925 (define-public python2-pythondialog
7926 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7927 (package
7928 (inherit base)
7929 (version (package-version python-pythondialog))
7930 (source (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "python2-pythondialog" version))
7933 (sha256
7934 (base32
7935 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7936
7937 (define-public python-pyrfc3339
7938 (package
7939 (name "python-pyrfc3339")
7940 (version "1.0")
7941 (source
7942 (origin
7943 (method url-fetch)
7944 (uri (pypi-uri "pyRFC3339" version))
7945 (sha256
7946 (base32
7947 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7948 (build-system python-build-system)
7949 (propagated-inputs
7950 `(("python-pytz" ,python-pytz)))
7951 (native-inputs
7952 `(("python-nose" ,python-nose)))
7953 (home-page "https://github.com/kurtraschke/pyRFC3339")
7954 (synopsis "Python timestamp library")
7955 (description "Python library for generating and parsing RFC 3339-compliant
7956 timestamps.")
7957 (license license:expat)))
7958
7959 (define-public python2-pyrfc3339
7960 (package-with-python2 python-pyrfc3339))
7961
7962 (define-public python-werkzeug
7963 (package
7964 (name "python-werkzeug")
7965 (version "0.11.15")
7966 (source
7967 (origin
7968 (method url-fetch)
7969 (uri (pypi-uri "Werkzeug" version))
7970 (sha256
7971 (base32
7972 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
7973 (build-system python-build-system)
7974 (native-inputs
7975 `(("python-pytest" ,python-pytest)))
7976 (home-page "http://werkzeug.pocoo.org/")
7977 (synopsis "Utilities for WSGI applications")
7978 (description "One of the most advanced WSGI utility modules. It includes a
7979 powerful debugger, full-featured request and response objects, HTTP utilities to
7980 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7981 uploads, a powerful URL routing system and a bunch of community-contributed
7982 addon modules.")
7983 (license license:x11)))
7984
7985 (define-public python2-werkzeug
7986 (package-with-python2 python-werkzeug))
7987
7988 (define-public python-configobj
7989 (package
7990 (name "python-configobj")
7991 (version "5.0.6")
7992 (source (origin
7993 (method url-fetch)
7994 (uri (string-append
7995 "https://pypi.python.org/packages/source/c/configobj/"
7996 "configobj-" version ".tar.gz"))
7997 (sha256
7998 (base32
7999 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8000 ;; Patch setup.py so it looks for python-setuptools, which is
8001 ;; required to parse the keyword 'install_requires' in setup.py.
8002 (patches (search-patches "python-configobj-setuptools.patch"))))
8003 (build-system python-build-system)
8004 (propagated-inputs
8005 `(("python-six" ,python-six)))
8006 (synopsis "Config file reading, writing and validation")
8007 (description "ConfigObj is a simple but powerful config file reader and
8008 writer: an ini file round tripper. Its main feature is that it is very easy to
8009 use, with a straightforward programmer’s interface and a simple syntax for
8010 config files.")
8011 (home-page "https://github.com/DiffSK/configobj")
8012 (license license:bsd-3)))
8013
8014 (define-public python2-configobj
8015 (package-with-python2 python-configobj))
8016
8017 (define-public python-configargparse
8018 (package
8019 (name "python-configargparse")
8020 (version "0.10.0")
8021 (source (origin
8022 (method url-fetch)
8023 (uri (string-append
8024 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8025 "ConfigArgParse-" version ".tar.gz"))
8026 (sha256
8027 (base32
8028 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8029 (build-system python-build-system)
8030 (arguments
8031 ;; FIXME: Bug in test suite filed upstream:
8032 ;; https://github.com/bw2/ConfigArgParse/issues/32
8033 '(#:tests? #f))
8034 (synopsis "Replacement for argparse")
8035 (description "A drop-in replacement for argparse that allows options to also
8036 be set via config files and/or environment variables.")
8037 (home-page "https://github.com/bw2/ConfigArgParse")
8038 (license license:expat)))
8039
8040 (define-public python2-configargparse
8041 (package-with-python2 python-configargparse))
8042
8043 (define-public python-ndg-httpsclient
8044 (package
8045 (name "python-ndg-httpsclient")
8046 (version "0.4.2")
8047 (source (origin
8048 (method url-fetch)
8049 (uri (pypi-uri "ndg_httpsclient" version))
8050 (sha256
8051 (base32
8052 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8053 (build-system python-build-system)
8054 (arguments
8055 '(;; The tests appear to require networking.
8056 #:tests? #f))
8057 (propagated-inputs
8058 `(("python-pyopenssl" ,python-pyopenssl)))
8059 (synopsis "HTTPS support for Python's httplib and urllib2")
8060 (description "This is a HTTPS client implementation for httplib and urllib2
8061 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8062 over the default provided with Python and importantly enables full verification
8063 of the SSL peer.")
8064 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8065 (license license:bsd-3)))
8066
8067 ;; python2-openssl requires special care, so package-with-python2 is
8068 ;; insufficient.
8069 (define-public python2-ndg-httpsclient
8070 (package (inherit python-ndg-httpsclient)
8071 (name "python2-ndg-httpsclient")
8072 (arguments `(#:python ,python-2))
8073 (propagated-inputs
8074 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8075
8076 (define-public python-contextlib2
8077 (package
8078 (name "python-contextlib2")
8079 (version "0.4.0")
8080 (source
8081 (origin
8082 (method url-fetch)
8083 (uri (pypi-uri "contextlib2" version))
8084 (sha256
8085 (base32
8086 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8087 (build-system python-build-system)
8088 (arguments
8089 `(#:phases
8090 (modify-phases %standard-phases
8091 (replace 'check
8092 (lambda _ (zero?
8093 (system*
8094 "python" "test_contextlib2.py" "-v")))))))
8095 (home-page "http://contextlib2.readthedocs.org/")
8096 (synopsis "Tools for decorators and context managers")
8097 (description "This module is primarily a backport of the Python
8098 3.2 contextlib to earlier Python versions. Like contextlib, it
8099 provides utilities for common tasks involving decorators and context
8100 managers. It also contains additional features that are not part of
8101 the standard library.")
8102 (license license:psfl)))
8103
8104 (define-public python2-contextlib2
8105 (package-with-python2 python-contextlib2))
8106
8107 (define-public python-texttable
8108 (package
8109 (name "python-texttable")
8110 (version "0.8.4")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "texttable" version))
8115 (sha256
8116 (base32
8117 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8118 (build-system python-build-system)
8119 (arguments '(#:tests? #f)) ; no tests
8120 (home-page "https://github.com/foutaise/texttable/")
8121 (synopsis "Python module for creating simple ASCII tables")
8122 (description "Texttable is a Python module for creating simple ASCII
8123 tables.")
8124 (license license:lgpl2.1+)))
8125
8126 (define-public python2-texttable
8127 (package-with-python2 python-texttable))
8128
8129 (define-public python-websocket-client
8130 (package
8131 (name "python-websocket-client")
8132 (version "0.37.0")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "websocket_client" version))
8137 (sha256
8138 (base32
8139 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8140 (build-system python-build-system)
8141 (propagated-inputs
8142 `(("python-six" ,python-six)))
8143 (home-page "https://github.com/liris/websocket-client")
8144 (synopsis "WebSocket client for Python")
8145 (description "The Websocket-client module provides the low level APIs for
8146 WebSocket usage in Python programs.")
8147 (license license:lgpl2.1+)))
8148
8149 (define-public python2-websocket-client
8150 (package-with-python2 python-websocket-client))
8151
8152 (define-public python-atomicwrites
8153 (package
8154 (name "python-atomicwrites")
8155 (version "1.1.0")
8156 (source (origin
8157 (method url-fetch)
8158 (uri (pypi-uri "atomicwrites" version))
8159 (sha256
8160 (base32
8161 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
8162 (build-system python-build-system)
8163 (synopsis "Atomic file writes in Python")
8164 (description "Library for atomic file writes using platform dependent tools
8165 for atomic file system operations.")
8166 (home-page "https://github.com/untitaker/python-atomicwrites")
8167 (license license:expat)))
8168
8169 (define-public python2-atomicwrites
8170 (package-with-python2 python-atomicwrites))
8171
8172 (define-public python-requests-toolbelt
8173 (package
8174 (name "python-requests-toolbelt")
8175 (version "0.6.2")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (string-append
8179 "https://pypi.python.org/packages/"
8180 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8181 "requests-toolbelt-" version ".tar.gz"))
8182 (sha256
8183 (base32
8184 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8185 (build-system python-build-system)
8186 (native-inputs
8187 `(("python-betamax" ,python-betamax)
8188 ("python-mock" ,python-mock)
8189 ("python-pytest" ,python-pytest)))
8190 (propagated-inputs
8191 `(("python-requests" ,python-requests)))
8192 (synopsis "Extensions to python-requests")
8193 (description "This is a toolbelt of useful classes and functions to be used
8194 with python-requests.")
8195 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8196 (license license:asl2.0)))
8197
8198 (define-public python-click-threading
8199 (package
8200 (name "python-click-threading")
8201 (version "0.2.0")
8202 (source (origin
8203 (method url-fetch)
8204 (uri (string-append
8205 "https://pypi.python.org/packages/"
8206 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8207 "click-threading-" version ".tar.gz"))
8208 (sha256
8209 (base32
8210 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8211 (build-system python-build-system)
8212 (propagated-inputs
8213 `(("python-click" ,python-click)))
8214 (synopsis "Utilities for multithreading in Click")
8215 (description "This package provides utilities for multithreading in Click
8216 applications.")
8217 (home-page "https://github.com/click-contrib/click-threading")
8218 (license license:expat)))
8219
8220 (define-public python-click-log
8221 (package
8222 (name "python-click-log")
8223 (version "0.1.8")
8224 (source (origin
8225 (method url-fetch)
8226 (uri (pypi-uri "click-log" version))
8227 (sha256
8228 (base32
8229 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8230 (build-system python-build-system)
8231 (propagated-inputs
8232 `(("python-click" ,python-click)))
8233 (synopsis "Logging for click applications")
8234 (description "This package provides a Python library for logging Click
8235 applications.")
8236 (home-page "https://github.com/click-contrib/click-log")
8237 (license license:expat)))
8238
8239 (define-public python-apipkg
8240 (package
8241 (name "python-apipkg")
8242 (version "1.4")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "apipkg" version))
8246 (sha256
8247 (base32
8248 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8249 (build-system python-build-system)
8250 (native-inputs
8251 `(("python-pytest" ,python-pytest)))
8252 (synopsis "Namespace control and lazy-import mechanism")
8253 (description "With apipkg you can control the exported namespace of a Python
8254 package and greatly reduce the number of imports for your users. It is a small
8255 pure Python module that works on virtually all Python versions.")
8256 (home-page "https://bitbucket.org/hpk42/apipkg")
8257 (license license:expat)))
8258
8259 (define-public python2-apipkg
8260 (package-with-python2 python-apipkg))
8261
8262 (define-public python-execnet
8263 (package
8264 (name "python-execnet")
8265 (version "1.4.1")
8266 (source (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "execnet" version))
8269 (sha256
8270 (base32
8271 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8272 (build-system python-build-system)
8273 (arguments
8274 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8275 ;; The two test failures are caused by the lack of an `ssh` executable.
8276 ;; The test suite can be run with pytest after the 'install' phase.
8277 #:tests? #f))
8278 (native-inputs
8279 `(("python-pytest" ,python-pytest)
8280 ("python-setuptools-scm" ,python-setuptools-scm)))
8281 (propagated-inputs
8282 `(("python-apipkg" ,python-apipkg)))
8283 (synopsis "Rapid multi-Python deployment")
8284 (description "Execnet provides a share-nothing model with
8285 channel-send/receive communication for distributing execution across many
8286 Python interpreters across version, platform and network barriers. It has a
8287 minimal and fast API targetting the following uses:
8288 @enumerate
8289 @item distribute tasks to (many) local or remote CPUs
8290 @item write and deploy hybrid multi-process applications
8291 @item write scripts to administer multiple environments
8292 @end enumerate")
8293 (home-page "http://codespeak.net/execnet/")
8294 (license license:expat)))
8295
8296 (define-public python2-execnet
8297 (package-with-python2 python-execnet))
8298
8299 (define-public python-trollius-redis
8300 (package
8301 (name "python-trollius-redis")
8302 (version "0.1.4")
8303 (source
8304 (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "trollius_redis" version))
8307 (sha256
8308 (base32
8309 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8310 (build-system python-build-system)
8311 (home-page "https://github.com/benjolitz/trollius-redis")
8312 (synopsis "Port of asyncio-redis to trollius")
8313 (description "@code{trollius-redis} is a Redis client for Python
8314 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8315 Redis protocol.")
8316 (license license:bsd-2)))
8317
8318 (define-public python2-trollius-redis
8319 (package-with-python2 python-trollius-redis))
8320
8321 ;;; The software provided by this package was integrated into pytest 2.8.
8322 (define-public python-pytest-cache
8323 (package
8324 (name "python-pytest-cache")
8325 (version "1.0")
8326 (source (origin
8327 (method url-fetch)
8328 (uri (pypi-uri "pytest-cache" version))
8329 (sha256
8330 (base32
8331 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8332 (build-system python-build-system)
8333 (propagated-inputs
8334 `(("python-apipkg" ,python-apipkg)
8335 ("python-execnet" ,python-execnet)
8336 ("python-py" ,python-py)
8337 ("python-pytest" ,python-pytest)))
8338 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8339 (description "The pytest-cache plugin provides tools to rerun failures from
8340 the last py.test invocation.")
8341 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8342 (license license:expat)))
8343
8344 (define-public python2-pytest-cache
8345 (package-with-python2 python-pytest-cache))
8346
8347 (define-public python-pytest-localserver
8348 (package
8349 (name "python-pytest-localserver")
8350 (version "0.3.5")
8351 (source (origin
8352 (method url-fetch)
8353 (uri (pypi-uri "pytest-localserver" version))
8354 (sha256
8355 (base32
8356 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8357 (build-system python-build-system)
8358 (arguments
8359 `(#:phases (modify-phases %standard-phases
8360 (replace 'check
8361 (lambda _
8362 (zero? (system* "py.test" "--genscript=runtests.py"))
8363 (zero? (system* "py.test")))))))
8364 (native-inputs
8365 `(("python-pytest" ,python-pytest)
8366 ("python-requests" ,python-requests)
8367 ("python-six" ,python-six)))
8368 (propagated-inputs
8369 `(("python-werkzeug" ,python-werkzeug)))
8370 (synopsis "Py.test plugin to test server connections locally")
8371 (description "Pytest-localserver is a plugin for the pytest testing
8372 framework which enables you to test server connections locally.")
8373 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8374 (license license:expat)))
8375
8376 (define-public python-wsgi-intercept
8377 (package
8378 (name "python-wsgi-intercept")
8379 (version "1.2.2")
8380 (source (origin
8381 (method url-fetch)
8382 (uri (string-append
8383 "https://pypi.python.org/packages/"
8384 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8385 "wsgi_intercept-" version ".tar.gz"))
8386 (sha256
8387 (base32
8388 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8389 (build-system python-build-system)
8390 (propagated-inputs
8391 `(("python-six" ,python-six)))
8392 (native-inputs
8393 `(("python-pytest" ,python-pytest)
8394 ("python-httplib2" ,python-httplib2)
8395 ("python-requests" ,python-requests)
8396 ("python-urllib3" ,python-urllib3)))
8397 (synopsis "Puts a WSGI application in place of a real URI for testing")
8398 (description "Wsgi_intercept installs a WSGI application in place of a real
8399 URI for testing. Testing a WSGI application normally involves starting a
8400 server at a local host and port, then pointing your test code to that address.
8401 Instead, this library lets you intercept calls to any specific host/port
8402 combination and redirect them into a WSGI application importable by your test
8403 program. Thus, you can avoid spawning multiple processes or threads to test
8404 your Web app.")
8405 (home-page "https://github.com/cdent/wsgi-intercept")
8406 (license license:expat)))
8407
8408 (define-public python-pytest-xprocess
8409 (package
8410 (name "python-pytest-xprocess")
8411 (version "0.9.1")
8412 (source (origin
8413 (method url-fetch)
8414 (uri (pypi-uri "pytest-xprocess" version))
8415 (sha256
8416 (base32
8417 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8418 (build-system python-build-system)
8419 (propagated-inputs
8420 `(("python-pytest" ,python-pytest)
8421 ("python-pytest-cache" ,python-pytest-cache)
8422 ("python-psutil" ,python-psutil)))
8423 (synopsis "Pytest plugin to manage external processes across test runs")
8424 (description "Pytest-xprocess is an experimental py.test plugin for managing
8425 processes across test runs.")
8426 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8427 (license license:expat)))
8428
8429 (define-public python-icalendar
8430 (package
8431 (name "python-icalendar")
8432 (version "3.11.1")
8433 (source (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "icalendar" version))
8436 (sha256
8437 (base32
8438 "1bvi7rzh7scl4nmgj2n2cy7k0v3p29y15cqy2hcdnfq9mnhdr63y"))))
8439 (build-system python-build-system)
8440 (propagated-inputs
8441 `(("python-dateutil" ,python-dateutil)
8442 ("python-pytz" ,python-pytz)))
8443 (synopsis "Python library for parsing iCalendar files")
8444 (description "The icalendar package is a parser/generator of iCalendar
8445 files for use with Python.")
8446 (home-page "https://github.com/collective/icalendar")
8447 (license license:bsd-2)))
8448
8449 (define-public python-sphinxcontrib-newsfeed
8450 (package
8451 (name "python-sphinxcontrib-newsfeed")
8452 (version "0.1.4")
8453 (source (origin
8454 (method url-fetch)
8455 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8456 (sha256
8457 (base32
8458 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8459 (build-system python-build-system)
8460 (propagated-inputs
8461 `(("python-sphinx" ,python-sphinx)))
8462 (synopsis "News Feed extension for Sphinx")
8463 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8464 Blog, News or Announcements section to a Sphinx website.")
8465 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8466 (license license:bsd-2)))
8467
8468 (define-public python-args
8469 (package
8470 (name "python-args")
8471 (version "0.1.0")
8472 (source (origin
8473 (method url-fetch)
8474 (uri (pypi-uri "args" version))
8475 (sha256
8476 (base32
8477 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8478 (build-system python-build-system)
8479 (home-page "https://github.com/kennethreitz/args")
8480 (synopsis "Command-line argument parser")
8481 (description
8482 "This library provides a Python module to parse command-line arguments.")
8483 (license license:bsd-3)))
8484
8485 (define-public python2-args
8486 (package-with-python2 python-args))
8487
8488 (define-public python-clint
8489 (package
8490 (name "python-clint")
8491 (version "0.5.1")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "clint" version))
8495 (sha256
8496 (base32
8497 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8498 (build-system python-build-system)
8499 (arguments
8500 '(#:phases
8501 (modify-phases %standard-phases
8502 (replace 'check
8503 (lambda _
8504 (zero? (system* "py.test" "-v")))))))
8505 (native-inputs
8506 `(("python-pytest" ,python-pytest)))
8507 (propagated-inputs
8508 `(("python-args" ,python-args)))
8509 (home-page "https://github.com/kennethreitz/clint")
8510 (synopsis "Command-line interface tools")
8511 (description
8512 "Clint is a Python module filled with a set of tools for developing
8513 command-line applications, including tools for colored and indented
8514 output, progress bar display, and pipes.")
8515 (license license:isc)))
8516
8517 (define-public python2-clint
8518 (package-with-python2 python-clint))
8519
8520 (define-public python-astor
8521 (package
8522 (name "python-astor")
8523 (version "0.5")
8524 (source (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "astor" version))
8527 (sha256
8528 (base32
8529 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8530 (build-system python-build-system)
8531 (home-page "https://github.com/berkerpeksag/astor")
8532 (synopsis "Read and write Python ASTs")
8533 (description
8534 "Astor is designed to allow easy manipulation of Python source via the
8535 Abstract Syntax Tree.")
8536 (license license:bsd-3)))
8537
8538 (define-public python2-astor
8539 (package-with-python2 python-astor))
8540
8541 (define-public python-rply
8542 (package
8543 (name "python-rply")
8544 (version "0.7.4")
8545 (source (origin
8546 (method url-fetch)
8547 (uri (pypi-uri "rply" version))
8548 (sha256
8549 (base32
8550 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8551 (build-system python-build-system)
8552 (propagated-inputs
8553 `(("python-appdirs" ,python-appdirs)))
8554 (home-page "https://github.com/alex/rply")
8555 (synopsis "Parser generator for Python")
8556 (description
8557 "This package provides a pure Python based parser generator, that also
8558 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8559 with a new public API, and RPython support.")
8560 (license license:bsd-3)))
8561
8562 (define-public python2-rply
8563 (package-with-python2 python-rply))
8564
8565 (define-public python-hy
8566 (package
8567 (name "python-hy")
8568 (version "0.11.1")
8569 (source (origin
8570 (method url-fetch)
8571 (uri (pypi-uri "hy" version))
8572 (sha256
8573 (base32
8574 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8575 (build-system python-build-system)
8576 (arguments
8577 '(#:phases
8578 (modify-phases %standard-phases
8579 (replace 'check
8580 (lambda _
8581 ;; Tests require write access to HOME.
8582 (setenv "HOME" "/tmp")
8583 (zero? (system* "nosetests")))))))
8584 (native-inputs
8585 `(("python-coverage" ,python-coverage)
8586 ("python-nose" ,python-nose)))
8587 (propagated-inputs
8588 `(("python-astor" ,python-astor)
8589 ("python-clint" ,python-clint)
8590 ("python-rply" ,python-rply)))
8591 (home-page "http://hylang.org/")
8592 (synopsis "Lisp frontend to Python")
8593 (description
8594 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8595 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8596 Python at your fingertips, in Lisp form.")
8597 (license license:expat)))
8598
8599 (define-public python2-hy
8600 (package-with-python2 python-hy))
8601
8602 (define-public python-rauth
8603 (package
8604 (name "python-rauth")
8605 (version "0.7.2")
8606 (source
8607 (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "rauth" version))
8610 (sha256
8611 (base32
8612 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8613 (build-system python-build-system)
8614 (arguments
8615 `(#:test-target "check"))
8616 (propagated-inputs
8617 `(("python-requests" ,python-requests)))
8618 (home-page "https://github.com/litl/rauth")
8619 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8620 (description
8621 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8622 provides service wrappers for convenient connection initialization and
8623 authenticated session objects providing things like keep-alive.")
8624 (license license:expat)
8625 (properties `((python2-variant . ,(delay python2-rauth))))))
8626
8627 (define-public python2-rauth
8628 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8629 (package
8630 (inherit base)
8631 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8632 ,@(package-native-inputs base))))))
8633
8634 (define-public python2-functools32
8635 (package
8636 (name "python2-functools32")
8637 (version "3.2.3-2")
8638 (source
8639 (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "functools32" version))
8642 (sha256
8643 (base32
8644 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8645 (build-system python-build-system)
8646 (arguments
8647 `(#:python ,python-2
8648 #:tests? #f)) ; no test target
8649 (home-page "https://github.com/MiCHiLU/python-functools32")
8650 (synopsis
8651 "Backport of the functools module from Python 3.2.3")
8652 (description
8653 "This package is a backport of the @code{functools} module from Python
8654 3.2.3 for use with older versions of Python and PyPy.")
8655 (license license:expat)))
8656
8657 (define-public python2-futures
8658 (package
8659 (name "python2-futures")
8660 (version "3.0.3")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "futures" version))
8665 (sha256
8666 (base32
8667 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8668 (build-system python-build-system)
8669 (arguments `(#:python ,python-2))
8670 (home-page "https://github.com/agronholm/pythonfutures")
8671 (synopsis
8672 "Backport of the concurrent.futures package from Python 3.2")
8673 (description
8674 "The concurrent.futures module provides a high-level interface for
8675 asynchronously executing callables. This package backports the
8676 concurrent.futures package from Python 3.2")
8677 (license license:bsd-3)))
8678
8679 (define-public python-promise
8680 (package
8681 (name "python-promise")
8682 (version "0.4.2")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "promise" version))
8687 (sha256
8688 (base32
8689 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8690 (build-system python-build-system)
8691 ;; Tests wants python-futures, which is a python2 only program, and
8692 ;; can't be found by python-promise at test time.
8693 (arguments `(#:tests? #f))
8694 (home-page "https://github.com/syrusakbary/promise")
8695 (synopsis "Promises/A+ implementation for Python")
8696 (description
8697 "Promises/A+ implementation for Python")
8698 (properties `((python2-variant . ,(delay python2-promise))))
8699 (license license:expat)))
8700
8701 (define-public python2-promise
8702 (let ((promise (package-with-python2
8703 (strip-python2-variant python-promise))))
8704 (package (inherit promise)
8705 (arguments (substitute-keyword-arguments (package-arguments promise)
8706 ((#:tests? _) #t)))
8707 (native-inputs
8708 `(("python2-futures" ,python2-futures)
8709 ("python2-pytest" ,python2-pytest)
8710 ,@(package-native-inputs promise))))))
8711
8712 (define-public python-urllib3
8713 (package
8714 (name "python-urllib3")
8715 (version "1.18.1")
8716 (source
8717 (origin
8718 (method url-fetch)
8719 (uri (pypi-uri "urllib3" version))
8720 (sha256
8721 (base32
8722 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8723 (build-system python-build-system)
8724 (arguments `(#:tests? #f))
8725 (native-inputs
8726 `(;; some packages for tests
8727 ("python-nose" ,python-nose)
8728 ("python-mock" ,python-mock)
8729 ("python-tornado" ,python-tornado)))
8730 (propagated-inputs
8731 `(;; extra packages for https security
8732 ("python-certifi" ,python-certifi)
8733 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8734 ("python-pyasn1" ,python-pyasn1)
8735 ("python-pyopenssl" ,python-pyopenssl)))
8736 (home-page "https://urllib3.readthedocs.org/")
8737 (synopsis "HTTP library with thread-safe connection pooling")
8738 (description
8739 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8740 can reuse the same socket connection for multiple requests, it can POST files,
8741 supports url redirection and retries, and also gzip and deflate decoding.")
8742 (license license:expat)))
8743
8744 (define-public python2-urllib3
8745 (package-with-python2 python-urllib3))
8746
8747 (define-public python-colorama
8748 (package
8749 (name "python-colorama")
8750 (version "0.3.3")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "colorama" version))
8755 (sha256
8756 (base32
8757 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8758 (build-system python-build-system)
8759 (synopsis "colored terminal text rendering for Python")
8760 (description "Colorama is a Python library for rendering colored terminal
8761 text.")
8762 (home-page "https://pypi.python.org/pypi/colorama")
8763 (license license:bsd-3)))
8764
8765 (define-public python2-colorama
8766 (package-with-python2 python-colorama))
8767
8768 (define-public python-rsa
8769 (package
8770 (name "python-rsa")
8771 (version "3.4.2")
8772 (source
8773 (origin
8774 (method url-fetch)
8775 (uri (pypi-uri "rsa" version))
8776 (sha256
8777 (base32
8778 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8779 (build-system python-build-system)
8780 (propagated-inputs
8781 `(("python-pyasn1" ,python-pyasn1)))
8782 (synopsis "Pure-Python RSA implementation")
8783 (description "Python-RSA is a pure-Python RSA implementation. It supports
8784 encryption and decryption, signing and verifying signatures, and key
8785 generation according to PKCS#1 version 1.5. It can be used as a Python
8786 library as well as on the command line.")
8787 (home-page "http://stuvel.eu/rsa")
8788 (license license:asl2.0)))
8789
8790 (define-public python2-rsa
8791 (package-with-python2 python-rsa))
8792
8793 (define-public python-pluggy
8794 (package
8795 (name "python-pluggy")
8796 (version "0.3.1")
8797 (source
8798 (origin
8799 (method url-fetch)
8800 (uri (pypi-uri "pluggy" version))
8801 (sha256
8802 (base32
8803 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8804 (build-system python-build-system)
8805 (synopsis "Plugin and hook calling mechanism for Python")
8806 (description "Pluggy is an extraction of the plugin manager as used by
8807 Pytest but stripped of Pytest specific details.")
8808 (home-page "https://pypi.python.org/pypi/pluggy")
8809 (license license:expat)))
8810
8811 (define-public python2-pluggy
8812 (package-with-python2 python-pluggy))
8813
8814 (define-public python-tox
8815 (package
8816 (name "python-tox")
8817 (version "2.3.1")
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "tox" version))
8822 (sha256
8823 (base32
8824 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8825 (build-system python-build-system)
8826 (arguments
8827 ;; FIXME: Tests require pytest-timeout, which itself requires
8828 ;; pytest>=2.8.0 for installation.
8829 '(#:tests? #f))
8830 (propagated-inputs
8831 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8832 ("python-py" ,python-py)
8833 ("python-virtualenv" ,python-virtualenv)))
8834 (native-inputs
8835 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8836 ("python-pytest" ,python-pytest))) ; >= 2.3.5
8837 (home-page "http://tox.testrun.org/")
8838 (synopsis "Virtualenv-based automation of test activities")
8839 (description "Tox is a generic virtualenv management and test command line
8840 tool. It can be used to check that a package installs correctly with
8841 different Python versions and interpreters, or run tests in each type of
8842 supported environment, or act as a frontend to continuous integration
8843 servers.")
8844 (license license:expat)))
8845
8846 (define-public python2-tox
8847 (package-with-python2 python-tox))
8848
8849 (define-public python-jmespath
8850 (package
8851 (name "python-jmespath")
8852 (version "0.9.0")
8853 (source
8854 (origin
8855 (method url-fetch)
8856 (uri (pypi-uri "jmespath" version))
8857 (sha256
8858 (base32
8859 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8860 (build-system python-build-system)
8861 (native-inputs
8862 `(("python-nose" ,python-nose)))
8863 (synopsis "JSON Matching Expressions")
8864 (description "JMESPath (pronounced “james path”) is a Python library that
8865 allows one to declaratively specify how to extract elements from a JSON
8866 document.")
8867 (home-page "https://github.com/jmespath/jmespath.py")
8868 (license license:expat)))
8869
8870 (define-public python2-jmespath
8871 (package-with-python2 python-jmespath))
8872
8873 (define-public python-botocore
8874 (package
8875 (name "python-botocore")
8876 (version "1.4.62")
8877 (source
8878 (origin
8879 (method url-fetch)
8880 (uri (pypi-uri "botocore" version))
8881 (sha256
8882 (base32
8883 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8884 (build-system python-build-system)
8885 (arguments
8886 ;; FIXME: Many tests are failing.
8887 '(#:tests? #f))
8888 (propagated-inputs
8889 `(("python-dateutil" ,python-dateutil)
8890 ("python-docutils" ,python-docutils)
8891 ("python-jmespath" ,python-jmespath)))
8892 (native-inputs
8893 `(("python-mock" ,python-mock)
8894 ("python-nose" ,python-nose)
8895 ("behave" ,behave)
8896 ("python-tox" ,python-tox)
8897 ("python-wheel" ,python-wheel)))
8898 (home-page "https://github.com/boto/botocore")
8899 (synopsis "Low-level interface to AWS")
8900 (description "Botocore is a Python library that provides a low-level
8901 interface to the Amazon Web Services (AWS) API.")
8902 (license license:asl2.0)))
8903
8904 (define-public python2-botocore
8905 (package-with-python2 python-botocore))
8906
8907 (define-public awscli
8908 (package
8909 (name "awscli")
8910 (version "1.11.35")
8911 (source
8912 (origin
8913 (method url-fetch)
8914 (uri (pypi-uri name version))
8915 (sha256
8916 (base32
8917 "0k6y8cg311bqak5x9pilg80w6f76dcbzm6xcdrw6rjnk6v4xwy70"))))
8918 (build-system python-build-system)
8919 (propagated-inputs
8920 `(("python-colorama" ,python-colorama)
8921 ("python-botocore" ,python-botocore)
8922 ("python-s3transfer" ,python-s3transfer)
8923 ("python-docutils" ,python-docutils)
8924 ("python-rsa" ,python-rsa)))
8925 (native-inputs
8926 `(("python-mock" ,python-mock)
8927 ("python-nose" ,python-nose)
8928 ("python-sphinx" ,python-sphinx)
8929 ("python-tox" ,python-tox)
8930 ("python-wheel" ,python-wheel)))
8931 (home-page "http://aws.amazon.com/cli/")
8932 (synopsis "Command line client for AWS")
8933 (description "AWS CLI provides a unified command line interface to the
8934 Amazon Web Services (AWS) API.")
8935 (license license:asl2.0)))
8936
8937 (define-public python-hypothesis
8938 (package
8939 (name "python-hypothesis")
8940 (version "3.1.0")
8941 (source (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "hypothesis" version))
8944 (sha256
8945 (base32
8946 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8947 (build-system python-build-system)
8948 (native-inputs
8949 `(("python-flake8" ,python-flake8)
8950 ("python-pytest" ,python-pytest)))
8951 (synopsis "Library for property based testing")
8952 (description "Hypothesis is a library for testing your Python code against a
8953 much larger range of examples than you would ever want to write by hand. It’s
8954 based on the Haskell library, Quickcheck, and is designed to integrate
8955 seamlessly into your existing Python unit testing work flow.")
8956 (home-page "https://github.com/DRMacIver/hypothesis")
8957 (license license:mpl2.0)
8958 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8959
8960 (define-public python2-hypothesis
8961 (let ((hypothesis (package-with-python2
8962 (strip-python2-variant python-hypothesis))))
8963 (package (inherit hypothesis)
8964 (native-inputs
8965 `(("python2-enum34" ,python2-enum34)
8966 ,@(package-native-inputs hypothesis))))))
8967
8968 (define-public python-pytest-subtesthack
8969 (package
8970 (name "python-pytest-subtesthack")
8971 (version "0.1.1")
8972 (source (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "pytest-subtesthack" version))
8975 (sha256
8976 (base32
8977 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8978 (build-system python-build-system)
8979 (propagated-inputs
8980 `(("python-pytest" ,python-pytest)))
8981 (synopsis "Set-up and tear-down fixtures for unit tests")
8982 (description "This plugin allows you to set up and tear down fixtures within
8983 unit test functions that use @code{py.test}. This is useful for using
8984 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8985 function multiple times, without setting up or tearing down fixture state as is
8986 normally the case.")
8987 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8988 (license license:unlicense)))
8989
8990 (define-public python2-pytest-subtesthack
8991 (package-with-python2 python-pytest-subtesthack))
8992
8993 (define-public python-xdo
8994 (package
8995 (name "python-xdo")
8996 (version "0.3")
8997 (source (origin
8998 (method url-fetch)
8999 (uri (string-append
9000 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9001 "python-xdo_" version ".orig.tar.gz"))
9002 (sha256
9003 (base32
9004 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9005 (build-system python-build-system)
9006 (arguments
9007 `(#:tests? #f)) ; no tests provided
9008 (inputs
9009 `(("xdotool" ,xdotool)
9010 ("libX11" ,libx11)))
9011 (home-page "https://tracker.debian.org/pkg/python-xdo")
9012 (synopsis "Python library for simulating X11 keyboard/mouse input")
9013 (description "Provides bindings to libxdo for manipulating X11 via simulated
9014 input. (Note that this is mostly a legacy library; you may wish to look at
9015 python-xdo for newer bindings.)")
9016 (license license:bsd-3)))
9017
9018 (define-public python2-xdo
9019 (package-with-python2 python-xdo))
9020
9021 (define-public python-wtforms
9022 (package
9023 (name "python-wtforms")
9024 (version "2.1")
9025 (source
9026 (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "WTForms" version ".zip"))
9029 (sha256
9030 (base32
9031 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9032 (build-system python-build-system)
9033 (arguments
9034 '(#:phases
9035 (modify-phases %standard-phases
9036 (add-after 'unpack 'remove-django-test
9037 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9038 (lambda _
9039 (substitute*
9040 "tests/runtests.py"
9041 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9042 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9043 #t)))))
9044 (native-inputs
9045 `(("unzip" ,unzip)))
9046 (home-page "http://wtforms.simplecodes.com/")
9047 (synopsis
9048 "Form validation and rendering library for Python web development")
9049 (description
9050 "WTForms is a flexible forms validation and rendering library
9051 for Python web development. It is very similar to the web form API
9052 available in Django, but is a standalone package.")
9053 (license license:bsd-3)))
9054
9055 (define-public python2-wtforms
9056 (package-with-python2 python-wtforms))
9057
9058 (define-public python-mako
9059 (package
9060 (name "python-mako")
9061 (version "1.0.6")
9062 (source
9063 (origin
9064 (method url-fetch)
9065 (uri (pypi-uri "Mako" version))
9066 (sha256
9067 (base32
9068 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9069 (build-system python-build-system)
9070 (propagated-inputs
9071 `(("python-markupsafe" ,python-markupsafe)))
9072 (native-inputs
9073 `(("python-mock" ,python-mock)
9074 ("python-nose" ,python-nose)))
9075 (home-page "http://www.makotemplates.org/")
9076 (synopsis "Templating language for Python")
9077 (description "Mako is a templating language for Python that compiles
9078 templates into Python modules.")
9079 (license license:expat)))
9080
9081 (define-public python2-mako
9082 (package-with-python2 python-mako))
9083
9084 (define-public python-waitress
9085 (package
9086 (name "python-waitress")
9087 (version "0.8.10")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "waitress" version))
9092 (sha256
9093 (base32
9094 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9095 (build-system python-build-system)
9096 (home-page "https://github.com/Pylons/waitress")
9097 (synopsis "Waitress WSGI server")
9098 (description "Waitress is meant to be a production-quality pure-Python WSGI
9099 server with very acceptable performance.")
9100 (license license:zpl2.1)))
9101
9102 (define-public python2-waitress
9103 (package-with-python2 python-waitress))
9104
9105 (define-public python-wsgiproxy2
9106 (package
9107 (name "python-wsgiproxy2")
9108 (version "0.4.2")
9109 (source
9110 (origin
9111 (method url-fetch)
9112 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9113 (sha256
9114 (base32
9115 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9116 (build-system python-build-system)
9117 (arguments
9118 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9119 ;; support Python 3:
9120 ;; https://github.com/benoitc/restkit/issues/140
9121 #:tests? #f))
9122 (native-inputs
9123 `(("unzip" ,unzip)
9124 ("python-nose" ,python-nose)
9125 ("python-coverage" ,python-coverage)))
9126 (propagated-inputs
9127 `(("python-six" ,python-six)
9128 ("python-webob" ,python-webob)))
9129 (home-page
9130 "https://github.com/gawel/WSGIProxy2/")
9131 (synopsis "WSGI Proxy with various http client backends")
9132 (description "WSGI turns HTTP requests into WSGI function calls.
9133 WSGIProxy turns WSGI function calls into HTTP requests.
9134 It also includes code to sign requests and pass private data,
9135 and to spawn subprocesses to handle requests.")
9136 (license license:expat)))
9137
9138 (define-public python2-wsgiproxy2
9139 (package-with-python2 python-wsgiproxy2))
9140
9141 (define-public python-pastedeploy
9142 (package
9143 (name "python-pastedeploy")
9144 (version "1.5.2")
9145 (source
9146 (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "PasteDeploy" version))
9149 (sha256
9150 (base32
9151 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9152 (build-system python-build-system)
9153 (native-inputs
9154 `(("python-nose" ,python-nose)))
9155 (home-page "http://pythonpaste.org/deploy/")
9156 (synopsis
9157 "Load, configure, and compose WSGI applications and servers")
9158 (description
9159 "This tool provides code to load WSGI applications and servers from URIs;
9160 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9161 Script provides commands to serve applications based on this configuration
9162 file.")
9163 (license license:expat)))
9164
9165 (define-public python2-pastedeploy
9166 (package-with-python2 python-pastedeploy))
9167
9168 (define-public python-paste
9169 (package
9170 (name "python-paste")
9171 (version "2.0.2")
9172 (source
9173 (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "Paste" version))
9176 (sha256
9177 (base32
9178 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
9179 (patches (search-patches "python-paste-remove-website-test.patch"
9180 "python-paste-remove-timing-test.patch"))))
9181 (build-system python-build-system)
9182 (native-inputs
9183 `(("python-nose" ,python-nose)))
9184 (propagated-inputs
9185 `(("python-six" ,python-six)))
9186 (arguments
9187 '(;; Tests don't pass on Python 3, but work fine on Python 2.
9188 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
9189 ;; but is usable enough for the minimal amount it's used in MediaGoblin
9190 ;; still... things should be better by the next Paste release.)
9191 #:tests? #f))
9192 (home-page "http://pythonpaste.org")
9193 (synopsis
9194 "Python web development tools, focusing on WSGI")
9195 (description
9196 "Paste provides a variety of web development tools and middleware which
9197 can be nested together to build web applications. Paste's design closely
9198 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9199 (license license:expat)
9200 (properties `((python2-variant . ,(delay python2-paste))))))
9201
9202 (define-public python2-paste
9203 (let ((paste (package-with-python2
9204 (strip-python2-variant python-paste))))
9205 (package
9206 (inherit paste)
9207 (arguments
9208 ;; Tests are back for Python 2!
9209 `(#:tests? #t
9210 ,@(package-arguments paste))))))
9211
9212 (define-public python-pastescript
9213 (package
9214 (name "python-pastescript")
9215 (version "2.0.2")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "PasteScript" version))
9220 (sha256
9221 (base32
9222 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9223 (build-system python-build-system)
9224 (native-inputs
9225 `(("python-nose" ,python-nose)))
9226 (propagated-inputs
9227 `(("python-paste" ,python-paste)
9228 ("python-pastedeploy" ,python-pastedeploy)))
9229 (home-page "http://pythonpaste.org/script/")
9230 (arguments
9231 '(;; Unfortunately, this requires the latest unittest2,
9232 ;; but that requires traceback2 which requires linecache2 which requires
9233 ;; unittest2. So we're skipping tests for now.
9234 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9235 ;; so in theory we could get around this situation somehow.)
9236 #:tests? #f))
9237 (synopsis
9238 "Pluggable command line tool for serving web applications and more")
9239 (description
9240 "PasteScript is a plugin-friendly command line tool which provides a
9241 variety of features, from launching web applications to bootstrapping project
9242 layouts.")
9243 (license license:expat)))
9244
9245 (define-public python2-pastescript
9246 (package-with-python2 python-pastescript))
9247
9248 (define-public python-pyquery
9249 (package
9250 (name "python-pyquery")
9251 (version "1.2.17")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "pyquery" version))
9256 (sha256
9257 (base32
9258 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9259 (build-system python-build-system)
9260 (native-inputs
9261 `(("python-webob" ,python-webob)
9262 ("python-webtest" ,python-webtest)))
9263 (propagated-inputs
9264 `(("python-lxml" ,python-lxml)
9265 ("python-cssselect" ,python-cssselect)))
9266 (home-page "https://github.com/gawel/pyquery")
9267 (synopsis "Make jQuery-like queries on xml documents")
9268 (description "pyquery allows you to make jQuery queries on xml documents.
9269 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9270 fast xml and html manipulation.")
9271 (license license:bsd-3)))
9272
9273 (define-public python2-pyquery
9274 (package-with-python2 python-pyquery))
9275
9276 (define-public python-webtest
9277 (package
9278 (name "python-webtest")
9279 (version "2.0.20")
9280 (source
9281 (origin
9282 (method url-fetch)
9283 (uri (pypi-uri "WebTest" version))
9284 (sha256
9285 (base32
9286 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9287 (build-system python-build-system)
9288 (arguments
9289 `(;; Unfortunately we have to disable tests!
9290 ;; This release of WebTest is pinned to python-nose < 1.3,
9291 ;; but older versions of python-nose are plagued with the following
9292 ;; bug(s), which rears its ugly head during test execution:
9293 ;; https://github.com/nose-devs/nose/issues/759
9294 ;; https://github.com/nose-devs/nose/pull/811
9295 #:tests? #f))
9296 ;; Commented out code is no good, but in this case, once tests
9297 ;; are ready to be enabled again, we should put the following
9298 ;; in place:
9299 ;; (native-inputs
9300 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9301 ;; ; but see above comment
9302 ;; ("python-coverage" ,python-coverage)
9303 ;; ("python-mock" ,python-mock)
9304 ;; ("python-pastedeploy" ,python-pastedeploy)
9305 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9306 ;; ("python-pyquery" ,python-pyquery)))
9307 (propagated-inputs
9308 `(("python-waitress" ,python-waitress)
9309 ("python-webob" ,python-webob)
9310 ("python-six" ,python-six)
9311 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9312 (home-page "http://webtest.pythonpaste.org/")
9313 (synopsis "Helper to test WSGI applications")
9314 (description "Webtest allows you to test your Python web applications
9315 without starting an HTTP server. It supports anything that supports the
9316 minimum of WSGI.")
9317 (license license:expat)))
9318
9319 (define-public python2-webtest
9320 (package-with-python2 python-webtest))
9321
9322 (define-public python-anyjson
9323 (package
9324 (name "python-anyjson")
9325 (version "0.3.3")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "anyjson" version))
9330 (sha256
9331 (base32
9332 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9333 (build-system python-build-system)
9334 (arguments
9335 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9336 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9337 ;; whatever) so this transformation needs to be done before the tests
9338 ;; can be run. Maybe we could add a build step to transform beforehand
9339 ;; but it could be annoying/difficult.
9340 ;; We can enable tests for the Python 2 version, though, and do below.
9341 #:tests? #f))
9342 (home-page "http://bitbucket.org/runeh/anyjson/")
9343 (synopsis
9344 "Wraps best available JSON implementation in a common interface")
9345 (description
9346 "Anyjson loads whichever is the fastest JSON module installed
9347 and provides a uniform API regardless of which JSON implementation is used.")
9348 (license license:bsd-3)
9349 (properties `((python2-variant . ,(delay python2-anyjson))))))
9350
9351 (define-public python2-anyjson
9352 (let ((anyjson (package-with-python2
9353 (strip-python2-variant python-anyjson))))
9354 (package
9355 (inherit anyjson)
9356 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9357 #:tests? #t
9358 ,@(package-arguments anyjson)))
9359 (native-inputs `(("python2-nose" ,python2-nose))))))
9360
9361 (define-public python-amqp
9362 (package
9363 (name "python-amqp")
9364 (version "1.4.9")
9365 (source
9366 (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "amqp" version))
9369 (sha256
9370 (base32
9371 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9372 (build-system python-build-system)
9373 (native-inputs
9374 `(("python-nose" ,python-nose)
9375 ("python-mock" ,python-mock)))
9376 (home-page "http://github.com/celery/py-amqp")
9377 (synopsis
9378 "Low-level AMQP client for Python (fork of amqplib)")
9379 (description
9380 "This is a fork of amqplib which was originally written by Barry Pederson.
9381 It is maintained by the Celery project, and used by kombu as a pure python
9382 alternative when librabbitmq is not available.")
9383 (license license:lgpl2.1+)
9384 (properties `((python2-variant . ,(delay python2-amqp))))))
9385
9386 (define-public python2-amqp
9387 (let ((amqp (package-with-python2
9388 (strip-python2-variant python-amqp))))
9389 (package
9390 (inherit amqp)
9391 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9392 ;; unmaintained. Weirdly, does not do this on the python 3
9393 ;; version?
9394 #:tests? #f
9395 ,@(package-arguments amqp))))))
9396
9397 (define-public python-kombu
9398 (package
9399 (name "python-kombu")
9400 (version "3.0.37")
9401 (source
9402 (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "kombu" version))
9405 (sha256
9406 (base32
9407 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9408 (build-system python-build-system)
9409 (native-inputs
9410 `(("python-mock" ,python-mock)
9411 ("python-nose" ,python-nose)))
9412 (propagated-inputs
9413 `(("python-anyjson" ,python-anyjson)
9414 ("python-amqp" ,python-amqp)
9415 ("python-redis" ,python-redis)))
9416 (home-page "http://kombu.readthedocs.org")
9417 (synopsis "Message passing library for Python")
9418 (description "The aim of Kombu is to make messaging in Python as easy as
9419 possible by providing an idiomatic high-level interface for the AMQ protocol,
9420 and also provide proven and tested solutions to common messaging problems.
9421 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9422 message orientation, queuing, routing, reliability and security, for which the
9423 RabbitMQ messaging server is the most popular implementation.")
9424 (license license:bsd-3)
9425 (properties `((python2-variant . ,(delay python2-kombu))))))
9426
9427 (define-public python2-kombu
9428 (let ((kombu (package-with-python2
9429 (strip-python2-variant python-kombu))))
9430 (package
9431 (inherit kombu)
9432 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9433 ;; It works fine on the python3 variant.
9434 #:tests? #f
9435 ,@(package-arguments kombu)))
9436 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9437 ,@(package-native-inputs kombu))))))
9438
9439 (define-public python-billiard
9440 (package
9441 (name "python-billiard")
9442 (version "3.3.0.23")
9443 (source
9444 (origin
9445 (method url-fetch)
9446 (uri (pypi-uri "billiard" version))
9447 (sha256
9448 (base32
9449 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9450 (build-system python-build-system)
9451 (native-inputs
9452 `(("python-nose" ,python-nose)))
9453 (home-page "http://github.com/celery/billiard")
9454 (synopsis
9455 "Python multiprocessing fork with improvements and bugfixes")
9456 (description
9457 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9458 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9459 pyprocessing package. This standalone variant is intended to be compatible with
9460 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9461 (license license:bsd-3)
9462 (properties `((python2-variant . ,(delay python2-billiard))))))
9463
9464 (define-public python2-billiard
9465 (let ((billiard (package-with-python2
9466 (strip-python2-variant python-billiard))))
9467 (package
9468 (inherit billiard)
9469 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9470 ("python2-mock" ,python2-mock)
9471 ,@(package-native-inputs billiard))))))
9472
9473 (define-public python-celery
9474 (package
9475 (name "python-celery")
9476 (version "3.1.24")
9477 (source
9478 (origin
9479 (method url-fetch)
9480 (uri (pypi-uri "celery" version))
9481 (sha256
9482 (base32
9483 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9484 (build-system python-build-system)
9485 (arguments
9486 `(#:phases
9487 (modify-phases %standard-phases
9488 ;; These tests break with Python 3.5:
9489 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9490 (replace 'check
9491 (lambda _
9492 (zero?
9493 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9494 (native-inputs
9495 `(("python-nose" ,python-nose)))
9496 (propagated-inputs
9497 `(("python-pytz" ,python-pytz)
9498 ("python-billiard" ,python-billiard)
9499 ("python-kombu" ,python-kombu)))
9500 (home-page "http://celeryproject.org")
9501 (synopsis "Distributed Task Queue")
9502 (description "Celery is an asynchronous task queue/job queue based on
9503 distributed message passing. It is focused on real-time operation, but
9504 supports scheduling as well. The execution units, called tasks, are executed
9505 concurrently on a single or more worker servers using multiprocessing,
9506 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9507 synchronously (wait until ready).")
9508 (license license:bsd-3)
9509 (properties `((python2-variant . ,(delay python2-celery))))))
9510
9511 (define-public python2-celery
9512 (let ((celery (package-with-python2
9513 (strip-python2-variant python-celery))))
9514 (package
9515 (inherit celery)
9516 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9517 ("python2-mock" ,python2-mock)
9518 ,@(package-native-inputs celery))))))
9519
9520 (define-public python-translitcodec
9521 (package
9522 (name "python-translitcodec")
9523 (version "0.4.0")
9524 (source
9525 (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "translitcodec" version))
9528 (sha256
9529 (base32
9530 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9531 (build-system python-build-system)
9532 (arguments
9533 `(#:tests? #f)) ; no tests provided
9534 (home-page
9535 "https://github.com/claudep/translitcodec")
9536 (synopsis
9537 "Unicode to 8-bit charset transliteration codec")
9538 (description
9539 "This package contains codecs for transliterating ISO 10646 texts into
9540 best-effort representations using smaller coded character sets (ASCII,
9541 ISO 8859, etc.).")
9542 (license license:expat)))
9543
9544 (define-public python2-translitcodec
9545 (package-with-python2 python-translitcodec))
9546
9547 (define-public python-editor
9548 (package
9549 (name "python-editor")
9550 (version "0.5")
9551 (source
9552 (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "python-editor" version))
9555 (sha256
9556 (base32
9557 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9558 (build-system python-build-system)
9559 (home-page
9560 "https://github.com/fmoo/python-editor")
9561 (synopsis
9562 "Programmatically open an editor, capture the result")
9563 (description
9564 "python-editor is a library that provides the editor module for
9565 programmatically interfacing with your system's $EDITOR.")
9566 (license license:asl2.0)))
9567
9568 (define-public python2-editor
9569 (package-with-python2 python-editor))
9570
9571 (define-public python-sphinxcontrib-programoutput
9572 (package
9573 (name "python-sphinxcontrib-programoutput")
9574 (version "0.8")
9575 (source (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9578 (sha256
9579 (base32
9580 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9581 (build-system python-build-system)
9582 (propagated-inputs
9583 `(("python-sphinx" ,python-sphinx)))
9584 (synopsis "Sphinx extension to include program output")
9585 (description "A Sphinx extension to literally insert the output of arbitrary
9586 commands into documents, helping you to keep your command examples up to date.")
9587 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
9588 (license license:bsd-2)))
9589
9590 (define-public python2-sphinxcontrib-programoutput
9591 (package-with-python2 python-sphinxcontrib-programoutput))
9592
9593 (define-public python-sphinx-repoze-autointerface
9594 (package
9595 (name "python-sphinx-repoze-autointerface")
9596 (version "0.8")
9597 (source (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9600 (sha256
9601 (base32
9602 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
9603 (build-system python-build-system)
9604 (propagated-inputs
9605 `(("python-sphinx" ,python-sphinx)
9606 ("python-zope-interface" ,python-zope-interface)))
9607 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9608 (description "This package defines an extension for the Sphinx documentation
9609 system. The extension allows generation of API documentation by
9610 introspection of @code{zope.interface} instances in code.")
9611 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
9612 (license license:repoze)))
9613
9614 (define-public python2-sphinx-repoze-autointerface
9615 (package-with-python2 python-sphinx-repoze-autointerface))
9616
9617 (define-public python-psycopg2
9618 (package
9619 (name "python-psycopg2")
9620 (version "2.6.1")
9621 (source
9622 (origin
9623 (method url-fetch)
9624 (uri (pypi-uri "psycopg2" version))
9625 (sha256
9626 (base32
9627 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9628 (build-system python-build-system)
9629 (arguments
9630 ;; Tests would require a postgresql database "psycopg2_test"
9631 ;; and a running postgresql database management service.
9632 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9633 (inputs
9634 `(("postgresql" ,postgresql))) ; libpq
9635 (home-page "http://initd.org/psycopg/")
9636 (synopsis "Python PostgreSQL adapter")
9637 (description
9638 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
9639 (license license:lgpl3+)))
9640
9641 (define-public python2-psycopg2
9642 (package-with-python2 python-psycopg2))
9643
9644 (define-public python-vobject
9645 (package
9646 (name "python-vobject")
9647 (version "0.9.2")
9648 (source (origin
9649 (method url-fetch)
9650 (uri (pypi-uri "vobject" version))
9651 (sha256
9652 (base32
9653 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9654 (build-system python-build-system)
9655 (arguments
9656 '(;; The test suite relies on some non-portable Windows interfaces.
9657 #:tests? #f))
9658 (propagated-inputs
9659 `(("python-dateutil" ,python-dateutil)
9660 ("python-pyicu" ,python-pyicu)))
9661 (synopsis "Parse and generate vCard and vCalendar files")
9662 (description "Vobject is intended to be a full featured Python package for
9663 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9664 are supported and well tested. vCard 3.0 files are supported, and all data
9665 should be imported, but only a few components are understood in a sophisticated
9666 way.")
9667 (home-page "http://eventable.github.io/vobject/")
9668 (license license:asl2.0)))
9669
9670 (define-public python2-vobject
9671 (package-with-python2 python-vobject))
9672
9673 (define-public python-munkres
9674 (package
9675 (name "python-munkres")
9676 (version "1.0.8")
9677 (source (origin
9678 (method url-fetch)
9679 (uri (pypi-uri "munkres" version))
9680 (sha256
9681 (base32
9682 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9683 (build-system python-build-system)
9684 (arguments
9685 '(#:tests? #f)) ; no test suite
9686 (home-page "http://software.clapper.org/munkres/")
9687 (synopsis "Implementation of the Munkres algorithm")
9688 (description "The Munkres module provides an implementation of the Munkres
9689 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9690 useful for solving the Assignment Problem.")
9691 (license license:bsd-3)))
9692
9693 (define-public python2-munkres
9694 (package-with-python2 python-munkres))
9695
9696 (define-public python-flask
9697 (package
9698 (name "python-flask")
9699 (version "0.11.1")
9700 (source (origin
9701 (method url-fetch)
9702 (uri (pypi-uri "Flask" version))
9703 (sha256
9704 (base32
9705 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
9706 (build-system python-build-system)
9707 (propagated-inputs
9708 `(("python-itsdangerous" ,python-itsdangerous)
9709 ("python-jinja2" ,python-jinja2)
9710 ("python-click" ,python-click)
9711 ("python-werkzeug" ,python-werkzeug)))
9712 (home-page "https://github.com/mitsuhiko/flask/")
9713 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9714 (description "Flask is a micro web framework based on the Werkzeug toolkit
9715 and Jinja2 template engine. It is called a micro framework because it does not
9716 presume or force a developer to use a particular tool or library.")
9717 (license license:bsd-3)))
9718
9719 (define-public python2-flask
9720 (package-with-python2 python-flask))
9721
9722 (define-public python-flask-wtf
9723 (package
9724 (name "python-flask-wtf")
9725 (version "0.13.1")
9726 (source
9727 (origin
9728 (method url-fetch)
9729 (uri (pypi-uri "Flask-WTF" version))
9730 (sha256
9731 (base32
9732 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9733 (build-system python-build-system)
9734 (propagated-inputs
9735 `(("python-flask-babel" ,python-flask-babel)
9736 ("python-babel" ,python-babel)
9737 ("python-wtforms" ,python-wtforms)))
9738 (native-inputs
9739 `(("python-nose" ,python-nose)))
9740 (home-page "https://github.com/lepture/flask-wtf")
9741 (synopsis "Simple integration of Flask and WTForms")
9742 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9743 upload, and reCAPTCHA.")
9744 (license license:bsd-3)))
9745
9746 (define-public python2-flask-wtf
9747 (package-with-python2 python-flask-wtf))
9748
9749 (define-public python-flask-multistatic
9750 (package
9751 (name "python-flask-multistatic")
9752 (version "1.0")
9753 (source
9754 (origin
9755 (method url-fetch)
9756 (uri (pypi-uri "flask-multistatic" version))
9757 (sha256
9758 (base32
9759 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9760 (build-system python-build-system)
9761 (propagated-inputs
9762 `(("python-flask" ,python-flask)))
9763 (home-page "https://pagure.io/flask-multistatic")
9764 (synopsis "Flask plugin to allow overriding static files")
9765 (description "@code{flask-multistatic} is a flask plugin that adds support
9766 for overriding static files.")
9767 (license license:gpl3+)))
9768
9769 (define-public python2-flask-multistatic
9770 (package-with-python2 python-flask-multistatic))
9771
9772 (define-public python-cookies
9773 (package
9774 (name "python-cookies")
9775 (version "2.2.1")
9776 (source (origin
9777 (method url-fetch)
9778 (uri (pypi-uri "cookies" version))
9779 (sha256
9780 (base32
9781 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9782 (build-system python-build-system)
9783 (arguments
9784 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9785 #:tests? #f))
9786 (native-inputs
9787 `(("python-pytest" ,python2-pytest)))
9788 (synopsis "HTTP cookie parser and renderer")
9789 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9790 Python.")
9791 (home-page "https://gitlab.com/sashahart/cookies")
9792 (license license:expat)))
9793
9794 (define-public python2-cookies
9795 (package-with-python2 python-cookies))
9796
9797 (define-public python-responses
9798 (package
9799 (name "python-responses")
9800 (version "0.5.1")
9801 (source (origin
9802 (method url-fetch)
9803 (uri (pypi-uri "responses" version))
9804 (sha256
9805 (base32
9806 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9807 (build-system python-build-system)
9808 (arguments
9809 `(;; Test suite is not distributed:
9810 ;; https://github.com/getsentry/responses/issues/38
9811 #:tests? #f))
9812 (native-inputs
9813 `(("python-mock" ,python-mock)))
9814 (propagated-inputs
9815 `(("python-requests" ,python-requests)
9816 ("python-cookies" ,python-cookies)
9817 ("python-six" ,python-six)))
9818 (home-page "https://github.com/getsentry/responses")
9819 (synopsis "Utility for mocking out the `requests` Python library")
9820 (description "A utility library for mocking out the `requests` Python
9821 library.")
9822 (license license:asl2.0)))
9823
9824 (define-public python2-responses
9825 (package-with-python2 python-responses))
9826
9827 (define-public python-whoosh
9828 (package
9829 (name "python-whoosh")
9830 (version "2.7.4")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "Whoosh" version))
9835 (sha256
9836 (base32
9837 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9838 (build-system python-build-system)
9839 (native-inputs
9840 `(("python-pytest" ,python-pytest)))
9841 (home-page "http://bitbucket.org/mchaput/whoosh")
9842 (synopsis "Full text indexing, search, and spell checking library")
9843 (description
9844 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9845 checking library.")
9846 (license license:bsd-2)))
9847
9848 (define-public python2-whoosh
9849 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9850 (package (inherit whoosh)
9851 (propagated-inputs
9852 `(("python2-backport-ssl-match-hostname"
9853 ,python2-backport-ssl-match-hostname)
9854 ,@(package-propagated-inputs whoosh))))))
9855
9856 (define-public python-pathlib
9857 (package
9858 (name "python-pathlib")
9859 (version "1.0.1")
9860 (source (origin
9861 (method url-fetch)
9862 (uri (pypi-uri "pathlib" version))
9863 (sha256
9864 (base32
9865 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9866 (build-system python-build-system)
9867 ;; The tests depend on the internal "test" module, which does not provide
9868 ;; a stable interface.
9869 (arguments `(#:tests? #f))
9870 (home-page "https://pathlib.readthedocs.org/")
9871 (synopsis "Object-oriented file system paths")
9872 (description "Pathlib offers a set of classes to handle file system paths.
9873 It offers the following advantages over using string objects:
9874
9875 @enumerate
9876 @item No more cumbersome use of os and os.path functions. Everything can
9877 be done easily through operators, attribute accesses, and method calls.
9878 @item Embodies the semantics of different path types. For example,
9879 comparing Windows paths ignores casing.
9880 @item Well-defined semantics, eliminating any inconsistencies or
9881 ambiguities (forward vs. backward slashes, etc.).
9882 @end enumerate
9883
9884 Note: In Python 3.4, pathlib is now part of the standard library. For other
9885 Python versions please consider python-pathlib2 instead, which tracks the
9886 standard library module. This module (python-pathlib) isn't maintained
9887 anymore.")
9888 (license license:expat)))
9889
9890 (define-public python2-pathlib
9891 (package-with-python2 python-pathlib))
9892
9893 (define-public python2-pathlib2
9894 (package
9895 (name "python2-pathlib2")
9896 (version "2.1.0")
9897 (source (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "pathlib2" version))
9900 (sha256
9901 (base32
9902 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9903 (build-system python-build-system)
9904 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9905 ;; version is 3.4 which already includes this package as part of the
9906 ;; standard library.
9907 (arguments
9908 `(#:python ,python-2))
9909 (native-inputs
9910 `(("python2-six" ,python2-six)))
9911 (home-page "http://pypi.python.org/pypi/pathlib2/")
9912 (synopsis "Object-oriented file system paths - backport of standard
9913 pathlib module")
9914 (description "The goal of pathlib2 is to provide a backport of standard
9915 pathlib module which tracks the standard library module, so all the newest
9916 features of the standard pathlib can be used also on older Python versions.
9917
9918 Pathlib offers a set of classes to handle file system paths. It offers the
9919 following advantages over using string objects:
9920
9921 @enumerate
9922 @item No more cumbersome use of os and os.path functions. Everything can
9923 be done easily through operators, attribute accesses, and method calls.
9924 @item Embodies the semantics of different path types. For example,
9925 comparing Windows paths ignores casing.
9926 @item Well-defined semantics, eliminating any inconsistencies or
9927 ambiguities (forward vs. backward slashes, etc.).
9928 @end enumerate")
9929 (license license:expat)))
9930
9931 (define-public python-jellyfish
9932 (package
9933 (name "python-jellyfish")
9934 (version "0.5.6")
9935 (source (origin
9936 (method url-fetch)
9937 (uri (pypi-uri "jellyfish" version))
9938 (sha256
9939 (base32
9940 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9941 (build-system python-build-system)
9942 (native-inputs
9943 `(("python-pytest" ,python-pytest)))
9944 (home-page "https://github.com/jamesturk/jellyfish")
9945 (synopsis "Approximate and phonetic matching of strings")
9946 (description "Jellyfish uses a variety of string comparison and phonetic
9947 encoding algorithms to do fuzzy string matching.")
9948 (license license:bsd-2)
9949 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9950
9951 (define-public python2-jellyfish
9952 (let ((jellyfish (package-with-python2
9953 (strip-python2-variant python-jellyfish))))
9954 (package (inherit jellyfish)
9955 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9956 ,@(package-native-inputs jellyfish))))))
9957
9958 (define-public python2-unicodecsv
9959 (package
9960 (name "python2-unicodecsv")
9961 (version "0.14.1")
9962 (source (origin
9963 (method url-fetch)
9964 ;; The test suite is not included in the PyPi release.
9965 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9966 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9967 "archive/" version ".tar.gz"))
9968 (file-name (string-append name "-" version ".tar.gz"))
9969 (sha256
9970 (base32
9971 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9972 (build-system python-build-system)
9973 (arguments
9974 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9975 #:python ,python-2))
9976 (native-inputs
9977 `(("python2-unittest2" ,python2-unittest2)))
9978 (home-page "https://github.com/jdunck/python-unicodecsv")
9979 (synopsis "Unicode CSV module for Python 2")
9980 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9981 module, adding support for Unicode strings.")
9982 (license license:bsd-2)))
9983
9984 (define-public python-rarfile
9985 (package
9986 (name "python-rarfile")
9987 (version "2.8")
9988 (source (origin
9989 (method url-fetch)
9990 (uri (pypi-uri "rarfile" version))
9991 (sha256
9992 (base32
9993 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9994 (build-system python-build-system)
9995 (arguments
9996 '(#:phases
9997 (modify-phases %standard-phases
9998 (replace 'check
9999 ;; Many tests fail, but the installation proceeds.
10000 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10001 (native-inputs
10002 `(("which" ,which))) ; required for tests
10003 (propagated-inputs
10004 `(("libarchive" ,libarchive)))
10005 (home-page "https://github.com/markokr/rarfile")
10006 (synopsis "RAR archive reader for Python")
10007 (description "This is Python module for RAR archive reading. The interface
10008 is made as zipfile like as possible.")
10009 (license license:isc)))
10010
10011 (define-public python2-rarfile
10012 (package-with-python2 python-rarfile))
10013
10014 (define-public python-magic
10015 (package
10016 (name "python-magic")
10017 (version "0.4.3")
10018 (source
10019 (origin
10020 (method url-fetch)
10021 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10022 version ".tar.gz"))
10023 (sha256
10024 (base32
10025 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10026 (file-name (string-append name "-" version "-checkout"))))
10027 (build-system python-build-system)
10028 (arguments
10029 ;; The tests are unreliable, so don't run them. The tests fail
10030 ;; under Python3 because they were written for Python2 and
10031 ;; contain import statements that do not work in Python3. One of
10032 ;; the tests fails under Python2 because its assertions are
10033 ;; overly stringent; it relies on comparing output strings which
10034 ;; are brittle and can change depending on the version of
10035 ;; libmagic being used and the system on which the test is
10036 ;; running. In my case, under GuixSD 0.10.0, only one test
10037 ;; failed, and it seems to have failed only because the version
10038 ;; of libmagic that is packaged in Guix outputs a slightly
10039 ;; different (but not wrong) string than the one that the test
10040 ;; expected.
10041 '(#:tests? #f
10042 #:phases (modify-phases %standard-phases
10043 ;; Replace a specific method call with a hard-coded
10044 ;; path to the necessary libmagic.so file in the
10045 ;; store. If we don't do this, then the method call
10046 ;; will fail to find the libmagic.so file, which in
10047 ;; turn will cause any application using
10048 ;; python-magic to fail.
10049 (add-before 'build 'hard-code-path-to-libmagic
10050 (lambda* (#:key inputs #:allow-other-keys)
10051 (let ((file (assoc-ref inputs "file")))
10052 (substitute* "magic.py"
10053 (("ctypes.util.find_library\\('magic'\\)")
10054 (string-append "'" file "/lib/libmagic.so'")))
10055 #t)))
10056 (add-before 'install 'disable-egg-compression
10057 (lambda _
10058 (let ((port (open-file "setup.cfg" "a")))
10059 (display "\n[easy_install]\nzip_ok = 0\n"
10060 port)
10061 (close-port port)
10062 #t))))))
10063 (inputs
10064 ;; python-magic needs to be able to find libmagic.so.
10065 `(("file" ,file)))
10066 (home-page "https://github.com/ahupp/python-magic")
10067 (synopsis "File type identification using libmagic")
10068 (description
10069 "This module uses ctypes to access the libmagic file type
10070 identification library. It makes use of the local magic database and
10071 supports both textual and MIME-type output. Note that this module and
10072 the python-file module both provide a \"magic.py\" file; these two
10073 modules, which are different and were developed separately, both serve
10074 the same purpose: to provide Python bindings for libmagic.")
10075 (license license:expat)))
10076
10077 (define-public python2-magic
10078 (package-with-python2 python-magic))
10079
10080 (define-public python2-s3cmd
10081 (package
10082 (name "python2-s3cmd")
10083 (version "1.6.1")
10084 (source
10085 (origin
10086 (method url-fetch)
10087 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10088 "s3cmd-" version ".tar.gz"))
10089 (sha256
10090 (base32
10091 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10092 (build-system python-build-system)
10093 (arguments
10094 ;; s3cmd is written for python2 only and contains no tests.
10095 `(#:python ,python-2
10096 #:tests? #f))
10097 (propagated-inputs
10098 `(("python2-dateutil" ,python2-dateutil)
10099 ;; The python-file package also provides a magic.py module.
10100 ;; This is an unfortunate state of affairs; however, s3cmd
10101 ;; fails to install if it cannot find specifically the
10102 ;; python-magic package. Thus we include it, instead of using
10103 ;; python-file. Ironically, s3cmd sometimes works better
10104 ;; without libmagic bindings at all:
10105 ;; https://github.com/s3tools/s3cmd/issues/198
10106 ("python2-magic" ,python2-magic)))
10107 (home-page "http://s3tools.org/s3cmd")
10108 (synopsis "Command line tool for S3-compatible storage services")
10109 (description
10110 "S3cmd is a command line tool for uploading, retrieving and managing data
10111 in storage services that are compatible with the Amazon Simple Storage
10112 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10113 GnuPG encryption, and more. It also supports management of Amazon's
10114 CloudFront content delivery network.")
10115 (license license:gpl2+)))
10116
10117 (define-public python-pkgconfig
10118 (package
10119 (name "python-pkgconfig")
10120 (version "1.1.0")
10121 (source
10122 (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "pkgconfig" version))
10125 (sha256
10126 (base32
10127 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10128 (build-system python-build-system)
10129 (native-inputs
10130 `(("python-nose" ,python-nose)))
10131 (inputs
10132 `(("pkg-config" ,pkg-config)))
10133 (arguments
10134 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10135 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10136 #:tests? #f
10137 ;; Hard-code the path to pkg-config.
10138 #:phases
10139 (modify-phases %standard-phases
10140 (add-before
10141 'build 'patch
10142 (lambda _
10143 (substitute* "pkgconfig/pkgconfig.py"
10144 (("cmd = 'pkg-config")
10145 (string-append "cmd = '" (which "pkg-config"))))
10146 #t)))))
10147 (home-page "http://github.com/matze/pkgconfig")
10148 (synopsis "Python interface for pkg-config")
10149 (description "This module provides a Python interface to pkg-config. It
10150 can be used to find all pkg-config packages, check if a package exists,
10151 check if a package meets certain version requirements, query CFLAGS and
10152 LDFLAGS and parse the output to build extensions with setup.py.")
10153 (license license:expat)))
10154
10155 (define-public python2-pkgconfig
10156 (package-with-python2 python-pkgconfig))
10157
10158 (define-public python-bz2file
10159 (package
10160 (name "python-bz2file")
10161 (version "0.98")
10162 (source
10163 (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "bz2file" version))
10166 (sha256
10167 (base32
10168 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10169 (build-system python-build-system)
10170 (arguments
10171 `(#:tests? #f)) ; Tests use deprecated python modules.
10172 (home-page "https://github.com/nvawda/bz2file")
10173 (synopsis "Read and write bzip2-compressed files")
10174 (description
10175 "Bz2file is a Python library for reading and writing bzip2-compressed
10176 files. It contains a drop-in replacement for the I/O interface in the
10177 standard library's @code{bz2} module, including features from the latest
10178 development version of CPython that are not available in older releases.")
10179 (license license:asl2.0)
10180 (properties `((python2-variant . ,(delay python2-bz2file))))))
10181
10182 (define-public python2-bz2file
10183 (let ((base (package-with-python2
10184 (strip-python2-variant python-bz2file))))
10185 (package
10186 (inherit base)
10187 (arguments
10188 `(#:python ,python-2
10189 #:phases
10190 (modify-phases %standard-phases
10191 ;; 'python setup.py test' does not work as of 0.98.
10192 ;; There is only the one test file, so we run it directly.
10193 (replace 'check
10194 (lambda _ (zero? (system* "python"
10195 "test_bz2file.py"))))))))))
10196
10197 (define-public python-future
10198 (package
10199 (name "python-future")
10200 (version "0.15.2")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "future" version))
10205 (sha256
10206 (base32
10207 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10208 (build-system python-build-system)
10209 ;; Many tests connect to the network or are otherwise flawed.
10210 ;; https://github.com/PythonCharmers/python-future/issues/210
10211 (arguments
10212 `(#:tests? #f))
10213 (home-page "http://python-future.org")
10214 (synopsis "Single-source support for Python 3 and 2")
10215 (description
10216 "@code{python-future} is the missing compatibility layer between Python 2 and
10217 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10218 to support both Python 2 and Python 3 with minimal overhead.")
10219 (license license:expat)))
10220
10221 (define-public python2-future
10222 (package-with-python2 python-future))
10223
10224 (define-public python-cysignals
10225 (package
10226 (name "python-cysignals")
10227 (version "1.1.0")
10228 (source
10229 (origin
10230 (method url-fetch)
10231 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10232 (sha256
10233 (base32
10234 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10235 (build-system python-build-system)
10236 (native-inputs
10237 `(("python-cython" ,python-cython)
10238 ("python-sphinx" ,python-sphinx)))
10239 (inputs
10240 `(("pari-gp" ,pari-gp)))
10241 (arguments
10242 `(#:modules ((guix build python-build-system)
10243 ((guix build gnu-build-system) #:prefix gnu:)
10244 (guix build utils))
10245 ;; FIXME: Tests are executed after installation and currently fail
10246 ;; when not installing into standard locations; the author is working
10247 ;; on a fix.
10248 #:tests? #f
10249 #:phases
10250 (modify-phases %standard-phases
10251 (add-before
10252 'build 'configure
10253 (assoc-ref gnu:%standard-phases 'configure)))))
10254 (home-page
10255 "https://github.com/sagemath/cysignals")
10256 (synopsis
10257 "Handling of interrupts and signals for Cython")
10258 (description
10259 "The cysignals package provides mechanisms to handle interrupts (and
10260 other signals and errors) in Cython code, using two related approaches,
10261 for mixed Cython/Python code or external C libraries and pure Cython code,
10262 respectively.")
10263 (license license:lgpl3+)))
10264
10265 (define-public python2-cysignals
10266 (package-with-python2 python-cysignals))
10267
10268 (define-public python2-shedskin
10269 (package
10270 (name "python2-shedskin")
10271 (version "0.9.4")
10272 (source
10273 (origin
10274 (method url-fetch)
10275 (uri (string-append "https://github.com/shedskin/shedskin/"
10276 "releases/download/v" version
10277 "/shedskin-" version ".tgz"))
10278 (sha256
10279 (base32
10280 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10281 (build-system python-build-system)
10282 (arguments
10283 `(#:python ,python-2
10284 #:phases (modify-phases %standard-phases
10285 (add-after 'unpack 'fix-resulting-include-libs
10286 (lambda* (#:key inputs #:allow-other-keys)
10287 (let ((libgc (assoc-ref inputs "libgc"))
10288 (pcre (assoc-ref inputs "pcre")))
10289 (substitute* "shedskin/makefile.py"
10290 (("variable == 'CCFLAGS':[ ]*")
10291 (string-append "variable == 'CCFLAGS':\n"
10292 " line += ' -I " pcre "/include"
10293 " -I " libgc "/include'"))
10294 (("variable == 'LFLAGS':[ ]*")
10295 (string-append "variable == 'LFLAGS':\n"
10296 " line += ' -L" pcre "/lib"
10297 " -L " libgc "/lib'")))
10298 #t))))))
10299 (inputs `(("pcre" ,pcre)
10300 ("libgc" ,libgc)))
10301 (home-page "https://shedskin.github.io/")
10302 (synopsis "Experimental Python-2 to C++ Compiler")
10303 (description (string-append "This is an experimental compiler for a subset of
10304 Python. It generates C++ code and a Makefile."))
10305 (license (list license:gpl3 license:bsd-3 license:expat))))
10306
10307 (define-public python2-rope
10308 (package
10309 (name "python2-rope")
10310 (version "0.10.3")
10311 (source
10312 (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "rope" version))
10315 (sha256
10316 (base32
10317 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10318 (arguments
10319 ;; Rope is currently python-2 only.
10320 ;; https://github.com/python-rope/rope/issues/57
10321 `(#:python ,python-2))
10322 (build-system python-build-system)
10323 (native-inputs
10324 `(("python2-unittest2" ,python2-unittest2)))
10325 (home-page "https://github.com/python-rope/rope")
10326 (synopsis "Refactoring library for Python")
10327 (description "Rope is a refactoring library for Python. It facilitates
10328 the renaming, moving and extracting of attributes, functions, modules, fields
10329 and parameters in Python 2 source code. These refactorings can also be applied
10330 to occurences in strings and comments.")
10331 (license license:gpl2)))
10332
10333 (define-public python-py3status
10334 (package
10335 (name "python-py3status")
10336 (version "3.1")
10337 (source
10338 (origin
10339 (method url-fetch)
10340 (uri (pypi-uri "py3status" version))
10341 (sha256
10342 (base32
10343 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10344 (build-system python-build-system)
10345 (arguments
10346 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10347 (home-page "https://github.com/ultrabug/py3status")
10348 (synopsis "Extensible i3status wrapper written in Python")
10349 (description "py3status is an i3status wrapper which extends i3status
10350 functionality in a modular way, allowing you to extend your panel with your
10351 own code, responding to click events and updating clock every second.")
10352 (license license:bsd-3)))
10353
10354 (define-public python-tblib
10355 (package
10356 (name "python-tblib")
10357 (version "1.3.0")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (pypi-uri "tblib" version))
10361 (sha256 (base32
10362 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10363 (build-system python-build-system)
10364 (arguments
10365 `(#:phases
10366 (modify-phases %standard-phases
10367 (replace 'check
10368 (lambda _
10369 ;; Upstream runs tests after installation and the package itself
10370 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10371 ;; found.
10372 (setenv "PYTHONPATH"
10373 (string-append (getcwd) "/build/lib:"
10374 (getenv "PYTHONPATH")))
10375 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10376 (native-inputs
10377 `(("python-pytest" ,python-pytest)
10378 ("python-six" ,python-six)))
10379 (home-page "https://github.com/ionelmc/python-tblib")
10380 (synopsis "Traceback serialization library")
10381 (description
10382 "Traceback serialization allows you to:
10383
10384 @enumerate
10385 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10386 different processes. This allows better error handling when running code over
10387 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10388
10389 @item Parse traceback strings and raise with the parsed tracebacks.
10390 @end enumerate\n")
10391 (license license:bsd-3)))
10392
10393 (define-public python2-tblib
10394 (package-with-python2 python-tblib))
10395
10396 (define-public python-sqlparse
10397 (package
10398 (name "python-sqlparse")
10399 (version "0.1.19")
10400 (source (origin
10401 (method url-fetch)
10402 (uri (pypi-uri "sqlparse" version))
10403 (sha256
10404 (base32
10405 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10406 (build-system python-build-system)
10407 (arguments
10408 `(#:phases
10409 (modify-phases %standard-phases
10410 (replace 'check
10411 (lambda* _
10412 ;; setup.py-integrated 2to3 only affects the build files, but
10413 ;; py.test is using the source files. So we need to convert them
10414 ;; manually.
10415 (when (zero? (system* "python3"))
10416 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10417 (zero? (system* "py.test")))))))
10418 (native-inputs
10419 `(("python-pytest" ,python-pytest)))
10420 (home-page "https://github.com/andialbrecht/sqlparse")
10421 (synopsis "Non-validating SQL parser")
10422 (description "Sqlparse is a non-validating SQL parser for Python. It
10423 provides support for parsing, splitting and formatting SQL statements.")
10424 (license license:bsd-3)))
10425
10426 (define-public python2-sqlparse
10427 (package-with-python2 python-sqlparse))
10428
10429 (define-public python-greenlet
10430 (package
10431 (name "python-greenlet")
10432 (version "0.4.11")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "greenlet" version))
10436 (sha256
10437 (base32
10438 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10439 (build-system python-build-system)
10440 (home-page "https://greenlet.readthedocs.io/")
10441 (synopsis "Lightweight in-process concurrent programming")
10442 (description
10443 "Greenlet package is a spin-off of Stackless, a version of CPython
10444 that supports micro-threads called \"tasklets\". Tasklets run
10445 pseudo-concurrently (typically in a single or a few OS-level threads) and
10446 are synchronized with data exchanges on \"channels\".")
10447 (license (list license:psfl license:expat))))
10448
10449 (define-public python2-greenlet
10450 (package-with-python2 python-greenlet))
10451
10452 (define-public python-gevent
10453 (package
10454 (name "python-gevent")
10455 (version "1.1.1")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "gevent" version))
10459 (sha256
10460 (base32
10461 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10462 (modules '((guix build utils)))
10463 (snippet
10464 '(begin
10465 ;; unbunding libev and c-ares
10466 (for-each delete-file-recursively '("libev" "c-ares"))
10467 ;; fixing testsuite
10468 (call-with-output-file "greentest/__init__.py" noop)
10469 (substitute* "greentest/testrunner.py"
10470 (("import util") "from . import util")
10471 (("from util import log") "from .util import log"))))))
10472 (build-system python-build-system)
10473 (propagated-inputs
10474 `(("python-greenlet" ,python-greenlet)))
10475 (native-inputs
10476 `(("python-six" ,python-six)))
10477 (inputs
10478 `(("c-ares" ,c-ares)
10479 ("libev" ,libev)))
10480 (home-page "http://www.gevent.org/")
10481 (synopsis "Coroutine-based network library")
10482 (description
10483 "gevent is a coroutine-based Python networking library that uses greenlet
10484 to provide a high-level synchronous API on top of the libev event loop.")
10485 (license license:expat)))
10486
10487 (define-public python2-gevent
10488 (package-with-python2 python-gevent))
10489
10490 (define-public python-twisted
10491 (package
10492 (name "python-twisted")
10493 (version "16.2.0")
10494 (source (origin
10495 (method url-fetch)
10496 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10497 (sha256
10498 (base32
10499 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10500 (build-system python-build-system)
10501 (arguments
10502 '(#:tests? #f)) ; FIXME: Some tests are failing.
10503 ;; #:phases
10504 ;; (modify-phases %standard-phases
10505 ;; (replace 'check
10506 ;; (lambda _
10507 ;; (zero? (system* "./bin/trial" "twisted")))))
10508 (propagated-inputs
10509 `(("python-zope-interface" ,python-zope-interface)))
10510 (home-page "https://twistedmatrix.com/")
10511 (synopsis "Asynchronous networking framework written in Python")
10512 (description
10513 "Twisted is an extensible framework for Python programming, with special
10514 focus on event-based network programming and multiprotocol integration.")
10515 (license license:expat)))
10516
10517 (define-public python2-twisted
10518 (package-with-python2 python-twisted))
10519
10520 (define-public python-pika
10521 (package
10522 (name "python-pika")
10523 (version "0.10.0")
10524 (source
10525 (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "pika" version))
10528 (sha256
10529 (base32
10530 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10531 (build-system python-build-system)
10532 (native-inputs
10533 `(("python-pyev" ,python-pyev)
10534 ("python-tornado" ,python-tornado)
10535 ("python-twisted" ,python-twisted)))
10536 (home-page "https://pika.readthedocs.org")
10537 (synopsis "Pure Python AMQP Client Library")
10538 (description
10539 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10540 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10541 network support library.")
10542 (license license:bsd-3)))
10543
10544 (define-public python2-pika
10545 (package-with-python2 python-pika))
10546
10547 (define-public python-ply
10548 (package
10549 (name "python-ply")
10550 (version "3.9")
10551 (source
10552 (origin
10553 (method url-fetch)
10554 (uri (pypi-uri "ply" version))
10555 (sha256
10556 (base32
10557 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
10558 (build-system python-build-system)
10559 (home-page "http://www.dabeaz.com/ply/")
10560 (synopsis "Python Lex & Yacc")
10561 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10562 It uses LR parsing and does extensive error checking.")
10563 (license license:bsd-3)))
10564
10565 (define-public python2-ply
10566 (package-with-python2 python-ply))
10567
10568 (define-public python-tabulate
10569 (package
10570 (name "python-tabulate")
10571 (version "0.7.5")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "tabulate" version))
10575 (sha256
10576 (base32
10577 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10578 ;; Fix tests
10579 (modules '((guix build utils)))
10580 (snippet '(substitute* '("test/test_cli.py"
10581 "test/test_input.py"
10582 "test/test_output.py"
10583 "test/test_regression.py")
10584 (("from common") "from nose.tools")))))
10585 (build-system python-build-system)
10586 (native-inputs
10587 `(;; For testing
10588 ("python-nose" ,python-nose)))
10589 (home-page "https://bitbucket.org/astanin/python-tabulate")
10590 (synopsis "Pretty-print tabular data")
10591 (description
10592 "Tabulate is a library and command-line utility to pretty-print tabular
10593 data in Python.")
10594 (license license:expat)))
10595
10596 (define-public python2-tabulate
10597 (package-with-python2 python-tabulate))
10598
10599 (define-public python-kazoo
10600 (package
10601 (name "python-kazoo")
10602 (version "2.2.1")
10603 (source
10604 (origin
10605 (method url-fetch)
10606 (uri (pypi-uri "kazoo" version))
10607 (sha256
10608 (base32
10609 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10610 (build-system python-build-system)
10611 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10612 (propagated-inputs
10613 `(("python-six" ,python-six)))
10614 (home-page "https://kazoo.readthedocs.org")
10615 (synopsis "High-level Zookeeper client library")
10616 (description
10617 "Kazoo is a Python client library for the Apache Zookeeper distributed
10618 application service. It is designed to be easy to use and to avoid common
10619 programming errors.")
10620 (license license:asl2.0)))
10621
10622 (define-public python2-kazoo
10623 (package-with-python2 python-kazoo))
10624
10625 (define-public python-pykafka
10626 (package
10627 (name "python-pykafka")
10628 (version "2.4.0")
10629 (source (origin
10630 (method url-fetch)
10631 (uri (string-append
10632 "https://pypi.python.org/packages/8b/3e/"
10633 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10634 "pykafka-" version ".tar.gz"))
10635 (sha256
10636 (base32
10637 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10638 (build-system python-build-system)
10639 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10640 (propagated-inputs
10641 `(("python-gevent" ,python-gevent)
10642 ("python-kazoo" ,python-kazoo)
10643 ("python-tabulate" ,python-tabulate)))
10644 (inputs
10645 `(("librdkafka" ,librdkafka)))
10646 (home-page "https://pykafka.readthedocs.io/")
10647 (synopsis "Apache Kafka client for Python")
10648 (description
10649 "PyKafka is a client for the Apache Kafka distributed messaging system.
10650 It includes Python implementations of Kafka producers and consumers, which
10651 are optionally backed by a C extension built on librdkafka.")
10652 (license license:asl2.0)))
10653
10654 (define-public python2-pykafka
10655 (package-with-python2 python-pykafka))
10656
10657 (define-public python-wcwidth
10658 (package
10659 (name "python-wcwidth")
10660 (version "0.1.6")
10661 (source
10662 (origin
10663 (method url-fetch)
10664 (uri (string-append
10665 "https://pypi.python.org/packages/"
10666 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10667 "wcwidth-" version ".tar.gz"))
10668 (sha256
10669 (base32
10670 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10671 (build-system python-build-system)
10672 (home-page "https://github.com/jquast/wcwidth")
10673 (synopsis "Measure number of terminal column cells of wide-character codes")
10674 (description "Wcwidth measures the number of terminal column cells of
10675 wide-character codes. It is useful for those implementing a terminal emulator,
10676 or programs that carefully produce output to be interpreted by one. It is a
10677 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10678 specified in POSIX.1-2001 and POSIX.1-2008.")
10679 (license license:expat)))
10680
10681 (define-public python2-wcwidth
10682 (package-with-python2 python-wcwidth))
10683
10684 (define-public python2-jsonrpclib
10685 (package
10686 (name "python2-jsonrpclib")
10687 (version "0.1.7")
10688 (source (origin
10689 (method url-fetch)
10690 (uri (string-append
10691 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10692 "jsonrpclib-" version ".tar.gz"))
10693 (sha256
10694 (base32
10695 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10696 (build-system python-build-system)
10697 (arguments
10698 `(#:tests? #f
10699 #:python ,python-2))
10700 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10701 (synopsis "Implementation of JSON-RPC specification for Python")
10702 (description
10703 "This library is an implementation of the JSON-RPC specification.
10704 It supports both the original 1.0 specification, as well as the
10705 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10706 etc.")
10707 (license license:asl2.0)))
10708
10709 (define-public python-chai
10710 (package
10711 (name "python-chai")
10712 (version "1.1.1")
10713 (source (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "chai" version))
10716 (sha256
10717 (base32
10718 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10719 (build-system python-build-system)
10720 (home-page "https://github.com/agoragames/chai")
10721 (synopsis "Mocking framework for Python")
10722 (description
10723 "Chai provides an api for mocking, stubbing and spying your python
10724 objects, patterned after the Mocha library for Ruby.")
10725 (license license:bsd-3)))
10726
10727 (define-public python2-chai
10728 (package-with-python2 python-chai))
10729
10730 (define-public python-arrow
10731 (package
10732 (name "python-arrow")
10733 (version "0.8.0")
10734 (source (origin
10735 (method url-fetch)
10736 (uri (pypi-uri "arrow" version))
10737 (sha256
10738 (base32
10739 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10740 (build-system python-build-system)
10741 (native-inputs
10742 `(;; For testing
10743 ("python-chai" ,python-chai)
10744 ("python-simplejson" ,python-simplejson)))
10745 (propagated-inputs
10746 `(("python-dateutil" ,python-dateutil)))
10747 (home-page "https://github.com/crsmithdev/arrow/")
10748 (synopsis "Dates and times for Python")
10749 (description
10750 "Arrow is a Python library to creating, manipulating, formatting and
10751 converting dates, times, and timestamps. It implements and updates the
10752 datetime type.")
10753 (license license:asl2.0)))
10754
10755 (define-public python2-arrow
10756 (package-with-python2 python-arrow))
10757
10758 (define-public python-inflection
10759 (package
10760 (name "python-inflection")
10761 (version "0.3.1")
10762 (source
10763 (origin (method url-fetch)
10764 (uri (pypi-uri "inflection" version))
10765 (sha256
10766 (base32
10767 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10768 (build-system python-build-system)
10769 (native-inputs
10770 `(("python-pytest" ,python-pytest)))
10771 (home-page "http://github.com/jpvanhal/inflection")
10772 (synopsis "Python string transformation library")
10773 (description
10774 "Inflection is a string transformation library. It singularizes
10775 and pluralizes English words, and transforms strings from CamelCase to
10776 underscored string.")
10777 (license license:expat)))
10778
10779 (define-public python2-inflection
10780 (package-with-python2 python-inflection))
10781
10782 (define-public python-pylev
10783 (package
10784 (name "python-pylev")
10785 (version "1.3.0")
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "pylev" version))
10789 (sha256
10790 (base32
10791 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10792 (build-system python-build-system)
10793 (home-page "http://github.com/toastdriven/pylev")
10794 (synopsis "Levenshtein distance implementation in Python")
10795 (description "Pure Python Levenshtein implementation, based off the
10796 Wikipedia code samples at
10797 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10798 (license license:bsd-3)))
10799
10800 (define-public python2-pylev
10801 (package-with-python2 python-pylev))
10802
10803 (define-public python-cleo
10804 (package
10805 (name "python-cleo")
10806 (version "0.4.1")
10807 (source (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "cleo" version))
10810 (sha256
10811 (base32
10812 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10813 (build-system python-build-system)
10814 (native-inputs
10815 `(;; For testing
10816 ("python-mock" ,python-mock)
10817 ("python-pytest" ,python-pytest)))
10818 (propagated-inputs
10819 `(("python-psutil" ,python-psutil)
10820 ("python-pylev" ,python-pylev)))
10821 (home-page "https://github.com/sdispater/cleo")
10822 (synopsis "Command-line arguments library for Python")
10823 (description
10824 "Cleo allows you to create command-line commands with signature in
10825 docstring and colored output.")
10826 (license license:expat)))
10827
10828 (define-public python2-cleo
10829 (package-with-python2 python-cleo))
10830
10831 (define-public python-lazy-object-proxy
10832 (package
10833 (name "python-lazy-object-proxy")
10834 (version "1.2.2")
10835 (source (origin
10836 (method url-fetch)
10837 (uri (pypi-uri "lazy-object-proxy" version))
10838 (sha256
10839 (base32
10840 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10841 (build-system python-build-system)
10842 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10843 (synopsis "Lazy object proxy for python")
10844 (description
10845 "Lazy object proxy is an object that wraps a callable but defers the call
10846 until the object is actually required, and caches the result of said call.")
10847 (license license:bsd-2)))
10848
10849 (define-public python2-lazy-object-proxy
10850 (package-with-python2 python-lazy-object-proxy))
10851
10852 (define-public python-dnspython
10853 (package
10854 (name "python-dnspython")
10855 (version "1.15.0")
10856 (source (origin
10857 (method url-fetch)
10858 (uri (string-append "http://www.dnspython.org/kits/"
10859 version "/dnspython-" version ".tar.gz"))
10860 (sha256
10861 (base32
10862 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10863 (build-system python-build-system)
10864 (arguments '(#:tests? #f)) ; XXX: requires internet access
10865 (home-page "http://www.dnspython.org")
10866 (synopsis "DNS toolkit for Python")
10867 (description
10868 "dnspython is a DNS toolkit for Python. It supports almost all record
10869 types. It can be used for queries, zone transfers, and dynamic updates.
10870 It supports TSIG authenticated messages and EDNS0.")
10871 (license license:expat)))
10872
10873 (define-public python2-dnspython
10874 (package-with-python2 python-dnspython))
10875
10876 (define-public python-email-validator
10877 (package
10878 (name "python-email-validator")
10879 (version "1.0.1")
10880 (source
10881 (origin (method url-fetch)
10882 (uri (pypi-uri "email_validator" version))
10883 (sha256
10884 (base32
10885 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10886 (build-system python-build-system)
10887 (arguments
10888 '(#:phases
10889 (modify-phases %standard-phases
10890 (add-before 'build 'use-dnspython
10891 (lambda _
10892 (substitute* "setup.py"
10893 (("dnspython3") "dnspython"))
10894 #t)))))
10895 (propagated-inputs
10896 `(("python-dnspython" ,python-dnspython)
10897 ("python-idna" ,python-idna)))
10898 (home-page "https://github.com/JoshData/python-email-validator")
10899 (synopsis "Email address validation library for Python")
10900 (description
10901 "This library validates email address syntax and deliverability.")
10902 (license license:cc0)))
10903
10904 (define-public python2-email-validator
10905 (package-with-python2 python-email-validator))
10906
10907 (define-public python-ukpostcodeparser
10908 (package
10909 (name "python-ukpostcodeparser")
10910 (version "1.0.3")
10911 (source (origin
10912 (method url-fetch)
10913 (uri (pypi-uri "UkPostcodeParser" version))
10914 (sha256
10915 (base32
10916 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10917 (build-system python-build-system)
10918 (home-page "https://github.com/hamstah/ukpostcodeparser")
10919 (synopsis "UK Postcode parser for Python")
10920 (description
10921 "This library provides the @code{parse_uk_postcode} function for
10922 parsing UK postcodes.")
10923 (license license:expat)))
10924
10925 (define-public python2-ukpostcodeparser
10926 (package-with-python2 python-ukpostcodeparser))
10927
10928 (define-public python-fake-factory
10929 (package
10930 (name "python-fake-factory")
10931 (version "0.7.2")
10932 (source (origin
10933 (method url-fetch)
10934 (uri (pypi-uri "fake-factory" version))
10935 (sha256
10936 (base32
10937 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10938 (build-system python-build-system)
10939 (arguments
10940 '(#:phases
10941 (modify-phases %standard-phases
10942 (replace 'check
10943 (lambda _
10944 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
10945 (native-inputs
10946 `(;; For testing
10947 ("python-email-validator" ,python-email-validator)
10948 ("python-mock" ,python-mock)
10949 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10950 (propagated-inputs
10951 `(("python-dateutil" ,python-dateutil)
10952 ("python-six" ,python-six)))
10953 (home-page "https://github.com/joke2k/faker")
10954 (synopsis "Python package that generates fake data")
10955 (description
10956 "Faker is a Python package that generates fake data such as names,
10957 addresses, and phone numbers.")
10958 (license license:expat)
10959 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10960
10961 (define-public python2-fake-factory
10962 (let ((base (package-with-python2 (strip-python2-variant
10963 python-fake-factory))))
10964 (package
10965 (inherit base)
10966 (propagated-inputs
10967 `(("python2-ipaddress" ,python2-ipaddress)
10968 ,@(package-propagated-inputs base))))))
10969
10970 (define-public python-pyaml
10971 (package
10972 (name "python-pyaml")
10973 (version "15.8.2")
10974 (source (origin
10975 (method url-fetch)
10976 (uri (pypi-uri "pyaml" version))
10977 (sha256
10978 (base32
10979 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10980 (build-system python-build-system)
10981 (native-inputs
10982 `(("python-unidecode" ,python-unidecode)))
10983 (propagated-inputs
10984 `(("python-pyyaml" ,python-pyyaml)))
10985 (home-page "https://github.com/mk-fg/pretty-yaml")
10986 (synopsis "YAML pretty-print library for Python")
10987 (description
10988 "pyaml is a PyYAML based python module to produce pretty and readable
10989 YAML-serialized data.")
10990 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10991
10992 (define-public python2-pyaml
10993 (package-with-python2 python-pyaml))
10994
10995 (define-public python-flexmock
10996 (package
10997 (name "python-flexmock")
10998 (version "0.10.2")
10999 (source (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "flexmock" version))
11002 (sha256
11003 (base32
11004 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11005 (build-system python-build-system)
11006 (home-page "https://flexmock.readthedocs.org")
11007 (synopsis "Testing library for Python")
11008 (description
11009 "flexmock is a testing library for Python that makes it easy to create
11010 mocks, stubs and fakes.")
11011 (license license:bsd-3)))
11012
11013 (define-public python2-flexmock
11014 (package-with-python2 python-flexmock))
11015
11016 (define-public python-orator
11017 (package
11018 (name "python-orator")
11019 (version "0.8.2")
11020 (source (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "orator" version))
11023 (sha256
11024 (base32
11025 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11026 (build-system python-build-system)
11027 (arguments '(#:tests? #f)) ; no tests
11028 (propagated-inputs
11029 `(("python-arrow" ,python-arrow)
11030 ("python-blinker" ,python-blinker)
11031 ("python-cleo" ,python-cleo)
11032 ("python-fake-factory" ,python-fake-factory)
11033 ("python-inflection" ,python-inflection)
11034 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11035 ("python-pyaml" ,python-pyaml)
11036 ("python-simplejson" ,python-simplejson)
11037 ("python-wrapt" ,python-wrapt)))
11038 (home-page "https://orator-orm.com/")
11039 (synopsis "ActiveRecord ORM for Python")
11040 (description
11041 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11042 implementation for Python.")
11043 (license license:expat)
11044 (properties `((python2-variant . ,(delay python2-orator))))))
11045
11046 (define-public python2-orator
11047 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11048 (package
11049 (inherit base)
11050 (propagated-inputs
11051 `(("python2-ipaddress" ,python2-ipaddress)
11052 ,@(package-propagated-inputs base))))))
11053
11054 (define-public python-prompt-toolkit
11055 (package
11056 (name "python-prompt-toolkit")
11057 (version "1.0.9")
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11062 (sha256
11063 (base32
11064 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11065 (build-system python-build-system)
11066 (arguments
11067 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11068 (propagated-inputs
11069 `(("python-wcwidth" ,python-wcwidth)
11070 ("python-six" ,python-six)
11071 ("python-pygments" ,python-pygments)))
11072 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11073 (synopsis "Library for building command line interfaces in Python")
11074 (description
11075 "Prompt-Toolkit is a library for building interactive command line
11076 interfaces in Python. It's like GNU Readline but it also features syntax
11077 highlighting while typing, out-of-the-box multi-line input editing, advanced
11078 code completion, incremental search, support for Chinese double-width
11079 characters, mouse support, and auto suggestions.")
11080 (license license:bsd-3)))
11081
11082 (define-public python2-prompt-toolkit
11083 (package-with-python2 python-prompt-toolkit))
11084
11085 (define-public python-jedi
11086 (package
11087 (name "python-jedi")
11088 (version "0.9.0")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "jedi" version))
11093 (sha256
11094 (base32
11095 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11096 (build-system python-build-system)
11097 (arguments
11098 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11099 '(#:tests? #f))
11100 (native-inputs
11101 `(("python-pytest" ,python-pytest)))
11102 (home-page "https://github.com/davidhalter/jedi")
11103 (synopsis
11104 "Autocompletion for Python that can be used for text editors")
11105 (description
11106 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11107 (license license:expat)))
11108
11109 (define-public python2-jedi
11110 (package-with-python2 python-jedi))
11111
11112 (define-public ptpython
11113 (package
11114 (name "ptpython")
11115 (version "0.34")
11116 (source (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "ptpython" version))
11119 (sha256
11120 (base32
11121 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11122 (build-system python-build-system)
11123 (arguments
11124 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11125 (propagated-inputs
11126 `(("python-docopt" ,python-docopt)
11127 ("python-jedi" ,python-jedi)
11128 ("python-prompt-toolkit" ,python-prompt-toolkit)
11129 ("python-pygments" ,python-pygments)))
11130 (home-page "https://github.com/jonathanslenders/ptpython")
11131 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11132 (description
11133 "ptpython is a Python read-eval-print loop with IDE-like features.
11134 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11135 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11136 etc.")
11137 (license license:bsd-3)
11138 (properties `((python2-variant . ,(delay ptpython-2))))))
11139
11140 (define-public ptpython-2
11141 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11142 (package
11143 (inherit base)
11144 (name "ptpython2"))))
11145
11146 (define-public python-requests-oauthlib
11147 (package
11148 (name "python-requests-oauthlib")
11149 (version "0.6.2")
11150 (source
11151 (origin
11152 (method url-fetch)
11153 (uri (pypi-uri "requests-oauthlib" version))
11154 (sha256
11155 (base32
11156 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11157 (build-system python-build-system)
11158 (arguments
11159 `(#:phases
11160 (modify-phases %standard-phases
11161 ;; removes tests that require network access
11162 (add-before 'check 'pre-check
11163 (lambda _
11164 (delete-file "tests/test_core.py")
11165 #t)))))
11166 (native-inputs
11167 `(("python-requests-mock" ,python-requests-mock)
11168 ("python-mock" ,python-mock)))
11169 (propagated-inputs
11170 `(("python-oauthlib" ,python-oauthlib)
11171 ("python-requests" ,python-requests)))
11172 (home-page
11173 "https://github.com/requests/requests-oauthlib")
11174 (synopsis
11175 "OAuthlib authentication support for Requests")
11176 (description
11177 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11178 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11179 (license license:isc)))
11180
11181 (define-public python2-requests-oauthlib
11182 (package-with-python2 python-requests-oauthlib))
11183
11184 (define-public python-stem
11185 (package
11186 (name "python-stem")
11187 (version "1.5.3")
11188 (source
11189 (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "stem" version))
11192 (sha256
11193 (base32
11194 "0fm67dfx6qaj0mg80r4yw2i72birpzn7cnbyz4p1857max3zfc97"))))
11195 (build-system python-build-system)
11196 (arguments
11197 `(#:phases
11198 (modify-phases %standard-phases
11199 (replace 'check
11200 (lambda _
11201 (zero? (system* "./run_tests.py" "--unit")))))))
11202 (native-inputs
11203 `(("python-mock" ,python-mock)
11204 ("python-pep8" ,python-pep8)
11205 ("python-pyflakes" ,python-pyflakes)))
11206 (home-page "https://stem.torproject.org/")
11207 (synopsis
11208 "Python controller library that allows applications to interact with Tor")
11209 (description
11210 "Stem is a Python controller library for Tor. With it you can use Tor's
11211 control protocol to script against the Tor process and read descriptor data
11212 relays publish about themselves.")
11213 (license license:lgpl3)))
11214
11215 (define-public python2-stem
11216 (package-with-python2 python-stem))
11217
11218 (define-public python-pyserial
11219 (package
11220 (name "python-pyserial")
11221 (version "3.1.1")
11222 (source
11223 (origin
11224 (method url-fetch)
11225 (uri (pypi-uri "pyserial" version))
11226 (sha256
11227 (base32
11228 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11229 (build-system python-build-system)
11230 (arguments
11231 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11232 ;; #:phases
11233 ;; (modify-phases %standard-phases
11234 ;; (replace 'check
11235 ;; (lambda _
11236 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11237 (home-page
11238 "https://github.com/pyserial/pyserial")
11239 (synopsis "Python Serial Port Bindings")
11240 (description "@code{pyserial} provide serial port bindings for Python. It
11241 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11242 and/or Xon/Xoff. The port is accessed in RAW mode.")
11243 (license license:bsd-3)))
11244
11245 (define-public python2-pyserial
11246 (package-with-python2 python-pyserial))
11247
11248 (define-public python-kivy
11249 (package
11250 (name "python-kivy")
11251 (version "1.9.1")
11252 (source
11253 (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "kivy" version))
11256 (file-name (string-append name "-" version ".tar.gz"))
11257 (sha256
11258 (base32
11259 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11260 (build-system python-build-system)
11261 (arguments
11262 `(#:tests? #f ; Tests require many optional packages
11263 #:phases
11264 (modify-phases %standard-phases
11265 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11266 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11267 (lambda* (#:key inputs #:allow-other-keys)
11268 (setenv "KIVY_SDL2_PATH"
11269 (string-append (assoc-ref inputs "sdl-union")
11270 "/include/SDL2"))
11271 #t)))))
11272 (native-inputs
11273 `(("pkg-config" ,pkg-config)
11274 ("python-cython" ,python-cython)))
11275 (inputs
11276 `(("gstreamer" ,gstreamer)
11277 ("mesa" ,mesa)
11278 ("sdl-union"
11279 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11280 (home-page "http://kivy.org")
11281 (synopsis
11282 "Multitouch application framework")
11283 (description
11284 "A software library for rapid development of
11285 hardware-accelerated multitouch applications.")
11286 (license license:expat)))
11287
11288 (define-public python2-kivy
11289 (package-with-python2 python-kivy))
11290
11291 (define-public python-kivy-next
11292 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11293 (revision "1"))
11294 (package (inherit python-kivy)
11295 (name "python-kivy-next")
11296 (version (string-append "1.9.1-" revision "."
11297 (string-take commit 7)))
11298 (source
11299 (origin
11300 (method git-fetch)
11301 (uri (git-reference
11302 (url "https://github.com/kivy/kivy")
11303 (commit commit)))
11304 (file-name (string-append name "-" version "-checkout"))
11305 (sha256
11306 (base32
11307 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11308
11309 (define-public python2-kivy-next
11310 (package-with-python2 python-kivy-next))
11311
11312 (define-public python-binaryornot
11313 (package
11314 (name "python-binaryornot")
11315 (version "0.4.0")
11316 (source (origin
11317 (method url-fetch)
11318 (uri (pypi-uri "binaryornot" version))
11319 (sha256
11320 (base32
11321 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11322 (build-system python-build-system)
11323 (propagated-inputs
11324 `(("python-chardet" ,python-chardet)
11325 ("python-hypothesis" ,python-hypothesis)))
11326 (home-page "https://github.com/audreyr/binaryornot")
11327 (synopsis "Package to check if a file is binary or text")
11328 (description "Ultra-lightweight pure Python package to check if a file is
11329 binary or text.")
11330 (license license:bsd-3)
11331 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11332
11333 (define-public python2-binaryornot
11334 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11335 (package (inherit base)
11336 (propagated-inputs
11337 `(("python2-enum34" ,python2-enum34)
11338 ,@(package-propagated-inputs base))))))
11339
11340 (define-public python-nltk
11341 (package
11342 (name "python-nltk")
11343 (version "3.2.1")
11344 (source (origin
11345 (method url-fetch)
11346 (uri (pypi-uri "nltk" version))
11347 (sha256
11348 (base32
11349 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11350 (build-system python-build-system)
11351 (arguments
11352 '(;; The tests require some extra resources to be downloaded.
11353 ;; TODO Try packaging these resources.
11354 #:tests? #f))
11355 (home-page "http://nltk.org/")
11356 (synopsis "Natural Language Toolkit")
11357 (description "It provides interfaces to over 50 corpora and lexical
11358 resources such as WordNet, along with a suite of text processing libraries
11359 for classification, tokenization, stemming, tagging, parsing, and semantic
11360 reasoning, wrappers for natural language processing libraries.")
11361 (license license:asl2.0)))
11362
11363 (define-public python2-nltk
11364 (package-with-python2 python-nltk))
11365
11366 (define-public python-pymongo
11367 (package
11368 (name "python-pymongo")
11369 (version "3.3.0")
11370 (source (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "pymongo" version))
11373 (sha256
11374 (base32
11375 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11376 (build-system python-build-system)
11377 (propagated-inputs
11378 `(("python-certifi" ,python-certifi)))
11379 (home-page "http://github.com/mongodb/mongo-python-driver")
11380 (synopsis "Python driver for MongoDB")
11381 (description "Python driver for MongoDB.")
11382 (license license:asl2.0)))
11383
11384 (define-public python2-pymongo
11385 (package-with-python2 python-pymongo))
11386
11387 (define-public python-sh
11388 (package
11389 (name "python-sh")
11390 (version "1.11")
11391 (source (origin
11392 (method url-fetch)
11393 (uri (pypi-uri "sh" version))
11394 (sha256
11395 (base32
11396 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11397 (build-system python-build-system)
11398 (arguments
11399 `(#:tests? #f)) ; no tests
11400 (home-page "https://github.com/amoffat/sh")
11401 (synopsis "Python subprocess interface")
11402 (description "Abstracts process invocation by providing a function
11403 interface for programs.")
11404 (license license:expat)))
11405
11406 (define-public python2-sh
11407 (package-with-python2 python-sh))
11408
11409 (define-public python-consul
11410 (package
11411 (name "python-consul")
11412 (version "0.6.1")
11413 (source
11414 (origin
11415 (method url-fetch)
11416 (uri (pypi-uri "python-consul" version))
11417 (sha256
11418 (base32
11419 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11420 (build-system python-build-system)
11421 (native-inputs
11422 `(("python-pytest" ,python-pytest)))
11423 (propagated-inputs
11424 `(("python-requests" ,python-requests)
11425 ("python-six" ,python-six)))
11426 (home-page "https://github.com/cablehead/python-consul")
11427 (synopsis "Python client for Consul")
11428 (description
11429 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11430 discovery, monitoring and configuration.")
11431 (license license:expat)))
11432
11433 (define-public python2-consul
11434 (package-with-python2 python-consul))
11435
11436 (define-public python-schematics
11437 (package
11438 (name "python-schematics")
11439 (version "1.1.1")
11440 (source
11441 (origin
11442 (method url-fetch)
11443 (uri (string-append
11444 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11445 (file-name (string-append name "-" version ".tar.gz"))
11446 (sha256
11447 (base32
11448 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11449 (build-system python-build-system)
11450 (propagated-inputs
11451 `(("python-six" ,python-six)))
11452 (arguments
11453 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11454 ; version requirements (eg python-coveralls)
11455 (home-page "https://github.com/schematics/schematics")
11456 (synopsis "Python Data Structures for Humans")
11457 (description "Python Data Structures for Humans.")
11458 (license license:bsd-3)))
11459
11460 (define-public python2-schematics
11461 (package-with-python2 python-schematics))
11462
11463 (define-public python-publicsuffix
11464 (package
11465 (name "python-publicsuffix")
11466 (version "1.1.0")
11467 (source (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "publicsuffix" version))
11470 (sha256
11471 (base32
11472 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11473 (build-system python-build-system)
11474 (arguments
11475 `(#:tests? #f)) ; tests use the internet
11476 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11477 (synopsis "Get suffix for a domain name")
11478 (description "Get a public suffix for a domain name using the Public Suffix
11479 List.")
11480 (license license:expat)))
11481
11482 (define-public python2-publicsuffix
11483 (package-with-python2 python-publicsuffix))
11484
11485 (define-public python-publicsuffix2
11486 (package
11487 (name "python-publicsuffix2")
11488 (version "2.20160621")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11493 (sha256
11494 (base32
11495 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11496 (build-system python-build-system)
11497 (arguments
11498 '(#:tests? #f)) ; The test suite requires network access.
11499 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11500 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11501 (description "Get a public suffix for a domain name using the Public Suffix
11502 List. Forked from and using the same API as the publicsuffix package.")
11503 (license (list license:expat license:mpl2.0))))
11504
11505 (define-public python2-publicsuffix2
11506 (package-with-python2 python-publicsuffix2))
11507
11508 (define-public python-url
11509 (package
11510 (name "python-url")
11511 (version "0.2.0")
11512 (source (origin
11513 (method url-fetch)
11514 (uri (pypi-uri "url" version))
11515 (sha256
11516 (base32
11517 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11518 (build-system python-build-system)
11519 (propagated-inputs
11520 `(("python-publicsuffix" ,python-publicsuffix)))
11521 (native-inputs
11522 `(("python-coverage" ,python-coverage)
11523 ("python-nose" ,python-nose)))
11524 (arguments
11525 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11526 (home-page "http://github.com/seomoz/url-py")
11527 (synopsis "URL Parsing")
11528 (description "Library for parsing urls.")
11529 (license license:expat)
11530 (properties `((python2-variant . ,(delay python2-url))))))
11531
11532 (define-public python2-url
11533 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11534 (package (inherit base)
11535 (propagated-inputs
11536 `(("python2-publicsuffix" ,python2-publicsuffix))))))
11537
11538 (define-public python-freezegun
11539 (package
11540 (name "python-freezegun")
11541 (version "0.3.8")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "freezegun" version))
11546 (sha256
11547 (base32
11548 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
11549 (build-system python-build-system)
11550 (native-inputs
11551 `(("python-mock" ,python-mock)
11552 ("python-nose" ,python-nose)
11553 ("python-coverage" ,python-coverage)))
11554 (propagated-inputs
11555 `(("python-six" ,python-six)
11556 ("python-dateutil" ,python-dateutil)))
11557 (arguments
11558 `(#:phases (modify-phases %standard-phases
11559 ;; The tests are normally executed via `make test`, but the PyPi
11560 ;; package does not include the Makefile.
11561 (replace 'check
11562 (lambda _
11563 (zero? (system* "nosetests" "./tests/")))))))
11564 (home-page "https://github.com/spulec/freezegun")
11565 (synopsis "Test utility for mocking the datetime module")
11566 (description
11567 "FreezeGun is a library that allows your python tests to travel through
11568 time by mocking the datetime module.")
11569 (license license:asl2.0)))
11570
11571 (define-public python2-freezegun
11572 (package-with-python2 python-freezegun))
11573
11574
11575 (define-public python-odfpy
11576 (package
11577 (name "python-odfpy")
11578 (version "1.3.3")
11579 (source (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "odfpy" version))
11582 (sha256
11583 (base32
11584 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11585 (arguments
11586 `(#:modules ((srfi srfi-1)
11587 (guix build python-build-system)
11588 (guix build utils))
11589 #:phases
11590 (modify-phases %standard-phases
11591 (replace 'check
11592 ;; The test runner invokes python2 and python3 for test*.py.
11593 ;; To avoid having both in inputs, we replicate it here.
11594 (lambda _
11595 (every (lambda (test-file)
11596 (zero? (system* "python" test-file)))
11597 (find-files "tests" "^test.*\\.py$")))))))
11598 (build-system python-build-system)
11599 (home-page "https://github.com/eea/odfpy")
11600 (synopsis "Python API and tools to manipulate OpenDocument files")
11601 (description "Collection of libraries and utility programs written in
11602 Python to manipulate OpenDocument 1.2 files.")
11603 (license
11604 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11605 ;; number of files with other licenses.
11606 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11607
11608 (define-public python2-odfpy
11609 (package-with-python2 python-odfpy))
11610
11611 (define-public python-cachecontrol
11612 (package
11613 (name "python-cachecontrol")
11614 (version "0.11.6")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 ;; Pypi does not have tests.
11619 (uri (string-append
11620 "https://github.com/ionrock/cachecontrol/archive/v"
11621 version ".tar.gz"))
11622 (file-name (string-append name "-" version ".tar.gz"))
11623 (sha256
11624 (base32
11625 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11626 (build-system python-build-system)
11627 (arguments
11628 `(#:phases
11629 (modify-phases %standard-phases
11630 (replace 'check
11631 (lambda _
11632 ;; Drop test that requires internet access.
11633 (delete-file "tests/test_regressions.py")
11634 (setenv "PYTHONPATH"
11635 (string-append (getcwd) "/build/lib:"
11636 (getenv "PYTHONPATH")))
11637 (zero? (system* "py.test" "-vv")))))))
11638 (native-inputs
11639 `(("python-pytest" ,python-pytest)
11640 ("python-redis" ,python-redis)
11641 ("python-webtest" ,python-webtest)
11642 ("python-mock" ,python-mock)))
11643 (propagated-inputs
11644 `(("python-requests" ,python-requests)
11645 ("python-lockfile" ,python-lockfile)))
11646 (home-page "https://github.com/ionrock/cachecontrol")
11647 (synopsis "The httplib2 caching algorithms for use with requests")
11648 (description "CacheControl is a port of the caching algorithms in
11649 @code{httplib2} for use with @code{requests} session objects.")
11650 (license license:asl2.0)))
11651
11652 (define-public python2-cachecontrol
11653 (package-with-python2 python-cachecontrol))
11654
11655 (define-public python-lit
11656 (package
11657 (name "python-lit")
11658 (version "0.5.0")
11659 (source
11660 (origin
11661 (method url-fetch)
11662 (uri (pypi-uri "lit" version))
11663 (sha256
11664 (base32
11665 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11666 (build-system python-build-system)
11667 (home-page "http://llvm.org/")
11668 (synopsis "LLVM Software Testing Tool")
11669 (description "@code{lit} is a portable tool for executing LLVM and Clang
11670 style test suites, summarizing their results, and providing indication of
11671 failures.")
11672 (license license:ncsa)))
11673
11674 (define-public python2-lit
11675 (package-with-python2 python-lit))
11676
11677 (define-public python-pytest-pep8
11678 (package
11679 (name "python-pytest-pep8")
11680 (version "1.0.6")
11681 (source (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "pytest-pep8" version))
11684 (sha256
11685 (base32
11686 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11687 (build-system python-build-system)
11688 (arguments
11689 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11690 (native-inputs
11691 `(("python-pytest" ,python-pytest)))
11692 (propagated-inputs
11693 `(("python-pep8" ,python-pep8)))
11694 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11695 (synopsis "Py.test plugin to check PEP8 requirements")
11696 (description "Pytest plugin for checking PEP8 compliance.")
11697 (license license:expat)))
11698
11699 (define-public python2-pytest-pep8
11700 (package-with-python2 python-pytest-pep8))
11701
11702 (define-public python-pytest-flakes
11703 (package
11704 (name "python-pytest-flakes")
11705 (version "1.0.1")
11706 (source (origin
11707 (method url-fetch)
11708 (uri (pypi-uri "pytest-flakes" version))
11709 (sha256
11710 (base32
11711 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11712 (build-system python-build-system)
11713 (arguments
11714 `(#:phases
11715 (modify-phases %standard-phases
11716 (delete 'check)
11717 (add-after 'install 'check
11718 (lambda* (#:key outputs inputs #:allow-other-keys)
11719 ;; It's easier to run tests after install.
11720 ;; Make installed package available for running the tests
11721 (add-installed-pythonpath inputs outputs)
11722 (zero? (system* "py.test" "-vv")))))))
11723 (native-inputs
11724 `(("python-coverage" ,python-coverage)
11725 ("python-pytest" ,python-pytest)
11726 ("python-pytest-cache" ,python-pytest-cache)
11727 ("python-pytest-pep8" ,python-pytest-pep8)))
11728 (propagated-inputs
11729 `(("python-pyflakes" ,python-pyflakes)))
11730 (home-page "https://github.com/fschulze/pytest-flakes")
11731 (synopsis "Py.test plugin to check source code with pyflakes")
11732 (description "Pytest plugin for checking Python source code with pyflakes.")
11733 (license license:expat)))
11734
11735 (define-public python2-pytest-flakes
11736 (package-with-python2 python-pytest-flakes))
11737
11738 (define-public python-natsort
11739 (package
11740 (name "python-natsort")
11741 (version "5.0.1")
11742 (source (origin
11743 (method url-fetch)
11744 (uri (pypi-uri "natsort" version))
11745 (sha256
11746 (base32
11747 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11748 (build-system python-build-system)
11749 (arguments
11750 `(#:phases
11751 (modify-phases %standard-phases
11752 (add-before 'check 'set-cachedir
11753 ;; Tests require write access to $HOME by default
11754 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11755 (native-inputs
11756 `(("python-hypothesis" ,python-hypothesis)
11757 ("python-pytest-cache" ,python-pytest-cache)
11758 ("python-pytest-cov" ,python-pytest-cov)
11759 ("python-pytest-flakes" ,python-pytest-flakes)
11760 ("python-pytest-pep8" ,python-pytest-pep8)))
11761 (propagated-inputs ; TODO: Add python-fastnumbers.
11762 `(("python-pyicu" ,python-pyicu)))
11763 (home-page "https://github.com/SethMMorton/natsort")
11764 (synopsis "Natural sorting for python and shell")
11765 (description
11766 "Natsort lets you apply natural sorting on lists instead of
11767 lexicographical. If you use the built-in @code{sorted} method in python
11768 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11769 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11770 function @code{natsorted} that identifies numbers and sorts them separately
11771 from strings. It can also sort version numbers, real numbers, mixed types
11772 and more, and comes with a shell command @command{natsort} that exposes this
11773 functionality in the command line.")
11774 (license license:expat)
11775 (properties `((python2-variant . ,(delay python2-natsort))))))
11776
11777 (define-public python2-natsort
11778 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11779 (package (inherit base)
11780 (native-inputs
11781 `(("python2-pathlib" ,python2-pathlib)
11782 ("python2-mock" ,python2-mock)
11783 ("python2-enum34" ,python2-enum34)
11784 ,@(package-native-inputs base))))))
11785
11786 (define-public python-glances
11787 (package
11788 (name "python-glances")
11789 (version "2.7.1")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "Glances" version))
11794 (sha256
11795 (base32
11796 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11797 (build-system python-build-system)
11798 (propagated-inputs
11799 `(("python-psutil" ,python-psutil)))
11800 (home-page
11801 "https://github.com/nicolargo/glances")
11802 (synopsis
11803 "A cross-platform curses-based monitoring tool")
11804 (description
11805 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11806 Glances uses the PsUtil library to get information from your system. It monitors
11807 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11808 (license license:lgpl3+)))
11809
11810 (define-public python2-glances
11811 (package-with-python2 python-glances))
11812
11813 (define-public python-graphql-core
11814 (package
11815 (name "python-graphql-core")
11816 (version "0.5.3")
11817 (source
11818 (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "graphql-core" version))
11821 (sha256
11822 (base32
11823 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11824 (build-system python-build-system)
11825 (arguments
11826 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11827 #:phases
11828 (modify-phases %standard-phases
11829 (add-after 'unpack 'patch-hardcoded-version
11830 (lambda _ (substitute*
11831 "setup.py"
11832 (("'gevent==1.1rc1'") "'gevent'"))
11833 #t)))))
11834 (native-inputs
11835 `(("python-gevent" ,python-gevent)
11836 ("python-mock" ,python-mock)
11837 ("python-pytest-mock" ,python-pytest-mock)))
11838 (propagated-inputs
11839 `(("python-promise" ,python-promise)
11840 ("python-six" ,python-six)))
11841 (home-page "https://github.com/graphql-python/graphql-core")
11842 (synopsis "GraphQL implementation for Python")
11843 (description
11844 "GraphQL implementation for Python. GraphQL is a data query language and
11845 runtime designed and used to request and deliver data to mobile and web apps.
11846 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11847 to Python.")
11848 (license license:expat)))
11849
11850 (define-public python2-graphql-core
11851 (package-with-python2 python-graphql-core))
11852
11853 (define-public python-graphql-relay
11854 (package
11855 (name "python-graphql-relay")
11856 (version "0.4.5")
11857 (source
11858 (origin
11859 (method url-fetch)
11860 (uri (pypi-uri "graphql-relay" version))
11861 (sha256
11862 (base32
11863 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11864 (build-system python-build-system)
11865 (native-inputs
11866 `(("python-pytest" ,python-pytest)))
11867 (propagated-inputs
11868 `(("python-graphql-core" ,python-graphql-core)
11869 ("python-promise" ,python-promise)
11870 ("python-six" ,python-six)))
11871 (home-page "https://github.com/graphql-python/graphql-relay-py")
11872 (synopsis "Relay implementation for Python")
11873 (description
11874 "This is a library to allow the easy creation of Relay-compliant servers
11875 using the GraphQL Python reference implementation of a GraphQL server. It
11876 should be noted that the code is a exact port of the original
11877 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11878 from Facebook.")
11879 (license license:expat)))
11880
11881 (define-public python2-graphql-relay
11882 (package-with-python2 python-graphql-relay))
11883
11884 (define-public python-graphene
11885 (package
11886 (name "python-graphene")
11887 (version "0.10.2")
11888 (source
11889 (origin
11890 (method url-fetch)
11891 (uri (pypi-uri "graphene" version))
11892 (sha256
11893 (base32
11894 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11895 (build-system python-build-system)
11896 (native-inputs
11897 `(("python-django-filter" ,python-django-filter)
11898 ("python-mock" ,python-mock)
11899 ("python-psycopg2" ,python-psycopg2)
11900 ("python-pytest-django" ,python-pytest-django)
11901 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11902 (propagated-inputs
11903 `(("python-graphql-core" ,python-graphql-core)
11904 ("python-graphql-relay" ,python-graphql-relay)
11905 ("python-iso8601" ,python-iso8601)
11906 ("python-promise" ,python-promise)
11907 ("python-six" ,python-six)))
11908 (home-page "http://graphene-python.org/")
11909 (synopsis "GraphQL Framework for Python")
11910 (description
11911 "Graphene is a Python library for building GraphQL schemas/types.
11912 A GraphQL schema describes your data model, and provides a GraphQL server
11913 with an associated set of resolve methods that know how to fetch data.")
11914 (properties `((python2-variant . ,(delay python2-graphene))))
11915 (license license:expat)))
11916
11917 (define-public python2-graphene
11918 (let ((base (package-with-python2
11919 (strip-python2-variant python-graphene))))
11920 (package (inherit base)
11921 (native-inputs
11922 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11923 ,@(package-native-inputs base))))))
11924
11925 (define-public python-nautilus
11926 (package
11927 (name "python-nautilus")
11928 (version "0.4.9")
11929 (source
11930 (origin
11931 (method url-fetch)
11932 (uri (pypi-uri "nautilus" version))
11933 (sha256
11934 (base32
11935 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11936 (build-system python-build-system)
11937 (arguments `(#:tests? #f)) ; fails to import test modules
11938 (propagated-inputs
11939 `(("python-bcrypt" ,python-bcrypt)
11940 ("python-click" ,python-click)
11941 ("python-consul" ,python-consul)
11942 ("python-graphene" ,python-graphene)
11943 ("python-jinja2" ,python-jinja2)
11944 ("python-peewee" ,python-peewee)
11945 ("python-pika" ,python-pika)
11946 ("python-tornado" ,python-tornado)
11947 ("python-wtforms" ,python-wtforms)))
11948 (native-inputs
11949 `(("python-nose2" ,python-nose2)))
11950 (home-page "https://github.com/AlecAivazis/nautilus")
11951 (synopsis "Library for creating microservice applications")
11952 (description
11953 "Nautilus is a framework for flux based microservices that looks to
11954 provide extendible implementations of common aspects of a cloud so that you can
11955 focus on building massively scalable web applications.")
11956 (license license:expat)))
11957
11958 (define-public python-snowballstemmer
11959 (package
11960 (name "python-snowballstemmer")
11961 (version "1.2.1")
11962 (source (origin
11963 (method url-fetch)
11964 (uri (pypi-uri "snowballstemmer" version))
11965 (sha256
11966 (base32
11967 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11968 (build-system python-build-system)
11969 (arguments
11970 `(;; No tests exist
11971 #:tests? #f))
11972 (home-page "https://github.com/shibukawa/snowball_py")
11973 (synopsis "Snowball stemming library collection for Python")
11974 (description "This package provides 16 word stemmer algorithms generated
11975 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11976 English stemmer.")
11977 (license license:bsd-3)))
11978
11979 (define-public python2-snowballstemmer
11980 (package-with-python2 python-snowballstemmer))
11981
11982 (define-public python-sphinx-cloud-sptheme
11983 (package
11984 (name "python-sphinx-cloud-sptheme")
11985 (version "1.7.1")
11986 (source (origin
11987 (method url-fetch)
11988 (uri (pypi-uri "cloud_sptheme" version))
11989 (sha256
11990 (base32
11991 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
11992 (build-system python-build-system)
11993 (native-inputs
11994 `(("python-sphinx" ,python-sphinx)))
11995 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
11996 (synopsis "'Cloud' theme for Sphinx documenter")
11997 (description "This package contains the \"Cloud\" theme for Sphinx and some
11998 related extensions.")
11999 (license license:bsd-3)))
12000
12001 (define-public python2-sphinx-cloud-sptheme
12002 (package-with-python2 python-sphinx-cloud-sptheme))
12003
12004 (define-public python-sphinx-alabaster-theme
12005 (package
12006 (name "python-sphinx-alabaster-theme")
12007 (version "0.7.9")
12008 (source (origin
12009 (method url-fetch)
12010 (uri (pypi-uri "alabaster" version))
12011 (sha256
12012 (base32
12013 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12014 (build-system python-build-system)
12015 (propagated-inputs
12016 `(("python-pygments" ,python-pygments)))
12017 (home-page "https://alabaster.readthedocs.io/")
12018 (synopsis "Configurable sidebar-enabled Sphinx theme")
12019 (description "Alabaster is a visually (c)lean, responsive, configurable
12020 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12021 (license license:bsd-3)))
12022
12023 (define-public python2-sphinx-alabaster-theme
12024 (package-with-python2 python-sphinx-alabaster-theme))
12025
12026 (define-public python-betamax
12027 (package
12028 (name "python-betamax")
12029 (version "0.8.0")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (pypi-uri "betamax" version))
12034 (sha256
12035 (base32
12036 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12037 (build-system python-build-system)
12038 (arguments
12039 '(;; Many tests fail because they require networking.
12040 #:tests? #f))
12041 (propagated-inputs
12042 `(("python-requests" ,python-requests)))
12043 (home-page "https://github.com/sigmavirus24/betamax")
12044 (synopsis "Record HTTP interactions with python-requests")
12045 (description "Betamax will record your test suite's HTTP interactions and
12046 replay them during future tests. It is designed to work with python-requests.")
12047 (license license:expat)))
12048
12049 (define-public python2-betamax
12050 (package-with-python2 python-betamax))
12051
12052 (define-public python-s3transfer
12053 (package
12054 (name "python-s3transfer")
12055 (version "0.1.10")
12056 (source (origin
12057 (method url-fetch)
12058 (uri (pypi-uri "s3transfer" version))
12059 (sha256
12060 (base32
12061 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12062 (build-system python-build-system)
12063 (arguments
12064 `(#:phases
12065 (modify-phases %standard-phases
12066 (replace 'check
12067 (lambda _
12068 ;; 7 of the 'integration' tests require network access or login
12069 ;; credentials.
12070 (zero? (system* "nosetests" "--exclude=integration")))))))
12071 (native-inputs
12072 `(("python-docutils" ,python-docutils)
12073 ("python-mock" ,python-mock)
12074 ("python-nose" ,python-nose)))
12075 (propagated-inputs
12076 `(("python-botocore" ,python-botocore)))
12077 (synopsis "Amazon S3 Transfer Manager")
12078 (description "S3transfer is a Python library for managing Amazon S3
12079 transfers.")
12080 (home-page "https://github.com/boto/s3transfer")
12081 (license license:asl2.0)
12082 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12083
12084 (define-public python2-s3transfer
12085 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12086 (package
12087 (inherit base)
12088 (native-inputs
12089 `(("python2-futures" ,python2-futures)
12090 ,@(package-native-inputs base))))))
12091
12092 (define-public python-setproctitle
12093 (package
12094 (name "python-setproctitle")
12095 (version "1.1.10")
12096 (source
12097 (origin
12098 (method url-fetch)
12099 (uri (pypi-uri "setproctitle" version))
12100 (sha256
12101 (base32
12102 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12103 (build-system python-build-system)
12104 (arguments
12105 '(#:phases
12106 (modify-phases %standard-phases
12107 (add-before 'check 'patch-Makefile
12108 ;; Stricly this is only required for the python2 variant.
12109 ;; But adding a phase in an inherited package seems to be
12110 ;; cumbersum. So we patch even for python3.
12111 (lambda _
12112 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12113 (when nose
12114 (substitute* "Makefile"
12115 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12116 (string-append nose "/bin/nosetests "))))
12117 #t)))
12118 (replace 'check
12119 (lambda _
12120 (setenv "PYTHON" (or (which "python3") (which "python")))
12121 (setenv "PYCONFIG" (or (which "python3-config")
12122 (which "python-config")))
12123 (setenv "CC" "gcc")
12124 ;; No need to extend PYTHONPATH to find the built package, since
12125 ;; the Makefile will build anyway
12126 (zero? (system* "make" "check")))))))
12127 (native-inputs
12128 `(("procps" ,procps))) ; required for tests
12129 (home-page
12130 "https://github.com/dvarrazzo/py-setproctitle")
12131 (synopsis
12132 "Setproctitle implementation for Python to customize the process title")
12133 (description "The library allows a process to change its title (as displayed
12134 by system tools such as ps and top).
12135
12136 Changing the title is mostly useful in multi-process systems, for
12137 example when a master process is forked: changing the children's title
12138 allows to identify the task each process is busy with. The technique
12139 is used by PostgreSQL and the OpenSSH Server for example.")
12140 (license license:bsd-3)
12141 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12142
12143 (define-public python2-setproctitle
12144 (let ((base (package-with-python2
12145 (strip-python2-variant python-setproctitle))))
12146 (package
12147 (inherit base)
12148 (native-inputs `(("python2-nose" ,python2-nose)
12149 ,@(package-native-inputs base))))))
12150
12151 (define-public python-validictory
12152 (package
12153 (name "python-validictory")
12154 (version "1.0.1")
12155 (source
12156 (origin
12157 (method url-fetch)
12158 (uri (pypi-uri "validictory" version))
12159 (sha256
12160 (base32
12161 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12162 (build-system python-build-system)
12163 (arguments
12164 '(#:phases
12165 (modify-phases %standard-phases
12166 (add-after 'unpack 'bootstrap
12167 ;; Move the tests out of the package directory to avoid
12168 ;; packaging them.
12169 (lambda* _
12170 (rename-file "validictory/tests" "tests")
12171 (delete-file "tests/__init__.py")))
12172 (replace 'check
12173 (lambda _
12174 ;; Extend PYTHONPATH so the built package will be found.
12175 (setenv "PYTHONPATH"
12176 (string-append (getcwd) "/build/lib:"
12177 (getenv "PYTHONPATH")))
12178 (zero? (system* "py.test" "-vv" )))))))
12179 (native-inputs
12180 `(("python-pytest" ,python-pytest)))
12181 (home-page
12182 "https://github.com/jamesturk/validictory")
12183 (synopsis "General purpose Python data validator")
12184 (description "It allows validation of arbitrary Python data structures.
12185
12186 The schema format is based on the JSON Schema
12187 proposal (http://json-schema.org), so combined with json the library is also
12188 useful as a validator for JSON data.")
12189 (license license:expat)))
12190
12191 (define-public python2-validictory
12192 (package-with-python2 python-validictory))
12193
12194 (define-public python-aniso8601
12195 (package
12196 (name "python-aniso8601")
12197 (version "1.1.0")
12198 (source
12199 (origin
12200 (method url-fetch)
12201 (uri (pypi-uri "aniso8601" version))
12202 (sha256
12203 (base32
12204 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12205 (build-system python-build-system)
12206 (propagated-inputs
12207 `(("python-dateutil" ,python-dateutil)))
12208 (home-page
12209 "https://bitbucket.org/nielsenb/aniso8601")
12210 (synopsis
12211 "Python library for parsing ISO 8601 strings")
12212 (description
12213 "This package contains a library for parsing ISO 8601 datetime strings.")
12214 (license license:bsd-3)))
12215
12216 (define-public python-flask-restful
12217 (package
12218 (name "python-flask-restful")
12219 (version "0.3.5")
12220 (source
12221 (origin
12222 (method url-fetch)
12223 (uri (pypi-uri "Flask-RESTful" version))
12224 (sha256
12225 (base32
12226 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12227 (build-system python-build-system)
12228 (propagated-inputs
12229 `(("python-aniso8601" ,python-aniso8601)
12230 ("python-flask" ,python-flask)
12231 ("python-pycrypto" ,python-pycrypto)
12232 ("python-pytz" ,python-pytz)))
12233 (native-inputs
12234 `(;; Optional dependency of Flask. Tests need it.
12235 ("python-blinker" ,python-blinker)
12236 ("python-mock" ,python-mock) ; For tests
12237 ("python-nose" ,python-nose) ; For tests
12238 ("python-sphinx" ,python-sphinx)))
12239 (home-page
12240 "https://www.github.com/flask-restful/flask-restful/")
12241 (synopsis
12242 "Flask module for creating REST APIs")
12243 (description
12244 "This package contains a Flask module for creating REST APIs.")
12245 (license license:bsd-3)))
12246
12247 (define-public python-flask-basicauth
12248 (package
12249 (name "python-flask-basicauth")
12250 (version "0.2.0")
12251 (source
12252 (origin
12253 (method url-fetch)
12254 (uri (pypi-uri "Flask-BasicAuth" version))
12255 (sha256
12256 (base32
12257 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12258 (build-system python-build-system)
12259 (propagated-inputs
12260 `(("python-flask" ,python-flask)))
12261 (home-page
12262 "https://github.com/jpvanhal/flask-basicauth")
12263 (synopsis
12264 "HTTP basic access authentication for Flask")
12265 (description
12266 "This package provides HTTP basic access authentication for Flask.")
12267 (license license:bsd-3)))
12268
12269 (define-public python-flask-sqlalchemy
12270 (package
12271 (name "python-flask-sqlalchemy")
12272 (version "2.1")
12273 (source
12274 (origin
12275 (method url-fetch)
12276 (uri (pypi-uri "Flask-SQLAlchemy" version))
12277 (sha256
12278 (base32
12279 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12280 (build-system python-build-system)
12281 (propagated-inputs
12282 `(("python-flask" ,python-flask)
12283 ("python-sqlalchemy" ,python-sqlalchemy)))
12284 (home-page
12285 "http://github.com/mitsuhiko/flask-sqlalchemy")
12286 (synopsis
12287 "Module adding SQLAlchemy support to your Flask application")
12288 (description
12289 "This package adds SQLAlchemy support to your Flask application.")
12290 (license license:bsd-3)))
12291
12292 (define-public python-pyev
12293 (package
12294 (name "python-pyev")
12295 (version "0.9.0")
12296 (source
12297 (origin
12298 (method url-fetch)
12299 (uri (pypi-uri "pyev" version))
12300 (sha256
12301 (base32
12302 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12303 (build-system python-build-system)
12304 (arguments
12305 `(#:tests? #f ; no test suite
12306 #:phases
12307 (modify-phases %standard-phases
12308 (add-after 'unpack 'patch
12309 (lambda* (#:key inputs #:allow-other-keys)
12310 (let ((libev (string-append (assoc-ref inputs "libev")
12311 "/lib/libev.so.4")))
12312 (substitute* "setup.py"
12313 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12314 (string-append "libev_dll_name = \"" libev "\"")))))))))
12315 (inputs
12316 `(("libev" ,libev)))
12317 (home-page "http://pythonhosted.org/pyev/")
12318 (synopsis "Python libev interface")
12319 (description "Pyev provides a Python interface to libev.")
12320 (license license:gpl3)))
12321
12322 (define-public python2-pyev
12323 (package-with-python2 python-pyev))
12324
12325 (define-public python-imagesize
12326 (package
12327 (name "python-imagesize")
12328 (version "0.7.1")
12329 (source
12330 (origin
12331 (method url-fetch)
12332 (uri (pypi-uri "imagesize" version))
12333 (sha256
12334 (base32
12335 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12336 (build-system python-build-system)
12337 (arguments
12338 '(;; Test files are not distributed on PyPi:
12339 ;; https://github.com/shibukawa/imagesize_py/issues/7
12340 #:tests? #f))
12341 (home-page "https://github.com/shibukawa/imagesize_py")
12342 (synopsis "Gets image size of files in variaous formats in Python")
12343 (description
12344 "This package allows determination of image size from
12345 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12346 (license license:expat)))
12347
12348 (define-public python2-imagesize
12349 (package-with-python2 python-imagesize))
12350
12351 (define-public python-axolotl-curve25519
12352 (package
12353 (name "python-axolotl-curve25519")
12354 (version "0.1")
12355 (source
12356 (origin
12357 (method git-fetch)
12358 (uri (git-reference
12359 (url "git://github.com/tgalal/python-axolotl-curve25519")
12360 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12361 (file-name (string-append name "-" version "-checkout"))
12362 (sha256
12363 (base32
12364 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12365 (build-system python-build-system)
12366 (arguments
12367 `(;; Prevent creation of the egg. This works around
12368 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12369 #:configure-flags '("--root=/")))
12370 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12371 (synopsis "Python wrapper for curve25519 library")
12372 (description "This is a python wrapper for the curve25519 library
12373 with ed25519 signatures. The C code was pulled from
12374 libaxolotl-android. At the moment this wrapper is meant for use by
12375 python-axolotl.")
12376 (license (list license:gpl3 ; Most files
12377 license:bsd-3)))) ; curve/curve25519-donna.c
12378
12379 (define-public python2-axolotl-curve25519
12380 (package-with-python2 python-axolotl-curve25519))
12381
12382 (define-public python-axolotl
12383 (package
12384 (name "python-axolotl")
12385 (version "0.1.35")
12386 (source
12387 (origin
12388 (method url-fetch)
12389 (uri (string-append
12390 "https://github.com/tgalal/python-axolotl/archive/"
12391 version ".tar.gz"))
12392 (file-name (string-append name "-" version ".tar.gz"))
12393 (sha256
12394 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12395 (build-system python-build-system)
12396 (arguments
12397 `(#:phases
12398 (modify-phases %standard-phases
12399 ;; Don't install tests
12400 (add-before 'install 'remove-tests
12401 (lambda _
12402 (for-each delete-file-recursively
12403 '("axolotl/tests" "build/lib/axolotl/tests"))
12404 #t)))))
12405 (propagated-inputs
12406 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12407 ("python-dateutil" ,python-dateutil)
12408 ("python-protobuf" ,python-protobuf)
12409 ("python-pycrypto" ,python-pycrypto)))
12410 (home-page "https://github.com/tgalal/python-axolotl")
12411 (synopsis "Python port of libaxolotl-android")
12412 (description "This is a python port of libaxolotl-android. This
12413 is a ratcheting forward secrecy protocol that works in synchronous and
12414 asynchronous messaging environments.")
12415 (license license:gpl3)))
12416
12417 (define-public python2-axolotl
12418 (package-with-python2 python-axolotl))
12419
12420 (define-public python-termstyle
12421 (package
12422 (name "python-termstyle")
12423 (version "0.1.11")
12424 (source
12425 (origin
12426 (method url-fetch)
12427 (uri (pypi-uri "termstyle" version))
12428 (sha256
12429 (base32
12430 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12431 (build-system python-build-system)
12432 (arguments
12433 '(#:phases
12434 (modify-phases %standard-phases
12435 (replace 'check
12436 (lambda _
12437 (zero? (system* "python" "test3.py")))))))
12438 (home-page "http://github.com/gfxmonk/termstyle")
12439 (synopsis "Console text coloring for Python")
12440 (description "This package provides console text coloring for Python.")
12441 (license license:bsd-3)))
12442
12443 (define-public python-rednose
12444 (package
12445 (name "python-rednose")
12446 (version "1.2.1")
12447 (source
12448 (origin
12449 (method url-fetch)
12450 (uri (pypi-uri "rednose" version))
12451 (sha256
12452 (base32
12453 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12454 (build-system python-build-system)
12455 (arguments
12456 `(#:phases
12457 (modify-phases %standard-phases
12458 (add-after 'unpack 'fix-deps
12459 (lambda _
12460 ;; See <https://github.com/JBKahn/rednose/issues/12>
12461 (substitute* "setup.py"
12462 (("python-termstyle") "termstyle"))
12463 #t)))))
12464 (propagated-inputs
12465 `(("python-colorama" ,python-colorama)
12466 ("python-termstyle" ,python-termstyle)))
12467 (native-inputs
12468 `(("python-six" ,python-six)
12469 ("python-nose" ,python-nose)))
12470 (home-page "https://github.com/JBKahn/rednose")
12471 (synopsis "Colored output for Python nosetests")
12472 (description "This package provides colored output for the
12473 @command{nosetests} command of the Python Nose unit test framework.")
12474 (license license:bsd-3)))
12475
12476 (define-public python-flask-restplus
12477 (package
12478 (name "python-flask-restplus")
12479 (version "0.9.2")
12480 (source
12481 (origin
12482 (method url-fetch)
12483 (uri (pypi-uri "flask-restplus" version))
12484 (sha256
12485 (base32
12486 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12487 (build-system python-build-system)
12488 (arguments
12489 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12490 ;; #:phases
12491 ;; (modify-phases %standard-phases
12492 ;; (replace 'check
12493 ;; (lambda _
12494 ;; (zero? (system* "nosetests")))))))
12495 (propagated-inputs
12496 `(("python-aniso8601" ,python-aniso8601)
12497 ("python-flask" ,python-flask)
12498 ("python-jsonschema" ,python-jsonschema)
12499 ("python-pytz" ,python-pytz)
12500 ("python-six" ,python-six)))
12501 (native-inputs
12502 `(("python-tzlocal" ,python-tzlocal)
12503 ("python-blinker" ,python-blinker)
12504 ("python-nose" ,python-nose)
12505 ("python-rednose" ,python-rednose)))
12506 (home-page "https://github.com/noirbizarre/flask-restplus")
12507 (synopsis "Framework for documented API development with Flask")
12508 (description "This package provides a framework for API development with
12509 the Flask web framework in Python. It is similar to package
12510 @code{python-flask-restful} but supports the @code{python-swagger}
12511 documentation builder.")
12512 (license license:expat)))
12513
12514 (define-public python-sadisplay
12515 (package
12516 (name "python-sadisplay")
12517 (version "0.4.6")
12518 (source
12519 (origin
12520 (method url-fetch)
12521 (uri (pypi-uri "sadisplay" version))
12522 (sha256
12523 (base32
12524 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12525 (build-system python-build-system)
12526 (propagated-inputs
12527 `(("python-sqlalchemy" ,python-sqlalchemy)))
12528 (native-inputs
12529 `(("python-nose" ,python-nose)))
12530 (home-page "https://bitbucket.org/estin/sadisplay")
12531 (synopsis "SQLAlchemy schema displayer")
12532 (description "This package provides a program to build Entity
12533 Relationship diagrams from a SQLAlchemy model (or directly from the
12534 database).")
12535 (license license:bsd-3)))
12536
12537 (define-public python2-sadisplay
12538 (package-with-python2 python-sadisplay))
12539
12540 (define-public python-flask-restful-swagger
12541 (package
12542 (name "python-flask-restful-swagger")
12543 (version "0.19")
12544 (source
12545 (origin
12546 (method url-fetch)
12547 (uri (pypi-uri "flask-restful-swagger" version))
12548 (sha256
12549 (base32
12550 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12551 (build-system python-build-system)
12552 (propagated-inputs
12553 `(("python-flask-restful" ,python-flask-restful)))
12554 (home-page "https://github.com/rantav/flask-restful-swagger")
12555 (synopsis "Extract Swagger specs from Flask-Restful projects")
12556 (description "This package lets you extract Swagger API documentation
12557 specs from your Flask-Restful projects.")
12558 (license license:expat)))
12559
12560 (define-public python2-flask-restful-swagger
12561 (package-with-python2 python-flask-restful-swagger))
12562
12563 (define-public python-argcomplete
12564 (package
12565 (name "python-argcomplete")
12566 (version "1.7.0")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (pypi-uri "argcomplete" version))
12571 (sha256
12572 (base32
12573 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12574 (build-system python-build-system)
12575 (native-inputs
12576 `(("python-pexpect" ,python-pexpect)
12577 ("tcsh" ,tcsh)))
12578 (home-page "https://github.com/kislyuk/argcomplete")
12579 (synopsis "Shell tab completion for Python argparse")
12580 (description "argcomplete provides extensible command line tab completion
12581 of arguments and options for Python scripts using @code{argparse}. It's
12582 particularly useful for programs with many options or sub-parsers that can
12583 dynamically suggest completions; for example, when browsing resources over the
12584 network.")
12585 (license license:asl2.0)))
12586
12587 (define-public python2-argcomplete
12588 (package-with-python2 python-argcomplete))
12589
12590 (define-public python-xopen
12591 (package
12592 (name "python-xopen")
12593 (version "0.1.1")
12594 (source
12595 (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "xopen" version))
12598 (sha256
12599 (base32
12600 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12601 (file-name (string-append name "-" version ".tar.gz"))))
12602 (build-system python-build-system)
12603 (home-page "https://github.com/marcelm/xopen/")
12604 (synopsis "Open compressed files transparently")
12605 (description "This module provides an @code{xopen} function that works like
12606 Python's built-in @code{open} function, but can also deal with compressed files.
12607 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12608 recognized by their file extensions. The focus is on being as efficient as
12609 possible on all supported Python versions.")
12610 (license license:expat)))
12611
12612 (define-public python2-xopen
12613 (package-with-python2 python-xopen))
12614
12615 (define-public python2-cheetah
12616 (package
12617 (name "python2-cheetah")
12618 (version "2.4.4")
12619 (source
12620 (origin
12621 (method url-fetch)
12622 (uri (pypi-uri "Cheetah" version))
12623 (sha256
12624 (base32
12625 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
12626 (build-system python-build-system)
12627 (arguments
12628 `(#:python ,python-2))
12629 (propagated-inputs
12630 `(("python2-markdown" ,python2-markdown)))
12631 (home-page "https://pythonhosted.org/Cheetah/")
12632 (synopsis "Template engine")
12633 (description "Cheetah is a text-based template engine and Python code
12634 generator.
12635
12636 Cheetah can be used as a standalone templating utility or referenced as
12637 a library from other Python applications. It has many potential uses,
12638 but web developers looking for a viable alternative to ASP, JSP, PHP and
12639 PSP are expected to be its principle user group.
12640
12641 Features:
12642 @enumerate
12643 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12644 text-based format.
12645 @item Cleanly separates content, graphic design, and program code.
12646 @item Blends the power and flexibility of Python with a simple template language
12647 that non-programmers can understand.
12648 @item Gives template writers full access to any Python data structure, module,
12649 function, object, or method in their templates.
12650 @item Makes code reuse easy by providing an object-orientated interface to
12651 templates that is accessible from Python code or other Cheetah templates.
12652 One template can subclass another and selectively reimplement sections of it.
12653 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12654 improve the performance of a dynamic website.
12655 @item Compiles templates into optimized, yet readable, Python code.
12656 @end enumerate")
12657 (license (license:x11-style "file://LICENSE"))))