gnu: Add python-pycosat.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;;
40 ;;; This file is part of GNU Guix.
41 ;;;
42 ;;; GNU Guix is free software; you can redistribute it and/or modify it
43 ;;; under the terms of the GNU General Public License as published by
44 ;;; the Free Software Foundation; either version 3 of the License, or (at
45 ;;; your option) any later version.
46 ;;;
47 ;;; GNU Guix is distributed in the hope that it will be useful, but
48 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 ;;; GNU General Public License for more details.
51 ;;;
52 ;;; You should have received a copy of the GNU General Public License
53 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
55 (define-module (gnu packages python)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages adns)
60 #:use-module (gnu packages attr)
61 #:use-module (gnu packages backup)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages file)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gstreamer)
73 #:use-module (gnu packages gtk)
74 #:use-module (gnu packages icu4c)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages imagemagick)
77 #:use-module (gnu packages libevent)
78 #:use-module (gnu packages libffi)
79 #:use-module (gnu packages linux)
80 #:use-module (gnu packages maths)
81 #:use-module (gnu packages multiprecision)
82 #:use-module (gnu packages networking)
83 #:use-module (gnu packages ncurses)
84 #:use-module (gnu packages openstack)
85 #:use-module (gnu packages password-utils)
86 #:use-module (gnu packages pcre)
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages protobuf)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages sdl)
92 #:use-module (gnu packages statistics)
93 #:use-module (gnu packages tex)
94 #:use-module (gnu packages texinfo)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages version-control)
97 #:use-module (gnu packages video)
98 #:use-module (gnu packages web)
99 #:use-module (gnu packages base)
100 #:use-module (gnu packages xml)
101 #:use-module (gnu packages xorg)
102 #:use-module (gnu packages xdisorg)
103 #:use-module (gnu packages zip)
104 #:use-module (gnu packages tcl)
105 #:use-module (gnu packages bdw-gc)
106 #:use-module (guix packages)
107 #:use-module (guix download)
108 #:use-module (guix git-download)
109 #:use-module (guix utils)
110 #:use-module (guix build-system gnu)
111 #:use-module (guix build-system cmake)
112 #:use-module (guix build-system python)
113 #:use-module (guix build-system trivial)
114 #:use-module (srfi srfi-1))
115
116 (define-public python-2.7
117 (package
118 (name "python")
119 (version "2.7.12")
120 (source
121 (origin
122 (method url-fetch)
123 (uri (string-append "https://www.python.org/ftp/python/"
124 version "/Python-" version ".tar.xz"))
125 (sha256
126 (base32
127 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
128 (patches (search-patches "python-2.7-search-paths.patch"
129 "python-2-deterministic-build-info.patch"
130 "python-2.7-site-prefixes.patch"
131 "python-2.7-source-date-epoch.patch"))
132 (modules '((guix build utils)))
133 ;; suboptimal to delete failing tests here, but if we delete them in the
134 ;; arguments then we need to make sure to strip out that phase when it
135 ;; gets inherited by python and python-minimal.
136 (snippet
137 '(begin
138 (for-each delete-file
139 '("Lib/test/test_compileall.py"
140 "Lib/test/test_ctypes.py" ; fails on mips64el
141 "Lib/test/test_distutils.py"
142 "Lib/test/test_import.py"
143 "Lib/test/test_shutil.py"
144 "Lib/test/test_socket.py"
145 "Lib/test/test_subprocess.py"))
146 #t))))
147 (outputs '("out"
148 "tk")) ;tkinter; adds 50 MiB to the closure
149 (build-system gnu-build-system)
150 (arguments
151 `(;; 356 tests OK.
152 ;; 6 tests failed:
153 ;; test_compileall test_distutils test_import test_shutil test_socket
154 ;; test_subprocess
155 ;; 39 tests skipped:
156 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
157 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
158 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
159 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
160 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
161 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
162 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
163 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
164 ;; test_winreg test_winsound test_zipfile64
165 ;; 4 skips unexpected on linux2:
166 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
167 #:test-target "test"
168 #:configure-flags
169 (list "--enable-shared" ;allow embedding
170 "--with-system-ffi" ;build ctypes
171 "--with-ensurepip=install" ;install pip and setuptools
172 (string-append "LDFLAGS=-Wl,-rpath="
173 (assoc-ref %outputs "out") "/lib"))
174
175 #:modules ((ice-9 ftw) (ice-9 match)
176 (guix build utils) (guix build gnu-build-system))
177 #:phases
178 (modify-phases %standard-phases
179 (add-before
180 'configure 'patch-lib-shells
181 (lambda _
182 ;; Filter for existing files, since some may not exist in all
183 ;; versions of python that are built with this recipe.
184 (substitute* (filter file-exists?
185 '("Lib/subprocess.py"
186 "Lib/popen2.py"
187 "Lib/distutils/tests/test_spawn.py"
188 "Lib/test/test_subprocess.py"))
189 (("/bin/sh") (which "sh")))
190
191 ;; Use zero as the timestamp in .pyc files so that builds are
192 ;; deterministic. TODO: Remove it when this variable is set in
193 ;; gnu-build-system.scm.
194 (setenv "SOURCE_DATE_EPOCH" "1")
195 #t))
196 (add-before 'configure 'do-not-record-configure-flags
197 (lambda* (#:key configure-flags #:allow-other-keys)
198 ;; Remove configure flags from the installed '_sysconfigdata.py'
199 ;; and 'Makefile' so we don't end up keeping references to the
200 ;; build tools.
201 ;;
202 ;; Preserve at least '--with-system-ffi' since otherwise the
203 ;; thing tries to build libffi, fails, and we end up with a
204 ;; Python that lacks ctypes.
205 (substitute* "configure"
206 (("^CONFIG_ARGS=.*$")
207 (format #f "CONFIG_ARGS='~a'\n"
208 (if (member "--with-system-ffi" configure-flags)
209 "--with-system-ffi"
210 ""))))
211 #t))
212 (add-before
213 'check 'pre-check
214 (lambda _
215 ;; 'Lib/test/test_site.py' needs a valid $HOME
216 (setenv "HOME" (getcwd))
217 #t))
218 (add-after
219 'unpack 'set-source-file-times-to-1980
220 ;; XXX One of the tests uses a ZIP library to pack up some of the
221 ;; source tree, and fails with "ZIP does not support timestamps
222 ;; before 1980". Work around this by setting the file times in the
223 ;; source tree to sometime in early 1980.
224 (lambda _
225 (let ((circa-1980 (* 10 366 24 60 60)))
226 (ftw "." (lambda (file stat flag)
227 (utime file circa-1980 circa-1980)
228 #t))
229 #t)))
230 (add-after 'install 'remove-tests
231 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
232 ;; because these files are used by some libraries out there.
233 (lambda* (#:key outputs #:allow-other-keys)
234 (let ((out (assoc-ref outputs "out")))
235 (match (scandir (string-append out "/lib")
236 (lambda (name)
237 (string-prefix? "python" name)))
238 ((pythonX.Y)
239 (let ((testdir (string-append out "/lib/" pythonX.Y
240 "/test")))
241 (with-directory-excursion testdir
242 (for-each delete-file-recursively
243 (scandir testdir
244 (match-lambda
245 ((or "." "..") #f)
246 (file
247 (not
248 (string-prefix? "test_support."
249 file))))))
250 (call-with-output-file "__init__.py" (const #t))
251 #t)))))))
252 (add-before 'strip 'make-libraries-writable
253 (lambda* (#:key outputs #:allow-other-keys)
254 ;; Make .so files writable so they can be stripped.
255 (let ((out (assoc-ref outputs "out")))
256 (for-each (lambda (file)
257 (chmod file #o755))
258 (find-files (string-append out "/lib")
259 "\\.so"))
260 #t)))
261 (add-after 'install 'move-tk-inter
262 (lambda* (#:key outputs #:allow-other-keys)
263 ;; When Tkinter support is built move it to a separate output so
264 ;; that the main output doesn't contain a reference to Tcl/Tk.
265 (let ((out (assoc-ref outputs "out"))
266 (tk (assoc-ref outputs "tk")))
267 (when tk
268 (match (find-files out "tkinter.*\\.so")
269 ((tkinter.so)
270 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
271 ;; want it under TK/lib/pythonX.Y/site-packages.
272 (let* ((len (string-length out))
273 (target (string-append
274 tk "/"
275 (string-drop
276 (dirname (dirname tkinter.so))
277 len)
278 "/site-packages")))
279 (install-file tkinter.so target)
280 (delete-file tkinter.so)))))
281 #t))))))
282 (inputs
283 `(("bzip2" ,bzip2)
284 ("gdbm" ,gdbm)
285 ("libffi" ,libffi) ; for ctypes
286 ("sqlite" ,sqlite) ; for sqlite extension
287 ("openssl" ,openssl)
288 ("readline" ,readline)
289 ("zlib" ,zlib)
290 ("tcl" ,tcl)
291 ("tk" ,tk))) ; for tkinter
292 (native-inputs
293 `(("pkg-config" ,pkg-config)))
294 (native-search-paths
295 (list (search-path-specification
296 (variable "PYTHONPATH")
297 (files '("lib/python2.7/site-packages")))))
298 (home-page "https://www.python.org")
299 (synopsis "High-level, dynamically-typed programming language")
300 (description
301 "Python is a remarkably powerful dynamic programming language that
302 is used in a wide variety of application domains. Some of its key
303 distinguishing features include: clear, readable syntax; strong
304 introspection capabilities; intuitive object orientation; natural
305 expression of procedural code; full modularity, supporting hierarchical
306 packages; exception-based error handling; and very high level dynamic
307 data types.")
308 (license license:psfl)))
309
310 ;; Current 2.x version.
311 (define-public python-2 python-2.7)
312
313 (define-public python-3.5
314 (package (inherit python-2)
315 (version "3.5.2")
316 (source (origin
317 (method url-fetch)
318 (uri (string-append "https://www.python.org/ftp/python/"
319 version "/Python-" version ".tar.xz"))
320 (patches (search-patches
321 "python-fix-tests.patch"
322 "python-3.5-fix-tests.patch"
323 "python-3-deterministic-build-info.patch"
324 "python-3-search-paths.patch"))
325 (patch-flags '("-p0"))
326 (sha256
327 (base32
328 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
329 (arguments (substitute-keyword-arguments (package-arguments python-2)
330 ((#:tests? _) #t)))
331 (native-search-paths
332 (list (search-path-specification
333 (variable "PYTHONPATH")
334 (files (list (string-append "lib/python"
335 (version-major+minor version)
336 "/site-packages"))))))))
337
338 (define-public python-3.4
339 (package (inherit python-3.5)
340 (version "3.4.5")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "https://www.python.org/ftp/python/"
344 version "/Python-" version ".tar.xz"))
345 (patches (search-patches
346 "python-fix-tests.patch"
347 "python-3.4-fix-tests.patch"
348 "python-3-deterministic-build-info.patch"
349 "python-3-search-paths.patch"))
350 (patch-flags '("-p0"))
351 (sha256
352 (base32
353 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
354
355 ;; Current 3.x version.
356 (define-public python-3 python-3.5)
357
358 ;; Current major version.
359 (define-public python python-3)
360
361 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
362 ;; Python (Tk -> libxcb -> Python.)
363
364 (define-public python2-minimal
365 (package (inherit python-2)
366 (name "python-minimal")
367 (outputs '("out"))
368 (arguments
369 (substitute-keyword-arguments (package-arguments python-2)
370 ((#:configure-flags cf)
371 `(append ,cf '("--without-system-ffi")))))
372 (inputs '()))) ;none of the optional dependencies
373
374 (define-public python-minimal
375 (package (inherit python)
376 (name "python-minimal")
377 (outputs '("out"))
378
379 ;; Build fails due to missing ctypes without libffi.
380 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
381 ;; zlib is required by 'zipimport', used by pip.
382 (inputs `(("libffi" ,libffi)
383 ("openssl" ,openssl)
384 ("zlib" ,zlib)))))
385
386 (define* (wrap-python3 python
387 #:optional
388 (name (string-append (package-name python) "-wrapper")))
389 (package (inherit python)
390 (name name)
391 (source #f)
392 (build-system trivial-build-system)
393 (outputs '("out"))
394 (inputs `(("bash" ,bash)))
395 (propagated-inputs `(("python" ,python)))
396 (arguments
397 `(#:modules ((guix build utils))
398 #:builder
399 (begin
400 (use-modules (guix build utils))
401 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
402 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
403 (mkdir-p bin)
404 (for-each
405 (lambda (old new)
406 (symlink (string-append python old)
407 (string-append bin "/" new)))
408 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
409 `("python" ,"pydoc" ,"idle" ,"pip"))
410 ;; python-config outputs search paths based upon its location,
411 ;; use a bash wrapper to avoid changing its outputs.
412 (let ((bash (string-append (assoc-ref %build-inputs "bash")
413 "/bin/bash"))
414 (old (string-append python "python3-config"))
415 (new (string-append bin "/python-config")))
416 (with-output-to-file new
417 (lambda ()
418 (format #t "#!~a~%" bash)
419 (format #t "exec \"~a\" \"$@\"~%" old)
420 (chmod new #o755)
421 #t)))))))
422 (synopsis "Wrapper for the Python 3 commands")
423 (description
424 "This package provides wrappers for the commands of Python@tie{}3.x such
425 that they can be invoked under their usual name---e.g., @command{python}
426 instead of @command{python3}.")))
427
428 (define-public python-wrapper (wrap-python3 python))
429 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
430
431 (define-public python-psutil
432 (package
433 (name "python-psutil")
434 (version "4.3.0")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (pypi-uri "psutil" version))
439 (sha256
440 (base32
441 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
442 (build-system python-build-system)
443 (home-page "https://www.github.com/giampaolo/psutil")
444 (synopsis "Library for retrieving information on running processes")
445 (description
446 "psutil (Python system and process utilities) is a library for retrieving
447 information on running processes and system utilization (CPU, memory, disks,
448 network) in Python. It is useful mainly for system monitoring, profiling and
449 limiting process resources and management of running processes. It implements
450 many functionalities offered by command line tools such as: ps, top, lsof,
451 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
452 pidof, tty, taskset, pmap.")
453 (license license:bsd-3)))
454
455 (define-public python2-psutil
456 (package-with-python2 python-psutil))
457
458 (define-public python-passlib
459 (package
460 (name "python-passlib")
461 (version "1.7.0")
462 (source
463 (origin
464 (method url-fetch)
465 (uri (pypi-uri "passlib" version))
466 (sha256
467 (base32
468 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
469 (build-system python-build-system)
470 (native-inputs
471 `(("python-nose" ,python-nose)))
472 (propagated-inputs
473 `(("python-py-bcrypt" ,python-py-bcrypt)))
474 (arguments
475 `(#:phases
476 (alist-cons-before
477 'check 'set-PYTHON_EGG_CACHE
478 ;; some tests require access to "$HOME/.cython"
479 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
480 %standard-phases)))
481 (home-page "https://bitbucket.org/ecollins/passlib")
482 (synopsis
483 "Comprehensive password hashing framework")
484 (description
485 "Passlib is a password hashing library for Python 2 & 3, which provides
486 cross-platform implementations of over 30 password hashing algorithms, as well
487 as a framework for managing existing password hashes. It's designed to be
488 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
489 to providing full-strength password hashing for multi-user application.")
490 (license license:bsd-3)))
491
492 (define-public python2-passlib
493 (package-with-python2 python-passlib))
494
495 (define-public python-py-bcrypt
496 (package
497 (name "python-py-bcrypt")
498 (version "0.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
504 version
505 ".tar.gz"))
506 (sha256
507 (base32
508 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
509 (build-system python-build-system)
510 (home-page "https://code.google.com/p/py-bcrypt")
511 (synopsis
512 "Bcrypt password hashing and key derivation")
513 (description
514 "A python wrapper of OpenBSD's Blowfish password hashing code. This
515 system hashes passwords using a version of Bruce Schneier's Blowfish block
516 cipher with modifications designed to raise the cost of off-line password
517 cracking and frustrate fast hardware implementation. The computation cost of
518 the algorithm is parametised, so it can be increased as computers get faster.
519 The intent is to make a compromise of a password database less likely to
520 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
521 John the Ripper).")
522 ;; "sha2.c" is under BSD-3;
523 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
524 ;; the rest is under ISC.
525 (license (list license:isc license:bsd-3 license:bsd-4))))
526
527 (define-public python2-py-bcrypt
528 (package-with-python2 python-py-bcrypt))
529
530
531 (define-public python-paramiko
532 (package
533 (name "python-paramiko")
534 (version "1.16.0")
535 (source
536 (origin
537 (method url-fetch)
538 (uri (pypi-uri "paramiko" version))
539 (sha256
540 (base32
541 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
542 (build-system python-build-system)
543 (propagated-inputs
544 `(("python-pycrypto" ,python-pycrypto)
545 ("python-ecdsa" ,python-ecdsa)))
546 (home-page "http://www.paramiko.org/")
547 (synopsis "SSHv2 protocol library")
548 (description "Paramiko is a python implementation of the SSHv2 protocol,
549 providing both client and server functionality. While it leverages a Python C
550 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
551 Python interface around SSH networking concepts.")
552 (license license:lgpl2.1+)))
553
554 (define-public python2-paramiko
555 (package-with-python2 python-paramiko))
556
557
558 (define-public python-httplib2
559 (package
560 (name "python-httplib2")
561 (version "0.9.2")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (pypi-uri "httplib2" version))
566 (sha256
567 (base32
568 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
569 (build-system python-build-system)
570 (home-page "https://github.com/jcgregorio/httplib2")
571 (synopsis "Comprehensive HTTP client library")
572 (description
573 "A comprehensive HTTP client library supporting many features left out of
574 other HTTP libraries.")
575 (license license:expat)))
576
577 (define-public python2-httplib2
578 (package-with-python2 python-httplib2))
579
580 (define-public python-ecdsa
581 (package
582 (name "python-ecdsa")
583 (version "0.13")
584 (source
585 (origin
586 (method url-fetch)
587 (uri (string-append
588 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
589 version
590 ".tar.gz"))
591 (sha256
592 (base32
593 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
594 (build-system python-build-system)
595 (inputs
596 `(("openssl" ,openssl)))
597 (home-page
598 "http://github.com/warner/python-ecdsa")
599 (synopsis
600 "ECDSA cryptographic signature library (pure python)")
601 (description
602 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
603 Curve Digital Signature Algorithm), implemented purely in Python. With this
604 library, you can quickly create keypairs (signing key and verifying key), sign
605 messages, and verify the signatures. The keys and signatures are very short,
606 making them easy to handle and incorporate into other protocols.")
607 (license license:expat)))
608
609 (define-public python2-ecdsa
610 (package-with-python2 python-ecdsa))
611
612 (define-public python-ccm
613 (package
614 (name "python-ccm")
615 (version "2.1.6")
616 (source
617 (origin
618 (method url-fetch)
619 (uri (pypi-uri "ccm" version))
620 (sha256
621 (base32
622 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
623 (build-system python-build-system)
624 (propagated-inputs
625 `(("python-pyyaml" ,python-pyyaml)
626 ;; Not listed in setup.py, but used in ccmlib/node.py for full
627 ;; functionality
628 ("python-psutil" ,python-psutil)
629 ("python-six" ,python-six)))
630 (home-page "https://github.com/pcmanus/ccm")
631 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
632 localhost")
633 (description "Cassandra Cluster Manager is a development tool for testing
634 local Cassandra clusters. It creates, launches and removes Cassandra clusters
635 on localhost.")
636 (license license:asl2.0)))
637
638 (define-public python2-ccm
639 (package-with-python2 python-ccm))
640
641 (define-public python-pytz
642 (package
643 (name "python-pytz")
644 (version "2016.10")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "pytz" version ".tar.bz2"))
649 (sha256
650 (base32
651 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
652 (build-system python-build-system)
653 (arguments `(#:tests? #f)) ; no test target
654 (home-page "http://pythonhosted.org/pytz")
655 (synopsis "Python timezone library")
656 (description
657 "This library allows accurate and cross platform timezone calculations
658 using Python 2.4 or higher and provides access to the Olson timezone database.")
659 (license license:expat)))
660
661 (define-public python2-pytz
662 (package-with-python2 python-pytz))
663
664
665 (define-public python-babel
666 (package
667 (name "python-babel")
668 (version "2.3.4")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (pypi-uri "Babel" version))
673 (sha256
674 (base32
675 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
676 (build-system python-build-system)
677 (propagated-inputs
678 `(("python-pytz" ,python-pytz)))
679 (arguments `(#:tests? #f)) ; no test target
680 (home-page "http://babel.pocoo.org/")
681 (synopsis
682 "Tools for internationalizing Python applications")
683 (description
684 "Babel is composed of two major parts:
685 - tools to build and work with gettext message catalogs
686 - a Python interface to the CLDR (Common Locale Data Repository), providing
687 access to various locale display names, localized number and date formatting,
688 etc. ")
689 (license license:bsd-3)))
690
691 (define-public python2-babel
692 (package-with-python2 python-babel))
693
694 (define-public python2-backport-ssl-match-hostname
695 (package
696 (name "python2-backport-ssl-match-hostname")
697 (version "3.5.0.1")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (string-append
702 "https://pypi.python.org/packages/source/b/"
703 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
704 version ".tar.gz"))
705 (sha256
706 (base32
707 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
708 (build-system python-build-system)
709 (arguments
710 `(#:python ,python-2
711 #:tests? #f)) ; no test target
712 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
713 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
714 (description
715 "This backport brings the ssl.match_hostname() function to users of
716 earlier versions of Python. The function checks the hostname in the
717 certificate returned by the server to which a connection has been established,
718 and verifies that it matches the intended target hostname.")
719 (license license:psfl)))
720
721 (define-public python-hdf4
722 (package
723 (name "python-hdf4")
724 (version "0.9")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri name version))
729 (sha256
730 (base32
731 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
732 (build-system python-build-system)
733 (native-inputs `(("nose" ,python-nose)))
734 (propagated-inputs `(("numpy" ,python-numpy)))
735 (inputs
736 `(("hdf4" ,hdf4)
737 ("libjpeg" ,libjpeg)
738 ("zlib" ,zlib)))
739 (arguments
740 `(#:phases
741 (modify-phases %standard-phases
742 (replace 'check
743 (lambda _
744 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
745 ;; on to import numpy. Somehow this works on their CI system.
746 ;; Let's just manage PYTHONPATH here instead.
747 (substitute* "runexamples.sh"
748 (("export PYTHONPATH=.*") ""))
749 (setenv "PYTHONPATH"
750 (string-append (getcwd) ":"
751 (getenv "PYTHONPATH")))
752 (and (zero? (system* "./runexamples.sh"))
753 (zero? (system* "nosetests" "-v"))))))))
754 (home-page "https://github.com/fhs/python-hdf4")
755 (synopsis "Python interface to the NCSA HDF4 library")
756 (description
757 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
758 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
759 NetCDF files can also be read and modified. Python-HDF4 is a fork of
760 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
761 (license license:expat)))
762
763 (define-public python2-hdf4
764 (package-with-python2 python-hdf4))
765
766 (define-public python-h5py
767 (package
768 (name "python-h5py")
769 (version "2.6.0")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (pypi-uri "h5py" version))
774 (sha256
775 (base32
776 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
777 (build-system python-build-system)
778 (arguments
779 `(#:tests? #f ; no test target
780 #:phases
781 (modify-phases %standard-phases
782 (add-after 'unpack 'fix-hdf5-paths
783 (lambda* (#:key inputs #:allow-other-keys)
784 (let ((prefix (assoc-ref inputs "hdf5")))
785 (substitute* "setup_build.py"
786 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
787 (string-append "['" prefix "/lib" "']"))
788 (("'/opt/local/include', '/usr/local/include'")
789 (string-append "'" prefix "/include" "'")))
790 (substitute* "setup_configure.py"
791 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
792 (string-append "['" prefix "/lib" "']")))
793 #t))))))
794 (propagated-inputs
795 `(("python-six" ,python-six)
796 ("python-numpy" ,python-numpy)))
797 (inputs
798 `(("hdf5" ,hdf5)))
799 (native-inputs
800 `(("python-cython" ,python-cython)
801 ("python-pkgconfig" ,python-pkgconfig)))
802 (home-page "http://www.h5py.org/")
803 (synopsis "Read and write HDF5 files from Python")
804 (description
805 "The h5py package provides both a high- and low-level interface to the
806 HDF5 library from Python. The low-level interface is intended to be a
807 complete wrapping of the HDF5 API, while the high-level component supports
808 access to HDF5 files, datasets and groups using established Python and NumPy
809 concepts.")
810 (license license:bsd-3)))
811
812 (define-public python2-h5py
813 (package-with-python2 python-h5py))
814
815 (define-public python-netcdf4
816 (package
817 (name "python-netcdf4")
818 (version "1.2.6")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "netCDF4" version))
823 (sha256
824 (base32
825 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
826 (build-system python-build-system)
827 (native-inputs
828 `(("python-cython" ,python-cython)))
829 (propagated-inputs
830 `(("python-numpy" ,python-numpy)))
831 (inputs
832 `(("netcdf" ,netcdf)
833 ("hdf4" ,hdf4)
834 ("hdf5" ,hdf5)))
835 (arguments
836 '(#:phases
837 (modify-phases %standard-phases
838 (replace 'check
839 (lambda _
840 (setenv "NO_NET" "1") ; disable opendap tests
841 (with-directory-excursion "test"
842 (setenv "PYTHONPATH" ; find and add the library we just built
843 (string-append
844 (car (find-files "../build" "lib.*"
845 #:directories? #:t
846 #:fail-on-error? #:t))
847 ":" (getenv "PYTHONPATH")))
848 (zero? (system* "python" "run_all.py"))))))))
849 (home-page
850 "https://github.com/Unidata/netcdf4-python")
851 (synopsis "Python/numpy interface to the netCDF library")
852 (description "Netcdf4-python is a Python interface to the netCDF C
853 library. netCDF version 4 has many features not found in earlier
854 versions of the library and is implemented on top of HDF5. This module
855 can read and write files in both the new netCDF 4 and the old netCDF 3
856 format, and can create files that are readable by HDF5 clients. The
857 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
858 to users of that module.")
859 ;; The software is mainly ISC, but includes some files covered
860 ;; by the Expat license.
861 (license (list license:isc license:expat))))
862
863 (define-public python2-netcdf4
864 (package-with-python2 python-netcdf4))
865
866 (define-public python-lockfile
867 (package
868 (name "python-lockfile")
869 (version "0.12.2")
870 (source
871 (origin
872 (method url-fetch)
873 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
874 "lockfile-" version ".tar.gz"))
875 (sha256
876 (base32
877 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
878 (build-system python-build-system)
879 (arguments '(#:test-target "check"))
880 (native-inputs
881 `(("python-pbr" ,python-pbr)))
882 (home-page "https://launchpad.net/pylockfile")
883 (synopsis "Platform-independent file locking module")
884 (description
885 "The lockfile package exports a LockFile class which provides a simple
886 API for locking files.")
887 (license license:expat)))
888
889 (define-public python2-lockfile
890 (package-with-python2 python-lockfile))
891
892 (define-public python-mock
893 (package
894 (name "python-mock")
895 (version "1.0.1")
896 (source
897 (origin
898 (method url-fetch)
899 (uri (pypi-uri "mock" version))
900 (sha256
901 (base32
902 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
903 (build-system python-build-system)
904 (arguments '(#:test-target "check"))
905 (home-page "https://github.com/testing-cabal/mock")
906 (synopsis "Python mocking and patching library for testing")
907 (description
908 "Mock is a library for testing in Python. It allows you to replace parts
909 of your system under test with mock objects and make assertions about how they
910 have been used.")
911 (license license:expat)))
912
913 (define-public python2-mock
914 (package-with-python2 python-mock))
915
916
917 (define-public python-setuptools
918 (package
919 (name "python-setuptools")
920 (version "31.0.0")
921 (source
922 (origin
923 (method url-fetch)
924 (uri (pypi-uri "setuptools" version))
925 (sha256
926 (base32
927 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
928 (modules '((guix build utils)))
929 (snippet
930 '(begin
931 ;; Remove included binaries which are used to build self-extracting
932 ;; installers for Windows.
933 ;; TODO: Find some way to build them ourself so we can include them.
934 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
935 #t))))
936 (build-system python-build-system)
937 ;; FIXME: Tests require pytest, which itself relies on setuptools.
938 ;; One could bootstrap with an internal untested setuptools.
939 (arguments
940 `(#:tests? #f))
941 (home-page "https://pypi.python.org/pypi/setuptools")
942 (synopsis
943 "Library designed to facilitate packaging Python projects")
944 (description
945 "Setuptools is a fully-featured, stable library designed to facilitate
946 packaging Python projects, where packaging includes:
947 Python package and module definitions,
948 distribution package metadata,
949 test hooks,
950 project installation,
951 platform-specific details,
952 Python 3 support.")
953 ;; TODO: setuptools now bundles the following libraries:
954 ;; packaging, pyparsing, six and appdirs. How to unbundle?
955 (license (list license:psfl ; setuptools itself
956 license:expat ; six, appdirs, pyparsing
957 license:asl2.0 ; packaging is dual ASL2/BSD-2
958 license:bsd-2))))
959
960 (define-public python2-setuptools
961 (package-with-python2 python-setuptools))
962
963 ;;; Pycrypto is abandoned upstream:
964 ;;;
965 ;;; https://github.com/dlitz/pycrypto/issues/173
966 ;;;
967 ;;; TODO Remove this package from GNU Guix.
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 (pypi-uri "pycrypto" version))
976 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
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.3")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "python-dateutil" version))
1072 (sha256
1073 (base32
1074 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
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.3")
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (pypi-uri "pysqlite" version))
1202 (sha256
1203 (base32
1204 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
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.10.0")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (pypi-uri "pbr" version))
2103 (sha256
2104 (base32
2105 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))))
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 "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2246 (description
2247 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2248 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2249 testing frameworks.")
2250 (license license:expat)))
2251
2252 (define-public python2-cov-core
2253 (package-with-python2 python-cov-core))
2254
2255 (define-public python-discover
2256 (package
2257 (name "python-discover")
2258 (version "0.4.0")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (string-append
2263 "https://pypi.python.org/packages/source/d/discover/discover-"
2264 version ".tar.gz"))
2265 (sha256
2266 (base32
2267 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2268 (build-system python-build-system)
2269 (home-page "http://pypi.python.org/pypi/discover/")
2270 (synopsis
2271 "Python test discovery for unittest")
2272 (description
2273 "Discover provides test discovery for unittest, a feature that has been
2274 backported from Python 2.7 for Python 2.4+.")
2275 (license license:bsd-3)))
2276
2277 (define-public python2-discover
2278 (package-with-python2 python-discover))
2279
2280 (define-public behave
2281 (package
2282 (name "behave")
2283 (version "1.2.5")
2284 (source (origin
2285 (method url-fetch)
2286 (uri (pypi-uri "behave" version ".tar.bz2"))
2287 (sha256
2288 (base32
2289 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2290 (build-system python-build-system)
2291 (propagated-inputs
2292 `(("python-six" ,python-six)
2293 ("python-parse" ,python-parse)
2294 ("python-parse-type" ,python-parse-type)))
2295 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2296 ;PyHamcrest>=1.8
2297 (home-page "http://github.com/behave/behave")
2298 (synopsis "Python behavior-driven development")
2299 (description
2300 "Behave is a tool for behavior-driven development in python.
2301 Behavior-driven development (or BDD) is an agile software development
2302 technique that encourages collaboration between developers, QA and
2303 non-technical or business participants in a software project. Behave uses
2304 tests written in a natural language style, backed up by Python code.")
2305 (license license:x11)))
2306
2307 (define-public python-exif-read
2308 (package
2309 (name "python-exif-read")
2310 (version "2.1.2")
2311 (source (origin
2312 (method url-fetch)
2313 (uri (pypi-uri "ExifRead" version))
2314 (sha256
2315 (base32
2316 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2317 (build-system python-build-system)
2318 (arguments `(#:tests? #f)) ; no tests
2319 (home-page "https://github.com/ianare/exif-py")
2320 (synopsis "Python library to extract EXIF data from image files")
2321 (description
2322 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2323 files.")
2324 (license license:bsd-3)))
2325
2326 (define-public python2-exif-read
2327 (package-with-python2 python-exif-read))
2328
2329 (define-public python-pyld
2330 (package
2331 (name "python-pyld")
2332 (version "0.7.1")
2333 (source (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "PyLD" version))
2336 (sha256
2337 (base32
2338 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2339 (build-system python-build-system)
2340 (arguments `(#:tests? #f)) ; no tests
2341 (home-page "http://github.com/digitalbazaar/pyld")
2342 (synopsis "Python implementation of the JSON-LD specification")
2343 (description
2344 "PyLD is an implementation of the JSON-LD specification.")
2345 (license license:bsd-3)))
2346
2347 (define-public python2-pyld
2348 (package-with-python2 python-pyld))
2349
2350 (define-public python-certifi
2351 (package
2352 (name "python-certifi")
2353 (version "2017.1.23")
2354 (source (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "certifi" version))
2357 (sha256
2358 (base32
2359 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2360 (build-system python-build-system)
2361 (home-page "https://certifi.io/")
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.7")
2375 (source
2376 (origin
2377 (method url-fetch)
2378 (uri (pypi-uri "click" version))
2379 (sha256
2380 (base32
2381 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
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.30.0a0")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "wheel" version))
2414 (sha256
2415 (base32
2416 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
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.20")
2572 (source (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "Unidecode" version))
2575 (sha256
2576 (base32
2577 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
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.5")
3164 (source
3165 (origin
3166 (method url-fetch)
3167 (uri (pypi-uri "redis" version))
3168 (sha256
3169 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3170 (build-system python-build-system)
3171 ;; Tests require a running Redis server
3172 (arguments '(#:tests? #f))
3173 ;; As long as we are not running test, we do not need this input :-)
3174 ;;(native-inputs
3175 ;; `(("python-pytest" ,python-pytest)))
3176 (home-page "https://github.com/andymccurdy/redis-py")
3177 (synopsis "Redis Python client")
3178 (description
3179 "This package provides a Python interface to the Redis key-value store.")
3180 (license license:expat)))
3181
3182 (define-public python2-redis
3183 (package-with-python2 python-redis))
3184
3185 (define-public python-rq
3186 (package
3187 (name "python-rq")
3188 (version "0.5.2")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (string-append
3193 "https://pypi.python.org/packages/source/r/rq/rq-"
3194 version ".tar.gz"))
3195 (sha256
3196 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3197 (build-system python-build-system)
3198 (propagated-inputs
3199 `(("python-click" ,python-click)
3200 ("python-redis" ,python-redis)))
3201 (home-page "http://python-rq.org/")
3202 (synopsis "Simple job queues for Python")
3203 (description
3204 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3205 processing them in the background with workers. It is backed by Redis and it
3206 is designed to have a low barrier to entry.")
3207 (license license:bsd-2)))
3208
3209 (define-public python2-rq
3210 (package-with-python2 python-rq))
3211
3212 (define-public python-cython
3213 (package
3214 (name "python-cython")
3215 (version "0.24.1")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (pypi-uri "Cython" version))
3220 (sha256
3221 (base32
3222 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3223 (build-system python-build-system)
3224 ;; we need the full python package and not just the python-wrapper
3225 ;; because we need libpython3.3m.so
3226 (inputs
3227 `(("python" ,python)))
3228 (arguments
3229 `(#:phases
3230 (modify-phases %standard-phases
3231 (add-before 'check 'set-HOME
3232 ;; some tests require access to "$HOME/.cython"
3233 (lambda _ (setenv "HOME" "/tmp")))
3234 (replace 'check
3235 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3236 (home-page "http://cython.org/")
3237 (synopsis "C extensions for Python")
3238 (description "Cython is an optimising static compiler for both the Python
3239 programming language and the extended Cython programming language. It makes
3240 writing C extensions for Python as easy as Python itself.")
3241 (license license:asl2.0)
3242 (properties `((python2-variant . ,(delay python2-cython))))))
3243
3244 (define-public python2-cython
3245 (package (inherit (package-with-python2
3246 (strip-python2-variant python-cython)))
3247 (name "python2-cython")
3248 (inputs
3249 `(("python-2" ,python-2))))) ; this is not automatically changed
3250
3251 ;; The RPython toolchain currently does not support Python 3.
3252 (define-public python2-rpython
3253 (package
3254 (name "python2-rpython")
3255 (version "0.1.4")
3256 (source
3257 (origin
3258 (method url-fetch)
3259 (uri (pypi-uri "rpython" version))
3260 (sha256
3261 (base32
3262 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3263 (build-system python-build-system)
3264 (arguments `(#:python ,python-2))
3265 (native-inputs
3266 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3267 (home-page "https://rpython.readthedocs.org")
3268 (synopsis "Framework for implementing interpreters and virtual machines")
3269 (description "RPython is a translation and support framework for
3270 producing implementations of dynamic languages, emphasizing a clean separation
3271 between language specification and implementation aspects.")
3272 (license license:expat)))
3273
3274 ;; This version of numpy is missing the documentation and is only used to
3275 ;; build matplotlib which is required to build numpy's documentation.
3276 (define python-numpy-bootstrap
3277 (package
3278 (name "python-numpy-bootstrap")
3279 (version "1.10.4")
3280 (source
3281 (origin
3282 (method url-fetch)
3283 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3284 "/numpy-" version ".tar.gz"))
3285 (sha256
3286 (base32
3287 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3288 (build-system python-build-system)
3289 (inputs
3290 `(("openblas" ,openblas)
3291 ("lapack" ,lapack)))
3292 (native-inputs
3293 `(("python-nose" ,python-nose)
3294 ("gfortran" ,gfortran)))
3295 (arguments
3296 `(#:phases
3297 (modify-phases %standard-phases
3298 (add-before 'build 'set-environment-variables
3299 (lambda* (#:key inputs #:allow-other-keys)
3300 (call-with-output-file "site.cfg"
3301 (lambda (port)
3302 (format port
3303 "[openblas]
3304 libraries = openblas
3305 library_dirs = ~a/lib
3306 include_dirs = ~a/include
3307
3308 # backslash-n to make emacs happy
3309 \n[lapack]
3310 lapack_libs = lapack
3311 library_dirs = ~a/lib
3312 include_dirs = ~a/include
3313 "
3314 (assoc-ref inputs "openblas")
3315 (assoc-ref inputs "openblas")
3316 (assoc-ref inputs "lapack")
3317 (assoc-ref inputs "lapack"))))
3318 ;; Use "gcc" executable, not "cc".
3319 (substitute* "numpy/distutils/system_info.py"
3320 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3321 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3322 #t))
3323 ;; Tests can only be run after the library has been installed and not
3324 ;; within the source directory.
3325 (delete 'check)
3326 (add-after 'install 'check
3327 (lambda* (#:key outputs inputs #:allow-other-keys)
3328 ;; Make installed package available for running the tests
3329 (add-installed-pythonpath inputs outputs)
3330 (with-directory-excursion "/tmp"
3331 (zero? (system* "python" "-c"
3332 "import numpy; numpy.test(verbose=2)"))))))))
3333 (home-page "http://www.numpy.org/")
3334 (synopsis "Fundamental package for scientific computing with Python")
3335 (description "NumPy is the fundamental package for scientific computing
3336 with Python. It contains among other things: a powerful N-dimensional array
3337 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3338 and Fortran code, useful linear algebra, Fourier transform, and random number
3339 capabilities.")
3340 (license license:bsd-3)))
3341
3342 (define python2-numpy-bootstrap
3343 (package-with-python2 python-numpy-bootstrap))
3344
3345 (define-public python-munch
3346 (package
3347 (name "python-munch")
3348 (version "2.0.4")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (pypi-uri "munch" version))
3353 (sha256
3354 (base32
3355 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3356 (build-system python-build-system)
3357 (home-page "https://github.com/Infinidat/munch")
3358 (synopsis "Dot-accessible dictionary")
3359 (description "Munch is a dot-accessible dictionary similar to JavaScript
3360 objects.")
3361 (license license:expat)))
3362
3363 (define-public python2-munch
3364 (package-with-python2 python-munch))
3365
3366 (define-public python2-fastlmm
3367 (package
3368 (name "python2-fastlmm")
3369 (version "0.2.26")
3370 (source
3371 (origin
3372 (method url-fetch)
3373 (uri (pypi-uri "fastlmm" version ".zip"))
3374 (sha256
3375 (base32
3376 "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
3377 (build-system python-build-system)
3378 (arguments
3379 `(#:python ,python-2)) ; only Python 2.7 is supported
3380 (propagated-inputs
3381 `(("python2-numpy" ,python2-numpy)
3382 ("python2-scipy" ,python2-scipy)
3383 ("python2-matplotlib" ,python2-matplotlib)
3384 ("python2-pandas" ,python2-pandas)
3385 ("python2-scikit-learn" ,python2-scikit-learn)
3386 ("python2-pysnptools" ,python2-pysnptools)))
3387 (native-inputs
3388 `(("unzip" ,unzip)
3389 ("python2-cython" ,python2-cython)
3390 ("python2-mock" ,python2-mock)))
3391 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3392 (synopsis "Perform genome-wide association studies on large data sets")
3393 (description
3394 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3395 Models, is a program for performing both single-SNP and SNP-set genome-wide
3396 association studies (GWAS) on extremely large data sets.")
3397 (license license:asl2.0)))
3398
3399 (define-public python-numpy
3400 (package (inherit python-numpy-bootstrap)
3401 (name "python-numpy")
3402 (outputs '("out" "doc"))
3403 (inputs
3404 `(("which" ,which)
3405 ,@(package-inputs python-numpy-bootstrap)))
3406 (propagated-inputs
3407 `(("python-matplotlib" ,python-matplotlib)
3408 ("python-pyparsing" ,python-pyparsing)
3409 ,@(package-propagated-inputs python-numpy-bootstrap)))
3410 (native-inputs
3411 `(("pkg-config" ,pkg-config)
3412 ("python-sphinx" ,python-sphinx)
3413 ("python-numpydoc" ,python-numpydoc)
3414 ("texlive" ,texlive)
3415 ("texinfo" ,texinfo)
3416 ("perl" ,perl)
3417 ,@(package-native-inputs python-numpy-bootstrap)))
3418 (arguments
3419 `(,@(substitute-keyword-arguments
3420 (package-arguments python-numpy-bootstrap)
3421 ((#:phases phases)
3422 `(alist-cons-after
3423 'install 'install-doc
3424 (lambda* (#:key inputs outputs #:allow-other-keys)
3425 ;; Make installed package available for building the
3426 ;; documentation
3427 (add-installed-pythonpath inputs outputs)
3428 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3429 (doc (string-append
3430 data "/doc/" ,name "-"
3431 ,(package-version python-numpy-bootstrap)))
3432 (info (string-append data "/info"))
3433 (html (string-append doc "/html"))
3434 (pyver ,(string-append "PYVER=")))
3435 (with-directory-excursion "doc"
3436 (mkdir-p html)
3437 (system* "make" "html" pyver)
3438 (system* "make" "latex" "PAPER=a4" pyver)
3439 (system* "make" "-C" "build/latex"
3440 "all-pdf" "PAPER=a4" pyver)
3441 ;; FIXME: Generation of the info file fails.
3442 ;; (system* "make" "info" pyver)
3443 ;; (mkdir-p info)
3444 ;; (copy-file "build/texinfo/numpy.info"
3445 ;; (string-append info "/numpy.info"))
3446 (for-each (lambda (file)
3447 (copy-file (string-append "build/latex" file)
3448 (string-append doc file)))
3449 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3450 (with-directory-excursion "build/html"
3451 (for-each (lambda (file)
3452 (let* ((dir (dirname file))
3453 (tgt-dir (string-append html "/" dir)))
3454 (unless (equal? "." dir)
3455 (mkdir-p tgt-dir))
3456 (install-file file html)))
3457 (find-files "." ".*"))))))
3458 ,phases)))))))
3459
3460 (define-public python2-numpy
3461 (package-with-python2 python-numpy))
3462
3463 (define-public python-pygit2
3464 (package
3465 (name "python-pygit2")
3466 (version "0.25.0")
3467 (source
3468 (origin
3469 (method url-fetch)
3470 (uri (pypi-uri "pygit2" version))
3471 (sha256
3472 (base32
3473 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))))
3474 (build-system python-build-system)
3475 (propagated-inputs
3476 `(("python-six" ,python-six)
3477 ("python-cffi" ,python-cffi)
3478 ("libgit2" ,libgit2)
3479 ("python-tox" ,python-tox)))
3480 (home-page "https://github.com/libgit2/pygit2")
3481 (synopsis "Python bindings for libgit2")
3482 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3483 library, libgit2 implements Git plumbing.")
3484 ;; GPL2.0 only, with linking exception.
3485 (license license:gpl2)))
3486
3487 (define-public python2-pygit2
3488 (package-with-python2 python-pygit2))
3489
3490 (define-public python-pyparsing
3491 (package
3492 (name "python-pyparsing")
3493 (version "2.0.3")
3494 (source
3495 (origin
3496 (method url-fetch)
3497 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3498 "/pyparsing-" version
3499 "/pyparsing-" version ".tar.gz"))
3500 (sha256
3501 (base32
3502 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3503 (build-system python-build-system)
3504 (outputs '("out" "doc"))
3505 (arguments
3506 `(#:tests? #f ; no test target
3507 #:modules ((guix build python-build-system)
3508 (guix build utils))
3509 #:phases
3510 (alist-cons-after
3511 'install 'install-doc
3512 (lambda* (#:key outputs #:allow-other-keys)
3513 (let* ((doc (string-append (assoc-ref outputs "doc")
3514 "/share/doc/" ,name "-" ,version))
3515 (html-doc (string-append doc "/html"))
3516 (examples (string-append doc "/examples")))
3517 (mkdir-p html-doc)
3518 (mkdir-p examples)
3519 (for-each
3520 (lambda (dir tgt)
3521 (map (lambda (file)
3522 (install-file file tgt))
3523 (find-files dir ".*")))
3524 (list "docs" "htmldoc" "examples")
3525 (list doc html-doc examples))))
3526 %standard-phases)))
3527 (home-page "http://pyparsing.wikispaces.com")
3528 (synopsis "Python parsing class library")
3529 (description
3530 "The pyparsing module is an alternative approach to creating and
3531 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3532 of regular expressions. The pyparsing module provides a library of classes
3533 that client code uses to construct the grammar directly in Python code.")
3534 (license license:expat)))
3535
3536 (define-public python2-pyparsing
3537 (package-with-python2 python-pyparsing))
3538
3539 (define-public python-numpydoc
3540 (package
3541 (name "python-numpydoc")
3542 (version "0.5")
3543 (source
3544 (origin
3545 (method url-fetch)
3546 (uri (string-append
3547 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3548 version ".tar.gz"))
3549 (sha256
3550 (base32
3551 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3552 (modules '((guix build utils)))
3553 (snippet
3554 '(begin
3555 ;; Drop a test requiring matplotlib, which we cannot add as an
3556 ;; input since it would create a circular dependency: Extend the
3557 ;; test for Python 3, where it is already dropped, to Python 2.
3558 (substitute* "numpydoc/tests/test_plot_directive.py"
3559 (("3") "2"))))))
3560 (build-system python-build-system)
3561 (propagated-inputs
3562 `(("python-sphinx" ,python-sphinx)))
3563 (native-inputs
3564 `(("python-nose" ,python-nose)))
3565 (home-page "https://pypi.python.org/pypi/numpydoc")
3566 (synopsis
3567 "Numpy's Sphinx extensions")
3568 (description
3569 "Sphinx extension to support docstrings in Numpy format.")
3570 (license license:bsd-2)))
3571
3572 (define-public python2-numpydoc
3573 (package-with-python2 python-numpydoc))
3574
3575 (define-public python-numexpr
3576 (package
3577 (name "python-numexpr")
3578 (version "2.6.1")
3579 (source
3580 (origin
3581 (method url-fetch)
3582 (uri (pypi-uri "numexpr" version))
3583 (sha256
3584 (base32
3585 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3586 (build-system python-build-system)
3587 (arguments `(#:tests? #f)) ; no tests included
3588 (propagated-inputs
3589 `(("python-numpy" ,python-numpy)))
3590 (home-page "https://github.com/pydata/numexpr")
3591 (synopsis "Fast numerical expression evaluator for NumPy")
3592 (description
3593 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3594 expressions that operate on arrays are accelerated and use less memory than
3595 doing the same calculation in Python. In addition, its multi-threaded
3596 capabilities can make use of all your cores, which may accelerate
3597 computations, most specially if they are not memory-bounded (e.g. those using
3598 transcendental functions).")
3599 (license license:expat)))
3600
3601 (define-public python2-numexpr
3602 (package-with-python2 python-numexpr))
3603
3604 (define-public python-matplotlib
3605 (package
3606 (name "python-matplotlib")
3607 (version "1.4.3")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3612 "/matplotlib-" version
3613 "/matplotlib-" version ".tar.gz"))
3614 (sha256
3615 (base32
3616 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3617 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3618 (build-system python-build-system)
3619 (outputs '("out" "doc"))
3620 (propagated-inputs ; the following packages are all needed at run time
3621 `(("python-pyparsing" ,python-pyparsing)
3622 ("python-pygobject" ,python-pygobject)
3623 ("gobject-introspection" ,gobject-introspection)
3624 ("python-tkinter" ,python "tk")
3625 ("python-dateutil" ,python-dateutil-2)
3626 ("python-numpy" ,python-numpy-bootstrap)
3627 ("python-pillow" ,python-pillow)
3628 ("python-pytz" ,python-pytz)
3629 ("python-six" ,python-six)
3630 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3631 ;; from 'gtk+') provides the required 'typelib' files used by
3632 ;; 'gobject-introspection'. The location of these files is set with the
3633 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3634 ;; is done automatically by a 'native-search-path' procedure. However,
3635 ;; at run-time the user must set this variable as follows:
3636 ;;
3637 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3638 ("gtk+" ,gtk+)
3639 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3640 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3641 ;; object. For this reason we need to import both libraries.
3642 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3643 ("python-pycairo" ,python-pycairo)
3644 ("python-cairocffi" ,python-cairocffi)))
3645 (inputs
3646 `(("libpng" ,libpng)
3647 ("imagemagick" ,imagemagick)
3648 ("freetype" ,freetype)
3649 ("cairo" ,cairo)
3650 ("glib" ,glib)
3651 ;; FIXME: Add backends when available.
3652 ;("python-wxpython" ,python-wxpython)
3653 ;("python-pyqt" ,python-pyqt)
3654 ("tcl" ,tcl)
3655 ("tk" ,tk)))
3656 (native-inputs
3657 `(("pkg-config" ,pkg-config)
3658 ("python-sphinx" ,python-sphinx)
3659 ("python-numpydoc" ,python-numpydoc)
3660 ("python-nose" ,python-nose)
3661 ("python-mock" ,python-mock)
3662 ("texlive" ,texlive)
3663 ("texinfo" ,texinfo)))
3664 (arguments
3665 `(#:phases
3666 (alist-cons-before
3667 'build 'configure-environment
3668 (lambda* (#:key outputs inputs #:allow-other-keys)
3669 (let ((cairo (assoc-ref inputs "cairo"))
3670 (gtk+ (assoc-ref inputs "gtk+")))
3671 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3672 ;; has not effect.
3673 (setenv "LD_LIBRARY_PATH"
3674 (string-append cairo "/lib:" gtk+ "/lib"))
3675 (setenv "HOME" (getcwd))
3676 (call-with-output-file "setup.cfg"
3677 (lambda (port)
3678 (format port "[directories]~%
3679 basedirlist = ~a,~a~%
3680 [rc_options]~%
3681 backend = TkAgg~%"
3682 (assoc-ref inputs "tcl")
3683 (assoc-ref inputs "tk"))))))
3684 (alist-cons-after
3685 'install 'install-doc
3686 (lambda* (#:key inputs outputs #:allow-other-keys)
3687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3688 (doc (string-append data "/doc/" ,name "-" ,version))
3689 (info (string-append data "/info"))
3690 (html (string-append doc "/html")))
3691 ;; Make installed package available for building the
3692 ;; documentation
3693 (add-installed-pythonpath inputs outputs)
3694 (with-directory-excursion "doc"
3695 ;; Produce pdf in 'A4' format.
3696 (substitute* (find-files "." "conf\\.py")
3697 (("latex_paper_size = 'letter'")
3698 "latex_paper_size = 'a4'"))
3699 (mkdir-p html)
3700 (mkdir-p info)
3701 ;; The doc recommends to run the 'html' target twice.
3702 (system* "python" "make.py" "html")
3703 (system* "python" "make.py" "html")
3704 (copy-recursively "build/html" html)
3705 (system* "python" "make.py" "latex")
3706 (system* "python" "make.py" "texinfo")
3707 (symlink (string-append html "/_images")
3708 (string-append info "/matplotlib-figures"))
3709 (with-directory-excursion "build/texinfo"
3710 (substitute* "matplotlib.texi"
3711 (("@image\\{([^,]*)" all file)
3712 (string-append "@image{matplotlib-figures/" file)))
3713 (symlink (string-append html "/_images")
3714 "./matplotlib-figures")
3715 (system* "makeinfo" "--no-split"
3716 "-o" "matplotlib.info" "matplotlib.texi"))
3717 (copy-file "build/texinfo/matplotlib.info"
3718 (string-append info "/matplotlib.info"))
3719 (copy-file "build/latex/Matplotlib.pdf"
3720 (string-append doc "/Matplotlib.pdf")))))
3721 %standard-phases))))
3722 (home-page "http://matplotlib.org")
3723 (synopsis "2D plotting library for Python")
3724 (description
3725 "Matplotlib is a Python 2D plotting library which produces publication
3726 quality figures in a variety of hardcopy formats and interactive environments
3727 across platforms. Matplotlib can be used in Python scripts, the python and
3728 ipython shell, web application servers, and six graphical user interface
3729 toolkits.")
3730 (license license:psfl)
3731 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3732
3733 (define-public python2-matplotlib
3734 (let ((matplotlib (package-with-python2
3735 (strip-python2-variant python-matplotlib))))
3736 (package (inherit matplotlib)
3737 ;; Make sure to use special packages for Python 2 instead
3738 ;; of those automatically rewritten by package-with-python2.
3739 (propagated-inputs
3740 `(("python2-pycairo" ,python2-pycairo)
3741 ("python2-pygobject-2" ,python2-pygobject-2)
3742 ("python2-tkinter" ,python-2 "tk")
3743 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3744 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3745
3746 (define-public python2-pysnptools
3747 (package
3748 (name "python2-pysnptools")
3749 (version "0.3.9")
3750 (source
3751 (origin
3752 (method url-fetch)
3753 (uri (pypi-uri "pysnptools" version ".zip"))
3754 (sha256
3755 (base32
3756 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3757 (build-system python-build-system)
3758 (arguments
3759 `(#:python ,python-2)) ; only Python 2.7 is supported
3760 (propagated-inputs
3761 `(("python2-numpy" ,python2-numpy)
3762 ("python2-scipy" ,python2-scipy)
3763 ("python2-pandas" ,python2-pandas)))
3764 (native-inputs
3765 `(("python2-cython" ,python2-cython)))
3766 (native-inputs
3767 `(("unzip" ,unzip)))
3768 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3769 (synopsis "Library for reading and manipulating genetic data")
3770 (description
3771 "PySnpTools is a library for reading and manipulating genetic data. It
3772 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3773 those files. It can also efficiently manipulate ranges of integers using set
3774 operators such as union, intersection, and difference.")
3775 (license license:asl2.0)))
3776
3777 (define-public python-rpy2
3778 (package
3779 (name "python-rpy2")
3780 (version "2.7.6")
3781 (source
3782 (origin
3783 (method url-fetch)
3784 (uri (pypi-uri "rpy2" version))
3785 (sha256
3786 (base32
3787 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3788 (build-system python-build-system)
3789 (propagated-inputs
3790 `(("python-six" ,python-six)))
3791 (inputs
3792 `(("readline" ,readline)
3793 ("icu4c" ,icu4c)
3794 ("pcre" ,pcre)
3795 ("r" ,r)))
3796 (native-inputs
3797 `(("zlib" ,zlib)))
3798 (home-page "http://rpy.sourceforge.net/")
3799 (synopsis "Python interface to the R language")
3800 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3801 low-level interface to R from Python, a proposed high-level interface,
3802 including wrappers to graphical libraries, as well as R-like structures and
3803 functions.")
3804 (license license:gpl3+)))
3805
3806 (define-public python2-rpy2
3807 (let ((rpy2 (package-with-python2 python-rpy2)))
3808 (package (inherit rpy2)
3809 (native-inputs
3810 `(("python2-singledispatch" ,python2-singledispatch)
3811 ,@(package-native-inputs rpy2))))))
3812
3813 (define-public python-scipy
3814 (package
3815 (name "python-scipy")
3816 (version "0.16.0")
3817 (source
3818 (origin
3819 (method url-fetch)
3820 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3821 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3822 "/scipy-" version ".tar.xz"))
3823 (sha256
3824 (base32
3825 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3826 (build-system python-build-system)
3827 (propagated-inputs
3828 `(("python-numpy" ,python-numpy)
3829 ("python-matplotlib" ,python-matplotlib)
3830 ("python-pyparsing" ,python-pyparsing)))
3831 (inputs
3832 `(("lapack" ,lapack)
3833 ("openblas" ,openblas)))
3834 (native-inputs
3835 `(("python-nose" ,python-nose)
3836 ("python-sphinx" ,python-sphinx)
3837 ("python-numpydoc" ,python-numpydoc)
3838 ("gfortran" ,gfortran)
3839 ("texlive" ,texlive)
3840 ("perl" ,perl)))
3841 (outputs '("out" "doc"))
3842 (arguments
3843 `(#:phases
3844 (alist-cons-before
3845 'build 'configure-openblas
3846 (lambda* (#:key inputs #:allow-other-keys)
3847 (call-with-output-file "site.cfg"
3848 (lambda (port)
3849 (format port
3850 "[blas]
3851 libraries = openblas
3852 library_dirs = ~a/lib
3853 include_dirs = ~a/include
3854
3855 # backslash-n to make emacs happy
3856 \n[atlas]
3857 library_dirs = ~a/lib
3858 atlas_libs = openblas
3859 "
3860 (assoc-ref inputs "openblas")
3861 (assoc-ref inputs "openblas")
3862 (assoc-ref inputs "openblas"))))
3863 #t)
3864 (alist-cons-after
3865 'install 'install-doc
3866 (lambda* (#:key inputs outputs #:allow-other-keys)
3867 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3868 (doc (string-append data "/doc/" ,name "-" ,version))
3869 (html (string-append doc "/html"))
3870 (pyver ,(string-append "PYVER=")))
3871 ;; Make installed package available for building the
3872 ;; documentation
3873 (add-installed-pythonpath inputs outputs)
3874 (with-directory-excursion "doc"
3875 ;; Fix generation of images for mathematical expressions.
3876 (substitute* (find-files "source" "conf\\.py")
3877 (("pngmath_use_preview = True")
3878 "pngmath_use_preview = False"))
3879 (mkdir-p html)
3880 (system* "make" "html" pyver)
3881 (system* "make" "latex" "PAPER=a4" pyver)
3882 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3883 (copy-file "build/latex/scipy-ref.pdf"
3884 (string-append doc "/scipy-ref.pdf"))
3885 (with-directory-excursion "build/html"
3886 (for-each (lambda (file)
3887 (let* ((dir (dirname file))
3888 (tgt-dir (string-append html "/" dir)))
3889 (install-file file html)))
3890 (find-files "." ".*"))))))
3891 ;; Tests can only be run after the library has been installed and not
3892 ;; within the source directory.
3893 (alist-cons-after
3894 'install 'check
3895 (lambda _
3896 (with-directory-excursion "/tmp"
3897 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3898 (alist-delete
3899 'check
3900 (alist-cons-after
3901 'unpack 'fix-tests
3902 (lambda _
3903 (substitute* "scipy/integrate/tests/test_quadpack.py"
3904 (("libm.so") "libm.so.6"))
3905 #t)
3906 %standard-phases)))))))
3907 (home-page "http://www.scipy.org/")
3908 (synopsis "The Scipy library provides efficient numerical routines")
3909 (description "The SciPy library is one of the core packages that make up
3910 the SciPy stack. It provides many user-friendly and efficient numerical
3911 routines such as routines for numerical integration and optimization.")
3912 (license license:bsd-3)))
3913
3914 (define-public python2-scipy
3915 (package-with-python2 python-scipy))
3916
3917 (define-public python-socksipy-branch
3918 (package
3919 (name "python-socksipy-branch")
3920 (version "1.01")
3921 (source
3922 (origin
3923 (method url-fetch)
3924 (uri (pypi-uri "SocksiPy-branch" version))
3925 (sha256
3926 (base32
3927 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3928 (build-system python-build-system)
3929 (arguments
3930 `(#:tests? #f)) ; There are no tests
3931 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3932 (synopsis "Python SOCKS module")
3933 (description
3934 "SocksiPy - A Python SOCKS client module. It provides a
3935 socket-like interface that supports connections to any TCP
3936 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3937 The original version was developed by Dan Haim, this is a
3938 branch created by Mario Vilas to address some open issues,
3939 as the original project seems to have been abandoned circa 2007.")
3940 (license license:bsd-3)))
3941
3942 (define-public python2-socksipy-branch
3943 (package-with-python2 python-socksipy-branch))
3944
3945 (define-public python-sqlalchemy
3946 (package
3947 (name "python-sqlalchemy")
3948 (version "1.0.12")
3949 (source
3950 (origin
3951 (method url-fetch)
3952 (uri (string-append "https://pypi.python.org/packages/source/S/"
3953 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3954 (sha256
3955 (base32
3956 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3957 (build-system python-build-system)
3958 (native-inputs
3959 `(("python-cython" ,python-cython) ;for c extensions
3960 ("python-pytest" ,python-pytest)
3961 ("python-mock" ,python-mock))) ;for tests
3962 (arguments
3963 `(#:phases (alist-replace
3964 'check
3965 (lambda _ (zero? (system* "py.test")))
3966 %standard-phases)))
3967 (home-page "http://www.sqlalchemy.org")
3968 (synopsis "Database abstraction library")
3969 (description
3970 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3971 gives application developers the full power and flexibility of SQL. It
3972 provides a full suite of well known enterprise-level persistence patterns,
3973 designed for efficient and high-performing database access, adapted into a
3974 simple and Pythonic domain language.")
3975 (license license:x11)))
3976
3977 (define-public python2-sqlalchemy
3978 (package-with-python2 python-sqlalchemy))
3979
3980 (define-public python-pycodestyle
3981 (package
3982 (name "python-pycodestyle")
3983 (version "2.0.0")
3984 (source
3985 (origin
3986 (method url-fetch)
3987 (uri (pypi-uri "pycodestyle" version))
3988 (sha256
3989 (base32
3990 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3991 (build-system python-build-system)
3992 (home-page "https://pycodestyle.readthedocs.io/")
3993 (synopsis "Python style guide checker")
3994 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3995 Python code against some of the style conventions in
3996 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3997 (license license:expat)))
3998
3999 (define-public python2-pycodestyle
4000 (package-with-python2 python-pycodestyle))
4001
4002 (define-public python-orderedmultidict
4003 (package
4004 (name "python-orderedmultidict")
4005 (version "0.7.11")
4006 (source
4007 (origin
4008 (method url-fetch)
4009 (uri (pypi-uri "orderedmultidict" version))
4010 (sha256
4011 (base32
4012 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4013 (build-system python-build-system)
4014 (arguments
4015 `(#:phases
4016 (modify-phases %standard-phases
4017 (add-after 'unpack 'fix-tests
4018 (lambda _
4019 ;; The package uses nosetest for running the tests.
4020 ;; Adding this initfile allows to run the test suite
4021 ;; without requiring nosetest.
4022 (zero? (system* "touch" "tests/__init__.py")))))))
4023 (propagated-inputs
4024 `(("python-six" ,python-six)))
4025 (native-inputs
4026 `(("python-pycodestyle" ,python-pycodestyle)))
4027 (home-page "https://github.com/gruns/orderedmultidict")
4028 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4029 (description "This package contains a library for ordered multivalue
4030 dictionaries. A multivalue dictionary is a dictionary that can store
4031 multiple values for the same key. An ordered multivalue dictionary is a
4032 multivalue dictionary that retains the order of insertions and deletions.")
4033 (license license:unlicense)))
4034
4035 (define-public python2-orderedmultidict
4036 (package-with-python2 python-orderedmultidict))
4037
4038 (define-public python-furl
4039 (package
4040 (name "python-furl")
4041 (version "0.5.6")
4042 (source
4043 (origin
4044 (method url-fetch)
4045 (uri (pypi-uri "furl" version))
4046 (sha256
4047 (base32
4048 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4049 (build-system python-build-system)
4050 (propagated-inputs
4051 `(("python-six" ,python-six)
4052 ("python-orderedmultidict" ,python-orderedmultidict)))
4053 (native-inputs
4054 `(("python-pycodestyle" ,python-pycodestyle)))
4055 (home-page "https://github.com/gruns/furl")
4056 (synopsis "URL manipulation in Python")
4057 (description "Furl provides an easy-to-use alternative to the
4058 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4059 (license license:unlicense)))
4060
4061 (define-public python2-furl
4062 (package-with-python2 python-furl))
4063
4064 (define-public python-flask-babel
4065 (package
4066 (name "python-flask-babel")
4067 (version "0.11.1")
4068 (source
4069 (origin
4070 (method url-fetch)
4071 (uri (pypi-uri "Flask-Babel" version))
4072 (sha256
4073 (base32
4074 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4075 (build-system python-build-system)
4076 (propagated-inputs
4077 `(("python-flask" ,python-flask)
4078 ("python-babel" ,python-babel)
4079 ("python-jinja2" ,python-jinja2)
4080 ("python-pytz" ,python-pytz)))
4081 (home-page "https://github.com/python-babel/flask-babel")
4082 (synopsis "Add i18n/l10n support to Flask applications")
4083 (description "This package implements internationalization and localization
4084 support for Flask. This is based on the Python babel module as well as pytz -
4085 both of which are installed automatically if you install this library.")
4086 (license license:bsd-3)))
4087
4088 (define-public python2-flask-babel
4089 (package-with-python2 python-flask-babel))
4090
4091 (define-public python-sqlalchemy-utils
4092 (package
4093 (name "python-sqlalchemy-utils")
4094 (version "0.32.11")
4095 (source
4096 (origin
4097 (method url-fetch)
4098 (uri (pypi-uri "SQLAlchemy-Utils" version))
4099 (sha256
4100 (base32
4101 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4102 (build-system python-build-system)
4103 (propagated-inputs
4104 `(("python-six" ,python-six)
4105 ("python-sqlalchemy" ,python-sqlalchemy)))
4106 (native-inputs
4107 `(("python-pytest" ,python-pytest)))
4108 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4109 (synopsis "Various utility functions for SQLAlchemy")
4110 (description
4111 "SQLAlchemy-utils provides various utility functions and custom data types
4112 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4113
4114 You might also want to install the following optional dependencies:
4115 @enumerate
4116 @item @code{python-passlib}
4117 @item @code{python-babel}
4118 @item @code{python-cryptography}
4119 @item @code{python-pytz}
4120 @item @code{python-psycopg2}
4121 @item @code{python-furl}
4122 @item @code{python-flask-babel}
4123 @end enumerate
4124 ")
4125 (license license:bsd-3)))
4126
4127 (define-public python2-sqlalchemy-utils
4128 (package-with-python2 python-sqlalchemy-utils))
4129
4130 (define-public python-alembic
4131 (package
4132 (name "python-alembic")
4133 (version "0.8.10")
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (pypi-uri "alembic" version))
4138 (sha256
4139 (base32
4140 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4141 (build-system python-build-system)
4142 (native-inputs
4143 `(("python-mock" ,python-mock)
4144 ("python-pytest-cov" ,python-pytest-cov)))
4145 (propagated-inputs
4146 `(("python-sqlalchemy" ,python-sqlalchemy)
4147 ("python-mako" ,python-mako)
4148 ("python-editor" ,python-editor)))
4149 (home-page "http://bitbucket.org/zzzeek/alembic")
4150 (synopsis
4151 "Database migration tool for SQLAlchemy")
4152 (description
4153 "Alembic is a lightweight database migration tool for usage with the
4154 SQLAlchemy Database Toolkit for Python.")
4155 (license license:expat)))
4156
4157 (define-public python2-alembic
4158 (package-with-python2 python-alembic))
4159
4160 (define-public python-autopep8
4161 (package
4162 (name "python-autopep8")
4163 (version "1.2.4")
4164 (source
4165 (origin
4166 (method url-fetch)
4167 (uri (pypi-uri "autopep8" version))
4168 (sha256
4169 (base32
4170 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4171 (build-system python-build-system)
4172 (propagated-inputs
4173 `(("python-pep8" ,python-pep8)))
4174 (home-page "https://github.com/hhatto/autopep8")
4175 (synopsis "Format Python code according to the PEP 8 style guide")
4176 (description
4177 "@code{autopep8} automatically formats Python code to conform to
4178 the PEP 8 style guide. It uses the pycodestyle utility to determine
4179 what parts of the code needs to be formatted. @code{autopep8} is
4180 capable of fixing most of the formatting issues that can be reported
4181 by pycodestyle.")
4182 (license (license:non-copyleft
4183 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4184
4185 (define-public python2-autopep8
4186 (package-with-python2 python-autopep8))
4187
4188 (define-public python-distutils-extra
4189 (package
4190 (name "python-distutils-extra")
4191 (version "2.38")
4192 (source
4193 (origin
4194 (method url-fetch)
4195 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4196 version "/+download/python-distutils-extra-"
4197 version ".tar.gz"))
4198 (sha256
4199 (base32
4200 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4201 (build-system python-build-system)
4202 (home-page "https://launchpad.net/python-distutils-extra/")
4203 (synopsis "Enhancements to Python's distutils")
4204 (description
4205 "The python-distutils-extra module enables you to easily integrate
4206 gettext support, themed icons, and scrollkeeper-based documentation into
4207 Python's distutils.")
4208 (license license:gpl2)))
4209
4210 (define-public python2-distutils-extra
4211 (package-with-python2 python-distutils-extra))
4212
4213 (define-public python2-elib.intl
4214 (package
4215 (name "python2-elib.intl")
4216 (version "0.0.3")
4217 (source
4218 (origin
4219 ;; This project doesn't tag releases or publish tarballs, so we take
4220 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4221 (method git-fetch)
4222 (uri (git-reference
4223 (url "https://github.com/dieterv/elib.intl.git")
4224 (commit "d09997cfef")))
4225 (sha256
4226 (base32
4227 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4228 (build-system python-build-system)
4229 (arguments
4230 ;; incompatible with Python 3 (exception syntax)
4231 `(#:python ,python-2
4232 #:tests? #f))
4233 (home-page "https://github.com/dieterv/elib.intl")
4234 (synopsis "Enhanced internationalization for Python")
4235 (description
4236 "The elib.intl module provides enhanced internationalization (I18N)
4237 services for your Python modules and applications.")
4238 (license license:lgpl3+)))
4239
4240 (define-public python-pillow
4241 (package
4242 (name "python-pillow")
4243 (version "3.3.3")
4244 (source
4245 (origin
4246 (method url-fetch)
4247 (uri (pypi-uri "Pillow" version))
4248 (sha256
4249 (base32
4250 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4251 (build-system python-build-system)
4252 (native-inputs
4253 `(("python-nose" ,python-nose)))
4254 (inputs
4255 `(("freetype" ,freetype)
4256 ("lcms" ,lcms)
4257 ("zlib" ,zlib)
4258 ("libjpeg" ,libjpeg)
4259 ("openjpeg" ,openjpeg)
4260 ("libtiff" ,libtiff)
4261 ("libwebp" ,libwebp)))
4262 (arguments
4263 `(#:phases (modify-phases %standard-phases
4264 (add-after
4265 'install 'check-installed
4266 (lambda* (#:key outputs inputs #:allow-other-keys)
4267 (begin
4268 (setenv "HOME" (getcwd))
4269 ;; Make installed package available for running the
4270 ;; tests
4271 (add-installed-pythonpath inputs outputs)
4272 (and (zero? (system* "python" "selftest.py"
4273 "--installed"))
4274 (zero? (system* "python" "test-installed.py"))))))
4275 (delete 'check))))
4276 (home-page "https://pypi.python.org/pypi/Pillow")
4277 (synopsis "Fork of the Python Imaging Library")
4278 (description
4279 "The Python Imaging Library adds image processing capabilities to your
4280 Python interpreter. This library provides extensive file format support, an
4281 efficient internal representation, and fairly powerful image processing
4282 capabilities. The core image library is designed for fast access to data
4283 stored in a few basic pixel formats. It should provide a solid foundation for
4284 a general image processing tool.")
4285 (license (license:x11-style
4286 "http://www.pythonware.com/products/pil/license.htm"
4287 "The PIL Software License"))))
4288
4289 (define-public python2-pillow
4290 (package-with-python2 python-pillow))
4291
4292 (define-public python-pycparser
4293 (package
4294 (name "python-pycparser")
4295 (version "2.17")
4296 (source
4297 (origin
4298 (method url-fetch)
4299 (uri (pypi-uri "pycparser" version))
4300 (sha256
4301 (base32
4302 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4303 (outputs '("out" "doc"))
4304 (build-system python-build-system)
4305 (native-inputs
4306 `(("pkg-config" ,pkg-config)))
4307 (arguments
4308 `(#:phases
4309 (modify-phases %standard-phases
4310 (replace 'check
4311 (lambda _
4312 (with-directory-excursion "tests"
4313 (zero? (system* "python" "all_tests.py")))))
4314 (add-after 'install 'install-doc
4315 (lambda* (#:key outputs #:allow-other-keys)
4316 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4317 (doc (string-append data "/doc/" ,name "-" ,version))
4318 (examples (string-append doc "/examples")))
4319 (mkdir-p examples)
4320 (for-each (lambda (file)
4321 (copy-file (string-append "." file)
4322 (string-append doc file)))
4323 '("/README.rst" "/CHANGES" "/LICENSE"))
4324 (copy-recursively "examples" examples)))))))
4325 (home-page "https://github.com/eliben/pycparser")
4326 (synopsis "C parser in Python")
4327 (description
4328 "Pycparser is a complete parser of the C language, written in pure Python
4329 using the PLY parsing library. It parses C code into an AST and can serve as
4330 a front-end for C compilers or analysis tools.")
4331 (license license:bsd-3)))
4332
4333 (define-public python2-pycparser
4334 (package-with-python2 python-pycparser))
4335
4336 (define-public python-cffi
4337 (package
4338 (name "python-cffi")
4339 (version "1.4.2")
4340 (source
4341 (origin
4342 (method url-fetch)
4343 (uri (pypi-uri "cffi" version))
4344 (sha256
4345 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4346 (build-system python-build-system)
4347 (outputs '("out" "doc"))
4348 (inputs
4349 `(("libffi" ,libffi)))
4350 (propagated-inputs ; required at run-time
4351 `(("python-pycparser" ,python-pycparser)))
4352 (native-inputs
4353 `(("pkg-config" ,pkg-config)
4354 ("python-sphinx" ,python-sphinx)
4355 ("python-pytest" ,python-pytest)))
4356 (arguments
4357 `(#:phases
4358 (alist-cons-after
4359 'install 'install-doc
4360 (lambda* (#:key outputs #:allow-other-keys)
4361 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4362 (doc (string-append data "/doc/" ,name "-" ,version))
4363 (html (string-append doc "/html")))
4364 (with-directory-excursion "doc"
4365 (system* "make" "html")
4366 (mkdir-p html)
4367 (copy-recursively "build/html" html))
4368 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4369 %standard-phases)))
4370 (home-page "http://cffi.readthedocs.org")
4371 (synopsis "Foreign function interface for Python")
4372 (description
4373 "Foreign Function Interface for Python calling C code.")
4374 (license license:expat)))
4375
4376 (define-public python2-cffi
4377 (package-with-python2 python-cffi))
4378
4379 (define-public python-xcffib
4380 (package
4381 (name "python-xcffib")
4382 (version "0.1.9")
4383 (source
4384 (origin
4385 (method url-fetch)
4386 (uri (string-append "https://pypi.python.org/packages/source/x/"
4387 "xcffib/xcffib-" version ".tar.gz"))
4388 (sha256
4389 (base32
4390 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4391 (build-system python-build-system)
4392 (inputs
4393 `(("libxcb" ,libxcb)))
4394 (propagated-inputs
4395 `(("python-cffi" ,python-cffi) ; used at run time
4396 ("python-six" ,python-six)))
4397 (arguments
4398 `(#:phases
4399 (alist-cons-after
4400 'install 'install-doc
4401 (lambda* (#:key outputs #:allow-other-keys)
4402 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4403 "/doc/" ,name "-" ,version)))
4404 (mkdir-p doc)
4405 (copy-file "README.md"
4406 (string-append doc "/README.md"))))
4407 %standard-phases)))
4408 (home-page "https://github.com/tych0/xcffib")
4409 (synopsis "XCB Python bindings")
4410 (description
4411 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4412 support for Python 3 and PyPy. It is based on cffi.")
4413 (license license:expat)))
4414
4415 (define-public python2-xcffib
4416 (package-with-python2 python-xcffib))
4417
4418 (define-public python-cairocffi
4419 (package
4420 (name "python-cairocffi")
4421 (version "0.6")
4422 (source
4423 (origin
4424 (method url-fetch)
4425 ;; The archive on pypi is missing the 'utils' directory!
4426 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4427 version ".tar.gz"))
4428 (file-name (string-append name "-" version ".tar.gz"))
4429 (sha256
4430 (base32
4431 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4432 (build-system python-build-system)
4433 (outputs '("out" "doc"))
4434 (inputs
4435 `(("gdk-pixbuf" ,gdk-pixbuf)
4436 ("cairo" ,cairo)))
4437 (native-inputs
4438 `(("pkg-config" ,pkg-config)
4439 ("python-sphinx" ,python-sphinx)
4440 ("python-docutils" ,python-docutils)))
4441 (propagated-inputs
4442 `(("python-xcffib" ,python-xcffib))) ; used at run time
4443 (arguments
4444 `(#:phases
4445 (alist-cons-after
4446 'install 'install-doc
4447 (lambda* (#:key inputs outputs #:allow-other-keys)
4448 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4449 (doc (string-append data "/doc/" ,name "-" ,version))
4450 (html (string-append doc "/html")))
4451 (setenv "LD_LIBRARY_PATH"
4452 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4453 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4454 (setenv "LANG" "en_US.UTF-8")
4455 (mkdir-p html)
4456 (for-each (lambda (file)
4457 (copy-file (string-append "." file)
4458 (string-append doc file)))
4459 '("/README.rst" "/CHANGES" "/LICENSE"))
4460 (system* "python" "setup.py" "build_sphinx")
4461 (copy-recursively "docs/_build/html" html)))
4462 %standard-phases)))
4463 (home-page "https://github.com/SimonSapin/cairocffi")
4464 (synopsis "Python bindings and object-oriented API for Cairo")
4465 (description
4466 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4467 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4468 graphics library with support for multiple backends including image buffers,
4469 PNG, PostScript, PDF, and SVG file output.")
4470 (license license:bsd-3)))
4471
4472 (define-public python2-cairocffi
4473 (package-with-python2 python-cairocffi))
4474
4475 (define-public python-decorator
4476 (package
4477 (name "python-decorator")
4478 (version "4.0.10")
4479 (source
4480 (origin
4481 (method url-fetch)
4482 (uri (pypi-uri "decorator" version))
4483 (sha256
4484 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4485 (build-system python-build-system)
4486 (arguments '(#:tests? #f)) ; no test target
4487 (home-page "https://pypi.python.org/pypi/decorator/")
4488 (synopsis "Python module to simplify usage of decorators")
4489 (description
4490 "The aim of the decorator module is to simplify the usage of decorators
4491 for the average programmer, and to popularize decorators usage giving examples
4492 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4493 etc. The core of this module is a decorator factory.")
4494 (license license:expat)))
4495
4496 (define-public python2-decorator
4497 (package-with-python2 python-decorator))
4498
4499 (define-public python-drmaa
4500 (package
4501 (name "python-drmaa")
4502 (version "0.7.6")
4503 (source
4504 (origin
4505 (method url-fetch)
4506 (uri (string-append
4507 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4508 version ".tar.gz"))
4509 (sha256
4510 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4511 (build-system python-build-system)
4512 ;; The test suite requires libdrmaa which is provided by the cluster
4513 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4514 ;; should be set to the path of the libdrmaa library.
4515 (arguments '(#:tests? #f))
4516 (native-inputs
4517 `(("python-nose" ,python-nose)))
4518 (home-page "https://pypi.python.org/pypi/drmaa")
4519 (synopsis "Python bindings for the DRMAA library")
4520 (description
4521 "A Python package for Distributed Resource Management (DRM) job
4522 submission and control. This package is an implementation of the DRMAA 1.0
4523 Python language binding specification.")
4524 (license license:bsd-3)))
4525
4526 (define-public python2-drmaa
4527 (package-with-python2 python-drmaa))
4528
4529 (define-public python-gridmap
4530 (package
4531 (name "python-gridmap")
4532 (version "0.13.0")
4533 (source
4534 (origin
4535 (method url-fetch)
4536 (uri (string-append
4537 "https://github.com/pygridtools/gridmap/archive/v"
4538 version ".tar.gz"))
4539 (file-name (string-append name "-" version ".tar.gz"))
4540 (sha256
4541 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4542 (build-system python-build-system)
4543 (propagated-inputs
4544 `(("python-psutil" ,python-psutil)
4545 ("python-drmaa" ,python-drmaa)
4546 ("python-pyzmq" ,python-pyzmq)))
4547 (home-page "https://github.com/pygridtools/gridmap")
4548 (synopsis "Create jobs on a cluster directly from Python")
4549 (description
4550 "Gridmap is a Python package to allow you to easily create jobs on the
4551 cluster directly from Python. You can directly map Python functions onto the
4552 cluster without needing to write any wrapper code yourself.")
4553 (license license:gpl3+)))
4554
4555 (define-public python2-gridmap
4556 (package-with-python2 python-gridmap))
4557
4558 (define-public python-pexpect
4559 (package
4560 (name "python-pexpect")
4561 (version "3.3")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (string-append "https://pypi.python.org/packages/source/p/"
4566 "pexpect/pexpect-" version ".tar.gz"))
4567 (sha256
4568 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4569 (build-system python-build-system)
4570 (arguments
4571 `(#:phases
4572 (modify-phases %standard-phases
4573 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4574 (native-inputs
4575 `(("python-nose" ,python-nose)))
4576 (home-page "http://pexpect.readthedocs.org/")
4577 (synopsis "Controlling interactive console applications")
4578 (description
4579 "Pexpect is a pure Python module for spawning child applications;
4580 controlling them; and responding to expected patterns in their output.
4581 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4582 child application and control it as if a human were typing commands.")
4583 (license license:isc)))
4584
4585 (define-public python2-pexpect
4586 (package-with-python2 python-pexpect))
4587
4588 (define-public python-setuptools-scm
4589 (package
4590 (name "python-setuptools-scm")
4591 (version "1.11.1")
4592 (source (origin
4593 (method url-fetch)
4594 (uri (pypi-uri "setuptools_scm" version))
4595 (sha256
4596 (base32
4597 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4598 (build-system python-build-system)
4599 (home-page "https://github.com/pypa/setuptools_scm/")
4600 (synopsis "Manage Python package versions in SCM metadata")
4601 (description
4602 "Setuptools_scm handles managing your Python package versions in
4603 @dfn{software configuration management} (SCM) metadata instead of declaring
4604 them as the version argument or in a SCM managed file.")
4605 (license license:expat)))
4606
4607 (define-public python2-setuptools-scm
4608 (package-with-python2 python-setuptools-scm))
4609
4610 (define-public python-pathpy
4611 (package
4612 (name "python-pathpy")
4613 (version "8.1.1")
4614 (source
4615 (origin
4616 (method url-fetch)
4617 (uri (string-append "https://pypi.python.org/packages/source/p/"
4618 "path.py/path.py-" version ".tar.gz"))
4619 (sha256
4620 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4621 (outputs '("out" "doc"))
4622 (build-system python-build-system)
4623 (propagated-inputs
4624 `(("python-appdirs" ,python-appdirs)))
4625 (native-inputs
4626 `(("python-setuptools-scm" ,python-setuptools-scm)
4627 ("python-sphinx" ,python-sphinx)
4628 ("python-rst.linker" ,python-rst.linker)
4629 ("python-pytest" ,python-pytest)
4630 ("python-pytest-runner" ,python-pytest-runner)))
4631 (arguments
4632 `(#:phases
4633 (modify-phases %standard-phases
4634 (add-after 'build 'build-doc
4635 (lambda _
4636 (setenv "LANG" "en_US.UTF-8")
4637 (zero? (system* "python" "setup.py" "build_sphinx"))))
4638 (add-after 'install 'install-doc
4639 (lambda* (#:key outputs #:allow-other-keys)
4640 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4641 (doc (string-append data "/doc/" ,name "-" ,version))
4642 (html (string-append doc "/html")))
4643 (mkdir-p html)
4644 (for-each (lambda (file)
4645 (copy-file file (string-append doc "/" file)))
4646 '("README.rst" "CHANGES.rst"))
4647 (copy-recursively "build/sphinx/html" html)))))))
4648 (home-page "http://github.com/jaraco/path.py")
4649 (synopsis "Python module wrapper for built-in os.path")
4650 (description
4651 "@code{path.py} implements path objects as first-class entities, allowing
4652 common operations on files to be invoked on those path objects directly.")
4653 (license license:expat)))
4654
4655 (define-public python2-pathpy
4656 (package-with-python2 python-pathpy))
4657
4658 (define-public python-pickleshare
4659 (package
4660 (name "python-pickleshare")
4661 (version "0.5")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (string-append "https://pypi.python.org/packages/source/p/"
4666 "pickleshare/pickleshare-" version ".tar.gz"))
4667 (sha256
4668 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4669 (build-system python-build-system)
4670 (propagated-inputs
4671 `(("python-pathpy" ,python-pathpy)))
4672 (home-page "https://github.com/vivainio/pickleshare")
4673 (synopsis "Tiny key value database with concurrency support")
4674 (description
4675 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4676 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4677 shelve, many processes can access the database simultaneously. Changing a
4678 value in database is immediately visible to other processes accessing the same
4679 database. Concurrency is possible because the values are stored in separate
4680 files. Hence the “database” is a directory where all files are governed by
4681 PickleShare.")
4682 (license license:expat)))
4683
4684 (define-public python2-pickleshare
4685 (package-with-python2 python-pickleshare))
4686
4687 (define-public python-simplegeneric
4688 (package
4689 (name "python-simplegeneric")
4690 (version "0.8.1")
4691 (source
4692 (origin
4693 (method url-fetch)
4694 (uri (string-append "https://pypi.python.org/packages/source/s/"
4695 "simplegeneric/simplegeneric-" version ".zip"))
4696 (sha256
4697 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4698 (build-system python-build-system)
4699 (native-inputs
4700 `(("unzip" ,unzip)))
4701 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4702 (synopsis "Python module for simple generic functions")
4703 (description
4704 "The simplegeneric module lets you define simple single-dispatch generic
4705 functions, akin to Python’s built-in generic functions like @code{len()},
4706 @code{iter()} and so on. However, instead of using specially-named methods,
4707 these generic functions use simple lookup tables, akin to those used by
4708 e.g. @code{pickle.dump()} and other generic functions found in the Python
4709 standard library.")
4710 (license license:zpl2.1)))
4711
4712 (define-public python2-simplegeneric
4713 (package-with-python2 python-simplegeneric))
4714
4715 (define-public python-ipython-genutils
4716 ;; TODO: This package is retired, check if can be removed, see description.
4717 (package
4718 (name "python-ipython-genutils")
4719 (version "0.1.0")
4720 (source
4721 (origin
4722 (method url-fetch)
4723 (uri (string-append "https://pypi.python.org/packages/source/i/"
4724 "ipython_genutils/ipython_genutils-"
4725 version ".tar.gz"))
4726 (sha256
4727 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4728 (build-system python-build-system)
4729 (arguments `(#:tests? #f)) ; no tests
4730 (home-page "http://ipython.org")
4731 (synopsis "Vestigial utilities from IPython")
4732 (description
4733 "This package provides retired utilities from IPython. No packages
4734 outside IPython/Jupyter should depend on it.
4735
4736 This package shouldn't exist. It contains some common utilities shared by
4737 Jupyter and IPython projects during The Big Split. As soon as possible, those
4738 packages will remove their dependency on this, and this package will go
4739 away.")
4740 (license license:bsd-3)))
4741
4742 (define-public python2-ipython-genutils
4743 (package-with-python2 python-ipython-genutils))
4744
4745 (define-public python-traitlets
4746 (package
4747 (name "python-traitlets")
4748 (version "4.2.0")
4749 (source
4750 (origin
4751 (method url-fetch)
4752 (uri (pypi-uri "traitlets" version))
4753 (sha256
4754 (base32
4755 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4756 (build-system python-build-system)
4757 (arguments
4758 `(#:phases
4759 (modify-phases %standard-phases
4760 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4761 (propagated-inputs
4762 `(("python-ipython-genutils" ,python-ipython-genutils)
4763 ("python-decorator" ,python-decorator)))
4764 (native-inputs
4765 `(("python-mock" ,python-mock)
4766 ("python-nose" ,python-nose)))
4767 (home-page "http://ipython.org")
4768 (synopsis "Configuration system for Python applications")
4769 (description
4770 "Traitlets is a framework that lets Python classes have attributes with
4771 type checking, dynamically calculated default values, and ‘on change’
4772 callbacks. The package also includes a mechanism to use traitlets for
4773 configuration, loading values from files or from command line arguments. This
4774 is a distinct layer on top of traitlets, so you can use traitlets in your code
4775 without using the configuration machinery.")
4776 (license license:bsd-3)))
4777
4778 (define-public python2-traitlets
4779 (package-with-python2 python-traitlets))
4780
4781 (define-public python-jupyter-core
4782 (package
4783 (name "python-jupyter-core")
4784 (version "4.2.1")
4785 (source
4786 (origin
4787 (method url-fetch)
4788 (uri (string-append (pypi-uri "jupyter_core" version)))
4789 (sha256
4790 (base32
4791 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4792 (build-system python-build-system)
4793 ;; FIXME: not sure how to run the tests
4794 (arguments `(#:tests? #f))
4795 (propagated-inputs
4796 `(("python-traitlets" ,python-traitlets)))
4797 (home-page "http://jupyter.org/")
4798 (synopsis "Jupyter base package")
4799 (description
4800 "Jupyter core is the base package on which Jupyter projects rely.")
4801 (license license:bsd-3)))
4802
4803 (define-public python2-jupyter-core
4804 (package-with-python2 python-jupyter-core))
4805
4806 (define-public python-jupyter-client
4807 (package
4808 (name "python-jupyter-client")
4809 (version "4.4.0")
4810 (source
4811 (origin
4812 (method url-fetch)
4813 (uri (pypi-uri "jupyter_client" version))
4814 (sha256
4815 (base32
4816 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4817 (build-system python-build-system)
4818 ;; Tests fail because of missing native python kernel which I assume is
4819 ;; provided by the ipython package, which we cannot use because it would
4820 ;; cause a dependency cycle.
4821 (arguments `(#:tests? #f))
4822 (propagated-inputs
4823 `(("python-pyzmq" ,python-pyzmq)
4824 ("python-traitlets" ,python-traitlets)
4825 ("python-jupyter-core" ,python-jupyter-core)))
4826 (home-page "http://jupyter.org/")
4827 (synopsis "Jupyter protocol implementation and client libraries")
4828 (description
4829 "The @code{jupyter_client} package contains the reference implementation
4830 of the Jupyter protocol. It also provides client and kernel management APIs
4831 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4832 installing @code{kernelspec}s for use with Jupyter frontends.")
4833 (license license:bsd-3)))
4834
4835 (define-public python2-jupyter-client
4836 (package-with-python2 python-jupyter-client))
4837
4838 (define-public python-ipykernel
4839 (package
4840 (name "python-ipykernel")
4841 (version "4.5.2")
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (pypi-uri "ipykernel" version))
4846 (sha256
4847 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4848 (build-system python-build-system)
4849 ;; The tests load a submodule of IPython. However, IPython itself depends
4850 ;; on ipykernel.
4851 (arguments `(#:tests? #f))
4852 (propagated-inputs
4853 ;; imported at runtime during connect
4854 `(("python-jupyter-client" ,python-jupyter-client)))
4855 (home-page "http://ipython.org")
4856 (synopsis "IPython Kernel for Jupyter")
4857 (description
4858 "This package provides the IPython kernel for Jupyter.")
4859 (license license:bsd-3)))
4860
4861 (define-public python2-ipykernel
4862 (package-with-python2 python-ipykernel))
4863
4864 (define-public python-testpath
4865 (package
4866 (name "python-testpath")
4867 (version "0.2")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4872 version ".tar.gz"))
4873 (file-name (string-append name "-" version ".tar.gz"))
4874 (sha256
4875 (base32
4876 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4877 (build-system python-build-system)
4878 (arguments
4879 `(#:tests? #f ; this package does not even have a setup.py
4880 #:phases
4881 (modify-phases %standard-phases
4882 (delete 'install)
4883 (replace 'build
4884 (lambda* (#:key inputs outputs #:allow-other-keys)
4885 (let ((dir (string-append
4886 (assoc-ref outputs "out")
4887 "/lib/python"
4888 (string-take (string-take-right
4889 (assoc-ref inputs "python") 5) 3)
4890 "/site-packages/testpath")))
4891 (mkdir-p dir)
4892 (copy-recursively "testpath" dir))
4893 #t)))))
4894 (home-page "https://github.com/takluyver/testpath")
4895 (synopsis "Test utilities for code working with files and commands")
4896 (description
4897 "Testpath is a collection of utilities for Python code working with files
4898 and commands. It contains functions to check things on the filesystem, and
4899 tools for mocking system commands and recording calls to those.")
4900 (license license:expat)))
4901
4902 (define-public python2-testpath
4903 (package-with-python2 python-testpath))
4904
4905 (define-public python-ipython
4906 (package
4907 (name "python-ipython")
4908 (version "4.0.3")
4909 (source
4910 (origin
4911 (method url-fetch)
4912 (uri (pypi-uri "ipython" version ".tar.gz"))
4913 (sha256
4914 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
4915 (build-system python-build-system)
4916 (outputs '("out" "doc"))
4917 (propagated-inputs
4918 `(("python-pyzmq" ,python-pyzmq)
4919 ("python-terminado" ,python-terminado)
4920 ("python-matplotlib" ,python-matplotlib)
4921 ("python-numpy" ,python-numpy)
4922 ("python-numpydoc" ,python-numpydoc)
4923 ("python-jinja2" ,python-jinja2)
4924 ("python-mistune" ,python-mistune)
4925 ("python-pexpect" ,python-pexpect)
4926 ("python-pickleshare" ,python-pickleshare)
4927 ("python-simplegeneric" ,python-simplegeneric)
4928 ("python-jsonschema" ,python-jsonschema)
4929 ("python-traitlets" ,python-traitlets)
4930 ("python-ipykernel" ,python-ipykernel)
4931 ("python-pygments" ,python-pygments)))
4932 (inputs
4933 `(("readline" ,readline)
4934 ("which" ,which)))
4935 (native-inputs
4936 `(("pkg-config" ,pkg-config)
4937 ("python-requests" ,python-requests) ;; for tests
4938 ("python-testpath" ,python-testpath)
4939 ("python-nose" ,python-nose)
4940 ("python-sphinx" ,python-sphinx)
4941 ("texlive" ,texlive)
4942 ("texinfo" ,texinfo)))
4943 (arguments
4944 `(#:phases
4945 (modify-phases %standard-phases
4946 (add-after
4947 'install 'install-doc
4948 (lambda* (#:key inputs outputs #:allow-other-keys)
4949 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4950 (doc (string-append data "/doc/" ,name "-" ,version))
4951 (html (string-append doc "/html"))
4952 (man1 (string-append data "/man/man1"))
4953 (info (string-append data "/info"))
4954 (examples (string-append doc "/examples")))
4955 (setenv "LANG" "en_US.utf8")
4956 ;; Make installed package available for running the tests
4957 (add-installed-pythonpath inputs outputs)
4958 (with-directory-excursion "docs"
4959 ;; FIXME: pdf fails to build
4960 ;;(system* "make" "pdf" "PAPER=a4")
4961 (system* "make" "html")
4962 (system* "make" "info"))
4963 (copy-recursively "docs/man" man1)
4964 (copy-recursively "examples" examples)
4965 (copy-recursively "docs/build/html" html)
4966 ;; (copy-file "docs/build/latex/ipython.pdf"
4967 ;; (string-append doc "/ipython.pdf"))
4968 (mkdir-p info)
4969 (copy-file "docs/build/texinfo/ipython.info"
4970 (string-append info "/ipython.info"))
4971 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4972 ;; Tests can only be run after the library has been installed and not
4973 ;; within the source directory.
4974 (delete 'check)
4975 (add-after
4976 'install 'check
4977 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4978 (if tests?
4979 (with-directory-excursion "/tmp"
4980 ;; Make installed package available for running the tests
4981 (add-installed-pythonpath inputs outputs)
4982 (setenv "HOME" "/tmp/") ;; required by a test
4983 (zero? (system* (string-append (assoc-ref outputs "out")
4984 "/bin/iptest"))))
4985 #t)))
4986 (add-before
4987 'install 'fix-tests
4988 (lambda* (#:key inputs #:allow-other-keys)
4989 (substitute* "./IPython/utils/_process_posix.py"
4990 (("/usr/bin/env', 'which") (which "which")))
4991 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4992 (("#!/usr/bin/env python")
4993 (string-append "#!" (which "python"))))
4994 ;; Disable 1 failing test
4995 (substitute* "./IPython/core/tests/test_magic.py"
4996 (("def test_dirops\\(\\):" all)
4997 (string-append "@dec.skipif(True)\n" all))))))))
4998 (home-page "http://ipython.org")
4999 (synopsis "IPython is a tool for interactive computing in Python")
5000 (description
5001 "IPython provides a rich architecture for interactive computing with:
5002 Powerful interactive shells, a browser-based notebook, support for interactive
5003 data visualization, embeddable interpreters and tools for parallel
5004 computing.")
5005 (license license:bsd-3)
5006 (properties `((python2-variant . ,(delay python2-ipython))))))
5007
5008 (define-public python2-ipython
5009 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5010 (package
5011 (inherit ipython)
5012 ;; FIXME: some tests are failing
5013 (arguments
5014 `(#:tests? #f ,@(package-arguments ipython)))
5015 ;; FIXME: add pyreadline once available.
5016 (native-inputs
5017 `(("python2-mock" ,python2-mock)
5018 ,@(package-native-inputs ipython))))))
5019
5020 (define-public python-isodate
5021 (package
5022 (name "python-isodate")
5023 (version "0.5.4")
5024 (source
5025 (origin
5026 (method url-fetch)
5027 (uri (pypi-uri "isodate" version))
5028 (sha256
5029 (base32
5030 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5031 (build-system python-build-system)
5032 (home-page
5033 "http://cheeseshop.python.org/pypi/isodate")
5034 (synopsis
5035 "Python date parser and formatter")
5036 (description
5037 "Python-isodate is a python module for parsing and formatting
5038 ISO 8601 dates, time and duration.")
5039 (license license:bsd-3)))
5040
5041 (define-public python2-isodate
5042 (package-with-python2 python-isodate))
5043
5044 (define-public python-html5lib
5045 (package
5046 (name "python-html5lib")
5047 (version "1.0b10")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "html5lib" version))
5052 (sha256
5053 (base32
5054 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5055 (build-system python-build-system)
5056 (propagated-inputs
5057 `(("python-six" ,python-six)
5058 ("python-webencodings" ,python-webencodings)))
5059 (arguments
5060 `(#:test-target "check"))
5061 (home-page
5062 "https://github.com/html5lib/html5lib-python")
5063 (synopsis
5064 "Python HTML parser based on the WHATWG HTML specifcation")
5065 (description
5066 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5067 and written in Python.")
5068 (license license:expat)))
5069
5070 (define-public python2-html5lib
5071 (package-with-python2 python-html5lib))
5072
5073 ;; Needed for python-bleach, a dependency of python-notebook
5074 (define-public python-html5lib-0.9
5075 (package
5076 (inherit python-html5lib)
5077 (version "0.999")
5078 (source
5079 (origin
5080 (method url-fetch)
5081 (uri (pypi-uri "html5lib" version))
5082 (sha256
5083 (base32
5084 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5085
5086 (define-public python2-html5lib-0.9
5087 (package-with-python2 python-html5lib-0.9))
5088
5089 (define-public python-webencodings
5090 (package
5091 (name "python-webencodings")
5092 (version "0.5")
5093 (source (origin
5094 (method url-fetch)
5095 (uri (pypi-uri "webencodings" version))
5096 (sha256
5097 (base32
5098 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5099 (build-system python-build-system)
5100 (arguments
5101 '(#:phases
5102 (modify-phases %standard-phases
5103 (replace 'check
5104 (lambda _
5105 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5106 (native-inputs
5107 `(("python-pytest" ,python-pytest)))
5108 (home-page "https://github.com/SimonSapin/python-webencodings")
5109 (synopsis "Character encoding aliases for legacy web content")
5110 (description
5111 "In order to be compatible with legacy web content when interpreting
5112 something like @code{Content-Type: text/html; charset=latin1}, tools need
5113 to use a particular set of aliases for encoding labels as well as some
5114 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5115 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5116 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5117 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5118 defines all such details so that implementations do not have to
5119 reverse-engineer each other.
5120
5121 This module implements the Encoding standard and has encoding labels and
5122 BOM detection, but the actual implementation for encoders and decoders
5123 is Python’s.")
5124 (license license:bsd-3)))
5125
5126 (define-public python2-webencodings
5127 (package-with-python2 python-webencodings))
5128
5129 (define-public python-urwid
5130 (package
5131 (name "python-urwid")
5132 (version "1.3.1")
5133 (source
5134 (origin
5135 (method url-fetch)
5136 (uri (pypi-uri "urwid" version))
5137 (sha256
5138 (base32
5139 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5140 (build-system python-build-system)
5141 (arguments
5142 `(#:phases
5143 (modify-phases %standard-phases
5144 ;; Disable failing test. Bug filed upstream:
5145 ;; https://github.com/wardi/urwid/issues/164
5146 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5147 (add-after 'unpack 'disable-failing-test
5148 (lambda _
5149 (substitute* "urwid/tests/test_event_loops.py"
5150 (("test_remove_watch_file")
5151 "disable_remove_watch_file")))))))
5152 (home-page "http://urwid.org")
5153 (synopsis "Console user interface library for Python")
5154 (description
5155 "Urwid is a curses-based UI/widget library for Python. It includes many
5156 features useful for text console applications.")
5157 (license license:lgpl2.1+)))
5158
5159 (define-public python2-urwid
5160 (package-with-python2 python-urwid))
5161
5162 (define-public python2-openid
5163 (package
5164 (name "python2-openid")
5165 (version "2.2.5")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (pypi-uri "python-openid" version))
5170 (sha256
5171 (base32
5172 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5173 (build-system python-build-system)
5174 (arguments
5175 ;; Python 3 support is in `python3-openid`, a separate package.
5176 `(#:python ,python-2))
5177 (home-page "https://github.com/openid/python-openid")
5178 (synopsis "OpenID support for servers and consumers")
5179 (description "This library provides OpenID authentication for Python, both
5180 for clients and servers.")
5181 (license license:asl2.0)))
5182
5183 (define-public python-urwidtrees
5184 (package
5185 (name "python-urwidtrees")
5186 (version "1.0.2")
5187 (source
5188 (origin
5189 (method url-fetch)
5190 ;; package author intends on distributing via github rather than pypi:
5191 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5192 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5193 version ".tar.gz"))
5194 (file-name (string-append name "-" version ".tar.gz"))
5195 (sha256
5196 (base32
5197 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5198 (build-system python-build-system)
5199 (arguments
5200 '(#:tests? #f)) ; no tests
5201 (propagated-inputs `(("python-urwid" ,python-urwid)))
5202 (home-page "https://github.com/pazz/urwidtrees")
5203 (synopsis "Tree widgets for urwid")
5204 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5205 toolkit. Use it to build trees of widgets.")
5206 (license license:gpl3+)))
5207
5208 (define-public python2-urwidtrees
5209 (package-with-python2 python-urwidtrees))
5210
5211 (define-public python-dbus
5212 (package
5213 (name "python-dbus")
5214 (version "1.2.0")
5215 (source
5216 (origin
5217 (method url-fetch)
5218 (uri (string-append
5219 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5220 version ".tar.gz"))
5221 (sha256
5222 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5223 (build-system gnu-build-system)
5224 (arguments
5225 '(#:phases
5226 (modify-phases %standard-phases
5227 (add-before
5228 'check 'pre-check
5229 (lambda _
5230 ;; XXX: For the missing '/etc/machine-id'.
5231 (substitute* "test/run-test.sh"
5232 (("DBUS_FATAL_WARNINGS=1")
5233 "DBUS_FATAL_WARNINGS=0"))
5234 #t)))))
5235 (native-inputs
5236 `(("pkg-config" ,pkg-config)))
5237 (inputs
5238 `(("python" ,python)
5239 ("dbus-glib" ,dbus-glib)))
5240 (synopsis "Python bindings for D-bus")
5241 (description "python-dbus provides bindings for libdbus, the reference
5242 implementation of D-Bus.")
5243 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5244 (license license:expat)))
5245
5246 (define-public python2-dbus
5247 (package (inherit python-dbus)
5248 (name "python2-dbus")
5249 (inputs `(("python" ,python-2)
5250 ,@(alist-delete "python"
5251 (package-inputs python-dbus)
5252 equal?)))
5253 ;; FIXME: on Python 2, the test_utf8 fails with:
5254 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5255 (arguments `(#:tests? #f))))
5256
5257 (define-public python-apsw
5258 (package
5259 (name "python-apsw")
5260 (version "3.9.2-r1")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (pypi-uri "apsw" version))
5265 (sha256
5266 (base32
5267 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5268 (build-system python-build-system)
5269 (inputs
5270 `(("sqlite" ,sqlite)))
5271 (arguments
5272 `(#:phases
5273 ;; swap check and install phases
5274 (alist-cons-after
5275 'install 'check
5276 (assoc-ref %standard-phases 'check)
5277 (alist-delete
5278 'check
5279 %standard-phases))))
5280 (home-page "https://github.com/rogerbinns/apsw/")
5281 (synopsis "Another Python SQLite Wrapper")
5282 (description "APSW is a Python wrapper for the SQLite
5283 embedded relational database engine. In contrast to other wrappers such as
5284 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5285 translate the complete SQLite API into Python.")
5286 (license license:zlib)))
5287
5288 (define-public python2-apsw
5289 (package-with-python2 python-apsw))
5290
5291 (define-public python-lxml
5292 (package
5293 (name "python-lxml")
5294 (version "3.6.0")
5295 (source
5296 (origin
5297 (method url-fetch)
5298 (uri (pypi-uri "lxml" version))
5299 (sha256
5300 (base32
5301 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5302 (build-system python-build-system)
5303 (inputs
5304 `(("libxml2" ,libxml2)
5305 ("libxslt" ,libxslt)))
5306 (home-page "http://lxml.de/")
5307 (synopsis
5308 "Python XML processing library")
5309 (description
5310 "The lxml XML toolkit is a Pythonic binding for the C libraries
5311 libxml2 and libxslt.")
5312 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5313
5314 (define-public python2-lxml
5315 (package-with-python2 python-lxml))
5316
5317 ;; beautifulsoup4 has a totally different namespace than 3.x,
5318 ;; and pypi seems to put it under its own name, so I guess we should too
5319 (define-public python-beautifulsoup4
5320 (package
5321 (name "python-beautifulsoup4")
5322 (version "4.5.1")
5323 (source
5324 (origin
5325 (method url-fetch)
5326 (uri (pypi-uri "beautifulsoup4" version))
5327 (sha256
5328 (base32
5329 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5330 (build-system python-build-system)
5331 (arguments
5332 `(#:phases
5333 (modify-phases %standard-phases
5334 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5335 ;; must use this conversion script when building with Python 3. The
5336 ;; conversion script also runs the tests.
5337 ;; For more information, see the file 'convert-py3k' in the source
5338 ;; distribution.
5339 (replace 'check
5340 (lambda _ (zero? (system* "./convert-py3k")))))))
5341 (home-page
5342 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5343 (synopsis
5344 "Python screen-scraping library")
5345 (description
5346 "Beautiful Soup is a Python library designed for rapidly setting up
5347 screen-scraping projects. It offers Pythonic idioms for navigating,
5348 searching, and modifying a parse tree, providing a toolkit for
5349 dissecting a document and extracting what you need. It automatically
5350 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5351 (license license:expat)))
5352
5353 (define-public python2-beautifulsoup4
5354 (package
5355 (inherit (package-with-python2
5356 (strip-python2-variant python-beautifulsoup4)))
5357 (arguments `(#:python ,python-2))))
5358
5359 (define-public python2-cssutils
5360 (package
5361 (name "python2-cssutils")
5362 (version "1.0.1")
5363 (source
5364 (origin
5365 (method url-fetch)
5366 (uri (pypi-uri "cssutils" version))
5367 (sha256
5368 (base32
5369 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5370 (build-system python-build-system)
5371 (native-inputs
5372 `(("python2-mock" ,python2-mock) ; for the tests
5373 ("unzip" ,unzip))) ; for unpacking the source
5374 (arguments
5375 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5376 #:tests? #f ; The tests apparently download an external URL.
5377 ))
5378 (home-page "http://cthedot.de/cssutils/")
5379 (synopsis
5380 "CSS Cascading Style Sheets library for Python")
5381 (description
5382 "Cssutils is a Python package for parsing and building CSS
5383 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5384 options.")
5385 (license license:lgpl3+)))
5386
5387 (define-public python-cssselect
5388 (package
5389 (name "python-cssselect")
5390 (version "0.9.2")
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (pypi-uri "cssselect" version))
5395 (sha256
5396 (base32
5397 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5398 (build-system python-build-system)
5399 (arguments
5400 ;; tests fail with message
5401 ;; AttributeError: 'module' object has no attribute 'tests'
5402 `(#:tests? #f))
5403 (home-page
5404 "https://pythonhosted.org/cssselect/")
5405 (synopsis
5406 "CSS3 selector parser and translator to XPath 1.0")
5407 (description
5408 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5409 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5410 another XPath engine to find the matching elements in an XML or HTML document.")
5411 (license license:bsd-3)))
5412
5413 (define-public python2-cssselect
5414 (package-with-python2 python-cssselect))
5415
5416 (define-public python-openid-cla
5417 (package
5418 (name "python-openid-cla")
5419 (version "1.2")
5420 (source
5421 (origin
5422 (method url-fetch)
5423 (uri (pypi-uri "python-openid-cla" version))
5424 (sha256
5425 (base32
5426 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5427 (build-system python-build-system)
5428 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5429 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5430 (description "@code{openid-cla} is an implementation of the OpenID
5431 contributor license agreement extension for python-openid.")
5432 (license license:bsd-3)))
5433
5434 (define-public python2-openid-cla
5435 (package-with-python2 python-openid-cla))
5436
5437 (define-public python-openid-teams
5438 (package
5439 (name "python-openid-teams")
5440 (version "1.1")
5441 (source
5442 (origin
5443 (method url-fetch)
5444 (uri (pypi-uri "python-openid-teams" version))
5445 (sha256
5446 (base32
5447 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5448 (build-system python-build-system)
5449 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5450 (synopsis "Implementation of the OpenID teams extension for python-openid")
5451 (description
5452 "@code{openid-teams} is an implementation of the OpenID
5453 teams extension for python-openid.")
5454 (license license:bsd-3)))
5455
5456 (define-public python2-openid-teams
5457 (package-with-python2 python-openid-teams))
5458
5459 (define-public python-netifaces
5460 (package
5461 (name "python-netifaces")
5462 (version "0.10.4")
5463 (source
5464 (origin
5465 (method url-fetch)
5466 (uri (string-append
5467 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5468 version
5469 ".tar.gz"))
5470 (sha256
5471 (base32
5472 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5473 (build-system python-build-system)
5474 (home-page
5475 "https://bitbucket.org/al45tair/netifaces")
5476 (synopsis
5477 "Python module for portable network interface information")
5478 (description
5479 "Netifaces is a Python module providing information on network
5480 interfaces in an easy and portable manner.")
5481 (license license:expat)))
5482
5483 (define-public python2-netifaces
5484 (package-with-python2 python-netifaces))
5485
5486 (define-public python-networkx
5487 (package
5488 (name "python-networkx")
5489 (version "1.11")
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (pypi-uri "networkx" version))
5494 (sha256
5495 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5496 (build-system python-build-system)
5497 ;; python-decorator is needed at runtime
5498 (propagated-inputs
5499 `(("python-decorator" ,python-decorator)))
5500 (native-inputs
5501 `(("python-nose" ,python-nose)))
5502 (home-page "http://networkx.github.io/")
5503 (synopsis "Python module for creating and manipulating graphs and networks")
5504 (description
5505 "NetworkX is a Python package for the creation, manipulation, and study
5506 of the structure, dynamics, and functions of complex networks.")
5507 (license license:bsd-3)))
5508
5509 (define-public python2-networkx
5510 (package-with-python2 python-networkx))
5511
5512 (define-public snakemake
5513 (package
5514 (name "snakemake")
5515 (version "3.2.1")
5516 (source
5517 (origin
5518 (method url-fetch)
5519 (uri (string-append
5520 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5521 version ".tar.gz"))
5522 (sha256
5523 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5524 (build-system python-build-system)
5525 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5526 (synopsis "Python-based execution environment for make-like workflows")
5527 (description
5528 "Snakemake aims to reduce the complexity of creating workflows by
5529 providing a clean and modern domain specific specification language (DSL) in
5530 Python style, together with a fast and comfortable execution environment.")
5531 (license license:expat)))
5532
5533 (define-public python-seaborn
5534 (package
5535 (name "python-seaborn")
5536 (version "0.7.1")
5537 (source
5538 (origin
5539 (method url-fetch)
5540 (uri (pypi-uri "seaborn" version))
5541 (sha256
5542 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5543 (build-system python-build-system)
5544 (propagated-inputs
5545 `(("python-pandas" ,python-pandas)
5546 ("python-matplotlib" ,python-matplotlib)
5547 ("python-scipy" ,python-scipy)))
5548 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5549 (synopsis "Statistical data visualization")
5550 (description
5551 "Seaborn is a library for making attractive and informative statistical
5552 graphics in Python. It is built on top of matplotlib and tightly integrated
5553 with the PyData stack, including support for numpy and pandas data structures
5554 and statistical routines from scipy and statsmodels.")
5555 (license license:bsd-3)
5556 (properties `((python2-variant . ,(delay python2-seaborn))))))
5557
5558 (define-public python2-seaborn
5559 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5560 (package
5561 (inherit base)
5562 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5563 ,@(package-propagated-inputs base))))))
5564
5565 (define-public python-sympy
5566 (package
5567 (name "python-sympy")
5568 (version "0.7.6")
5569 (source
5570 (origin
5571 (method url-fetch)
5572 (uri (string-append
5573 "https://github.com/sympy/sympy/releases/download/sympy-"
5574 version "/sympy-" version ".tar.gz"))
5575 (sha256
5576 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5577 (build-system python-build-system)
5578 (home-page "http://www.sympy.org/")
5579 (synopsis "Python library for symbolic mathematics")
5580 (description
5581 "SymPy is a Python library for symbolic mathematics. It aims to become a
5582 full-featured computer algebra system (CAS) while keeping the code as simple
5583 as possible in order to be comprehensible and easily extensible.")
5584 (license license:bsd-3)))
5585
5586 (define-public python2-sympy
5587 (package-with-python2 python-sympy))
5588
5589 (define-public python-q
5590 (package
5591 (name "python-q")
5592 (version "2.6")
5593 (source
5594 (origin
5595 (method url-fetch)
5596 (uri (pypi-uri "q" version))
5597 (sha256
5598 (base32
5599 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5600 (build-system python-build-system)
5601 (home-page "https://github.com/zestyping/q")
5602 (synopsis "Quick-and-dirty debugging output for tired programmers")
5603 (description
5604 "q is a Python module for \"print\" style of debugging Python code. It
5605 provides convenient short API for print out of values, tracebacks, and
5606 falling into the Python interpreter.")
5607 (license license:asl2.0)))
5608
5609 (define-public python2-q
5610 (package-with-python2 python-q))
5611
5612 (define-public python-testlib
5613 (package
5614 (name "python-testlib")
5615 (version "0.6.5")
5616 (source
5617 (origin
5618 (method url-fetch)
5619 (uri (string-append
5620 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5621 version ".zip"))
5622 (sha256
5623 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5624 (build-system python-build-system)
5625 (native-inputs
5626 `(("unzip" ,unzip))) ; for unpacking the source
5627 (synopsis "Python micro test suite harness")
5628 (description "A micro unittest suite harness for Python.")
5629 (home-page "https://github.com/trentm/testlib")
5630 (license license:expat)))
5631
5632 (define-public python2-testlib
5633 (package-with-python2 python-testlib))
5634
5635 (define-public python2-xlib
5636 (package
5637 (name "python2-xlib")
5638 (version "0.14")
5639 (source (origin
5640 (method url-fetch)
5641 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5642 "/" version "/"
5643 "python-xlib-" version ".tar.gz"))
5644 (sha256
5645 (base32
5646 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5647 (build-system python-build-system)
5648 (arguments
5649 `(#:python ,python-2 ;Python 2 only
5650 #:tests? #f)) ;no tests
5651 (home-page "http://python-xlib.sourceforge.net/")
5652 (synopsis "Python X11 client library")
5653 (description
5654 "The Python X Library is intended to be a fully functional X client
5655 library for Python programs. It is useful to implement low-level X clients.
5656 It is written entirely in Python.")
5657 (license license:gpl2+)))
5658
5659 (define-public python-singledispatch
5660 (package
5661 (name "python-singledispatch")
5662 (version "3.4.0.3")
5663 (source
5664 (origin
5665 (method url-fetch)
5666 (uri (pypi-uri "singledispatch" version))
5667 (sha256
5668 (base32
5669 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5670 (build-system python-build-system)
5671 (native-inputs
5672 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5673 (home-page
5674 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5675 (synopsis "Backport of singledispatch feature from Python 3.4")
5676 (description
5677 "This library brings functools.singledispatch from Python 3.4 to Python
5678 2.6-3.3.")
5679 (license license:expat)))
5680
5681 (define-public python2-singledispatch
5682 (package-with-python2 python-singledispatch))
5683
5684 (define-public python-tornado
5685 (package
5686 (name "python-tornado")
5687 (version "4.3")
5688 (source
5689 (origin
5690 (method url-fetch)
5691 (uri (pypi-uri "tornado" version))
5692 (sha256
5693 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5694 (build-system python-build-system)
5695 (native-inputs
5696 `(("python-certifi" ,python-certifi)))
5697 (propagated-inputs
5698 `(("python-backports-abc" ,python-backports-abc)))
5699 (home-page "http://www.tornadoweb.org/")
5700 (synopsis "Python web framework and asynchronous networking library")
5701 (description
5702 "Tornado is a Python web framework and asynchronous networking library,
5703 originally developed at FriendFeed. By using non-blocking network I/O,
5704 Tornado can scale to tens of thousands of open connections, making it ideal
5705 for long polling, WebSockets, and other applications that require a long-lived
5706 connection to each user.")
5707 (license license:asl2.0)
5708 (properties `((python2-variant . ,(delay python2-tornado))))))
5709
5710 (define-public python2-tornado
5711 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5712 (package (inherit tornado)
5713 (propagated-inputs
5714 `(("python2-backport-ssl-match-hostname"
5715 ,python2-backport-ssl-match-hostname)
5716 ("python2-singledispatch" ,python2-singledispatch)
5717 ,@(package-propagated-inputs tornado))))))
5718
5719 ;; the python- version can be removed with python-3.5
5720 (define-public python-backports-abc
5721 (package
5722 (name "python-backports-abc")
5723 (version "0.5")
5724 (source
5725 (origin
5726 (method url-fetch)
5727 (uri (pypi-uri "backports_abc" version))
5728 (sha256
5729 (base32
5730 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5731 (build-system python-build-system)
5732 (home-page "https://github.com/cython/backports_abc")
5733 (synopsis "Backport of additions to the 'collections.abc' module")
5734 (description
5735 "Python-backports-abc provides a backport of additions to the
5736 'collections.abc' module in Python-3.5.")
5737 (license license:psfl)))
5738
5739 (define-public python2-backports-abc
5740 (package-with-python2 python-backports-abc))
5741
5742 (define-public python-waf
5743 (package
5744 (name "python-waf")
5745 (version "1.9.5")
5746 (source (origin
5747 (method url-fetch)
5748 (uri (string-append "https://waf.io/"
5749 "waf-" version ".tar.bz2"))
5750 (sha256
5751 (base32
5752 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5753 (build-system python-build-system)
5754 (arguments
5755 '(#:phases
5756 (modify-phases %standard-phases
5757 (replace 'build
5758 (lambda _
5759 (zero? (system* "python" "waf-light" "configure" "build"))))
5760 (replace 'check
5761 (lambda _
5762 (zero? (system* "python" "waf" "--version"))))
5763 (replace 'install
5764 (lambda _
5765 (copy-file "waf" %output))))))
5766 (home-page "http://waf.io/")
5767 (synopsis "Python-based build system")
5768 (description
5769 "Waf is a Python-based framework for configuring, compiling and installing
5770 applications.")
5771 (license license:bsd-3)))
5772
5773 (define-public python2-waf
5774 (package-with-python2 python-waf))
5775
5776 (define-public python-pyzmq
5777 (package
5778 (name "python-pyzmq")
5779 (version "15.1.0")
5780 (source
5781 (origin
5782 (method url-fetch)
5783 (uri (pypi-uri "pyzmq" version))
5784 (sha256
5785 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5786 (build-system python-build-system)
5787 (arguments
5788 `(#:configure-flags
5789 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5790 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5791 ;; --inplace' for 'python setup.py test' to work.
5792 #:tests? #f))
5793 (inputs
5794 `(("zeromq" ,zeromq)))
5795 (native-inputs
5796 `(("pkg-config" ,pkg-config)
5797 ("python-nose" ,python-nose)))
5798 (home-page "http://github.com/zeromq/pyzmq")
5799 (synopsis "Python bindings for 0MQ")
5800 (description
5801 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5802 (license license:bsd-4)))
5803
5804 (define-public python2-pyzmq
5805 (package-with-python2 python-pyzmq))
5806
5807 (define-public python-pep8
5808 (package
5809 (name "python-pep8")
5810 (version "1.7.0")
5811 (source
5812 (origin
5813 (method url-fetch)
5814 (uri (pypi-uri "pep8" version))
5815 (sha256
5816 (base32
5817 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5818 (build-system python-build-system)
5819 (home-page "http://pep8.readthedocs.org/")
5820 (synopsis "Python style guide checker")
5821 (description
5822 "This tools checks Python code against some of the style conventions in
5823 PEP 8.")
5824 (license license:expat)))
5825
5826 (define-public python2-pep8
5827 (package-with-python2 python-pep8))
5828
5829 (define-public python-pyflakes
5830 (package
5831 (name "python-pyflakes")
5832 (version "1.0.0")
5833 (source
5834 (origin
5835 (method url-fetch)
5836 (uri (pypi-uri "pyflakes" version))
5837 (sha256
5838 (base32
5839 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5840 (build-system python-build-system)
5841 (home-page
5842 "https://github.com/pyflakes/pyflakes")
5843 (synopsis "Passive checker of Python programs")
5844 (description
5845 "Pyflakes statically checks Python source code for common errors.")
5846 (license license:expat)))
5847
5848 (define-public python2-pyflakes
5849 (package-with-python2 python-pyflakes))
5850
5851 (define-public python-mccabe
5852 (package
5853 (name "python-mccabe")
5854 (version "0.4.0")
5855 (source
5856 (origin
5857 (method url-fetch)
5858 (uri (pypi-uri "mccabe" version))
5859 (sha256
5860 (base32
5861 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5862 (build-system python-build-system)
5863 (native-inputs
5864 `(("python-pytest" ,python-pytest)
5865 ("python-pytest-runner" ,python-pytest-runner)))
5866 (home-page "https://github.com/flintwork/mccabe")
5867 (synopsis "McCabe checker, plugin for flake8")
5868 (description
5869 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5870 complexity of Python source code.")
5871 (license license:expat)))
5872
5873 (define-public python2-mccabe
5874 (package-with-python2 python-mccabe))
5875
5876 (define-public python-mccabe-0.2.1
5877 (package (inherit python-mccabe)
5878 (version "0.2.1")
5879 (source
5880 (origin
5881 (method url-fetch)
5882 (uri (pypi-uri "mccabe" version))
5883 (sha256
5884 (base32
5885 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5886
5887 (define-public python2-mccabe-0.2.1
5888 (package-with-python2 python-mccabe-0.2.1))
5889
5890 ;; Flake8 2.4.1 requires an older version of pep8.
5891 ;; This should be removed ASAP.
5892 (define-public python-pep8-1.5.7
5893 (package (inherit python-pep8)
5894 (version "1.5.7")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (string-append
5899 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5900 version
5901 ".tar.gz"))
5902 (sha256
5903 (base32
5904 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5905
5906 (define-public python2-pep8-1.5.7
5907 (package-with-python2 python-pep8-1.5.7))
5908
5909 ;; Flake8 2.4.1 requires an older version of pyflakes.
5910 ;; This should be removed ASAP.
5911 (define-public python-pyflakes-0.8.1
5912 (package (inherit python-pyflakes)
5913 (version "0.8.1")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 (uri (string-append
5918 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5919 version
5920 ".tar.gz"))
5921 (sha256
5922 (base32
5923 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5924
5925 (define-public python2-pyflakes-0.8.1
5926 (package-with-python2 python-pyflakes-0.8.1))
5927
5928 (define-public python-flake8
5929 (package
5930 (name "python-flake8")
5931 (version "2.5.4")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (pypi-uri "flake8" version))
5936 (sha256
5937 (base32
5938 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5939 (modules '((guix build utils)))
5940 (snippet
5941 '(begin
5942 ;; Remove pre-compiled .pyc files from source.
5943 (for-each delete-file-recursively
5944 (find-files "." "__pycache__" #:directories? #t))
5945 (for-each delete-file (find-files "." "\\.pyc$"))
5946 #t))))
5947 (build-system python-build-system)
5948 (propagated-inputs
5949 `(("python-pep8" ,python-pep8)
5950 ("python-pyflakes" ,python-pyflakes)
5951 ("python-mccabe" ,python-mccabe)))
5952 (native-inputs
5953 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5954 ("python-nose" ,python-nose)))
5955 (home-page "https://gitlab.com/pycqa/flake8")
5956 (synopsis
5957 "The modular source code checker: pep8, pyflakes and co")
5958 (description
5959 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5960 (license license:expat)))
5961
5962 (define-public python2-flake8
5963 (package-with-python2 python-flake8))
5964
5965 ;; This will only be needed by the python-hacking package and will not be
5966 ;; necessary once python-hacking > 0.10.2 is released.
5967 (define-public python-flake8-2.2.4
5968 (package (inherit python-flake8)
5969 (propagated-inputs
5970 `(("python-pep8" ,python-pep8-1.5.7)
5971 ("python-pyflakes" ,python-pyflakes-0.8.1)
5972 ("python-mccabe" ,python-mccabe-0.2.1)))
5973 (native-inputs
5974 `(("python-mock" ,python-mock)
5975 ("python-nose" ,python-nose)))
5976 (version "2.2.4")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (pypi-uri "flake8" version))
5981 (sha256
5982 (base32
5983 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5984 (modules '((guix build utils)))
5985 (snippet
5986 '(begin
5987 ;; Remove pre-compiled .pyc files from source.
5988 (for-each delete-file-recursively
5989 (find-files "." "__pycache__" #:directories? #t))
5990 (for-each delete-file (find-files "." "\\.pyc$"))
5991 #t))))))
5992
5993 (define-public python2-flake8-2.2.4
5994 (package-with-python2 python-flake8-2.2.4))
5995
5996 (define-public python-flake8-polyfill
5997 (package
5998 (name "python-flake8-polyfill")
5999 (version "1.0.1")
6000 (source
6001 (origin
6002 (method url-fetch)
6003 (uri (pypi-uri "flake8-polyfill" version))
6004 (sha256
6005 (base32
6006 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6007 (build-system python-build-system)
6008 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6009 (synopsis "Polyfill package for Flake8 plugins")
6010 (description
6011 "This package that provides some compatibility helpers for Flake8
6012 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6013 (license license:expat)))
6014
6015 (define-public python2-flake8-polyfill
6016 (package-with-python2 python-flake8-polyfill))
6017
6018 (define-public python-mistune
6019 (package
6020 (name "python-mistune")
6021 (version "0.7.3")
6022 (source
6023 (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "mistune" version))
6026 (sha256
6027 (base32
6028 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6029 (build-system python-build-system)
6030 (native-inputs
6031 `(("python-nose" ,python-nose)
6032 ("python-cython" ,python-cython)))
6033 (home-page "https://github.com/lepture/mistune")
6034 (synopsis "Markdown parser in pure Python")
6035 (description "This package provides a fast markdown parser in pure
6036 Python.")
6037 (license license:bsd-3)))
6038
6039 (define-public python2-mistune
6040 (package-with-python2 python-mistune))
6041
6042 (define-public python-markdown
6043 (package
6044 (name "python-markdown")
6045 (version "2.6.7")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 (uri (pypi-uri "Markdown" version))
6050 (sha256
6051 (base32
6052 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6053 (build-system python-build-system)
6054 (arguments
6055 `(#:phases
6056 (modify-phases %standard-phases
6057 (replace 'check
6058 (lambda _
6059 (zero? (system* "python" "run-tests.py")))))))
6060 (native-inputs
6061 `(("python-nose" ,python-nose)
6062 ("python-pyyaml" ,python-pyyaml)))
6063 (home-page "https://pythonhosted.org/Markdown/")
6064 (synopsis "Python implementation of Markdown")
6065 (description
6066 "This package provides a Python implementation of John Gruber's
6067 Markdown. The library features international input, various Markdown
6068 extensions, and several HTML output formats. A command line wrapper
6069 markdown_py is also provided to convert Markdown files to HTML.")
6070 (license license:bsd-3)))
6071
6072 (define-public python2-markdown
6073 (package-with-python2 python-markdown))
6074
6075 (define-public python-ptyprocess
6076 (package
6077 (name "python-ptyprocess")
6078 (version "0.5")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (string-append
6083 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6084 version ".tar.gz"))
6085 (sha256
6086 (base32
6087 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6088 (build-system python-build-system)
6089 (native-inputs
6090 `(("python-nose" ,python-nose)))
6091 (arguments
6092 `(#:phases
6093 (modify-phases %standard-phases
6094 (replace 'check
6095 (lambda _
6096 (zero? (system* "nosetests")))))))
6097 (home-page "https://github.com/pexpect/ptyprocess")
6098 (synopsis "Run a subprocess in a pseudo terminal")
6099 (description
6100 "This package provides a Python library used to launch a subprocess in a
6101 pseudo terminal (pty), and interact with both the process and its pty.")
6102 (license license:isc)))
6103
6104 (define-public python2-ptyprocess
6105 (package-with-python2 python-ptyprocess))
6106
6107 (define-public python-cram
6108 (package
6109 (name "python-cram")
6110 (version "0.7")
6111 (home-page "https://bitheap.org/cram/")
6112 (source (origin
6113 (method url-fetch)
6114 (uri (list (string-append home-page "cram-"
6115 version ".tar.gz")
6116 (pypi-uri "cram" version)))
6117 (sha256
6118 (base32
6119 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6120 (arguments
6121 '(#:phases
6122 (modify-phases %standard-phases
6123 (add-after 'unpack 'patch-source
6124 (lambda _
6125 (substitute* (find-files "cram" ".*\\.py$")
6126 ;; Replace default shell path.
6127 (("/bin/sh") (which "sh")))
6128 (substitute* (find-files "tests" ".*\\.t$")
6129 (("md5") "md5sum")
6130 (("/bin/bash") (which "bash"))
6131 (("/bin/sh") (which "sh")))
6132 (substitute* "cram/_test.py"
6133 ;; This hack works around a bug triggered by substituting
6134 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6135 ;; "cram -h", which breaks the output at 80 characters. This
6136 ;; causes the line showing the default shell to break into two
6137 ;; lines, but the test expects a single line...
6138 (("env\\['COLUMNS'\\] = '80'")
6139 "env['COLUMNS'] = '160'"))
6140 #t))
6141 (delete 'check)
6142 (add-after 'install 'check
6143 ;; The test phase uses the built library and executable.
6144 ;; It's easier to run it after install since the build
6145 ;; directory contains version-specific PATH.
6146 (lambda* (#:key inputs outputs #:allow-other-keys)
6147 (add-installed-pythonpath inputs outputs)
6148 (setenv "PATH" (string-append (getenv "PATH") ":"
6149 (assoc-ref outputs "out") "/bin"))
6150 (zero? (system* "make" "test")))))))
6151 (build-system python-build-system)
6152 (native-inputs
6153 `(("python-coverage" ,python-coverage)
6154 ("which" ,which)))
6155 (synopsis "Simple testing framework for command line applications")
6156 (description
6157 "Cram is a functional testing framework for command line applications.
6158 Cram tests look like snippets of interactive shell sessions. Cram runs each
6159 command and compares the command output in the test with the command’s actual
6160 output.")
6161 (license license:gpl2+)))
6162
6163 (define-public python2-cram
6164 (package-with-python2 python-cram))
6165
6166 (define-public python-terminado
6167 (package
6168 (name "python-terminado")
6169 (version "0.6")
6170 (source
6171 (origin
6172 (method url-fetch)
6173 (uri (pypi-uri "terminado" version))
6174 (sha256
6175 (base32
6176 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6177 (build-system python-build-system)
6178 (propagated-inputs
6179 `(("python-tornado" ,python-tornado)
6180 ("python-ptyprocess" ,python-ptyprocess)))
6181 (native-inputs
6182 `(("python-nose" ,python-nose)))
6183 (arguments
6184 `(#:phases
6185 (modify-phases %standard-phases
6186 (replace 'check
6187 (lambda _
6188 (zero? (system* "nosetests")))))))
6189 (home-page "https://github.com/takluyver/terminado")
6190 (synopsis "Terminals served to term.js using Tornado websockets")
6191 (description "This package provides a Tornado websocket backend for the
6192 term.js Javascript terminal emulator library.")
6193 (license license:bsd-2)
6194 (properties `((python2-variant . ,(delay python2-terminado))))))
6195
6196 (define-public python2-terminado
6197 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6198 (package (inherit terminado)
6199 (propagated-inputs
6200 `(("python2-backport-ssl-match-hostname"
6201 ,python2-backport-ssl-match-hostname)
6202 ,@(package-propagated-inputs terminado))))))
6203
6204 (define-public python-straight-plugin
6205 (package
6206 (name "python-straight-plugin")
6207 (version "1.4.1")
6208 (source
6209 (origin
6210 (method url-fetch)
6211 (uri (pypi-uri "straight.plugin" version))
6212 (sha256
6213 (base32
6214 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6215 (build-system python-build-system)
6216 (home-page "https://github.com/ironfroggy/straight.plugin")
6217 (synopsis "Simple namespaced plugin facility")
6218 (description "Straight Plugin provides a type of plugin you can create from
6219 almost any existing Python modules, and an easy way for outside developers to
6220 add functionality and customization to your projects with their own plugins.")
6221 (license license:expat)))
6222
6223 (define-public python2-straight-plugin
6224 (package-with-python2 python-straight-plugin))
6225
6226 (define-public python-fonttools
6227 (package
6228 (name "python-fonttools")
6229 (version "2.5")
6230 (source (origin
6231 (method url-fetch)
6232 (uri (string-append
6233 "https://pypi.python.org/packages/source/F/FontTools/"
6234 "fonttools-" version ".tar.gz"))
6235 (sha256
6236 (base32
6237 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6238 (build-system python-build-system)
6239 (arguments
6240 '(#:test-target "check"
6241 #:phases
6242 (modify-phases %standard-phases
6243 (add-after 'unpack 'patch-setuppy
6244 ;; Remove the undocumented "extra_path" argument, which adds an
6245 ;; intervening directories between site-packages and the package
6246 ;; directory.
6247 (lambda _
6248 (substitute* "setup.py"
6249 (("^[ \t]*extra_path *= *'FontTools',") ""))
6250 #t)))))
6251 (home-page "http://github.com/behdad/fonttools")
6252 (synopsis "Tools to manipulate font files")
6253 (description
6254 "FontTools/TTX is a library to manipulate font files from Python. It
6255 supports reading and writing of TrueType/OpenType fonts, reading and writing
6256 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6257 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6258 from an XML-based format.")
6259 (license (license:non-copyleft
6260 "file://LICENSE.txt"
6261 "See LICENSE.txt in the distribution."))))
6262
6263 (define-public python2-fonttools
6264 (package-with-python2 python-fonttools))
6265
6266 (define-public python-ly
6267 (package
6268 (name "python-ly")
6269 (version "0.9.4")
6270 (source
6271 (origin
6272 (method url-fetch)
6273 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6274 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6275 "/python-ly-" version ".tar.gz"))
6276 (sha256
6277 (base32
6278 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6279 (build-system python-build-system)
6280 (synopsis "Tool and library for manipulating LilyPond files")
6281 (description "This package provides a Python library to parse, manipulate
6282 or create documents in LilyPond format. A command line program ly is also
6283 provided that can be used to do various manipulations with LilyPond files.")
6284 (home-page "https://pypi.python.org/pypi/python-ly")
6285 (license license:gpl2+)))
6286
6287 (define-public python-appdirs
6288 (package
6289 (name "python-appdirs")
6290 (version "1.4.0")
6291 (source
6292 (origin
6293 (method url-fetch)
6294 (uri (string-append
6295 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6296 version
6297 ".tar.gz"))
6298 (sha256
6299 (base32
6300 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6301 (build-system python-build-system)
6302 (home-page "http://github.com/ActiveState/appdirs")
6303 (synopsis
6304 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6305 (description
6306 "This module provides a portable way of finding out where user data
6307 should be stored on various operating systems.")
6308 (license license:expat)))
6309
6310 (define-public python2-appdirs
6311 (package-with-python2 python-appdirs))
6312
6313 (define-public python-llfuse
6314 (package
6315 (name "python-llfuse")
6316 (version "1.1.1")
6317 (source (origin
6318 (method url-fetch)
6319 (uri (string-append
6320 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6321 "llfuse-" version ".tar.bz2"))
6322 (sha256
6323 (base32
6324 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6325 (build-system python-build-system)
6326 (inputs
6327 `(("fuse" ,fuse)
6328 ("attr" ,attr)))
6329 (native-inputs
6330 `(("pkg-config" ,pkg-config)))
6331 (synopsis "Python bindings for FUSE")
6332 (description
6333 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6334 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6335 (license license:lgpl2.0+)
6336 (properties `((python2-variant . ,(delay python2-llfuse))))))
6337
6338 (define-public python2-llfuse
6339 (package (inherit (package-with-python2
6340 (strip-python2-variant python-llfuse)))
6341 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6342
6343 ;; For attic-0.16
6344 (define-public python-llfuse-0.41
6345 (package (inherit python-llfuse)
6346 (version "0.41.1")
6347 (source (origin
6348 (method url-fetch)
6349 (uri (string-append
6350 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6351 "llfuse-" version ".tar.bz2"))
6352 (sha256
6353 (base32
6354 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6355 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6356 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6357 (license (list license:expat license:lgpl2.0+))))
6358
6359 (define-public python-msgpack
6360 (package
6361 (name "python-msgpack")
6362 (version "0.4.8")
6363 (source (origin
6364 (method url-fetch)
6365 (uri (pypi-uri "msgpack-python" version))
6366 (sha256
6367 (base32
6368 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6369 (build-system python-build-system)
6370 (synopsis "MessagePack (de)serializer")
6371 (description "MessagePack is a fast, compact binary serialization format,
6372 suitable for similar data to JSON. This package provides CPython bindings for
6373 reading and writing MessagePack data.")
6374 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6375 (license license:asl2.0)))
6376
6377 (define-public python2-msgpack
6378 (package-with-python2 python-msgpack))
6379
6380 (define-public python-netaddr
6381 (package
6382 (name "python-netaddr")
6383 (version "0.7.18")
6384 (source
6385 (origin
6386 (method url-fetch)
6387 (uri (string-append
6388 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6389 version
6390 ".tar.gz"))
6391 (sha256
6392 (base32
6393 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6394 (build-system python-build-system)
6395 (arguments `(#:tests? #f)) ;; No tests.
6396 (home-page "https://github.com/drkjam/netaddr/")
6397 (synopsis "Pythonic manipulation of network addresses")
6398 (description
6399 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6400 and MAC network addresses.")
6401 (license license:bsd-3)))
6402
6403 (define-public python2-netaddr
6404 (package-with-python2 python-netaddr))
6405
6406 (define-public python-wrapt
6407 (package
6408 (name "python-wrapt")
6409 (version "1.10.5")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (string-append
6414 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6415 version
6416 ".tar.gz"))
6417 (sha256
6418 (base32
6419 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6420 (build-system python-build-system)
6421 (arguments
6422 ;; Tests are not included in the tarball, they are only available in the
6423 ;; git repository.
6424 `(#:tests? #f))
6425 (home-page "https://github.com/GrahamDumpleton/wrapt")
6426 (synopsis "Module for decorators, wrappers and monkey patching")
6427 (description
6428 "The aim of the wrapt module is to provide a transparent object proxy for
6429 Python, which can be used as the basis for the construction of function
6430 wrappers and decorator functions.")
6431 (license license:bsd-2)))
6432
6433 (define-public python2-wrapt
6434 (package-with-python2 python-wrapt))
6435
6436 (define-public python-iso8601
6437 (package
6438 (name "python-iso8601")
6439 (version "0.1.11")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "iso8601" version))
6444 (sha256
6445 (base32
6446 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6447 (build-system python-build-system)
6448 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6449 (synopsis "Module to parse ISO 8601 dates")
6450 (description
6451 "This module parses the most common forms of ISO 8601 date strings (e.g.
6452 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6453 (license license:expat)))
6454
6455 (define-public python2-iso8601
6456 (package-with-python2 python-iso8601))
6457
6458 (define-public python-monotonic
6459 (package
6460 (name "python-monotonic")
6461 (version "0.3")
6462 (source
6463 (origin
6464 (method url-fetch)
6465 (uri (string-append
6466 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6467 version
6468 ".tar.gz"))
6469 (sha256
6470 (base32
6471 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6472 (build-system python-build-system)
6473 (home-page "https://github.com/atdt/monotonic")
6474 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6475 (description
6476 "This module provides a monotonic() function which returns the value (in
6477 fractional seconds) of a clock which never goes backwards.")
6478 (license license:asl2.0)))
6479
6480 (define-public python2-monotonic
6481 (package-with-python2 python-monotonic))
6482
6483 (define-public python-webob
6484 (package
6485 (name "python-webob")
6486 (version "1.5.1")
6487 (source
6488 (origin
6489 (method url-fetch)
6490 (uri (pypi-uri "WebOb" version))
6491 (sha256
6492 (base32
6493 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6494 (build-system python-build-system)
6495 (native-inputs
6496 `(("python-nose" ,python-nose)))
6497 (home-page "http://webob.org/")
6498 (synopsis "WSGI request and response object")
6499 (description
6500 "WebOb provides wrappers around the WSGI request environment, and an
6501 object to help create WSGI responses.")
6502 (license license:expat)))
6503
6504 (define-public python2-webob
6505 (package-with-python2 python-webob))
6506
6507 (define-public python-xlrd
6508 (package
6509 (name "python-xlrd")
6510 (version "1.0.0")
6511 (source (origin
6512 (method url-fetch)
6513 (uri (pypi-uri "xlrd" version))
6514 (sha256
6515 (base32
6516 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6517 (build-system python-build-system)
6518 (arguments
6519 `(#:phases
6520 (modify-phases %standard-phases
6521 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6522 ;; run tests instead for now.
6523 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6524 (native-inputs `(("python-nose" ,python-nose)))
6525 (home-page "http://www.python-excel.org/")
6526 (synopsis "Library for extracting data from Excel files")
6527 (description "This packages provides a library to extract data from
6528 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6529 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6530 Unicode-aware. It is not intended as an end-user tool.")
6531 (license license:bsd-3)))
6532
6533 (define-public python2-xlrd
6534 (package-with-python2 python-xlrd))
6535
6536 (define-public python-prettytable
6537 (package
6538 (name "python-prettytable")
6539 (version "0.7.2")
6540 (source
6541 (origin
6542 (method url-fetch)
6543 (uri (string-append
6544 "https://pypi.python.org/packages/source/P/PrettyTable/"
6545 "prettytable-" version ".tar.bz2"))
6546 (sha256
6547 (base32
6548 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6549 (build-system python-build-system)
6550 (home-page "http://code.google.com/p/prettytable/")
6551 (synopsis "Display tabular data in an ASCII table format")
6552 (description
6553 "A library designed to represent tabular data in visually appealing ASCII
6554 tables. PrettyTable allows for selection of which columns are to be printed,
6555 independent alignment of columns (left or right justified or centred) and
6556 printing of sub-tables by specifying a row range.")
6557 (license license:bsd-3)))
6558
6559 (define-public python2-prettytable
6560 (package-with-python2 python-prettytable))
6561
6562 (define-public python-tables
6563 (package
6564 (name "python-tables")
6565 (version "3.2.2")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (pypi-uri "tables" version))
6570 (sha256
6571 (base32
6572 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6573 (modules '((guix build utils)))
6574 (snippet
6575 '(begin
6576 ;; Remove pre-compiled .pyc files from source.
6577 (for-each delete-file-recursively
6578 (find-files "." "__pycache__" #:directories? #t))
6579 (for-each delete-file (find-files "." "\\.pyc$"))
6580 #t))))
6581 (build-system python-build-system)
6582 (arguments
6583 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6584 ;; or "check", so we must override the build and check phases.
6585 #:phases
6586 (modify-phases %standard-phases
6587 (add-after 'unpack 'use-gcc
6588 (lambda _
6589 (substitute* "setup.py"
6590 (("compiler = new_compiler\\(\\)" line)
6591 (string-append line
6592 "\ncompiler.set_executables(compiler='gcc',"
6593 "compiler_so='gcc',"
6594 "linker_exe='gcc',"
6595 "linker_so='gcc -shared')")))
6596 #t))
6597 (replace 'build
6598 (lambda* (#:key inputs #:allow-other-keys)
6599 (zero? (system* "python" "setup.py" "build"
6600 (string-append "--hdf5="
6601 (assoc-ref inputs "hdf5"))))))
6602 (replace 'check
6603 (lambda* (#:key inputs #:allow-other-keys)
6604 (zero? (system* "python" "setup.py" "check"
6605 (string-append "--hdf5="
6606 (assoc-ref inputs "hdf5")))))))))
6607 (propagated-inputs
6608 `(("python-numexpr" ,python-numexpr)
6609 ("python-numpy" ,python-numpy)))
6610 (native-inputs
6611 `(("python-cython" ,python-cython)
6612 ("pkg-config" ,pkg-config)))
6613 (inputs
6614 `(("hdf5" ,hdf5)
6615 ("bzip2" ,bzip2)
6616 ("zlib" ,zlib)))
6617 (home-page "http://www.pytables.org/")
6618 (synopsis "Hierarchical datasets for Python")
6619 (description "PyTables is a package for managing hierarchical datasets and
6620 designed to efficently cope with extremely large amounts of data.")
6621 (license license:bsd-3)))
6622
6623 (define-public python2-tables
6624 (package-with-python2 python-tables))
6625
6626 (define-public python-pyasn1
6627 (package
6628 (name "python-pyasn1")
6629 (version "0.1.9")
6630 (source
6631 (origin
6632 (method url-fetch)
6633 (uri (pypi-uri "pyasn1" version))
6634 (sha256
6635 (base32
6636 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6637 (build-system python-build-system)
6638 (home-page "http://pyasn1.sourceforge.net/")
6639 (synopsis "ASN.1 types and codecs")
6640 (description
6641 "This is an implementation of ASN.1 types and codecs in Python. It is
6642 suitable for a wide range of protocols based on the ASN.1 specification.")
6643 (license license:bsd-2)))
6644
6645 (define-public python2-pyasn1
6646 (package-with-python2 python-pyasn1))
6647
6648 (define-public python-pyasn1-modules
6649 (package
6650 (name "python-pyasn1-modules")
6651 (version "0.0.8")
6652 (source
6653 (origin
6654 (method url-fetch)
6655 (uri (pypi-uri "pyasn1-modules" version))
6656 (sha256
6657 (base32
6658 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6659 (build-system python-build-system)
6660 (propagated-inputs
6661 `(("python-pyasn1" ,python-pyasn1)))
6662 (home-page "https://sourceforge.net/projects/pyasn1/")
6663 (synopsis "ASN.1 codec implementations")
6664 (description
6665 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6666 implementations of ASN.1-based codecs and protocols.")
6667 (license license:bsd-3)))
6668
6669 (define-public python2-pyasn1-modules
6670 (package-with-python2 python-pyasn1-modules))
6671
6672 (define-public python-ipaddress
6673 (package
6674 (name "python-ipaddress")
6675 (version "1.0.16")
6676 (source (origin
6677 (method url-fetch)
6678 (uri (pypi-uri "ipaddress" version))
6679 (sha256
6680 (base32
6681 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6682 (build-system python-build-system)
6683 (home-page "https://github.com/phihag/ipaddress")
6684 (synopsis "IP address manipulation library")
6685 (description
6686 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6687 in Python. This library is used to create, poke at, and manipulate IPv4 and
6688 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6689 module to older versions of Python.")
6690 (license license:psfl)))
6691
6692 (define-public python2-ipaddress
6693 (package-with-python2 python-ipaddress))
6694
6695 (define-public python2-ipaddr
6696 (package
6697 (name "python2-ipaddr")
6698 (version "2.1.11")
6699 (source
6700 (origin
6701 (method url-fetch)
6702 (uri (pypi-uri "ipaddr" version))
6703 (sha256
6704 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6705 (build-system python-build-system)
6706 (arguments
6707 `(#:python ,python-2 ;version 2 only
6708 #:phases
6709 (modify-phases %standard-phases
6710 (replace 'check
6711 (lambda* _
6712 (zero? (system* "python" "ipaddr_test.py")))))))
6713 (home-page "https://github.com/google/ipaddr-py")
6714 (synopsis "IP address manipulation library")
6715 (description
6716 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6717 IPv6 addresses and networks.
6718
6719 For new implementations you may prefer to use the standard module
6720 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6721 versions of Python.")
6722 (license license:asl2.0)))
6723
6724 (define-public python-idna
6725 (package
6726 (name "python-idna")
6727 (version "2.0")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (string-append "https://pypi.python.org/packages/source/i/"
6732 "idna/idna-" version ".tar.gz"))
6733 (sha256
6734 (base32
6735 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6736 (build-system python-build-system)
6737 (home-page "https://github.com/kjd/idna")
6738 (synopsis "Internationalized domain names in applications")
6739 (description
6740 "This is a library to support the Internationalised Domain Names in
6741 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6742 protocol is often referred to as “IDNA2008” and can produce different results
6743 from the earlier standard from 2003. The library is also intended to act as a
6744 suitable drop-in replacement for the “encodings.idna” module that comes with
6745 the Python standard library but currently only supports the older 2003
6746 specification.")
6747 (license license:bsd-4)))
6748
6749 (define-public python2-idna
6750 (package-with-python2 python-idna))
6751
6752 (define-public python-pretend
6753 (package
6754 (name "python-pretend")
6755 (version "1.0.8")
6756 (source
6757 (origin
6758 (method url-fetch)
6759 (uri (string-append "https://pypi.python.org/packages/source/p/"
6760 "pretend/pretend-" version ".tar.gz"))
6761 (sha256
6762 (base32
6763 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6764 (build-system python-build-system)
6765 (home-page "https://github.com/alex/pretend")
6766 (synopsis "Library for stubbing in Python")
6767 (description
6768 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6769 technique for writing tests. You may hear the term mixed up with mocks,
6770 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6771 responses, rather than doing any computation.")
6772 (license license:bsd-3)))
6773
6774 (define-public python2-pretend
6775 (package-with-python2 python-pretend))
6776
6777 (define-public python-cryptography-vectors
6778 (package
6779 (name "python-cryptography-vectors")
6780 (version "1.7.1")
6781 (source
6782 (origin
6783 (method url-fetch)
6784 (uri (pypi-uri "cryptography_vectors" version))
6785 (sha256
6786 (base32
6787 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
6788 (build-system python-build-system)
6789 (home-page "https://github.com/pyca/cryptography")
6790 (synopsis "Test vectors for the cryptography package")
6791 (description
6792 "This package contains test vectors for the cryptography package.")
6793 ;; Distributed under either BSD-3 or ASL2.0
6794 (license (list license:bsd-3 license:asl2.0))))
6795
6796 (define-public python2-cryptography-vectors
6797 (package-with-python2 python-cryptography-vectors))
6798
6799 (define-public python-cryptography
6800 (package
6801 (name "python-cryptography")
6802 (version "1.7.1")
6803 (source
6804 (origin
6805 (method url-fetch)
6806 (uri (pypi-uri "cryptography" version))
6807 (sha256
6808 (base32
6809 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
6810 (build-system python-build-system)
6811 (inputs
6812 `(("openssl" ,openssl)))
6813 (propagated-inputs
6814 `(("python-cffi" ,python-cffi)
6815 ("python-six" ,python-six)
6816 ("python-pyasn1" ,python-pyasn1)
6817 ("python-idna" ,python-idna)
6818 ("python-iso8601" ,python-iso8601)))
6819 (native-inputs
6820 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6821 ("python-hypothesis" ,python-hypothesis)
6822 ("python-pretend" ,python-pretend)
6823 ("python-pyasn1" ,python-pyasn1)
6824 ("python-pyasn1-modules" ,python-pyasn1-modules)
6825 ("python-pytz" ,python-pytz)
6826 ("python-pytest" ,python-pytest-2.9.2)))
6827 (home-page "https://github.com/pyca/cryptography")
6828 (synopsis "Cryptographic recipes and primitives for Python")
6829 (description
6830 "cryptography is a package which provides cryptographic recipes and
6831 primitives to Python developers. It aims to be the “cryptographic standard
6832 library” for Python. The package includes both high level recipes, and low
6833 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6834 message digests and key derivation functions.")
6835 ;; Distributed under either BSD-3 or ASL2.0
6836 (license (list license:bsd-3 license:asl2.0))
6837 (properties `((python2-variant . ,(delay python2-cryptography))))))
6838
6839 (define-public python2-cryptography
6840 (let ((crypto (package-with-python2
6841 (strip-python2-variant python-cryptography))))
6842 (package (inherit crypto)
6843 (propagated-inputs
6844 `(("python2-ipaddress" ,python2-ipaddress)
6845 ("python2-backport-ssl-match-hostname"
6846 ,python2-backport-ssl-match-hostname)
6847 ("python2-enum34" ,python2-enum34)
6848 ,@(package-propagated-inputs crypto))))))
6849
6850 (define-public python-pyopenssl
6851 (package
6852 (name "python-pyopenssl")
6853 (version "16.2.0")
6854 (source
6855 (origin
6856 (method url-fetch)
6857 (uri (pypi-uri "pyOpenSSL" version))
6858 (sha256
6859 (base32
6860 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
6861 (build-system python-build-system)
6862 (propagated-inputs
6863 `(("python-cryptography" ,python-cryptography)
6864 ("python-six" ,python-six)))
6865 (inputs
6866 `(("openssl" ,openssl)))
6867 (home-page "https://github.com/pyca/pyopenssl")
6868 (synopsis "Python wrapper module around the OpenSSL library")
6869 (description
6870 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6871 library.")
6872 (license license:asl2.0)))
6873
6874 (define-public python2-pyopenssl
6875 (package-with-python2 python-pyopenssl))
6876
6877 (define-public python-pip
6878 (package
6879 (name "python-pip")
6880 (version "9.0.1")
6881 (source
6882 (origin
6883 (method url-fetch)
6884 (uri (pypi-uri "pip" version))
6885 (sha256
6886 (base32
6887 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6888 (build-system python-build-system)
6889 (arguments
6890 '(#:tests? #f)) ; there are no tests in the pypi archive.
6891 (home-page "https://pip.pypa.io/")
6892 (synopsis "Package manager for Python software")
6893 (description
6894 "Pip is a package manager for Python software, that finds packages on the
6895 Python Package Index (PyPI).")
6896 (license license:expat)))
6897
6898 (define-public python2-pip
6899 (package-with-python2 python-pip))
6900
6901 (define-public python-tlsh
6902 (package
6903 (name "python-tlsh")
6904 (version "3.4.4")
6905 (home-page "https://github.com/trendmicro/tlsh")
6906 (source (origin
6907 (method url-fetch)
6908 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6909 version ".tar.gz"))
6910 (sha256
6911 (base32
6912 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6913 (file-name (string-append name "-" version ".tar.gz"))))
6914 (build-system cmake-build-system)
6915 (arguments
6916 '(#:out-of-source? #f
6917 #:phases (modify-phases %standard-phases
6918 (replace
6919 'install
6920 (lambda* (#:key outputs #:allow-other-keys)
6921 ;; Build and install the Python bindings. The underlying
6922 ;; C++ library is apparently not meant to be installed.
6923 (let ((out (assoc-ref outputs "out")))
6924 (with-directory-excursion "py_ext"
6925 (and (system* "python" "setup.py" "build")
6926 (system* "python" "setup.py" "install"
6927 (string-append "--prefix=" out))))))))))
6928 (inputs `(("python" ,python-wrapper))) ;for the bindings
6929 (synopsis "Fuzzy matching library for Python")
6930 (description
6931 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6932 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6933 value which can be used for similarity comparisons. Similar objects have
6934 similar hash values, which allows for the detection of similar objects by
6935 comparing their hash values. The byte stream should have a sufficient amount
6936 of complexity; for example, a byte stream of identical bytes will not generate
6937 a hash value.")
6938 (license license:asl2.0)))
6939
6940 (define-public python2-tlsh
6941 (package
6942 (inherit python-tlsh)
6943 (name "python2-tlsh")
6944 (inputs `(("python" ,python-2)))))
6945
6946 (define-public python-termcolor
6947 (package
6948 (name "python-termcolor")
6949 (version "1.1.0")
6950 (source
6951 (origin
6952 (method url-fetch)
6953 (uri (pypi-uri "python-termcolor" version))
6954 (sha256
6955 (base32
6956 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6957 (build-system python-build-system)
6958 (arguments
6959 ;; There are no tests.
6960 `(#:tests? #f))
6961 (home-page "http://pypi.python.org/pypi/termcolor")
6962 (synopsis "ANSII Color formatting for terminal output")
6963 (description
6964 "This package provides ANSII Color formatting for output in terminals.")
6965 (license license:expat)))
6966
6967 (define-public python2-termcolor
6968 (package-with-python2 python-termcolor))
6969
6970 (define-public python-libarchive-c
6971 (package
6972 (name "python-libarchive-c")
6973 (version "2.2")
6974 (source (origin
6975 (method url-fetch)
6976 (uri (pypi-uri "libarchive-c" version))
6977 (sha256
6978 (base32
6979 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6980 (build-system python-build-system)
6981 (arguments
6982 '(#:phases (modify-phases %standard-phases
6983 (add-before
6984 'build 'reference-libarchive
6985 (lambda* (#:key inputs #:allow-other-keys)
6986 ;; Retain the absolute file name of libarchive.so.
6987 (let ((libarchive (assoc-ref inputs "libarchive")))
6988 (substitute* "libarchive/ffi.py"
6989 (("find_library\\('archive'\\)")
6990 (string-append "'" libarchive
6991 "/lib/libarchive.so'")))))))))
6992 (inputs
6993 `(("libarchive" ,libarchive)))
6994 (home-page "https://github.com/Changaco/python-libarchive-c")
6995 (synopsis "Python interface to libarchive")
6996 (description
6997 "This package provides Python bindings to libarchive, a C library to
6998 access possibly compressed archives in many different formats. It uses
6999 Python's @code{ctypes} foreign function interface (FFI).")
7000 (license license:lgpl2.0+)))
7001
7002 (define-public python2-libarchive-c
7003 (package-with-python2 python-libarchive-c))
7004
7005 (define-public python-file
7006 (package
7007 (inherit file)
7008 (name "python-file")
7009 (source (origin
7010 (inherit (package-source file))
7011 ;; This patch should not be applied to python2-file.
7012 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7013 (build-system python-build-system)
7014 (arguments
7015 '(#:tests? #f ;no tests
7016 #:configure-flags '("--single-version-externally-managed" "--root=/")
7017 #:phases (modify-phases %standard-phases
7018 (add-before 'build 'change-directory
7019 (lambda _
7020 (chdir "python")
7021 #t))
7022 (add-before 'build 'set-library-file-name
7023 (lambda* (#:key inputs #:allow-other-keys)
7024 (let ((file (assoc-ref inputs "file")))
7025 (substitute* "magic.py"
7026 (("find_library\\('magic'\\)")
7027 (string-append "'" file "/lib/libmagic.so'")))
7028 #t))))))
7029 (inputs `(("file" ,file)))
7030 (self-native-input? #f)
7031 (synopsis "Python bindings to the libmagic file type guesser. Note that
7032 this module and the python-magic module both provide a \"magic.py\" file;
7033 these two modules, which are different and were developed separately, both
7034 serve the same purpose: provide Python bindings for libmagic.")))
7035
7036 (define-public python2-file
7037 (package-with-python2 python-file))
7038
7039 (define-public python-debian
7040 (package
7041 (name "python-debian")
7042 (version "0.1.28")
7043 (source
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri name version))
7047 (sha256
7048 (base32
7049 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7050 (build-system python-build-system)
7051 (propagated-inputs
7052 `(("python-six" ,python-six)))
7053 (home-page "http://packages.debian.org/sid/python-debian")
7054 (synopsis "Debian package related modules")
7055 (description
7056 ;; XXX: Use @enumerate instead of @itemize to work around
7057 ;; <http://bugs.gnu.org/21772>.
7058 "This package provides Python modules that abstract many formats of
7059 Debian-related files, such as:
7060
7061 @enumerate
7062 @item Debtags information;
7063 @item @file{debian/changelog} files;
7064 @item packages files, pdiffs;
7065 @item control files of single or multiple RFC822-style paragraphs---e.g.
7066 @file{debian/control}, @file{.changes}, @file{.dsc};
7067 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7068 contained files and meta-information.
7069 @end enumerate\n")
7070
7071 ;; Modules are either GPLv2+ or GPLv3+.
7072 (license license:gpl3+)))
7073
7074 (define-public python2-debian
7075 (package-with-python2 python-debian))
7076
7077 (define-public python-nbformat
7078 (package
7079 (name "python-nbformat")
7080 (version "4.1.0")
7081 (source
7082 (origin
7083 (method url-fetch)
7084 (uri (pypi-uri "nbformat" version))
7085 (sha256
7086 (base32
7087 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7088 (build-system python-build-system)
7089 (arguments `(#:tests? #f)) ; no test target
7090 (propagated-inputs
7091 `(("python-ipython-genutils" ,python-ipython-genutils)
7092 ("python-jsonschema" ,python-jsonschema)
7093 ("python-jupyter-core" ,python-jupyter-core)
7094 ("python-traitlets" ,python-traitlets)))
7095 (home-page "http://jupyter.org")
7096 (synopsis "Jupyter Notebook format")
7097 (description "This package provides the reference implementation of the
7098 Jupyter Notebook format and Python APIs for working with notebooks.")
7099 (license license:bsd-3)))
7100
7101 (define-public python2-nbformat
7102 (package-with-python2 python-nbformat))
7103
7104 (define-public python-bleach
7105 (package
7106 (name "python-bleach")
7107 (version "1.4.3")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (pypi-uri "bleach" version))
7112 (sha256
7113 (base32
7114 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7115 (build-system python-build-system)
7116 (propagated-inputs
7117 `(("python-html5lib" ,python-html5lib-0.9)
7118 ("python-six" ,python-six)))
7119 (native-inputs
7120 `(("python-nose" ,python-nose)))
7121 (home-page "http://github.com/jsocol/bleach")
7122 (synopsis "Whitelist-based HTML-sanitizing tool")
7123 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7124 (license license:asl2.0)))
7125
7126 (define-public python2-bleach
7127 (package-with-python2 python-bleach))
7128
7129 (define-public python-entrypoints
7130 (package
7131 (name "python-entrypoints")
7132 (version "0.2.2")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7137 version ".tar.gz"))
7138 (file-name (string-append name "-" version ".tar.gz"))
7139 (sha256
7140 (base32
7141 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7142 (build-system python-build-system)
7143 ;; The package does not come with a setup.py file, so we have to generate
7144 ;; one ourselves.
7145 (arguments
7146 `(#:tests? #f
7147 #:phases
7148 (modify-phases %standard-phases
7149 (add-after 'unpack 'create-setup.py
7150 (lambda _
7151 (call-with-output-file "setup.py"
7152 (lambda (port)
7153 (format port "\
7154 from setuptools import setup
7155 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7156 " ,version))))))))
7157 (home-page "https://github.com/takluyver/entrypoints")
7158 (synopsis "Discover and load entry points from installed Python packages")
7159 (description "Entry points are a way for Python packages to advertise
7160 objects with some common interface. The most common examples are
7161 @code{console_scripts} entry points, which define shell commands by
7162 identifying a Python function to run. The @code{entrypoints} module contains
7163 functions to find and load entry points.")
7164 (license license:expat)))
7165
7166 (define-public python2-entrypoints
7167 (package-with-python2 python-entrypoints))
7168
7169 (define-public python-nbconvert
7170 (package
7171 (name "python-nbconvert")
7172 (version "5.0.0b1")
7173 (source
7174 (origin
7175 (method url-fetch)
7176 (uri (pypi-uri "nbconvert" version))
7177 (sha256
7178 (base32
7179 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7180 (build-system python-build-system)
7181 ;; The "bdist_egg" target is disabled by default, causing the installation
7182 ;; to fail.
7183 (arguments `(#:configure-flags (list "bdist_egg")))
7184 (propagated-inputs
7185 `(("python-bleach" ,python-bleach)
7186 ("python-entrypoints" ,python-entrypoints)
7187 ("python-jinja2" ,python-jinja2)
7188 ("python-jupyter-core" ,python-jupyter-core)
7189 ("python-mistune" ,python-mistune)
7190 ("python-nbformat" ,python-nbformat)
7191 ("python-pygments" ,python-pygments)
7192 ("python-traitlets" ,python-traitlets)))
7193 (home-page "http://jupyter.org")
7194 (synopsis "Converting Jupyter Notebooks")
7195 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7196 notebooks to various other formats via Jinja templates. It allows you to
7197 convert an @code{.ipynb} notebook file into various static formats including:
7198
7199 @enumerate
7200 @item HTML
7201 @item LaTeX
7202 @item PDF
7203 @item Reveal JS
7204 @item Markdown (md)
7205 @item ReStructured Text (rst)
7206 @item executable script
7207 @end enumerate\n")
7208 (license license:bsd-3)))
7209
7210 (define-public python2-nbconvert
7211 (package-with-python2 python-nbconvert))
7212
7213 (define-public python-notebook
7214 (package
7215 (name "python-notebook")
7216 (version "4.2.3")
7217 (source (origin
7218 (method url-fetch)
7219 (uri (pypi-uri "notebook" version))
7220 (sha256
7221 (base32
7222 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7223 (build-system python-build-system)
7224 (arguments
7225 `(#:phases
7226 (modify-phases %standard-phases
7227 (replace 'check
7228 (lambda _
7229 ;; HOME must be set for tests
7230 (setenv "HOME" "/tmp")
7231 (zero? (system* "nosetests")))))))
7232 (propagated-inputs
7233 `(("python-jupyter-core" ,python-jupyter-core)
7234 ("python-nbformat" ,python-nbformat)
7235 ("python-nbconvert" ,python-nbconvert)
7236 ("python-ipython" ,python-ipython)))
7237 (native-inputs
7238 `(("python-nose" ,python-nose)
7239 ("python-sphinx" ,python-sphinx)
7240 ("python-requests" ,python-requests)))
7241 (home-page "http://jupyter.org/")
7242 (synopsis "Web-based notebook environment for interactive computing")
7243 (description
7244 "The Jupyter HTML notebook is a web-based notebook environment for
7245 interactive computing.")
7246 (properties `((python2-variant . ,(delay python2-notebook))))
7247 (license license:bsd-3)))
7248
7249 (define-public python2-notebook
7250 (let ((base (package-with-python2
7251 (strip-python2-variant python-notebook))))
7252 (package (inherit base)
7253 (native-inputs
7254 `(("python2-mock" ,python2-mock)
7255 ,@(package-native-inputs base)))
7256 (arguments
7257 (substitute-keyword-arguments (package-arguments base)
7258 ((#:phases phases)
7259 `(modify-phases ,phases
7260 (add-before 'check 'disable-test-case
7261 ;; The test requires network access to localhost. Curiously it
7262 ;; fails with Python 2 only. Simply make the test-case return
7263 ;; immediately.
7264 (lambda _
7265 (substitute*
7266 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7267 (("formats = self.nbconvert_api") "return #")))))))))))
7268
7269 (define-public python-widgetsnbextension
7270 (package
7271 (name "python-widgetsnbextension")
7272 (version "1.2.6")
7273 (source
7274 (origin
7275 (method url-fetch)
7276 (uri (pypi-uri "widgetsnbextension" version))
7277 (sha256
7278 (base32
7279 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7280 (build-system python-build-system)
7281 (propagated-inputs
7282 `(("python-notebook" ,python-notebook)))
7283 (native-inputs
7284 `(("python-nose" ,python-nose)))
7285 (home-page "http://ipython.org")
7286 (synopsis "IPython HTML widgets for Jupyter")
7287 (description "This package provides interactive HTML widgets for Jupyter
7288 notebooks.")
7289 (license license:bsd-3)))
7290
7291 (define-public python2-widgetsnbextension
7292 (package-with-python2 python-widgetsnbextension))
7293
7294 (define-public python-ipywidgets
7295 (package
7296 (name "python-ipywidgets")
7297 (version "5.2.2")
7298 (source
7299 (origin
7300 (method url-fetch)
7301 (uri (pypi-uri "ipywidgets" version))
7302 (sha256
7303 (base32
7304 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7305 (build-system python-build-system)
7306 ;; FIXME: it's not clear how to run the tests.
7307 (arguments `(#:tests? #f))
7308 (propagated-inputs
7309 `(("python-ipykernel" ,python-ipykernel)
7310 ("python-ipython" ,python-ipython)
7311 ("python-traitlets" ,python-traitlets)
7312 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7313 (home-page "http://ipython.org")
7314 (synopsis "IPython HTML widgets for Jupyter")
7315 (description "Ipywidgets are interactive HTML widgets for Jupyter
7316 notebooks and the IPython kernel. Notebooks come alive when interactive
7317 widgets are used. Users gain control of their data and can visualize changes
7318 in the data.")
7319 (license license:bsd-3)))
7320
7321 (define-public python2-ipywidgets
7322 (package-with-python2 python-ipywidgets))
7323
7324 (define-public python-jupyter-console
7325 (package
7326 (name "python-jupyter-console")
7327 (version "5.0.0")
7328 (source
7329 (origin
7330 (method url-fetch)
7331 (uri (pypi-uri "jupyter_console" version))
7332 (sha256
7333 (base32
7334 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7335 (build-system python-build-system)
7336 ;; FIXME: it's not clear how to run the tests.
7337 (arguments `(#:tests? #f))
7338 (propagated-inputs
7339 `(("python-ipykernel" ,python-ipykernel)
7340 ("python-ipython" ,python-ipython)
7341 ("python-jupyter-client" ,python-jupyter-client)
7342 ("python-prompt-toolkit" ,python-prompt-toolkit)
7343 ("python-pygments" ,python-pygments)))
7344 (home-page "https://jupyter.org")
7345 (synopsis "Jupyter terminal console")
7346 (description "This package provides a terminal-based console frontend for
7347 Jupyter kernels. It also allows for console-based interaction with non-Python
7348 Jupyter kernels such as IJulia and IRKernel.")
7349 (license license:bsd-3)))
7350
7351 (define-public python2-jupyter-console
7352 (package-with-python2 python-jupyter-console))
7353
7354 (define-public jupyter
7355 (package
7356 (name "jupyter")
7357 (version "1.0.0")
7358 (source
7359 (origin
7360 (method url-fetch)
7361 (uri (pypi-uri "jupyter" version))
7362 (sha256
7363 (base32
7364 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7365 (build-system python-build-system)
7366 ;; FIXME: it's not clear how to run the tests.
7367 (arguments `(#:tests? #f))
7368 (propagated-inputs
7369 `(("python-ipykernel" ,python-ipykernel)
7370 ("python-ipywidgets" ,python-ipywidgets)
7371 ("python-jupyter-console" ,python-jupyter-console)
7372 ("python-nbconvert" ,python-nbconvert)
7373 ("python-notebook" ,python-notebook)))
7374 (home-page "http://jupyter.org")
7375 (synopsis "Web application for interactive documents")
7376 (description
7377 "The Jupyter Notebook is a web application that allows you to create and
7378 share documents that contain live code, equations, visualizations and
7379 explanatory text. Uses include: data cleaning and transformation, numerical
7380 simulation, statistical modeling, machine learning and much more.")
7381 (license license:bsd-3)))
7382
7383 (define-public python-chardet
7384 (package
7385 (name "python-chardet")
7386 (version "2.3.0")
7387 (source
7388 (origin
7389 (method url-fetch)
7390 (uri (string-append
7391 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7392 version
7393 ".tar.gz"))
7394 (sha256
7395 (base32
7396 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7397 (build-system python-build-system)
7398 (home-page "https://github.com/chardet/chardet")
7399 (synopsis "Universal encoding detector for Python 2 and 3")
7400 (description
7401 "This package provides @code{chardet}, a Python module that can
7402 automatically detect a wide range of file encodings.")
7403 (license license:lgpl2.1+)))
7404
7405 (define-public python2-chardet
7406 (package-with-python2 python-chardet))
7407
7408 (define-public python-docopt
7409 (package
7410 (name "python-docopt")
7411 (version "0.6.2")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 ;; The release on PyPI does not include tests.
7416 (uri (string-append
7417 "https://github.com/docopt/docopt/archive/"
7418 version ".tar.gz"))
7419 (file-name (string-append name "-" version ".tar.gz"))
7420 (sha256
7421 (base32
7422 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7423 (build-system python-build-system)
7424 (native-inputs
7425 `(("python-pytest" ,python-pytest)))
7426 (arguments
7427 `(#:phases (alist-replace
7428 'check
7429 (lambda _ (zero? (system* "py.test")))
7430 %standard-phases)))
7431 (home-page "http://docopt.org")
7432 (synopsis "Command-line interface description language for Python")
7433 (description "This library allows the user to define a command-line
7434 interface from a program's help message rather than specifying it
7435 programatically with command-line parsers like @code{getopt} and
7436 @code{argparse}.")
7437 (license license:expat)))
7438
7439 (define-public python2-docopt
7440 (package-with-python2 python-docopt))
7441
7442 (define-public python-zope-event
7443 (package
7444 (name "python-zope-event")
7445 (version "4.1.0")
7446 (source
7447 (origin
7448 (method url-fetch)
7449 (uri (string-append "https://pypi.python.org/packages/source/z"
7450 "/zope.event/zope.event-" version ".tar.gz"))
7451 (sha256
7452 (base32
7453 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7454 (build-system python-build-system)
7455 (home-page "http://pypi.python.org/pypi/zope.event")
7456 (synopsis "Event publishing system for Python")
7457 (description "Zope.event provides an event publishing API, intended for
7458 use by applications which are unaware of any subscribers to their events. It
7459 is a simple event-dispatching system on which more sophisticated event
7460 dispatching systems can be built.")
7461 (license license:zpl2.1)))
7462
7463 (define-public python2-zope-event
7464 (package-with-python2 python-zope-event))
7465
7466 (define-public python-zope-interface
7467 (package
7468 (name "python-zope-interface")
7469 (version "4.1.3")
7470 (source
7471 (origin
7472 (method url-fetch)
7473 (uri (string-append "https://pypi.python.org/packages/source/z"
7474 "/zope.interface/zope.interface-" version ".tar.gz"))
7475 (sha256
7476 (base32
7477 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7478 (build-system python-build-system)
7479 (native-inputs
7480 `(("python-zope-event" ,python-zope-event)))
7481 (home-page "https://github.com/zopefoundation/zope.interface")
7482 (synopsis "Python implementation of the \"design by contract\"
7483 methodology")
7484 (description "Zope.interface provides an implementation of \"object
7485 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7486 conforming to a given API or contract.")
7487 (license license:zpl2.1)))
7488
7489 (define-public python2-zope-interface
7490 (package-with-python2 python-zope-interface))
7491
7492 (define-public python-zope-exceptions
7493 (package
7494 (name "python-zope-exceptions")
7495 (version "4.0.8")
7496 (source
7497 (origin
7498 (method url-fetch)
7499 (uri (string-append "https://pypi.python.org/packages/source/z"
7500 "/zope.exceptions/zope.exceptions-"
7501 version ".tar.gz"))
7502 (sha256
7503 (base32
7504 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7505 (build-system python-build-system)
7506 (arguments
7507 '(#:tests? #f)) ; circular dependency with zope.testrunner
7508 (propagated-inputs
7509 `(("python-zope-interface" ,python-zope-interface)))
7510 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7511 (synopsis "Zope exceptions")
7512 (description "Zope.exceptions provides general-purpose exception types
7513 that have uses outside of the Zope framework.")
7514 (license license:zpl2.1)))
7515
7516 (define-public python2-zope-exceptions
7517 (package-with-python2 python-zope-exceptions))
7518
7519 (define-public python-zope-testing
7520 (package
7521 (name "python-zope-testing")
7522 (version "4.5.0")
7523 (source
7524 (origin
7525 (method url-fetch)
7526 (uri (string-append "https://pypi.python.org/packages/source/z"
7527 "/zope.testing/zope.testing-" version ".tar.gz"))
7528 (sha256
7529 (base32
7530 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7531 (modules '((guix build utils)))
7532 (snippet
7533 '(begin
7534 ;; Remove pre-compiled .pyc files backup files from source.
7535 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7536 #t))))
7537 (build-system python-build-system)
7538 (native-inputs
7539 `(("python-zope-exceptions" ,python-zope-exceptions)))
7540 (propagated-inputs
7541 `(("python-zope-interface" ,python-zope-interface)))
7542 (home-page "http://pypi.python.org/pypi/zope.testing")
7543 (synopsis "Zope testing helpers")
7544 (description "Zope.testing provides a number of testing utilities for HTML
7545 forms, HTTP servers, regular expressions, and more.")
7546 (license license:zpl2.1)))
7547
7548 (define-public python2-zope-testing
7549 (package-with-python2 python-zope-testing))
7550
7551 (define-public python-zope-testrunner
7552 (package
7553 (name "python-zope-testrunner")
7554 (version "4.4.9")
7555 (source
7556 (origin
7557 (method url-fetch)
7558 (uri (string-append "https://pypi.python.org/packages/source/z"
7559 "/zope.testrunner/zope.testrunner-"
7560 version ".zip"))
7561 (sha256
7562 (base32
7563 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7564 (build-system python-build-system)
7565 (native-inputs
7566 `(("python-six" ,python-six)
7567 ;("python-zope-interface" ,python-zope-interface)
7568 ("python-zope-exceptions" ,python-zope-exceptions)
7569 ("python-zope-testing" ,python-zope-testing)
7570 ("unzip" ,unzip)))
7571 (propagated-inputs
7572 `(("python-zope-interface" ,python-zope-interface)))
7573 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7574 (synopsis "Zope testrunner script")
7575 (description "Zope.testrunner provides a script for running Python
7576 tests.")
7577 (license license:zpl2.1)))
7578
7579 (define-public python2-zope-testrunner
7580 (let ((base (package-with-python2 python-zope-testrunner)))
7581 (package
7582 (inherit base)
7583 (native-inputs
7584 (append (package-native-inputs base)
7585 `(("python2-subunit" ,python2-subunit)
7586 ("python2-mimeparse" ,python2-mimeparse)))))))
7587
7588 (define-public python-zope-i18nmessageid
7589 (package
7590 (name "python-zope-i18nmessageid")
7591 (version "4.0.3")
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (string-append
7596 "https://pypi.python.org/packages/source/z"
7597 "/zope.i18nmessageid/zope.i18nmessageid-"
7598 version ".tar.gz"))
7599 (sha256
7600 (base32
7601 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7602 (build-system python-build-system)
7603 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7604 (synopsis "Message identifiers for internationalization")
7605 (description "Zope.i18nmessageid provides facilities for declaring
7606 internationalized messages within program source text.")
7607 (license license:zpl2.1)))
7608
7609 (define-public python2-zope-i18nmessageid
7610 (package-with-python2 python-zope-i18nmessageid))
7611
7612 (define-public python-zope-schema
7613 (package
7614 (name "python-zope-schema")
7615 (version "4.4.2")
7616 (source
7617 (origin
7618 (method url-fetch)
7619 (uri (string-append "https://pypi.python.org/packages/source/z"
7620 "/zope.schema/zope.schema-" version ".tar.gz"))
7621 (sha256
7622 (base32
7623 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7624 (build-system python-build-system)
7625 (propagated-inputs
7626 `(("python-zope-event" ,python-zope-event)
7627 ("python-zope-interface" ,python-zope-interface)))
7628 (native-inputs
7629 `(("python-zope-testing" ,python-zope-testing)
7630 ("python-coverage" ,python-coverage)
7631 ("python-nose" ,python-nose)))
7632 (home-page "http://pypi.python.org/pypi/zope.schema")
7633 (synopsis "Zope data schemas")
7634 (description "Zope.scheme provides extensions to zope.interface for
7635 defining data schemas.")
7636 (license license:zpl2.1)))
7637
7638 (define-public python2-zope-schema
7639 (package-with-python2 python-zope-schema))
7640
7641 (define-public python-zope-configuration
7642 (package
7643 (name "python-zope-configuration")
7644 (version "4.0.3")
7645 (source (origin
7646 (method url-fetch)
7647 (uri (string-append "https://pypi.python.org/packages/source/z"
7648 "/zope.configuration/zope.configuration-"
7649 version ".tar.gz"))
7650 (sha256
7651 (base32
7652 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7653 (build-system python-build-system)
7654 (propagated-inputs
7655 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7656 ("python-zope-schema" ,python-zope-schema)))
7657 (home-page "http://pypi.python.org/pypi/zope.configuration")
7658 (synopsis "Zope Configuration Markup Language")
7659 (description "Zope.configuration implements ZCML, the Zope Configuration
7660 Markup Language.")
7661 (license license:zpl2.1)))
7662
7663 (define-public python2-zope-configuration
7664 (package-with-python2 python-zope-configuration))
7665
7666 (define-public python-zope-proxy
7667 (package
7668 (name "python-zope-proxy")
7669 (version "4.1.6")
7670 (source
7671 (origin
7672 (method url-fetch)
7673 (uri (string-append "https://pypi.python.org/packages/source/z"
7674 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7675 (sha256
7676 (base32
7677 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7678 (build-system python-build-system)
7679 (propagated-inputs
7680 `(("python-zope-interface" ,python-zope-interface)))
7681 (home-page "http://pypi.python.org/pypi/zope.proxy")
7682 (synopsis "Generic, transparent proxies")
7683 (description "Zope.proxy provides generic, transparent proxies for Python.
7684 Proxies are special objects which serve as mostly-transparent wrappers around
7685 another object, intervening in the apparent behavior of the wrapped object
7686 only when necessary to apply the policy (e.g., access checking, location
7687 brokering, etc.) for which the proxy is responsible.")
7688 (license license:zpl2.1)))
7689
7690 (define-public python2-zope-proxy
7691 (package-with-python2 python-zope-proxy))
7692
7693 (define-public python-zope-location
7694 (package
7695 (name "python-zope-location")
7696 (version "4.0.3")
7697 (source
7698 (origin
7699 (method url-fetch)
7700 (uri (string-append "https://pypi.python.org/packages/source/z"
7701 "/zope.location/zope.location-" version ".tar.gz"))
7702 (sha256
7703 (base32
7704 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7705 (build-system python-build-system)
7706 (propagated-inputs
7707 `(("python-zope-proxy" ,python-zope-proxy)
7708 ("python-zope-schema" ,python-zope-schema)))
7709 (home-page "http://pypi.python.org/pypi/zope.location/")
7710 (synopsis "Zope location library")
7711 (description "Zope.location implements the concept of \"locations\" in
7712 Zope3, which are are special objects that have a structural location.")
7713 (license license:zpl2.1)))
7714
7715 (define-public python2-zope-location
7716 (package-with-python2 python-zope-location))
7717
7718 (define-public python-zope-security
7719 (package
7720 (name "python-zope-security")
7721 (version "4.0.3")
7722 (source
7723 (origin
7724 (method url-fetch)
7725 (uri (string-append "https://pypi.python.org/packages/source/z"
7726 "/zope.security/zope.security-" version ".tar.gz"))
7727 (sha256
7728 (base32
7729 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7730 (build-system python-build-system)
7731 (propagated-inputs
7732 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7733 ("python-zope-proxy" ,python-zope-proxy)
7734 ("python-zope-schema" ,python-zope-schema)))
7735 (native-inputs
7736 `(("python-zope-component" ,python-zope-component)
7737 ("python-zope-configuration" ,python-zope-configuration)
7738 ("python-zope-location" ,python-zope-location)
7739 ("python-zope-testrunner" ,python-zope-testrunner)
7740 ("python-zope-testing" ,python-zope-testing)))
7741 (home-page "http://pypi.python.org/pypi/zope.security")
7742 (synopsis "Zope security framework")
7743 (description "Zope.security provides a generic mechanism to implement
7744 security policies on Python objects.")
7745 (license license:zpl2.1)))
7746
7747 (define-public python2-zope-security
7748 (let ((zope-security (package-with-python2 python-zope-security)))
7749 (package (inherit zope-security)
7750 (propagated-inputs
7751 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7752 ,@(alist-delete
7753 "python-zope-testrunner"
7754 (package-propagated-inputs zope-security)))))))
7755
7756 (define-public python-zope-component
7757 (package
7758 (name "python-zope-component")
7759 (version "4.2.2")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (string-append "https://pypi.python.org/packages/source/z"
7764 "/zope.component/zope.component-" version ".tar.gz"))
7765 (sha256
7766 (base32
7767 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7768 (build-system python-build-system)
7769 (arguments
7770 ;; Skip tests due to circular dependency with python-zope-security.
7771 '(#:tests? #f))
7772 (native-inputs
7773 `(("python-zope-testing" ,python-zope-testing)))
7774 (propagated-inputs
7775 `(("python-zope-event" ,python-zope-event)
7776 ("python-zope-interface" ,python-zope-interface)
7777 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7778 ("python-zope-configuration" ,python-zope-configuration)))
7779 (home-page "https://github.com/zopefoundation/zope.component")
7780 (synopsis "Zope Component Architecture")
7781 (description "Zope.component represents the core of the Zope Component
7782 Architecture. Together with the zope.interface package, it provides
7783 facilities for defining, registering and looking up components.")
7784 (license license:zpl2.1)))
7785
7786 (define-public python2-zope-component
7787 (package-with-python2 python-zope-component))
7788
7789 (define-public python-pythondialog
7790 (package
7791 (name "python-pythondialog")
7792 (version "3.4.0")
7793 (source
7794 (origin
7795 (method url-fetch)
7796 (uri (pypi-uri "pythondialog" version))
7797 (sha256
7798 (base32
7799 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7800 (build-system python-build-system)
7801 (arguments
7802 `(#:phases
7803 (modify-phases %standard-phases
7804 (add-after 'unpack 'patch-path
7805 (lambda* (#:key inputs #:allow-other-keys)
7806 (let* ((dialog (assoc-ref inputs "dialog")))
7807 ;; Since this library really wants to grovel the search path, we
7808 ;; must hardcode dialog's store path into it.
7809 (substitute* "dialog.py"
7810 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7811 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7812 #t))))
7813 #:tests? #f)) ; no test suite
7814 (propagated-inputs
7815 `(("dialog" ,dialog)))
7816 (home-page "http://pythondialog.sourceforge.net/")
7817 (synopsis "Python interface to the UNIX dialog utility")
7818 (description "A Python wrapper for the dialog utility. Its purpose is to
7819 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7820 This allows one to make simple text-mode user interfaces on Unix-like systems")
7821 (license license:lgpl2.1)
7822 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7823
7824 (define-public python2-pythondialog
7825 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7826 (package
7827 (inherit base)
7828 (version (package-version python-pythondialog))
7829 (source (origin
7830 (method url-fetch)
7831 (uri (pypi-uri "python2-pythondialog" version))
7832 (sha256
7833 (base32
7834 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7835
7836 (define-public python-pyrfc3339
7837 (package
7838 (name "python-pyrfc3339")
7839 (version "1.0")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "pyRFC3339" version))
7844 (sha256
7845 (base32
7846 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7847 (build-system python-build-system)
7848 (propagated-inputs
7849 `(("python-pytz" ,python-pytz)))
7850 (native-inputs
7851 `(("python-nose" ,python-nose)))
7852 (home-page "https://github.com/kurtraschke/pyRFC3339")
7853 (synopsis "Python timestamp library")
7854 (description "Python library for generating and parsing RFC 3339-compliant
7855 timestamps.")
7856 (license license:expat)))
7857
7858 (define-public python2-pyrfc3339
7859 (package-with-python2 python-pyrfc3339))
7860
7861 (define-public python-werkzeug
7862 (package
7863 (name "python-werkzeug")
7864 (version "0.11.15")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "Werkzeug" version))
7869 (sha256
7870 (base32
7871 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
7872 (build-system python-build-system)
7873 (native-inputs
7874 `(("python-pytest" ,python-pytest)))
7875 (home-page "http://werkzeug.pocoo.org/")
7876 (synopsis "Utilities for WSGI applications")
7877 (description "One of the most advanced WSGI utility modules. It includes a
7878 powerful debugger, full-featured request and response objects, HTTP utilities to
7879 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7880 uploads, a powerful URL routing system and a bunch of community-contributed
7881 addon modules.")
7882 (license license:x11)))
7883
7884 (define-public python2-werkzeug
7885 (package-with-python2 python-werkzeug))
7886
7887 (define-public python-configobj
7888 (package
7889 (name "python-configobj")
7890 (version "5.0.6")
7891 (source (origin
7892 (method url-fetch)
7893 (uri (string-append
7894 "https://pypi.python.org/packages/source/c/configobj/"
7895 "configobj-" version ".tar.gz"))
7896 (sha256
7897 (base32
7898 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7899 ;; Patch setup.py so it looks for python-setuptools, which is
7900 ;; required to parse the keyword 'install_requires' in setup.py.
7901 (patches (search-patches "python-configobj-setuptools.patch"))))
7902 (build-system python-build-system)
7903 (propagated-inputs
7904 `(("python-six" ,python-six)))
7905 (synopsis "Config file reading, writing and validation")
7906 (description "ConfigObj is a simple but powerful config file reader and
7907 writer: an ini file round tripper. Its main feature is that it is very easy to
7908 use, with a straightforward programmer’s interface and a simple syntax for
7909 config files.")
7910 (home-page "https://github.com/DiffSK/configobj")
7911 (license license:bsd-3)))
7912
7913 (define-public python2-configobj
7914 (package-with-python2 python-configobj))
7915
7916 (define-public python-configargparse
7917 (package
7918 (name "python-configargparse")
7919 (version "0.10.0")
7920 (source (origin
7921 (method url-fetch)
7922 (uri (string-append
7923 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7924 "ConfigArgParse-" version ".tar.gz"))
7925 (sha256
7926 (base32
7927 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7928 (build-system python-build-system)
7929 (arguments
7930 ;; FIXME: Bug in test suite filed upstream:
7931 ;; https://github.com/bw2/ConfigArgParse/issues/32
7932 '(#:tests? #f))
7933 (synopsis "Replacement for argparse")
7934 (description "A drop-in replacement for argparse that allows options to also
7935 be set via config files and/or environment variables.")
7936 (home-page "https://github.com/bw2/ConfigArgParse")
7937 (license license:expat)))
7938
7939 (define-public python2-configargparse
7940 (package-with-python2 python-configargparse))
7941
7942 (define-public python-ndg-httpsclient
7943 (package
7944 (name "python-ndg-httpsclient")
7945 (version "0.4.2")
7946 (source (origin
7947 (method url-fetch)
7948 (uri (pypi-uri "ndg_httpsclient" version))
7949 (sha256
7950 (base32
7951 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
7952 (build-system python-build-system)
7953 (arguments
7954 '(;; The tests appear to require networking.
7955 #:tests? #f))
7956 (propagated-inputs
7957 `(("python-pyopenssl" ,python-pyopenssl)))
7958 (synopsis "HTTPS support for Python's httplib and urllib2")
7959 (description "This is a HTTPS client implementation for httplib and urllib2
7960 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7961 over the default provided with Python and importantly enables full verification
7962 of the SSL peer.")
7963 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7964 (license license:bsd-3)))
7965
7966 ;; python2-openssl requires special care, so package-with-python2 is
7967 ;; insufficient.
7968 (define-public python2-ndg-httpsclient
7969 (package (inherit python-ndg-httpsclient)
7970 (name "python2-ndg-httpsclient")
7971 (arguments `(#:python ,python-2))
7972 (propagated-inputs
7973 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7974
7975 (define-public python-contextlib2
7976 (package
7977 (name "python-contextlib2")
7978 (version "0.4.0")
7979 (source
7980 (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "contextlib2" version))
7983 (sha256
7984 (base32
7985 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7986 (build-system python-build-system)
7987 (arguments
7988 `(#:phases
7989 (modify-phases %standard-phases
7990 (replace 'check
7991 (lambda _ (zero?
7992 (system*
7993 "python" "test_contextlib2.py" "-v")))))))
7994 (home-page "http://contextlib2.readthedocs.org/")
7995 (synopsis "Tools for decorators and context managers")
7996 (description "This module is primarily a backport of the Python
7997 3.2 contextlib to earlier Python versions. Like contextlib, it
7998 provides utilities for common tasks involving decorators and context
7999 managers. It also contains additional features that are not part of
8000 the standard library.")
8001 (license license:psfl)))
8002
8003 (define-public python2-contextlib2
8004 (package-with-python2 python-contextlib2))
8005
8006 (define-public python-texttable
8007 (package
8008 (name "python-texttable")
8009 (version "0.8.4")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "texttable" version))
8014 (sha256
8015 (base32
8016 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8017 (build-system python-build-system)
8018 (arguments '(#:tests? #f)) ; no tests
8019 (home-page "https://github.com/foutaise/texttable/")
8020 (synopsis "Python module for creating simple ASCII tables")
8021 (description "Texttable is a Python module for creating simple ASCII
8022 tables.")
8023 (license license:lgpl2.1+)))
8024
8025 (define-public python2-texttable
8026 (package-with-python2 python-texttable))
8027
8028 (define-public python-websocket-client
8029 (package
8030 (name "python-websocket-client")
8031 (version "0.37.0")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "websocket_client" version))
8036 (sha256
8037 (base32
8038 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8039 (build-system python-build-system)
8040 (propagated-inputs
8041 `(("python-six" ,python-six)))
8042 (home-page "https://github.com/liris/websocket-client")
8043 (synopsis "WebSocket client for Python")
8044 (description "The Websocket-client module provides the low level APIs for
8045 WebSocket usage in Python programs.")
8046 (license license:lgpl2.1+)))
8047
8048 (define-public python2-websocket-client
8049 (package-with-python2 python-websocket-client))
8050
8051 (define-public python-atomicwrites
8052 (package
8053 (name "python-atomicwrites")
8054 (version "1.1.0")
8055 (source (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "atomicwrites" version))
8058 (sha256
8059 (base32
8060 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
8061 (build-system python-build-system)
8062 (synopsis "Atomic file writes in Python")
8063 (description "Library for atomic file writes using platform dependent tools
8064 for atomic file system operations.")
8065 (home-page "https://github.com/untitaker/python-atomicwrites")
8066 (license license:expat)))
8067
8068 (define-public python2-atomicwrites
8069 (package-with-python2 python-atomicwrites))
8070
8071 (define-public python-requests-toolbelt
8072 (package
8073 (name "python-requests-toolbelt")
8074 (version "0.6.2")
8075 (source (origin
8076 (method url-fetch)
8077 (uri (string-append
8078 "https://pypi.python.org/packages/"
8079 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8080 "requests-toolbelt-" version ".tar.gz"))
8081 (sha256
8082 (base32
8083 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8084 (build-system python-build-system)
8085 (native-inputs
8086 `(("python-betamax" ,python-betamax)
8087 ("python-mock" ,python-mock)
8088 ("python-pytest" ,python-pytest)))
8089 (propagated-inputs
8090 `(("python-requests" ,python-requests)))
8091 (synopsis "Extensions to python-requests")
8092 (description "This is a toolbelt of useful classes and functions to be used
8093 with python-requests.")
8094 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8095 (license license:asl2.0)))
8096
8097 (define-public python-click-threading
8098 (package
8099 (name "python-click-threading")
8100 (version "0.2.0")
8101 (source (origin
8102 (method url-fetch)
8103 (uri (string-append
8104 "https://pypi.python.org/packages/"
8105 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8106 "click-threading-" version ".tar.gz"))
8107 (sha256
8108 (base32
8109 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8110 (build-system python-build-system)
8111 (propagated-inputs
8112 `(("python-click" ,python-click)))
8113 (synopsis "Utilities for multithreading in Click")
8114 (description "This package provides utilities for multithreading in Click
8115 applications.")
8116 (home-page "https://github.com/click-contrib/click-threading")
8117 (license license:expat)))
8118
8119 (define-public python-click-log
8120 (package
8121 (name "python-click-log")
8122 (version "0.1.8")
8123 (source (origin
8124 (method url-fetch)
8125 (uri (pypi-uri "click-log" version))
8126 (sha256
8127 (base32
8128 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8129 (build-system python-build-system)
8130 (propagated-inputs
8131 `(("python-click" ,python-click)))
8132 (synopsis "Logging for click applications")
8133 (description "This package provides a Python library for logging Click
8134 applications.")
8135 (home-page "https://github.com/click-contrib/click-log")
8136 (license license:expat)))
8137
8138 (define-public python-apipkg
8139 (package
8140 (name "python-apipkg")
8141 (version "1.4")
8142 (source (origin
8143 (method url-fetch)
8144 (uri (pypi-uri "apipkg" version))
8145 (sha256
8146 (base32
8147 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8148 (build-system python-build-system)
8149 (native-inputs
8150 `(("python-pytest" ,python-pytest)))
8151 (synopsis "Namespace control and lazy-import mechanism")
8152 (description "With apipkg you can control the exported namespace of a Python
8153 package and greatly reduce the number of imports for your users. It is a small
8154 pure Python module that works on virtually all Python versions.")
8155 (home-page "https://bitbucket.org/hpk42/apipkg")
8156 (license license:expat)))
8157
8158 (define-public python2-apipkg
8159 (package-with-python2 python-apipkg))
8160
8161 (define-public python-execnet
8162 (package
8163 (name "python-execnet")
8164 (version "1.4.1")
8165 (source (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "execnet" version))
8168 (sha256
8169 (base32
8170 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8171 (build-system python-build-system)
8172 (arguments
8173 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8174 ;; The two test failures are caused by the lack of an `ssh` executable.
8175 ;; The test suite can be run with pytest after the 'install' phase.
8176 #:tests? #f))
8177 (native-inputs
8178 `(("python-pytest" ,python-pytest)
8179 ("python-setuptools-scm" ,python-setuptools-scm)))
8180 (propagated-inputs
8181 `(("python-apipkg" ,python-apipkg)))
8182 (synopsis "Rapid multi-Python deployment")
8183 (description "Execnet provides a share-nothing model with
8184 channel-send/receive communication for distributing execution across many
8185 Python interpreters across version, platform and network barriers. It has a
8186 minimal and fast API targetting the following uses:
8187 @enumerate
8188 @item distribute tasks to (many) local or remote CPUs
8189 @item write and deploy hybrid multi-process applications
8190 @item write scripts to administer multiple environments
8191 @end enumerate")
8192 (home-page "http://codespeak.net/execnet/")
8193 (license license:expat)))
8194
8195 (define-public python2-execnet
8196 (package-with-python2 python-execnet))
8197
8198 (define-public python-trollius-redis
8199 (package
8200 (name "python-trollius-redis")
8201 (version "0.1.4")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "trollius_redis" version))
8206 (sha256
8207 (base32
8208 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8209 (build-system python-build-system)
8210 (home-page "https://github.com/benjolitz/trollius-redis")
8211 (synopsis "Port of asyncio-redis to trollius")
8212 (description "@code{trollius-redis} is a Redis client for Python
8213 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8214 Redis protocol.")
8215 (license license:bsd-2)))
8216
8217 (define-public python2-trollius-redis
8218 (package-with-python2 python-trollius-redis))
8219
8220 ;;; The software provided by this package was integrated into pytest 2.8.
8221 (define-public python-pytest-cache
8222 (package
8223 (name "python-pytest-cache")
8224 (version "1.0")
8225 (source (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "pytest-cache" version))
8228 (sha256
8229 (base32
8230 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8231 (build-system python-build-system)
8232 (propagated-inputs
8233 `(("python-apipkg" ,python-apipkg)
8234 ("python-execnet" ,python-execnet)
8235 ("python-py" ,python-py)
8236 ("python-pytest" ,python-pytest)))
8237 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8238 (description "The pytest-cache plugin provides tools to rerun failures from
8239 the last py.test invocation.")
8240 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8241 (license license:expat)))
8242
8243 (define-public python2-pytest-cache
8244 (package-with-python2 python-pytest-cache))
8245
8246 (define-public python-pytest-localserver
8247 (package
8248 (name "python-pytest-localserver")
8249 (version "0.3.5")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "pytest-localserver" version))
8253 (sha256
8254 (base32
8255 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8256 (build-system python-build-system)
8257 (arguments
8258 `(#:phases (modify-phases %standard-phases
8259 (replace 'check
8260 (lambda _
8261 (zero? (system* "py.test" "--genscript=runtests.py"))
8262 (zero? (system* "py.test")))))))
8263 (native-inputs
8264 `(("python-pytest" ,python-pytest)
8265 ("python-requests" ,python-requests)
8266 ("python-six" ,python-six)))
8267 (propagated-inputs
8268 `(("python-werkzeug" ,python-werkzeug)))
8269 (synopsis "Py.test plugin to test server connections locally")
8270 (description "Pytest-localserver is a plugin for the pytest testing
8271 framework which enables you to test server connections locally.")
8272 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8273 (license license:expat)))
8274
8275 (define-public python-wsgi-intercept
8276 (package
8277 (name "python-wsgi-intercept")
8278 (version "1.2.2")
8279 (source (origin
8280 (method url-fetch)
8281 (uri (string-append
8282 "https://pypi.python.org/packages/"
8283 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8284 "wsgi_intercept-" version ".tar.gz"))
8285 (sha256
8286 (base32
8287 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8288 (build-system python-build-system)
8289 (propagated-inputs
8290 `(("python-six" ,python-six)))
8291 (native-inputs
8292 `(("python-pytest" ,python-pytest)
8293 ("python-httplib2" ,python-httplib2)
8294 ("python-requests" ,python-requests)
8295 ("python-urllib3" ,python-urllib3)))
8296 (synopsis "Puts a WSGI application in place of a real URI for testing")
8297 (description "Wsgi_intercept installs a WSGI application in place of a real
8298 URI for testing. Testing a WSGI application normally involves starting a
8299 server at a local host and port, then pointing your test code to that address.
8300 Instead, this library lets you intercept calls to any specific host/port
8301 combination and redirect them into a WSGI application importable by your test
8302 program. Thus, you can avoid spawning multiple processes or threads to test
8303 your Web app.")
8304 (home-page "https://github.com/cdent/wsgi-intercept")
8305 (license license:expat)))
8306
8307 (define-public python-pytest-xprocess
8308 (package
8309 (name "python-pytest-xprocess")
8310 (version "0.9.1")
8311 (source (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "pytest-xprocess" version))
8314 (sha256
8315 (base32
8316 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8317 (build-system python-build-system)
8318 (propagated-inputs
8319 `(("python-pytest" ,python-pytest)
8320 ("python-pytest-cache" ,python-pytest-cache)
8321 ("python-psutil" ,python-psutil)))
8322 (synopsis "Pytest plugin to manage external processes across test runs")
8323 (description "Pytest-xprocess is an experimental py.test plugin for managing
8324 processes across test runs.")
8325 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8326 (license license:expat)))
8327
8328 (define-public python-icalendar
8329 (package
8330 (name "python-icalendar")
8331 (version "3.11.2")
8332 (source (origin
8333 (method url-fetch)
8334 (uri (pypi-uri "icalendar" version))
8335 (sha256
8336 (base32
8337 "17rcy6rb9kqjf4p707ivmx7phjq7ngcz3bf7zriwxrqgrjagj7ag"))))
8338 (build-system python-build-system)
8339 (propagated-inputs
8340 `(("python-dateutil-2" ,python-dateutil-2)
8341 ("python-pytz" ,python-pytz)))
8342 (synopsis "Python library for parsing iCalendar files")
8343 (description "The icalendar package is a parser/generator of iCalendar
8344 files for use with Python.")
8345 (home-page "https://github.com/collective/icalendar")
8346 (license license:bsd-2)))
8347
8348 (define-public python-sphinxcontrib-newsfeed
8349 (package
8350 (name "python-sphinxcontrib-newsfeed")
8351 (version "0.1.4")
8352 (source (origin
8353 (method url-fetch)
8354 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8355 (sha256
8356 (base32
8357 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8358 (build-system python-build-system)
8359 (propagated-inputs
8360 `(("python-sphinx" ,python-sphinx)))
8361 (synopsis "News Feed extension for Sphinx")
8362 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8363 Blog, News or Announcements section to a Sphinx website.")
8364 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8365 (license license:bsd-2)))
8366
8367 (define-public python-args
8368 (package
8369 (name "python-args")
8370 (version "0.1.0")
8371 (source (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "args" version))
8374 (sha256
8375 (base32
8376 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8377 (build-system python-build-system)
8378 (home-page "https://github.com/kennethreitz/args")
8379 (synopsis "Command-line argument parser")
8380 (description
8381 "This library provides a Python module to parse command-line arguments.")
8382 (license license:bsd-3)))
8383
8384 (define-public python2-args
8385 (package-with-python2 python-args))
8386
8387 (define-public python-clint
8388 (package
8389 (name "python-clint")
8390 (version "0.5.1")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "clint" version))
8394 (sha256
8395 (base32
8396 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8397 (build-system python-build-system)
8398 (propagated-inputs
8399 `(("python-args" ,python-args)))
8400 (home-page "https://github.com/kennethreitz/clint")
8401 (synopsis "Command-line interface tools")
8402 (description
8403 "Clint is a Python module filled with a set of tools for developing
8404 command-line applications, including tools for colored and indented
8405 output, progress bar display, and pipes.")
8406 (license license:isc)))
8407
8408 (define-public python2-clint
8409 (package-with-python2 python-clint))
8410
8411 (define-public python-astor
8412 (package
8413 (name "python-astor")
8414 (version "0.5")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "astor" version))
8418 (sha256
8419 (base32
8420 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8421 (build-system python-build-system)
8422 (home-page "https://github.com/berkerpeksag/astor")
8423 (synopsis "Read and write Python ASTs")
8424 (description
8425 "Astor is designed to allow easy manipulation of Python source via the
8426 Abstract Syntax Tree.")
8427 (license license:bsd-3)))
8428
8429 (define-public python2-astor
8430 (package-with-python2 python-astor))
8431
8432 (define-public python-rply
8433 (package
8434 (name "python-rply")
8435 (version "0.7.4")
8436 (source (origin
8437 (method url-fetch)
8438 (uri (pypi-uri "rply" version))
8439 (sha256
8440 (base32
8441 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8442 (build-system python-build-system)
8443 (propagated-inputs
8444 `(("python-appdirs" ,python-appdirs)))
8445 (home-page "https://github.com/alex/rply")
8446 (synopsis "Parser generator for Python")
8447 (description
8448 "This package provides a pure Python based parser generator, that also
8449 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8450 with a new public API, and RPython support.")
8451 (license license:bsd-3)))
8452
8453 (define-public python2-rply
8454 (package-with-python2 python-rply))
8455
8456 (define-public python-hy
8457 (package
8458 (name "python-hy")
8459 (version "0.11.1")
8460 (source (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "hy" version))
8463 (sha256
8464 (base32
8465 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8466 (build-system python-build-system)
8467 (propagated-inputs
8468 `(("python-astor" ,python-astor)
8469 ("python-clint" ,python-clint)
8470 ("python-rply" ,python-rply)))
8471 (home-page "http://hylang.org/")
8472 (synopsis "Lisp frontend to Python")
8473 (description
8474 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8475 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8476 Python at your fingertips, in Lisp form.")
8477 (license license:expat)))
8478
8479 (define-public python2-hy
8480 (package-with-python2 python-hy))
8481
8482 (define-public python-rauth
8483 (package
8484 (name "python-rauth")
8485 (version "0.7.2")
8486 (source
8487 (origin
8488 (method url-fetch)
8489 (uri (pypi-uri "rauth" version))
8490 (sha256
8491 (base32
8492 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8493 (build-system python-build-system)
8494 (arguments
8495 `(#:test-target "check"))
8496 (propagated-inputs
8497 `(("python-requests" ,python-requests)))
8498 (home-page "https://github.com/litl/rauth")
8499 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8500 (description
8501 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8502 provides service wrappers for convenient connection initialization and
8503 authenticated session objects providing things like keep-alive.")
8504 (license license:expat)
8505 (properties `((python2-variant . ,(delay python2-rauth))))))
8506
8507 (define-public python2-rauth
8508 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8509 (package
8510 (inherit base)
8511 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8512 ,@(package-native-inputs base))))))
8513
8514 (define-public python2-functools32
8515 (package
8516 (name "python2-functools32")
8517 (version "3.2.3-2")
8518 (source
8519 (origin
8520 (method url-fetch)
8521 (uri (pypi-uri "functools32" version))
8522 (sha256
8523 (base32
8524 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8525 (build-system python-build-system)
8526 (arguments
8527 `(#:python ,python-2
8528 #:tests? #f)) ; no test target
8529 (home-page "https://github.com/MiCHiLU/python-functools32")
8530 (synopsis
8531 "Backport of the functools module from Python 3.2.3")
8532 (description
8533 "This package is a backport of the @code{functools} module from Python
8534 3.2.3 for use with older versions of Python and PyPy.")
8535 (license license:expat)))
8536
8537 (define-public python2-futures
8538 (package
8539 (name "python2-futures")
8540 (version "3.0.3")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "futures" version))
8545 (sha256
8546 (base32
8547 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8548 (build-system python-build-system)
8549 (arguments `(#:python ,python-2))
8550 (home-page "https://github.com/agronholm/pythonfutures")
8551 (synopsis
8552 "Backport of the concurrent.futures package from Python 3.2")
8553 (description
8554 "The concurrent.futures module provides a high-level interface for
8555 asynchronously executing callables. This package backports the
8556 concurrent.futures package from Python 3.2")
8557 (license license:bsd-3)))
8558
8559 (define-public python-promise
8560 (package
8561 (name "python-promise")
8562 (version "0.4.2")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "promise" version))
8567 (sha256
8568 (base32
8569 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8570 (build-system python-build-system)
8571 ;; Tests wants python-futures, which is a python2 only program, and
8572 ;; can't be found by python-promise at test time.
8573 (arguments `(#:tests? #f))
8574 (home-page "https://github.com/syrusakbary/promise")
8575 (synopsis "Promises/A+ implementation for Python")
8576 (description
8577 "Promises/A+ implementation for Python")
8578 (properties `((python2-variant . ,(delay python2-promise))))
8579 (license license:expat)))
8580
8581 (define-public python2-promise
8582 (let ((promise (package-with-python2
8583 (strip-python2-variant python-promise))))
8584 (package (inherit promise)
8585 (arguments (substitute-keyword-arguments (package-arguments promise)
8586 ((#:tests? _) #t)))
8587 (native-inputs
8588 `(("python2-futures" ,python2-futures)
8589 ("python2-pytest" ,python2-pytest)
8590 ,@(package-native-inputs promise))))))
8591
8592 (define-public python-urllib3
8593 (package
8594 (name "python-urllib3")
8595 (version "1.18.1")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "urllib3" version))
8600 (sha256
8601 (base32
8602 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8603 (build-system python-build-system)
8604 (arguments `(#:tests? #f))
8605 (native-inputs
8606 `(;; some packages for tests
8607 ("python-nose" ,python-nose)
8608 ("python-mock" ,python-mock)
8609 ("python-tornado" ,python-tornado)))
8610 (propagated-inputs
8611 `(;; extra packages for https security
8612 ("python-certifi" ,python-certifi)
8613 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8614 ("python-pyasn1" ,python-pyasn1)
8615 ("python-pyopenssl" ,python-pyopenssl)))
8616 (home-page "https://urllib3.readthedocs.org/")
8617 (synopsis "HTTP library with thread-safe connection pooling")
8618 (description
8619 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8620 can reuse the same socket connection for multiple requests, it can POST files,
8621 supports url redirection and retries, and also gzip and deflate decoding.")
8622 (license license:expat)))
8623
8624 (define-public python2-urllib3
8625 (package-with-python2 python-urllib3))
8626
8627 (define-public python-colorama
8628 (package
8629 (name "python-colorama")
8630 (version "0.3.7")
8631 (source
8632 (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "colorama" version))
8635 (sha256
8636 (base32
8637 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
8638 (build-system python-build-system)
8639 (synopsis "Colored terminal text rendering for Python")
8640 (description "Colorama is a Python library for rendering colored terminal
8641 text.")
8642 (home-page "https://pypi.python.org/pypi/colorama")
8643 (license license:bsd-3)))
8644
8645 (define-public python2-colorama
8646 (package-with-python2 python-colorama))
8647
8648 (define-public python-rsa
8649 (package
8650 (name "python-rsa")
8651 (version "3.4.2")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "rsa" version))
8656 (sha256
8657 (base32
8658 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8659 (build-system python-build-system)
8660 (propagated-inputs
8661 `(("python-pyasn1" ,python-pyasn1)))
8662 (synopsis "Pure-Python RSA implementation")
8663 (description "Python-RSA is a pure-Python RSA implementation. It supports
8664 encryption and decryption, signing and verifying signatures, and key
8665 generation according to PKCS#1 version 1.5. It can be used as a Python
8666 library as well as on the command line.")
8667 (home-page "http://stuvel.eu/rsa")
8668 (license license:asl2.0)))
8669
8670 (define-public python2-rsa
8671 (package-with-python2 python-rsa))
8672
8673 (define-public python-pluggy
8674 (package
8675 (name "python-pluggy")
8676 (version "0.3.1")
8677 (source
8678 (origin
8679 (method url-fetch)
8680 (uri (pypi-uri "pluggy" version))
8681 (sha256
8682 (base32
8683 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8684 (build-system python-build-system)
8685 (synopsis "Plugin and hook calling mechanism for Python")
8686 (description "Pluggy is an extraction of the plugin manager as used by
8687 Pytest but stripped of Pytest specific details.")
8688 (home-page "https://pypi.python.org/pypi/pluggy")
8689 (license license:expat)))
8690
8691 (define-public python2-pluggy
8692 (package-with-python2 python-pluggy))
8693
8694 (define-public python-tox
8695 (package
8696 (name "python-tox")
8697 (version "2.3.1")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (pypi-uri "tox" version))
8702 (sha256
8703 (base32
8704 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8705 (build-system python-build-system)
8706 (arguments
8707 ;; FIXME: Tests require pytest-timeout, which itself requires
8708 ;; pytest>=2.8.0 for installation.
8709 '(#:tests? #f))
8710 (propagated-inputs
8711 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8712 ("python-py" ,python-py)
8713 ("python-virtualenv" ,python-virtualenv)))
8714 (native-inputs
8715 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8716 ("python-pytest" ,python-pytest))) ; >= 2.3.5
8717 (home-page "http://tox.testrun.org/")
8718 (synopsis "Virtualenv-based automation of test activities")
8719 (description "Tox is a generic virtualenv management and test command line
8720 tool. It can be used to check that a package installs correctly with
8721 different Python versions and interpreters, or run tests in each type of
8722 supported environment, or act as a frontend to continuous integration
8723 servers.")
8724 (license license:expat)))
8725
8726 (define-public python2-tox
8727 (package-with-python2 python-tox))
8728
8729 (define-public python-jmespath
8730 (package
8731 (name "python-jmespath")
8732 (version "0.9.0")
8733 (source
8734 (origin
8735 (method url-fetch)
8736 (uri (pypi-uri "jmespath" version))
8737 (sha256
8738 (base32
8739 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8740 (build-system python-build-system)
8741 (synopsis "JSON Matching Expressions")
8742 (description "JMESPath (pronounced “james path”) is a Python library that
8743 allows one to declaratively specify how to extract elements from a JSON
8744 document.")
8745 (home-page "https://github.com/jmespath/jmespath.py")
8746 (license license:expat)))
8747
8748 (define-public python2-jmespath
8749 (package-with-python2 python-jmespath))
8750
8751 (define-public python-botocore
8752 (package
8753 (name "python-botocore")
8754 (version "1.4.62")
8755 (source
8756 (origin
8757 (method url-fetch)
8758 (uri (pypi-uri "botocore" version))
8759 (sha256
8760 (base32
8761 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8762 (build-system python-build-system)
8763 (propagated-inputs
8764 `(("python-dateutil" ,python-dateutil-2)
8765 ("python-docutils" ,python-docutils)
8766 ("python-jmespath" ,python-jmespath)))
8767 (native-inputs
8768 `(("python-mock" ,python-mock)
8769 ("python-nose" ,python-nose)
8770 ("behave" ,behave)
8771 ("python-tox" ,python-tox)
8772 ("python-wheel" ,python-wheel)))
8773 (home-page "https://github.com/boto/botocore")
8774 (synopsis "Low-level interface to AWS")
8775 (description "Botocore is a Python library that provides a low-level
8776 interface to the Amazon Web Services (AWS) API.")
8777 (license license:asl2.0)))
8778
8779 (define-public python2-botocore
8780 (package-with-python2 python-botocore))
8781
8782 (define-public awscli
8783 (package
8784 (name "awscli")
8785 (version "1.11.43")
8786 (source
8787 (origin
8788 (method url-fetch)
8789 (uri (pypi-uri name version))
8790 (sha256
8791 (base32
8792 "1x94jmy8ygld8g4pf35zdankh4dx8g8qn3q9j3hrbawqw0vkrp3y"))))
8793 (build-system python-build-system)
8794 (propagated-inputs
8795 `(("python-colorama" ,python-colorama)
8796 ("python-botocore" ,python-botocore)
8797 ("python-s3transfer" ,python-s3transfer)
8798 ("python-docutils" ,python-docutils)
8799 ("python-rsa" ,python-rsa)))
8800 (native-inputs
8801 `(("python-mock" ,python-mock)
8802 ("python-nose" ,python-nose)
8803 ("python-sphinx" ,python-sphinx)
8804 ("python-tox" ,python-tox)
8805 ("python-wheel" ,python-wheel)))
8806 (home-page "https://aws.amazon.com/cli/")
8807 (synopsis "Command line client for AWS")
8808 (description "AWS CLI provides a unified command line interface to the
8809 Amazon Web Services (AWS) API.")
8810 (license license:asl2.0)))
8811
8812 (define-public python-hypothesis
8813 (package
8814 (name "python-hypothesis")
8815 (version "3.1.0")
8816 (source (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "hypothesis" version))
8819 (sha256
8820 (base32
8821 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8822 (build-system python-build-system)
8823 (propagated-inputs
8824 `(("python-flake8" ,python-flake8)
8825 ("python-pytest" ,python-pytest)))
8826 (synopsis "Library for property based testing")
8827 (description "Hypothesis is a library for testing your Python code against a
8828 much larger range of examples than you would ever want to write by hand. It’s
8829 based on the Haskell library, Quickcheck, and is designed to integrate
8830 seamlessly into your existing Python unit testing work flow.")
8831 (home-page "https://github.com/DRMacIver/hypothesis")
8832 (license license:mpl2.0)
8833 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8834
8835 (define-public python2-hypothesis
8836 (let ((hypothesis (package-with-python2
8837 (strip-python2-variant python-hypothesis))))
8838 (package (inherit hypothesis)
8839 (native-inputs
8840 `(("python2-enum34" ,python2-enum34))))))
8841
8842 (define-public python-pytest-subtesthack
8843 (package
8844 (name "python-pytest-subtesthack")
8845 (version "0.1.1")
8846 (source (origin
8847 (method url-fetch)
8848 (uri (pypi-uri "pytest-subtesthack" version))
8849 (sha256
8850 (base32
8851 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8852 (build-system python-build-system)
8853 (propagated-inputs
8854 `(("python-pytest" ,python-pytest)))
8855 (synopsis "Set-up and tear-down fixtures for unit tests")
8856 (description "This plugin allows you to set up and tear down fixtures within
8857 unit test functions that use @code{py.test}. This is useful for using
8858 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8859 function multiple times, without setting up or tearing down fixture state as is
8860 normally the case.")
8861 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8862 (license license:unlicense)))
8863
8864 (define-public python2-pytest-subtesthack
8865 (package-with-python2 python-pytest-subtesthack))
8866
8867 (define-public python-xdo
8868 (package
8869 (name "python-xdo")
8870 (version "0.3")
8871 (source (origin
8872 (method url-fetch)
8873 (uri (string-append
8874 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8875 "python-xdo_" version ".orig.tar.gz"))
8876 (sha256
8877 (base32
8878 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8879 (build-system python-build-system)
8880 (arguments
8881 '(#:phases
8882 (modify-phases %standard-phases
8883 (add-before 'install 'patch-libxdo-path
8884 ;; Hardcode the path of dynamically loaded libxdo library.
8885 (lambda* (#:key inputs #:allow-other-keys)
8886 (let ((libxdo (string-append
8887 (assoc-ref inputs "xdotool")
8888 "/lib/libxdo.so")))
8889 (substitute* "xdo/_xdo.py"
8890 (("find_library\\(\"xdo\"\\)")
8891 (simple-format #f "\"~a\"" libxdo)))
8892 #t))))
8893 #:tests? #f)) ; no tests provided
8894 (propagated-inputs
8895 `(("python-six" ,python-six)))
8896 (inputs
8897 `(("xdotool" ,xdotool)
8898 ("libX11" ,libx11)))
8899 (home-page "https://tracker.debian.org/pkg/python-xdo")
8900 (synopsis "Python library for simulating X11 keyboard/mouse input")
8901 (description "Provides bindings to libxdo for manipulating X11 via simulated
8902 input. (Note that this is mostly a legacy library; you may wish to look at
8903 python-xdo for newer bindings.)")
8904 (license license:bsd-3)))
8905
8906 (define-public python2-xdo
8907 (package-with-python2 python-xdo))
8908
8909 (define-public python-wtforms
8910 (package
8911 (name "python-wtforms")
8912 (version "2.1")
8913 (source
8914 (origin
8915 (method url-fetch)
8916 (uri (pypi-uri "WTForms" version ".zip"))
8917 (sha256
8918 (base32
8919 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8920 (build-system python-build-system)
8921 (arguments
8922 '(#:phases
8923 (modify-phases %standard-phases
8924 (add-after 'unpack 'remove-django-test
8925 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8926 (lambda _
8927 (substitute*
8928 "tests/runtests.py"
8929 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8930 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8931 #t)))))
8932 (native-inputs
8933 `(("unzip" ,unzip)))
8934 (home-page "http://wtforms.simplecodes.com/")
8935 (synopsis
8936 "Form validation and rendering library for Python web development")
8937 (description
8938 "WTForms is a flexible forms validation and rendering library
8939 for Python web development. It is very similar to the web form API
8940 available in Django, but is a standalone package.")
8941 (license license:bsd-3)))
8942
8943 (define-public python2-wtforms
8944 (package-with-python2 python-wtforms))
8945
8946 (define-public python-mako
8947 (package
8948 (name "python-mako")
8949 (version "1.0.6")
8950 (source
8951 (origin
8952 (method url-fetch)
8953 (uri (pypi-uri "Mako" version))
8954 (sha256
8955 (base32
8956 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
8957 (build-system python-build-system)
8958 (propagated-inputs
8959 `(("python-markupsafe" ,python-markupsafe)))
8960 (native-inputs
8961 `(("python-mock" ,python-mock)
8962 ("python-nose" ,python-nose)))
8963 (home-page "http://www.makotemplates.org/")
8964 (synopsis "Templating language for Python")
8965 (description "Mako is a templating language for Python that compiles
8966 templates into Python modules.")
8967 (license license:expat)))
8968
8969 (define-public python2-mako
8970 (package-with-python2 python-mako))
8971
8972 (define-public python-waitress
8973 (package
8974 (name "python-waitress")
8975 (version "0.8.10")
8976 (source
8977 (origin
8978 (method url-fetch)
8979 (uri (pypi-uri "waitress" version))
8980 (sha256
8981 (base32
8982 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8983 (build-system python-build-system)
8984 (home-page "https://github.com/Pylons/waitress")
8985 (synopsis "Waitress WSGI server")
8986 (description "Waitress is meant to be a production-quality pure-Python WSGI
8987 server with very acceptable performance.")
8988 (license license:zpl2.1)))
8989
8990 (define-public python2-waitress
8991 (package-with-python2 python-waitress))
8992
8993 (define-public python-wsgiproxy2
8994 (package
8995 (name "python-wsgiproxy2")
8996 (version "0.4.2")
8997 (source
8998 (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9001 (sha256
9002 (base32
9003 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9004 (build-system python-build-system)
9005 (arguments
9006 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9007 ;; support Python 3:
9008 ;; https://github.com/benoitc/restkit/issues/140
9009 #:tests? #f))
9010 (native-inputs
9011 `(("unzip" ,unzip)
9012 ("python-nose" ,python-nose)
9013 ("python-coverage" ,python-coverage)))
9014 (propagated-inputs
9015 `(("python-six" ,python-six)
9016 ("python-webob" ,python-webob)))
9017 (home-page
9018 "https://github.com/gawel/WSGIProxy2/")
9019 (synopsis "WSGI Proxy with various http client backends")
9020 (description "WSGI turns HTTP requests into WSGI function calls.
9021 WSGIProxy turns WSGI function calls into HTTP requests.
9022 It also includes code to sign requests and pass private data,
9023 and to spawn subprocesses to handle requests.")
9024 (license license:expat)))
9025
9026 (define-public python2-wsgiproxy2
9027 (package-with-python2 python-wsgiproxy2))
9028
9029 (define-public python-pastedeploy
9030 (package
9031 (name "python-pastedeploy")
9032 (version "1.5.2")
9033 (source
9034 (origin
9035 (method url-fetch)
9036 (uri (pypi-uri "PasteDeploy" version))
9037 (sha256
9038 (base32
9039 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9040 (build-system python-build-system)
9041 (native-inputs
9042 `(("python-nose" ,python-nose)))
9043 (home-page "http://pythonpaste.org/deploy/")
9044 (synopsis
9045 "Load, configure, and compose WSGI applications and servers")
9046 (description
9047 "This tool provides code to load WSGI applications and servers from URIs;
9048 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9049 Script provides commands to serve applications based on this configuration
9050 file.")
9051 (license license:expat)))
9052
9053 (define-public python2-pastedeploy
9054 (package-with-python2 python-pastedeploy))
9055
9056 (define-public python-paste
9057 (package
9058 (name "python-paste")
9059 (version "2.0.3")
9060 (source
9061 (origin
9062 (method url-fetch)
9063 (uri (pypi-uri "Paste" version))
9064 (sha256
9065 (base32
9066 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9067 (patches (search-patches "python-paste-remove-website-test.patch"
9068 "python-paste-remove-timing-test.patch"))))
9069 (build-system python-build-system)
9070 (native-inputs
9071 `(("python-nose" ,python-nose)))
9072 (propagated-inputs
9073 `(("python-six" ,python-six)))
9074 (home-page "http://pythonpaste.org")
9075 (synopsis
9076 "Python web development tools, focusing on WSGI")
9077 (description
9078 "Paste provides a variety of web development tools and middleware which
9079 can be nested together to build web applications. Paste's design closely
9080 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9081 (license license:expat)))
9082
9083 (define-public python2-paste
9084 (package-with-python2 python-paste))
9085
9086 (define-public python-pastescript
9087 (package
9088 (name "python-pastescript")
9089 (version "2.0.2")
9090 (source
9091 (origin
9092 (method url-fetch)
9093 (uri (pypi-uri "PasteScript" version))
9094 (sha256
9095 (base32
9096 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9097 (build-system python-build-system)
9098 (native-inputs
9099 `(("python-nose" ,python-nose)))
9100 (propagated-inputs
9101 `(("python-paste" ,python-paste)
9102 ("python-pastedeploy" ,python-pastedeploy)))
9103 (home-page "http://pythonpaste.org/script/")
9104 (arguments
9105 '(;; Unfortunately, this requires the latest unittest2,
9106 ;; but that requires traceback2 which requires linecache2 which requires
9107 ;; unittest2. So we're skipping tests for now.
9108 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9109 ;; so in theory we could get around this situation somehow.)
9110 #:tests? #f))
9111 (synopsis
9112 "Pluggable command line tool for serving web applications and more")
9113 (description
9114 "PasteScript is a plugin-friendly command line tool which provides a
9115 variety of features, from launching web applications to bootstrapping project
9116 layouts.")
9117 (license license:expat)))
9118
9119 (define-public python2-pastescript
9120 (package-with-python2 python-pastescript))
9121
9122 (define-public python-pyquery
9123 (package
9124 (name "python-pyquery")
9125 (version "1.2.17")
9126 (source
9127 (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "pyquery" version))
9130 (sha256
9131 (base32
9132 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9133 (build-system python-build-system)
9134 (native-inputs
9135 `(("python-webob" ,python-webob)
9136 ("python-webtest" ,python-webtest)))
9137 (propagated-inputs
9138 `(("python-lxml" ,python-lxml)
9139 ("python-cssselect" ,python-cssselect)))
9140 (home-page "https://github.com/gawel/pyquery")
9141 (synopsis "Make jQuery-like queries on xml documents")
9142 (description "pyquery allows you to make jQuery queries on xml documents.
9143 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9144 fast xml and html manipulation.")
9145 (license license:bsd-3)))
9146
9147 (define-public python2-pyquery
9148 (package-with-python2 python-pyquery))
9149
9150 (define-public python-webtest
9151 (package
9152 (name "python-webtest")
9153 (version "2.0.20")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "WebTest" version))
9158 (sha256
9159 (base32
9160 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9161 (build-system python-build-system)
9162 (arguments
9163 `(;; Unfortunately we have to disable tests!
9164 ;; This release of WebTest is pinned to python-nose < 1.3,
9165 ;; but older versions of python-nose are plagued with the following
9166 ;; bug(s), which rears its ugly head during test execution:
9167 ;; https://github.com/nose-devs/nose/issues/759
9168 ;; https://github.com/nose-devs/nose/pull/811
9169 #:tests? #f))
9170 ;; Commented out code is no good, but in this case, once tests
9171 ;; are ready to be enabled again, we should put the following
9172 ;; in place:
9173 ;; (native-inputs
9174 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9175 ;; ; but see above comment
9176 ;; ("python-coverage" ,python-coverage)
9177 ;; ("python-mock" ,python-mock)
9178 ;; ("python-pastedeploy" ,python-pastedeploy)
9179 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9180 ;; ("python-pyquery" ,python-pyquery)))
9181 (propagated-inputs
9182 `(("python-waitress" ,python-waitress)
9183 ("python-webob" ,python-webob)
9184 ("python-six" ,python-six)
9185 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9186 (home-page "http://webtest.pythonpaste.org/")
9187 (synopsis "Helper to test WSGI applications")
9188 (description "Webtest allows you to test your Python web applications
9189 without starting an HTTP server. It supports anything that supports the
9190 minimum of WSGI.")
9191 (license license:expat)))
9192
9193 (define-public python2-webtest
9194 (package-with-python2 python-webtest))
9195
9196 (define-public python-anyjson
9197 (package
9198 (name "python-anyjson")
9199 (version "0.3.3")
9200 (source
9201 (origin
9202 (method url-fetch)
9203 (uri (pypi-uri "anyjson" version))
9204 (sha256
9205 (base32
9206 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9207 (build-system python-build-system)
9208 (arguments
9209 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9210 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9211 ;; whatever) so this transformation needs to be done before the tests
9212 ;; can be run. Maybe we could add a build step to transform beforehand
9213 ;; but it could be annoying/difficult.
9214 ;; We can enable tests for the Python 2 version, though, and do below.
9215 #:tests? #f))
9216 (home-page "http://bitbucket.org/runeh/anyjson/")
9217 (synopsis
9218 "Wraps best available JSON implementation in a common interface")
9219 (description
9220 "Anyjson loads whichever is the fastest JSON module installed
9221 and provides a uniform API regardless of which JSON implementation is used.")
9222 (license license:bsd-3)
9223 (properties `((python2-variant . ,(delay python2-anyjson))))))
9224
9225 (define-public python2-anyjson
9226 (let ((anyjson (package-with-python2
9227 (strip-python2-variant python-anyjson))))
9228 (package
9229 (inherit anyjson)
9230 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9231 #:tests? #t
9232 ,@(package-arguments anyjson)))
9233 (native-inputs `(("python2-nose" ,python2-nose))))))
9234
9235 (define-public python-amqp
9236 (package
9237 (name "python-amqp")
9238 (version "1.4.9")
9239 (source
9240 (origin
9241 (method url-fetch)
9242 (uri (pypi-uri "amqp" version))
9243 (sha256
9244 (base32
9245 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9246 (build-system python-build-system)
9247 (native-inputs
9248 `(("python-nose" ,python-nose)
9249 ("python-mock" ,python-mock)))
9250 (home-page "http://github.com/celery/py-amqp")
9251 (synopsis
9252 "Low-level AMQP client for Python (fork of amqplib)")
9253 (description
9254 "This is a fork of amqplib which was originally written by Barry Pederson.
9255 It is maintained by the Celery project, and used by kombu as a pure python
9256 alternative when librabbitmq is not available.")
9257 (license license:lgpl2.1+)
9258 (properties `((python2-variant . ,(delay python2-amqp))))))
9259
9260 (define-public python2-amqp
9261 (let ((amqp (package-with-python2
9262 (strip-python2-variant python-amqp))))
9263 (package
9264 (inherit amqp)
9265 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9266 ;; unmaintained. Weirdly, does not do this on the python 3
9267 ;; version?
9268 #:tests? #f
9269 ,@(package-arguments amqp))))))
9270
9271 (define-public python-kombu
9272 (package
9273 (name "python-kombu")
9274 (version "3.0.37")
9275 (source
9276 (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "kombu" version))
9279 (sha256
9280 (base32
9281 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9282 (build-system python-build-system)
9283 (native-inputs
9284 `(("python-mock" ,python-mock)
9285 ("python-nose" ,python-nose)))
9286 (propagated-inputs
9287 `(("python-anyjson" ,python-anyjson)
9288 ("python-amqp" ,python-amqp)
9289 ("python-redis" ,python-redis)))
9290 (home-page "http://kombu.readthedocs.org")
9291 (synopsis "Message passing library for Python")
9292 (description "The aim of Kombu is to make messaging in Python as easy as
9293 possible by providing an idiomatic high-level interface for the AMQ protocol,
9294 and also provide proven and tested solutions to common messaging problems.
9295 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9296 message orientation, queuing, routing, reliability and security, for which the
9297 RabbitMQ messaging server is the most popular implementation.")
9298 (license license:bsd-3)
9299 (properties `((python2-variant . ,(delay python2-kombu))))))
9300
9301 (define-public python2-kombu
9302 (let ((kombu (package-with-python2
9303 (strip-python2-variant python-kombu))))
9304 (package
9305 (inherit kombu)
9306 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9307 ,@(package-native-inputs kombu))))))
9308
9309 (define-public python-billiard
9310 (package
9311 (name "python-billiard")
9312 (version "3.3.0.23")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "billiard" version))
9317 (sha256
9318 (base32
9319 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9320 (build-system python-build-system)
9321 (native-inputs
9322 `(("python-nose" ,python-nose)))
9323 (home-page "http://github.com/celery/billiard")
9324 (synopsis
9325 "Python multiprocessing fork with improvements and bugfixes")
9326 (description
9327 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9328 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9329 pyprocessing package. This standalone variant is intended to be compatible with
9330 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9331 (license license:bsd-3)
9332 (properties `((python2-variant . ,(delay python2-billiard))))))
9333
9334 (define-public python2-billiard
9335 (let ((billiard (package-with-python2
9336 (strip-python2-variant python-billiard))))
9337 (package
9338 (inherit billiard)
9339 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9340 ("python2-mock" ,python2-mock)
9341 ,@(package-native-inputs billiard))))))
9342
9343 (define-public python-celery
9344 (package
9345 (name "python-celery")
9346 (version "3.1.24")
9347 (source
9348 (origin
9349 (method url-fetch)
9350 (uri (pypi-uri "celery" version))
9351 (sha256
9352 (base32
9353 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9354 (build-system python-build-system)
9355 (arguments
9356 `(#:phases
9357 (modify-phases %standard-phases
9358 ;; These tests break with Python 3.5:
9359 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9360 (replace 'check
9361 (lambda _
9362 (zero?
9363 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9364 (native-inputs
9365 `(("python-nose" ,python-nose)))
9366 (propagated-inputs
9367 `(("python-pytz" ,python-pytz)
9368 ("python-billiard" ,python-billiard)
9369 ("python-kombu" ,python-kombu)))
9370 (home-page "http://celeryproject.org")
9371 (synopsis "Distributed Task Queue")
9372 (description "Celery is an asynchronous task queue/job queue based on
9373 distributed message passing. It is focused on real-time operation, but
9374 supports scheduling as well. The execution units, called tasks, are executed
9375 concurrently on a single or more worker servers using multiprocessing,
9376 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9377 synchronously (wait until ready).")
9378 (license license:bsd-3)
9379 (properties `((python2-variant . ,(delay python2-celery))))))
9380
9381 (define-public python2-celery
9382 (let ((celery (package-with-python2
9383 (strip-python2-variant python-celery))))
9384 (package
9385 (inherit celery)
9386 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9387 ("python2-mock" ,python2-mock)
9388 ,@(package-native-inputs celery))))))
9389
9390 (define-public python-translitcodec
9391 (package
9392 (name "python-translitcodec")
9393 (version "0.4.0")
9394 (source
9395 (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "translitcodec" version))
9398 (sha256
9399 (base32
9400 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9401 (build-system python-build-system)
9402 (arguments
9403 `(#:tests? #f)) ; no tests provided
9404 (home-page
9405 "https://github.com/claudep/translitcodec")
9406 (synopsis
9407 "Unicode to 8-bit charset transliteration codec")
9408 (description
9409 "This package contains codecs for transliterating ISO 10646 texts into
9410 best-effort representations using smaller coded character sets (ASCII,
9411 ISO 8859, etc.).")
9412 (license license:expat)))
9413
9414 (define-public python2-translitcodec
9415 (package-with-python2 python-translitcodec))
9416
9417 (define-public python-editor
9418 (package
9419 (name "python-editor")
9420 (version "0.5")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "python-editor" version))
9425 (sha256
9426 (base32
9427 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9428 (build-system python-build-system)
9429 (home-page
9430 "https://github.com/fmoo/python-editor")
9431 (synopsis
9432 "Programmatically open an editor, capture the result")
9433 (description
9434 "python-editor is a library that provides the editor module for
9435 programmatically interfacing with your system's $EDITOR.")
9436 (license license:asl2.0)))
9437
9438 (define-public python2-editor
9439 (package-with-python2 python-editor))
9440
9441 (define-public python-sphinxcontrib-programoutput
9442 (package
9443 (name "python-sphinxcontrib-programoutput")
9444 (version "0.8")
9445 (source (origin
9446 (method url-fetch)
9447 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9448 (sha256
9449 (base32
9450 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9451 (build-system python-build-system)
9452 (propagated-inputs
9453 `(("python-sphinx" ,python-sphinx)))
9454 (synopsis "Sphinx extension to include program output")
9455 (description "A Sphinx extension to literally insert the output of arbitrary
9456 commands into documents, helping you to keep your command examples up to date.")
9457 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
9458 (license license:bsd-2)))
9459
9460 (define-public python2-sphinxcontrib-programoutput
9461 (package-with-python2 python-sphinxcontrib-programoutput))
9462
9463 (define-public python-sphinx-repoze-autointerface
9464 (package
9465 (name "python-sphinx-repoze-autointerface")
9466 (version "0.8")
9467 (source (origin
9468 (method url-fetch)
9469 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9470 (sha256
9471 (base32
9472 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
9473 (build-system python-build-system)
9474 (propagated-inputs
9475 `(("python-sphinx" ,python-sphinx)
9476 ("python-zope-interface" ,python-zope-interface)))
9477 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9478 (description "This package defines an extension for the Sphinx documentation
9479 system. The extension allows generation of API documentation by
9480 introspection of @code{zope.interface} instances in code.")
9481 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
9482 (license license:repoze)))
9483
9484 (define-public python2-sphinx-repoze-autointerface
9485 (package-with-python2 python-sphinx-repoze-autointerface))
9486
9487 (define-public python-psycopg2
9488 (package
9489 (name "python-psycopg2")
9490 (version "2.6.1")
9491 (source
9492 (origin
9493 (method url-fetch)
9494 (uri (pypi-uri "psycopg2" version))
9495 (sha256
9496 (base32
9497 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9498 (build-system python-build-system)
9499 (arguments
9500 ;; Tests would require a postgresql database "psycopg2_test"
9501 ;; and a running postgresql database management service.
9502 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9503 (inputs
9504 `(("postgresql" ,postgresql))) ; libpq
9505 (home-page "http://initd.org/psycopg/")
9506 (synopsis "Python PostgreSQL adapter")
9507 (description
9508 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
9509 (license license:lgpl3+)))
9510
9511 (define-public python2-psycopg2
9512 (package-with-python2 python-psycopg2))
9513
9514 (define-public python-vobject
9515 (package
9516 (name "python-vobject")
9517 (version "0.9.2")
9518 (source (origin
9519 (method url-fetch)
9520 (uri (pypi-uri "vobject" version))
9521 (sha256
9522 (base32
9523 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9524 (build-system python-build-system)
9525 (arguments
9526 '(;; The test suite relies on some non-portable Windows interfaces.
9527 #:tests? #f))
9528 (propagated-inputs
9529 `(("python-dateutil-2" ,python-dateutil-2)
9530 ("python-pyicu" ,python-pyicu)))
9531 (synopsis "Parse and generate vCard and vCalendar files")
9532 (description "Vobject is intended to be a full featured Python package for
9533 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9534 are supported and well tested. vCard 3.0 files are supported, and all data
9535 should be imported, but only a few components are understood in a sophisticated
9536 way.")
9537 (home-page "http://eventable.github.io/vobject/")
9538 (license license:asl2.0)))
9539
9540 (define-public python2-vobject
9541 (package-with-python2 python-vobject))
9542
9543 (define-public python-munkres
9544 (package
9545 (name "python-munkres")
9546 (version "1.0.8")
9547 (source (origin
9548 (method url-fetch)
9549 (uri (pypi-uri "munkres" version))
9550 (sha256
9551 (base32
9552 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9553 (build-system python-build-system)
9554 (arguments
9555 '(#:tests? #f)) ; no test suite
9556 (home-page "http://software.clapper.org/munkres/")
9557 (synopsis "Implementation of the Munkres algorithm")
9558 (description "The Munkres module provides an implementation of the Munkres
9559 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9560 useful for solving the Assignment Problem.")
9561 (license license:bsd-3)))
9562
9563 (define-public python2-munkres
9564 (package-with-python2 python-munkres))
9565
9566 (define-public python-flask
9567 (package
9568 (name "python-flask")
9569 (version "0.11.1")
9570 (source (origin
9571 (method url-fetch)
9572 (uri (pypi-uri "Flask" version))
9573 (sha256
9574 (base32
9575 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
9576 (build-system python-build-system)
9577 (propagated-inputs
9578 `(("python-itsdangerous" ,python-itsdangerous)
9579 ("python-jinja2" ,python-jinja2)
9580 ("python-click" ,python-click)
9581 ("python-werkzeug" ,python-werkzeug)))
9582 (home-page "https://github.com/mitsuhiko/flask/")
9583 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9584 (description "Flask is a micro web framework based on the Werkzeug toolkit
9585 and Jinja2 template engine. It is called a micro framework because it does not
9586 presume or force a developer to use a particular tool or library.")
9587 (license license:bsd-3)))
9588
9589 (define-public python2-flask
9590 (package-with-python2 python-flask))
9591
9592 (define-public python-flask-wtf
9593 (package
9594 (name "python-flask-wtf")
9595 (version "0.13.1")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "Flask-WTF" version))
9600 (sha256
9601 (base32
9602 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
9603 (build-system python-build-system)
9604 (propagated-inputs
9605 `(("python-flask-babel" ,python-flask-babel)
9606 ("python-babel" ,python-babel)
9607 ("python-wtforms" ,python-wtforms)))
9608 (native-inputs
9609 `(("python-nose" ,python-nose)))
9610 (home-page "https://github.com/lepture/flask-wtf")
9611 (synopsis "Simple integration of Flask and WTForms")
9612 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
9613 upload, and reCAPTCHA.")
9614 (license license:bsd-3)))
9615
9616 (define-public python2-flask-wtf
9617 (package-with-python2 python-flask-wtf))
9618
9619 (define-public python-flask-multistatic
9620 (package
9621 (name "python-flask-multistatic")
9622 (version "1.0")
9623 (source
9624 (origin
9625 (method url-fetch)
9626 (uri (pypi-uri "flask-multistatic" version))
9627 (sha256
9628 (base32
9629 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
9630 (build-system python-build-system)
9631 (propagated-inputs
9632 `(("python-flask" ,python-flask)))
9633 (home-page "https://pagure.io/flask-multistatic")
9634 (synopsis "Flask plugin to allow overriding static files")
9635 (description "@code{flask-multistatic} is a flask plugin that adds support
9636 for overriding static files.")
9637 (license license:gpl3+)))
9638
9639 (define-public python2-flask-multistatic
9640 (package-with-python2 python-flask-multistatic))
9641
9642 (define-public python-cookies
9643 (package
9644 (name "python-cookies")
9645 (version "2.2.1")
9646 (source (origin
9647 (method url-fetch)
9648 (uri (pypi-uri "cookies" version))
9649 (sha256
9650 (base32
9651 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9652 (build-system python-build-system)
9653 (arguments
9654 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9655 #:tests? #f))
9656 (native-inputs
9657 `(("python-pytest" ,python2-pytest)))
9658 (synopsis "HTTP cookie parser and renderer")
9659 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9660 Python.")
9661 (home-page "https://gitlab.com/sashahart/cookies")
9662 (license license:expat)))
9663
9664 (define-public python2-cookies
9665 (package-with-python2 python-cookies))
9666
9667 (define-public python-responses
9668 (package
9669 (name "python-responses")
9670 (version "0.5.1")
9671 (source (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "responses" version))
9674 (sha256
9675 (base32
9676 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9677 (build-system python-build-system)
9678 (arguments
9679 `(;; Test suite is not distributed:
9680 ;; https://github.com/getsentry/responses/issues/38
9681 #:tests? #f))
9682 (native-inputs
9683 `(("python-mock" ,python-mock)))
9684 (propagated-inputs
9685 `(("python-requests" ,python-requests)
9686 ("python-cookies" ,python-cookies)
9687 ("python-six" ,python-six)))
9688 (home-page "https://github.com/getsentry/responses")
9689 (synopsis "Utility for mocking out the `requests` Python library")
9690 (description "A utility library for mocking out the `requests` Python
9691 library.")
9692 (license license:asl2.0)))
9693
9694 (define-public python2-responses
9695 (package-with-python2 python-responses))
9696
9697 (define-public python-whoosh
9698 (package
9699 (name "python-whoosh")
9700 (version "2.7.4")
9701 (source
9702 (origin
9703 (method url-fetch)
9704 (uri (pypi-uri "Whoosh" version))
9705 (sha256
9706 (base32
9707 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9708 (build-system python-build-system)
9709 (native-inputs
9710 `(("python-pytest" ,python-pytest)))
9711 (home-page "http://bitbucket.org/mchaput/whoosh")
9712 (synopsis "Full text indexing, search, and spell checking library")
9713 (description
9714 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9715 checking library.")
9716 (license license:bsd-2)))
9717
9718 (define-public python2-whoosh
9719 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9720 (package (inherit whoosh)
9721 (propagated-inputs
9722 `(("python2-backport-ssl-match-hostname"
9723 ,python2-backport-ssl-match-hostname)
9724 ,@(package-propagated-inputs whoosh))))))
9725
9726 (define-public python-pathlib
9727 (package
9728 (name "python-pathlib")
9729 (version "1.0.1")
9730 (source (origin
9731 (method url-fetch)
9732 (uri (pypi-uri "pathlib" version))
9733 (sha256
9734 (base32
9735 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9736 (build-system python-build-system)
9737 ;; The tests depend on the internal "test" module, which does not provide
9738 ;; a stable interface.
9739 (arguments `(#:tests? #f))
9740 (home-page "https://pathlib.readthedocs.org/")
9741 (synopsis "Object-oriented file system paths")
9742 (description "Pathlib offers a set of classes to handle file system paths.
9743 It offers the following advantages over using string objects:
9744
9745 @enumerate
9746 @item No more cumbersome use of os and os.path functions. Everything can
9747 be done easily through operators, attribute accesses, and method calls.
9748 @item Embodies the semantics of different path types. For example,
9749 comparing Windows paths ignores casing.
9750 @item Well-defined semantics, eliminating any inconsistencies or
9751 ambiguities (forward vs. backward slashes, etc.).
9752 @end enumerate
9753
9754 Note: In Python 3.4, pathlib is now part of the standard library. For other
9755 Python versions please consider python-pathlib2 instead, which tracks the
9756 standard library module. This module (python-pathlib) isn't maintained
9757 anymore.")
9758 (license license:expat)))
9759
9760 (define-public python2-pathlib
9761 (package-with-python2 python-pathlib))
9762
9763 (define-public python2-pathlib2
9764 (package
9765 (name "python2-pathlib2")
9766 (version "2.1.0")
9767 (source (origin
9768 (method url-fetch)
9769 (uri (pypi-uri "pathlib2" version))
9770 (sha256
9771 (base32
9772 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9773 (build-system python-build-system)
9774 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9775 ;; version is 3.4 which already includes this package as part of the
9776 ;; standard library.
9777 (arguments
9778 `(#:python ,python-2))
9779 (native-inputs
9780 `(("python2-six" ,python2-six)))
9781 (home-page "http://pypi.python.org/pypi/pathlib2/")
9782 (synopsis "Object-oriented file system paths - backport of standard
9783 pathlib module")
9784 (description "The goal of pathlib2 is to provide a backport of standard
9785 pathlib module which tracks the standard library module, so all the newest
9786 features of the standard pathlib can be used also on older Python versions.
9787
9788 Pathlib offers a set of classes to handle file system paths. It offers the
9789 following advantages over using string objects:
9790
9791 @enumerate
9792 @item No more cumbersome use of os and os.path functions. Everything can
9793 be done easily through operators, attribute accesses, and method calls.
9794 @item Embodies the semantics of different path types. For example,
9795 comparing Windows paths ignores casing.
9796 @item Well-defined semantics, eliminating any inconsistencies or
9797 ambiguities (forward vs. backward slashes, etc.).
9798 @end enumerate")
9799 (license license:expat)))
9800
9801 (define-public python-jellyfish
9802 (package
9803 (name "python-jellyfish")
9804 (version "0.5.6")
9805 (source (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "jellyfish" version))
9808 (sha256
9809 (base32
9810 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9811 (build-system python-build-system)
9812 (native-inputs
9813 `(("python-pytest" ,python-pytest)))
9814 (home-page "https://github.com/jamesturk/jellyfish")
9815 (synopsis "Approximate and phonetic matching of strings")
9816 (description "Jellyfish uses a variety of string comparison and phonetic
9817 encoding algorithms to do fuzzy string matching.")
9818 (license license:bsd-2)
9819 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9820
9821 (define-public python2-jellyfish
9822 (let ((jellyfish (package-with-python2
9823 (strip-python2-variant python-jellyfish))))
9824 (package (inherit jellyfish)
9825 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9826 ,@(package-native-inputs jellyfish))))))
9827
9828 (define-public python2-unicodecsv
9829 (package
9830 (name "python2-unicodecsv")
9831 (version "0.14.1")
9832 (source (origin
9833 (method url-fetch)
9834 ;; The test suite is not included in the PyPi release.
9835 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9836 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9837 "archive/" version ".tar.gz"))
9838 (file-name (string-append name "-" version ".tar.gz"))
9839 (sha256
9840 (base32
9841 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9842 (build-system python-build-system)
9843 (arguments
9844 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9845 #:python ,python-2))
9846 (native-inputs
9847 `(("python2-unittest2" ,python2-unittest2)))
9848 (home-page "https://github.com/jdunck/python-unicodecsv")
9849 (synopsis "Unicode CSV module for Python 2")
9850 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9851 module, adding support for Unicode strings.")
9852 (license license:bsd-2)))
9853
9854 (define-public python-rarfile
9855 (package
9856 (name "python-rarfile")
9857 (version "2.8")
9858 (source (origin
9859 (method url-fetch)
9860 (uri (pypi-uri "rarfile" version))
9861 (sha256
9862 (base32
9863 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9864 (build-system python-build-system)
9865 (arguments
9866 '(#:phases
9867 (modify-phases %standard-phases
9868 (replace 'check
9869 ;; Many tests fail, but the installation proceeds.
9870 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9871 (native-inputs
9872 `(("which" ,which))) ; required for tests
9873 (propagated-inputs
9874 `(("libarchive" ,libarchive)))
9875 (home-page "https://github.com/markokr/rarfile")
9876 (synopsis "RAR archive reader for Python")
9877 (description "This is Python module for RAR archive reading. The interface
9878 is made as zipfile like as possible.")
9879 (license license:isc)))
9880
9881 (define-public python2-rarfile
9882 (package-with-python2 python-rarfile))
9883
9884 (define-public python-magic
9885 (package
9886 (name "python-magic")
9887 (version "0.4.3")
9888 (source
9889 (origin
9890 (method url-fetch)
9891 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9892 version ".tar.gz"))
9893 (sha256
9894 (base32
9895 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9896 (file-name (string-append name "-" version "-checkout"))))
9897 (build-system python-build-system)
9898 (arguments
9899 ;; The tests are unreliable, so don't run them. The tests fail
9900 ;; under Python3 because they were written for Python2 and
9901 ;; contain import statements that do not work in Python3. One of
9902 ;; the tests fails under Python2 because its assertions are
9903 ;; overly stringent; it relies on comparing output strings which
9904 ;; are brittle and can change depending on the version of
9905 ;; libmagic being used and the system on which the test is
9906 ;; running. In my case, under GuixSD 0.10.0, only one test
9907 ;; failed, and it seems to have failed only because the version
9908 ;; of libmagic that is packaged in Guix outputs a slightly
9909 ;; different (but not wrong) string than the one that the test
9910 ;; expected.
9911 '(#:tests? #f
9912 #:phases (modify-phases %standard-phases
9913 ;; Replace a specific method call with a hard-coded
9914 ;; path to the necessary libmagic.so file in the
9915 ;; store. If we don't do this, then the method call
9916 ;; will fail to find the libmagic.so file, which in
9917 ;; turn will cause any application using
9918 ;; python-magic to fail.
9919 (add-before 'build 'hard-code-path-to-libmagic
9920 (lambda* (#:key inputs #:allow-other-keys)
9921 (let ((file (assoc-ref inputs "file")))
9922 (substitute* "magic.py"
9923 (("ctypes.util.find_library\\('magic'\\)")
9924 (string-append "'" file "/lib/libmagic.so'")))
9925 #t)))
9926 (add-before 'install 'disable-egg-compression
9927 (lambda _
9928 (let ((port (open-file "setup.cfg" "a")))
9929 (display "\n[easy_install]\nzip_ok = 0\n"
9930 port)
9931 (close-port port)
9932 #t))))))
9933 (inputs
9934 ;; python-magic needs to be able to find libmagic.so.
9935 `(("file" ,file)))
9936 (home-page "https://github.com/ahupp/python-magic")
9937 (synopsis "File type identification using libmagic")
9938 (description
9939 "This module uses ctypes to access the libmagic file type
9940 identification library. It makes use of the local magic database and
9941 supports both textual and MIME-type output. Note that this module and
9942 the python-file module both provide a \"magic.py\" file; these two
9943 modules, which are different and were developed separately, both serve
9944 the same purpose: to provide Python bindings for libmagic.")
9945 (license license:expat)))
9946
9947 (define-public python2-magic
9948 (package-with-python2 python-magic))
9949
9950 (define-public python2-s3cmd
9951 (package
9952 (name "python2-s3cmd")
9953 (version "1.6.1")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9958 "s3cmd-" version ".tar.gz"))
9959 (sha256
9960 (base32
9961 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9962 (build-system python-build-system)
9963 (arguments
9964 ;; s3cmd is written for python2 only and contains no tests.
9965 `(#:python ,python-2
9966 #:tests? #f))
9967 (propagated-inputs
9968 `(("python2-dateutil" ,python2-dateutil)
9969 ;; The python-file package also provides a magic.py module.
9970 ;; This is an unfortunate state of affairs; however, s3cmd
9971 ;; fails to install if it cannot find specifically the
9972 ;; python-magic package. Thus we include it, instead of using
9973 ;; python-file. Ironically, s3cmd sometimes works better
9974 ;; without libmagic bindings at all:
9975 ;; https://github.com/s3tools/s3cmd/issues/198
9976 ("python2-magic" ,python2-magic)))
9977 (home-page "http://s3tools.org/s3cmd")
9978 (synopsis "Command line tool for S3-compatible storage services")
9979 (description
9980 "S3cmd is a command line tool for uploading, retrieving and managing data
9981 in storage services that are compatible with the Amazon Simple Storage
9982 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9983 GnuPG encryption, and more. It also supports management of Amazon's
9984 CloudFront content delivery network.")
9985 (license license:gpl2+)))
9986
9987 (define-public python-pkgconfig
9988 (package
9989 (name "python-pkgconfig")
9990 (version "1.1.0")
9991 (source
9992 (origin
9993 (method url-fetch)
9994 (uri (pypi-uri "pkgconfig" version))
9995 (sha256
9996 (base32
9997 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9998 (build-system python-build-system)
9999 (native-inputs
10000 `(("python-nose" ,python-nose)))
10001 (inputs
10002 `(("pkg-config" ,pkg-config)))
10003 (arguments
10004 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10005 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10006 #:tests? #f
10007 ;; Hard-code the path to pkg-config.
10008 #:phases
10009 (modify-phases %standard-phases
10010 (add-before
10011 'build 'patch
10012 (lambda _
10013 (substitute* "pkgconfig/pkgconfig.py"
10014 (("cmd = 'pkg-config")
10015 (string-append "cmd = '" (which "pkg-config"))))
10016 #t)))))
10017 (home-page "http://github.com/matze/pkgconfig")
10018 (synopsis "Python interface for pkg-config")
10019 (description "This module provides a Python interface to pkg-config. It
10020 can be used to find all pkg-config packages, check if a package exists,
10021 check if a package meets certain version requirements, query CFLAGS and
10022 LDFLAGS and parse the output to build extensions with setup.py.")
10023 (license license:expat)))
10024
10025 (define-public python2-pkgconfig
10026 (package-with-python2 python-pkgconfig))
10027
10028 (define-public python-bz2file
10029 (package
10030 (name "python-bz2file")
10031 (version "0.98")
10032 (source
10033 (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "bz2file" version))
10036 (sha256
10037 (base32
10038 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10039 (build-system python-build-system)
10040 (arguments
10041 `(#:tests? #f)) ; Tests use deprecated python modules.
10042 (home-page "https://github.com/nvawda/bz2file")
10043 (synopsis "Read and write bzip2-compressed files")
10044 (description
10045 "Bz2file is a Python library for reading and writing bzip2-compressed
10046 files. It contains a drop-in replacement for the I/O interface in the
10047 standard library's @code{bz2} module, including features from the latest
10048 development version of CPython that are not available in older releases.")
10049 (license license:asl2.0)
10050 (properties `((python2-variant . ,(delay python2-bz2file))))))
10051
10052 (define-public python2-bz2file
10053 (let ((base (package-with-python2
10054 (strip-python2-variant python-bz2file))))
10055 (package
10056 (inherit base)
10057 (arguments
10058 `(#:python ,python-2
10059 #:phases
10060 (modify-phases %standard-phases
10061 ;; 'python setup.py test' does not work as of 0.98.
10062 ;; There is only the one test file, so we run it directly.
10063 (replace 'check
10064 (lambda _ (zero? (system* "python"
10065 "test_bz2file.py"))))))))))
10066
10067 (define-public python-future
10068 (package
10069 (name "python-future")
10070 (version "0.15.2")
10071 (source
10072 (origin
10073 (method url-fetch)
10074 (uri (pypi-uri "future" version))
10075 (sha256
10076 (base32
10077 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10078 (build-system python-build-system)
10079 ;; Many tests connect to the network or are otherwise flawed.
10080 ;; https://github.com/PythonCharmers/python-future/issues/210
10081 (arguments
10082 `(#:tests? #f))
10083 (home-page "http://python-future.org")
10084 (synopsis "Single-source support for Python 3 and 2")
10085 (description
10086 "@code{python-future} is the missing compatibility layer between Python 2 and
10087 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10088 to support both Python 2 and Python 3 with minimal overhead.")
10089 (license license:expat)))
10090
10091 (define-public python2-future
10092 (package-with-python2 python-future))
10093
10094 (define-public python-cysignals
10095 (package
10096 (name "python-cysignals")
10097 (version "1.1.0")
10098 (source
10099 (origin
10100 (method url-fetch)
10101 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10102 (sha256
10103 (base32
10104 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10105 (build-system python-build-system)
10106 (native-inputs
10107 `(("python-cython" ,python-cython)
10108 ("python-sphinx" ,python-sphinx)))
10109 (inputs
10110 `(("pari-gp" ,pari-gp)))
10111 (arguments
10112 `(#:modules ((guix build python-build-system)
10113 ((guix build gnu-build-system) #:prefix gnu:)
10114 (guix build utils))
10115 ;; FIXME: Tests are executed after installation and currently fail
10116 ;; when not installing into standard locations; the author is working
10117 ;; on a fix.
10118 #:tests? #f
10119 #:phases
10120 (modify-phases %standard-phases
10121 (add-before
10122 'build 'configure
10123 (assoc-ref gnu:%standard-phases 'configure)))))
10124 (home-page
10125 "https://github.com/sagemath/cysignals")
10126 (synopsis
10127 "Handling of interrupts and signals for Cython")
10128 (description
10129 "The cysignals package provides mechanisms to handle interrupts (and
10130 other signals and errors) in Cython code, using two related approaches,
10131 for mixed Cython/Python code or external C libraries and pure Cython code,
10132 respectively.")
10133 (license license:lgpl3+)))
10134
10135 (define-public python2-cysignals
10136 (package-with-python2 python-cysignals))
10137
10138 (define-public python2-shedskin
10139 (package
10140 (name "python2-shedskin")
10141 (version "0.9.4")
10142 (source
10143 (origin
10144 (method url-fetch)
10145 (uri (string-append "https://github.com/shedskin/shedskin/"
10146 "releases/download/v" version
10147 "/shedskin-" version ".tgz"))
10148 (sha256
10149 (base32
10150 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10151 (build-system python-build-system)
10152 (arguments
10153 `(#:python ,python-2
10154 #:phases (modify-phases %standard-phases
10155 (add-after 'unpack 'fix-resulting-include-libs
10156 (lambda* (#:key inputs #:allow-other-keys)
10157 (let ((libgc (assoc-ref inputs "libgc"))
10158 (pcre (assoc-ref inputs "pcre")))
10159 (substitute* "shedskin/makefile.py"
10160 (("variable == 'CCFLAGS':[ ]*")
10161 (string-append "variable == 'CCFLAGS':\n"
10162 " line += ' -I " pcre "/include"
10163 " -I " libgc "/include'"))
10164 (("variable == 'LFLAGS':[ ]*")
10165 (string-append "variable == 'LFLAGS':\n"
10166 " line += ' -L" pcre "/lib"
10167 " -L " libgc "/lib'")))
10168 #t))))))
10169 (inputs `(("pcre" ,pcre)
10170 ("libgc" ,libgc)))
10171 (home-page "https://shedskin.github.io/")
10172 (synopsis "Experimental Python-2 to C++ Compiler")
10173 (description (string-append "This is an experimental compiler for a subset of
10174 Python. It generates C++ code and a Makefile."))
10175 (license (list license:gpl3 license:bsd-3 license:expat))))
10176
10177 (define-public python2-rope
10178 (package
10179 (name "python2-rope")
10180 (version "0.10.3")
10181 (source
10182 (origin
10183 (method url-fetch)
10184 (uri (pypi-uri "rope" version))
10185 (sha256
10186 (base32
10187 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10188 (arguments
10189 ;; Rope is currently python-2 only.
10190 ;; https://github.com/python-rope/rope/issues/57
10191 `(#:python ,python-2))
10192 (build-system python-build-system)
10193 (native-inputs
10194 `(("python2-unittest2" ,python2-unittest2)))
10195 (home-page "https://github.com/python-rope/rope")
10196 (synopsis "Refactoring library for Python")
10197 (description "Rope is a refactoring library for Python. It facilitates
10198 the renaming, moving and extracting of attributes, functions, modules, fields
10199 and parameters in Python 2 source code. These refactorings can also be applied
10200 to occurences in strings and comments.")
10201 (license license:gpl2)))
10202
10203 (define-public python-py3status
10204 (package
10205 (name "python-py3status")
10206 (version "3.1")
10207 (source
10208 (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "py3status" version))
10211 (sha256
10212 (base32
10213 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10214 (build-system python-build-system)
10215 (home-page "https://github.com/ultrabug/py3status")
10216 (synopsis "Extensible i3status wrapper written in Python")
10217 (description "py3status is an i3status wrapper which extends i3status
10218 functionality in a modular way, allowing you to extend your panel with your
10219 own code, responding to click events and updating clock every second.")
10220 (license license:bsd-3)))
10221
10222 (define-public python-tblib
10223 (package
10224 (name "python-tblib")
10225 (version "1.3.0")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (pypi-uri "tblib" version))
10229 (sha256 (base32
10230 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10231 (build-system python-build-system)
10232 (arguments
10233 `(#:phases
10234 (modify-phases %standard-phases
10235 (replace 'check
10236 (lambda _
10237 ;; Upstream runs tests after installation and the package itself
10238 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10239 ;; found.
10240 (setenv "PYTHONPATH"
10241 (string-append (getcwd) "/build/lib:"
10242 (getenv "PYTHONPATH")))
10243 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10244 (native-inputs
10245 `(("python-pytest" ,python-pytest)
10246 ("python-six" ,python-six)))
10247 (home-page "https://github.com/ionelmc/python-tblib")
10248 (synopsis "Traceback serialization library")
10249 (description
10250 "Traceback serialization allows you to:
10251
10252 @enumerate
10253 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10254 different processes. This allows better error handling when running code over
10255 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10256
10257 @item Parse traceback strings and raise with the parsed tracebacks.
10258 @end enumerate\n")
10259 (license license:bsd-3)))
10260
10261 (define-public python2-tblib
10262 (package-with-python2 python-tblib))
10263
10264 (define-public python-sqlparse
10265 (package
10266 (name "python-sqlparse")
10267 (version "0.1.19")
10268 (source (origin
10269 (method url-fetch)
10270 (uri (pypi-uri "sqlparse" version))
10271 (sha256
10272 (base32
10273 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10274 (build-system python-build-system)
10275 (arguments
10276 `(#:phases
10277 (modify-phases %standard-phases
10278 (replace 'check
10279 (lambda* _
10280 ;; setup.py-integrated 2to3 only affects the build files, but
10281 ;; py.test is using the source files. So we need to convert them
10282 ;; manually.
10283 (when (zero? (system* "python3"))
10284 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10285 (zero? (system* "py.test")))))))
10286 (native-inputs
10287 `(("python-pytest" ,python-pytest)))
10288 (home-page "https://github.com/andialbrecht/sqlparse")
10289 (synopsis "Non-validating SQL parser")
10290 (description "Sqlparse is a non-validating SQL parser for Python. It
10291 provides support for parsing, splitting and formatting SQL statements.")
10292 (license license:bsd-3)))
10293
10294 (define-public python2-sqlparse
10295 (package-with-python2 python-sqlparse))
10296
10297 (define-public python-greenlet
10298 (package
10299 (name "python-greenlet")
10300 (version "0.4.11")
10301 (source (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "greenlet" version))
10304 (sha256
10305 (base32
10306 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10307 (build-system python-build-system)
10308 (home-page "https://greenlet.readthedocs.io/")
10309 (synopsis "Lightweight in-process concurrent programming")
10310 (description
10311 "Greenlet package is a spin-off of Stackless, a version of CPython
10312 that supports micro-threads called \"tasklets\". Tasklets run
10313 pseudo-concurrently (typically in a single or a few OS-level threads) and
10314 are synchronized with data exchanges on \"channels\".")
10315 (license (list license:psfl license:expat))))
10316
10317 (define-public python2-greenlet
10318 (package-with-python2 python-greenlet))
10319
10320 (define-public python-gevent
10321 (package
10322 (name "python-gevent")
10323 (version "1.1.1")
10324 (source (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "gevent" version))
10327 (sha256
10328 (base32
10329 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10330 (modules '((guix build utils)))
10331 (snippet
10332 '(begin
10333 ;; unbunding libev and c-ares
10334 (for-each delete-file-recursively '("libev" "c-ares"))
10335 ;; fixing testsuite
10336 (call-with-output-file "greentest/__init__.py" noop)
10337 (substitute* "greentest/testrunner.py"
10338 (("import util") "from . import util")
10339 (("from util import log") "from .util import log"))))))
10340 (build-system python-build-system)
10341 (propagated-inputs
10342 `(("python-greenlet" ,python-greenlet)))
10343 (native-inputs
10344 `(("python-six" ,python-six)))
10345 (inputs
10346 `(("c-ares" ,c-ares)
10347 ("libev" ,libev)))
10348 (home-page "http://www.gevent.org/")
10349 (synopsis "Coroutine-based network library")
10350 (description
10351 "gevent is a coroutine-based Python networking library that uses greenlet
10352 to provide a high-level synchronous API on top of the libev event loop.")
10353 (license license:expat)))
10354
10355 (define-public python2-gevent
10356 (package-with-python2 python-gevent))
10357
10358 (define-public python-twisted
10359 (package
10360 (name "python-twisted")
10361 (version "16.2.0")
10362 (source (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10365 (sha256
10366 (base32
10367 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10368 (build-system python-build-system)
10369 (propagated-inputs
10370 `(("python-zope-interface" ,python-zope-interface)))
10371 (home-page "https://twistedmatrix.com/")
10372 (synopsis "Asynchronous networking framework written in Python")
10373 (description
10374 "Twisted is an extensible framework for Python programming, with special
10375 focus on event-based network programming and multiprotocol integration.")
10376 (license license:expat)))
10377
10378 (define-public python2-twisted
10379 (package-with-python2 python-twisted))
10380
10381 (define-public python-pika
10382 (package
10383 (name "python-pika")
10384 (version "0.10.0")
10385 (source
10386 (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "pika" version))
10389 (sha256
10390 (base32
10391 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10392 (build-system python-build-system)
10393 (native-inputs
10394 `(("python-pyev" ,python-pyev)
10395 ("python-tornado" ,python-tornado)
10396 ("python-twisted" ,python-twisted)))
10397 (home-page "https://pika.readthedocs.org")
10398 (synopsis "Pure Python AMQP Client Library")
10399 (description
10400 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10401 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10402 network support library.")
10403 (license license:bsd-3)))
10404
10405 (define-public python2-pika
10406 (package-with-python2 python-pika))
10407
10408 (define-public python-ply
10409 (package
10410 (name "python-ply")
10411 (version "3.9")
10412 (source
10413 (origin
10414 (method url-fetch)
10415 (uri (pypi-uri "ply" version))
10416 (sha256
10417 (base32
10418 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
10419 (build-system python-build-system)
10420 (home-page "http://www.dabeaz.com/ply/")
10421 (synopsis "Python Lex & Yacc")
10422 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10423 It uses LR parsing and does extensive error checking.")
10424 (license license:bsd-3)))
10425
10426 (define-public python2-ply
10427 (package-with-python2 python-ply))
10428
10429 (define-public python-tabulate
10430 (package
10431 (name "python-tabulate")
10432 (version "0.7.7")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "tabulate" version))
10436 (sha256
10437 (base32
10438 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))
10439 ;; Fix tests
10440 (modules '((guix build utils)))
10441 (snippet '(substitute* '("test/test_cli.py"
10442 "test/test_input.py"
10443 "test/test_output.py"
10444 "test/test_regression.py")
10445 (("from common") "from nose.tools")))))
10446 (build-system python-build-system)
10447 (native-inputs
10448 `(;; For testing
10449 ("python-nose" ,python-nose)))
10450 (home-page "https://bitbucket.org/astanin/python-tabulate")
10451 (synopsis "Pretty-print tabular data")
10452 (description
10453 "Tabulate is a library and command-line utility to pretty-print tabular
10454 data in Python.")
10455 (license license:expat)))
10456
10457 (define-public python2-tabulate
10458 (package-with-python2 python-tabulate))
10459
10460 (define-public python-kazoo
10461 (package
10462 (name "python-kazoo")
10463 (version "2.2.1")
10464 (source
10465 (origin
10466 (method url-fetch)
10467 (uri (pypi-uri "kazoo" version))
10468 (sha256
10469 (base32
10470 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10471 (build-system python-build-system)
10472 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10473 (propagated-inputs
10474 `(("python-six" ,python-six)))
10475 (home-page "https://kazoo.readthedocs.org")
10476 (synopsis "High-level Zookeeper client library")
10477 (description
10478 "Kazoo is a Python client library for the Apache Zookeeper distributed
10479 application service. It is designed to be easy to use and to avoid common
10480 programming errors.")
10481 (license license:asl2.0)))
10482
10483 (define-public python2-kazoo
10484 (package-with-python2 python-kazoo))
10485
10486 (define-public python-pykafka
10487 (package
10488 (name "python-pykafka")
10489 (version "2.4.0")
10490 (source (origin
10491 (method url-fetch)
10492 (uri (string-append
10493 "https://pypi.python.org/packages/8b/3e/"
10494 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10495 "pykafka-" version ".tar.gz"))
10496 (sha256
10497 (base32
10498 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10499 (build-system python-build-system)
10500 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10501 (propagated-inputs
10502 `(("python-gevent" ,python-gevent)
10503 ("python-kazoo" ,python-kazoo)
10504 ("python-tabulate" ,python-tabulate)))
10505 (inputs
10506 `(("librdkafka" ,librdkafka)))
10507 (home-page "https://pykafka.readthedocs.io/")
10508 (synopsis "Apache Kafka client for Python")
10509 (description
10510 "PyKafka is a client for the Apache Kafka distributed messaging system.
10511 It includes Python implementations of Kafka producers and consumers, which
10512 are optionally backed by a C extension built on librdkafka.")
10513 (license license:asl2.0)))
10514
10515 (define-public python2-pykafka
10516 (package-with-python2 python-pykafka))
10517
10518 (define-public python-wcwidth
10519 (package
10520 (name "python-wcwidth")
10521 (version "0.1.6")
10522 (source
10523 (origin
10524 (method url-fetch)
10525 (uri (string-append
10526 "https://pypi.python.org/packages/"
10527 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10528 "wcwidth-" version ".tar.gz"))
10529 (sha256
10530 (base32
10531 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10532 (build-system python-build-system)
10533 (home-page "https://github.com/jquast/wcwidth")
10534 (synopsis "Measure number of terminal column cells of wide-character codes")
10535 (description "Wcwidth measures the number of terminal column cells of
10536 wide-character codes. It is useful for those implementing a terminal emulator,
10537 or programs that carefully produce output to be interpreted by one. It is a
10538 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10539 specified in POSIX.1-2001 and POSIX.1-2008.")
10540 (license license:expat)))
10541
10542 (define-public python2-wcwidth
10543 (package-with-python2 python-wcwidth))
10544
10545 (define-public python2-jsonrpclib
10546 (package
10547 (name "python2-jsonrpclib")
10548 (version "0.1.7")
10549 (source (origin
10550 (method url-fetch)
10551 (uri (string-append
10552 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10553 "jsonrpclib-" version ".tar.gz"))
10554 (sha256
10555 (base32
10556 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10557 (build-system python-build-system)
10558 (arguments
10559 `(#:tests? #f
10560 #:python ,python-2))
10561 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10562 (synopsis "Implementation of JSON-RPC specification for Python")
10563 (description
10564 "This library is an implementation of the JSON-RPC specification.
10565 It supports both the original 1.0 specification, as well as the
10566 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10567 etc.")
10568 (license license:asl2.0)))
10569
10570 (define-public python-chai
10571 (package
10572 (name "python-chai")
10573 (version "1.1.1")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "chai" version))
10577 (sha256
10578 (base32
10579 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10580 (build-system python-build-system)
10581 (home-page "https://github.com/agoragames/chai")
10582 (synopsis "Mocking framework for Python")
10583 (description
10584 "Chai provides an api for mocking, stubbing and spying your python
10585 objects, patterned after the Mocha library for Ruby.")
10586 (license license:bsd-3)))
10587
10588 (define-public python2-chai
10589 (package-with-python2 python-chai))
10590
10591 (define-public python-arrow
10592 (package
10593 (name "python-arrow")
10594 (version "0.8.0")
10595 (source (origin
10596 (method url-fetch)
10597 (uri (pypi-uri "arrow" version))
10598 (sha256
10599 (base32
10600 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10601 (build-system python-build-system)
10602 (native-inputs
10603 `(;; For testing
10604 ("python-chai" ,python-chai)
10605 ("python-simplejson" ,python-simplejson)))
10606 (propagated-inputs
10607 `(("python-dateutil" ,python-dateutil-2)))
10608 (home-page "https://github.com/crsmithdev/arrow/")
10609 (synopsis "Dates and times for Python")
10610 (description
10611 "Arrow is a Python library to creating, manipulating, formatting and
10612 converting dates, times, and timestamps. It implements and updates the
10613 datetime type.")
10614 (license license:asl2.0)))
10615
10616 (define-public python2-arrow
10617 (package-with-python2 python-arrow))
10618
10619 (define-public python-inflection
10620 (package
10621 (name "python-inflection")
10622 (version "0.3.1")
10623 (source
10624 (origin (method url-fetch)
10625 (uri (pypi-uri "inflection" version))
10626 (sha256
10627 (base32
10628 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10629 (build-system python-build-system)
10630 (home-page "http://github.com/jpvanhal/inflection")
10631 (synopsis "Python string transformation library")
10632 (description
10633 "Inflection is a string transformation library. It singularizes
10634 and pluralizes English words, and transforms strings from CamelCase to
10635 underscored string.")
10636 (license license:expat)))
10637
10638 (define-public python2-inflection
10639 (package-with-python2 python-inflection))
10640
10641 (define-public python-pylev
10642 (package
10643 (name "python-pylev")
10644 (version "1.3.0")
10645 (source (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "pylev" version))
10648 (sha256
10649 (base32
10650 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10651 (build-system python-build-system)
10652 (home-page "http://github.com/toastdriven/pylev")
10653 (synopsis "Levenshtein distance implementation in Python")
10654 (description "Pure Python Levenshtein implementation, based off the
10655 Wikipedia code samples at
10656 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10657 (license license:bsd-3)))
10658
10659 (define-public python2-pylev
10660 (package-with-python2 python-pylev))
10661
10662 (define-public python-cleo
10663 (package
10664 (name "python-cleo")
10665 (version "0.4.1")
10666 (source (origin
10667 (method url-fetch)
10668 (uri (pypi-uri "cleo" version))
10669 (sha256
10670 (base32
10671 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10672 (build-system python-build-system)
10673 (native-inputs
10674 `(;; For testing
10675 ("python-mock" ,python-mock)
10676 ("python-pytest" ,python-pytest)))
10677 (propagated-inputs
10678 `(("python-psutil" ,python-psutil)
10679 ("python-pylev" ,python-pylev)))
10680 (home-page "https://github.com/sdispater/cleo")
10681 (synopsis "Command-line arguments library for Python")
10682 (description
10683 "Cleo allows you to create command-line commands with signature in
10684 docstring and colored output.")
10685 (license license:expat)))
10686
10687 (define-public python2-cleo
10688 (package-with-python2 python-cleo))
10689
10690 (define-public python-lazy-object-proxy
10691 (package
10692 (name "python-lazy-object-proxy")
10693 (version "1.2.2")
10694 (source (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "lazy-object-proxy" version))
10697 (sha256
10698 (base32
10699 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10700 (build-system python-build-system)
10701 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10702 (synopsis "Lazy object proxy for python")
10703 (description
10704 "Lazy object proxy is an object that wraps a callable but defers the call
10705 until the object is actually required, and caches the result of said call.")
10706 (license license:bsd-2)))
10707
10708 (define-public python2-lazy-object-proxy
10709 (package-with-python2 python-lazy-object-proxy))
10710
10711 (define-public python-dnspython
10712 (package
10713 (name "python-dnspython")
10714 (version "1.15.0")
10715 (source (origin
10716 (method url-fetch)
10717 (uri (string-append "http://www.dnspython.org/kits/"
10718 version "/dnspython-" version ".tar.gz"))
10719 (sha256
10720 (base32
10721 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10722 (build-system python-build-system)
10723 (arguments '(#:tests? #f)) ; XXX: requires internet access
10724 (home-page "http://www.dnspython.org")
10725 (synopsis "DNS toolkit for Python")
10726 (description
10727 "dnspython is a DNS toolkit for Python. It supports almost all record
10728 types. It can be used for queries, zone transfers, and dynamic updates.
10729 It supports TSIG authenticated messages and EDNS0.")
10730 (license license:expat)))
10731
10732 (define-public python2-dnspython
10733 (package-with-python2 python-dnspython))
10734
10735 (define-public python-email-validator
10736 (package
10737 (name "python-email-validator")
10738 (version "1.0.2")
10739 (source
10740 (origin (method url-fetch)
10741 (uri (pypi-uri "email_validator" version))
10742 (sha256
10743 (base32
10744 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10745 (build-system python-build-system)
10746 (arguments
10747 '(#:phases
10748 (modify-phases %standard-phases
10749 (add-before 'build 'use-dnspython
10750 (lambda _
10751 (substitute* "setup.py"
10752 (("dnspython3") "dnspython"))
10753 #t)))))
10754 (propagated-inputs
10755 `(("python-dnspython" ,python-dnspython)
10756 ("python-idna" ,python-idna)))
10757 (home-page "https://github.com/JoshData/python-email-validator")
10758 (synopsis "Email address validation library for Python")
10759 (description
10760 "This library validates email address syntax and deliverability.")
10761 (license license:cc0)))
10762
10763 (define-public python2-email-validator
10764 (package-with-python2 python-email-validator))
10765
10766 (define-public python-ukpostcodeparser
10767 (package
10768 (name "python-ukpostcodeparser")
10769 (version "1.0.3")
10770 (source (origin
10771 (method url-fetch)
10772 (uri (pypi-uri "UkPostcodeParser" version))
10773 (sha256
10774 (base32
10775 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10776 (build-system python-build-system)
10777 (home-page "https://github.com/hamstah/ukpostcodeparser")
10778 (synopsis "UK Postcode parser for Python")
10779 (description
10780 "This library provides the @code{parse_uk_postcode} function for
10781 parsing UK postcodes.")
10782 (license license:expat)))
10783
10784 (define-public python2-ukpostcodeparser
10785 (package-with-python2 python-ukpostcodeparser))
10786
10787 (define-public python-fake-factory
10788 (package
10789 (name "python-fake-factory")
10790 (version "0.7.2")
10791 (source (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "fake-factory" version))
10794 (sha256
10795 (base32
10796 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10797 (build-system python-build-system)
10798 (native-inputs
10799 `(;; For testing
10800 ("python-email-validator" ,python-email-validator)
10801 ("python-mock" ,python-mock)
10802 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10803 (propagated-inputs
10804 `(("python-dateutil" ,python-dateutil-2)
10805 ("python-six" ,python-six)))
10806 (home-page "https://github.com/joke2k/faker")
10807 (synopsis "Python package that generates fake data")
10808 (description
10809 "Faker is a Python package that generates fake data such as names,
10810 addresses, and phone numbers.")
10811 (license license:expat)
10812 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10813
10814 (define-public python2-fake-factory
10815 (let ((base (package-with-python2 (strip-python2-variant
10816 python-fake-factory))))
10817 (package
10818 (inherit base)
10819 (propagated-inputs
10820 `(("python2-ipaddress" ,python2-ipaddress)
10821 ,@(package-propagated-inputs base))))))
10822
10823 (define-public python-pyaml
10824 (package
10825 (name "python-pyaml")
10826 (version "15.8.2")
10827 (source (origin
10828 (method url-fetch)
10829 (uri (pypi-uri "pyaml" version))
10830 (sha256
10831 (base32
10832 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10833 (build-system python-build-system)
10834 (propagated-inputs
10835 `(("python-pyyaml" ,python-pyyaml)))
10836 (home-page "https://github.com/mk-fg/pretty-yaml")
10837 (synopsis "YAML pretty-print library for Python")
10838 (description
10839 "pyaml is a PyYAML based python module to produce pretty and readable
10840 YAML-serialized data.")
10841 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10842
10843 (define-public python2-pyaml
10844 (package-with-python2 python-pyaml))
10845
10846 (define-public python-flexmock
10847 (package
10848 (name "python-flexmock")
10849 (version "0.10.2")
10850 (source (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "flexmock" version))
10853 (sha256
10854 (base32
10855 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10856 (build-system python-build-system)
10857 (home-page "https://flexmock.readthedocs.org")
10858 (synopsis "Testing library for Python")
10859 (description
10860 "flexmock is a testing library for Python that makes it easy to create
10861 mocks, stubs and fakes.")
10862 (license license:bsd-3)))
10863
10864 (define-public python2-flexmock
10865 (package-with-python2 python-flexmock))
10866
10867 (define-public python-orator
10868 (package
10869 (name "python-orator")
10870 (version "0.8.2")
10871 (source (origin
10872 (method url-fetch)
10873 (uri (pypi-uri "orator" version))
10874 (sha256
10875 (base32
10876 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10877 (build-system python-build-system)
10878 (arguments '(#:tests? #f)) ; no tests
10879 (propagated-inputs
10880 `(("python-arrow" ,python-arrow)
10881 ("python-blinker" ,python-blinker)
10882 ("python-cleo" ,python-cleo)
10883 ("python-fake-factory" ,python-fake-factory)
10884 ("python-inflection" ,python-inflection)
10885 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10886 ("python-pyaml" ,python-pyaml)
10887 ("python-simplejson" ,python-simplejson)
10888 ("python-wrapt" ,python-wrapt)))
10889 (home-page "https://orator-orm.com/")
10890 (synopsis "ActiveRecord ORM for Python")
10891 (description
10892 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10893 implementation for Python.")
10894 (license license:expat)
10895 (properties `((python2-variant . ,(delay python2-orator))))))
10896
10897 (define-public python2-orator
10898 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10899 (package
10900 (inherit base)
10901 (propagated-inputs
10902 `(("python2-ipaddress" ,python2-ipaddress)
10903 ,@(package-propagated-inputs base))))))
10904
10905 (define-public python-prompt-toolkit
10906 (package
10907 (name "python-prompt-toolkit")
10908 (version "1.0.9")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10913 (sha256
10914 (base32
10915 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
10916 (build-system python-build-system)
10917 (arguments
10918 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10919 (propagated-inputs
10920 `(("python-wcwidth" ,python-wcwidth)
10921 ("python-six" ,python-six)
10922 ("python-pygments" ,python-pygments)))
10923 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10924 (synopsis "Library for building command line interfaces in Python")
10925 (description
10926 "Prompt-Toolkit is a library for building interactive command line
10927 interfaces in Python. It's like GNU Readline but it also features syntax
10928 highlighting while typing, out-of-the-box multi-line input editing, advanced
10929 code completion, incremental search, support for Chinese double-width
10930 characters, mouse support, and auto suggestions.")
10931 (license license:bsd-3)))
10932
10933 (define-public python2-prompt-toolkit
10934 (package-with-python2 python-prompt-toolkit))
10935
10936 (define-public python-jedi
10937 (package
10938 (name "python-jedi")
10939 (version "0.9.0")
10940 (source
10941 (origin
10942 (method url-fetch)
10943 (uri (pypi-uri "jedi" version))
10944 (sha256
10945 (base32
10946 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10947 (build-system python-build-system)
10948 (home-page "https://github.com/davidhalter/jedi")
10949 (synopsis
10950 "Autocompletion for Python that can be used for text editors")
10951 (description
10952 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10953 (license license:expat)))
10954
10955 (define-public python2-jedi
10956 (package-with-python2 python-jedi))
10957
10958 (define-public ptpython
10959 (package
10960 (name "ptpython")
10961 (version "0.34")
10962 (source (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "ptpython" version))
10965 (sha256
10966 (base32
10967 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10968 (build-system python-build-system)
10969 (propagated-inputs
10970 `(("python-docopt" ,python-docopt)
10971 ("python-jedi" ,python-jedi)
10972 ("python-prompt-toolkit" ,python-prompt-toolkit)
10973 ("python-pygments" ,python-pygments)))
10974 (home-page "https://github.com/jonathanslenders/ptpython")
10975 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10976 (description
10977 "ptpython is a Python read-eval-print loop with IDE-like features.
10978 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10979 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10980 etc.")
10981 (license license:bsd-3)
10982 (properties `((python2-variant . ,(delay ptpython-2))))))
10983
10984 (define-public ptpython-2
10985 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10986 (package
10987 (inherit base)
10988 (name "ptpython2"))))
10989
10990 (define-public python-requests-oauthlib
10991 (package
10992 (name "python-requests-oauthlib")
10993 (version "0.6.2")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "requests-oauthlib" version))
10998 (sha256
10999 (base32
11000 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11001 (build-system python-build-system)
11002 (arguments
11003 `(#:phases
11004 (modify-phases %standard-phases
11005 ;; removes tests that require network access
11006 (add-before 'check 'pre-check
11007 (lambda _
11008 (delete-file "tests/test_core.py")
11009 #t)))))
11010 (native-inputs
11011 `(("python-requests-mock" ,python-requests-mock)
11012 ("python-mock" ,python-mock)))
11013 (propagated-inputs
11014 `(("python-oauthlib" ,python-oauthlib)
11015 ("python-requests" ,python-requests)))
11016 (home-page
11017 "https://github.com/requests/requests-oauthlib")
11018 (synopsis
11019 "OAuthlib authentication support for Requests")
11020 (description
11021 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11022 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11023 (license license:isc)))
11024
11025 (define-public python2-requests-oauthlib
11026 (package-with-python2 python-requests-oauthlib))
11027
11028 (define-public python-stem
11029 (package
11030 (name "python-stem")
11031 (version "1.5.4")
11032 (source
11033 (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "stem" version))
11036 (sha256
11037 (base32
11038 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11039 (build-system python-build-system)
11040 (arguments
11041 `(#:phases
11042 (modify-phases %standard-phases
11043 (replace 'check
11044 (lambda _
11045 (zero? (system* "./run_tests.py" "--unit")))))))
11046 (native-inputs
11047 `(("python-mock" ,python-mock)
11048 ("python-pep8" ,python-pep8)
11049 ("python-pyflakes" ,python-pyflakes)))
11050 (home-page "https://stem.torproject.org/")
11051 (synopsis
11052 "Python controller library that allows applications to interact with Tor")
11053 (description
11054 "Stem is a Python controller library for Tor. With it you can use Tor's
11055 control protocol to script against the Tor process and read descriptor data
11056 relays publish about themselves.")
11057 (license license:lgpl3)))
11058
11059 (define-public python2-stem
11060 (package-with-python2 python-stem))
11061
11062 (define-public python-pyserial
11063 (package
11064 (name "python-pyserial")
11065 (version "3.1.1")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "pyserial" version))
11070 (sha256
11071 (base32
11072 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11073 (build-system python-build-system)
11074 (home-page
11075 "https://github.com/pyserial/pyserial")
11076 (synopsis "Python Serial Port Bindings")
11077 (description "@code{pyserial} provide serial port bindings for Python. It
11078 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11079 and/or Xon/Xoff. The port is accessed in RAW mode.")
11080 (license license:bsd-3)))
11081
11082 (define-public python2-pyserial
11083 (package-with-python2 python-pyserial))
11084
11085 (define-public python-kivy
11086 (package
11087 (name "python-kivy")
11088 (version "1.9.1")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "kivy" version))
11093 (file-name (string-append name "-" version ".tar.gz"))
11094 (sha256
11095 (base32
11096 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11097 (build-system python-build-system)
11098 (arguments
11099 `(#:tests? #f ; Tests require many optional packages
11100 #:phases
11101 (modify-phases %standard-phases
11102 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11103 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11104 (lambda* (#:key inputs #:allow-other-keys)
11105 (setenv "KIVY_SDL2_PATH"
11106 (string-append (assoc-ref inputs "sdl-union")
11107 "/include/SDL2"))
11108 #t)))))
11109 (native-inputs
11110 `(("pkg-config" ,pkg-config)
11111 ("python-cython" ,python-cython)))
11112 (inputs
11113 `(("gstreamer" ,gstreamer)
11114 ("mesa" ,mesa)
11115 ("sdl-union"
11116 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11117 (home-page "http://kivy.org")
11118 (synopsis
11119 "Multitouch application framework")
11120 (description
11121 "A software library for rapid development of
11122 hardware-accelerated multitouch applications.")
11123 (license license:expat)))
11124
11125 (define-public python2-kivy
11126 (package-with-python2 python-kivy))
11127
11128 (define-public python-kivy-next
11129 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11130 (revision "1"))
11131 (package (inherit python-kivy)
11132 (name "python-kivy-next")
11133 (version (string-append "1.9.1-" revision "."
11134 (string-take commit 7)))
11135 (source
11136 (origin
11137 (method git-fetch)
11138 (uri (git-reference
11139 (url "https://github.com/kivy/kivy")
11140 (commit commit)))
11141 (file-name (string-append name "-" version "-checkout"))
11142 (sha256
11143 (base32
11144 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11145
11146 (define-public python2-kivy-next
11147 (package-with-python2 python-kivy-next))
11148
11149 (define-public python-binaryornot
11150 (package
11151 (name "python-binaryornot")
11152 (version "0.4.0")
11153 (source (origin
11154 (method url-fetch)
11155 (uri (pypi-uri "binaryornot" version))
11156 (sha256
11157 (base32
11158 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11159 (build-system python-build-system)
11160 (propagated-inputs
11161 `(("python-chardet" ,python-chardet)
11162 ("python-hypothesis" ,python-hypothesis)))
11163 (home-page "https://github.com/audreyr/binaryornot")
11164 (synopsis "Package to check if a file is binary or text")
11165 (description "Ultra-lightweight pure Python package to check if a file is
11166 binary or text.")
11167 (license license:bsd-3)
11168 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11169
11170 (define-public python2-binaryornot
11171 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11172 (package (inherit base)
11173 (propagated-inputs
11174 `(("python2-enum34" ,python2-enum34)
11175 ,@(package-propagated-inputs base))))))
11176
11177 (define-public python-nltk
11178 (package
11179 (name "python-nltk")
11180 (version "3.2.1")
11181 (source (origin
11182 (method url-fetch)
11183 (uri (pypi-uri "nltk" version))
11184 (sha256
11185 (base32
11186 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11187 (build-system python-build-system)
11188 (arguments
11189 '(;; The tests require some extra resources to be downloaded.
11190 ;; TODO Try packaging these resources.
11191 #:tests? #f))
11192 (home-page "http://nltk.org/")
11193 (synopsis "Natural Language Toolkit")
11194 (description "It provides interfaces to over 50 corpora and lexical
11195 resources such as WordNet, along with a suite of text processing libraries
11196 for classification, tokenization, stemming, tagging, parsing, and semantic
11197 reasoning, wrappers for natural language processing libraries.")
11198 (license license:asl2.0)))
11199
11200 (define-public python2-nltk
11201 (package-with-python2 python-nltk))
11202
11203 (define-public python-pymongo
11204 (package
11205 (name "python-pymongo")
11206 (version "3.3.0")
11207 (source (origin
11208 (method url-fetch)
11209 (uri (pypi-uri "pymongo" version))
11210 (sha256
11211 (base32
11212 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11213 (build-system python-build-system)
11214 (propagated-inputs
11215 `(("python-certifi" ,python-certifi)))
11216 (home-page "http://github.com/mongodb/mongo-python-driver")
11217 (synopsis "Python driver for MongoDB")
11218 (description "Python driver for MongoDB.")
11219 (license license:asl2.0)))
11220
11221 (define-public python2-pymongo
11222 (package-with-python2 python-pymongo))
11223
11224 (define-public python-sh
11225 (package
11226 (name "python-sh")
11227 (version "1.11")
11228 (source (origin
11229 (method url-fetch)
11230 (uri (pypi-uri "sh" version))
11231 (sha256
11232 (base32
11233 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11234 (build-system python-build-system)
11235 (arguments
11236 `(#:tests? #f)) ; no tests
11237 (home-page "https://github.com/amoffat/sh")
11238 (synopsis "Python subprocess interface")
11239 (description "Abstracts process invocation by providing a function
11240 interface for programs.")
11241 (license license:expat)))
11242
11243 (define-public python2-sh
11244 (package-with-python2 python-sh))
11245
11246 (define-public python-consul
11247 (package
11248 (name "python-consul")
11249 (version "0.6.1")
11250 (source
11251 (origin
11252 (method url-fetch)
11253 (uri (pypi-uri "python-consul" version))
11254 (sha256
11255 (base32
11256 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11257 (build-system python-build-system)
11258 (native-inputs
11259 `(("python-pytest" ,python-pytest)))
11260 (propagated-inputs
11261 `(("python-requests" ,python-requests)
11262 ("python-six" ,python-six)))
11263 (home-page "https://github.com/cablehead/python-consul")
11264 (synopsis "Python client for Consul")
11265 (description
11266 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11267 discovery, monitoring and configuration.")
11268 (license license:expat)))
11269
11270 (define-public python2-consul
11271 (package-with-python2 python-consul))
11272
11273 (define-public python-schematics
11274 (package
11275 (name "python-schematics")
11276 (version "1.1.1")
11277 (source
11278 (origin
11279 (method url-fetch)
11280 (uri (string-append
11281 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11282 (file-name (string-append name "-" version ".tar.gz"))
11283 (sha256
11284 (base32
11285 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11286 (build-system python-build-system)
11287 (propagated-inputs
11288 `(("python-six" ,python-six)))
11289 (arguments
11290 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11291 ; version requirements (eg python-coveralls)
11292 (home-page "https://github.com/schematics/schematics")
11293 (synopsis "Python Data Structures for Humans")
11294 (description "Python Data Structures for Humans.")
11295 (license license:bsd-3)))
11296
11297 (define-public python2-schematics
11298 (package-with-python2 python-schematics))
11299
11300 (define-public python-publicsuffix
11301 (package
11302 (name "python-publicsuffix")
11303 (version "1.1.0")
11304 (source (origin
11305 (method url-fetch)
11306 (uri (pypi-uri "publicsuffix" version))
11307 (sha256
11308 (base32
11309 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11310 (build-system python-build-system)
11311 (arguments
11312 `(#:tests? #f)) ; tests use the internet
11313 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11314 (synopsis "Get suffix for a domain name")
11315 (description "Get a public suffix for a domain name using the Public Suffix
11316 List.")
11317 (license license:expat)))
11318
11319 (define-public python2-publicsuffix
11320 (package-with-python2 python-publicsuffix))
11321
11322 (define-public python-publicsuffix2
11323 (package
11324 (name "python-publicsuffix2")
11325 (version "2.20160621")
11326 (source
11327 (origin
11328 (method url-fetch)
11329 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11330 (sha256
11331 (base32
11332 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11333 (build-system python-build-system)
11334 (arguments
11335 '(#:tests? #f)) ; The test suite requires network access.
11336 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11337 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11338 (description "Get a public suffix for a domain name using the Public Suffix
11339 List. Forked from and using the same API as the publicsuffix package.")
11340 (license (list license:expat license:mpl2.0))))
11341
11342 (define-public python2-publicsuffix2
11343 (package-with-python2 python-publicsuffix2))
11344
11345 (define-public python-url
11346 (package
11347 (name "python-url")
11348 (version "0.2.0")
11349 (source (origin
11350 (method url-fetch)
11351 (uri (pypi-uri "url" version))
11352 (sha256
11353 (base32
11354 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11355 (build-system python-build-system)
11356 (propagated-inputs
11357 `(("python-publicsuffix" ,python-publicsuffix)))
11358 (native-inputs
11359 `(("python-coverage" ,python-coverage)
11360 ("python-nose" ,python-nose)))
11361 (arguments
11362 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11363 (home-page "http://github.com/seomoz/url-py")
11364 (synopsis "URL Parsing")
11365 (description "Library for parsing urls.")
11366 (license license:expat)
11367 (properties `((python2-variant . ,(delay python2-url))))))
11368
11369 (define-public python2-url
11370 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11371 (package (inherit base)
11372 (propagated-inputs
11373 `(("python2-publicsuffix" ,python2-publicsuffix))))))
11374
11375 (define-public python-freezegun
11376 (package
11377 (name "python-freezegun")
11378 (version "0.3.8")
11379 (source
11380 (origin
11381 (method url-fetch)
11382 (uri (pypi-uri "freezegun" version))
11383 (sha256
11384 (base32
11385 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
11386 (build-system python-build-system)
11387 (native-inputs
11388 `(("python-mock" ,python-mock)
11389 ("python-nose" ,python-nose)
11390 ("python-coverage" ,python-coverage)))
11391 (propagated-inputs
11392 `(("python-six" ,python-six)
11393 ("python-dateutil-2" ,python-dateutil-2)))
11394 (arguments
11395 `(#:phases (modify-phases %standard-phases
11396 ;; The tests are normally executed via `make test`, but the PyPi
11397 ;; package does not include the Makefile.
11398 (replace 'check
11399 (lambda _
11400 (zero? (system* "nosetests" "./tests/")))))))
11401 (home-page "https://github.com/spulec/freezegun")
11402 (synopsis "Test utility for mocking the datetime module")
11403 (description
11404 "FreezeGun is a library that allows your python tests to travel through
11405 time by mocking the datetime module.")
11406 (license license:asl2.0)))
11407
11408 (define-public python2-freezegun
11409 (package-with-python2 python-freezegun))
11410
11411
11412 (define-public python-odfpy
11413 (package
11414 (name "python-odfpy")
11415 (version "1.3.3")
11416 (source (origin
11417 (method url-fetch)
11418 (uri (pypi-uri "odfpy" version))
11419 (sha256
11420 (base32
11421 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11422 (arguments
11423 `(#:modules ((srfi srfi-1)
11424 (guix build python-build-system)
11425 (guix build utils))
11426 #:phases
11427 (modify-phases %standard-phases
11428 (replace 'check
11429 ;; The test runner invokes python2 and python3 for test*.py.
11430 ;; To avoid having both in inputs, we replicate it here.
11431 (lambda _
11432 (every (lambda (test-file)
11433 (zero? (system* "python" test-file)))
11434 (find-files "tests" "^test.*\\.py$")))))))
11435 (build-system python-build-system)
11436 (home-page "https://github.com/eea/odfpy")
11437 (synopsis "Python API and tools to manipulate OpenDocument files")
11438 (description "Collection of libraries and utility programs written in
11439 Python to manipulate OpenDocument 1.2 files.")
11440 (license
11441 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11442 ;; number of files with other licenses.
11443 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11444
11445 (define-public python2-odfpy
11446 (package-with-python2 python-odfpy))
11447
11448 (define-public python-cachecontrol
11449 (package
11450 (name "python-cachecontrol")
11451 (version "0.11.6")
11452 (source
11453 (origin
11454 (method url-fetch)
11455 ;; Pypi does not have tests.
11456 (uri (string-append
11457 "https://github.com/ionrock/cachecontrol/archive/v"
11458 version ".tar.gz"))
11459 (file-name (string-append name "-" version ".tar.gz"))
11460 (sha256
11461 (base32
11462 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11463 (build-system python-build-system)
11464 (arguments
11465 `(#:phases
11466 (modify-phases %standard-phases
11467 (replace 'check
11468 (lambda _
11469 ;; Drop test that requires internet access.
11470 (delete-file "tests/test_regressions.py")
11471 (setenv "PYTHONPATH"
11472 (string-append (getcwd) "/build/lib:"
11473 (getenv "PYTHONPATH")))
11474 (zero? (system* "py.test" "-vv")))))))
11475 (native-inputs
11476 `(("python-pytest" ,python-pytest)
11477 ("python-redis" ,python-redis)
11478 ("python-webtest" ,python-webtest)
11479 ("python-mock" ,python-mock)))
11480 (propagated-inputs
11481 `(("python-requests" ,python-requests)
11482 ("python-lockfile" ,python-lockfile)))
11483 (home-page "https://github.com/ionrock/cachecontrol")
11484 (synopsis "The httplib2 caching algorithms for use with requests")
11485 (description "CacheControl is a port of the caching algorithms in
11486 @code{httplib2} for use with @code{requests} session objects.")
11487 (license license:asl2.0)))
11488
11489 (define-public python2-cachecontrol
11490 (package-with-python2 python-cachecontrol))
11491
11492 (define-public python-lit
11493 (package
11494 (name "python-lit")
11495 (version "0.5.0")
11496 (source
11497 (origin
11498 (method url-fetch)
11499 (uri (pypi-uri "lit" version))
11500 (sha256
11501 (base32
11502 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11503 (build-system python-build-system)
11504 (home-page "http://llvm.org/")
11505 (synopsis "LLVM Software Testing Tool")
11506 (description "@code{lit} is a portable tool for executing LLVM and Clang
11507 style test suites, summarizing their results, and providing indication of
11508 failures.")
11509 (license license:ncsa)))
11510
11511 (define-public python2-lit
11512 (package-with-python2 python-lit))
11513
11514 (define-public python-pytest-pep8
11515 (package
11516 (name "python-pytest-pep8")
11517 (version "1.0.6")
11518 (source (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "pytest-pep8" version))
11521 (sha256
11522 (base32
11523 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11524 (build-system python-build-system)
11525 (arguments
11526 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11527 (native-inputs
11528 `(("python-pytest" ,python-pytest)))
11529 (propagated-inputs
11530 `(("python-pep8" ,python-pep8)))
11531 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11532 (synopsis "Py.test plugin to check PEP8 requirements")
11533 (description "Pytest plugin for checking PEP8 compliance.")
11534 (license license:expat)))
11535
11536 (define-public python2-pytest-pep8
11537 (package-with-python2 python-pytest-pep8))
11538
11539 (define-public python-pytest-flakes
11540 (package
11541 (name "python-pytest-flakes")
11542 (version "1.0.1")
11543 (source (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "pytest-flakes" version))
11546 (sha256
11547 (base32
11548 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11549 (build-system python-build-system)
11550 (arguments
11551 `(#:phases
11552 (modify-phases %standard-phases
11553 (delete 'check)
11554 (add-after 'install 'check
11555 (lambda* (#:key outputs inputs #:allow-other-keys)
11556 ;; It's easier to run tests after install.
11557 ;; Make installed package available for running the tests
11558 (add-installed-pythonpath inputs outputs)
11559 (zero? (system* "py.test" "-vv")))))))
11560 (native-inputs
11561 `(("python-coverage" ,python-coverage)
11562 ("python-pytest" ,python-pytest)
11563 ("python-pytest-cache" ,python-pytest-cache)
11564 ("python-pytest-pep8" ,python-pytest-pep8)))
11565 (propagated-inputs
11566 `(("python-pyflakes" ,python-pyflakes)))
11567 (home-page "https://github.com/fschulze/pytest-flakes")
11568 (synopsis "Py.test plugin to check source code with pyflakes")
11569 (description "Pytest plugin for checking Python source code with pyflakes.")
11570 (license license:expat)))
11571
11572 (define-public python2-pytest-flakes
11573 (package-with-python2 python-pytest-flakes))
11574
11575 (define-public python-natsort
11576 (package
11577 (name "python-natsort")
11578 (version "5.0.1")
11579 (source (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "natsort" version))
11582 (sha256
11583 (base32
11584 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11585 (build-system python-build-system)
11586 (arguments
11587 `(#:phases
11588 (modify-phases %standard-phases
11589 (add-before 'check 'set-cachedir
11590 ;; Tests require write access to $HOME by default
11591 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11592 (native-inputs
11593 `(("python-hypothesis" ,python-hypothesis)
11594 ("python-pytest-cache" ,python-pytest-cache)
11595 ("python-pytest-cov" ,python-pytest-cov)
11596 ("python-pytest-flakes" ,python-pytest-flakes)
11597 ("python-pytest-pep8" ,python-pytest-pep8)))
11598 (propagated-inputs ; TODO: Add python-fastnumbers.
11599 `(("python-pyicu" ,python-pyicu)))
11600 (home-page "https://github.com/SethMMorton/natsort")
11601 (synopsis "Natural sorting for python and shell")
11602 (description
11603 "Natsort lets you apply natural sorting on lists instead of
11604 lexicographical. If you use the built-in @code{sorted} method in python
11605 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11606 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11607 function @code{natsorted} that identifies numbers and sorts them separately
11608 from strings. It can also sort version numbers, real numbers, mixed types
11609 and more, and comes with a shell command @command{natsort} that exposes this
11610 functionality in the command line.")
11611 (license license:expat)
11612 (properties `((python2-variant . ,(delay python2-natsort))))))
11613
11614 (define-public python2-natsort
11615 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11616 (package (inherit base)
11617 (native-inputs
11618 `(("python2-pathlib" ,python2-pathlib)
11619 ("python2-mock" ,python2-mock)
11620 ("python2-enum34" ,python2-enum34)
11621 ,@(package-native-inputs base))))))
11622
11623 (define-public python-glances
11624 (package
11625 (name "python-glances")
11626 (version "2.7.1")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "Glances" version))
11631 (sha256
11632 (base32
11633 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11634 (build-system python-build-system)
11635 (propagated-inputs
11636 `(("python-psutil" ,python-psutil)))
11637 (home-page
11638 "https://github.com/nicolargo/glances")
11639 (synopsis
11640 "A cross-platform curses-based monitoring tool")
11641 (description
11642 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11643 Glances uses the PsUtil library to get information from your system. It monitors
11644 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11645 (license license:lgpl3+)))
11646
11647 (define-public python2-glances
11648 (package-with-python2 python-glances))
11649
11650 (define-public python-graphql-core
11651 (package
11652 (name "python-graphql-core")
11653 (version "0.5.3")
11654 (source
11655 (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "graphql-core" version))
11658 (sha256
11659 (base32
11660 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11661 (build-system python-build-system)
11662 (arguments
11663 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11664 #:phases
11665 (modify-phases %standard-phases
11666 (add-after 'unpack 'patch-hardcoded-version
11667 (lambda _ (substitute*
11668 "setup.py"
11669 (("'gevent==1.1rc1'") "'gevent'"))
11670 #t)))))
11671 (native-inputs
11672 `(("python-gevent" ,python-gevent)
11673 ("python-mock" ,python-mock)
11674 ("python-pytest-mock" ,python-pytest-mock)))
11675 (propagated-inputs
11676 `(("python-promise" ,python-promise)
11677 ("python-six" ,python-six)))
11678 (home-page "https://github.com/graphql-python/graphql-core")
11679 (synopsis "GraphQL implementation for Python")
11680 (description
11681 "GraphQL implementation for Python. GraphQL is a data query language and
11682 runtime designed and used to request and deliver data to mobile and web apps.
11683 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11684 to Python.")
11685 (license license:expat)))
11686
11687 (define-public python2-graphql-core
11688 (package-with-python2 python-graphql-core))
11689
11690 (define-public python-graphql-relay
11691 (package
11692 (name "python-graphql-relay")
11693 (version "0.4.5")
11694 (source
11695 (origin
11696 (method url-fetch)
11697 (uri (pypi-uri "graphql-relay" version))
11698 (sha256
11699 (base32
11700 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11701 (build-system python-build-system)
11702 (native-inputs
11703 `(("python-pytest" ,python-pytest)))
11704 (propagated-inputs
11705 `(("python-graphql-core" ,python-graphql-core)
11706 ("python-promise" ,python-promise)
11707 ("python-six" ,python-six)))
11708 (home-page "https://github.com/graphql-python/graphql-relay-py")
11709 (synopsis "Relay implementation for Python")
11710 (description
11711 "This is a library to allow the easy creation of Relay-compliant servers
11712 using the GraphQL Python reference implementation of a GraphQL server. It
11713 should be noted that the code is a exact port of the original
11714 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11715 from Facebook.")
11716 (license license:expat)))
11717
11718 (define-public python2-graphql-relay
11719 (package-with-python2 python-graphql-relay))
11720
11721 (define-public python-graphene
11722 (package
11723 (name "python-graphene")
11724 (version "0.10.2")
11725 (source
11726 (origin
11727 (method url-fetch)
11728 (uri (pypi-uri "graphene" version))
11729 (sha256
11730 (base32
11731 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11732 (build-system python-build-system)
11733 (native-inputs
11734 `(("python-django-filter" ,python-django-filter)
11735 ("python-mock" ,python-mock)
11736 ("python-psycopg2" ,python-psycopg2)
11737 ("python-pytest-django" ,python-pytest-django)
11738 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11739 (propagated-inputs
11740 `(("python-graphql-core" ,python-graphql-core)
11741 ("python-graphql-relay" ,python-graphql-relay)
11742 ("python-iso8601" ,python-iso8601)
11743 ("python-promise" ,python-promise)
11744 ("python-six" ,python-six)))
11745 (home-page "http://graphene-python.org/")
11746 (synopsis "GraphQL Framework for Python")
11747 (description
11748 "Graphene is a Python library for building GraphQL schemas/types.
11749 A GraphQL schema describes your data model, and provides a GraphQL server
11750 with an associated set of resolve methods that know how to fetch data.")
11751 (properties `((python2-variant . ,(delay python2-graphene))))
11752 (license license:expat)))
11753
11754 (define-public python2-graphene
11755 (let ((base (package-with-python2
11756 (strip-python2-variant python-graphene))))
11757 (package (inherit base)
11758 (native-inputs
11759 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11760 ,@(package-native-inputs base))))))
11761
11762 (define-public python-nautilus
11763 (package
11764 (name "python-nautilus")
11765 (version "0.4.9")
11766 (source
11767 (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "nautilus" version))
11770 (sha256
11771 (base32
11772 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11773 (build-system python-build-system)
11774 (arguments `(#:tests? #f)) ; fails to import test modules
11775 (propagated-inputs
11776 `(("python-bcrypt" ,python-bcrypt)
11777 ("python-click" ,python-click)
11778 ("python-consul" ,python-consul)
11779 ("python-graphene" ,python-graphene)
11780 ("python-jinja2" ,python-jinja2)
11781 ("python-peewee" ,python-peewee)
11782 ("python-pika" ,python-pika)
11783 ("python-tornado" ,python-tornado)
11784 ("python-wtforms" ,python-wtforms)))
11785 (native-inputs
11786 `(("python-nose2" ,python-nose2)))
11787 (home-page "https://github.com/AlecAivazis/nautilus")
11788 (synopsis "Library for creating microservice applications")
11789 (description
11790 "Nautilus is a framework for flux based microservices that looks to
11791 provide extendible implementations of common aspects of a cloud so that you can
11792 focus on building massively scalable web applications.")
11793 (license license:expat)))
11794
11795 (define-public python-snowballstemmer
11796 (package
11797 (name "python-snowballstemmer")
11798 (version "1.2.1")
11799 (source (origin
11800 (method url-fetch)
11801 (uri (pypi-uri "snowballstemmer" version))
11802 (sha256
11803 (base32
11804 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11805 (build-system python-build-system)
11806 (arguments
11807 `(;; No tests exist
11808 #:tests? #f))
11809 (home-page "https://github.com/shibukawa/snowball_py")
11810 (synopsis "Snowball stemming library collection for Python")
11811 (description "This package provides 16 word stemmer algorithms generated
11812 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11813 English stemmer.")
11814 (license license:bsd-3)))
11815
11816 (define-public python2-snowballstemmer
11817 (package-with-python2 python-snowballstemmer))
11818
11819 (define-public python-sphinx-cloud-sptheme
11820 (package
11821 (name "python-sphinx-cloud-sptheme")
11822 (version "1.7.1")
11823 (source (origin
11824 (method url-fetch)
11825 (uri (pypi-uri "cloud_sptheme" version))
11826 (sha256
11827 (base32
11828 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
11829 (build-system python-build-system)
11830 (native-inputs
11831 `(("python-sphinx" ,python-sphinx)))
11832 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
11833 (synopsis "'Cloud' theme for Sphinx documenter")
11834 (description "This package contains the \"Cloud\" theme for Sphinx and some
11835 related extensions.")
11836 (license license:bsd-3)))
11837
11838 (define-public python2-sphinx-cloud-sptheme
11839 (package-with-python2 python-sphinx-cloud-sptheme))
11840
11841 (define-public python-sphinx-alabaster-theme
11842 (package
11843 (name "python-sphinx-alabaster-theme")
11844 (version "0.7.9")
11845 (source (origin
11846 (method url-fetch)
11847 (uri (pypi-uri "alabaster" version))
11848 (sha256
11849 (base32
11850 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
11851 (build-system python-build-system)
11852 (propagated-inputs
11853 `(("python-pygments" ,python-pygments)))
11854 (home-page "https://alabaster.readthedocs.io/")
11855 (synopsis "Configurable sidebar-enabled Sphinx theme")
11856 (description "Alabaster is a visually (c)lean, responsive, configurable
11857 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
11858 (license license:bsd-3)))
11859
11860 (define-public python2-sphinx-alabaster-theme
11861 (package-with-python2 python-sphinx-alabaster-theme))
11862
11863 (define-public python-betamax
11864 (package
11865 (name "python-betamax")
11866 (version "0.8.0")
11867 (source
11868 (origin
11869 (method url-fetch)
11870 (uri (pypi-uri "betamax" version))
11871 (sha256
11872 (base32
11873 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11874 (build-system python-build-system)
11875 (arguments
11876 '(;; Many tests fail because they require networking.
11877 #:tests? #f))
11878 (propagated-inputs
11879 `(("python-requests" ,python-requests)))
11880 (home-page "https://github.com/sigmavirus24/betamax")
11881 (synopsis "Record HTTP interactions with python-requests")
11882 (description "Betamax will record your test suite's HTTP interactions and
11883 replay them during future tests. It is designed to work with python-requests.")
11884 (license license:expat)))
11885
11886 (define-public python2-betamax
11887 (package-with-python2 python-betamax))
11888
11889 (define-public python-s3transfer
11890 (package
11891 (name "python-s3transfer")
11892 (version "0.1.10")
11893 (source (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "s3transfer" version))
11896 (sha256
11897 (base32
11898 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
11899 (build-system python-build-system)
11900 (arguments
11901 `(#:phases
11902 (modify-phases %standard-phases
11903 (replace 'check
11904 (lambda _
11905 ;; 7 of the 'integration' tests require network access or login
11906 ;; credentials.
11907 (zero? (system* "nosetests" "--exclude=integration")))))))
11908 (native-inputs
11909 `(("python-docutils" ,python-docutils)
11910 ("python-mock" ,python-mock)
11911 ("python-nose" ,python-nose)))
11912 (propagated-inputs
11913 `(("python-botocore" ,python-botocore)))
11914 (synopsis "Amazon S3 Transfer Manager")
11915 (description "S3transfer is a Python library for managing Amazon S3
11916 transfers.")
11917 (home-page "https://github.com/boto/s3transfer")
11918 (license license:asl2.0)
11919 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11920
11921 (define-public python2-s3transfer
11922 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11923 (package
11924 (inherit base)
11925 (native-inputs
11926 `(("python2-futures" ,python2-futures)
11927 ,@(package-native-inputs base))))))
11928
11929 (define-public python-setproctitle
11930 (package
11931 (name "python-setproctitle")
11932 (version "1.1.10")
11933 (source
11934 (origin
11935 (method url-fetch)
11936 (uri (pypi-uri "setproctitle" version))
11937 (sha256
11938 (base32
11939 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11940 (build-system python-build-system)
11941 (arguments
11942 '(#:phases
11943 (modify-phases %standard-phases
11944 (add-before 'check 'patch-Makefile
11945 ;; Stricly this is only required for the python2 variant.
11946 ;; But adding a phase in an inherited package seems to be
11947 ;; cumbersum. So we patch even for python3.
11948 (lambda _
11949 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11950 (when nose
11951 (substitute* "Makefile"
11952 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11953 (string-append nose "/bin/nosetests "))))
11954 #t)))
11955 (replace 'check
11956 (lambda _
11957 (setenv "PYTHON" (or (which "python3") (which "python")))
11958 (setenv "PYCONFIG" (or (which "python3-config")
11959 (which "python-config")))
11960 (setenv "CC" "gcc")
11961 ;; No need to extend PYTHONPATH to find the built package, since
11962 ;; the Makefile will build anyway
11963 (zero? (system* "make" "check")))))))
11964 (native-inputs
11965 `(("procps" ,procps))) ; required for tests
11966 (home-page
11967 "https://github.com/dvarrazzo/py-setproctitle")
11968 (synopsis
11969 "Setproctitle implementation for Python to customize the process title")
11970 (description "The library allows a process to change its title (as displayed
11971 by system tools such as ps and top).
11972
11973 Changing the title is mostly useful in multi-process systems, for
11974 example when a master process is forked: changing the children's title
11975 allows to identify the task each process is busy with. The technique
11976 is used by PostgreSQL and the OpenSSH Server for example.")
11977 (license license:bsd-3)
11978 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11979
11980 (define-public python2-setproctitle
11981 (let ((base (package-with-python2
11982 (strip-python2-variant python-setproctitle))))
11983 (package
11984 (inherit base)
11985 (native-inputs `(("python2-nose" ,python2-nose)
11986 ,@(package-native-inputs base))))))
11987
11988 (define-public python-validictory
11989 (package
11990 (name "python-validictory")
11991 (version "1.0.1")
11992 (source
11993 (origin
11994 (method url-fetch)
11995 (uri (pypi-uri "validictory" version))
11996 (sha256
11997 (base32
11998 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11999 (build-system python-build-system)
12000 (arguments
12001 '(#:phases
12002 (modify-phases %standard-phases
12003 (add-after 'unpack 'bootstrap
12004 ;; Move the tests out of the package directory to avoid
12005 ;; packaging them.
12006 (lambda* _
12007 (rename-file "validictory/tests" "tests")
12008 (delete-file "tests/__init__.py")))
12009 (replace 'check
12010 (lambda _
12011 ;; Extend PYTHONPATH so the built package will be found.
12012 (setenv "PYTHONPATH"
12013 (string-append (getcwd) "/build/lib:"
12014 (getenv "PYTHONPATH")))
12015 (zero? (system* "py.test" "-vv" )))))))
12016 (native-inputs
12017 `(("python-pytest" ,python-pytest)))
12018 (home-page
12019 "https://github.com/jamesturk/validictory")
12020 (synopsis "General purpose Python data validator")
12021 (description "It allows validation of arbitrary Python data structures.
12022
12023 The schema format is based on the JSON Schema
12024 proposal (http://json-schema.org), so combined with json the library is also
12025 useful as a validator for JSON data.")
12026 (license license:expat)))
12027
12028 (define-public python2-validictory
12029 (package-with-python2 python-validictory))
12030
12031 (define-public python-aniso8601
12032 (package
12033 (name "python-aniso8601")
12034 (version "1.1.0")
12035 (source
12036 (origin
12037 (method url-fetch)
12038 (uri (pypi-uri "aniso8601" version))
12039 (sha256
12040 (base32
12041 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12042 (build-system python-build-system)
12043 (propagated-inputs
12044 `(("python-dateutil-2" ,python-dateutil-2)))
12045 (home-page
12046 "https://bitbucket.org/nielsenb/aniso8601")
12047 (synopsis
12048 "Python library for parsing ISO 8601 strings")
12049 (description
12050 "This package contains a library for parsing ISO 8601 datetime strings.")
12051 (license license:bsd-3)))
12052
12053 (define-public python-flask-restful
12054 (package
12055 (name "python-flask-restful")
12056 (version "0.3.5")
12057 (source
12058 (origin
12059 (method url-fetch)
12060 (uri (pypi-uri "Flask-RESTful" version))
12061 (sha256
12062 (base32
12063 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12064 (build-system python-build-system)
12065 (propagated-inputs
12066 `(("python-aniso8601" ,python-aniso8601)
12067 ("python-flask" ,python-flask)
12068 ("python-pycrypto" ,python-pycrypto)
12069 ("python-pytz" ,python-pytz)))
12070 (native-inputs
12071 `(;; Optional dependency of Flask. Tests need it.
12072 ("python-blinker" ,python-blinker)
12073 ("python-mock" ,python-mock) ; For tests
12074 ("python-nose" ,python-nose) ; For tests
12075 ("python-sphinx" ,python-sphinx)))
12076 (home-page
12077 "https://www.github.com/flask-restful/flask-restful/")
12078 (synopsis
12079 "Flask module for creating REST APIs")
12080 (description
12081 "This package contains a Flask module for creating REST APIs.")
12082 (license license:bsd-3)))
12083
12084 (define-public python-flask-basicauth
12085 (package
12086 (name "python-flask-basicauth")
12087 (version "0.2.0")
12088 (source
12089 (origin
12090 (method url-fetch)
12091 (uri (pypi-uri "Flask-BasicAuth" version))
12092 (sha256
12093 (base32
12094 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12095 (build-system python-build-system)
12096 (propagated-inputs
12097 `(("python-flask" ,python-flask)))
12098 (home-page
12099 "https://github.com/jpvanhal/flask-basicauth")
12100 (synopsis
12101 "HTTP basic access authentication for Flask")
12102 (description
12103 "This package provides HTTP basic access authentication for Flask.")
12104 (license license:bsd-3)))
12105
12106 (define-public python-flask-sqlalchemy
12107 (package
12108 (name "python-flask-sqlalchemy")
12109 (version "2.1")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "Flask-SQLAlchemy" version))
12114 (sha256
12115 (base32
12116 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12117 (build-system python-build-system)
12118 (propagated-inputs
12119 `(("python-flask" ,python-flask)
12120 ("python-sqlalchemy" ,python-sqlalchemy)))
12121 (home-page
12122 "http://github.com/mitsuhiko/flask-sqlalchemy")
12123 (synopsis
12124 "Module adding SQLAlchemy support to your Flask application")
12125 (description
12126 "This package adds SQLAlchemy support to your Flask application.")
12127 (license license:bsd-3)))
12128
12129 (define-public python-pyev
12130 (package
12131 (name "python-pyev")
12132 (version "0.9.0")
12133 (source
12134 (origin
12135 (method url-fetch)
12136 (uri (pypi-uri "pyev" version))
12137 (sha256
12138 (base32
12139 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12140 (build-system python-build-system)
12141 (arguments
12142 `(#:tests? #f ; no test suite
12143 #:phases
12144 (modify-phases %standard-phases
12145 (add-after 'unpack 'patch
12146 (lambda* (#:key inputs #:allow-other-keys)
12147 (let ((libev (string-append (assoc-ref inputs "libev")
12148 "/lib/libev.so.4")))
12149 (substitute* "setup.py"
12150 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12151 (string-append "libev_dll_name = \"" libev "\"")))))))))
12152 (inputs
12153 `(("libev" ,libev)))
12154 (home-page "http://pythonhosted.org/pyev/")
12155 (synopsis "Python libev interface")
12156 (description "Pyev provides a Python interface to libev.")
12157 (license license:gpl3)))
12158
12159 (define-public python2-pyev
12160 (package-with-python2 python-pyev))
12161
12162 (define-public python-imagesize
12163 (package
12164 (name "python-imagesize")
12165 (version "0.7.1")
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (pypi-uri "imagesize" version))
12170 (sha256
12171 (base32
12172 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12173 (build-system python-build-system)
12174 (arguments
12175 '(;; Test files are not distributed on PyPi:
12176 ;; https://github.com/shibukawa/imagesize_py/issues/7
12177 #:tests? #f))
12178 (home-page "https://github.com/shibukawa/imagesize_py")
12179 (synopsis "Gets image size of files in variaous formats in Python")
12180 (description
12181 "This package allows determination of image size from
12182 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12183 (license license:expat)))
12184
12185 (define-public python2-imagesize
12186 (package-with-python2 python-imagesize))
12187
12188 (define-public python-axolotl-curve25519
12189 (package
12190 (name "python-axolotl-curve25519")
12191 (version "0.1")
12192 (source
12193 (origin
12194 (method git-fetch)
12195 (uri (git-reference
12196 (url "git://github.com/tgalal/python-axolotl-curve25519")
12197 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12198 (file-name (string-append name "-" version "-checkout"))
12199 (sha256
12200 (base32
12201 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12202 (build-system python-build-system)
12203 (arguments
12204 `(;; Prevent creation of the egg. This works around
12205 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12206 #:configure-flags '("--root=/")))
12207 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12208 (synopsis "Python wrapper for curve25519 library")
12209 (description "This is a python wrapper for the curve25519 library
12210 with ed25519 signatures. The C code was pulled from
12211 libaxolotl-android. At the moment this wrapper is meant for use by
12212 python-axolotl.")
12213 (license (list license:gpl3 ; Most files
12214 license:bsd-3)))) ; curve/curve25519-donna.c
12215
12216 (define-public python2-axolotl-curve25519
12217 (package-with-python2 python-axolotl-curve25519))
12218
12219 (define-public python-axolotl
12220 (package
12221 (name "python-axolotl")
12222 (version "0.1.35")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (string-append
12227 "https://github.com/tgalal/python-axolotl/archive/"
12228 version ".tar.gz"))
12229 (file-name (string-append name "-" version ".tar.gz"))
12230 (sha256
12231 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12232 (build-system python-build-system)
12233 (arguments
12234 `(#:phases
12235 (modify-phases %standard-phases
12236 ;; Don't install tests
12237 (add-before 'install 'remove-tests
12238 (lambda _
12239 (for-each delete-file-recursively
12240 '("axolotl/tests" "build/lib/axolotl/tests"))
12241 #t)))
12242 ;; Prevent creation of the egg. This works around
12243 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12244 #:configure-flags '("--root=/")))
12245 (propagated-inputs
12246 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12247 ("python-dateutil" ,python-dateutil)
12248 ("python-protobuf" ,python-protobuf)
12249 ("python-pycrypto" ,python-pycrypto)))
12250 (home-page "https://github.com/tgalal/python-axolotl")
12251 (synopsis "Python port of libaxolotl-android")
12252 (description "This is a python port of libaxolotl-android. This
12253 is a ratcheting forward secrecy protocol that works in synchronous and
12254 asynchronous messaging environments.")
12255 (license license:gpl3)))
12256
12257 (define-public python2-axolotl
12258 (package-with-python2 python-axolotl))
12259
12260 (define-public python-termstyle
12261 (package
12262 (name "python-termstyle")
12263 (version "0.1.11")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "termstyle" version))
12268 (sha256
12269 (base32
12270 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12271 (build-system python-build-system)
12272 (home-page "http://github.com/gfxmonk/termstyle")
12273 (synopsis "Console text coloring for Python")
12274 (description "This package provides console text coloring for Python.")
12275 (license license:bsd-3)))
12276
12277 (define-public python-rednose
12278 (package
12279 (name "python-rednose")
12280 (version "1.2.1")
12281 (source
12282 (origin
12283 (method url-fetch)
12284 (uri (pypi-uri "rednose" version))
12285 (sha256
12286 (base32
12287 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12288 (build-system python-build-system)
12289 (arguments
12290 `(#:phases
12291 (modify-phases %standard-phases
12292 (add-after 'unpack 'fix-deps
12293 (lambda _
12294 ;; See <https://github.com/JBKahn/rednose/issues/12>
12295 (substitute* "setup.py"
12296 (("python-termstyle") "termstyle"))
12297 #t)))))
12298 (propagated-inputs
12299 `(("python-colorama" ,python-colorama)
12300 ("python-termstyle" ,python-termstyle)))
12301 (native-inputs
12302 `(("python-six" ,python-six)
12303 ("python-nose" ,python-nose)))
12304 (home-page "https://github.com/JBKahn/rednose")
12305 (synopsis "Colored output for Python nosetests")
12306 (description "This package provides colored output for the
12307 @command{nosetests} command of the Python Nose unit test framework.")
12308 (license license:bsd-3)))
12309
12310 (define-public python-flask-restplus
12311 (package
12312 (name "python-flask-restplus")
12313 (version "0.9.2")
12314 (source
12315 (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "flask-restplus" version))
12318 (sha256
12319 (base32
12320 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12321 (build-system python-build-system)
12322 (propagated-inputs
12323 `(("python-aniso8601" ,python-aniso8601)
12324 ("python-flask" ,python-flask)
12325 ("python-jsonschema" ,python-jsonschema)
12326 ("python-pytz" ,python-pytz)
12327 ("python-six" ,python-six)))
12328 (native-inputs
12329 `(("python-tzlocal" ,python-tzlocal)
12330 ("python-blinker" ,python-blinker)
12331 ("python-nose" ,python-nose)
12332 ("python-rednose" ,python-rednose)))
12333 (home-page "https://github.com/noirbizarre/flask-restplus")
12334 (synopsis "Framework for documented API development with Flask")
12335 (description "This package provides a framework for API development with
12336 the Flask web framework in Python. It is similar to package
12337 @code{python-flask-restful} but supports the @code{python-swagger}
12338 documentation builder.")
12339 (license license:expat)))
12340
12341 (define-public python-sadisplay
12342 (package
12343 (name "python-sadisplay")
12344 (version "0.4.6")
12345 (source
12346 (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "sadisplay" version))
12349 (sha256
12350 (base32
12351 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12352 (build-system python-build-system)
12353 (propagated-inputs
12354 `(("python-sqlalchemy" ,python-sqlalchemy)))
12355 (native-inputs
12356 `(("python-nose" ,python-nose)))
12357 (home-page "https://bitbucket.org/estin/sadisplay")
12358 (synopsis "SQLAlchemy schema displayer")
12359 (description "This package provides a program to build Entity
12360 Relationship diagrams from a SQLAlchemy model (or directly from the
12361 database).")
12362 (license license:bsd-3)))
12363
12364 (define-public python2-sadisplay
12365 (package-with-python2 python-sadisplay))
12366
12367 (define-public python-flask-restful-swagger
12368 (package
12369 (name "python-flask-restful-swagger")
12370 (version "0.19")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "flask-restful-swagger" version))
12375 (sha256
12376 (base32
12377 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12378 (build-system python-build-system)
12379 (propagated-inputs
12380 `(("python-flask-restful" ,python-flask-restful)))
12381 (home-page "https://github.com/rantav/flask-restful-swagger")
12382 (synopsis "Extract Swagger specs from Flask-Restful projects")
12383 (description "This package lets you extract Swagger API documentation
12384 specs from your Flask-Restful projects.")
12385 (license license:expat)))
12386
12387 (define-public python2-flask-restful-swagger
12388 (package-with-python2 python-flask-restful-swagger))
12389
12390 (define-public python-argcomplete
12391 (package
12392 (name "python-argcomplete")
12393 (version "1.7.0")
12394 (source
12395 (origin
12396 (method url-fetch)
12397 (uri (pypi-uri "argcomplete" version))
12398 (sha256
12399 (base32
12400 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12401 (build-system python-build-system)
12402 (home-page "https://github.com/kislyuk/argcomplete")
12403 (synopsis "Shell tab completion for Python argparse")
12404 (description "argcomplete provides extensible command line tab completion
12405 of arguments and options for Python scripts using @code{argparse}. It's
12406 particularly useful for programs with many options or sub-parsers that can
12407 dynamically suggest completions; for example, when browsing resources over the
12408 network.")
12409 (license license:asl2.0)))
12410
12411 (define-public python2-argcomplete
12412 (package-with-python2 python-argcomplete))
12413
12414 (define-public python-xopen
12415 (package
12416 (name "python-xopen")
12417 (version "0.1.1")
12418 (source
12419 (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "xopen" version))
12422 (sha256
12423 (base32
12424 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12425 (file-name (string-append name "-" version ".tar.gz"))))
12426 (build-system python-build-system)
12427 (home-page "https://github.com/marcelm/xopen/")
12428 (synopsis "Open compressed files transparently")
12429 (description "This module provides an @code{xopen} function that works like
12430 Python's built-in @code{open} function, but can also deal with compressed files.
12431 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12432 recognized by their file extensions. The focus is on being as efficient as
12433 possible on all supported Python versions.")
12434 (license license:expat)))
12435
12436 (define-public python2-xopen
12437 (package-with-python2 python-xopen))
12438
12439 (define-public python2-cheetah
12440 (package
12441 (name "python2-cheetah")
12442 (version "2.4.4")
12443 (source
12444 (origin
12445 (method url-fetch)
12446 (uri (pypi-uri "Cheetah" version))
12447 (sha256
12448 (base32
12449 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
12450 (build-system python-build-system)
12451 (arguments
12452 `(#:python ,python-2))
12453 (propagated-inputs
12454 `(("python2-markdown" ,python2-markdown)))
12455 (home-page "https://pythonhosted.org/Cheetah/")
12456 (synopsis "Template engine")
12457 (description "Cheetah is a text-based template engine and Python code
12458 generator.
12459
12460 Cheetah can be used as a standalone templating utility or referenced as
12461 a library from other Python applications. It has many potential uses,
12462 but web developers looking for a viable alternative to ASP, JSP, PHP and
12463 PSP are expected to be its principle user group.
12464
12465 Features:
12466 @enumerate
12467 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12468 text-based format.
12469 @item Cleanly separates content, graphic design, and program code.
12470 @item Blends the power and flexibility of Python with a simple template language
12471 that non-programmers can understand.
12472 @item Gives template writers full access to any Python data structure, module,
12473 function, object, or method in their templates.
12474 @item Makes code reuse easy by providing an object-orientated interface to
12475 templates that is accessible from Python code or other Cheetah templates.
12476 One template can subclass another and selectively reimplement sections of it.
12477 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12478 improve the performance of a dynamic website.
12479 @item Compiles templates into optimized, yet readable, Python code.
12480 @end enumerate")
12481 (license (license:x11-style "file://LICENSE"))))
12482
12483 (define-public python-pbkdf2
12484 (package
12485 (name "python-pbkdf2")
12486 (version "1.3")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (pypi-uri "pbkdf2" version))
12491 (sha256
12492 (base32
12493 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12494 (build-system python-build-system)
12495 (propagated-inputs
12496 `(("python-pycrypto" ,python-pycrypto))) ; optional
12497 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
12498 (synopsis "Password-based key derivation")
12499 (description "This module implements the password-based key derivation
12500 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12501
12502 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12503 is part of the RSA Public Key Cryptography Standards series. The provided
12504 implementation takes a password or a passphrase and a salt value (and
12505 optionally a iteration count, a digest module, and a MAC module) and provides
12506 a file-like object from which an arbitrarly-sized key can be read.")
12507 (license license:expat)))
12508
12509 (define-public python2-pbkdf2
12510 (package-with-python2 python-pbkdf2))
12511
12512 (define-public python-qrcode
12513 (package
12514 (name "python-qrcode")
12515 (version "5.3")
12516 (source
12517 (origin
12518 (method url-fetch)
12519 (uri (pypi-uri "qrcode" version))
12520 (sha256
12521 (base32
12522 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
12523 (build-system python-build-system)
12524 (propagated-inputs
12525 `(("python-lxml" ,python-lxml) ; for SVG output
12526 ("python-pillow" ,python-pillow) ; for PNG output
12527 ("python-six" ,python-six)))
12528 (home-page "https://github.com/lincolnloop/python-qrcode")
12529 (synopsis "QR Code image generator")
12530 (description "This package provides a pure Python QR Code generator
12531 module. It uses the Python Imaging Library (PIL) to allow for the generation
12532 of QR Codes.
12533
12534 In addition this package provides a command line tool to generate QR codes and
12535 either write these QR codes to a file or do the output as ascii art at the
12536 console.")
12537 (license license:bsd-3)))
12538
12539 (define-public python2-qrcode
12540 (package-with-python2 python-qrcode))
12541
12542 ;; SlowAES isn't compatible with Python 3.
12543 (define-public python2-slowaes
12544 (package
12545 (name "python2-slowaes")
12546 (version "0.1a1")
12547 (source
12548 (origin
12549 (method url-fetch)
12550 (uri (pypi-uri "slowaes" version))
12551 (sha256
12552 (base32
12553 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
12554 (build-system python-build-system)
12555 (arguments `(#:python ,python-2))
12556 (home-page "http://code.google.com/p/slowaes/")
12557 (synopsis "Implementation of AES in Python")
12558 (description "This package contains an implementation of AES in Python.
12559 This implementation is slow (hence the project name) but still useful when
12560 faster ones are not available.")
12561 (license license:asl2.0)))
12562
12563 (define-public python-rst2ansi
12564 (package
12565 (name "python-rst2ansi")
12566 (version "0.1.5")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (pypi-uri "rst2ansi" version))
12571 (sha256
12572 (base32
12573 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12574 (build-system python-build-system)
12575 (propagated-inputs
12576 `(("python-docutils" ,python-docutils)))
12577 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12578 (synopsis "Convert RST to ANSI-decorated console output")
12579 (description
12580 "Python module dedicated to rendering RST (reStructuredText) documents
12581 to ansi-escaped strings suitable for display in a terminal.")
12582 (license license:expat)))
12583
12584 (define-public python-ddt
12585 (package
12586 (name "python-ddt")
12587 (version "1.1.1")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "ddt" version))
12592 (sha256
12593 (base32
12594 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
12595 (build-system python-build-system)
12596 (native-inputs
12597 `(("python-mock" ,python-mock)
12598 ("python-nose" ,python-nose)))
12599 (propagated-inputs
12600 `(("python-six" ,python-six)
12601 ("python-pyyaml" ,python-pyyaml)))
12602 (home-page "https://github.com/txels/ddt")
12603 (synopsis "Data-Driven Tests")
12604 (description
12605 "DDT (Data-Driven Tests) allows you to multiply one test case by running
12606 it with different test data, and make it appear as multiple test cases.")
12607 (license license:expat)))
12608
12609 (define-public python2-ddt
12610 (package-with-python2 python-ddt))
12611
12612 (define-public python-pycosat
12613 (package
12614 (name "python-pycosat")
12615 (version "0.6.1")
12616 (source
12617 (origin
12618 (method url-fetch)
12619 (uri (pypi-uri "pycosat" version))
12620 (sha256
12621 (base32
12622 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12623 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12624 (build-system python-build-system)
12625 (home-page "https://github.com/ContinuumIO/pycosat")
12626 (synopsis "Bindings to picosat (a SAT solver)")
12627 (description
12628 "This package provides efficient Python bindings to @code{picosat} on
12629 the C level. When importing pycosat, the @code{picosat} solver becomes part
12630 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12631 Problem} (SAT) solver.")
12632 (license license:expat)))
12633
12634 (define-public python2-pycosat
12635 (package-with-python2 python-pycosat))