gnu: Fix python inputs, part 6: some inputs become native-inputs.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages python)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages adns)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages file)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages imagemagick)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages multiprecision)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages openstack)
80 #:use-module (gnu packages password-utils)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages statistics)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages version-control)
92 #:use-module (gnu packages video)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages base)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages zip)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages bdw-gc)
101 #:use-module (guix packages)
102 #:use-module (guix download)
103 #:use-module (guix git-download)
104 #:use-module (guix utils)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system cmake)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
110
111 (define-public python-2.7
112 (package
113 (name "python")
114 (version "2.7.12")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "https://www.python.org/ftp/python/"
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
125 "python-2.7-site-prefixes.patch"
126 "python-2.7-source-date-epoch.patch"))
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
135 "Lib/test/test_ctypes.py" ; fails on mips64el
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
140 "Lib/test/test_subprocess.py"))
141 #t))))
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
144 (build-system gnu-build-system)
145 (arguments
146 `(;; 356 tests OK.
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
162 #:test-target "test"
163 #:configure-flags
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 "--with-ensurepip=install" ;install pip and setuptools
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
169
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
172 #:phases
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
189 (setenv "SOURCE_DATE_EPOCH" "1")
190 #t))
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t)))
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
277 (inputs
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
280 ("libffi" ,libffi) ; for ctypes
281 ("sqlite" ,sqlite) ; for sqlite extension
282 ("openssl" ,openssl)
283 ("readline" ,readline)
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
292 (files '("lib/python2.7/site-packages")))))
293 (home-page "https://www.python.org")
294 (synopsis "High-level, dynamically-typed programming language")
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297 is used in a wide variety of application domains. Some of its key
298 distinguishing features include: clear, readable syntax; strong
299 introspection capabilities; intuitive object orientation; natural
300 expression of procedural code; full modularity, supporting hierarchical
301 packages; exception-based error handling; and very high level dynamic
302 data types.")
303 (license license:psfl)))
304
305 ;; Current 2.x version.
306 (define-public python-2 python-2.7)
307
308 (define-public python-3.5
309 (package (inherit python-2)
310 (version "3.5.2")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
315 (patches (search-patches
316 "python-fix-tests.patch"
317 "python-3.5-fix-tests.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 (define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
350 ;; Current 3.x version.
351 (define-public python-3 python-3.5)
352
353 ;; Current major version.
354 (define-public python python-3)
355
356 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
357 ;; Python (Tk -> libxcb -> Python.)
358
359 (define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
362 (outputs '("out"))
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
367 (inputs '()))) ;none of the optional dependencies
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (home-page "https://www.github.com/giampaolo/psutil")
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442 information on running processes and system utilization (CPU, memory, disks,
443 network) in Python. It is useful mainly for system monitoring, profiling and
444 limiting process resources and management of running processes. It implements
445 many functionalities offered by command line tools such as: ps, top, lsof,
446 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447 pidof, tty, taskset, pmap.")
448 (license license:bsd-3)))
449
450 (define-public python2-psutil
451 (package-with-python2 python-psutil))
452
453 (define-public python-passlib
454 (package
455 (name "python-passlib")
456 (version "1.6.5")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "passlib" version))
461 (sha256
462 (base32
463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-nose" ,python-nose)))
467 (propagated-inputs
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481 cross-platform implementations of over 30 password hashing algorithms, as well
482 as a framework for managing existing password hashes. It's designed to be
483 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484 to providing full-strength password hashing for multi-user application.")
485 (license license:bsd-3)))
486
487 (define-public python2-passlib
488 (package-with-python2 python-passlib))
489
490 (define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510 system hashes passwords using a version of Bruce Schneier's Blowfish block
511 cipher with modifications designed to raise the cost of off-line password
512 cracking and frustrate fast hardware implementation. The computation cost of
513 the algorithm is parametised, so it can be increased as computers get faster.
514 The intent is to make a compromise of a password database less likely to
515 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516 John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
520 (license (list license:isc license:bsd-3 license:bsd-4))))
521
522 (define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
526 (define-public python-paramiko
527 (package
528 (name "python-paramiko")
529 (version "1.16.0")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "paramiko" version))
534 (sha256
535 (base32
536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
537 (build-system python-build-system)
538 (propagated-inputs
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544 providing both client and server functionality. While it leverages a Python C
545 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546 Python interface around SSH networking concepts.")
547 (license license:lgpl2.1+)))
548
549 (define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
553 (define-public python-httplib2
554 (package
555 (name "python-httplib2")
556 (version "0.9.2")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "httplib2" version))
561 (sha256
562 (base32
563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
564 (build-system python-build-system)
565 (home-page "https://github.com/jcgregorio/httplib2")
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569 other HTTP libraries.")
570 (license license:expat)))
571
572 (define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
575 (define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598 Curve Digital Signature Algorithm), implemented purely in Python. With this
599 library, you can quickly create keypairs (signing key and verifying key), sign
600 messages, and verify the signatures. The keys and signatures are very short,
601 making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604 (define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
607 (define-public python-ccm
608 (package
609 (name "python-ccm")
610 (version "2.1.6")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (pypi-uri "ccm" version))
615 (sha256
616 (base32
617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
618 (build-system python-build-system)
619 (propagated-inputs
620 `(("python-pyyaml" ,python-pyyaml)
621 ("python-six" ,python-six)))
622 (home-page "https://github.com/pcmanus/ccm")
623 (synopsis "Cassandra Cluster Manager")
624 (description "A script/library to create, launch and remove an Apache
625 Cassandra cluster on localhost.")
626 (license license:asl2.0)))
627
628 (define-public python2-ccm
629 (package-with-python2 python-ccm))
630
631 (define-public python-pytz
632 (package
633 (name "python-pytz")
634 (version "2016.3")
635 (source
636 (origin
637 (method url-fetch)
638 (uri (pypi-uri "pytz" version ".tar.bz2"))
639 (sha256
640 (base32
641 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
642 (build-system python-build-system)
643 (arguments `(#:tests? #f)) ; no test target
644 (home-page "http://pythonhosted.org/pytz")
645 (synopsis "Python timezone library")
646 (description
647 "This library allows accurate and cross platform timezone calculations
648 using Python 2.4 or higher and provides access to the Olson timezone database.")
649 (license license:expat)))
650
651 (define-public python2-pytz
652 (package-with-python2 python-pytz))
653
654
655 (define-public python-babel
656 (package
657 (name "python-babel")
658 (version "2.3.2")
659 (source
660 (origin
661 (method url-fetch)
662 (uri (pypi-uri "Babel" version))
663 (sha256
664 (base32
665 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
666 (build-system python-build-system)
667 (propagated-inputs
668 `(("python-pytz" ,python-pytz)))
669 (arguments `(#:tests? #f)) ; no test target
670 (home-page "http://babel.pocoo.org/")
671 (synopsis
672 "Tools for internationalizing Python applications")
673 (description
674 "Babel is composed of two major parts:
675 - tools to build and work with gettext message catalogs
676 - a Python interface to the CLDR (Common Locale Data Repository), providing
677 access to various locale display names, localized number and date formatting,
678 etc. ")
679 (license license:bsd-3)))
680
681 (define-public python2-babel
682 (package-with-python2 python-babel))
683
684 (define-public python2-backport-ssl-match-hostname
685 (package
686 (name "python2-backport-ssl-match-hostname")
687 (version "3.5.0.1")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (string-append
692 "https://pypi.python.org/packages/source/b/"
693 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
694 version ".tar.gz"))
695 (sha256
696 (base32
697 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
698 (build-system python-build-system)
699 (arguments
700 `(#:python ,python-2
701 #:tests? #f)) ; no test target
702 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
703 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
704 (description
705 "This backport brings the ssl.match_hostname() function to users of
706 earlier versions of Python. The function checks the hostname in the
707 certificate returned by the server to which a connection has been established,
708 and verifies that it matches the intended target hostname.")
709 (license license:psfl)))
710
711 (define-public python-h5py
712 (package
713 (name "python-h5py")
714 (version "2.6.0")
715 (source
716 (origin
717 (method url-fetch)
718 (uri (pypi-uri "h5py" version))
719 (sha256
720 (base32
721 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
722 (build-system python-build-system)
723 (arguments
724 `(#:tests? #f ; no test target
725 #:phases
726 (modify-phases %standard-phases
727 (add-after 'unpack 'fix-hdf5-paths
728 (lambda* (#:key inputs #:allow-other-keys)
729 (let ((prefix (assoc-ref inputs "hdf5")))
730 (substitute* "setup_build.py"
731 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
732 (string-append "['" prefix "/lib" "']"))
733 (("'/opt/local/include', '/usr/local/include'")
734 (string-append "'" prefix "/include" "'")))
735 (substitute* "setup_configure.py"
736 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
737 (string-append "['" prefix "/lib" "']")))
738 #t))))))
739 (propagated-inputs
740 `(("python-numpy" ,python-numpy)))
741 (inputs
742 `(("hdf5" ,hdf5)
743 ("python-six" ,python-six)))
744 (native-inputs
745 `(("python-cython" ,python-cython)
746 ("python-pkgconfig" ,python-pkgconfig)))
747 (home-page "http://www.h5py.org/")
748 (synopsis "Read and write HDF5 files from Python")
749 (description
750 "The h5py package provides both a high- and low-level interface to the
751 HDF5 library from Python. The low-level interface is intended to be a
752 complete wrapping of the HDF5 API, while the high-level component supports
753 access to HDF5 files, datasets and groups using established Python and NumPy
754 concepts.")
755 (license license:bsd-3)
756 (properties `((python2-variant . ,(delay python2-h5py))))))
757
758 (define-public python2-h5py
759 (package-with-python2 (strip-python2-variant python-h5py)))
760
761 (define-public python-lockfile
762 (package
763 (name "python-lockfile")
764 (version "0.12.2")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
769 "lockfile-" version ".tar.gz"))
770 (sha256
771 (base32
772 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
773 (build-system python-build-system)
774 (arguments '(#:test-target "check"))
775 (native-inputs
776 `(("python-pbr" ,python-pbr)))
777 (home-page "https://launchpad.net/pylockfile")
778 (synopsis "Platform-independent file locking module")
779 (description
780 "The lockfile package exports a LockFile class which provides a simple
781 API for locking files.")
782 (license license:expat)))
783
784 (define-public python2-lockfile
785 (package-with-python2 python-lockfile))
786
787 (define-public python-mock
788 (package
789 (name "python-mock")
790 (version "1.0.1")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
795 "mock-" version ".tar.gz"))
796 (sha256
797 (base32
798 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
799 (build-system python-build-system)
800 (arguments '(#:test-target "check"))
801 (home-page "http://code.google.com/p/mock/")
802 (synopsis "Python mocking and patching library for testing")
803 (description
804 "Mock is a library for testing in Python. It allows you to replace parts
805 of your system under test with mock objects and make assertions about how they
806 have been used.")
807 (license license:expat)))
808
809 (define-public python2-mock
810 (package-with-python2 python-mock))
811
812
813 (define-public python-setuptools
814 (package
815 (name "python-setuptools")
816 (version "18.3.1")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
821 version ".tar.gz"))
822 (sha256
823 (base32
824 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
825 (build-system python-build-system)
826 ;; FIXME: Tests require pytest, which itself relies on setuptools.
827 ;; One could bootstrap with an internal untested setuptools.
828 (arguments
829 `(#:tests? #f))
830 (home-page "https://pypi.python.org/pypi/setuptools")
831 (synopsis
832 "Library designed to facilitate packaging Python projects")
833 (description
834 "Setuptools is a fully-featured, stable library designed to facilitate
835 packaging Python projects, where packaging includes:
836 Python package and module definitions,
837 distribution package metadata,
838 test hooks,
839 project installation,
840 platform-specific details,
841 Python 3 support.")
842 (license license:psfl)))
843
844 (define-public python2-setuptools
845 (package-with-python2 python-setuptools))
846
847
848 (define-public python-pycrypto
849 (package
850 (name "python-pycrypto")
851 (version "2.6.1")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (string-append "https://pypi.python.org/packages/source/p/"
856 "pycrypto/pycrypto-" version ".tar.gz"))
857 (sha256
858 (base32
859 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
860 (build-system python-build-system)
861 (inputs
862 `(("python" ,python)
863 ("gmp" ,gmp)))
864 (arguments
865 `(#:phases
866 (alist-cons-before
867 'build 'set-build-env
868 ;; pycrypto runs an autoconf configure script behind the scenes
869 (lambda _
870 (setenv "CONFIG_SHELL" (which "bash")))
871 %standard-phases)))
872 (home-page "http://www.pycrypto.org/")
873 (synopsis "Cryptographic modules for Python")
874 (description
875 "Pycrypto is a collection of both secure hash functions (such as SHA256
876 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
877 etc.). The package is structured to make adding new modules easy.")
878 (license license:public-domain)))
879
880 (define-public python2-pycrypto
881 (let ((pycrypto (package-with-python2 python-pycrypto)))
882 (package (inherit pycrypto)
883 (inputs
884 `(("python" ,python-2)
885 ,@(alist-delete
886 "python"
887 (package-inputs pycrypto)))))))
888
889 (define-public python-keyring
890 (package
891 (name "python-keyring")
892 (version "8.7")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (pypi-uri "keyring" version))
897 (sha256
898 (base32
899 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
900 (build-system python-build-system)
901 (native-inputs
902 `(("python-setuptools-scm" ,python-setuptools-scm)))
903 (propagated-inputs
904 `(("python-pycrypto" ,python-pycrypto)))
905 (arguments
906 `(#:tests? #f)) ;TODO: tests require pytest
907 (home-page "https://github.com/jaraco/keyring")
908 (synopsis "Store and access your passwords safely")
909 (description
910 "The Python keyring lib provides a easy way to access the system keyring
911 service from python. It can be used in any application that needs safe
912 password storage.")
913 ;; "MIT" and PSF dual license
914 (license license:x11)))
915
916 (define-public python2-keyring
917 (package-with-python2 python-keyring))
918
919 (define-public python-six
920 (package
921 (name "python-six")
922 (version "1.10.0")
923 (source
924 (origin
925 (method url-fetch)
926 (uri (pypi-uri "six" version))
927 (sha256
928 (base32
929 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
930 (build-system python-build-system)
931 (home-page "http://pypi.python.org/pypi/six/")
932 (synopsis "Python 2 and 3 compatibility utilities")
933 (description
934 "Six is a Python 2 and 3 compatibility library. It provides utility
935 functions for smoothing over the differences between the Python versions with
936 the goal of writing Python code that is compatible on both Python versions.
937 Six supports every Python version since 2.5. It is contained in only one
938 Python file, so it can be easily copied into your project.")
939 (license license:x11)))
940
941 (define-public python2-six
942 (package-with-python2 python-six))
943
944 (define-public python-dateutil-2
945 (package
946 (name "python-dateutil")
947 (version "2.5.2")
948 (source
949 (origin
950 (method url-fetch)
951 (uri (pypi-uri "python-dateutil" version))
952 (sha256
953 (base32
954 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
955 (build-system python-build-system)
956 (propagated-inputs
957 `(("python-six" ,python-six)))
958 (home-page "https://dateutil.readthedocs.io/en/stable/")
959 (synopsis "Extensions to the standard datetime module")
960 (description
961 "The dateutil module provides powerful extensions to the standard
962 datetime module, available in Python 2.3+.")
963 (license license:bsd-3)))
964
965 (define-public python2-dateutil-2
966 (package-with-python2 python-dateutil-2))
967
968 (define-public python-dateutil
969 (package
970 (name "python-dateutil")
971 (version "1.5") ; last version for python < 3
972 (source
973 (origin
974 (method url-fetch)
975 (uri (string-append "http://labix.org/download/python-dateutil/"
976 "python-dateutil-" version ".tar.gz"))
977 (sha256
978 (base32
979 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
980 (build-system python-build-system)
981 (home-page "https://dateutil.readthedocs.io/en/stable/")
982 (synopsis "Extensions to the standard datetime module")
983 (description
984 "The dateutil module provides powerful extensions to the standard
985 datetime module, available in Python 2.3+.")
986 (license license:psfl)))
987
988 (define-public python2-dateutil
989 (package-with-python2 python-dateutil))
990
991 (define-public python-parsedatetime
992 (package
993 (name "python-parsedatetime")
994 (version "2.1")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "parsedatetime" version))
999 (sha256
1000 (base32
1001 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1002 (build-system python-build-system)
1003 (native-inputs
1004 `(("python-nose" ,python-nose)
1005 ("python-pyicu" ,python-pyicu)))
1006 (home-page "http://github.com/bear/parsedatetime/")
1007 (synopsis
1008 "Parse human-readable date/time text")
1009 (description
1010 "Parse human-readable date/time text.")
1011 (license license:asl2.0)))
1012
1013 (define-public python2-parsedatetime
1014 (package-with-python2 python-parsedatetime))
1015
1016 (define-public python-pandas
1017 (package
1018 (name "python-pandas")
1019 (version "0.18.1")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (string-append
1024 "https://pypi.python.org/packages/11/09/"
1025 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1026 "pandas-" version ".tar.gz"))
1027 (sha256
1028 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1029 (build-system python-build-system)
1030 (propagated-inputs
1031 `(("python-numpy" ,python-numpy)
1032 ("python-pytz" ,python-pytz)
1033 ("python-dateutil" ,python-dateutil-2)))
1034 (native-inputs
1035 `(("python-nose" ,python-nose)))
1036 (home-page "http://pandas.pydata.org")
1037 (synopsis "Data structures for data analysis, time series, and statistics")
1038 (description
1039 "Pandas is a Python package providing fast, flexible, and expressive data
1040 structures designed to make working with structured (tabular,
1041 multidimensional, potentially heterogeneous) and time series data both easy
1042 and intuitive. It aims to be the fundamental high-level building block for
1043 doing practical, real world data analysis in Python.")
1044 (license license:bsd-3)))
1045
1046 (define-public python2-pandas
1047 (package-with-python2 python-pandas))
1048
1049 (define-public python-tzlocal
1050 (package
1051 (name "python-tzlocal")
1052 (version "1.2.2")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "tzlocal" version))
1057 (sha256
1058 (base32
1059 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1060 (build-system python-build-system)
1061 (propagated-inputs
1062 `(("python-pytz" ,python-pytz)))
1063 (home-page "https://github.com/regebro/tzlocal")
1064 (synopsis
1065 "Local timezone information for Python")
1066 (description
1067 "Tzlocal returns a tzinfo object with the local timezone information.
1068 This module attempts to fix a glaring hole in pytz, that there is no way to
1069 get the local timezone information, unless you know the zoneinfo name, and
1070 under several distributions that's hard or impossible to figure out.")
1071 (license license:cc0)))
1072
1073 (define-public python2-pysqlite
1074 (package
1075 (name "python2-pysqlite")
1076 (version "2.8.1")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "pysqlite" version))
1081 (sha256
1082 (base32
1083 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1084 (build-system python-build-system)
1085 (inputs
1086 `(("sqlite" ,sqlite)))
1087 (arguments
1088 `(#:python ,python-2 ; incompatible with Python 3
1089 #:tests? #f)) ; no test target
1090 (home-page "http://github.com/ghaering/pysqlite")
1091 (synopsis "SQLite bindings for Python")
1092 (description
1093 "Pysqlite provides SQLite bindings for Python that comply to the
1094 Database API 2.0T.")
1095 (license license:zlib)))
1096
1097
1098 (define-public python2-mechanize
1099 (package
1100 (name "python2-mechanize")
1101 (version "0.2.5")
1102 (source
1103 (origin
1104 (method url-fetch)
1105 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1106 version ".tar.gz"))
1107 (sha256
1108 (base32
1109 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1110 (build-system python-build-system)
1111 (arguments
1112 `(#:python ,python-2 ; apparently incompatible with Python 3
1113 #:tests? #f))
1114 ;; test fails with message
1115 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1116 ;; (python-3.3.2) or
1117 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1118 ;; (python-2.7.5).
1119 ;; The source code is from March 2011 and probably not up-to-date
1120 ;; with respect to python unit tests.
1121 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1122 (synopsis
1123 "Stateful programmatic web browsing in Python")
1124 (description
1125 "Mechanize implements stateful programmatic web browsing in Python,
1126 after Andy Lester’s Perl module WWW::Mechanize.")
1127 (license (license:non-copyleft
1128 "file://COPYING"
1129 "See COPYING in the distribution."))))
1130
1131
1132 (define-public python-simplejson
1133 (package
1134 (name "python-simplejson")
1135 (version "3.8.2")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "simplejson" version))
1140 (sha256
1141 (base32
1142 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1143 (build-system python-build-system)
1144 (home-page "http://simplejson.readthedocs.org/en/latest/")
1145 (synopsis
1146 "Json library for Python")
1147 (description
1148 "JSON (JavaScript Object Notation) is a subset of JavaScript
1149 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1150 format.
1151
1152 Simplejson exposes an API familiar to users of the standard library marshal
1153 and pickle modules. It is the externally maintained version of the json
1154 library contained in Python 2.6, but maintains compatibility with Python 2.5
1155 and (currently) has significant performance advantages, even without using
1156 the optional C extension for speedups. Simplejson is also supported on
1157 Python 3.3+.")
1158 (license license:x11)))
1159
1160 (define-public python2-simplejson
1161 (package-with-python2 python-simplejson))
1162
1163
1164 (define-public python-pyicu
1165 (package
1166 (name "python-pyicu")
1167 (version "1.9.2")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1172 version ".tar.gz"))
1173 (sha256
1174 (base32
1175 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1176 (build-system python-build-system)
1177 (inputs
1178 `(("icu4c" ,icu4c)))
1179 (home-page "http://pyicu.osafoundation.org/")
1180 (synopsis "Python extension wrapping the ICU C++ API")
1181 (description
1182 "PyICU is a python extension wrapping the ICU C++ API.")
1183 (license license:x11)))
1184
1185 (define-public python2-pyicu
1186 (package-with-python2 python-pyicu))
1187
1188 (define-public python2-dogtail
1189 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1190 ;; spaces in indentation" with Python 3.
1191 (package
1192 (name "python2-dogtail")
1193 (version "0.8.2")
1194 (source (origin
1195 (method url-fetch)
1196 (uri (string-append
1197 "https://fedorahosted.org/released/dogtail/dogtail-"
1198 version ".tar.gz"))
1199 (sha256
1200 (base32
1201 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1202 (build-system python-build-system)
1203 (arguments `(#:python ,python-2
1204 #:tests? #f)) ; invalid command "test"
1205 (home-page "https://fedorahosted.org/dogtail/")
1206 (synopsis "GUI test tool and automation framework written in ​Python")
1207 (description
1208 "Dogtail is a GUI test tool and automation framework written in Python.
1209 It uses Accessibility (a11y) technologies to communicate with desktop
1210 applications. dogtail scripts are written in Python and executed like any
1211 other Python program.")
1212 (license license:gpl2+)))
1213
1214 (define-public python2-empy
1215 (package
1216 (name "python2-empy")
1217 (version "3.3")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1221 version ".tar.gz"))
1222 (sha256
1223 (base32
1224 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1225 (build-system python-build-system)
1226 (arguments
1227 `(#:python ,python-2
1228 #:phases (alist-replace
1229 'check
1230 (lambda _
1231 (zero? (system* "./test.sh")))
1232 %standard-phases)))
1233 (home-page "http://www.alcyone.com/software/empy/")
1234 (synopsis "Templating system for Python")
1235 (description
1236 "EmPy is a system for embedding Python expressions and statements in
1237 template text; it takes an EmPy source file, processes it, and produces
1238 output. This is accomplished via expansions, which are special signals to the
1239 EmPy system and are set off by a special prefix (by default the at sign, @@).
1240 EmPy can expand arbitrary Python expressions and statements in this way, as
1241 well as a variety of special forms. Textual data not explicitly delimited in
1242 this way is sent unaffected to the output, allowing Python to be used in
1243 effect as a markup language. Also supported are callbacks via hooks,
1244 recording and playback via diversions, and dynamic, chainable filters. The
1245 system is highly configurable via command line options and embedded
1246 commands.")
1247 (license license:lgpl2.1+)))
1248
1249 (define-public python2-element-tree
1250 (package
1251 (name "python2-element-tree")
1252 (version "1.2.6")
1253 (source (origin
1254 (method url-fetch)
1255 (uri (string-append
1256 "http://effbot.org/media/downloads/elementtree-"
1257 version "-20050316.tar.gz"))
1258 (sha256
1259 (base32
1260 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1261 (build-system python-build-system)
1262 (arguments
1263 `(#:python ,python-2 ; seems to be part of Python 3
1264 #:tests? #f)) ; no 'test' sub-command
1265 (synopsis "Toolkit for XML processing in Python")
1266 (description
1267 "ElementTree is a Python library supporting lightweight XML processing.")
1268 (home-page "http://effbot.org/zone/element-index.htm")
1269 (license (license:x11-style
1270 "http://docs.python.org/2/license.html"
1271 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1272
1273 (define-public python2-pybugz
1274 (package
1275 (name "python2-pybugz")
1276 (version "0.6.11")
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append
1280 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1281 version ".tar.gz"))
1282 (sha256
1283 (base32
1284 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1285 (patches (search-patches "pybugz-stty.patch"
1286 "pybugz-encode-error.patch"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:python ,python-2 ; SyntaxError with Python 3
1290 #:tests? #f)) ; no 'test' sub-command
1291 (propagated-inputs
1292 `(("element-tree" ,python2-element-tree)))
1293 (synopsis "Python and command-line interface to Bugzilla")
1294 (description
1295 "PyBugz is a Python library and command-line tool to query the Bugzilla
1296 bug tracking system. It is meant as an aid to speed up interaction with the
1297 bug tracker.")
1298 (home-page "http://www.liquidx.net/pybugz/")
1299 (license license:gpl2)))
1300
1301 (define-public python-enum34
1302 (package
1303 (name "python-enum34")
1304 (version "1.1.0")
1305 (source
1306 (origin
1307 (method url-fetch)
1308 (uri (pypi-uri "enum34" version))
1309 (sha256
1310 (base32
1311 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1312 (build-system python-build-system)
1313 (arguments
1314 `(#:phases
1315 (alist-replace
1316 'check
1317 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1318 %standard-phases)))
1319 (home-page "https://pypi.python.org/pypi/enum34")
1320 (synopsis "Backported Python 3.4 Enum")
1321 (description
1322 "Enum34 is the new Python stdlib enum module available in Python 3.4
1323 backported for previous versions of Python from 2.4 to 3.3.")
1324 (license license:bsd-3)))
1325
1326 (define-public python2-enum34
1327 (package-with-python2 python-enum34))
1328
1329 (define-public python-parse-type
1330 (package
1331 (name "python-parse-type")
1332 (version "0.3.4")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (string-append "https://pypi.python.org/packages/source/p/"
1337 "parse_type/parse_type-" version ".tar.gz"))
1338 (sha256
1339 (base32
1340 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1341 (build-system python-build-system)
1342 (propagated-inputs
1343 `(("python-six" ,python-six)
1344 ("python-parse" ,python-parse)))
1345 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1346 (home-page "https://github.com/jenisys/parse_type")
1347 (synopsis "Extended parse module")
1348 (description
1349 "Parse_type extends the python parse module.")
1350 (license license:bsd-3)))
1351
1352 (define-public python-parse
1353 (package
1354 (name "python-parse")
1355 (version "1.6.6")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "parse" version))
1360 (sha256
1361 (base32
1362 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1363 (patches (search-patches "python-parse-too-many-fields.patch"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:phases
1367 (modify-phases %standard-phases
1368 (replace 'check
1369 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1370 (home-page "https://github.com/r1chardj0n3s/parse")
1371 (synopsis "Parse strings")
1372 (description
1373 "Parse strings using a specification based on the Python format()
1374 syntax.")
1375 (license license:x11)))
1376
1377
1378 (define-public scons
1379 (package
1380 (name "scons")
1381 (version "2.3.4")
1382 (source (origin
1383 (method url-fetch)
1384 (uri (string-append "mirror://sourceforge/scons/scons/" version
1385 "/scons-" version ".tar.gz"))
1386 (sha256
1387 (base32
1388 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1389 (build-system python-build-system)
1390 (arguments
1391 ;; With Python 3.x, fails to build with a syntax error.
1392 `(#:python ,python-2
1393 #:tests? #f)) ; no 'python setup.py test' command
1394 (home-page "http://scons.org/")
1395 (synopsis "Software construction tool written in Python")
1396 (description
1397 "SCons is a software construction tool. Think of SCons as an improved,
1398 cross-platform substitute for the classic Make utility with integrated
1399 functionality similar to autoconf/automake and compiler caches such as ccache.
1400 In short, SCons is an easier, more reliable and faster way to build
1401 software.")
1402 (license license:x11)))
1403
1404 (define-public python-extras
1405 (package
1406 (name "python-extras")
1407 (version "0.0.3")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (string-append
1412 "https://pypi.python.org/packages/source/e/extras/extras-"
1413 version ".tar.gz"))
1414 (sha256
1415 (base32
1416 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1417 (build-system python-build-system)
1418 (arguments
1419 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1420 '(#:tests? #f))
1421 (home-page "https://github.com/testing-cabal/extras")
1422 (synopsis "Useful extensions to the Python standard library")
1423 (description
1424 "Extras is a set of extensions to the Python standard library.")
1425 (license license:expat)))
1426
1427 (define-public python2-extras
1428 (package-with-python2 python-extras))
1429
1430 (define-public python-mimeparse
1431 (package
1432 (name "python-mimeparse")
1433 (version "0.1.4")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (string-append
1438 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1439 version ".tar.gz"))
1440 (sha256
1441 (base32
1442 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1443 (build-system python-build-system)
1444 (arguments
1445 '(#:tests? #f)) ; no setup.py test command
1446 (home-page
1447 "https://github.com/dbtsai/python-mimeparse")
1448 (synopsis "Python library for parsing MIME types")
1449 (description
1450 "Mimeparse provides basic functions for parsing MIME type names and
1451 matching them against a list of media-ranges.")
1452 (license license:expat)))
1453
1454 (define-public python2-mimeparse
1455 (package-with-python2 python-mimeparse))
1456
1457 (define-public python-nose
1458 (package
1459 (name "python-nose")
1460 (version "1.3.7")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (pypi-uri "nose" version))
1465 (sha256
1466 (base32
1467 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1468 (build-system python-build-system)
1469 (arguments
1470 '(#:tests? #f)) ; FIXME: test suite fails
1471 (home-page "http://readthedocs.org/docs/nose/")
1472 (synopsis "Python testing library")
1473 (description
1474 "Nose extends the unittest library to make testing easier.")
1475 (license license:lgpl2.0+)))
1476
1477 (define-public python2-nose
1478 (package-with-python2 python-nose))
1479
1480 (define-public python-nose2
1481 (package
1482 (name "python-nose2")
1483 (version "0.6.5")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "nose2" version))
1488 (sha256
1489 (base32
1490 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1491 (build-system python-build-system)
1492 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1493 (propagated-inputs
1494 `(("python-cov-core" ,python-cov-core)
1495 ("python-pytest-cov" ,python-pytest-cov)
1496 ("python-six" ,python-six)))
1497 (home-page "https://github.com/nose-devs/nose2")
1498 (synopsis "Next generation of nicer testing for Python")
1499 (description
1500 "Nose2 is the next generation of nicer testing for Python, based on the
1501 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1502 better plugin api, being easier for users to configure, and simplifying internal
1503 interfaces and processes.")
1504 (license license:bsd-2)))
1505
1506 (define-public python2-nose2
1507 (package-with-python2 python-nose2))
1508
1509 (define-public python-unittest2
1510 (package
1511 (name "python-unittest2")
1512 (version "0.5.1")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (string-append
1517 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1518 version ".tar.gz"))
1519 (sha256
1520 (base32
1521 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1522 (build-system python-build-system)
1523 (home-page "http://pypi.python.org/pypi/unittest2")
1524 (synopsis "Python unit testing library")
1525 (description
1526 "Unittest2 is a replacement for the unittest module in the Python
1527 standard library.")
1528 (license license:psfl)))
1529
1530 (define-public python2-unittest2
1531 (package (inherit python-unittest2)
1532 (name "python2-unittest2")
1533 (version "0.5.1")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri (string-append
1538 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1539 version ".tar.gz"))
1540 (sha256
1541 (base32
1542 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1543 (arguments
1544 `(#:python ,python-2
1545 #:tests? #f)))) ; no setup.py test command
1546
1547 (define-public python-pafy
1548 (package
1549 (name "python-pafy")
1550 (version "0.5.2")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "pafy" version))
1555 (sha256
1556 (base32
1557 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1558 (build-system python-build-system)
1559 (propagated-inputs
1560 ;; Youtube-dl is a python package which is imported in the file
1561 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1562 `(("youtube-dl" ,youtube-dl)))
1563 (home-page "https://np1.github.io/pafy/")
1564 (synopsis "Retrieve YouTube content and metadata")
1565 (description
1566 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1567 (license license:lgpl3+)))
1568
1569 (define-public python-py
1570 (package
1571 (name "python-py")
1572 (version "1.4.31")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (pypi-uri "py" version))
1577 (sha256
1578 (base32
1579 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1580 (build-system python-build-system)
1581 (home-page "http://pylib.readthedocs.org/")
1582 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1583 (description
1584 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1585 code introspection, and logging.")
1586 (license license:expat)))
1587
1588 (define-public python2-py
1589 (package-with-python2 python-py))
1590
1591 (define-public python-pytest
1592 (package
1593 (name "python-pytest")
1594 (version "2.7.3")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (string-append
1599 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1600 version ".tar.gz"))
1601 (sha256
1602 (base32
1603 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1604 (modules '((guix build utils)))
1605 (snippet
1606 ;; One of the tests involves the /usr directory, so it fails.
1607 '(substitute* "testing/test_argcomplete.py"
1608 (("def test_remove_dir_prefix\\(self\\):")
1609 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1610 (build-system python-build-system)
1611 (propagated-inputs
1612 `(("python-py" ,python-py)))
1613 (native-inputs
1614 `(("python-nose" ,python-nose)
1615 ("python-mock" ,python-mock)))
1616 (home-page "http://pytest.org")
1617 (synopsis "Python testing library")
1618 (description
1619 "Pytest is a testing tool that provides auto-discovery of test modules
1620 and functions, detailed info on failing assert statements, modular fixtures,
1621 and many external plugins.")
1622 (license license:expat)))
1623
1624 (define-public python2-pytest
1625 (package-with-python2 python-pytest))
1626
1627 ;; This package is used by Borg until we can upgrade all our Python packages to
1628 ;; use a more recent pytest.
1629 (define-public python-pytest-2.9.2
1630 (package
1631 (inherit python-pytest)
1632 (name "python-pytest")
1633 (version "2.9.2")
1634 (source (origin
1635 (method url-fetch)
1636 (uri (pypi-uri "pytest" version))
1637 (sha256
1638 (base32
1639 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1640 (arguments
1641 `(#:phases
1642 (modify-phases %standard-phases
1643 (add-before 'check 'disable-invalid-test
1644 (lambda _
1645 (substitute* "testing/test_argcomplete.py"
1646 (("def test_remove_dir_prefix" line)
1647 (string-append "@pytest.mark.skip"
1648 "(reason=\"Assumes that /usr exists.\")\n "
1649 line)))
1650 #t)))))))
1651
1652 (define-public python-pytest-cov
1653 (package
1654 (name "python-pytest-cov")
1655 (version "2.2.1")
1656 (source
1657 (origin
1658 (method url-fetch)
1659 (uri (pypi-uri "pytest-cov" version))
1660 (sha256
1661 (base32
1662 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1663 (build-system python-build-system)
1664 (propagated-inputs
1665 `(("python-coverage" ,python-coverage)
1666 ("python-pytest" ,python-pytest)))
1667 (home-page "https://github.com/pytest-dev/pytest-cov")
1668 (synopsis "Pytest plugin for measuring coverage")
1669 (description
1670 "Pytest-cov produces coverage reports. It supports centralised testing and
1671 distributed testing in both @code{load} and @code{each} modes. It also
1672 supports coverage of subprocesses.")
1673 (license license:expat)))
1674
1675 (define-public python2-pytest-cov
1676 (package-with-python2 python-pytest-cov))
1677
1678 (define-public python-pytest-runner
1679 (package
1680 (name "python-pytest-runner")
1681 (version "2.6.2")
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (pypi-uri "pytest-runner" version))
1686 (sha256
1687 (base32
1688 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1689 (build-system python-build-system)
1690 (arguments
1691 `(#:phases
1692 (modify-phases %standard-phases
1693 ;; The fancy way of setting the version with setuptools_scm does not
1694 ;; seem to work here.
1695 (add-after 'unpack 'set-version
1696 (lambda _
1697 (substitute* "docs/conf.py"
1698 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1699 (string-append "version = \"" ,version "\"")))
1700 #t)))))
1701 (native-inputs
1702 `(("python-pytest" ,python-pytest)
1703 ("python-setuptools-scm" ,python-setuptools-scm)))
1704 (home-page "https://github.com/pytest-dev/pytest-runner")
1705 (synopsis "Invoke py.test as a distutils command")
1706 (description
1707 "This package provides a @command{pytest-runner} command that
1708 @file{setup.py} files can use to run tests.")
1709 (license license:expat)))
1710
1711 (define-public python2-pytest-runner
1712 (package-with-python2 python-pytest-runner))
1713
1714 (define-public python-pytest-mock
1715 (package
1716 (name "python-pytest-mock")
1717 (version "1.2")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (pypi-uri "pytest-mock" version ".zip"))
1722 (sha256
1723 (base32
1724 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1725 (build-system python-build-system)
1726 (native-inputs
1727 `(("unzip" ,unzip)))
1728 (propagated-inputs
1729 `(("python-py" ,python-py)
1730 ("python-pytest" ,python-pytest)))
1731 (home-page "https://github.com/pytest-dev/pytest-mock/")
1732 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1733 (description
1734 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1735 around the patching API provided by the @code{mock} package, but with the
1736 benefit of not having to worry about undoing patches at the end of a test.
1737 The mocker fixture has the same API as @code{mock.patch}, supporting the
1738 same arguments.")
1739 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1740 (license license:expat)))
1741
1742 (define-public python2-pytest-mock
1743 (let ((base (package-with-python2
1744 (strip-python2-variant python-pytest-mock))))
1745 (package (inherit base)
1746 (propagated-inputs
1747 `(("python2-mock" ,python2-mock)
1748 ,@(package-propagated-inputs base))))))
1749
1750 (define-public python-pytest-xdist
1751 (package
1752 (name "python-pytest-xdist")
1753 (version "1.14")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "pytest-xdist" version ".zip"))
1758 (sha256
1759 (base32
1760 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1761 (modules '((guix build utils)))
1762 (snippet
1763 '(begin
1764 ;; Remove pre-compiled .pyc files from source.
1765 (for-each delete-file-recursively
1766 (find-files "." "__pycache__" #:directories? #t))
1767 (for-each delete-file (find-files "." "\\.pyc$"))
1768 #t))))
1769 (build-system python-build-system)
1770 (native-inputs
1771 `(("unzip" ,unzip)
1772 ("python-setuptools-scm" ,python-setuptools-scm)))
1773 (propagated-inputs
1774 `(("python-apipkg" ,python-apipkg)
1775 ("python-execnet" ,python-execnet)
1776 ("python-pytest" ,python-pytest)
1777 ("python-py" ,python-py)))
1778 (home-page
1779 "https://github.com/pytest-dev/pytest-xdist")
1780 (synopsis
1781 "Plugin for py.test with distributed testing and loop-on-failing modes")
1782 (description
1783 "The pytest-xdist plugin extends py.test with some unique test execution
1784 modes: parallelization, running tests in boxed subprocesses, the ability
1785 to run tests repeatedly when failed, and the ability to run tests on multiple
1786 Python interpreters or platforms. It uses rsync to copy the existing
1787 program code to a remote location, executes there, and then syncs the
1788 result back.")
1789 (license license:expat)))
1790
1791 (define-public python2-pytest-xdist
1792 (package-with-python2 python-pytest-xdist))
1793
1794 (define-public python-scripttest
1795 (package
1796 (name "python-scripttest")
1797 (version "1.3")
1798 (source
1799 (origin
1800 (method url-fetch)
1801 (uri (string-append
1802 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1803 version ".tar.gz"))
1804 (sha256
1805 (base32
1806 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1807 (build-system python-build-system)
1808 (propagated-inputs
1809 `(("python-pytest" ,python-pytest)))
1810 (home-page "http://pythonpaste.org/scripttest/")
1811 (synopsis "Python library to test command-line scripts")
1812 (description "Scripttest is a Python helper library for testing
1813 interactive command-line applications. With it you can run a script in a
1814 subprocess and see the output as well as any file modifications.")
1815 (license license:expat)))
1816
1817 (define-public python2-scripttest
1818 (package-with-python2 python-scripttest))
1819
1820 (define-public python-testtools
1821 (package
1822 (name "python-testtools")
1823 (version "1.0.0")
1824 (source
1825 (origin
1826 (method url-fetch)
1827 (uri (string-append
1828 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1829 version ".tar.gz"))
1830 (sha256
1831 (base32
1832 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1833 (build-system python-build-system)
1834 (propagated-inputs
1835 `(("python-mimeparse" ,python-mimeparse)
1836 ("python-extras" ,python-extras)))
1837 (home-page "https://github.com/testing-cabal/testtools")
1838 (synopsis
1839 "Extensions to the Python standard library unit testing framework")
1840 (description
1841 "Testtools extends the Python standard library unit testing framework to
1842 provide matchers, more debugging information, and cross-Python
1843 compatibility.")
1844 (license license:psfl)))
1845
1846 (define-public python2-testtools
1847 (package-with-python2 python-testtools))
1848
1849 (define-public python-testscenarios
1850 (package
1851 (name "python-testscenarios")
1852 (version "0.4")
1853 (source
1854 (origin
1855 (method url-fetch)
1856 (uri (string-append
1857 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1858 version ".tar.gz"))
1859 (sha256
1860 (base32
1861 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1862 (build-system python-build-system)
1863 (propagated-inputs
1864 `(("python-testtools" ,python-testtools)
1865 ("python-mimeparse" ,python-mimeparse)))
1866 (home-page "https://launchpad.net/testscenarios")
1867 (synopsis "Pyunit extension for dependency injection")
1868 (description
1869 "Testscenarios provides clean dependency injection for Python unittest
1870 style tests.")
1871 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1872
1873 (define-public python2-testscenarios
1874 (package-with-python2 python-testscenarios))
1875
1876 (define-public python-testresources
1877 (package
1878 (name "python-testresources")
1879 (version "0.2.7")
1880 (source
1881 (origin
1882 (method url-fetch)
1883 (uri (string-append
1884 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1885 version ".tar.gz"))
1886 (sha256
1887 (base32
1888 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1889 (build-system python-build-system)
1890 (home-page "https://launchpad.net/testresources")
1891 (synopsis
1892 "Pyunit extension for managing test resources")
1893 (description
1894 "Testresources is an extension to Python's unittest to allow declarative
1895 use of resources by test cases.")
1896 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1897
1898 (define-public python2-testresources
1899 (package-with-python2 python-testresources))
1900
1901 (define-public python-subunit
1902 (package
1903 (name "python-subunit")
1904 (version "0.0.21")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (string-append
1909 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1910 version ".tar.gz"))
1911 (sha256
1912 (base32
1913 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1914 (build-system python-build-system)
1915 (propagated-inputs
1916 `(("python-testtools" ,python-testtools)
1917 ("python-mimeparse" ,python-mimeparse)
1918 ("python-testscenarios" ,python-testscenarios)))
1919 (home-page "http://launchpad.net/subunit")
1920 (synopsis "Python implementation of the subunit protocol")
1921 (description
1922 "Python-subunit is a Python implementation of the subunit test streaming
1923 protocol.")
1924 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1925
1926 (define-public python2-subunit
1927 (package-with-python2 python-subunit))
1928
1929 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1930 ;; which needs a recent version of python-fixtures. To fix this circular
1931 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1932 ;; bootstrap the whole thing:
1933 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1934 ;; - python-pbr-0.11 is used to build python-fixtures
1935 ;; - python-fixtures is used to build python-pbr
1936 (define-public python-fixtures-0.3.16
1937 (package
1938 (name "python-fixtures")
1939 (version "0.3.16")
1940 (source
1941 (origin
1942 (method url-fetch)
1943 (uri (string-append
1944 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1945 version ".tar.gz"))
1946 (sha256
1947 (base32
1948 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1949 (build-system python-build-system)
1950 (arguments
1951 '(#:tests? #f)) ; no setup.py test command
1952 (home-page "https://launchpad.net/python-fixtures")
1953 (synopsis "Python test fixture library")
1954 (description
1955 "Fixtures provides a way to create reusable state, useful when writing
1956 Python tests.")
1957 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1958
1959 (define-public python2-fixtures-0.3.16
1960 (package-with-python2 python-fixtures-0.3.16))
1961
1962 (define-public python-pbr-0.11
1963 (package
1964 (name "python-pbr")
1965 (version "0.11.0")
1966 (source
1967 (origin
1968 (method url-fetch)
1969 (uri (string-append
1970 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1971 version ".tar.gz"))
1972 (sha256
1973 (base32
1974 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1975 (build-system python-build-system)
1976 (arguments
1977 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1978 (propagated-inputs
1979 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)))
1980 (home-page "https://launchpad.net/pbr")
1981 (synopsis "Change the default behavior of Python’s setuptools")
1982 (description
1983 "Python Build Reasonableness (PBR) is a library that injects some useful
1984 and sensible default behaviors into your setuptools run.")
1985 (license license:asl2.0)))
1986
1987 (define-public python2-pbr-0.11
1988 (package-with-python2 python-pbr-0.11))
1989
1990 (define-public python-pbr
1991 (package
1992 (name "python-pbr")
1993 (version "1.8.1")
1994 (source
1995 (origin
1996 (method url-fetch)
1997 (uri (string-append
1998 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1999 version
2000 ".tar.gz"))
2001 (sha256
2002 (base32
2003 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2004 (build-system python-build-system)
2005 (arguments
2006 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2007 (propagated-inputs
2008 `(("python-testrepository" ,python-testrepository)
2009 ("git" ,git))) ;; pbr actually uses the "git" binary.
2010 (inputs
2011 `(("python-fixtures" ,python-fixtures)
2012 ("python-mimeparse" ,python-mimeparse)
2013 ("python-mock" ,python-mock)
2014 ("python-six" ,python-six)
2015 ("python-sphinx" ,python-sphinx)
2016 ("python-testrepository" ,python-testrepository)
2017 ("python-testresources" ,python-testresources)
2018 ("python-testscenarios" ,python-testscenarios)
2019 ("python-testtools" ,python-testtools)
2020 ("python-virtualenv" ,python-virtualenv)))
2021 (home-page "https://launchpad.net/pbr")
2022 (synopsis "Change the default behavior of Python’s setuptools")
2023 (description
2024 "Python Build Reasonableness (PBR) is a library that injects some useful
2025 and sensible default behaviors into your setuptools run.")
2026 (license license:asl2.0)))
2027
2028 (define-public python2-pbr
2029 (package-with-python2 python-pbr))
2030
2031 (define-public python-fixtures
2032 (package
2033 (name "python-fixtures")
2034 (version "1.4.0")
2035 (source
2036 (origin
2037 (method url-fetch)
2038 (uri (pypi-uri "fixtures" version))
2039 (sha256
2040 (base32
2041 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2042 (build-system python-build-system)
2043 (propagated-inputs
2044 `(("python-six" ,python-six)
2045 ("python-pbr-0.11" ,python-pbr-0.11)))
2046 (native-inputs
2047 `(;; Tests
2048 ("python-testtools" ,python-testtools)))
2049 (arguments
2050 '(#:tests? #f)) ; no setup.py test command
2051 (home-page "https://launchpad.net/python-fixtures")
2052 (synopsis "Python test fixture library")
2053 (description
2054 "Fixtures provides a way to create reusable state, useful when writing
2055 Python tests.")
2056 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2057
2058 (define-public python2-fixtures
2059 (package-with-python2 python-fixtures))
2060
2061 (define-public python-testrepository
2062 (package
2063 (name "python-testrepository")
2064 (version "0.0.20")
2065 (source
2066 (origin
2067 (method url-fetch)
2068 (uri (string-append
2069 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2070 version ".tar.gz"))
2071 (sha256
2072 (base32
2073 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2074 (build-system python-build-system)
2075 (propagated-inputs
2076 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2077 ("python-testtools" ,python-testtools)))
2078 (native-inputs
2079 `(("python-subunit" ,python-subunit)
2080 ("python-mimeparse" ,python-mimeparse)))
2081 (home-page "https://launchpad.net/testrepository")
2082 (synopsis "Database for Python test results")
2083 (description "Testrepository provides a database of test results which can
2084 be used as part of a developer's workflow to check things such as what tests
2085 have failed since the last commit or what tests are currently failing.")
2086 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2087
2088 (define-public python2-testrepository
2089 (package-with-python2 python-testrepository))
2090
2091 (define-public python-coverage
2092 (package
2093 (name "python-coverage")
2094 (version "4.1")
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (pypi-uri "coverage" version))
2099 (sha256
2100 (base32
2101 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2102 (build-system python-build-system)
2103 (home-page "http://nedbatchelder.com/code/coverage")
2104 (synopsis "Code coverage measurement for Python")
2105 (description
2106 "Coverage measures code coverage, typically during test execution. It
2107 uses the code analysis tools and tracing hooks provided in the Python standard
2108 library to determine which lines are executable, and which have been
2109 executed.")
2110 (license license:bsd-3)))
2111
2112 (define-public python2-coverage
2113 (package-with-python2 python-coverage))
2114
2115 (define-public python-cov-core
2116 (package
2117 (name "python-cov-core")
2118 (version "1.15.0")
2119 (source
2120 (origin
2121 (method url-fetch)
2122 (uri (pypi-uri "cov-core" version))
2123 (sha256
2124 (base32
2125 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2126 (build-system python-build-system)
2127 (native-inputs
2128 `(("python-coverage" ,python-coverage)))
2129 (home-page "https://github.com/schlamar/cov-core")
2130 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2131 (description
2132 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2133 It is useful for developing coverage plugins for these testing frameworks.")
2134 (license license:expat)))
2135
2136 (define-public python2-cov-core
2137 (package-with-python2 python-cov-core))
2138
2139 (define-public python-discover
2140 (package
2141 (name "python-discover")
2142 (version "0.4.0")
2143 (source
2144 (origin
2145 (method url-fetch)
2146 (uri (string-append
2147 "https://pypi.python.org/packages/source/d/discover/discover-"
2148 version ".tar.gz"))
2149 (sha256
2150 (base32
2151 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2152 (build-system python-build-system)
2153 (home-page "http://pypi.python.org/pypi/discover/")
2154 (synopsis
2155 "Python test discovery for unittest")
2156 (description
2157 "Discover provides test discovery for unittest, a feature that has been
2158 backported from Python 2.7 for Python 2.4+.")
2159 (license license:bsd-3)))
2160
2161 (define-public python2-discover
2162 (package-with-python2 python-discover))
2163
2164 (define-public behave
2165 (package
2166 (name "behave")
2167 (version "1.2.5")
2168 (source (origin
2169 (method url-fetch)
2170 (uri (pypi-uri "behave" version ".tar.bz2"))
2171 (sha256
2172 (base32
2173 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2174 (build-system python-build-system)
2175 (propagated-inputs
2176 `(("python-six" ,python-six)
2177 ("python-parse" ,python-parse)
2178 ("python-parse-type" ,python-parse-type)))
2179 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2180 ;PyHamcrest>=1.8
2181 (home-page "http://github.com/behave/behave")
2182 (synopsis "Python behavior-driven development")
2183 (description
2184 "Behave is a tool for behavior-driven development in python.
2185 Behavior-driven development (or BDD) is an agile software development
2186 technique that encourages collaboration between developers, QA and
2187 non-technical or business participants in a software project. Behave uses
2188 tests written in a natural language style, backed up by Python code.")
2189 (license license:x11)))
2190
2191 (define-public python-exif-read
2192 (package
2193 (name "python-exif-read")
2194 (version "2.1.2")
2195 (source (origin
2196 (method url-fetch)
2197 (uri (pypi-uri "ExifRead" version))
2198 (sha256
2199 (base32
2200 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2201 (build-system python-build-system)
2202 (arguments `(#:tests? #f)) ; no tests
2203 (home-page "https://github.com/ianare/exif-py")
2204 (synopsis "Python library to extract EXIF data from image files")
2205 (description
2206 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2207 files.")
2208 (license license:bsd-3)))
2209
2210 (define-public python2-exif-read
2211 (package-with-python2 python-exif-read))
2212
2213 (define-public python-pyld
2214 (package
2215 (name "python-pyld")
2216 (version "0.6.8")
2217 (source (origin
2218 (method url-fetch)
2219 (uri (pypi-uri "PyLD" version))
2220 (sha256
2221 (base32
2222 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2223 (build-system python-build-system)
2224 (arguments `(#:tests? #f)) ; no tests
2225 (home-page "http://github.com/digitalbazaar/pyld")
2226 (synopsis "Python implementation of the JSON-LD specification")
2227 (description
2228 "PyLD is an implementation of the JSON-LD specification.")
2229 (license license:bsd-3)))
2230
2231 (define-public python2-pyld
2232 (package-with-python2 python-pyld))
2233
2234 (define-public python-certifi
2235 (package
2236 (name "python-certifi")
2237 (version "2016.8.31")
2238 (source (origin
2239 (method url-fetch)
2240 (uri (pypi-uri "certifi" version))
2241 (sha256
2242 (base32
2243 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2244 (build-system python-build-system)
2245 (arguments `(#:tests? #f)) ; no tests
2246 (home-page "http://python-requests.org/")
2247 (synopsis "Python CA certificate bundle")
2248 (description
2249 "Certifi is a Python library that contains a CA certificate bundle, which
2250 is used by the Requests library to verify HTTPS requests.")
2251 (license license:asl2.0)))
2252
2253 (define-public python2-certifi
2254 (package-with-python2 python-certifi))
2255
2256 (define-public python-click
2257 (package
2258 (name "python-click")
2259 (version "6.6")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (pypi-uri "click" version))
2264 (sha256
2265 (base32
2266 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2267 (build-system python-build-system)
2268 (arguments
2269 `(#:phases
2270 (modify-phases %standard-phases
2271 (add-after 'unpack 'fix-paths
2272 (lambda* (#:key inputs #:allow-other-keys)
2273 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2274 "cross-libc" "libc"))))
2275 (substitute* "click/_unicodefun.py"
2276 (("'locale'")
2277 (string-append "'" glibc "/bin/locale'"))))
2278 #t)))))
2279 (home-page "http://click.pocoo.org")
2280 (synopsis "Command line library for Python")
2281 (description
2282 "Click is a Python package for creating command line interfaces in a
2283 composable way with as little code as necessary. Its name stands for
2284 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2285 with sensible defaults out of the box.")
2286 (license license:bsd-3)))
2287
2288 (define-public python2-click
2289 (package-with-python2 python-click))
2290
2291 (define-public python-wheel
2292 (package
2293 (name "python-wheel")
2294 (version "0.29.0")
2295 (source
2296 (origin
2297 (method url-fetch)
2298 (uri (pypi-uri "wheel" version))
2299 (sha256
2300 (base32
2301 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2302 (build-system python-build-system)
2303 (native-inputs
2304 `(("python-jsonschema" ,python-jsonschema)
2305 ("python-pytest-cov" ,python-pytest-cov)))
2306 (home-page "https://bitbucket.org/pypa/wheel/")
2307 (synopsis "Format for built Python packages")
2308 (description
2309 "A wheel is a ZIP-format archive with a specially formatted filename and
2310 the @code{.whl} extension. It is designed to contain all the files for a PEP
2311 376 compatible install in a way that is very close to the on-disk format. Many
2312 packages will be properly installed with only the @code{Unpack} step and the
2313 unpacked archive preserves enough information to @code{Spread} (copy data and
2314 scripts to their final locations) at any later time. Wheel files can be
2315 installed with a newer @code{pip} or with wheel's own command line utility.")
2316 (license license:expat)
2317 (properties `((python2-variant . ,(delay python2-wheel))))))
2318
2319 (define-public python2-wheel
2320 (let ((wheel (package-with-python2
2321 (strip-python2-variant python-wheel))))
2322 (package (inherit wheel)
2323 (native-inputs `(("python2-functools32" ,python2-functools32)
2324 ,@(package-native-inputs wheel))))))
2325
2326
2327 (define-public python-requests
2328 (package
2329 (name "python-requests")
2330 (version "2.9.1")
2331 (source (origin
2332 (method url-fetch)
2333 (uri (pypi-uri "requests" version))
2334 (sha256
2335 (base32
2336 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2337 (build-system python-build-system)
2338 (native-inputs
2339 `(("python-py" ,python-py)
2340 ("python-pytest" ,python-pytest)
2341 ("python-pytest-cov" ,python-pytest-cov)
2342 ("python-wheel" ,python-wheel)))
2343 (home-page "http://python-requests.org/")
2344 (synopsis "Python HTTP library")
2345 (description
2346 "Requests is a Python HTTP client library. It aims to be easier to use
2347 than Python’s urllib2 library.")
2348 (license license:asl2.0)))
2349
2350 ;; Some software requires an older version of Requests, notably Docker
2351 ;; Compose.
2352 (define-public python-requests-2.7
2353 (package (inherit python-requests)
2354 (version "2.7.0")
2355 (source (origin
2356 (method url-fetch)
2357 (uri (pypi-uri "requests" version))
2358 (sha256
2359 (base32
2360 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2361
2362 (define-public python2-requests
2363 (package-with-python2 python-requests))
2364
2365 (define-public python-vcversioner
2366 (package
2367 (name "python-vcversioner")
2368 (version "2.16.0.0")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (pypi-uri "vcversioner" version))
2373 (sha256
2374 (base32
2375 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2376 (build-system python-build-system)
2377 (synopsis "Python library for version number discovery")
2378 (description "Vcversioner is a Python library that inspects tagging
2379 information in a variety of version control systems in order to discover
2380 version numbers.")
2381 (home-page "https://github.com/habnabit/vcversioner")
2382 (license license:isc)))
2383
2384 (define-public python2-vcversioner
2385 (package-with-python2 python-vcversioner))
2386
2387 (define-public python-jsonschema
2388 (package
2389 (name "python-jsonschema")
2390 (version "2.5.1")
2391 (source (origin
2392 (method url-fetch)
2393 (uri
2394 (string-append
2395 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2396 version ".tar.gz"))
2397 (sha256
2398 (base32
2399 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2400 (build-system python-build-system)
2401 (arguments
2402 '(#:phases
2403 (modify-phases %standard-phases
2404 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2405 (native-inputs
2406 `(("python-nose" ,python-nose)
2407 ("python-vcversioner" ,python-vcversioner)))
2408 (home-page "https://github.com/Julian/jsonschema")
2409 (synopsis "Implementation of JSON Schema for Python")
2410 (description
2411 "Jsonschema is an implementation of JSON Schema for Python.")
2412 (license license:expat)
2413 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2414
2415 (define-public python2-jsonschema
2416 (let ((jsonschema (package-with-python2
2417 (strip-python2-variant python-jsonschema))))
2418 (package (inherit jsonschema)
2419 (native-inputs
2420 `(("python2-mock" ,python2-mock)
2421 ,@(package-native-inputs jsonschema)))
2422 (propagated-inputs
2423 `(("python2-functools32" ,python2-functools32))))))
2424
2425 (define-public python-unidecode
2426 (package
2427 (name "python-unidecode")
2428 (version "0.04.18")
2429 (source (origin
2430 (method url-fetch)
2431 (uri (pypi-uri "Unidecode" version))
2432 (sha256
2433 (base32
2434 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2435 (build-system python-build-system)
2436 (home-page "https://pypi.python.org/pypi/Unidecode")
2437 (synopsis "ASCII transliterations of Unicode text")
2438 (description
2439 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2440 useful when integrating with legacy code that doesn't support Unicode, or for
2441 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2442 machine identifiers from human-readable Unicode strings that should still be
2443 somewhat intelligeble.")
2444 (license license:gpl2+)))
2445
2446 (define-public python2-unidecode
2447 (package-with-python2 python-unidecode))
2448
2449 (define-public python-pyjwt
2450 (package
2451 (name "python-pyjwt")
2452 (version "1.4.0")
2453 (source
2454 (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "PyJWT" version))
2457 (sha256
2458 (base32
2459 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2460 (build-system python-build-system)
2461 (native-inputs
2462 `(("python-pytest-runner" ,python-pytest-runner)))
2463 (arguments
2464 '(#:tests? #f)) ; test suite doesn't work
2465 (home-page "http://github.com/progrium/pyjwt")
2466 (synopsis "JSON Web Token implementation in Python")
2467 (description
2468 "PyJWT is a JSON Web Token implementation written in Python.")
2469 (license license:expat)))
2470
2471 (define-public python2-pyjwt
2472 (package-with-python2 python-pyjwt))
2473
2474 (define-public python-oauthlib
2475 (package
2476 (name "python-oauthlib")
2477 (version "1.0.3")
2478 (source (origin
2479 (method url-fetch)
2480 (uri (pypi-uri "oauthlib" version))
2481 (sha256
2482 (base32
2483 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2484 (build-system python-build-system)
2485 (native-inputs
2486 `(("python-coverage" ,python-coverage)
2487 ("python-nose" ,python-nose)
2488 ("python-mock" ,python-mock)))
2489 (propagated-inputs
2490 `(("python-blinker" ,python-blinker)
2491 ("python-cryptography" ,python-cryptography)
2492 ("python-pyjwt" ,python-pyjwt)))
2493 (home-page "https://github.com/idan/oauthlib")
2494 (synopsis "OAuth implementation for Python")
2495 (description
2496 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2497 OAuth request-signing logic.")
2498 (license license:bsd-3)
2499 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2500
2501 (define-public python2-oauthlib
2502 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2503 (package
2504 (inherit base)
2505 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2506 ,@(package-native-inputs base))))))
2507
2508 (define-public python-itsdangerous
2509 (package
2510 (name "python-itsdangerous")
2511 (version "0.24")
2512 (source
2513 (origin
2514 (method url-fetch)
2515 (uri (string-append
2516 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2517 version ".tar.gz"))
2518 (sha256
2519 (base32
2520 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2521 (build-system python-build-system)
2522 (home-page "http://github.com/mitsuhiko/itsdangerous")
2523 (synopsis "Python library for passing data to/from untrusted environments")
2524 (description
2525 "Itsdangerous provides various helpers to pass trusted data to untrusted
2526 environments and back.")
2527 (license license:bsd-3)))
2528
2529 (define-public python2-itsdangerous
2530 (package-with-python2 python-itsdangerous))
2531
2532 (define-public python-pyyaml
2533 (package
2534 (name "python-pyyaml")
2535 (version "3.11")
2536 (source
2537 (origin
2538 (method url-fetch)
2539 (uri (string-append
2540 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2541 version ".tar.gz"))
2542 (sha256
2543 (base32
2544 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2545 (build-system python-build-system)
2546 (inputs
2547 `(("libyaml" ,libyaml)))
2548 (home-page "http://pyyaml.org/wiki/PyYAML")
2549 (synopsis "YAML parser and emitter for Python")
2550 (description
2551 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2552 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2553 API, and sensible error messages. PyYAML supports standard YAML tags and
2554 provides Python-specific tags that allow to represent an arbitrary Python
2555 object.")
2556 (license license:expat)))
2557
2558 (define-public python2-pyyaml
2559 (package-with-python2 python-pyyaml))
2560
2561 (define-public python-virtualenv
2562 (package
2563 (name "python-virtualenv")
2564 (version "15.0.3")
2565 (source
2566 (origin
2567 (method url-fetch)
2568 (uri (pypi-uri "virtualenv" version))
2569 (sha256
2570 (base32
2571 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2572 (build-system python-build-system)
2573 (arguments
2574 `(#:phases
2575 (modify-phases %standard-phases
2576 (replace 'check
2577 (lambda _
2578 ;; Disable failing test. See upstream bug report
2579 ;; https://github.com/pypa/virtualenv/issues/957
2580 (substitute* "tests/test_virtualenv.py"
2581 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2582 (zero? (system* "py.test")))))))
2583 (native-inputs
2584 `(("python-mock" ,python-mock)
2585 ("python-pytest" ,python-pytest)))
2586 (home-page "https://virtualenv.pypa.io/")
2587 (synopsis "Virtual Python environment builder")
2588 (description
2589 "Virtualenv is a tool to create isolated Python environments.")
2590 (license license:expat)))
2591
2592 (define-public python2-virtualenv
2593 (package-with-python2 python-virtualenv))
2594
2595 (define-public python-markupsafe
2596 (package
2597 (name "python-markupsafe")
2598 (version "0.23")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (string-append
2603 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2604 version ".tar.gz"))
2605 (sha256
2606 (base32
2607 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2608 (build-system python-build-system)
2609 (home-page "http://github.com/mitsuhiko/markupsafe")
2610 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2611 (description
2612 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2613 for Python.")
2614 (license license:bsd-3)))
2615
2616 (define-public python2-markupsafe
2617 (package-with-python2 python-markupsafe))
2618
2619 (define-public python-jinja2
2620 (package
2621 (name "python-jinja2")
2622 (version "2.8")
2623 (source
2624 (origin
2625 (method url-fetch)
2626 (uri (pypi-uri "Jinja2" version))
2627 (sha256
2628 (base32
2629 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2630 (build-system python-build-system)
2631 (propagated-inputs
2632 `(("python-markupsafe" ,python-markupsafe)))
2633 (home-page "http://jinja.pocoo.org/")
2634 (synopsis "Python template engine")
2635 (description
2636 "Jinja2 is a small but fast and easy to use stand-alone template engine
2637 written in pure Python.")
2638 (license license:bsd-3)))
2639
2640 (define-public python2-jinja2
2641 (package-with-python2 python-jinja2))
2642
2643 (define-public python-pystache
2644 (package
2645 (name "python-pystache")
2646 (version "0.5.4")
2647 (source (origin
2648 (method url-fetch)
2649 (uri (pypi-uri "pystache" version))
2650 (sha256
2651 (base32
2652 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2653 (build-system python-build-system)
2654 (home-page "http://defunkt.io/pystache/")
2655 (synopsis "Python logic-less template engine")
2656 (description
2657 "Pystache is a Python implementation of the framework agnostic,
2658 logic-free templating system Mustache.")
2659 (license license:expat)))
2660
2661 (define-public python2-pystache
2662 (package-with-python2 python-pystache))
2663
2664 (define-public python-joblib
2665 (package
2666 (name "python-joblib")
2667 (version "0.10.3")
2668 (source (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "joblib" version))
2671 (sha256
2672 (base32
2673 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
2674 (build-system python-build-system)
2675 (arguments
2676 `(#:phases
2677 (modify-phases %standard-phases
2678 (add-before 'check 'disable-failing-tests
2679 (lambda _
2680 ;; This numpydoc tests fails for unknown reasons
2681 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2682 ;; This numpydoc test depends on matplotlib, which is not a
2683 ;; required input.
2684 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2685 ;; These tests fail to execute sys.executable
2686 (substitute* "joblib/test/test_parallel.py"
2687 (("import nose" line)
2688 (string-append "from nose.plugins.skip import SkipTest\n" line))
2689 (("def test_nested_parallel_warnings" line)
2690 (string-append "@SkipTest\n" line))
2691 (("def test_parallel_with_interactively_defined_functions" line)
2692 (string-append "@SkipTest\n" line)))
2693 #t)))))
2694 (native-inputs
2695 `(("python-nose" ,python-nose)
2696 ("python-sphinx" ,python-sphinx)
2697 ("python-docutils" ,python-docutils)
2698 ("python-numpydoc" ,python-numpydoc)))
2699 (home-page "http://pythonhosted.org/joblib/")
2700 (synopsis "Using Python functions as pipeline jobs")
2701 (description
2702 "Joblib is a set of tools to provide lightweight pipelining in Python.
2703 In particular, joblib offers: transparent disk-caching of the output values
2704 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2705 logging and tracing of the execution.")
2706 (license license:bsd-3)))
2707
2708 (define-public python2-joblib
2709 (package-with-python2 python-joblib))
2710
2711 (define-public python-docutils
2712 (package
2713 (name "python-docutils")
2714 (version "0.12")
2715 (source
2716 (origin
2717 (method url-fetch)
2718 (uri (string-append
2719 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2720 version ".tar.gz"))
2721 (sha256
2722 (base32
2723 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2724 (build-system python-build-system)
2725 (arguments
2726 '(#:tests? #f)) ; no setup.py test command
2727 (home-page "http://docutils.sourceforge.net/")
2728 (synopsis "Python Documentation Utilities")
2729 (description
2730 "Docutils is a modular system for processing documentation into useful
2731 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2732 reStructuredText.")
2733 ;; Most of the source code is public domain, but some source files are
2734 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2735 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2736
2737 (define-public python2-docutils
2738 (package-with-python2 python-docutils))
2739
2740 (define-public python-pygments
2741 (package
2742 (name "python-pygments")
2743 (version "2.0.2")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (pypi-uri "Pygments" version))
2748 (sha256
2749 (base32
2750 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2751 (build-system python-build-system)
2752 (home-page "http://pygments.org/")
2753 (synopsis "Syntax highlighting")
2754 (description
2755 "Pygments is a syntax highlighting package written in Python.")
2756 (license license:bsd-2)))
2757
2758 (define-public python2-pygments
2759 (package-with-python2 python-pygments))
2760
2761 (define-public python-sphinx
2762 (package
2763 (name "python-sphinx")
2764 (version "1.2.3")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (string-append
2769 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2770 version ".tar.gz"))
2771 (sha256
2772 (base32
2773 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2774 (build-system python-build-system)
2775 (propagated-inputs
2776 `(("python-jinja2" ,python-jinja2)
2777 ("python-docutils" ,python-docutils)
2778 ("python-pygments" ,python-pygments)))
2779 (home-page "http://sphinx-doc.org/")
2780 (synopsis "Python documentation generator")
2781 (description "Sphinx is a tool that makes it easy to create documentation
2782 for Python projects or other documents consisting of multiple reStructuredText
2783 sources.")
2784 (license license:bsd-3)))
2785
2786 (define-public python2-sphinx
2787 (package-with-python2 python-sphinx))
2788
2789 (define-public python-sphinx-rtd-theme
2790 (package
2791 (name "python-sphinx-rtd-theme")
2792 (version "0.1.6")
2793 (source
2794 (origin
2795 (method url-fetch)
2796 (uri (string-append "https://pypi.python.org/packages/source/s/"
2797 "sphinx_rtd_theme/sphinx_rtd_theme-"
2798 version ".tar.gz"))
2799 (sha256
2800 (base32
2801 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2802 (build-system python-build-system)
2803 (inputs
2804 `(("python-docutils" ,python-docutils)
2805 ("python-sphinx" ,python-sphinx)))
2806 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2807 (synopsis "ReadTheDocs.org theme for Sphinx")
2808 (description "A theme for Sphinx used by ReadTheDocs.org.")
2809 (license license:expat)))
2810
2811 (define-public python2-sphinx-rtd-theme
2812 (package-with-python2 python-sphinx-rtd-theme))
2813
2814 (define-public python-feedgenerator
2815 (package
2816 (name "python-feedgenerator")
2817 (version "1.8")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (pypi-uri "feedgenerator" version))
2822 (sha256
2823 (base32
2824 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2825 (build-system python-build-system)
2826 (propagated-inputs
2827 `(("python-pytz" ,python-pytz)
2828 ("python-six" ,python-six)))
2829 (home-page "https://github.com/getpelican/feedgenerator")
2830 (synopsis
2831 "Standalone version of Django's Atom/RSS feed generator")
2832 (description
2833 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2834 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2835 (license license:bsd-3)))
2836
2837 (define-public python2-feedgenerator
2838 (package-with-python2 python-feedgenerator))
2839
2840 (define-public python-blinker
2841 (package
2842 (name "python-blinker")
2843 (version "1.4")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "blinker" version))
2848 (sha256
2849 (base32
2850 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2851 (build-system python-build-system)
2852 ;; No "test" command supplied to setuptools, so unless there's another way
2853 ;; to run tests, we're skipping them!
2854 (arguments '(#:tests? #f))
2855 (home-page "http://pythonhosted.org/blinker/")
2856 (synopsis "Fast, simple object-to-object and broadcast signaling")
2857 (description
2858 "Blinker provides a fast dispatching system that allows any number of
2859 interested parties to subscribe to events, or \"signals\".")
2860 (license license:expat)))
2861
2862 (define-public python2-blinker
2863 (package-with-python2 python-blinker))
2864
2865 (define-public pelican
2866 (package
2867 (name "pelican")
2868 (version "3.6.3")
2869 (source
2870 (origin
2871 (method url-fetch)
2872 (uri (pypi-uri "pelican" version))
2873 (sha256
2874 (base32
2875 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2876 (build-system python-build-system)
2877 (propagated-inputs
2878 `(("python-feedgenerator" ,python-feedgenerator)
2879 ("python-jinja2" ,python-jinja2)
2880 ("python-pygments" ,python-pygments)
2881 ("python-docutils" ,python-docutils)
2882 ("python-pytz" ,python-pytz)
2883 ("python-blinker" ,python-blinker)
2884 ("python-unidecode" ,python-unidecode)
2885 ("python-six" ,python-six)
2886 ("python-dateutil-2" ,python-dateutil-2)))
2887 (home-page "http://getpelican.com/")
2888 (arguments
2889 `(;; XXX Requires a lot more packages to do unit tests :P
2890 #:tests? #f
2891 #:phases (modify-phases %standard-phases
2892 (add-before
2893 'install 'adjust-requires
2894 ;; Since feedgenerator is installed from git, it doesn't
2895 ;; conform to the version requirements.
2896 ;;
2897 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2898 ;; version requirement so setuptools doesn't get confused.
2899 (lambda _
2900 (substitute* "setup.py"
2901 (("['\"]feedgenerator.*?['\"]")
2902 "'feedgenerator'")))))))
2903 (synopsis "Python-based static site publishing system")
2904 (description
2905 "Pelican is a tool to generate a static blog from reStructuredText,
2906 Markdown input files, and more. Pelican uses Jinja2 for templating
2907 and is very extensible.")
2908 (license license:agpl3+)))
2909
2910 (define-public python-scikit-learn
2911 (package
2912 (name "python-scikit-learn")
2913 (version "0.16.1")
2914 (source
2915 (origin
2916 (method url-fetch)
2917 (uri (string-append
2918 "https://github.com/scikit-learn/scikit-learn/archive/"
2919 version ".tar.gz"))
2920 (file-name (string-append name "-" version ".tar.gz"))
2921 (sha256
2922 (base32
2923 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2924 (build-system python-build-system)
2925 (arguments
2926 `(#:phases
2927 (alist-cons-before
2928 'check 'set-HOME
2929 ;; some tests require access to "$HOME"
2930 (lambda _ (setenv "HOME" "/tmp"))
2931 ;; Tests can only be run after the library has been installed and not
2932 ;; within the source directory.
2933 (alist-cons-after
2934 'install 'check
2935 (lambda _
2936 (with-directory-excursion "/tmp"
2937 ;; With Python 3 one test of 3334 fails
2938 ;; (sklearn.tests.test_common.test_transformers); see
2939 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2940 (system* "nosetests" "-v" "sklearn")))
2941 (alist-delete 'check %standard-phases)))))
2942 (inputs
2943 `(("openblas" ,openblas)))
2944 (native-inputs
2945 `(("python-nose" ,python-nose)))
2946 (propagated-inputs
2947 `(("python-numpy" ,python-numpy)
2948 ("python-scipy" ,python-scipy)))
2949 (home-page "http://scikit-learn.org/")
2950 (synopsis "Machine Learning in Python")
2951 (description
2952 "Scikit-learn provides simple and efficient tools for data
2953 mining and data analysis.")
2954 (license license:bsd-3)
2955 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
2956
2957 (define-public python2-scikit-learn
2958 (package-with-python2 (strip-python2-variant python-scikit-learn)))
2959
2960 (define-public python-scikit-image
2961 (package
2962 (name "python-scikit-image")
2963 (version "0.11.3")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (string-append
2968 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2969 version ".tar.gz"))
2970 (sha256
2971 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2972 (build-system python-build-system)
2973 (propagated-inputs
2974 `(("python-matplotlib" ,python-matplotlib)
2975 ("python-networkx" ,python-networkx)
2976 ("python-numpy" ,python-numpy)
2977 ("python-scipy" ,python-scipy)
2978 ("python-six" ,python-six)
2979 ("python-pillow" ,python-pillow)))
2980 (native-inputs
2981 `(("python-cython" ,python-cython)))
2982 (home-page "http://scikit-image.org/")
2983 (synopsis "Image processing in Python")
2984 (description
2985 "Scikit-image is a collection of algorithms for image processing.")
2986 (license license:bsd-3)
2987 (properties `((python2-variant . ,(delay python2-scikit-image))))))
2988
2989 (define-public python2-scikit-image
2990 (let ((scikit-image (package-with-python2
2991 (strip-python2-variant python-scikit-image))))
2992 (package (inherit scikit-image)
2993 (native-inputs
2994 `(("python2-mock" ,python2-mock)
2995 ,@(package-native-inputs scikit-image)))
2996 (propagated-inputs
2997 `(("python2-pytz" ,python2-pytz)
2998 ,@(package-propagated-inputs scikit-image))))))
2999
3000 (define-public python-redis
3001 (package
3002 (name "python-redis")
3003 (version "2.10.3")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (string-append
3008 "https://pypi.python.org/packages/source/r/redis/redis-"
3009 version ".tar.gz"))
3010 (sha256
3011 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3012 (build-system python-build-system)
3013 ;; Tests require a running Redis server
3014 (arguments '(#:tests? #f))
3015 (native-inputs
3016 `(("python-pytest" ,python-pytest)))
3017 (home-page "https://github.com/andymccurdy/redis-py")
3018 (synopsis "Redis Python client")
3019 (description
3020 "This package provides a Python interface to the Redis key-value store.")
3021 (license license:expat)))
3022
3023 (define-public python2-redis
3024 (package-with-python2 python-redis))
3025
3026 (define-public python-rq
3027 (package
3028 (name "python-rq")
3029 (version "0.5.2")
3030 (source
3031 (origin
3032 (method url-fetch)
3033 (uri (string-append
3034 "https://pypi.python.org/packages/source/r/rq/rq-"
3035 version ".tar.gz"))
3036 (sha256
3037 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3038 (build-system python-build-system)
3039 (propagated-inputs
3040 `(("python-click" ,python-click)
3041 ("python-redis" ,python-redis)))
3042 (home-page "http://python-rq.org/")
3043 (synopsis "Simple job queues for Python")
3044 (description
3045 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3046 processing them in the background with workers. It is backed by Redis and it
3047 is designed to have a low barrier to entry.")
3048 (license license:bsd-2)))
3049
3050 (define-public python2-rq
3051 (package-with-python2 python-rq))
3052
3053 (define-public python-cython
3054 (package
3055 (name "python-cython")
3056 (version "0.24.1")
3057 (source
3058 (origin
3059 (method url-fetch)
3060 (uri (pypi-uri "Cython" version))
3061 (sha256
3062 (base32
3063 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3064 (build-system python-build-system)
3065 ;; we need the full python package and not just the python-wrapper
3066 ;; because we need libpython3.3m.so
3067 (inputs
3068 `(("python" ,python)))
3069 (arguments
3070 `(#:phases
3071 (modify-phases %standard-phases
3072 (add-before 'check 'set-HOME
3073 ;; some tests require access to "$HOME/.cython"
3074 (lambda _ (setenv "HOME" "/tmp")))
3075 (replace 'check
3076 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3077 (home-page "http://cython.org/")
3078 (synopsis "C extensions for Python")
3079 (description "Cython is an optimising static compiler for both the Python
3080 programming language and the extended Cython programming language. It makes
3081 writing C extensions for Python as easy as Python itself.")
3082 (license license:asl2.0)
3083 (properties `((python2-variant . ,(delay python2-cython))))))
3084
3085 (define-public python2-cython
3086 (package (inherit (package-with-python2
3087 (strip-python2-variant python-cython)))
3088 (name "python2-cython")
3089 (inputs
3090 `(("python-2" ,python-2))))) ; this is not automatically changed
3091
3092 ;; The RPython toolchain currently does not support Python 3.
3093 (define-public python2-rpython
3094 (package
3095 (name "python2-rpython")
3096 (version "0.1.4")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (pypi-uri "rpython" version))
3101 (sha256
3102 (base32
3103 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3104 (build-system python-build-system)
3105 (arguments `(#:python ,python-2))
3106 (native-inputs
3107 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3108 (home-page "https://rpython.readthedocs.org")
3109 (synopsis "Framework for implementing interpreters and virtual machines")
3110 (description "RPython is a translation and support framework for
3111 producing implementations of dynamic languages, emphasizing a clean separation
3112 between language specification and implementation aspects.")
3113 (license license:expat)))
3114
3115 ;; This version of numpy is missing the documentation and is only used to
3116 ;; build matplotlib which is required to build numpy's documentation.
3117 (define python-numpy-bootstrap
3118 (package
3119 (name "python-numpy-bootstrap")
3120 (version "1.10.4")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3125 "/numpy-" version ".tar.gz"))
3126 (sha256
3127 (base32
3128 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3129 (build-system python-build-system)
3130 (native-inputs
3131 `(("python-nose" ,python-nose)))
3132 (inputs
3133 `(("openblas" ,openblas)
3134 ("lapack" ,lapack)))
3135 (native-inputs
3136 `(("gfortran" ,gfortran)))
3137 (arguments
3138 `(#:phases
3139 (alist-cons-before
3140 'build 'set-environment-variables
3141 (lambda* (#:key inputs #:allow-other-keys)
3142 (call-with-output-file "site.cfg"
3143 (lambda (port)
3144 (format port
3145 "[openblas]
3146 libraries = openblas
3147 library_dirs = ~a/lib
3148 include_dirs = ~a/include
3149
3150 [lapack]
3151 lapack_libs = lapack
3152 library_dirs = ~a/lib
3153 include_dirs = ~a/include
3154 "
3155 (assoc-ref inputs "openblas")
3156 (assoc-ref inputs "openblas")
3157 (assoc-ref inputs "lapack")
3158 (assoc-ref inputs "lapack"))))
3159 ;; Use "gcc" executable, not "cc".
3160 (substitute* "numpy/distutils/system_info.py"
3161 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3162 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3163 #t)
3164 ;; Tests can only be run after the library has been installed and not
3165 ;; within the source directory.
3166 (alist-cons-after
3167 'install 'check
3168 (lambda _
3169 (with-directory-excursion "/tmp"
3170 (zero? (system* "python" "-c"
3171 "import numpy; numpy.test(verbose=2)"))))
3172 (alist-delete
3173 'check
3174 %standard-phases)))))
3175 (home-page "http://www.numpy.org/")
3176 (synopsis "Fundamental package for scientific computing with Python")
3177 (description "NumPy is the fundamental package for scientific computing
3178 with Python. It contains among other things: a powerful N-dimensional array
3179 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3180 and Fortran code, useful linear algebra, Fourier transform, and random number
3181 capabilities.")
3182 (license license:bsd-3)))
3183
3184 (define python2-numpy-bootstrap
3185 (package-with-python2 python-numpy-bootstrap))
3186
3187 (define-public python2-fastlmm
3188 (package
3189 (name "python2-fastlmm")
3190 (version "0.2.21")
3191 (source
3192 (origin
3193 (method url-fetch)
3194 (uri (pypi-uri "fastlmm" version ".zip"))
3195 (sha256
3196 (base32
3197 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3198 (build-system python-build-system)
3199 (arguments
3200 `(#:python ,python-2)) ; only Python 2.7 is supported
3201 (propagated-inputs
3202 `(("python2-numpy" ,python2-numpy)
3203 ("python2-scipy" ,python2-scipy)
3204 ("python2-matplotlib" ,python2-matplotlib)
3205 ("python2-pandas" ,python2-pandas)
3206 ("python2-scikit-learn" ,python2-scikit-learn)
3207 ("python2-cython" ,python2-cython)
3208 ("python2-pysnptools" ,python2-pysnptools)))
3209 (native-inputs
3210 `(("unzip" ,unzip)
3211 ("python2-mock" ,python2-mock)))
3212 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3213 (synopsis "Perform genome-wide association studies on large data sets")
3214 (description
3215 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3216 Models, is a program for performing both single-SNP and SNP-set genome-wide
3217 association studies (GWAS) on extremely large data sets.")
3218 (license license:asl2.0)))
3219
3220 (define-public python-numpy
3221 (package (inherit python-numpy-bootstrap)
3222 (name "python-numpy")
3223 (outputs '("out" "doc"))
3224 (inputs
3225 `(("which" ,which)
3226 ("python-matplotlib" ,python-matplotlib)
3227 ("python-sphinx" ,python-sphinx)
3228 ("python-pyparsing" ,python-pyparsing)
3229 ("python-numpydoc" ,python-numpydoc)
3230 ,@(package-inputs python-numpy-bootstrap)))
3231 (native-inputs
3232 `(("pkg-config" ,pkg-config)
3233 ("texlive" ,texlive)
3234 ("texinfo" ,texinfo)
3235 ("perl" ,perl)
3236 ,@(package-native-inputs python-numpy-bootstrap)))
3237 (arguments
3238 `(,@(substitute-keyword-arguments
3239 (package-arguments python-numpy-bootstrap)
3240 ((#:phases phases)
3241 `(alist-cons-after
3242 'install 'install-doc
3243 (lambda* (#:key outputs #:allow-other-keys)
3244 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3245 (doc (string-append
3246 data "/doc/" ,name "-"
3247 ,(package-version python-numpy-bootstrap)))
3248 (info (string-append data "/info"))
3249 (html (string-append doc "/html"))
3250 (pyver ,(string-append "PYVER=")))
3251 (with-directory-excursion "doc"
3252 (mkdir-p html)
3253 (system* "make" "html" pyver)
3254 (system* "make" "latex" "PAPER=a4" pyver)
3255 (system* "make" "-C" "build/latex"
3256 "all-pdf" "PAPER=a4" pyver)
3257 ;; FIXME: Generation of the info file fails.
3258 ;; (system* "make" "info" pyver)
3259 ;; (mkdir-p info)
3260 ;; (copy-file "build/texinfo/numpy.info"
3261 ;; (string-append info "/numpy.info"))
3262 (for-each (lambda (file)
3263 (copy-file (string-append "build/latex" file)
3264 (string-append doc file)))
3265 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3266 (with-directory-excursion "build/html"
3267 (for-each (lambda (file)
3268 (let* ((dir (dirname file))
3269 (tgt-dir (string-append html "/" dir)))
3270 (unless (equal? "." dir)
3271 (mkdir-p tgt-dir))
3272 (install-file file html)))
3273 (find-files "." ".*"))))))
3274 ,phases)))))))
3275
3276 (define-public python2-numpy
3277 (package-with-python2 python-numpy))
3278
3279 (define-public python-pyparsing
3280 (package
3281 (name "python-pyparsing")
3282 (version "2.0.3")
3283 (source
3284 (origin
3285 (method url-fetch)
3286 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3287 "/pyparsing-" version
3288 "/pyparsing-" version ".tar.gz"))
3289 (sha256
3290 (base32
3291 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3292 (build-system python-build-system)
3293 (outputs '("out" "doc"))
3294 (arguments
3295 `(#:tests? #f ; no test target
3296 #:modules ((guix build python-build-system)
3297 (guix build utils))
3298 #:phases
3299 (alist-cons-after
3300 'install 'install-doc
3301 (lambda* (#:key outputs #:allow-other-keys)
3302 (let* ((doc (string-append (assoc-ref outputs "doc")
3303 "/share/doc/" ,name "-" ,version))
3304 (html-doc (string-append doc "/html"))
3305 (examples (string-append doc "/examples")))
3306 (mkdir-p html-doc)
3307 (mkdir-p examples)
3308 (for-each
3309 (lambda (dir tgt)
3310 (map (lambda (file)
3311 (install-file file tgt))
3312 (find-files dir ".*")))
3313 (list "docs" "htmldoc" "examples")
3314 (list doc html-doc examples))))
3315 %standard-phases)))
3316 (home-page "http://pyparsing.wikispaces.com")
3317 (synopsis "Python parsing class library")
3318 (description
3319 "The pyparsing module is an alternative approach to creating and
3320 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3321 of regular expressions. The pyparsing module provides a library of classes
3322 that client code uses to construct the grammar directly in Python code.")
3323 (license license:expat)))
3324
3325 (define-public python2-pyparsing
3326 (package-with-python2 python-pyparsing))
3327
3328 (define-public python-numpydoc
3329 (package
3330 (name "python-numpydoc")
3331 (version "0.5")
3332 (source
3333 (origin
3334 (method url-fetch)
3335 (uri (string-append
3336 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3337 version ".tar.gz"))
3338 (sha256
3339 (base32
3340 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3341 (modules '((guix build utils)))
3342 (snippet
3343 '(begin
3344 ;; Drop a test requiring matplotlib, which we cannot add as an
3345 ;; input since it would create a circular dependency: Extend the
3346 ;; test for Python 3, where it is already dropped, to Python 2.
3347 (substitute* "numpydoc/tests/test_plot_directive.py"
3348 (("3") "2"))))))
3349 (build-system python-build-system)
3350 (native-inputs
3351 `(("python-docutils" ,python-docutils)
3352 ("python-sphinx" ,python-sphinx)
3353 ("python-nose" ,python-nose)))
3354 (home-page "https://pypi.python.org/pypi/numpydoc")
3355 (synopsis
3356 "Numpy's Sphinx extensions")
3357 (description
3358 "Sphinx extension to support docstrings in Numpy format.")
3359 (license license:bsd-2)))
3360
3361 (define-public python2-numpydoc
3362 (package-with-python2 python-numpydoc))
3363
3364 (define-public python-numexpr
3365 (package
3366 (name "python-numexpr")
3367 (version "2.6.0")
3368 (source
3369 (origin
3370 (method url-fetch)
3371 (uri (pypi-uri "numexpr" version))
3372 (sha256
3373 (base32
3374 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3375 (build-system python-build-system)
3376 (arguments `(#:tests? #f)) ; no tests included
3377 (propagated-inputs
3378 `(("python-numpy" ,python-numpy)))
3379 (home-page "https://github.com/pydata/numexpr")
3380 (synopsis "Fast numerical expression evaluator for NumPy")
3381 (description
3382 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3383 expressions that operate on arrays are accelerated and use less memory than
3384 doing the same calculation in Python. In addition, its multi-threaded
3385 capabilities can make use of all your cores, which may accelerate
3386 computations, most specially if they are not memory-bounded (e.g. those using
3387 transcendental functions).")
3388 (license license:expat)))
3389
3390 (define-public python2-numexpr
3391 (package-with-python2 python-numexpr))
3392
3393 (define-public python-matplotlib
3394 (package
3395 (name "python-matplotlib")
3396 (version "1.4.3")
3397 (source
3398 (origin
3399 (method url-fetch)
3400 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3401 "/matplotlib-" version
3402 "/matplotlib-" version ".tar.gz"))
3403 (sha256
3404 (base32
3405 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3406 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3407 (build-system python-build-system)
3408 (outputs '("out" "doc"))
3409 (propagated-inputs ; the following packages are all needed at run time
3410 `(("python-pyparsing" ,python-pyparsing)
3411 ("python-pygobject" ,python-pygobject)
3412 ("gobject-introspection" ,gobject-introspection)
3413 ("python-tkinter" ,python "tk")
3414 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3415 ;; from 'gtk+') provides the required 'typelib' files used by
3416 ;; 'gobject-introspection'. The location of these files is set with the
3417 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3418 ;; is done automatically by a 'native-search-path' procedure. However,
3419 ;; at run-time the user must set this variable as follows:
3420 ;;
3421 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3422 ("gtk+" ,gtk+)
3423 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3424 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3425 ;; object. For this reason we need to import both libraries.
3426 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3427 ("python-pycairo" ,python-pycairo)
3428 ("python-cairocffi" ,python-cairocffi)))
3429 (inputs
3430 `(("python-dateutil" ,python-dateutil-2)
3431 ("python-six" ,python-six)
3432 ("python-pytz" ,python-pytz)
3433 ("python-numpy" ,python-numpy-bootstrap)
3434 ("python-sphinx" ,python-sphinx)
3435 ("python-numpydoc" ,python-numpydoc)
3436 ("python-nose" ,python-nose)
3437 ("python-mock" ,python-mock)
3438 ("libpng" ,libpng)
3439 ("imagemagick" ,imagemagick)
3440 ("freetype" ,freetype)
3441 ("cairo" ,cairo)
3442 ("glib" ,glib)
3443 ("python-pillow" ,python-pillow)
3444 ;; FIXME: Add backends when available.
3445 ;("python-wxpython" ,python-wxpython)
3446 ;("python-pyqt" ,python-pyqt)
3447 ("tcl" ,tcl)
3448 ("tk" ,tk)))
3449 (native-inputs
3450 `(("pkg-config" ,pkg-config)
3451 ("texlive" ,texlive)
3452 ("texinfo" ,texinfo)))
3453 (arguments
3454 `(#:phases
3455 (alist-cons-before
3456 'build 'configure-environment
3457 (lambda* (#:key outputs inputs #:allow-other-keys)
3458 (let ((cairo (assoc-ref inputs "cairo"))
3459 (gtk+ (assoc-ref inputs "gtk+")))
3460 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3461 ;; has not effect.
3462 (setenv "LD_LIBRARY_PATH"
3463 (string-append cairo "/lib:" gtk+ "/lib"))
3464 (setenv "HOME" (getcwd))
3465 (call-with-output-file "setup.cfg"
3466 (lambda (port)
3467 (format port "[directories]~%
3468 basedirlist = ~a,~a~%
3469 [rc_options]~%
3470 backend = TkAgg~%"
3471 (assoc-ref inputs "tcl")
3472 (assoc-ref inputs "tk"))))))
3473 (alist-cons-after
3474 'install 'install-doc
3475 (lambda* (#:key outputs #:allow-other-keys)
3476 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3477 (doc (string-append data "/doc/" ,name "-" ,version))
3478 (info (string-append data "/info"))
3479 (html (string-append doc "/html")))
3480 (with-directory-excursion "doc"
3481 ;; Produce pdf in 'A4' format.
3482 (substitute* (find-files "." "conf\\.py")
3483 (("latex_paper_size = 'letter'")
3484 "latex_paper_size = 'a4'"))
3485 (mkdir-p html)
3486 (mkdir-p info)
3487 ;; The doc recommends to run the 'html' target twice.
3488 (system* "python" "make.py" "html")
3489 (system* "python" "make.py" "html")
3490 (copy-recursively "build/html" html)
3491 (system* "python" "make.py" "latex")
3492 (system* "python" "make.py" "texinfo")
3493 (symlink (string-append html "/_images")
3494 (string-append info "/matplotlib-figures"))
3495 (with-directory-excursion "build/texinfo"
3496 (substitute* "matplotlib.texi"
3497 (("@image\\{([^,]*)" all file)
3498 (string-append "@image{matplotlib-figures/" file)))
3499 (symlink (string-append html "/_images")
3500 "./matplotlib-figures")
3501 (system* "makeinfo" "--no-split"
3502 "-o" "matplotlib.info" "matplotlib.texi"))
3503 (copy-file "build/texinfo/matplotlib.info"
3504 (string-append info "/matplotlib.info"))
3505 (copy-file "build/latex/Matplotlib.pdf"
3506 (string-append doc "/Matplotlib.pdf")))))
3507 %standard-phases))))
3508 (home-page "http://matplotlib.org")
3509 (synopsis "2D plotting library for Python")
3510 (description
3511 "Matplotlib is a Python 2D plotting library which produces publication
3512 quality figures in a variety of hardcopy formats and interactive environments
3513 across platforms. Matplotlib can be used in Python scripts, the python and
3514 ipython shell, web application servers, and six graphical user interface
3515 toolkits.")
3516 (license license:psfl)
3517 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3518
3519 (define-public python2-matplotlib
3520 (let ((matplotlib (package-with-python2
3521 (strip-python2-variant python-matplotlib))))
3522 (package (inherit matplotlib)
3523 ;; Make sure to use special packages for Python 2 instead
3524 ;; of those automatically rewritten by package-with-python2.
3525 (propagated-inputs
3526 `(("python2-pycairo" ,python2-pycairo)
3527 ("python2-pygobject-2" ,python2-pygobject-2)
3528 ("python2-tkinter" ,python-2 "tk")
3529 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3530 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3531
3532 (define-public python2-pysnptools
3533 (package
3534 (name "python2-pysnptools")
3535 (version "0.3.9")
3536 (source
3537 (origin
3538 (method url-fetch)
3539 (uri (pypi-uri "pysnptools" version ".zip"))
3540 (sha256
3541 (base32
3542 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3543 (build-system python-build-system)
3544 (arguments
3545 `(#:python ,python-2)) ; only Python 2.7 is supported
3546 (propagated-inputs
3547 `(("python2-numpy" ,python2-numpy)
3548 ("python2-scipy" ,python2-scipy)
3549 ("python2-pytz" ,python2-pytz)
3550 ("python2-cython" ,python2-cython)))
3551 (inputs
3552 `(("python2-dateutil-2" ,python2-dateutil-2)
3553 ("python2-pandas" ,python2-pandas)
3554 ("python2-six" ,python2-six)))
3555 (native-inputs
3556 `(("unzip" ,unzip)))
3557 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3558 (synopsis "Library for reading and manipulating genetic data")
3559 (description
3560 "PySnpTools is a library for reading and manipulating genetic data. It
3561 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3562 those files. It can also efficiently manipulate ranges of integers using set
3563 operators such as union, intersection, and difference.")
3564 (license license:asl2.0)))
3565
3566 (define-public python-rpy2
3567 (package
3568 (name "python-rpy2")
3569 (version "2.7.6")
3570 (source
3571 (origin
3572 (method url-fetch)
3573 (uri (pypi-uri "rpy2" version))
3574 (sha256
3575 (base32
3576 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3577 (build-system python-build-system)
3578 (propagated-inputs
3579 `(("python-six" ,python-six)))
3580 (inputs
3581 `(("readline" ,readline)
3582 ("icu4c" ,icu4c)
3583 ("pcre" ,pcre)
3584 ("r" ,r)))
3585 (native-inputs
3586 `(("zlib" ,zlib)))
3587 (home-page "http://rpy.sourceforge.net/")
3588 (synopsis "Python interface to the R language")
3589 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3590 low-level interface to R from Python, a proposed high-level interface,
3591 including wrappers to graphical libraries, as well as R-like structures and
3592 functions.")
3593 (license license:gpl3+)))
3594
3595 (define-public python2-rpy2
3596 (let ((rpy2 (package-with-python2 python-rpy2)))
3597 (package (inherit rpy2)
3598 (native-inputs
3599 `(("python2-singledispatch" ,python2-singledispatch)
3600 ,@(package-native-inputs rpy2))))))
3601
3602 (define-public python-scipy
3603 (package
3604 (name "python-scipy")
3605 (version "0.16.0")
3606 (source
3607 (origin
3608 (method url-fetch)
3609 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3610 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3611 "/scipy-" version ".tar.xz"))
3612 (sha256
3613 (base32
3614 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3615 (build-system python-build-system)
3616 (propagated-inputs
3617 `(("python-numpy" ,python-numpy)
3618 ("python-matplotlib" ,python-matplotlib)
3619 ("python-pyparsing" ,python-pyparsing)))
3620 (inputs
3621 `(("lapack" ,lapack)
3622 ("openblas" ,openblas)))
3623 (native-inputs
3624 `(("python-nose" ,python-nose)
3625 ("python-sphinx" ,python-sphinx)
3626 ("python-numpydoc" ,python-numpydoc)
3627 ("gfortran" ,gfortran)
3628 ("texlive" ,texlive)
3629 ("perl" ,perl)))
3630 (outputs '("out" "doc"))
3631 (arguments
3632 `(#:phases
3633 (alist-cons-before
3634 'build 'configure-openblas
3635 (lambda* (#:key inputs #:allow-other-keys)
3636 (call-with-output-file "site.cfg"
3637 (lambda (port)
3638 (format port
3639 "[blas]
3640 libraries = openblas
3641 library_dirs = ~a/lib
3642 include_dirs = ~a/include
3643 [atlas]
3644 library_dirs = ~a/lib
3645 atlas_libs = openblas
3646 "
3647 (assoc-ref inputs "openblas")
3648 (assoc-ref inputs "openblas")
3649 (assoc-ref inputs "openblas"))))
3650 #t)
3651 (alist-cons-after
3652 'install 'install-doc
3653 (lambda* (#:key outputs #:allow-other-keys)
3654 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3655 (doc (string-append data "/doc/" ,name "-" ,version))
3656 (html (string-append doc "/html"))
3657 (pyver ,(string-append "PYVER=")))
3658 (with-directory-excursion "doc"
3659 ;; Fix generation of images for mathematical expressions.
3660 (substitute* (find-files "source" "conf\\.py")
3661 (("pngmath_use_preview = True")
3662 "pngmath_use_preview = False"))
3663 (mkdir-p html)
3664 (system* "make" "html" pyver)
3665 (system* "make" "latex" "PAPER=a4" pyver)
3666 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3667 (copy-file "build/latex/scipy-ref.pdf"
3668 (string-append doc "/scipy-ref.pdf"))
3669 (with-directory-excursion "build/html"
3670 (for-each (lambda (file)
3671 (let* ((dir (dirname file))
3672 (tgt-dir (string-append html "/" dir)))
3673 (install-file file html)))
3674 (find-files "." ".*"))))))
3675 ;; Tests can only be run after the library has been installed and not
3676 ;; within the source directory.
3677 (alist-cons-after
3678 'install 'check
3679 (lambda _
3680 (with-directory-excursion "/tmp"
3681 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3682 (alist-delete
3683 'check
3684 (alist-cons-after
3685 'unpack 'fix-tests
3686 (lambda _
3687 (substitute* "scipy/integrate/tests/test_quadpack.py"
3688 (("libm.so") "libm.so.6"))
3689 #t)
3690 %standard-phases)))))))
3691 (home-page "http://www.scipy.org/")
3692 (synopsis "The Scipy library provides efficient numerical routines")
3693 (description "The SciPy library is one of the core packages that make up
3694 the SciPy stack. It provides many user-friendly and efficient numerical
3695 routines such as routines for numerical integration and optimization.")
3696 (license license:bsd-3)))
3697
3698 (define-public python2-scipy
3699 (package-with-python2 python-scipy))
3700
3701 (define-public python-socksipy-branch
3702 (package
3703 (name "python-socksipy-branch")
3704 (version "1.01")
3705 (source
3706 (origin
3707 (method url-fetch)
3708 (uri (pypi-uri "SocksiPy-branch" version))
3709 (sha256
3710 (base32
3711 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3712 (build-system python-build-system)
3713 (arguments
3714 `(#:tests? #f)) ; There are no tests
3715 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3716 (synopsis "Python SOCKS module")
3717 (description
3718 "SocksiPy - A Python SOCKS client module. It provides a
3719 socket-like interface that supports connections to any TCP
3720 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3721 The original version was developed by Dan Haim, this is a
3722 branch created by Mario Vilas to address some open issues,
3723 as the original project seems to have been abandoned circa 2007.")
3724 (license license:bsd-3)))
3725
3726 (define-public python2-socksipy-branch
3727 (package-with-python2 python-socksipy-branch))
3728
3729 (define-public python-sqlalchemy
3730 (package
3731 (name "python-sqlalchemy")
3732 (version "1.0.12")
3733 (source
3734 (origin
3735 (method url-fetch)
3736 (uri (string-append "https://pypi.python.org/packages/source/S/"
3737 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3738 (sha256
3739 (base32
3740 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3741 (build-system python-build-system)
3742 (native-inputs
3743 `(("python-cython" ,python-cython) ;for c extensions
3744 ("python-pytest" ,python-pytest)
3745 ("python-mock" ,python-mock))) ;for tests
3746 (arguments
3747 `(#:phases (alist-replace
3748 'check
3749 (lambda _ (zero? (system* "py.test")))
3750 %standard-phases)))
3751 (home-page "http://www.sqlalchemy.org")
3752 (synopsis "Database abstraction library")
3753 (description
3754 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3755 gives application developers the full power and flexibility of SQL. It
3756 provides a full suite of well known enterprise-level persistence patterns,
3757 designed for efficient and high-performing database access, adapted into a
3758 simple and Pythonic domain language.")
3759 (license license:x11)))
3760
3761 (define-public python2-sqlalchemy
3762 (package-with-python2 python-sqlalchemy))
3763
3764 (define-public python-pycodestyle
3765 (package
3766 (name "python-pycodestyle")
3767 (version "2.0.0")
3768 (source
3769 (origin
3770 (method url-fetch)
3771 (uri (pypi-uri "pycodestyle" version))
3772 (sha256
3773 (base32
3774 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3775 (build-system python-build-system)
3776 (home-page "https://pycodestyle.readthedocs.io/")
3777 (synopsis "Python style guide checker")
3778 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3779 Python code against some of the style conventions in
3780 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3781 (license license:expat)))
3782
3783 (define-public python2-pycodestyle
3784 (package-with-python2 python-pycodestyle))
3785
3786 (define-public python-orderedmultidict
3787 (package
3788 (name "python-orderedmultidict")
3789 (version "0.7.10")
3790 (source
3791 (origin
3792 (method url-fetch)
3793 (uri (pypi-uri "orderedmultidict" version))
3794 (sha256
3795 (base32
3796 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3797 (build-system python-build-system)
3798 (arguments
3799 `(#:phases
3800 (modify-phases %standard-phases
3801 (add-after 'unpack 'fix-tests
3802 (lambda _
3803 ;; The package uses nosetest for running the tests.
3804 ;; Adding this initfile allows to run the test suite
3805 ;; without requiring nosetest.
3806 (zero? (system* "touch" "tests/__init__.py")))))))
3807 (propagated-inputs
3808 `(("python-six" ,python-six)))
3809 (native-inputs
3810 `(("python-pycodestyle" ,python-pycodestyle)))
3811 (home-page "https://github.com/gruns/orderedmultidict")
3812 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3813 (description "This package contains a library for ordered multivalue
3814 dictionaries. A multivalue dictionary is a dictionary that can store
3815 multiple values for the same key. An ordered multivalue dictionary is a
3816 multivalue dictionary that retains the order of insertions and deletions.")
3817 (license license:unlicense)))
3818
3819 (define-public python2-orderedmultidict
3820 (package-with-python2 python-orderedmultidict))
3821
3822 (define-public python-furl
3823 (package
3824 (name "python-furl")
3825 (version "0.5.6")
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "furl" version))
3830 (sha256
3831 (base32
3832 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3833 (build-system python-build-system)
3834 (propagated-inputs
3835 `(("python-six" ,python-six)
3836 ("python-orderedmultidict" ,python-orderedmultidict)))
3837 (native-inputs
3838 `(("python-pycodestyle" ,python-pycodestyle)))
3839 (home-page "https://github.com/gruns/furl")
3840 (synopsis "URL manipulation in Python")
3841 (description "Furl provides an easy-to-use alternative to the
3842 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3843 (license license:unlicense)))
3844
3845 (define-public python2-furl
3846 (package-with-python2 python-furl))
3847
3848 (define-public python-flask-babel
3849 (package
3850 (name "python-flask-babel")
3851 (version "0.11.1")
3852 (source
3853 (origin
3854 (method url-fetch)
3855 (uri (pypi-uri "Flask-Babel" version))
3856 (sha256
3857 (base32
3858 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3859 (build-system python-build-system)
3860 (propagated-inputs
3861 `(("python-flask" ,python-flask)
3862 ("python-babel" ,python-babel)
3863 ("python-jinja2" ,python-jinja2)
3864 ("python-pytz" ,python-pytz)))
3865 (home-page "https://github.com/python-babel/flask-babel")
3866 (synopsis "Add i18n/l10n support to Flask applications")
3867 (description "This package implements internationalization and localization
3868 support for Flask. This is based on the Python babel module as well as pytz -
3869 both of which are installed automatically if you install this library.")
3870 (license license:bsd-3)))
3871
3872 (define-public python2-flask-babel
3873 (package-with-python2 python-flask-babel))
3874
3875 (define-public python-sqlalchemy-utils
3876 (package
3877 (name "python-sqlalchemy-utils")
3878 (version "0.32.9")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "SQLAlchemy-Utils" version))
3883 (sha256
3884 (base32
3885 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3886 (build-system python-build-system)
3887 (propagated-inputs
3888 `(("python-six" ,python-six)
3889 ("python-sqlalchemy" ,python-sqlalchemy)))
3890 (native-inputs
3891 `(("python-pytest" ,python-pytest)))
3892 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3893 (synopsis "Various utility functions for SQLAlchemy")
3894 (description
3895 "SQLAlchemy-utils provides various utility functions and custom data types
3896 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3897
3898 You might also want to install the following optional dependencies:
3899 @enumerate
3900 @item @code{python-passlib}
3901 @item @code{python-babel}
3902 @item @code{python-cryptography}
3903 @item @code{python-pytz}
3904 @item @code{python-psycopg2}
3905 @item @code{python-furl}
3906 @item @code{python-flask-babel}
3907 @end enumerate
3908 ")
3909 (license license:bsd-3)))
3910
3911 (define-public python2-sqlalchemy-utils
3912 (package-with-python2 python-sqlalchemy-utils))
3913
3914 (define-public python-alembic
3915 (package
3916 (name "python-alembic")
3917 (version "0.8.7")
3918 (source
3919 (origin
3920 (method url-fetch)
3921 (uri (pypi-uri "alembic" version))
3922 (sha256
3923 (base32
3924 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3925 (build-system python-build-system)
3926 (native-inputs
3927 `(("python-mock" ,python-mock)
3928 ("python-pytest-cov" ,python-pytest-cov)))
3929 (propagated-inputs
3930 `(("python-sqlalchemy" ,python-sqlalchemy)
3931 ("python-mako" ,python-mako)
3932 ("python-editor" ,python-editor)))
3933 (home-page "http://bitbucket.org/zzzeek/alembic")
3934 (synopsis
3935 "Database migration tool for SQLAlchemy")
3936 (description
3937 "Alembic is a lightweight database migration tool for usage with the
3938 SQLAlchemy Database Toolkit for Python.")
3939 (license license:expat)))
3940
3941 (define-public python2-alembic
3942 (package-with-python2 python-alembic))
3943
3944 (define-public python-distutils-extra
3945 (package
3946 (name "python-distutils-extra")
3947 (version "2.38")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3952 version "/+download/python-distutils-extra-"
3953 version ".tar.gz"))
3954 (sha256
3955 (base32
3956 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3957 (build-system python-build-system)
3958 (home-page "https://launchpad.net/python-distutils-extra/")
3959 (synopsis "Enhancements to Python's distutils")
3960 (description
3961 "The python-distutils-extra module enables you to easily integrate
3962 gettext support, themed icons, and scrollkeeper-based documentation into
3963 Python's distutils.")
3964 (license license:gpl2)))
3965
3966 (define-public python2-distutils-extra
3967 (package-with-python2 python-distutils-extra))
3968
3969 (define-public python2-elib.intl
3970 (package
3971 (name "python2-elib.intl")
3972 (version "0.0.3")
3973 (source
3974 (origin
3975 ;; This project doesn't tag releases or publish tarballs, so we take
3976 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3977 (method git-fetch)
3978 (uri (git-reference
3979 (url "https://github.com/dieterv/elib.intl.git")
3980 (commit "d09997cfef")))
3981 (sha256
3982 (base32
3983 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3984 (build-system python-build-system)
3985 (arguments
3986 ;; incompatible with Python 3 (exception syntax)
3987 `(#:python ,python-2
3988 #:tests? #f))
3989 (home-page "https://github.com/dieterv/elib.intl")
3990 (synopsis "Enhanced internationalization for Python")
3991 (description
3992 "The elib.intl module provides enhanced internationalization (I18N)
3993 services for your Python modules and applications.")
3994 (license license:lgpl3+)))
3995
3996 (define-public python-pillow
3997 (package
3998 (name "python-pillow")
3999 (version "3.3.3")
4000 (source
4001 (origin
4002 (method url-fetch)
4003 (uri (pypi-uri "Pillow" version))
4004 (sha256
4005 (base32
4006 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4007 (build-system python-build-system)
4008 (native-inputs
4009 `(("python-nose" ,python-nose)))
4010 (inputs
4011 `(("freetype" ,freetype)
4012 ("lcms" ,lcms)
4013 ("zlib" ,zlib)
4014 ("libjpeg" ,libjpeg)
4015 ("openjpeg" ,openjpeg)
4016 ("libtiff" ,libtiff)
4017 ("libwebp" ,libwebp)))
4018 ;; Note: setuptools used at runtime for pkg_resources
4019 (arguments
4020 `(#:phases (modify-phases %standard-phases
4021 (add-after
4022 'install 'check-installed
4023 (lambda _
4024 (begin
4025 (setenv "HOME" (getcwd))
4026 (and (zero? (system* "python" "selftest.py"
4027 "--installed"))
4028 (zero? (system* "python" "test-installed.py"))))))
4029 (delete 'check))))
4030 (home-page "https://pypi.python.org/pypi/Pillow")
4031 (synopsis "Fork of the Python Imaging Library")
4032 (description
4033 "The Python Imaging Library adds image processing capabilities to your
4034 Python interpreter. This library provides extensive file format support, an
4035 efficient internal representation, and fairly powerful image processing
4036 capabilities. The core image library is designed for fast access to data
4037 stored in a few basic pixel formats. It should provide a solid foundation for
4038 a general image processing tool.")
4039 (license (license:x11-style
4040 "http://www.pythonware.com/products/pil/license.htm"
4041 "The PIL Software License"))))
4042
4043 (define-public python2-pillow
4044 (package-with-python2 python-pillow))
4045
4046 (define-public python-pycparser
4047 (package
4048 (name "python-pycparser")
4049 (version "2.14")
4050 (source
4051 (origin
4052 (method url-fetch)
4053 (uri (pypi-uri "pycparser" version))
4054 (sha256
4055 (base32
4056 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4057 (outputs '("out" "doc"))
4058 (build-system python-build-system)
4059 (native-inputs
4060 `(("pkg-config" ,pkg-config)))
4061 (arguments
4062 `(#:phases
4063 (alist-replace
4064 'check
4065 (lambda _
4066 (with-directory-excursion "tests"
4067 (zero? (system* "python" "all_tests.py"))))
4068 (alist-cons-after
4069 'install 'install-doc
4070 (lambda* (#:key outputs #:allow-other-keys)
4071 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4072 (doc (string-append data "/doc/" ,name "-" ,version))
4073 (examples (string-append doc "/examples")))
4074 (mkdir-p examples)
4075 (for-each (lambda (file)
4076 (copy-file (string-append "." file)
4077 (string-append doc file)))
4078 '("/README.rst" "/CHANGES" "/LICENSE"))
4079 (copy-recursively "examples" examples)))
4080 %standard-phases))))
4081 (home-page "https://github.com/eliben/pycparser")
4082 (synopsis "C parser in Python")
4083 (description
4084 "Pycparser is a complete parser of the C language, written in pure Python
4085 using the PLY parsing library. It parses C code into an AST and can serve as
4086 a front-end for C compilers or analysis tools.")
4087 (license license:bsd-3)))
4088
4089 (define-public python2-pycparser
4090 (package-with-python2 python-pycparser))
4091
4092 (define-public python-cffi
4093 (package
4094 (name "python-cffi")
4095 (version "1.4.2")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "cffi" version))
4100 (sha256
4101 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4102 (build-system python-build-system)
4103 (outputs '("out" "doc"))
4104 (inputs
4105 `(("libffi" ,libffi)))
4106 (propagated-inputs ; required at run-time
4107 `(("python-pycparser" ,python-pycparser)))
4108 (native-inputs
4109 `(("pkg-config" ,pkg-config)
4110 ("python-sphinx" ,python-sphinx)
4111 ("python-pytest" ,python-pytest)))
4112 (arguments
4113 `(#:phases
4114 (alist-cons-after
4115 'install 'install-doc
4116 (lambda* (#:key outputs #:allow-other-keys)
4117 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4118 (doc (string-append data "/doc/" ,name "-" ,version))
4119 (html (string-append doc "/html")))
4120 (with-directory-excursion "doc"
4121 (system* "make" "html")
4122 (mkdir-p html)
4123 (copy-recursively "build/html" html))
4124 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4125 %standard-phases)))
4126 (home-page "http://cffi.readthedocs.org")
4127 (synopsis "Foreign function interface for Python")
4128 (description
4129 "Foreign Function Interface for Python calling C code.")
4130 (license license:expat)))
4131
4132 (define-public python2-cffi
4133 (package-with-python2 python-cffi))
4134
4135 (define-public python-xcffib
4136 (package
4137 (name "python-xcffib")
4138 (version "0.1.9")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (string-append "https://pypi.python.org/packages/source/x/"
4143 "xcffib/xcffib-" version ".tar.gz"))
4144 (sha256
4145 (base32
4146 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4147 (build-system python-build-system)
4148 (inputs
4149 `(("libxcb" ,libxcb)))
4150 (propagated-inputs
4151 `(("python-cffi" ,python-cffi) ; used at run time
4152 ("python-six" ,python-six)))
4153 (arguments
4154 `(#:phases
4155 (alist-cons-after
4156 'install 'install-doc
4157 (lambda* (#:key outputs #:allow-other-keys)
4158 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4159 "/doc/" ,name "-" ,version)))
4160 (mkdir-p doc)
4161 (copy-file "README.md"
4162 (string-append doc "/README.md"))))
4163 %standard-phases)))
4164 (home-page "https://github.com/tych0/xcffib")
4165 (synopsis "XCB Python bindings")
4166 (description
4167 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4168 support for Python 3 and PyPy. It is based on cffi.")
4169 (license license:expat)))
4170
4171 (define-public python2-xcffib
4172 (package-with-python2 python-xcffib))
4173
4174 (define-public python-cairocffi
4175 (package
4176 (name "python-cairocffi")
4177 (version "0.6")
4178 (source
4179 (origin
4180 (method url-fetch)
4181 ;; The archive on pypi is missing the 'utils' directory!
4182 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4183 version ".tar.gz"))
4184 (file-name (string-append name "-" version ".tar.gz"))
4185 (sha256
4186 (base32
4187 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4188 (build-system python-build-system)
4189 (outputs '("out" "doc"))
4190 (inputs
4191 `(("gdk-pixbuf" ,gdk-pixbuf)
4192 ("cairo" ,cairo)))
4193 (native-inputs
4194 `(("pkg-config" ,pkg-config)
4195 ("python-sphinx" ,python-sphinx)
4196 ("python-docutils" ,python-docutils)))
4197 (propagated-inputs
4198 `(("python-xcffib" ,python-xcffib))) ; used at run time
4199 (arguments
4200 `(#:phases
4201 (alist-cons-after
4202 'install 'install-doc
4203 (lambda* (#:key inputs outputs #:allow-other-keys)
4204 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4205 (doc (string-append data "/doc/" ,name "-" ,version))
4206 (html (string-append doc "/html")))
4207 (setenv "LD_LIBRARY_PATH"
4208 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4209 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4210 (setenv "LANG" "en_US.UTF-8")
4211 (mkdir-p html)
4212 (for-each (lambda (file)
4213 (copy-file (string-append "." file)
4214 (string-append doc file)))
4215 '("/README.rst" "/CHANGES" "/LICENSE"))
4216 (system* "python" "setup.py" "build_sphinx")
4217 (copy-recursively "docs/_build/html" html)))
4218 %standard-phases)))
4219 (home-page "https://github.com/SimonSapin/cairocffi")
4220 (synopsis "Python bindings and object-oriented API for Cairo")
4221 (description
4222 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4223 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4224 graphics library with support for multiple backends including image buffers,
4225 PNG, PostScript, PDF, and SVG file output.")
4226 (license license:bsd-3)))
4227
4228 (define-public python2-cairocffi
4229 (package-with-python2 python-cairocffi))
4230
4231 (define-public python-decorator
4232 (package
4233 (name "python-decorator")
4234 (version "4.0.9")
4235 (source
4236 (origin
4237 (method url-fetch)
4238 (uri (pypi-uri "decorator" version))
4239 (sha256
4240 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4241 (build-system python-build-system)
4242 (arguments '(#:tests? #f)) ; no test target
4243 (home-page "https://pypi.python.org/pypi/decorator/")
4244 (synopsis "Python module to simplify usage of decorators")
4245 (description
4246 "The aim of the decorator module is to simplify the usage of decorators
4247 for the average programmer, and to popularize decorators usage giving examples
4248 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4249 etc. The core of this module is a decorator factory.")
4250 (license license:expat)))
4251
4252 (define-public python2-decorator
4253 (package-with-python2 python-decorator))
4254
4255 (define-public python-drmaa
4256 (package
4257 (name "python-drmaa")
4258 (version "0.7.6")
4259 (source
4260 (origin
4261 (method url-fetch)
4262 (uri (string-append
4263 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4264 version ".tar.gz"))
4265 (sha256
4266 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4267 (build-system python-build-system)
4268 ;; The test suite requires libdrmaa which is provided by the cluster
4269 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4270 ;; should be set to the path of the libdrmaa library.
4271 (arguments '(#:tests? #f))
4272 (native-inputs
4273 `(("python-nose" ,python-nose)))
4274 (home-page "https://pypi.python.org/pypi/drmaa")
4275 (synopsis "Python bindings for the DRMAA library")
4276 (description
4277 "A Python package for Distributed Resource Management (DRM) job
4278 submission and control. This package is an implementation of the DRMAA 1.0
4279 Python language binding specification.")
4280 (license license:bsd-3)))
4281
4282 (define-public python2-drmaa
4283 (package-with-python2 python-drmaa))
4284
4285 (define-public python-gridmap
4286 (package
4287 (name "python-gridmap")
4288 (version "0.13.0")
4289 (source
4290 (origin
4291 (method url-fetch)
4292 (uri (string-append
4293 "https://github.com/pygridtools/gridmap/archive/v"
4294 version ".tar.gz"))
4295 (file-name (string-append name "-" version ".tar.gz"))
4296 (sha256
4297 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4298 (build-system python-build-system)
4299 (propagated-inputs
4300 `(("python-psutil" ,python-psutil)
4301 ("python-drmaa" ,python-drmaa)
4302 ("python-pyzmq" ,python-pyzmq)))
4303 (home-page "https://github.com/pygridtools/gridmap")
4304 (synopsis "Create jobs on a cluster directly from Python")
4305 (description
4306 "Gridmap is a Python package to allow you to easily create jobs on the
4307 cluster directly from Python. You can directly map Python functions onto the
4308 cluster without needing to write any wrapper code yourself.")
4309 (license license:gpl3+)))
4310
4311 (define-public python2-gridmap
4312 (package-with-python2 python-gridmap))
4313
4314 (define-public python-pexpect
4315 (package
4316 (name "python-pexpect")
4317 (version "3.3")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (string-append "https://pypi.python.org/packages/source/p/"
4322 "pexpect/pexpect-" version ".tar.gz"))
4323 (sha256
4324 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4325 (build-system python-build-system)
4326 (arguments
4327 `(#:phases
4328 (modify-phases %standard-phases
4329 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4330 (native-inputs
4331 `(("python-nose" ,python-nose)))
4332 (home-page "http://pexpect.readthedocs.org/")
4333 (synopsis "Controlling interactive console applications")
4334 (description
4335 "Pexpect is a pure Python module for spawning child applications;
4336 controlling them; and responding to expected patterns in their output.
4337 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4338 child application and control it as if a human were typing commands.")
4339 (license license:isc)))
4340
4341 (define-public python2-pexpect
4342 (package-with-python2 python-pexpect))
4343
4344 (define-public python-setuptools-scm
4345 (package
4346 (name "python-setuptools-scm")
4347 (version "1.11.1")
4348 (source (origin
4349 (method url-fetch)
4350 (uri (pypi-uri "setuptools_scm" version))
4351 (sha256
4352 (base32
4353 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4354 (build-system python-build-system)
4355 (home-page "https://github.com/pypa/setuptools_scm/")
4356 (synopsis "Manage Python package versions in SCM metadata")
4357 (description
4358 "Setuptools_scm handles managing your Python package versions in
4359 @dfn{software configuration management} (SCM) metadata instead of declaring
4360 them as the version argument or in a SCM managed file.")
4361 (license license:expat)))
4362
4363 (define-public python2-setuptools-scm
4364 (package-with-python2 python-setuptools-scm))
4365
4366 (define-public python-pathpy
4367 (package
4368 (name "python-pathpy")
4369 (version "8.1.1")
4370 (source
4371 (origin
4372 (method url-fetch)
4373 (uri (string-append "https://pypi.python.org/packages/source/p/"
4374 "path.py/path.py-" version ".tar.gz"))
4375 (sha256
4376 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4377 (build-system python-build-system)
4378 (propagated-inputs
4379 `(("python-appdirs" ,python-appdirs)))
4380 (native-inputs
4381 `(("python-setuptools-scm" ,python-setuptools-scm)
4382 ("python-pytest" ,python-pytest)
4383 ("python-pytest-runner" ,python-pytest-runner)))
4384 (home-page "http://github.com/jaraco/path.py")
4385 (synopsis "Python module wrapper for built-in os.path")
4386 (description
4387 "@code{path.py} implements path objects as first-class entities, allowing
4388 common operations on files to be invoked on those path objects directly.")
4389 (license license:expat)))
4390
4391 (define-public python2-pathpy
4392 (package-with-python2 python-pathpy))
4393
4394 (define-public python-pickleshare
4395 (package
4396 (name "python-pickleshare")
4397 (version "0.5")
4398 (source
4399 (origin
4400 (method url-fetch)
4401 (uri (string-append "https://pypi.python.org/packages/source/p/"
4402 "pickleshare/pickleshare-" version ".tar.gz"))
4403 (sha256
4404 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4405 (build-system python-build-system)
4406 (propagated-inputs
4407 `(("python-pathpy" ,python-pathpy)))
4408 (home-page "https://github.com/vivainio/pickleshare")
4409 (synopsis "Tiny key value database with concurrency support")
4410 (description
4411 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4412 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4413 shelve, many processes can access the database simultaneously. Changing a
4414 value in database is immediately visible to other processes accessing the same
4415 database. Concurrency is possible because the values are stored in separate
4416 files. Hence the “database” is a directory where all files are governed by
4417 PickleShare.")
4418 (license license:expat)))
4419
4420 (define-public python2-pickleshare
4421 (package-with-python2 python-pickleshare))
4422
4423 (define-public python-simplegeneric
4424 (package
4425 (name "python-simplegeneric")
4426 (version "0.8.1")
4427 (source
4428 (origin
4429 (method url-fetch)
4430 (uri (string-append "https://pypi.python.org/packages/source/s/"
4431 "simplegeneric/simplegeneric-" version ".zip"))
4432 (sha256
4433 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4434 (build-system python-build-system)
4435 (native-inputs
4436 `(("unzip" ,unzip)))
4437 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4438 (synopsis "Python module for simple generic functions")
4439 (description
4440 "The simplegeneric module lets you define simple single-dispatch generic
4441 functions, akin to Python’s built-in generic functions like @code{len()},
4442 @code{iter()} and so on. However, instead of using specially-named methods,
4443 these generic functions use simple lookup tables, akin to those used by
4444 e.g. @code{pickle.dump()} and other generic functions found in the Python
4445 standard library.")
4446 (license license:zpl2.1)))
4447
4448 (define-public python2-simplegeneric
4449 (package-with-python2 python-simplegeneric))
4450
4451 (define-public python-ipython-genutils
4452 (package
4453 (name "python-ipython-genutils")
4454 (version "0.1.0")
4455 (source
4456 (origin
4457 (method url-fetch)
4458 (uri (string-append "https://pypi.python.org/packages/source/i/"
4459 "ipython_genutils/ipython_genutils-"
4460 version ".tar.gz"))
4461 (sha256
4462 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4463 (build-system python-build-system)
4464 (arguments `(#:tests? #f)) ; no tests
4465 (home-page "http://ipython.org")
4466 (synopsis "Vestigial utilities from IPython")
4467 (description
4468 "This package provides retired utilities from IPython.")
4469 (license license:bsd-3)))
4470
4471 (define-public python2-ipython-genutils
4472 (package-with-python2 python-ipython-genutils))
4473
4474 (define-public python-traitlets
4475 (package
4476 (name "python-traitlets")
4477 (version "4.2.0")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (pypi-uri "traitlets" version))
4482 (sha256
4483 (base32
4484 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4485 (build-system python-build-system)
4486 (arguments
4487 `(#:phases
4488 (modify-phases %standard-phases
4489 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4490 (propagated-inputs
4491 `(("python-ipython-genutils" ,python-ipython-genutils)
4492 ("python-decorator" ,python-decorator)))
4493 (native-inputs
4494 `(("python-mock" ,python-mock)
4495 ("python-nose" ,python-nose)))
4496 (home-page "http://ipython.org")
4497 (synopsis "Configuration system for Python applications")
4498 (description
4499 "Traitlets is a framework that lets Python classes have attributes with
4500 type checking, dynamically calculated default values, and ‘on change’
4501 callbacks. The package also includes a mechanism to use traitlets for
4502 configuration, loading values from files or from command line arguments. This
4503 is a distinct layer on top of traitlets, so you can use traitlets in your code
4504 without using the configuration machinery.")
4505 (license license:bsd-3)))
4506
4507 (define-public python2-traitlets
4508 (package-with-python2 python-traitlets))
4509
4510 (define-public python-jupyter-core
4511 (package
4512 (name "python-jupyter-core")
4513 (version "4.2.0")
4514 (source
4515 (origin
4516 (method url-fetch)
4517 (uri (string-append (pypi-uri "jupyter_core" version)))
4518 (sha256
4519 (base32
4520 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4521 (build-system python-build-system)
4522 ;; FIXME: not sure how to run the tests
4523 (arguments `(#:tests? #f))
4524 (propagated-inputs
4525 `(("python-traitlets" ,python-traitlets)))
4526 (home-page "http://jupyter.org/")
4527 (synopsis "Jupyter base package")
4528 (description
4529 "Jupyter core is the base package on which Jupyter projects rely.")
4530 (license license:bsd-3)))
4531
4532 (define-public python2-jupyter-core
4533 (package-with-python2 python-jupyter-core))
4534
4535 (define-public python-jupyter-client
4536 (package
4537 (name "python-jupyter-client")
4538 (version "4.4.0")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (pypi-uri "jupyter_client" version))
4543 (sha256
4544 (base32
4545 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4546 (build-system python-build-system)
4547 ;; Tests fail because of missing native python kernel which I assume is
4548 ;; provided by the ipython package, which we cannot use because it would
4549 ;; cause a dependency cycle.
4550 (arguments `(#:tests? #f))
4551 (propagated-inputs
4552 `(("python-pyzmq" ,python-pyzmq)
4553 ("python-traitlets" ,python-traitlets)
4554 ("python-jupyter-core" ,python-jupyter-core)))
4555 (home-page "http://jupyter.org/")
4556 (synopsis "Jupyter protocol implementation and client libraries")
4557 (description
4558 "The @code{jupyter_client} package contains the reference implementation
4559 of the Jupyter protocol. It also provides client and kernel management APIs
4560 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4561 installing @code{kernelspec}s for use with Jupyter frontends.")
4562 (license license:bsd-3)))
4563
4564 (define-public python2-jupyter-client
4565 (package-with-python2 python-jupyter-client))
4566
4567 (define-public python-ipykernel
4568 (package
4569 (name "python-ipykernel")
4570 (version "4.5.0")
4571 (source
4572 (origin
4573 (method url-fetch)
4574 (uri (pypi-uri "ipykernel" version))
4575 (sha256
4576 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4577 (build-system python-build-system)
4578 ;; The tests load a submodule of IPython. However, IPython itself depends
4579 ;; on ipykernel.
4580 (arguments `(#:tests? #f))
4581 (propagated-inputs
4582 ;; imported at runtime during connect
4583 `(("python-jupyter-client" ,python-jupyter-client)))
4584 (home-page "http://ipython.org")
4585 (synopsis "IPython Kernel for Jupyter")
4586 (description
4587 "This package provides the IPython kernel for Jupyter.")
4588 (license license:bsd-3)))
4589
4590 (define-public python2-ipykernel
4591 (package-with-python2 python-ipykernel))
4592
4593 (define-public python-testpath
4594 (package
4595 (name "python-testpath")
4596 (version "0.2")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4601 version ".tar.gz"))
4602 (file-name (string-append name "-" version ".tar.gz"))
4603 (sha256
4604 (base32
4605 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4606 (build-system python-build-system)
4607 (arguments
4608 `(#:tests? #f ; this package does not even have a setup.py
4609 #:phases
4610 (modify-phases %standard-phases
4611 (delete 'install)
4612 (replace 'build
4613 (lambda* (#:key inputs outputs #:allow-other-keys)
4614 (let ((dir (string-append
4615 (assoc-ref outputs "out")
4616 "/lib/python"
4617 (string-take (string-take-right
4618 (assoc-ref inputs "python") 5) 3)
4619 "/site-packages/testpath")))
4620 (mkdir-p dir)
4621 (copy-recursively "testpath" dir))
4622 #t)))))
4623 (home-page "https://github.com/takluyver/testpath")
4624 (synopsis "Test utilities for code working with files and commands")
4625 (description
4626 "Testpath is a collection of utilities for Python code working with files
4627 and commands. It contains functions to check things on the filesystem, and
4628 tools for mocking system commands and recording calls to those.")
4629 (license license:expat)))
4630
4631 (define-public python2-testpath
4632 (package-with-python2 python-testpath))
4633
4634 (define-public python-ipython
4635 (package
4636 (name "python-ipython")
4637 (version "4.0.0")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "ipython" version ".tar.gz"))
4642 (sha256
4643 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4644 (build-system python-build-system)
4645 (outputs '("out" "doc"))
4646 (propagated-inputs
4647 `(("python-pyzmq" ,python-pyzmq)
4648 ("python-terminado" ,python-terminado)
4649 ("python-matplotlib" ,python-matplotlib)
4650 ("python-numpy" ,python-numpy)
4651 ("python-numpydoc" ,python-numpydoc)
4652 ("python-jinja2" ,python-jinja2)
4653 ("python-mistune" ,python-mistune)
4654 ("python-pexpect" ,python-pexpect)
4655 ("python-pickleshare" ,python-pickleshare)
4656 ("python-simplegeneric" ,python-simplegeneric)
4657 ("python-jsonschema" ,python-jsonschema)
4658 ("python-traitlets" ,python-traitlets)
4659 ("python-ipykernel" ,python-ipykernel)
4660 ("python-pygments" ,python-pygments)))
4661 (inputs
4662 `(("readline" ,readline)
4663 ("which" ,which)))
4664 (native-inputs
4665 `(("pkg-config" ,pkg-config)
4666 ("python-requests" ,python-requests) ;; for tests
4667 ("python-testpath" ,python-testpath)
4668 ("python-nose" ,python-nose)
4669 ("python-sphinx" ,python-sphinx)
4670 ("texlive" ,texlive)
4671 ("texinfo" ,texinfo)))
4672 (arguments
4673 `(#:phases
4674 (modify-phases %standard-phases
4675 (add-after
4676 'install 'install-doc
4677 (lambda* (#:key inputs outputs #:allow-other-keys)
4678 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4679 (doc (string-append data "/doc/" ,name "-" ,version))
4680 (html (string-append doc "/html"))
4681 (man1 (string-append data "/man/man1"))
4682 (info (string-append data "/info"))
4683 (examples (string-append doc "/examples")))
4684 (setenv "LANG" "en_US.utf8")
4685 (with-directory-excursion "docs"
4686 ;; FIXME: pdf fails to build
4687 ;;(system* "make" "pdf" "PAPER=a4")
4688 (system* "make" "html")
4689 (system* "make" "info"))
4690 (copy-recursively "docs/man" man1)
4691 (copy-recursively "examples" examples)
4692 (copy-recursively "docs/build/html" html)
4693 ;; (copy-file "docs/build/latex/ipython.pdf"
4694 ;; (string-append doc "/ipython.pdf"))
4695 (mkdir-p info)
4696 (copy-file "docs/build/texinfo/ipython.info"
4697 (string-append info "/ipython.info"))
4698 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4699 ;; Tests can only be run after the library has been installed and not
4700 ;; within the source directory.
4701 (delete 'check)
4702 (add-after
4703 'install 'check
4704 (lambda* (#:key outputs tests? #:allow-other-keys)
4705 (if tests?
4706 (with-directory-excursion "/tmp"
4707 (setenv "HOME" "/tmp/") ;; required by a test
4708 (zero? (system* (string-append (assoc-ref outputs "out")
4709 "/bin/iptest"))))
4710 #t)))
4711 (add-before
4712 'install 'fix-tests
4713 (lambda* (#:key inputs #:allow-other-keys)
4714 (substitute* "./IPython/utils/_process_posix.py"
4715 (("/usr/bin/env', 'which") (which "which")))
4716 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4717 (("#!/usr/bin/env python")
4718 (string-append "#!" (which "python"))))
4719 ;; Disable 1 failing test
4720 (substitute* "./IPython/core/tests/test_magic.py"
4721 (("def test_dirops\\(\\):" all)
4722 (string-append "@dec.skipif(True)\n" all))))))))
4723 (home-page "http://ipython.org")
4724 (synopsis "IPython is a tool for interactive computing in Python")
4725 (description
4726 "IPython provides a rich architecture for interactive computing with:
4727 Powerful interactive shells, a browser-based notebook, support for interactive
4728 data visualization, embeddable interpreters and tools for parallel
4729 computing.")
4730 (license license:bsd-3)
4731 (properties `((python2-variant . ,(delay python2-ipython))))))
4732
4733 (define-public python2-ipython
4734 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4735 (package
4736 (inherit ipython)
4737 ;; FIXME: some tests are failing
4738 (arguments
4739 `(#:tests? #f ,@(package-arguments ipython)))
4740 ;; FIXME: add pyreadline once available.
4741 (inputs
4742 `(("python2-mock" ,python2-mock)
4743 ,@(package-inputs ipython))))))
4744
4745 (define-public python-isodate
4746 (package
4747 (name "python-isodate")
4748 (version "0.5.4")
4749 (source
4750 (origin
4751 (method url-fetch)
4752 (uri (pypi-uri "isodate" version))
4753 (sha256
4754 (base32
4755 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4756 (build-system python-build-system)
4757 (home-page
4758 "http://cheeseshop.python.org/pypi/isodate")
4759 (synopsis
4760 "Python date parser and formatter")
4761 (description
4762 "Python-isodate is a python module for parsing and formatting
4763 ISO 8601 dates, time and duration.")
4764 (license license:bsd-3)))
4765
4766 (define-public python2-isodate
4767 (package-with-python2 python-isodate))
4768
4769 (define-public python-html5lib
4770 (package
4771 (name "python-html5lib")
4772 (version "1.0b8")
4773 (source
4774 (origin
4775 (method url-fetch)
4776 (uri (pypi-uri "html5lib" version))
4777 (sha256
4778 (base32
4779 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4780 (build-system python-build-system)
4781 (propagated-inputs
4782 `(("python-six" ,python-six))) ; required to "import html5lib"
4783 (arguments
4784 `(#:test-target "check"))
4785 (home-page
4786 "https://github.com/html5lib/html5lib-python")
4787 (synopsis
4788 "Python HTML parser based on the WHATWG HTML specifcation")
4789 (description
4790 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4791 and written in Python.")
4792 (license license:expat)))
4793
4794 (define-public python2-html5lib
4795 (package-with-python2 python-html5lib))
4796
4797 ;; Needed for python-bleach, a dependency of python-notebook
4798 (define-public python-html5lib-0.9
4799 (package
4800 (inherit python-html5lib)
4801 (version "0.999")
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (pypi-uri "html5lib" version))
4806 (sha256
4807 (base32
4808 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4809
4810 (define-public python2-html5lib-0.9
4811 (package-with-python2 python-html5lib-0.9))
4812
4813 (define-public python-urwid
4814 (package
4815 (name "python-urwid")
4816 (version "1.3.1")
4817 (source
4818 (origin
4819 (method url-fetch)
4820 (uri (pypi-uri "urwid" version))
4821 (sha256
4822 (base32
4823 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4824 (build-system python-build-system)
4825 (arguments
4826 `(#:phases
4827 (modify-phases %standard-phases
4828 ;; Disable failing test. Bug filed upstream:
4829 ;; https://github.com/wardi/urwid/issues/164
4830 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4831 (add-after 'unpack 'disable-failing-test
4832 (lambda _
4833 (substitute* "urwid/tests/test_event_loops.py"
4834 (("test_remove_watch_file")
4835 "disable_remove_watch_file")))))))
4836 (home-page "http://urwid.org")
4837 (synopsis "Console user interface library for Python")
4838 (description
4839 "Urwid is a curses-based UI/widget library for Python. It includes many
4840 features useful for text console applications.")
4841 (license license:lgpl2.1+)))
4842
4843 (define-public python2-urwid
4844 (package-with-python2 python-urwid))
4845
4846 (define-public python-urwidtrees
4847 (package
4848 (name "python-urwidtrees")
4849 (version "1.0.2")
4850 (source
4851 (origin
4852 (method url-fetch)
4853 ;; package author intends on distributing via github rather than pypi:
4854 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4855 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4856 version ".tar.gz"))
4857 (file-name (string-append name "-" version ".tar.gz"))
4858 (sha256
4859 (base32
4860 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4861 (build-system python-build-system)
4862 (arguments
4863 '(#:tests? #f)) ; no tests
4864 (propagated-inputs `(("python-urwid" ,python-urwid)))
4865 (home-page "https://github.com/pazz/urwidtrees")
4866 (synopsis "Tree widgets for urwid")
4867 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4868 toolkit. Use it to build trees of widgets.")
4869 (license license:gpl3+)))
4870
4871 (define-public python2-urwidtrees
4872 (package-with-python2 python-urwidtrees))
4873
4874 (define-public python-dbus
4875 (package
4876 (name "python-dbus")
4877 (version "1.2.0")
4878 (source
4879 (origin
4880 (method url-fetch)
4881 (uri (string-append
4882 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4883 version ".tar.gz"))
4884 (sha256
4885 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4886 (build-system gnu-build-system)
4887 (arguments
4888 '(#:phases
4889 (modify-phases %standard-phases
4890 (add-before
4891 'check 'pre-check
4892 (lambda _
4893 ;; XXX: For the missing '/etc/machine-id'.
4894 (substitute* "test/run-test.sh"
4895 (("DBUS_FATAL_WARNINGS=1")
4896 "DBUS_FATAL_WARNINGS=0"))
4897 #t)))))
4898 (native-inputs
4899 `(("pkg-config" ,pkg-config)))
4900 (inputs
4901 `(("python" ,python)
4902 ("dbus-glib" ,dbus-glib)))
4903 (synopsis "Python bindings for D-bus")
4904 (description "python-dbus provides bindings for libdbus, the reference
4905 implementation of D-Bus.")
4906 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4907 (license license:expat)))
4908
4909 (define-public python2-dbus
4910 (package (inherit python-dbus)
4911 (name "python2-dbus")
4912 (inputs `(("python" ,python-2)
4913 ,@(alist-delete "python"
4914 (package-inputs python-dbus)
4915 equal?)))
4916 ;; FIXME: on Python 2, the test_utf8 fails with:
4917 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4918 (arguments `(#:tests? #f))))
4919
4920 (define-public python-apsw
4921 (package
4922 (name "python-apsw")
4923 (version "3.9.2-r1")
4924 (source
4925 (origin
4926 (method url-fetch)
4927 (uri (pypi-uri "apsw" version))
4928 (sha256
4929 (base32
4930 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4931 (build-system python-build-system)
4932 (inputs
4933 `(("sqlite" ,sqlite)))
4934 (arguments
4935 `(#:phases
4936 ;; swap check and install phases
4937 (alist-cons-after
4938 'install 'check
4939 (assoc-ref %standard-phases 'check)
4940 (alist-delete
4941 'check
4942 %standard-phases))))
4943 (home-page "https://github.com/rogerbinns/apsw/")
4944 (synopsis "Another Python SQLite Wrapper")
4945 (description "APSW is a Python wrapper for the SQLite
4946 embedded relational database engine. In contrast to other wrappers such as
4947 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4948 translate the complete SQLite API into Python.")
4949 (license license:zlib)))
4950
4951 (define-public python2-apsw
4952 (package-with-python2 python-apsw))
4953
4954 (define-public python-lxml
4955 (package
4956 (name "python-lxml")
4957 (version "3.6.0")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "lxml" version))
4962 (sha256
4963 (base32
4964 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4965 (build-system python-build-system)
4966 (inputs
4967 `(("libxml2" ,libxml2)
4968 ("libxslt" ,libxslt)))
4969 (home-page "http://lxml.de/")
4970 (synopsis
4971 "Python XML processing library")
4972 (description
4973 "The lxml XML toolkit is a Pythonic binding for the C libraries
4974 libxml2 and libxslt.")
4975 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4976
4977 (define-public python2-lxml
4978 (package-with-python2 python-lxml))
4979
4980 ;; beautifulsoup4 has a totally different namespace than 3.x,
4981 ;; and pypi seems to put it under its own name, so I guess we should too
4982 (define-public python-beautifulsoup4
4983 (package
4984 (name "python-beautifulsoup4")
4985 (version "4.5.1")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (pypi-uri "beautifulsoup4" version))
4990 (sha256
4991 (base32
4992 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
4993 (build-system python-build-system)
4994 (arguments
4995 `(#:phases
4996 (modify-phases %standard-phases
4997 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4998 ;; must use this conversion script when building with Python 3. The
4999 ;; conversion script also runs the tests.
5000 ;; For more information, see the file 'convert-py3k' in the source
5001 ;; distribution.
5002 (replace 'check
5003 (lambda _ (zero? (system* "./convert-py3k")))))))
5004 (home-page
5005 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5006 (synopsis
5007 "Python screen-scraping library")
5008 (description
5009 "Beautiful Soup is a Python library designed for rapidly setting up
5010 screen-scraping projects. It offers Pythonic idioms for navigating,
5011 searching, and modifying a parse tree, providing a toolkit for
5012 dissecting a document and extracting what you need. It automatically
5013 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5014 (license license:expat)))
5015
5016 (define-public python2-beautifulsoup4
5017 (package
5018 (inherit (package-with-python2
5019 (strip-python2-variant python-beautifulsoup4)))
5020 (arguments `(#:python ,python-2))))
5021
5022 (define-public python2-cssutils
5023 (package
5024 (name "python2-cssutils")
5025 (version "1.0.1")
5026 (source
5027 (origin
5028 (method url-fetch)
5029 (uri (pypi-uri "cssutils" version))
5030 (sha256
5031 (base32
5032 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5033 (build-system python-build-system)
5034 (native-inputs
5035 `(("python2-mock" ,python2-mock) ; for the tests
5036 ("unzip" ,unzip))) ; for unpacking the source
5037 (arguments
5038 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5039 #:tests? #f ; The tests apparently download an external URL.
5040 ))
5041 (home-page "http://cthedot.de/cssutils/")
5042 (synopsis
5043 "CSS Cascading Style Sheets library for Python")
5044 (description
5045 "Cssutils is a Python package for parsing and building CSS
5046 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5047 options.")
5048 (license license:lgpl3+)))
5049
5050 (define-public python-cssselect
5051 (package
5052 (name "python-cssselect")
5053 (version "0.9.2")
5054 (source
5055 (origin
5056 (method url-fetch)
5057 (uri (pypi-uri "cssselect" version))
5058 (sha256
5059 (base32
5060 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5061 (build-system python-build-system)
5062 (arguments
5063 ;; tests fail with message
5064 ;; AttributeError: 'module' object has no attribute 'tests'
5065 `(#:tests? #f))
5066 (home-page
5067 "https://pythonhosted.org/cssselect/")
5068 (synopsis
5069 "CSS3 selector parser and translator to XPath 1.0")
5070 (description
5071 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5072 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5073 another XPath engine to find the matching elements in an XML or HTML document.")
5074 (license license:bsd-3)))
5075
5076 (define-public python2-cssselect
5077 (package-with-python2 python-cssselect))
5078
5079 (define-public python-netifaces
5080 (package
5081 (name "python-netifaces")
5082 (version "0.10.4")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (string-append
5087 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5088 version
5089 ".tar.gz"))
5090 (sha256
5091 (base32
5092 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5093 (build-system python-build-system)
5094 (home-page
5095 "https://bitbucket.org/al45tair/netifaces")
5096 (synopsis
5097 "Python module for portable network interface information")
5098 (description
5099 "Netifaces is a Python module providing information on network
5100 interfaces in an easy and portable manner.")
5101 (license license:expat)))
5102
5103 (define-public python2-netifaces
5104 (package-with-python2 python-netifaces))
5105
5106 (define-public python-networkx
5107 (package
5108 (name "python-networkx")
5109 (version "1.11")
5110 (source
5111 (origin
5112 (method url-fetch)
5113 (uri (pypi-uri "networkx" version))
5114 (sha256
5115 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5116 (build-system python-build-system)
5117 ;; python-decorator is needed at runtime
5118 (propagated-inputs
5119 `(("python-decorator" ,python-decorator)))
5120 (native-inputs
5121 `(("python-nose" ,python-nose)))
5122 (home-page "http://networkx.github.io/")
5123 (synopsis "Python module for creating and manipulating graphs and networks")
5124 (description
5125 "NetworkX is a Python package for the creation, manipulation, and study
5126 of the structure, dynamics, and functions of complex networks.")
5127 (license license:bsd-3)))
5128
5129 (define-public python2-networkx
5130 (package-with-python2 python-networkx))
5131
5132 (define-public snakemake
5133 (package
5134 (name "snakemake")
5135 (version "3.2.1")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (string-append
5140 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5141 version ".tar.gz"))
5142 (sha256
5143 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5144 (build-system python-build-system)
5145 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5146 (synopsis "Python-based execution environment for make-like workflows")
5147 (description
5148 "Snakemake aims to reduce the complexity of creating workflows by
5149 providing a clean and modern domain specific specification language (DSL) in
5150 Python style, together with a fast and comfortable execution environment.")
5151 (license license:expat)))
5152
5153 (define-public python-seaborn
5154 (package
5155 (name "python-seaborn")
5156 (version "0.7.0")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (pypi-uri "seaborn" version))
5161 (sha256
5162 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5163 (build-system python-build-system)
5164 (propagated-inputs
5165 `(("python-pandas" ,python-pandas)
5166 ("python-matplotlib" ,python-matplotlib)
5167 ("python-scipy" ,python-scipy)))
5168 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5169 (synopsis "Statistical data visualization")
5170 (description
5171 "Seaborn is a library for making attractive and informative statistical
5172 graphics in Python. It is built on top of matplotlib and tightly integrated
5173 with the PyData stack, including support for numpy and pandas data structures
5174 and statistical routines from scipy and statsmodels.")
5175 (license license:bsd-3)
5176 (properties `((python2-variant . ,(delay python2-seaborn))))))
5177
5178 (define-public python2-seaborn
5179 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5180 (package
5181 (inherit base)
5182 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5183 ,@(package-propagated-inputs base))))))
5184
5185 (define-public python-sympy
5186 (package
5187 (name "python-sympy")
5188 (version "0.7.6")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (string-append
5193 "https://github.com/sympy/sympy/releases/download/sympy-"
5194 version "/sympy-" version ".tar.gz"))
5195 (sha256
5196 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5197 (build-system python-build-system)
5198 (home-page "http://www.sympy.org/")
5199 (synopsis "Python library for symbolic mathematics")
5200 (description
5201 "SymPy is a Python library for symbolic mathematics. It aims to become a
5202 full-featured computer algebra system (CAS) while keeping the code as simple
5203 as possible in order to be comprehensible and easily extensible.")
5204 (license license:bsd-3)))
5205
5206 (define-public python2-sympy
5207 (package-with-python2 python-sympy))
5208
5209 (define-public python-q
5210 (package
5211 (name "python-q")
5212 (version "2.6")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (pypi-uri "q" version))
5217 (sha256
5218 (base32
5219 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5220 (build-system python-build-system)
5221 (home-page "https://github.com/zestyping/q")
5222 (synopsis "Quick-and-dirty debugging output for tired programmers")
5223 (description
5224 "q is a Python module for \"print\" style of debugging Python code. It
5225 provides convenient short API for print out of values, tracebacks, and
5226 falling into the Python interpreter.")
5227 (license license:asl2.0)))
5228
5229 (define-public python2-q
5230 (package-with-python2 python-q))
5231
5232 (define-public python-testlib
5233 (package
5234 (name "python-testlib")
5235 (version "0.6.5")
5236 (source
5237 (origin
5238 (method url-fetch)
5239 (uri (string-append
5240 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5241 version ".zip"))
5242 (sha256
5243 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5244 (build-system python-build-system)
5245 (native-inputs
5246 `(("unzip" ,unzip)))
5247 (arguments
5248 `(#:phases
5249 (alist-replace
5250 'unpack
5251 (lambda* (#:key inputs outputs #:allow-other-keys)
5252 (let ((unzip (string-append (assoc-ref inputs "unzip")
5253 "/bin/unzip"))
5254 (source (assoc-ref inputs "source")))
5255 (and (zero? (system* unzip source))
5256 (chdir (string-append "testlib-" ,version)))))
5257 %standard-phases)))
5258 (synopsis "Python micro test suite harness")
5259 (description "A micro unittest suite harness for Python.")
5260 (home-page "https://github.com/trentm/testlib")
5261 (license license:expat)))
5262
5263 (define-public python2-testlib
5264 (package-with-python2 python-testlib))
5265
5266 (define-public python2-xlib
5267 (package
5268 (name "python2-xlib")
5269 (version "0.14")
5270 (source (origin
5271 (method url-fetch)
5272 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5273 "/" version "/"
5274 "python-xlib-" version ".tar.gz"))
5275 (sha256
5276 (base32
5277 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5278 (build-system python-build-system)
5279 (arguments
5280 `(#:python ,python-2 ;Python 2 only
5281 #:tests? #f)) ;no tests
5282 (home-page "http://python-xlib.sourceforge.net/")
5283 (synopsis "Python X11 client library")
5284 (description
5285 "The Python X Library is intended to be a fully functional X client
5286 library for Python programs. It is useful to implement low-level X clients.
5287 It is written entirely in Python.")
5288 (license license:gpl2+)))
5289
5290 (define-public python-singledispatch
5291 (package
5292 (name "python-singledispatch")
5293 (version "3.4.0.3")
5294 (source
5295 (origin
5296 (method url-fetch)
5297 (uri (pypi-uri "singledispatch" version))
5298 (sha256
5299 (base32
5300 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5301 (build-system python-build-system)
5302 (inputs
5303 `(("python-six" ,python-six)))
5304 (home-page
5305 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5306 (synopsis "Backport of singledispatch feature from Python 3.4")
5307 (description
5308 "This library brings functools.singledispatch from Python 3.4 to Python
5309 2.6-3.3.")
5310 (license license:expat)))
5311
5312 (define-public python2-singledispatch
5313 (package-with-python2 python-singledispatch))
5314
5315 (define-public python-tornado
5316 (package
5317 (name "python-tornado")
5318 (version "4.3")
5319 (source
5320 (origin
5321 (method url-fetch)
5322 (uri (pypi-uri "tornado" version))
5323 (sha256
5324 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5325 (build-system python-build-system)
5326 (native-inputs
5327 `(("python-certifi" ,python-certifi)))
5328 (propagated-inputs
5329 `(("python-backports-abc" ,python-backports-abc)))
5330 (home-page "http://www.tornadoweb.org/")
5331 (synopsis "Python web framework and asynchronous networking library")
5332 (description
5333 "Tornado is a Python web framework and asynchronous networking library,
5334 originally developed at FriendFeed. By using non-blocking network I/O,
5335 Tornado can scale to tens of thousands of open connections, making it ideal
5336 for long polling, WebSockets, and other applications that require a long-lived
5337 connection to each user.")
5338 (license license:asl2.0)
5339 (properties `((python2-variant . ,(delay python2-tornado))))))
5340
5341 (define-public python2-tornado
5342 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5343 (package (inherit tornado)
5344 (propagated-inputs
5345 `(("python2-backport-ssl-match-hostname"
5346 ,python2-backport-ssl-match-hostname)
5347 ("python2-singledispatch" ,python2-singledispatch)
5348 ,@(package-propagated-inputs tornado))))))
5349
5350 ;; the python- version can be removed with python-3.5
5351 (define-public python-backports-abc
5352 (package
5353 (name "python-backports-abc")
5354 (version "0.4")
5355 (source
5356 (origin
5357 (method url-fetch)
5358 (uri (pypi-uri "backports_abc" version))
5359 (sha256
5360 (base32
5361 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5362 (build-system python-build-system)
5363 (home-page "https://github.com/cython/backports_abc")
5364 (synopsis "Backport of additions to the 'collections.abc' module")
5365 (description
5366 "Python-backports-abc provides a backport of additions to the
5367 'collections.abc' module in Python-3.5.")
5368 (license license:psfl)))
5369
5370 (define-public python2-backports-abc
5371 (package-with-python2 python-backports-abc))
5372
5373 (define-public python-waf
5374 (package
5375 (name "python-waf")
5376 (version "1.9.5")
5377 (source (origin
5378 (method url-fetch)
5379 (uri (string-append "https://waf.io/"
5380 "waf-" version ".tar.bz2"))
5381 (sha256
5382 (base32
5383 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5384 (build-system python-build-system)
5385 (arguments
5386 '(#:phases
5387 (modify-phases %standard-phases
5388 (replace 'build
5389 (lambda _
5390 (zero? (system* "python" "waf-light" "configure" "build"))))
5391 (replace 'check
5392 (lambda _
5393 (zero? (system* "python" "waf" "--version"))))
5394 (replace 'install
5395 (lambda _
5396 (copy-file "waf" %output))))))
5397 (home-page "http://waf.io/")
5398 (synopsis "Python-based build system")
5399 (description
5400 "Waf is a Python-based framework for configuring, compiling and installing
5401 applications.")
5402 (license license:bsd-3)))
5403
5404 (define-public python2-waf
5405 (package-with-python2 python-waf))
5406
5407 (define-public python-pyzmq
5408 (package
5409 (name "python-pyzmq")
5410 (version "15.1.0")
5411 (source
5412 (origin
5413 (method url-fetch)
5414 (uri (pypi-uri "pyzmq" version))
5415 (sha256
5416 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5417 (build-system python-build-system)
5418 (arguments
5419 `(#:configure-flags
5420 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5421 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5422 ;; --inplace' for 'python setup.py test' to work.
5423 #:tests? #f))
5424 (inputs
5425 `(("zeromq" ,zeromq)))
5426 (native-inputs
5427 `(("pkg-config" ,pkg-config)
5428 ("python-nose" ,python-nose)))
5429 (home-page "http://github.com/zeromq/pyzmq")
5430 (synopsis "Python bindings for 0MQ")
5431 (description
5432 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5433 (license license:bsd-4)))
5434
5435 (define-public python2-pyzmq
5436 (package-with-python2 python-pyzmq))
5437
5438 (define-public python-pep8
5439 (package
5440 (name "python-pep8")
5441 (version "1.7.0")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (pypi-uri "pep8" version))
5446 (sha256
5447 (base32
5448 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5449 (build-system python-build-system)
5450 (home-page "http://pep8.readthedocs.org/")
5451 (synopsis "Python style guide checker")
5452 (description
5453 "This tools checks Python code against some of the style conventions in
5454 PEP 8.")
5455 (license license:expat)))
5456
5457 (define-public python2-pep8
5458 (package-with-python2 python-pep8))
5459
5460 (define-public python-pyflakes
5461 (package
5462 (name "python-pyflakes")
5463 (version "1.0.0")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (pypi-uri "pyflakes" version))
5468 (sha256
5469 (base32
5470 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5471 (build-system python-build-system)
5472 (home-page
5473 "https://github.com/pyflakes/pyflakes")
5474 (synopsis "Passive checker of Python programs")
5475 (description
5476 "Pyflakes statically checks Python source code for common errors.")
5477 (license license:expat)))
5478
5479 (define-public python2-pyflakes
5480 (package-with-python2 python-pyflakes))
5481
5482 (define-public python-mccabe
5483 (package
5484 (name "python-mccabe")
5485 (version "0.4.0")
5486 (source
5487 (origin
5488 (method url-fetch)
5489 (uri (pypi-uri "mccabe" version))
5490 (sha256
5491 (base32
5492 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5493 (build-system python-build-system)
5494 (native-inputs
5495 `(("python-pytest" ,python-pytest)
5496 ("python-pytest-runner" ,python-pytest-runner)))
5497 (home-page "https://github.com/flintwork/mccabe")
5498 (synopsis "McCabe checker, plugin for flake8")
5499 (description
5500 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5501 complexity of Python source code.")
5502 (license license:expat)))
5503
5504 (define-public python2-mccabe
5505 (package-with-python2 python-mccabe))
5506
5507 (define-public python-mccabe-0.2.1
5508 (package (inherit python-mccabe)
5509 (version "0.2.1")
5510 (source
5511 (origin
5512 (method url-fetch)
5513 (uri (pypi-uri "mccabe" version))
5514 (sha256
5515 (base32
5516 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5517
5518 (define-public python2-mccabe-0.2.1
5519 (package-with-python2 python-mccabe-0.2.1))
5520
5521 ;; Flake8 2.4.1 requires an older version of pep8.
5522 ;; This should be removed ASAP.
5523 (define-public python-pep8-1.5.7
5524 (package (inherit python-pep8)
5525 (version "1.5.7")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (string-append
5530 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5531 version
5532 ".tar.gz"))
5533 (sha256
5534 (base32
5535 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5536
5537 (define-public python2-pep8-1.5.7
5538 (package-with-python2 python-pep8-1.5.7))
5539
5540 ;; Flake8 2.4.1 requires an older version of pyflakes.
5541 ;; This should be removed ASAP.
5542 (define-public python-pyflakes-0.8.1
5543 (package (inherit python-pyflakes)
5544 (version "0.8.1")
5545 (source
5546 (origin
5547 (method url-fetch)
5548 (uri (string-append
5549 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5550 version
5551 ".tar.gz"))
5552 (sha256
5553 (base32
5554 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5555
5556 (define-public python2-pyflakes-0.8.1
5557 (package-with-python2 python-pyflakes-0.8.1))
5558
5559 (define-public python-flake8
5560 (package
5561 (name "python-flake8")
5562 (version "2.5.4")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "flake8" version))
5567 (sha256
5568 (base32
5569 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5570 (build-system python-build-system)
5571 (propagated-inputs
5572 `(("python-pep8" ,python-pep8)
5573 ("python-pyflakes" ,python-pyflakes)
5574 ("python-mccabe" ,python-mccabe)))
5575 (native-inputs
5576 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5577 ("python-nose" ,python-nose)))
5578 (home-page "https://gitlab.com/pycqa/flake8")
5579 (synopsis
5580 "The modular source code checker: pep8, pyflakes and co")
5581 (description
5582 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5583 (license license:expat)))
5584
5585 (define-public python2-flake8
5586 (package-with-python2 python-flake8))
5587
5588 ;; This will only be needed by the python-hacking package and will not be
5589 ;; necessary once python-hacking > 0.10.2 is released.
5590 (define-public python-flake8-2.2.4
5591 (package (inherit python-flake8)
5592 (propagated-inputs
5593 `(("python-pep8" ,python-pep8-1.5.7)
5594 ("python-pyflakes" ,python-pyflakes-0.8.1)
5595 ("python-mccabe" ,python-mccabe-0.2.1)))
5596 (native-inputs
5597 `(("python-mock" ,python-mock)
5598 ("python-nose" ,python-nose)))
5599 (version "2.2.4")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "flake8" version))
5604 (sha256
5605 (base32
5606 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5607
5608 (define-public python2-flake8-2.2.4
5609 (package-with-python2 python-flake8-2.2.4))
5610
5611 (define-public python-mistune
5612 (package
5613 (name "python-mistune")
5614 (version "0.7")
5615 (source
5616 (origin
5617 (method url-fetch)
5618 (uri (string-append
5619 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5620 version
5621 ".tar.gz"))
5622 (sha256
5623 (base32
5624 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5625 (build-system python-build-system)
5626 (native-inputs
5627 `(("python-nose" ,python-nose)
5628 ("python-cython" ,python-cython)))
5629 (home-page "https://github.com/lepture/mistune")
5630 (synopsis "Markdown parser in pure Python")
5631 (description "This package provides a fast markdown parser in pure
5632 Python.")
5633 (license license:bsd-3)))
5634
5635 (define-public python2-mistune
5636 (package-with-python2 python-mistune))
5637
5638 (define-public python-markdown
5639 (package
5640 (name "python-markdown")
5641 (version "2.6.5")
5642 (source
5643 (origin
5644 (method url-fetch)
5645 (uri (pypi-uri "Markdown" version))
5646 (sha256
5647 (base32
5648 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5649 (build-system python-build-system)
5650 (arguments
5651 `(#:phases
5652 (modify-phases %standard-phases
5653 (replace 'check
5654 (lambda _
5655 (zero? (system* "python" "run-tests.py")))))))
5656 (native-inputs
5657 `(("python-nose" ,python-nose)
5658 ("python-pyyaml" ,python-pyyaml)))
5659 (home-page "https://pythonhosted.org/Markdown/")
5660 (synopsis "Python implementation of Markdown")
5661 (description
5662 "This package provides a Python implementation of John Gruber's
5663 Markdown. The library features international input, various Markdown
5664 extensions, and several HTML output formats. A command line wrapper
5665 markdown_py is also provided to convert Markdown files to HTML.")
5666 (license license:bsd-3)))
5667
5668 (define-public python2-markdown
5669 (package-with-python2 python-markdown))
5670
5671 (define-public python-ptyprocess
5672 (package
5673 (name "python-ptyprocess")
5674 (version "0.5")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (string-append
5679 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5680 version ".tar.gz"))
5681 (sha256
5682 (base32
5683 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5684 (build-system python-build-system)
5685 (native-inputs
5686 `(("python-nose" ,python-nose)))
5687 (arguments
5688 `(#:phases
5689 (modify-phases %standard-phases
5690 (replace 'check
5691 (lambda _
5692 (zero? (system* "nosetests")))))))
5693 (home-page "https://github.com/pexpect/ptyprocess")
5694 (synopsis "Run a subprocess in a pseudo terminal")
5695 (description
5696 "This package provides a Python library used to launch a subprocess in a
5697 pseudo terminal (pty), and interact with both the process and its pty.")
5698 (license license:isc)))
5699
5700 (define-public python2-ptyprocess
5701 (package-with-python2 python-ptyprocess))
5702
5703 (define-public python-terminado
5704 (package
5705 (name "python-terminado")
5706 (version "0.6")
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (pypi-uri "terminado" version))
5711 (sha256
5712 (base32
5713 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5714 (build-system python-build-system)
5715 (propagated-inputs
5716 `(("python-tornado" ,python-tornado)
5717 ("python-ptyprocess" ,python-ptyprocess)))
5718 (native-inputs
5719 `(("python-nose" ,python-nose)))
5720 (arguments
5721 `(#:phases
5722 (modify-phases %standard-phases
5723 (replace 'check
5724 (lambda _
5725 (zero? (system* "nosetests")))))))
5726 (home-page "https://github.com/takluyver/terminado")
5727 (synopsis "Terminals served to term.js using Tornado websockets")
5728 (description "This package provides a Tornado websocket backend for the
5729 term.js Javascript terminal emulator library.")
5730 (license license:bsd-2)
5731 (properties `((python2-variant . ,(delay python2-terminado))))))
5732
5733 (define-public python2-terminado
5734 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5735 (package (inherit terminado)
5736 (propagated-inputs
5737 `(("python2-backport-ssl-match-hostname"
5738 ,python2-backport-ssl-match-hostname)
5739 ,@(package-propagated-inputs terminado))))))
5740
5741 (define-public python-fonttools
5742 (package
5743 (name "python-fonttools")
5744 (version "2.5")
5745 (source (origin
5746 (method url-fetch)
5747 (uri (string-append
5748 "https://pypi.python.org/packages/source/F/FontTools/"
5749 "fonttools-" version ".tar.gz"))
5750 (sha256
5751 (base32
5752 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5753 (build-system python-build-system)
5754 (arguments '(#:test-target "check"))
5755 (home-page "http://github.com/behdad/fonttools")
5756 (synopsis "Tools to manipulate font files")
5757 (description
5758 "FontTools/TTX is a library to manipulate font files from Python. It
5759 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5760 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5761 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5762 from an XML-based format.")
5763 (license (license:non-copyleft
5764 "file://LICENSE.txt"
5765 "See LICENSE.txt in the distribution."))))
5766
5767 (define-public python2-fonttools
5768 (package-with-python2 python-fonttools))
5769
5770 (define-public python-ly
5771 (package
5772 (name "python-ly")
5773 (version "0.9.4")
5774 (source
5775 (origin
5776 (method url-fetch)
5777 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5778 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5779 "/python-ly-" version ".tar.gz"))
5780 (sha256
5781 (base32
5782 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5783 (build-system python-build-system)
5784 (synopsis "Tool and library for manipulating LilyPond files")
5785 (description "This package provides a Python library to parse, manipulate
5786 or create documents in LilyPond format. A command line program ly is also
5787 provided that can be used to do various manipulations with LilyPond files.")
5788 (home-page "https://pypi.python.org/pypi/python-ly")
5789 (license license:gpl2+)))
5790
5791 (define-public python-appdirs
5792 (package
5793 (name "python-appdirs")
5794 (version "1.4.0")
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (string-append
5799 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5800 version
5801 ".tar.gz"))
5802 (sha256
5803 (base32
5804 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5805 (build-system python-build-system)
5806 (home-page "http://github.com/ActiveState/appdirs")
5807 (synopsis
5808 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5809 (description
5810 "This module provides a portable way of finding out where user data
5811 should be stored on various operating systems.")
5812 (license license:expat)))
5813
5814 (define-public python2-appdirs
5815 (package-with-python2 python-appdirs))
5816
5817 (define-public python-llfuse
5818 (package
5819 (name "python-llfuse")
5820 (version "1.1.1")
5821 (source (origin
5822 (method url-fetch)
5823 (uri (string-append
5824 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5825 "llfuse-" version ".tar.bz2"))
5826 (sha256
5827 (base32
5828 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5829 (build-system python-build-system)
5830 (inputs
5831 `(("fuse" ,fuse)
5832 ("attr" ,attr)))
5833 (native-inputs
5834 `(("pkg-config" ,pkg-config)))
5835 (synopsis "Python bindings for FUSE")
5836 (description
5837 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5838 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5839 (license license:lgpl2.0+)
5840 (properties `((python2-variant . ,(delay python2-llfuse))))))
5841
5842 (define-public python2-llfuse
5843 (package (inherit (package-with-python2
5844 (strip-python2-variant python-llfuse)))
5845 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5846
5847 ;; For attic-0.16
5848 (define-public python-llfuse-0.41
5849 (package (inherit python-llfuse)
5850 (version "0.41.1")
5851 (source (origin
5852 (method url-fetch)
5853 (uri (string-append
5854 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5855 "llfuse-" version ".tar.bz2"))
5856 (sha256
5857 (base32
5858 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5859 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5860 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5861 (license (list license:expat license:lgpl2.0+))))
5862
5863 (define-public python-msgpack
5864 (package
5865 (name "python-msgpack")
5866 (version "0.4.8")
5867 (source (origin
5868 (method url-fetch)
5869 (uri (pypi-uri "msgpack-python" version))
5870 (sha256
5871 (base32
5872 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5873 (build-system python-build-system)
5874 (synopsis "MessagePack (de)serializer")
5875 (description "MessagePack is a fast, compact binary serialization format,
5876 suitable for similar data to JSON. This package provides CPython bindings for
5877 reading and writing MessagePack data.")
5878 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5879 (license license:asl2.0)))
5880
5881 (define-public python2-msgpack
5882 (package-with-python2 python-msgpack))
5883
5884 (define-public python-netaddr
5885 (package
5886 (name "python-netaddr")
5887 (version "0.7.18")
5888 (source
5889 (origin
5890 (method url-fetch)
5891 (uri (string-append
5892 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5893 version
5894 ".tar.gz"))
5895 (sha256
5896 (base32
5897 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5898 (build-system python-build-system)
5899 (arguments `(#:tests? #f)) ;; No tests.
5900 (home-page "https://github.com/drkjam/netaddr/")
5901 (synopsis "Pythonic manipulation of network addresses")
5902 (description
5903 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5904 and MAC network addresses.")
5905 (license license:bsd-3)))
5906
5907 (define-public python2-netaddr
5908 (package-with-python2 python-netaddr))
5909
5910 (define-public python-wrapt
5911 (package
5912 (name "python-wrapt")
5913 (version "1.10.5")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 (uri (string-append
5918 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5919 version
5920 ".tar.gz"))
5921 (sha256
5922 (base32
5923 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5924 (build-system python-build-system)
5925 (arguments
5926 ;; Tests are not included in the tarball, they are only available in the
5927 ;; git repository.
5928 `(#:tests? #f))
5929 (home-page "https://github.com/GrahamDumpleton/wrapt")
5930 (synopsis "Module for decorators, wrappers and monkey patching")
5931 (description
5932 "The aim of the wrapt module is to provide a transparent object proxy for
5933 Python, which can be used as the basis for the construction of function
5934 wrappers and decorator functions.")
5935 (license license:bsd-2)))
5936
5937 (define-public python2-wrapt
5938 (package-with-python2 python-wrapt))
5939
5940 (define-public python-iso8601
5941 (package
5942 (name "python-iso8601")
5943 (version "0.1.11")
5944 (source
5945 (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "iso8601" version))
5948 (sha256
5949 (base32
5950 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5951 (build-system python-build-system)
5952 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5953 (synopsis "Module to parse ISO 8601 dates")
5954 (description
5955 "This module parses the most common forms of ISO 8601 date strings (e.g.
5956 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5957 (license license:expat)))
5958
5959 (define-public python2-iso8601
5960 (package-with-python2 python-iso8601))
5961
5962 (define-public python-monotonic
5963 (package
5964 (name "python-monotonic")
5965 (version "0.3")
5966 (source
5967 (origin
5968 (method url-fetch)
5969 (uri (string-append
5970 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5971 version
5972 ".tar.gz"))
5973 (sha256
5974 (base32
5975 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5976 (build-system python-build-system)
5977 (home-page "https://github.com/atdt/monotonic")
5978 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5979 (description
5980 "This module provides a monotonic() function which returns the value (in
5981 fractional seconds) of a clock which never goes backwards.")
5982 (license license:asl2.0)))
5983
5984 (define-public python2-monotonic
5985 (package-with-python2 python-monotonic))
5986
5987 (define-public python-webob
5988 (package
5989 (name "python-webob")
5990 (version "1.5.1")
5991 (source
5992 (origin
5993 (method url-fetch)
5994 (uri (pypi-uri "WebOb" version))
5995 (sha256
5996 (base32
5997 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5998 (build-system python-build-system)
5999 (native-inputs
6000 `(("python-nose" ,python-nose)))
6001 (home-page "http://webob.org/")
6002 (synopsis "WSGI request and response object")
6003 (description
6004 "WebOb provides wrappers around the WSGI request environment, and an
6005 object to help create WSGI responses.")
6006 (license license:expat)))
6007
6008 (define-public python2-webob
6009 (package-with-python2 python-webob))
6010
6011 (define-public python-xlrd
6012 (package
6013 (name "python-xlrd")
6014 (version "1.0.0")
6015 (source (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "xlrd" version))
6018 (sha256
6019 (base32
6020 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6021 (build-system python-build-system)
6022 (arguments
6023 `(#:phases
6024 (modify-phases %standard-phases
6025 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6026 ;; run tests instead for now.
6027 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6028 (native-inputs `(("python-nose" ,python-nose)))
6029 (home-page "http://www.python-excel.org/")
6030 (synopsis "Library for extracting data from Excel files")
6031 (description "This packages provides a library to extract data from
6032 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6033 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6034 Unicode-aware. It is not intended as an end-user tool.")
6035 (license license:bsd-3)))
6036
6037 (define-public python2-xlrd
6038 (package-with-python2 python-xlrd))
6039
6040 (define-public python-prettytable
6041 (package
6042 (name "python-prettytable")
6043 (version "0.7.2")
6044 (source
6045 (origin
6046 (method url-fetch)
6047 (uri (string-append
6048 "https://pypi.python.org/packages/source/P/PrettyTable/"
6049 "prettytable-" version ".tar.bz2"))
6050 (sha256
6051 (base32
6052 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6053 (build-system python-build-system)
6054 (home-page "http://code.google.com/p/prettytable/")
6055 (synopsis "Display tabular data in an ASCII table format")
6056 (description
6057 "A library designed to represent tabular data in visually appealing ASCII
6058 tables. PrettyTable allows for selection of which columns are to be printed,
6059 independent alignment of columns (left or right justified or centred) and
6060 printing of sub-tables by specifying a row range.")
6061 (license license:bsd-3)))
6062
6063 (define-public python2-prettytable
6064 (package-with-python2 python-prettytable))
6065
6066 (define-public python-tables
6067 (package
6068 (name "python-tables")
6069 (version "3.2.2")
6070 (source
6071 (origin
6072 (method url-fetch)
6073 (uri (pypi-uri "tables" version))
6074 (sha256
6075 (base32
6076 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6077 (build-system python-build-system)
6078 (arguments
6079 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6080 ;; or "check", so we must override the build and check phases.
6081 #:phases
6082 (modify-phases %standard-phases
6083 (add-after 'unpack 'use-gcc
6084 (lambda _
6085 (substitute* "setup.py"
6086 (("compiler = new_compiler\\(\\)" line)
6087 (string-append line
6088 "\ncompiler.set_executables(compiler='gcc',"
6089 "compiler_so='gcc',"
6090 "linker_exe='gcc',"
6091 "linker_so='gcc -shared')")))
6092 #t))
6093 (replace 'build
6094 (lambda* (#:key inputs #:allow-other-keys)
6095 (zero? (system* "python" "setup.py" "build"
6096 (string-append "--hdf5="
6097 (assoc-ref inputs "hdf5"))))))
6098 (replace 'check
6099 (lambda* (#:key inputs #:allow-other-keys)
6100 (zero? (system* "python" "setup.py" "check"
6101 (string-append "--hdf5="
6102 (assoc-ref inputs "hdf5")))))))))
6103 (propagated-inputs
6104 `(("python-numexpr" ,python-numexpr)
6105 ("python-numpy" ,python-numpy)))
6106 (native-inputs
6107 `(("python-cython" ,python-cython)
6108 ("pkg-config" ,pkg-config)))
6109 (inputs
6110 `(("hdf5" ,hdf5)
6111 ("bzip2" ,bzip2)
6112 ("zlib" ,zlib)))
6113 (home-page "http://www.pytables.org/")
6114 (synopsis "Hierarchical datasets for Python")
6115 (description "PyTables is a package for managing hierarchical datasets and
6116 designed to efficently cope with extremely large amounts of data.")
6117 (license license:bsd-3)))
6118
6119 (define-public python2-tables
6120 (package-with-python2 python-tables))
6121
6122 (define-public python-pyasn1
6123 (package
6124 (name "python-pyasn1")
6125 (version "0.1.9")
6126 (source
6127 (origin
6128 (method url-fetch)
6129 (uri (pypi-uri "pyasn1" version))
6130 (sha256
6131 (base32
6132 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6133 (build-system python-build-system)
6134 (home-page "http://pyasn1.sourceforge.net/")
6135 (synopsis "ASN.1 types and codecs")
6136 (description
6137 "This is an implementation of ASN.1 types and codecs in Python. It is
6138 suitable for a wide range of protocols based on the ASN.1 specification.")
6139 (license license:bsd-2)))
6140
6141 (define-public python2-pyasn1
6142 (package-with-python2 python-pyasn1))
6143
6144 (define-public python-pyasn1-modules
6145 (package
6146 (name "python-pyasn1-modules")
6147 (version "0.0.8")
6148 (source
6149 (origin
6150 (method url-fetch)
6151 (uri (pypi-uri "pyasn1-modules" version))
6152 (sha256
6153 (base32
6154 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6155 (build-system python-build-system)
6156 (propagated-inputs
6157 `(("python-pyasn1" ,python-pyasn1)))
6158 (home-page "http://sourceforge.net/projects/pyasn1/")
6159 (synopsis "ASN.1 codec implementations")
6160 (description
6161 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6162 implementations of ASN.1-based codecs and protocols.")
6163 (license license:bsd-3)))
6164
6165 (define-public python2-pyasn1-modules
6166 (package-with-python2 python-pyasn1-modules))
6167
6168 (define-public python-ipaddress
6169 (package
6170 (name "python-ipaddress")
6171 (version "1.0.16")
6172 (source (origin
6173 (method url-fetch)
6174 (uri (pypi-uri "ipaddress" version))
6175 (sha256
6176 (base32
6177 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6178 (build-system python-build-system)
6179 (home-page "https://github.com/phihag/ipaddress")
6180 (synopsis "IP address manipulation library")
6181 (description
6182 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6183 in Python. This library is used to create, poke at, and manipulate IPv4 and
6184 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6185 module to older versions of Python.")
6186 (license license:psfl)))
6187
6188 (define-public python2-ipaddress
6189 (package-with-python2 python-ipaddress))
6190
6191 (define-public python2-ipaddr
6192 (package
6193 (name "python2-ipaddr")
6194 (version "2.1.11")
6195 (source
6196 (origin
6197 (method url-fetch)
6198 (uri (pypi-uri "ipaddr" version))
6199 (sha256
6200 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6201 (build-system python-build-system)
6202 (arguments
6203 `(#:python ,python-2 ;version 2 only
6204 #:phases
6205 (modify-phases %standard-phases
6206 (replace 'check
6207 (lambda* _
6208 (zero? (system* "python" "ipaddr_test.py")))))))
6209 (home-page "https://github.com/google/ipaddr-py")
6210 (synopsis "IP address manipulation library")
6211 (description
6212 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6213 IPv6 addresses and networks.
6214
6215 For new implementations you may prefer to use the standard module
6216 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6217 versions of Python.")
6218 (license license:asl2.0)))
6219
6220 (define-public python-idna
6221 (package
6222 (name "python-idna")
6223 (version "2.0")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (string-append "https://pypi.python.org/packages/source/i/"
6228 "idna/idna-" version ".tar.gz"))
6229 (sha256
6230 (base32
6231 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6232 (build-system python-build-system)
6233 (home-page "https://github.com/kjd/idna")
6234 (synopsis "Internationalized domain names in applications")
6235 (description
6236 "This is a library to support the Internationalised Domain Names in
6237 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6238 protocol is often referred to as “IDNA2008” and can produce different results
6239 from the earlier standard from 2003. The library is also intended to act as a
6240 suitable drop-in replacement for the “encodings.idna” module that comes with
6241 the Python standard library but currently only supports the older 2003
6242 specification.")
6243 (license license:bsd-4)))
6244
6245 (define-public python2-idna
6246 (package-with-python2 python-idna))
6247
6248 (define-public python-pretend
6249 (package
6250 (name "python-pretend")
6251 (version "1.0.8")
6252 (source
6253 (origin
6254 (method url-fetch)
6255 (uri (string-append "https://pypi.python.org/packages/source/p/"
6256 "pretend/pretend-" version ".tar.gz"))
6257 (sha256
6258 (base32
6259 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6260 (build-system python-build-system)
6261 (home-page "https://github.com/alex/pretend")
6262 (synopsis "Library for stubbing in Python")
6263 (description
6264 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6265 technique for writing tests. You may hear the term mixed up with mocks,
6266 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6267 responses, rather than doing any computation.")
6268 (license license:bsd-3)))
6269
6270 (define-public python2-pretend
6271 (package-with-python2 python-pretend))
6272
6273 (define-public python-cryptography-vectors
6274 (package
6275 (name "python-cryptography-vectors")
6276 (version "1.5.3")
6277 (source
6278 (origin
6279 (method url-fetch)
6280 (uri (pypi-uri "cryptography_vectors" version))
6281 (sha256
6282 (base32
6283 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6284 (build-system python-build-system)
6285 (home-page "https://github.com/pyca/cryptography")
6286 (synopsis "Test vectors for the cryptography package")
6287 (description
6288 "This package contains test vectors for the cryptography package.")
6289 ;; Distributed under either BSD-3 or ASL2.0
6290 (license (list license:bsd-3 license:asl2.0))))
6291
6292 (define-public python2-cryptography-vectors
6293 (package-with-python2 python-cryptography-vectors))
6294
6295 (define-public python-cryptography
6296 (package
6297 (name "python-cryptography")
6298 (version "1.5.3")
6299 (source
6300 (origin
6301 (method url-fetch)
6302 (uri (pypi-uri "cryptography" version))
6303 (sha256
6304 (base32
6305 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6306 (build-system python-build-system)
6307 (arguments
6308 `(#:phases
6309 (modify-phases %standard-phases
6310 (add-before 'check 'disable-failing-test
6311 (lambda _
6312 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6313 ;; versions of python-cryptography:
6314 ;; https://github.com/pyca/cryptography/issues/3196
6315 ;; TODO: Try re-enabling the test when upgrading
6316 ;; python-cryptography.
6317 (substitute* "tests/hazmat/backends/test_openssl.py"
6318 (("def test_numeric_string_x509_name_entry")
6319 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6320 #t)))))
6321 (inputs
6322 `(("openssl" ,openssl)))
6323 (propagated-inputs
6324 `(("python-cffi" ,python-cffi)
6325 ("python-six" ,python-six)
6326 ("python-pyasn1" ,python-pyasn1)
6327 ("python-idna" ,python-idna)
6328 ("python-iso8601" ,python-iso8601)))
6329 (native-inputs
6330 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6331 ("python-hypothesis" ,python-hypothesis)
6332 ("python-pretend" ,python-pretend)
6333 ("python-pyasn1" ,python-pyasn1)
6334 ("python-pyasn1-modules" ,python-pyasn1-modules)
6335 ("python-pytz" ,python-pytz)
6336 ("python-pytest" ,python-pytest-2.9.2)))
6337 (home-page "https://github.com/pyca/cryptography")
6338 (synopsis "Cryptographic recipes and primitives for Python")
6339 (description
6340 "cryptography is a package which provides cryptographic recipes and
6341 primitives to Python developers. It aims to be the “cryptographic standard
6342 library” for Python. The package includes both high level recipes, and low
6343 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6344 message digests and key derivation functions.")
6345 ;; Distributed under either BSD-3 or ASL2.0
6346 (license (list license:bsd-3 license:asl2.0))
6347 (properties `((python2-variant . ,(delay python2-cryptography))))))
6348
6349 (define-public python2-cryptography
6350 (let ((crypto (package-with-python2
6351 (strip-python2-variant python-cryptography))))
6352 (package (inherit crypto)
6353 (propagated-inputs
6354 `(("python2-ipaddress" ,python2-ipaddress)
6355 ("python2-backport-ssl-match-hostname"
6356 ,python2-backport-ssl-match-hostname)
6357 ("python2-enum34" ,python2-enum34)
6358 ,@(package-propagated-inputs crypto))))))
6359
6360 (define-public python-pyopenssl
6361 (package
6362 (name "python-pyopenssl")
6363 (version "16.1.0")
6364 (source
6365 (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "pyOpenSSL" version))
6368 (sha256
6369 (base32
6370 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6371 (build-system python-build-system)
6372 (propagated-inputs
6373 `(("python-cryptography" ,python-cryptography)
6374 ("python-six" ,python-six)))
6375 (inputs
6376 `(("openssl" ,openssl)))
6377 (home-page "https://github.com/pyca/pyopenssl")
6378 (synopsis "Python wrapper module around the OpenSSL library")
6379 (description
6380 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6381 library.")
6382 (license license:asl2.0)))
6383
6384 (define-public python2-pyopenssl
6385 (package-with-python2 python-pyopenssl))
6386
6387 (define-public python-pip
6388 (package
6389 (name "python-pip")
6390 (version "8.0.2")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "pip" version))
6395 (sha256
6396 (base32
6397 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6398 (build-system python-build-system)
6399 (inputs
6400 `(("python-virtualenv" ,python-virtualenv)
6401 ;; Tests
6402 ("python-mock" ,python-mock)
6403 ("python-pytest" ,python-pytest)
6404 ("python-scripttest" ,python-scripttest)))
6405 (home-page "https://pip.pypa.io/")
6406 (synopsis
6407 "Package manager for Python software")
6408 (description
6409 "Pip is a package manager for Python software, that finds packages on the
6410 Python Package Index (PyPI).")
6411 (license license:expat)))
6412
6413 (define-public python2-pip
6414 (package-with-python2 python-pip))
6415
6416 (define-public python-tlsh
6417 (package
6418 (name "python-tlsh")
6419 (version "3.4.4")
6420 (home-page "https://github.com/trendmicro/tlsh")
6421 (source (origin
6422 (method url-fetch)
6423 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6424 version ".tar.gz"))
6425 (sha256
6426 (base32
6427 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6428 (file-name (string-append name "-" version ".tar.gz"))))
6429 (build-system cmake-build-system)
6430 (arguments
6431 '(#:out-of-source? #f
6432 #:phases (modify-phases %standard-phases
6433 (replace
6434 'install
6435 (lambda* (#:key outputs #:allow-other-keys)
6436 ;; Build and install the Python bindings. The underlying
6437 ;; C++ library is apparently not meant to be installed.
6438 (let ((out (assoc-ref outputs "out")))
6439 (with-directory-excursion "py_ext"
6440 (and (system* "python" "setup.py" "build")
6441 (system* "python" "setup.py" "install"
6442 (string-append "--prefix=" out))))))))))
6443 (inputs `(("python" ,python-wrapper))) ;for the bindings
6444 (synopsis "Fuzzy matching library for Python")
6445 (description
6446 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6447 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6448 value which can be used for similarity comparisons. Similar objects have
6449 similar hash values, which allows for the detection of similar objects by
6450 comparing their hash values. The byte stream should have a sufficient amount
6451 of complexity; for example, a byte stream of identical bytes will not generate
6452 a hash value.")
6453 (license license:asl2.0)))
6454
6455 (define-public python2-tlsh
6456 (package
6457 (inherit python-tlsh)
6458 (name "python2-tlsh")
6459 (inputs `(("python" ,python-2)))))
6460
6461 (define-public python-termcolor
6462 (package
6463 (name "python-termcolor")
6464 (version "1.1.0")
6465 (source
6466 (origin
6467 (method url-fetch)
6468 (uri (pypi-uri "python-termcolor" version))
6469 (sha256
6470 (base32
6471 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6472 (build-system python-build-system)
6473 (arguments
6474 ;; There are no tests.
6475 `(#:tests? #f))
6476 (home-page "http://pypi.python.org/pypi/termcolor")
6477 (synopsis "ANSII Color formatting for terminal output")
6478 (description
6479 "This package provides ANSII Color formatting for output in terminals.")
6480 (license license:expat)))
6481
6482 (define-public python2-termcolor
6483 (package-with-python2 python-termcolor))
6484
6485 (define-public python-libarchive-c
6486 (package
6487 (name "python-libarchive-c")
6488 (version "2.2")
6489 (source (origin
6490 (method url-fetch)
6491 (uri (pypi-uri "libarchive-c" version))
6492 (sha256
6493 (base32
6494 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6495 (build-system python-build-system)
6496 (arguments
6497 '(#:phases (modify-phases %standard-phases
6498 (add-before
6499 'build 'reference-libarchive
6500 (lambda* (#:key inputs #:allow-other-keys)
6501 ;; Retain the absolute file name of libarchive.so.
6502 (let ((libarchive (assoc-ref inputs "libarchive")))
6503 (substitute* "libarchive/ffi.py"
6504 (("find_library\\('archive'\\)")
6505 (string-append "'" libarchive
6506 "/lib/libarchive.so'")))))))))
6507 (inputs
6508 `(("libarchive" ,libarchive)))
6509 (home-page "https://github.com/Changaco/python-libarchive-c")
6510 (synopsis "Python interface to libarchive")
6511 (description
6512 "This package provides Python bindings to libarchive, a C library to
6513 access possibly compressed archives in many different formats. It uses
6514 Python's @code{ctypes} foreign function interface (FFI).")
6515 (license license:lgpl2.0+)))
6516
6517 (define-public python2-libarchive-c
6518 (package-with-python2 python-libarchive-c))
6519
6520 (define-public python-file
6521 (package
6522 (inherit file)
6523 (name "python-file")
6524 (source (origin
6525 (inherit (package-source file))
6526 ;; This patch should not be applied to python2-file.
6527 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6528 (build-system python-build-system)
6529 (arguments
6530 '(#:tests? #f ;no tests
6531 #:configure-flags '("--single-version-externally-managed" "--root=/")
6532 #:phases (modify-phases %standard-phases
6533 (add-before 'build 'change-directory
6534 (lambda _
6535 (chdir "python")
6536 #t))
6537 (add-before 'build 'set-library-file-name
6538 (lambda* (#:key inputs #:allow-other-keys)
6539 (let ((file (assoc-ref inputs "file")))
6540 (substitute* "magic.py"
6541 (("find_library\\('magic'\\)")
6542 (string-append "'" file "/lib/libmagic.so'")))
6543 #t))))))
6544 (inputs `(("file" ,file)))
6545 (self-native-input? #f)
6546 (synopsis "Python bindings to the libmagic file type guesser. Note that
6547 this module and the python-magic module both provide a \"magic.py\" file;
6548 these two modules, which are different and were developed separately, both
6549 serve the same purpose: provide Python bindings for libmagic.")))
6550
6551 (define-public python2-file
6552 (package-with-python2 python-file))
6553
6554 (define-public python-debian
6555 (package
6556 (name "python-debian")
6557 (version "0.1.23")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (string-append
6562 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6563 version ".tar.gz"))
6564 (sha256
6565 (base32
6566 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6567 (build-system python-build-system)
6568 (propagated-inputs
6569 `(("python-six" ,python-six)))
6570 (home-page "http://packages.debian.org/sid/python-debian")
6571 (synopsis "Debian package related modules")
6572 (description
6573 ;; XXX: Use @enumerate instead of @itemize to work around
6574 ;; <http://bugs.gnu.org/21772>.
6575 "This package provides Python modules that abstract many formats of
6576 Debian-related files, such as:
6577
6578 @enumerate
6579 @item Debtags information;
6580 @item @file{debian/changelog} files;
6581 @item packages files, pdiffs;
6582 @item control files of single or multiple RFC822-style paragraphs---e.g.
6583 @file{debian/control}, @file{.changes}, @file{.dsc};
6584 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6585 contained files and meta-information.
6586 @end enumerate\n")
6587
6588 ;; Modules are either GPLv2+ or GPLv3+.
6589 (license license:gpl3+)))
6590
6591 (define-public python2-debian
6592 (package-with-python2 python-debian))
6593
6594 (define-public python-nbformat
6595 (package
6596 (name "python-nbformat")
6597 (version "4.1.0")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "nbformat" version))
6602 (sha256
6603 (base32
6604 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6605 (build-system python-build-system)
6606 (arguments `(#:tests? #f)) ; no test target
6607 (propagated-inputs
6608 `(("python-ipython-genutils" ,python-ipython-genutils)
6609 ("python-jsonschema" ,python-jsonschema)
6610 ("python-jupyter-core" ,python-jupyter-core)
6611 ("python-traitlets" ,python-traitlets)))
6612 (home-page "http://jupyter.org")
6613 (synopsis "Jupyter Notebook format")
6614 (description "This package provides the reference implementation of the
6615 Jupyter Notebook format and Python APIs for working with notebooks.")
6616 (license license:bsd-3)))
6617
6618 (define-public python2-nbformat
6619 (package-with-python2 python-nbformat))
6620
6621 (define-public python-bleach
6622 (package
6623 (name "python-bleach")
6624 (version "1.4.3")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (pypi-uri "bleach" version))
6629 (sha256
6630 (base32
6631 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6632 (build-system python-build-system)
6633 (propagated-inputs
6634 `(("python-html5lib" ,python-html5lib-0.9)
6635 ("python-six" ,python-six)))
6636 (native-inputs
6637 `(("python-nose" ,python-nose)))
6638 (home-page "http://github.com/jsocol/bleach")
6639 (synopsis "Whitelist-based HTML-sanitizing tool")
6640 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6641 (license license:asl2.0)))
6642
6643 (define-public python2-bleach
6644 (package-with-python2 python-bleach))
6645
6646 (define-public python-entrypoints
6647 (package
6648 (name "python-entrypoints")
6649 (version "0.2.2")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6654 version ".tar.gz"))
6655 (file-name (string-append name "-" version ".tar.gz"))
6656 (sha256
6657 (base32
6658 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6659 (build-system python-build-system)
6660 ;; The package does not come with a setup.py file, so we have to generate
6661 ;; one ourselves.
6662 (arguments
6663 `(#:tests? #f
6664 #:phases
6665 (modify-phases %standard-phases
6666 (add-after 'unpack 'create-setup.py
6667 (lambda _
6668 (call-with-output-file "setup.py"
6669 (lambda (port)
6670 (format port "\
6671 from setuptools import setup
6672 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6673 " ,version))))))))
6674 (home-page "https://github.com/takluyver/entrypoints")
6675 (synopsis "Discover and load entry points from installed Python packages")
6676 (description "Entry points are a way for Python packages to advertise
6677 objects with some common interface. The most common examples are
6678 @code{console_scripts} entry points, which define shell commands by
6679 identifying a Python function to run. The @code{entrypoints} module contains
6680 functions to find and load entry points.")
6681 (license license:expat)))
6682
6683 (define-public python2-entrypoints
6684 (package-with-python2 python-entrypoints))
6685
6686 (define-public python-nbconvert
6687 (package
6688 (name "python-nbconvert")
6689 (version "5.0.0b1")
6690 (source
6691 (origin
6692 (method url-fetch)
6693 (uri (pypi-uri "nbconvert" version))
6694 (sha256
6695 (base32
6696 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6697 (build-system python-build-system)
6698 ;; The "bdist_egg" target is disabled by default, causing the installation
6699 ;; to fail.
6700 (arguments `(#:configure-flags (list "bdist_egg")))
6701 (propagated-inputs
6702 `(("python-bleach" ,python-bleach)
6703 ("python-entrypoints" ,python-entrypoints)
6704 ("python-jinja2" ,python-jinja2)
6705 ("python-jupyter-core" ,python-jupyter-core)
6706 ("python-mistune" ,python-mistune)
6707 ("python-nbformat" ,python-nbformat)
6708 ("python-pygments" ,python-pygments)
6709 ("python-traitlets" ,python-traitlets)))
6710 (home-page "http://jupyter.org")
6711 (synopsis "Converting Jupyter Notebooks")
6712 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6713 notebooks to various other formats via Jinja templates. It allows you to
6714 convert an @code{.ipynb} notebook file into various static formats including:
6715
6716 @enumerate
6717 @item HTML
6718 @item LaTeX
6719 @item PDF
6720 @item Reveal JS
6721 @item Markdown (md)
6722 @item ReStructured Text (rst)
6723 @item executable script
6724 @end enumerate\n")
6725 (license license:bsd-3)))
6726
6727 (define-public python2-nbconvert
6728 (package-with-python2 python-nbconvert))
6729
6730 (define-public python-notebook
6731 (package
6732 (name "python-notebook")
6733 (version "4.2.3")
6734 (source (origin
6735 (method url-fetch)
6736 (uri (pypi-uri "notebook" version))
6737 (sha256
6738 (base32
6739 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6740 (build-system python-build-system)
6741 (arguments
6742 `(#:phases
6743 (modify-phases %standard-phases
6744 (replace 'check
6745 (lambda _
6746 ;; HOME must be set for tests
6747 (setenv "HOME" "/tmp")
6748 (zero? (system* "nosetests")))))))
6749 (propagated-inputs
6750 `(("python-jupyter-core" ,python-jupyter-core)
6751 ("python-nbformat" ,python-nbformat)
6752 ("python-nbconvert" ,python-nbconvert)
6753 ("python-ipython" ,python-ipython)))
6754 (native-inputs
6755 `(("python-nose" ,python-nose)
6756 ("python-sphinx" ,python-sphinx)
6757 ("python-requests" ,python-requests)))
6758 (home-page "http://jupyter.org/")
6759 (synopsis "Web-based notebook environment for interactive computing")
6760 (description
6761 "The Jupyter HTML notebook is a web-based notebook environment for
6762 interactive computing.")
6763 (license license:bsd-3)))
6764
6765 (define-public python2-notebook
6766 (package-with-python2 python-notebook))
6767
6768 (define-public python-widgetsnbextension
6769 (package
6770 (name "python-widgetsnbextension")
6771 (version "1.2.6")
6772 (source
6773 (origin
6774 (method url-fetch)
6775 (uri (pypi-uri "widgetsnbextension" version))
6776 (sha256
6777 (base32
6778 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6779 (build-system python-build-system)
6780 (propagated-inputs
6781 `(("python-notebook" ,python-notebook)))
6782 (native-inputs
6783 `(("python-nose" ,python-nose)))
6784 (home-page "http://ipython.org")
6785 (synopsis "IPython HTML widgets for Jupyter")
6786 (description "This package provides interactive HTML widgets for Jupyter
6787 notebooks.")
6788 (license license:bsd-3)))
6789
6790 (define-public python2-widgetsnbextension
6791 (package-with-python2 python-widgetsnbextension))
6792
6793 (define-public python-ipywidgets
6794 (package
6795 (name "python-ipywidgets")
6796 (version "5.2.2")
6797 (source
6798 (origin
6799 (method url-fetch)
6800 (uri (pypi-uri "ipywidgets" version))
6801 (sha256
6802 (base32
6803 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6804 (build-system python-build-system)
6805 ;; FIXME: it's not clear how to run the tests.
6806 (arguments `(#:tests? #f))
6807 (propagated-inputs
6808 `(("python-ipykernel" ,python-ipykernel)
6809 ("python-ipython" ,python-ipython)
6810 ("python-traitlets" ,python-traitlets)
6811 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6812 (home-page "http://ipython.org")
6813 (synopsis "IPython HTML widgets for Jupyter")
6814 (description "Ipywidgets are interactive HTML widgets for Jupyter
6815 notebooks and the IPython kernel. Notebooks come alive when interactive
6816 widgets are used. Users gain control of their data and can visualize changes
6817 in the data.")
6818 (license license:bsd-3)))
6819
6820 (define-public python2-ipywidgets
6821 (package-with-python2 python-ipywidgets))
6822
6823 (define-public python-jupyter-console
6824 (package
6825 (name "python-jupyter-console")
6826 (version "5.0.0")
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (pypi-uri "jupyter_console" version))
6831 (sha256
6832 (base32
6833 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6834 (build-system python-build-system)
6835 ;; FIXME: it's not clear how to run the tests.
6836 (arguments `(#:tests? #f))
6837 (propagated-inputs
6838 `(("python-ipykernel" ,python-ipykernel)
6839 ("python-ipython" ,python-ipython)
6840 ("python-jupyter-client" ,python-jupyter-client)
6841 ("python-prompt-toolkit" ,python-prompt-toolkit)
6842 ("python-pygments" ,python-pygments)))
6843 (home-page "https://jupyter.org")
6844 (synopsis "Jupyter terminal console")
6845 (description "This package provides a terminal-based console frontend for
6846 Jupyter kernels. It also allows for console-based interaction with non-Python
6847 Jupyter kernels such as IJulia and IRKernel.")
6848 (license license:bsd-3)))
6849
6850 (define-public python2-jupyter-console
6851 (package-with-python2 python-jupyter-console))
6852
6853 (define-public jupyter
6854 (package
6855 (name "jupyter")
6856 (version "1.0.0")
6857 (source
6858 (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "jupyter" version))
6861 (sha256
6862 (base32
6863 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6864 (build-system python-build-system)
6865 ;; FIXME: it's not clear how to run the tests.
6866 (arguments `(#:tests? #f))
6867 (propagated-inputs
6868 `(("python-ipykernel" ,python-ipykernel)
6869 ("python-ipywidgets" ,python-ipywidgets)
6870 ("python-jupyter-console" ,python-jupyter-console)
6871 ("python-nbconvert" ,python-nbconvert)
6872 ("python-notebook" ,python-notebook)))
6873 (home-page "http://jupyter.org")
6874 (synopsis "Web application for interactive documents")
6875 (description
6876 "The Jupyter Notebook is a web application that allows you to create and
6877 share documents that contain live code, equations, visualizations and
6878 explanatory text. Uses include: data cleaning and transformation, numerical
6879 simulation, statistical modeling, machine learning and much more.")
6880 (license license:bsd-3)))
6881
6882 (define-public python-chardet
6883 (package
6884 (name "python-chardet")
6885 (version "2.3.0")
6886 (source
6887 (origin
6888 (method url-fetch)
6889 (uri (string-append
6890 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6891 version
6892 ".tar.gz"))
6893 (sha256
6894 (base32
6895 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6896 (build-system python-build-system)
6897 (home-page "https://github.com/chardet/chardet")
6898 (synopsis "Universal encoding detector for Python 2 and 3")
6899 (description
6900 "This package provides @code{chardet}, a Python module that can
6901 automatically detect a wide range of file encodings.")
6902 (license license:lgpl2.1+)))
6903
6904 (define-public python2-chardet
6905 (package-with-python2 python-chardet))
6906
6907 (define-public python-docopt
6908 (package
6909 (name "python-docopt")
6910 (version "0.6.2")
6911 (source
6912 (origin
6913 (method url-fetch)
6914 ;; The release on PyPI does not include tests.
6915 (uri (string-append
6916 "https://github.com/docopt/docopt/archive/"
6917 version ".tar.gz"))
6918 (file-name (string-append name "-" version ".tar.gz"))
6919 (sha256
6920 (base32
6921 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6922 (build-system python-build-system)
6923 (native-inputs
6924 `(("python-pytest" ,python-pytest)))
6925 (arguments
6926 `(#:phases (alist-replace
6927 'check
6928 (lambda _ (zero? (system* "py.test")))
6929 %standard-phases)))
6930 (home-page "http://docopt.org")
6931 (synopsis "Command-line interface description language for Python")
6932 (description "This library allows the user to define a command-line
6933 interface from a program's help message rather than specifying it
6934 programatically with command-line parsers like @code{getopt} and
6935 @code{argparse}.")
6936 (license license:expat)))
6937
6938 (define-public python2-docopt
6939 (package-with-python2 python-docopt))
6940
6941 (define-public python-zope-event
6942 (package
6943 (name "python-zope-event")
6944 (version "4.1.0")
6945 (source
6946 (origin
6947 (method url-fetch)
6948 (uri (string-append "https://pypi.python.org/packages/source/z"
6949 "/zope.event/zope.event-" version ".tar.gz"))
6950 (sha256
6951 (base32
6952 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6953 (build-system python-build-system)
6954 (home-page "http://pypi.python.org/pypi/zope.event")
6955 (synopsis "Event publishing system for Python")
6956 (description "Zope.event provides an event publishing API, intended for
6957 use by applications which are unaware of any subscribers to their events. It
6958 is a simple event-dispatching system on which more sophisticated event
6959 dispatching systems can be built.")
6960 (license license:zpl2.1)))
6961
6962 (define-public python2-zope-event
6963 (package-with-python2 python-zope-event))
6964
6965 (define-public python-zope-interface
6966 (package
6967 (name "python-zope-interface")
6968 (version "4.1.3")
6969 (source
6970 (origin
6971 (method url-fetch)
6972 (uri (string-append "https://pypi.python.org/packages/source/z"
6973 "/zope.interface/zope.interface-" version ".tar.gz"))
6974 (sha256
6975 (base32
6976 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6977 (build-system python-build-system)
6978 (propagated-inputs
6979 `(("python-zope-event" ,python-zope-event)))
6980 (home-page "https://github.com/zopefoundation/zope.interface")
6981 (synopsis "Python implementation of the \"design by contract\"
6982 methodology")
6983 (description "Zope.interface provides an implementation of \"object
6984 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6985 conforming to a given API or contract.")
6986 (license license:zpl2.1)))
6987
6988 (define-public python2-zope-interface
6989 (package-with-python2 python-zope-interface))
6990
6991 (define-public python-zope-exceptions
6992 (package
6993 (name "python-zope-exceptions")
6994 (version "4.0.8")
6995 (source
6996 (origin
6997 (method url-fetch)
6998 (uri (string-append "https://pypi.python.org/packages/source/z"
6999 "/zope.exceptions/zope.exceptions-"
7000 version ".tar.gz"))
7001 (sha256
7002 (base32
7003 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7004 (build-system python-build-system)
7005 (arguments
7006 '(#:tests? #f)) ; circular dependency with zope.testrunner
7007 (propagated-inputs
7008 `(("python-zope-interface" ,python-zope-interface)))
7009 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7010 (synopsis "Zope exceptions")
7011 (description "Zope.exceptions provides general-purpose exception types
7012 that have uses outside of the Zope framework.")
7013 (license license:zpl2.1)))
7014
7015 (define-public python2-zope-exceptions
7016 (package-with-python2 python-zope-exceptions))
7017
7018 (define-public python-zope-testing
7019 (package
7020 (name "python-zope-testing")
7021 (version "4.5.0")
7022 (source
7023 (origin
7024 (method url-fetch)
7025 (uri (string-append "https://pypi.python.org/packages/source/z"
7026 "/zope.testing/zope.testing-" version ".tar.gz"))
7027 (sha256
7028 (base32
7029 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7030 (modules '((guix build utils)))
7031 (snippet
7032 '(begin
7033 ;; Remove pre-compiled .pyc files backup files from source.
7034 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7035 #t))))
7036 (build-system python-build-system)
7037 (native-inputs
7038 `(("python-zope-exceptions" ,python-zope-exceptions)))
7039 (propagated-inputs
7040 `(("python-zope-interface" ,python-zope-interface)))
7041 (home-page "http://pypi.python.org/pypi/zope.testing")
7042 (synopsis "Zope testing helpers")
7043 (description "Zope.testing provides a number of testing utilities for HTML
7044 forms, HTTP servers, regular expressions, and more.")
7045 (license license:zpl2.1)))
7046
7047 (define-public python2-zope-testing
7048 (package-with-python2 python-zope-testing))
7049
7050 (define-public python-zope-testrunner
7051 (package
7052 (name "python-zope-testrunner")
7053 (version "4.4.9")
7054 (source
7055 (origin
7056 (method url-fetch)
7057 (uri (string-append "https://pypi.python.org/packages/source/z"
7058 "/zope.testrunner/zope.testrunner-"
7059 version ".zip"))
7060 (sha256
7061 (base32
7062 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7063 (build-system python-build-system)
7064 (native-inputs
7065 `(("python-six" ,python-six)
7066 ("python-zope-exceptions" ,python-zope-exceptions)
7067 ("python-zope-testing" ,python-zope-testing)
7068 ("unzip" ,unzip)))
7069 (propagated-inputs
7070 `(("python-zope-interface" ,python-zope-interface)))
7071 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7072 (synopsis "Zope testrunner script")
7073 (description "Zope.testrunner provides a script for running Python
7074 tests.")
7075 (license license:zpl2.1)))
7076
7077 (define-public python2-zope-testrunner
7078 (let ((base (package-with-python2 python-zope-testrunner)))
7079 (package
7080 (inherit base)
7081 (native-inputs
7082 (append (package-native-inputs base)
7083 `(("python2-subunit" ,python2-subunit)
7084 ("python2-mimeparse" ,python2-mimeparse)))))))
7085
7086 (define-public python-zope-i18nmessageid
7087 (package
7088 (name "python-zope-i18nmessageid")
7089 (version "4.0.3")
7090 (source
7091 (origin
7092 (method url-fetch)
7093 (uri (string-append
7094 "https://pypi.python.org/packages/source/z"
7095 "/zope.i18nmessageid/zope.i18nmessageid-"
7096 version ".tar.gz"))
7097 (sha256
7098 (base32
7099 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7100 (build-system python-build-system)
7101 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7102 (synopsis "Message identifiers for internationalization")
7103 (description "Zope.i18nmessageid provides facilities for declaring
7104 internationalized messages within program source text.")
7105 (license license:zpl2.1)))
7106
7107 (define-public python2-zope-i18nmessageid
7108 (package-with-python2 python-zope-i18nmessageid))
7109
7110 (define-public python-zope-schema
7111 (package
7112 (name "python-zope-schema")
7113 (version "4.4.2")
7114 (source
7115 (origin
7116 (method url-fetch)
7117 (uri (string-append "https://pypi.python.org/packages/source/z"
7118 "/zope.schema/zope.schema-" version ".tar.gz"))
7119 (sha256
7120 (base32
7121 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7122 (build-system python-build-system)
7123 (propagated-inputs
7124 `(("python-zope-event" ,python-zope-event)
7125 ("python-zope-interface" ,python-zope-interface)))
7126 (native-inputs
7127 `(("python-zope-testing" ,python-zope-testing)))
7128 (home-page "http://pypi.python.org/pypi/zope.schema")
7129 (synopsis "Zope data schemas")
7130 (description "Zope.scheme provides extensions to zope.interface for
7131 defining data schemas.")
7132 (license license:zpl2.1)))
7133
7134 (define-public python2-zope-schema
7135 (package-with-python2 python-zope-schema))
7136
7137 (define-public python-zope-configuration
7138 (package
7139 (name "python-zope-configuration")
7140 (version "4.0.3")
7141 (source (origin
7142 (method url-fetch)
7143 (uri (string-append "https://pypi.python.org/packages/source/z"
7144 "/zope.configuration/zope.configuration-"
7145 version ".tar.gz"))
7146 (sha256
7147 (base32
7148 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7149 (build-system python-build-system)
7150 (propagated-inputs
7151 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7152 ("python-zope-schema" ,python-zope-schema)))
7153 (home-page "http://pypi.python.org/pypi/zope.configuration")
7154 (synopsis "Zope Configuration Markup Language")
7155 (description "Zope.configuration implements ZCML, the Zope Configuration
7156 Markup Language.")
7157 (license license:zpl2.1)))
7158
7159 (define-public python2-zope-configuration
7160 (package-with-python2 python-zope-configuration))
7161
7162 (define-public python-zope-proxy
7163 (package
7164 (name "python-zope-proxy")
7165 (version "4.1.6")
7166 (source
7167 (origin
7168 (method url-fetch)
7169 (uri (string-append "https://pypi.python.org/packages/source/z"
7170 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7171 (sha256
7172 (base32
7173 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7174 (build-system python-build-system)
7175 (propagated-inputs
7176 `(("python-zope-interface" ,python-zope-interface)))
7177 (home-page "http://pypi.python.org/pypi/zope.proxy")
7178 (synopsis "Generic, transparent proxies")
7179 (description "Zope.proxy provides generic, transparent proxies for Python.
7180 Proxies are special objects which serve as mostly-transparent wrappers around
7181 another object, intervening in the apparent behavior of the wrapped object
7182 only when necessary to apply the policy (e.g., access checking, location
7183 brokering, etc.) for which the proxy is responsible.")
7184 (license license:zpl2.1)))
7185
7186 (define-public python2-zope-proxy
7187 (package-with-python2 python-zope-proxy))
7188
7189 (define-public python-zope-location
7190 (package
7191 (name "python-zope-location")
7192 (version "4.0.3")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (string-append "https://pypi.python.org/packages/source/z"
7197 "/zope.location/zope.location-" version ".tar.gz"))
7198 (sha256
7199 (base32
7200 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7201 (build-system python-build-system)
7202 (native-inputs
7203 `(("python-zope-proxy" ,python-zope-proxy)
7204 ("python-zope-schema" ,python-zope-schema)))
7205 (home-page "http://pypi.python.org/pypi/zope.location/")
7206 (synopsis "Zope location library")
7207 (description "Zope.location implements the concept of \"locations\" in
7208 Zope3, which are are special objects that have a structural location.")
7209 (license license:zpl2.1)))
7210
7211 (define-public python2-zope-location
7212 (package-with-python2 python-zope-location))
7213
7214 (define-public python-zope-security
7215 (package
7216 (name "python-zope-security")
7217 (version "4.0.3")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (string-append "https://pypi.python.org/packages/source/z"
7222 "/zope.security/zope.security-" version ".tar.gz"))
7223 (sha256
7224 (base32
7225 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7226 (build-system python-build-system)
7227 (propagated-inputs
7228 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7229 ("python-zope-component" ,python-zope-component)
7230 ("python-zope-location" ,python-zope-location)
7231 ("python-zope-proxy" ,python-zope-proxy)
7232 ("python-zope-schema" ,python-zope-schema)
7233 ("python-zope-testrunner" ,python-zope-testrunner)
7234 ("python-zope-testing" ,python-zope-testing)))
7235 (home-page "http://pypi.python.org/pypi/zope.security")
7236 (synopsis "Zope security framework")
7237 (description "Zope.security provides a generic mechanism to implement
7238 security policies on Python objects.")
7239 (license license:zpl2.1)))
7240
7241 (define-public python2-zope-security
7242 (let ((zope-security (package-with-python2 python-zope-security)))
7243 (package (inherit zope-security)
7244 (propagated-inputs
7245 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7246 ,@(alist-delete
7247 "python-zope-testrunner"
7248 (package-propagated-inputs zope-security)))))))
7249
7250 (define-public python-zope-component
7251 (package
7252 (name "python-zope-component")
7253 (version "4.2.2")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 (uri (string-append "https://pypi.python.org/packages/source/z"
7258 "/zope.component/zope.component-" version ".tar.gz"))
7259 (sha256
7260 (base32
7261 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7262 (build-system python-build-system)
7263 (arguments
7264 ;; Skip tests due to circular dependency with python-zope-security.
7265 '(#:tests? #f))
7266 (native-inputs
7267 `(("python-zope-testing" ,python-zope-testing)))
7268 (propagated-inputs
7269 `(("python-zope-event" ,python-zope-event)
7270 ("python-zope-interface" ,python-zope-interface)
7271 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7272 ("python-zope-configuration" ,python-zope-configuration)))
7273 (home-page "https://github.com/zopefoundation/zope.component")
7274 (synopsis "Zope Component Architecture")
7275 (description "Zope.component represents the core of the Zope Component
7276 Architecture. Together with the zope.interface package, it provides
7277 facilities for defining, registering and looking up components.")
7278 (license license:zpl2.1)))
7279
7280 (define-public python2-zope-component
7281 (package-with-python2 python-zope-component))
7282
7283 (define-public python-pythondialog
7284 (package
7285 (name "python-pythondialog")
7286 (version "3.4.0")
7287 (source
7288 (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "pythondialog" version))
7291 (sha256
7292 (base32
7293 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7294 (build-system python-build-system)
7295 (arguments
7296 `(#:phases
7297 (modify-phases %standard-phases
7298 (add-after 'unpack 'patch-path
7299 (lambda* (#:key inputs #:allow-other-keys)
7300 (let* ((dialog (assoc-ref inputs "dialog")))
7301 ;; Since this library really wants to grovel the search path, we
7302 ;; must hardcode dialog's store path into it.
7303 (substitute* "dialog.py"
7304 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7305 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7306 #t))))
7307 #:tests? #f)) ; no test suite
7308 (propagated-inputs
7309 `(("dialog" ,dialog)))
7310 (home-page "http://pythondialog.sourceforge.net/")
7311 (synopsis "Python interface to the UNIX dialog utility")
7312 (description "A Python wrapper for the dialog utility. Its purpose is to
7313 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7314 This allows one to make simple text-mode user interfaces on Unix-like systems")
7315 (license license:lgpl2.1)
7316 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7317
7318 (define-public python2-pythondialog
7319 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7320 (package
7321 (inherit base)
7322 (version (package-version python-pythondialog))
7323 (source (origin
7324 (method url-fetch)
7325 (uri (pypi-uri "python2-pythondialog" version))
7326 (sha256
7327 (base32
7328 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7329
7330 (define-public python-pyrfc3339
7331 (package
7332 (name "python-pyrfc3339")
7333 (version "1.0")
7334 (source
7335 (origin
7336 (method url-fetch)
7337 (uri (pypi-uri "pyRFC3339" version))
7338 (sha256
7339 (base32
7340 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7341 (build-system python-build-system)
7342 (propagated-inputs
7343 `(("python-pytz" ,python-pytz)))
7344 (native-inputs
7345 `(("python-nose" ,python-nose)))
7346 (home-page "https://github.com/kurtraschke/pyRFC3339")
7347 (synopsis "Python timestamp library")
7348 (description "Python library for generating and parsing RFC 3339-compliant
7349 timestamps.")
7350 (license license:expat)))
7351
7352 (define-public python2-pyrfc3339
7353 (package-with-python2 python-pyrfc3339))
7354
7355 (define-public python-werkzeug
7356 (package
7357 (name "python-werkzeug")
7358 (version "0.11.11")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "Werkzeug" version))
7363 (sha256
7364 (base32
7365 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7366 (build-system python-build-system)
7367 (native-inputs
7368 `(("python-pytest" ,python-pytest)))
7369 (home-page "http://werkzeug.pocoo.org/")
7370 (synopsis "Utilities for WSGI applications")
7371 (description "One of the most advanced WSGI utility modules. It includes a
7372 powerful debugger, full-featured request and response objects, HTTP utilities to
7373 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7374 uploads, a powerful URL routing system and a bunch of community-contributed
7375 addon modules.")
7376 (license license:x11)))
7377
7378 (define-public python2-werkzeug
7379 (package-with-python2 python-werkzeug))
7380
7381 (define-public python-configobj
7382 (package
7383 (name "python-configobj")
7384 (version "5.0.6")
7385 (source (origin
7386 (method url-fetch)
7387 (uri (string-append
7388 "https://pypi.python.org/packages/source/c/configobj/"
7389 "configobj-" version ".tar.gz"))
7390 (sha256
7391 (base32
7392 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7393 ;; Patch setup.py so it looks for python-setuptools, which is
7394 ;; required to parse the keyword 'install_requires' in setup.py.
7395 (patches (search-patches "python-configobj-setuptools.patch"))))
7396 (build-system python-build-system)
7397 (native-inputs
7398 `(("python-six" ,python-six)))
7399 (synopsis "Config file reading, writing and validation")
7400 (description "ConfigObj is a simple but powerful config file reader and
7401 writer: an ini file round tripper. Its main feature is that it is very easy to
7402 use, with a straightforward programmer’s interface and a simple syntax for
7403 config files.")
7404 (home-page "https://github.com/DiffSK/configobj")
7405 (license license:bsd-3)))
7406
7407 (define-public python2-configobj
7408 (package-with-python2 python-configobj))
7409
7410 (define-public python-configargparse
7411 (package
7412 (name "python-configargparse")
7413 (version "0.10.0")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (string-append
7417 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7418 "ConfigArgParse-" version ".tar.gz"))
7419 (sha256
7420 (base32
7421 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7422 (build-system python-build-system)
7423 (arguments
7424 ;; FIXME: Bug in test suite filed upstream:
7425 ;; https://github.com/bw2/ConfigArgParse/issues/32
7426 '(#:tests? #f))
7427 (synopsis "Replacement for argparse")
7428 (description "A drop-in replacement for argparse that allows options to also
7429 be set via config files and/or environment variables.")
7430 (home-page "https://github.com/bw2/ConfigArgParse")
7431 (license license:expat)))
7432
7433 (define-public python2-configargparse
7434 (package-with-python2 python-configargparse))
7435
7436 (define-public python-ndg-httpsclient
7437 (package
7438 (name "python-ndg-httpsclient")
7439 (version "0.4.0")
7440 (source (origin
7441 (method url-fetch)
7442 (uri (string-append
7443 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7444 "ndg_httpsclient-" version ".tar.gz"))
7445 (sha256
7446 (base32
7447 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7448 (build-system python-build-system)
7449 (arguments
7450 '(;; The tests appear to require networking.
7451 #:tests? #f))
7452 (propagated-inputs
7453 `(("python-pyopenssl" ,python-pyopenssl)))
7454 (synopsis "HTTPS support for Python's httplib and urllib2")
7455 (description "This is a HTTPS client implementation for httplib and urllib2
7456 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7457 over the default provided with Python and importantly enables full verification
7458 of the SSL peer.")
7459 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7460 (license license:bsd-3)))
7461
7462 ;; python2-openssl requires special care, so package-with-python2 is
7463 ;; insufficient.
7464 (define-public python2-ndg-httpsclient
7465 (package (inherit python-ndg-httpsclient)
7466 (name "python2-ndg-httpsclient")
7467 (arguments `(#:python ,python-2))
7468 (propagated-inputs
7469 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7470
7471 (define-public python-contextlib2
7472 (package
7473 (name "python-contextlib2")
7474 (version "0.4.0")
7475 (source
7476 (origin
7477 (method url-fetch)
7478 (uri (pypi-uri "contextlib2" version))
7479 (sha256
7480 (base32
7481 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7482 (build-system python-build-system)
7483 (arguments
7484 `(#:phases
7485 (modify-phases %standard-phases
7486 (replace 'check
7487 (lambda _ (zero?
7488 (system*
7489 "python" "test_contextlib2.py" "-v")))))))
7490 (home-page "http://contextlib2.readthedocs.org/")
7491 (synopsis "Tools for decorators and context managers")
7492 (description "This module is primarily a backport of the Python
7493 3.2 contextlib to earlier Python versions. Like contextlib, it
7494 provides utilities for common tasks involving decorators and context
7495 managers. It also contains additional features that are not part of
7496 the standard library.")
7497 (license license:psfl)))
7498
7499 (define-public python2-contextlib2
7500 (package-with-python2 python-contextlib2))
7501
7502 (define-public python-texttable
7503 (package
7504 (name "python-texttable")
7505 (version "0.8.4")
7506 (source
7507 (origin
7508 (method url-fetch)
7509 (uri (pypi-uri "texttable" version))
7510 (sha256
7511 (base32
7512 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7513 (build-system python-build-system)
7514 (arguments '(#:tests? #f)) ; no tests
7515 (home-page "https://github.com/foutaise/texttable/")
7516 (synopsis "Python module for creating simple ASCII tables")
7517 (description "Texttable is a Python module for creating simple ASCII
7518 tables.")
7519 (license license:lgpl2.1+)))
7520
7521 (define-public python2-texttable
7522 (package-with-python2 python-texttable))
7523
7524 (define-public python-websocket-client
7525 (package
7526 (name "python-websocket-client")
7527 (version "0.37.0")
7528 (source
7529 (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "websocket_client" version))
7532 (sha256
7533 (base32
7534 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7535 (build-system python-build-system)
7536 (native-inputs
7537 `(("python-six" ,python-six))) ; for tests
7538 (home-page "https://github.com/liris/websocket-client")
7539 (synopsis "WebSocket client for Python")
7540 (description "The Websocket-client module provides the low level APIs for
7541 WebSocket usage in Python programs.")
7542 (license license:lgpl2.1+)))
7543
7544 (define-public python2-websocket-client
7545 (package-with-python2 python-websocket-client))
7546
7547 (define-public python-atomicwrites
7548 (package
7549 (name "python-atomicwrites")
7550 (version "1.1.0")
7551 (source (origin
7552 (method url-fetch)
7553 (uri (pypi-uri "atomicwrites" version))
7554 (sha256
7555 (base32
7556 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7557 (build-system python-build-system)
7558 (synopsis "Atomic file writes in Python")
7559 (description "Library for atomic file writes using platform dependent tools
7560 for atomic file system operations.")
7561 (home-page "https://github.com/untitaker/python-atomicwrites")
7562 (license license:expat)))
7563
7564 (define-public python2-atomicwrites
7565 (package-with-python2 python-atomicwrites))
7566
7567 (define-public python-requests-toolbelt
7568 (package
7569 (name "python-requests-toolbelt")
7570 (version "0.6.2")
7571 (source (origin
7572 (method url-fetch)
7573 (uri (string-append
7574 "https://pypi.python.org/packages/"
7575 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7576 "requests-toolbelt-" version ".tar.gz"))
7577 (sha256
7578 (base32
7579 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7580 (build-system python-build-system)
7581 (native-inputs
7582 `(("python-betamax" ,python-betamax)
7583 ("python-mock" ,python-mock)
7584 ("python-pytest" ,python-pytest)))
7585 (propagated-inputs
7586 `(("python-requests" ,python-requests)))
7587 (synopsis "Extensions to python-requests")
7588 (description "This is a toolbelt of useful classes and functions to be used
7589 with python-requests.")
7590 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7591 (license license:asl2.0)))
7592
7593 (define-public python-click-threading
7594 (package
7595 (name "python-click-threading")
7596 (version "0.2.0")
7597 (source (origin
7598 (method url-fetch)
7599 (uri (string-append
7600 "https://pypi.python.org/packages/"
7601 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7602 "click-threading-" version ".tar.gz"))
7603 (sha256
7604 (base32
7605 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7606 (build-system python-build-system)
7607 (propagated-inputs
7608 `(("python-click" ,python-click)))
7609 (synopsis "Utilities for multithreading in Click")
7610 (description "This package provides utilities for multithreading in Click
7611 applications.")
7612 (home-page "https://github.com/click-contrib/click-threading")
7613 (license license:expat)))
7614
7615 (define-public python-click-log
7616 (package
7617 (name "python-click-log")
7618 (version "0.1.3")
7619 (source (origin
7620 (method url-fetch)
7621 (uri (pypi-uri "click-log" version))
7622 (sha256
7623 (base32
7624 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7625 (build-system python-build-system)
7626 (propagated-inputs
7627 `(("python-click" ,python-click)))
7628 (synopsis "Logging for click applications")
7629 (description "This package provides a Python library for logging Click
7630 applications.")
7631 (home-page "https://github.com/click-contrib/click-log")
7632 (license license:expat)))
7633
7634 (define-public python-apipkg
7635 (package
7636 (name "python-apipkg")
7637 (version "1.4")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (pypi-uri "apipkg" version))
7641 (sha256
7642 (base32
7643 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7644 (build-system python-build-system)
7645 (native-inputs
7646 `(("python-pytest" ,python-pytest)))
7647 (synopsis "Namespace control and lazy-import mechanism")
7648 (description "With apipkg you can control the exported namespace of a Python
7649 package and greatly reduce the number of imports for your users. It is a small
7650 pure Python module that works on virtually all Python versions.")
7651 (home-page "https://bitbucket.org/hpk42/apipkg")
7652 (license license:expat)))
7653
7654 (define-public python2-apipkg
7655 (package-with-python2 python-apipkg))
7656
7657 (define-public python-execnet
7658 (package
7659 (name "python-execnet")
7660 (version "1.4.1")
7661 (source (origin
7662 (method url-fetch)
7663 (uri (pypi-uri "execnet" version))
7664 (sha256
7665 (base32
7666 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7667 (build-system python-build-system)
7668 (arguments
7669 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7670 ;; The two test failures are caused by the lack of an `ssh` executable.
7671 ;; The test suite can be run with pytest after the 'install' phase.
7672 #:tests? #f))
7673 (native-inputs
7674 `(("python-pytest" ,python-pytest)
7675 ("python-setuptools-scm" ,python-setuptools-scm)))
7676 (propagated-inputs
7677 `(("python-apipkg" ,python-apipkg)))
7678 (synopsis "Rapid multi-Python deployment")
7679 (description "Execnet provides a share-nothing model with
7680 channel-send/receive communication for distributing execution across many
7681 Python interpreters across version, platform and network barriers. It has a
7682 minimal and fast API targetting the following uses:
7683 @enumerate
7684 @item distribute tasks to (many) local or remote CPUs
7685 @item write and deploy hybrid multi-process applications
7686 @item write scripts to administer multiple environments
7687 @end enumerate")
7688 (home-page "http://codespeak.net/execnet/")
7689 (license license:expat)))
7690
7691 (define-public python2-execnet
7692 (package-with-python2 python-execnet))
7693
7694 ;;; The software provided by this package was integrated into pytest 2.8.
7695 (define-public python-pytest-cache
7696 (package
7697 (name "python-pytest-cache")
7698 (version "1.0")
7699 (source (origin
7700 (method url-fetch)
7701 (uri (pypi-uri "pytest-cache" version))
7702 (sha256
7703 (base32
7704 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7705 (build-system python-build-system)
7706 (propagated-inputs
7707 `(("python-apipkg" ,python-apipkg)
7708 ("python-execnet" ,python-execnet)
7709 ("python-py" ,python-py)
7710 ("python-pytest" ,python-pytest)))
7711 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7712 (description "The pytest-cache plugin provides tools to rerun failures from
7713 the last py.test invocation.")
7714 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7715 (license license:expat)))
7716
7717 (define-public python2-pytest-cache
7718 (package-with-python2 python-pytest-cache))
7719
7720 (define-public python-pytest-localserver
7721 (package
7722 (name "python-pytest-localserver")
7723 (version "0.3.5")
7724 (source (origin
7725 (method url-fetch)
7726 (uri (pypi-uri "pytest-localserver" version))
7727 (sha256
7728 (base32
7729 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7730 (build-system python-build-system)
7731 (arguments
7732 `(#:phases (modify-phases %standard-phases
7733 (replace 'check
7734 (lambda _
7735 (zero? (system* "py.test" "--genscript=runtests.py"))
7736 (zero? (system* "py.test")))))))
7737 (native-inputs
7738 `(("python-pytest" ,python-pytest)
7739 ("python-requests" ,python-requests)
7740 ("python-six" ,python-six)))
7741 (propagated-inputs
7742 `(("python-werkzeug" ,python-werkzeug)))
7743 (synopsis "Py.test plugin to test server connections locally")
7744 (description "Pytest-localserver is a plugin for the pytest testing
7745 framework which enables you to test server connections locally.")
7746 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7747 (license license:expat)))
7748
7749 (define-public python-wsgi-intercept
7750 (package
7751 (name "python-wsgi-intercept")
7752 (version "1.2.2")
7753 (source (origin
7754 (method url-fetch)
7755 (uri (string-append
7756 "https://pypi.python.org/packages/"
7757 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7758 "wsgi_intercept-" version ".tar.gz"))
7759 (sha256
7760 (base32
7761 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7762 (build-system python-build-system)
7763 (native-inputs
7764 `(("python-pytest" ,python-pytest)
7765 ("python-six" ,python-six)
7766 ("python-urllib3" ,python-urllib3)))
7767 (propagated-inputs
7768 `(("python-httplib2" ,python-httplib2)
7769 ("python-requests" ,python-requests)))
7770 (synopsis "Puts a WSGI application in place of a real URI for testing")
7771 (description "Wsgi_intercept installs a WSGI application in place of a real
7772 URI for testing. Testing a WSGI application normally involves starting a
7773 server at a local host and port, then pointing your test code to that address.
7774 Instead, this library lets you intercept calls to any specific host/port
7775 combination and redirect them into a WSGI application importable by your test
7776 program. Thus, you can avoid spawning multiple processes or threads to test
7777 your Web app.")
7778 (home-page "https://github.com/cdent/wsgi-intercept")
7779 (license license:expat)))
7780
7781 (define-public python-pytest-xprocess
7782 (package
7783 (name "python-pytest-xprocess")
7784 (version "0.9.1")
7785 (source (origin
7786 (method url-fetch)
7787 (uri (pypi-uri "pytest-xprocess" version))
7788 (sha256
7789 (base32
7790 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7791 (build-system python-build-system)
7792 (propagated-inputs
7793 `(("python-pytest" ,python-pytest)
7794 ("python-pytest-cache" ,python-pytest-cache)
7795 ("python-psutil" ,python-psutil)))
7796 (synopsis "Pytest plugin to manage external processes across test runs")
7797 (description "Pytest-xprocess is an experimental py.test plugin for managing
7798 processes across test runs.")
7799 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7800 (license license:expat)))
7801
7802 (define-public python-icalendar
7803 (package
7804 (name "python-icalendar")
7805 (version "3.10")
7806 (source (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "icalendar" version))
7809 (sha256
7810 (base32
7811 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7812 (build-system python-build-system)
7813 (propagated-inputs
7814 `(("python-dateutil-2" ,python-dateutil-2)
7815 ("python-pytz" ,python-pytz)))
7816 (synopsis "Python library for parsing iCalendar files")
7817 (description "The icalendar package is a parser/generator of iCalendar
7818 files for use with Python.")
7819 (home-page "https://github.com/collective/icalendar")
7820 (license license:bsd-2)))
7821
7822 (define-public python-sphinxcontrib-newsfeed
7823 (package
7824 (name "python-sphinxcontrib-newsfeed")
7825 (version "0.1.4")
7826 (source (origin
7827 (method url-fetch)
7828 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7829 (sha256
7830 (base32
7831 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7832 (build-system python-build-system)
7833 (propagated-inputs
7834 `(("python-docutils" ,python-docutils)
7835 ("python-sphinx" ,python-sphinx)))
7836 (synopsis "News Feed extension for Sphinx")
7837 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7838 Blog, News or Announcements section to a Sphinx website.")
7839 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7840 (license license:bsd-2)))
7841
7842 (define-public python-args
7843 (package
7844 (name "python-args")
7845 (version "0.1.0")
7846 (source (origin
7847 (method url-fetch)
7848 (uri (pypi-uri "args" version))
7849 (sha256
7850 (base32
7851 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7852 (build-system python-build-system)
7853 (home-page "https://github.com/kennethreitz/args")
7854 (synopsis "Command-line argument parser")
7855 (description
7856 "This library provides a Python module to parse command-line arguments.")
7857 (license license:bsd-3)))
7858
7859 (define-public python2-args
7860 (package-with-python2 python-args))
7861
7862 (define-public python-clint
7863 (package
7864 (name "python-clint")
7865 (version "0.5.1")
7866 (source (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "clint" version))
7869 (sha256
7870 (base32
7871 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7872 (build-system python-build-system)
7873 (propagated-inputs
7874 `(("python-args" ,python-args)))
7875 (home-page "https://github.com/kennethreitz/clint")
7876 (synopsis "Command-line interface tools")
7877 (description
7878 "Clint is a Python module filled with a set of tools for developing
7879 command-line applications, including tools for colored and indented
7880 output, progress bar display, and pipes.")
7881 (license license:isc)))
7882
7883 (define-public python2-clint
7884 (package-with-python2 python-clint))
7885
7886 (define-public python-astor
7887 (package
7888 (name "python-astor")
7889 (version "0.5")
7890 (source (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "astor" version))
7893 (sha256
7894 (base32
7895 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7896 (build-system python-build-system)
7897 (home-page "https://github.com/berkerpeksag/astor")
7898 (synopsis "Read and write Python ASTs")
7899 (description
7900 "Astor is designed to allow easy manipulation of Python source via the
7901 Abstract Syntax Tree.")
7902 (license license:bsd-3)))
7903
7904 (define-public python2-astor
7905 (package-with-python2 python-astor))
7906
7907 (define-public python-rply
7908 (package
7909 (name "python-rply")
7910 (version "0.7.4")
7911 (source (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "rply" version))
7914 (sha256
7915 (base32
7916 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7917 (build-system python-build-system)
7918 (propagated-inputs
7919 `(("python-appdirs" ,python-appdirs)))
7920 (home-page "https://github.com/alex/rply")
7921 (synopsis "Parser generator for Python")
7922 (description
7923 "This package provides a pure Python based parser generator, that also
7924 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7925 with a new public API, and RPython support.")
7926 (license license:bsd-3)))
7927
7928 (define-public python2-rply
7929 (package-with-python2 python-rply))
7930
7931 (define-public python-hy
7932 (package
7933 (name "python-hy")
7934 (version "0.11.1")
7935 (source (origin
7936 (method url-fetch)
7937 (uri (pypi-uri "hy" version))
7938 (sha256
7939 (base32
7940 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7941 (build-system python-build-system)
7942 (propagated-inputs
7943 `(("python-astor" ,python-astor)
7944 ("python-clint" ,python-clint)
7945 ("python-rply" ,python-rply)))
7946 (home-page "http://hylang.org/")
7947 (synopsis "Lisp frontend to Python")
7948 (description
7949 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7950 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7951 Python at your fingertips, in Lisp form.")
7952 (license license:expat)))
7953
7954 (define-public python2-hy
7955 (package-with-python2 python-hy))
7956
7957 (define-public python-rauth
7958 (package
7959 (name "python-rauth")
7960 (version "0.7.2")
7961 (source
7962 (origin
7963 (method url-fetch)
7964 (uri (pypi-uri "rauth" version))
7965 (sha256
7966 (base32
7967 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7968 (build-system python-build-system)
7969 (arguments
7970 `(#:test-target "check"))
7971 (propagated-inputs
7972 `(("python-requests" ,python-requests)))
7973 (home-page "https://github.com/litl/rauth")
7974 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7975 (description
7976 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7977 provides service wrappers for convenient connection initialization and
7978 authenticated session objects providing things like keep-alive.")
7979 (license license:expat)
7980 (properties `((python2-variant . ,(delay python2-rauth))))))
7981
7982 (define-public python2-rauth
7983 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7984 (package
7985 (inherit base)
7986 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7987 ,@(package-native-inputs base))))))
7988
7989 (define-public python2-functools32
7990 (package
7991 (name "python2-functools32")
7992 (version "3.2.3-2")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "functools32" version))
7997 (sha256
7998 (base32
7999 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8000 (build-system python-build-system)
8001 (arguments
8002 `(#:python ,python-2
8003 #:tests? #f)) ; no test target
8004 (home-page "https://github.com/MiCHiLU/python-functools32")
8005 (synopsis
8006 "Backport of the functools module from Python 3.2.3")
8007 (description
8008 "This package is a backport of the @code{functools} module from Python
8009 3.2.3 for use with older versions of Python and PyPy.")
8010 (license license:expat)))
8011
8012 (define-public python2-futures
8013 (package
8014 (name "python2-futures")
8015 (version "3.0.3")
8016 (source
8017 (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "futures" version))
8020 (sha256
8021 (base32
8022 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8023 (build-system python-build-system)
8024 (arguments `(#:python ,python-2))
8025 (home-page "https://github.com/agronholm/pythonfutures")
8026 (synopsis
8027 "Backport of the concurrent.futures package from Python 3.2")
8028 (description
8029 "The concurrent.futures module provides a high-level interface for
8030 asynchronously executing callables. This package backports the
8031 concurrent.futures package from Python 3.2")
8032 (license license:bsd-3)))
8033
8034 (define-public python-promise
8035 (package
8036 (name "python-promise")
8037 (version "0.4.2")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "promise" version))
8042 (sha256
8043 (base32
8044 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8045 (build-system python-build-system)
8046 ;; Tests wants python-futures, which is a python2 only program, and
8047 ;; can't be found by python-promise at test time.
8048 (arguments `(#:tests? #f))
8049 (home-page "https://github.com/syrusakbary/promise")
8050 (synopsis "Promises/A+ implementation for Python")
8051 (description
8052 "Promises/A+ implementation for Python")
8053 (properties `((python2-variant . ,(delay python2-promise))))
8054 (license license:expat)))
8055
8056 (define-public python2-promise
8057 (let ((promise (package-with-python2
8058 (strip-python2-variant python-promise))))
8059 (package (inherit promise)
8060 (arguments (substitute-keyword-arguments (package-arguments promise)
8061 ((#:tests? _) #t)))
8062 (native-inputs
8063 `(("python2-futures" ,python2-futures)
8064 ("python2-pytest" ,python2-pytest)
8065 ,@(package-native-inputs promise))))))
8066
8067 (define-public python-urllib3
8068 (package
8069 (name "python-urllib3")
8070 (version "1.18.1")
8071 (source
8072 (origin
8073 (method url-fetch)
8074 (uri (pypi-uri "urllib3" version))
8075 (sha256
8076 (base32
8077 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8078 (build-system python-build-system)
8079 (arguments `(#:tests? #f))
8080 (native-inputs
8081 `(;; some packages for tests
8082 ("python-nose" ,python-nose)
8083 ("python-mock" ,python-mock)
8084 ("python-tornado" ,python-tornado)))
8085 (propagated-inputs
8086 `(;; packages for https security
8087 ("python-certifi" ,python-certifi)
8088 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8089 ("python-pyasn1" ,python-pyasn1)
8090 ("python-pyopenssl" ,python-pyopenssl)))
8091 (home-page "https://urllib3.readthedocs.org/")
8092 (synopsis "HTTP library with thread-safe connection pooling")
8093 (description
8094 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8095 can reuse the same socket connection for multiple requests, it can POST files,
8096 supports url redirection and retries, and also gzip and deflate decoding.")
8097 (license license:expat)))
8098
8099 (define-public python2-urllib3
8100 (package-with-python2 python-urllib3))
8101
8102 (define-public python-colorama
8103 (package
8104 (name "python-colorama")
8105 (version "0.3.3")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "colorama" version))
8110 (sha256
8111 (base32
8112 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8113 (build-system python-build-system)
8114 (synopsis "colored terminal text rendering for Python")
8115 (description "Colorama is a Python library for rendering colored terminal
8116 text.")
8117 (home-page "https://pypi.python.org/pypi/colorama")
8118 (license license:bsd-3)))
8119
8120 (define-public python2-colorama
8121 (package-with-python2 python-colorama))
8122
8123 (define-public python-rsa
8124 (package
8125 (name "python-rsa")
8126 (version "3.4.2")
8127 (source
8128 (origin
8129 (method url-fetch)
8130 (uri (pypi-uri "rsa" version))
8131 (sha256
8132 (base32
8133 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8134 (build-system python-build-system)
8135 (propagated-inputs
8136 `(("python-pyasn1" ,python-pyasn1)))
8137 (synopsis "Pure-Python RSA implementation")
8138 (description "Python-RSA is a pure-Python RSA implementation. It supports
8139 encryption and decryption, signing and verifying signatures, and key
8140 generation according to PKCS#1 version 1.5. It can be used as a Python
8141 library as well as on the command line.")
8142 (home-page "http://stuvel.eu/rsa")
8143 (license license:asl2.0)))
8144
8145 (define-public python2-rsa
8146 (package-with-python2 python-rsa))
8147
8148 (define-public python-pluggy
8149 (package
8150 (name "python-pluggy")
8151 (version "0.3.1")
8152 (source
8153 (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "pluggy" version))
8156 (sha256
8157 (base32
8158 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8159 (build-system python-build-system)
8160 (synopsis "Plugin and hook calling mechanism for Python")
8161 (description "Pluggy is an extraction of the plugin manager as used by
8162 Pytest but stripped of Pytest specific details.")
8163 (home-page "https://pypi.python.org/pypi/pluggy")
8164 (license license:expat)))
8165
8166 (define-public python2-pluggy
8167 (package-with-python2 python-pluggy))
8168
8169 (define-public python-tox
8170 (package
8171 (name "python-tox")
8172 (version "2.3.1")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "tox" version))
8177 (sha256
8178 (base32
8179 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8180 (build-system python-build-system)
8181 (arguments
8182 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8183 ;; pytest breaks other packages.
8184 '(#:tests? #f))
8185 (propagated-inputs
8186 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8187 ("python-py" ,python-py)
8188 ("python-virtualenv" ,python-virtualenv)))
8189 (native-inputs
8190 `(("python-pytest" ,python-pytest))) ; >= 2.3.5
8191 (home-page "http://tox.testrun.org/")
8192 (synopsis "Virtualenv-based automation of test activities")
8193 (description "Tox is a generic virtualenv management and test command line
8194 tool. It can be used to check that a package installs correctly with
8195 different Python versions and interpreters, or run tests in each type of
8196 supported environment, or act as a frontend to continuous integration
8197 servers.")
8198 (license license:expat)))
8199
8200 (define-public python2-tox
8201 (package-with-python2 python-tox))
8202
8203 (define-public python-jmespath
8204 (package
8205 (name "python-jmespath")
8206 (version "0.9.0")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "jmespath" version))
8211 (sha256
8212 (base32
8213 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8214 (build-system python-build-system)
8215 (synopsis "JSON Matching Expressions")
8216 (description "JMESPath (pronounced “james path”) is a Python library that
8217 allows one to declaratively specify how to extract elements from a JSON
8218 document.")
8219 (home-page "https://github.com/jmespath/jmespath.py")
8220 (license license:expat)))
8221
8222 (define-public python2-jmespath
8223 (package-with-python2 python-jmespath))
8224
8225 (define-public python-botocore
8226 (package
8227 (name "python-botocore")
8228 (version "1.4.62")
8229 (source
8230 (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "botocore" version))
8233 (sha256
8234 (base32
8235 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8236 (build-system python-build-system)
8237 (propagated-inputs
8238 `(("python-dateutil" ,python-dateutil-2)
8239 ("python-docutils" ,python-docutils)
8240 ("python-jmespath" ,python-jmespath)))
8241 (inputs
8242 `(("python-mock" ,python-mock)
8243 ("python-nose" ,python-nose)
8244 ("behave" ,behave)
8245 ("python-tox" ,python-tox)
8246 ("python-wheel" ,python-wheel)))
8247 (home-page "https://github.com/boto/botocore")
8248 (synopsis "Low-level interface to AWS")
8249 (description "Botocore is a Python library that provides a low-level
8250 interface to the Amazon Web Services (AWS) API.")
8251 (license license:asl2.0)))
8252
8253 (define-public python2-botocore
8254 (package-with-python2 python-botocore))
8255
8256 (define-public awscli
8257 (package
8258 (name "awscli")
8259 (version "1.11.5")
8260 (source
8261 (origin
8262 (method url-fetch)
8263 (uri (pypi-uri name version))
8264 (sha256
8265 (base32
8266 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8267 (build-system python-build-system)
8268 (propagated-inputs
8269 `(("python-colorama" ,python-colorama)
8270 ("python-botocore" ,python-botocore)
8271 ("python-s3transfer" ,python-s3transfer)
8272 ("python-docutils" ,python-docutils)
8273 ("python-rsa" ,python-rsa)))
8274 (inputs
8275 `(("python-mock" ,python-mock)
8276 ("python-nose" ,python-nose)
8277 ("python-sphinx" ,python-sphinx)
8278 ("python-tox" ,python-tox)
8279 ("python-wheel" ,python-wheel)))
8280 (home-page "http://aws.amazon.com/cli/")
8281 (synopsis "Command line client for AWS")
8282 (description "AWS CLI provides a unified command line interface to the
8283 Amazon Web Services (AWS) API.")
8284 (license license:asl2.0)))
8285
8286 (define-public python-hypothesis
8287 (package
8288 (name "python-hypothesis")
8289 (version "3.1.0")
8290 (source (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "hypothesis" version))
8293 (sha256
8294 (base32
8295 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8296 (build-system python-build-system)
8297 (propagated-inputs
8298 `(("python-flake8" ,python-flake8)
8299 ("python-pytest" ,python-pytest)))
8300 (synopsis "Library for property based testing")
8301 (description "Hypothesis is a library for testing your Python code against a
8302 much larger range of examples than you would ever want to write by hand. It’s
8303 based on the Haskell library, Quickcheck, and is designed to integrate
8304 seamlessly into your existing Python unit testing work flow.")
8305 (home-page "https://github.com/DRMacIver/hypothesis")
8306 (license license:mpl2.0)
8307 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8308
8309 (define-public python2-hypothesis
8310 (let ((hypothesis (package-with-python2
8311 (strip-python2-variant python-hypothesis))))
8312 (package (inherit hypothesis)
8313 (native-inputs
8314 `(("python2-enum34" ,python2-enum34))))))
8315
8316 (define-public python-pytest-subtesthack
8317 (package
8318 (name "python-pytest-subtesthack")
8319 (version "0.1.1")
8320 (source (origin
8321 (method url-fetch)
8322 (uri (pypi-uri "pytest-subtesthack" version))
8323 (sha256
8324 (base32
8325 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8326 (build-system python-build-system)
8327 (propagated-inputs
8328 `(("python-pytest" ,python-pytest)))
8329 (synopsis "Set-up and tear-down fixtures for unit tests")
8330 (description "This plugin allows you to set up and tear down fixtures within
8331 unit test functions that use @code{py.test}. This is useful for using
8332 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8333 function multiple times, without setting up or tearing down fixture state as is
8334 normally the case.")
8335 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8336 (license license:unlicense)))
8337
8338 (define-public python2-pytest-subtesthack
8339 (package-with-python2 python-pytest-subtesthack))
8340
8341 (define-public python2-xdo
8342 (package
8343 (name "python2-xdo")
8344 (version "0.2")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (string-append
8348 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8349 "python-xdo_" version ".orig.tar.gz"))
8350 (sha256
8351 (base32
8352 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8353 (build-system python-build-system)
8354 (arguments
8355 `(#:python ,python-2
8356 #:tests? #f)) ; no tests provided
8357 (inputs
8358 `(("xdotool" ,xdotool)
8359 ("libX11" ,libx11)))
8360 (home-page "https://tracker.debian.org/pkg/python-xdo")
8361 (synopsis "Python library for simulating X11 keyboard/mouse input")
8362 (description "Provides bindings to libxdo for manipulating X11 via simulated
8363 input. (Note that this is mostly a legacy library; you may wish to look at
8364 python-xdo for newer bindings.)")
8365 (license license:bsd-3)))
8366
8367 (define-public python-wtforms
8368 (package
8369 (name "python-wtforms")
8370 (version "2.1")
8371 (source
8372 (origin
8373 (method url-fetch)
8374 (uri (pypi-uri "WTForms" version ".zip"))
8375 (sha256
8376 (base32
8377 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8378 (build-system python-build-system)
8379 (arguments
8380 '(#:phases
8381 (modify-phases %standard-phases
8382 (add-after 'unpack 'remove-django-test
8383 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8384 (lambda _
8385 (substitute*
8386 "tests/runtests.py"
8387 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8388 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8389 #t)))))
8390 (native-inputs
8391 `(("unzip" ,unzip)))
8392 (home-page "http://wtforms.simplecodes.com/")
8393 (synopsis
8394 "Form validation and rendering library for Python web development")
8395 (description
8396 "WTForms is a flexible forms validation and rendering library
8397 for Python web development. It is very similar to the web form API
8398 available in Django, but is a standalone package.")
8399 (license license:bsd-3)))
8400
8401 (define-public python2-wtforms
8402 (package-with-python2 python-wtforms))
8403
8404 (define-public python-mako
8405 (package
8406 (name "python-mako")
8407 (version "1.0.3")
8408 (source
8409 (origin
8410 (method url-fetch)
8411 (uri (pypi-uri "Mako" version))
8412 (sha256
8413 (base32
8414 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8415 (build-system python-build-system)
8416 (propagated-inputs
8417 `(("python-markupsafe" ,python-markupsafe)))
8418 (native-inputs
8419 `(("python-mock" ,python-mock)
8420 ("python-nose" ,python-nose)))
8421 (home-page "http://www.makotemplates.org/")
8422 (synopsis "Templating language for Python")
8423 (description "Mako is a templating language for Python that compiles
8424 templates into Python modules.")
8425 (license license:expat)))
8426
8427 (define-public python2-mako
8428 (package-with-python2 python-mako))
8429
8430 (define-public python-waitress
8431 (package
8432 (name "python-waitress")
8433 (version "0.8.10")
8434 (source
8435 (origin
8436 (method url-fetch)
8437 (uri (pypi-uri "waitress" version))
8438 (sha256
8439 (base32
8440 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8441 (build-system python-build-system)
8442 (home-page "https://github.com/Pylons/waitress")
8443 (synopsis "Waitress WSGI server")
8444 (description "Waitress is meant to be a production-quality pure-Python WSGI
8445 server with very acceptable performance.")
8446 (license license:zpl2.1)))
8447
8448 (define-public python2-waitress
8449 (package-with-python2 python-waitress))
8450
8451 (define-public python-wsgiproxy2
8452 (package
8453 (name "python-wsgiproxy2")
8454 (version "0.4.2")
8455 (source
8456 (origin
8457 (method url-fetch)
8458 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8459 (sha256
8460 (base32
8461 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8462 (build-system python-build-system)
8463 (arguments
8464 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8465 ;; support Python 3:
8466 ;; https://github.com/benoitc/restkit/issues/140
8467 #:tests? #f))
8468 (native-inputs
8469 `(("unzip" ,unzip)
8470 ("python-nose" ,python-nose)
8471 ("python-coverage" ,python-coverage)))
8472 (propagated-inputs
8473 `(("python-six" ,python-six)
8474 ("python-webob" ,python-webob)))
8475 (home-page
8476 "https://github.com/gawel/WSGIProxy2/")
8477 (synopsis "WSGI Proxy with various http client backends")
8478 (description "WSGI turns HTTP requests into WSGI function calls.
8479 WSGIProxy turns WSGI function calls into HTTP requests.
8480 It also includes code to sign requests and pass private data,
8481 and to spawn subprocesses to handle requests.")
8482 (license license:expat)))
8483
8484 (define-public python2-wsgiproxy2
8485 (package-with-python2 python-wsgiproxy2))
8486
8487 (define-public python-pastedeploy
8488 (package
8489 (name "python-pastedeploy")
8490 (version "1.5.2")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "PasteDeploy" version))
8495 (sha256
8496 (base32
8497 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8498 (build-system python-build-system)
8499 (native-inputs
8500 `(("python-nose" ,python-nose)))
8501 ;; Note: setuptools used at runtime for pkg_resources
8502 (home-page "http://pythonpaste.org/deploy/")
8503 (synopsis
8504 "Load, configure, and compose WSGI applications and servers")
8505 (description
8506 "This tool provides code to load WSGI applications and servers from URIs;
8507 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8508 Script provides commands to serve applications based on this configuration
8509 file.")
8510 (license license:expat)))
8511
8512 (define-public python2-pastedeploy
8513 (package-with-python2 python-pastedeploy))
8514
8515 (define-public python-paste
8516 (package
8517 (name "python-paste")
8518 (version "2.0.2")
8519 (source
8520 (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "Paste" version))
8523 (sha256
8524 (base32
8525 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8526 (patches (search-patches "python-paste-remove-website-test.patch"
8527 "python-paste-remove-timing-test.patch"))))
8528 (build-system python-build-system)
8529 (native-inputs
8530 `(("python-nose" ,python-nose)))
8531 ;; Note: setuptools used at runtime for pkg_resources
8532 (propagated-inputs
8533 `(("python-six" ,python-six)))
8534 (arguments
8535 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8536 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8537 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8538 ;; still... things should be better by the next Paste release.)
8539 #:tests? #f))
8540 (home-page "http://pythonpaste.org")
8541 (synopsis
8542 "Python web development tools, focusing on WSGI")
8543 (description
8544 "Paste provides a variety of web development tools and middleware which
8545 can be nested together to build web applications. Paste's design closely
8546 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8547 (license license:expat)
8548 (properties `((python2-variant . ,(delay python2-paste))))))
8549
8550 (define-public python2-paste
8551 (let ((paste (package-with-python2
8552 (strip-python2-variant python-paste))))
8553 (package
8554 (inherit paste)
8555 (arguments
8556 ;; Tests are back for Python 2!
8557 `(#:tests? #t
8558 ,@(package-arguments paste))))))
8559
8560 (define-public python-pastescript
8561 (package
8562 (name "python-pastescript")
8563 (version "2.0.2")
8564 (source
8565 (origin
8566 (method url-fetch)
8567 (uri (pypi-uri "PasteScript" version))
8568 (sha256
8569 (base32
8570 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8571 (build-system python-build-system)
8572 (native-inputs
8573 `(("python-nose" ,python-nose)))
8574 ;; Note: setuptools used at runtime for pkg_resources
8575 (propagated-inputs
8576 `(("python-paste" ,python-paste)
8577 ("python-pastedeploy" ,python-pastedeploy)))
8578 (home-page "http://pythonpaste.org/script/")
8579 (arguments
8580 '(;; Unfortunately, this requires the latest unittest2,
8581 ;; but that requires traceback2 which requires linecache2 which requires
8582 ;; unittest2. So we're skipping tests for now.
8583 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8584 ;; so in theory we could get around this situation somehow.)
8585 #:tests? #f))
8586 (synopsis
8587 "Pluggable command line tool for serving web applications and more")
8588 (description
8589 "PasteScript is a plugin-friendly command line tool which provides a
8590 variety of features, from launching web applications to bootstrapping project
8591 layouts.")
8592 (license license:expat)))
8593
8594 (define-public python2-pastescript
8595 (package-with-python2 python-pastescript))
8596
8597 (define-public python-pyquery
8598 (package
8599 (name "python-pyquery")
8600 (version "1.2.13")
8601 (source
8602 (origin
8603 (method url-fetch)
8604 (uri (pypi-uri "pyquery" version))
8605 (sha256
8606 (base32
8607 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8608 (build-system python-build-system)
8609 (native-inputs
8610 `(("python-webob" ,python-webob)
8611 ("python-webtest" ,python-webtest)))
8612 (propagated-inputs
8613 `(("python-lxml" ,python-lxml)
8614 ("python-cssselect" ,python-cssselect)))
8615 (home-page "https://github.com/gawel/pyquery")
8616 (synopsis "Make jQuery-like queries on xml documents")
8617 (description "pyquery allows you to make jQuery queries on xml documents.
8618 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8619 fast xml and html manipulation.")
8620 (license license:bsd-3)))
8621
8622 (define-public python2-pyquery
8623 (package-with-python2 python-pyquery))
8624
8625 (define-public python-webtest
8626 (package
8627 (name "python-webtest")
8628 (version "2.0.20")
8629 (source
8630 (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "WebTest" version))
8633 (sha256
8634 (base32
8635 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8636 (build-system python-build-system)
8637 (arguments
8638 `(;; Unfortunately we have to disable tests!
8639 ;; This release of WebTest is pinned to python-nose < 1.3,
8640 ;; but older versions of python-nose are plagued with the following
8641 ;; bug(s), which rears its ugly head during test execution:
8642 ;; https://github.com/nose-devs/nose/issues/759
8643 ;; https://github.com/nose-devs/nose/pull/811
8644 #:tests? #f))
8645 ;; Commented out code is no good, but in this case, once tests
8646 ;; are ready to be enabled again, we should put the following
8647 ;; in place:
8648 ;; (native-inputs
8649 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8650 ;; ; but see above comment
8651 ;; ("python-coverage" ,python-coverage)
8652 ;; ("python-mock" ,python-mock)
8653 ;; ("python-pastedeploy" ,python-pastedeploy)
8654 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8655 ;; ("python-pyquery" ,python-pyquery)))
8656 (propagated-inputs
8657 `(("python-waitress" ,python-waitress)
8658 ("python-webob" ,python-webob)
8659 ("python-six" ,python-six)
8660 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8661 (home-page "http://webtest.pythonpaste.org/")
8662 (synopsis "Helper to test WSGI applications")
8663 (description "Webtest allows you to test your Python web applications
8664 without starting an HTTP server. It supports anything that supports the
8665 minimum of WSGI.")
8666 (license license:expat)))
8667
8668 (define-public python2-webtest
8669 (package-with-python2 python-webtest))
8670
8671 (define-public python-anyjson
8672 (package
8673 (name "python-anyjson")
8674 (version "0.3.3")
8675 (source
8676 (origin
8677 (method url-fetch)
8678 (uri (pypi-uri "anyjson" version))
8679 (sha256
8680 (base32
8681 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8682 (build-system python-build-system)
8683 (arguments
8684 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8685 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8686 ;; whatever) so this transformation needs to be done before the tests
8687 ;; can be run. Maybe we could add a build step to transform beforehand
8688 ;; but it could be annoying/difficult.
8689 ;; We can enable tests for the Python 2 version, though, and do below.
8690 #:tests? #f))
8691 (home-page "http://bitbucket.org/runeh/anyjson/")
8692 (synopsis
8693 "Wraps best available JSON implementation in a common interface")
8694 (description
8695 "Anyjson loads whichever is the fastest JSON module installed
8696 and provides a uniform API regardless of which JSON implementation is used.")
8697 (license license:bsd-3)
8698 (properties `((python2-variant . ,(delay python2-anyjson))))))
8699
8700 (define-public python2-anyjson
8701 (let ((anyjson (package-with-python2
8702 (strip-python2-variant python-anyjson))))
8703 (package
8704 (inherit anyjson)
8705 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8706 #:tests? #t
8707 ,@(package-arguments anyjson)))
8708 (native-inputs `(("python2-nose" ,python2-nose))))))
8709
8710 (define-public python-amqp
8711 (package
8712 (name "python-amqp")
8713 (version "1.4.9")
8714 (source
8715 (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "amqp" version))
8718 (sha256
8719 (base32
8720 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8721 (build-system python-build-system)
8722 (native-inputs
8723 `(("python-nose" ,python-nose)
8724 ("python-mock" ,python-mock)))
8725 (home-page "http://github.com/celery/py-amqp")
8726 (synopsis
8727 "Low-level AMQP client for Python (fork of amqplib)")
8728 (description
8729 "This is a fork of amqplib which was originally written by Barry Pederson.
8730 It is maintained by the Celery project, and used by kombu as a pure python
8731 alternative when librabbitmq is not available.")
8732 (license license:lgpl2.1+)
8733 (properties `((python2-variant . ,(delay python2-amqp))))))
8734
8735 (define-public python2-amqp
8736 (let ((amqp (package-with-python2
8737 (strip-python2-variant python-amqp))))
8738 (package
8739 (inherit amqp)
8740 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8741 ;; unmaintained. Weirdly, does not do this on the python 3
8742 ;; version?
8743 #:tests? #f
8744 ,@(package-arguments amqp))))))
8745
8746 (define-public python-kombu
8747 (package
8748 (name "python-kombu")
8749 (version "3.0.37")
8750 (source
8751 (origin
8752 (method url-fetch)
8753 (uri (pypi-uri "kombu" version))
8754 (sha256
8755 (base32
8756 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8757 (build-system python-build-system)
8758 (native-inputs
8759 `(("python-mock" ,python-mock)
8760 ("python-nose" ,python-nose)))
8761 (propagated-inputs
8762 `(("python-anyjson" ,python-anyjson)
8763 ("python-amqp" ,python-amqp)
8764 ("python-redis" ,python-redis)))
8765 (home-page "http://kombu.readthedocs.org")
8766 (synopsis "Message passing library for Python")
8767 (description "The aim of Kombu is to make messaging in Python as easy as
8768 possible by providing an idiomatic high-level interface for the AMQ protocol,
8769 and also provide proven and tested solutions to common messaging problems.
8770 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8771 message orientation, queuing, routing, reliability and security, for which the
8772 RabbitMQ messaging server is the most popular implementation.")
8773 (license license:bsd-3)
8774 (properties `((python2-variant . ,(delay python2-kombu))))))
8775
8776 (define-public python2-kombu
8777 (let ((kombu (package-with-python2
8778 (strip-python2-variant python-kombu))))
8779 (package
8780 (inherit kombu)
8781 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8782 ,@(package-native-inputs kombu))))))
8783
8784 (define-public python-billiard
8785 (package
8786 (name "python-billiard")
8787 (version "3.3.0.23")
8788 (source
8789 (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "billiard" version))
8792 (sha256
8793 (base32
8794 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8795 (build-system python-build-system)
8796 (native-inputs
8797 `(("python-nose" ,python-nose)))
8798 (home-page "http://github.com/celery/billiard")
8799 (synopsis
8800 "Python multiprocessing fork with improvements and bugfixes")
8801 (description
8802 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8803 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8804 pyprocessing package. This standalone variant is intended to be compatible with
8805 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8806 (license license:bsd-3)
8807 (properties `((python2-variant . ,(delay python2-billiard))))))
8808
8809 (define-public python2-billiard
8810 (let ((billiard (package-with-python2
8811 (strip-python2-variant python-billiard))))
8812 (package
8813 (inherit billiard)
8814 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8815 ("python2-mock" ,python2-mock)
8816 ,@(package-native-inputs billiard))))))
8817
8818 (define-public python-celery
8819 (package
8820 (name "python-celery")
8821 (version "3.1.24")
8822 (source
8823 (origin
8824 (method url-fetch)
8825 (uri (pypi-uri "celery" version))
8826 (sha256
8827 (base32
8828 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8829 (build-system python-build-system)
8830 (arguments
8831 `(#:phases
8832 (modify-phases %standard-phases
8833 ;; These tests break with Python 3.5:
8834 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8835 (replace 'check
8836 (lambda _
8837 (zero?
8838 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8839 (native-inputs
8840 `(("python-nose" ,python-nose)))
8841 (propagated-inputs
8842 `(("python-pytz" ,python-pytz)
8843 ("python-amqp" ,python-amqp)
8844 ("python-anyjson" ,python-anyjson)
8845 ("python-billiard" ,python-billiard)
8846 ("python-kombu" ,python-kombu)))
8847 (home-page "http://celeryproject.org")
8848 (synopsis "Distributed Task Queue")
8849 (description "Celery is an asynchronous task queue/job queue based on
8850 distributed message passing. It is focused on real-time operation, but
8851 supports scheduling as well. The execution units, called tasks, are executed
8852 concurrently on a single or more worker servers using multiprocessing,
8853 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8854 synchronously (wait until ready).")
8855 (license license:bsd-3)
8856 (properties `((python2-variant . ,(delay python2-celery))))))
8857
8858 (define-public python2-celery
8859 (let ((celery (package-with-python2
8860 (strip-python2-variant python-celery))))
8861 (package
8862 (inherit celery)
8863 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8864 ("python2-mock" ,python2-mock)
8865 ,@(package-native-inputs celery))))))
8866
8867 (define-public python-translitcodec
8868 (package
8869 (name "python-translitcodec")
8870 (version "0.4.0")
8871 (source
8872 (origin
8873 (method url-fetch)
8874 (uri (pypi-uri "translitcodec" version))
8875 (sha256
8876 (base32
8877 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8878 (build-system python-build-system)
8879 (arguments
8880 `(#:tests? #f)) ; no tests provided
8881 (home-page
8882 "https://github.com/claudep/translitcodec")
8883 (synopsis
8884 "Unicode to 8-bit charset transliteration codec")
8885 (description
8886 "This package contains codecs for transliterating ISO 10646 texts into
8887 best-effort representations using smaller coded character sets (ASCII,
8888 ISO 8859, etc.).")
8889 (license license:expat)))
8890
8891 (define-public python2-translitcodec
8892 (package-with-python2 python-translitcodec))
8893
8894 (define-public python-editor
8895 (package
8896 (name "python-editor")
8897 (version "0.5")
8898 (source
8899 (origin
8900 (method url-fetch)
8901 (uri (pypi-uri "python-editor" version))
8902 (sha256
8903 (base32
8904 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8905 (build-system python-build-system)
8906 (home-page
8907 "https://github.com/fmoo/python-editor")
8908 (synopsis
8909 "Programmatically open an editor, capture the result")
8910 (description
8911 "python-editor is a library that provides the editor module for
8912 programmatically interfacing with your system's $EDITOR.")
8913 (license license:asl2.0)))
8914
8915 (define-public python2-editor
8916 (package-with-python2 python-editor))
8917
8918 (define-public python-sphinxcontrib-programoutput
8919 (package
8920 (name "python-sphinxcontrib-programoutput")
8921 (version "0.8")
8922 (source (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8925 (sha256
8926 (base32
8927 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8928 (build-system python-build-system)
8929 (propagated-inputs
8930 `(("python-docutils" ,python-docutils)
8931 ("python-sphinx" ,python-sphinx)))
8932 (synopsis "Sphinx extension to include program output")
8933 (description "A Sphinx extension to literally insert the output of arbitrary
8934 commands into documents, helping you to keep your command examples up to date.")
8935 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8936 (license license:bsd-2)))
8937
8938 (define-public python2-sphinxcontrib-programoutput
8939 (package-with-python2 python-sphinxcontrib-programoutput))
8940
8941 (define-public python-sphinx-repoze-autointerface
8942 (package
8943 (name "python-sphinx-repoze-autointerface")
8944 (version "0.8")
8945 (source (origin
8946 (method url-fetch)
8947 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8948 (sha256
8949 (base32
8950 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8951 (build-system python-build-system)
8952 (propagated-inputs
8953 `(("python-docutils" ,python-docutils)
8954 ("python-sphinx" ,python-sphinx)
8955 ("python-zope-interface" ,python-zope-interface)))
8956 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8957 (description "This package defines an extension for the Sphinx documentation
8958 system. The extension allows generation of API documentation by
8959 introspection of @code{zope.interface} instances in code.")
8960 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8961 (license license:repoze)))
8962
8963 (define-public python2-sphinx-repoze-autointerface
8964 (package-with-python2 python-sphinx-repoze-autointerface))
8965
8966 (define-public python-psycopg2
8967 (package
8968 (name "python-psycopg2")
8969 (version "2.6.1")
8970 (source
8971 (origin
8972 (method url-fetch)
8973 (uri (pypi-uri "psycopg2" version))
8974 (sha256
8975 (base32
8976 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8977 (build-system python-build-system)
8978 (arguments
8979 ;; Tests would require a postgresql database "psycopg2_test"
8980 ;; and a running postgresql database management service.
8981 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8982 (inputs
8983 `(("postgresql" ,postgresql))) ; libpq
8984 (home-page "http://initd.org/psycopg/")
8985 (synopsis "Python PostgreSQL adapter")
8986 (description
8987 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8988 (license license:lgpl3+)))
8989
8990 (define-public python2-psycopg2
8991 (package-with-python2 python-psycopg2))
8992
8993 (define-public python-vobject
8994 (package
8995 (name "python-vobject")
8996 (version "0.9.2")
8997 (source (origin
8998 (method url-fetch)
8999 (uri (pypi-uri "vobject" version))
9000 (sha256
9001 (base32
9002 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9003 (build-system python-build-system)
9004 (arguments
9005 '(;; The test suite relies on some non-portable Windows interfaces.
9006 #:tests? #f))
9007 (propagated-inputs
9008 `(("python-dateutil-2" ,python-dateutil-2)
9009 ("python-pyicu" ,python-pyicu)))
9010 (synopsis "Parse and generate vCard and vCalendar files")
9011 (description "Vobject is intended to be a full featured Python package for
9012 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9013 are supported and well tested. vCard 3.0 files are supported, and all data
9014 should be imported, but only a few components are understood in a sophisticated
9015 way.")
9016 (home-page "http://eventable.github.io/vobject/")
9017 (license license:asl2.0)))
9018
9019 (define-public python2-vobject
9020 (package-with-python2 python-vobject))
9021
9022 (define-public python-munkres
9023 (package
9024 (name "python-munkres")
9025 (version "1.0.7")
9026 (source (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "munkres" version))
9029 (sha256
9030 (base32
9031 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9032 (build-system python-build-system)
9033 (arguments
9034 '(#:tests? #f)) ; no test suite
9035 (home-page "http://software.clapper.org/munkres/")
9036 (synopsis "Implementation of the Munkres algorithm")
9037 (description "The Munkres module provides an implementation of the Munkres
9038 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9039 useful for solving the Assignment Problem.")
9040 (license license:bsd-3)))
9041
9042 (define-public python2-munkres
9043 (package-with-python2 python-munkres))
9044
9045 (define-public python-flask
9046 (package
9047 (name "python-flask")
9048 (version "0.10.1")
9049 (source (origin
9050 (method url-fetch)
9051 (uri (pypi-uri "Flask" version))
9052 (sha256
9053 (base32
9054 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9055 (build-system python-build-system)
9056 (propagated-inputs
9057 `(("python-itsdangerous" ,python-itsdangerous)
9058 ("python-jinja2" ,python-jinja2)
9059 ("python-werkzeug" ,python-werkzeug)))
9060 (home-page "https://github.com/mitsuhiko/flask/")
9061 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9062 (description "Flask is a micro web framework based on the Werkzeug toolkit
9063 and Jinja2 template engine. It is called a micro framework because it does not
9064 presume or force a developer to use a particular tool or library.")
9065 (license license:bsd-3)))
9066
9067 (define-public python2-flask
9068 (package-with-python2 python-flask))
9069
9070 (define-public python-cookies
9071 (package
9072 (name "python-cookies")
9073 (version "2.2.1")
9074 (source (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "cookies" version))
9077 (sha256
9078 (base32
9079 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9080 (build-system python-build-system)
9081 (arguments
9082 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9083 #:tests? #f))
9084 (native-inputs
9085 `(("python-pytest" ,python2-pytest)))
9086 (synopsis "HTTP cookie parser and renderer")
9087 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9088 Python.")
9089 (home-page "https://gitlab.com/sashahart/cookies")
9090 (license license:expat)))
9091
9092 (define-public python2-cookies
9093 (package-with-python2 python-cookies))
9094
9095 (define-public python-responses
9096 (package
9097 (name "python-responses")
9098 (version "0.5.1")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "responses" version))
9102 (sha256
9103 (base32
9104 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9105 (build-system python-build-system)
9106 (arguments
9107 `(;; Test suite is not distributed:
9108 ;; https://github.com/getsentry/responses/issues/38
9109 #:tests? #f))
9110 (native-inputs
9111 `(("python-cookies" ,python-cookies)
9112 ("python-mock" ,python-mock)))
9113 (propagated-inputs
9114 `(("python-requests" ,python-requests)
9115 ("python-six" ,python-six)))
9116 (home-page "https://github.com/getsentry/responses")
9117 (synopsis "Utility for mocking out the `requests` Python library")
9118 (description "A utility library for mocking out the `requests` Python
9119 library.")
9120 (license license:asl2.0)))
9121
9122 (define-public python2-responses
9123 (package-with-python2 python-responses))
9124
9125 (define-public python-whoosh
9126 (package
9127 (name "python-whoosh")
9128 (version "2.7.4")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "Whoosh" version))
9133 (sha256
9134 (base32
9135 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9136 (build-system python-build-system)
9137 (native-inputs
9138 `(("python-pytest" ,python-pytest)))
9139 (home-page "http://bitbucket.org/mchaput/whoosh")
9140 (synopsis "Full text indexing, search, and spell checking library")
9141 (description
9142 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9143 checking library.")
9144 (license license:bsd-2)))
9145
9146 (define-public python2-whoosh
9147 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9148 (package (inherit whoosh)
9149 (propagated-inputs
9150 `(("python2-backport-ssl-match-hostname"
9151 ,python2-backport-ssl-match-hostname)
9152 ,@(package-propagated-inputs whoosh))))))
9153
9154 (define-public python-pathlib
9155 (package
9156 (name "python-pathlib")
9157 (version "1.0.1")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "pathlib" version))
9161 (sha256
9162 (base32
9163 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9164 (build-system python-build-system)
9165 ;; The tests depend on the internal "test" module, which does not provide
9166 ;; a stable interface.
9167 (arguments `(#:tests? #f))
9168 (home-page "https://pathlib.readthedocs.org/")
9169 (synopsis "Object-oriented file system paths")
9170 (description "Pathlib offers a set of classes to handle file system paths.
9171 It offers the following advantages over using string objects:
9172
9173 @enumerate
9174 @item No more cumbersome use of os and os.path functions. Everything can
9175 be done easily through operators, attribute accesses, and method calls.
9176 @item Embodies the semantics of different path types. For example,
9177 comparing Windows paths ignores casing.
9178 @item Well-defined semantics, eliminating any inconsistencies or
9179 ambiguities (forward vs. backward slashes, etc.).
9180 @end enumerate
9181
9182 Note: In Python 3.4, pathlib is now part of the standard library. For other
9183 Python versions please consider python-pathlib2 instead, which tracks the
9184 standard library module. This module (python-pathlib) isn't maintained
9185 anymore.")
9186 (license license:expat)))
9187
9188 (define-public python2-pathlib
9189 (package-with-python2 python-pathlib))
9190
9191 (define-public python2-pathlib2
9192 (package
9193 (name "python2-pathlib2")
9194 (version "2.1.0")
9195 (source (origin
9196 (method url-fetch)
9197 (uri (pypi-uri "pathlib2" version))
9198 (sha256
9199 (base32
9200 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9201 (build-system python-build-system)
9202 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9203 ;; version is 3.4 which already includes this package as part of the
9204 ;; standard library.
9205 (arguments
9206 `(#:python ,python-2))
9207 (native-inputs
9208 `(("python2-six" ,python2-six)))
9209 (home-page "http://pypi.python.org/pypi/pathlib2/")
9210 (synopsis "Object-oriented file system paths - backport of standard
9211 pathlib module")
9212 (description "The goal of pathlib2 is to provide a backport of standard
9213 pathlib module which tracks the standard library module, so all the newest
9214 features of the standard pathlib can be used also on older Python versions.
9215
9216 Pathlib offers a set of classes to handle file system paths. It offers the
9217 following advantages over using string objects:
9218
9219 @enumerate
9220 @item No more cumbersome use of os and os.path functions. Everything can
9221 be done easily through operators, attribute accesses, and method calls.
9222 @item Embodies the semantics of different path types. For example,
9223 comparing Windows paths ignores casing.
9224 @item Well-defined semantics, eliminating any inconsistencies or
9225 ambiguities (forward vs. backward slashes, etc.).
9226 @end enumerate")
9227 (license license:expat)))
9228
9229 (define-public python-jellyfish
9230 (package
9231 (name "python-jellyfish")
9232 (version "0.5.3")
9233 (source (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "jellyfish" version))
9236 (sha256
9237 (base32
9238 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9239 (build-system python-build-system)
9240 (native-inputs
9241 `(("python-pytest" ,python-pytest)))
9242 (home-page "https://github.com/jamesturk/jellyfish")
9243 (synopsis "Approximate and phonetic matching of strings")
9244 (description "Jellyfish uses a variety of string comparison and phonetic
9245 encoding algorithms to do fuzzy string matching.")
9246 (license license:bsd-2)
9247 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9248
9249 (define-public python2-jellyfish
9250 (let ((jellyfish (package-with-python2
9251 (strip-python2-variant python-jellyfish))))
9252 (package (inherit jellyfish)
9253 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9254 ,@(package-native-inputs jellyfish))))))
9255
9256 (define-public python2-unicodecsv
9257 (package
9258 (name "python2-unicodecsv")
9259 (version "0.14.1")
9260 (source (origin
9261 (method url-fetch)
9262 ;; The test suite is not included in the PyPi release.
9263 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9264 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9265 "archive/" version ".tar.gz"))
9266 (file-name (string-append name "-" version ".tar.gz"))
9267 (sha256
9268 (base32
9269 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9270 (build-system python-build-system)
9271 (arguments
9272 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9273 #:python ,python-2))
9274 (native-inputs
9275 `(("python2-unittest2" ,python2-unittest2)))
9276 (home-page "https://github.com/jdunck/python-unicodecsv")
9277 (synopsis "Unicode CSV module for Python 2")
9278 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9279 module, adding support for Unicode strings.")
9280 (license license:bsd-2)))
9281
9282 (define-public python-rarfile
9283 (package
9284 (name "python-rarfile")
9285 (version "2.7")
9286 (source (origin
9287 (method url-fetch)
9288 (uri (pypi-uri "rarfile" version))
9289 (sha256
9290 (base32
9291 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9292 ;; https://github.com/markokr/rarfile/pull/17/
9293 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9294 (build-system python-build-system)
9295 (arguments
9296 '(#:phases
9297 (modify-phases %standard-phases
9298 (replace 'check
9299 ;; Many tests fail, but the installation proceeds.
9300 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9301 (native-inputs
9302 `(("which" ,which))) ; required for tests
9303 (propagated-inputs
9304 `(("libarchive" ,libarchive)))
9305 (home-page "https://github.com/markokr/rarfile")
9306 (synopsis "RAR archive reader for Python")
9307 (description "This is Python module for RAR archive reading. The interface
9308 is made as zipfile like as possible.")
9309 (license license:isc)))
9310
9311 (define-public python2-rarfile
9312 (package-with-python2 python-rarfile))
9313
9314 (define-public python-magic
9315 (package
9316 (name "python-magic")
9317 (version "0.4.3")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9322 version ".tar.gz"))
9323 (sha256
9324 (base32
9325 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9326 (file-name (string-append name "-" version "-checkout"))))
9327 (build-system python-build-system)
9328 (arguments
9329 ;; The tests are unreliable, so don't run them. The tests fail
9330 ;; under Python3 because they were written for Python2 and
9331 ;; contain import statements that do not work in Python3. One of
9332 ;; the tests fails under Python2 because its assertions are
9333 ;; overly stringent; it relies on comparing output strings which
9334 ;; are brittle and can change depending on the version of
9335 ;; libmagic being used and the system on which the test is
9336 ;; running. In my case, under GuixSD 0.10.0, only one test
9337 ;; failed, and it seems to have failed only because the version
9338 ;; of libmagic that is packaged in Guix outputs a slightly
9339 ;; different (but not wrong) string than the one that the test
9340 ;; expected.
9341 '(#:tests? #f
9342 #:phases (modify-phases %standard-phases
9343 ;; Replace a specific method call with a hard-coded
9344 ;; path to the necessary libmagic.so file in the
9345 ;; store. If we don't do this, then the method call
9346 ;; will fail to find the libmagic.so file, which in
9347 ;; turn will cause any application using
9348 ;; python-magic to fail.
9349 (add-before 'build 'hard-code-path-to-libmagic
9350 (lambda* (#:key inputs #:allow-other-keys)
9351 (let ((file (assoc-ref inputs "file")))
9352 (substitute* "magic.py"
9353 (("ctypes.util.find_library\\('magic'\\)")
9354 (string-append "'" file "/lib/libmagic.so'")))
9355 #t)))
9356 (add-before 'install 'disable-egg-compression
9357 (lambda _
9358 (let ((port (open-file "setup.cfg" "a")))
9359 (display "\n[easy_install]\nzip_ok = 0\n"
9360 port)
9361 (close-port port)
9362 #t))))))
9363 (inputs
9364 ;; python-magic needs to be able to find libmagic.so.
9365 `(("file" ,file)))
9366 (home-page "https://github.com/ahupp/python-magic")
9367 (synopsis "File type identification using libmagic")
9368 (description
9369 "This module uses ctypes to access the libmagic file type
9370 identification library. It makes use of the local magic database and
9371 supports both textual and MIME-type output. Note that this module and
9372 the python-file module both provide a \"magic.py\" file; these two
9373 modules, which are different and were developed separately, both serve
9374 the same purpose: to provide Python bindings for libmagic.")
9375 (license license:expat)))
9376
9377 (define-public python2-magic
9378 (package-with-python2 python-magic))
9379
9380 (define-public python2-s3cmd
9381 (package
9382 (name "python2-s3cmd")
9383 (version "1.6.1")
9384 (source
9385 (origin
9386 (method url-fetch)
9387 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9388 "s3cmd-" version ".tar.gz"))
9389 (sha256
9390 (base32
9391 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9392 (build-system python-build-system)
9393 (arguments
9394 ;; s3cmd is written for python2 only and contains no tests.
9395 `(#:python ,python-2
9396 #:tests? #f))
9397 (propagated-inputs
9398 `(("python2-dateutil" ,python2-dateutil)
9399 ;; The python-file package also provides a magic.py module.
9400 ;; This is an unfortunate state of affairs; however, s3cmd
9401 ;; fails to install if it cannot find specifically the
9402 ;; python-magic package. Thus we include it, instead of using
9403 ;; python-file. Ironically, s3cmd sometimes works better
9404 ;; without libmagic bindings at all:
9405 ;; https://github.com/s3tools/s3cmd/issues/198
9406 ("python2-magic" ,python2-magic)))
9407 (home-page "http://s3tools.org/s3cmd")
9408 (synopsis "Command line tool for S3-compatible storage services")
9409 (description
9410 "S3cmd is a command line tool for uploading, retrieving and managing data
9411 in storage services that are compatible with the Amazon Simple Storage
9412 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9413 GnuPG encryption, and more. It also supports management of Amazon's
9414 CloudFront content delivery network.")
9415 (license license:gpl2+)))
9416
9417 (define-public python-pkgconfig
9418 (package
9419 (name "python-pkgconfig")
9420 (version "1.1.0")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "pkgconfig" version))
9425 (sha256
9426 (base32
9427 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9428 (build-system python-build-system)
9429 (native-inputs
9430 `(("python-nose" ,python-nose)))
9431 (inputs
9432 `(("pkg-config" ,pkg-config)))
9433 (arguments
9434 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9435 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9436 #:tests? #f
9437 ;; Hard-code the path to pkg-config.
9438 #:phases
9439 (modify-phases %standard-phases
9440 (add-before
9441 'build 'patch
9442 (lambda _
9443 (substitute* "pkgconfig/pkgconfig.py"
9444 (("cmd = 'pkg-config")
9445 (string-append "cmd = '" (which "pkg-config"))))
9446 #t)))))
9447 (home-page "http://github.com/matze/pkgconfig")
9448 (synopsis "Python interface for pkg-config")
9449 (description "This module provides a Python interface to pkg-config. It
9450 can be used to find all pkg-config packages, check if a package exists,
9451 check if a package meets certain version requirements, query CFLAGS and
9452 LDFLAGS and parse the output to build extensions with setup.py.")
9453 (license license:expat)))
9454
9455 (define-public python2-pkgconfig
9456 (package-with-python2 python-pkgconfig))
9457
9458 (define-public python-bz2file
9459 (package
9460 (name "python-bz2file")
9461 (version "0.98")
9462 (source
9463 (origin
9464 (method url-fetch)
9465 (uri (pypi-uri "bz2file" version))
9466 (sha256
9467 (base32
9468 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9469 (build-system python-build-system)
9470 (arguments
9471 `(#:tests? #f)) ; Tests use deprecated python modules.
9472 (home-page "https://github.com/nvawda/bz2file")
9473 (synopsis "Read and write bzip2-compressed files")
9474 (description
9475 "Bz2file is a Python library for reading and writing bzip2-compressed
9476 files. It contains a drop-in replacement for the I/O interface in the
9477 standard library's @code{bz2} module, including features from the latest
9478 development version of CPython that are not available in older releases.")
9479 (license license:asl2.0)
9480 (properties `((python2-variant . ,(delay python2-bz2file))))))
9481
9482 (define-public python2-bz2file
9483 (let ((base (package-with-python2
9484 (strip-python2-variant python-bz2file))))
9485 (package
9486 (inherit base)
9487 (arguments
9488 `(#:python ,python-2
9489 #:phases
9490 (modify-phases %standard-phases
9491 ;; 'python setup.py test' does not work as of 0.98.
9492 ;; There is only the one test file, so we run it directly.
9493 (replace 'check
9494 (lambda _ (zero? (system* "python"
9495 "test_bz2file.py"))))))))))
9496
9497 (define-public python-future
9498 (package
9499 (name "python-future")
9500 (version "0.15.2")
9501 (source
9502 (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "future" version))
9505 (sha256
9506 (base32
9507 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9508 (build-system python-build-system)
9509 ;; Many tests connect to the network or are otherwise flawed.
9510 ;; https://github.com/PythonCharmers/python-future/issues/210
9511 (arguments
9512 `(#:tests? #f))
9513 (home-page "http://python-future.org")
9514 (synopsis "Single-source support for Python 3 and 2")
9515 (description
9516 "@code{python-future} is the missing compatibility layer between Python 2 and
9517 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9518 to support both Python 2 and Python 3 with minimal overhead.")
9519 (license license:expat)))
9520
9521 (define-public python2-future
9522 (package-with-python2 python-future))
9523
9524 (define-public python-cysignals
9525 (package
9526 (name "python-cysignals")
9527 (version "1.1.0")
9528 (source
9529 (origin
9530 (method url-fetch)
9531 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9532 (sha256
9533 (base32
9534 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9535 (build-system python-build-system)
9536 (native-inputs
9537 `(("python-cython" ,python-cython)
9538 ("python-sphinx" ,python-sphinx)))
9539 (inputs
9540 `(("pari-gp" ,pari-gp)))
9541 (arguments
9542 `(#:modules ((guix build python-build-system)
9543 ((guix build gnu-build-system) #:prefix gnu:)
9544 (guix build utils))
9545 ;; FIXME: Tests are executed after installation and currently fail
9546 ;; when not installing into standard locations; the author is working
9547 ;; on a fix.
9548 #:tests? #f
9549 #:phases
9550 (modify-phases %standard-phases
9551 (add-before
9552 'build 'configure
9553 (assoc-ref gnu:%standard-phases 'configure)))))
9554 (home-page
9555 "https://github.com/sagemath/cysignals")
9556 (synopsis
9557 "Handling of interrupts and signals for Cython")
9558 (description
9559 "The cysignals package provides mechanisms to handle interrupts (and
9560 other signals and errors) in Cython code, using two related approaches,
9561 for mixed Cython/Python code or external C libraries and pure Cython code,
9562 respectively.")
9563 (license license:lgpl3+)))
9564
9565 (define-public python2-cysignals
9566 (package-with-python2 python-cysignals))
9567
9568 (define-public python2-shedskin
9569 (package
9570 (name "python2-shedskin")
9571 (version "0.9.4")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (string-append "https://github.com/shedskin/shedskin/"
9576 "releases/download/v" version
9577 "/shedskin-" version ".tgz"))
9578 (sha256
9579 (base32
9580 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9581 (build-system python-build-system)
9582 (arguments
9583 `(#:python ,python-2
9584 #:phases (modify-phases %standard-phases
9585 (add-after 'unpack 'fix-resulting-include-libs
9586 (lambda* (#:key inputs #:allow-other-keys)
9587 (let ((libgc (assoc-ref inputs "libgc"))
9588 (pcre (assoc-ref inputs "pcre")))
9589 (substitute* "shedskin/makefile.py"
9590 (("variable == 'CCFLAGS':[ ]*")
9591 (string-append "variable == 'CCFLAGS':\n"
9592 " line += ' -I " pcre "/include"
9593 " -I " libgc "/include'"))
9594 (("variable == 'LFLAGS':[ ]*")
9595 (string-append "variable == 'LFLAGS':\n"
9596 " line += ' -L" pcre "/lib"
9597 " -L " libgc "/lib'")))
9598 #t))))))
9599 (inputs `(("pcre" ,pcre)
9600 ("libgc" ,libgc)))
9601 (home-page "https://shedskin.github.io/")
9602 (synopsis "Experimental Python-2 to C++ Compiler")
9603 (description (string-append "This is an experimental compiler for a subset of
9604 Python. It generates C++ code and a Makefile."))
9605 (license (list license:gpl3 license:bsd-3 license:expat))))
9606
9607 (define-public python2-rope
9608 (package
9609 (name "python2-rope")
9610 (version "0.10.3")
9611 (source
9612 (origin
9613 (method url-fetch)
9614 (uri (pypi-uri "rope" version))
9615 (sha256
9616 (base32
9617 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9618 (arguments
9619 ;; Rope is currently python-2 only.
9620 ;; https://github.com/python-rope/rope/issues/57
9621 `(#:python ,python-2))
9622 (build-system python-build-system)
9623 (native-inputs
9624 `(("python2-unittest2" ,python2-unittest2)))
9625 (home-page "https://github.com/python-rope/rope")
9626 (synopsis "Refactoring library for Python")
9627 (description "Rope is a refactoring library for Python. It facilitates
9628 the renaming, moving and extracting of attributes, functions, modules, fields
9629 and parameters in Python 2 source code. These refactorings can also be applied
9630 to occurences in strings and comments.")
9631 (license license:gpl2)))
9632
9633 (define-public python-py3status
9634 (package
9635 (name "python-py3status")
9636 (version "3.1")
9637 (source
9638 (origin
9639 (method url-fetch)
9640 (uri (pypi-uri "py3status" version))
9641 (sha256
9642 (base32
9643 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9644 (build-system python-build-system)
9645 (home-page "https://github.com/ultrabug/py3status")
9646 (synopsis "Extensible i3status wrapper written in Python")
9647 (description "py3status is an i3status wrapper which extends i3status
9648 functionality in a modular way, allowing you to extend your panel with your
9649 own code, responding to click events and updating clock every second.")
9650 (license license:bsd-3)))
9651
9652 (define-public python-tblib
9653 (package
9654 (name "python-tblib")
9655 (version "1.3.0")
9656 (source (origin
9657 (method url-fetch)
9658 (uri (pypi-uri "tblib" version))
9659 (sha256 (base32
9660 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9661 (build-system python-build-system)
9662 (arguments
9663 `(#:phases
9664 (modify-phases %standard-phases
9665 (replace 'check
9666 (lambda _
9667 ;; Upstream runs tests after installation and the package itself
9668 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9669 ;; found.
9670 (setenv "PYTHONPATH"
9671 (string-append (getcwd) "/build/lib:"
9672 (getenv "PYTHONPATH")))
9673 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9674 (native-inputs
9675 `(("python-pytest" ,python-pytest)
9676 ("python-six" ,python-six)))
9677 (home-page "https://github.com/ionelmc/python-tblib")
9678 (synopsis "Traceback serialization library")
9679 (description
9680 "Traceback serialization allows you to:
9681
9682 @enumerate
9683 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9684 different processes. This allows better error handling when running code over
9685 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9686
9687 @item Parse traceback strings and raise with the parsed tracebacks.
9688 @end itemize")
9689 (license license:bsd-3)))
9690
9691 (define-public python2-tblib
9692 (package-with-python2 python-tblib))
9693
9694 (define-public python-sqlparse
9695 (package
9696 (name "python-sqlparse")
9697 (version "0.1.19")
9698 (source (origin
9699 (method url-fetch)
9700 (uri (pypi-uri "sqlparse" version))
9701 (sha256
9702 (base32
9703 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9704 (build-system python-build-system)
9705 (arguments
9706 `(#:phases
9707 (modify-phases %standard-phases
9708 (replace 'check
9709 (lambda* _
9710 ;; setup.py-integrated 2to3 only affects the build files, but
9711 ;; py.test is using the source files. So we need to convert them
9712 ;; manually.
9713 (when (zero? (system* "python3"))
9714 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9715 (zero? (system* "py.test")))))))
9716 (native-inputs
9717 `(("python-pytest" ,python-pytest)))
9718 (home-page "https://github.com/andialbrecht/sqlparse")
9719 (synopsis "Non-validating SQL parser")
9720 (description "Sqlparse is a non-validating SQL parser for Python. It
9721 provides support for parsing, splitting and formatting SQL statements.")
9722 (license license:bsd-3)))
9723
9724 (define-public python2-sqlparse
9725 (package-with-python2 python-sqlparse))
9726
9727 (define-public python-greenlet
9728 (package
9729 (name "python-greenlet")
9730 (version "0.4.9")
9731 (source (origin
9732 (method url-fetch)
9733 (uri (pypi-uri "greenlet" version))
9734 (sha256
9735 (base32
9736 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9737 (build-system python-build-system)
9738 (home-page "https://greenlet.readthedocs.io/")
9739 (synopsis "Lightweight in-process concurrent programming")
9740 (description
9741 "Greenlet package is a spin-off of Stackless, a version of CPython
9742 that supports micro-threads called \"tasklets\". Tasklets run
9743 pseudo-concurrently (typically in a single or a few OS-level threads) and
9744 are synchronized with data exchanges on \"channels\".")
9745 (license (list license:psfl license:expat))))
9746
9747 (define-public python2-greenlet
9748 (package-with-python2 python-greenlet))
9749
9750 (define-public python-gevent
9751 (package
9752 (name "python-gevent")
9753 (version "1.1.1")
9754 (source (origin
9755 (method url-fetch)
9756 (uri (pypi-uri "gevent" version))
9757 (sha256
9758 (base32
9759 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9760 (modules '((guix build utils)))
9761 (snippet
9762 '(begin
9763 ;; unbunding libev and c-ares
9764 (for-each delete-file-recursively '("libev" "c-ares"))
9765 ;; fixing testsuite
9766 (call-with-output-file "greentest/__init__.py" noop)
9767 (substitute* "greentest/testrunner.py"
9768 (("import util") "from . import util")
9769 (("from util import log") "from .util import log"))))))
9770 (build-system python-build-system)
9771 (propagated-inputs
9772 `(("python-greenlet" ,python-greenlet)))
9773 (native-inputs
9774 `(("python-six" ,python-six)))
9775 (inputs
9776 `(("c-ares" ,c-ares)
9777 ("libev" ,libev)))
9778 (home-page "http://www.gevent.org/")
9779 (synopsis "Coroutine-based network library")
9780 (description
9781 "gevent is a coroutine-based Python networking library that uses greenlet
9782 to provide a high-level synchronous API on top of the libev event loop.")
9783 (license license:expat)))
9784
9785 (define-public python2-gevent
9786 (package-with-python2 python-gevent))
9787
9788 (define-public python-twisted
9789 (package
9790 (name "python-twisted")
9791 (version "16.2.0")
9792 (source (origin
9793 (method url-fetch)
9794 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9795 (sha256
9796 (base32
9797 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9798 (build-system python-build-system)
9799 (propagated-inputs
9800 `(("python-zope-interface" ,python-zope-interface)))
9801 (home-page "https://twistedmatrix.com/")
9802 (synopsis "Asynchronous networking framework written in Python")
9803 (description
9804 "Twisted is an extensible framework for Python programming, with special
9805 focus on event-based network programming and multiprotocol integration.")
9806 (license license:expat)))
9807
9808 (define-public python2-twisted
9809 (package-with-python2 python-twisted))
9810
9811 (define-public python-pika
9812 (package
9813 (name "python-pika")
9814 (version "0.10.0")
9815 (source
9816 (origin
9817 (method url-fetch)
9818 (uri (pypi-uri "pika" version))
9819 (sha256
9820 (base32
9821 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9822 (build-system python-build-system)
9823 (native-inputs
9824 `(("python-pyev" ,python-pyev)
9825 ("python-tornado" ,python-tornado)
9826 ("python-twisted" ,python-twisted)))
9827 (home-page "https://pika.readthedocs.org")
9828 (synopsis "Pure Python AMQP Client Library")
9829 (description
9830 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9831 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9832 network support library.")
9833 (license license:bsd-3)))
9834
9835 (define-public python2-pika
9836 (package-with-python2 python-pika))
9837
9838 (define-public python-ply
9839 (package
9840 (name "python-ply")
9841 (version "3.8")
9842 (source
9843 (origin
9844 (method url-fetch)
9845 (uri (string-append
9846 "https://pypi.python.org/packages/"
9847 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9848 "/ply-" version ".tar.gz"))
9849 (sha256
9850 (base32
9851 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9852 (build-system python-build-system)
9853 (home-page "http://www.dabeaz.com/ply/")
9854 (synopsis "Python Lex & Yacc")
9855 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9856 It uses LR parsing and does extensive error checking.")
9857 (license license:bsd-3)))
9858
9859 (define-public python2-ply
9860 (package-with-python2 python-ply))
9861
9862 (define-public python-tabulate
9863 (package
9864 (name "python-tabulate")
9865 (version "0.7.5")
9866 (source (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "tabulate" version))
9869 (sha256
9870 (base32
9871 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9872 ;; Fix tests
9873 (modules '((guix build utils)))
9874 (snippet '(substitute* '("test/test_cli.py"
9875 "test/test_input.py"
9876 "test/test_output.py"
9877 "test/test_regression.py")
9878 (("from common") "from nose.tools")))))
9879 (build-system python-build-system)
9880 (native-inputs
9881 `(;; For testing
9882 ("python-nose" ,python-nose)))
9883 (home-page "https://bitbucket.org/astanin/python-tabulate")
9884 (synopsis "Pretty-print tabular data")
9885 (description
9886 "Tabulate is a library and command-line utility to pretty-print tabular
9887 data in Python.")
9888 (license license:expat)))
9889
9890 (define-public python2-tabulate
9891 (package-with-python2 python-tabulate))
9892
9893 (define-public python-kazoo
9894 (package
9895 (name "python-kazoo")
9896 (version "2.2.1")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "kazoo" version))
9901 (sha256
9902 (base32
9903 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9904 (build-system python-build-system)
9905 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9906 (propagated-inputs
9907 `(("python-six" ,python-six)))
9908 (home-page "https://kazoo.readthedocs.org")
9909 (synopsis "High-level Zookeeper client library")
9910 (description
9911 "Kazoo is a Python client library for the Apache Zookeeper distributed
9912 application service. It is designed to be easy to use and to avoid common
9913 programming errors.")
9914 (license license:asl2.0)))
9915
9916 (define-public python2-kazoo
9917 (package-with-python2 python-kazoo))
9918
9919 (define-public python-pykafka
9920 (package
9921 (name "python-pykafka")
9922 (version "2.4.0")
9923 (source (origin
9924 (method url-fetch)
9925 (uri (string-append
9926 "https://pypi.python.org/packages/8b/3e/"
9927 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9928 "pykafka-" version ".tar.gz"))
9929 (sha256
9930 (base32
9931 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9932 (build-system python-build-system)
9933 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9934 (propagated-inputs
9935 `(("python-gevent" ,python-gevent)
9936 ("python-kazoo" ,python-kazoo)
9937 ("python-tabulate" ,python-tabulate)))
9938 (inputs
9939 `(("librdkafka" ,librdkafka)))
9940 (home-page "https://pykafka.readthedocs.io/")
9941 (synopsis "Apache Kafka client for Python")
9942 (description
9943 "PyKafka is a client for the Apache Kafka distributed messaging system.
9944 It includes Python implementations of Kafka producers and consumers, which
9945 are optionally backed by a C extension built on librdkafka.")
9946 (license license:asl2.0)))
9947
9948 (define-public python2-pykafka
9949 (package-with-python2 python-pykafka))
9950
9951 (define-public python-wcwidth
9952 (package
9953 (name "python-wcwidth")
9954 (version "0.1.6")
9955 (source
9956 (origin
9957 (method url-fetch)
9958 (uri (string-append
9959 "https://pypi.python.org/packages/"
9960 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9961 "wcwidth-" version ".tar.gz"))
9962 (sha256
9963 (base32
9964 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9965 (build-system python-build-system)
9966 (home-page "https://github.com/jquast/wcwidth")
9967 (synopsis "Measure number of terminal column cells of wide-character codes")
9968 (description "Wcwidth measures the number of terminal column cells of
9969 wide-character codes. It is useful for those implementing a terminal emulator,
9970 or programs that carefully produce output to be interpreted by one. It is a
9971 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9972 specified in POSIX.1-2001 and POSIX.1-2008.")
9973 (license license:expat)))
9974
9975 (define-public python2-wcwidth
9976 (package-with-python2 python-wcwidth))
9977
9978 (define-public python2-jsonrpclib
9979 (package
9980 (name "python2-jsonrpclib")
9981 (version "0.1.7")
9982 (source (origin
9983 (method url-fetch)
9984 (uri (string-append
9985 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9986 "jsonrpclib-" version ".tar.gz"))
9987 (sha256
9988 (base32
9989 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9990 (build-system python-build-system)
9991 (arguments
9992 `(#:tests? #f
9993 #:python ,python-2))
9994 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9995 (synopsis "Implementation of JSON-RPC specification for Python")
9996 (description
9997 "This library is an implementation of the JSON-RPC specification.
9998 It supports both the original 1.0 specification, as well as the
9999 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10000 etc.")
10001 (license license:asl2.0)))
10002
10003 (define-public python-chai
10004 (package
10005 (name "python-chai")
10006 (version "1.1.1")
10007 (source (origin
10008 (method url-fetch)
10009 (uri (pypi-uri "chai" version))
10010 (sha256
10011 (base32
10012 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10013 (build-system python-build-system)
10014 (home-page "https://github.com/agoragames/chai")
10015 (synopsis "Mocking framework for Python")
10016 (description
10017 "Chai provides an api for mocking, stubbing and spying your python
10018 objects, patterned after the Mocha library for Ruby.")
10019 (license license:bsd-3)))
10020
10021 (define-public python2-chai
10022 (package-with-python2 python-chai))
10023
10024 (define-public python-arrow
10025 (package
10026 (name "python-arrow")
10027 (version "0.8.0")
10028 (source (origin
10029 (method url-fetch)
10030 (uri (pypi-uri "arrow" version))
10031 (sha256
10032 (base32
10033 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10034 (build-system python-build-system)
10035 (native-inputs
10036 `(;; For testing
10037 ("python-chai" ,python-chai)
10038 ("python-simplejson" ,python-simplejson)))
10039 (propagated-inputs
10040 `(("python-dateutil" ,python-dateutil-2)))
10041 (home-page "https://github.com/crsmithdev/arrow/")
10042 (synopsis "Dates and times for Python")
10043 (description
10044 "Arrow is a Python library to creating, manipulating, formatting and
10045 converting dates, times, and timestamps. It implements and updates the
10046 datetime type.")
10047 (license license:asl2.0)))
10048
10049 (define-public python2-arrow
10050 (package-with-python2 python-arrow))
10051
10052 (define-public python-inflection
10053 (package
10054 (name "python-inflection")
10055 (version "0.3.1")
10056 (source
10057 (origin (method url-fetch)
10058 (uri (pypi-uri "inflection" version))
10059 (sha256
10060 (base32
10061 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10062 (build-system python-build-system)
10063 (home-page "http://github.com/jpvanhal/inflection")
10064 (synopsis "Python string transformation library")
10065 (description
10066 "Inflection is a string transformation library. It singularizes
10067 and pluralizes English words, and transforms strings from CamelCase to
10068 underscored string.")
10069 (license license:expat)))
10070
10071 (define-public python2-inflection
10072 (package-with-python2 python-inflection))
10073
10074 (define-public python-pylev
10075 (package
10076 (name "python-pylev")
10077 (version "1.3.0")
10078 (source (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "pylev" version))
10081 (sha256
10082 (base32
10083 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10084 (build-system python-build-system)
10085 (home-page "http://github.com/toastdriven/pylev")
10086 (synopsis "Levenshtein distance implementation in Python")
10087 (description "Pure Python Levenshtein implementation, based off the
10088 Wikipedia code samples at
10089 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10090 (license license:bsd-3)))
10091
10092 (define-public python2-pylev
10093 (package-with-python2 python-pylev))
10094
10095 (define-public python-cleo
10096 (package
10097 (name "python-cleo")
10098 (version "0.4.1")
10099 (source (origin
10100 (method url-fetch)
10101 (uri (pypi-uri "cleo" version))
10102 (sha256
10103 (base32
10104 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10105 (build-system python-build-system)
10106 (native-inputs
10107 `(;; For testing
10108 ("python-mock" ,python-mock)
10109 ("python-pytest" ,python-pytest)))
10110 (propagated-inputs
10111 `(("python-psutil" ,python-psutil)
10112 ("python-pylev" ,python-pylev)))
10113 (home-page "https://github.com/sdispater/cleo")
10114 (synopsis "Command-line arguments library for Python")
10115 (description
10116 "Cleo allows you to create command-line commands with signature in
10117 docstring and colored output.")
10118 (license license:expat)))
10119
10120 (define-public python2-cleo
10121 (package-with-python2 python-cleo))
10122
10123 (define-public python-lazy-object-proxy
10124 (package
10125 (name "python-lazy-object-proxy")
10126 (version "1.2.2")
10127 (source (origin
10128 (method url-fetch)
10129 (uri (pypi-uri "lazy-object-proxy" version))
10130 (sha256
10131 (base32
10132 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10133 (build-system python-build-system)
10134 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10135 (synopsis "Lazy object proxy for python")
10136 (description
10137 "Lazy object proxy is an object that wraps a callable but defers the call
10138 until the object is actually required, and caches the result of said call.")
10139 (license license:bsd-2)))
10140
10141 (define-public python2-lazy-object-proxy
10142 (package-with-python2 python-lazy-object-proxy))
10143
10144 (define-public python-dnspython
10145 (package
10146 (name "python-dnspython")
10147 (version "1.15.0")
10148 (source (origin
10149 (method url-fetch)
10150 (uri (string-append "http://www.dnspython.org/kits/"
10151 version "/dnspython-" version ".tar.gz"))
10152 (sha256
10153 (base32
10154 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10155 (build-system python-build-system)
10156 (arguments '(#:tests? #f)) ; XXX: requires internet access
10157 (home-page "http://www.dnspython.org")
10158 (synopsis "DNS toolkit for Python")
10159 (description
10160 "dnspython is a DNS toolkit for Python. It supports almost all record
10161 types. It can be used for queries, zone transfers, and dynamic updates.
10162 It supports TSIG authenticated messages and EDNS0.")
10163 (license license:expat)))
10164
10165 (define-public python2-dnspython
10166 (package-with-python2 python-dnspython))
10167
10168 (define-public python-email-validator
10169 (package
10170 (name "python-email-validator")
10171 (version "1.0.1")
10172 (source
10173 (origin (method url-fetch)
10174 (uri (pypi-uri "email_validator" version))
10175 (sha256
10176 (base32
10177 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10178 (build-system python-build-system)
10179 (arguments
10180 '(#:phases
10181 (modify-phases %standard-phases
10182 (add-before 'build 'use-dnspython
10183 (lambda _
10184 (substitute* "setup.py"
10185 (("dnspython3") "dnspython"))
10186 #t)))))
10187 (propagated-inputs
10188 `(("python-dnspython" ,python-dnspython)
10189 ("python-idna" ,python-idna)))
10190 (home-page "https://github.com/JoshData/python-email-validator")
10191 (synopsis "Email address validation library for Python")
10192 (description
10193 "This library validates email address syntax and deliverability.")
10194 (license license:cc0)))
10195
10196 (define-public python2-email-validator
10197 (package-with-python2 python-email-validator))
10198
10199 (define-public python-ukpostcodeparser
10200 (package
10201 (name "python-ukpostcodeparser")
10202 (version "1.0.3")
10203 (source (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "UkPostcodeParser" version))
10206 (sha256
10207 (base32
10208 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10209 (build-system python-build-system)
10210 (home-page "https://github.com/hamstah/ukpostcodeparser")
10211 (synopsis "UK Postcode parser for Python")
10212 (description
10213 "This library provides the @code{parse_uk_postcode} function for
10214 parsing UK postcodes.")
10215 (license license:expat)))
10216
10217 (define-public python2-ukpostcodeparser
10218 (package-with-python2 python-ukpostcodeparser))
10219
10220 (define-public python-fake-factory
10221 (package
10222 (name "python-fake-factory")
10223 (version "0.7.2")
10224 (source (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "fake-factory" version))
10227 (sha256
10228 (base32
10229 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10230 (build-system python-build-system)
10231 (native-inputs
10232 `(;; For testing
10233 ("python-email-validator" ,python-email-validator)
10234 ("python-mock" ,python-mock)
10235 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10236 (propagated-inputs
10237 `(("python-dateutil" ,python-dateutil-2)
10238 ("python-six" ,python-six)))
10239 (home-page "https://github.com/joke2k/faker")
10240 (synopsis "Python package that generates fake data")
10241 (description
10242 "Faker is a Python package that generates fake data such as names,
10243 addresses, and phone numbers.")
10244 (license license:expat)
10245 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10246
10247 (define-public python2-fake-factory
10248 (let ((base (package-with-python2 (strip-python2-variant
10249 python-fake-factory))))
10250 (package
10251 (inherit base)
10252 (propagated-inputs
10253 `(("python2-ipaddress" ,python2-ipaddress)
10254 ,@(package-propagated-inputs base))))))
10255
10256 (define-public python-pyaml
10257 (package
10258 (name "python-pyaml")
10259 (version "15.8.2")
10260 (source (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "pyaml" version))
10263 (sha256
10264 (base32
10265 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10266 (build-system python-build-system)
10267 (propagated-inputs
10268 `(("python-pyyaml" ,python-pyyaml)))
10269 (home-page "https://github.com/mk-fg/pretty-yaml")
10270 (synopsis "YAML pretty-print library for Python")
10271 (description
10272 "pyaml is a PyYAML based python module to produce pretty and readable
10273 YAML-serialized data.")
10274 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10275
10276 (define-public python2-pyaml
10277 (package-with-python2 python-pyaml))
10278
10279 (define-public python-flexmock
10280 (package
10281 (name "python-flexmock")
10282 (version "0.10.2")
10283 (source (origin
10284 (method url-fetch)
10285 (uri (pypi-uri "flexmock" version))
10286 (sha256
10287 (base32
10288 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10289 (build-system python-build-system)
10290 (home-page "https://flexmock.readthedocs.org")
10291 (synopsis "Testing library for Python")
10292 (description
10293 "flexmock is a testing library for Python that makes it easy to create
10294 mocks, stubs and fakes.")
10295 (license license:bsd-3)))
10296
10297 (define-public python2-flexmock
10298 (package-with-python2 python-flexmock))
10299
10300 (define-public python-orator
10301 (package
10302 (name "python-orator")
10303 (version "0.8.2")
10304 (source (origin
10305 (method url-fetch)
10306 (uri (pypi-uri "orator" version))
10307 (sha256
10308 (base32
10309 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10310 (build-system python-build-system)
10311 (arguments '(#:tests? #f)) ; no tests
10312 (propagated-inputs
10313 `(("python-arrow" ,python-arrow)
10314 ("python-blinker" ,python-blinker)
10315 ("python-cleo" ,python-cleo)
10316 ("python-fake-factory" ,python-fake-factory)
10317 ("python-inflection" ,python-inflection)
10318 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10319 ("python-pyaml" ,python-pyaml)
10320 ("python-simplejson" ,python-simplejson)
10321 ("python-wrapt" ,python-wrapt)))
10322 (home-page "https://orator-orm.com/")
10323 (synopsis "ActiveRecord ORM for Python")
10324 (description
10325 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10326 implementation for Python.")
10327 (license license:expat)
10328 (properties `((python2-variant . ,(delay python2-orator))))))
10329
10330 (define-public python2-orator
10331 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10332 (package
10333 (inherit base)
10334 (propagated-inputs
10335 `(("python2-ipaddress" ,python2-ipaddress)
10336 ,@(package-propagated-inputs base))))))
10337
10338 (define-public python-prompt-toolkit
10339 (package
10340 (name "python-prompt-toolkit")
10341 (version "1.0.7")
10342 (source
10343 (origin
10344 (method url-fetch)
10345 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10346 (sha256
10347 (base32
10348 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10349 (build-system python-build-system)
10350 (arguments
10351 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10352 (propagated-inputs
10353 `(("python-wcwidth" ,python-wcwidth)
10354 ("python-pygments" ,python-pygments)))
10355 (native-inputs `(("python-six" ,python-six)))
10356 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10357 (synopsis "Library for building command line interfaces in Python")
10358 (description
10359 "Prompt-Toolkit is a library for building interactive command line
10360 interfaces in Python. It's like GNU Readline but it also features syntax
10361 highlighting while typing, out-of-the-box multi-line input editing, advanced
10362 code completion, incremental search, support for Chinese double-width
10363 characters, mouse support, and auto suggestions.")
10364 (license license:bsd-3)))
10365
10366 (define-public python2-prompt-toolkit
10367 (package-with-python2 python-prompt-toolkit))
10368
10369 (define-public python-jedi
10370 (package
10371 (name "python-jedi")
10372 (version "0.9.0")
10373 (source
10374 (origin
10375 (method url-fetch)
10376 (uri (pypi-uri "jedi" version))
10377 (sha256
10378 (base32
10379 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10380 (build-system python-build-system)
10381 (home-page "https://github.com/davidhalter/jedi")
10382 (synopsis
10383 "Autocompletion for Python that can be used for text editors")
10384 (description
10385 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10386 (license license:expat)))
10387
10388 (define-public python2-jedi
10389 (package-with-python2 python-jedi))
10390
10391 (define-public ptpython
10392 (package
10393 (name "ptpython")
10394 (version "0.34")
10395 (source (origin
10396 (method url-fetch)
10397 (uri (pypi-uri "ptpython" version))
10398 (sha256
10399 (base32
10400 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10401 (build-system python-build-system)
10402 (propagated-inputs
10403 `(("python-docopt" ,python-docopt)
10404 ("python-jedi" ,python-jedi)
10405 ("python-prompt-toolkit" ,python-prompt-toolkit)
10406 ("python-pygments" ,python-pygments)))
10407 (home-page "https://github.com/jonathanslenders/ptpython")
10408 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10409 (description
10410 "ptpython is a Python read-eval-print loop with IDE-like features.
10411 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10412 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10413 etc.")
10414 (license license:bsd-3)
10415 (properties `((python2-variant . ,(delay ptpython-2))))))
10416
10417 (define-public ptpython-2
10418 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10419 (package
10420 (inherit base)
10421 (name "ptpython2"))))
10422
10423 (define-public python-requests-oauthlib
10424 (package
10425 (name "python-requests-oauthlib")
10426 (version "0.6.2")
10427 (source
10428 (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "requests-oauthlib" version))
10431 (sha256
10432 (base32
10433 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10434 (build-system python-build-system)
10435 (arguments
10436 `(#:phases
10437 (modify-phases %standard-phases
10438 ;; removes tests that require network access
10439 (add-before 'check 'pre-check
10440 (lambda _
10441 (delete-file "tests/test_core.py")
10442 #t)))))
10443 (native-inputs
10444 `(("python-requests-mock" ,python-requests-mock)
10445 ("python-mock" ,python-mock)))
10446 (propagated-inputs
10447 `(("python-oauthlib" ,python-oauthlib)
10448 ("python-requests" ,python-requests)))
10449 (home-page
10450 "https://github.com/requests/requests-oauthlib")
10451 (synopsis
10452 "OAuthlib authentication support for Requests")
10453 (description
10454 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10455 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10456 (license license:isc)))
10457
10458 (define-public python2-requests-oauthlib
10459 (package-with-python2 python-requests-oauthlib))
10460
10461 (define-public python-stem
10462 (package
10463 (name "python-stem")
10464 (version "1.4.1b")
10465 (source
10466 (origin
10467 (method url-fetch)
10468 (uri (pypi-uri "stem" version ".tar.bz2"))
10469 (sha256
10470 (base32
10471 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10472 (build-system python-build-system)
10473 (arguments
10474 `(#:phases
10475 (modify-phases %standard-phases
10476 (replace 'check
10477 (lambda _
10478 (zero? (system* "./run_tests.py" "--unit")))))))
10479 (native-inputs
10480 `(("python-mock" ,python-mock)
10481 ("python-pep8" ,python-pep8)
10482 ("python-pyflakes" ,python-pyflakes)))
10483 (propagated-inputs
10484 `(("python-pycrypto" ,python-pycrypto)))
10485 (home-page "https://stem.torproject.org/")
10486 (synopsis
10487 "Python controller library that allows applications to interact with Tor")
10488 (description
10489 "Stem is a Python controller library for Tor. With it you can use Tor's
10490 control protocol to script against the Tor process and read descriptor data
10491 relays publish about themselves.")
10492 (license license:lgpl3)))
10493
10494 (define-public python2-stem
10495 (package-with-python2 python-stem))
10496
10497 (define-public python-pyserial
10498 (package
10499 (name "python-pyserial")
10500 (version "3.1.1")
10501 (source
10502 (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "pyserial" version))
10505 (sha256
10506 (base32
10507 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10508 (build-system python-build-system)
10509 (home-page
10510 "https://github.com/pyserial/pyserial")
10511 (synopsis "Python Serial Port Bindings")
10512 (description "@code{pyserial} provide serial port bindings for Python. It
10513 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10514 and/or Xon/Xoff. The port is accessed in RAW mode.")
10515 (license license:bsd-3)))
10516
10517 (define-public python2-pyserial
10518 (package-with-python2 python-pyserial))
10519
10520 (define-public python-kivy
10521 (package
10522 (name "python-kivy")
10523 (version "1.9.1")
10524 (source
10525 (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "kivy" version))
10528 (file-name (string-append name "-" version ".tar.gz"))
10529 (sha256
10530 (base32
10531 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10532 (build-system python-build-system)
10533 (arguments
10534 `(#:tests? #f ; Tests require many optional packages
10535 #:phases
10536 (modify-phases %standard-phases
10537 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10538 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10539 (lambda* (#:key inputs #:allow-other-keys)
10540 (setenv "KIVY_SDL2_PATH"
10541 (string-append (assoc-ref inputs "sdl-union")
10542 "/include/SDL2"))
10543 #t)))))
10544 (native-inputs
10545 `(("pkg-config" ,pkg-config)))
10546 (inputs
10547 `(("python-cython" ,python-cython)
10548 ("gstreamer" ,gstreamer)
10549 ("mesa" ,mesa)
10550 ("sdl-union"
10551 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10552 (home-page "http://kivy.org")
10553 (synopsis
10554 "Multitouch application framework")
10555 (description
10556 "A software library for rapid development of
10557 hardware-accelerated multitouch applications.")
10558 (license license:expat)))
10559
10560 (define-public python2-kivy
10561 (package-with-python2 python-kivy))
10562
10563 (define-public python-kivy-next
10564 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10565 (revision "1"))
10566 (package (inherit python-kivy)
10567 (name "python-kivy-next")
10568 (version (string-append "1.9.1-" revision "."
10569 (string-take commit 7)))
10570 (source
10571 (origin
10572 (method git-fetch)
10573 (uri (git-reference
10574 (url "https://github.com/kivy/kivy")
10575 (commit commit)))
10576 (file-name (string-append name "-" version "-checkout"))
10577 (sha256
10578 (base32
10579 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10580
10581 (define-public python2-kivy-next
10582 (package-with-python2 python-kivy-next))
10583
10584 (define-public python-binaryornot
10585 (package
10586 (name "python-binaryornot")
10587 (version "0.4.0")
10588 (source (origin
10589 (method url-fetch)
10590 (uri (pypi-uri "binaryornot" version))
10591 (sha256
10592 (base32
10593 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10594 (build-system python-build-system)
10595 (propagated-inputs
10596 `(("python-chardet" ,python-chardet)
10597 ("python-hypothesis" ,python-hypothesis)))
10598 (home-page "https://github.com/audreyr/binaryornot")
10599 (synopsis "Package to check if a file is binary or text")
10600 (description "Ultra-lightweight pure Python package to check if a file is
10601 binary or text.")
10602 (license license:bsd-3)
10603 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10604
10605 (define-public python2-binaryornot
10606 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10607 (package (inherit base)
10608 (propagated-inputs
10609 `(("python2-enum34" ,python2-enum34)
10610 ,@(package-propagated-inputs base))))))
10611
10612 (define-public python-nltk
10613 (package
10614 (name "python-nltk")
10615 (version "3.2.1")
10616 (source (origin
10617 (method url-fetch)
10618 (uri (pypi-uri "nltk" version))
10619 (sha256
10620 (base32
10621 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10622 (build-system python-build-system)
10623 (arguments
10624 '(;; The tests require some extra resources to be downloaded.
10625 ;; TODO Try packaging these resources.
10626 #:tests? #f))
10627 (home-page "http://nltk.org/")
10628 (synopsis "Natural Language Toolkit")
10629 (description "It provides interfaces to over 50 corpora and lexical
10630 resources such as WordNet, along with a suite of text processing libraries
10631 for classification, tokenization, stemming, tagging, parsing, and semantic
10632 reasoning, wrappers for natural language processing libraries.")
10633 (license license:asl2.0)))
10634
10635 (define-public python2-nltk
10636 (package-with-python2 python-nltk))
10637
10638 (define-public python-pymongo
10639 (package
10640 (name "python-pymongo")
10641 (version "3.3.0")
10642 (source (origin
10643 (method url-fetch)
10644 (uri (pypi-uri "pymongo" version))
10645 (sha256
10646 (base32
10647 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10648 (build-system python-build-system)
10649 (propagated-inputs
10650 `(("python-certifi" ,python-certifi)))
10651 (home-page "http://github.com/mongodb/mongo-python-driver")
10652 (synopsis "Python driver for MongoDB")
10653 (description "Python driver for MongoDB.")
10654 (license license:asl2.0)))
10655
10656 (define-public python2-pymongo
10657 (package-with-python2 python-pymongo))
10658
10659 (define-public python-sh
10660 (package
10661 (name "python-sh")
10662 (version "1.11")
10663 (source (origin
10664 (method url-fetch)
10665 (uri (pypi-uri "sh" version))
10666 (sha256
10667 (base32
10668 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10669 (build-system python-build-system)
10670 (arguments
10671 `(#:tests? #f)) ; no tests
10672 (home-page "https://github.com/amoffat/sh")
10673 (synopsis "Python subprocess interface")
10674 (description "Abstracts process invocation by providing a function
10675 interface for programs.")
10676 (license license:expat)))
10677
10678 (define-public python2-sh
10679 (package-with-python2 python-sh))
10680
10681 (define-public python-consul
10682 (package
10683 (name "python-consul")
10684 (version "0.6.1")
10685 (source
10686 (origin
10687 (method url-fetch)
10688 (uri (pypi-uri "python-consul" version))
10689 (sha256
10690 (base32
10691 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10692 (build-system python-build-system)
10693 (native-inputs
10694 `(("python-pytest" ,python-pytest)
10695 ("python-requests" ,python-requests)
10696 ("python-six" ,python-six)))
10697 (home-page "https://github.com/cablehead/python-consul")
10698 (synopsis "Python client for Consul")
10699 (description
10700 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10701 discovery, monitoring and configuration.")
10702 (license license:expat)))
10703
10704 (define-public python2-consul
10705 (package-with-python2 python-consul))
10706
10707 (define-public python-schematics
10708 (package
10709 (name "python-schematics")
10710 (version "1.1.1")
10711 (source
10712 (origin
10713 (method url-fetch)
10714 (uri (string-append
10715 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10716 (file-name (string-append name "-" version ".tar.gz"))
10717 (sha256
10718 (base32
10719 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10720 (build-system python-build-system)
10721 (propagated-inputs
10722 `(("python-six" ,python-six)))
10723 (arguments
10724 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10725 ; version requirements (eg python-coveralls)
10726 (home-page "https://github.com/schematics/schematics")
10727 (synopsis "Python Data Structures for Humans")
10728 (description "Python Data Structures for Humans.")
10729 (license license:bsd-3)))
10730
10731 (define-public python2-schematics
10732 (package-with-python2 python-schematics))
10733
10734 (define-public python-publicsuffix
10735 (package
10736 (name "python-publicsuffix")
10737 (version "1.1.0")
10738 (source (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "publicsuffix" version))
10741 (sha256
10742 (base32
10743 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10744 (build-system python-build-system)
10745 (arguments
10746 `(#:tests? #f)) ; tests use the internet
10747 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10748 (synopsis "Get suffix for a domain name")
10749 (description "Get a public suffix for a domain name using the Public Suffix
10750 List.")
10751 (license license:expat)))
10752
10753 (define-public python2-publicsuffix
10754 (package-with-python2 python-publicsuffix))
10755
10756 (define-public python-publicsuffix2
10757 (package
10758 (name "python-publicsuffix2")
10759 (version "2.20160621")
10760 (source
10761 (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10764 (sha256
10765 (base32
10766 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10767 (build-system python-build-system)
10768 (arguments
10769 '(#:tests? #f)) ; The test suite requires network access.
10770 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10771 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10772 (description "Get a public suffix for a domain name using the Public Suffix
10773 List. Forked from and using the same API as the publicsuffix package.")
10774 (license (list license:expat license:mpl2.0))))
10775
10776 (define-public python2-publicsuffix2
10777 (package-with-python2 python-publicsuffix2))
10778
10779 (define-public python-url
10780 (package
10781 (name "python-url")
10782 (version "0.2.0")
10783 (source (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "url" version))
10786 (sha256
10787 (base32
10788 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10789 (build-system python-build-system)
10790 (propagated-inputs
10791 `(("python-publicsuffix" ,python-publicsuffix)))
10792 (native-inputs
10793 `(("python-coverage" ,python-coverage)
10794 ("python-nose" ,python-nose)))
10795 (arguments
10796 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10797 (home-page "http://github.com/seomoz/url-py")
10798 (synopsis "URL Parsing")
10799 (description "Library for parsing urls.")
10800 (license license:expat)
10801 (properties `((python2-variant . ,(delay python2-url))))))
10802
10803 (define-public python2-url
10804 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10805 (package (inherit base)
10806 (propagated-inputs
10807 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10808
10809 (define-public python-freezegun
10810 (package
10811 (name "python-freezegun")
10812 (version "0.3.7")
10813 (source
10814 (origin
10815 (method url-fetch)
10816 (uri (pypi-uri "freezegun" version))
10817 (sha256
10818 (base32
10819 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10820 (build-system python-build-system)
10821 (native-inputs
10822 `(("python-mock" ,python-mock)
10823 ("python-nose" ,python-nose)
10824 ("python-coverage" ,python-coverage)
10825 ("python-dateutil-2" ,python-dateutil-2)))
10826 (propagated-inputs
10827 `(("python-six" ,python-six)))
10828 (arguments
10829 `(#:phases (modify-phases %standard-phases
10830 ;; The tests are normally executed via `make test`, but the PyPi
10831 ;; package does not include the Makefile.
10832 (replace 'check
10833 (lambda _
10834 (zero? (system* "nosetests" "./tests/")))))))
10835 (home-page "https://github.com/spulec/freezegun")
10836 (synopsis "Test utility for mocking the datetime module")
10837 (description
10838 "FreezeGun is a library that allows your python tests to travel through
10839 time by mocking the datetime module.")
10840 (license license:asl2.0)))
10841
10842 (define-public python2-freezegun
10843 (package-with-python2 python-freezegun))
10844
10845
10846 (define-public python-odfpy
10847 (package
10848 (name "python-odfpy")
10849 (version "1.3.3")
10850 (source (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "odfpy" version))
10853 (sha256
10854 (base32
10855 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10856 (arguments
10857 `(#:modules ((srfi srfi-1)
10858 (guix build python-build-system)
10859 (guix build utils))
10860 #:phases
10861 (modify-phases %standard-phases
10862 (replace 'check
10863 ;; The test runner invokes python2 and python3 for test*.py.
10864 ;; To avoid having both in inputs, we replicate it here.
10865 (lambda _
10866 (every (lambda (test-file)
10867 (zero? (system* "python" test-file)))
10868 (find-files "tests" "^test.*\\.py$")))))))
10869 (build-system python-build-system)
10870 (home-page "https://github.com/eea/odfpy")
10871 (synopsis "Python API and tools to manipulate OpenDocument files")
10872 (description "Collection of libraries and utility programs written in
10873 Python to manipulate OpenDocument 1.2 files.")
10874 (license
10875 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10876 ;; number of files with other licenses.
10877 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10878
10879 (define-public python2-odfpy
10880 (package-with-python2 python-odfpy))
10881
10882 (define-public python-cachecontrol
10883 (package
10884 (name "python-cachecontrol")
10885 (version "0.11.6")
10886 (source
10887 (origin
10888 (method url-fetch)
10889 ;; Pypi does not have tests.
10890 (uri (string-append
10891 "https://github.com/ionrock/cachecontrol/archive/v"
10892 version ".tar.gz"))
10893 (file-name (string-append name "-" version ".tar.gz"))
10894 (sha256
10895 (base32
10896 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10897 (build-system python-build-system)
10898 (arguments
10899 `(#:phases
10900 (modify-phases %standard-phases
10901 (replace 'check
10902 (lambda _
10903 ;; Drop test that requires internet access.
10904 (delete-file "tests/test_regressions.py")
10905 (setenv "PYTHONPATH"
10906 (string-append (getcwd) "/build/lib:"
10907 (getenv "PYTHONPATH")))
10908 (zero? (system* "py.test" "-vv")))))))
10909 (native-inputs
10910 `(("python-pytest" ,python-pytest)
10911 ("python-redis" ,python-redis)
10912 ("python-webtest" ,python-webtest)
10913 ("python-mock" ,python-mock)))
10914 (propagated-inputs
10915 `(("python-requests" ,python-requests)
10916 ("python-lockfile" ,python-lockfile)))
10917 (home-page "https://github.com/ionrock/cachecontrol")
10918 (synopsis "The httplib2 caching algorithms for use with requests")
10919 (description "CacheControl is a port of the caching algorithms in
10920 @code{httplib2} for use with @code{requests} session objects.")
10921 (license license:asl2.0)))
10922
10923 (define-public python2-cachecontrol
10924 (package-with-python2 python-cachecontrol))
10925
10926 (define-public python-lit
10927 (package
10928 (name "python-lit")
10929 (version "0.5.0")
10930 (source
10931 (origin
10932 (method url-fetch)
10933 (uri (pypi-uri "lit" version))
10934 (sha256
10935 (base32
10936 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10937 (build-system python-build-system)
10938 (home-page "http://llvm.org/")
10939 (synopsis "LLVM Software Testing Tool")
10940 (description "@code{lit} is a portable tool for executing LLVM and Clang
10941 style test suites, summarizing their results, and providing indication of
10942 failures.")
10943 (license license:ncsa)))
10944
10945 (define-public python2-lit
10946 (package-with-python2 python-lit))
10947
10948 (define-public python-pytest-pep8
10949 (package
10950 (name "python-pytest-pep8")
10951 (version "1.0.6")
10952 (source (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "pytest-pep8" version))
10955 (sha256
10956 (base32
10957 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10958 (build-system python-build-system)
10959 (arguments
10960 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10961 (native-inputs
10962 `(("python-pytest" ,python-pytest)))
10963 (propagated-inputs
10964 `(("python-pep8" ,python-pep8)))
10965 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10966 (synopsis "Py.test plugin to check PEP8 requirements")
10967 (description "Pytest plugin for checking PEP8 compliance.")
10968 (license license:expat)))
10969
10970 (define-public python2-pytest-pep8
10971 (package-with-python2 python-pytest-pep8))
10972
10973 (define-public python-pytest-flakes
10974 (package
10975 (name "python-pytest-flakes")
10976 (version "1.0.1")
10977 (source (origin
10978 (method url-fetch)
10979 (uri (pypi-uri "pytest-flakes" version))
10980 (sha256
10981 (base32
10982 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10983 (build-system python-build-system)
10984 (arguments
10985 `(#:phases
10986 (modify-phases %standard-phases
10987 (delete 'check)
10988 (add-after 'install 'check
10989 (lambda _ ; It's easier to run tests after install.
10990 (zero? (system* "py.test" "-vv")))))))
10991 (native-inputs
10992 `(("python-coverage" ,python-coverage)
10993 ("python-pytest" ,python-pytest)
10994 ("python-pytest-cache" ,python-pytest-cache)
10995 ("python-pytest-pep8" ,python-pytest-pep8)))
10996 (propagated-inputs
10997 `(("python-pyflakes" ,python-pyflakes)))
10998 (home-page "https://github.com/fschulze/pytest-flakes")
10999 (synopsis "Py.test plugin to check source code with pyflakes")
11000 (description "Pytest plugin for checking Python source code with pyflakes.")
11001 (license license:expat)))
11002
11003 (define-public python2-pytest-flakes
11004 (package-with-python2 python-pytest-flakes))
11005
11006 (define-public python-natsort
11007 (package
11008 (name "python-natsort")
11009 (version "5.0.1")
11010 (source (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "natsort" version))
11013 (sha256
11014 (base32
11015 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11016 (build-system python-build-system)
11017 (arguments
11018 `(#:phases
11019 (modify-phases %standard-phases
11020 (add-before 'check 'set-cachedir
11021 ;; Tests require write access to $HOME by default
11022 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11023 (native-inputs
11024 `(("python-hypothesis" ,python-hypothesis)
11025 ("python-pytest-cache" ,python-pytest-cache)
11026 ("python-pytest-cov" ,python-pytest-cov)
11027 ("python-pytest-flakes" ,python-pytest-flakes)
11028 ("python-pytest-pep8" ,python-pytest-pep8)))
11029 (propagated-inputs ; TODO: Add python-fastnumbers.
11030 `(("python-pyicu" ,python-pyicu)))
11031 (home-page "https://github.com/SethMMorton/natsort")
11032 (synopsis "Natural sorting for python and shell")
11033 (description
11034 "Natsort lets you apply natural sorting on lists instead of
11035 lexicographical. If you use the built-in @code{sorted} method in python
11036 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11037 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11038 function @code{natsorted} that identifies numbers and sorts them separately
11039 from strings. It can also sort version numbers, real numbers, mixed types
11040 and more, and comes with a shell command @command{natsort} that exposes this
11041 functionality in the command line.")
11042 (license license:expat)
11043 (properties `((python2-variant . ,(delay python2-natsort))))))
11044
11045 (define-public python2-natsort
11046 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11047 (package (inherit base)
11048 (native-inputs
11049 `(("python2-pathlib" ,python2-pathlib)
11050 ("python2-mock" ,python2-mock)
11051 ("python2-enum34" ,python2-enum34)
11052 ,@(package-native-inputs base))))))
11053
11054 (define-public python-glances
11055 (package
11056 (name "python-glances")
11057 (version "2.7.1")
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "Glances" version))
11062 (sha256
11063 (base32
11064 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11065 (build-system python-build-system)
11066 (propagated-inputs
11067 `(("python-psutil" ,python-psutil)))
11068 (home-page
11069 "https://github.com/nicolargo/glances")
11070 (synopsis
11071 "A cross-platform curses-based monitoring tool")
11072 (description
11073 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11074 Glances uses the PsUtil library to get information from your system. It monitors
11075 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11076 (license license:lgpl3+)))
11077
11078 (define-public python2-glances
11079 (package-with-python2 python-glances))
11080
11081 (define-public python-graphql-core
11082 (package
11083 (name "python-graphql-core")
11084 (version "0.5.3")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "graphql-core" version))
11089 (sha256
11090 (base32
11091 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11092 (build-system python-build-system)
11093 (arguments
11094 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11095 #:phases
11096 (modify-phases %standard-phases
11097 (add-after 'unpack 'patch-hardcoded-version
11098 (lambda _ (substitute*
11099 "setup.py"
11100 (("'gevent==1.1rc1'") "'gevent'"))
11101 #t)))))
11102 (native-inputs
11103 `(("python-gevent" ,python-gevent)
11104 ("python-mock" ,python-mock)
11105 ("python-pytest-mock" ,python-pytest-mock)))
11106 (propagated-inputs
11107 `(("python-promise" ,python-promise)
11108 ("python-six" ,python-six)))
11109 (home-page "https://github.com/graphql-python/graphql-core")
11110 (synopsis "GraphQL implementation for Python")
11111 (description
11112 "GraphQL implementation for Python. GraphQL is a data query language and
11113 runtime designed and used to request and deliver data to mobile and web apps.
11114 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11115 to Python.")
11116 (license license:expat)))
11117
11118 (define-public python2-graphql-core
11119 (package-with-python2 python-graphql-core))
11120
11121 (define-public python-graphql-relay
11122 (package
11123 (name "python-graphql-relay")
11124 (version "0.4.4")
11125 (source
11126 (origin
11127 (method url-fetch)
11128 (uri (pypi-uri "graphql-relay" version))
11129 (sha256
11130 (base32
11131 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11132 (build-system python-build-system)
11133 (native-inputs
11134 `(("python-pytest" ,python-pytest)))
11135 (propagated-inputs
11136 `(("python-graphql-core" ,python-graphql-core)
11137 ("python-promise" ,python-promise)
11138 ("python-six" ,python-six)))
11139 (home-page "https://github.com/graphql-python/graphql-relay-py")
11140 (synopsis "Relay implementation for Python")
11141 (description
11142 "This is a library to allow the easy creation of Relay-compliant servers
11143 using the GraphQL Python reference implementation of a GraphQL server. It
11144 should be noted that the code is a exact port of the original
11145 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11146 from Facebook.")
11147 (license license:expat)))
11148
11149 (define-public python2-graphql-relay
11150 (package-with-python2 python-graphql-relay))
11151
11152 (define-public python-graphene
11153 (package
11154 (name "python-graphene")
11155 (version "0.10.2")
11156 (source
11157 (origin
11158 (method url-fetch)
11159 (uri (pypi-uri "graphene" version))
11160 (sha256
11161 (base32
11162 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11163 (build-system python-build-system)
11164 (native-inputs
11165 `(("python-django-filter" ,python-django-filter)
11166 ("python-mock" ,python-mock)
11167 ("python-psycopg2" ,python-psycopg2)
11168 ("python-pytest-django" ,python-pytest-django)
11169 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11170 (propagated-inputs
11171 `(("python-graphql-core" ,python-graphql-core)
11172 ("python-graphql-relay" ,python-graphql-relay)
11173 ("python-iso8601" ,python-iso8601)
11174 ("python-promise" ,python-promise)
11175 ("python-six" ,python-six)))
11176 (home-page "http://graphene-python.org/")
11177 (synopsis "GraphQL Framework for Python")
11178 (description
11179 "Graphene is a Python library for building GraphQL schemas/types.
11180 A GraphQL schema describes your data model, and provides a GraphQL server
11181 with an associated set of resolve methods that know how to fetch data.")
11182 (properties `((python2-variant . ,(delay python2-graphene))))
11183 (license license:expat)))
11184
11185 (define-public python2-graphene
11186 (let ((base (package-with-python2
11187 (strip-python2-variant python-graphene))))
11188 (package (inherit base)
11189 (native-inputs
11190 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11191 ,@(package-native-inputs base))))))
11192
11193 (define-public python-nautilus
11194 (package
11195 (name "python-nautilus")
11196 (version "0.4.9")
11197 (source
11198 (origin
11199 (method url-fetch)
11200 (uri (pypi-uri "nautilus" version))
11201 (sha256
11202 (base32
11203 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11204 (build-system python-build-system)
11205 (arguments `(#:tests? #f)) ; fails to import test modules
11206 (propagated-inputs
11207 `(("python-bcrypt" ,python-bcrypt)
11208 ("python-click" ,python-click)
11209 ("python-consul" ,python-consul)
11210 ("python-graphql-core" ,python-graphql-core)
11211 ("python-graphql-relay" ,python-graphql-relay)
11212 ("python-graphene" ,python-graphene)
11213 ("python-jinja2" ,python-jinja2)
11214 ("python-nose2" ,python-nose2)
11215 ("python-peewee" ,python-peewee)
11216 ("python-pika" ,python-pika)
11217 ("python-pycparser" ,python-pycparser)
11218 ("python-requests" ,python-requests)
11219 ("python-tornado" ,python-tornado)
11220 ("python-wtforms" ,python-wtforms)))
11221 (home-page "https://github.com/AlecAivazis/nautilus")
11222 (synopsis "Library for creating microservice applications")
11223 (description
11224 "Nautilus is a framework for flux based microservices that looks to
11225 provide extendible implementations of common aspects of a cloud so that you can
11226 focus on building massively scalable web applications.")
11227 (license license:expat)))
11228
11229 (define-public python-betamax
11230 (package
11231 (name "python-betamax")
11232 (version "0.8.0")
11233 (source
11234 (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "betamax" version))
11237 (sha256
11238 (base32
11239 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11240 (build-system python-build-system)
11241 (arguments
11242 '(;; Many tests fail because they require networking.
11243 #:tests? #f))
11244 (inputs
11245 `(("python-requests" ,python-requests)))
11246 (home-page "https://github.com/sigmavirus24/betamax")
11247 (synopsis "Record HTTP interactions with python-requests")
11248 (description "Betamax will record your test suite's HTTP interactions and
11249 replay them during future tests. It is designed to work with python-requests.")
11250 (license license:expat)))
11251
11252 (define-public python2-betamax
11253 (package-with-python2 python-betamax))
11254
11255 (define-public python-s3transfer
11256 (package
11257 (name "python-s3transfer")
11258 (version "0.1.8")
11259 (source (origin
11260 (method url-fetch)
11261 (uri (pypi-uri "s3transfer" version))
11262 (sha256
11263 (base32
11264 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11265 (build-system python-build-system)
11266 (arguments
11267 `(#:phases
11268 (modify-phases %standard-phases
11269 (replace 'check
11270 (lambda _
11271 ;; 7 of the 'integration' tests require network access or login
11272 ;; credentials.
11273 (zero? (system* "nosetests" "--exclude=integration")))))))
11274 (native-inputs
11275 `(("python-docutils" ,python-docutils)
11276 ("python-mock" ,python-mock)
11277 ("python-nose" ,python-nose)))
11278 (propagated-inputs
11279 `(("python-botocore" ,python-botocore)))
11280 (synopsis "Amazon S3 Transfer Manager")
11281 (description "S3transfer is a Python library for managing Amazon S3
11282 transfers.")
11283 (home-page "https://github.com/boto/s3transfer")
11284 (license license:asl2.0)
11285 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11286
11287 (define-public python2-s3transfer
11288 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11289 (package
11290 (inherit base)
11291 (native-inputs
11292 `(("python2-futures" ,python2-futures)
11293 ,@(package-native-inputs base))))))
11294
11295 (define-public python-setproctitle
11296 (package
11297 (name "python-setproctitle")
11298 (version "1.1.10")
11299 (source
11300 (origin
11301 (method url-fetch)
11302 (uri (pypi-uri "setproctitle" version))
11303 (sha256
11304 (base32
11305 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11306 (build-system python-build-system)
11307 (arguments
11308 '(#:phases
11309 (modify-phases %standard-phases
11310 (add-before 'check 'patch-Makefile
11311 ;; Stricly this is only required for the python2 variant.
11312 ;; But adding a phase in an inherited package seems to be
11313 ;; cumbersum. So we patch even for python3.
11314 (lambda _
11315 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11316 (when nose
11317 (substitute* "Makefile"
11318 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11319 (string-append nose "/bin/nosetests "))))
11320 #t)))
11321 (replace 'check
11322 (lambda _
11323 (setenv "PYTHON" (or (which "python3") (which "python")))
11324 (setenv "PYCONFIG" (or (which "python3-config")
11325 (which "python-config")))
11326 (setenv "CC" "gcc")
11327 ;; No need to extend PYTHONPATH to find the built package, since
11328 ;; the Makefile will build anyway
11329 (zero? (system* "make" "check")))))))
11330 (native-inputs
11331 `(("procps" ,procps))) ; required for tests
11332 (home-page
11333 "https://github.com/dvarrazzo/py-setproctitle")
11334 (synopsis
11335 "Setproctitle implementation for Python to customize the process title")
11336 (description "The library allows a process to change its title (as displayed
11337 by system tools such as ps and top).
11338
11339 Changing the title is mostly useful in multi-process systems, for
11340 example when a master process is forked: changing the children's title
11341 allows to identify the task each process is busy with. The technique
11342 is used by PostgreSQL and the OpenSSH Server for example.")
11343 (license license:bsd-3)
11344 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11345
11346 (define-public python2-setproctitle
11347 (let ((base (package-with-python2
11348 (strip-python2-variant python-setproctitle))))
11349 (package
11350 (inherit base)
11351 (native-inputs `(("python2-nose" ,python2-nose)
11352 ,@(package-native-inputs base))))))
11353
11354 (define-public python-validictory
11355 (package
11356 (name "python-validictory")
11357 (version "1.0.1")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (pypi-uri "validictory" version))
11362 (sha256
11363 (base32
11364 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11365 (build-system python-build-system)
11366 (arguments
11367 '(#:phases
11368 (modify-phases %standard-phases
11369 (add-after 'unpack 'bootstrap
11370 ;; Move the tests out of the package directory to avoid
11371 ;; packaging them.
11372 (lambda* _
11373 (rename-file "validictory/tests" "tests")
11374 (delete-file "tests/__init__.py")))
11375 (replace 'check
11376 (lambda _
11377 ;; Extend PYTHONPATH so the built package will be found.
11378 (setenv "PYTHONPATH"
11379 (string-append (getcwd) "/build/lib:"
11380 (getenv "PYTHONPATH")))
11381 (zero? (system* "py.test" "-vv" )))))))
11382 (native-inputs
11383 `(("python-pytest" ,python-pytest)))
11384 (home-page
11385 "https://github.com/jamesturk/validictory")
11386 (synopsis "General purpose Python data validator")
11387 (description "It allows validation of arbitrary Python data structures.
11388
11389 The schema format is based on the JSON Schema
11390 proposal (http://json-schema.org), so combined with json the library is also
11391 useful as a validator for JSON data.")
11392 (license license:expat)))
11393
11394 (define-public python2-validictory
11395 (package-with-python2 python-validictory))
11396
11397 (define-public python-aniso8601
11398 (package
11399 (name "python-aniso8601")
11400 (version "1.1.0")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "aniso8601" version))
11405 (sha256
11406 (base32
11407 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11408 (build-system python-build-system)
11409 (propagated-inputs
11410 `(("python-dateutil-2" ,python-dateutil-2)))
11411 (home-page
11412 "https://bitbucket.org/nielsenb/aniso8601")
11413 (synopsis
11414 "Python library for parsing ISO 8601 strings")
11415 (description
11416 "This package contains a library for parsing ISO 8601 datetime strings.")
11417 (license license:bsd-3)))
11418
11419 (define-public python-flask-restful
11420 (package
11421 (name "python-flask-restful")
11422 (version "0.3.5")
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (pypi-uri "Flask-RESTful" version))
11427 (sha256
11428 (base32
11429 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11430 (build-system python-build-system)
11431 (propagated-inputs
11432 `(("python-aniso8601" ,python-aniso8601)
11433 ("python-flask" ,python-flask)
11434 ("python-pycrypto" ,python-pycrypto)
11435 ("python-pytz" ,python-pytz)))
11436 (native-inputs
11437 `(;; Optional dependency of Flask. Tests need it.
11438 ("python-blinker" ,python-blinker)
11439 ("python-mock" ,python-mock) ; For tests
11440 ("python-nose" ,python-nose) ; For tests
11441 ("python-sphinx" ,python-sphinx)))
11442 (home-page
11443 "https://www.github.com/flask-restful/flask-restful/")
11444 (synopsis
11445 "Flask module for creating REST APIs")
11446 (description
11447 "This package contains a Flask module for creating REST APIs.")
11448 (license license:bsd-3)))
11449
11450 (define-public python-flask-basicauth
11451 (package
11452 (name "python-flask-basicauth")
11453 (version "0.2.0")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (pypi-uri "Flask-BasicAuth" version))
11458 (sha256
11459 (base32
11460 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11461 (build-system python-build-system)
11462 (propagated-inputs
11463 `(("python-flask" ,python-flask)))
11464 (home-page
11465 "https://github.com/jpvanhal/flask-basicauth")
11466 (synopsis
11467 "HTTP basic access authentication for Flask")
11468 (description
11469 "This package provides HTTP basic access authentication for Flask.")
11470 (license license:bsd-3)))
11471
11472 (define-public python-flask-sqlalchemy
11473 (package
11474 (name "python-flask-sqlalchemy")
11475 (version "2.1")
11476 (source
11477 (origin
11478 (method url-fetch)
11479 (uri (pypi-uri "Flask-SQLAlchemy" version))
11480 (sha256
11481 (base32
11482 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11483 (build-system python-build-system)
11484 (propagated-inputs
11485 `(("python-flask" ,python-flask)
11486 ("python-sqlalchemy" ,python-sqlalchemy)))
11487 (home-page
11488 "http://github.com/mitsuhiko/flask-sqlalchemy")
11489 (synopsis
11490 "Module adding SQLAlchemy support to your Flask application")
11491 (description
11492 "This package adds SQLAlchemy support to your Flask application.")
11493 (license license:bsd-3)))
11494
11495 (define-public python-pyev
11496 (package
11497 (name "python-pyev")
11498 (version "0.9.0")
11499 (source
11500 (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "pyev" version))
11503 (sha256
11504 (base32
11505 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11506 (build-system python-build-system)
11507 (arguments
11508 `(#:tests? #f ; no test suite
11509 #:phases
11510 (modify-phases %standard-phases
11511 (add-after 'unpack 'patch
11512 (lambda* (#:key inputs #:allow-other-keys)
11513 (let ((libev (string-append (assoc-ref inputs "libev")
11514 "/lib/libev.so.4")))
11515 (substitute* "setup.py"
11516 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11517 (string-append "libev_dll_name = \"" libev "\"")))))))))
11518 (inputs
11519 `(("libev" ,libev)))
11520 (home-page "http://pythonhosted.org/pyev/")
11521 (synopsis "Python libev interface")
11522 (description "Pyev provides a Python interface to libev.")
11523 (license license:gpl3)))
11524
11525 (define-public python2-pyev
11526 (package-with-python2 python-pyev))
11527
11528 (define-public python-imagesize
11529 (package
11530 (name "python-imagesize")
11531 (version "0.7.1")
11532 (source
11533 (origin
11534 (method url-fetch)
11535 (uri (pypi-uri "imagesize" version))
11536 (sha256
11537 (base32
11538 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11539 (build-system python-build-system)
11540 (arguments
11541 '(;; Test files are not distributed on PyPi:
11542 ;; https://github.com/shibukawa/imagesize_py/issues/7
11543 #:tests? #f))
11544 (home-page "https://github.com/shibukawa/imagesize_py")
11545 (synopsis "Gets image size of files in variaous formats in Python")
11546 (description
11547 "This package allows determination of image size from
11548 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11549 (license license:expat)))
11550
11551 (define-public python2-imagesize
11552 (package-with-python2 python-imagesize))
11553
11554 (define-public python-axolotl-curve25519
11555 (package
11556 (name "python-axolotl-curve25519")
11557 (version "0.1")
11558 (source
11559 (origin
11560 (method git-fetch)
11561 (uri (git-reference
11562 (url "git://github.com/tgalal/python-axolotl-curve25519")
11563 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11564 (file-name (string-append name "-" version "-checkout"))
11565 (sha256
11566 (base32
11567 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11568 (build-system python-build-system)
11569 (arguments
11570 `(;; Prevent creation of the egg. This works around
11571 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11572 #:configure-flags '("--root=/")))
11573 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11574 (synopsis "Python wrapper for curve25519 library")
11575 (description "This is a python wrapper for the curve25519 library
11576 with ed25519 signatures. The C code was pulled from
11577 libaxolotl-android. At the moment this wrapper is meant for use by
11578 python-axolotl.")
11579 (license (list license:gpl3 ; Most files
11580 license:bsd-3)))) ; curve/curve25519-donna.c
11581
11582 (define-public python2-axolotl-curve25519
11583 (package-with-python2 python-axolotl-curve25519))
11584
11585 (define-public python-axolotl
11586 (package
11587 (name "python-axolotl")
11588 (version "0.1.35")
11589 (source
11590 (origin
11591 (method url-fetch)
11592 (uri (string-append
11593 "https://github.com/tgalal/python-axolotl/archive/"
11594 version ".tar.gz"))
11595 (file-name (string-append name "-" version ".tar.gz"))
11596 (sha256
11597 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11598 (build-system python-build-system)
11599 (arguments
11600 `(#:phases
11601 (modify-phases %standard-phases
11602 ;; Don't install tests
11603 (add-before 'install 'remove-tests
11604 (lambda _
11605 (for-each delete-file-recursively
11606 '("axolotl/tests" "build/lib/axolotl/tests"))
11607 #t)))
11608 ;; Prevent creation of the egg. This works around
11609 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11610 #:configure-flags '("--root=/")))
11611 (propagated-inputs
11612 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11613 ("python-dateutil" ,python-dateutil)
11614 ("python-protobuf" ,python-protobuf)
11615 ("python-pycrypto" ,python-pycrypto)))
11616 (home-page "https://github.com/tgalal/python-axolotl")
11617 (synopsis "Python port of libaxolotl-android")
11618 (description "This is a python port of libaxolotl-android. This
11619 is a ratcheting forward secrecy protocol that works in synchronous and
11620 asynchronous messaging environments.")
11621 (license license:gpl3)))
11622
11623 (define-public python2-axolotl
11624 (package-with-python2 python-axolotl))
11625
11626 (define-public python-termstyle
11627 (package
11628 (name "python-termstyle")
11629 (version "0.1.11")
11630 (source
11631 (origin
11632 (method url-fetch)
11633 (uri (pypi-uri "termstyle" version))
11634 (sha256
11635 (base32
11636 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11637 (build-system python-build-system)
11638 (home-page "http://github.com/gfxmonk/termstyle")
11639 (synopsis "Console text coloring for Python")
11640 (description "This package provides console text coloring for Python.")
11641 (license license:bsd-3)))
11642
11643 (define-public python-rednose
11644 (package
11645 (name "python-rednose")
11646 (version "1.2.1")
11647 (source
11648 (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "rednose" version))
11651 (sha256
11652 (base32
11653 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11654 (build-system python-build-system)
11655 (arguments
11656 `(#:phases
11657 (modify-phases %standard-phases
11658 (add-after 'unpack 'fix-deps
11659 (lambda _
11660 ;; See <https://github.com/JBKahn/rednose/issues/12>
11661 (substitute* "setup.py"
11662 (("python-termstyle") "termstyle"))
11663 #t)))))
11664 (propagated-inputs
11665 `(("python-colorama" ,python-colorama)
11666 ("python-termstyle" ,python-termstyle)))
11667 (native-inputs
11668 `(("python-six" ,python-six)
11669 ("python-nose" ,python-nose)))
11670 (home-page "https://github.com/JBKahn/rednose")
11671 (synopsis "Colored output for Python nosetests")
11672 (description "This package provides colored output for the
11673 @command{nosetests} command of the Python Nose unit test framework.")
11674 (license license:bsd-3)))
11675
11676 (define-public python-flask-restplus
11677 (package
11678 (name "python-flask-restplus")
11679 (version "0.9.2")
11680 (source
11681 (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "flask-restplus" version))
11684 (sha256
11685 (base32
11686 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11687 (build-system python-build-system)
11688 (propagated-inputs
11689 `(("python-aniso8601" ,python-aniso8601)
11690 ("python-flask" ,python-flask)
11691 ("python-jsonschema" ,python-jsonschema)
11692 ("python-pytz" ,python-pytz)
11693 ("python-six" ,python-six)))
11694 (native-inputs
11695 `(("python-tzlocal" ,python-tzlocal)
11696 ("python-blinker" ,python-blinker)
11697 ("python-nose" ,python-nose)
11698 ("python-rednose" ,python-rednose)))
11699 (home-page "https://github.com/noirbizarre/flask-restplus")
11700 (synopsis "Framework for documented API development with Flask")
11701 (description "This package provides a framework for API development with
11702 the Flask web framework in Python. It is similar to package
11703 @code{python-flask-restful} but supports the @code{python-swagger}
11704 documentation builder.")
11705 (license license:expat)))