gnu: awscli: Update to 1.11.35.
[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 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 maths)
79 #:use-module (gnu packages multiprecision)
80 #:use-module (gnu packages networking)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages openstack)
83 #:use-module (gnu packages password-utils)
84 #:use-module (gnu packages pcre)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages protobuf)
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages sdl)
90 #:use-module (gnu packages statistics)
91 #:use-module (gnu packages tex)
92 #:use-module (gnu packages texinfo)
93 #:use-module (gnu packages tls)
94 #:use-module (gnu packages version-control)
95 #:use-module (gnu packages video)
96 #:use-module (gnu packages web)
97 #:use-module (gnu packages base)
98 #:use-module (gnu packages xml)
99 #:use-module (gnu packages xorg)
100 #:use-module (gnu packages xdisorg)
101 #:use-module (gnu packages zip)
102 #:use-module (gnu packages tcl)
103 #:use-module (gnu packages bdw-gc)
104 #:use-module (guix packages)
105 #:use-module (guix download)
106 #:use-module (guix git-download)
107 #:use-module (guix utils)
108 #:use-module (guix build-system gnu)
109 #:use-module (guix build-system cmake)
110 #:use-module (guix build-system python)
111 #:use-module (guix build-system trivial)
112 #:use-module (srfi srfi-1))
113
114 (define-public python-2.7
115 (package
116 (name "python")
117 (version "2.7.12")
118 (source
119 (origin
120 (method url-fetch)
121 (uri (string-append "https://www.python.org/ftp/python/"
122 version "/Python-" version ".tar.xz"))
123 (sha256
124 (base32
125 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
126 (patches (search-patches "python-2.7-search-paths.patch"
127 "python-2-deterministic-build-info.patch"
128 "python-2.7-site-prefixes.patch"
129 "python-2.7-source-date-epoch.patch"))
130 (modules '((guix build utils)))
131 ;; suboptimal to delete failing tests here, but if we delete them in the
132 ;; arguments then we need to make sure to strip out that phase when it
133 ;; gets inherited by python and python-minimal.
134 (snippet
135 '(begin
136 (for-each delete-file
137 '("Lib/test/test_compileall.py"
138 "Lib/test/test_ctypes.py" ; fails on mips64el
139 "Lib/test/test_distutils.py"
140 "Lib/test/test_import.py"
141 "Lib/test/test_shutil.py"
142 "Lib/test/test_socket.py"
143 "Lib/test/test_subprocess.py"))
144 #t))))
145 (outputs '("out"
146 "tk")) ;tkinter; adds 50 MiB to the closure
147 (build-system gnu-build-system)
148 (arguments
149 `(;; 356 tests OK.
150 ;; 6 tests failed:
151 ;; test_compileall test_distutils test_import test_shutil test_socket
152 ;; test_subprocess
153 ;; 39 tests skipped:
154 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
155 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
156 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
157 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
158 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
159 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
160 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
161 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
162 ;; test_winreg test_winsound test_zipfile64
163 ;; 4 skips unexpected on linux2:
164 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
165 #:test-target "test"
166 #:configure-flags
167 (list "--enable-shared" ;allow embedding
168 "--with-system-ffi" ;build ctypes
169 "--with-ensurepip=install" ;install pip and setuptools
170 (string-append "LDFLAGS=-Wl,-rpath="
171 (assoc-ref %outputs "out") "/lib"))
172
173 #:modules ((ice-9 ftw) (ice-9 match)
174 (guix build utils) (guix build gnu-build-system))
175 #:phases
176 (modify-phases %standard-phases
177 (add-before
178 'configure 'patch-lib-shells
179 (lambda _
180 ;; Filter for existing files, since some may not exist in all
181 ;; versions of python that are built with this recipe.
182 (substitute* (filter file-exists?
183 '("Lib/subprocess.py"
184 "Lib/popen2.py"
185 "Lib/distutils/tests/test_spawn.py"
186 "Lib/test/test_subprocess.py"))
187 (("/bin/sh") (which "sh")))
188
189 ;; Use zero as the timestamp in .pyc files so that builds are
190 ;; deterministic. TODO: Remove it when this variable is set in
191 ;; gnu-build-system.scm.
192 (setenv "SOURCE_DATE_EPOCH" "1")
193 #t))
194 (add-before 'configure 'do-not-record-configure-flags
195 (lambda* (#:key configure-flags #:allow-other-keys)
196 ;; Remove configure flags from the installed '_sysconfigdata.py'
197 ;; and 'Makefile' so we don't end up keeping references to the
198 ;; build tools.
199 ;;
200 ;; Preserve at least '--with-system-ffi' since otherwise the
201 ;; thing tries to build libffi, fails, and we end up with a
202 ;; Python that lacks ctypes.
203 (substitute* "configure"
204 (("^CONFIG_ARGS=.*$")
205 (format #f "CONFIG_ARGS='~a'\n"
206 (if (member "--with-system-ffi" configure-flags)
207 "--with-system-ffi"
208 ""))))
209 #t))
210 (add-before
211 'check 'pre-check
212 (lambda _
213 ;; 'Lib/test/test_site.py' needs a valid $HOME
214 (setenv "HOME" (getcwd))
215 #t))
216 (add-after
217 'unpack 'set-source-file-times-to-1980
218 ;; XXX One of the tests uses a ZIP library to pack up some of the
219 ;; source tree, and fails with "ZIP does not support timestamps
220 ;; before 1980". Work around this by setting the file times in the
221 ;; source tree to sometime in early 1980.
222 (lambda _
223 (let ((circa-1980 (* 10 366 24 60 60)))
224 (ftw "." (lambda (file stat flag)
225 (utime file circa-1980 circa-1980)
226 #t))
227 #t)))
228 (add-after 'install 'remove-tests
229 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
230 ;; because these files are used by some libraries out there.
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (match (scandir (string-append out "/lib")
234 (lambda (name)
235 (string-prefix? "python" name)))
236 ((pythonX.Y)
237 (let ((testdir (string-append out "/lib/" pythonX.Y
238 "/test")))
239 (with-directory-excursion testdir
240 (for-each delete-file-recursively
241 (scandir testdir
242 (match-lambda
243 ((or "." "..") #f)
244 (file
245 (not
246 (string-prefix? "test_support."
247 file))))))
248 (call-with-output-file "__init__.py" (const #t))
249 #t)))))))
250 (add-before 'strip 'make-libraries-writable
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; Make .so files writable so they can be stripped.
253 (let ((out (assoc-ref outputs "out")))
254 (for-each (lambda (file)
255 (chmod file #o755))
256 (find-files (string-append out "/lib")
257 "\\.so"))
258 #t)))
259 (add-after 'install 'move-tk-inter
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; When Tkinter support is built move it to a separate output so
262 ;; that the main output doesn't contain a reference to Tcl/Tk.
263 (let ((out (assoc-ref outputs "out"))
264 (tk (assoc-ref outputs "tk")))
265 (when tk
266 (match (find-files out "tkinter.*\\.so")
267 ((tkinter.so)
268 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
269 ;; want it under TK/lib/pythonX.Y/site-packages.
270 (let* ((len (string-length out))
271 (target (string-append
272 tk "/"
273 (string-drop
274 (dirname (dirname tkinter.so))
275 len)
276 "/site-packages")))
277 (install-file tkinter.so target)
278 (delete-file tkinter.so)))))
279 #t))))))
280 (inputs
281 `(("bzip2" ,bzip2)
282 ("gdbm" ,gdbm)
283 ("libffi" ,libffi) ; for ctypes
284 ("sqlite" ,sqlite) ; for sqlite extension
285 ("openssl" ,openssl)
286 ("readline" ,readline)
287 ("zlib" ,zlib)
288 ("tcl" ,tcl)
289 ("tk" ,tk))) ; for tkinter
290 (native-inputs
291 `(("pkg-config" ,pkg-config)))
292 (native-search-paths
293 (list (search-path-specification
294 (variable "PYTHONPATH")
295 (files '("lib/python2.7/site-packages")))))
296 (home-page "https://www.python.org")
297 (synopsis "High-level, dynamically-typed programming language")
298 (description
299 "Python is a remarkably powerful dynamic programming language that
300 is used in a wide variety of application domains. Some of its key
301 distinguishing features include: clear, readable syntax; strong
302 introspection capabilities; intuitive object orientation; natural
303 expression of procedural code; full modularity, supporting hierarchical
304 packages; exception-based error handling; and very high level dynamic
305 data types.")
306 (license license:psfl)))
307
308 ;; Current 2.x version.
309 (define-public python-2 python-2.7)
310
311 (define-public python-3.5
312 (package (inherit python-2)
313 (version "3.5.2")
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "https://www.python.org/ftp/python/"
317 version "/Python-" version ".tar.xz"))
318 (patches (search-patches
319 "python-fix-tests.patch"
320 "python-3.5-fix-tests.patch"
321 "python-3-deterministic-build-info.patch"
322 "python-3-search-paths.patch"))
323 (patch-flags '("-p0"))
324 (sha256
325 (base32
326 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
327 (arguments (substitute-keyword-arguments (package-arguments python-2)
328 ((#:tests? _) #t)))
329 (native-search-paths
330 (list (search-path-specification
331 (variable "PYTHONPATH")
332 (files (list (string-append "lib/python"
333 (version-major+minor version)
334 "/site-packages"))))))))
335
336 (define-public python-3.4
337 (package (inherit python-3.5)
338 (version "3.4.5")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "https://www.python.org/ftp/python/"
342 version "/Python-" version ".tar.xz"))
343 (patches (search-patches
344 "python-fix-tests.patch"
345 "python-3.4-fix-tests.patch"
346 "python-3-deterministic-build-info.patch"
347 "python-3-search-paths.patch"))
348 (patch-flags '("-p0"))
349 (sha256
350 (base32
351 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
352
353 ;; Current 3.x version.
354 (define-public python-3 python-3.5)
355
356 ;; Current major version.
357 (define-public python python-3)
358
359 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
360 ;; Python (Tk -> libxcb -> Python.)
361
362 (define-public python2-minimal
363 (package (inherit python-2)
364 (name "python-minimal")
365 (outputs '("out"))
366 (arguments
367 (substitute-keyword-arguments (package-arguments python-2)
368 ((#:configure-flags cf)
369 `(append ,cf '("--without-system-ffi")))))
370 (inputs '()))) ;none of the optional dependencies
371
372 (define-public python-minimal
373 (package (inherit python)
374 (name "python-minimal")
375 (outputs '("out"))
376
377 ;; Build fails due to missing ctypes without libffi.
378 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
379 ;; zlib is required by 'zipimport', used by pip.
380 (inputs `(("libffi" ,libffi)
381 ("openssl" ,openssl)
382 ("zlib" ,zlib)))))
383
384 (define* (wrap-python3 python
385 #:optional
386 (name (string-append (package-name python) "-wrapper")))
387 (package (inherit python)
388 (name name)
389 (source #f)
390 (build-system trivial-build-system)
391 (outputs '("out"))
392 (inputs `(("bash" ,bash)))
393 (propagated-inputs `(("python" ,python)))
394 (arguments
395 `(#:modules ((guix build utils))
396 #:builder
397 (begin
398 (use-modules (guix build utils))
399 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
400 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
401 (mkdir-p bin)
402 (for-each
403 (lambda (old new)
404 (symlink (string-append python old)
405 (string-append bin "/" new)))
406 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
407 `("python" ,"pydoc" ,"idle" ,"pip"))
408 ;; python-config outputs search paths based upon its location,
409 ;; use a bash wrapper to avoid changing its outputs.
410 (let ((bash (string-append (assoc-ref %build-inputs "bash")
411 "/bin/bash"))
412 (old (string-append python "python3-config"))
413 (new (string-append bin "/python-config")))
414 (with-output-to-file new
415 (lambda ()
416 (format #t "#!~a~%" bash)
417 (format #t "exec \"~a\" \"$@\"~%" old)
418 (chmod new #o755)
419 #t)))))))
420 (synopsis "Wrapper for the Python 3 commands")
421 (description
422 "This package provides wrappers for the commands of Python@tie{}3.x such
423 that they can be invoked under their usual name---e.g., @command{python}
424 instead of @command{python3}.")))
425
426 (define-public python-wrapper (wrap-python3 python))
427 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
428
429 (define-public python-psutil
430 (package
431 (name "python-psutil")
432 (version "4.3.0")
433 (source
434 (origin
435 (method url-fetch)
436 (uri (pypi-uri "psutil" version))
437 (sha256
438 (base32
439 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
440 (build-system python-build-system)
441 (home-page "https://www.github.com/giampaolo/psutil")
442 (synopsis "Library for retrieving information on running processes")
443 (description
444 "psutil (Python system and process utilities) is a library for retrieving
445 information on running processes and system utilization (CPU, memory, disks,
446 network) in Python. It is useful mainly for system monitoring, profiling and
447 limiting process resources and management of running processes. It implements
448 many functionalities offered by command line tools such as: ps, top, lsof,
449 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
450 pidof, tty, taskset, pmap.")
451 (license license:bsd-3)))
452
453 (define-public python2-psutil
454 (package-with-python2 python-psutil))
455
456 (define-public python-passlib
457 (package
458 (name "python-passlib")
459 (version "1.7.0")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (pypi-uri "passlib" version))
464 (sha256
465 (base32
466 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
467 (build-system python-build-system)
468 (native-inputs
469 `(("python-nose" ,python-nose)))
470 (propagated-inputs
471 `(("python-py-bcrypt" ,python-py-bcrypt)))
472 (arguments
473 `(#:phases
474 (alist-cons-before
475 'check 'set-PYTHON_EGG_CACHE
476 ;; some tests require access to "$HOME/.cython"
477 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
478 %standard-phases)))
479 (home-page "https://bitbucket.org/ecollins/passlib")
480 (synopsis
481 "Comprehensive password hashing framework")
482 (description
483 "Passlib is a password hashing library for Python 2 & 3, which provides
484 cross-platform implementations of over 30 password hashing algorithms, as well
485 as a framework for managing existing password hashes. It's designed to be
486 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
487 to providing full-strength password hashing for multi-user application.")
488 (license license:bsd-3)))
489
490 (define-public python2-passlib
491 (package-with-python2 python-passlib))
492
493 (define-public python-py-bcrypt
494 (package
495 (name "python-py-bcrypt")
496 (version "0.4")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append
501 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
502 version
503 ".tar.gz"))
504 (sha256
505 (base32
506 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
507 (build-system python-build-system)
508 (home-page "https://code.google.com/p/py-bcrypt")
509 (synopsis
510 "Bcrypt password hashing and key derivation")
511 (description
512 "A python wrapper of OpenBSD's Blowfish password hashing code. This
513 system hashes passwords using a version of Bruce Schneier's Blowfish block
514 cipher with modifications designed to raise the cost of off-line password
515 cracking and frustrate fast hardware implementation. The computation cost of
516 the algorithm is parametised, so it can be increased as computers get faster.
517 The intent is to make a compromise of a password database less likely to
518 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
519 John the Ripper).")
520 ;; "sha2.c" is under BSD-3;
521 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
522 ;; the rest is under ISC.
523 (license (list license:isc license:bsd-3 license:bsd-4))))
524
525 (define-public python2-py-bcrypt
526 (package-with-python2 python-py-bcrypt))
527
528
529 (define-public python-paramiko
530 (package
531 (name "python-paramiko")
532 (version "1.16.0")
533 (source
534 (origin
535 (method url-fetch)
536 (uri (pypi-uri "paramiko" version))
537 (sha256
538 (base32
539 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
540 (build-system python-build-system)
541 (propagated-inputs
542 `(("python-pycrypto" ,python-pycrypto)
543 ("python-ecdsa" ,python-ecdsa)))
544 (home-page "http://www.paramiko.org/")
545 (synopsis "SSHv2 protocol library")
546 (description "Paramiko is a python implementation of the SSHv2 protocol,
547 providing both client and server functionality. While it leverages a Python C
548 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
549 Python interface around SSH networking concepts.")
550 (license license:lgpl2.1+)))
551
552 (define-public python2-paramiko
553 (package-with-python2 python-paramiko))
554
555
556 (define-public python-httplib2
557 (package
558 (name "python-httplib2")
559 (version "0.9.2")
560 (source
561 (origin
562 (method url-fetch)
563 (uri (pypi-uri "httplib2" version))
564 (sha256
565 (base32
566 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
567 (build-system python-build-system)
568 (home-page "https://github.com/jcgregorio/httplib2")
569 (synopsis "Comprehensive HTTP client library")
570 (description
571 "A comprehensive HTTP client library supporting many features left out of
572 other HTTP libraries.")
573 (license license:expat)))
574
575 (define-public python2-httplib2
576 (package-with-python2 python-httplib2))
577
578 (define-public python-ecdsa
579 (package
580 (name "python-ecdsa")
581 (version "0.13")
582 (source
583 (origin
584 (method url-fetch)
585 (uri (string-append
586 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
587 version
588 ".tar.gz"))
589 (sha256
590 (base32
591 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
592 (build-system python-build-system)
593 (inputs
594 `(("openssl" ,openssl)))
595 (home-page
596 "http://github.com/warner/python-ecdsa")
597 (synopsis
598 "ECDSA cryptographic signature library (pure python)")
599 (description
600 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
601 Curve Digital Signature Algorithm), implemented purely in Python. With this
602 library, you can quickly create keypairs (signing key and verifying key), sign
603 messages, and verify the signatures. The keys and signatures are very short,
604 making them easy to handle and incorporate into other protocols.")
605 (license license:expat)))
606
607 (define-public python2-ecdsa
608 (package-with-python2 python-ecdsa))
609
610 (define-public python-ccm
611 (package
612 (name "python-ccm")
613 (version "2.1.6")
614 (source
615 (origin
616 (method url-fetch)
617 (uri (pypi-uri "ccm" version))
618 (sha256
619 (base32
620 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
621 (build-system python-build-system)
622 (propagated-inputs
623 `(("python-pyyaml" ,python-pyyaml)
624 ;; Not listed in setup.py, but used in ccmlib/node.py for full
625 ;; functionality
626 ("python-psutil" ,python-psutil)
627 ("python-six" ,python-six)))
628 (home-page "https://github.com/pcmanus/ccm")
629 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
630 localhost")
631 (description "Cassandra Cluster Manager is a development tool for testing
632 local Cassandra clusters. It creates, launches and removes Cassandra clusters
633 on localhost.")
634 (license license:asl2.0)))
635
636 (define-public python2-ccm
637 (package-with-python2 python-ccm))
638
639 (define-public python-pytz
640 (package
641 (name "python-pytz")
642 (version "2016.10")
643 (source
644 (origin
645 (method url-fetch)
646 (uri (pypi-uri "pytz" version ".tar.bz2"))
647 (sha256
648 (base32
649 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
650 (build-system python-build-system)
651 (arguments `(#:tests? #f)) ; no test target
652 (home-page "http://pythonhosted.org/pytz")
653 (synopsis "Python timezone library")
654 (description
655 "This library allows accurate and cross platform timezone calculations
656 using Python 2.4 or higher and provides access to the Olson timezone database.")
657 (license license:expat)))
658
659 (define-public python2-pytz
660 (package-with-python2 python-pytz))
661
662
663 (define-public python-babel
664 (package
665 (name "python-babel")
666 (version "2.3.4")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "Babel" version))
671 (sha256
672 (base32
673 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
674 (build-system python-build-system)
675 (propagated-inputs
676 `(("python-pytz" ,python-pytz)))
677 (arguments `(#:tests? #f)) ; no test target
678 (home-page "http://babel.pocoo.org/")
679 (synopsis
680 "Tools for internationalizing Python applications")
681 (description
682 "Babel is composed of two major parts:
683 - tools to build and work with gettext message catalogs
684 - a Python interface to the CLDR (Common Locale Data Repository), providing
685 access to various locale display names, localized number and date formatting,
686 etc. ")
687 (license license:bsd-3)))
688
689 (define-public python2-babel
690 (package-with-python2 python-babel))
691
692 (define-public python2-backport-ssl-match-hostname
693 (package
694 (name "python2-backport-ssl-match-hostname")
695 (version "3.5.0.1")
696 (source
697 (origin
698 (method url-fetch)
699 (uri (string-append
700 "https://pypi.python.org/packages/source/b/"
701 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
702 version ".tar.gz"))
703 (sha256
704 (base32
705 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
706 (build-system python-build-system)
707 (arguments
708 `(#:python ,python-2
709 #:tests? #f)) ; no test target
710 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
711 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
712 (description
713 "This backport brings the ssl.match_hostname() function to users of
714 earlier versions of Python. The function checks the hostname in the
715 certificate returned by the server to which a connection has been established,
716 and verifies that it matches the intended target hostname.")
717 (license license:psfl)))
718
719 (define-public python-hdf4
720 (package
721 (name "python-hdf4")
722 (version "0.9")
723 (source
724 (origin
725 (method url-fetch)
726 (uri (pypi-uri name version))
727 (sha256
728 (base32
729 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
730 (build-system python-build-system)
731 (native-inputs `(("nose" ,python-nose)))
732 (propagated-inputs `(("numpy" ,python-numpy)))
733 (inputs
734 `(("hdf4" ,hdf4)
735 ("libjpeg" ,libjpeg)
736 ("zlib" ,zlib)))
737 (arguments
738 `(#:phases
739 (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
743 ;; on to import numpy. Somehow this works on their CI system.
744 ;; Let's just manage PYTHONPATH here instead.
745 (substitute* "runexamples.sh"
746 (("export PYTHONPATH=.*") ""))
747 (setenv "PYTHONPATH"
748 (string-append (getcwd) ":"
749 (getenv "PYTHONPATH")))
750 (and (zero? (system* "./runexamples.sh"))
751 (zero? (system* "nosetests" "-v"))))))))
752 (home-page "https://github.com/fhs/python-hdf4")
753 (synopsis "Python interface to the NCSA HDF4 library")
754 (description
755 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
756 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
757 NetCDF files can also be read and modified. Python-HDF4 is a fork of
758 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
759 (license license:expat)))
760
761 (define-public python2-hdf4
762 (package-with-python2 python-hdf4))
763
764 (define-public python-h5py
765 (package
766 (name "python-h5py")
767 (version "2.6.0")
768 (source
769 (origin
770 (method url-fetch)
771 (uri (pypi-uri "h5py" version))
772 (sha256
773 (base32
774 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
775 (build-system python-build-system)
776 (arguments
777 `(#:tests? #f ; no test target
778 #:phases
779 (modify-phases %standard-phases
780 (add-after 'unpack 'fix-hdf5-paths
781 (lambda* (#:key inputs #:allow-other-keys)
782 (let ((prefix (assoc-ref inputs "hdf5")))
783 (substitute* "setup_build.py"
784 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
785 (string-append "['" prefix "/lib" "']"))
786 (("'/opt/local/include', '/usr/local/include'")
787 (string-append "'" prefix "/include" "'")))
788 (substitute* "setup_configure.py"
789 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
790 (string-append "['" prefix "/lib" "']")))
791 #t))))))
792 (propagated-inputs
793 `(("python-six" ,python-six)
794 ("python-numpy" ,python-numpy)))
795 (inputs
796 `(("hdf5" ,hdf5)))
797 (native-inputs
798 `(("python-cython" ,python-cython)
799 ("python-pkgconfig" ,python-pkgconfig)))
800 (home-page "http://www.h5py.org/")
801 (synopsis "Read and write HDF5 files from Python")
802 (description
803 "The h5py package provides both a high- and low-level interface to the
804 HDF5 library from Python. The low-level interface is intended to be a
805 complete wrapping of the HDF5 API, while the high-level component supports
806 access to HDF5 files, datasets and groups using established Python and NumPy
807 concepts.")
808 (license license:bsd-3)))
809
810 (define-public python2-h5py
811 (package-with-python2 python-h5py))
812
813 (define-public python-netcdf4
814 (package
815 (name "python-netcdf4")
816 (version "1.2.6")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "netCDF4" version))
821 (sha256
822 (base32
823 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
824 (build-system python-build-system)
825 (native-inputs
826 `(("python-cython" ,python-cython)))
827 (propagated-inputs
828 `(("python-numpy" ,python-numpy)))
829 (inputs
830 `(("netcdf" ,netcdf)
831 ("hdf4" ,hdf4)
832 ("hdf5" ,hdf5)))
833 (arguments
834 '(#:phases
835 (modify-phases %standard-phases
836 (replace 'check
837 (lambda _
838 (setenv "NO_NET" "1") ; disable opendap tests
839 (with-directory-excursion "test"
840 (setenv "PYTHONPATH" ; find and add the library we just built
841 (string-append
842 (car (find-files "../build" "lib.*"
843 #:directories? #:t
844 #:fail-on-error? #:t))
845 ":" (getenv "PYTHONPATH")))
846 (zero? (system* "python" "run_all.py"))))))))
847 (home-page
848 "https://github.com/Unidata/netcdf4-python")
849 (synopsis "Python/numpy interface to the netCDF library")
850 (description "Netcdf4-python is a Python interface to the netCDF C
851 library. netCDF version 4 has many features not found in earlier
852 versions of the library and is implemented on top of HDF5. This module
853 can read and write files in both the new netCDF 4 and the old netCDF 3
854 format, and can create files that are readable by HDF5 clients. The
855 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
856 to users of that module.")
857 ;; The software is mainly ISC, but includes some files covered
858 ;; by the Expat license.
859 (license (list license:isc license:expat))))
860
861 (define-public python2-netcdf4
862 (package-with-python2 python-netcdf4))
863
864 (define-public python-lockfile
865 (package
866 (name "python-lockfile")
867 (version "0.12.2")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
872 "lockfile-" version ".tar.gz"))
873 (sha256
874 (base32
875 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
876 (build-system python-build-system)
877 (arguments '(#:test-target "check"))
878 (native-inputs
879 `(("python-pbr" ,python-pbr)))
880 (home-page "https://launchpad.net/pylockfile")
881 (synopsis "Platform-independent file locking module")
882 (description
883 "The lockfile package exports a LockFile class which provides a simple
884 API for locking files.")
885 (license license:expat)))
886
887 (define-public python2-lockfile
888 (package-with-python2 python-lockfile))
889
890 (define-public python-mock
891 (package
892 (name "python-mock")
893 (version "1.0.1")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (pypi-uri "mock" version))
898 (sha256
899 (base32
900 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
901 (build-system python-build-system)
902 (arguments '(#:test-target "check"))
903 (home-page "https://github.com/testing-cabal/mock")
904 (synopsis "Python mocking and patching library for testing")
905 (description
906 "Mock is a library for testing in Python. It allows you to replace parts
907 of your system under test with mock objects and make assertions about how they
908 have been used.")
909 (license license:expat)))
910
911 (define-public python2-mock
912 (package-with-python2 python-mock))
913
914
915 (define-public python-setuptools
916 (package
917 (name "python-setuptools")
918 (version "31.0.0")
919 (source
920 (origin
921 (method url-fetch)
922 (uri (pypi-uri "setuptools" version))
923 (sha256
924 (base32
925 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
926 (modules '((guix build utils)))
927 (snippet
928 '(begin
929 ;; Remove included binaries which are used to build self-extracting
930 ;; installers for Windows.
931 ;; TODO: Find some way to build them ourself so we can include them.
932 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
933 #t))))
934 (build-system python-build-system)
935 ;; FIXME: Tests require pytest, which itself relies on setuptools.
936 ;; One could bootstrap with an internal untested setuptools.
937 (arguments
938 `(#:tests? #f))
939 (home-page "https://pypi.python.org/pypi/setuptools")
940 (synopsis
941 "Library designed to facilitate packaging Python projects")
942 (description
943 "Setuptools is a fully-featured, stable library designed to facilitate
944 packaging Python projects, where packaging includes:
945 Python package and module definitions,
946 distribution package metadata,
947 test hooks,
948 project installation,
949 platform-specific details,
950 Python 3 support.")
951 ;; TODO: setuptools now bundles the following libraries:
952 ;; packaging, pyparsing, six and appdirs. How to unbundle?
953 (license (list license:psfl ; setuptools itself
954 license:expat ; six, appdirs, pyparsing
955 license:asl2.0 ; packaging is dual ASL2/BSD-2
956 license:bsd-2))))
957
958 (define-public python2-setuptools
959 (package-with-python2 python-setuptools))
960
961 ;;; Pycrypto is abandoned upstream [0] and contains at least one bug that can be
962 ;;; exploited to achieve arbitrary code execution [1].
963 ;;;
964 ;;; TODO Remove this package from GNU Guix.
965 ;;;
966 ;;; [0] https://github.com/dlitz/pycrypto/issues/173
967 ;;; [1] https://github.com/dlitz/pycrypto/issues/176
968 (define-public python-pycrypto
969 (package
970 (name "python-pycrypto")
971 (version "2.6.1")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (string-append "https://pypi.python.org/packages/source/p/"
976 "pycrypto/pycrypto-" version ".tar.gz"))
977 (sha256
978 (base32
979 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
980 (build-system python-build-system)
981 (inputs
982 `(("python" ,python)
983 ("gmp" ,gmp)))
984 (arguments
985 `(#:phases
986 (alist-cons-before
987 'build 'set-build-env
988 ;; pycrypto runs an autoconf configure script behind the scenes
989 (lambda _
990 (setenv "CONFIG_SHELL" (which "bash")))
991 %standard-phases)))
992 (home-page "http://www.pycrypto.org/")
993 (synopsis "Cryptographic modules for Python")
994 (description
995 "Pycrypto is a collection of both secure hash functions (such as SHA256
996 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
997 etc.). The package is structured to make adding new modules easy.")
998 (license license:public-domain)))
999
1000 (define-public python2-pycrypto
1001 (let ((pycrypto (package-with-python2 python-pycrypto)))
1002 (package (inherit pycrypto)
1003 (inputs
1004 `(("python" ,python-2)
1005 ,@(alist-delete
1006 "python"
1007 (package-inputs pycrypto)))))))
1008
1009 (define-public python-keyring
1010 (package
1011 (name "python-keyring")
1012 (version "8.7")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (pypi-uri "keyring" version))
1017 (sha256
1018 (base32
1019 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1020 (build-system python-build-system)
1021 (native-inputs
1022 `(("python-setuptools-scm" ,python-setuptools-scm)))
1023 (propagated-inputs
1024 `(("python-pycrypto" ,python-pycrypto)))
1025 (arguments
1026 `(#:tests? #f)) ;TODO: tests require pytest
1027 (home-page "https://github.com/jaraco/keyring")
1028 (synopsis "Store and access your passwords safely")
1029 (description
1030 "The Python keyring lib provides a easy way to access the system keyring
1031 service from python. It can be used in any application that needs safe
1032 password storage.")
1033 ;; "MIT" and PSF dual license
1034 (license license:x11)))
1035
1036 (define-public python2-keyring
1037 (package-with-python2 python-keyring))
1038
1039 (define-public python-six
1040 (package
1041 (name "python-six")
1042 (version "1.10.0")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "six" version))
1047 (sha256
1048 (base32
1049 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1050 (build-system python-build-system)
1051 (home-page "http://pypi.python.org/pypi/six/")
1052 (synopsis "Python 2 and 3 compatibility utilities")
1053 (description
1054 "Six is a Python 2 and 3 compatibility library. It provides utility
1055 functions for smoothing over the differences between the Python versions with
1056 the goal of writing Python code that is compatible on both Python versions.
1057 Six supports every Python version since 2.5. It is contained in only one
1058 Python file, so it can be easily copied into your project.")
1059 (license license:x11)))
1060
1061 (define-public python2-six
1062 (package-with-python2 python-six))
1063
1064 (define-public python-dateutil-2
1065 (package
1066 (name "python-dateutil")
1067 (version "2.5.2")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "python-dateutil" version))
1072 (sha256
1073 (base32
1074 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
1075 (build-system python-build-system)
1076 (propagated-inputs
1077 `(("python-six" ,python-six)))
1078 (home-page "https://dateutil.readthedocs.io/en/stable/")
1079 (synopsis "Extensions to the standard datetime module")
1080 (description
1081 "The dateutil module provides powerful extensions to the standard
1082 datetime module, available in Python 2.3+.")
1083 (license license:bsd-3)))
1084
1085 (define-public python2-dateutil-2
1086 (package-with-python2 python-dateutil-2))
1087
1088 (define-public python-dateutil
1089 (package
1090 (name "python-dateutil")
1091 (version "1.5") ; last version for python < 3
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (string-append "http://labix.org/download/python-dateutil/"
1096 "python-dateutil-" version ".tar.gz"))
1097 (sha256
1098 (base32
1099 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1100 (build-system python-build-system)
1101 (home-page "https://dateutil.readthedocs.io/en/stable/")
1102 (synopsis "Extensions to the standard datetime module")
1103 (description
1104 "The dateutil module provides powerful extensions to the standard
1105 datetime module, available in Python 2.3+.")
1106 (license license:psfl)))
1107
1108 (define-public python2-dateutil
1109 (package-with-python2 python-dateutil))
1110
1111 (define-public python-parsedatetime
1112 (package
1113 (name "python-parsedatetime")
1114 (version "2.1")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (pypi-uri "parsedatetime" version))
1119 (sha256
1120 (base32
1121 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1122 (build-system python-build-system)
1123 (native-inputs
1124 `(("python-nose" ,python-nose)
1125 ("python-pyicu" ,python-pyicu)))
1126 (home-page "http://github.com/bear/parsedatetime/")
1127 (synopsis
1128 "Parse human-readable date/time text")
1129 (description
1130 "Parse human-readable date/time text.")
1131 (license license:asl2.0)))
1132
1133 (define-public python2-parsedatetime
1134 (package-with-python2 python-parsedatetime))
1135
1136 (define-public python-pandas
1137 (package
1138 (name "python-pandas")
1139 (version "0.18.1")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (string-append
1144 "https://pypi.python.org/packages/11/09/"
1145 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1146 "pandas-" version ".tar.gz"))
1147 (sha256
1148 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1149 (build-system python-build-system)
1150 (propagated-inputs
1151 `(("python-numpy" ,python-numpy)
1152 ("python-pytz" ,python-pytz)
1153 ("python-dateutil" ,python-dateutil-2)))
1154 (native-inputs
1155 `(("python-nose" ,python-nose)
1156 ("python-cython" ,python-cython)))
1157 (home-page "http://pandas.pydata.org")
1158 (synopsis "Data structures for data analysis, time series, and statistics")
1159 (description
1160 "Pandas is a Python package providing fast, flexible, and expressive data
1161 structures designed to make working with structured (tabular,
1162 multidimensional, potentially heterogeneous) and time series data both easy
1163 and intuitive. It aims to be the fundamental high-level building block for
1164 doing practical, real world data analysis in Python.")
1165 (license license:bsd-3)))
1166
1167 (define-public python2-pandas
1168 (package-with-python2 python-pandas))
1169
1170 (define-public python-tzlocal
1171 (package
1172 (name "python-tzlocal")
1173 (version "1.2.2")
1174 (source
1175 (origin
1176 (method url-fetch)
1177 (uri (pypi-uri "tzlocal" version))
1178 (sha256
1179 (base32
1180 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1181 (build-system python-build-system)
1182 (propagated-inputs
1183 `(("python-pytz" ,python-pytz)))
1184 (home-page "https://github.com/regebro/tzlocal")
1185 (synopsis
1186 "Local timezone information for Python")
1187 (description
1188 "Tzlocal returns a tzinfo object with the local timezone information.
1189 This module attempts to fix a glaring hole in pytz, that there is no way to
1190 get the local timezone information, unless you know the zoneinfo name, and
1191 under several distributions that's hard or impossible to figure out.")
1192 (license license:cc0)))
1193
1194 (define-public python2-pysqlite
1195 (package
1196 (name "python2-pysqlite")
1197 (version "2.8.1")
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (pypi-uri "pysqlite" version))
1202 (sha256
1203 (base32
1204 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1205 (build-system python-build-system)
1206 (inputs
1207 `(("sqlite" ,sqlite)))
1208 (arguments
1209 `(#:python ,python-2 ; incompatible with Python 3
1210 #:tests? #f)) ; no test target
1211 (home-page "http://github.com/ghaering/pysqlite")
1212 (synopsis "SQLite bindings for Python")
1213 (description
1214 "Pysqlite provides SQLite bindings for Python that comply to the
1215 Database API 2.0T.")
1216 (license license:zlib)))
1217
1218
1219 (define-public python2-mechanize
1220 (package
1221 (name "python2-mechanize")
1222 (version "0.2.5")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1227 version ".tar.gz"))
1228 (sha256
1229 (base32
1230 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1231 (build-system python-build-system)
1232 (arguments
1233 `(#:python ,python-2 ; apparently incompatible with Python 3
1234 #:tests? #f))
1235 ;; test fails with message
1236 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1237 ;; (python-3.3.2) or
1238 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1239 ;; (python-2.7.5).
1240 ;; The source code is from March 2011 and probably not up-to-date
1241 ;; with respect to python unit tests.
1242 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1243 (synopsis
1244 "Stateful programmatic web browsing in Python")
1245 (description
1246 "Mechanize implements stateful programmatic web browsing in Python,
1247 after Andy Lester’s Perl module WWW::Mechanize.")
1248 (license (license:non-copyleft
1249 "file://COPYING"
1250 "See COPYING in the distribution."))))
1251
1252
1253 (define-public python-simplejson
1254 (package
1255 (name "python-simplejson")
1256 (version "3.10.0")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "simplejson" version))
1261 (sha256
1262 (base32
1263 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1264 (build-system python-build-system)
1265 (home-page "http://simplejson.readthedocs.org/en/latest/")
1266 (synopsis
1267 "Json library for Python")
1268 (description
1269 "JSON (JavaScript Object Notation) is a subset of JavaScript
1270 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1271 format.
1272
1273 Simplejson exposes an API familiar to users of the standard library marshal
1274 and pickle modules. It is the externally maintained version of the json
1275 library contained in Python 2.6, but maintains compatibility with Python 2.5
1276 and (currently) has significant performance advantages, even without using
1277 the optional C extension for speedups. Simplejson is also supported on
1278 Python 3.3+.")
1279 (license license:x11)))
1280
1281 (define-public python2-simplejson
1282 (package-with-python2 python-simplejson))
1283
1284
1285 (define-public python-pyicu
1286 (package
1287 (name "python-pyicu")
1288 (version "1.9.5")
1289 (source
1290 (origin
1291 (method url-fetch)
1292 (uri (pypi-uri "PyICU" version))
1293 (sha256
1294 (base32
1295 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1296 (build-system python-build-system)
1297 (inputs
1298 `(("icu4c" ,icu4c)))
1299 (home-page "http://pyicu.osafoundation.org/")
1300 (synopsis "Python extension wrapping the ICU C++ API")
1301 (description
1302 "PyICU is a python extension wrapping the ICU C++ API.")
1303 (license license:x11)))
1304
1305 (define-public python2-pyicu
1306 (package-with-python2 python-pyicu))
1307
1308 (define-public python2-dogtail
1309 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1310 ;; spaces in indentation" with Python 3.
1311 (package
1312 (name "python2-dogtail")
1313 (version "0.8.2")
1314 (source (origin
1315 (method url-fetch)
1316 (uri (string-append
1317 "https://fedorahosted.org/released/dogtail/dogtail-"
1318 version ".tar.gz"))
1319 (sha256
1320 (base32
1321 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1322 (build-system python-build-system)
1323 (arguments `(#:python ,python-2
1324 #:tests? #f)) ; invalid command "test"
1325 (home-page "https://fedorahosted.org/dogtail/")
1326 (synopsis "GUI test tool and automation framework written in ​Python")
1327 (description
1328 "Dogtail is a GUI test tool and automation framework written in Python.
1329 It uses Accessibility (a11y) technologies to communicate with desktop
1330 applications. dogtail scripts are written in Python and executed like any
1331 other Python program.")
1332 (license license:gpl2+)))
1333
1334 (define-public python2-empy
1335 (package
1336 (name "python2-empy")
1337 (version "3.3")
1338 (source (origin
1339 (method url-fetch)
1340 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1345 (build-system python-build-system)
1346 (arguments
1347 `(#:python ,python-2
1348 #:phases (alist-replace
1349 'check
1350 (lambda _
1351 (zero? (system* "./test.sh")))
1352 %standard-phases)))
1353 (home-page "http://www.alcyone.com/software/empy/")
1354 (synopsis "Templating system for Python")
1355 (description
1356 "EmPy is a system for embedding Python expressions and statements in
1357 template text; it takes an EmPy source file, processes it, and produces
1358 output. This is accomplished via expansions, which are special signals to the
1359 EmPy system and are set off by a special prefix (by default the at sign, @@).
1360 EmPy can expand arbitrary Python expressions and statements in this way, as
1361 well as a variety of special forms. Textual data not explicitly delimited in
1362 this way is sent unaffected to the output, allowing Python to be used in
1363 effect as a markup language. Also supported are callbacks via hooks,
1364 recording and playback via diversions, and dynamic, chainable filters. The
1365 system is highly configurable via command line options and embedded
1366 commands.")
1367 (license license:lgpl2.1+)))
1368
1369 (define-public python2-element-tree
1370 (package
1371 (name "python2-element-tree")
1372 (version "1.2.6")
1373 (source (origin
1374 (method url-fetch)
1375 (uri (string-append
1376 "http://effbot.org/media/downloads/elementtree-"
1377 version "-20050316.tar.gz"))
1378 (sha256
1379 (base32
1380 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1381 (build-system python-build-system)
1382 (arguments
1383 `(#:python ,python-2 ; seems to be part of Python 3
1384 #:tests? #f)) ; no 'test' sub-command
1385 (synopsis "Toolkit for XML processing in Python")
1386 (description
1387 "ElementTree is a Python library supporting lightweight XML processing.")
1388 (home-page "http://effbot.org/zone/element-index.htm")
1389 (license (license:x11-style
1390 "http://docs.python.org/2/license.html"
1391 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1392
1393 (define-public python2-pybugz
1394 (package
1395 (name "python2-pybugz")
1396 (version "0.6.11")
1397 (source (origin
1398 (method url-fetch)
1399 (uri (string-append
1400 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1401 version ".tar.gz"))
1402 (sha256
1403 (base32
1404 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1405 (patches (search-patches "pybugz-stty.patch"
1406 "pybugz-encode-error.patch"))))
1407 (build-system python-build-system)
1408 (arguments
1409 `(#:python ,python-2 ; SyntaxError with Python 3
1410 #:tests? #f)) ; no 'test' sub-command
1411 (propagated-inputs
1412 `(("element-tree" ,python2-element-tree)))
1413 (synopsis "Python and command-line interface to Bugzilla")
1414 (description
1415 "PyBugz is a Python library and command-line tool to query the Bugzilla
1416 bug tracking system. It is meant as an aid to speed up interaction with the
1417 bug tracker.")
1418 (home-page "http://www.liquidx.net/pybugz/")
1419 (license license:gpl2)))
1420
1421 (define-public python-enum34
1422 (package
1423 (name "python-enum34")
1424 (version "1.1.0")
1425 (source
1426 (origin
1427 (method url-fetch)
1428 (uri (pypi-uri "enum34" version))
1429 (sha256
1430 (base32
1431 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1432 (build-system python-build-system)
1433 (arguments
1434 `(#:phases
1435 (alist-replace
1436 'check
1437 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1438 %standard-phases)))
1439 (home-page "https://pypi.python.org/pypi/enum34")
1440 (synopsis "Backported Python 3.4 Enum")
1441 (description
1442 "Enum34 is the new Python stdlib enum module available in Python 3.4
1443 backported for previous versions of Python from 2.4 to 3.3.")
1444 (license license:bsd-3)))
1445
1446 (define-public python2-enum34
1447 (package-with-python2 python-enum34))
1448
1449 (define-public python-parse-type
1450 (package
1451 (name "python-parse-type")
1452 (version "0.3.4")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (string-append "https://pypi.python.org/packages/source/p/"
1457 "parse_type/parse_type-" version ".tar.gz"))
1458 (sha256
1459 (base32
1460 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1461 (build-system python-build-system)
1462 (propagated-inputs
1463 `(("python-six" ,python-six)
1464 ("python-parse" ,python-parse)))
1465 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1466 (home-page "https://github.com/jenisys/parse_type")
1467 (synopsis "Extended parse module")
1468 (description
1469 "Parse_type extends the python parse module.")
1470 (license license:bsd-3)))
1471
1472 (define-public python-parse
1473 (package
1474 (name "python-parse")
1475 (version "1.6.6")
1476 (source
1477 (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "parse" version))
1480 (sha256
1481 (base32
1482 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1483 (patches (search-patches "python-parse-too-many-fields.patch"))))
1484 (build-system python-build-system)
1485 (arguments
1486 `(#:phases
1487 (modify-phases %standard-phases
1488 (replace 'check
1489 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1490 (home-page "https://github.com/r1chardj0n3s/parse")
1491 (synopsis "Parse strings")
1492 (description
1493 "Parse strings using a specification based on the Python format()
1494 syntax.")
1495 (license license:x11)))
1496
1497 (define-public python-polib
1498 (package
1499 (name "python-polib")
1500 (version "1.0.8")
1501 (source (origin
1502 (method url-fetch)
1503 (uri (pypi-uri "polib" version))
1504 (sha256
1505 (base32
1506 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1507 (build-system python-build-system)
1508 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1509 (synopsis "Manipulate, create and modify gettext files")
1510 (description "Polib can manipulate any gettext format (po, pot and mo)
1511 files. It can be used to create po files from scratch or to modify
1512 existing ones.")
1513 (license license:expat)))
1514
1515 (define-public python2-polib
1516 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1517 (package
1518 (inherit base)
1519 (arguments `(,@(package-arguments base)
1520 ;; Tests don't work with python2.
1521 #:tests? #f)))))
1522
1523 (define-public scons
1524 (package
1525 (name "scons")
1526 (version "2.3.4")
1527 (source (origin
1528 (method url-fetch)
1529 (uri (string-append "mirror://sourceforge/scons/scons/" version
1530 "/scons-" version ".tar.gz"))
1531 (sha256
1532 (base32
1533 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1534 (build-system python-build-system)
1535 (arguments
1536 ;; With Python 3.x, fails to build with a syntax error.
1537 `(#:python ,python-2
1538 #:use-setuptools? #f ; still relies on distutils
1539 #:tests? #f)) ; no 'python setup.py test' command
1540 (home-page "http://scons.org/")
1541 (synopsis "Software construction tool written in Python")
1542 (description
1543 "SCons is a software construction tool. Think of SCons as an improved,
1544 cross-platform substitute for the classic Make utility with integrated
1545 functionality similar to autoconf/automake and compiler caches such as ccache.
1546 In short, SCons is an easier, more reliable and faster way to build
1547 software.")
1548 (license license:x11)))
1549
1550 (define-public python-extras
1551 (package
1552 (name "python-extras")
1553 (version "0.0.3")
1554 (source
1555 (origin
1556 (method url-fetch)
1557 (uri (string-append
1558 "https://pypi.python.org/packages/source/e/extras/extras-"
1559 version ".tar.gz"))
1560 (sha256
1561 (base32
1562 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1563 (build-system python-build-system)
1564 (arguments
1565 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1566 '(#:tests? #f))
1567 (home-page "https://github.com/testing-cabal/extras")
1568 (synopsis "Useful extensions to the Python standard library")
1569 (description
1570 "Extras is a set of extensions to the Python standard library.")
1571 (license license:expat)))
1572
1573 (define-public python2-extras
1574 (package-with-python2 python-extras))
1575
1576 (define-public python-mimeparse
1577 (package
1578 (name "python-mimeparse")
1579 (version "0.1.4")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (string-append
1584 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1585 version ".tar.gz"))
1586 (sha256
1587 (base32
1588 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1589 (build-system python-build-system)
1590 (arguments
1591 '(#:tests? #f)) ; no setup.py test command
1592 (home-page
1593 "https://github.com/dbtsai/python-mimeparse")
1594 (synopsis "Python library for parsing MIME types")
1595 (description
1596 "Mimeparse provides basic functions for parsing MIME type names and
1597 matching them against a list of media-ranges.")
1598 (license license:expat)))
1599
1600 (define-public python2-mimeparse
1601 (package-with-python2 python-mimeparse))
1602
1603 (define-public python-nose
1604 (package
1605 (name "python-nose")
1606 (version "1.3.7")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "nose" version))
1611 (sha256
1612 (base32
1613 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1614 (build-system python-build-system)
1615 (arguments
1616 '(#:tests? #f)) ; FIXME: test suite fails
1617 (home-page "http://readthedocs.org/docs/nose/")
1618 (synopsis "Python testing library")
1619 (description
1620 "Nose extends the unittest library to make testing easier.")
1621 (license license:lgpl2.0+)))
1622
1623 (define-public python2-nose
1624 (package-with-python2 python-nose))
1625
1626 (define-public python-nose2
1627 (package
1628 (name "python-nose2")
1629 (version "0.6.5")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "nose2" version))
1634 (sha256
1635 (base32
1636 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1637 (build-system python-build-system)
1638 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1639 (propagated-inputs
1640 `(("python-cov-core" ,python-cov-core)
1641 ("python-pytest-cov" ,python-pytest-cov)
1642 ("python-six" ,python-six)))
1643 (home-page "https://github.com/nose-devs/nose2")
1644 (synopsis "Next generation of nicer testing for Python")
1645 (description
1646 "Nose2 is the next generation of nicer testing for Python, based on the
1647 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1648 better plugin api, being easier for users to configure, and simplifying internal
1649 interfaces and processes.")
1650 (license license:bsd-2)))
1651
1652 (define-public python2-nose2
1653 (package-with-python2 python-nose2))
1654
1655 (define-public python-unittest2
1656 (package
1657 (name "python-unittest2")
1658 (version "0.5.1")
1659 (source
1660 (origin
1661 (method url-fetch)
1662 (uri (string-append
1663 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1664 version ".tar.gz"))
1665 (sha256
1666 (base32
1667 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1668 (build-system python-build-system)
1669 (home-page "http://pypi.python.org/pypi/unittest2")
1670 (synopsis "Python unit testing library")
1671 (description
1672 "Unittest2 is a replacement for the unittest module in the Python
1673 standard library.")
1674 (license license:psfl)))
1675
1676 (define-public python2-unittest2
1677 (package (inherit python-unittest2)
1678 (name "python2-unittest2")
1679 (version "0.5.1")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (string-append
1684 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1685 version ".tar.gz"))
1686 (sha256
1687 (base32
1688 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1689 (arguments
1690 `(#:python ,python-2
1691 #:tests? #f)))) ; no setup.py test command
1692
1693 (define-public python-pafy
1694 (package
1695 (name "python-pafy")
1696 (version "0.5.2")
1697 (source
1698 (origin
1699 (method url-fetch)
1700 (uri (pypi-uri "pafy" version))
1701 (sha256
1702 (base32
1703 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1704 (build-system python-build-system)
1705 (arguments
1706 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1707 (propagated-inputs
1708 ;; Youtube-dl is a python package which is imported in the file
1709 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1710 `(("youtube-dl" ,youtube-dl)))
1711 (home-page "https://np1.github.io/pafy/")
1712 (synopsis "Retrieve YouTube content and metadata")
1713 (description
1714 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1715 (license license:lgpl3+)))
1716
1717 (define-public python-py
1718 (package
1719 (name "python-py")
1720 (version "1.4.31")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (pypi-uri "py" version))
1725 (sha256
1726 (base32
1727 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1728 (build-system python-build-system)
1729 (home-page "http://pylib.readthedocs.org/")
1730 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1731 (description
1732 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1733 code introspection, and logging.")
1734 (license license:expat)))
1735
1736 (define-public python2-py
1737 (package-with-python2 python-py))
1738
1739 (define-public python-pytest
1740 (package
1741 (name "python-pytest")
1742 (version "2.7.3")
1743 (source
1744 (origin
1745 (method url-fetch)
1746 (uri (string-append
1747 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1748 version ".tar.gz"))
1749 (sha256
1750 (base32
1751 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1752 (modules '((guix build utils)))
1753 (snippet
1754 ;; One of the tests involves the /usr directory, so it fails.
1755 '(substitute* "testing/test_argcomplete.py"
1756 (("def test_remove_dir_prefix\\(self\\):")
1757 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1758 (build-system python-build-system)
1759 (propagated-inputs
1760 `(("python-py" ,python-py)))
1761 (native-inputs
1762 `(("python-nose" ,python-nose)
1763 ("python-mock" ,python-mock)))
1764 (home-page "http://pytest.org")
1765 (synopsis "Python testing library")
1766 (description
1767 "Pytest is a testing tool that provides auto-discovery of test modules
1768 and functions, detailed info on failing assert statements, modular fixtures,
1769 and many external plugins.")
1770 (license license:expat)))
1771
1772 (define-public python2-pytest
1773 (package-with-python2 python-pytest))
1774
1775 ;; This package is used by Borg until we can upgrade all our Python packages to
1776 ;; use a more recent pytest.
1777 (define-public python-pytest-2.9.2
1778 (package
1779 (inherit python-pytest)
1780 (name "python-pytest")
1781 (version "2.9.2")
1782 (source (origin
1783 (method url-fetch)
1784 (uri (pypi-uri "pytest" version))
1785 (sha256
1786 (base32
1787 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1788 (arguments
1789 `(#:phases
1790 (modify-phases %standard-phases
1791 (add-before 'check 'disable-invalid-test
1792 (lambda _
1793 (substitute* "testing/test_argcomplete.py"
1794 (("def test_remove_dir_prefix" line)
1795 (string-append "@pytest.mark.skip"
1796 "(reason=\"Assumes that /usr exists.\")\n "
1797 line)))
1798 #t)))))))
1799
1800 (define-public python-pytest-cov
1801 (package
1802 (name "python-pytest-cov")
1803 (version "2.2.1")
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "pytest-cov" version))
1808 (sha256
1809 (base32
1810 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1811 (build-system python-build-system)
1812 (arguments
1813 `(#:phases
1814 (modify-phases %standard-phases
1815 (replace 'check
1816 (lambda _
1817 ;; options taken from tox.ini
1818 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1819 ;; with "Duplicate implicit target name"
1820 (zero? (system* "python" "./setup.py" "check"
1821 "--strict" "--metadata")))))))
1822 (propagated-inputs
1823 `(("python-coverage" ,python-coverage)
1824 ("python-pytest" ,python-pytest)))
1825 (home-page "https://github.com/pytest-dev/pytest-cov")
1826 (synopsis "Pytest plugin for measuring coverage")
1827 (description
1828 "Pytest-cov produces coverage reports. It supports centralised testing and
1829 distributed testing in both @code{load} and @code{each} modes. It also
1830 supports coverage of subprocesses.")
1831 (license license:expat)))
1832
1833 (define-public python2-pytest-cov
1834 (package-with-python2 python-pytest-cov))
1835
1836 (define-public python-pytest-runner
1837 (package
1838 (name "python-pytest-runner")
1839 (version "2.6.2")
1840 (source
1841 (origin
1842 (method url-fetch)
1843 (uri (pypi-uri "pytest-runner" version))
1844 (sha256
1845 (base32
1846 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1847 (build-system python-build-system)
1848 (arguments
1849 `(#:phases
1850 (modify-phases %standard-phases
1851 ;; The fancy way of setting the version with setuptools_scm does not
1852 ;; seem to work here.
1853 (add-after 'unpack 'set-version
1854 (lambda _
1855 (substitute* "docs/conf.py"
1856 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1857 (string-append "version = \"" ,version "\"")))
1858 #t)))))
1859 (native-inputs
1860 `(("python-pytest" ,python-pytest)
1861 ("python-setuptools-scm" ,python-setuptools-scm)))
1862 (home-page "https://github.com/pytest-dev/pytest-runner")
1863 (synopsis "Invoke py.test as a distutils command")
1864 (description
1865 "This package provides a @command{pytest-runner} command that
1866 @file{setup.py} files can use to run tests.")
1867 (license license:expat)))
1868
1869 (define-public python2-pytest-runner
1870 (package-with-python2 python-pytest-runner))
1871
1872 (define-public python-pytest-mock
1873 (package
1874 (name "python-pytest-mock")
1875 (version "1.2")
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "pytest-mock" version ".zip"))
1880 (sha256
1881 (base32
1882 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1883 (build-system python-build-system)
1884 (native-inputs
1885 `(("unzip" ,unzip)))
1886 (propagated-inputs
1887 `(("python-pytest" ,python-pytest)))
1888 (home-page "https://github.com/pytest-dev/pytest-mock/")
1889 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1890 (description
1891 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1892 around the patching API provided by the @code{mock} package, but with the
1893 benefit of not having to worry about undoing patches at the end of a test.
1894 The mocker fixture has the same API as @code{mock.patch}, supporting the
1895 same arguments.")
1896 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1897 (license license:expat)))
1898
1899 (define-public python2-pytest-mock
1900 (let ((base (package-with-python2
1901 (strip-python2-variant python-pytest-mock))))
1902 (package (inherit base)
1903 (propagated-inputs
1904 `(("python2-mock" ,python2-mock)
1905 ,@(package-propagated-inputs base))))))
1906
1907 (define-public python-pytest-xdist
1908 (package
1909 (name "python-pytest-xdist")
1910 (version "1.14")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "pytest-xdist" version ".zip"))
1915 (sha256
1916 (base32
1917 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1918 (modules '((guix build utils)))
1919 (snippet
1920 '(begin
1921 ;; Remove pre-compiled .pyc files from source.
1922 (for-each delete-file-recursively
1923 (find-files "." "__pycache__" #:directories? #t))
1924 (for-each delete-file (find-files "." "\\.pyc$"))
1925 #t))))
1926 (build-system python-build-system)
1927 (native-inputs
1928 `(("unzip" ,unzip)
1929 ("python-setuptools-scm" ,python-setuptools-scm)))
1930 (propagated-inputs
1931 `(("python-execnet" ,python-execnet)
1932 ("python-pytest" ,python-pytest)
1933 ("python-py" ,python-py)))
1934 (home-page
1935 "https://github.com/pytest-dev/pytest-xdist")
1936 (synopsis
1937 "Plugin for py.test with distributed testing and loop-on-failing modes")
1938 (description
1939 "The pytest-xdist plugin extends py.test with some unique test execution
1940 modes: parallelization, running tests in boxed subprocesses, the ability
1941 to run tests repeatedly when failed, and the ability to run tests on multiple
1942 Python interpreters or platforms. It uses rsync to copy the existing
1943 program code to a remote location, executes there, and then syncs the
1944 result back.")
1945 (license license:expat)))
1946
1947 (define-public python2-pytest-xdist
1948 (package-with-python2 python-pytest-xdist))
1949
1950 (define-public python-scripttest
1951 (package
1952 (name "python-scripttest")
1953 (version "1.3")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (string-append
1958 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1959 version ".tar.gz"))
1960 (sha256
1961 (base32
1962 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1963 (build-system python-build-system)
1964 (native-inputs
1965 `(("python-pytest" ,python-pytest)))
1966 (home-page "http://pythonpaste.org/scripttest/")
1967 (synopsis "Python library to test command-line scripts")
1968 (description "Scripttest is a Python helper library for testing
1969 interactive command-line applications. With it you can run a script in a
1970 subprocess and see the output as well as any file modifications.")
1971 (license license:expat)))
1972
1973 (define-public python2-scripttest
1974 (package-with-python2 python-scripttest))
1975
1976 (define-public python-testtools
1977 (package
1978 (name "python-testtools")
1979 (version "1.0.0")
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (string-append
1984 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1985 version ".tar.gz"))
1986 (sha256
1987 (base32
1988 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1989 (build-system python-build-system)
1990 (propagated-inputs
1991 `(("python-mimeparse" ,python-mimeparse)
1992 ("python-extras" ,python-extras)))
1993 (home-page "https://github.com/testing-cabal/testtools")
1994 (synopsis
1995 "Extensions to the Python standard library unit testing framework")
1996 (description
1997 "Testtools extends the Python standard library unit testing framework to
1998 provide matchers, more debugging information, and cross-Python
1999 compatibility.")
2000 (license license:psfl)))
2001
2002 (define-public python2-testtools
2003 (package-with-python2 python-testtools))
2004
2005 (define-public python-testscenarios
2006 (package
2007 (name "python-testscenarios")
2008 (version "0.4")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (string-append
2013 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2014 version ".tar.gz"))
2015 (sha256
2016 (base32
2017 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2018 (build-system python-build-system)
2019 (propagated-inputs
2020 `(("python-testtools" ,python-testtools)))
2021 (home-page "https://launchpad.net/testscenarios")
2022 (synopsis "Pyunit extension for dependency injection")
2023 (description
2024 "Testscenarios provides clean dependency injection for Python unittest
2025 style tests.")
2026 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2027
2028 (define-public python2-testscenarios
2029 (package-with-python2 python-testscenarios))
2030
2031 (define-public python-testresources
2032 (package
2033 (name "python-testresources")
2034 (version "0.2.7")
2035 (source
2036 (origin
2037 (method url-fetch)
2038 (uri (string-append
2039 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2040 version ".tar.gz"))
2041 (sha256
2042 (base32
2043 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2044 (build-system python-build-system)
2045 (home-page "https://launchpad.net/testresources")
2046 (synopsis
2047 "Pyunit extension for managing test resources")
2048 (description
2049 "Testresources is an extension to Python's unittest to allow declarative
2050 use of resources by test cases.")
2051 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2052
2053 (define-public python2-testresources
2054 (package-with-python2 python-testresources))
2055
2056 (define-public python-subunit
2057 (package
2058 (name "python-subunit")
2059 (version "0.0.21")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (string-append
2064 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2065 version ".tar.gz"))
2066 (sha256
2067 (base32
2068 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2069 (build-system python-build-system)
2070 (propagated-inputs
2071 `(("python-extras" ,python-extras)
2072 ("python-mimeparse" ,python-mimeparse)))
2073 (native-inputs
2074 `(("python-testscenarios" ,python-testscenarios)))
2075 (home-page "http://launchpad.net/subunit")
2076 (synopsis "Python implementation of the subunit protocol")
2077 (description
2078 "Python-subunit is a Python implementation of the subunit test streaming
2079 protocol.")
2080 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2081
2082 (define-public python2-subunit
2083 (package-with-python2 python-subunit))
2084
2085 ;; Recent versions of python-fixtures and python-testrepository need
2086 ;; python-pbr for packaging, which itself needs these two packages for
2087 ;; testing.
2088 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2089 ;; same source, just without any test dependencies and with tests disabled.
2090 ;; python-pbr-minmal is then used to package python-fixtures and
2091 ;; python-testrepository.
2092 ;; Strictly speaking we currently could remove the test-requirements from the
2093 ;; normal python-pbr package (and save this package) since test are disabled
2094 ;; there anyway. But this may change in future.
2095 (define python-pbr-minimal
2096 (package
2097 (name "python-pbr-minimal")
2098 (version "1.8.1")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (pypi-uri "pbr" version))
2103 (sha256
2104 (base32
2105 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2106 (build-system python-build-system)
2107 (arguments
2108 `(#:tests? #f))
2109 (home-page "http://docs.openstack.org/developer/pbr/")
2110 (synopsis "Minimal build of python-pbr used for bootstrapping")
2111 (description
2112 "Used only for bootstrapping python2-pbr, you should not need this.")
2113 (license license:asl2.0)))
2114
2115 (define python2-pbr-minimal
2116 (package-with-python2 python-pbr-minimal))
2117
2118 (define-public python-pbr
2119 (package
2120 (inherit python-pbr-minimal)
2121 (name "python-pbr")
2122 (arguments
2123 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2124 (propagated-inputs
2125 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2126 (native-inputs
2127 `(("python-fixtures" ,python-fixtures)
2128 ;; discover, coverage, hacking, subunit
2129 ("python-mock" ,python-mock)
2130 ("python-six" ,python-six)
2131 ("python-sphinx" ,python-sphinx)
2132 ("python-testrepository" ,python-testrepository)
2133 ("python-testresources" ,python-testresources)
2134 ("python-testscenarios" ,python-testscenarios)
2135 ("python-testtools" ,python-testtools)
2136 ("python-virtualenv" ,python-virtualenv)))
2137 (synopsis "Enhance the default behavior of Python’s setuptools")
2138 (description
2139 "Python Build Reasonableness (PBR) is a library that injects some useful
2140 and sensible default behaviors into your setuptools run. It will set
2141 versions, process requirements files and generate AUTHORS and ChangeLog file
2142 from git information.
2143 ")))
2144
2145 (define-public python2-pbr
2146 (package-with-python2 python-pbr))
2147
2148 (define-public python-fixtures
2149 (package
2150 (name "python-fixtures")
2151 (version "1.4.0")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "fixtures" version))
2156 (sha256
2157 (base32
2158 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2159 (build-system python-build-system)
2160 (propagated-inputs
2161 `(("python-six" ,python-six)))
2162 (native-inputs
2163 `(("python-pbr-minimal" ,python-pbr-minimal)
2164 ("python-testtools" ,python-testtools)))
2165 (home-page "https://launchpad.net/python-fixtures")
2166 (synopsis "Python test fixture library")
2167 (description
2168 "Fixtures provides a way to create reusable state, useful when writing
2169 Python tests.")
2170 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2171
2172 (define-public python2-fixtures
2173 (package-with-python2 python-fixtures))
2174
2175 (define-public python-testrepository
2176 (package
2177 (name "python-testrepository")
2178 (version "0.0.20")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (string-append
2183 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2184 version ".tar.gz"))
2185 (sha256
2186 (base32
2187 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2188 (build-system python-build-system)
2189 (propagated-inputs
2190 `(("python-fixtures" ,python-fixtures)
2191 ("python-subunit" ,python-subunit)
2192 ("python-testtools" ,python-testtools)))
2193 (native-inputs
2194 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2195 ("python-mimeparse" ,python-mimeparse)))
2196 (home-page "https://launchpad.net/testrepository")
2197 (synopsis "Database for Python test results")
2198 (description "Testrepository provides a database of test results which can
2199 be used as part of a developer's workflow to check things such as what tests
2200 have failed since the last commit or what tests are currently failing.")
2201 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2202
2203 (define-public python2-testrepository
2204 (package-with-python2 python-testrepository))
2205
2206 (define-public python-coverage
2207 (package
2208 (name "python-coverage")
2209 (version "4.1")
2210 (source
2211 (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "coverage" version))
2214 (sha256
2215 (base32
2216 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2217 (build-system python-build-system)
2218 (home-page "http://nedbatchelder.com/code/coverage")
2219 (synopsis "Code coverage measurement for Python")
2220 (description
2221 "Coverage measures code coverage, typically during test execution. It
2222 uses the code analysis tools and tracing hooks provided in the Python standard
2223 library to determine which lines are executable, and which have been
2224 executed.")
2225 (license license:bsd-3)))
2226
2227 (define-public python2-coverage
2228 (package-with-python2 python-coverage))
2229
2230 (define-public python-cov-core
2231 (package
2232 (name "python-cov-core")
2233 (version "1.15.0")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "cov-core" version))
2238 (sha256
2239 (base32
2240 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2241 (build-system python-build-system)
2242 (propagated-inputs
2243 `(("python-coverage" ,python-coverage)))
2244 (home-page "https://github.com/schlamar/cov-core")
2245 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2246 (description
2247 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2248 It is useful for developing coverage plugins for these testing frameworks.")
2249 (license license:expat)))
2250
2251 (define-public python2-cov-core
2252 (package-with-python2 python-cov-core))
2253
2254 (define-public python-discover
2255 (package
2256 (name "python-discover")
2257 (version "0.4.0")
2258 (source
2259 (origin
2260 (method url-fetch)
2261 (uri (string-append
2262 "https://pypi.python.org/packages/source/d/discover/discover-"
2263 version ".tar.gz"))
2264 (sha256
2265 (base32
2266 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2267 (build-system python-build-system)
2268 (home-page "http://pypi.python.org/pypi/discover/")
2269 (synopsis
2270 "Python test discovery for unittest")
2271 (description
2272 "Discover provides test discovery for unittest, a feature that has been
2273 backported from Python 2.7 for Python 2.4+.")
2274 (license license:bsd-3)))
2275
2276 (define-public python2-discover
2277 (package-with-python2 python-discover))
2278
2279 (define-public behave
2280 (package
2281 (name "behave")
2282 (version "1.2.5")
2283 (source (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "behave" version ".tar.bz2"))
2286 (sha256
2287 (base32
2288 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2289 (build-system python-build-system)
2290 (propagated-inputs
2291 `(("python-six" ,python-six)
2292 ("python-parse" ,python-parse)
2293 ("python-parse-type" ,python-parse-type)))
2294 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2295 ;PyHamcrest>=1.8
2296 (home-page "http://github.com/behave/behave")
2297 (synopsis "Python behavior-driven development")
2298 (description
2299 "Behave is a tool for behavior-driven development in python.
2300 Behavior-driven development (or BDD) is an agile software development
2301 technique that encourages collaboration between developers, QA and
2302 non-technical or business participants in a software project. Behave uses
2303 tests written in a natural language style, backed up by Python code.")
2304 (license license:x11)))
2305
2306 (define-public python-exif-read
2307 (package
2308 (name "python-exif-read")
2309 (version "2.1.2")
2310 (source (origin
2311 (method url-fetch)
2312 (uri (pypi-uri "ExifRead" version))
2313 (sha256
2314 (base32
2315 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2316 (build-system python-build-system)
2317 (arguments `(#:tests? #f)) ; no tests
2318 (home-page "https://github.com/ianare/exif-py")
2319 (synopsis "Python library to extract EXIF data from image files")
2320 (description
2321 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2322 files.")
2323 (license license:bsd-3)))
2324
2325 (define-public python2-exif-read
2326 (package-with-python2 python-exif-read))
2327
2328 (define-public python-pyld
2329 (package
2330 (name "python-pyld")
2331 (version "0.7.1")
2332 (source (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "PyLD" version))
2335 (sha256
2336 (base32
2337 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2338 (build-system python-build-system)
2339 (arguments `(#:tests? #f)) ; no tests
2340 (home-page "http://github.com/digitalbazaar/pyld")
2341 (synopsis "Python implementation of the JSON-LD specification")
2342 (description
2343 "PyLD is an implementation of the JSON-LD specification.")
2344 (license license:bsd-3)))
2345
2346 (define-public python2-pyld
2347 (package-with-python2 python-pyld))
2348
2349 (define-public python-certifi
2350 (package
2351 (name "python-certifi")
2352 (version "2016.8.31")
2353 (source (origin
2354 (method url-fetch)
2355 (uri (pypi-uri "certifi" version))
2356 (sha256
2357 (base32
2358 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2359 (build-system python-build-system)
2360 (arguments `(#:tests? #f)) ; no tests
2361 (home-page "http://python-requests.org/")
2362 (synopsis "Python CA certificate bundle")
2363 (description
2364 "Certifi is a Python library that contains a CA certificate bundle, which
2365 is used by the Requests library to verify HTTPS requests.")
2366 (license license:asl2.0)))
2367
2368 (define-public python2-certifi
2369 (package-with-python2 python-certifi))
2370
2371 (define-public python-click
2372 (package
2373 (name "python-click")
2374 (version "6.6")
2375 (source
2376 (origin
2377 (method url-fetch)
2378 (uri (pypi-uri "click" version))
2379 (sha256
2380 (base32
2381 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2382 (build-system python-build-system)
2383 (arguments
2384 `(#:phases
2385 (modify-phases %standard-phases
2386 (add-after 'unpack 'fix-paths
2387 (lambda* (#:key inputs #:allow-other-keys)
2388 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2389 "cross-libc" "libc"))))
2390 (substitute* "click/_unicodefun.py"
2391 (("'locale'")
2392 (string-append "'" glibc "/bin/locale'"))))
2393 #t)))))
2394 (home-page "http://click.pocoo.org")
2395 (synopsis "Command line library for Python")
2396 (description
2397 "Click is a Python package for creating command line interfaces in a
2398 composable way with as little code as necessary. Its name stands for
2399 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2400 with sensible defaults out of the box.")
2401 (license license:bsd-3)))
2402
2403 (define-public python2-click
2404 (package-with-python2 python-click))
2405
2406 (define-public python-wheel
2407 (package
2408 (name "python-wheel")
2409 (version "0.29.0")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "wheel" version))
2414 (sha256
2415 (base32
2416 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2417 (build-system python-build-system)
2418 (native-inputs
2419 `(("python-jsonschema" ,python-jsonschema)
2420 ("python-pytest-cov" ,python-pytest-cov)))
2421 (home-page "https://bitbucket.org/pypa/wheel/")
2422 (synopsis "Format for built Python packages")
2423 (description
2424 "A wheel is a ZIP-format archive with a specially formatted filename and
2425 the @code{.whl} extension. It is designed to contain all the files for a PEP
2426 376 compatible install in a way that is very close to the on-disk format. Many
2427 packages will be properly installed with only the @code{Unpack} step and the
2428 unpacked archive preserves enough information to @code{Spread} (copy data and
2429 scripts to their final locations) at any later time. Wheel files can be
2430 installed with a newer @code{pip} or with wheel's own command line utility.")
2431 (license license:expat)
2432 (properties `((python2-variant . ,(delay python2-wheel))))))
2433
2434 (define-public python2-wheel
2435 (let ((wheel (package-with-python2
2436 (strip-python2-variant python-wheel))))
2437 (package (inherit wheel)
2438 (native-inputs `(("python2-functools32" ,python2-functools32)
2439 ,@(package-native-inputs wheel))))))
2440
2441
2442 (define-public python-requests
2443 (package
2444 (name "python-requests")
2445 (version "2.9.1")
2446 (source (origin
2447 (method url-fetch)
2448 (uri (pypi-uri "requests" version))
2449 (sha256
2450 (base32
2451 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2452 (build-system python-build-system)
2453 (native-inputs
2454 `(("python-py" ,python-py)
2455 ("python-pytest" ,python-pytest)
2456 ("python-pytest-cov" ,python-pytest-cov)
2457 ("python-wheel" ,python-wheel)))
2458 (home-page "http://python-requests.org/")
2459 (synopsis "Python HTTP library")
2460 (description
2461 "Requests is a Python HTTP client library. It aims to be easier to use
2462 than Python’s urllib2 library.")
2463 (license license:asl2.0)))
2464
2465 ;; Some software requires an older version of Requests, notably Docker
2466 ;; Compose.
2467 (define-public python-requests-2.7
2468 (package (inherit python-requests)
2469 (version "2.7.0")
2470 (source (origin
2471 (method url-fetch)
2472 (uri (pypi-uri "requests" version))
2473 (sha256
2474 (base32
2475 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2476
2477 (define-public python2-requests
2478 (package-with-python2 python-requests))
2479
2480 (define-public python-vcversioner
2481 (package
2482 (name "python-vcversioner")
2483 (version "2.16.0.0")
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "vcversioner" version))
2488 (sha256
2489 (base32
2490 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2491 (build-system python-build-system)
2492 (synopsis "Python library for version number discovery")
2493 (description "Vcversioner is a Python library that inspects tagging
2494 information in a variety of version control systems in order to discover
2495 version numbers.")
2496 (home-page "https://github.com/habnabit/vcversioner")
2497 (license license:isc)))
2498
2499 (define-public python2-vcversioner
2500 (package-with-python2 python-vcversioner))
2501
2502 (define-public python-jsonschema
2503 (package
2504 (name "python-jsonschema")
2505 (version "2.5.1")
2506 (source (origin
2507 (method url-fetch)
2508 (uri
2509 (string-append
2510 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2511 version ".tar.gz"))
2512 (sha256
2513 (base32
2514 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2515 (build-system python-build-system)
2516 (arguments
2517 '(#:phases
2518 (modify-phases %standard-phases
2519 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2520 (native-inputs
2521 `(("python-nose" ,python-nose)
2522 ("python-vcversioner" ,python-vcversioner)))
2523 (home-page "https://github.com/Julian/jsonschema")
2524 (synopsis "Implementation of JSON Schema for Python")
2525 (description
2526 "Jsonschema is an implementation of JSON Schema for Python.")
2527 (license license:expat)
2528 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2529
2530 (define-public python2-jsonschema
2531 (let ((jsonschema (package-with-python2
2532 (strip-python2-variant python-jsonschema))))
2533 (package (inherit jsonschema)
2534 (native-inputs
2535 `(("python2-mock" ,python2-mock)
2536 ,@(package-native-inputs jsonschema)))
2537 (propagated-inputs
2538 `(("python2-functools32" ,python2-functools32))))))
2539
2540 (define-public python-kitchen
2541 (package
2542 (name "python-kitchen")
2543 (version "1.2.4")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (pypi-uri "kitchen" version))
2548 (sha256
2549 (base32
2550 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2551 (build-system python-build-system)
2552 (propagated-inputs
2553 `(("python-chardet" ,python-chardet)))
2554 (home-page "https://fedorahosted.org/kitchen")
2555 (synopsis "Python API for snippets")
2556 (description "@code{kitchen} module provides a python API for all sorts of
2557 little useful snippets of code that everybody ends up writing for their projects
2558 but never seem big enough to build an independent release. Use kitchen and stop
2559 cutting and pasting that code over and over.")
2560 (license (list license:lgpl2.1+
2561 ;; subprocess.py, test_subprocess.py,
2562 ;; kitchen/pycompat25/defaultdict.py:
2563 license:psfl))))
2564
2565 (define-public python2-kitchen
2566 (package-with-python2 python-kitchen))
2567
2568 (define-public python-unidecode
2569 (package
2570 (name "python-unidecode")
2571 (version "0.04.18")
2572 (source (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "Unidecode" version))
2575 (sha256
2576 (base32
2577 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2578 (build-system python-build-system)
2579 (home-page "https://pypi.python.org/pypi/Unidecode")
2580 (synopsis "ASCII transliterations of Unicode text")
2581 (description
2582 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2583 useful when integrating with legacy code that doesn't support Unicode, or for
2584 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2585 machine identifiers from human-readable Unicode strings that should still be
2586 somewhat intelligeble.")
2587 (license license:gpl2+)))
2588
2589 (define-public python2-unidecode
2590 (package-with-python2 python-unidecode))
2591
2592 (define-public python-pyjwt
2593 (package
2594 (name "python-pyjwt")
2595 (version "1.4.0")
2596 (source
2597 (origin
2598 (method url-fetch)
2599 (uri (pypi-uri "PyJWT" version))
2600 (sha256
2601 (base32
2602 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2603 (build-system python-build-system)
2604 (native-inputs
2605 `(("python-pytest" ,python-pytest)
2606 ("python-pytest-cov" ,python-pytest-cov)
2607 ("python-pytest-runner" ,python-pytest-runner)))
2608 (home-page "http://github.com/progrium/pyjwt")
2609 (synopsis "JSON Web Token implementation in Python")
2610 (description
2611 "PyJWT is a JSON Web Token implementation written in Python.")
2612 (license license:expat)))
2613
2614 (define-public python2-pyjwt
2615 (package-with-python2 python-pyjwt))
2616
2617 (define-public python-oauthlib
2618 (package
2619 (name "python-oauthlib")
2620 (version "1.0.3")
2621 (source (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "oauthlib" version))
2624 (sha256
2625 (base32
2626 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2627 (build-system python-build-system)
2628 (native-inputs
2629 `(("python-nose" ,python-nose)
2630 ("python-cryptography" ,python-cryptography)
2631 ("python-pyjwt" ,python-pyjwt)
2632 ("python-blinker" ,python-blinker)))
2633 (home-page "https://github.com/idan/oauthlib")
2634 (synopsis "OAuth implementation for Python")
2635 (description
2636 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2637 OAuth request-signing logic.")
2638 (license license:bsd-3)
2639 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2640
2641 (define-public python2-oauthlib
2642 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2643 (package
2644 (inherit base)
2645 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2646 ("python2-mock" ,python2-mock)
2647 ,@(package-native-inputs base))))))
2648
2649 (define-public python-itsdangerous
2650 (package
2651 (name "python-itsdangerous")
2652 (version "0.24")
2653 (source
2654 (origin
2655 (method url-fetch)
2656 (uri (string-append
2657 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2658 version ".tar.gz"))
2659 (sha256
2660 (base32
2661 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2662 (build-system python-build-system)
2663 (home-page "http://github.com/mitsuhiko/itsdangerous")
2664 (synopsis "Python library for passing data to/from untrusted environments")
2665 (description
2666 "Itsdangerous provides various helpers to pass trusted data to untrusted
2667 environments and back.")
2668 (license license:bsd-3)))
2669
2670 (define-public python2-itsdangerous
2671 (package-with-python2 python-itsdangerous))
2672
2673 (define-public python-pyyaml
2674 (package
2675 (name "python-pyyaml")
2676 (version "3.12")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (pypi-uri "PyYAML" version))
2681 (sha256
2682 (base32
2683 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2684 (build-system python-build-system)
2685 (inputs
2686 `(("libyaml" ,libyaml)))
2687 (home-page "http://pyyaml.org/wiki/PyYAML")
2688 (synopsis "YAML parser and emitter for Python")
2689 (description
2690 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2691 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2692 API, and sensible error messages. PyYAML supports standard YAML tags and
2693 provides Python-specific tags that allow to represent an arbitrary Python
2694 object.")
2695 (license license:expat)))
2696
2697 (define-public python2-pyyaml
2698 (package-with-python2 python-pyyaml))
2699
2700 (define-public python-virtualenv
2701 (package
2702 (name "python-virtualenv")
2703 (version "15.0.3")
2704 (source
2705 (origin
2706 (method url-fetch)
2707 (uri (pypi-uri "virtualenv" version))
2708 (sha256
2709 (base32
2710 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2711 (build-system python-build-system)
2712 (arguments
2713 `(#:phases
2714 (modify-phases %standard-phases
2715 (replace 'check
2716 (lambda _
2717 ;; Disable failing test. See upstream bug report
2718 ;; https://github.com/pypa/virtualenv/issues/957
2719 (substitute* "tests/test_virtualenv.py"
2720 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2721 (zero? (system* "py.test")))))))
2722 (native-inputs
2723 `(("python-mock" ,python-mock)
2724 ("python-pytest" ,python-pytest)))
2725 (home-page "https://virtualenv.pypa.io/")
2726 (synopsis "Virtual Python environment builder")
2727 (description
2728 "Virtualenv is a tool to create isolated Python environments.")
2729 (license license:expat)))
2730
2731 (define-public python2-virtualenv
2732 (package-with-python2 python-virtualenv))
2733
2734 (define-public python-markupsafe
2735 (package
2736 (name "python-markupsafe")
2737 (version "0.23")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (string-append
2742 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2743 version ".tar.gz"))
2744 (sha256
2745 (base32
2746 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2747 (build-system python-build-system)
2748 (home-page "http://github.com/mitsuhiko/markupsafe")
2749 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2750 (description
2751 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2752 for Python.")
2753 (license license:bsd-3)))
2754
2755 (define-public python2-markupsafe
2756 (package-with-python2 python-markupsafe))
2757
2758 (define-public python-jinja2
2759 (package
2760 (name "python-jinja2")
2761 (version "2.8")
2762 (source
2763 (origin
2764 (method url-fetch)
2765 (uri (pypi-uri "Jinja2" version))
2766 (sha256
2767 (base32
2768 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2769 (build-system python-build-system)
2770 (propagated-inputs
2771 `(("python-markupsafe" ,python-markupsafe)))
2772 (home-page "http://jinja.pocoo.org/")
2773 (synopsis "Python template engine")
2774 (description
2775 "Jinja2 is a small but fast and easy to use stand-alone template engine
2776 written in pure Python.")
2777 (license license:bsd-3)))
2778
2779 (define-public python2-jinja2
2780 (package-with-python2 python-jinja2))
2781
2782 (define-public python-pystache
2783 (package
2784 (name "python-pystache")
2785 (version "0.5.4")
2786 (source (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "pystache" version))
2789 (sha256
2790 (base32
2791 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2792 (build-system python-build-system)
2793 (home-page "http://defunkt.io/pystache/")
2794 (synopsis "Python logic-less template engine")
2795 (description
2796 "Pystache is a Python implementation of the framework agnostic,
2797 logic-free templating system Mustache.")
2798 (license license:expat)))
2799
2800 (define-public python2-pystache
2801 (package-with-python2 python-pystache))
2802
2803 (define-public python-joblib
2804 (package
2805 (name "python-joblib")
2806 (version "0.10.3")
2807 (source (origin
2808 (method url-fetch)
2809 (uri (pypi-uri "joblib" version))
2810 (sha256
2811 (base32
2812 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2813 (modules '((guix build utils)))
2814 (snippet
2815 '(begin
2816 ;; Remove pre-compiled .pyc files from source.
2817 (for-each delete-file-recursively
2818 (find-files "." "__pycache__" #:directories? #t))
2819 (for-each delete-file (find-files "." "\\.pyc$"))
2820 #t))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:phases
2824 (modify-phases %standard-phases
2825 (add-before 'check 'disable-failing-tests
2826 (lambda _
2827 ;; This numpydoc tests fails for unknown reasons
2828 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2829 ;; This numpydoc test depends on matplotlib, which is not a
2830 ;; required input.
2831 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2832 ;; These tests fail to execute sys.executable
2833 (substitute* "joblib/test/test_parallel.py"
2834 (("import nose" line)
2835 (string-append "from nose.plugins.skip import SkipTest\n" line))
2836 (("def test_nested_parallel_warnings" line)
2837 (string-append "@SkipTest\n" line))
2838 (("def test_parallel_with_interactively_defined_functions" line)
2839 (string-append "@SkipTest\n" line)))
2840 #t)))))
2841 ;; Provide nose to enable tests command
2842 (native-inputs
2843 `(("python-nose" ,python-nose)
2844 ("python-sphinx" ,python-sphinx)
2845 ("python-docutils" ,python-docutils)
2846 ("python-numpydoc" ,python-numpydoc)))
2847 (home-page "http://pythonhosted.org/joblib/")
2848 (synopsis "Using Python functions as pipeline jobs")
2849 (description
2850 "Joblib is a set of tools to provide lightweight pipelining in Python.
2851 In particular, joblib offers: transparent disk-caching of the output values
2852 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2853 logging and tracing of the execution.")
2854 (license license:bsd-3)))
2855
2856 (define-public python2-joblib
2857 (package-with-python2 python-joblib))
2858
2859 (define-public python-docutils
2860 (package
2861 (name "python-docutils")
2862 (version "0.13.1")
2863 (source
2864 (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "docutils" version))
2867 (sha256
2868 (base32
2869 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2870 (build-system python-build-system)
2871 (arguments
2872 '(#:tests? #f)) ; no setup.py test command
2873 (home-page "http://docutils.sourceforge.net/")
2874 (synopsis "Python Documentation Utilities")
2875 (description
2876 "Docutils is a modular system for processing documentation into useful
2877 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2878 reStructuredText.")
2879 ;; Most of the source code is public domain, but some source files are
2880 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2881 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2882
2883 (define-public python2-docutils
2884 (package-with-python2 python-docutils))
2885
2886 (define-public python-pygments
2887 (package
2888 (name "python-pygments")
2889 (version "2.1.3")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (pypi-uri "Pygments" version))
2894 (sha256
2895 (base32
2896 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
2897 (build-system python-build-system)
2898 (home-page "http://pygments.org/")
2899 (synopsis "Syntax highlighting")
2900 (description
2901 "Pygments is a syntax highlighting package written in Python.")
2902 (license license:bsd-2)))
2903
2904 (define-public python2-pygments
2905 (package-with-python2 python-pygments))
2906
2907 (define-public python-sphinx
2908 (package
2909 (name "python-sphinx")
2910 (version "1.2.3")
2911 (source
2912 (origin
2913 (method url-fetch)
2914 (uri (string-append
2915 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2916 version ".tar.gz"))
2917 (sha256
2918 (base32
2919 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2920 (build-system python-build-system)
2921 (propagated-inputs
2922 `(("python-jinja2" ,python-jinja2)
2923 ("python-docutils" ,python-docutils)
2924 ("python-pygments" ,python-pygments)))
2925 (home-page "http://sphinx-doc.org/")
2926 (synopsis "Python documentation generator")
2927 (description "Sphinx is a tool that makes it easy to create documentation
2928 for Python projects or other documents consisting of multiple reStructuredText
2929 sources.")
2930 (license license:bsd-3)))
2931
2932 (define-public python2-sphinx
2933 (package-with-python2 python-sphinx))
2934
2935 (define-public python-sphinx-rtd-theme
2936 (package
2937 (name "python-sphinx-rtd-theme")
2938 (version "0.1.6")
2939 (source
2940 (origin
2941 (method url-fetch)
2942 (uri (string-append "https://pypi.python.org/packages/source/s/"
2943 "sphinx_rtd_theme/sphinx_rtd_theme-"
2944 version ".tar.gz"))
2945 (sha256
2946 (base32
2947 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2948 (build-system python-build-system)
2949 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2950 (synopsis "ReadTheDocs.org theme for Sphinx")
2951 (description "A theme for Sphinx used by ReadTheDocs.org.")
2952 (license license:expat)))
2953
2954 (define-public python2-sphinx-rtd-theme
2955 (package-with-python2 python-sphinx-rtd-theme))
2956
2957 (define-public python-rst.linker
2958 (package
2959 (name "python-rst.linker")
2960 (version "1.7")
2961 (source
2962 (origin
2963 (method url-fetch)
2964 (uri (pypi-uri "rst.linker" version))
2965 (sha256
2966 (base32
2967 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2968 (build-system python-build-system)
2969 (propagated-inputs
2970 `(("python-dateutil" ,python-dateutil-2)
2971 ("python-six" ,python-six)))
2972 (native-inputs
2973 `(("python-setuptools-scm" ,python-setuptools-scm)))
2974 ;; Test would require path.py, which would introduce a cyclic dependence.
2975 (arguments `(#:tests? #f))
2976 ;; Note: As of version 1.7 the documentation is not worth building.
2977 (home-page "https://github.com/jaraco/rst.linker")
2978 (synopsis "Sphinx plugin to add links and timestamps")
2979 (description "rst.linker allows to automatically replace text by a
2980 reStructuredText external reference or timestamps. It's primary purpose is to
2981 augment the changelog, but it can be used for other documents, too.")
2982 (license license:expat)))
2983
2984 (define-public python2-rst.linker
2985 (package-with-python2 python-rst.linker))
2986
2987 (define-public python-feedgenerator
2988 (package
2989 (name "python-feedgenerator")
2990 (version "1.8")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "feedgenerator" version))
2995 (sha256
2996 (base32
2997 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2998 (modules '((guix build utils)))
2999 (snippet
3000 '(begin
3001 ;; Remove pre-compiled .pyc files from source.
3002 (for-each delete-file-recursively
3003 (find-files "." "__pycache__" #:directories? #t))
3004 (for-each delete-file (find-files "." "\\.pyc$"))
3005 #t))))
3006 (build-system python-build-system)
3007 (propagated-inputs
3008 `(("python-pytz" ,python-pytz)
3009 ("python-six" ,python-six)))
3010 (home-page "https://github.com/getpelican/feedgenerator")
3011 (synopsis
3012 "Standalone version of Django's Atom/RSS feed generator")
3013 (description
3014 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3015 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3016 (license license:bsd-3)))
3017
3018 (define-public python2-feedgenerator
3019 (package-with-python2 python-feedgenerator))
3020
3021 (define-public python-blinker
3022 (package
3023 (name "python-blinker")
3024 (version "1.4")
3025 (source
3026 (origin
3027 (method url-fetch)
3028 (uri (pypi-uri "blinker" version))
3029 (sha256
3030 (base32
3031 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3032 (build-system python-build-system)
3033 (home-page "http://pythonhosted.org/blinker/")
3034 (synopsis "Fast, simple object-to-object and broadcast signaling")
3035 (description
3036 "Blinker provides a fast dispatching system that allows any number of
3037 interested parties to subscribe to events, or \"signals\".")
3038 (license license:expat)))
3039
3040 (define-public python2-blinker
3041 (package-with-python2 python-blinker))
3042
3043 (define-public pelican
3044 (package
3045 (name "pelican")
3046 (version "3.6.3")
3047 (source
3048 (origin
3049 (method url-fetch)
3050 (uri (pypi-uri "pelican" version))
3051 (sha256
3052 (base32
3053 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3054 (build-system python-build-system)
3055 (propagated-inputs
3056 `(("python-feedgenerator" ,python-feedgenerator)
3057 ("python-jinja2" ,python-jinja2)
3058 ("python-pygments" ,python-pygments)
3059 ("python-docutils" ,python-docutils)
3060 ("python-pytz" ,python-pytz)
3061 ("python-blinker" ,python-blinker)
3062 ("python-unidecode" ,python-unidecode)
3063 ("python-six" ,python-six)
3064 ("python-dateutil-2" ,python-dateutil-2)))
3065 (home-page "http://getpelican.com/")
3066 (arguments
3067 `(;; XXX Requires a lot more packages to do unit tests :P
3068 #:tests? #f
3069 #:phases (modify-phases %standard-phases
3070 (add-before
3071 'install 'adjust-requires
3072 ;; Since feedgenerator is installed from git, it doesn't
3073 ;; conform to the version requirements.
3074 ;;
3075 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3076 ;; version requirement so setuptools doesn't get confused.
3077 (lambda _
3078 (substitute* "setup.py"
3079 (("['\"]feedgenerator.*?['\"]")
3080 "'feedgenerator'")))))))
3081 (synopsis "Python-based static site publishing system")
3082 (description
3083 "Pelican is a tool to generate a static blog from reStructuredText,
3084 Markdown input files, and more. Pelican uses Jinja2 for templating
3085 and is very extensible.")
3086 (license license:agpl3+)))
3087
3088 (define-public python-scikit-learn
3089 (package
3090 (name "python-scikit-learn")
3091 (version "0.18.1")
3092 (source
3093 (origin
3094 (method url-fetch)
3095 (uri (string-append
3096 "https://github.com/scikit-learn/scikit-learn/archive/"
3097 version ".tar.gz"))
3098 (file-name (string-append name "-" version ".tar.gz"))
3099 (sha256
3100 (base32
3101 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3102 (build-system python-build-system)
3103 (arguments
3104 `(#:phases
3105 (alist-cons-before
3106 'check 'set-HOME
3107 ;; some tests require access to "$HOME"
3108 (lambda _ (setenv "HOME" "/tmp"))
3109 %standard-phases)))
3110 (inputs
3111 `(("openblas" ,openblas)))
3112 (native-inputs
3113 `(("python-nose" ,python-nose)
3114 ("python-cython" ,python-cython)))
3115 (propagated-inputs
3116 `(("python-numpy" ,python-numpy)
3117 ("python-scipy" ,python-scipy)))
3118 (home-page "http://scikit-learn.org/")
3119 (synopsis "Machine Learning in Python")
3120 (description
3121 "Scikit-learn provides simple and efficient tools for data
3122 mining and data analysis.")
3123 (license license:bsd-3)))
3124
3125 (define-public python2-scikit-learn
3126 (package-with-python2 python-scikit-learn))
3127
3128 (define-public python-scikit-image
3129 (package
3130 (name "python-scikit-image")
3131 (version "0.11.3")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (string-append
3136 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3137 version ".tar.gz"))
3138 (sha256
3139 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3140 (build-system python-build-system)
3141 ;; See DEPENDS.txt for the list of build and run time requiremnts
3142 (propagated-inputs
3143 `(("python-matplotlib" ,python-matplotlib)
3144 ("python-networkx" ,python-networkx)
3145 ("python-scipy" ,python-scipy)
3146 ("python-pillow" ,python-pillow)))
3147 (native-inputs
3148 `(("python-numpy" ,python-numpy)
3149 ("python-cython" ,python-cython)
3150 ("python-six" ,python-six)))
3151 (home-page "http://scikit-image.org/")
3152 (synopsis "Image processing in Python")
3153 (description
3154 "Scikit-image is a collection of algorithms for image processing.")
3155 (license license:bsd-3)))
3156
3157 (define-public python2-scikit-image
3158 (package-with-python2 python-scikit-image))
3159
3160 (define-public python-redis
3161 (package
3162 (name "python-redis")
3163 (version "2.10.3")
3164 (source
3165 (origin
3166 (method url-fetch)
3167 (uri (string-append
3168 "https://pypi.python.org/packages/source/r/redis/redis-"
3169 version ".tar.gz"))
3170 (sha256
3171 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3172 (build-system python-build-system)
3173 ;; Tests require a running Redis server
3174 (arguments '(#:tests? #f))
3175 ;; As long as we are not running test, we do not need this input :-)
3176 ;;(native-inputs
3177 ;; `(("python-pytest" ,python-pytest)))
3178 (home-page "https://github.com/andymccurdy/redis-py")
3179 (synopsis "Redis Python client")
3180 (description
3181 "This package provides a Python interface to the Redis key-value store.")
3182 (license license:expat)))
3183
3184 (define-public python2-redis
3185 (package-with-python2 python-redis))
3186
3187 (define-public python-rq
3188 (package
3189 (name "python-rq")
3190 (version "0.5.2")
3191 (source
3192 (origin
3193 (method url-fetch)
3194 (uri (string-append
3195 "https://pypi.python.org/packages/source/r/rq/rq-"
3196 version ".tar.gz"))
3197 (sha256
3198 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3199 (build-system python-build-system)
3200 (propagated-inputs
3201 `(("python-click" ,python-click)
3202 ("python-redis" ,python-redis)))
3203 (home-page "http://python-rq.org/")
3204 (synopsis "Simple job queues for Python")
3205 (description
3206 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3207 processing them in the background with workers. It is backed by Redis and it
3208 is designed to have a low barrier to entry.")
3209 (license license:bsd-2)))
3210
3211 (define-public python2-rq
3212 (package-with-python2 python-rq))
3213
3214 (define-public python-cython
3215 (package
3216 (name "python-cython")
3217 (version "0.24.1")
3218 (source
3219 (origin
3220 (method url-fetch)
3221 (uri (pypi-uri "Cython" version))
3222 (sha256
3223 (base32
3224 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3225 (build-system python-build-system)
3226 ;; we need the full python package and not just the python-wrapper
3227 ;; because we need libpython3.3m.so
3228 (inputs
3229 `(("python" ,python)))
3230 (arguments
3231 `(#:phases
3232 (modify-phases %standard-phases
3233 (add-before 'check 'set-HOME
3234 ;; some tests require access to "$HOME/.cython"
3235 (lambda _ (setenv "HOME" "/tmp")))
3236 (replace 'check
3237 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3238 (home-page "http://cython.org/")
3239 (synopsis "C extensions for Python")
3240 (description "Cython is an optimising static compiler for both the Python
3241 programming language and the extended Cython programming language. It makes
3242 writing C extensions for Python as easy as Python itself.")
3243 (license license:asl2.0)
3244 (properties `((python2-variant . ,(delay python2-cython))))))
3245
3246 (define-public python2-cython
3247 (package (inherit (package-with-python2
3248 (strip-python2-variant python-cython)))
3249 (name "python2-cython")
3250 (inputs
3251 `(("python-2" ,python-2))))) ; this is not automatically changed
3252
3253 ;; The RPython toolchain currently does not support Python 3.
3254 (define-public python2-rpython
3255 (package
3256 (name "python2-rpython")
3257 (version "0.1.4")
3258 (source
3259 (origin
3260 (method url-fetch)
3261 (uri (pypi-uri "rpython" version))
3262 (sha256
3263 (base32
3264 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3265 (build-system python-build-system)
3266 (arguments `(#:python ,python-2))
3267 (native-inputs
3268 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3269 (home-page "https://rpython.readthedocs.org")
3270 (synopsis "Framework for implementing interpreters and virtual machines")
3271 (description "RPython is a translation and support framework for
3272 producing implementations of dynamic languages, emphasizing a clean separation
3273 between language specification and implementation aspects.")
3274 (license license:expat)))
3275
3276 ;; This version of numpy is missing the documentation and is only used to
3277 ;; build matplotlib which is required to build numpy's documentation.
3278 (define python-numpy-bootstrap
3279 (package
3280 (name "python-numpy-bootstrap")
3281 (version "1.10.4")
3282 (source
3283 (origin
3284 (method url-fetch)
3285 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3286 "/numpy-" version ".tar.gz"))
3287 (sha256
3288 (base32
3289 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3290 (build-system python-build-system)
3291 (inputs
3292 `(("openblas" ,openblas)
3293 ("lapack" ,lapack)))
3294 (native-inputs
3295 `(("python-nose" ,python-nose)
3296 ("gfortran" ,gfortran)))
3297 (arguments
3298 `(#:phases
3299 (modify-phases %standard-phases
3300 (add-before 'build 'set-environment-variables
3301 (lambda* (#:key inputs #:allow-other-keys)
3302 (call-with-output-file "site.cfg"
3303 (lambda (port)
3304 (format port
3305 "[openblas]
3306 libraries = openblas
3307 library_dirs = ~a/lib
3308 include_dirs = ~a/include
3309
3310 # backslash-n to make emacs happy
3311 \n[lapack]
3312 lapack_libs = lapack
3313 library_dirs = ~a/lib
3314 include_dirs = ~a/include
3315 "
3316 (assoc-ref inputs "openblas")
3317 (assoc-ref inputs "openblas")
3318 (assoc-ref inputs "lapack")
3319 (assoc-ref inputs "lapack"))))
3320 ;; Use "gcc" executable, not "cc".
3321 (substitute* "numpy/distutils/system_info.py"
3322 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3323 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3324 #t))
3325 ;; Tests can only be run after the library has been installed and not
3326 ;; within the source directory.
3327 (delete 'check)
3328 (add-after 'install 'check
3329 (lambda* (#:key outputs inputs #:allow-other-keys)
3330 ;; Make installed package available for running the tests
3331 (add-installed-pythonpath inputs outputs)
3332 (with-directory-excursion "/tmp"
3333 (zero? (system* "python" "-c"
3334 "import numpy; numpy.test(verbose=2)"))))))))
3335 (home-page "http://www.numpy.org/")
3336 (synopsis "Fundamental package for scientific computing with Python")
3337 (description "NumPy is the fundamental package for scientific computing
3338 with Python. It contains among other things: a powerful N-dimensional array
3339 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3340 and Fortran code, useful linear algebra, Fourier transform, and random number
3341 capabilities.")
3342 (license license:bsd-3)))
3343
3344 (define python2-numpy-bootstrap
3345 (package-with-python2 python-numpy-bootstrap))
3346
3347 (define-public python-munch
3348 (package
3349 (name "python-munch")
3350 (version "2.0.4")
3351 (source
3352 (origin
3353 (method url-fetch)
3354 (uri (pypi-uri "munch" version))
3355 (sha256
3356 (base32
3357 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3358 (build-system python-build-system)
3359 (home-page "https://github.com/Infinidat/munch")
3360 (synopsis "Dot-accessible dictionary")
3361 (description "Munch is a dot-accessible dictionary similar to JavaScript
3362 objects.")
3363 (license license:expat)))
3364
3365 (define-public python2-munch
3366 (package-with-python2 python-munch))
3367
3368 (define-public python2-fastlmm
3369 (package
3370 (name "python2-fastlmm")
3371 (version "0.2.26")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (pypi-uri "fastlmm" version ".zip"))
3376 (sha256
3377 (base32
3378 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3379 (build-system python-build-system)
3380 (arguments
3381 `(#:python ,python-2)) ; only Python 2.7 is supported
3382 (propagated-inputs
3383 `(("python2-numpy" ,python2-numpy)
3384 ("python2-scipy" ,python2-scipy)
3385 ("python2-matplotlib" ,python2-matplotlib)
3386 ("python2-pandas" ,python2-pandas)
3387 ("python2-scikit-learn" ,python2-scikit-learn)
3388 ("python2-pysnptools" ,python2-pysnptools)))
3389 (native-inputs
3390 `(("unzip" ,unzip)
3391 ("python2-cython" ,python2-cython)
3392 ("python2-mock" ,python2-mock)))
3393 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3394 (synopsis "Perform genome-wide association studies on large data sets")
3395 (description
3396 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3397 Models, is a program for performing both single-SNP and SNP-set genome-wide
3398 association studies (GWAS) on extremely large data sets.")
3399 (license license:asl2.0)))
3400
3401 (define-public python-numpy
3402 (package (inherit python-numpy-bootstrap)
3403 (name "python-numpy")
3404 (outputs '("out" "doc"))
3405 (inputs
3406 `(("which" ,which)
3407 ,@(package-inputs python-numpy-bootstrap)))
3408 (propagated-inputs
3409 `(("python-matplotlib" ,python-matplotlib)
3410 ("python-pyparsing" ,python-pyparsing)
3411 ,@(package-propagated-inputs python-numpy-bootstrap)))
3412 (native-inputs
3413 `(("pkg-config" ,pkg-config)
3414 ("python-sphinx" ,python-sphinx)
3415 ("python-numpydoc" ,python-numpydoc)
3416 ("texlive" ,texlive)
3417 ("texinfo" ,texinfo)
3418 ("perl" ,perl)
3419 ,@(package-native-inputs python-numpy-bootstrap)))
3420 (arguments
3421 `(,@(substitute-keyword-arguments
3422 (package-arguments python-numpy-bootstrap)
3423 ((#:phases phases)
3424 `(alist-cons-after
3425 'install 'install-doc
3426 (lambda* (#:key inputs outputs #:allow-other-keys)
3427 ;; Make installed package available for building the
3428 ;; documentation
3429 (add-installed-pythonpath inputs outputs)
3430 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3431 (doc (string-append
3432 data "/doc/" ,name "-"
3433 ,(package-version python-numpy-bootstrap)))
3434 (info (string-append data "/info"))
3435 (html (string-append doc "/html"))
3436 (pyver ,(string-append "PYVER=")))
3437 (with-directory-excursion "doc"
3438 (mkdir-p html)
3439 (system* "make" "html" pyver)
3440 (system* "make" "latex" "PAPER=a4" pyver)
3441 (system* "make" "-C" "build/latex"
3442 "all-pdf" "PAPER=a4" pyver)
3443 ;; FIXME: Generation of the info file fails.
3444 ;; (system* "make" "info" pyver)
3445 ;; (mkdir-p info)
3446 ;; (copy-file "build/texinfo/numpy.info"
3447 ;; (string-append info "/numpy.info"))
3448 (for-each (lambda (file)
3449 (copy-file (string-append "build/latex" file)
3450 (string-append doc file)))
3451 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3452 (with-directory-excursion "build/html"
3453 (for-each (lambda (file)
3454 (let* ((dir (dirname file))
3455 (tgt-dir (string-append html "/" dir)))
3456 (unless (equal? "." dir)
3457 (mkdir-p tgt-dir))
3458 (install-file file html)))
3459 (find-files "." ".*"))))))
3460 ,phases)))))))
3461
3462 (define-public python2-numpy
3463 (package-with-python2 python-numpy))
3464
3465 (define-public python-pygit2
3466 (package
3467 (name "python-pygit2")
3468 (version "0.24.2")
3469 (source
3470 (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "pygit2" version))
3473 (sha256
3474 (base32
3475 "0shnafv9zc483wmcr4fzgvirg1qzz42xpdqd4a3ad39sdj1qbbia"))))
3476 (build-system python-build-system)
3477 (propagated-inputs
3478 `(("python-six" ,python-six)
3479 ("python-cffi" ,python-cffi)
3480 ("libgit2" ,libgit2)
3481 ("python-tox" ,python-tox)))
3482 (home-page "https://github.com/libgit2/pygit2")
3483 (synopsis "Python bindings for libgit2")
3484 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3485 library, libgit2 implements Git plumbing.")
3486 ;; GPL2.0 only, with linking exception.
3487 (license license:gpl2)))
3488
3489 (define-public python2-pygit2
3490 (package-with-python2 python-pygit2))
3491
3492 (define-public python-pyparsing
3493 (package
3494 (name "python-pyparsing")
3495 (version "2.0.3")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3500 "/pyparsing-" version
3501 "/pyparsing-" version ".tar.gz"))
3502 (sha256
3503 (base32
3504 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3505 (build-system python-build-system)
3506 (outputs '("out" "doc"))
3507 (arguments
3508 `(#:tests? #f ; no test target
3509 #:modules ((guix build python-build-system)
3510 (guix build utils))
3511 #:phases
3512 (alist-cons-after
3513 'install 'install-doc
3514 (lambda* (#:key outputs #:allow-other-keys)
3515 (let* ((doc (string-append (assoc-ref outputs "doc")
3516 "/share/doc/" ,name "-" ,version))
3517 (html-doc (string-append doc "/html"))
3518 (examples (string-append doc "/examples")))
3519 (mkdir-p html-doc)
3520 (mkdir-p examples)
3521 (for-each
3522 (lambda (dir tgt)
3523 (map (lambda (file)
3524 (install-file file tgt))
3525 (find-files dir ".*")))
3526 (list "docs" "htmldoc" "examples")
3527 (list doc html-doc examples))))
3528 %standard-phases)))
3529 (home-page "http://pyparsing.wikispaces.com")
3530 (synopsis "Python parsing class library")
3531 (description
3532 "The pyparsing module is an alternative approach to creating and
3533 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3534 of regular expressions. The pyparsing module provides a library of classes
3535 that client code uses to construct the grammar directly in Python code.")
3536 (license license:expat)))
3537
3538 (define-public python2-pyparsing
3539 (package-with-python2 python-pyparsing))
3540
3541 (define-public python-numpydoc
3542 (package
3543 (name "python-numpydoc")
3544 (version "0.5")
3545 (source
3546 (origin
3547 (method url-fetch)
3548 (uri (string-append
3549 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3550 version ".tar.gz"))
3551 (sha256
3552 (base32
3553 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3554 (modules '((guix build utils)))
3555 (snippet
3556 '(begin
3557 ;; Drop a test requiring matplotlib, which we cannot add as an
3558 ;; input since it would create a circular dependency: Extend the
3559 ;; test for Python 3, where it is already dropped, to Python 2.
3560 (substitute* "numpydoc/tests/test_plot_directive.py"
3561 (("3") "2"))))))
3562 (build-system python-build-system)
3563 (propagated-inputs
3564 `(("python-sphinx" ,python-sphinx)))
3565 (native-inputs
3566 `(("python-nose" ,python-nose)))
3567 (home-page "https://pypi.python.org/pypi/numpydoc")
3568 (synopsis
3569 "Numpy's Sphinx extensions")
3570 (description
3571 "Sphinx extension to support docstrings in Numpy format.")
3572 (license license:bsd-2)))
3573
3574 (define-public python2-numpydoc
3575 (package-with-python2 python-numpydoc))
3576
3577 (define-public python-numexpr
3578 (package
3579 (name "python-numexpr")
3580 (version "2.6.1")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 (uri (pypi-uri "numexpr" version))
3585 (sha256
3586 (base32
3587 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3588 (build-system python-build-system)
3589 (arguments `(#:tests? #f)) ; no tests included
3590 (propagated-inputs
3591 `(("python-numpy" ,python-numpy)))
3592 (home-page "https://github.com/pydata/numexpr")
3593 (synopsis "Fast numerical expression evaluator for NumPy")
3594 (description
3595 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3596 expressions that operate on arrays are accelerated and use less memory than
3597 doing the same calculation in Python. In addition, its multi-threaded
3598 capabilities can make use of all your cores, which may accelerate
3599 computations, most specially if they are not memory-bounded (e.g. those using
3600 transcendental functions).")
3601 (license license:expat)))
3602
3603 (define-public python2-numexpr
3604 (package-with-python2 python-numexpr))
3605
3606 (define-public python-matplotlib
3607 (package
3608 (name "python-matplotlib")
3609 (version "1.4.3")
3610 (source
3611 (origin
3612 (method url-fetch)
3613 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3614 "/matplotlib-" version
3615 "/matplotlib-" version ".tar.gz"))
3616 (sha256
3617 (base32
3618 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3619 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3620 (build-system python-build-system)
3621 (outputs '("out" "doc"))
3622 (propagated-inputs ; the following packages are all needed at run time
3623 `(("python-pyparsing" ,python-pyparsing)
3624 ("python-pygobject" ,python-pygobject)
3625 ("gobject-introspection" ,gobject-introspection)
3626 ("python-tkinter" ,python "tk")
3627 ("python-dateutil" ,python-dateutil-2)
3628 ("python-numpy" ,python-numpy-bootstrap)
3629 ("python-pillow" ,python-pillow)
3630 ("python-pytz" ,python-pytz)
3631 ("python-six" ,python-six)
3632 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3633 ;; from 'gtk+') provides the required 'typelib' files used by
3634 ;; 'gobject-introspection'. The location of these files is set with the
3635 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3636 ;; is done automatically by a 'native-search-path' procedure. However,
3637 ;; at run-time the user must set this variable as follows:
3638 ;;
3639 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3640 ("gtk+" ,gtk+)
3641 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3642 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3643 ;; object. For this reason we need to import both libraries.
3644 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3645 ("python-pycairo" ,python-pycairo)
3646 ("python-cairocffi" ,python-cairocffi)))
3647 (inputs
3648 `(("libpng" ,libpng)
3649 ("imagemagick" ,imagemagick)
3650 ("freetype" ,freetype)
3651 ("cairo" ,cairo)
3652 ("glib" ,glib)
3653 ;; FIXME: Add backends when available.
3654 ;("python-wxpython" ,python-wxpython)
3655 ;("python-pyqt" ,python-pyqt)
3656 ("tcl" ,tcl)
3657 ("tk" ,tk)))
3658 (native-inputs
3659 `(("pkg-config" ,pkg-config)
3660 ("python-sphinx" ,python-sphinx)
3661 ("python-numpydoc" ,python-numpydoc)
3662 ("python-nose" ,python-nose)
3663 ("python-mock" ,python-mock)
3664 ("texlive" ,texlive)
3665 ("texinfo" ,texinfo)))
3666 (arguments
3667 `(#:phases
3668 (alist-cons-before
3669 'build 'configure-environment
3670 (lambda* (#:key outputs inputs #:allow-other-keys)
3671 (let ((cairo (assoc-ref inputs "cairo"))
3672 (gtk+ (assoc-ref inputs "gtk+")))
3673 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3674 ;; has not effect.
3675 (setenv "LD_LIBRARY_PATH"
3676 (string-append cairo "/lib:" gtk+ "/lib"))
3677 (setenv "HOME" (getcwd))
3678 (call-with-output-file "setup.cfg"
3679 (lambda (port)
3680 (format port "[directories]~%
3681 basedirlist = ~a,~a~%
3682 [rc_options]~%
3683 backend = TkAgg~%"
3684 (assoc-ref inputs "tcl")
3685 (assoc-ref inputs "tk"))))))
3686 (alist-cons-after
3687 'install 'install-doc
3688 (lambda* (#:key inputs outputs #:allow-other-keys)
3689 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3690 (doc (string-append data "/doc/" ,name "-" ,version))
3691 (info (string-append data "/info"))
3692 (html (string-append doc "/html")))
3693 ;; Make installed package available for building the
3694 ;; documentation
3695 (add-installed-pythonpath inputs outputs)
3696 (with-directory-excursion "doc"
3697 ;; Produce pdf in 'A4' format.
3698 (substitute* (find-files "." "conf\\.py")
3699 (("latex_paper_size = 'letter'")
3700 "latex_paper_size = 'a4'"))
3701 (mkdir-p html)
3702 (mkdir-p info)
3703 ;; The doc recommends to run the 'html' target twice.
3704 (system* "python" "make.py" "html")
3705 (system* "python" "make.py" "html")
3706 (copy-recursively "build/html" html)
3707 (system* "python" "make.py" "latex")
3708 (system* "python" "make.py" "texinfo")
3709 (symlink (string-append html "/_images")
3710 (string-append info "/matplotlib-figures"))
3711 (with-directory-excursion "build/texinfo"
3712 (substitute* "matplotlib.texi"
3713 (("@image\\{([^,]*)" all file)
3714 (string-append "@image{matplotlib-figures/" file)))
3715 (symlink (string-append html "/_images")
3716 "./matplotlib-figures")
3717 (system* "makeinfo" "--no-split"
3718 "-o" "matplotlib.info" "matplotlib.texi"))
3719 (copy-file "build/texinfo/matplotlib.info"
3720 (string-append info "/matplotlib.info"))
3721 (copy-file "build/latex/Matplotlib.pdf"
3722 (string-append doc "/Matplotlib.pdf")))))
3723 %standard-phases))))
3724 (home-page "http://matplotlib.org")
3725 (synopsis "2D plotting library for Python")
3726 (description
3727 "Matplotlib is a Python 2D plotting library which produces publication
3728 quality figures in a variety of hardcopy formats and interactive environments
3729 across platforms. Matplotlib can be used in Python scripts, the python and
3730 ipython shell, web application servers, and six graphical user interface
3731 toolkits.")
3732 (license license:psfl)
3733 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3734
3735 (define-public python2-matplotlib
3736 (let ((matplotlib (package-with-python2
3737 (strip-python2-variant python-matplotlib))))
3738 (package (inherit matplotlib)
3739 ;; Make sure to use special packages for Python 2 instead
3740 ;; of those automatically rewritten by package-with-python2.
3741 (propagated-inputs
3742 `(("python2-pycairo" ,python2-pycairo)
3743 ("python2-pygobject-2" ,python2-pygobject-2)
3744 ("python2-tkinter" ,python-2 "tk")
3745 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3746 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3747
3748 (define-public python2-pysnptools
3749 (package
3750 (name "python2-pysnptools")
3751 (version "0.3.9")
3752 (source
3753 (origin
3754 (method url-fetch)
3755 (uri (pypi-uri "pysnptools" version ".zip"))
3756 (sha256
3757 (base32
3758 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3759 (build-system python-build-system)
3760 (arguments
3761 `(#:python ,python-2)) ; only Python 2.7 is supported
3762 (propagated-inputs
3763 `(("python2-numpy" ,python2-numpy)
3764 ("python2-scipy" ,python2-scipy)
3765 ("python2-pandas" ,python2-pandas)))
3766 (native-inputs
3767 `(("python2-cython" ,python2-cython)))
3768 (native-inputs
3769 `(("unzip" ,unzip)))
3770 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3771 (synopsis "Library for reading and manipulating genetic data")
3772 (description
3773 "PySnpTools is a library for reading and manipulating genetic data. It
3774 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3775 those files. It can also efficiently manipulate ranges of integers using set
3776 operators such as union, intersection, and difference.")
3777 (license license:asl2.0)))
3778
3779 (define-public python-rpy2
3780 (package
3781 (name "python-rpy2")
3782 (version "2.7.6")
3783 (source
3784 (origin
3785 (method url-fetch)
3786 (uri (pypi-uri "rpy2" version))
3787 (sha256
3788 (base32
3789 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3790 (build-system python-build-system)
3791 (propagated-inputs
3792 `(("python-six" ,python-six)))
3793 (inputs
3794 `(("readline" ,readline)
3795 ("icu4c" ,icu4c)
3796 ("pcre" ,pcre)
3797 ("r" ,r)))
3798 (native-inputs
3799 `(("zlib" ,zlib)))
3800 (home-page "http://rpy.sourceforge.net/")
3801 (synopsis "Python interface to the R language")
3802 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3803 low-level interface to R from Python, a proposed high-level interface,
3804 including wrappers to graphical libraries, as well as R-like structures and
3805 functions.")
3806 (license license:gpl3+)))
3807
3808 (define-public python2-rpy2
3809 (let ((rpy2 (package-with-python2 python-rpy2)))
3810 (package (inherit rpy2)
3811 (native-inputs
3812 `(("python2-singledispatch" ,python2-singledispatch)
3813 ,@(package-native-inputs rpy2))))))
3814
3815 (define-public python-scipy
3816 (package
3817 (name "python-scipy")
3818 (version "0.16.0")
3819 (source
3820 (origin
3821 (method url-fetch)
3822 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3823 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3824 "/scipy-" version ".tar.xz"))
3825 (sha256
3826 (base32
3827 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3828 (build-system python-build-system)
3829 (propagated-inputs
3830 `(("python-numpy" ,python-numpy)
3831 ("python-matplotlib" ,python-matplotlib)
3832 ("python-pyparsing" ,python-pyparsing)))
3833 (inputs
3834 `(("lapack" ,lapack)
3835 ("openblas" ,openblas)))
3836 (native-inputs
3837 `(("python-nose" ,python-nose)
3838 ("python-sphinx" ,python-sphinx)
3839 ("python-numpydoc" ,python-numpydoc)
3840 ("gfortran" ,gfortran)
3841 ("texlive" ,texlive)
3842 ("perl" ,perl)))
3843 (outputs '("out" "doc"))
3844 (arguments
3845 `(#:phases
3846 (alist-cons-before
3847 'build 'configure-openblas
3848 (lambda* (#:key inputs #:allow-other-keys)
3849 (call-with-output-file "site.cfg"
3850 (lambda (port)
3851 (format port
3852 "[blas]
3853 libraries = openblas
3854 library_dirs = ~a/lib
3855 include_dirs = ~a/include
3856
3857 # backslash-n to make emacs happy
3858 \n[atlas]
3859 library_dirs = ~a/lib
3860 atlas_libs = openblas
3861 "
3862 (assoc-ref inputs "openblas")
3863 (assoc-ref inputs "openblas")
3864 (assoc-ref inputs "openblas"))))
3865 #t)
3866 (alist-cons-after
3867 'install 'install-doc
3868 (lambda* (#:key inputs outputs #:allow-other-keys)
3869 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3870 (doc (string-append data "/doc/" ,name "-" ,version))
3871 (html (string-append doc "/html"))
3872 (pyver ,(string-append "PYVER=")))
3873 ;; Make installed package available for building the
3874 ;; documentation
3875 (add-installed-pythonpath inputs outputs)
3876 (with-directory-excursion "doc"
3877 ;; Fix generation of images for mathematical expressions.
3878 (substitute* (find-files "source" "conf\\.py")
3879 (("pngmath_use_preview = True")
3880 "pngmath_use_preview = False"))
3881 (mkdir-p html)
3882 (system* "make" "html" pyver)
3883 (system* "make" "latex" "PAPER=a4" pyver)
3884 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3885 (copy-file "build/latex/scipy-ref.pdf"
3886 (string-append doc "/scipy-ref.pdf"))
3887 (with-directory-excursion "build/html"
3888 (for-each (lambda (file)
3889 (let* ((dir (dirname file))
3890 (tgt-dir (string-append html "/" dir)))
3891 (install-file file html)))
3892 (find-files "." ".*"))))))
3893 ;; Tests can only be run after the library has been installed and not
3894 ;; within the source directory.
3895 (alist-cons-after
3896 'install 'check
3897 (lambda _
3898 (with-directory-excursion "/tmp"
3899 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3900 (alist-delete
3901 'check
3902 (alist-cons-after
3903 'unpack 'fix-tests
3904 (lambda _
3905 (substitute* "scipy/integrate/tests/test_quadpack.py"
3906 (("libm.so") "libm.so.6"))
3907 #t)
3908 %standard-phases)))))))
3909 (home-page "http://www.scipy.org/")
3910 (synopsis "The Scipy library provides efficient numerical routines")
3911 (description "The SciPy library is one of the core packages that make up
3912 the SciPy stack. It provides many user-friendly and efficient numerical
3913 routines such as routines for numerical integration and optimization.")
3914 (license license:bsd-3)))
3915
3916 (define-public python2-scipy
3917 (package-with-python2 python-scipy))
3918
3919 (define-public python-socksipy-branch
3920 (package
3921 (name "python-socksipy-branch")
3922 (version "1.01")
3923 (source
3924 (origin
3925 (method url-fetch)
3926 (uri (pypi-uri "SocksiPy-branch" version))
3927 (sha256
3928 (base32
3929 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3930 (build-system python-build-system)
3931 (arguments
3932 `(#:tests? #f)) ; There are no tests
3933 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3934 (synopsis "Python SOCKS module")
3935 (description
3936 "SocksiPy - A Python SOCKS client module. It provides a
3937 socket-like interface that supports connections to any TCP
3938 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3939 The original version was developed by Dan Haim, this is a
3940 branch created by Mario Vilas to address some open issues,
3941 as the original project seems to have been abandoned circa 2007.")
3942 (license license:bsd-3)))
3943
3944 (define-public python2-socksipy-branch
3945 (package-with-python2 python-socksipy-branch))
3946
3947 (define-public python-sqlalchemy
3948 (package
3949 (name "python-sqlalchemy")
3950 (version "1.0.12")
3951 (source
3952 (origin
3953 (method url-fetch)
3954 (uri (string-append "https://pypi.python.org/packages/source/S/"
3955 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3956 (sha256
3957 (base32
3958 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3959 (build-system python-build-system)
3960 (native-inputs
3961 `(("python-cython" ,python-cython) ;for c extensions
3962 ("python-pytest" ,python-pytest)
3963 ("python-mock" ,python-mock))) ;for tests
3964 (arguments
3965 `(#:phases (alist-replace
3966 'check
3967 (lambda _ (zero? (system* "py.test")))
3968 %standard-phases)))
3969 (home-page "http://www.sqlalchemy.org")
3970 (synopsis "Database abstraction library")
3971 (description
3972 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3973 gives application developers the full power and flexibility of SQL. It
3974 provides a full suite of well known enterprise-level persistence patterns,
3975 designed for efficient and high-performing database access, adapted into a
3976 simple and Pythonic domain language.")
3977 (license license:x11)))
3978
3979 (define-public python2-sqlalchemy
3980 (package-with-python2 python-sqlalchemy))
3981
3982 (define-public python-pycodestyle
3983 (package
3984 (name "python-pycodestyle")
3985 (version "2.0.0")
3986 (source
3987 (origin
3988 (method url-fetch)
3989 (uri (pypi-uri "pycodestyle" version))
3990 (sha256
3991 (base32
3992 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3993 (build-system python-build-system)
3994 (home-page "https://pycodestyle.readthedocs.io/")
3995 (synopsis "Python style guide checker")
3996 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3997 Python code against some of the style conventions in
3998 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3999 (license license:expat)))
4000
4001 (define-public python2-pycodestyle
4002 (package-with-python2 python-pycodestyle))
4003
4004 (define-public python-orderedmultidict
4005 (package
4006 (name "python-orderedmultidict")
4007 (version "0.7.10")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (pypi-uri "orderedmultidict" version))
4012 (sha256
4013 (base32
4014 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
4015 (build-system python-build-system)
4016 (arguments
4017 `(#:phases
4018 (modify-phases %standard-phases
4019 (add-after 'unpack 'fix-tests
4020 (lambda _
4021 ;; The package uses nosetest for running the tests.
4022 ;; Adding this initfile allows to run the test suite
4023 ;; without requiring nosetest.
4024 (zero? (system* "touch" "tests/__init__.py")))))))
4025 (propagated-inputs
4026 `(("python-six" ,python-six)))
4027 (native-inputs
4028 `(("python-pycodestyle" ,python-pycodestyle)))
4029 (home-page "https://github.com/gruns/orderedmultidict")
4030 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4031 (description "This package contains a library for ordered multivalue
4032 dictionaries. A multivalue dictionary is a dictionary that can store
4033 multiple values for the same key. An ordered multivalue dictionary is a
4034 multivalue dictionary that retains the order of insertions and deletions.")
4035 (license license:unlicense)))
4036
4037 (define-public python2-orderedmultidict
4038 (package-with-python2 python-orderedmultidict))
4039
4040 (define-public python-furl
4041 (package
4042 (name "python-furl")
4043 (version "0.5.6")
4044 (source
4045 (origin
4046 (method url-fetch)
4047 (uri (pypi-uri "furl" version))
4048 (sha256
4049 (base32
4050 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4051 (build-system python-build-system)
4052 (propagated-inputs
4053 `(("python-six" ,python-six)
4054 ("python-orderedmultidict" ,python-orderedmultidict)))
4055 (native-inputs
4056 `(("python-pycodestyle" ,python-pycodestyle)))
4057 (home-page "https://github.com/gruns/furl")
4058 (synopsis "URL manipulation in Python")
4059 (description "Furl provides an easy-to-use alternative to the
4060 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4061 (license license:unlicense)))
4062
4063 (define-public python2-furl
4064 (package-with-python2 python-furl))
4065
4066 (define-public python-flask-babel
4067 (package
4068 (name "python-flask-babel")
4069 (version "0.11.1")
4070 (source
4071 (origin
4072 (method url-fetch)
4073 (uri (pypi-uri "Flask-Babel" version))
4074 (sha256
4075 (base32
4076 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4077 (build-system python-build-system)
4078 (propagated-inputs
4079 `(("python-flask" ,python-flask)
4080 ("python-babel" ,python-babel)
4081 ("python-jinja2" ,python-jinja2)
4082 ("python-pytz" ,python-pytz)))
4083 (home-page "https://github.com/python-babel/flask-babel")
4084 (synopsis "Add i18n/l10n support to Flask applications")
4085 (description "This package implements internationalization and localization
4086 support for Flask. This is based on the Python babel module as well as pytz -
4087 both of which are installed automatically if you install this library.")
4088 (license license:bsd-3)))
4089
4090 (define-public python2-flask-babel
4091 (package-with-python2 python-flask-babel))
4092
4093 (define-public python-sqlalchemy-utils
4094 (package
4095 (name "python-sqlalchemy-utils")
4096 (version "0.32.11")
4097 (source
4098 (origin
4099 (method url-fetch)
4100 (uri (pypi-uri "SQLAlchemy-Utils" version))
4101 (sha256
4102 (base32
4103 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4104 (build-system python-build-system)
4105 (propagated-inputs
4106 `(("python-six" ,python-six)
4107 ("python-sqlalchemy" ,python-sqlalchemy)))
4108 (native-inputs
4109 `(("python-pytest" ,python-pytest)))
4110 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4111 (synopsis "Various utility functions for SQLAlchemy")
4112 (description
4113 "SQLAlchemy-utils provides various utility functions and custom data types
4114 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4115
4116 You might also want to install the following optional dependencies:
4117 @enumerate
4118 @item @code{python-passlib}
4119 @item @code{python-babel}
4120 @item @code{python-cryptography}
4121 @item @code{python-pytz}
4122 @item @code{python-psycopg2}
4123 @item @code{python-furl}
4124 @item @code{python-flask-babel}
4125 @end enumerate
4126 ")
4127 (license license:bsd-3)))
4128
4129 (define-public python2-sqlalchemy-utils
4130 (package-with-python2 python-sqlalchemy-utils))
4131
4132 (define-public python-alembic
4133 (package
4134 (name "python-alembic")
4135 (version "0.8.7")
4136 (source
4137 (origin
4138 (method url-fetch)
4139 (uri (pypi-uri "alembic" version))
4140 (sha256
4141 (base32
4142 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
4143 (build-system python-build-system)
4144 (native-inputs
4145 `(("python-mock" ,python-mock)
4146 ("python-pytest-cov" ,python-pytest-cov)))
4147 (propagated-inputs
4148 `(("python-sqlalchemy" ,python-sqlalchemy)
4149 ("python-mako" ,python-mako)
4150 ("python-editor" ,python-editor)))
4151 (home-page "http://bitbucket.org/zzzeek/alembic")
4152 (synopsis
4153 "Database migration tool for SQLAlchemy")
4154 (description
4155 "Alembic is a lightweight database migration tool for usage with the
4156 SQLAlchemy Database Toolkit for Python.")
4157 (license license:expat)))
4158
4159 (define-public python2-alembic
4160 (package-with-python2 python-alembic))
4161
4162 (define-public python-distutils-extra
4163 (package
4164 (name "python-distutils-extra")
4165 (version "2.38")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4170 version "/+download/python-distutils-extra-"
4171 version ".tar.gz"))
4172 (sha256
4173 (base32
4174 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4175 (build-system python-build-system)
4176 (home-page "https://launchpad.net/python-distutils-extra/")
4177 (synopsis "Enhancements to Python's distutils")
4178 (description
4179 "The python-distutils-extra module enables you to easily integrate
4180 gettext support, themed icons, and scrollkeeper-based documentation into
4181 Python's distutils.")
4182 (license license:gpl2)))
4183
4184 (define-public python2-distutils-extra
4185 (package-with-python2 python-distutils-extra))
4186
4187 (define-public python2-elib.intl
4188 (package
4189 (name "python2-elib.intl")
4190 (version "0.0.3")
4191 (source
4192 (origin
4193 ;; This project doesn't tag releases or publish tarballs, so we take
4194 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4195 (method git-fetch)
4196 (uri (git-reference
4197 (url "https://github.com/dieterv/elib.intl.git")
4198 (commit "d09997cfef")))
4199 (sha256
4200 (base32
4201 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4202 (build-system python-build-system)
4203 (arguments
4204 ;; incompatible with Python 3 (exception syntax)
4205 `(#:python ,python-2
4206 #:tests? #f))
4207 (home-page "https://github.com/dieterv/elib.intl")
4208 (synopsis "Enhanced internationalization for Python")
4209 (description
4210 "The elib.intl module provides enhanced internationalization (I18N)
4211 services for your Python modules and applications.")
4212 (license license:lgpl3+)))
4213
4214 (define-public python-pillow
4215 (package
4216 (name "python-pillow")
4217 (version "3.3.3")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (pypi-uri "Pillow" version))
4222 (sha256
4223 (base32
4224 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4225 (build-system python-build-system)
4226 (native-inputs
4227 `(("python-nose" ,python-nose)))
4228 (inputs
4229 `(("freetype" ,freetype)
4230 ("lcms" ,lcms)
4231 ("zlib" ,zlib)
4232 ("libjpeg" ,libjpeg)
4233 ("openjpeg" ,openjpeg)
4234 ("libtiff" ,libtiff)
4235 ("libwebp" ,libwebp)))
4236 (arguments
4237 `(#:phases (modify-phases %standard-phases
4238 (add-after
4239 'install 'check-installed
4240 (lambda* (#:key outputs inputs #:allow-other-keys)
4241 (begin
4242 (setenv "HOME" (getcwd))
4243 ;; Make installed package available for running the
4244 ;; tests
4245 (add-installed-pythonpath inputs outputs)
4246 (and (zero? (system* "python" "selftest.py"
4247 "--installed"))
4248 (zero? (system* "python" "test-installed.py"))))))
4249 (delete 'check))))
4250 (home-page "https://pypi.python.org/pypi/Pillow")
4251 (synopsis "Fork of the Python Imaging Library")
4252 (description
4253 "The Python Imaging Library adds image processing capabilities to your
4254 Python interpreter. This library provides extensive file format support, an
4255 efficient internal representation, and fairly powerful image processing
4256 capabilities. The core image library is designed for fast access to data
4257 stored in a few basic pixel formats. It should provide a solid foundation for
4258 a general image processing tool.")
4259 (license (license:x11-style
4260 "http://www.pythonware.com/products/pil/license.htm"
4261 "The PIL Software License"))))
4262
4263 (define-public python2-pillow
4264 (package-with-python2 python-pillow))
4265
4266 (define-public python-pycparser
4267 (package
4268 (name "python-pycparser")
4269 (version "2.17")
4270 (source
4271 (origin
4272 (method url-fetch)
4273 (uri (pypi-uri "pycparser" version))
4274 (sha256
4275 (base32
4276 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4277 (outputs '("out" "doc"))
4278 (build-system python-build-system)
4279 (native-inputs
4280 `(("pkg-config" ,pkg-config)))
4281 (arguments
4282 `(#:phases
4283 (modify-phases %standard-phases
4284 (replace 'check
4285 (lambda _
4286 (with-directory-excursion "tests"
4287 (zero? (system* "python" "all_tests.py")))))
4288 (add-after 'install 'install-doc
4289 (lambda* (#:key outputs #:allow-other-keys)
4290 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4291 (doc (string-append data "/doc/" ,name "-" ,version))
4292 (examples (string-append doc "/examples")))
4293 (mkdir-p examples)
4294 (for-each (lambda (file)
4295 (copy-file (string-append "." file)
4296 (string-append doc file)))
4297 '("/README.rst" "/CHANGES" "/LICENSE"))
4298 (copy-recursively "examples" examples)))))))
4299 (home-page "https://github.com/eliben/pycparser")
4300 (synopsis "C parser in Python")
4301 (description
4302 "Pycparser is a complete parser of the C language, written in pure Python
4303 using the PLY parsing library. It parses C code into an AST and can serve as
4304 a front-end for C compilers or analysis tools.")
4305 (license license:bsd-3)))
4306
4307 (define-public python2-pycparser
4308 (package-with-python2 python-pycparser))
4309
4310 (define-public python-cffi
4311 (package
4312 (name "python-cffi")
4313 (version "1.4.2")
4314 (source
4315 (origin
4316 (method url-fetch)
4317 (uri (pypi-uri "cffi" version))
4318 (sha256
4319 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4320 (build-system python-build-system)
4321 (outputs '("out" "doc"))
4322 (inputs
4323 `(("libffi" ,libffi)))
4324 (propagated-inputs ; required at run-time
4325 `(("python-pycparser" ,python-pycparser)))
4326 (native-inputs
4327 `(("pkg-config" ,pkg-config)
4328 ("python-sphinx" ,python-sphinx)
4329 ("python-pytest" ,python-pytest)))
4330 (arguments
4331 `(#:phases
4332 (alist-cons-after
4333 'install 'install-doc
4334 (lambda* (#:key outputs #:allow-other-keys)
4335 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4336 (doc (string-append data "/doc/" ,name "-" ,version))
4337 (html (string-append doc "/html")))
4338 (with-directory-excursion "doc"
4339 (system* "make" "html")
4340 (mkdir-p html)
4341 (copy-recursively "build/html" html))
4342 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4343 %standard-phases)))
4344 (home-page "http://cffi.readthedocs.org")
4345 (synopsis "Foreign function interface for Python")
4346 (description
4347 "Foreign Function Interface for Python calling C code.")
4348 (license license:expat)))
4349
4350 (define-public python2-cffi
4351 (package-with-python2 python-cffi))
4352
4353 (define-public python-xcffib
4354 (package
4355 (name "python-xcffib")
4356 (version "0.1.9")
4357 (source
4358 (origin
4359 (method url-fetch)
4360 (uri (string-append "https://pypi.python.org/packages/source/x/"
4361 "xcffib/xcffib-" version ".tar.gz"))
4362 (sha256
4363 (base32
4364 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4365 (build-system python-build-system)
4366 (inputs
4367 `(("libxcb" ,libxcb)))
4368 (propagated-inputs
4369 `(("python-cffi" ,python-cffi) ; used at run time
4370 ("python-six" ,python-six)))
4371 (arguments
4372 `(#:phases
4373 (alist-cons-after
4374 'install 'install-doc
4375 (lambda* (#:key outputs #:allow-other-keys)
4376 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4377 "/doc/" ,name "-" ,version)))
4378 (mkdir-p doc)
4379 (copy-file "README.md"
4380 (string-append doc "/README.md"))))
4381 %standard-phases)))
4382 (home-page "https://github.com/tych0/xcffib")
4383 (synopsis "XCB Python bindings")
4384 (description
4385 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4386 support for Python 3 and PyPy. It is based on cffi.")
4387 (license license:expat)))
4388
4389 (define-public python2-xcffib
4390 (package-with-python2 python-xcffib))
4391
4392 (define-public python-cairocffi
4393 (package
4394 (name "python-cairocffi")
4395 (version "0.6")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 ;; The archive on pypi is missing the 'utils' directory!
4400 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4401 version ".tar.gz"))
4402 (file-name (string-append name "-" version ".tar.gz"))
4403 (sha256
4404 (base32
4405 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4406 (build-system python-build-system)
4407 (outputs '("out" "doc"))
4408 (inputs
4409 `(("gdk-pixbuf" ,gdk-pixbuf)
4410 ("cairo" ,cairo)))
4411 (native-inputs
4412 `(("pkg-config" ,pkg-config)
4413 ("python-sphinx" ,python-sphinx)
4414 ("python-docutils" ,python-docutils)))
4415 (propagated-inputs
4416 `(("python-xcffib" ,python-xcffib))) ; used at run time
4417 (arguments
4418 `(#:phases
4419 (alist-cons-after
4420 'install 'install-doc
4421 (lambda* (#:key inputs outputs #:allow-other-keys)
4422 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4423 (doc (string-append data "/doc/" ,name "-" ,version))
4424 (html (string-append doc "/html")))
4425 (setenv "LD_LIBRARY_PATH"
4426 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4427 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4428 (setenv "LANG" "en_US.UTF-8")
4429 (mkdir-p html)
4430 (for-each (lambda (file)
4431 (copy-file (string-append "." file)
4432 (string-append doc file)))
4433 '("/README.rst" "/CHANGES" "/LICENSE"))
4434 (system* "python" "setup.py" "build_sphinx")
4435 (copy-recursively "docs/_build/html" html)))
4436 %standard-phases)))
4437 (home-page "https://github.com/SimonSapin/cairocffi")
4438 (synopsis "Python bindings and object-oriented API for Cairo")
4439 (description
4440 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4441 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4442 graphics library with support for multiple backends including image buffers,
4443 PNG, PostScript, PDF, and SVG file output.")
4444 (license license:bsd-3)))
4445
4446 (define-public python2-cairocffi
4447 (package-with-python2 python-cairocffi))
4448
4449 (define-public python-decorator
4450 (package
4451 (name "python-decorator")
4452 (version "4.0.10")
4453 (source
4454 (origin
4455 (method url-fetch)
4456 (uri (pypi-uri "decorator" version))
4457 (sha256
4458 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4459 (build-system python-build-system)
4460 (arguments '(#:tests? #f)) ; no test target
4461 (home-page "https://pypi.python.org/pypi/decorator/")
4462 (synopsis "Python module to simplify usage of decorators")
4463 (description
4464 "The aim of the decorator module is to simplify the usage of decorators
4465 for the average programmer, and to popularize decorators usage giving examples
4466 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4467 etc. The core of this module is a decorator factory.")
4468 (license license:expat)))
4469
4470 (define-public python2-decorator
4471 (package-with-python2 python-decorator))
4472
4473 (define-public python-drmaa
4474 (package
4475 (name "python-drmaa")
4476 (version "0.7.6")
4477 (source
4478 (origin
4479 (method url-fetch)
4480 (uri (string-append
4481 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4482 version ".tar.gz"))
4483 (sha256
4484 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4485 (build-system python-build-system)
4486 ;; The test suite requires libdrmaa which is provided by the cluster
4487 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4488 ;; should be set to the path of the libdrmaa library.
4489 (arguments '(#:tests? #f))
4490 (native-inputs
4491 `(("python-nose" ,python-nose)))
4492 (home-page "https://pypi.python.org/pypi/drmaa")
4493 (synopsis "Python bindings for the DRMAA library")
4494 (description
4495 "A Python package for Distributed Resource Management (DRM) job
4496 submission and control. This package is an implementation of the DRMAA 1.0
4497 Python language binding specification.")
4498 (license license:bsd-3)))
4499
4500 (define-public python2-drmaa
4501 (package-with-python2 python-drmaa))
4502
4503 (define-public python-gridmap
4504 (package
4505 (name "python-gridmap")
4506 (version "0.13.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (string-append
4511 "https://github.com/pygridtools/gridmap/archive/v"
4512 version ".tar.gz"))
4513 (file-name (string-append name "-" version ".tar.gz"))
4514 (sha256
4515 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4516 (build-system python-build-system)
4517 (propagated-inputs
4518 `(("python-psutil" ,python-psutil)
4519 ("python-drmaa" ,python-drmaa)
4520 ("python-pyzmq" ,python-pyzmq)))
4521 (home-page "https://github.com/pygridtools/gridmap")
4522 (synopsis "Create jobs on a cluster directly from Python")
4523 (description
4524 "Gridmap is a Python package to allow you to easily create jobs on the
4525 cluster directly from Python. You can directly map Python functions onto the
4526 cluster without needing to write any wrapper code yourself.")
4527 (license license:gpl3+)))
4528
4529 (define-public python2-gridmap
4530 (package-with-python2 python-gridmap))
4531
4532 (define-public python-pexpect
4533 (package
4534 (name "python-pexpect")
4535 (version "3.3")
4536 (source
4537 (origin
4538 (method url-fetch)
4539 (uri (string-append "https://pypi.python.org/packages/source/p/"
4540 "pexpect/pexpect-" version ".tar.gz"))
4541 (sha256
4542 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4543 (build-system python-build-system)
4544 (arguments
4545 `(#:phases
4546 (modify-phases %standard-phases
4547 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4548 (native-inputs
4549 `(("python-nose" ,python-nose)))
4550 (home-page "http://pexpect.readthedocs.org/")
4551 (synopsis "Controlling interactive console applications")
4552 (description
4553 "Pexpect is a pure Python module for spawning child applications;
4554 controlling them; and responding to expected patterns in their output.
4555 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4556 child application and control it as if a human were typing commands.")
4557 (license license:isc)))
4558
4559 (define-public python2-pexpect
4560 (package-with-python2 python-pexpect))
4561
4562 (define-public python-setuptools-scm
4563 (package
4564 (name "python-setuptools-scm")
4565 (version "1.11.1")
4566 (source (origin
4567 (method url-fetch)
4568 (uri (pypi-uri "setuptools_scm" version))
4569 (sha256
4570 (base32
4571 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4572 (build-system python-build-system)
4573 (home-page "https://github.com/pypa/setuptools_scm/")
4574 (synopsis "Manage Python package versions in SCM metadata")
4575 (description
4576 "Setuptools_scm handles managing your Python package versions in
4577 @dfn{software configuration management} (SCM) metadata instead of declaring
4578 them as the version argument or in a SCM managed file.")
4579 (license license:expat)))
4580
4581 (define-public python2-setuptools-scm
4582 (package-with-python2 python-setuptools-scm))
4583
4584 (define-public python-pathpy
4585 (package
4586 (name "python-pathpy")
4587 (version "8.1.1")
4588 (source
4589 (origin
4590 (method url-fetch)
4591 (uri (string-append "https://pypi.python.org/packages/source/p/"
4592 "path.py/path.py-" version ".tar.gz"))
4593 (sha256
4594 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4595 (outputs '("out" "doc"))
4596 (build-system python-build-system)
4597 (propagated-inputs
4598 `(("python-appdirs" ,python-appdirs)))
4599 (native-inputs
4600 `(("python-setuptools-scm" ,python-setuptools-scm)
4601 ("python-sphinx" ,python-sphinx)
4602 ("python-rst.linker" ,python-rst.linker)
4603 ("python-pytest" ,python-pytest)
4604 ("python-pytest-runner" ,python-pytest-runner)))
4605 (arguments
4606 `(#:phases
4607 (modify-phases %standard-phases
4608 (add-after 'build 'build-doc
4609 (lambda _
4610 (setenv "LANG" "en_US.UTF-8")
4611 (zero? (system* "python" "setup.py" "build_sphinx"))))
4612 (add-after 'install 'install-doc
4613 (lambda* (#:key outputs #:allow-other-keys)
4614 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4615 (doc (string-append data "/doc/" ,name "-" ,version))
4616 (html (string-append doc "/html")))
4617 (mkdir-p html)
4618 (for-each (lambda (file)
4619 (copy-file file (string-append doc "/" file)))
4620 '("README.rst" "CHANGES.rst"))
4621 (copy-recursively "build/sphinx/html" html)))))))
4622 (home-page "http://github.com/jaraco/path.py")
4623 (synopsis "Python module wrapper for built-in os.path")
4624 (description
4625 "@code{path.py} implements path objects as first-class entities, allowing
4626 common operations on files to be invoked on those path objects directly.")
4627 (license license:expat)))
4628
4629 (define-public python2-pathpy
4630 (package-with-python2 python-pathpy))
4631
4632 (define-public python-pickleshare
4633 (package
4634 (name "python-pickleshare")
4635 (version "0.5")
4636 (source
4637 (origin
4638 (method url-fetch)
4639 (uri (string-append "https://pypi.python.org/packages/source/p/"
4640 "pickleshare/pickleshare-" version ".tar.gz"))
4641 (sha256
4642 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4643 (build-system python-build-system)
4644 (propagated-inputs
4645 `(("python-pathpy" ,python-pathpy)))
4646 (home-page "https://github.com/vivainio/pickleshare")
4647 (synopsis "Tiny key value database with concurrency support")
4648 (description
4649 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4650 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4651 shelve, many processes can access the database simultaneously. Changing a
4652 value in database is immediately visible to other processes accessing the same
4653 database. Concurrency is possible because the values are stored in separate
4654 files. Hence the “database” is a directory where all files are governed by
4655 PickleShare.")
4656 (license license:expat)))
4657
4658 (define-public python2-pickleshare
4659 (package-with-python2 python-pickleshare))
4660
4661 (define-public python-simplegeneric
4662 (package
4663 (name "python-simplegeneric")
4664 (version "0.8.1")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (string-append "https://pypi.python.org/packages/source/s/"
4669 "simplegeneric/simplegeneric-" version ".zip"))
4670 (sha256
4671 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4672 (build-system python-build-system)
4673 (native-inputs
4674 `(("unzip" ,unzip)))
4675 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4676 (synopsis "Python module for simple generic functions")
4677 (description
4678 "The simplegeneric module lets you define simple single-dispatch generic
4679 functions, akin to Python’s built-in generic functions like @code{len()},
4680 @code{iter()} and so on. However, instead of using specially-named methods,
4681 these generic functions use simple lookup tables, akin to those used by
4682 e.g. @code{pickle.dump()} and other generic functions found in the Python
4683 standard library.")
4684 (license license:zpl2.1)))
4685
4686 (define-public python2-simplegeneric
4687 (package-with-python2 python-simplegeneric))
4688
4689 (define-public python-ipython-genutils
4690 ;; TODO: This package is retired, check if can be removed, see description.
4691 (package
4692 (name "python-ipython-genutils")
4693 (version "0.1.0")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (string-append "https://pypi.python.org/packages/source/i/"
4698 "ipython_genutils/ipython_genutils-"
4699 version ".tar.gz"))
4700 (sha256
4701 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4702 (build-system python-build-system)
4703 (arguments `(#:tests? #f)) ; no tests
4704 (home-page "http://ipython.org")
4705 (synopsis "Vestigial utilities from IPython")
4706 (description
4707 "This package provides retired utilities from IPython. No packages
4708 outside IPython/Jupyter should depend on it.
4709
4710 This package shouldn't exist. It contains some common utilities shared by
4711 Jupyter and IPython projects during The Big Split. As soon as possible, those
4712 packages will remove their dependency on this, and this package will go
4713 away.")
4714 (license license:bsd-3)))
4715
4716 (define-public python2-ipython-genutils
4717 (package-with-python2 python-ipython-genutils))
4718
4719 (define-public python-traitlets
4720 (package
4721 (name "python-traitlets")
4722 (version "4.2.0")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (pypi-uri "traitlets" version))
4727 (sha256
4728 (base32
4729 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4730 (build-system python-build-system)
4731 (arguments
4732 `(#:phases
4733 (modify-phases %standard-phases
4734 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4735 (propagated-inputs
4736 `(("python-ipython-genutils" ,python-ipython-genutils)
4737 ("python-decorator" ,python-decorator)))
4738 (native-inputs
4739 `(("python-mock" ,python-mock)
4740 ("python-nose" ,python-nose)))
4741 (home-page "http://ipython.org")
4742 (synopsis "Configuration system for Python applications")
4743 (description
4744 "Traitlets is a framework that lets Python classes have attributes with
4745 type checking, dynamically calculated default values, and ‘on change’
4746 callbacks. The package also includes a mechanism to use traitlets for
4747 configuration, loading values from files or from command line arguments. This
4748 is a distinct layer on top of traitlets, so you can use traitlets in your code
4749 without using the configuration machinery.")
4750 (license license:bsd-3)))
4751
4752 (define-public python2-traitlets
4753 (package-with-python2 python-traitlets))
4754
4755 (define-public python-jupyter-core
4756 (package
4757 (name "python-jupyter-core")
4758 (version "4.2.1")
4759 (source
4760 (origin
4761 (method url-fetch)
4762 (uri (string-append (pypi-uri "jupyter_core" version)))
4763 (sha256
4764 (base32
4765 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4766 (build-system python-build-system)
4767 ;; FIXME: not sure how to run the tests
4768 (arguments `(#:tests? #f))
4769 (propagated-inputs
4770 `(("python-traitlets" ,python-traitlets)))
4771 (home-page "http://jupyter.org/")
4772 (synopsis "Jupyter base package")
4773 (description
4774 "Jupyter core is the base package on which Jupyter projects rely.")
4775 (license license:bsd-3)))
4776
4777 (define-public python2-jupyter-core
4778 (package-with-python2 python-jupyter-core))
4779
4780 (define-public python-jupyter-client
4781 (package
4782 (name "python-jupyter-client")
4783 (version "4.4.0")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "jupyter_client" version))
4788 (sha256
4789 (base32
4790 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4791 (build-system python-build-system)
4792 ;; Tests fail because of missing native python kernel which I assume is
4793 ;; provided by the ipython package, which we cannot use because it would
4794 ;; cause a dependency cycle.
4795 (arguments `(#:tests? #f))
4796 (propagated-inputs
4797 `(("python-pyzmq" ,python-pyzmq)
4798 ("python-traitlets" ,python-traitlets)
4799 ("python-jupyter-core" ,python-jupyter-core)))
4800 (home-page "http://jupyter.org/")
4801 (synopsis "Jupyter protocol implementation and client libraries")
4802 (description
4803 "The @code{jupyter_client} package contains the reference implementation
4804 of the Jupyter protocol. It also provides client and kernel management APIs
4805 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4806 installing @code{kernelspec}s for use with Jupyter frontends.")
4807 (license license:bsd-3)))
4808
4809 (define-public python2-jupyter-client
4810 (package-with-python2 python-jupyter-client))
4811
4812 (define-public python-ipykernel
4813 (package
4814 (name "python-ipykernel")
4815 (version "4.5.2")
4816 (source
4817 (origin
4818 (method url-fetch)
4819 (uri (pypi-uri "ipykernel" version))
4820 (sha256
4821 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4822 (build-system python-build-system)
4823 ;; The tests load a submodule of IPython. However, IPython itself depends
4824 ;; on ipykernel.
4825 (arguments `(#:tests? #f))
4826 (propagated-inputs
4827 ;; imported at runtime during connect
4828 `(("python-jupyter-client" ,python-jupyter-client)))
4829 (home-page "http://ipython.org")
4830 (synopsis "IPython Kernel for Jupyter")
4831 (description
4832 "This package provides the IPython kernel for Jupyter.")
4833 (license license:bsd-3)))
4834
4835 (define-public python2-ipykernel
4836 (package-with-python2 python-ipykernel))
4837
4838 (define-public python-testpath
4839 (package
4840 (name "python-testpath")
4841 (version "0.2")
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4846 version ".tar.gz"))
4847 (file-name (string-append name "-" version ".tar.gz"))
4848 (sha256
4849 (base32
4850 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4851 (build-system python-build-system)
4852 (arguments
4853 `(#:tests? #f ; this package does not even have a setup.py
4854 #:phases
4855 (modify-phases %standard-phases
4856 (delete 'install)
4857 (replace 'build
4858 (lambda* (#:key inputs outputs #:allow-other-keys)
4859 (let ((dir (string-append
4860 (assoc-ref outputs "out")
4861 "/lib/python"
4862 (string-take (string-take-right
4863 (assoc-ref inputs "python") 5) 3)
4864 "/site-packages/testpath")))
4865 (mkdir-p dir)
4866 (copy-recursively "testpath" dir))
4867 #t)))))
4868 (home-page "https://github.com/takluyver/testpath")
4869 (synopsis "Test utilities for code working with files and commands")
4870 (description
4871 "Testpath is a collection of utilities for Python code working with files
4872 and commands. It contains functions to check things on the filesystem, and
4873 tools for mocking system commands and recording calls to those.")
4874 (license license:expat)))
4875
4876 (define-public python2-testpath
4877 (package-with-python2 python-testpath))
4878
4879 (define-public python-ipython
4880 (package
4881 (name "python-ipython")
4882 (version "4.0.3")
4883 (source
4884 (origin
4885 (method url-fetch)
4886 (uri (pypi-uri "ipython" version ".tar.gz"))
4887 (sha256
4888 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
4889 (build-system python-build-system)
4890 (outputs '("out" "doc"))
4891 (propagated-inputs
4892 `(("python-pyzmq" ,python-pyzmq)
4893 ("python-terminado" ,python-terminado)
4894 ("python-matplotlib" ,python-matplotlib)
4895 ("python-numpy" ,python-numpy)
4896 ("python-numpydoc" ,python-numpydoc)
4897 ("python-jinja2" ,python-jinja2)
4898 ("python-mistune" ,python-mistune)
4899 ("python-pexpect" ,python-pexpect)
4900 ("python-pickleshare" ,python-pickleshare)
4901 ("python-simplegeneric" ,python-simplegeneric)
4902 ("python-jsonschema" ,python-jsonschema)
4903 ("python-traitlets" ,python-traitlets)
4904 ("python-ipykernel" ,python-ipykernel)
4905 ("python-pygments" ,python-pygments)))
4906 (inputs
4907 `(("readline" ,readline)
4908 ("which" ,which)))
4909 (native-inputs
4910 `(("pkg-config" ,pkg-config)
4911 ("python-requests" ,python-requests) ;; for tests
4912 ("python-testpath" ,python-testpath)
4913 ("python-nose" ,python-nose)
4914 ("python-sphinx" ,python-sphinx)
4915 ("texlive" ,texlive)
4916 ("texinfo" ,texinfo)))
4917 (arguments
4918 `(#:phases
4919 (modify-phases %standard-phases
4920 (add-after
4921 'install 'install-doc
4922 (lambda* (#:key inputs outputs #:allow-other-keys)
4923 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4924 (doc (string-append data "/doc/" ,name "-" ,version))
4925 (html (string-append doc "/html"))
4926 (man1 (string-append data "/man/man1"))
4927 (info (string-append data "/info"))
4928 (examples (string-append doc "/examples")))
4929 (setenv "LANG" "en_US.utf8")
4930 ;; Make installed package available for running the tests
4931 (add-installed-pythonpath inputs outputs)
4932 (with-directory-excursion "docs"
4933 ;; FIXME: pdf fails to build
4934 ;;(system* "make" "pdf" "PAPER=a4")
4935 (system* "make" "html")
4936 (system* "make" "info"))
4937 (copy-recursively "docs/man" man1)
4938 (copy-recursively "examples" examples)
4939 (copy-recursively "docs/build/html" html)
4940 ;; (copy-file "docs/build/latex/ipython.pdf"
4941 ;; (string-append doc "/ipython.pdf"))
4942 (mkdir-p info)
4943 (copy-file "docs/build/texinfo/ipython.info"
4944 (string-append info "/ipython.info"))
4945 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4946 ;; Tests can only be run after the library has been installed and not
4947 ;; within the source directory.
4948 (delete 'check)
4949 (add-after
4950 'install 'check
4951 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4952 (if tests?
4953 (with-directory-excursion "/tmp"
4954 ;; Make installed package available for running the tests
4955 (add-installed-pythonpath inputs outputs)
4956 (setenv "HOME" "/tmp/") ;; required by a test
4957 (zero? (system* (string-append (assoc-ref outputs "out")
4958 "/bin/iptest"))))
4959 #t)))
4960 (add-before
4961 'install 'fix-tests
4962 (lambda* (#:key inputs #:allow-other-keys)
4963 (substitute* "./IPython/utils/_process_posix.py"
4964 (("/usr/bin/env', 'which") (which "which")))
4965 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4966 (("#!/usr/bin/env python")
4967 (string-append "#!" (which "python"))))
4968 ;; Disable 1 failing test
4969 (substitute* "./IPython/core/tests/test_magic.py"
4970 (("def test_dirops\\(\\):" all)
4971 (string-append "@dec.skipif(True)\n" all))))))))
4972 (home-page "http://ipython.org")
4973 (synopsis "IPython is a tool for interactive computing in Python")
4974 (description
4975 "IPython provides a rich architecture for interactive computing with:
4976 Powerful interactive shells, a browser-based notebook, support for interactive
4977 data visualization, embeddable interpreters and tools for parallel
4978 computing.")
4979 (license license:bsd-3)
4980 (properties `((python2-variant . ,(delay python2-ipython))))))
4981
4982 (define-public python2-ipython
4983 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4984 (package
4985 (inherit ipython)
4986 ;; FIXME: some tests are failing
4987 (arguments
4988 `(#:tests? #f ,@(package-arguments ipython)))
4989 ;; FIXME: add pyreadline once available.
4990 (native-inputs
4991 `(("python2-mock" ,python2-mock)
4992 ,@(package-native-inputs ipython))))))
4993
4994 (define-public python-isodate
4995 (package
4996 (name "python-isodate")
4997 (version "0.5.4")
4998 (source
4999 (origin
5000 (method url-fetch)
5001 (uri (pypi-uri "isodate" version))
5002 (sha256
5003 (base32
5004 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5005 (build-system python-build-system)
5006 (home-page
5007 "http://cheeseshop.python.org/pypi/isodate")
5008 (synopsis
5009 "Python date parser and formatter")
5010 (description
5011 "Python-isodate is a python module for parsing and formatting
5012 ISO 8601 dates, time and duration.")
5013 (license license:bsd-3)))
5014
5015 (define-public python2-isodate
5016 (package-with-python2 python-isodate))
5017
5018 (define-public python-html5lib
5019 (package
5020 (name "python-html5lib")
5021 (version "1.0b10")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "html5lib" version))
5026 (sha256
5027 (base32
5028 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5029 (build-system python-build-system)
5030 (propagated-inputs
5031 `(("python-six" ,python-six)
5032 ("python-webencodings" ,python-webencodings)))
5033 (arguments
5034 `(#:test-target "check"))
5035 (home-page
5036 "https://github.com/html5lib/html5lib-python")
5037 (synopsis
5038 "Python HTML parser based on the WHATWG HTML specifcation")
5039 (description
5040 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5041 and written in Python.")
5042 (license license:expat)))
5043
5044 (define-public python2-html5lib
5045 (package-with-python2 python-html5lib))
5046
5047 ;; Needed for python-bleach, a dependency of python-notebook
5048 (define-public python-html5lib-0.9
5049 (package
5050 (inherit python-html5lib)
5051 (version "0.999")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "html5lib" version))
5056 (sha256
5057 (base32
5058 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5059
5060 (define-public python2-html5lib-0.9
5061 (package-with-python2 python-html5lib-0.9))
5062
5063 (define-public python-webencodings
5064 (package
5065 (name "python-webencodings")
5066 (version "0.5")
5067 (source (origin
5068 (method url-fetch)
5069 (uri (pypi-uri "webencodings" version))
5070 (sha256
5071 (base32
5072 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5073 (build-system python-build-system)
5074 (arguments
5075 '(#:phases
5076 (modify-phases %standard-phases
5077 (replace 'check
5078 (lambda _
5079 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5080 (native-inputs
5081 `(("python-pytest" ,python-pytest)))
5082 (home-page "https://github.com/SimonSapin/python-webencodings")
5083 (synopsis "Character encoding aliases for legacy web content")
5084 (description
5085 "In order to be compatible with legacy web content when interpreting
5086 something like @code{Content-Type: text/html; charset=latin1}, tools need
5087 to use a particular set of aliases for encoding labels as well as some
5088 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5089 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5090 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5091 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5092 defines all such details so that implementations do not have to
5093 reverse-engineer each other.
5094
5095 This module implements the Encoding standard and has encoding labels and
5096 BOM detection, but the actual implementation for encoders and decoders
5097 is Python’s.")
5098 (license license:bsd-3)))
5099
5100 (define-public python2-webencodings
5101 (package-with-python2 python-webencodings))
5102
5103 (define-public python-urwid
5104 (package
5105 (name "python-urwid")
5106 (version "1.3.1")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (pypi-uri "urwid" version))
5111 (sha256
5112 (base32
5113 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5114 (build-system python-build-system)
5115 (arguments
5116 `(#:phases
5117 (modify-phases %standard-phases
5118 ;; Disable failing test. Bug filed upstream:
5119 ;; https://github.com/wardi/urwid/issues/164
5120 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5121 (add-after 'unpack 'disable-failing-test
5122 (lambda _
5123 (substitute* "urwid/tests/test_event_loops.py"
5124 (("test_remove_watch_file")
5125 "disable_remove_watch_file")))))))
5126 (home-page "http://urwid.org")
5127 (synopsis "Console user interface library for Python")
5128 (description
5129 "Urwid is a curses-based UI/widget library for Python. It includes many
5130 features useful for text console applications.")
5131 (license license:lgpl2.1+)))
5132
5133 (define-public python2-urwid
5134 (package-with-python2 python-urwid))
5135
5136 (define-public python2-openid
5137 (package
5138 (name "python2-openid")
5139 (version "2.2.5")
5140 (source
5141 (origin
5142 (method url-fetch)
5143 (uri (pypi-uri "python-openid" version))
5144 (sha256
5145 (base32
5146 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5147 (build-system python-build-system)
5148 (arguments
5149 ;; Python 3 support is in `python3-openid`, a separate package.
5150 `(#:python ,python-2))
5151 (home-page "https://github.com/openid/python-openid")
5152 (synopsis "OpenID support for servers and consumers")
5153 (description "This library provides OpenID authentication for Python, both
5154 for clients and servers.")
5155 (license license:asl2.0)))
5156
5157 (define-public python-urwidtrees
5158 (package
5159 (name "python-urwidtrees")
5160 (version "1.0.2")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 ;; package author intends on distributing via github rather than pypi:
5165 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5166 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5167 version ".tar.gz"))
5168 (file-name (string-append name "-" version ".tar.gz"))
5169 (sha256
5170 (base32
5171 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5172 (build-system python-build-system)
5173 (arguments
5174 '(#:tests? #f)) ; no tests
5175 (propagated-inputs `(("python-urwid" ,python-urwid)))
5176 (home-page "https://github.com/pazz/urwidtrees")
5177 (synopsis "Tree widgets for urwid")
5178 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5179 toolkit. Use it to build trees of widgets.")
5180 (license license:gpl3+)))
5181
5182 (define-public python2-urwidtrees
5183 (package-with-python2 python-urwidtrees))
5184
5185 (define-public python-dbus
5186 (package
5187 (name "python-dbus")
5188 (version "1.2.0")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (string-append
5193 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5194 version ".tar.gz"))
5195 (sha256
5196 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5197 (build-system gnu-build-system)
5198 (arguments
5199 '(#:phases
5200 (modify-phases %standard-phases
5201 (add-before
5202 'check 'pre-check
5203 (lambda _
5204 ;; XXX: For the missing '/etc/machine-id'.
5205 (substitute* "test/run-test.sh"
5206 (("DBUS_FATAL_WARNINGS=1")
5207 "DBUS_FATAL_WARNINGS=0"))
5208 #t)))))
5209 (native-inputs
5210 `(("pkg-config" ,pkg-config)))
5211 (inputs
5212 `(("python" ,python)
5213 ("dbus-glib" ,dbus-glib)))
5214 (synopsis "Python bindings for D-bus")
5215 (description "python-dbus provides bindings for libdbus, the reference
5216 implementation of D-Bus.")
5217 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5218 (license license:expat)))
5219
5220 (define-public python2-dbus
5221 (package (inherit python-dbus)
5222 (name "python2-dbus")
5223 (inputs `(("python" ,python-2)
5224 ,@(alist-delete "python"
5225 (package-inputs python-dbus)
5226 equal?)))
5227 ;; FIXME: on Python 2, the test_utf8 fails with:
5228 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5229 (arguments `(#:tests? #f))))
5230
5231 (define-public python-apsw
5232 (package
5233 (name "python-apsw")
5234 (version "3.9.2-r1")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (pypi-uri "apsw" version))
5239 (sha256
5240 (base32
5241 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5242 (build-system python-build-system)
5243 (inputs
5244 `(("sqlite" ,sqlite)))
5245 (arguments
5246 `(#:phases
5247 ;; swap check and install phases
5248 (alist-cons-after
5249 'install 'check
5250 (assoc-ref %standard-phases 'check)
5251 (alist-delete
5252 'check
5253 %standard-phases))))
5254 (home-page "https://github.com/rogerbinns/apsw/")
5255 (synopsis "Another Python SQLite Wrapper")
5256 (description "APSW is a Python wrapper for the SQLite
5257 embedded relational database engine. In contrast to other wrappers such as
5258 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5259 translate the complete SQLite API into Python.")
5260 (license license:zlib)))
5261
5262 (define-public python2-apsw
5263 (package-with-python2 python-apsw))
5264
5265 (define-public python-lxml
5266 (package
5267 (name "python-lxml")
5268 (version "3.6.0")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (pypi-uri "lxml" version))
5273 (sha256
5274 (base32
5275 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5276 (build-system python-build-system)
5277 (inputs
5278 `(("libxml2" ,libxml2)
5279 ("libxslt" ,libxslt)))
5280 (home-page "http://lxml.de/")
5281 (synopsis
5282 "Python XML processing library")
5283 (description
5284 "The lxml XML toolkit is a Pythonic binding for the C libraries
5285 libxml2 and libxslt.")
5286 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5287
5288 (define-public python2-lxml
5289 (package-with-python2 python-lxml))
5290
5291 ;; beautifulsoup4 has a totally different namespace than 3.x,
5292 ;; and pypi seems to put it under its own name, so I guess we should too
5293 (define-public python-beautifulsoup4
5294 (package
5295 (name "python-beautifulsoup4")
5296 (version "4.5.1")
5297 (source
5298 (origin
5299 (method url-fetch)
5300 (uri (pypi-uri "beautifulsoup4" version))
5301 (sha256
5302 (base32
5303 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5304 (build-system python-build-system)
5305 (arguments
5306 `(#:phases
5307 (modify-phases %standard-phases
5308 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5309 ;; must use this conversion script when building with Python 3. The
5310 ;; conversion script also runs the tests.
5311 ;; For more information, see the file 'convert-py3k' in the source
5312 ;; distribution.
5313 (replace 'check
5314 (lambda _ (zero? (system* "./convert-py3k")))))))
5315 (home-page
5316 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5317 (synopsis
5318 "Python screen-scraping library")
5319 (description
5320 "Beautiful Soup is a Python library designed for rapidly setting up
5321 screen-scraping projects. It offers Pythonic idioms for navigating,
5322 searching, and modifying a parse tree, providing a toolkit for
5323 dissecting a document and extracting what you need. It automatically
5324 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5325 (license license:expat)))
5326
5327 (define-public python2-beautifulsoup4
5328 (package
5329 (inherit (package-with-python2
5330 (strip-python2-variant python-beautifulsoup4)))
5331 (arguments `(#:python ,python-2))))
5332
5333 (define-public python2-cssutils
5334 (package
5335 (name "python2-cssutils")
5336 (version "1.0.1")
5337 (source
5338 (origin
5339 (method url-fetch)
5340 (uri (pypi-uri "cssutils" version))
5341 (sha256
5342 (base32
5343 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5344 (build-system python-build-system)
5345 (native-inputs
5346 `(("python2-mock" ,python2-mock) ; for the tests
5347 ("unzip" ,unzip))) ; for unpacking the source
5348 (arguments
5349 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5350 #:tests? #f ; The tests apparently download an external URL.
5351 ))
5352 (home-page "http://cthedot.de/cssutils/")
5353 (synopsis
5354 "CSS Cascading Style Sheets library for Python")
5355 (description
5356 "Cssutils is a Python package for parsing and building CSS
5357 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5358 options.")
5359 (license license:lgpl3+)))
5360
5361 (define-public python-cssselect
5362 (package
5363 (name "python-cssselect")
5364 (version "0.9.2")
5365 (source
5366 (origin
5367 (method url-fetch)
5368 (uri (pypi-uri "cssselect" version))
5369 (sha256
5370 (base32
5371 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5372 (build-system python-build-system)
5373 (arguments
5374 ;; tests fail with message
5375 ;; AttributeError: 'module' object has no attribute 'tests'
5376 `(#:tests? #f))
5377 (home-page
5378 "https://pythonhosted.org/cssselect/")
5379 (synopsis
5380 "CSS3 selector parser and translator to XPath 1.0")
5381 (description
5382 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5383 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5384 another XPath engine to find the matching elements in an XML or HTML document.")
5385 (license license:bsd-3)))
5386
5387 (define-public python2-cssselect
5388 (package-with-python2 python-cssselect))
5389
5390 (define-public python-openid-cla
5391 (package
5392 (name "python-openid-cla")
5393 (version "1.2")
5394 (source
5395 (origin
5396 (method url-fetch)
5397 (uri (pypi-uri "python-openid-cla" version))
5398 (sha256
5399 (base32
5400 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5401 (build-system python-build-system)
5402 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5403 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5404 (description "@code{openid-cla} is an implementation of the OpenID
5405 contributor license agreement extension for python-openid.")
5406 (license license:bsd-3)))
5407
5408 (define-public python2-openid-cla
5409 (package-with-python2 python-openid-cla))
5410
5411 (define-public python-openid-teams
5412 (package
5413 (name "python-openid-teams")
5414 (version "1.1")
5415 (source
5416 (origin
5417 (method url-fetch)
5418 (uri (pypi-uri "python-openid-teams" version))
5419 (sha256
5420 (base32
5421 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5422 (build-system python-build-system)
5423 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5424 (synopsis "Implementation of the OpenID teams extension for python-openid")
5425 (description
5426 "@code{openid-teams} is an implementation of the OpenID
5427 teams extension for python-openid.")
5428 (license license:bsd-3)))
5429
5430 (define-public python2-openid-teams
5431 (package-with-python2 python-openid-teams))
5432
5433 (define-public python-netifaces
5434 (package
5435 (name "python-netifaces")
5436 (version "0.10.4")
5437 (source
5438 (origin
5439 (method url-fetch)
5440 (uri (string-append
5441 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5442 version
5443 ".tar.gz"))
5444 (sha256
5445 (base32
5446 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5447 (build-system python-build-system)
5448 (home-page
5449 "https://bitbucket.org/al45tair/netifaces")
5450 (synopsis
5451 "Python module for portable network interface information")
5452 (description
5453 "Netifaces is a Python module providing information on network
5454 interfaces in an easy and portable manner.")
5455 (license license:expat)))
5456
5457 (define-public python2-netifaces
5458 (package-with-python2 python-netifaces))
5459
5460 (define-public python-networkx
5461 (package
5462 (name "python-networkx")
5463 (version "1.11")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (pypi-uri "networkx" version))
5468 (sha256
5469 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5470 (build-system python-build-system)
5471 ;; python-decorator is needed at runtime
5472 (propagated-inputs
5473 `(("python-decorator" ,python-decorator)))
5474 (native-inputs
5475 `(("python-nose" ,python-nose)))
5476 (home-page "http://networkx.github.io/")
5477 (synopsis "Python module for creating and manipulating graphs and networks")
5478 (description
5479 "NetworkX is a Python package for the creation, manipulation, and study
5480 of the structure, dynamics, and functions of complex networks.")
5481 (license license:bsd-3)))
5482
5483 (define-public python2-networkx
5484 (package-with-python2 python-networkx))
5485
5486 (define-public snakemake
5487 (package
5488 (name "snakemake")
5489 (version "3.2.1")
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (string-append
5494 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5495 version ".tar.gz"))
5496 (sha256
5497 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5498 (build-system python-build-system)
5499 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5500 (synopsis "Python-based execution environment for make-like workflows")
5501 (description
5502 "Snakemake aims to reduce the complexity of creating workflows by
5503 providing a clean and modern domain specific specification language (DSL) in
5504 Python style, together with a fast and comfortable execution environment.")
5505 (license license:expat)))
5506
5507 (define-public python-seaborn
5508 (package
5509 (name "python-seaborn")
5510 (version "0.7.0")
5511 (source
5512 (origin
5513 (method url-fetch)
5514 (uri (pypi-uri "seaborn" version))
5515 (sha256
5516 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5517 (build-system python-build-system)
5518 (propagated-inputs
5519 `(("python-pandas" ,python-pandas)
5520 ("python-matplotlib" ,python-matplotlib)
5521 ("python-scipy" ,python-scipy)))
5522 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5523 (synopsis "Statistical data visualization")
5524 (description
5525 "Seaborn is a library for making attractive and informative statistical
5526 graphics in Python. It is built on top of matplotlib and tightly integrated
5527 with the PyData stack, including support for numpy and pandas data structures
5528 and statistical routines from scipy and statsmodels.")
5529 (license license:bsd-3)
5530 (properties `((python2-variant . ,(delay python2-seaborn))))))
5531
5532 (define-public python2-seaborn
5533 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5534 (package
5535 (inherit base)
5536 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5537 ,@(package-propagated-inputs base))))))
5538
5539 (define-public python-sympy
5540 (package
5541 (name "python-sympy")
5542 (version "0.7.6")
5543 (source
5544 (origin
5545 (method url-fetch)
5546 (uri (string-append
5547 "https://github.com/sympy/sympy/releases/download/sympy-"
5548 version "/sympy-" version ".tar.gz"))
5549 (sha256
5550 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5551 (build-system python-build-system)
5552 (home-page "http://www.sympy.org/")
5553 (synopsis "Python library for symbolic mathematics")
5554 (description
5555 "SymPy is a Python library for symbolic mathematics. It aims to become a
5556 full-featured computer algebra system (CAS) while keeping the code as simple
5557 as possible in order to be comprehensible and easily extensible.")
5558 (license license:bsd-3)))
5559
5560 (define-public python2-sympy
5561 (package-with-python2 python-sympy))
5562
5563 (define-public python-q
5564 (package
5565 (name "python-q")
5566 (version "2.6")
5567 (source
5568 (origin
5569 (method url-fetch)
5570 (uri (pypi-uri "q" version))
5571 (sha256
5572 (base32
5573 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5574 (build-system python-build-system)
5575 (home-page "https://github.com/zestyping/q")
5576 (synopsis "Quick-and-dirty debugging output for tired programmers")
5577 (description
5578 "q is a Python module for \"print\" style of debugging Python code. It
5579 provides convenient short API for print out of values, tracebacks, and
5580 falling into the Python interpreter.")
5581 (license license:asl2.0)))
5582
5583 (define-public python2-q
5584 (package-with-python2 python-q))
5585
5586 (define-public python-testlib
5587 (package
5588 (name "python-testlib")
5589 (version "0.6.5")
5590 (source
5591 (origin
5592 (method url-fetch)
5593 (uri (string-append
5594 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5595 version ".zip"))
5596 (sha256
5597 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5598 (build-system python-build-system)
5599 (native-inputs
5600 `(("unzip" ,unzip))) ; for unpacking the source
5601 (synopsis "Python micro test suite harness")
5602 (description "A micro unittest suite harness for Python.")
5603 (home-page "https://github.com/trentm/testlib")
5604 (license license:expat)))
5605
5606 (define-public python2-testlib
5607 (package-with-python2 python-testlib))
5608
5609 (define-public python2-xlib
5610 (package
5611 (name "python2-xlib")
5612 (version "0.14")
5613 (source (origin
5614 (method url-fetch)
5615 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5616 "/" version "/"
5617 "python-xlib-" version ".tar.gz"))
5618 (sha256
5619 (base32
5620 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5621 (build-system python-build-system)
5622 (arguments
5623 `(#:python ,python-2 ;Python 2 only
5624 #:tests? #f)) ;no tests
5625 (home-page "http://python-xlib.sourceforge.net/")
5626 (synopsis "Python X11 client library")
5627 (description
5628 "The Python X Library is intended to be a fully functional X client
5629 library for Python programs. It is useful to implement low-level X clients.
5630 It is written entirely in Python.")
5631 (license license:gpl2+)))
5632
5633 (define-public python-singledispatch
5634 (package
5635 (name "python-singledispatch")
5636 (version "3.4.0.3")
5637 (source
5638 (origin
5639 (method url-fetch)
5640 (uri (pypi-uri "singledispatch" version))
5641 (sha256
5642 (base32
5643 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5644 (build-system python-build-system)
5645 (native-inputs
5646 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5647 (home-page
5648 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5649 (synopsis "Backport of singledispatch feature from Python 3.4")
5650 (description
5651 "This library brings functools.singledispatch from Python 3.4 to Python
5652 2.6-3.3.")
5653 (license license:expat)))
5654
5655 (define-public python2-singledispatch
5656 (package-with-python2 python-singledispatch))
5657
5658 (define-public python-tornado
5659 (package
5660 (name "python-tornado")
5661 (version "4.3")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (pypi-uri "tornado" version))
5666 (sha256
5667 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5668 (build-system python-build-system)
5669 (native-inputs
5670 `(("python-certifi" ,python-certifi)))
5671 (propagated-inputs
5672 `(("python-backports-abc" ,python-backports-abc)))
5673 (home-page "http://www.tornadoweb.org/")
5674 (synopsis "Python web framework and asynchronous networking library")
5675 (description
5676 "Tornado is a Python web framework and asynchronous networking library,
5677 originally developed at FriendFeed. By using non-blocking network I/O,
5678 Tornado can scale to tens of thousands of open connections, making it ideal
5679 for long polling, WebSockets, and other applications that require a long-lived
5680 connection to each user.")
5681 (license license:asl2.0)
5682 (properties `((python2-variant . ,(delay python2-tornado))))))
5683
5684 (define-public python2-tornado
5685 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5686 (package (inherit tornado)
5687 (propagated-inputs
5688 `(("python2-backport-ssl-match-hostname"
5689 ,python2-backport-ssl-match-hostname)
5690 ("python2-singledispatch" ,python2-singledispatch)
5691 ,@(package-propagated-inputs tornado))))))
5692
5693 ;; the python- version can be removed with python-3.5
5694 (define-public python-backports-abc
5695 (package
5696 (name "python-backports-abc")
5697 (version "0.5")
5698 (source
5699 (origin
5700 (method url-fetch)
5701 (uri (pypi-uri "backports_abc" version))
5702 (sha256
5703 (base32
5704 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5705 (build-system python-build-system)
5706 (home-page "https://github.com/cython/backports_abc")
5707 (synopsis "Backport of additions to the 'collections.abc' module")
5708 (description
5709 "Python-backports-abc provides a backport of additions to the
5710 'collections.abc' module in Python-3.5.")
5711 (license license:psfl)))
5712
5713 (define-public python2-backports-abc
5714 (package-with-python2 python-backports-abc))
5715
5716 (define-public python-waf
5717 (package
5718 (name "python-waf")
5719 (version "1.9.5")
5720 (source (origin
5721 (method url-fetch)
5722 (uri (string-append "https://waf.io/"
5723 "waf-" version ".tar.bz2"))
5724 (sha256
5725 (base32
5726 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5727 (build-system python-build-system)
5728 (arguments
5729 '(#:phases
5730 (modify-phases %standard-phases
5731 (replace 'build
5732 (lambda _
5733 (zero? (system* "python" "waf-light" "configure" "build"))))
5734 (replace 'check
5735 (lambda _
5736 (zero? (system* "python" "waf" "--version"))))
5737 (replace 'install
5738 (lambda _
5739 (copy-file "waf" %output))))))
5740 (home-page "http://waf.io/")
5741 (synopsis "Python-based build system")
5742 (description
5743 "Waf is a Python-based framework for configuring, compiling and installing
5744 applications.")
5745 (license license:bsd-3)))
5746
5747 (define-public python2-waf
5748 (package-with-python2 python-waf))
5749
5750 (define-public python-pyzmq
5751 (package
5752 (name "python-pyzmq")
5753 (version "15.1.0")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "pyzmq" version))
5758 (sha256
5759 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5760 (build-system python-build-system)
5761 (arguments
5762 `(#:configure-flags
5763 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5764 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5765 ;; --inplace' for 'python setup.py test' to work.
5766 #:tests? #f))
5767 (inputs
5768 `(("zeromq" ,zeromq)))
5769 (native-inputs
5770 `(("pkg-config" ,pkg-config)
5771 ("python-nose" ,python-nose)))
5772 (home-page "http://github.com/zeromq/pyzmq")
5773 (synopsis "Python bindings for 0MQ")
5774 (description
5775 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5776 (license license:bsd-4)))
5777
5778 (define-public python2-pyzmq
5779 (package-with-python2 python-pyzmq))
5780
5781 (define-public python-pep8
5782 (package
5783 (name "python-pep8")
5784 (version "1.7.0")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (pypi-uri "pep8" version))
5789 (sha256
5790 (base32
5791 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5792 (build-system python-build-system)
5793 (home-page "http://pep8.readthedocs.org/")
5794 (synopsis "Python style guide checker")
5795 (description
5796 "This tools checks Python code against some of the style conventions in
5797 PEP 8.")
5798 (license license:expat)))
5799
5800 (define-public python2-pep8
5801 (package-with-python2 python-pep8))
5802
5803 (define-public python-pyflakes
5804 (package
5805 (name "python-pyflakes")
5806 (version "1.0.0")
5807 (source
5808 (origin
5809 (method url-fetch)
5810 (uri (pypi-uri "pyflakes" version))
5811 (sha256
5812 (base32
5813 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5814 (build-system python-build-system)
5815 (home-page
5816 "https://github.com/pyflakes/pyflakes")
5817 (synopsis "Passive checker of Python programs")
5818 (description
5819 "Pyflakes statically checks Python source code for common errors.")
5820 (license license:expat)))
5821
5822 (define-public python2-pyflakes
5823 (package-with-python2 python-pyflakes))
5824
5825 (define-public python-mccabe
5826 (package
5827 (name "python-mccabe")
5828 (version "0.4.0")
5829 (source
5830 (origin
5831 (method url-fetch)
5832 (uri (pypi-uri "mccabe" version))
5833 (sha256
5834 (base32
5835 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5836 (build-system python-build-system)
5837 (native-inputs
5838 `(("python-pytest" ,python-pytest)
5839 ("python-pytest-runner" ,python-pytest-runner)))
5840 (home-page "https://github.com/flintwork/mccabe")
5841 (synopsis "McCabe checker, plugin for flake8")
5842 (description
5843 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5844 complexity of Python source code.")
5845 (license license:expat)))
5846
5847 (define-public python2-mccabe
5848 (package-with-python2 python-mccabe))
5849
5850 (define-public python-mccabe-0.2.1
5851 (package (inherit python-mccabe)
5852 (version "0.2.1")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "mccabe" version))
5857 (sha256
5858 (base32
5859 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5860
5861 (define-public python2-mccabe-0.2.1
5862 (package-with-python2 python-mccabe-0.2.1))
5863
5864 ;; Flake8 2.4.1 requires an older version of pep8.
5865 ;; This should be removed ASAP.
5866 (define-public python-pep8-1.5.7
5867 (package (inherit python-pep8)
5868 (version "1.5.7")
5869 (source
5870 (origin
5871 (method url-fetch)
5872 (uri (string-append
5873 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5874 version
5875 ".tar.gz"))
5876 (sha256
5877 (base32
5878 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5879
5880 (define-public python2-pep8-1.5.7
5881 (package-with-python2 python-pep8-1.5.7))
5882
5883 ;; Flake8 2.4.1 requires an older version of pyflakes.
5884 ;; This should be removed ASAP.
5885 (define-public python-pyflakes-0.8.1
5886 (package (inherit python-pyflakes)
5887 (version "0.8.1")
5888 (source
5889 (origin
5890 (method url-fetch)
5891 (uri (string-append
5892 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5893 version
5894 ".tar.gz"))
5895 (sha256
5896 (base32
5897 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5898
5899 (define-public python2-pyflakes-0.8.1
5900 (package-with-python2 python-pyflakes-0.8.1))
5901
5902 (define-public python-flake8
5903 (package
5904 (name "python-flake8")
5905 (version "2.5.4")
5906 (source
5907 (origin
5908 (method url-fetch)
5909 (uri (pypi-uri "flake8" version))
5910 (sha256
5911 (base32
5912 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5913 (modules '((guix build utils)))
5914 (snippet
5915 '(begin
5916 ;; Remove pre-compiled .pyc files from source.
5917 (for-each delete-file-recursively
5918 (find-files "." "__pycache__" #:directories? #t))
5919 (for-each delete-file (find-files "." "\\.pyc$"))
5920 #t))))
5921 (build-system python-build-system)
5922 (propagated-inputs
5923 `(("python-pep8" ,python-pep8)
5924 ("python-pyflakes" ,python-pyflakes)
5925 ("python-mccabe" ,python-mccabe)))
5926 (native-inputs
5927 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5928 ("python-nose" ,python-nose)))
5929 (home-page "https://gitlab.com/pycqa/flake8")
5930 (synopsis
5931 "The modular source code checker: pep8, pyflakes and co")
5932 (description
5933 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5934 (license license:expat)))
5935
5936 (define-public python2-flake8
5937 (package-with-python2 python-flake8))
5938
5939 ;; This will only be needed by the python-hacking package and will not be
5940 ;; necessary once python-hacking > 0.10.2 is released.
5941 (define-public python-flake8-2.2.4
5942 (package (inherit python-flake8)
5943 (propagated-inputs
5944 `(("python-pep8" ,python-pep8-1.5.7)
5945 ("python-pyflakes" ,python-pyflakes-0.8.1)
5946 ("python-mccabe" ,python-mccabe-0.2.1)))
5947 (native-inputs
5948 `(("python-mock" ,python-mock)
5949 ("python-nose" ,python-nose)))
5950 (version "2.2.4")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "flake8" version))
5955 (sha256
5956 (base32
5957 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5958 (modules '((guix build utils)))
5959 (snippet
5960 '(begin
5961 ;; Remove pre-compiled .pyc files from source.
5962 (for-each delete-file-recursively
5963 (find-files "." "__pycache__" #:directories? #t))
5964 (for-each delete-file (find-files "." "\\.pyc$"))
5965 #t))))))
5966
5967 (define-public python2-flake8-2.2.4
5968 (package-with-python2 python-flake8-2.2.4))
5969
5970 (define-public python-mistune
5971 (package
5972 (name "python-mistune")
5973 (version "0.7")
5974 (source
5975 (origin
5976 (method url-fetch)
5977 (uri (string-append
5978 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5979 version
5980 ".tar.gz"))
5981 (sha256
5982 (base32
5983 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5984 (build-system python-build-system)
5985 (native-inputs
5986 `(("python-nose" ,python-nose)
5987 ("python-cython" ,python-cython)))
5988 (home-page "https://github.com/lepture/mistune")
5989 (synopsis "Markdown parser in pure Python")
5990 (description "This package provides a fast markdown parser in pure
5991 Python.")
5992 (license license:bsd-3)))
5993
5994 (define-public python2-mistune
5995 (package-with-python2 python-mistune))
5996
5997 (define-public python-markdown
5998 (package
5999 (name "python-markdown")
6000 (version "2.6.7")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (pypi-uri "Markdown" version))
6005 (sha256
6006 (base32
6007 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6008 (build-system python-build-system)
6009 (arguments
6010 `(#:phases
6011 (modify-phases %standard-phases
6012 (replace 'check
6013 (lambda _
6014 (zero? (system* "python" "run-tests.py")))))))
6015 (native-inputs
6016 `(("python-nose" ,python-nose)
6017 ("python-pyyaml" ,python-pyyaml)))
6018 (home-page "https://pythonhosted.org/Markdown/")
6019 (synopsis "Python implementation of Markdown")
6020 (description
6021 "This package provides a Python implementation of John Gruber's
6022 Markdown. The library features international input, various Markdown
6023 extensions, and several HTML output formats. A command line wrapper
6024 markdown_py is also provided to convert Markdown files to HTML.")
6025 (license license:bsd-3)))
6026
6027 (define-public python2-markdown
6028 (package-with-python2 python-markdown))
6029
6030 (define-public python-ptyprocess
6031 (package
6032 (name "python-ptyprocess")
6033 (version "0.5")
6034 (source
6035 (origin
6036 (method url-fetch)
6037 (uri (string-append
6038 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6039 version ".tar.gz"))
6040 (sha256
6041 (base32
6042 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6043 (build-system python-build-system)
6044 (native-inputs
6045 `(("python-nose" ,python-nose)))
6046 (arguments
6047 `(#:phases
6048 (modify-phases %standard-phases
6049 (replace 'check
6050 (lambda _
6051 (zero? (system* "nosetests")))))))
6052 (home-page "https://github.com/pexpect/ptyprocess")
6053 (synopsis "Run a subprocess in a pseudo terminal")
6054 (description
6055 "This package provides a Python library used to launch a subprocess in a
6056 pseudo terminal (pty), and interact with both the process and its pty.")
6057 (license license:isc)))
6058
6059 (define-public python2-ptyprocess
6060 (package-with-python2 python-ptyprocess))
6061
6062 (define-public python-terminado
6063 (package
6064 (name "python-terminado")
6065 (version "0.6")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "terminado" version))
6070 (sha256
6071 (base32
6072 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6073 (build-system python-build-system)
6074 (propagated-inputs
6075 `(("python-tornado" ,python-tornado)
6076 ("python-ptyprocess" ,python-ptyprocess)))
6077 (native-inputs
6078 `(("python-nose" ,python-nose)))
6079 (arguments
6080 `(#:phases
6081 (modify-phases %standard-phases
6082 (replace 'check
6083 (lambda _
6084 (zero? (system* "nosetests")))))))
6085 (home-page "https://github.com/takluyver/terminado")
6086 (synopsis "Terminals served to term.js using Tornado websockets")
6087 (description "This package provides a Tornado websocket backend for the
6088 term.js Javascript terminal emulator library.")
6089 (license license:bsd-2)
6090 (properties `((python2-variant . ,(delay python2-terminado))))))
6091
6092 (define-public python2-terminado
6093 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6094 (package (inherit terminado)
6095 (propagated-inputs
6096 `(("python2-backport-ssl-match-hostname"
6097 ,python2-backport-ssl-match-hostname)
6098 ,@(package-propagated-inputs terminado))))))
6099
6100 (define-public python-straight-plugin
6101 (package
6102 (name "python-straight-plugin")
6103 (version "1.4.1")
6104 (source
6105 (origin
6106 (method url-fetch)
6107 (uri (pypi-uri "straight.plugin" version))
6108 (sha256
6109 (base32
6110 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6111 (build-system python-build-system)
6112 (home-page "https://github.com/ironfroggy/straight.plugin")
6113 (synopsis "Simple namespaced plugin facility")
6114 (description "Straight Plugin provides a type of plugin you can create from
6115 almost any existing Python modules, and an easy way for outside developers to
6116 add functionality and customization to your projects with their own plugins.")
6117 (license license:expat)))
6118
6119 (define-public python2-straight-plugin
6120 (package-with-python2 python-straight-plugin))
6121
6122 (define-public python-fonttools
6123 (package
6124 (name "python-fonttools")
6125 (version "2.5")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (string-append
6129 "https://pypi.python.org/packages/source/F/FontTools/"
6130 "fonttools-" version ".tar.gz"))
6131 (sha256
6132 (base32
6133 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6134 (build-system python-build-system)
6135 (arguments
6136 '(#:test-target "check"
6137 #:phases
6138 (modify-phases %standard-phases
6139 (add-after 'unpack 'patch-setuppy
6140 ;; Remove the undocumented "extra_path" argument, which adds an
6141 ;; intervening directories between site-packages and the package
6142 ;; directory.
6143 (lambda _
6144 (substitute* "setup.py"
6145 (("^[ \t]*extra_path *= *'FontTools',") ""))
6146 #t)))))
6147 (home-page "http://github.com/behdad/fonttools")
6148 (synopsis "Tools to manipulate font files")
6149 (description
6150 "FontTools/TTX is a library to manipulate font files from Python. It
6151 supports reading and writing of TrueType/OpenType fonts, reading and writing
6152 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6153 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6154 from an XML-based format.")
6155 (license (license:non-copyleft
6156 "file://LICENSE.txt"
6157 "See LICENSE.txt in the distribution."))))
6158
6159 (define-public python2-fonttools
6160 (package-with-python2 python-fonttools))
6161
6162 (define-public python-ly
6163 (package
6164 (name "python-ly")
6165 (version "0.9.4")
6166 (source
6167 (origin
6168 (method url-fetch)
6169 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6170 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6171 "/python-ly-" version ".tar.gz"))
6172 (sha256
6173 (base32
6174 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6175 (build-system python-build-system)
6176 (synopsis "Tool and library for manipulating LilyPond files")
6177 (description "This package provides a Python library to parse, manipulate
6178 or create documents in LilyPond format. A command line program ly is also
6179 provided that can be used to do various manipulations with LilyPond files.")
6180 (home-page "https://pypi.python.org/pypi/python-ly")
6181 (license license:gpl2+)))
6182
6183 (define-public python-appdirs
6184 (package
6185 (name "python-appdirs")
6186 (version "1.4.0")
6187 (source
6188 (origin
6189 (method url-fetch)
6190 (uri (string-append
6191 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6192 version
6193 ".tar.gz"))
6194 (sha256
6195 (base32
6196 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6197 (build-system python-build-system)
6198 (home-page "http://github.com/ActiveState/appdirs")
6199 (synopsis
6200 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6201 (description
6202 "This module provides a portable way of finding out where user data
6203 should be stored on various operating systems.")
6204 (license license:expat)))
6205
6206 (define-public python2-appdirs
6207 (package-with-python2 python-appdirs))
6208
6209 (define-public python-llfuse
6210 (package
6211 (name "python-llfuse")
6212 (version "1.1.1")
6213 (source (origin
6214 (method url-fetch)
6215 (uri (string-append
6216 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6217 "llfuse-" version ".tar.bz2"))
6218 (sha256
6219 (base32
6220 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6221 (build-system python-build-system)
6222 (inputs
6223 `(("fuse" ,fuse)
6224 ("attr" ,attr)))
6225 (native-inputs
6226 `(("pkg-config" ,pkg-config)))
6227 (synopsis "Python bindings for FUSE")
6228 (description
6229 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6230 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6231 (license license:lgpl2.0+)
6232 (properties `((python2-variant . ,(delay python2-llfuse))))))
6233
6234 (define-public python2-llfuse
6235 (package (inherit (package-with-python2
6236 (strip-python2-variant python-llfuse)))
6237 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6238
6239 ;; For attic-0.16
6240 (define-public python-llfuse-0.41
6241 (package (inherit python-llfuse)
6242 (version "0.41.1")
6243 (source (origin
6244 (method url-fetch)
6245 (uri (string-append
6246 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6247 "llfuse-" version ".tar.bz2"))
6248 (sha256
6249 (base32
6250 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6251 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6252 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6253 (license (list license:expat license:lgpl2.0+))))
6254
6255 (define-public python-msgpack
6256 (package
6257 (name "python-msgpack")
6258 (version "0.4.8")
6259 (source (origin
6260 (method url-fetch)
6261 (uri (pypi-uri "msgpack-python" version))
6262 (sha256
6263 (base32
6264 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6265 (build-system python-build-system)
6266 (synopsis "MessagePack (de)serializer")
6267 (description "MessagePack is a fast, compact binary serialization format,
6268 suitable for similar data to JSON. This package provides CPython bindings for
6269 reading and writing MessagePack data.")
6270 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6271 (license license:asl2.0)))
6272
6273 (define-public python2-msgpack
6274 (package-with-python2 python-msgpack))
6275
6276 (define-public python-netaddr
6277 (package
6278 (name "python-netaddr")
6279 (version "0.7.18")
6280 (source
6281 (origin
6282 (method url-fetch)
6283 (uri (string-append
6284 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6285 version
6286 ".tar.gz"))
6287 (sha256
6288 (base32
6289 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6290 (build-system python-build-system)
6291 (arguments `(#:tests? #f)) ;; No tests.
6292 (home-page "https://github.com/drkjam/netaddr/")
6293 (synopsis "Pythonic manipulation of network addresses")
6294 (description
6295 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6296 and MAC network addresses.")
6297 (license license:bsd-3)))
6298
6299 (define-public python2-netaddr
6300 (package-with-python2 python-netaddr))
6301
6302 (define-public python-wrapt
6303 (package
6304 (name "python-wrapt")
6305 (version "1.10.5")
6306 (source
6307 (origin
6308 (method url-fetch)
6309 (uri (string-append
6310 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6311 version
6312 ".tar.gz"))
6313 (sha256
6314 (base32
6315 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6316 (build-system python-build-system)
6317 (arguments
6318 ;; Tests are not included in the tarball, they are only available in the
6319 ;; git repository.
6320 `(#:tests? #f))
6321 (home-page "https://github.com/GrahamDumpleton/wrapt")
6322 (synopsis "Module for decorators, wrappers and monkey patching")
6323 (description
6324 "The aim of the wrapt module is to provide a transparent object proxy for
6325 Python, which can be used as the basis for the construction of function
6326 wrappers and decorator functions.")
6327 (license license:bsd-2)))
6328
6329 (define-public python2-wrapt
6330 (package-with-python2 python-wrapt))
6331
6332 (define-public python-iso8601
6333 (package
6334 (name "python-iso8601")
6335 (version "0.1.11")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (pypi-uri "iso8601" version))
6340 (sha256
6341 (base32
6342 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6343 (build-system python-build-system)
6344 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6345 (synopsis "Module to parse ISO 8601 dates")
6346 (description
6347 "This module parses the most common forms of ISO 8601 date strings (e.g.
6348 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6349 (license license:expat)))
6350
6351 (define-public python2-iso8601
6352 (package-with-python2 python-iso8601))
6353
6354 (define-public python-monotonic
6355 (package
6356 (name "python-monotonic")
6357 (version "0.3")
6358 (source
6359 (origin
6360 (method url-fetch)
6361 (uri (string-append
6362 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6363 version
6364 ".tar.gz"))
6365 (sha256
6366 (base32
6367 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6368 (build-system python-build-system)
6369 (home-page "https://github.com/atdt/monotonic")
6370 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6371 (description
6372 "This module provides a monotonic() function which returns the value (in
6373 fractional seconds) of a clock which never goes backwards.")
6374 (license license:asl2.0)))
6375
6376 (define-public python2-monotonic
6377 (package-with-python2 python-monotonic))
6378
6379 (define-public python-webob
6380 (package
6381 (name "python-webob")
6382 (version "1.5.1")
6383 (source
6384 (origin
6385 (method url-fetch)
6386 (uri (pypi-uri "WebOb" version))
6387 (sha256
6388 (base32
6389 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6390 (build-system python-build-system)
6391 (native-inputs
6392 `(("python-nose" ,python-nose)))
6393 (home-page "http://webob.org/")
6394 (synopsis "WSGI request and response object")
6395 (description
6396 "WebOb provides wrappers around the WSGI request environment, and an
6397 object to help create WSGI responses.")
6398 (license license:expat)))
6399
6400 (define-public python2-webob
6401 (package-with-python2 python-webob))
6402
6403 (define-public python-xlrd
6404 (package
6405 (name "python-xlrd")
6406 (version "1.0.0")
6407 (source (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "xlrd" version))
6410 (sha256
6411 (base32
6412 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6413 (build-system python-build-system)
6414 (arguments
6415 `(#:phases
6416 (modify-phases %standard-phases
6417 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6418 ;; run tests instead for now.
6419 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6420 (native-inputs `(("python-nose" ,python-nose)))
6421 (home-page "http://www.python-excel.org/")
6422 (synopsis "Library for extracting data from Excel files")
6423 (description "This packages provides a library to extract data from
6424 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6425 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6426 Unicode-aware. It is not intended as an end-user tool.")
6427 (license license:bsd-3)))
6428
6429 (define-public python2-xlrd
6430 (package-with-python2 python-xlrd))
6431
6432 (define-public python-prettytable
6433 (package
6434 (name "python-prettytable")
6435 (version "0.7.2")
6436 (source
6437 (origin
6438 (method url-fetch)
6439 (uri (string-append
6440 "https://pypi.python.org/packages/source/P/PrettyTable/"
6441 "prettytable-" version ".tar.bz2"))
6442 (sha256
6443 (base32
6444 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6445 (build-system python-build-system)
6446 (home-page "http://code.google.com/p/prettytable/")
6447 (synopsis "Display tabular data in an ASCII table format")
6448 (description
6449 "A library designed to represent tabular data in visually appealing ASCII
6450 tables. PrettyTable allows for selection of which columns are to be printed,
6451 independent alignment of columns (left or right justified or centred) and
6452 printing of sub-tables by specifying a row range.")
6453 (license license:bsd-3)))
6454
6455 (define-public python2-prettytable
6456 (package-with-python2 python-prettytable))
6457
6458 (define-public python-tables
6459 (package
6460 (name "python-tables")
6461 (version "3.2.2")
6462 (source
6463 (origin
6464 (method url-fetch)
6465 (uri (pypi-uri "tables" version))
6466 (sha256
6467 (base32
6468 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6469 (modules '((guix build utils)))
6470 (snippet
6471 '(begin
6472 ;; Remove pre-compiled .pyc files from source.
6473 (for-each delete-file-recursively
6474 (find-files "." "__pycache__" #:directories? #t))
6475 (for-each delete-file (find-files "." "\\.pyc$"))
6476 #t))))
6477 (build-system python-build-system)
6478 (arguments
6479 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6480 ;; or "check", so we must override the build and check phases.
6481 #:phases
6482 (modify-phases %standard-phases
6483 (add-after 'unpack 'use-gcc
6484 (lambda _
6485 (substitute* "setup.py"
6486 (("compiler = new_compiler\\(\\)" line)
6487 (string-append line
6488 "\ncompiler.set_executables(compiler='gcc',"
6489 "compiler_so='gcc',"
6490 "linker_exe='gcc',"
6491 "linker_so='gcc -shared')")))
6492 #t))
6493 (replace 'build
6494 (lambda* (#:key inputs #:allow-other-keys)
6495 (zero? (system* "python" "setup.py" "build"
6496 (string-append "--hdf5="
6497 (assoc-ref inputs "hdf5"))))))
6498 (replace 'check
6499 (lambda* (#:key inputs #:allow-other-keys)
6500 (zero? (system* "python" "setup.py" "check"
6501 (string-append "--hdf5="
6502 (assoc-ref inputs "hdf5")))))))))
6503 (propagated-inputs
6504 `(("python-numexpr" ,python-numexpr)
6505 ("python-numpy" ,python-numpy)))
6506 (native-inputs
6507 `(("python-cython" ,python-cython)
6508 ("pkg-config" ,pkg-config)))
6509 (inputs
6510 `(("hdf5" ,hdf5)
6511 ("bzip2" ,bzip2)
6512 ("zlib" ,zlib)))
6513 (home-page "http://www.pytables.org/")
6514 (synopsis "Hierarchical datasets for Python")
6515 (description "PyTables is a package for managing hierarchical datasets and
6516 designed to efficently cope with extremely large amounts of data.")
6517 (license license:bsd-3)))
6518
6519 (define-public python2-tables
6520 (package-with-python2 python-tables))
6521
6522 (define-public python-pyasn1
6523 (package
6524 (name "python-pyasn1")
6525 (version "0.1.9")
6526 (source
6527 (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "pyasn1" version))
6530 (sha256
6531 (base32
6532 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6533 (build-system python-build-system)
6534 (home-page "http://pyasn1.sourceforge.net/")
6535 (synopsis "ASN.1 types and codecs")
6536 (description
6537 "This is an implementation of ASN.1 types and codecs in Python. It is
6538 suitable for a wide range of protocols based on the ASN.1 specification.")
6539 (license license:bsd-2)))
6540
6541 (define-public python2-pyasn1
6542 (package-with-python2 python-pyasn1))
6543
6544 (define-public python-pyasn1-modules
6545 (package
6546 (name "python-pyasn1-modules")
6547 (version "0.0.8")
6548 (source
6549 (origin
6550 (method url-fetch)
6551 (uri (pypi-uri "pyasn1-modules" version))
6552 (sha256
6553 (base32
6554 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6555 (build-system python-build-system)
6556 (propagated-inputs
6557 `(("python-pyasn1" ,python-pyasn1)))
6558 (home-page "http://sourceforge.net/projects/pyasn1/")
6559 (synopsis "ASN.1 codec implementations")
6560 (description
6561 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6562 implementations of ASN.1-based codecs and protocols.")
6563 (license license:bsd-3)))
6564
6565 (define-public python2-pyasn1-modules
6566 (package-with-python2 python-pyasn1-modules))
6567
6568 (define-public python-ipaddress
6569 (package
6570 (name "python-ipaddress")
6571 (version "1.0.16")
6572 (source (origin
6573 (method url-fetch)
6574 (uri (pypi-uri "ipaddress" version))
6575 (sha256
6576 (base32
6577 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6578 (build-system python-build-system)
6579 (home-page "https://github.com/phihag/ipaddress")
6580 (synopsis "IP address manipulation library")
6581 (description
6582 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6583 in Python. This library is used to create, poke at, and manipulate IPv4 and
6584 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6585 module to older versions of Python.")
6586 (license license:psfl)))
6587
6588 (define-public python2-ipaddress
6589 (package-with-python2 python-ipaddress))
6590
6591 (define-public python2-ipaddr
6592 (package
6593 (name "python2-ipaddr")
6594 (version "2.1.11")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "ipaddr" version))
6599 (sha256
6600 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6601 (build-system python-build-system)
6602 (arguments
6603 `(#:python ,python-2 ;version 2 only
6604 #:phases
6605 (modify-phases %standard-phases
6606 (replace 'check
6607 (lambda* _
6608 (zero? (system* "python" "ipaddr_test.py")))))))
6609 (home-page "https://github.com/google/ipaddr-py")
6610 (synopsis "IP address manipulation library")
6611 (description
6612 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6613 IPv6 addresses and networks.
6614
6615 For new implementations you may prefer to use the standard module
6616 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6617 versions of Python.")
6618 (license license:asl2.0)))
6619
6620 (define-public python-idna
6621 (package
6622 (name "python-idna")
6623 (version "2.0")
6624 (source
6625 (origin
6626 (method url-fetch)
6627 (uri (string-append "https://pypi.python.org/packages/source/i/"
6628 "idna/idna-" version ".tar.gz"))
6629 (sha256
6630 (base32
6631 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6632 (build-system python-build-system)
6633 (home-page "https://github.com/kjd/idna")
6634 (synopsis "Internationalized domain names in applications")
6635 (description
6636 "This is a library to support the Internationalised Domain Names in
6637 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6638 protocol is often referred to as “IDNA2008” and can produce different results
6639 from the earlier standard from 2003. The library is also intended to act as a
6640 suitable drop-in replacement for the “encodings.idna” module that comes with
6641 the Python standard library but currently only supports the older 2003
6642 specification.")
6643 (license license:bsd-4)))
6644
6645 (define-public python2-idna
6646 (package-with-python2 python-idna))
6647
6648 (define-public python-pretend
6649 (package
6650 (name "python-pretend")
6651 (version "1.0.8")
6652 (source
6653 (origin
6654 (method url-fetch)
6655 (uri (string-append "https://pypi.python.org/packages/source/p/"
6656 "pretend/pretend-" version ".tar.gz"))
6657 (sha256
6658 (base32
6659 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6660 (build-system python-build-system)
6661 (home-page "https://github.com/alex/pretend")
6662 (synopsis "Library for stubbing in Python")
6663 (description
6664 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6665 technique for writing tests. You may hear the term mixed up with mocks,
6666 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6667 responses, rather than doing any computation.")
6668 (license license:bsd-3)))
6669
6670 (define-public python2-pretend
6671 (package-with-python2 python-pretend))
6672
6673 (define-public python-cryptography-vectors
6674 (package
6675 (name "python-cryptography-vectors")
6676 (version "1.7.1")
6677 (source
6678 (origin
6679 (method url-fetch)
6680 (uri (pypi-uri "cryptography_vectors" version))
6681 (sha256
6682 (base32
6683 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
6684 (build-system python-build-system)
6685 (home-page "https://github.com/pyca/cryptography")
6686 (synopsis "Test vectors for the cryptography package")
6687 (description
6688 "This package contains test vectors for the cryptography package.")
6689 ;; Distributed under either BSD-3 or ASL2.0
6690 (license (list license:bsd-3 license:asl2.0))))
6691
6692 (define-public python2-cryptography-vectors
6693 (package-with-python2 python-cryptography-vectors))
6694
6695 (define-public python-cryptography
6696 (package
6697 (name "python-cryptography")
6698 (version "1.7.1")
6699 (source
6700 (origin
6701 (method url-fetch)
6702 (uri (pypi-uri "cryptography" version))
6703 (sha256
6704 (base32
6705 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
6706 (build-system python-build-system)
6707 (inputs
6708 `(("openssl" ,openssl)))
6709 (propagated-inputs
6710 `(("python-cffi" ,python-cffi)
6711 ("python-six" ,python-six)
6712 ("python-pyasn1" ,python-pyasn1)
6713 ("python-idna" ,python-idna)
6714 ("python-iso8601" ,python-iso8601)))
6715 (native-inputs
6716 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6717 ("python-hypothesis" ,python-hypothesis)
6718 ("python-pretend" ,python-pretend)
6719 ("python-pyasn1" ,python-pyasn1)
6720 ("python-pyasn1-modules" ,python-pyasn1-modules)
6721 ("python-pytz" ,python-pytz)
6722 ("python-pytest" ,python-pytest-2.9.2)))
6723 (home-page "https://github.com/pyca/cryptography")
6724 (synopsis "Cryptographic recipes and primitives for Python")
6725 (description
6726 "cryptography is a package which provides cryptographic recipes and
6727 primitives to Python developers. It aims to be the “cryptographic standard
6728 library” for Python. The package includes both high level recipes, and low
6729 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6730 message digests and key derivation functions.")
6731 ;; Distributed under either BSD-3 or ASL2.0
6732 (license (list license:bsd-3 license:asl2.0))
6733 (properties `((python2-variant . ,(delay python2-cryptography))))))
6734
6735 (define-public python2-cryptography
6736 (let ((crypto (package-with-python2
6737 (strip-python2-variant python-cryptography))))
6738 (package (inherit crypto)
6739 (propagated-inputs
6740 `(("python2-ipaddress" ,python2-ipaddress)
6741 ("python2-backport-ssl-match-hostname"
6742 ,python2-backport-ssl-match-hostname)
6743 ("python2-enum34" ,python2-enum34)
6744 ,@(package-propagated-inputs crypto))))))
6745
6746 (define-public python-pyopenssl
6747 (package
6748 (name "python-pyopenssl")
6749 (version "16.2.0")
6750 (source
6751 (origin
6752 (method url-fetch)
6753 (uri (pypi-uri "pyOpenSSL" version))
6754 (sha256
6755 (base32
6756 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
6757 (build-system python-build-system)
6758 (propagated-inputs
6759 `(("python-cryptography" ,python-cryptography)
6760 ("python-six" ,python-six)))
6761 (inputs
6762 `(("openssl" ,openssl)))
6763 (home-page "https://github.com/pyca/pyopenssl")
6764 (synopsis "Python wrapper module around the OpenSSL library")
6765 (description
6766 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6767 library.")
6768 (license license:asl2.0)))
6769
6770 (define-public python2-pyopenssl
6771 (package-with-python2 python-pyopenssl))
6772
6773 (define-public python-pip
6774 (package
6775 (name "python-pip")
6776 (version "8.0.2")
6777 (source
6778 (origin
6779 (method url-fetch)
6780 (uri (pypi-uri "pip" version))
6781 (sha256
6782 (base32
6783 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6784 (build-system python-build-system)
6785 (native-inputs
6786 `(;; Tests
6787 ("python-virtualenv" ,python-virtualenv)
6788 ("python-mock" ,python-mock)
6789 ("python-pytest" ,python-pytest)
6790 ("python-scripttest" ,python-scripttest)))
6791 (home-page "https://pip.pypa.io/")
6792 (synopsis
6793 "Package manager for Python software")
6794 (description
6795 "Pip is a package manager for Python software, that finds packages on the
6796 Python Package Index (PyPI).")
6797 (license license:expat)))
6798
6799 (define-public python2-pip
6800 (package-with-python2 python-pip))
6801
6802 (define-public python-tlsh
6803 (package
6804 (name "python-tlsh")
6805 (version "3.4.4")
6806 (home-page "https://github.com/trendmicro/tlsh")
6807 (source (origin
6808 (method url-fetch)
6809 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6810 version ".tar.gz"))
6811 (sha256
6812 (base32
6813 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6814 (file-name (string-append name "-" version ".tar.gz"))))
6815 (build-system cmake-build-system)
6816 (arguments
6817 '(#:out-of-source? #f
6818 #:phases (modify-phases %standard-phases
6819 (replace
6820 'install
6821 (lambda* (#:key outputs #:allow-other-keys)
6822 ;; Build and install the Python bindings. The underlying
6823 ;; C++ library is apparently not meant to be installed.
6824 (let ((out (assoc-ref outputs "out")))
6825 (with-directory-excursion "py_ext"
6826 (and (system* "python" "setup.py" "build")
6827 (system* "python" "setup.py" "install"
6828 (string-append "--prefix=" out))))))))))
6829 (inputs `(("python" ,python-wrapper))) ;for the bindings
6830 (synopsis "Fuzzy matching library for Python")
6831 (description
6832 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6833 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6834 value which can be used for similarity comparisons. Similar objects have
6835 similar hash values, which allows for the detection of similar objects by
6836 comparing their hash values. The byte stream should have a sufficient amount
6837 of complexity; for example, a byte stream of identical bytes will not generate
6838 a hash value.")
6839 (license license:asl2.0)))
6840
6841 (define-public python2-tlsh
6842 (package
6843 (inherit python-tlsh)
6844 (name "python2-tlsh")
6845 (inputs `(("python" ,python-2)))))
6846
6847 (define-public python-termcolor
6848 (package
6849 (name "python-termcolor")
6850 (version "1.1.0")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (pypi-uri "python-termcolor" version))
6855 (sha256
6856 (base32
6857 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6858 (build-system python-build-system)
6859 (arguments
6860 ;; There are no tests.
6861 `(#:tests? #f))
6862 (home-page "http://pypi.python.org/pypi/termcolor")
6863 (synopsis "ANSII Color formatting for terminal output")
6864 (description
6865 "This package provides ANSII Color formatting for output in terminals.")
6866 (license license:expat)))
6867
6868 (define-public python2-termcolor
6869 (package-with-python2 python-termcolor))
6870
6871 (define-public python-libarchive-c
6872 (package
6873 (name "python-libarchive-c")
6874 (version "2.2")
6875 (source (origin
6876 (method url-fetch)
6877 (uri (pypi-uri "libarchive-c" version))
6878 (sha256
6879 (base32
6880 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6881 (build-system python-build-system)
6882 (arguments
6883 '(#:phases (modify-phases %standard-phases
6884 (add-before
6885 'build 'reference-libarchive
6886 (lambda* (#:key inputs #:allow-other-keys)
6887 ;; Retain the absolute file name of libarchive.so.
6888 (let ((libarchive (assoc-ref inputs "libarchive")))
6889 (substitute* "libarchive/ffi.py"
6890 (("find_library\\('archive'\\)")
6891 (string-append "'" libarchive
6892 "/lib/libarchive.so'")))))))))
6893 (inputs
6894 `(("libarchive" ,libarchive)))
6895 (home-page "https://github.com/Changaco/python-libarchive-c")
6896 (synopsis "Python interface to libarchive")
6897 (description
6898 "This package provides Python bindings to libarchive, a C library to
6899 access possibly compressed archives in many different formats. It uses
6900 Python's @code{ctypes} foreign function interface (FFI).")
6901 (license license:lgpl2.0+)))
6902
6903 (define-public python2-libarchive-c
6904 (package-with-python2 python-libarchive-c))
6905
6906 (define-public python-file
6907 (package
6908 (inherit file)
6909 (name "python-file")
6910 (source (origin
6911 (inherit (package-source file))
6912 ;; This patch should not be applied to python2-file.
6913 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6914 (build-system python-build-system)
6915 (arguments
6916 '(#:tests? #f ;no tests
6917 #:configure-flags '("--single-version-externally-managed" "--root=/")
6918 #:phases (modify-phases %standard-phases
6919 (add-before 'build 'change-directory
6920 (lambda _
6921 (chdir "python")
6922 #t))
6923 (add-before 'build 'set-library-file-name
6924 (lambda* (#:key inputs #:allow-other-keys)
6925 (let ((file (assoc-ref inputs "file")))
6926 (substitute* "magic.py"
6927 (("find_library\\('magic'\\)")
6928 (string-append "'" file "/lib/libmagic.so'")))
6929 #t))))))
6930 (inputs `(("file" ,file)))
6931 (self-native-input? #f)
6932 (synopsis "Python bindings to the libmagic file type guesser. Note that
6933 this module and the python-magic module both provide a \"magic.py\" file;
6934 these two modules, which are different and were developed separately, both
6935 serve the same purpose: provide Python bindings for libmagic.")))
6936
6937 (define-public python2-file
6938 (package-with-python2 python-file))
6939
6940 (define-public python-debian
6941 (package
6942 (name "python-debian")
6943 (version "0.1.23")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (string-append
6948 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6949 version ".tar.gz"))
6950 (sha256
6951 (base32
6952 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6953 (build-system python-build-system)
6954 (propagated-inputs
6955 `(("python-six" ,python-six)))
6956 (home-page "http://packages.debian.org/sid/python-debian")
6957 (synopsis "Debian package related modules")
6958 (description
6959 ;; XXX: Use @enumerate instead of @itemize to work around
6960 ;; <http://bugs.gnu.org/21772>.
6961 "This package provides Python modules that abstract many formats of
6962 Debian-related files, such as:
6963
6964 @enumerate
6965 @item Debtags information;
6966 @item @file{debian/changelog} files;
6967 @item packages files, pdiffs;
6968 @item control files of single or multiple RFC822-style paragraphs---e.g.
6969 @file{debian/control}, @file{.changes}, @file{.dsc};
6970 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6971 contained files and meta-information.
6972 @end enumerate\n")
6973
6974 ;; Modules are either GPLv2+ or GPLv3+.
6975 (license license:gpl3+)))
6976
6977 (define-public python2-debian
6978 (package-with-python2 python-debian))
6979
6980 (define-public python-nbformat
6981 (package
6982 (name "python-nbformat")
6983 (version "4.1.0")
6984 (source
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "nbformat" version))
6988 (sha256
6989 (base32
6990 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6991 (build-system python-build-system)
6992 (arguments `(#:tests? #f)) ; no test target
6993 (propagated-inputs
6994 `(("python-ipython-genutils" ,python-ipython-genutils)
6995 ("python-jsonschema" ,python-jsonschema)
6996 ("python-jupyter-core" ,python-jupyter-core)
6997 ("python-traitlets" ,python-traitlets)))
6998 (home-page "http://jupyter.org")
6999 (synopsis "Jupyter Notebook format")
7000 (description "This package provides the reference implementation of the
7001 Jupyter Notebook format and Python APIs for working with notebooks.")
7002 (license license:bsd-3)))
7003
7004 (define-public python2-nbformat
7005 (package-with-python2 python-nbformat))
7006
7007 (define-public python-bleach
7008 (package
7009 (name "python-bleach")
7010 (version "1.4.3")
7011 (source
7012 (origin
7013 (method url-fetch)
7014 (uri (pypi-uri "bleach" version))
7015 (sha256
7016 (base32
7017 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7018 (build-system python-build-system)
7019 (propagated-inputs
7020 `(("python-html5lib" ,python-html5lib-0.9)
7021 ("python-six" ,python-six)))
7022 (native-inputs
7023 `(("python-nose" ,python-nose)))
7024 (home-page "http://github.com/jsocol/bleach")
7025 (synopsis "Whitelist-based HTML-sanitizing tool")
7026 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7027 (license license:asl2.0)))
7028
7029 (define-public python2-bleach
7030 (package-with-python2 python-bleach))
7031
7032 (define-public python-entrypoints
7033 (package
7034 (name "python-entrypoints")
7035 (version "0.2.2")
7036 (source
7037 (origin
7038 (method url-fetch)
7039 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7040 version ".tar.gz"))
7041 (file-name (string-append name "-" version ".tar.gz"))
7042 (sha256
7043 (base32
7044 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7045 (build-system python-build-system)
7046 ;; The package does not come with a setup.py file, so we have to generate
7047 ;; one ourselves.
7048 (arguments
7049 `(#:tests? #f
7050 #:phases
7051 (modify-phases %standard-phases
7052 (add-after 'unpack 'create-setup.py
7053 (lambda _
7054 (call-with-output-file "setup.py"
7055 (lambda (port)
7056 (format port "\
7057 from setuptools import setup
7058 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7059 " ,version))))))))
7060 (home-page "https://github.com/takluyver/entrypoints")
7061 (synopsis "Discover and load entry points from installed Python packages")
7062 (description "Entry points are a way for Python packages to advertise
7063 objects with some common interface. The most common examples are
7064 @code{console_scripts} entry points, which define shell commands by
7065 identifying a Python function to run. The @code{entrypoints} module contains
7066 functions to find and load entry points.")
7067 (license license:expat)))
7068
7069 (define-public python2-entrypoints
7070 (package-with-python2 python-entrypoints))
7071
7072 (define-public python-nbconvert
7073 (package
7074 (name "python-nbconvert")
7075 (version "5.0.0b1")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "nbconvert" version))
7080 (sha256
7081 (base32
7082 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7083 (build-system python-build-system)
7084 ;; The "bdist_egg" target is disabled by default, causing the installation
7085 ;; to fail.
7086 (arguments `(#:configure-flags (list "bdist_egg")))
7087 (propagated-inputs
7088 `(("python-bleach" ,python-bleach)
7089 ("python-entrypoints" ,python-entrypoints)
7090 ("python-jinja2" ,python-jinja2)
7091 ("python-jupyter-core" ,python-jupyter-core)
7092 ("python-mistune" ,python-mistune)
7093 ("python-nbformat" ,python-nbformat)
7094 ("python-pygments" ,python-pygments)
7095 ("python-traitlets" ,python-traitlets)))
7096 (home-page "http://jupyter.org")
7097 (synopsis "Converting Jupyter Notebooks")
7098 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7099 notebooks to various other formats via Jinja templates. It allows you to
7100 convert an @code{.ipynb} notebook file into various static formats including:
7101
7102 @enumerate
7103 @item HTML
7104 @item LaTeX
7105 @item PDF
7106 @item Reveal JS
7107 @item Markdown (md)
7108 @item ReStructured Text (rst)
7109 @item executable script
7110 @end enumerate\n")
7111 (license license:bsd-3)))
7112
7113 (define-public python2-nbconvert
7114 (package-with-python2 python-nbconvert))
7115
7116 (define-public python-notebook
7117 (package
7118 (name "python-notebook")
7119 (version "4.2.3")
7120 (source (origin
7121 (method url-fetch)
7122 (uri (pypi-uri "notebook" version))
7123 (sha256
7124 (base32
7125 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7126 (build-system python-build-system)
7127 (arguments
7128 `(#:phases
7129 (modify-phases %standard-phases
7130 (replace 'check
7131 (lambda _
7132 ;; HOME must be set for tests
7133 (setenv "HOME" "/tmp")
7134 (zero? (system* "nosetests")))))))
7135 (propagated-inputs
7136 `(("python-jupyter-core" ,python-jupyter-core)
7137 ("python-nbformat" ,python-nbformat)
7138 ("python-nbconvert" ,python-nbconvert)
7139 ("python-ipython" ,python-ipython)))
7140 (native-inputs
7141 `(("python-nose" ,python-nose)
7142 ("python-sphinx" ,python-sphinx)
7143 ("python-requests" ,python-requests)))
7144 (home-page "http://jupyter.org/")
7145 (synopsis "Web-based notebook environment for interactive computing")
7146 (description
7147 "The Jupyter HTML notebook is a web-based notebook environment for
7148 interactive computing.")
7149 (properties `((python2-variant . ,(delay python2-notebook))))
7150 (license license:bsd-3)))
7151
7152 (define-public python2-notebook
7153 (let ((base (package-with-python2
7154 (strip-python2-variant python-notebook))))
7155 (package (inherit base)
7156 (native-inputs
7157 `(("python2-mock" ,python2-mock)
7158 ,@(package-native-inputs base)))
7159 (arguments
7160 (substitute-keyword-arguments (package-arguments base)
7161 ((#:phases phases)
7162 `(modify-phases ,phases
7163 (add-before 'check 'disable-test-case
7164 ;; The test requires network access to localhost. Curiously it
7165 ;; fails with Python 2 only. Simply make the test-case return
7166 ;; immediately.
7167 (lambda _
7168 (substitute*
7169 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7170 (("formats = self.nbconvert_api") "return #")))))))))))
7171
7172 (define-public python-widgetsnbextension
7173 (package
7174 (name "python-widgetsnbextension")
7175 (version "1.2.6")
7176 (source
7177 (origin
7178 (method url-fetch)
7179 (uri (pypi-uri "widgetsnbextension" version))
7180 (sha256
7181 (base32
7182 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7183 (build-system python-build-system)
7184 (propagated-inputs
7185 `(("python-notebook" ,python-notebook)))
7186 (native-inputs
7187 `(("python-nose" ,python-nose)))
7188 (home-page "http://ipython.org")
7189 (synopsis "IPython HTML widgets for Jupyter")
7190 (description "This package provides interactive HTML widgets for Jupyter
7191 notebooks.")
7192 (license license:bsd-3)))
7193
7194 (define-public python2-widgetsnbextension
7195 (package-with-python2 python-widgetsnbextension))
7196
7197 (define-public python-ipywidgets
7198 (package
7199 (name "python-ipywidgets")
7200 (version "5.2.2")
7201 (source
7202 (origin
7203 (method url-fetch)
7204 (uri (pypi-uri "ipywidgets" version))
7205 (sha256
7206 (base32
7207 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7208 (build-system python-build-system)
7209 ;; FIXME: it's not clear how to run the tests.
7210 (arguments `(#:tests? #f))
7211 (propagated-inputs
7212 `(("python-ipykernel" ,python-ipykernel)
7213 ("python-ipython" ,python-ipython)
7214 ("python-traitlets" ,python-traitlets)
7215 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7216 (home-page "http://ipython.org")
7217 (synopsis "IPython HTML widgets for Jupyter")
7218 (description "Ipywidgets are interactive HTML widgets for Jupyter
7219 notebooks and the IPython kernel. Notebooks come alive when interactive
7220 widgets are used. Users gain control of their data and can visualize changes
7221 in the data.")
7222 (license license:bsd-3)))
7223
7224 (define-public python2-ipywidgets
7225 (package-with-python2 python-ipywidgets))
7226
7227 (define-public python-jupyter-console
7228 (package
7229 (name "python-jupyter-console")
7230 (version "5.0.0")
7231 (source
7232 (origin
7233 (method url-fetch)
7234 (uri (pypi-uri "jupyter_console" version))
7235 (sha256
7236 (base32
7237 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7238 (build-system python-build-system)
7239 ;; FIXME: it's not clear how to run the tests.
7240 (arguments `(#:tests? #f))
7241 (propagated-inputs
7242 `(("python-ipykernel" ,python-ipykernel)
7243 ("python-ipython" ,python-ipython)
7244 ("python-jupyter-client" ,python-jupyter-client)
7245 ("python-prompt-toolkit" ,python-prompt-toolkit)
7246 ("python-pygments" ,python-pygments)))
7247 (home-page "https://jupyter.org")
7248 (synopsis "Jupyter terminal console")
7249 (description "This package provides a terminal-based console frontend for
7250 Jupyter kernels. It also allows for console-based interaction with non-Python
7251 Jupyter kernels such as IJulia and IRKernel.")
7252 (license license:bsd-3)))
7253
7254 (define-public python2-jupyter-console
7255 (package-with-python2 python-jupyter-console))
7256
7257 (define-public jupyter
7258 (package
7259 (name "jupyter")
7260 (version "1.0.0")
7261 (source
7262 (origin
7263 (method url-fetch)
7264 (uri (pypi-uri "jupyter" version))
7265 (sha256
7266 (base32
7267 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7268 (build-system python-build-system)
7269 ;; FIXME: it's not clear how to run the tests.
7270 (arguments `(#:tests? #f))
7271 (propagated-inputs
7272 `(("python-ipykernel" ,python-ipykernel)
7273 ("python-ipywidgets" ,python-ipywidgets)
7274 ("python-jupyter-console" ,python-jupyter-console)
7275 ("python-nbconvert" ,python-nbconvert)
7276 ("python-notebook" ,python-notebook)))
7277 (home-page "http://jupyter.org")
7278 (synopsis "Web application for interactive documents")
7279 (description
7280 "The Jupyter Notebook is a web application that allows you to create and
7281 share documents that contain live code, equations, visualizations and
7282 explanatory text. Uses include: data cleaning and transformation, numerical
7283 simulation, statistical modeling, machine learning and much more.")
7284 (license license:bsd-3)))
7285
7286 (define-public python-chardet
7287 (package
7288 (name "python-chardet")
7289 (version "2.3.0")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (string-append
7294 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7295 version
7296 ".tar.gz"))
7297 (sha256
7298 (base32
7299 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7300 (build-system python-build-system)
7301 (home-page "https://github.com/chardet/chardet")
7302 (synopsis "Universal encoding detector for Python 2 and 3")
7303 (description
7304 "This package provides @code{chardet}, a Python module that can
7305 automatically detect a wide range of file encodings.")
7306 (license license:lgpl2.1+)))
7307
7308 (define-public python2-chardet
7309 (package-with-python2 python-chardet))
7310
7311 (define-public python-docopt
7312 (package
7313 (name "python-docopt")
7314 (version "0.6.2")
7315 (source
7316 (origin
7317 (method url-fetch)
7318 ;; The release on PyPI does not include tests.
7319 (uri (string-append
7320 "https://github.com/docopt/docopt/archive/"
7321 version ".tar.gz"))
7322 (file-name (string-append name "-" version ".tar.gz"))
7323 (sha256
7324 (base32
7325 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7326 (build-system python-build-system)
7327 (native-inputs
7328 `(("python-pytest" ,python-pytest)))
7329 (arguments
7330 `(#:phases (alist-replace
7331 'check
7332 (lambda _ (zero? (system* "py.test")))
7333 %standard-phases)))
7334 (home-page "http://docopt.org")
7335 (synopsis "Command-line interface description language for Python")
7336 (description "This library allows the user to define a command-line
7337 interface from a program's help message rather than specifying it
7338 programatically with command-line parsers like @code{getopt} and
7339 @code{argparse}.")
7340 (license license:expat)))
7341
7342 (define-public python2-docopt
7343 (package-with-python2 python-docopt))
7344
7345 (define-public python-zope-event
7346 (package
7347 (name "python-zope-event")
7348 (version "4.1.0")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (string-append "https://pypi.python.org/packages/source/z"
7353 "/zope.event/zope.event-" version ".tar.gz"))
7354 (sha256
7355 (base32
7356 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7357 (build-system python-build-system)
7358 (home-page "http://pypi.python.org/pypi/zope.event")
7359 (synopsis "Event publishing system for Python")
7360 (description "Zope.event provides an event publishing API, intended for
7361 use by applications which are unaware of any subscribers to their events. It
7362 is a simple event-dispatching system on which more sophisticated event
7363 dispatching systems can be built.")
7364 (license license:zpl2.1)))
7365
7366 (define-public python2-zope-event
7367 (package-with-python2 python-zope-event))
7368
7369 (define-public python-zope-interface
7370 (package
7371 (name "python-zope-interface")
7372 (version "4.1.3")
7373 (source
7374 (origin
7375 (method url-fetch)
7376 (uri (string-append "https://pypi.python.org/packages/source/z"
7377 "/zope.interface/zope.interface-" version ".tar.gz"))
7378 (sha256
7379 (base32
7380 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7381 (build-system python-build-system)
7382 (native-inputs
7383 `(("python-zope-event" ,python-zope-event)))
7384 (home-page "https://github.com/zopefoundation/zope.interface")
7385 (synopsis "Python implementation of the \"design by contract\"
7386 methodology")
7387 (description "Zope.interface provides an implementation of \"object
7388 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7389 conforming to a given API or contract.")
7390 (license license:zpl2.1)))
7391
7392 (define-public python2-zope-interface
7393 (package-with-python2 python-zope-interface))
7394
7395 (define-public python-zope-exceptions
7396 (package
7397 (name "python-zope-exceptions")
7398 (version "4.0.8")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (string-append "https://pypi.python.org/packages/source/z"
7403 "/zope.exceptions/zope.exceptions-"
7404 version ".tar.gz"))
7405 (sha256
7406 (base32
7407 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7408 (build-system python-build-system)
7409 (arguments
7410 '(#:tests? #f)) ; circular dependency with zope.testrunner
7411 (propagated-inputs
7412 `(("python-zope-interface" ,python-zope-interface)))
7413 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7414 (synopsis "Zope exceptions")
7415 (description "Zope.exceptions provides general-purpose exception types
7416 that have uses outside of the Zope framework.")
7417 (license license:zpl2.1)))
7418
7419 (define-public python2-zope-exceptions
7420 (package-with-python2 python-zope-exceptions))
7421
7422 (define-public python-zope-testing
7423 (package
7424 (name "python-zope-testing")
7425 (version "4.5.0")
7426 (source
7427 (origin
7428 (method url-fetch)
7429 (uri (string-append "https://pypi.python.org/packages/source/z"
7430 "/zope.testing/zope.testing-" version ".tar.gz"))
7431 (sha256
7432 (base32
7433 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7434 (modules '((guix build utils)))
7435 (snippet
7436 '(begin
7437 ;; Remove pre-compiled .pyc files backup files from source.
7438 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7439 #t))))
7440 (build-system python-build-system)
7441 (native-inputs
7442 `(("python-zope-exceptions" ,python-zope-exceptions)))
7443 (propagated-inputs
7444 `(("python-zope-interface" ,python-zope-interface)))
7445 (home-page "http://pypi.python.org/pypi/zope.testing")
7446 (synopsis "Zope testing helpers")
7447 (description "Zope.testing provides a number of testing utilities for HTML
7448 forms, HTTP servers, regular expressions, and more.")
7449 (license license:zpl2.1)))
7450
7451 (define-public python2-zope-testing
7452 (package-with-python2 python-zope-testing))
7453
7454 (define-public python-zope-testrunner
7455 (package
7456 (name "python-zope-testrunner")
7457 (version "4.4.9")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (string-append "https://pypi.python.org/packages/source/z"
7462 "/zope.testrunner/zope.testrunner-"
7463 version ".zip"))
7464 (sha256
7465 (base32
7466 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7467 (build-system python-build-system)
7468 (native-inputs
7469 `(("python-six" ,python-six)
7470 ;("python-zope-interface" ,python-zope-interface)
7471 ("python-zope-exceptions" ,python-zope-exceptions)
7472 ("python-zope-testing" ,python-zope-testing)
7473 ("unzip" ,unzip)))
7474 (propagated-inputs
7475 `(("python-zope-interface" ,python-zope-interface)))
7476 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7477 (synopsis "Zope testrunner script")
7478 (description "Zope.testrunner provides a script for running Python
7479 tests.")
7480 (license license:zpl2.1)))
7481
7482 (define-public python2-zope-testrunner
7483 (let ((base (package-with-python2 python-zope-testrunner)))
7484 (package
7485 (inherit base)
7486 (native-inputs
7487 (append (package-native-inputs base)
7488 `(("python2-subunit" ,python2-subunit)
7489 ("python2-mimeparse" ,python2-mimeparse)))))))
7490
7491 (define-public python-zope-i18nmessageid
7492 (package
7493 (name "python-zope-i18nmessageid")
7494 (version "4.0.3")
7495 (source
7496 (origin
7497 (method url-fetch)
7498 (uri (string-append
7499 "https://pypi.python.org/packages/source/z"
7500 "/zope.i18nmessageid/zope.i18nmessageid-"
7501 version ".tar.gz"))
7502 (sha256
7503 (base32
7504 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7505 (build-system python-build-system)
7506 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7507 (synopsis "Message identifiers for internationalization")
7508 (description "Zope.i18nmessageid provides facilities for declaring
7509 internationalized messages within program source text.")
7510 (license license:zpl2.1)))
7511
7512 (define-public python2-zope-i18nmessageid
7513 (package-with-python2 python-zope-i18nmessageid))
7514
7515 (define-public python-zope-schema
7516 (package
7517 (name "python-zope-schema")
7518 (version "4.4.2")
7519 (source
7520 (origin
7521 (method url-fetch)
7522 (uri (string-append "https://pypi.python.org/packages/source/z"
7523 "/zope.schema/zope.schema-" version ".tar.gz"))
7524 (sha256
7525 (base32
7526 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7527 (build-system python-build-system)
7528 (propagated-inputs
7529 `(("python-zope-event" ,python-zope-event)
7530 ("python-zope-interface" ,python-zope-interface)))
7531 (native-inputs
7532 `(("python-zope-testing" ,python-zope-testing)
7533 ("python-coverage" ,python-coverage)
7534 ("python-nose" ,python-nose)))
7535 (home-page "http://pypi.python.org/pypi/zope.schema")
7536 (synopsis "Zope data schemas")
7537 (description "Zope.scheme provides extensions to zope.interface for
7538 defining data schemas.")
7539 (license license:zpl2.1)))
7540
7541 (define-public python2-zope-schema
7542 (package-with-python2 python-zope-schema))
7543
7544 (define-public python-zope-configuration
7545 (package
7546 (name "python-zope-configuration")
7547 (version "4.0.3")
7548 (source (origin
7549 (method url-fetch)
7550 (uri (string-append "https://pypi.python.org/packages/source/z"
7551 "/zope.configuration/zope.configuration-"
7552 version ".tar.gz"))
7553 (sha256
7554 (base32
7555 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7556 (build-system python-build-system)
7557 (propagated-inputs
7558 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7559 ("python-zope-schema" ,python-zope-schema)))
7560 (home-page "http://pypi.python.org/pypi/zope.configuration")
7561 (synopsis "Zope Configuration Markup Language")
7562 (description "Zope.configuration implements ZCML, the Zope Configuration
7563 Markup Language.")
7564 (license license:zpl2.1)))
7565
7566 (define-public python2-zope-configuration
7567 (package-with-python2 python-zope-configuration))
7568
7569 (define-public python-zope-proxy
7570 (package
7571 (name "python-zope-proxy")
7572 (version "4.1.6")
7573 (source
7574 (origin
7575 (method url-fetch)
7576 (uri (string-append "https://pypi.python.org/packages/source/z"
7577 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7578 (sha256
7579 (base32
7580 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7581 (build-system python-build-system)
7582 (propagated-inputs
7583 `(("python-zope-interface" ,python-zope-interface)))
7584 (home-page "http://pypi.python.org/pypi/zope.proxy")
7585 (synopsis "Generic, transparent proxies")
7586 (description "Zope.proxy provides generic, transparent proxies for Python.
7587 Proxies are special objects which serve as mostly-transparent wrappers around
7588 another object, intervening in the apparent behavior of the wrapped object
7589 only when necessary to apply the policy (e.g., access checking, location
7590 brokering, etc.) for which the proxy is responsible.")
7591 (license license:zpl2.1)))
7592
7593 (define-public python2-zope-proxy
7594 (package-with-python2 python-zope-proxy))
7595
7596 (define-public python-zope-location
7597 (package
7598 (name "python-zope-location")
7599 (version "4.0.3")
7600 (source
7601 (origin
7602 (method url-fetch)
7603 (uri (string-append "https://pypi.python.org/packages/source/z"
7604 "/zope.location/zope.location-" version ".tar.gz"))
7605 (sha256
7606 (base32
7607 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7608 (build-system python-build-system)
7609 (propagated-inputs
7610 `(("python-zope-proxy" ,python-zope-proxy)
7611 ("python-zope-schema" ,python-zope-schema)))
7612 (home-page "http://pypi.python.org/pypi/zope.location/")
7613 (synopsis "Zope location library")
7614 (description "Zope.location implements the concept of \"locations\" in
7615 Zope3, which are are special objects that have a structural location.")
7616 (license license:zpl2.1)))
7617
7618 (define-public python2-zope-location
7619 (package-with-python2 python-zope-location))
7620
7621 (define-public python-zope-security
7622 (package
7623 (name "python-zope-security")
7624 (version "4.0.3")
7625 (source
7626 (origin
7627 (method url-fetch)
7628 (uri (string-append "https://pypi.python.org/packages/source/z"
7629 "/zope.security/zope.security-" version ".tar.gz"))
7630 (sha256
7631 (base32
7632 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7633 (build-system python-build-system)
7634 (propagated-inputs
7635 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7636 ("python-zope-proxy" ,python-zope-proxy)
7637 ("python-zope-schema" ,python-zope-schema)))
7638 (native-inputs
7639 `(("python-zope-component" ,python-zope-component)
7640 ("python-zope-configuration" ,python-zope-configuration)
7641 ("python-zope-location" ,python-zope-location)
7642 ("python-zope-testrunner" ,python-zope-testrunner)
7643 ("python-zope-testing" ,python-zope-testing)))
7644 (home-page "http://pypi.python.org/pypi/zope.security")
7645 (synopsis "Zope security framework")
7646 (description "Zope.security provides a generic mechanism to implement
7647 security policies on Python objects.")
7648 (license license:zpl2.1)))
7649
7650 (define-public python2-zope-security
7651 (let ((zope-security (package-with-python2 python-zope-security)))
7652 (package (inherit zope-security)
7653 (propagated-inputs
7654 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7655 ,@(alist-delete
7656 "python-zope-testrunner"
7657 (package-propagated-inputs zope-security)))))))
7658
7659 (define-public python-zope-component
7660 (package
7661 (name "python-zope-component")
7662 (version "4.2.2")
7663 (source
7664 (origin
7665 (method url-fetch)
7666 (uri (string-append "https://pypi.python.org/packages/source/z"
7667 "/zope.component/zope.component-" version ".tar.gz"))
7668 (sha256
7669 (base32
7670 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7671 (build-system python-build-system)
7672 (arguments
7673 ;; Skip tests due to circular dependency with python-zope-security.
7674 '(#:tests? #f))
7675 (native-inputs
7676 `(("python-zope-testing" ,python-zope-testing)))
7677 (propagated-inputs
7678 `(("python-zope-event" ,python-zope-event)
7679 ("python-zope-interface" ,python-zope-interface)
7680 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7681 ("python-zope-configuration" ,python-zope-configuration)))
7682 (home-page "https://github.com/zopefoundation/zope.component")
7683 (synopsis "Zope Component Architecture")
7684 (description "Zope.component represents the core of the Zope Component
7685 Architecture. Together with the zope.interface package, it provides
7686 facilities for defining, registering and looking up components.")
7687 (license license:zpl2.1)))
7688
7689 (define-public python2-zope-component
7690 (package-with-python2 python-zope-component))
7691
7692 (define-public python-pythondialog
7693 (package
7694 (name "python-pythondialog")
7695 (version "3.4.0")
7696 (source
7697 (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "pythondialog" version))
7700 (sha256
7701 (base32
7702 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7703 (build-system python-build-system)
7704 (arguments
7705 `(#:phases
7706 (modify-phases %standard-phases
7707 (add-after 'unpack 'patch-path
7708 (lambda* (#:key inputs #:allow-other-keys)
7709 (let* ((dialog (assoc-ref inputs "dialog")))
7710 ;; Since this library really wants to grovel the search path, we
7711 ;; must hardcode dialog's store path into it.
7712 (substitute* "dialog.py"
7713 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7714 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7715 #t))))
7716 #:tests? #f)) ; no test suite
7717 (propagated-inputs
7718 `(("dialog" ,dialog)))
7719 (home-page "http://pythondialog.sourceforge.net/")
7720 (synopsis "Python interface to the UNIX dialog utility")
7721 (description "A Python wrapper for the dialog utility. Its purpose is to
7722 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7723 This allows one to make simple text-mode user interfaces on Unix-like systems")
7724 (license license:lgpl2.1)
7725 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7726
7727 (define-public python2-pythondialog
7728 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7729 (package
7730 (inherit base)
7731 (version (package-version python-pythondialog))
7732 (source (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "python2-pythondialog" version))
7735 (sha256
7736 (base32
7737 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7738
7739 (define-public python-pyrfc3339
7740 (package
7741 (name "python-pyrfc3339")
7742 (version "1.0")
7743 (source
7744 (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "pyRFC3339" version))
7747 (sha256
7748 (base32
7749 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7750 (build-system python-build-system)
7751 (propagated-inputs
7752 `(("python-pytz" ,python-pytz)))
7753 (native-inputs
7754 `(("python-nose" ,python-nose)))
7755 (home-page "https://github.com/kurtraschke/pyRFC3339")
7756 (synopsis "Python timestamp library")
7757 (description "Python library for generating and parsing RFC 3339-compliant
7758 timestamps.")
7759 (license license:expat)))
7760
7761 (define-public python2-pyrfc3339
7762 (package-with-python2 python-pyrfc3339))
7763
7764 (define-public python-werkzeug
7765 (package
7766 (name "python-werkzeug")
7767 (version "0.11.15")
7768 (source
7769 (origin
7770 (method url-fetch)
7771 (uri (pypi-uri "Werkzeug" version))
7772 (sha256
7773 (base32
7774 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
7775 (build-system python-build-system)
7776 (native-inputs
7777 `(("python-pytest" ,python-pytest)))
7778 (home-page "http://werkzeug.pocoo.org/")
7779 (synopsis "Utilities for WSGI applications")
7780 (description "One of the most advanced WSGI utility modules. It includes a
7781 powerful debugger, full-featured request and response objects, HTTP utilities to
7782 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7783 uploads, a powerful URL routing system and a bunch of community-contributed
7784 addon modules.")
7785 (license license:x11)))
7786
7787 (define-public python2-werkzeug
7788 (package-with-python2 python-werkzeug))
7789
7790 (define-public python-configobj
7791 (package
7792 (name "python-configobj")
7793 (version "5.0.6")
7794 (source (origin
7795 (method url-fetch)
7796 (uri (string-append
7797 "https://pypi.python.org/packages/source/c/configobj/"
7798 "configobj-" version ".tar.gz"))
7799 (sha256
7800 (base32
7801 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7802 ;; Patch setup.py so it looks for python-setuptools, which is
7803 ;; required to parse the keyword 'install_requires' in setup.py.
7804 (patches (search-patches "python-configobj-setuptools.patch"))))
7805 (build-system python-build-system)
7806 (propagated-inputs
7807 `(("python-six" ,python-six)))
7808 (synopsis "Config file reading, writing and validation")
7809 (description "ConfigObj is a simple but powerful config file reader and
7810 writer: an ini file round tripper. Its main feature is that it is very easy to
7811 use, with a straightforward programmer’s interface and a simple syntax for
7812 config files.")
7813 (home-page "https://github.com/DiffSK/configobj")
7814 (license license:bsd-3)))
7815
7816 (define-public python2-configobj
7817 (package-with-python2 python-configobj))
7818
7819 (define-public python-configargparse
7820 (package
7821 (name "python-configargparse")
7822 (version "0.10.0")
7823 (source (origin
7824 (method url-fetch)
7825 (uri (string-append
7826 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7827 "ConfigArgParse-" version ".tar.gz"))
7828 (sha256
7829 (base32
7830 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7831 (build-system python-build-system)
7832 (arguments
7833 ;; FIXME: Bug in test suite filed upstream:
7834 ;; https://github.com/bw2/ConfigArgParse/issues/32
7835 '(#:tests? #f))
7836 (synopsis "Replacement for argparse")
7837 (description "A drop-in replacement for argparse that allows options to also
7838 be set via config files and/or environment variables.")
7839 (home-page "https://github.com/bw2/ConfigArgParse")
7840 (license license:expat)))
7841
7842 (define-public python2-configargparse
7843 (package-with-python2 python-configargparse))
7844
7845 (define-public python-ndg-httpsclient
7846 (package
7847 (name "python-ndg-httpsclient")
7848 (version "0.4.2")
7849 (source (origin
7850 (method url-fetch)
7851 (uri (pypi-uri "ndg_httpsclient" version))
7852 (sha256
7853 (base32
7854 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
7855 (build-system python-build-system)
7856 (arguments
7857 '(;; The tests appear to require networking.
7858 #:tests? #f))
7859 (propagated-inputs
7860 `(("python-pyopenssl" ,python-pyopenssl)))
7861 (synopsis "HTTPS support for Python's httplib and urllib2")
7862 (description "This is a HTTPS client implementation for httplib and urllib2
7863 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7864 over the default provided with Python and importantly enables full verification
7865 of the SSL peer.")
7866 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7867 (license license:bsd-3)))
7868
7869 ;; python2-openssl requires special care, so package-with-python2 is
7870 ;; insufficient.
7871 (define-public python2-ndg-httpsclient
7872 (package (inherit python-ndg-httpsclient)
7873 (name "python2-ndg-httpsclient")
7874 (arguments `(#:python ,python-2))
7875 (propagated-inputs
7876 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7877
7878 (define-public python-contextlib2
7879 (package
7880 (name "python-contextlib2")
7881 (version "0.4.0")
7882 (source
7883 (origin
7884 (method url-fetch)
7885 (uri (pypi-uri "contextlib2" version))
7886 (sha256
7887 (base32
7888 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7889 (build-system python-build-system)
7890 (arguments
7891 `(#:phases
7892 (modify-phases %standard-phases
7893 (replace 'check
7894 (lambda _ (zero?
7895 (system*
7896 "python" "test_contextlib2.py" "-v")))))))
7897 (home-page "http://contextlib2.readthedocs.org/")
7898 (synopsis "Tools for decorators and context managers")
7899 (description "This module is primarily a backport of the Python
7900 3.2 contextlib to earlier Python versions. Like contextlib, it
7901 provides utilities for common tasks involving decorators and context
7902 managers. It also contains additional features that are not part of
7903 the standard library.")
7904 (license license:psfl)))
7905
7906 (define-public python2-contextlib2
7907 (package-with-python2 python-contextlib2))
7908
7909 (define-public python-texttable
7910 (package
7911 (name "python-texttable")
7912 (version "0.8.4")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "texttable" version))
7917 (sha256
7918 (base32
7919 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7920 (build-system python-build-system)
7921 (arguments '(#:tests? #f)) ; no tests
7922 (home-page "https://github.com/foutaise/texttable/")
7923 (synopsis "Python module for creating simple ASCII tables")
7924 (description "Texttable is a Python module for creating simple ASCII
7925 tables.")
7926 (license license:lgpl2.1+)))
7927
7928 (define-public python2-texttable
7929 (package-with-python2 python-texttable))
7930
7931 (define-public python-websocket-client
7932 (package
7933 (name "python-websocket-client")
7934 (version "0.37.0")
7935 (source
7936 (origin
7937 (method url-fetch)
7938 (uri (pypi-uri "websocket_client" version))
7939 (sha256
7940 (base32
7941 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7942 (build-system python-build-system)
7943 (propagated-inputs
7944 `(("python-six" ,python-six)))
7945 (home-page "https://github.com/liris/websocket-client")
7946 (synopsis "WebSocket client for Python")
7947 (description "The Websocket-client module provides the low level APIs for
7948 WebSocket usage in Python programs.")
7949 (license license:lgpl2.1+)))
7950
7951 (define-public python2-websocket-client
7952 (package-with-python2 python-websocket-client))
7953
7954 (define-public python-atomicwrites
7955 (package
7956 (name "python-atomicwrites")
7957 (version "1.1.0")
7958 (source (origin
7959 (method url-fetch)
7960 (uri (pypi-uri "atomicwrites" version))
7961 (sha256
7962 (base32
7963 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7964 (build-system python-build-system)
7965 (synopsis "Atomic file writes in Python")
7966 (description "Library for atomic file writes using platform dependent tools
7967 for atomic file system operations.")
7968 (home-page "https://github.com/untitaker/python-atomicwrites")
7969 (license license:expat)))
7970
7971 (define-public python2-atomicwrites
7972 (package-with-python2 python-atomicwrites))
7973
7974 (define-public python-requests-toolbelt
7975 (package
7976 (name "python-requests-toolbelt")
7977 (version "0.6.2")
7978 (source (origin
7979 (method url-fetch)
7980 (uri (string-append
7981 "https://pypi.python.org/packages/"
7982 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7983 "requests-toolbelt-" version ".tar.gz"))
7984 (sha256
7985 (base32
7986 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7987 (build-system python-build-system)
7988 (native-inputs
7989 `(("python-betamax" ,python-betamax)
7990 ("python-mock" ,python-mock)
7991 ("python-pytest" ,python-pytest)))
7992 (propagated-inputs
7993 `(("python-requests" ,python-requests)))
7994 (synopsis "Extensions to python-requests")
7995 (description "This is a toolbelt of useful classes and functions to be used
7996 with python-requests.")
7997 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7998 (license license:asl2.0)))
7999
8000 (define-public python-click-threading
8001 (package
8002 (name "python-click-threading")
8003 (version "0.2.0")
8004 (source (origin
8005 (method url-fetch)
8006 (uri (string-append
8007 "https://pypi.python.org/packages/"
8008 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8009 "click-threading-" version ".tar.gz"))
8010 (sha256
8011 (base32
8012 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8013 (build-system python-build-system)
8014 (propagated-inputs
8015 `(("python-click" ,python-click)))
8016 (synopsis "Utilities for multithreading in Click")
8017 (description "This package provides utilities for multithreading in Click
8018 applications.")
8019 (home-page "https://github.com/click-contrib/click-threading")
8020 (license license:expat)))
8021
8022 (define-public python-click-log
8023 (package
8024 (name "python-click-log")
8025 (version "0.1.8")
8026 (source (origin
8027 (method url-fetch)
8028 (uri (pypi-uri "click-log" version))
8029 (sha256
8030 (base32
8031 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8032 (build-system python-build-system)
8033 (propagated-inputs
8034 `(("python-click" ,python-click)))
8035 (synopsis "Logging for click applications")
8036 (description "This package provides a Python library for logging Click
8037 applications.")
8038 (home-page "https://github.com/click-contrib/click-log")
8039 (license license:expat)))
8040
8041 (define-public python-apipkg
8042 (package
8043 (name "python-apipkg")
8044 (version "1.4")
8045 (source (origin
8046 (method url-fetch)
8047 (uri (pypi-uri "apipkg" version))
8048 (sha256
8049 (base32
8050 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8051 (build-system python-build-system)
8052 (native-inputs
8053 `(("python-pytest" ,python-pytest)))
8054 (synopsis "Namespace control and lazy-import mechanism")
8055 (description "With apipkg you can control the exported namespace of a Python
8056 package and greatly reduce the number of imports for your users. It is a small
8057 pure Python module that works on virtually all Python versions.")
8058 (home-page "https://bitbucket.org/hpk42/apipkg")
8059 (license license:expat)))
8060
8061 (define-public python2-apipkg
8062 (package-with-python2 python-apipkg))
8063
8064 (define-public python-execnet
8065 (package
8066 (name "python-execnet")
8067 (version "1.4.1")
8068 (source (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "execnet" version))
8071 (sha256
8072 (base32
8073 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8074 (build-system python-build-system)
8075 (arguments
8076 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8077 ;; The two test failures are caused by the lack of an `ssh` executable.
8078 ;; The test suite can be run with pytest after the 'install' phase.
8079 #:tests? #f))
8080 (native-inputs
8081 `(("python-pytest" ,python-pytest)
8082 ("python-setuptools-scm" ,python-setuptools-scm)))
8083 (propagated-inputs
8084 `(("python-apipkg" ,python-apipkg)))
8085 (synopsis "Rapid multi-Python deployment")
8086 (description "Execnet provides a share-nothing model with
8087 channel-send/receive communication for distributing execution across many
8088 Python interpreters across version, platform and network barriers. It has a
8089 minimal and fast API targetting the following uses:
8090 @enumerate
8091 @item distribute tasks to (many) local or remote CPUs
8092 @item write and deploy hybrid multi-process applications
8093 @item write scripts to administer multiple environments
8094 @end enumerate")
8095 (home-page "http://codespeak.net/execnet/")
8096 (license license:expat)))
8097
8098 (define-public python2-execnet
8099 (package-with-python2 python-execnet))
8100
8101 (define-public python-trollius-redis
8102 (package
8103 (name "python-trollius-redis")
8104 (version "0.1.4")
8105 (source
8106 (origin
8107 (method url-fetch)
8108 (uri (pypi-uri "trollius_redis" version))
8109 (sha256
8110 (base32
8111 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8112 (build-system python-build-system)
8113 (home-page "https://github.com/benjolitz/trollius-redis")
8114 (synopsis "Port of asyncio-redis to trollius")
8115 (description "@code{trollius-redis} is a Redis client for Python
8116 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8117 Redis protocol.")
8118 (license license:bsd-2)))
8119
8120 (define-public python2-trollius-redis
8121 (package-with-python2 python-trollius-redis))
8122
8123 ;;; The software provided by this package was integrated into pytest 2.8.
8124 (define-public python-pytest-cache
8125 (package
8126 (name "python-pytest-cache")
8127 (version "1.0")
8128 (source (origin
8129 (method url-fetch)
8130 (uri (pypi-uri "pytest-cache" version))
8131 (sha256
8132 (base32
8133 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8134 (build-system python-build-system)
8135 (propagated-inputs
8136 `(("python-apipkg" ,python-apipkg)
8137 ("python-execnet" ,python-execnet)
8138 ("python-py" ,python-py)
8139 ("python-pytest" ,python-pytest)))
8140 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8141 (description "The pytest-cache plugin provides tools to rerun failures from
8142 the last py.test invocation.")
8143 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8144 (license license:expat)))
8145
8146 (define-public python2-pytest-cache
8147 (package-with-python2 python-pytest-cache))
8148
8149 (define-public python-pytest-localserver
8150 (package
8151 (name "python-pytest-localserver")
8152 (version "0.3.5")
8153 (source (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "pytest-localserver" version))
8156 (sha256
8157 (base32
8158 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8159 (build-system python-build-system)
8160 (arguments
8161 `(#:phases (modify-phases %standard-phases
8162 (replace 'check
8163 (lambda _
8164 (zero? (system* "py.test" "--genscript=runtests.py"))
8165 (zero? (system* "py.test")))))))
8166 (native-inputs
8167 `(("python-pytest" ,python-pytest)
8168 ("python-requests" ,python-requests)
8169 ("python-six" ,python-six)))
8170 (propagated-inputs
8171 `(("python-werkzeug" ,python-werkzeug)))
8172 (synopsis "Py.test plugin to test server connections locally")
8173 (description "Pytest-localserver is a plugin for the pytest testing
8174 framework which enables you to test server connections locally.")
8175 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8176 (license license:expat)))
8177
8178 (define-public python-wsgi-intercept
8179 (package
8180 (name "python-wsgi-intercept")
8181 (version "1.2.2")
8182 (source (origin
8183 (method url-fetch)
8184 (uri (string-append
8185 "https://pypi.python.org/packages/"
8186 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8187 "wsgi_intercept-" version ".tar.gz"))
8188 (sha256
8189 (base32
8190 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8191 (build-system python-build-system)
8192 (propagated-inputs
8193 `(("python-six" ,python-six)))
8194 (native-inputs
8195 `(("python-pytest" ,python-pytest)
8196 ("python-httplib2" ,python-httplib2)
8197 ("python-requests" ,python-requests)
8198 ("python-urllib3" ,python-urllib3)))
8199 (synopsis "Puts a WSGI application in place of a real URI for testing")
8200 (description "Wsgi_intercept installs a WSGI application in place of a real
8201 URI for testing. Testing a WSGI application normally involves starting a
8202 server at a local host and port, then pointing your test code to that address.
8203 Instead, this library lets you intercept calls to any specific host/port
8204 combination and redirect them into a WSGI application importable by your test
8205 program. Thus, you can avoid spawning multiple processes or threads to test
8206 your Web app.")
8207 (home-page "https://github.com/cdent/wsgi-intercept")
8208 (license license:expat)))
8209
8210 (define-public python-pytest-xprocess
8211 (package
8212 (name "python-pytest-xprocess")
8213 (version "0.9.1")
8214 (source (origin
8215 (method url-fetch)
8216 (uri (pypi-uri "pytest-xprocess" version))
8217 (sha256
8218 (base32
8219 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8220 (build-system python-build-system)
8221 (propagated-inputs
8222 `(("python-pytest" ,python-pytest)
8223 ("python-pytest-cache" ,python-pytest-cache)
8224 ("python-psutil" ,python-psutil)))
8225 (synopsis "Pytest plugin to manage external processes across test runs")
8226 (description "Pytest-xprocess is an experimental py.test plugin for managing
8227 processes across test runs.")
8228 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8229 (license license:expat)))
8230
8231 (define-public python-icalendar
8232 (package
8233 (name "python-icalendar")
8234 (version "3.11")
8235 (source (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "icalendar" version))
8238 (sha256
8239 (base32
8240 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
8241 (build-system python-build-system)
8242 (propagated-inputs
8243 `(("python-dateutil-2" ,python-dateutil-2)
8244 ("python-pytz" ,python-pytz)))
8245 (synopsis "Python library for parsing iCalendar files")
8246 (description "The icalendar package is a parser/generator of iCalendar
8247 files for use with Python.")
8248 (home-page "https://github.com/collective/icalendar")
8249 (license license:bsd-2)))
8250
8251 (define-public python-sphinxcontrib-newsfeed
8252 (package
8253 (name "python-sphinxcontrib-newsfeed")
8254 (version "0.1.4")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8258 (sha256
8259 (base32
8260 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8261 (build-system python-build-system)
8262 (propagated-inputs
8263 `(("python-sphinx" ,python-sphinx)))
8264 (synopsis "News Feed extension for Sphinx")
8265 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8266 Blog, News or Announcements section to a Sphinx website.")
8267 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8268 (license license:bsd-2)))
8269
8270 (define-public python-args
8271 (package
8272 (name "python-args")
8273 (version "0.1.0")
8274 (source (origin
8275 (method url-fetch)
8276 (uri (pypi-uri "args" version))
8277 (sha256
8278 (base32
8279 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8280 (build-system python-build-system)
8281 (home-page "https://github.com/kennethreitz/args")
8282 (synopsis "Command-line argument parser")
8283 (description
8284 "This library provides a Python module to parse command-line arguments.")
8285 (license license:bsd-3)))
8286
8287 (define-public python2-args
8288 (package-with-python2 python-args))
8289
8290 (define-public python-clint
8291 (package
8292 (name "python-clint")
8293 (version "0.5.1")
8294 (source (origin
8295 (method url-fetch)
8296 (uri (pypi-uri "clint" version))
8297 (sha256
8298 (base32
8299 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8300 (build-system python-build-system)
8301 (propagated-inputs
8302 `(("python-args" ,python-args)))
8303 (home-page "https://github.com/kennethreitz/clint")
8304 (synopsis "Command-line interface tools")
8305 (description
8306 "Clint is a Python module filled with a set of tools for developing
8307 command-line applications, including tools for colored and indented
8308 output, progress bar display, and pipes.")
8309 (license license:isc)))
8310
8311 (define-public python2-clint
8312 (package-with-python2 python-clint))
8313
8314 (define-public python-astor
8315 (package
8316 (name "python-astor")
8317 (version "0.5")
8318 (source (origin
8319 (method url-fetch)
8320 (uri (pypi-uri "astor" version))
8321 (sha256
8322 (base32
8323 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8324 (build-system python-build-system)
8325 (home-page "https://github.com/berkerpeksag/astor")
8326 (synopsis "Read and write Python ASTs")
8327 (description
8328 "Astor is designed to allow easy manipulation of Python source via the
8329 Abstract Syntax Tree.")
8330 (license license:bsd-3)))
8331
8332 (define-public python2-astor
8333 (package-with-python2 python-astor))
8334
8335 (define-public python-rply
8336 (package
8337 (name "python-rply")
8338 (version "0.7.4")
8339 (source (origin
8340 (method url-fetch)
8341 (uri (pypi-uri "rply" version))
8342 (sha256
8343 (base32
8344 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8345 (build-system python-build-system)
8346 (propagated-inputs
8347 `(("python-appdirs" ,python-appdirs)))
8348 (home-page "https://github.com/alex/rply")
8349 (synopsis "Parser generator for Python")
8350 (description
8351 "This package provides a pure Python based parser generator, that also
8352 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8353 with a new public API, and RPython support.")
8354 (license license:bsd-3)))
8355
8356 (define-public python2-rply
8357 (package-with-python2 python-rply))
8358
8359 (define-public python-hy
8360 (package
8361 (name "python-hy")
8362 (version "0.11.1")
8363 (source (origin
8364 (method url-fetch)
8365 (uri (pypi-uri "hy" version))
8366 (sha256
8367 (base32
8368 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8369 (build-system python-build-system)
8370 (propagated-inputs
8371 `(("python-astor" ,python-astor)
8372 ("python-clint" ,python-clint)
8373 ("python-rply" ,python-rply)))
8374 (home-page "http://hylang.org/")
8375 (synopsis "Lisp frontend to Python")
8376 (description
8377 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8378 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8379 Python at your fingertips, in Lisp form.")
8380 (license license:expat)))
8381
8382 (define-public python2-hy
8383 (package-with-python2 python-hy))
8384
8385 (define-public python-rauth
8386 (package
8387 (name "python-rauth")
8388 (version "0.7.2")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "rauth" version))
8393 (sha256
8394 (base32
8395 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8396 (build-system python-build-system)
8397 (arguments
8398 `(#:test-target "check"))
8399 (propagated-inputs
8400 `(("python-requests" ,python-requests)))
8401 (home-page "https://github.com/litl/rauth")
8402 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8403 (description
8404 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8405 provides service wrappers for convenient connection initialization and
8406 authenticated session objects providing things like keep-alive.")
8407 (license license:expat)
8408 (properties `((python2-variant . ,(delay python2-rauth))))))
8409
8410 (define-public python2-rauth
8411 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8412 (package
8413 (inherit base)
8414 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8415 ,@(package-native-inputs base))))))
8416
8417 (define-public python2-functools32
8418 (package
8419 (name "python2-functools32")
8420 (version "3.2.3-2")
8421 (source
8422 (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "functools32" version))
8425 (sha256
8426 (base32
8427 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8428 (build-system python-build-system)
8429 (arguments
8430 `(#:python ,python-2
8431 #:tests? #f)) ; no test target
8432 (home-page "https://github.com/MiCHiLU/python-functools32")
8433 (synopsis
8434 "Backport of the functools module from Python 3.2.3")
8435 (description
8436 "This package is a backport of the @code{functools} module from Python
8437 3.2.3 for use with older versions of Python and PyPy.")
8438 (license license:expat)))
8439
8440 (define-public python2-futures
8441 (package
8442 (name "python2-futures")
8443 (version "3.0.3")
8444 (source
8445 (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "futures" version))
8448 (sha256
8449 (base32
8450 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8451 (build-system python-build-system)
8452 (arguments `(#:python ,python-2))
8453 (home-page "https://github.com/agronholm/pythonfutures")
8454 (synopsis
8455 "Backport of the concurrent.futures package from Python 3.2")
8456 (description
8457 "The concurrent.futures module provides a high-level interface for
8458 asynchronously executing callables. This package backports the
8459 concurrent.futures package from Python 3.2")
8460 (license license:bsd-3)))
8461
8462 (define-public python-promise
8463 (package
8464 (name "python-promise")
8465 (version "0.4.2")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "promise" version))
8470 (sha256
8471 (base32
8472 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8473 (build-system python-build-system)
8474 ;; Tests wants python-futures, which is a python2 only program, and
8475 ;; can't be found by python-promise at test time.
8476 (arguments `(#:tests? #f))
8477 (home-page "https://github.com/syrusakbary/promise")
8478 (synopsis "Promises/A+ implementation for Python")
8479 (description
8480 "Promises/A+ implementation for Python")
8481 (properties `((python2-variant . ,(delay python2-promise))))
8482 (license license:expat)))
8483
8484 (define-public python2-promise
8485 (let ((promise (package-with-python2
8486 (strip-python2-variant python-promise))))
8487 (package (inherit promise)
8488 (arguments (substitute-keyword-arguments (package-arguments promise)
8489 ((#:tests? _) #t)))
8490 (native-inputs
8491 `(("python2-futures" ,python2-futures)
8492 ("python2-pytest" ,python2-pytest)
8493 ,@(package-native-inputs promise))))))
8494
8495 (define-public python-urllib3
8496 (package
8497 (name "python-urllib3")
8498 (version "1.18.1")
8499 (source
8500 (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "urllib3" version))
8503 (sha256
8504 (base32
8505 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8506 (build-system python-build-system)
8507 (arguments `(#:tests? #f))
8508 (native-inputs
8509 `(;; some packages for tests
8510 ("python-nose" ,python-nose)
8511 ("python-mock" ,python-mock)
8512 ("python-tornado" ,python-tornado)))
8513 (propagated-inputs
8514 `(;; extra packages for https security
8515 ("python-certifi" ,python-certifi)
8516 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8517 ("python-pyasn1" ,python-pyasn1)
8518 ("python-pyopenssl" ,python-pyopenssl)))
8519 (home-page "https://urllib3.readthedocs.org/")
8520 (synopsis "HTTP library with thread-safe connection pooling")
8521 (description
8522 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8523 can reuse the same socket connection for multiple requests, it can POST files,
8524 supports url redirection and retries, and also gzip and deflate decoding.")
8525 (license license:expat)))
8526
8527 (define-public python2-urllib3
8528 (package-with-python2 python-urllib3))
8529
8530 (define-public python-colorama
8531 (package
8532 (name "python-colorama")
8533 (version "0.3.3")
8534 (source
8535 (origin
8536 (method url-fetch)
8537 (uri (pypi-uri "colorama" version))
8538 (sha256
8539 (base32
8540 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8541 (build-system python-build-system)
8542 (synopsis "colored terminal text rendering for Python")
8543 (description "Colorama is a Python library for rendering colored terminal
8544 text.")
8545 (home-page "https://pypi.python.org/pypi/colorama")
8546 (license license:bsd-3)))
8547
8548 (define-public python2-colorama
8549 (package-with-python2 python-colorama))
8550
8551 (define-public python-rsa
8552 (package
8553 (name "python-rsa")
8554 (version "3.4.2")
8555 (source
8556 (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "rsa" version))
8559 (sha256
8560 (base32
8561 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8562 (build-system python-build-system)
8563 (propagated-inputs
8564 `(("python-pyasn1" ,python-pyasn1)))
8565 (synopsis "Pure-Python RSA implementation")
8566 (description "Python-RSA is a pure-Python RSA implementation. It supports
8567 encryption and decryption, signing and verifying signatures, and key
8568 generation according to PKCS#1 version 1.5. It can be used as a Python
8569 library as well as on the command line.")
8570 (home-page "http://stuvel.eu/rsa")
8571 (license license:asl2.0)))
8572
8573 (define-public python2-rsa
8574 (package-with-python2 python-rsa))
8575
8576 (define-public python-pluggy
8577 (package
8578 (name "python-pluggy")
8579 (version "0.3.1")
8580 (source
8581 (origin
8582 (method url-fetch)
8583 (uri (pypi-uri "pluggy" version))
8584 (sha256
8585 (base32
8586 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8587 (build-system python-build-system)
8588 (synopsis "Plugin and hook calling mechanism for Python")
8589 (description "Pluggy is an extraction of the plugin manager as used by
8590 Pytest but stripped of Pytest specific details.")
8591 (home-page "https://pypi.python.org/pypi/pluggy")
8592 (license license:expat)))
8593
8594 (define-public python2-pluggy
8595 (package-with-python2 python-pluggy))
8596
8597 (define-public python-tox
8598 (package
8599 (name "python-tox")
8600 (version "2.3.1")
8601 (source
8602 (origin
8603 (method url-fetch)
8604 (uri (pypi-uri "tox" version))
8605 (sha256
8606 (base32
8607 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8608 (build-system python-build-system)
8609 (arguments
8610 ;; FIXME: Tests require pytest-timeout, which itself requires
8611 ;; pytest>=2.8.0 for installation.
8612 '(#:tests? #f))
8613 (propagated-inputs
8614 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8615 ("python-py" ,python-py)
8616 ("python-virtualenv" ,python-virtualenv)))
8617 (native-inputs
8618 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8619 ("python-pytest" ,python-pytest))) ; >= 2.3.5
8620 (home-page "http://tox.testrun.org/")
8621 (synopsis "Virtualenv-based automation of test activities")
8622 (description "Tox is a generic virtualenv management and test command line
8623 tool. It can be used to check that a package installs correctly with
8624 different Python versions and interpreters, or run tests in each type of
8625 supported environment, or act as a frontend to continuous integration
8626 servers.")
8627 (license license:expat)))
8628
8629 (define-public python2-tox
8630 (package-with-python2 python-tox))
8631
8632 (define-public python-jmespath
8633 (package
8634 (name "python-jmespath")
8635 (version "0.9.0")
8636 (source
8637 (origin
8638 (method url-fetch)
8639 (uri (pypi-uri "jmespath" version))
8640 (sha256
8641 (base32
8642 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8643 (build-system python-build-system)
8644 (synopsis "JSON Matching Expressions")
8645 (description "JMESPath (pronounced “james path”) is a Python library that
8646 allows one to declaratively specify how to extract elements from a JSON
8647 document.")
8648 (home-page "https://github.com/jmespath/jmespath.py")
8649 (license license:expat)))
8650
8651 (define-public python2-jmespath
8652 (package-with-python2 python-jmespath))
8653
8654 (define-public python-botocore
8655 (package
8656 (name "python-botocore")
8657 (version "1.4.62")
8658 (source
8659 (origin
8660 (method url-fetch)
8661 (uri (pypi-uri "botocore" version))
8662 (sha256
8663 (base32
8664 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8665 (build-system python-build-system)
8666 (propagated-inputs
8667 `(("python-dateutil" ,python-dateutil-2)
8668 ("python-docutils" ,python-docutils)
8669 ("python-jmespath" ,python-jmespath)))
8670 (native-inputs
8671 `(("python-mock" ,python-mock)
8672 ("python-nose" ,python-nose)
8673 ("behave" ,behave)
8674 ("python-tox" ,python-tox)
8675 ("python-wheel" ,python-wheel)))
8676 (home-page "https://github.com/boto/botocore")
8677 (synopsis "Low-level interface to AWS")
8678 (description "Botocore is a Python library that provides a low-level
8679 interface to the Amazon Web Services (AWS) API.")
8680 (license license:asl2.0)))
8681
8682 (define-public python2-botocore
8683 (package-with-python2 python-botocore))
8684
8685 (define-public awscli
8686 (package
8687 (name "awscli")
8688 (version "1.11.35")
8689 (source
8690 (origin
8691 (method url-fetch)
8692 (uri (pypi-uri name version))
8693 (sha256
8694 (base32
8695 "0k6y8cg311bqak5x9pilg80w6f76dcbzm6xcdrw6rjnk6v4xwy70"))))
8696 (build-system python-build-system)
8697 (propagated-inputs
8698 `(("python-colorama" ,python-colorama)
8699 ("python-botocore" ,python-botocore)
8700 ("python-s3transfer" ,python-s3transfer)
8701 ("python-docutils" ,python-docutils)
8702 ("python-rsa" ,python-rsa)))
8703 (native-inputs
8704 `(("python-mock" ,python-mock)
8705 ("python-nose" ,python-nose)
8706 ("python-sphinx" ,python-sphinx)
8707 ("python-tox" ,python-tox)
8708 ("python-wheel" ,python-wheel)))
8709 (home-page "http://aws.amazon.com/cli/")
8710 (synopsis "Command line client for AWS")
8711 (description "AWS CLI provides a unified command line interface to the
8712 Amazon Web Services (AWS) API.")
8713 (license license:asl2.0)))
8714
8715 (define-public python-hypothesis
8716 (package
8717 (name "python-hypothesis")
8718 (version "3.1.0")
8719 (source (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "hypothesis" version))
8722 (sha256
8723 (base32
8724 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8725 (build-system python-build-system)
8726 (propagated-inputs
8727 `(("python-flake8" ,python-flake8)
8728 ("python-pytest" ,python-pytest)))
8729 (synopsis "Library for property based testing")
8730 (description "Hypothesis is a library for testing your Python code against a
8731 much larger range of examples than you would ever want to write by hand. It’s
8732 based on the Haskell library, Quickcheck, and is designed to integrate
8733 seamlessly into your existing Python unit testing work flow.")
8734 (home-page "https://github.com/DRMacIver/hypothesis")
8735 (license license:mpl2.0)
8736 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8737
8738 (define-public python2-hypothesis
8739 (let ((hypothesis (package-with-python2
8740 (strip-python2-variant python-hypothesis))))
8741 (package (inherit hypothesis)
8742 (native-inputs
8743 `(("python2-enum34" ,python2-enum34))))))
8744
8745 (define-public python-pytest-subtesthack
8746 (package
8747 (name "python-pytest-subtesthack")
8748 (version "0.1.1")
8749 (source (origin
8750 (method url-fetch)
8751 (uri (pypi-uri "pytest-subtesthack" version))
8752 (sha256
8753 (base32
8754 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8755 (build-system python-build-system)
8756 (propagated-inputs
8757 `(("python-pytest" ,python-pytest)))
8758 (synopsis "Set-up and tear-down fixtures for unit tests")
8759 (description "This plugin allows you to set up and tear down fixtures within
8760 unit test functions that use @code{py.test}. This is useful for using
8761 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8762 function multiple times, without setting up or tearing down fixture state as is
8763 normally the case.")
8764 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8765 (license license:unlicense)))
8766
8767 (define-public python2-pytest-subtesthack
8768 (package-with-python2 python-pytest-subtesthack))
8769
8770 (define-public python2-xdo
8771 (package
8772 (name "python2-xdo")
8773 (version "0.2")
8774 (source (origin
8775 (method url-fetch)
8776 (uri (string-append
8777 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8778 "python-xdo_" version ".orig.tar.gz"))
8779 (sha256
8780 (base32
8781 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8782 (build-system python-build-system)
8783 (arguments
8784 `(#:python ,python-2
8785 #:tests? #f)) ; no tests provided
8786 (inputs
8787 `(("xdotool" ,xdotool)
8788 ("libX11" ,libx11)))
8789 (home-page "https://tracker.debian.org/pkg/python-xdo")
8790 (synopsis "Python library for simulating X11 keyboard/mouse input")
8791 (description "Provides bindings to libxdo for manipulating X11 via simulated
8792 input. (Note that this is mostly a legacy library; you may wish to look at
8793 python-xdo for newer bindings.)")
8794 (license license:bsd-3)))
8795
8796 (define-public python-wtforms
8797 (package
8798 (name "python-wtforms")
8799 (version "2.1")
8800 (source
8801 (origin
8802 (method url-fetch)
8803 (uri (pypi-uri "WTForms" version ".zip"))
8804 (sha256
8805 (base32
8806 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8807 (build-system python-build-system)
8808 (arguments
8809 '(#:phases
8810 (modify-phases %standard-phases
8811 (add-after 'unpack 'remove-django-test
8812 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8813 (lambda _
8814 (substitute*
8815 "tests/runtests.py"
8816 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8817 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8818 #t)))))
8819 (native-inputs
8820 `(("unzip" ,unzip)))
8821 (home-page "http://wtforms.simplecodes.com/")
8822 (synopsis
8823 "Form validation and rendering library for Python web development")
8824 (description
8825 "WTForms is a flexible forms validation and rendering library
8826 for Python web development. It is very similar to the web form API
8827 available in Django, but is a standalone package.")
8828 (license license:bsd-3)))
8829
8830 (define-public python2-wtforms
8831 (package-with-python2 python-wtforms))
8832
8833 (define-public python-mako
8834 (package
8835 (name "python-mako")
8836 (version "1.0.3")
8837 (source
8838 (origin
8839 (method url-fetch)
8840 (uri (pypi-uri "Mako" version))
8841 (sha256
8842 (base32
8843 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8844 (build-system python-build-system)
8845 (propagated-inputs
8846 `(("python-markupsafe" ,python-markupsafe)))
8847 (native-inputs
8848 `(("python-mock" ,python-mock)
8849 ("python-nose" ,python-nose)))
8850 (home-page "http://www.makotemplates.org/")
8851 (synopsis "Templating language for Python")
8852 (description "Mako is a templating language for Python that compiles
8853 templates into Python modules.")
8854 (license license:expat)))
8855
8856 (define-public python2-mako
8857 (package-with-python2 python-mako))
8858
8859 (define-public python-waitress
8860 (package
8861 (name "python-waitress")
8862 (version "0.8.10")
8863 (source
8864 (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "waitress" version))
8867 (sha256
8868 (base32
8869 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8870 (build-system python-build-system)
8871 (home-page "https://github.com/Pylons/waitress")
8872 (synopsis "Waitress WSGI server")
8873 (description "Waitress is meant to be a production-quality pure-Python WSGI
8874 server with very acceptable performance.")
8875 (license license:zpl2.1)))
8876
8877 (define-public python2-waitress
8878 (package-with-python2 python-waitress))
8879
8880 (define-public python-wsgiproxy2
8881 (package
8882 (name "python-wsgiproxy2")
8883 (version "0.4.2")
8884 (source
8885 (origin
8886 (method url-fetch)
8887 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8888 (sha256
8889 (base32
8890 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8891 (build-system python-build-system)
8892 (arguments
8893 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8894 ;; support Python 3:
8895 ;; https://github.com/benoitc/restkit/issues/140
8896 #:tests? #f))
8897 (native-inputs
8898 `(("unzip" ,unzip)
8899 ("python-nose" ,python-nose)
8900 ("python-coverage" ,python-coverage)))
8901 (propagated-inputs
8902 `(("python-six" ,python-six)
8903 ("python-webob" ,python-webob)))
8904 (home-page
8905 "https://github.com/gawel/WSGIProxy2/")
8906 (synopsis "WSGI Proxy with various http client backends")
8907 (description "WSGI turns HTTP requests into WSGI function calls.
8908 WSGIProxy turns WSGI function calls into HTTP requests.
8909 It also includes code to sign requests and pass private data,
8910 and to spawn subprocesses to handle requests.")
8911 (license license:expat)))
8912
8913 (define-public python2-wsgiproxy2
8914 (package-with-python2 python-wsgiproxy2))
8915
8916 (define-public python-pastedeploy
8917 (package
8918 (name "python-pastedeploy")
8919 (version "1.5.2")
8920 (source
8921 (origin
8922 (method url-fetch)
8923 (uri (pypi-uri "PasteDeploy" version))
8924 (sha256
8925 (base32
8926 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8927 (build-system python-build-system)
8928 (native-inputs
8929 `(("python-nose" ,python-nose)))
8930 (home-page "http://pythonpaste.org/deploy/")
8931 (synopsis
8932 "Load, configure, and compose WSGI applications and servers")
8933 (description
8934 "This tool provides code to load WSGI applications and servers from URIs;
8935 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8936 Script provides commands to serve applications based on this configuration
8937 file.")
8938 (license license:expat)))
8939
8940 (define-public python2-pastedeploy
8941 (package-with-python2 python-pastedeploy))
8942
8943 (define-public python-paste
8944 (package
8945 (name "python-paste")
8946 (version "2.0.2")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "Paste" version))
8951 (sha256
8952 (base32
8953 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8954 (patches (search-patches "python-paste-remove-website-test.patch"
8955 "python-paste-remove-timing-test.patch"))))
8956 (build-system python-build-system)
8957 (native-inputs
8958 `(("python-nose" ,python-nose)))
8959 (propagated-inputs
8960 `(("python-six" ,python-six)))
8961 (arguments
8962 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8963 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8964 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8965 ;; still... things should be better by the next Paste release.)
8966 #:tests? #f))
8967 (home-page "http://pythonpaste.org")
8968 (synopsis
8969 "Python web development tools, focusing on WSGI")
8970 (description
8971 "Paste provides a variety of web development tools and middleware which
8972 can be nested together to build web applications. Paste's design closely
8973 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8974 (license license:expat)
8975 (properties `((python2-variant . ,(delay python2-paste))))))
8976
8977 (define-public python2-paste
8978 (let ((paste (package-with-python2
8979 (strip-python2-variant python-paste))))
8980 (package
8981 (inherit paste)
8982 (arguments
8983 ;; Tests are back for Python 2!
8984 `(#:tests? #t
8985 ,@(package-arguments paste))))))
8986
8987 (define-public python-pastescript
8988 (package
8989 (name "python-pastescript")
8990 (version "2.0.2")
8991 (source
8992 (origin
8993 (method url-fetch)
8994 (uri (pypi-uri "PasteScript" version))
8995 (sha256
8996 (base32
8997 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8998 (build-system python-build-system)
8999 (native-inputs
9000 `(("python-nose" ,python-nose)))
9001 (propagated-inputs
9002 `(("python-paste" ,python-paste)
9003 ("python-pastedeploy" ,python-pastedeploy)))
9004 (home-page "http://pythonpaste.org/script/")
9005 (arguments
9006 '(;; Unfortunately, this requires the latest unittest2,
9007 ;; but that requires traceback2 which requires linecache2 which requires
9008 ;; unittest2. So we're skipping tests for now.
9009 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9010 ;; so in theory we could get around this situation somehow.)
9011 #:tests? #f))
9012 (synopsis
9013 "Pluggable command line tool for serving web applications and more")
9014 (description
9015 "PasteScript is a plugin-friendly command line tool which provides a
9016 variety of features, from launching web applications to bootstrapping project
9017 layouts.")
9018 (license license:expat)))
9019
9020 (define-public python2-pastescript
9021 (package-with-python2 python-pastescript))
9022
9023 (define-public python-pyquery
9024 (package
9025 (name "python-pyquery")
9026 (version "1.2.17")
9027 (source
9028 (origin
9029 (method url-fetch)
9030 (uri (pypi-uri "pyquery" version))
9031 (sha256
9032 (base32
9033 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9034 (build-system python-build-system)
9035 (native-inputs
9036 `(("python-webob" ,python-webob)
9037 ("python-webtest" ,python-webtest)))
9038 (propagated-inputs
9039 `(("python-lxml" ,python-lxml)
9040 ("python-cssselect" ,python-cssselect)))
9041 (home-page "https://github.com/gawel/pyquery")
9042 (synopsis "Make jQuery-like queries on xml documents")
9043 (description "pyquery allows you to make jQuery queries on xml documents.
9044 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9045 fast xml and html manipulation.")
9046 (license license:bsd-3)))
9047
9048 (define-public python2-pyquery
9049 (package-with-python2 python-pyquery))
9050
9051 (define-public python-webtest
9052 (package
9053 (name "python-webtest")
9054 (version "2.0.20")
9055 (source
9056 (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "WebTest" version))
9059 (sha256
9060 (base32
9061 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9062 (build-system python-build-system)
9063 (arguments
9064 `(;; Unfortunately we have to disable tests!
9065 ;; This release of WebTest is pinned to python-nose < 1.3,
9066 ;; but older versions of python-nose are plagued with the following
9067 ;; bug(s), which rears its ugly head during test execution:
9068 ;; https://github.com/nose-devs/nose/issues/759
9069 ;; https://github.com/nose-devs/nose/pull/811
9070 #:tests? #f))
9071 ;; Commented out code is no good, but in this case, once tests
9072 ;; are ready to be enabled again, we should put the following
9073 ;; in place:
9074 ;; (native-inputs
9075 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9076 ;; ; but see above comment
9077 ;; ("python-coverage" ,python-coverage)
9078 ;; ("python-mock" ,python-mock)
9079 ;; ("python-pastedeploy" ,python-pastedeploy)
9080 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9081 ;; ("python-pyquery" ,python-pyquery)))
9082 (propagated-inputs
9083 `(("python-waitress" ,python-waitress)
9084 ("python-webob" ,python-webob)
9085 ("python-six" ,python-six)
9086 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9087 (home-page "http://webtest.pythonpaste.org/")
9088 (synopsis "Helper to test WSGI applications")
9089 (description "Webtest allows you to test your Python web applications
9090 without starting an HTTP server. It supports anything that supports the
9091 minimum of WSGI.")
9092 (license license:expat)))
9093
9094 (define-public python2-webtest
9095 (package-with-python2 python-webtest))
9096
9097 (define-public python-anyjson
9098 (package
9099 (name "python-anyjson")
9100 (version "0.3.3")
9101 (source
9102 (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "anyjson" version))
9105 (sha256
9106 (base32
9107 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9108 (build-system python-build-system)
9109 (arguments
9110 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9111 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9112 ;; whatever) so this transformation needs to be done before the tests
9113 ;; can be run. Maybe we could add a build step to transform beforehand
9114 ;; but it could be annoying/difficult.
9115 ;; We can enable tests for the Python 2 version, though, and do below.
9116 #:tests? #f))
9117 (home-page "http://bitbucket.org/runeh/anyjson/")
9118 (synopsis
9119 "Wraps best available JSON implementation in a common interface")
9120 (description
9121 "Anyjson loads whichever is the fastest JSON module installed
9122 and provides a uniform API regardless of which JSON implementation is used.")
9123 (license license:bsd-3)
9124 (properties `((python2-variant . ,(delay python2-anyjson))))))
9125
9126 (define-public python2-anyjson
9127 (let ((anyjson (package-with-python2
9128 (strip-python2-variant python-anyjson))))
9129 (package
9130 (inherit anyjson)
9131 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9132 #:tests? #t
9133 ,@(package-arguments anyjson)))
9134 (native-inputs `(("python2-nose" ,python2-nose))))))
9135
9136 (define-public python-amqp
9137 (package
9138 (name "python-amqp")
9139 (version "1.4.9")
9140 (source
9141 (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "amqp" version))
9144 (sha256
9145 (base32
9146 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9147 (build-system python-build-system)
9148 (native-inputs
9149 `(("python-nose" ,python-nose)
9150 ("python-mock" ,python-mock)))
9151 (home-page "http://github.com/celery/py-amqp")
9152 (synopsis
9153 "Low-level AMQP client for Python (fork of amqplib)")
9154 (description
9155 "This is a fork of amqplib which was originally written by Barry Pederson.
9156 It is maintained by the Celery project, and used by kombu as a pure python
9157 alternative when librabbitmq is not available.")
9158 (license license:lgpl2.1+)
9159 (properties `((python2-variant . ,(delay python2-amqp))))))
9160
9161 (define-public python2-amqp
9162 (let ((amqp (package-with-python2
9163 (strip-python2-variant python-amqp))))
9164 (package
9165 (inherit amqp)
9166 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9167 ;; unmaintained. Weirdly, does not do this on the python 3
9168 ;; version?
9169 #:tests? #f
9170 ,@(package-arguments amqp))))))
9171
9172 (define-public python-kombu
9173 (package
9174 (name "python-kombu")
9175 (version "3.0.37")
9176 (source
9177 (origin
9178 (method url-fetch)
9179 (uri (pypi-uri "kombu" version))
9180 (sha256
9181 (base32
9182 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9183 (build-system python-build-system)
9184 (native-inputs
9185 `(("python-mock" ,python-mock)
9186 ("python-nose" ,python-nose)))
9187 (propagated-inputs
9188 `(("python-anyjson" ,python-anyjson)
9189 ("python-amqp" ,python-amqp)
9190 ("python-redis" ,python-redis)))
9191 (home-page "http://kombu.readthedocs.org")
9192 (synopsis "Message passing library for Python")
9193 (description "The aim of Kombu is to make messaging in Python as easy as
9194 possible by providing an idiomatic high-level interface for the AMQ protocol,
9195 and also provide proven and tested solutions to common messaging problems.
9196 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9197 message orientation, queuing, routing, reliability and security, for which the
9198 RabbitMQ messaging server is the most popular implementation.")
9199 (license license:bsd-3)
9200 (properties `((python2-variant . ,(delay python2-kombu))))))
9201
9202 (define-public python2-kombu
9203 (let ((kombu (package-with-python2
9204 (strip-python2-variant python-kombu))))
9205 (package
9206 (inherit kombu)
9207 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9208 ,@(package-native-inputs kombu))))))
9209
9210 (define-public python-billiard
9211 (package
9212 (name "python-billiard")
9213 (version "3.3.0.23")
9214 (source
9215 (origin
9216 (method url-fetch)
9217 (uri (pypi-uri "billiard" version))
9218 (sha256
9219 (base32
9220 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9221 (build-system python-build-system)
9222 (native-inputs
9223 `(("python-nose" ,python-nose)))
9224 (home-page "http://github.com/celery/billiard")
9225 (synopsis
9226 "Python multiprocessing fork with improvements and bugfixes")
9227 (description
9228 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9229 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9230 pyprocessing package. This standalone variant is intended to be compatible with
9231 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9232 (license license:bsd-3)
9233 (properties `((python2-variant . ,(delay python2-billiard))))))
9234
9235 (define-public python2-billiard
9236 (let ((billiard (package-with-python2
9237 (strip-python2-variant python-billiard))))
9238 (package
9239 (inherit billiard)
9240 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9241 ("python2-mock" ,python2-mock)
9242 ,@(package-native-inputs billiard))))))
9243
9244 (define-public python-celery
9245 (package
9246 (name "python-celery")
9247 (version "3.1.24")
9248 (source
9249 (origin
9250 (method url-fetch)
9251 (uri (pypi-uri "celery" version))
9252 (sha256
9253 (base32
9254 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9255 (build-system python-build-system)
9256 (arguments
9257 `(#:phases
9258 (modify-phases %standard-phases
9259 ;; These tests break with Python 3.5:
9260 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9261 (replace 'check
9262 (lambda _
9263 (zero?
9264 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9265 (native-inputs
9266 `(("python-nose" ,python-nose)))
9267 (propagated-inputs
9268 `(("python-pytz" ,python-pytz)
9269 ("python-billiard" ,python-billiard)
9270 ("python-kombu" ,python-kombu)))
9271 (home-page "http://celeryproject.org")
9272 (synopsis "Distributed Task Queue")
9273 (description "Celery is an asynchronous task queue/job queue based on
9274 distributed message passing. It is focused on real-time operation, but
9275 supports scheduling as well. The execution units, called tasks, are executed
9276 concurrently on a single or more worker servers using multiprocessing,
9277 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9278 synchronously (wait until ready).")
9279 (license license:bsd-3)
9280 (properties `((python2-variant . ,(delay python2-celery))))))
9281
9282 (define-public python2-celery
9283 (let ((celery (package-with-python2
9284 (strip-python2-variant python-celery))))
9285 (package
9286 (inherit celery)
9287 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9288 ("python2-mock" ,python2-mock)
9289 ,@(package-native-inputs celery))))))
9290
9291 (define-public python-translitcodec
9292 (package
9293 (name "python-translitcodec")
9294 (version "0.4.0")
9295 (source
9296 (origin
9297 (method url-fetch)
9298 (uri (pypi-uri "translitcodec" version))
9299 (sha256
9300 (base32
9301 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9302 (build-system python-build-system)
9303 (arguments
9304 `(#:tests? #f)) ; no tests provided
9305 (home-page
9306 "https://github.com/claudep/translitcodec")
9307 (synopsis
9308 "Unicode to 8-bit charset transliteration codec")
9309 (description
9310 "This package contains codecs for transliterating ISO 10646 texts into
9311 best-effort representations using smaller coded character sets (ASCII,
9312 ISO 8859, etc.).")
9313 (license license:expat)))
9314
9315 (define-public python2-translitcodec
9316 (package-with-python2 python-translitcodec))
9317
9318 (define-public python-editor
9319 (package
9320 (name "python-editor")
9321 (version "0.5")
9322 (source
9323 (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "python-editor" version))
9326 (sha256
9327 (base32
9328 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9329 (build-system python-build-system)
9330 (home-page
9331 "https://github.com/fmoo/python-editor")
9332 (synopsis
9333 "Programmatically open an editor, capture the result")
9334 (description
9335 "python-editor is a library that provides the editor module for
9336 programmatically interfacing with your system's $EDITOR.")
9337 (license license:asl2.0)))
9338
9339 (define-public python2-editor
9340 (package-with-python2 python-editor))
9341
9342 (define-public python-sphinxcontrib-programoutput
9343 (package
9344 (name "python-sphinxcontrib-programoutput")
9345 (version "0.8")
9346 (source (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9349 (sha256
9350 (base32
9351 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9352 (build-system python-build-system)
9353 (propagated-inputs
9354 `(("python-sphinx" ,python-sphinx)))
9355 (synopsis "Sphinx extension to include program output")
9356 (description "A Sphinx extension to literally insert the output of arbitrary
9357 commands into documents, helping you to keep your command examples up to date.")
9358 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
9359 (license license:bsd-2)))
9360
9361 (define-public python2-sphinxcontrib-programoutput
9362 (package-with-python2 python-sphinxcontrib-programoutput))
9363
9364 (define-public python-sphinx-repoze-autointerface
9365 (package
9366 (name "python-sphinx-repoze-autointerface")
9367 (version "0.8")
9368 (source (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9371 (sha256
9372 (base32
9373 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
9374 (build-system python-build-system)
9375 (propagated-inputs
9376 `(("python-sphinx" ,python-sphinx)
9377 ("python-zope-interface" ,python-zope-interface)))
9378 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9379 (description "This package defines an extension for the Sphinx documentation
9380 system. The extension allows generation of API documentation by
9381 introspection of @code{zope.interface} instances in code.")
9382 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
9383 (license license:repoze)))
9384
9385 (define-public python2-sphinx-repoze-autointerface
9386 (package-with-python2 python-sphinx-repoze-autointerface))
9387
9388 (define-public python-psycopg2
9389 (package
9390 (name "python-psycopg2")
9391 (version "2.6.1")
9392 (source
9393 (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "psycopg2" version))
9396 (sha256
9397 (base32
9398 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9399 (build-system python-build-system)
9400 (arguments
9401 ;; Tests would require a postgresql database "psycopg2_test"
9402 ;; and a running postgresql database management service.
9403 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9404 (inputs
9405 `(("postgresql" ,postgresql))) ; libpq
9406 (home-page "http://initd.org/psycopg/")
9407 (synopsis "Python PostgreSQL adapter")
9408 (description
9409 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
9410 (license license:lgpl3+)))
9411
9412 (define-public python2-psycopg2
9413 (package-with-python2 python-psycopg2))
9414
9415 (define-public python-vobject
9416 (package
9417 (name "python-vobject")
9418 (version "0.9.2")
9419 (source (origin
9420 (method url-fetch)
9421 (uri (pypi-uri "vobject" version))
9422 (sha256
9423 (base32
9424 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9425 (build-system python-build-system)
9426 (arguments
9427 '(;; The test suite relies on some non-portable Windows interfaces.
9428 #:tests? #f))
9429 (propagated-inputs
9430 `(("python-dateutil-2" ,python-dateutil-2)
9431 ("python-pyicu" ,python-pyicu)))
9432 (synopsis "Parse and generate vCard and vCalendar files")
9433 (description "Vobject is intended to be a full featured Python package for
9434 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9435 are supported and well tested. vCard 3.0 files are supported, and all data
9436 should be imported, but only a few components are understood in a sophisticated
9437 way.")
9438 (home-page "http://eventable.github.io/vobject/")
9439 (license license:asl2.0)))
9440
9441 (define-public python2-vobject
9442 (package-with-python2 python-vobject))
9443
9444 (define-public python-munkres
9445 (package
9446 (name "python-munkres")
9447 (version "1.0.8")
9448 (source (origin
9449 (method url-fetch)
9450 (uri (pypi-uri "munkres" version))
9451 (sha256
9452 (base32
9453 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9454 (build-system python-build-system)
9455 (arguments
9456 '(#:tests? #f)) ; no test suite
9457 (home-page "http://software.clapper.org/munkres/")
9458 (synopsis "Implementation of the Munkres algorithm")
9459 (description "The Munkres module provides an implementation of the Munkres
9460 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9461 useful for solving the Assignment Problem.")
9462 (license license:bsd-3)))
9463
9464 (define-public python2-munkres
9465 (package-with-python2 python-munkres))
9466
9467 (define-public python-flask
9468 (package
9469 (name "python-flask")
9470 (version "0.11.1")
9471 (source (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "Flask" version))
9474 (sha256
9475 (base32
9476 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
9477 (build-system python-build-system)
9478 (propagated-inputs
9479 `(("python-itsdangerous" ,python-itsdangerous)
9480 ("python-jinja2" ,python-jinja2)
9481 ("python-click" ,python-click)
9482 ("python-werkzeug" ,python-werkzeug)))
9483 (home-page "https://github.com/mitsuhiko/flask/")
9484 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9485 (description "Flask is a micro web framework based on the Werkzeug toolkit
9486 and Jinja2 template engine. It is called a micro framework because it does not
9487 presume or force a developer to use a particular tool or library.")
9488 (license license:bsd-3)))
9489
9490 (define-public python2-flask
9491 (package-with-python2 python-flask))
9492
9493 (define-public python-flask-wtf
9494 (package
9495 (name "python-flask-wtf")
9496 (version "0.13.1")
9497 (source
9498 (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "Flask-WTF" version))
9501 (sha256
9502 (base32
9503 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9504 (build-system python-build-system)
9505 (propagated-inputs
9506 `(("python-flask-babel" ,python-flask-babel)
9507 ("python-babel" ,python-babel)
9508 ("python-wtforms" ,python-wtforms)))
9509 (native-inputs
9510 `(("python-nose" ,python-nose)))
9511 (home-page "https://github.com/lepture/flask-wtf")
9512 (synopsis "Simple integration of Flask and WTForms")
9513 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9514 upload, and reCAPTCHA.")
9515 (license license:bsd-3)))
9516
9517 (define-public python2-flask-wtf
9518 (package-with-python2 python-flask-wtf))
9519
9520 (define-public python-flask-multistatic
9521 (package
9522 (name "python-flask-multistatic")
9523 (version "1.0")
9524 (source
9525 (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "flask-multistatic" version))
9528 (sha256
9529 (base32
9530 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9531 (build-system python-build-system)
9532 (propagated-inputs
9533 `(("python-flask" ,python-flask)))
9534 (home-page "https://pagure.io/flask-multistatic")
9535 (synopsis "Flask plugin to allow overriding static files")
9536 (description "@code{flask-multistatic} is a flask plugin that adds support
9537 for overriding static files.")
9538 (license license:gpl3+)))
9539
9540 (define-public python2-flask-multistatic
9541 (package-with-python2 python-flask-multistatic))
9542
9543 (define-public python-cookies
9544 (package
9545 (name "python-cookies")
9546 (version "2.2.1")
9547 (source (origin
9548 (method url-fetch)
9549 (uri (pypi-uri "cookies" version))
9550 (sha256
9551 (base32
9552 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9553 (build-system python-build-system)
9554 (arguments
9555 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9556 #:tests? #f))
9557 (native-inputs
9558 `(("python-pytest" ,python2-pytest)))
9559 (synopsis "HTTP cookie parser and renderer")
9560 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9561 Python.")
9562 (home-page "https://gitlab.com/sashahart/cookies")
9563 (license license:expat)))
9564
9565 (define-public python2-cookies
9566 (package-with-python2 python-cookies))
9567
9568 (define-public python-responses
9569 (package
9570 (name "python-responses")
9571 (version "0.5.1")
9572 (source (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "responses" version))
9575 (sha256
9576 (base32
9577 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9578 (build-system python-build-system)
9579 (arguments
9580 `(;; Test suite is not distributed:
9581 ;; https://github.com/getsentry/responses/issues/38
9582 #:tests? #f))
9583 (native-inputs
9584 `(("python-mock" ,python-mock)))
9585 (propagated-inputs
9586 `(("python-requests" ,python-requests)
9587 ("python-cookies" ,python-cookies)
9588 ("python-six" ,python-six)))
9589 (home-page "https://github.com/getsentry/responses")
9590 (synopsis "Utility for mocking out the `requests` Python library")
9591 (description "A utility library for mocking out the `requests` Python
9592 library.")
9593 (license license:asl2.0)))
9594
9595 (define-public python2-responses
9596 (package-with-python2 python-responses))
9597
9598 (define-public python-whoosh
9599 (package
9600 (name "python-whoosh")
9601 (version "2.7.4")
9602 (source
9603 (origin
9604 (method url-fetch)
9605 (uri (pypi-uri "Whoosh" version))
9606 (sha256
9607 (base32
9608 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9609 (build-system python-build-system)
9610 (native-inputs
9611 `(("python-pytest" ,python-pytest)))
9612 (home-page "http://bitbucket.org/mchaput/whoosh")
9613 (synopsis "Full text indexing, search, and spell checking library")
9614 (description
9615 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9616 checking library.")
9617 (license license:bsd-2)))
9618
9619 (define-public python2-whoosh
9620 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9621 (package (inherit whoosh)
9622 (propagated-inputs
9623 `(("python2-backport-ssl-match-hostname"
9624 ,python2-backport-ssl-match-hostname)
9625 ,@(package-propagated-inputs whoosh))))))
9626
9627 (define-public python-pathlib
9628 (package
9629 (name "python-pathlib")
9630 (version "1.0.1")
9631 (source (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "pathlib" version))
9634 (sha256
9635 (base32
9636 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9637 (build-system python-build-system)
9638 ;; The tests depend on the internal "test" module, which does not provide
9639 ;; a stable interface.
9640 (arguments `(#:tests? #f))
9641 (home-page "https://pathlib.readthedocs.org/")
9642 (synopsis "Object-oriented file system paths")
9643 (description "Pathlib offers a set of classes to handle file system paths.
9644 It offers the following advantages over using string objects:
9645
9646 @enumerate
9647 @item No more cumbersome use of os and os.path functions. Everything can
9648 be done easily through operators, attribute accesses, and method calls.
9649 @item Embodies the semantics of different path types. For example,
9650 comparing Windows paths ignores casing.
9651 @item Well-defined semantics, eliminating any inconsistencies or
9652 ambiguities (forward vs. backward slashes, etc.).
9653 @end enumerate
9654
9655 Note: In Python 3.4, pathlib is now part of the standard library. For other
9656 Python versions please consider python-pathlib2 instead, which tracks the
9657 standard library module. This module (python-pathlib) isn't maintained
9658 anymore.")
9659 (license license:expat)))
9660
9661 (define-public python2-pathlib
9662 (package-with-python2 python-pathlib))
9663
9664 (define-public python2-pathlib2
9665 (package
9666 (name "python2-pathlib2")
9667 (version "2.1.0")
9668 (source (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "pathlib2" version))
9671 (sha256
9672 (base32
9673 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9674 (build-system python-build-system)
9675 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9676 ;; version is 3.4 which already includes this package as part of the
9677 ;; standard library.
9678 (arguments
9679 `(#:python ,python-2))
9680 (native-inputs
9681 `(("python2-six" ,python2-six)))
9682 (home-page "http://pypi.python.org/pypi/pathlib2/")
9683 (synopsis "Object-oriented file system paths - backport of standard
9684 pathlib module")
9685 (description "The goal of pathlib2 is to provide a backport of standard
9686 pathlib module which tracks the standard library module, so all the newest
9687 features of the standard pathlib can be used also on older Python versions.
9688
9689 Pathlib offers a set of classes to handle file system paths. It offers the
9690 following advantages over using string objects:
9691
9692 @enumerate
9693 @item No more cumbersome use of os and os.path functions. Everything can
9694 be done easily through operators, attribute accesses, and method calls.
9695 @item Embodies the semantics of different path types. For example,
9696 comparing Windows paths ignores casing.
9697 @item Well-defined semantics, eliminating any inconsistencies or
9698 ambiguities (forward vs. backward slashes, etc.).
9699 @end enumerate")
9700 (license license:expat)))
9701
9702 (define-public python-jellyfish
9703 (package
9704 (name "python-jellyfish")
9705 (version "0.5.6")
9706 (source (origin
9707 (method url-fetch)
9708 (uri (pypi-uri "jellyfish" version))
9709 (sha256
9710 (base32
9711 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9712 (build-system python-build-system)
9713 (native-inputs
9714 `(("python-pytest" ,python-pytest)))
9715 (home-page "https://github.com/jamesturk/jellyfish")
9716 (synopsis "Approximate and phonetic matching of strings")
9717 (description "Jellyfish uses a variety of string comparison and phonetic
9718 encoding algorithms to do fuzzy string matching.")
9719 (license license:bsd-2)
9720 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9721
9722 (define-public python2-jellyfish
9723 (let ((jellyfish (package-with-python2
9724 (strip-python2-variant python-jellyfish))))
9725 (package (inherit jellyfish)
9726 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9727 ,@(package-native-inputs jellyfish))))))
9728
9729 (define-public python2-unicodecsv
9730 (package
9731 (name "python2-unicodecsv")
9732 (version "0.14.1")
9733 (source (origin
9734 (method url-fetch)
9735 ;; The test suite is not included in the PyPi release.
9736 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9737 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9738 "archive/" version ".tar.gz"))
9739 (file-name (string-append name "-" version ".tar.gz"))
9740 (sha256
9741 (base32
9742 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9743 (build-system python-build-system)
9744 (arguments
9745 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9746 #:python ,python-2))
9747 (native-inputs
9748 `(("python2-unittest2" ,python2-unittest2)))
9749 (home-page "https://github.com/jdunck/python-unicodecsv")
9750 (synopsis "Unicode CSV module for Python 2")
9751 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9752 module, adding support for Unicode strings.")
9753 (license license:bsd-2)))
9754
9755 (define-public python-rarfile
9756 (package
9757 (name "python-rarfile")
9758 (version "2.8")
9759 (source (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "rarfile" version))
9762 (sha256
9763 (base32
9764 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9765 (build-system python-build-system)
9766 (arguments
9767 '(#:phases
9768 (modify-phases %standard-phases
9769 (replace 'check
9770 ;; Many tests fail, but the installation proceeds.
9771 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9772 (native-inputs
9773 `(("which" ,which))) ; required for tests
9774 (propagated-inputs
9775 `(("libarchive" ,libarchive)))
9776 (home-page "https://github.com/markokr/rarfile")
9777 (synopsis "RAR archive reader for Python")
9778 (description "This is Python module for RAR archive reading. The interface
9779 is made as zipfile like as possible.")
9780 (license license:isc)))
9781
9782 (define-public python2-rarfile
9783 (package-with-python2 python-rarfile))
9784
9785 (define-public python-magic
9786 (package
9787 (name "python-magic")
9788 (version "0.4.3")
9789 (source
9790 (origin
9791 (method url-fetch)
9792 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9793 version ".tar.gz"))
9794 (sha256
9795 (base32
9796 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9797 (file-name (string-append name "-" version "-checkout"))))
9798 (build-system python-build-system)
9799 (arguments
9800 ;; The tests are unreliable, so don't run them. The tests fail
9801 ;; under Python3 because they were written for Python2 and
9802 ;; contain import statements that do not work in Python3. One of
9803 ;; the tests fails under Python2 because its assertions are
9804 ;; overly stringent; it relies on comparing output strings which
9805 ;; are brittle and can change depending on the version of
9806 ;; libmagic being used and the system on which the test is
9807 ;; running. In my case, under GuixSD 0.10.0, only one test
9808 ;; failed, and it seems to have failed only because the version
9809 ;; of libmagic that is packaged in Guix outputs a slightly
9810 ;; different (but not wrong) string than the one that the test
9811 ;; expected.
9812 '(#:tests? #f
9813 #:phases (modify-phases %standard-phases
9814 ;; Replace a specific method call with a hard-coded
9815 ;; path to the necessary libmagic.so file in the
9816 ;; store. If we don't do this, then the method call
9817 ;; will fail to find the libmagic.so file, which in
9818 ;; turn will cause any application using
9819 ;; python-magic to fail.
9820 (add-before 'build 'hard-code-path-to-libmagic
9821 (lambda* (#:key inputs #:allow-other-keys)
9822 (let ((file (assoc-ref inputs "file")))
9823 (substitute* "magic.py"
9824 (("ctypes.util.find_library\\('magic'\\)")
9825 (string-append "'" file "/lib/libmagic.so'")))
9826 #t)))
9827 (add-before 'install 'disable-egg-compression
9828 (lambda _
9829 (let ((port (open-file "setup.cfg" "a")))
9830 (display "\n[easy_install]\nzip_ok = 0\n"
9831 port)
9832 (close-port port)
9833 #t))))))
9834 (inputs
9835 ;; python-magic needs to be able to find libmagic.so.
9836 `(("file" ,file)))
9837 (home-page "https://github.com/ahupp/python-magic")
9838 (synopsis "File type identification using libmagic")
9839 (description
9840 "This module uses ctypes to access the libmagic file type
9841 identification library. It makes use of the local magic database and
9842 supports both textual and MIME-type output. Note that this module and
9843 the python-file module both provide a \"magic.py\" file; these two
9844 modules, which are different and were developed separately, both serve
9845 the same purpose: to provide Python bindings for libmagic.")
9846 (license license:expat)))
9847
9848 (define-public python2-magic
9849 (package-with-python2 python-magic))
9850
9851 (define-public python2-s3cmd
9852 (package
9853 (name "python2-s3cmd")
9854 (version "1.6.1")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9859 "s3cmd-" version ".tar.gz"))
9860 (sha256
9861 (base32
9862 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9863 (build-system python-build-system)
9864 (arguments
9865 ;; s3cmd is written for python2 only and contains no tests.
9866 `(#:python ,python-2
9867 #:tests? #f))
9868 (propagated-inputs
9869 `(("python2-dateutil" ,python2-dateutil)
9870 ;; The python-file package also provides a magic.py module.
9871 ;; This is an unfortunate state of affairs; however, s3cmd
9872 ;; fails to install if it cannot find specifically the
9873 ;; python-magic package. Thus we include it, instead of using
9874 ;; python-file. Ironically, s3cmd sometimes works better
9875 ;; without libmagic bindings at all:
9876 ;; https://github.com/s3tools/s3cmd/issues/198
9877 ("python2-magic" ,python2-magic)))
9878 (home-page "http://s3tools.org/s3cmd")
9879 (synopsis "Command line tool for S3-compatible storage services")
9880 (description
9881 "S3cmd is a command line tool for uploading, retrieving and managing data
9882 in storage services that are compatible with the Amazon Simple Storage
9883 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9884 GnuPG encryption, and more. It also supports management of Amazon's
9885 CloudFront content delivery network.")
9886 (license license:gpl2+)))
9887
9888 (define-public python-pkgconfig
9889 (package
9890 (name "python-pkgconfig")
9891 (version "1.1.0")
9892 (source
9893 (origin
9894 (method url-fetch)
9895 (uri (pypi-uri "pkgconfig" version))
9896 (sha256
9897 (base32
9898 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9899 (build-system python-build-system)
9900 (native-inputs
9901 `(("python-nose" ,python-nose)))
9902 (inputs
9903 `(("pkg-config" ,pkg-config)))
9904 (arguments
9905 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9906 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9907 #:tests? #f
9908 ;; Hard-code the path to pkg-config.
9909 #:phases
9910 (modify-phases %standard-phases
9911 (add-before
9912 'build 'patch
9913 (lambda _
9914 (substitute* "pkgconfig/pkgconfig.py"
9915 (("cmd = 'pkg-config")
9916 (string-append "cmd = '" (which "pkg-config"))))
9917 #t)))))
9918 (home-page "http://github.com/matze/pkgconfig")
9919 (synopsis "Python interface for pkg-config")
9920 (description "This module provides a Python interface to pkg-config. It
9921 can be used to find all pkg-config packages, check if a package exists,
9922 check if a package meets certain version requirements, query CFLAGS and
9923 LDFLAGS and parse the output to build extensions with setup.py.")
9924 (license license:expat)))
9925
9926 (define-public python2-pkgconfig
9927 (package-with-python2 python-pkgconfig))
9928
9929 (define-public python-bz2file
9930 (package
9931 (name "python-bz2file")
9932 (version "0.98")
9933 (source
9934 (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "bz2file" version))
9937 (sha256
9938 (base32
9939 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9940 (build-system python-build-system)
9941 (arguments
9942 `(#:tests? #f)) ; Tests use deprecated python modules.
9943 (home-page "https://github.com/nvawda/bz2file")
9944 (synopsis "Read and write bzip2-compressed files")
9945 (description
9946 "Bz2file is a Python library for reading and writing bzip2-compressed
9947 files. It contains a drop-in replacement for the I/O interface in the
9948 standard library's @code{bz2} module, including features from the latest
9949 development version of CPython that are not available in older releases.")
9950 (license license:asl2.0)
9951 (properties `((python2-variant . ,(delay python2-bz2file))))))
9952
9953 (define-public python2-bz2file
9954 (let ((base (package-with-python2
9955 (strip-python2-variant python-bz2file))))
9956 (package
9957 (inherit base)
9958 (arguments
9959 `(#:python ,python-2
9960 #:phases
9961 (modify-phases %standard-phases
9962 ;; 'python setup.py test' does not work as of 0.98.
9963 ;; There is only the one test file, so we run it directly.
9964 (replace 'check
9965 (lambda _ (zero? (system* "python"
9966 "test_bz2file.py"))))))))))
9967
9968 (define-public python-future
9969 (package
9970 (name "python-future")
9971 (version "0.15.2")
9972 (source
9973 (origin
9974 (method url-fetch)
9975 (uri (pypi-uri "future" version))
9976 (sha256
9977 (base32
9978 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9979 (build-system python-build-system)
9980 ;; Many tests connect to the network or are otherwise flawed.
9981 ;; https://github.com/PythonCharmers/python-future/issues/210
9982 (arguments
9983 `(#:tests? #f))
9984 (home-page "http://python-future.org")
9985 (synopsis "Single-source support for Python 3 and 2")
9986 (description
9987 "@code{python-future} is the missing compatibility layer between Python 2 and
9988 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9989 to support both Python 2 and Python 3 with minimal overhead.")
9990 (license license:expat)))
9991
9992 (define-public python2-future
9993 (package-with-python2 python-future))
9994
9995 (define-public python-cysignals
9996 (package
9997 (name "python-cysignals")
9998 (version "1.1.0")
9999 (source
10000 (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10003 (sha256
10004 (base32
10005 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10006 (build-system python-build-system)
10007 (native-inputs
10008 `(("python-cython" ,python-cython)
10009 ("python-sphinx" ,python-sphinx)))
10010 (inputs
10011 `(("pari-gp" ,pari-gp)))
10012 (arguments
10013 `(#:modules ((guix build python-build-system)
10014 ((guix build gnu-build-system) #:prefix gnu:)
10015 (guix build utils))
10016 ;; FIXME: Tests are executed after installation and currently fail
10017 ;; when not installing into standard locations; the author is working
10018 ;; on a fix.
10019 #:tests? #f
10020 #:phases
10021 (modify-phases %standard-phases
10022 (add-before
10023 'build 'configure
10024 (assoc-ref gnu:%standard-phases 'configure)))))
10025 (home-page
10026 "https://github.com/sagemath/cysignals")
10027 (synopsis
10028 "Handling of interrupts and signals for Cython")
10029 (description
10030 "The cysignals package provides mechanisms to handle interrupts (and
10031 other signals and errors) in Cython code, using two related approaches,
10032 for mixed Cython/Python code or external C libraries and pure Cython code,
10033 respectively.")
10034 (license license:lgpl3+)))
10035
10036 (define-public python2-cysignals
10037 (package-with-python2 python-cysignals))
10038
10039 (define-public python2-shedskin
10040 (package
10041 (name "python2-shedskin")
10042 (version "0.9.4")
10043 (source
10044 (origin
10045 (method url-fetch)
10046 (uri (string-append "https://github.com/shedskin/shedskin/"
10047 "releases/download/v" version
10048 "/shedskin-" version ".tgz"))
10049 (sha256
10050 (base32
10051 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10052 (build-system python-build-system)
10053 (arguments
10054 `(#:python ,python-2
10055 #:phases (modify-phases %standard-phases
10056 (add-after 'unpack 'fix-resulting-include-libs
10057 (lambda* (#:key inputs #:allow-other-keys)
10058 (let ((libgc (assoc-ref inputs "libgc"))
10059 (pcre (assoc-ref inputs "pcre")))
10060 (substitute* "shedskin/makefile.py"
10061 (("variable == 'CCFLAGS':[ ]*")
10062 (string-append "variable == 'CCFLAGS':\n"
10063 " line += ' -I " pcre "/include"
10064 " -I " libgc "/include'"))
10065 (("variable == 'LFLAGS':[ ]*")
10066 (string-append "variable == 'LFLAGS':\n"
10067 " line += ' -L" pcre "/lib"
10068 " -L " libgc "/lib'")))
10069 #t))))))
10070 (inputs `(("pcre" ,pcre)
10071 ("libgc" ,libgc)))
10072 (home-page "https://shedskin.github.io/")
10073 (synopsis "Experimental Python-2 to C++ Compiler")
10074 (description (string-append "This is an experimental compiler for a subset of
10075 Python. It generates C++ code and a Makefile."))
10076 (license (list license:gpl3 license:bsd-3 license:expat))))
10077
10078 (define-public python2-rope
10079 (package
10080 (name "python2-rope")
10081 (version "0.10.3")
10082 (source
10083 (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "rope" version))
10086 (sha256
10087 (base32
10088 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10089 (arguments
10090 ;; Rope is currently python-2 only.
10091 ;; https://github.com/python-rope/rope/issues/57
10092 `(#:python ,python-2))
10093 (build-system python-build-system)
10094 (native-inputs
10095 `(("python2-unittest2" ,python2-unittest2)))
10096 (home-page "https://github.com/python-rope/rope")
10097 (synopsis "Refactoring library for Python")
10098 (description "Rope is a refactoring library for Python. It facilitates
10099 the renaming, moving and extracting of attributes, functions, modules, fields
10100 and parameters in Python 2 source code. These refactorings can also be applied
10101 to occurences in strings and comments.")
10102 (license license:gpl2)))
10103
10104 (define-public python-py3status
10105 (package
10106 (name "python-py3status")
10107 (version "3.1")
10108 (source
10109 (origin
10110 (method url-fetch)
10111 (uri (pypi-uri "py3status" version))
10112 (sha256
10113 (base32
10114 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10115 (build-system python-build-system)
10116 (home-page "https://github.com/ultrabug/py3status")
10117 (synopsis "Extensible i3status wrapper written in Python")
10118 (description "py3status is an i3status wrapper which extends i3status
10119 functionality in a modular way, allowing you to extend your panel with your
10120 own code, responding to click events and updating clock every second.")
10121 (license license:bsd-3)))
10122
10123 (define-public python-tblib
10124 (package
10125 (name "python-tblib")
10126 (version "1.3.0")
10127 (source (origin
10128 (method url-fetch)
10129 (uri (pypi-uri "tblib" version))
10130 (sha256 (base32
10131 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10132 (build-system python-build-system)
10133 (arguments
10134 `(#:phases
10135 (modify-phases %standard-phases
10136 (replace 'check
10137 (lambda _
10138 ;; Upstream runs tests after installation and the package itself
10139 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10140 ;; found.
10141 (setenv "PYTHONPATH"
10142 (string-append (getcwd) "/build/lib:"
10143 (getenv "PYTHONPATH")))
10144 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10145 (native-inputs
10146 `(("python-pytest" ,python-pytest)
10147 ("python-six" ,python-six)))
10148 (home-page "https://github.com/ionelmc/python-tblib")
10149 (synopsis "Traceback serialization library")
10150 (description
10151 "Traceback serialization allows you to:
10152
10153 @enumerate
10154 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10155 different processes. This allows better error handling when running code over
10156 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10157
10158 @item Parse traceback strings and raise with the parsed tracebacks.
10159 @end itemize")
10160 (license license:bsd-3)))
10161
10162 (define-public python2-tblib
10163 (package-with-python2 python-tblib))
10164
10165 (define-public python-sqlparse
10166 (package
10167 (name "python-sqlparse")
10168 (version "0.1.19")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (pypi-uri "sqlparse" version))
10172 (sha256
10173 (base32
10174 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10175 (build-system python-build-system)
10176 (arguments
10177 `(#:phases
10178 (modify-phases %standard-phases
10179 (replace 'check
10180 (lambda* _
10181 ;; setup.py-integrated 2to3 only affects the build files, but
10182 ;; py.test is using the source files. So we need to convert them
10183 ;; manually.
10184 (when (zero? (system* "python3"))
10185 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10186 (zero? (system* "py.test")))))))
10187 (native-inputs
10188 `(("python-pytest" ,python-pytest)))
10189 (home-page "https://github.com/andialbrecht/sqlparse")
10190 (synopsis "Non-validating SQL parser")
10191 (description "Sqlparse is a non-validating SQL parser for Python. It
10192 provides support for parsing, splitting and formatting SQL statements.")
10193 (license license:bsd-3)))
10194
10195 (define-public python2-sqlparse
10196 (package-with-python2 python-sqlparse))
10197
10198 (define-public python-greenlet
10199 (package
10200 (name "python-greenlet")
10201 (version "0.4.9")
10202 (source (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "greenlet" version))
10205 (sha256
10206 (base32
10207 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10208 (build-system python-build-system)
10209 (home-page "https://greenlet.readthedocs.io/")
10210 (synopsis "Lightweight in-process concurrent programming")
10211 (description
10212 "Greenlet package is a spin-off of Stackless, a version of CPython
10213 that supports micro-threads called \"tasklets\". Tasklets run
10214 pseudo-concurrently (typically in a single or a few OS-level threads) and
10215 are synchronized with data exchanges on \"channels\".")
10216 (license (list license:psfl license:expat))))
10217
10218 (define-public python2-greenlet
10219 (package-with-python2 python-greenlet))
10220
10221 (define-public python-gevent
10222 (package
10223 (name "python-gevent")
10224 (version "1.1.1")
10225 (source (origin
10226 (method url-fetch)
10227 (uri (pypi-uri "gevent" version))
10228 (sha256
10229 (base32
10230 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10231 (modules '((guix build utils)))
10232 (snippet
10233 '(begin
10234 ;; unbunding libev and c-ares
10235 (for-each delete-file-recursively '("libev" "c-ares"))
10236 ;; fixing testsuite
10237 (call-with-output-file "greentest/__init__.py" noop)
10238 (substitute* "greentest/testrunner.py"
10239 (("import util") "from . import util")
10240 (("from util import log") "from .util import log"))))))
10241 (build-system python-build-system)
10242 (propagated-inputs
10243 `(("python-greenlet" ,python-greenlet)))
10244 (native-inputs
10245 `(("python-six" ,python-six)))
10246 (inputs
10247 `(("c-ares" ,c-ares)
10248 ("libev" ,libev)))
10249 (home-page "http://www.gevent.org/")
10250 (synopsis "Coroutine-based network library")
10251 (description
10252 "gevent is a coroutine-based Python networking library that uses greenlet
10253 to provide a high-level synchronous API on top of the libev event loop.")
10254 (license license:expat)))
10255
10256 (define-public python2-gevent
10257 (package-with-python2 python-gevent))
10258
10259 (define-public python-twisted
10260 (package
10261 (name "python-twisted")
10262 (version "16.2.0")
10263 (source (origin
10264 (method url-fetch)
10265 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10266 (sha256
10267 (base32
10268 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10269 (build-system python-build-system)
10270 (propagated-inputs
10271 `(("python-zope-interface" ,python-zope-interface)))
10272 (home-page "https://twistedmatrix.com/")
10273 (synopsis "Asynchronous networking framework written in Python")
10274 (description
10275 "Twisted is an extensible framework for Python programming, with special
10276 focus on event-based network programming and multiprotocol integration.")
10277 (license license:expat)))
10278
10279 (define-public python2-twisted
10280 (package-with-python2 python-twisted))
10281
10282 (define-public python-pika
10283 (package
10284 (name "python-pika")
10285 (version "0.10.0")
10286 (source
10287 (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "pika" version))
10290 (sha256
10291 (base32
10292 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10293 (build-system python-build-system)
10294 (native-inputs
10295 `(("python-pyev" ,python-pyev)
10296 ("python-tornado" ,python-tornado)
10297 ("python-twisted" ,python-twisted)))
10298 (home-page "https://pika.readthedocs.org")
10299 (synopsis "Pure Python AMQP Client Library")
10300 (description
10301 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10302 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10303 network support library.")
10304 (license license:bsd-3)))
10305
10306 (define-public python2-pika
10307 (package-with-python2 python-pika))
10308
10309 (define-public python-ply
10310 (package
10311 (name "python-ply")
10312 (version "3.9")
10313 (source
10314 (origin
10315 (method url-fetch)
10316 (uri (pypi-uri "ply" version))
10317 (sha256
10318 (base32
10319 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
10320 (build-system python-build-system)
10321 (home-page "http://www.dabeaz.com/ply/")
10322 (synopsis "Python Lex & Yacc")
10323 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10324 It uses LR parsing and does extensive error checking.")
10325 (license license:bsd-3)))
10326
10327 (define-public python2-ply
10328 (package-with-python2 python-ply))
10329
10330 (define-public python-tabulate
10331 (package
10332 (name "python-tabulate")
10333 (version "0.7.5")
10334 (source (origin
10335 (method url-fetch)
10336 (uri (pypi-uri "tabulate" version))
10337 (sha256
10338 (base32
10339 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10340 ;; Fix tests
10341 (modules '((guix build utils)))
10342 (snippet '(substitute* '("test/test_cli.py"
10343 "test/test_input.py"
10344 "test/test_output.py"
10345 "test/test_regression.py")
10346 (("from common") "from nose.tools")))))
10347 (build-system python-build-system)
10348 (native-inputs
10349 `(;; For testing
10350 ("python-nose" ,python-nose)))
10351 (home-page "https://bitbucket.org/astanin/python-tabulate")
10352 (synopsis "Pretty-print tabular data")
10353 (description
10354 "Tabulate is a library and command-line utility to pretty-print tabular
10355 data in Python.")
10356 (license license:expat)))
10357
10358 (define-public python2-tabulate
10359 (package-with-python2 python-tabulate))
10360
10361 (define-public python-kazoo
10362 (package
10363 (name "python-kazoo")
10364 (version "2.2.1")
10365 (source
10366 (origin
10367 (method url-fetch)
10368 (uri (pypi-uri "kazoo" version))
10369 (sha256
10370 (base32
10371 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10372 (build-system python-build-system)
10373 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10374 (propagated-inputs
10375 `(("python-six" ,python-six)))
10376 (home-page "https://kazoo.readthedocs.org")
10377 (synopsis "High-level Zookeeper client library")
10378 (description
10379 "Kazoo is a Python client library for the Apache Zookeeper distributed
10380 application service. It is designed to be easy to use and to avoid common
10381 programming errors.")
10382 (license license:asl2.0)))
10383
10384 (define-public python2-kazoo
10385 (package-with-python2 python-kazoo))
10386
10387 (define-public python-pykafka
10388 (package
10389 (name "python-pykafka")
10390 (version "2.4.0")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (string-append
10394 "https://pypi.python.org/packages/8b/3e/"
10395 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10396 "pykafka-" version ".tar.gz"))
10397 (sha256
10398 (base32
10399 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10400 (build-system python-build-system)
10401 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10402 (propagated-inputs
10403 `(("python-gevent" ,python-gevent)
10404 ("python-kazoo" ,python-kazoo)
10405 ("python-tabulate" ,python-tabulate)))
10406 (inputs
10407 `(("librdkafka" ,librdkafka)))
10408 (home-page "https://pykafka.readthedocs.io/")
10409 (synopsis "Apache Kafka client for Python")
10410 (description
10411 "PyKafka is a client for the Apache Kafka distributed messaging system.
10412 It includes Python implementations of Kafka producers and consumers, which
10413 are optionally backed by a C extension built on librdkafka.")
10414 (license license:asl2.0)))
10415
10416 (define-public python2-pykafka
10417 (package-with-python2 python-pykafka))
10418
10419 (define-public python-wcwidth
10420 (package
10421 (name "python-wcwidth")
10422 (version "0.1.6")
10423 (source
10424 (origin
10425 (method url-fetch)
10426 (uri (string-append
10427 "https://pypi.python.org/packages/"
10428 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10429 "wcwidth-" version ".tar.gz"))
10430 (sha256
10431 (base32
10432 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10433 (build-system python-build-system)
10434 (home-page "https://github.com/jquast/wcwidth")
10435 (synopsis "Measure number of terminal column cells of wide-character codes")
10436 (description "Wcwidth measures the number of terminal column cells of
10437 wide-character codes. It is useful for those implementing a terminal emulator,
10438 or programs that carefully produce output to be interpreted by one. It is a
10439 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10440 specified in POSIX.1-2001 and POSIX.1-2008.")
10441 (license license:expat)))
10442
10443 (define-public python2-wcwidth
10444 (package-with-python2 python-wcwidth))
10445
10446 (define-public python2-jsonrpclib
10447 (package
10448 (name "python2-jsonrpclib")
10449 (version "0.1.7")
10450 (source (origin
10451 (method url-fetch)
10452 (uri (string-append
10453 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10454 "jsonrpclib-" version ".tar.gz"))
10455 (sha256
10456 (base32
10457 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10458 (build-system python-build-system)
10459 (arguments
10460 `(#:tests? #f
10461 #:python ,python-2))
10462 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10463 (synopsis "Implementation of JSON-RPC specification for Python")
10464 (description
10465 "This library is an implementation of the JSON-RPC specification.
10466 It supports both the original 1.0 specification, as well as the
10467 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10468 etc.")
10469 (license license:asl2.0)))
10470
10471 (define-public python-chai
10472 (package
10473 (name "python-chai")
10474 (version "1.1.1")
10475 (source (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "chai" version))
10478 (sha256
10479 (base32
10480 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10481 (build-system python-build-system)
10482 (home-page "https://github.com/agoragames/chai")
10483 (synopsis "Mocking framework for Python")
10484 (description
10485 "Chai provides an api for mocking, stubbing and spying your python
10486 objects, patterned after the Mocha library for Ruby.")
10487 (license license:bsd-3)))
10488
10489 (define-public python2-chai
10490 (package-with-python2 python-chai))
10491
10492 (define-public python-arrow
10493 (package
10494 (name "python-arrow")
10495 (version "0.8.0")
10496 (source (origin
10497 (method url-fetch)
10498 (uri (pypi-uri "arrow" version))
10499 (sha256
10500 (base32
10501 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10502 (build-system python-build-system)
10503 (native-inputs
10504 `(;; For testing
10505 ("python-chai" ,python-chai)
10506 ("python-simplejson" ,python-simplejson)))
10507 (propagated-inputs
10508 `(("python-dateutil" ,python-dateutil-2)))
10509 (home-page "https://github.com/crsmithdev/arrow/")
10510 (synopsis "Dates and times for Python")
10511 (description
10512 "Arrow is a Python library to creating, manipulating, formatting and
10513 converting dates, times, and timestamps. It implements and updates the
10514 datetime type.")
10515 (license license:asl2.0)))
10516
10517 (define-public python2-arrow
10518 (package-with-python2 python-arrow))
10519
10520 (define-public python-inflection
10521 (package
10522 (name "python-inflection")
10523 (version "0.3.1")
10524 (source
10525 (origin (method url-fetch)
10526 (uri (pypi-uri "inflection" version))
10527 (sha256
10528 (base32
10529 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10530 (build-system python-build-system)
10531 (home-page "http://github.com/jpvanhal/inflection")
10532 (synopsis "Python string transformation library")
10533 (description
10534 "Inflection is a string transformation library. It singularizes
10535 and pluralizes English words, and transforms strings from CamelCase to
10536 underscored string.")
10537 (license license:expat)))
10538
10539 (define-public python2-inflection
10540 (package-with-python2 python-inflection))
10541
10542 (define-public python-pylev
10543 (package
10544 (name "python-pylev")
10545 (version "1.3.0")
10546 (source (origin
10547 (method url-fetch)
10548 (uri (pypi-uri "pylev" version))
10549 (sha256
10550 (base32
10551 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10552 (build-system python-build-system)
10553 (home-page "http://github.com/toastdriven/pylev")
10554 (synopsis "Levenshtein distance implementation in Python")
10555 (description "Pure Python Levenshtein implementation, based off the
10556 Wikipedia code samples at
10557 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10558 (license license:bsd-3)))
10559
10560 (define-public python2-pylev
10561 (package-with-python2 python-pylev))
10562
10563 (define-public python-cleo
10564 (package
10565 (name "python-cleo")
10566 (version "0.4.1")
10567 (source (origin
10568 (method url-fetch)
10569 (uri (pypi-uri "cleo" version))
10570 (sha256
10571 (base32
10572 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10573 (build-system python-build-system)
10574 (native-inputs
10575 `(;; For testing
10576 ("python-mock" ,python-mock)
10577 ("python-pytest" ,python-pytest)))
10578 (propagated-inputs
10579 `(("python-psutil" ,python-psutil)
10580 ("python-pylev" ,python-pylev)))
10581 (home-page "https://github.com/sdispater/cleo")
10582 (synopsis "Command-line arguments library for Python")
10583 (description
10584 "Cleo allows you to create command-line commands with signature in
10585 docstring and colored output.")
10586 (license license:expat)))
10587
10588 (define-public python2-cleo
10589 (package-with-python2 python-cleo))
10590
10591 (define-public python-lazy-object-proxy
10592 (package
10593 (name "python-lazy-object-proxy")
10594 (version "1.2.2")
10595 (source (origin
10596 (method url-fetch)
10597 (uri (pypi-uri "lazy-object-proxy" version))
10598 (sha256
10599 (base32
10600 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10601 (build-system python-build-system)
10602 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10603 (synopsis "Lazy object proxy for python")
10604 (description
10605 "Lazy object proxy is an object that wraps a callable but defers the call
10606 until the object is actually required, and caches the result of said call.")
10607 (license license:bsd-2)))
10608
10609 (define-public python2-lazy-object-proxy
10610 (package-with-python2 python-lazy-object-proxy))
10611
10612 (define-public python-dnspython
10613 (package
10614 (name "python-dnspython")
10615 (version "1.15.0")
10616 (source (origin
10617 (method url-fetch)
10618 (uri (string-append "http://www.dnspython.org/kits/"
10619 version "/dnspython-" version ".tar.gz"))
10620 (sha256
10621 (base32
10622 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10623 (build-system python-build-system)
10624 (arguments '(#:tests? #f)) ; XXX: requires internet access
10625 (home-page "http://www.dnspython.org")
10626 (synopsis "DNS toolkit for Python")
10627 (description
10628 "dnspython is a DNS toolkit for Python. It supports almost all record
10629 types. It can be used for queries, zone transfers, and dynamic updates.
10630 It supports TSIG authenticated messages and EDNS0.")
10631 (license license:expat)))
10632
10633 (define-public python2-dnspython
10634 (package-with-python2 python-dnspython))
10635
10636 (define-public python-email-validator
10637 (package
10638 (name "python-email-validator")
10639 (version "1.0.1")
10640 (source
10641 (origin (method url-fetch)
10642 (uri (pypi-uri "email_validator" version))
10643 (sha256
10644 (base32
10645 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10646 (build-system python-build-system)
10647 (arguments
10648 '(#:phases
10649 (modify-phases %standard-phases
10650 (add-before 'build 'use-dnspython
10651 (lambda _
10652 (substitute* "setup.py"
10653 (("dnspython3") "dnspython"))
10654 #t)))))
10655 (propagated-inputs
10656 `(("python-dnspython" ,python-dnspython)
10657 ("python-idna" ,python-idna)))
10658 (home-page "https://github.com/JoshData/python-email-validator")
10659 (synopsis "Email address validation library for Python")
10660 (description
10661 "This library validates email address syntax and deliverability.")
10662 (license license:cc0)))
10663
10664 (define-public python2-email-validator
10665 (package-with-python2 python-email-validator))
10666
10667 (define-public python-ukpostcodeparser
10668 (package
10669 (name "python-ukpostcodeparser")
10670 (version "1.0.3")
10671 (source (origin
10672 (method url-fetch)
10673 (uri (pypi-uri "UkPostcodeParser" version))
10674 (sha256
10675 (base32
10676 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10677 (build-system python-build-system)
10678 (home-page "https://github.com/hamstah/ukpostcodeparser")
10679 (synopsis "UK Postcode parser for Python")
10680 (description
10681 "This library provides the @code{parse_uk_postcode} function for
10682 parsing UK postcodes.")
10683 (license license:expat)))
10684
10685 (define-public python2-ukpostcodeparser
10686 (package-with-python2 python-ukpostcodeparser))
10687
10688 (define-public python-fake-factory
10689 (package
10690 (name "python-fake-factory")
10691 (version "0.7.2")
10692 (source (origin
10693 (method url-fetch)
10694 (uri (pypi-uri "fake-factory" version))
10695 (sha256
10696 (base32
10697 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10698 (build-system python-build-system)
10699 (native-inputs
10700 `(;; For testing
10701 ("python-email-validator" ,python-email-validator)
10702 ("python-mock" ,python-mock)
10703 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10704 (propagated-inputs
10705 `(("python-dateutil" ,python-dateutil-2)
10706 ("python-six" ,python-six)))
10707 (home-page "https://github.com/joke2k/faker")
10708 (synopsis "Python package that generates fake data")
10709 (description
10710 "Faker is a Python package that generates fake data such as names,
10711 addresses, and phone numbers.")
10712 (license license:expat)
10713 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10714
10715 (define-public python2-fake-factory
10716 (let ((base (package-with-python2 (strip-python2-variant
10717 python-fake-factory))))
10718 (package
10719 (inherit base)
10720 (propagated-inputs
10721 `(("python2-ipaddress" ,python2-ipaddress)
10722 ,@(package-propagated-inputs base))))))
10723
10724 (define-public python-pyaml
10725 (package
10726 (name "python-pyaml")
10727 (version "15.8.2")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "pyaml" version))
10731 (sha256
10732 (base32
10733 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10734 (build-system python-build-system)
10735 (propagated-inputs
10736 `(("python-pyyaml" ,python-pyyaml)))
10737 (home-page "https://github.com/mk-fg/pretty-yaml")
10738 (synopsis "YAML pretty-print library for Python")
10739 (description
10740 "pyaml is a PyYAML based python module to produce pretty and readable
10741 YAML-serialized data.")
10742 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10743
10744 (define-public python2-pyaml
10745 (package-with-python2 python-pyaml))
10746
10747 (define-public python-flexmock
10748 (package
10749 (name "python-flexmock")
10750 (version "0.10.2")
10751 (source (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "flexmock" version))
10754 (sha256
10755 (base32
10756 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10757 (build-system python-build-system)
10758 (home-page "https://flexmock.readthedocs.org")
10759 (synopsis "Testing library for Python")
10760 (description
10761 "flexmock is a testing library for Python that makes it easy to create
10762 mocks, stubs and fakes.")
10763 (license license:bsd-3)))
10764
10765 (define-public python2-flexmock
10766 (package-with-python2 python-flexmock))
10767
10768 (define-public python-orator
10769 (package
10770 (name "python-orator")
10771 (version "0.8.2")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "orator" version))
10775 (sha256
10776 (base32
10777 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10778 (build-system python-build-system)
10779 (arguments '(#:tests? #f)) ; no tests
10780 (propagated-inputs
10781 `(("python-arrow" ,python-arrow)
10782 ("python-blinker" ,python-blinker)
10783 ("python-cleo" ,python-cleo)
10784 ("python-fake-factory" ,python-fake-factory)
10785 ("python-inflection" ,python-inflection)
10786 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10787 ("python-pyaml" ,python-pyaml)
10788 ("python-simplejson" ,python-simplejson)
10789 ("python-wrapt" ,python-wrapt)))
10790 (home-page "https://orator-orm.com/")
10791 (synopsis "ActiveRecord ORM for Python")
10792 (description
10793 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10794 implementation for Python.")
10795 (license license:expat)
10796 (properties `((python2-variant . ,(delay python2-orator))))))
10797
10798 (define-public python2-orator
10799 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10800 (package
10801 (inherit base)
10802 (propagated-inputs
10803 `(("python2-ipaddress" ,python2-ipaddress)
10804 ,@(package-propagated-inputs base))))))
10805
10806 (define-public python-prompt-toolkit
10807 (package
10808 (name "python-prompt-toolkit")
10809 (version "1.0.9")
10810 (source
10811 (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10814 (sha256
10815 (base32
10816 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
10817 (build-system python-build-system)
10818 (arguments
10819 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10820 (propagated-inputs
10821 `(("python-wcwidth" ,python-wcwidth)
10822 ("python-six" ,python-six)
10823 ("python-pygments" ,python-pygments)))
10824 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10825 (synopsis "Library for building command line interfaces in Python")
10826 (description
10827 "Prompt-Toolkit is a library for building interactive command line
10828 interfaces in Python. It's like GNU Readline but it also features syntax
10829 highlighting while typing, out-of-the-box multi-line input editing, advanced
10830 code completion, incremental search, support for Chinese double-width
10831 characters, mouse support, and auto suggestions.")
10832 (license license:bsd-3)))
10833
10834 (define-public python2-prompt-toolkit
10835 (package-with-python2 python-prompt-toolkit))
10836
10837 (define-public python-jedi
10838 (package
10839 (name "python-jedi")
10840 (version "0.9.0")
10841 (source
10842 (origin
10843 (method url-fetch)
10844 (uri (pypi-uri "jedi" version))
10845 (sha256
10846 (base32
10847 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10848 (build-system python-build-system)
10849 (home-page "https://github.com/davidhalter/jedi")
10850 (synopsis
10851 "Autocompletion for Python that can be used for text editors")
10852 (description
10853 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10854 (license license:expat)))
10855
10856 (define-public python2-jedi
10857 (package-with-python2 python-jedi))
10858
10859 (define-public ptpython
10860 (package
10861 (name "ptpython")
10862 (version "0.34")
10863 (source (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "ptpython" version))
10866 (sha256
10867 (base32
10868 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10869 (build-system python-build-system)
10870 (propagated-inputs
10871 `(("python-docopt" ,python-docopt)
10872 ("python-jedi" ,python-jedi)
10873 ("python-prompt-toolkit" ,python-prompt-toolkit)
10874 ("python-pygments" ,python-pygments)))
10875 (home-page "https://github.com/jonathanslenders/ptpython")
10876 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10877 (description
10878 "ptpython is a Python read-eval-print loop with IDE-like features.
10879 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10880 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10881 etc.")
10882 (license license:bsd-3)
10883 (properties `((python2-variant . ,(delay ptpython-2))))))
10884
10885 (define-public ptpython-2
10886 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10887 (package
10888 (inherit base)
10889 (name "ptpython2"))))
10890
10891 (define-public python-requests-oauthlib
10892 (package
10893 (name "python-requests-oauthlib")
10894 (version "0.6.2")
10895 (source
10896 (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "requests-oauthlib" version))
10899 (sha256
10900 (base32
10901 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10902 (build-system python-build-system)
10903 (arguments
10904 `(#:phases
10905 (modify-phases %standard-phases
10906 ;; removes tests that require network access
10907 (add-before 'check 'pre-check
10908 (lambda _
10909 (delete-file "tests/test_core.py")
10910 #t)))))
10911 (native-inputs
10912 `(("python-requests-mock" ,python-requests-mock)
10913 ("python-mock" ,python-mock)))
10914 (propagated-inputs
10915 `(("python-oauthlib" ,python-oauthlib)
10916 ("python-requests" ,python-requests)))
10917 (home-page
10918 "https://github.com/requests/requests-oauthlib")
10919 (synopsis
10920 "OAuthlib authentication support for Requests")
10921 (description
10922 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10923 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10924 (license license:isc)))
10925
10926 (define-public python2-requests-oauthlib
10927 (package-with-python2 python-requests-oauthlib))
10928
10929 (define-public python-stem
10930 (package
10931 (name "python-stem")
10932 (version "1.5.3")
10933 (source
10934 (origin
10935 (method url-fetch)
10936 (uri (pypi-uri "stem" version))
10937 (sha256
10938 (base32
10939 "0fm67dfx6qaj0mg80r4yw2i72birpzn7cnbyz4p1857max3zfc97"))))
10940 (build-system python-build-system)
10941 (arguments
10942 `(#:phases
10943 (modify-phases %standard-phases
10944 (replace 'check
10945 (lambda _
10946 (zero? (system* "./run_tests.py" "--unit")))))))
10947 (native-inputs
10948 `(("python-mock" ,python-mock)
10949 ("python-pep8" ,python-pep8)
10950 ("python-pyflakes" ,python-pyflakes)))
10951 (home-page "https://stem.torproject.org/")
10952 (synopsis
10953 "Python controller library that allows applications to interact with Tor")
10954 (description
10955 "Stem is a Python controller library for Tor. With it you can use Tor's
10956 control protocol to script against the Tor process and read descriptor data
10957 relays publish about themselves.")
10958 (license license:lgpl3)))
10959
10960 (define-public python2-stem
10961 (package-with-python2 python-stem))
10962
10963 (define-public python-pyserial
10964 (package
10965 (name "python-pyserial")
10966 (version "3.1.1")
10967 (source
10968 (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "pyserial" version))
10971 (sha256
10972 (base32
10973 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10974 (build-system python-build-system)
10975 (home-page
10976 "https://github.com/pyserial/pyserial")
10977 (synopsis "Python Serial Port Bindings")
10978 (description "@code{pyserial} provide serial port bindings for Python. It
10979 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10980 and/or Xon/Xoff. The port is accessed in RAW mode.")
10981 (license license:bsd-3)))
10982
10983 (define-public python2-pyserial
10984 (package-with-python2 python-pyserial))
10985
10986 (define-public python-kivy
10987 (package
10988 (name "python-kivy")
10989 (version "1.9.1")
10990 (source
10991 (origin
10992 (method url-fetch)
10993 (uri (pypi-uri "kivy" version))
10994 (file-name (string-append name "-" version ".tar.gz"))
10995 (sha256
10996 (base32
10997 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10998 (build-system python-build-system)
10999 (arguments
11000 `(#:tests? #f ; Tests require many optional packages
11001 #:phases
11002 (modify-phases %standard-phases
11003 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11004 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11005 (lambda* (#:key inputs #:allow-other-keys)
11006 (setenv "KIVY_SDL2_PATH"
11007 (string-append (assoc-ref inputs "sdl-union")
11008 "/include/SDL2"))
11009 #t)))))
11010 (native-inputs
11011 `(("pkg-config" ,pkg-config)
11012 ("python-cython" ,python-cython)))
11013 (inputs
11014 `(("gstreamer" ,gstreamer)
11015 ("mesa" ,mesa)
11016 ("sdl-union"
11017 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11018 (home-page "http://kivy.org")
11019 (synopsis
11020 "Multitouch application framework")
11021 (description
11022 "A software library for rapid development of
11023 hardware-accelerated multitouch applications.")
11024 (license license:expat)))
11025
11026 (define-public python2-kivy
11027 (package-with-python2 python-kivy))
11028
11029 (define-public python-kivy-next
11030 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11031 (revision "1"))
11032 (package (inherit python-kivy)
11033 (name "python-kivy-next")
11034 (version (string-append "1.9.1-" revision "."
11035 (string-take commit 7)))
11036 (source
11037 (origin
11038 (method git-fetch)
11039 (uri (git-reference
11040 (url "https://github.com/kivy/kivy")
11041 (commit commit)))
11042 (file-name (string-append name "-" version "-checkout"))
11043 (sha256
11044 (base32
11045 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11046
11047 (define-public python2-kivy-next
11048 (package-with-python2 python-kivy-next))
11049
11050 (define-public python-binaryornot
11051 (package
11052 (name "python-binaryornot")
11053 (version "0.4.0")
11054 (source (origin
11055 (method url-fetch)
11056 (uri (pypi-uri "binaryornot" version))
11057 (sha256
11058 (base32
11059 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11060 (build-system python-build-system)
11061 (propagated-inputs
11062 `(("python-chardet" ,python-chardet)
11063 ("python-hypothesis" ,python-hypothesis)))
11064 (home-page "https://github.com/audreyr/binaryornot")
11065 (synopsis "Package to check if a file is binary or text")
11066 (description "Ultra-lightweight pure Python package to check if a file is
11067 binary or text.")
11068 (license license:bsd-3)
11069 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11070
11071 (define-public python2-binaryornot
11072 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11073 (package (inherit base)
11074 (propagated-inputs
11075 `(("python2-enum34" ,python2-enum34)
11076 ,@(package-propagated-inputs base))))))
11077
11078 (define-public python-nltk
11079 (package
11080 (name "python-nltk")
11081 (version "3.2.1")
11082 (source (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "nltk" version))
11085 (sha256
11086 (base32
11087 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11088 (build-system python-build-system)
11089 (arguments
11090 '(;; The tests require some extra resources to be downloaded.
11091 ;; TODO Try packaging these resources.
11092 #:tests? #f))
11093 (home-page "http://nltk.org/")
11094 (synopsis "Natural Language Toolkit")
11095 (description "It provides interfaces to over 50 corpora and lexical
11096 resources such as WordNet, along with a suite of text processing libraries
11097 for classification, tokenization, stemming, tagging, parsing, and semantic
11098 reasoning, wrappers for natural language processing libraries.")
11099 (license license:asl2.0)))
11100
11101 (define-public python2-nltk
11102 (package-with-python2 python-nltk))
11103
11104 (define-public python-pymongo
11105 (package
11106 (name "python-pymongo")
11107 (version "3.3.0")
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "pymongo" version))
11111 (sha256
11112 (base32
11113 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11114 (build-system python-build-system)
11115 (propagated-inputs
11116 `(("python-certifi" ,python-certifi)))
11117 (home-page "http://github.com/mongodb/mongo-python-driver")
11118 (synopsis "Python driver for MongoDB")
11119 (description "Python driver for MongoDB.")
11120 (license license:asl2.0)))
11121
11122 (define-public python2-pymongo
11123 (package-with-python2 python-pymongo))
11124
11125 (define-public python-sh
11126 (package
11127 (name "python-sh")
11128 (version "1.11")
11129 (source (origin
11130 (method url-fetch)
11131 (uri (pypi-uri "sh" version))
11132 (sha256
11133 (base32
11134 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11135 (build-system python-build-system)
11136 (arguments
11137 `(#:tests? #f)) ; no tests
11138 (home-page "https://github.com/amoffat/sh")
11139 (synopsis "Python subprocess interface")
11140 (description "Abstracts process invocation by providing a function
11141 interface for programs.")
11142 (license license:expat)))
11143
11144 (define-public python2-sh
11145 (package-with-python2 python-sh))
11146
11147 (define-public python-consul
11148 (package
11149 (name "python-consul")
11150 (version "0.6.1")
11151 (source
11152 (origin
11153 (method url-fetch)
11154 (uri (pypi-uri "python-consul" version))
11155 (sha256
11156 (base32
11157 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11158 (build-system python-build-system)
11159 (native-inputs
11160 `(("python-pytest" ,python-pytest)))
11161 (propagated-inputs
11162 `(("python-requests" ,python-requests)
11163 ("python-six" ,python-six)))
11164 (home-page "https://github.com/cablehead/python-consul")
11165 (synopsis "Python client for Consul")
11166 (description
11167 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11168 discovery, monitoring and configuration.")
11169 (license license:expat)))
11170
11171 (define-public python2-consul
11172 (package-with-python2 python-consul))
11173
11174 (define-public python-schematics
11175 (package
11176 (name "python-schematics")
11177 (version "1.1.1")
11178 (source
11179 (origin
11180 (method url-fetch)
11181 (uri (string-append
11182 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11183 (file-name (string-append name "-" version ".tar.gz"))
11184 (sha256
11185 (base32
11186 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11187 (build-system python-build-system)
11188 (propagated-inputs
11189 `(("python-six" ,python-six)))
11190 (arguments
11191 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11192 ; version requirements (eg python-coveralls)
11193 (home-page "https://github.com/schematics/schematics")
11194 (synopsis "Python Data Structures for Humans")
11195 (description "Python Data Structures for Humans.")
11196 (license license:bsd-3)))
11197
11198 (define-public python2-schematics
11199 (package-with-python2 python-schematics))
11200
11201 (define-public python-publicsuffix
11202 (package
11203 (name "python-publicsuffix")
11204 (version "1.1.0")
11205 (source (origin
11206 (method url-fetch)
11207 (uri (pypi-uri "publicsuffix" version))
11208 (sha256
11209 (base32
11210 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11211 (build-system python-build-system)
11212 (arguments
11213 `(#:tests? #f)) ; tests use the internet
11214 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11215 (synopsis "Get suffix for a domain name")
11216 (description "Get a public suffix for a domain name using the Public Suffix
11217 List.")
11218 (license license:expat)))
11219
11220 (define-public python2-publicsuffix
11221 (package-with-python2 python-publicsuffix))
11222
11223 (define-public python-publicsuffix2
11224 (package
11225 (name "python-publicsuffix2")
11226 (version "2.20160621")
11227 (source
11228 (origin
11229 (method url-fetch)
11230 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11231 (sha256
11232 (base32
11233 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11234 (build-system python-build-system)
11235 (arguments
11236 '(#:tests? #f)) ; The test suite requires network access.
11237 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11238 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11239 (description "Get a public suffix for a domain name using the Public Suffix
11240 List. Forked from and using the same API as the publicsuffix package.")
11241 (license (list license:expat license:mpl2.0))))
11242
11243 (define-public python2-publicsuffix2
11244 (package-with-python2 python-publicsuffix2))
11245
11246 (define-public python-url
11247 (package
11248 (name "python-url")
11249 (version "0.2.0")
11250 (source (origin
11251 (method url-fetch)
11252 (uri (pypi-uri "url" version))
11253 (sha256
11254 (base32
11255 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11256 (build-system python-build-system)
11257 (propagated-inputs
11258 `(("python-publicsuffix" ,python-publicsuffix)))
11259 (native-inputs
11260 `(("python-coverage" ,python-coverage)
11261 ("python-nose" ,python-nose)))
11262 (arguments
11263 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11264 (home-page "http://github.com/seomoz/url-py")
11265 (synopsis "URL Parsing")
11266 (description "Library for parsing urls.")
11267 (license license:expat)
11268 (properties `((python2-variant . ,(delay python2-url))))))
11269
11270 (define-public python2-url
11271 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11272 (package (inherit base)
11273 (propagated-inputs
11274 `(("python2-publicsuffix" ,python2-publicsuffix))))))
11275
11276 (define-public python-freezegun
11277 (package
11278 (name "python-freezegun")
11279 (version "0.3.8")
11280 (source
11281 (origin
11282 (method url-fetch)
11283 (uri (pypi-uri "freezegun" version))
11284 (sha256
11285 (base32
11286 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
11287 (build-system python-build-system)
11288 (native-inputs
11289 `(("python-mock" ,python-mock)
11290 ("python-nose" ,python-nose)
11291 ("python-coverage" ,python-coverage)))
11292 (propagated-inputs
11293 `(("python-six" ,python-six)
11294 ("python-dateutil-2" ,python-dateutil-2)))
11295 (arguments
11296 `(#:phases (modify-phases %standard-phases
11297 ;; The tests are normally executed via `make test`, but the PyPi
11298 ;; package does not include the Makefile.
11299 (replace 'check
11300 (lambda _
11301 (zero? (system* "nosetests" "./tests/")))))))
11302 (home-page "https://github.com/spulec/freezegun")
11303 (synopsis "Test utility for mocking the datetime module")
11304 (description
11305 "FreezeGun is a library that allows your python tests to travel through
11306 time by mocking the datetime module.")
11307 (license license:asl2.0)))
11308
11309 (define-public python2-freezegun
11310 (package-with-python2 python-freezegun))
11311
11312
11313 (define-public python-odfpy
11314 (package
11315 (name "python-odfpy")
11316 (version "1.3.3")
11317 (source (origin
11318 (method url-fetch)
11319 (uri (pypi-uri "odfpy" version))
11320 (sha256
11321 (base32
11322 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11323 (arguments
11324 `(#:modules ((srfi srfi-1)
11325 (guix build python-build-system)
11326 (guix build utils))
11327 #:phases
11328 (modify-phases %standard-phases
11329 (replace 'check
11330 ;; The test runner invokes python2 and python3 for test*.py.
11331 ;; To avoid having both in inputs, we replicate it here.
11332 (lambda _
11333 (every (lambda (test-file)
11334 (zero? (system* "python" test-file)))
11335 (find-files "tests" "^test.*\\.py$")))))))
11336 (build-system python-build-system)
11337 (home-page "https://github.com/eea/odfpy")
11338 (synopsis "Python API and tools to manipulate OpenDocument files")
11339 (description "Collection of libraries and utility programs written in
11340 Python to manipulate OpenDocument 1.2 files.")
11341 (license
11342 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11343 ;; number of files with other licenses.
11344 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11345
11346 (define-public python2-odfpy
11347 (package-with-python2 python-odfpy))
11348
11349 (define-public python-cachecontrol
11350 (package
11351 (name "python-cachecontrol")
11352 (version "0.11.6")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 ;; Pypi does not have tests.
11357 (uri (string-append
11358 "https://github.com/ionrock/cachecontrol/archive/v"
11359 version ".tar.gz"))
11360 (file-name (string-append name "-" version ".tar.gz"))
11361 (sha256
11362 (base32
11363 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11364 (build-system python-build-system)
11365 (arguments
11366 `(#:phases
11367 (modify-phases %standard-phases
11368 (replace 'check
11369 (lambda _
11370 ;; Drop test that requires internet access.
11371 (delete-file "tests/test_regressions.py")
11372 (setenv "PYTHONPATH"
11373 (string-append (getcwd) "/build/lib:"
11374 (getenv "PYTHONPATH")))
11375 (zero? (system* "py.test" "-vv")))))))
11376 (native-inputs
11377 `(("python-pytest" ,python-pytest)
11378 ("python-redis" ,python-redis)
11379 ("python-webtest" ,python-webtest)
11380 ("python-mock" ,python-mock)))
11381 (propagated-inputs
11382 `(("python-requests" ,python-requests)
11383 ("python-lockfile" ,python-lockfile)))
11384 (home-page "https://github.com/ionrock/cachecontrol")
11385 (synopsis "The httplib2 caching algorithms for use with requests")
11386 (description "CacheControl is a port of the caching algorithms in
11387 @code{httplib2} for use with @code{requests} session objects.")
11388 (license license:asl2.0)))
11389
11390 (define-public python2-cachecontrol
11391 (package-with-python2 python-cachecontrol))
11392
11393 (define-public python-lit
11394 (package
11395 (name "python-lit")
11396 (version "0.5.0")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "lit" version))
11401 (sha256
11402 (base32
11403 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11404 (build-system python-build-system)
11405 (home-page "http://llvm.org/")
11406 (synopsis "LLVM Software Testing Tool")
11407 (description "@code{lit} is a portable tool for executing LLVM and Clang
11408 style test suites, summarizing their results, and providing indication of
11409 failures.")
11410 (license license:ncsa)))
11411
11412 (define-public python2-lit
11413 (package-with-python2 python-lit))
11414
11415 (define-public python-pytest-pep8
11416 (package
11417 (name "python-pytest-pep8")
11418 (version "1.0.6")
11419 (source (origin
11420 (method url-fetch)
11421 (uri (pypi-uri "pytest-pep8" version))
11422 (sha256
11423 (base32
11424 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11425 (build-system python-build-system)
11426 (arguments
11427 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11428 (native-inputs
11429 `(("python-pytest" ,python-pytest)))
11430 (propagated-inputs
11431 `(("python-pep8" ,python-pep8)))
11432 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11433 (synopsis "Py.test plugin to check PEP8 requirements")
11434 (description "Pytest plugin for checking PEP8 compliance.")
11435 (license license:expat)))
11436
11437 (define-public python2-pytest-pep8
11438 (package-with-python2 python-pytest-pep8))
11439
11440 (define-public python-pytest-flakes
11441 (package
11442 (name "python-pytest-flakes")
11443 (version "1.0.1")
11444 (source (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "pytest-flakes" version))
11447 (sha256
11448 (base32
11449 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11450 (build-system python-build-system)
11451 (arguments
11452 `(#:phases
11453 (modify-phases %standard-phases
11454 (delete 'check)
11455 (add-after 'install 'check
11456 (lambda* (#:key outputs inputs #:allow-other-keys)
11457 ;; It's easier to run tests after install.
11458 ;; Make installed package available for running the tests
11459 (add-installed-pythonpath inputs outputs)
11460 (zero? (system* "py.test" "-vv")))))))
11461 (native-inputs
11462 `(("python-coverage" ,python-coverage)
11463 ("python-pytest" ,python-pytest)
11464 ("python-pytest-cache" ,python-pytest-cache)
11465 ("python-pytest-pep8" ,python-pytest-pep8)))
11466 (propagated-inputs
11467 `(("python-pyflakes" ,python-pyflakes)))
11468 (home-page "https://github.com/fschulze/pytest-flakes")
11469 (synopsis "Py.test plugin to check source code with pyflakes")
11470 (description "Pytest plugin for checking Python source code with pyflakes.")
11471 (license license:expat)))
11472
11473 (define-public python2-pytest-flakes
11474 (package-with-python2 python-pytest-flakes))
11475
11476 (define-public python-natsort
11477 (package
11478 (name "python-natsort")
11479 (version "5.0.1")
11480 (source (origin
11481 (method url-fetch)
11482 (uri (pypi-uri "natsort" version))
11483 (sha256
11484 (base32
11485 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11486 (build-system python-build-system)
11487 (arguments
11488 `(#:phases
11489 (modify-phases %standard-phases
11490 (add-before 'check 'set-cachedir
11491 ;; Tests require write access to $HOME by default
11492 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11493 (native-inputs
11494 `(("python-hypothesis" ,python-hypothesis)
11495 ("python-pytest-cache" ,python-pytest-cache)
11496 ("python-pytest-cov" ,python-pytest-cov)
11497 ("python-pytest-flakes" ,python-pytest-flakes)
11498 ("python-pytest-pep8" ,python-pytest-pep8)))
11499 (propagated-inputs ; TODO: Add python-fastnumbers.
11500 `(("python-pyicu" ,python-pyicu)))
11501 (home-page "https://github.com/SethMMorton/natsort")
11502 (synopsis "Natural sorting for python and shell")
11503 (description
11504 "Natsort lets you apply natural sorting on lists instead of
11505 lexicographical. If you use the built-in @code{sorted} method in python
11506 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11507 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11508 function @code{natsorted} that identifies numbers and sorts them separately
11509 from strings. It can also sort version numbers, real numbers, mixed types
11510 and more, and comes with a shell command @command{natsort} that exposes this
11511 functionality in the command line.")
11512 (license license:expat)
11513 (properties `((python2-variant . ,(delay python2-natsort))))))
11514
11515 (define-public python2-natsort
11516 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11517 (package (inherit base)
11518 (native-inputs
11519 `(("python2-pathlib" ,python2-pathlib)
11520 ("python2-mock" ,python2-mock)
11521 ("python2-enum34" ,python2-enum34)
11522 ,@(package-native-inputs base))))))
11523
11524 (define-public python-glances
11525 (package
11526 (name "python-glances")
11527 (version "2.7.1")
11528 (source
11529 (origin
11530 (method url-fetch)
11531 (uri (pypi-uri "Glances" version))
11532 (sha256
11533 (base32
11534 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11535 (build-system python-build-system)
11536 (propagated-inputs
11537 `(("python-psutil" ,python-psutil)))
11538 (home-page
11539 "https://github.com/nicolargo/glances")
11540 (synopsis
11541 "A cross-platform curses-based monitoring tool")
11542 (description
11543 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11544 Glances uses the PsUtil library to get information from your system. It monitors
11545 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11546 (license license:lgpl3+)))
11547
11548 (define-public python2-glances
11549 (package-with-python2 python-glances))
11550
11551 (define-public python-graphql-core
11552 (package
11553 (name "python-graphql-core")
11554 (version "0.5.3")
11555 (source
11556 (origin
11557 (method url-fetch)
11558 (uri (pypi-uri "graphql-core" version))
11559 (sha256
11560 (base32
11561 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11562 (build-system python-build-system)
11563 (arguments
11564 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11565 #:phases
11566 (modify-phases %standard-phases
11567 (add-after 'unpack 'patch-hardcoded-version
11568 (lambda _ (substitute*
11569 "setup.py"
11570 (("'gevent==1.1rc1'") "'gevent'"))
11571 #t)))))
11572 (native-inputs
11573 `(("python-gevent" ,python-gevent)
11574 ("python-mock" ,python-mock)
11575 ("python-pytest-mock" ,python-pytest-mock)))
11576 (propagated-inputs
11577 `(("python-promise" ,python-promise)
11578 ("python-six" ,python-six)))
11579 (home-page "https://github.com/graphql-python/graphql-core")
11580 (synopsis "GraphQL implementation for Python")
11581 (description
11582 "GraphQL implementation for Python. GraphQL is a data query language and
11583 runtime designed and used to request and deliver data to mobile and web apps.
11584 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11585 to Python.")
11586 (license license:expat)))
11587
11588 (define-public python2-graphql-core
11589 (package-with-python2 python-graphql-core))
11590
11591 (define-public python-graphql-relay
11592 (package
11593 (name "python-graphql-relay")
11594 (version "0.4.5")
11595 (source
11596 (origin
11597 (method url-fetch)
11598 (uri (pypi-uri "graphql-relay" version))
11599 (sha256
11600 (base32
11601 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11602 (build-system python-build-system)
11603 (native-inputs
11604 `(("python-pytest" ,python-pytest)))
11605 (propagated-inputs
11606 `(("python-graphql-core" ,python-graphql-core)
11607 ("python-promise" ,python-promise)
11608 ("python-six" ,python-six)))
11609 (home-page "https://github.com/graphql-python/graphql-relay-py")
11610 (synopsis "Relay implementation for Python")
11611 (description
11612 "This is a library to allow the easy creation of Relay-compliant servers
11613 using the GraphQL Python reference implementation of a GraphQL server. It
11614 should be noted that the code is a exact port of the original
11615 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11616 from Facebook.")
11617 (license license:expat)))
11618
11619 (define-public python2-graphql-relay
11620 (package-with-python2 python-graphql-relay))
11621
11622 (define-public python-graphene
11623 (package
11624 (name "python-graphene")
11625 (version "0.10.2")
11626 (source
11627 (origin
11628 (method url-fetch)
11629 (uri (pypi-uri "graphene" version))
11630 (sha256
11631 (base32
11632 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11633 (build-system python-build-system)
11634 (native-inputs
11635 `(("python-django-filter" ,python-django-filter)
11636 ("python-mock" ,python-mock)
11637 ("python-psycopg2" ,python-psycopg2)
11638 ("python-pytest-django" ,python-pytest-django)
11639 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11640 (propagated-inputs
11641 `(("python-graphql-core" ,python-graphql-core)
11642 ("python-graphql-relay" ,python-graphql-relay)
11643 ("python-iso8601" ,python-iso8601)
11644 ("python-promise" ,python-promise)
11645 ("python-six" ,python-six)))
11646 (home-page "http://graphene-python.org/")
11647 (synopsis "GraphQL Framework for Python")
11648 (description
11649 "Graphene is a Python library for building GraphQL schemas/types.
11650 A GraphQL schema describes your data model, and provides a GraphQL server
11651 with an associated set of resolve methods that know how to fetch data.")
11652 (properties `((python2-variant . ,(delay python2-graphene))))
11653 (license license:expat)))
11654
11655 (define-public python2-graphene
11656 (let ((base (package-with-python2
11657 (strip-python2-variant python-graphene))))
11658 (package (inherit base)
11659 (native-inputs
11660 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11661 ,@(package-native-inputs base))))))
11662
11663 (define-public python-nautilus
11664 (package
11665 (name "python-nautilus")
11666 (version "0.4.9")
11667 (source
11668 (origin
11669 (method url-fetch)
11670 (uri (pypi-uri "nautilus" version))
11671 (sha256
11672 (base32
11673 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11674 (build-system python-build-system)
11675 (arguments `(#:tests? #f)) ; fails to import test modules
11676 (propagated-inputs
11677 `(("python-bcrypt" ,python-bcrypt)
11678 ("python-click" ,python-click)
11679 ("python-consul" ,python-consul)
11680 ("python-graphene" ,python-graphene)
11681 ("python-jinja2" ,python-jinja2)
11682 ("python-peewee" ,python-peewee)
11683 ("python-pika" ,python-pika)
11684 ("python-tornado" ,python-tornado)
11685 ("python-wtforms" ,python-wtforms)))
11686 (native-inputs
11687 `(("python-nose2" ,python-nose2)))
11688 (home-page "https://github.com/AlecAivazis/nautilus")
11689 (synopsis "Library for creating microservice applications")
11690 (description
11691 "Nautilus is a framework for flux based microservices that looks to
11692 provide extendible implementations of common aspects of a cloud so that you can
11693 focus on building massively scalable web applications.")
11694 (license license:expat)))
11695
11696 (define-public python-betamax
11697 (package
11698 (name "python-betamax")
11699 (version "0.8.0")
11700 (source
11701 (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "betamax" version))
11704 (sha256
11705 (base32
11706 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11707 (build-system python-build-system)
11708 (arguments
11709 '(;; Many tests fail because they require networking.
11710 #:tests? #f))
11711 (propagated-inputs
11712 `(("python-requests" ,python-requests)))
11713 (home-page "https://github.com/sigmavirus24/betamax")
11714 (synopsis "Record HTTP interactions with python-requests")
11715 (description "Betamax will record your test suite's HTTP interactions and
11716 replay them during future tests. It is designed to work with python-requests.")
11717 (license license:expat)))
11718
11719 (define-public python2-betamax
11720 (package-with-python2 python-betamax))
11721
11722 (define-public python-s3transfer
11723 (package
11724 (name "python-s3transfer")
11725 (version "0.1.8")
11726 (source (origin
11727 (method url-fetch)
11728 (uri (pypi-uri "s3transfer" version))
11729 (sha256
11730 (base32
11731 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11732 (build-system python-build-system)
11733 (arguments
11734 `(#:phases
11735 (modify-phases %standard-phases
11736 (replace 'check
11737 (lambda _
11738 ;; 7 of the 'integration' tests require network access or login
11739 ;; credentials.
11740 (zero? (system* "nosetests" "--exclude=integration")))))))
11741 (native-inputs
11742 `(("python-docutils" ,python-docutils)
11743 ("python-mock" ,python-mock)
11744 ("python-nose" ,python-nose)))
11745 (propagated-inputs
11746 `(("python-botocore" ,python-botocore)))
11747 (synopsis "Amazon S3 Transfer Manager")
11748 (description "S3transfer is a Python library for managing Amazon S3
11749 transfers.")
11750 (home-page "https://github.com/boto/s3transfer")
11751 (license license:asl2.0)
11752 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11753
11754 (define-public python2-s3transfer
11755 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11756 (package
11757 (inherit base)
11758 (native-inputs
11759 `(("python2-futures" ,python2-futures)
11760 ,@(package-native-inputs base))))))
11761
11762 (define-public python-setproctitle
11763 (package
11764 (name "python-setproctitle")
11765 (version "1.1.10")
11766 (source
11767 (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "setproctitle" version))
11770 (sha256
11771 (base32
11772 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11773 (build-system python-build-system)
11774 (arguments
11775 '(#:phases
11776 (modify-phases %standard-phases
11777 (add-before 'check 'patch-Makefile
11778 ;; Stricly this is only required for the python2 variant.
11779 ;; But adding a phase in an inherited package seems to be
11780 ;; cumbersum. So we patch even for python3.
11781 (lambda _
11782 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11783 (when nose
11784 (substitute* "Makefile"
11785 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11786 (string-append nose "/bin/nosetests "))))
11787 #t)))
11788 (replace 'check
11789 (lambda _
11790 (setenv "PYTHON" (or (which "python3") (which "python")))
11791 (setenv "PYCONFIG" (or (which "python3-config")
11792 (which "python-config")))
11793 (setenv "CC" "gcc")
11794 ;; No need to extend PYTHONPATH to find the built package, since
11795 ;; the Makefile will build anyway
11796 (zero? (system* "make" "check")))))))
11797 (native-inputs
11798 `(("procps" ,procps))) ; required for tests
11799 (home-page
11800 "https://github.com/dvarrazzo/py-setproctitle")
11801 (synopsis
11802 "Setproctitle implementation for Python to customize the process title")
11803 (description "The library allows a process to change its title (as displayed
11804 by system tools such as ps and top).
11805
11806 Changing the title is mostly useful in multi-process systems, for
11807 example when a master process is forked: changing the children's title
11808 allows to identify the task each process is busy with. The technique
11809 is used by PostgreSQL and the OpenSSH Server for example.")
11810 (license license:bsd-3)
11811 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11812
11813 (define-public python2-setproctitle
11814 (let ((base (package-with-python2
11815 (strip-python2-variant python-setproctitle))))
11816 (package
11817 (inherit base)
11818 (native-inputs `(("python2-nose" ,python2-nose)
11819 ,@(package-native-inputs base))))))
11820
11821 (define-public python-validictory
11822 (package
11823 (name "python-validictory")
11824 (version "1.0.1")
11825 (source
11826 (origin
11827 (method url-fetch)
11828 (uri (pypi-uri "validictory" version))
11829 (sha256
11830 (base32
11831 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11832 (build-system python-build-system)
11833 (arguments
11834 '(#:phases
11835 (modify-phases %standard-phases
11836 (add-after 'unpack 'bootstrap
11837 ;; Move the tests out of the package directory to avoid
11838 ;; packaging them.
11839 (lambda* _
11840 (rename-file "validictory/tests" "tests")
11841 (delete-file "tests/__init__.py")))
11842 (replace 'check
11843 (lambda _
11844 ;; Extend PYTHONPATH so the built package will be found.
11845 (setenv "PYTHONPATH"
11846 (string-append (getcwd) "/build/lib:"
11847 (getenv "PYTHONPATH")))
11848 (zero? (system* "py.test" "-vv" )))))))
11849 (native-inputs
11850 `(("python-pytest" ,python-pytest)))
11851 (home-page
11852 "https://github.com/jamesturk/validictory")
11853 (synopsis "General purpose Python data validator")
11854 (description "It allows validation of arbitrary Python data structures.
11855
11856 The schema format is based on the JSON Schema
11857 proposal (http://json-schema.org), so combined with json the library is also
11858 useful as a validator for JSON data.")
11859 (license license:expat)))
11860
11861 (define-public python2-validictory
11862 (package-with-python2 python-validictory))
11863
11864 (define-public python-aniso8601
11865 (package
11866 (name "python-aniso8601")
11867 (version "1.1.0")
11868 (source
11869 (origin
11870 (method url-fetch)
11871 (uri (pypi-uri "aniso8601" version))
11872 (sha256
11873 (base32
11874 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11875 (build-system python-build-system)
11876 (propagated-inputs
11877 `(("python-dateutil-2" ,python-dateutil-2)))
11878 (home-page
11879 "https://bitbucket.org/nielsenb/aniso8601")
11880 (synopsis
11881 "Python library for parsing ISO 8601 strings")
11882 (description
11883 "This package contains a library for parsing ISO 8601 datetime strings.")
11884 (license license:bsd-3)))
11885
11886 (define-public python-flask-restful
11887 (package
11888 (name "python-flask-restful")
11889 (version "0.3.5")
11890 (source
11891 (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "Flask-RESTful" version))
11894 (sha256
11895 (base32
11896 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11897 (build-system python-build-system)
11898 (propagated-inputs
11899 `(("python-aniso8601" ,python-aniso8601)
11900 ("python-flask" ,python-flask)
11901 ("python-pycrypto" ,python-pycrypto)
11902 ("python-pytz" ,python-pytz)))
11903 (native-inputs
11904 `(;; Optional dependency of Flask. Tests need it.
11905 ("python-blinker" ,python-blinker)
11906 ("python-mock" ,python-mock) ; For tests
11907 ("python-nose" ,python-nose) ; For tests
11908 ("python-sphinx" ,python-sphinx)))
11909 (home-page
11910 "https://www.github.com/flask-restful/flask-restful/")
11911 (synopsis
11912 "Flask module for creating REST APIs")
11913 (description
11914 "This package contains a Flask module for creating REST APIs.")
11915 (license license:bsd-3)))
11916
11917 (define-public python-flask-basicauth
11918 (package
11919 (name "python-flask-basicauth")
11920 (version "0.2.0")
11921 (source
11922 (origin
11923 (method url-fetch)
11924 (uri (pypi-uri "Flask-BasicAuth" version))
11925 (sha256
11926 (base32
11927 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11928 (build-system python-build-system)
11929 (propagated-inputs
11930 `(("python-flask" ,python-flask)))
11931 (home-page
11932 "https://github.com/jpvanhal/flask-basicauth")
11933 (synopsis
11934 "HTTP basic access authentication for Flask")
11935 (description
11936 "This package provides HTTP basic access authentication for Flask.")
11937 (license license:bsd-3)))
11938
11939 (define-public python-flask-sqlalchemy
11940 (package
11941 (name "python-flask-sqlalchemy")
11942 (version "2.1")
11943 (source
11944 (origin
11945 (method url-fetch)
11946 (uri (pypi-uri "Flask-SQLAlchemy" version))
11947 (sha256
11948 (base32
11949 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11950 (build-system python-build-system)
11951 (propagated-inputs
11952 `(("python-flask" ,python-flask)
11953 ("python-sqlalchemy" ,python-sqlalchemy)))
11954 (home-page
11955 "http://github.com/mitsuhiko/flask-sqlalchemy")
11956 (synopsis
11957 "Module adding SQLAlchemy support to your Flask application")
11958 (description
11959 "This package adds SQLAlchemy support to your Flask application.")
11960 (license license:bsd-3)))
11961
11962 (define-public python-pyev
11963 (package
11964 (name "python-pyev")
11965 (version "0.9.0")
11966 (source
11967 (origin
11968 (method url-fetch)
11969 (uri (pypi-uri "pyev" version))
11970 (sha256
11971 (base32
11972 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11973 (build-system python-build-system)
11974 (arguments
11975 `(#:tests? #f ; no test suite
11976 #:phases
11977 (modify-phases %standard-phases
11978 (add-after 'unpack 'patch
11979 (lambda* (#:key inputs #:allow-other-keys)
11980 (let ((libev (string-append (assoc-ref inputs "libev")
11981 "/lib/libev.so.4")))
11982 (substitute* "setup.py"
11983 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11984 (string-append "libev_dll_name = \"" libev "\"")))))))))
11985 (inputs
11986 `(("libev" ,libev)))
11987 (home-page "http://pythonhosted.org/pyev/")
11988 (synopsis "Python libev interface")
11989 (description "Pyev provides a Python interface to libev.")
11990 (license license:gpl3)))
11991
11992 (define-public python2-pyev
11993 (package-with-python2 python-pyev))
11994
11995 (define-public python-imagesize
11996 (package
11997 (name "python-imagesize")
11998 (version "0.7.1")
11999 (source
12000 (origin
12001 (method url-fetch)
12002 (uri (pypi-uri "imagesize" version))
12003 (sha256
12004 (base32
12005 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12006 (build-system python-build-system)
12007 (arguments
12008 '(;; Test files are not distributed on PyPi:
12009 ;; https://github.com/shibukawa/imagesize_py/issues/7
12010 #:tests? #f))
12011 (home-page "https://github.com/shibukawa/imagesize_py")
12012 (synopsis "Gets image size of files in variaous formats in Python")
12013 (description
12014 "This package allows determination of image size from
12015 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12016 (license license:expat)))
12017
12018 (define-public python2-imagesize
12019 (package-with-python2 python-imagesize))
12020
12021 (define-public python-axolotl-curve25519
12022 (package
12023 (name "python-axolotl-curve25519")
12024 (version "0.1")
12025 (source
12026 (origin
12027 (method git-fetch)
12028 (uri (git-reference
12029 (url "git://github.com/tgalal/python-axolotl-curve25519")
12030 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12031 (file-name (string-append name "-" version "-checkout"))
12032 (sha256
12033 (base32
12034 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12035 (build-system python-build-system)
12036 (arguments
12037 `(;; Prevent creation of the egg. This works around
12038 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12039 #:configure-flags '("--root=/")))
12040 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12041 (synopsis "Python wrapper for curve25519 library")
12042 (description "This is a python wrapper for the curve25519 library
12043 with ed25519 signatures. The C code was pulled from
12044 libaxolotl-android. At the moment this wrapper is meant for use by
12045 python-axolotl.")
12046 (license (list license:gpl3 ; Most files
12047 license:bsd-3)))) ; curve/curve25519-donna.c
12048
12049 (define-public python2-axolotl-curve25519
12050 (package-with-python2 python-axolotl-curve25519))
12051
12052 (define-public python-axolotl
12053 (package
12054 (name "python-axolotl")
12055 (version "0.1.35")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (string-append
12060 "https://github.com/tgalal/python-axolotl/archive/"
12061 version ".tar.gz"))
12062 (file-name (string-append name "-" version ".tar.gz"))
12063 (sha256
12064 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12065 (build-system python-build-system)
12066 (arguments
12067 `(#:phases
12068 (modify-phases %standard-phases
12069 ;; Don't install tests
12070 (add-before 'install 'remove-tests
12071 (lambda _
12072 (for-each delete-file-recursively
12073 '("axolotl/tests" "build/lib/axolotl/tests"))
12074 #t)))
12075 ;; Prevent creation of the egg. This works around
12076 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12077 #:configure-flags '("--root=/")))
12078 (propagated-inputs
12079 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12080 ("python-dateutil" ,python-dateutil)
12081 ("python-protobuf" ,python-protobuf)
12082 ("python-pycrypto" ,python-pycrypto)))
12083 (home-page "https://github.com/tgalal/python-axolotl")
12084 (synopsis "Python port of libaxolotl-android")
12085 (description "This is a python port of libaxolotl-android. This
12086 is a ratcheting forward secrecy protocol that works in synchronous and
12087 asynchronous messaging environments.")
12088 (license license:gpl3)))
12089
12090 (define-public python2-axolotl
12091 (package-with-python2 python-axolotl))
12092
12093 (define-public python-termstyle
12094 (package
12095 (name "python-termstyle")
12096 (version "0.1.11")
12097 (source
12098 (origin
12099 (method url-fetch)
12100 (uri (pypi-uri "termstyle" version))
12101 (sha256
12102 (base32
12103 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12104 (build-system python-build-system)
12105 (home-page "http://github.com/gfxmonk/termstyle")
12106 (synopsis "Console text coloring for Python")
12107 (description "This package provides console text coloring for Python.")
12108 (license license:bsd-3)))
12109
12110 (define-public python-rednose
12111 (package
12112 (name "python-rednose")
12113 (version "1.2.1")
12114 (source
12115 (origin
12116 (method url-fetch)
12117 (uri (pypi-uri "rednose" version))
12118 (sha256
12119 (base32
12120 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12121 (build-system python-build-system)
12122 (arguments
12123 `(#:phases
12124 (modify-phases %standard-phases
12125 (add-after 'unpack 'fix-deps
12126 (lambda _
12127 ;; See <https://github.com/JBKahn/rednose/issues/12>
12128 (substitute* "setup.py"
12129 (("python-termstyle") "termstyle"))
12130 #t)))))
12131 (propagated-inputs
12132 `(("python-colorama" ,python-colorama)
12133 ("python-termstyle" ,python-termstyle)))
12134 (native-inputs
12135 `(("python-six" ,python-six)
12136 ("python-nose" ,python-nose)))
12137 (home-page "https://github.com/JBKahn/rednose")
12138 (synopsis "Colored output for Python nosetests")
12139 (description "This package provides colored output for the
12140 @command{nosetests} command of the Python Nose unit test framework.")
12141 (license license:bsd-3)))
12142
12143 (define-public python-flask-restplus
12144 (package
12145 (name "python-flask-restplus")
12146 (version "0.9.2")
12147 (source
12148 (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "flask-restplus" version))
12151 (sha256
12152 (base32
12153 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12154 (build-system python-build-system)
12155 (propagated-inputs
12156 `(("python-aniso8601" ,python-aniso8601)
12157 ("python-flask" ,python-flask)
12158 ("python-jsonschema" ,python-jsonschema)
12159 ("python-pytz" ,python-pytz)
12160 ("python-six" ,python-six)))
12161 (native-inputs
12162 `(("python-tzlocal" ,python-tzlocal)
12163 ("python-blinker" ,python-blinker)
12164 ("python-nose" ,python-nose)
12165 ("python-rednose" ,python-rednose)))
12166 (home-page "https://github.com/noirbizarre/flask-restplus")
12167 (synopsis "Framework for documented API development with Flask")
12168 (description "This package provides a framework for API development with
12169 the Flask web framework in Python. It is similar to package
12170 @code{python-flask-restful} but supports the @code{python-swagger}
12171 documentation builder.")
12172 (license license:expat)))
12173
12174 (define-public python-sadisplay
12175 (package
12176 (name "python-sadisplay")
12177 (version "0.4.6")
12178 (source
12179 (origin
12180 (method url-fetch)
12181 (uri (pypi-uri "sadisplay" version))
12182 (sha256
12183 (base32
12184 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12185 (build-system python-build-system)
12186 (propagated-inputs
12187 `(("python-sqlalchemy" ,python-sqlalchemy)))
12188 (native-inputs
12189 `(("python-nose" ,python-nose)))
12190 (home-page "https://bitbucket.org/estin/sadisplay")
12191 (synopsis "SQLAlchemy schema displayer")
12192 (description "This package provides a program to build Entity
12193 Relationship diagrams from a SQLAlchemy model (or directly from the
12194 database).")
12195 (license license:bsd-3)))
12196
12197 (define-public python2-sadisplay
12198 (package-with-python2 python-sadisplay))
12199
12200 (define-public python-flask-restful-swagger
12201 (package
12202 (name "python-flask-restful-swagger")
12203 (version "0.19")
12204 (source
12205 (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "flask-restful-swagger" version))
12208 (sha256
12209 (base32
12210 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12211 (build-system python-build-system)
12212 (propagated-inputs
12213 `(("python-flask-restful" ,python-flask-restful)))
12214 (home-page "https://github.com/rantav/flask-restful-swagger")
12215 (synopsis "Extract Swagger specs from Flask-Restful projects")
12216 (description "This package lets you extract Swagger API documentation
12217 specs from your Flask-Restful projects.")
12218 (license license:expat)))
12219
12220 (define-public python2-flask-restful-swagger
12221 (package-with-python2 python-flask-restful-swagger))
12222
12223 (define-public python-argcomplete
12224 (package
12225 (name "python-argcomplete")
12226 (version "1.7.0")
12227 (source
12228 (origin
12229 (method url-fetch)
12230 (uri (pypi-uri "argcomplete" version))
12231 (sha256
12232 (base32
12233 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12234 (build-system python-build-system)
12235 (home-page "https://github.com/kislyuk/argcomplete")
12236 (synopsis "Shell tab completion for Python argparse")
12237 (description "argcomplete provides extensible command line tab completion
12238 of arguments and options for Python scripts using @code{argparse}. It's
12239 particularly useful for programs with many options or sub-parsers that can
12240 dynamically suggest completions; for example, when browsing resources over the
12241 network.")
12242 (license license:asl2.0)))
12243
12244 (define-public python2-argcomplete
12245 (package-with-python2 python-argcomplete))
12246
12247 (define-public python-xopen
12248 (package
12249 (name "python-xopen")
12250 (version "0.1.1")
12251 (source
12252 (origin
12253 (method url-fetch)
12254 (uri (pypi-uri "xopen" version))
12255 (sha256
12256 (base32
12257 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12258 (file-name (string-append name "-" version ".tar.gz"))))
12259 (build-system python-build-system)
12260 (home-page "https://github.com/marcelm/xopen/")
12261 (synopsis "Open compressed files transparently")
12262 (description "This module provides an @code{xopen} function that works like
12263 Python's built-in @code{open} function, but can also deal with compressed files.
12264 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12265 recognized by their file extensions. The focus is on being as efficient as
12266 possible on all supported Python versions.")
12267 (license license:expat)))
12268
12269 (define-public python2-xopen
12270 (package-with-python2 python-xopen))