projects/guix·blob version-0.12.0 · refs

11954 lines · 424.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <[email protected]>
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <[email protected]>
5;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
6;;; Copyright © 2014 Eric Bavier <[email protected]>
7;;; Copyright © 2014, 2015 Federico Beffa <[email protected]>
8;;; Copyright © 2015 Omar Radwan <[email protected]>
9;;; Copyright © 2015 Pierre-Antoine Rault <[email protected]>
10;;; Copyright © 2015, 2016 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <[email protected]>
12;;; Copyright © 2015 Eric Dvorsak <[email protected]>
13;;; Copyright © 2015, 2016 David Thompson <[email protected]>
14;;; Copyright © 2015, 2016 Leo Famulari <[email protected]>
15;;; Copyright © 2015 Ben Woodcroft <[email protected]>
16;;; Copyright © 2015, 2016 Erik Edrosa <[email protected]>
17;;; Copyright © 2015, 2016 Efraim Flashner <[email protected]>
18;;; Copyright © 2015 Kyle Meyer <[email protected]>
19;;; Copyright © 2015, 2016 Chris Marusich <[email protected]>
20;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
21;;; Copyright © 2016 Lukas Gradl <[email protected]>
22;;; Copyright © 2016 Hartmut Goebel <[email protected]>
23;;; Copyright © 2016 Daniel Pimentel <[email protected]>
24;;; Copyright © 2016 Sou Bunnbu <[email protected]>
25;;; Copyright © 2016 Troy Sankey <[email protected]>
26;;; Copyright © 2016 ng0 <[email protected]>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
28;;; Copyright © 2016 David Craven <[email protected]>
29;;; Copyright © 2016 Marius Bakke <[email protected]>
30;;; Copyright © 2016 Stefan Reichoer <[email protected]>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
32;;; Copyright © 2016 Alex Vong <[email protected]>
33;;; Copyright © 2016 Arun Isaac <[email protected]>
34;;; Copyright © 2016 Julien Lepiller <[email protected]>
35;;; Copyright © 2016 Tobias Geerinckx-Rice <[email protected]>
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52(define-module (gnu packages python)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages adns)
57 #:use-module (gnu packages attr)
58 #:use-module (gnu packages backup)
59 #:use-module (gnu packages bash)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages django)
63 #:use-module (gnu packages file)
64 #:use-module (gnu packages fontutils)
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages ghostscript)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages gstreamer)
70 #:use-module (gnu packages gtk)
71 #:use-module (gnu packages icu4c)
72 #:use-module (gnu packages image)
73 #:use-module (gnu packages imagemagick)
74 #:use-module (gnu packages libevent)
75 #:use-module (gnu packages libffi)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages maths)
78 #:use-module (gnu packages multiprecision)
79 #:use-module (gnu packages networking)
80 #:use-module (gnu packages ncurses)
81 #:use-module (gnu packages openstack)
82 #:use-module (gnu packages password-utils)
83 #:use-module (gnu packages pcre)
84 #:use-module (gnu packages perl)
85 #:use-module (gnu packages pkg-config)
86 #:use-module (gnu packages protobuf)
87 #:use-module (gnu packages readline)
88 #:use-module (gnu packages sdl)
89 #:use-module (gnu packages statistics)
90 #:use-module (gnu packages tex)
91 #:use-module (gnu packages texinfo)
92 #:use-module (gnu packages tls)
93 #:use-module (gnu packages version-control)
94 #:use-module (gnu packages video)
95 #:use-module (gnu packages web)
96 #:use-module (gnu packages base)
97 #:use-module (gnu packages xml)
98 #:use-module (gnu packages xorg)
99 #:use-module (gnu packages xdisorg)
100 #:use-module (gnu packages zip)
101 #:use-module (gnu packages tcl)
102 #:use-module (gnu packages bdw-gc)
103 #:use-module (guix packages)
104 #:use-module (guix download)
105 #:use-module (guix git-download)
106 #:use-module (guix utils)
107 #:use-module (guix build-system gnu)
108 #:use-module (guix build-system cmake)
109 #:use-module (guix build-system python)
110 #:use-module (guix build-system trivial)
111 #:use-module (srfi srfi-1))
112
113(define-public python-2.7
114 (package
115 (name "python")
116 (version "2.7.12")
117 (source
118 (origin
119 (method url-fetch)
120 (uri (string-append "https://www.python.org/ftp/python/"
121 version "/Python-" version ".tar.xz"))
122 (sha256
123 (base32
124 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
125 (patches (search-patches "python-2.7-search-paths.patch"
126 "python-2-deterministic-build-info.patch"
127 "python-2.7-site-prefixes.patch"
128 "python-2.7-source-date-epoch.patch"))
129 (modules '((guix build utils)))
130 ;; suboptimal to delete failing tests here, but if we delete them in the
131 ;; arguments then we need to make sure to strip out that phase when it
132 ;; gets inherited by python and python-minimal.
133 (snippet
134 '(begin
135 (for-each delete-file
136 '("Lib/test/test_compileall.py"
137 "Lib/test/test_ctypes.py" ; fails on mips64el
138 "Lib/test/test_distutils.py"
139 "Lib/test/test_import.py"
140 "Lib/test/test_shutil.py"
141 "Lib/test/test_socket.py"
142 "Lib/test/test_subprocess.py"))
143 #t))))
144 (outputs '("out"
145 "tk")) ;tkinter; adds 50 MiB to the closure
146 (build-system gnu-build-system)
147 (arguments
148 `(;; 356 tests OK.
149 ;; 6 tests failed:
150 ;; test_compileall test_distutils test_import test_shutil test_socket
151 ;; test_subprocess
152 ;; 39 tests skipped:
153 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
154 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
155 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
156 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
157 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
158 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
159 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
160 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
161 ;; test_winreg test_winsound test_zipfile64
162 ;; 4 skips unexpected on linux2:
163 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
164 #:test-target "test"
165 #:configure-flags
166 (list "--enable-shared" ;allow embedding
167 "--with-system-ffi" ;build ctypes
168 "--with-ensurepip=install" ;install pip and setuptools
169 (string-append "LDFLAGS=-Wl,-rpath="
170 (assoc-ref %outputs "out") "/lib"))
171
172 #:modules ((ice-9 ftw) (ice-9 match)
173 (guix build utils) (guix build gnu-build-system))
174 #:phases
175 (modify-phases %standard-phases
176 (add-before
177 'configure 'patch-lib-shells
178 (lambda _
179 ;; Filter for existing files, since some may not exist in all
180 ;; versions of python that are built with this recipe.
181 (substitute* (filter file-exists?
182 '("Lib/subprocess.py"
183 "Lib/popen2.py"
184 "Lib/distutils/tests/test_spawn.py"
185 "Lib/test/test_subprocess.py"))
186 (("/bin/sh") (which "sh")))
187
188 ;; Use zero as the timestamp in .pyc files so that builds are
189 ;; deterministic. TODO: Remove it when this variable is set in
190 ;; gnu-build-system.scm.
191 (setenv "SOURCE_DATE_EPOCH" "1")
192 #t))
193 (add-before 'configure 'do-not-record-configure-flags
194 (lambda* (#:key configure-flags #:allow-other-keys)
195 ;; Remove configure flags from the installed '_sysconfigdata.py'
196 ;; and 'Makefile' so we don't end up keeping references to the
197 ;; build tools.
198 ;;
199 ;; Preserve at least '--with-system-ffi' since otherwise the
200 ;; thing tries to build libffi, fails, and we end up with a
201 ;; Python that lacks ctypes.
202 (substitute* "configure"
203 (("^CONFIG_ARGS=.*$")
204 (format #f "CONFIG_ARGS='~a'\n"
205 (if (member "--with-system-ffi" configure-flags)
206 "--with-system-ffi"
207 ""))))
208 #t))
209 (add-before
210 'check 'pre-check
211 (lambda _
212 ;; 'Lib/test/test_site.py' needs a valid $HOME
213 (setenv "HOME" (getcwd))
214 #t))
215 (add-after
216 'unpack 'set-source-file-times-to-1980
217 ;; XXX One of the tests uses a ZIP library to pack up some of the
218 ;; source tree, and fails with "ZIP does not support timestamps
219 ;; before 1980". Work around this by setting the file times in the
220 ;; source tree to sometime in early 1980.
221 (lambda _
222 (let ((circa-1980 (* 10 366 24 60 60)))
223 (ftw "." (lambda (file stat flag)
224 (utime file circa-1980 circa-1980)
225 #t))
226 #t)))
227 (add-after 'install 'remove-tests
228 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
229 ;; because these files are used by some libraries out there.
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 (match (scandir (string-append out "/lib")
233 (lambda (name)
234 (string-prefix? "python" name)))
235 ((pythonX.Y)
236 (let ((testdir (string-append out "/lib/" pythonX.Y
237 "/test")))
238 (with-directory-excursion testdir
239 (for-each delete-file-recursively
240 (scandir testdir
241 (match-lambda
242 ((or "." "..") #f)
243 (file
244 (not
245 (string-prefix? "test_support."
246 file))))))
247 (call-with-output-file "__init__.py" (const #t))
248 #t)))))))
249 (add-before 'strip 'make-libraries-writable
250 (lambda* (#:key outputs #:allow-other-keys)
251 ;; Make .so files writable so they can be stripped.
252 (let ((out (assoc-ref outputs "out")))
253 (for-each (lambda (file)
254 (chmod file #o755))
255 (find-files (string-append out "/lib")
256 "\\.so"))
257 #t)))
258 (add-after 'install 'move-tk-inter
259 (lambda* (#:key outputs #:allow-other-keys)
260 ;; When Tkinter support is built move it to a separate output so
261 ;; that the main output doesn't contain a reference to Tcl/Tk.
262 (let ((out (assoc-ref outputs "out"))
263 (tk (assoc-ref outputs "tk")))
264 (when tk
265 (match (find-files out "tkinter.*\\.so")
266 ((tkinter.so)
267 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
268 ;; want it under TK/lib/pythonX.Y/site-packages.
269 (let* ((len (string-length out))
270 (target (string-append
271 tk "/"
272 (string-drop
273 (dirname (dirname tkinter.so))
274 len)
275 "/site-packages")))
276 (install-file tkinter.so target)
277 (delete-file tkinter.so)))))
278 #t))))))
279 (inputs
280 `(("bzip2" ,bzip2)
281 ("gdbm" ,gdbm)
282 ("libffi" ,libffi) ; for ctypes
283 ("sqlite" ,sqlite) ; for sqlite extension
284 ("openssl" ,openssl)
285 ("readline" ,readline)
286 ("zlib" ,zlib)
287 ("tcl" ,tcl)
288 ("tk" ,tk))) ; for tkinter
289 (native-inputs
290 `(("pkg-config" ,pkg-config)))
291 (native-search-paths
292 (list (search-path-specification
293 (variable "PYTHONPATH")
294 (files '("lib/python2.7/site-packages")))))
295 (home-page "https://www.python.org")
296 (synopsis "High-level, dynamically-typed programming language")
297 (description
298 "Python is a remarkably powerful dynamic programming language that
299is used in a wide variety of application domains. Some of its key
300distinguishing features include: clear, readable syntax; strong
301introspection capabilities; intuitive object orientation; natural
302expression of procedural code; full modularity, supporting hierarchical
303packages; exception-based error handling; and very high level dynamic
304data types.")
305 (license license:psfl)))
306
307;; Current 2.x version.
308(define-public python-2 python-2.7)
309
310(define-public python-3.5
311 (package (inherit python-2)
312 (version "3.5.2")
313 (source (origin
314 (method url-fetch)
315 (uri (string-append "https://www.python.org/ftp/python/"
316 version "/Python-" version ".tar.xz"))
317 (patches (search-patches
318 "python-fix-tests.patch"
319 "python-3.5-fix-tests.patch"
320 "python-3-deterministic-build-info.patch"
321 "python-3-search-paths.patch"))
322 (patch-flags '("-p0"))
323 (sha256
324 (base32
325 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
326 (arguments (substitute-keyword-arguments (package-arguments python-2)
327 ((#:tests? _) #t)))
328 (native-search-paths
329 (list (search-path-specification
330 (variable "PYTHONPATH")
331 (files (list (string-append "lib/python"
332 (version-major+minor version)
333 "/site-packages"))))))))
334
335(define-public python-3.4
336 (package (inherit python-3.5)
337 (version "3.4.5")
338 (source (origin
339 (method url-fetch)
340 (uri (string-append "https://www.python.org/ftp/python/"
341 version "/Python-" version ".tar.xz"))
342 (patches (search-patches
343 "python-fix-tests.patch"
344 "python-3.4-fix-tests.patch"
345 "python-3-deterministic-build-info.patch"
346 "python-3-search-paths.patch"))
347 (patch-flags '("-p0"))
348 (sha256
349 (base32
350 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
351
352;; Current 3.x version.
353(define-public python-3 python-3.5)
354
355;; Current major version.
356(define-public python python-3)
357
358;; Minimal variants of Python, mostly used to break the cycle between Tk and
359;; Python (Tk -> libxcb -> Python.)
360
361(define-public python2-minimal
362 (package (inherit python-2)
363 (name "python-minimal")
364 (outputs '("out"))
365 (arguments
366 (substitute-keyword-arguments (package-arguments python-2)
367 ((#:configure-flags cf)
368 `(append ,cf '("--without-system-ffi")))))
369 (inputs '()))) ;none of the optional dependencies
370
371(define-public python-minimal
372 (package (inherit python)
373 (name "python-minimal")
374 (outputs '("out"))
375
376 ;; Build fails due to missing ctypes without libffi.
377 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
378 ;; zlib is required by 'zipimport', used by pip.
379 (inputs `(("libffi" ,libffi)
380 ("openssl" ,openssl)
381 ("zlib" ,zlib)))))
382
383(define* (wrap-python3 python
384 #:optional
385 (name (string-append (package-name python) "-wrapper")))
386 (package (inherit python)
387 (name name)
388 (source #f)
389 (build-system trivial-build-system)
390 (outputs '("out"))
391 (inputs `(("bash" ,bash)))
392 (propagated-inputs `(("python" ,python)))
393 (arguments
394 `(#:modules ((guix build utils))
395 #:builder
396 (begin
397 (use-modules (guix build utils))
398 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
400 (mkdir-p bin)
401 (for-each
402 (lambda (old new)
403 (symlink (string-append python old)
404 (string-append bin "/" new)))
405 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
406 `("python" ,"pydoc" ,"idle" ,"pip"))
407 ;; python-config outputs search paths based upon its location,
408 ;; use a bash wrapper to avoid changing its outputs.
409 (let ((bash (string-append (assoc-ref %build-inputs "bash")
410 "/bin/bash"))
411 (old (string-append python "python3-config"))
412 (new (string-append bin "/python-config")))
413 (with-output-to-file new
414 (lambda ()
415 (format #t "#!~a~%" bash)
416 (format #t "exec \"~a\" \"$@\"~%" old)
417 (chmod new #o755)
418 #t)))))))
419 (synopsis "Wrapper for the Python 3 commands")
420 (description
421 "This package provides wrappers for the commands of Python@tie{}3.x such
422that they can be invoked under their usual name---e.g., @command{python}
423instead of @command{python3}.")))
424
425(define-public python-wrapper (wrap-python3 python))
426(define-public python-minimal-wrapper (wrap-python3 python-minimal))
427
428(define-public python-psutil
429 (package
430 (name "python-psutil")
431 (version "4.3.0")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (pypi-uri "psutil" version))
436 (sha256
437 (base32
438 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
439 (build-system python-build-system)
440 (home-page "https://www.github.com/giampaolo/psutil")
441 (synopsis "Library for retrieving information on running processes")
442 (description
443 "psutil (Python system and process utilities) is a library for retrieving
444information on running processes and system utilization (CPU, memory, disks,
445network) in Python. It is useful mainly for system monitoring, profiling and
446limiting process resources and management of running processes. It implements
447many functionalities offered by command line tools such as: ps, top, lsof,
448netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
449pidof, tty, taskset, pmap.")
450 (license license:bsd-3)))
451
452(define-public python2-psutil
453 (package-with-python2 python-psutil))
454
455(define-public python-passlib
456 (package
457 (name "python-passlib")
458 (version "1.7.0")
459 (source
460 (origin
461 (method url-fetch)
462 (uri (pypi-uri "passlib" version))
463 (sha256
464 (base32
465 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
466 (build-system python-build-system)
467 (native-inputs
468 `(("python-nose" ,python-nose)))
469 (propagated-inputs
470 `(("python-py-bcrypt" ,python-py-bcrypt)))
471 (arguments
472 `(#:phases
473 (alist-cons-before
474 'check 'set-PYTHON_EGG_CACHE
475 ;; some tests require access to "$HOME/.cython"
476 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
477 %standard-phases)))
478 (home-page "https://bitbucket.org/ecollins/passlib")
479 (synopsis
480 "Comprehensive password hashing framework")
481 (description
482 "Passlib is a password hashing library for Python 2 & 3, which provides
483cross-platform implementations of over 30 password hashing algorithms, as well
484as a framework for managing existing password hashes. It's designed to be
485useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
486to providing full-strength password hashing for multi-user application.")
487 (license license:bsd-3)))
488
489(define-public python2-passlib
490 (package-with-python2 python-passlib))
491
492(define-public python-py-bcrypt
493 (package
494 (name "python-py-bcrypt")
495 (version "0.4")
496 (source
497 (origin
498 (method url-fetch)
499 (uri (string-append
500 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
501 version
502 ".tar.gz"))
503 (sha256
504 (base32
505 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
506 (build-system python-build-system)
507 (home-page "https://code.google.com/p/py-bcrypt")
508 (synopsis
509 "Bcrypt password hashing and key derivation")
510 (description
511 "A python wrapper of OpenBSD's Blowfish password hashing code. This
512system hashes passwords using a version of Bruce Schneier's Blowfish block
513cipher with modifications designed to raise the cost of off-line password
514cracking and frustrate fast hardware implementation. The computation cost of
515the algorithm is parametised, so it can be increased as computers get faster.
516The intent is to make a compromise of a password database less likely to
517result in an attacker gaining knowledge of the plaintext passwords (e.g. using
518John the Ripper).")
519 ;; "sha2.c" is under BSD-3;
520 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
521 ;; the rest is under ISC.
522 (license (list license:isc license:bsd-3 license:bsd-4))))
523
524(define-public python2-py-bcrypt
525 (package-with-python2 python-py-bcrypt))
526
527
528(define-public python-paramiko
529 (package
530 (name "python-paramiko")
531 (version "1.16.0")
532 (source
533 (origin
534 (method url-fetch)
535 (uri (pypi-uri "paramiko" version))
536 (sha256
537 (base32
538 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
539 (build-system python-build-system)
540 (propagated-inputs
541 `(("python-pycrypto" ,python-pycrypto)
542 ("python-ecdsa" ,python-ecdsa)))
543 (home-page "http://www.paramiko.org/")
544 (synopsis "SSHv2 protocol library")
545 (description "Paramiko is a python implementation of the SSHv2 protocol,
546providing both client and server functionality. While it leverages a Python C
547extension for low level cryptography (PyCrypto), Paramiko itself is a pure
548Python interface around SSH networking concepts.")
549 (license license:lgpl2.1+)))
550
551(define-public python2-paramiko
552 (package-with-python2 python-paramiko))
553
554
555(define-public python-httplib2
556 (package
557 (name "python-httplib2")
558 (version "0.9.2")
559 (source
560 (origin
561 (method url-fetch)
562 (uri (pypi-uri "httplib2" version))
563 (sha256
564 (base32
565 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
566 (build-system python-build-system)
567 (home-page "https://github.com/jcgregorio/httplib2")
568 (synopsis "Comprehensive HTTP client library")
569 (description
570 "A comprehensive HTTP client library supporting many features left out of
571other HTTP libraries.")
572 (license license:expat)))
573
574(define-public python2-httplib2
575 (package-with-python2 python-httplib2))
576
577(define-public python-ecdsa
578 (package
579 (name "python-ecdsa")
580 (version "0.13")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (string-append
585 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
586 version
587 ".tar.gz"))
588 (sha256
589 (base32
590 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
591 (build-system python-build-system)
592 (inputs
593 `(("openssl" ,openssl)))
594 (home-page
595 "http://github.com/warner/python-ecdsa")
596 (synopsis
597 "ECDSA cryptographic signature library (pure python)")
598 (description
599 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
600Curve Digital Signature Algorithm), implemented purely in Python. With this
601library, you can quickly create keypairs (signing key and verifying key), sign
602messages, and verify the signatures. The keys and signatures are very short,
603making them easy to handle and incorporate into other protocols.")
604 (license license:expat)))
605
606(define-public python2-ecdsa
607 (package-with-python2 python-ecdsa))
608
609(define-public python-ccm
610 (package
611 (name "python-ccm")
612 (version "2.1.6")
613 (source
614 (origin
615 (method url-fetch)
616 (uri (pypi-uri "ccm" version))
617 (sha256
618 (base32
619 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
620 (build-system python-build-system)
621 (propagated-inputs
622 `(("python-pyyaml" ,python-pyyaml)
623 ;; Not listed in setup.py, but used in ccmlib/node.py for full
624 ;; functionality
625 ("python-psutil" ,python-psutil)
626 ("python-six" ,python-six)))
627 (home-page "https://github.com/pcmanus/ccm")
628 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
629localhost")
630 (description "Cassandra Cluster Manager is a development tool for testing
631local Cassandra clusters. It creates, launches and removes Cassandra clusters
632on localhost.")
633 (license license:asl2.0)))
634
635(define-public python2-ccm
636 (package-with-python2 python-ccm))
637
638(define-public python-pytz
639 (package
640 (name "python-pytz")
641 (version "2016.3")
642 (source
643 (origin
644 (method url-fetch)
645 (uri (pypi-uri "pytz" version ".tar.bz2"))
646 (sha256
647 (base32
648 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
649 (build-system python-build-system)
650 (arguments `(#:tests? #f)) ; no test target
651 (home-page "http://pythonhosted.org/pytz")
652 (synopsis "Python timezone library")
653 (description
654 "This library allows accurate and cross platform timezone calculations
655using Python 2.4 or higher and provides access to the Olson timezone database.")
656 (license license:expat)))
657
658(define-public python2-pytz
659 (package-with-python2 python-pytz))
660
661
662(define-public python-babel
663 (package
664 (name "python-babel")
665 (version "2.3.2")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "Babel" version))
670 (sha256
671 (base32
672 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
673 (build-system python-build-system)
674 (propagated-inputs
675 `(("python-pytz" ,python-pytz)))
676 (arguments `(#:tests? #f)) ; no test target
677 (home-page "http://babel.pocoo.org/")
678 (synopsis
679 "Tools for internationalizing Python applications")
680 (description
681 "Babel is composed of two major parts:
682- tools to build and work with gettext message catalogs
683- a Python interface to the CLDR (Common Locale Data Repository), providing
684access to various locale display names, localized number and date formatting,
685etc. ")
686 (license license:bsd-3)))
687
688(define-public python2-babel
689 (package-with-python2 python-babel))
690
691(define-public python2-backport-ssl-match-hostname
692 (package
693 (name "python2-backport-ssl-match-hostname")
694 (version "3.5.0.1")
695 (source
696 (origin
697 (method url-fetch)
698 (uri (string-append
699 "https://pypi.python.org/packages/source/b/"
700 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
701 version ".tar.gz"))
702 (sha256
703 (base32
704 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
705 (build-system python-build-system)
706 (arguments
707 `(#:python ,python-2
708 #:tests? #f)) ; no test target
709 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
710 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
711 (description
712 "This backport brings the ssl.match_hostname() function to users of
713earlier versions of Python. The function checks the hostname in the
714certificate returned by the server to which a connection has been established,
715and verifies that it matches the intended target hostname.")
716 (license license:psfl)))
717
718(define-public python-h5py
719 (package
720 (name "python-h5py")
721 (version "2.6.0")
722 (source
723 (origin
724 (method url-fetch)
725 (uri (pypi-uri "h5py" version))
726 (sha256
727 (base32
728 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
729 (build-system python-build-system)
730 (arguments
731 `(#:tests? #f ; no test target
732 #:phases
733 (modify-phases %standard-phases
734 (add-after 'unpack 'fix-hdf5-paths
735 (lambda* (#:key inputs #:allow-other-keys)
736 (let ((prefix (assoc-ref inputs "hdf5")))
737 (substitute* "setup_build.py"
738 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
739 (string-append "['" prefix "/lib" "']"))
740 (("'/opt/local/include', '/usr/local/include'")
741 (string-append "'" prefix "/include" "'")))
742 (substitute* "setup_configure.py"
743 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
744 (string-append "['" prefix "/lib" "']")))
745 #t))))))
746 (propagated-inputs
747 `(("python-six" ,python-six)
748 ("python-numpy" ,python-numpy)))
749 (inputs
750 `(("hdf5" ,hdf5)))
751 (native-inputs
752 `(("python-cython" ,python-cython)
753 ("python-pkgconfig" ,python-pkgconfig)))
754 (home-page "http://www.h5py.org/")
755 (synopsis "Read and write HDF5 files from Python")
756 (description
757 "The h5py package provides both a high- and low-level interface to the
758HDF5 library from Python. The low-level interface is intended to be a
759complete wrapping of the HDF5 API, while the high-level component supports
760access to HDF5 files, datasets and groups using established Python and NumPy
761concepts.")
762 (license license:bsd-3)))
763
764(define-public python2-h5py
765 (package-with-python2 python-h5py))
766
767(define-public python-lockfile
768 (package
769 (name "python-lockfile")
770 (version "0.12.2")
771 (source
772 (origin
773 (method url-fetch)
774 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
775 "lockfile-" version ".tar.gz"))
776 (sha256
777 (base32
778 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
779 (build-system python-build-system)
780 (arguments '(#:test-target "check"))
781 (native-inputs
782 `(("python-pbr" ,python-pbr)))
783 (home-page "https://launchpad.net/pylockfile")
784 (synopsis "Platform-independent file locking module")
785 (description
786 "The lockfile package exports a LockFile class which provides a simple
787API for locking files.")
788 (license license:expat)))
789
790(define-public python2-lockfile
791 (package-with-python2 python-lockfile))
792
793(define-public python-mock
794 (package
795 (name "python-mock")
796 (version "1.0.1")
797 (source
798 (origin
799 (method url-fetch)
800 (uri (pypi-uri "mock" version))
801 (sha256
802 (base32
803 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
804 (build-system python-build-system)
805 (arguments '(#:test-target "check"))
806 (home-page "https://github.com/testing-cabal/mock")
807 (synopsis "Python mocking and patching library for testing")
808 (description
809 "Mock is a library for testing in Python. It allows you to replace parts
810of your system under test with mock objects and make assertions about how they
811have been used.")
812 (license license:expat)))
813
814(define-public python2-mock
815 (package-with-python2 python-mock))
816
817
818(define-public python-setuptools
819 (package
820 (name "python-setuptools")
821 (version "31.0.0")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "setuptools" version))
826 (sha256
827 (base32
828 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
829 (modules '((guix build utils)))
830 (snippet
831 '(begin
832 ;; Remove included binaries which are used to build self-extracting
833 ;; installers for Windows.
834 ;; TODO: Find some way to build them ourself so we can include them.
835 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
836 #t))))
837 (build-system python-build-system)
838 ;; FIXME: Tests require pytest, which itself relies on setuptools.
839 ;; One could bootstrap with an internal untested setuptools.
840 (arguments
841 `(#:tests? #f))
842 (home-page "https://pypi.python.org/pypi/setuptools")
843 (synopsis
844 "Library designed to facilitate packaging Python projects")
845 (description
846 "Setuptools is a fully-featured, stable library designed to facilitate
847packaging Python projects, where packaging includes:
848Python package and module definitions,
849distribution package metadata,
850test hooks,
851project installation,
852platform-specific details,
853Python 3 support.")
854 ;; TODO: setuptools now bundles the following libraries:
855 ;; packaging, pyparsing, six and appdirs. How to unbundle?
856 (license (list license:psfl ; setuptools itself
857 license:expat ; six, appdirs, pyparsing
858 license:asl2.0 ; packaging is dual ASL2/BSD-2
859 license:bsd-2))))
860
861(define-public python2-setuptools
862 (package-with-python2 python-setuptools))
863
864
865(define-public python-pycrypto
866 (package
867 (name "python-pycrypto")
868 (version "2.6.1")
869 (source
870 (origin
871 (method url-fetch)
872 (uri (string-append "https://pypi.python.org/packages/source/p/"
873 "pycrypto/pycrypto-" version ".tar.gz"))
874 (sha256
875 (base32
876 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
877 (build-system python-build-system)
878 (inputs
879 `(("python" ,python)
880 ("gmp" ,gmp)))
881 (arguments
882 `(#:phases
883 (alist-cons-before
884 'build 'set-build-env
885 ;; pycrypto runs an autoconf configure script behind the scenes
886 (lambda _
887 (setenv "CONFIG_SHELL" (which "bash")))
888 %standard-phases)))
889 (home-page "http://www.pycrypto.org/")
890 (synopsis "Cryptographic modules for Python")
891 (description
892 "Pycrypto is a collection of both secure hash functions (such as SHA256
893and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
894etc.). The package is structured to make adding new modules easy.")
895 (license license:public-domain)))
896
897(define-public python2-pycrypto
898 (let ((pycrypto (package-with-python2 python-pycrypto)))
899 (package (inherit pycrypto)
900 (inputs
901 `(("python" ,python-2)
902 ,@(alist-delete
903 "python"
904 (package-inputs pycrypto)))))))
905
906(define-public python-keyring
907 (package
908 (name "python-keyring")
909 (version "8.7")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "keyring" version))
914 (sha256
915 (base32
916 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
917 (build-system python-build-system)
918 (native-inputs
919 `(("python-setuptools-scm" ,python-setuptools-scm)))
920 (propagated-inputs
921 `(("python-pycrypto" ,python-pycrypto)))
922 (arguments
923 `(#:tests? #f)) ;TODO: tests require pytest
924 (home-page "https://github.com/jaraco/keyring")
925 (synopsis "Store and access your passwords safely")
926 (description
927 "The Python keyring lib provides a easy way to access the system keyring
928service from python. It can be used in any application that needs safe
929password storage.")
930 ;; "MIT" and PSF dual license
931 (license license:x11)))
932
933(define-public python2-keyring
934 (package-with-python2 python-keyring))
935
936(define-public python-six
937 (package
938 (name "python-six")
939 (version "1.10.0")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (pypi-uri "six" version))
944 (sha256
945 (base32
946 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
947 (build-system python-build-system)
948 (home-page "http://pypi.python.org/pypi/six/")
949 (synopsis "Python 2 and 3 compatibility utilities")
950 (description
951 "Six is a Python 2 and 3 compatibility library. It provides utility
952functions for smoothing over the differences between the Python versions with
953the goal of writing Python code that is compatible on both Python versions.
954Six supports every Python version since 2.5. It is contained in only one
955Python file, so it can be easily copied into your project.")
956 (license license:x11)))
957
958(define-public python2-six
959 (package-with-python2 python-six))
960
961(define-public python-dateutil-2
962 (package
963 (name "python-dateutil")
964 (version "2.5.2")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "python-dateutil" version))
969 (sha256
970 (base32
971 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
972 (build-system python-build-system)
973 (propagated-inputs
974 `(("python-six" ,python-six)))
975 (home-page "https://dateutil.readthedocs.io/en/stable/")
976 (synopsis "Extensions to the standard datetime module")
977 (description
978 "The dateutil module provides powerful extensions to the standard
979datetime module, available in Python 2.3+.")
980 (license license:bsd-3)))
981
982(define-public python2-dateutil-2
983 (package-with-python2 python-dateutil-2))
984
985(define-public python-dateutil
986 (package
987 (name "python-dateutil")
988 (version "1.5") ; last version for python < 3
989 (source
990 (origin
991 (method url-fetch)
992 (uri (string-append "http://labix.org/download/python-dateutil/"
993 "python-dateutil-" version ".tar.gz"))
994 (sha256
995 (base32
996 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
997 (build-system python-build-system)
998 (home-page "https://dateutil.readthedocs.io/en/stable/")
999 (synopsis "Extensions to the standard datetime module")
1000 (description
1001 "The dateutil module provides powerful extensions to the standard
1002datetime module, available in Python 2.3+.")
1003 (license license:psfl)))
1004
1005(define-public python2-dateutil
1006 (package-with-python2 python-dateutil))
1007
1008(define-public python-parsedatetime
1009 (package
1010 (name "python-parsedatetime")
1011 (version "2.1")
1012 (source
1013 (origin
1014 (method url-fetch)
1015 (uri (pypi-uri "parsedatetime" version))
1016 (sha256
1017 (base32
1018 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1019 (build-system python-build-system)
1020 (native-inputs
1021 `(("python-nose" ,python-nose)
1022 ("python-pyicu" ,python-pyicu)))
1023 (home-page "http://github.com/bear/parsedatetime/")
1024 (synopsis
1025 "Parse human-readable date/time text")
1026 (description
1027 "Parse human-readable date/time text.")
1028 (license license:asl2.0)))
1029
1030(define-public python2-parsedatetime
1031 (package-with-python2 python-parsedatetime))
1032
1033(define-public python-pandas
1034 (package
1035 (name "python-pandas")
1036 (version "0.18.1")
1037 (source
1038 (origin
1039 (method url-fetch)
1040 (uri (string-append
1041 "https://pypi.python.org/packages/11/09/"
1042 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1043 "pandas-" version ".tar.gz"))
1044 (sha256
1045 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1046 (build-system python-build-system)
1047 (propagated-inputs
1048 `(("python-numpy" ,python-numpy)
1049 ("python-pytz" ,python-pytz)
1050 ("python-dateutil" ,python-dateutil-2)))
1051 (native-inputs
1052 `(("python-nose" ,python-nose)
1053 ("python-cython" ,python-cython)))
1054 (home-page "http://pandas.pydata.org")
1055 (synopsis "Data structures for data analysis, time series, and statistics")
1056 (description
1057 "Pandas is a Python package providing fast, flexible, and expressive data
1058structures designed to make working with structured (tabular,
1059multidimensional, potentially heterogeneous) and time series data both easy
1060and intuitive. It aims to be the fundamental high-level building block for
1061doing practical, real world data analysis in Python.")
1062 (license license:bsd-3)))
1063
1064(define-public python2-pandas
1065 (package-with-python2 python-pandas))
1066
1067(define-public python-tzlocal
1068 (package
1069 (name "python-tzlocal")
1070 (version "1.2.2")
1071 (source
1072 (origin
1073 (method url-fetch)
1074 (uri (pypi-uri "tzlocal" version))
1075 (sha256
1076 (base32
1077 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1078 (build-system python-build-system)
1079 (propagated-inputs
1080 `(("python-pytz" ,python-pytz)))
1081 (home-page "https://github.com/regebro/tzlocal")
1082 (synopsis
1083 "Local timezone information for Python")
1084 (description
1085 "Tzlocal returns a tzinfo object with the local timezone information.
1086This module attempts to fix a glaring hole in pytz, that there is no way to
1087get the local timezone information, unless you know the zoneinfo name, and
1088under several distributions that's hard or impossible to figure out.")
1089 (license license:cc0)))
1090
1091(define-public python2-pysqlite
1092 (package
1093 (name "python2-pysqlite")
1094 (version "2.8.1")
1095 (source
1096 (origin
1097 (method url-fetch)
1098 (uri (pypi-uri "pysqlite" version))
1099 (sha256
1100 (base32
1101 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1102 (build-system python-build-system)
1103 (inputs
1104 `(("sqlite" ,sqlite)))
1105 (arguments
1106 `(#:python ,python-2 ; incompatible with Python 3
1107 #:tests? #f)) ; no test target
1108 (home-page "http://github.com/ghaering/pysqlite")
1109 (synopsis "SQLite bindings for Python")
1110 (description
1111 "Pysqlite provides SQLite bindings for Python that comply to the
1112Database API 2.0T.")
1113 (license license:zlib)))
1114
1115
1116(define-public python2-mechanize
1117 (package
1118 (name "python2-mechanize")
1119 (version "0.2.5")
1120 (source
1121 (origin
1122 (method url-fetch)
1123 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1124 version ".tar.gz"))
1125 (sha256
1126 (base32
1127 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1128 (build-system python-build-system)
1129 (arguments
1130 `(#:python ,python-2 ; apparently incompatible with Python 3
1131 #:tests? #f))
1132 ;; test fails with message
1133 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1134 ;; (python-3.3.2) or
1135 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1136 ;; (python-2.7.5).
1137 ;; The source code is from March 2011 and probably not up-to-date
1138 ;; with respect to python unit tests.
1139 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1140 (synopsis
1141 "Stateful programmatic web browsing in Python")
1142 (description
1143 "Mechanize implements stateful programmatic web browsing in Python,
1144after Andy Lester’s Perl module WWW::Mechanize.")
1145 (license (license:non-copyleft
1146 "file://COPYING"
1147 "See COPYING in the distribution."))))
1148
1149
1150(define-public python-simplejson
1151 (package
1152 (name "python-simplejson")
1153 (version "3.10.0")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "simplejson" version))
1158 (sha256
1159 (base32
1160 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1161 (build-system python-build-system)
1162 (home-page "http://simplejson.readthedocs.org/en/latest/")
1163 (synopsis
1164 "Json library for Python")
1165 (description
1166 "JSON (JavaScript Object Notation) is a subset of JavaScript
1167syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1168format.
1169
1170Simplejson exposes an API familiar to users of the standard library marshal
1171and pickle modules. It is the externally maintained version of the json
1172library contained in Python 2.6, but maintains compatibility with Python 2.5
1173and (currently) has significant performance advantages, even without using
1174the optional C extension for speedups. Simplejson is also supported on
1175Python 3.3+.")
1176 (license license:x11)))
1177
1178(define-public python2-simplejson
1179 (package-with-python2 python-simplejson))
1180
1181
1182(define-public python-pyicu
1183 (package
1184 (name "python-pyicu")
1185 (version "1.9.2")
1186 (source
1187 (origin
1188 (method url-fetch)
1189 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1190 version ".tar.gz"))
1191 (sha256
1192 (base32
1193 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1194 (build-system python-build-system)
1195 (inputs
1196 `(("icu4c" ,icu4c)))
1197 (home-page "http://pyicu.osafoundation.org/")
1198 (synopsis "Python extension wrapping the ICU C++ API")
1199 (description
1200 "PyICU is a python extension wrapping the ICU C++ API.")
1201 (license license:x11)))
1202
1203(define-public python2-pyicu
1204 (package-with-python2 python-pyicu))
1205
1206(define-public python2-dogtail
1207 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1208 ;; spaces in indentation" with Python 3.
1209 (package
1210 (name "python2-dogtail")
1211 (version "0.8.2")
1212 (source (origin
1213 (method url-fetch)
1214 (uri (string-append
1215 "https://fedorahosted.org/released/dogtail/dogtail-"
1216 version ".tar.gz"))
1217 (sha256
1218 (base32
1219 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1220 (build-system python-build-system)
1221 (arguments `(#:python ,python-2
1222 #:tests? #f)) ; invalid command "test"
1223 (home-page "https://fedorahosted.org/dogtail/")
1224 (synopsis "GUI test tool and automation framework written in ​Python")
1225 (description
1226 "Dogtail is a GUI test tool and automation framework written in Python.
1227It uses Accessibility (a11y) technologies to communicate with desktop
1228applications. dogtail scripts are written in Python and executed like any
1229other Python program.")
1230 (license license:gpl2+)))
1231
1232(define-public python2-empy
1233 (package
1234 (name "python2-empy")
1235 (version "3.3")
1236 (source (origin
1237 (method url-fetch)
1238 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1239 version ".tar.gz"))
1240 (sha256
1241 (base32
1242 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1243 (build-system python-build-system)
1244 (arguments
1245 `(#:python ,python-2
1246 #:phases (alist-replace
1247 'check
1248 (lambda _
1249 (zero? (system* "./test.sh")))
1250 %standard-phases)))
1251 (home-page "http://www.alcyone.com/software/empy/")
1252 (synopsis "Templating system for Python")
1253 (description
1254 "EmPy is a system for embedding Python expressions and statements in
1255template text; it takes an EmPy source file, processes it, and produces
1256output. This is accomplished via expansions, which are special signals to the
1257EmPy system and are set off by a special prefix (by default the at sign, @@).
1258EmPy can expand arbitrary Python expressions and statements in this way, as
1259well as a variety of special forms. Textual data not explicitly delimited in
1260this way is sent unaffected to the output, allowing Python to be used in
1261effect as a markup language. Also supported are callbacks via hooks,
1262recording and playback via diversions, and dynamic, chainable filters. The
1263system is highly configurable via command line options and embedded
1264commands.")
1265 (license license:lgpl2.1+)))
1266
1267(define-public python2-element-tree
1268 (package
1269 (name "python2-element-tree")
1270 (version "1.2.6")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (string-append
1274 "http://effbot.org/media/downloads/elementtree-"
1275 version "-20050316.tar.gz"))
1276 (sha256
1277 (base32
1278 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1279 (build-system python-build-system)
1280 (arguments
1281 `(#:python ,python-2 ; seems to be part of Python 3
1282 #:tests? #f)) ; no 'test' sub-command
1283 (synopsis "Toolkit for XML processing in Python")
1284 (description
1285 "ElementTree is a Python library supporting lightweight XML processing.")
1286 (home-page "http://effbot.org/zone/element-index.htm")
1287 (license (license:x11-style
1288 "http://docs.python.org/2/license.html"
1289 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1290
1291(define-public python2-pybugz
1292 (package
1293 (name "python2-pybugz")
1294 (version "0.6.11")
1295 (source (origin
1296 (method url-fetch)
1297 (uri (string-append
1298 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1299 version ".tar.gz"))
1300 (sha256
1301 (base32
1302 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1303 (patches (search-patches "pybugz-stty.patch"
1304 "pybugz-encode-error.patch"))))
1305 (build-system python-build-system)
1306 (arguments
1307 `(#:python ,python-2 ; SyntaxError with Python 3
1308 #:tests? #f)) ; no 'test' sub-command
1309 (propagated-inputs
1310 `(("element-tree" ,python2-element-tree)))
1311 (synopsis "Python and command-line interface to Bugzilla")
1312 (description
1313 "PyBugz is a Python library and command-line tool to query the Bugzilla
1314bug tracking system. It is meant as an aid to speed up interaction with the
1315bug tracker.")
1316 (home-page "http://www.liquidx.net/pybugz/")
1317 (license license:gpl2)))
1318
1319(define-public python-enum34
1320 (package
1321 (name "python-enum34")
1322 (version "1.1.0")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (pypi-uri "enum34" version))
1327 (sha256
1328 (base32
1329 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1330 (build-system python-build-system)
1331 (arguments
1332 `(#:phases
1333 (alist-replace
1334 'check
1335 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1336 %standard-phases)))
1337 (home-page "https://pypi.python.org/pypi/enum34")
1338 (synopsis "Backported Python 3.4 Enum")
1339 (description
1340 "Enum34 is the new Python stdlib enum module available in Python 3.4
1341backported for previous versions of Python from 2.4 to 3.3.")
1342 (license license:bsd-3)))
1343
1344(define-public python2-enum34
1345 (package-with-python2 python-enum34))
1346
1347(define-public python-parse-type
1348 (package
1349 (name "python-parse-type")
1350 (version "0.3.4")
1351 (source
1352 (origin
1353 (method url-fetch)
1354 (uri (string-append "https://pypi.python.org/packages/source/p/"
1355 "parse_type/parse_type-" version ".tar.gz"))
1356 (sha256
1357 (base32
1358 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1359 (build-system python-build-system)
1360 (propagated-inputs
1361 `(("python-six" ,python-six)
1362 ("python-parse" ,python-parse)))
1363 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1364 (home-page "https://github.com/jenisys/parse_type")
1365 (synopsis "Extended parse module")
1366 (description
1367 "Parse_type extends the python parse module.")
1368 (license license:bsd-3)))
1369
1370(define-public python-parse
1371 (package
1372 (name "python-parse")
1373 (version "1.6.6")
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (pypi-uri "parse" version))
1378 (sha256
1379 (base32
1380 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1381 (patches (search-patches "python-parse-too-many-fields.patch"))))
1382 (build-system python-build-system)
1383 (arguments
1384 `(#:phases
1385 (modify-phases %standard-phases
1386 (replace 'check
1387 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1388 (home-page "https://github.com/r1chardj0n3s/parse")
1389 (synopsis "Parse strings")
1390 (description
1391 "Parse strings using a specification based on the Python format()
1392syntax.")
1393 (license license:x11)))
1394
1395(define-public python-polib
1396 (package
1397 (name "python-polib")
1398 (version "1.0.8")
1399 (source (origin
1400 (method url-fetch)
1401 (uri (pypi-uri "polib" version))
1402 (sha256
1403 (base32
1404 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1405 (build-system python-build-system)
1406 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1407 (synopsis "Manipulate, create and modify gettext files")
1408 (description "Polib can manipulate any gettext format (po, pot and mo)
1409files. It can be used to create po files from scratch or to modify
1410existing ones.")
1411 (license license:expat)))
1412
1413(define-public python2-polib
1414 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1415 (package
1416 (inherit base)
1417 (arguments `(,@(package-arguments base)
1418 ;; Tests don't work with python2.
1419 #:tests? #f)))))
1420
1421(define-public scons
1422 (package
1423 (name "scons")
1424 (version "2.3.4")
1425 (source (origin
1426 (method url-fetch)
1427 (uri (string-append "mirror://sourceforge/scons/scons/" version
1428 "/scons-" version ".tar.gz"))
1429 (sha256
1430 (base32
1431 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1432 (build-system python-build-system)
1433 (arguments
1434 ;; With Python 3.x, fails to build with a syntax error.
1435 `(#:python ,python-2
1436 #:use-setuptools? #f ; still relies on distutils
1437 #:tests? #f)) ; no 'python setup.py test' command
1438 (home-page "http://scons.org/")
1439 (synopsis "Software construction tool written in Python")
1440 (description
1441 "SCons is a software construction tool. Think of SCons as an improved,
1442cross-platform substitute for the classic Make utility with integrated
1443functionality similar to autoconf/automake and compiler caches such as ccache.
1444In short, SCons is an easier, more reliable and faster way to build
1445software.")
1446 (license license:x11)))
1447
1448(define-public python-extras
1449 (package
1450 (name "python-extras")
1451 (version "0.0.3")
1452 (source
1453 (origin
1454 (method url-fetch)
1455 (uri (string-append
1456 "https://pypi.python.org/packages/source/e/extras/extras-"
1457 version ".tar.gz"))
1458 (sha256
1459 (base32
1460 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1461 (build-system python-build-system)
1462 (arguments
1463 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1464 '(#:tests? #f))
1465 (home-page "https://github.com/testing-cabal/extras")
1466 (synopsis "Useful extensions to the Python standard library")
1467 (description
1468 "Extras is a set of extensions to the Python standard library.")
1469 (license license:expat)))
1470
1471(define-public python2-extras
1472 (package-with-python2 python-extras))
1473
1474(define-public python-mimeparse
1475 (package
1476 (name "python-mimeparse")
1477 (version "0.1.4")
1478 (source
1479 (origin
1480 (method url-fetch)
1481 (uri (string-append
1482 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1483 version ".tar.gz"))
1484 (sha256
1485 (base32
1486 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1487 (build-system python-build-system)
1488 (arguments
1489 '(#:tests? #f)) ; no setup.py test command
1490 (home-page
1491 "https://github.com/dbtsai/python-mimeparse")
1492 (synopsis "Python library for parsing MIME types")
1493 (description
1494 "Mimeparse provides basic functions for parsing MIME type names and
1495matching them against a list of media-ranges.")
1496 (license license:expat)))
1497
1498(define-public python2-mimeparse
1499 (package-with-python2 python-mimeparse))
1500
1501(define-public python-nose
1502 (package
1503 (name "python-nose")
1504 (version "1.3.7")
1505 (source
1506 (origin
1507 (method url-fetch)
1508 (uri (pypi-uri "nose" version))
1509 (sha256
1510 (base32
1511 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1512 (build-system python-build-system)
1513 (arguments
1514 '(#:tests? #f)) ; FIXME: test suite fails
1515 (home-page "http://readthedocs.org/docs/nose/")
1516 (synopsis "Python testing library")
1517 (description
1518 "Nose extends the unittest library to make testing easier.")
1519 (license license:lgpl2.0+)))
1520
1521(define-public python2-nose
1522 (package-with-python2 python-nose))
1523
1524(define-public python-nose2
1525 (package
1526 (name "python-nose2")
1527 (version "0.6.5")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "nose2" version))
1532 (sha256
1533 (base32
1534 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1535 (build-system python-build-system)
1536 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1537 (propagated-inputs
1538 `(("python-cov-core" ,python-cov-core)
1539 ("python-pytest-cov" ,python-pytest-cov)
1540 ("python-six" ,python-six)))
1541 (home-page "https://github.com/nose-devs/nose2")
1542 (synopsis "Next generation of nicer testing for Python")
1543 (description
1544 "Nose2 is the next generation of nicer testing for Python, based on the
1545plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1546better plugin api, being easier for users to configure, and simplifying internal
1547interfaces and processes.")
1548 (license license:bsd-2)))
1549
1550(define-public python2-nose2
1551 (package-with-python2 python-nose2))
1552
1553(define-public python-unittest2
1554 (package
1555 (name "python-unittest2")
1556 (version "0.5.1")
1557 (source
1558 (origin
1559 (method url-fetch)
1560 (uri (string-append
1561 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1562 version ".tar.gz"))
1563 (sha256
1564 (base32
1565 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1566 (build-system python-build-system)
1567 (home-page "http://pypi.python.org/pypi/unittest2")
1568 (synopsis "Python unit testing library")
1569 (description
1570 "Unittest2 is a replacement for the unittest module in the Python
1571standard library.")
1572 (license license:psfl)))
1573
1574(define-public python2-unittest2
1575 (package (inherit python-unittest2)
1576 (name "python2-unittest2")
1577 (version "0.5.1")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (string-append
1582 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1583 version ".tar.gz"))
1584 (sha256
1585 (base32
1586 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1587 (arguments
1588 `(#:python ,python-2
1589 #:tests? #f)))) ; no setup.py test command
1590
1591(define-public python-pafy
1592 (package
1593 (name "python-pafy")
1594 (version "0.5.2")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (pypi-uri "pafy" version))
1599 (sha256
1600 (base32
1601 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1602 (build-system python-build-system)
1603 (arguments
1604 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1605 (propagated-inputs
1606 ;; Youtube-dl is a python package which is imported in the file
1607 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1608 `(("youtube-dl" ,youtube-dl)))
1609 (home-page "https://np1.github.io/pafy/")
1610 (synopsis "Retrieve YouTube content and metadata")
1611 (description
1612 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1613 (license license:lgpl3+)))
1614
1615(define-public python-py
1616 (package
1617 (name "python-py")
1618 (version "1.4.31")
1619 (source
1620 (origin
1621 (method url-fetch)
1622 (uri (pypi-uri "py" version))
1623 (sha256
1624 (base32
1625 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1626 (build-system python-build-system)
1627 (home-page "http://pylib.readthedocs.org/")
1628 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1629 (description
1630 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1631code introspection, and logging.")
1632 (license license:expat)))
1633
1634(define-public python2-py
1635 (package-with-python2 python-py))
1636
1637(define-public python-pytest
1638 (package
1639 (name "python-pytest")
1640 (version "2.7.3")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (string-append
1645 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1646 version ".tar.gz"))
1647 (sha256
1648 (base32
1649 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1650 (modules '((guix build utils)))
1651 (snippet
1652 ;; One of the tests involves the /usr directory, so it fails.
1653 '(substitute* "testing/test_argcomplete.py"
1654 (("def test_remove_dir_prefix\\(self\\):")
1655 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1656 (build-system python-build-system)
1657 (propagated-inputs
1658 `(("python-py" ,python-py)))
1659 (native-inputs
1660 `(("python-nose" ,python-nose)
1661 ("python-mock" ,python-mock)))
1662 (home-page "http://pytest.org")
1663 (synopsis "Python testing library")
1664 (description
1665 "Pytest is a testing tool that provides auto-discovery of test modules
1666and functions, detailed info on failing assert statements, modular fixtures,
1667and many external plugins.")
1668 (license license:expat)))
1669
1670(define-public python2-pytest
1671 (package-with-python2 python-pytest))
1672
1673;; This package is used by Borg until we can upgrade all our Python packages to
1674;; use a more recent pytest.
1675(define-public python-pytest-2.9.2
1676 (package
1677 (inherit python-pytest)
1678 (name "python-pytest")
1679 (version "2.9.2")
1680 (source (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "pytest" version))
1683 (sha256
1684 (base32
1685 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1686 (arguments
1687 `(#:phases
1688 (modify-phases %standard-phases
1689 (add-before 'check 'disable-invalid-test
1690 (lambda _
1691 (substitute* "testing/test_argcomplete.py"
1692 (("def test_remove_dir_prefix" line)
1693 (string-append "@pytest.mark.skip"
1694 "(reason=\"Assumes that /usr exists.\")\n "
1695 line)))
1696 #t)))))))
1697
1698(define-public python-pytest-cov
1699 (package
1700 (name "python-pytest-cov")
1701 (version "2.2.1")
1702 (source
1703 (origin
1704 (method url-fetch)
1705 (uri (pypi-uri "pytest-cov" version))
1706 (sha256
1707 (base32
1708 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1709 (build-system python-build-system)
1710 (arguments
1711 `(#:phases
1712 (modify-phases %standard-phases
1713 (replace 'check
1714 (lambda _
1715 ;; options taken from tox.ini
1716 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1717 ;; with "Duplicate implicit target name"
1718 (zero? (system* "python" "./setup.py" "check"
1719 "--strict" "--metadata")))))))
1720 (propagated-inputs
1721 `(("python-coverage" ,python-coverage)
1722 ("python-pytest" ,python-pytest)))
1723 (home-page "https://github.com/pytest-dev/pytest-cov")
1724 (synopsis "Pytest plugin for measuring coverage")
1725 (description
1726 "Pytest-cov produces coverage reports. It supports centralised testing and
1727distributed testing in both @code{load} and @code{each} modes. It also
1728supports coverage of subprocesses.")
1729 (license license:expat)))
1730
1731(define-public python2-pytest-cov
1732 (package-with-python2 python-pytest-cov))
1733
1734(define-public python-pytest-runner
1735 (package
1736 (name "python-pytest-runner")
1737 (version "2.6.2")
1738 (source
1739 (origin
1740 (method url-fetch)
1741 (uri (pypi-uri "pytest-runner" version))
1742 (sha256
1743 (base32
1744 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1745 (build-system python-build-system)
1746 (arguments
1747 `(#:phases
1748 (modify-phases %standard-phases
1749 ;; The fancy way of setting the version with setuptools_scm does not
1750 ;; seem to work here.
1751 (add-after 'unpack 'set-version
1752 (lambda _
1753 (substitute* "docs/conf.py"
1754 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1755 (string-append "version = \"" ,version "\"")))
1756 #t)))))
1757 (native-inputs
1758 `(("python-pytest" ,python-pytest)
1759 ("python-setuptools-scm" ,python-setuptools-scm)))
1760 (home-page "https://github.com/pytest-dev/pytest-runner")
1761 (synopsis "Invoke py.test as a distutils command")
1762 (description
1763 "This package provides a @command{pytest-runner} command that
1764@file{setup.py} files can use to run tests.")
1765 (license license:expat)))
1766
1767(define-public python2-pytest-runner
1768 (package-with-python2 python-pytest-runner))
1769
1770(define-public python-pytest-mock
1771 (package
1772 (name "python-pytest-mock")
1773 (version "1.2")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "pytest-mock" version ".zip"))
1778 (sha256
1779 (base32
1780 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1781 (build-system python-build-system)
1782 (native-inputs
1783 `(("unzip" ,unzip)))
1784 (propagated-inputs
1785 `(("python-pytest" ,python-pytest)))
1786 (home-page "https://github.com/pytest-dev/pytest-mock/")
1787 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1788 (description
1789 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1790around the patching API provided by the @code{mock} package, but with the
1791benefit of not having to worry about undoing patches at the end of a test.
1792The mocker fixture has the same API as @code{mock.patch}, supporting the
1793same arguments.")
1794 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1795 (license license:expat)))
1796
1797(define-public python2-pytest-mock
1798 (let ((base (package-with-python2
1799 (strip-python2-variant python-pytest-mock))))
1800 (package (inherit base)
1801 (propagated-inputs
1802 `(("python2-mock" ,python2-mock)
1803 ,@(package-propagated-inputs base))))))
1804
1805(define-public python-pytest-xdist
1806 (package
1807 (name "python-pytest-xdist")
1808 (version "1.14")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "pytest-xdist" version ".zip"))
1813 (sha256
1814 (base32
1815 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1816 (modules '((guix build utils)))
1817 (snippet
1818 '(begin
1819 ;; Remove pre-compiled .pyc files from source.
1820 (for-each delete-file-recursively
1821 (find-files "." "__pycache__" #:directories? #t))
1822 (for-each delete-file (find-files "." "\\.pyc$"))
1823 #t))))
1824 (build-system python-build-system)
1825 (native-inputs
1826 `(("unzip" ,unzip)
1827 ("python-setuptools-scm" ,python-setuptools-scm)))
1828 (propagated-inputs
1829 `(("python-execnet" ,python-execnet)
1830 ("python-pytest" ,python-pytest)
1831 ("python-py" ,python-py)))
1832 (home-page
1833 "https://github.com/pytest-dev/pytest-xdist")
1834 (synopsis
1835 "Plugin for py.test with distributed testing and loop-on-failing modes")
1836 (description
1837 "The pytest-xdist plugin extends py.test with some unique test execution
1838modes: parallelization, running tests in boxed subprocesses, the ability
1839to run tests repeatedly when failed, and the ability to run tests on multiple
1840Python interpreters or platforms. It uses rsync to copy the existing
1841program code to a remote location, executes there, and then syncs the
1842result back.")
1843 (license license:expat)))
1844
1845(define-public python2-pytest-xdist
1846 (package-with-python2 python-pytest-xdist))
1847
1848(define-public python-scripttest
1849 (package
1850 (name "python-scripttest")
1851 (version "1.3")
1852 (source
1853 (origin
1854 (method url-fetch)
1855 (uri (string-append
1856 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1857 version ".tar.gz"))
1858 (sha256
1859 (base32
1860 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1861 (build-system python-build-system)
1862 (native-inputs
1863 `(("python-pytest" ,python-pytest)))
1864 (home-page "http://pythonpaste.org/scripttest/")
1865 (synopsis "Python library to test command-line scripts")
1866 (description "Scripttest is a Python helper library for testing
1867interactive command-line applications. With it you can run a script in a
1868subprocess and see the output as well as any file modifications.")
1869 (license license:expat)))
1870
1871(define-public python2-scripttest
1872 (package-with-python2 python-scripttest))
1873
1874(define-public python-testtools
1875 (package
1876 (name "python-testtools")
1877 (version "1.0.0")
1878 (source
1879 (origin
1880 (method url-fetch)
1881 (uri (string-append
1882 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1883 version ".tar.gz"))
1884 (sha256
1885 (base32
1886 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1887 (build-system python-build-system)
1888 (propagated-inputs
1889 `(("python-mimeparse" ,python-mimeparse)
1890 ("python-extras" ,python-extras)))
1891 (home-page "https://github.com/testing-cabal/testtools")
1892 (synopsis
1893 "Extensions to the Python standard library unit testing framework")
1894 (description
1895 "Testtools extends the Python standard library unit testing framework to
1896provide matchers, more debugging information, and cross-Python
1897compatibility.")
1898 (license license:psfl)))
1899
1900(define-public python2-testtools
1901 (package-with-python2 python-testtools))
1902
1903(define-public python-testscenarios
1904 (package
1905 (name "python-testscenarios")
1906 (version "0.4")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (string-append
1911 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1912 version ".tar.gz"))
1913 (sha256
1914 (base32
1915 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1916 (build-system python-build-system)
1917 (propagated-inputs
1918 `(("python-testtools" ,python-testtools)))
1919 (home-page "https://launchpad.net/testscenarios")
1920 (synopsis "Pyunit extension for dependency injection")
1921 (description
1922 "Testscenarios provides clean dependency injection for Python unittest
1923style tests.")
1924 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1925
1926(define-public python2-testscenarios
1927 (package-with-python2 python-testscenarios))
1928
1929(define-public python-testresources
1930 (package
1931 (name "python-testresources")
1932 (version "0.2.7")
1933 (source
1934 (origin
1935 (method url-fetch)
1936 (uri (string-append
1937 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1938 version ".tar.gz"))
1939 (sha256
1940 (base32
1941 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1942 (build-system python-build-system)
1943 (home-page "https://launchpad.net/testresources")
1944 (synopsis
1945 "Pyunit extension for managing test resources")
1946 (description
1947 "Testresources is an extension to Python's unittest to allow declarative
1948use of resources by test cases.")
1949 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1950
1951(define-public python2-testresources
1952 (package-with-python2 python-testresources))
1953
1954(define-public python-subunit
1955 (package
1956 (name "python-subunit")
1957 (version "0.0.21")
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (string-append
1962 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1963 version ".tar.gz"))
1964 (sha256
1965 (base32
1966 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1967 (build-system python-build-system)
1968 (propagated-inputs
1969 `(("python-extras" ,python-extras)
1970 ("python-mimeparse" ,python-mimeparse)))
1971 (native-inputs
1972 `(("python-testscenarios" ,python-testscenarios)))
1973 (home-page "http://launchpad.net/subunit")
1974 (synopsis "Python implementation of the subunit protocol")
1975 (description
1976 "Python-subunit is a Python implementation of the subunit test streaming
1977protocol.")
1978 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1979
1980(define-public python2-subunit
1981 (package-with-python2 python-subunit))
1982
1983;; Recent versions of python-fixtures and python-testrepository need
1984;; python-pbr for packaging, which itself needs these two packages for
1985;; testing.
1986;; To fix this circular dependency, we use a build of python-pbr, based on the
1987;; same source, just without any test dependencies and with tests disabled.
1988;; python-pbr-minmal is then used to package python-fixtures and
1989;; python-testrepository.
1990;; Strictly speaking we currently could remove the test-requirements from the
1991;; normal python-pbr package (and save this package) since test are disabled
1992;; there anyway. But this may change in future.
1993(define python-pbr-minimal
1994 (package
1995 (name "python-pbr-minimal")
1996 (version "1.8.1")
1997 (source
1998 (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "pbr" version))
2001 (sha256
2002 (base32
2003 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2004 (build-system python-build-system)
2005 (arguments
2006 `(#:tests? #f))
2007 (home-page "http://docs.openstack.org/developer/pbr/")
2008 (synopsis "Minimal build of python-pbr used for bootstrapping")
2009 (description
2010 "Used only for bootstrapping python2-pbr, you should not need this.")
2011 (license license:asl2.0)))
2012
2013(define python2-pbr-minimal
2014 (package-with-python2 python-pbr-minimal))
2015
2016(define-public python-pbr
2017 (package
2018 (inherit python-pbr-minimal)
2019 (name "python-pbr")
2020 (arguments
2021 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2022 (propagated-inputs
2023 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2024 (native-inputs
2025 `(("python-fixtures" ,python-fixtures)
2026 ;; discover, coverage, hacking, subunit
2027 ("python-mock" ,python-mock)
2028 ("python-six" ,python-six)
2029 ("python-sphinx" ,python-sphinx)
2030 ("python-testrepository" ,python-testrepository)
2031 ("python-testresources" ,python-testresources)
2032 ("python-testscenarios" ,python-testscenarios)
2033 ("python-testtools" ,python-testtools)
2034 ("python-virtualenv" ,python-virtualenv)))
2035 (synopsis "Enhance the default behavior of Python’s setuptools")
2036 (description
2037 "Python Build Reasonableness (PBR) is a library that injects some useful
2038and sensible default behaviors into your setuptools run. It will set
2039versions, process requirements files and generate AUTHORS and ChangeLog file
2040from git information.
2041")))
2042
2043(define-public python2-pbr
2044 (package-with-python2 python-pbr))
2045
2046(define-public python-fixtures
2047 (package
2048 (name "python-fixtures")
2049 (version "1.4.0")
2050 (source
2051 (origin
2052 (method url-fetch)
2053 (uri (pypi-uri "fixtures" version))
2054 (sha256
2055 (base32
2056 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2057 (build-system python-build-system)
2058 (propagated-inputs
2059 `(("python-six" ,python-six)))
2060 (native-inputs
2061 `(("python-pbr-minimal" ,python-pbr-minimal)
2062 ("python-testtools" ,python-testtools)))
2063 (home-page "https://launchpad.net/python-fixtures")
2064 (synopsis "Python test fixture library")
2065 (description
2066 "Fixtures provides a way to create reusable state, useful when writing
2067Python tests.")
2068 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2069
2070(define-public python2-fixtures
2071 (package-with-python2 python-fixtures))
2072
2073(define-public python-testrepository
2074 (package
2075 (name "python-testrepository")
2076 (version "0.0.20")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (string-append
2081 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2082 version ".tar.gz"))
2083 (sha256
2084 (base32
2085 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2086 (build-system python-build-system)
2087 (propagated-inputs
2088 `(("python-fixtures" ,python-fixtures)
2089 ("python-subunit" ,python-subunit)
2090 ("python-testtools" ,python-testtools)))
2091 (native-inputs
2092 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2093 ("python-mimeparse" ,python-mimeparse)))
2094 (home-page "https://launchpad.net/testrepository")
2095 (synopsis "Database for Python test results")
2096 (description "Testrepository provides a database of test results which can
2097be used as part of a developer's workflow to check things such as what tests
2098have failed since the last commit or what tests are currently failing.")
2099 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2100
2101(define-public python2-testrepository
2102 (package-with-python2 python-testrepository))
2103
2104(define-public python-coverage
2105 (package
2106 (name "python-coverage")
2107 (version "4.1")
2108 (source
2109 (origin
2110 (method url-fetch)
2111 (uri (pypi-uri "coverage" version))
2112 (sha256
2113 (base32
2114 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2115 (build-system python-build-system)
2116 (home-page "http://nedbatchelder.com/code/coverage")
2117 (synopsis "Code coverage measurement for Python")
2118 (description
2119 "Coverage measures code coverage, typically during test execution. It
2120uses the code analysis tools and tracing hooks provided in the Python standard
2121library to determine which lines are executable, and which have been
2122executed.")
2123 (license license:bsd-3)))
2124
2125(define-public python2-coverage
2126 (package-with-python2 python-coverage))
2127
2128(define-public python-cov-core
2129 (package
2130 (name "python-cov-core")
2131 (version "1.15.0")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "cov-core" version))
2136 (sha256
2137 (base32
2138 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2139 (build-system python-build-system)
2140 (propagated-inputs
2141 `(("python-coverage" ,python-coverage)))
2142 (home-page "https://github.com/schlamar/cov-core")
2143 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2144 (description
2145 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2146It is useful for developing coverage plugins for these testing frameworks.")
2147 (license license:expat)))
2148
2149(define-public python2-cov-core
2150 (package-with-python2 python-cov-core))
2151
2152(define-public python-discover
2153 (package
2154 (name "python-discover")
2155 (version "0.4.0")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (string-append
2160 "https://pypi.python.org/packages/source/d/discover/discover-"
2161 version ".tar.gz"))
2162 (sha256
2163 (base32
2164 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2165 (build-system python-build-system)
2166 (home-page "http://pypi.python.org/pypi/discover/")
2167 (synopsis
2168 "Python test discovery for unittest")
2169 (description
2170 "Discover provides test discovery for unittest, a feature that has been
2171backported from Python 2.7 for Python 2.4+.")
2172 (license license:bsd-3)))
2173
2174(define-public python2-discover
2175 (package-with-python2 python-discover))
2176
2177(define-public behave
2178 (package
2179 (name "behave")
2180 (version "1.2.5")
2181 (source (origin
2182 (method url-fetch)
2183 (uri (pypi-uri "behave" version ".tar.bz2"))
2184 (sha256
2185 (base32
2186 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2187 (build-system python-build-system)
2188 (propagated-inputs
2189 `(("python-six" ,python-six)
2190 ("python-parse" ,python-parse)
2191 ("python-parse-type" ,python-parse-type)))
2192 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2193 ;PyHamcrest>=1.8
2194 (home-page "http://github.com/behave/behave")
2195 (synopsis "Python behavior-driven development")
2196 (description
2197 "Behave is a tool for behavior-driven development in python.
2198Behavior-driven development (or BDD) is an agile software development
2199technique that encourages collaboration between developers, QA and
2200non-technical or business participants in a software project. Behave uses
2201tests written in a natural language style, backed up by Python code.")
2202 (license license:x11)))
2203
2204(define-public python-exif-read
2205 (package
2206 (name "python-exif-read")
2207 (version "2.1.2")
2208 (source (origin
2209 (method url-fetch)
2210 (uri (pypi-uri "ExifRead" version))
2211 (sha256
2212 (base32
2213 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2214 (build-system python-build-system)
2215 (arguments `(#:tests? #f)) ; no tests
2216 (home-page "https://github.com/ianare/exif-py")
2217 (synopsis "Python library to extract EXIF data from image files")
2218 (description
2219 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2220files.")
2221 (license license:bsd-3)))
2222
2223(define-public python2-exif-read
2224 (package-with-python2 python-exif-read))
2225
2226(define-public python-pyld
2227 (package
2228 (name "python-pyld")
2229 (version "0.7.1")
2230 (source (origin
2231 (method url-fetch)
2232 (uri (pypi-uri "PyLD" version))
2233 (sha256
2234 (base32
2235 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2236 (build-system python-build-system)
2237 (arguments `(#:tests? #f)) ; no tests
2238 (home-page "http://github.com/digitalbazaar/pyld")
2239 (synopsis "Python implementation of the JSON-LD specification")
2240 (description
2241 "PyLD is an implementation of the JSON-LD specification.")
2242 (license license:bsd-3)))
2243
2244(define-public python2-pyld
2245 (package-with-python2 python-pyld))
2246
2247(define-public python-certifi
2248 (package
2249 (name "python-certifi")
2250 (version "2016.8.31")
2251 (source (origin
2252 (method url-fetch)
2253 (uri (pypi-uri "certifi" version))
2254 (sha256
2255 (base32
2256 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2257 (build-system python-build-system)
2258 (arguments `(#:tests? #f)) ; no tests
2259 (home-page "http://python-requests.org/")
2260 (synopsis "Python CA certificate bundle")
2261 (description
2262 "Certifi is a Python library that contains a CA certificate bundle, which
2263is used by the Requests library to verify HTTPS requests.")
2264 (license license:asl2.0)))
2265
2266(define-public python2-certifi
2267 (package-with-python2 python-certifi))
2268
2269(define-public python-click
2270 (package
2271 (name "python-click")
2272 (version "6.6")
2273 (source
2274 (origin
2275 (method url-fetch)
2276 (uri (pypi-uri "click" version))
2277 (sha256
2278 (base32
2279 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2280 (build-system python-build-system)
2281 (arguments
2282 `(#:phases
2283 (modify-phases %standard-phases
2284 (add-after 'unpack 'fix-paths
2285 (lambda* (#:key inputs #:allow-other-keys)
2286 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2287 "cross-libc" "libc"))))
2288 (substitute* "click/_unicodefun.py"
2289 (("'locale'")
2290 (string-append "'" glibc "/bin/locale'"))))
2291 #t)))))
2292 (home-page "http://click.pocoo.org")
2293 (synopsis "Command line library for Python")
2294 (description
2295 "Click is a Python package for creating command line interfaces in a
2296composable way with as little code as necessary. Its name stands for
2297\"Command Line Interface Creation Kit\". It's highly configurable but comes
2298with sensible defaults out of the box.")
2299 (license license:bsd-3)))
2300
2301(define-public python2-click
2302 (package-with-python2 python-click))
2303
2304(define-public python-wheel
2305 (package
2306 (name "python-wheel")
2307 (version "0.29.0")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "wheel" version))
2312 (sha256
2313 (base32
2314 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2315 (build-system python-build-system)
2316 (native-inputs
2317 `(("python-jsonschema" ,python-jsonschema)
2318 ("python-pytest-cov" ,python-pytest-cov)))
2319 (home-page "https://bitbucket.org/pypa/wheel/")
2320 (synopsis "Format for built Python packages")
2321 (description
2322 "A wheel is a ZIP-format archive with a specially formatted filename and
2323the @code{.whl} extension. It is designed to contain all the files for a PEP
2324376 compatible install in a way that is very close to the on-disk format. Many
2325packages will be properly installed with only the @code{Unpack} step and the
2326unpacked archive preserves enough information to @code{Spread} (copy data and
2327scripts to their final locations) at any later time. Wheel files can be
2328installed with a newer @code{pip} or with wheel's own command line utility.")
2329 (license license:expat)
2330 (properties `((python2-variant . ,(delay python2-wheel))))))
2331
2332(define-public python2-wheel
2333 (let ((wheel (package-with-python2
2334 (strip-python2-variant python-wheel))))
2335 (package (inherit wheel)
2336 (native-inputs `(("python2-functools32" ,python2-functools32)
2337 ,@(package-native-inputs wheel))))))
2338
2339
2340(define-public python-requests
2341 (package
2342 (name "python-requests")
2343 (version "2.9.1")
2344 (source (origin
2345 (method url-fetch)
2346 (uri (pypi-uri "requests" version))
2347 (sha256
2348 (base32
2349 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2350 (build-system python-build-system)
2351 (native-inputs
2352 `(("python-py" ,python-py)
2353 ("python-pytest" ,python-pytest)
2354 ("python-pytest-cov" ,python-pytest-cov)
2355 ("python-wheel" ,python-wheel)))
2356 (home-page "http://python-requests.org/")
2357 (synopsis "Python HTTP library")
2358 (description
2359 "Requests is a Python HTTP client library. It aims to be easier to use
2360than Python’s urllib2 library.")
2361 (license license:asl2.0)))
2362
2363;; Some software requires an older version of Requests, notably Docker
2364;; Compose.
2365(define-public python-requests-2.7
2366 (package (inherit python-requests)
2367 (version "2.7.0")
2368 (source (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "requests" version))
2371 (sha256
2372 (base32
2373 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2374
2375(define-public python2-requests
2376 (package-with-python2 python-requests))
2377
2378(define-public python-vcversioner
2379 (package
2380 (name "python-vcversioner")
2381 (version "2.16.0.0")
2382 (source
2383 (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "vcversioner" version))
2386 (sha256
2387 (base32
2388 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2389 (build-system python-build-system)
2390 (synopsis "Python library for version number discovery")
2391 (description "Vcversioner is a Python library that inspects tagging
2392information in a variety of version control systems in order to discover
2393version numbers.")
2394 (home-page "https://github.com/habnabit/vcversioner")
2395 (license license:isc)))
2396
2397(define-public python2-vcversioner
2398 (package-with-python2 python-vcversioner))
2399
2400(define-public python-jsonschema
2401 (package
2402 (name "python-jsonschema")
2403 (version "2.5.1")
2404 (source (origin
2405 (method url-fetch)
2406 (uri
2407 (string-append
2408 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2409 version ".tar.gz"))
2410 (sha256
2411 (base32
2412 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2413 (build-system python-build-system)
2414 (arguments
2415 '(#:phases
2416 (modify-phases %standard-phases
2417 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2418 (native-inputs
2419 `(("python-nose" ,python-nose)
2420 ("python-vcversioner" ,python-vcversioner)))
2421 (home-page "https://github.com/Julian/jsonschema")
2422 (synopsis "Implementation of JSON Schema for Python")
2423 (description
2424 "Jsonschema is an implementation of JSON Schema for Python.")
2425 (license license:expat)
2426 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2427
2428(define-public python2-jsonschema
2429 (let ((jsonschema (package-with-python2
2430 (strip-python2-variant python-jsonschema))))
2431 (package (inherit jsonschema)
2432 (native-inputs
2433 `(("python2-mock" ,python2-mock)
2434 ,@(package-native-inputs jsonschema)))
2435 (propagated-inputs
2436 `(("python2-functools32" ,python2-functools32))))))
2437
2438(define-public python-unidecode
2439 (package
2440 (name "python-unidecode")
2441 (version "0.04.18")
2442 (source (origin
2443 (method url-fetch)
2444 (uri (pypi-uri "Unidecode" version))
2445 (sha256
2446 (base32
2447 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2448 (build-system python-build-system)
2449 (home-page "https://pypi.python.org/pypi/Unidecode")
2450 (synopsis "ASCII transliterations of Unicode text")
2451 (description
2452 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2453useful when integrating with legacy code that doesn't support Unicode, or for
2454ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2455machine identifiers from human-readable Unicode strings that should still be
2456somewhat intelligeble.")
2457 (license license:gpl2+)))
2458
2459(define-public python2-unidecode
2460 (package-with-python2 python-unidecode))
2461
2462(define-public python-pyjwt
2463 (package
2464 (name "python-pyjwt")
2465 (version "1.4.0")
2466 (source
2467 (origin
2468 (method url-fetch)
2469 (uri (pypi-uri "PyJWT" version))
2470 (sha256
2471 (base32
2472 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2473 (build-system python-build-system)
2474 (native-inputs
2475 `(("python-pytest" ,python-pytest)
2476 ("python-pytest-cov" ,python-pytest-cov)
2477 ("python-pytest-runner" ,python-pytest-runner)))
2478 (home-page "http://github.com/progrium/pyjwt")
2479 (synopsis "JSON Web Token implementation in Python")
2480 (description
2481 "PyJWT is a JSON Web Token implementation written in Python.")
2482 (license license:expat)))
2483
2484(define-public python2-pyjwt
2485 (package-with-python2 python-pyjwt))
2486
2487(define-public python-oauthlib
2488 (package
2489 (name "python-oauthlib")
2490 (version "1.0.3")
2491 (source (origin
2492 (method url-fetch)
2493 (uri (pypi-uri "oauthlib" version))
2494 (sha256
2495 (base32
2496 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2497 (build-system python-build-system)
2498 (native-inputs
2499 `(("python-nose" ,python-nose)
2500 ("python-cryptography" ,python-cryptography)
2501 ("python-pyjwt" ,python-pyjwt)
2502 ("python-blinker" ,python-blinker)))
2503 (home-page "https://github.com/idan/oauthlib")
2504 (synopsis "OAuth implementation for Python")
2505 (description
2506 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2507OAuth request-signing logic.")
2508 (license license:bsd-3)
2509 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2510
2511(define-public python2-oauthlib
2512 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2513 (package
2514 (inherit base)
2515 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2516 ("python2-mock" ,python2-mock)
2517 ,@(package-native-inputs base))))))
2518
2519(define-public python-itsdangerous
2520 (package
2521 (name "python-itsdangerous")
2522 (version "0.24")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (string-append
2527 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2528 version ".tar.gz"))
2529 (sha256
2530 (base32
2531 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2532 (build-system python-build-system)
2533 (home-page "http://github.com/mitsuhiko/itsdangerous")
2534 (synopsis "Python library for passing data to/from untrusted environments")
2535 (description
2536 "Itsdangerous provides various helpers to pass trusted data to untrusted
2537environments and back.")
2538 (license license:bsd-3)))
2539
2540(define-public python2-itsdangerous
2541 (package-with-python2 python-itsdangerous))
2542
2543(define-public python-pyyaml
2544 (package
2545 (name "python-pyyaml")
2546 (version "3.11")
2547 (source
2548 (origin
2549 (method url-fetch)
2550 (uri (string-append
2551 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2552 version ".tar.gz"))
2553 (sha256
2554 (base32
2555 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2556 (build-system python-build-system)
2557 (inputs
2558 `(("libyaml" ,libyaml)))
2559 (home-page "http://pyyaml.org/wiki/PyYAML")
2560 (synopsis "YAML parser and emitter for Python")
2561 (description
2562 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2563complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2564API, and sensible error messages. PyYAML supports standard YAML tags and
2565provides Python-specific tags that allow to represent an arbitrary Python
2566object.")
2567 (license license:expat)))
2568
2569(define-public python2-pyyaml
2570 (package-with-python2 python-pyyaml))
2571
2572(define-public python-virtualenv
2573 (package
2574 (name "python-virtualenv")
2575 (version "15.0.3")
2576 (source
2577 (origin
2578 (method url-fetch)
2579 (uri (pypi-uri "virtualenv" version))
2580 (sha256
2581 (base32
2582 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2583 (build-system python-build-system)
2584 (arguments
2585 `(#:phases
2586 (modify-phases %standard-phases
2587 (replace 'check
2588 (lambda _
2589 ;; Disable failing test. See upstream bug report
2590 ;; https://github.com/pypa/virtualenv/issues/957
2591 (substitute* "tests/test_virtualenv.py"
2592 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2593 (zero? (system* "py.test")))))))
2594 (native-inputs
2595 `(("python-mock" ,python-mock)
2596 ("python-pytest" ,python-pytest)))
2597 (home-page "https://virtualenv.pypa.io/")
2598 (synopsis "Virtual Python environment builder")
2599 (description
2600 "Virtualenv is a tool to create isolated Python environments.")
2601 (license license:expat)))
2602
2603(define-public python2-virtualenv
2604 (package-with-python2 python-virtualenv))
2605
2606(define-public python-markupsafe
2607 (package
2608 (name "python-markupsafe")
2609 (version "0.23")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (string-append
2614 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2615 version ".tar.gz"))
2616 (sha256
2617 (base32
2618 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2619 (build-system python-build-system)
2620 (home-page "http://github.com/mitsuhiko/markupsafe")
2621 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2622 (description
2623 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2624for Python.")
2625 (license license:bsd-3)))
2626
2627(define-public python2-markupsafe
2628 (package-with-python2 python-markupsafe))
2629
2630(define-public python-jinja2
2631 (package
2632 (name "python-jinja2")
2633 (version "2.8")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (pypi-uri "Jinja2" version))
2638 (sha256
2639 (base32
2640 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2641 (build-system python-build-system)
2642 (propagated-inputs
2643 `(("python-markupsafe" ,python-markupsafe)))
2644 (home-page "http://jinja.pocoo.org/")
2645 (synopsis "Python template engine")
2646 (description
2647 "Jinja2 is a small but fast and easy to use stand-alone template engine
2648written in pure Python.")
2649 (license license:bsd-3)))
2650
2651(define-public python2-jinja2
2652 (package-with-python2 python-jinja2))
2653
2654(define-public python-pystache
2655 (package
2656 (name "python-pystache")
2657 (version "0.5.4")
2658 (source (origin
2659 (method url-fetch)
2660 (uri (pypi-uri "pystache" version))
2661 (sha256
2662 (base32
2663 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2664 (build-system python-build-system)
2665 (home-page "http://defunkt.io/pystache/")
2666 (synopsis "Python logic-less template engine")
2667 (description
2668 "Pystache is a Python implementation of the framework agnostic,
2669logic-free templating system Mustache.")
2670 (license license:expat)))
2671
2672(define-public python2-pystache
2673 (package-with-python2 python-pystache))
2674
2675(define-public python-joblib
2676 (package
2677 (name "python-joblib")
2678 (version "0.10.3")
2679 (source (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "joblib" version))
2682 (sha256
2683 (base32
2684 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2685 (modules '((guix build utils)))
2686 (snippet
2687 '(begin
2688 ;; Remove pre-compiled .pyc files from source.
2689 (for-each delete-file-recursively
2690 (find-files "." "__pycache__" #:directories? #t))
2691 (for-each delete-file (find-files "." "\\.pyc$"))
2692 #t))))
2693 (build-system python-build-system)
2694 (arguments
2695 `(#:phases
2696 (modify-phases %standard-phases
2697 (add-before 'check 'disable-failing-tests
2698 (lambda _
2699 ;; This numpydoc tests fails for unknown reasons
2700 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2701 ;; This numpydoc test depends on matplotlib, which is not a
2702 ;; required input.
2703 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2704 ;; These tests fail to execute sys.executable
2705 (substitute* "joblib/test/test_parallel.py"
2706 (("import nose" line)
2707 (string-append "from nose.plugins.skip import SkipTest\n" line))
2708 (("def test_nested_parallel_warnings" line)
2709 (string-append "@SkipTest\n" line))
2710 (("def test_parallel_with_interactively_defined_functions" line)
2711 (string-append "@SkipTest\n" line)))
2712 #t)))))
2713 ;; Provide nose to enable tests command
2714 (native-inputs
2715 `(("python-nose" ,python-nose)
2716 ("python-sphinx" ,python-sphinx)
2717 ("python-docutils" ,python-docutils)
2718 ("python-numpydoc" ,python-numpydoc)))
2719 (home-page "http://pythonhosted.org/joblib/")
2720 (synopsis "Using Python functions as pipeline jobs")
2721 (description
2722 "Joblib is a set of tools to provide lightweight pipelining in Python.
2723In particular, joblib offers: transparent disk-caching of the output values
2724and lazy re-evaluation (memoize pattern), easy simple parallel computing
2725logging and tracing of the execution.")
2726 (license license:bsd-3)))
2727
2728(define-public python2-joblib
2729 (package-with-python2 python-joblib))
2730
2731(define-public python-docutils
2732 (package
2733 (name "python-docutils")
2734 (version "0.13.1")
2735 (source
2736 (origin
2737 (method url-fetch)
2738 (uri (pypi-uri "docutils" version))
2739 (sha256
2740 (base32
2741 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2742 (build-system python-build-system)
2743 (arguments
2744 '(#:tests? #f)) ; no setup.py test command
2745 (home-page "http://docutils.sourceforge.net/")
2746 (synopsis "Python Documentation Utilities")
2747 (description
2748 "Docutils is a modular system for processing documentation into useful
2749formats, such as HTML, XML, and LaTeX. For input Docutils supports
2750reStructuredText.")
2751 ;; Most of the source code is public domain, but some source files are
2752 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2753 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2754
2755(define-public python2-docutils
2756 (package-with-python2 python-docutils))
2757
2758(define-public python-pygments
2759 (package
2760 (name "python-pygments")
2761 (version "2.0.2")
2762 (source
2763 (origin
2764 (method url-fetch)
2765 (uri (pypi-uri "Pygments" version))
2766 (sha256
2767 (base32
2768 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2769 (build-system python-build-system)
2770 (home-page "http://pygments.org/")
2771 (synopsis "Syntax highlighting")
2772 (description
2773 "Pygments is a syntax highlighting package written in Python.")
2774 (license license:bsd-2)))
2775
2776(define-public python2-pygments
2777 (package-with-python2 python-pygments))
2778
2779(define-public python-sphinx
2780 (package
2781 (name "python-sphinx")
2782 (version "1.2.3")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (string-append
2787 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2788 version ".tar.gz"))
2789 (sha256
2790 (base32
2791 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2792 (build-system python-build-system)
2793 (propagated-inputs
2794 `(("python-jinja2" ,python-jinja2)
2795 ("python-docutils" ,python-docutils)
2796 ("python-pygments" ,python-pygments)))
2797 (home-page "http://sphinx-doc.org/")
2798 (synopsis "Python documentation generator")
2799 (description "Sphinx is a tool that makes it easy to create documentation
2800for Python projects or other documents consisting of multiple reStructuredText
2801sources.")
2802 (license license:bsd-3)))
2803
2804(define-public python2-sphinx
2805 (package-with-python2 python-sphinx))
2806
2807(define-public python-sphinx-rtd-theme
2808 (package
2809 (name "python-sphinx-rtd-theme")
2810 (version "0.1.6")
2811 (source
2812 (origin
2813 (method url-fetch)
2814 (uri (string-append "https://pypi.python.org/packages/source/s/"
2815 "sphinx_rtd_theme/sphinx_rtd_theme-"
2816 version ".tar.gz"))
2817 (sha256
2818 (base32
2819 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2820 (build-system python-build-system)
2821 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2822 (synopsis "ReadTheDocs.org theme for Sphinx")
2823 (description "A theme for Sphinx used by ReadTheDocs.org.")
2824 (license license:expat)))
2825
2826(define-public python2-sphinx-rtd-theme
2827 (package-with-python2 python-sphinx-rtd-theme))
2828
2829(define-public python-rst.linker
2830 (package
2831 (name "python-rst.linker")
2832 (version "1.7")
2833 (source
2834 (origin
2835 (method url-fetch)
2836 (uri (pypi-uri "rst.linker" version))
2837 (sha256
2838 (base32
2839 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2840 (build-system python-build-system)
2841 (propagated-inputs
2842 `(("python-dateutil" ,python-dateutil-2)
2843 ("python-six" ,python-six)))
2844 (native-inputs
2845 `(("python-setuptools-scm" ,python-setuptools-scm)))
2846 ;; Test would require path.py, which would introduce a cyclic dependence.
2847 (arguments `(#:tests? #f))
2848 ;; Note: As of version 1.7 the documentation is not worth building.
2849 (home-page "https://github.com/jaraco/rst.linker")
2850 (synopsis "Sphinx plugin to add links and timestamps")
2851 (description "rst.linker allows to automatically replace text by a
2852reStructuredText external reference or timestamps. It's primary purpose is to
2853augment the changelog, but it can be used for other documents, too.")
2854 (license license:expat)))
2855
2856(define-public python2-rst.linker
2857 (package-with-python2 python-rst.linker))
2858
2859(define-public python-feedgenerator
2860 (package
2861 (name "python-feedgenerator")
2862 (version "1.8")
2863 (source
2864 (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "feedgenerator" version))
2867 (sha256
2868 (base32
2869 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2870 (modules '((guix build utils)))
2871 (snippet
2872 '(begin
2873 ;; Remove pre-compiled .pyc files from source.
2874 (for-each delete-file-recursively
2875 (find-files "." "__pycache__" #:directories? #t))
2876 (for-each delete-file (find-files "." "\\.pyc$"))
2877 #t))))
2878 (build-system python-build-system)
2879 (propagated-inputs
2880 `(("python-pytz" ,python-pytz)
2881 ("python-six" ,python-six)))
2882 (home-page "https://github.com/getpelican/feedgenerator")
2883 (synopsis
2884 "Standalone version of Django's Atom/RSS feed generator")
2885 (description
2886 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2887which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2888 (license license:bsd-3)))
2889
2890(define-public python2-feedgenerator
2891 (package-with-python2 python-feedgenerator))
2892
2893(define-public python-blinker
2894 (package
2895 (name "python-blinker")
2896 (version "1.4")
2897 (source
2898 (origin
2899 (method url-fetch)
2900 (uri (pypi-uri "blinker" version))
2901 (sha256
2902 (base32
2903 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2904 (build-system python-build-system)
2905 (home-page "http://pythonhosted.org/blinker/")
2906 (synopsis "Fast, simple object-to-object and broadcast signaling")
2907 (description
2908 "Blinker provides a fast dispatching system that allows any number of
2909interested parties to subscribe to events, or \"signals\".")
2910 (license license:expat)))
2911
2912(define-public python2-blinker
2913 (package-with-python2 python-blinker))
2914
2915(define-public pelican
2916 (package
2917 (name "pelican")
2918 (version "3.6.3")
2919 (source
2920 (origin
2921 (method url-fetch)
2922 (uri (pypi-uri "pelican" version))
2923 (sha256
2924 (base32
2925 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2926 (build-system python-build-system)
2927 (propagated-inputs
2928 `(("python-feedgenerator" ,python-feedgenerator)
2929 ("python-jinja2" ,python-jinja2)
2930 ("python-pygments" ,python-pygments)
2931 ("python-docutils" ,python-docutils)
2932 ("python-pytz" ,python-pytz)
2933 ("python-blinker" ,python-blinker)
2934 ("python-unidecode" ,python-unidecode)
2935 ("python-six" ,python-six)
2936 ("python-dateutil-2" ,python-dateutil-2)))
2937 (home-page "http://getpelican.com/")
2938 (arguments
2939 `(;; XXX Requires a lot more packages to do unit tests :P
2940 #:tests? #f
2941 #:phases (modify-phases %standard-phases
2942 (add-before
2943 'install 'adjust-requires
2944 ;; Since feedgenerator is installed from git, it doesn't
2945 ;; conform to the version requirements.
2946 ;;
2947 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2948 ;; version requirement so setuptools doesn't get confused.
2949 (lambda _
2950 (substitute* "setup.py"
2951 (("['\"]feedgenerator.*?['\"]")
2952 "'feedgenerator'")))))))
2953 (synopsis "Python-based static site publishing system")
2954 (description
2955 "Pelican is a tool to generate a static blog from reStructuredText,
2956Markdown input files, and more. Pelican uses Jinja2 for templating
2957and is very extensible.")
2958 (license license:agpl3+)))
2959
2960(define-public python-scikit-learn
2961 (package
2962 (name "python-scikit-learn")
2963 (version "0.16.1")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (string-append
2968 "https://github.com/scikit-learn/scikit-learn/archive/"
2969 version ".tar.gz"))
2970 (file-name (string-append name "-" version ".tar.gz"))
2971 (sha256
2972 (base32
2973 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2974 (build-system python-build-system)
2975 (arguments
2976 `(#:phases
2977 (alist-cons-before
2978 'check 'set-HOME
2979 ;; some tests require access to "$HOME"
2980 (lambda _ (setenv "HOME" "/tmp"))
2981 ;; Tests can only be run after the library has been installed and not
2982 ;; within the source directory.
2983 (alist-cons-after
2984 'install 'check
2985 (lambda _
2986 (with-directory-excursion "/tmp"
2987 ;; With Python 3 one test of 3334 fails
2988 ;; (sklearn.tests.test_common.test_transformers); see
2989 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2990 (system* "nosetests" "-v" "sklearn")))
2991 (alist-delete 'check %standard-phases)))))
2992 (inputs
2993 `(("openblas" ,openblas)))
2994 (native-inputs
2995 `(("python-nose" ,python-nose)))
2996 (propagated-inputs
2997 `(("python-numpy" ,python-numpy)
2998 ("python-scipy" ,python-scipy)))
2999 (home-page "http://scikit-learn.org/")
3000 (synopsis "Machine Learning in Python")
3001 (description
3002 "Scikit-learn provides simple and efficient tools for data
3003mining and data analysis.")
3004 (license license:bsd-3)))
3005
3006(define-public python2-scikit-learn
3007 (package-with-python2 python-scikit-learn))
3008
3009(define-public python-scikit-image
3010 (package
3011 (name "python-scikit-image")
3012 (version "0.11.3")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (string-append
3017 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3018 version ".tar.gz"))
3019 (sha256
3020 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3021 (build-system python-build-system)
3022 ;; See DEPENDS.txt for the list of build and run time requiremnts
3023 (propagated-inputs
3024 `(("python-matplotlib" ,python-matplotlib)
3025 ("python-networkx" ,python-networkx)
3026 ("python-scipy" ,python-scipy)
3027 ("python-pillow" ,python-pillow)))
3028 (native-inputs
3029 `(("python-numpy" ,python-numpy)
3030 ("python-cython" ,python-cython)
3031 ("python-six" ,python-six)))
3032 (home-page "http://scikit-image.org/")
3033 (synopsis "Image processing in Python")
3034 (description
3035 "Scikit-image is a collection of algorithms for image processing.")
3036 (license license:bsd-3)))
3037
3038(define-public python2-scikit-image
3039 (package-with-python2 python-scikit-image))
3040
3041(define-public python-redis
3042 (package
3043 (name "python-redis")
3044 (version "2.10.3")
3045 (source
3046 (origin
3047 (method url-fetch)
3048 (uri (string-append
3049 "https://pypi.python.org/packages/source/r/redis/redis-"
3050 version ".tar.gz"))
3051 (sha256
3052 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3053 (build-system python-build-system)
3054 ;; Tests require a running Redis server
3055 (arguments '(#:tests? #f))
3056 ;; As long as we are not running test, we do not need this input :-)
3057 ;;(native-inputs
3058 ;; `(("python-pytest" ,python-pytest)))
3059 (home-page "https://github.com/andymccurdy/redis-py")
3060 (synopsis "Redis Python client")
3061 (description
3062 "This package provides a Python interface to the Redis key-value store.")
3063 (license license:expat)))
3064
3065(define-public python2-redis
3066 (package-with-python2 python-redis))
3067
3068(define-public python-rq
3069 (package
3070 (name "python-rq")
3071 (version "0.5.2")
3072 (source
3073 (origin
3074 (method url-fetch)
3075 (uri (string-append
3076 "https://pypi.python.org/packages/source/r/rq/rq-"
3077 version ".tar.gz"))
3078 (sha256
3079 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3080 (build-system python-build-system)
3081 (propagated-inputs
3082 `(("python-click" ,python-click)
3083 ("python-redis" ,python-redis)))
3084 (home-page "http://python-rq.org/")
3085 (synopsis "Simple job queues for Python")
3086 (description
3087 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3088processing them in the background with workers. It is backed by Redis and it
3089is designed to have a low barrier to entry.")
3090 (license license:bsd-2)))
3091
3092(define-public python2-rq
3093 (package-with-python2 python-rq))
3094
3095(define-public python-cython
3096 (package
3097 (name "python-cython")
3098 (version "0.24.1")
3099 (source
3100 (origin
3101 (method url-fetch)
3102 (uri (pypi-uri "Cython" version))
3103 (sha256
3104 (base32
3105 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3106 (build-system python-build-system)
3107 ;; we need the full python package and not just the python-wrapper
3108 ;; because we need libpython3.3m.so
3109 (inputs
3110 `(("python" ,python)))
3111 (arguments
3112 `(#:phases
3113 (modify-phases %standard-phases
3114 (add-before 'check 'set-HOME
3115 ;; some tests require access to "$HOME/.cython"
3116 (lambda _ (setenv "HOME" "/tmp")))
3117 (replace 'check
3118 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3119 (home-page "http://cython.org/")
3120 (synopsis "C extensions for Python")
3121 (description "Cython is an optimising static compiler for both the Python
3122programming language and the extended Cython programming language. It makes
3123writing C extensions for Python as easy as Python itself.")
3124 (license license:asl2.0)
3125 (properties `((python2-variant . ,(delay python2-cython))))))
3126
3127(define-public python2-cython
3128 (package (inherit (package-with-python2
3129 (strip-python2-variant python-cython)))
3130 (name "python2-cython")
3131 (inputs
3132 `(("python-2" ,python-2))))) ; this is not automatically changed
3133
3134;; The RPython toolchain currently does not support Python 3.
3135(define-public python2-rpython
3136 (package
3137 (name "python2-rpython")
3138 (version "0.1.4")
3139 (source
3140 (origin
3141 (method url-fetch)
3142 (uri (pypi-uri "rpython" version))
3143 (sha256
3144 (base32
3145 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3146 (build-system python-build-system)
3147 (arguments `(#:python ,python-2))
3148 (native-inputs
3149 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3150 (home-page "https://rpython.readthedocs.org")
3151 (synopsis "Framework for implementing interpreters and virtual machines")
3152 (description "RPython is a translation and support framework for
3153producing implementations of dynamic languages, emphasizing a clean separation
3154between language specification and implementation aspects.")
3155 (license license:expat)))
3156
3157;; This version of numpy is missing the documentation and is only used to
3158;; build matplotlib which is required to build numpy's documentation.
3159(define python-numpy-bootstrap
3160 (package
3161 (name "python-numpy-bootstrap")
3162 (version "1.10.4")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3167 "/numpy-" version ".tar.gz"))
3168 (sha256
3169 (base32
3170 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3171 (build-system python-build-system)
3172 (inputs
3173 `(("openblas" ,openblas)
3174 ("lapack" ,lapack)))
3175 (native-inputs
3176 `(("python-nose" ,python-nose)
3177 ("gfortran" ,gfortran)))
3178 (arguments
3179 `(#:phases
3180 (modify-phases %standard-phases
3181 (add-before 'build 'set-environment-variables
3182 (lambda* (#:key inputs #:allow-other-keys)
3183 (call-with-output-file "site.cfg"
3184 (lambda (port)
3185 (format port
3186 "[openblas]
3187libraries = openblas
3188library_dirs = ~a/lib
3189include_dirs = ~a/include
3190
3191# backslash-n to make emacs happy
3192\n[lapack]
3193lapack_libs = lapack
3194library_dirs = ~a/lib
3195include_dirs = ~a/include
3196"
3197 (assoc-ref inputs "openblas")
3198 (assoc-ref inputs "openblas")
3199 (assoc-ref inputs "lapack")
3200 (assoc-ref inputs "lapack"))))
3201 ;; Use "gcc" executable, not "cc".
3202 (substitute* "numpy/distutils/system_info.py"
3203 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3204 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3205 #t))
3206 ;; Tests can only be run after the library has been installed and not
3207 ;; within the source directory.
3208 (delete 'check)
3209 (add-after 'install 'check
3210 (lambda* (#:key outputs inputs #:allow-other-keys)
3211 ;; Make installed package available for running the tests
3212 (add-installed-pythonpath inputs outputs)
3213 (with-directory-excursion "/tmp"
3214 (zero? (system* "python" "-c"
3215 "import numpy; numpy.test(verbose=2)"))))))))
3216 (home-page "http://www.numpy.org/")
3217 (synopsis "Fundamental package for scientific computing with Python")
3218 (description "NumPy is the fundamental package for scientific computing
3219with Python. It contains among other things: a powerful N-dimensional array
3220object, sophisticated (broadcasting) functions, tools for integrating C/C++
3221and Fortran code, useful linear algebra, Fourier transform, and random number
3222capabilities.")
3223 (license license:bsd-3)))
3224
3225(define python2-numpy-bootstrap
3226 (package-with-python2 python-numpy-bootstrap))
3227
3228(define-public python2-fastlmm
3229 (package
3230 (name "python2-fastlmm")
3231 (version "0.2.21")
3232 (source
3233 (origin
3234 (method url-fetch)
3235 (uri (pypi-uri "fastlmm" version ".zip"))
3236 (sha256
3237 (base32
3238 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3239 (build-system python-build-system)
3240 (arguments
3241 `(#:python ,python-2)) ; only Python 2.7 is supported
3242 (propagated-inputs
3243 `(("python2-numpy" ,python2-numpy)
3244 ("python2-scipy" ,python2-scipy)
3245 ("python2-matplotlib" ,python2-matplotlib)
3246 ("python2-pandas" ,python2-pandas)
3247 ("python2-scikit-learn" ,python2-scikit-learn)
3248 ("python2-pysnptools" ,python2-pysnptools)))
3249 (native-inputs
3250 `(("unzip" ,unzip)
3251 ("python2-cython" ,python2-cython)
3252 ("python2-mock" ,python2-mock)))
3253 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3254 (synopsis "Perform genome-wide association studies on large data sets")
3255 (description
3256 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3257Models, is a program for performing both single-SNP and SNP-set genome-wide
3258association studies (GWAS) on extremely large data sets.")
3259 (license license:asl2.0)))
3260
3261(define-public python-numpy
3262 (package (inherit python-numpy-bootstrap)
3263 (name "python-numpy")
3264 (outputs '("out" "doc"))
3265 (inputs
3266 `(("which" ,which)
3267 ,@(package-inputs python-numpy-bootstrap)))
3268 (propagated-inputs
3269 `(("python-matplotlib" ,python-matplotlib)
3270 ("python-pyparsing" ,python-pyparsing)
3271 ,@(package-propagated-inputs python-numpy-bootstrap)))
3272 (native-inputs
3273 `(("pkg-config" ,pkg-config)
3274 ("python-sphinx" ,python-sphinx)
3275 ("python-numpydoc" ,python-numpydoc)
3276 ("texlive" ,texlive)
3277 ("texinfo" ,texinfo)
3278 ("perl" ,perl)
3279 ,@(package-native-inputs python-numpy-bootstrap)))
3280 (arguments
3281 `(,@(substitute-keyword-arguments
3282 (package-arguments python-numpy-bootstrap)
3283 ((#:phases phases)
3284 `(alist-cons-after
3285 'install 'install-doc
3286 (lambda* (#:key inputs outputs #:allow-other-keys)
3287 ;; Make installed package available for building the
3288 ;; documentation
3289 (add-installed-pythonpath inputs outputs)
3290 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3291 (doc (string-append
3292 data "/doc/" ,name "-"
3293 ,(package-version python-numpy-bootstrap)))
3294 (info (string-append data "/info"))
3295 (html (string-append doc "/html"))
3296 (pyver ,(string-append "PYVER=")))
3297 (with-directory-excursion "doc"
3298 (mkdir-p html)
3299 (system* "make" "html" pyver)
3300 (system* "make" "latex" "PAPER=a4" pyver)
3301 (system* "make" "-C" "build/latex"
3302 "all-pdf" "PAPER=a4" pyver)
3303 ;; FIXME: Generation of the info file fails.
3304 ;; (system* "make" "info" pyver)
3305 ;; (mkdir-p info)
3306 ;; (copy-file "build/texinfo/numpy.info"
3307 ;; (string-append info "/numpy.info"))
3308 (for-each (lambda (file)
3309 (copy-file (string-append "build/latex" file)
3310 (string-append doc file)))
3311 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3312 (with-directory-excursion "build/html"
3313 (for-each (lambda (file)
3314 (let* ((dir (dirname file))
3315 (tgt-dir (string-append html "/" dir)))
3316 (unless (equal? "." dir)
3317 (mkdir-p tgt-dir))
3318 (install-file file html)))
3319 (find-files "." ".*"))))))
3320 ,phases)))))))
3321
3322(define-public python2-numpy
3323 (package-with-python2 python-numpy))
3324
3325(define-public python-pyparsing
3326 (package
3327 (name "python-pyparsing")
3328 (version "2.0.3")
3329 (source
3330 (origin
3331 (method url-fetch)
3332 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3333 "/pyparsing-" version
3334 "/pyparsing-" version ".tar.gz"))
3335 (sha256
3336 (base32
3337 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3338 (build-system python-build-system)
3339 (outputs '("out" "doc"))
3340 (arguments
3341 `(#:tests? #f ; no test target
3342 #:modules ((guix build python-build-system)
3343 (guix build utils))
3344 #:phases
3345 (alist-cons-after
3346 'install 'install-doc
3347 (lambda* (#:key outputs #:allow-other-keys)
3348 (let* ((doc (string-append (assoc-ref outputs "doc")
3349 "/share/doc/" ,name "-" ,version))
3350 (html-doc (string-append doc "/html"))
3351 (examples (string-append doc "/examples")))
3352 (mkdir-p html-doc)
3353 (mkdir-p examples)
3354 (for-each
3355 (lambda (dir tgt)
3356 (map (lambda (file)
3357 (install-file file tgt))
3358 (find-files dir ".*")))
3359 (list "docs" "htmldoc" "examples")
3360 (list doc html-doc examples))))
3361 %standard-phases)))
3362 (home-page "http://pyparsing.wikispaces.com")
3363 (synopsis "Python parsing class library")
3364 (description
3365 "The pyparsing module is an alternative approach to creating and
3366executing simple grammars, vs. the traditional lex/yacc approach, or the use
3367of regular expressions. The pyparsing module provides a library of classes
3368that client code uses to construct the grammar directly in Python code.")
3369 (license license:expat)))
3370
3371(define-public python2-pyparsing
3372 (package-with-python2 python-pyparsing))
3373
3374(define-public python-numpydoc
3375 (package
3376 (name "python-numpydoc")
3377 (version "0.5")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (string-append
3382 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3383 version ".tar.gz"))
3384 (sha256
3385 (base32
3386 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3387 (modules '((guix build utils)))
3388 (snippet
3389 '(begin
3390 ;; Drop a test requiring matplotlib, which we cannot add as an
3391 ;; input since it would create a circular dependency: Extend the
3392 ;; test for Python 3, where it is already dropped, to Python 2.
3393 (substitute* "numpydoc/tests/test_plot_directive.py"
3394 (("3") "2"))))))
3395 (build-system python-build-system)
3396 (propagated-inputs
3397 `(("python-sphinx" ,python-sphinx)))
3398 (native-inputs
3399 `(("python-nose" ,python-nose)))
3400 (home-page "https://pypi.python.org/pypi/numpydoc")
3401 (synopsis
3402 "Numpy's Sphinx extensions")
3403 (description
3404 "Sphinx extension to support docstrings in Numpy format.")
3405 (license license:bsd-2)))
3406
3407(define-public python2-numpydoc
3408 (package-with-python2 python-numpydoc))
3409
3410(define-public python-numexpr
3411 (package
3412 (name "python-numexpr")
3413 (version "2.6.0")
3414 (source
3415 (origin
3416 (method url-fetch)
3417 (uri (pypi-uri "numexpr" version))
3418 (sha256
3419 (base32
3420 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3421 (build-system python-build-system)
3422 (arguments `(#:tests? #f)) ; no tests included
3423 (propagated-inputs
3424 `(("python-numpy" ,python-numpy)))
3425 (home-page "https://github.com/pydata/numexpr")
3426 (synopsis "Fast numerical expression evaluator for NumPy")
3427 (description
3428 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3429expressions that operate on arrays are accelerated and use less memory than
3430doing the same calculation in Python. In addition, its multi-threaded
3431capabilities can make use of all your cores, which may accelerate
3432computations, most specially if they are not memory-bounded (e.g. those using
3433transcendental functions).")
3434 (license license:expat)))
3435
3436(define-public python2-numexpr
3437 (package-with-python2 python-numexpr))
3438
3439(define-public python-matplotlib
3440 (package
3441 (name "python-matplotlib")
3442 (version "1.4.3")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3447 "/matplotlib-" version
3448 "/matplotlib-" version ".tar.gz"))
3449 (sha256
3450 (base32
3451 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3452 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3453 (build-system python-build-system)
3454 (outputs '("out" "doc"))
3455 (propagated-inputs ; the following packages are all needed at run time
3456 `(("python-pyparsing" ,python-pyparsing)
3457 ("python-pygobject" ,python-pygobject)
3458 ("gobject-introspection" ,gobject-introspection)
3459 ("python-tkinter" ,python "tk")
3460 ("python-dateutil" ,python-dateutil-2)
3461 ("python-numpy" ,python-numpy-bootstrap)
3462 ("python-pillow" ,python-pillow)
3463 ("python-pytz" ,python-pytz)
3464 ("python-six" ,python-six)
3465 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3466 ;; from 'gtk+') provides the required 'typelib' files used by
3467 ;; 'gobject-introspection'. The location of these files is set with the
3468 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3469 ;; is done automatically by a 'native-search-path' procedure. However,
3470 ;; at run-time the user must set this variable as follows:
3471 ;;
3472 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3473 ("gtk+" ,gtk+)
3474 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3475 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3476 ;; object. For this reason we need to import both libraries.
3477 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3478 ("python-pycairo" ,python-pycairo)
3479 ("python-cairocffi" ,python-cairocffi)))
3480 (inputs
3481 `(("libpng" ,libpng)
3482 ("imagemagick" ,imagemagick)
3483 ("freetype" ,freetype)
3484 ("cairo" ,cairo)
3485 ("glib" ,glib)
3486 ;; FIXME: Add backends when available.
3487 ;("python-wxpython" ,python-wxpython)
3488 ;("python-pyqt" ,python-pyqt)
3489 ("tcl" ,tcl)
3490 ("tk" ,tk)))
3491 (native-inputs
3492 `(("pkg-config" ,pkg-config)
3493 ("python-sphinx" ,python-sphinx)
3494 ("python-numpydoc" ,python-numpydoc)
3495 ("python-nose" ,python-nose)
3496 ("python-mock" ,python-mock)
3497 ("texlive" ,texlive)
3498 ("texinfo" ,texinfo)))
3499 (arguments
3500 `(#:phases
3501 (alist-cons-before
3502 'build 'configure-environment
3503 (lambda* (#:key outputs inputs #:allow-other-keys)
3504 (let ((cairo (assoc-ref inputs "cairo"))
3505 (gtk+ (assoc-ref inputs "gtk+")))
3506 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3507 ;; has not effect.
3508 (setenv "LD_LIBRARY_PATH"
3509 (string-append cairo "/lib:" gtk+ "/lib"))
3510 (setenv "HOME" (getcwd))
3511 (call-with-output-file "setup.cfg"
3512 (lambda (port)
3513 (format port "[directories]~%
3514basedirlist = ~a,~a~%
3515 [rc_options]~%
3516backend = TkAgg~%"
3517 (assoc-ref inputs "tcl")
3518 (assoc-ref inputs "tk"))))))
3519 (alist-cons-after
3520 'install 'install-doc
3521 (lambda* (#:key inputs outputs #:allow-other-keys)
3522 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3523 (doc (string-append data "/doc/" ,name "-" ,version))
3524 (info (string-append data "/info"))
3525 (html (string-append doc "/html")))
3526 ;; Make installed package available for building the
3527 ;; documentation
3528 (add-installed-pythonpath inputs outputs)
3529 (with-directory-excursion "doc"
3530 ;; Produce pdf in 'A4' format.
3531 (substitute* (find-files "." "conf\\.py")
3532 (("latex_paper_size = 'letter'")
3533 "latex_paper_size = 'a4'"))
3534 (mkdir-p html)
3535 (mkdir-p info)
3536 ;; The doc recommends to run the 'html' target twice.
3537 (system* "python" "make.py" "html")
3538 (system* "python" "make.py" "html")
3539 (copy-recursively "build/html" html)
3540 (system* "python" "make.py" "latex")
3541 (system* "python" "make.py" "texinfo")
3542 (symlink (string-append html "/_images")
3543 (string-append info "/matplotlib-figures"))
3544 (with-directory-excursion "build/texinfo"
3545 (substitute* "matplotlib.texi"
3546 (("@image\\{([^,]*)" all file)
3547 (string-append "@image{matplotlib-figures/" file)))
3548 (symlink (string-append html "/_images")
3549 "./matplotlib-figures")
3550 (system* "makeinfo" "--no-split"
3551 "-o" "matplotlib.info" "matplotlib.texi"))
3552 (copy-file "build/texinfo/matplotlib.info"
3553 (string-append info "/matplotlib.info"))
3554 (copy-file "build/latex/Matplotlib.pdf"
3555 (string-append doc "/Matplotlib.pdf")))))
3556 %standard-phases))))
3557 (home-page "http://matplotlib.org")
3558 (synopsis "2D plotting library for Python")
3559 (description
3560 "Matplotlib is a Python 2D plotting library which produces publication
3561quality figures in a variety of hardcopy formats and interactive environments
3562across platforms. Matplotlib can be used in Python scripts, the python and
3563ipython shell, web application servers, and six graphical user interface
3564toolkits.")
3565 (license license:psfl)
3566 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3567
3568(define-public python2-matplotlib
3569 (let ((matplotlib (package-with-python2
3570 (strip-python2-variant python-matplotlib))))
3571 (package (inherit matplotlib)
3572 ;; Make sure to use special packages for Python 2 instead
3573 ;; of those automatically rewritten by package-with-python2.
3574 (propagated-inputs
3575 `(("python2-pycairo" ,python2-pycairo)
3576 ("python2-pygobject-2" ,python2-pygobject-2)
3577 ("python2-tkinter" ,python-2 "tk")
3578 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3579 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3580
3581(define-public python2-pysnptools
3582 (package
3583 (name "python2-pysnptools")
3584 (version "0.3.9")
3585 (source
3586 (origin
3587 (method url-fetch)
3588 (uri (pypi-uri "pysnptools" version ".zip"))
3589 (sha256
3590 (base32
3591 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3592 (build-system python-build-system)
3593 (arguments
3594 `(#:python ,python-2)) ; only Python 2.7 is supported
3595 (propagated-inputs
3596 `(("python2-numpy" ,python2-numpy)
3597 ("python2-scipy" ,python2-scipy)
3598 ("python2-pandas" ,python2-pandas)))
3599 (native-inputs
3600 `(("python2-cython" ,python2-cython)))
3601 (native-inputs
3602 `(("unzip" ,unzip)))
3603 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3604 (synopsis "Library for reading and manipulating genetic data")
3605 (description
3606 "PySnpTools is a library for reading and manipulating genetic data. It
3607can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3608those files. It can also efficiently manipulate ranges of integers using set
3609operators such as union, intersection, and difference.")
3610 (license license:asl2.0)))
3611
3612(define-public python-rpy2
3613 (package
3614 (name "python-rpy2")
3615 (version "2.7.6")
3616 (source
3617 (origin
3618 (method url-fetch)
3619 (uri (pypi-uri "rpy2" version))
3620 (sha256
3621 (base32
3622 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3623 (build-system python-build-system)
3624 (propagated-inputs
3625 `(("python-six" ,python-six)))
3626 (inputs
3627 `(("readline" ,readline)
3628 ("icu4c" ,icu4c)
3629 ("pcre" ,pcre)
3630 ("r" ,r)))
3631 (native-inputs
3632 `(("zlib" ,zlib)))
3633 (home-page "http://rpy.sourceforge.net/")
3634 (synopsis "Python interface to the R language")
3635 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3636low-level interface to R from Python, a proposed high-level interface,
3637including wrappers to graphical libraries, as well as R-like structures and
3638functions.")
3639 (license license:gpl3+)))
3640
3641(define-public python2-rpy2
3642 (let ((rpy2 (package-with-python2 python-rpy2)))
3643 (package (inherit rpy2)
3644 (native-inputs
3645 `(("python2-singledispatch" ,python2-singledispatch)
3646 ,@(package-native-inputs rpy2))))))
3647
3648(define-public python-scipy
3649 (package
3650 (name "python-scipy")
3651 (version "0.16.0")
3652 (source
3653 (origin
3654 (method url-fetch)
3655; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3656 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3657 "/scipy-" version ".tar.xz"))
3658 (sha256
3659 (base32
3660 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3661 (build-system python-build-system)
3662 (propagated-inputs
3663 `(("python-numpy" ,python-numpy)
3664 ("python-matplotlib" ,python-matplotlib)
3665 ("python-pyparsing" ,python-pyparsing)))
3666 (inputs
3667 `(("lapack" ,lapack)
3668 ("openblas" ,openblas)))
3669 (native-inputs
3670 `(("python-nose" ,python-nose)
3671 ("python-sphinx" ,python-sphinx)
3672 ("python-numpydoc" ,python-numpydoc)
3673 ("gfortran" ,gfortran)
3674 ("texlive" ,texlive)
3675 ("perl" ,perl)))
3676 (outputs '("out" "doc"))
3677 (arguments
3678 `(#:phases
3679 (alist-cons-before
3680 'build 'configure-openblas
3681 (lambda* (#:key inputs #:allow-other-keys)
3682 (call-with-output-file "site.cfg"
3683 (lambda (port)
3684 (format port
3685 "[blas]
3686libraries = openblas
3687library_dirs = ~a/lib
3688include_dirs = ~a/include
3689
3690# backslash-n to make emacs happy
3691\n[atlas]
3692library_dirs = ~a/lib
3693atlas_libs = openblas
3694"
3695 (assoc-ref inputs "openblas")
3696 (assoc-ref inputs "openblas")
3697 (assoc-ref inputs "openblas"))))
3698 #t)
3699 (alist-cons-after
3700 'install 'install-doc
3701 (lambda* (#:key inputs outputs #:allow-other-keys)
3702 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3703 (doc (string-append data "/doc/" ,name "-" ,version))
3704 (html (string-append doc "/html"))
3705 (pyver ,(string-append "PYVER=")))
3706 ;; Make installed package available for building the
3707 ;; documentation
3708 (add-installed-pythonpath inputs outputs)
3709 (with-directory-excursion "doc"
3710 ;; Fix generation of images for mathematical expressions.
3711 (substitute* (find-files "source" "conf\\.py")
3712 (("pngmath_use_preview = True")
3713 "pngmath_use_preview = False"))
3714 (mkdir-p html)
3715 (system* "make" "html" pyver)
3716 (system* "make" "latex" "PAPER=a4" pyver)
3717 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3718 (copy-file "build/latex/scipy-ref.pdf"
3719 (string-append doc "/scipy-ref.pdf"))
3720 (with-directory-excursion "build/html"
3721 (for-each (lambda (file)
3722 (let* ((dir (dirname file))
3723 (tgt-dir (string-append html "/" dir)))
3724 (install-file file html)))
3725 (find-files "." ".*"))))))
3726 ;; Tests can only be run after the library has been installed and not
3727 ;; within the source directory.
3728 (alist-cons-after
3729 'install 'check
3730 (lambda _
3731 (with-directory-excursion "/tmp"
3732 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3733 (alist-delete
3734 'check
3735 (alist-cons-after
3736 'unpack 'fix-tests
3737 (lambda _
3738 (substitute* "scipy/integrate/tests/test_quadpack.py"
3739 (("libm.so") "libm.so.6"))
3740 #t)
3741 %standard-phases)))))))
3742 (home-page "http://www.scipy.org/")
3743 (synopsis "The Scipy library provides efficient numerical routines")
3744 (description "The SciPy library is one of the core packages that make up
3745the SciPy stack. It provides many user-friendly and efficient numerical
3746routines such as routines for numerical integration and optimization.")
3747 (license license:bsd-3)))
3748
3749(define-public python2-scipy
3750 (package-with-python2 python-scipy))
3751
3752(define-public python-socksipy-branch
3753 (package
3754 (name "python-socksipy-branch")
3755 (version "1.01")
3756 (source
3757 (origin
3758 (method url-fetch)
3759 (uri (pypi-uri "SocksiPy-branch" version))
3760 (sha256
3761 (base32
3762 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3763 (build-system python-build-system)
3764 (arguments
3765 `(#:tests? #f)) ; There are no tests
3766 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3767 (synopsis "Python SOCKS module")
3768 (description
3769 "SocksiPy - A Python SOCKS client module. It provides a
3770socket-like interface that supports connections to any TCP
3771service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3772The original version was developed by Dan Haim, this is a
3773branch created by Mario Vilas to address some open issues,
3774as the original project seems to have been abandoned circa 2007.")
3775 (license license:bsd-3)))
3776
3777(define-public python2-socksipy-branch
3778 (package-with-python2 python-socksipy-branch))
3779
3780(define-public python-sqlalchemy
3781 (package
3782 (name "python-sqlalchemy")
3783 (version "1.0.12")
3784 (source
3785 (origin
3786 (method url-fetch)
3787 (uri (string-append "https://pypi.python.org/packages/source/S/"
3788 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3789 (sha256
3790 (base32
3791 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3792 (build-system python-build-system)
3793 (native-inputs
3794 `(("python-cython" ,python-cython) ;for c extensions
3795 ("python-pytest" ,python-pytest)
3796 ("python-mock" ,python-mock))) ;for tests
3797 (arguments
3798 `(#:phases (alist-replace
3799 'check
3800 (lambda _ (zero? (system* "py.test")))
3801 %standard-phases)))
3802 (home-page "http://www.sqlalchemy.org")
3803 (synopsis "Database abstraction library")
3804 (description
3805 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3806gives application developers the full power and flexibility of SQL. It
3807provides a full suite of well known enterprise-level persistence patterns,
3808designed for efficient and high-performing database access, adapted into a
3809simple and Pythonic domain language.")
3810 (license license:x11)))
3811
3812(define-public python2-sqlalchemy
3813 (package-with-python2 python-sqlalchemy))
3814
3815(define-public python-pycodestyle
3816 (package
3817 (name "python-pycodestyle")
3818 (version "2.0.0")
3819 (source
3820 (origin
3821 (method url-fetch)
3822 (uri (pypi-uri "pycodestyle" version))
3823 (sha256
3824 (base32
3825 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3826 (build-system python-build-system)
3827 (home-page "https://pycodestyle.readthedocs.io/")
3828 (synopsis "Python style guide checker")
3829 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3830Python code against some of the style conventions in
3831@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3832 (license license:expat)))
3833
3834(define-public python2-pycodestyle
3835 (package-with-python2 python-pycodestyle))
3836
3837(define-public python-orderedmultidict
3838 (package
3839 (name "python-orderedmultidict")
3840 (version "0.7.10")
3841 (source
3842 (origin
3843 (method url-fetch)
3844 (uri (pypi-uri "orderedmultidict" version))
3845 (sha256
3846 (base32
3847 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3848 (build-system python-build-system)
3849 (arguments
3850 `(#:phases
3851 (modify-phases %standard-phases
3852 (add-after 'unpack 'fix-tests
3853 (lambda _
3854 ;; The package uses nosetest for running the tests.
3855 ;; Adding this initfile allows to run the test suite
3856 ;; without requiring nosetest.
3857 (zero? (system* "touch" "tests/__init__.py")))))))
3858 (propagated-inputs
3859 `(("python-six" ,python-six)))
3860 (native-inputs
3861 `(("python-pycodestyle" ,python-pycodestyle)))
3862 (home-page "https://github.com/gruns/orderedmultidict")
3863 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3864 (description "This package contains a library for ordered multivalue
3865dictionaries. A multivalue dictionary is a dictionary that can store
3866multiple values for the same key. An ordered multivalue dictionary is a
3867multivalue dictionary that retains the order of insertions and deletions.")
3868 (license license:unlicense)))
3869
3870(define-public python2-orderedmultidict
3871 (package-with-python2 python-orderedmultidict))
3872
3873(define-public python-furl
3874 (package
3875 (name "python-furl")
3876 (version "0.5.6")
3877 (source
3878 (origin
3879 (method url-fetch)
3880 (uri (pypi-uri "furl" version))
3881 (sha256
3882 (base32
3883 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3884 (build-system python-build-system)
3885 (propagated-inputs
3886 `(("python-six" ,python-six)
3887 ("python-orderedmultidict" ,python-orderedmultidict)))
3888 (native-inputs
3889 `(("python-pycodestyle" ,python-pycodestyle)))
3890 (home-page "https://github.com/gruns/furl")
3891 (synopsis "URL manipulation in Python")
3892 (description "Furl provides an easy-to-use alternative to the
3893@code{urllib} and @code{urlparse} modules for manipulating URLs.")
3894 (license license:unlicense)))
3895
3896(define-public python2-furl
3897 (package-with-python2 python-furl))
3898
3899(define-public python-flask-babel
3900 (package
3901 (name "python-flask-babel")
3902 (version "0.11.1")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (pypi-uri "Flask-Babel" version))
3907 (sha256
3908 (base32
3909 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3910 (build-system python-build-system)
3911 (propagated-inputs
3912 `(("python-flask" ,python-flask)
3913 ("python-babel" ,python-babel)
3914 ("python-jinja2" ,python-jinja2)
3915 ("python-pytz" ,python-pytz)))
3916 (home-page "https://github.com/python-babel/flask-babel")
3917 (synopsis "Add i18n/l10n support to Flask applications")
3918 (description "This package implements internationalization and localization
3919support for Flask. This is based on the Python babel module as well as pytz -
3920both of which are installed automatically if you install this library.")
3921 (license license:bsd-3)))
3922
3923(define-public python2-flask-babel
3924 (package-with-python2 python-flask-babel))
3925
3926(define-public python-sqlalchemy-utils
3927 (package
3928 (name "python-sqlalchemy-utils")
3929 (version "0.32.11")
3930 (source
3931 (origin
3932 (method url-fetch)
3933 (uri (pypi-uri "SQLAlchemy-Utils" version))
3934 (sha256
3935 (base32
3936 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
3937 (build-system python-build-system)
3938 (propagated-inputs
3939 `(("python-six" ,python-six)
3940 ("python-sqlalchemy" ,python-sqlalchemy)))
3941 (native-inputs
3942 `(("python-pytest" ,python-pytest)))
3943 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3944 (synopsis "Various utility functions for SQLAlchemy")
3945 (description
3946 "SQLAlchemy-utils provides various utility functions and custom data types
3947for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3948
3949You might also want to install the following optional dependencies:
3950@enumerate
3951@item @code{python-passlib}
3952@item @code{python-babel}
3953@item @code{python-cryptography}
3954@item @code{python-pytz}
3955@item @code{python-psycopg2}
3956@item @code{python-furl}
3957@item @code{python-flask-babel}
3958@end enumerate
3959")
3960 (license license:bsd-3)))
3961
3962(define-public python2-sqlalchemy-utils
3963 (package-with-python2 python-sqlalchemy-utils))
3964
3965(define-public python-alembic
3966 (package
3967 (name "python-alembic")
3968 (version "0.8.7")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 (uri (pypi-uri "alembic" version))
3973 (sha256
3974 (base32
3975 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3976 (build-system python-build-system)
3977 (native-inputs
3978 `(("python-mock" ,python-mock)
3979 ("python-pytest-cov" ,python-pytest-cov)))
3980 (propagated-inputs
3981 `(("python-sqlalchemy" ,python-sqlalchemy)
3982 ("python-mako" ,python-mako)
3983 ("python-editor" ,python-editor)))
3984 (home-page "http://bitbucket.org/zzzeek/alembic")
3985 (synopsis
3986 "Database migration tool for SQLAlchemy")
3987 (description
3988 "Alembic is a lightweight database migration tool for usage with the
3989SQLAlchemy Database Toolkit for Python.")
3990 (license license:expat)))
3991
3992(define-public python2-alembic
3993 (package-with-python2 python-alembic))
3994
3995(define-public python-distutils-extra
3996 (package
3997 (name "python-distutils-extra")
3998 (version "2.38")
3999 (source
4000 (origin
4001 (method url-fetch)
4002 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4003 version "/+download/python-distutils-extra-"
4004 version ".tar.gz"))
4005 (sha256
4006 (base32
4007 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4008 (build-system python-build-system)
4009 (home-page "https://launchpad.net/python-distutils-extra/")
4010 (synopsis "Enhancements to Python's distutils")
4011 (description
4012 "The python-distutils-extra module enables you to easily integrate
4013gettext support, themed icons, and scrollkeeper-based documentation into
4014Python's distutils.")
4015 (license license:gpl2)))
4016
4017(define-public python2-distutils-extra
4018 (package-with-python2 python-distutils-extra))
4019
4020(define-public python2-elib.intl
4021 (package
4022 (name "python2-elib.intl")
4023 (version "0.0.3")
4024 (source
4025 (origin
4026 ;; This project doesn't tag releases or publish tarballs, so we take
4027 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4028 (method git-fetch)
4029 (uri (git-reference
4030 (url "https://github.com/dieterv/elib.intl.git")
4031 (commit "d09997cfef")))
4032 (sha256
4033 (base32
4034 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4035 (build-system python-build-system)
4036 (arguments
4037 ;; incompatible with Python 3 (exception syntax)
4038 `(#:python ,python-2
4039 #:tests? #f))
4040 (home-page "https://github.com/dieterv/elib.intl")
4041 (synopsis "Enhanced internationalization for Python")
4042 (description
4043 "The elib.intl module provides enhanced internationalization (I18N)
4044services for your Python modules and applications.")
4045 (license license:lgpl3+)))
4046
4047(define-public python-pillow
4048 (package
4049 (name "python-pillow")
4050 (version "3.3.3")
4051 (source
4052 (origin
4053 (method url-fetch)
4054 (uri (pypi-uri "Pillow" version))
4055 (sha256
4056 (base32
4057 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4058 (build-system python-build-system)
4059 (native-inputs
4060 `(("python-nose" ,python-nose)))
4061 (inputs
4062 `(("freetype" ,freetype)
4063 ("lcms" ,lcms)
4064 ("zlib" ,zlib)
4065 ("libjpeg" ,libjpeg)
4066 ("openjpeg" ,openjpeg)
4067 ("libtiff" ,libtiff)
4068 ("libwebp" ,libwebp)))
4069 (arguments
4070 `(#:phases (modify-phases %standard-phases
4071 (add-after
4072 'install 'check-installed
4073 (lambda* (#:key outputs inputs #:allow-other-keys)
4074 (begin
4075 (setenv "HOME" (getcwd))
4076 ;; Make installed package available for running the
4077 ;; tests
4078 (add-installed-pythonpath inputs outputs)
4079 (and (zero? (system* "python" "selftest.py"
4080 "--installed"))
4081 (zero? (system* "python" "test-installed.py"))))))
4082 (delete 'check))))
4083 (home-page "https://pypi.python.org/pypi/Pillow")
4084 (synopsis "Fork of the Python Imaging Library")
4085 (description
4086 "The Python Imaging Library adds image processing capabilities to your
4087Python interpreter. This library provides extensive file format support, an
4088efficient internal representation, and fairly powerful image processing
4089capabilities. The core image library is designed for fast access to data
4090stored in a few basic pixel formats. It should provide a solid foundation for
4091a general image processing tool.")
4092 (license (license:x11-style
4093 "http://www.pythonware.com/products/pil/license.htm"
4094 "The PIL Software License"))))
4095
4096(define-public python2-pillow
4097 (package-with-python2 python-pillow))
4098
4099(define-public python-pycparser
4100 (package
4101 (name "python-pycparser")
4102 (version "2.14")
4103 (source
4104 (origin
4105 (method url-fetch)
4106 (uri (pypi-uri "pycparser" version))
4107 (sha256
4108 (base32
4109 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4110 (outputs '("out" "doc"))
4111 (build-system python-build-system)
4112 (native-inputs
4113 `(("pkg-config" ,pkg-config)))
4114 (arguments
4115 `(#:phases
4116 (alist-replace
4117 'check
4118 (lambda _
4119 (with-directory-excursion "tests"
4120 (zero? (system* "python" "all_tests.py"))))
4121 (alist-cons-after
4122 'install 'install-doc
4123 (lambda* (#:key outputs #:allow-other-keys)
4124 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4125 (doc (string-append data "/doc/" ,name "-" ,version))
4126 (examples (string-append doc "/examples")))
4127 (mkdir-p examples)
4128 (for-each (lambda (file)
4129 (copy-file (string-append "." file)
4130 (string-append doc file)))
4131 '("/README.rst" "/CHANGES" "/LICENSE"))
4132 (copy-recursively "examples" examples)))
4133 %standard-phases))))
4134 (home-page "https://github.com/eliben/pycparser")
4135 (synopsis "C parser in Python")
4136 (description
4137 "Pycparser is a complete parser of the C language, written in pure Python
4138using the PLY parsing library. It parses C code into an AST and can serve as
4139a front-end for C compilers or analysis tools.")
4140 (license license:bsd-3)))
4141
4142(define-public python2-pycparser
4143 (package-with-python2 python-pycparser))
4144
4145(define-public python-cffi
4146 (package
4147 (name "python-cffi")
4148 (version "1.4.2")
4149 (source
4150 (origin
4151 (method url-fetch)
4152 (uri (pypi-uri "cffi" version))
4153 (sha256
4154 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4155 (build-system python-build-system)
4156 (outputs '("out" "doc"))
4157 (inputs
4158 `(("libffi" ,libffi)))
4159 (propagated-inputs ; required at run-time
4160 `(("python-pycparser" ,python-pycparser)))
4161 (native-inputs
4162 `(("pkg-config" ,pkg-config)
4163 ("python-sphinx" ,python-sphinx)
4164 ("python-pytest" ,python-pytest)))
4165 (arguments
4166 `(#:phases
4167 (alist-cons-after
4168 'install 'install-doc
4169 (lambda* (#:key outputs #:allow-other-keys)
4170 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4171 (doc (string-append data "/doc/" ,name "-" ,version))
4172 (html (string-append doc "/html")))
4173 (with-directory-excursion "doc"
4174 (system* "make" "html")
4175 (mkdir-p html)
4176 (copy-recursively "build/html" html))
4177 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4178 %standard-phases)))
4179 (home-page "http://cffi.readthedocs.org")
4180 (synopsis "Foreign function interface for Python")
4181 (description
4182 "Foreign Function Interface for Python calling C code.")
4183 (license license:expat)))
4184
4185(define-public python2-cffi
4186 (package-with-python2 python-cffi))
4187
4188(define-public python-xcffib
4189 (package
4190 (name "python-xcffib")
4191 (version "0.1.9")
4192 (source
4193 (origin
4194 (method url-fetch)
4195 (uri (string-append "https://pypi.python.org/packages/source/x/"
4196 "xcffib/xcffib-" version ".tar.gz"))
4197 (sha256
4198 (base32
4199 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4200 (build-system python-build-system)
4201 (inputs
4202 `(("libxcb" ,libxcb)))
4203 (propagated-inputs
4204 `(("python-cffi" ,python-cffi) ; used at run time
4205 ("python-six" ,python-six)))
4206 (arguments
4207 `(#:phases
4208 (alist-cons-after
4209 'install 'install-doc
4210 (lambda* (#:key outputs #:allow-other-keys)
4211 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4212 "/doc/" ,name "-" ,version)))
4213 (mkdir-p doc)
4214 (copy-file "README.md"
4215 (string-append doc "/README.md"))))
4216 %standard-phases)))
4217 (home-page "https://github.com/tych0/xcffib")
4218 (synopsis "XCB Python bindings")
4219 (description
4220 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4221support for Python 3 and PyPy. It is based on cffi.")
4222 (license license:expat)))
4223
4224(define-public python2-xcffib
4225 (package-with-python2 python-xcffib))
4226
4227(define-public python-cairocffi
4228 (package
4229 (name "python-cairocffi")
4230 (version "0.6")
4231 (source
4232 (origin
4233 (method url-fetch)
4234 ;; The archive on pypi is missing the 'utils' directory!
4235 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4236 version ".tar.gz"))
4237 (file-name (string-append name "-" version ".tar.gz"))
4238 (sha256
4239 (base32
4240 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4241 (build-system python-build-system)
4242 (outputs '("out" "doc"))
4243 (inputs
4244 `(("gdk-pixbuf" ,gdk-pixbuf)
4245 ("cairo" ,cairo)))
4246 (native-inputs
4247 `(("pkg-config" ,pkg-config)
4248 ("python-sphinx" ,python-sphinx)
4249 ("python-docutils" ,python-docutils)))
4250 (propagated-inputs
4251 `(("python-xcffib" ,python-xcffib))) ; used at run time
4252 (arguments
4253 `(#:phases
4254 (alist-cons-after
4255 'install 'install-doc
4256 (lambda* (#:key inputs outputs #:allow-other-keys)
4257 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4258 (doc (string-append data "/doc/" ,name "-" ,version))
4259 (html (string-append doc "/html")))
4260 (setenv "LD_LIBRARY_PATH"
4261 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4262 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4263 (setenv "LANG" "en_US.UTF-8")
4264 (mkdir-p html)
4265 (for-each (lambda (file)
4266 (copy-file (string-append "." file)
4267 (string-append doc file)))
4268 '("/README.rst" "/CHANGES" "/LICENSE"))
4269 (system* "python" "setup.py" "build_sphinx")
4270 (copy-recursively "docs/_build/html" html)))
4271 %standard-phases)))
4272 (home-page "https://github.com/SimonSapin/cairocffi")
4273 (synopsis "Python bindings and object-oriented API for Cairo")
4274 (description
4275 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4276Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4277graphics library with support for multiple backends including image buffers,
4278PNG, PostScript, PDF, and SVG file output.")
4279 (license license:bsd-3)))
4280
4281(define-public python2-cairocffi
4282 (package-with-python2 python-cairocffi))
4283
4284(define-public python-decorator
4285 (package
4286 (name "python-decorator")
4287 (version "4.0.9")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (pypi-uri "decorator" version))
4292 (sha256
4293 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4294 (build-system python-build-system)
4295 (arguments '(#:tests? #f)) ; no test target
4296 (home-page "https://pypi.python.org/pypi/decorator/")
4297 (synopsis "Python module to simplify usage of decorators")
4298 (description
4299 "The aim of the decorator module is to simplify the usage of decorators
4300for the average programmer, and to popularize decorators usage giving examples
4301of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4302etc. The core of this module is a decorator factory.")
4303 (license license:expat)))
4304
4305(define-public python2-decorator
4306 (package-with-python2 python-decorator))
4307
4308(define-public python-drmaa
4309 (package
4310 (name "python-drmaa")
4311 (version "0.7.6")
4312 (source
4313 (origin
4314 (method url-fetch)
4315 (uri (string-append
4316 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4317 version ".tar.gz"))
4318 (sha256
4319 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4320 (build-system python-build-system)
4321 ;; The test suite requires libdrmaa which is provided by the cluster
4322 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4323 ;; should be set to the path of the libdrmaa library.
4324 (arguments '(#:tests? #f))
4325 (native-inputs
4326 `(("python-nose" ,python-nose)))
4327 (home-page "https://pypi.python.org/pypi/drmaa")
4328 (synopsis "Python bindings for the DRMAA library")
4329 (description
4330 "A Python package for Distributed Resource Management (DRM) job
4331submission and control. This package is an implementation of the DRMAA 1.0
4332Python language binding specification.")
4333 (license license:bsd-3)))
4334
4335(define-public python2-drmaa
4336 (package-with-python2 python-drmaa))
4337
4338(define-public python-gridmap
4339 (package
4340 (name "python-gridmap")
4341 (version "0.13.0")
4342 (source
4343 (origin
4344 (method url-fetch)
4345 (uri (string-append
4346 "https://github.com/pygridtools/gridmap/archive/v"
4347 version ".tar.gz"))
4348 (file-name (string-append name "-" version ".tar.gz"))
4349 (sha256
4350 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4351 (build-system python-build-system)
4352 (propagated-inputs
4353 `(("python-psutil" ,python-psutil)
4354 ("python-drmaa" ,python-drmaa)
4355 ("python-pyzmq" ,python-pyzmq)))
4356 (home-page "https://github.com/pygridtools/gridmap")
4357 (synopsis "Create jobs on a cluster directly from Python")
4358 (description
4359 "Gridmap is a Python package to allow you to easily create jobs on the
4360cluster directly from Python. You can directly map Python functions onto the
4361cluster without needing to write any wrapper code yourself.")
4362 (license license:gpl3+)))
4363
4364(define-public python2-gridmap
4365 (package-with-python2 python-gridmap))
4366
4367(define-public python-pexpect
4368 (package
4369 (name "python-pexpect")
4370 (version "3.3")
4371 (source
4372 (origin
4373 (method url-fetch)
4374 (uri (string-append "https://pypi.python.org/packages/source/p/"
4375 "pexpect/pexpect-" version ".tar.gz"))
4376 (sha256
4377 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4378 (build-system python-build-system)
4379 (arguments
4380 `(#:phases
4381 (modify-phases %standard-phases
4382 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4383 (native-inputs
4384 `(("python-nose" ,python-nose)))
4385 (home-page "http://pexpect.readthedocs.org/")
4386 (synopsis "Controlling interactive console applications")
4387 (description
4388 "Pexpect is a pure Python module for spawning child applications;
4389controlling them; and responding to expected patterns in their output.
4390Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4391child application and control it as if a human were typing commands.")
4392 (license license:isc)))
4393
4394(define-public python2-pexpect
4395 (package-with-python2 python-pexpect))
4396
4397(define-public python-setuptools-scm
4398 (package
4399 (name "python-setuptools-scm")
4400 (version "1.11.1")
4401 (source (origin
4402 (method url-fetch)
4403 (uri (pypi-uri "setuptools_scm" version))
4404 (sha256
4405 (base32
4406 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4407 (build-system python-build-system)
4408 (home-page "https://github.com/pypa/setuptools_scm/")
4409 (synopsis "Manage Python package versions in SCM metadata")
4410 (description
4411 "Setuptools_scm handles managing your Python package versions in
4412@dfn{software configuration management} (SCM) metadata instead of declaring
4413them as the version argument or in a SCM managed file.")
4414 (license license:expat)))
4415
4416(define-public python2-setuptools-scm
4417 (package-with-python2 python-setuptools-scm))
4418
4419(define-public python-pathpy
4420 (package
4421 (name "python-pathpy")
4422 (version "8.1.1")
4423 (source
4424 (origin
4425 (method url-fetch)
4426 (uri (string-append "https://pypi.python.org/packages/source/p/"
4427 "path.py/path.py-" version ".tar.gz"))
4428 (sha256
4429 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4430 (outputs '("out" "doc"))
4431 (build-system python-build-system)
4432 (propagated-inputs
4433 `(("python-appdirs" ,python-appdirs)))
4434 (native-inputs
4435 `(("python-setuptools-scm" ,python-setuptools-scm)
4436 ("python-sphinx" ,python-sphinx)
4437 ("python-rst.linker" ,python-rst.linker)
4438 ("python-pytest" ,python-pytest)
4439 ("python-pytest-runner" ,python-pytest-runner)))
4440 (arguments
4441 `(#:phases
4442 (modify-phases %standard-phases
4443 (add-after 'build 'build-doc
4444 (lambda _
4445 (setenv "LANG" "en_US.UTF-8")
4446 (zero? (system* "python" "setup.py" "build_sphinx"))))
4447 (add-after 'install 'install-doc
4448 (lambda* (#:key outputs #:allow-other-keys)
4449 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4450 (doc (string-append data "/doc/" ,name "-" ,version))
4451 (html (string-append doc "/html")))
4452 (mkdir-p html)
4453 (for-each (lambda (file)
4454 (copy-file file (string-append doc "/" file)))
4455 '("README.rst" "CHANGES.rst"))
4456 (copy-recursively "build/sphinx/html" html)))))))
4457 (home-page "http://github.com/jaraco/path.py")
4458 (synopsis "Python module wrapper for built-in os.path")
4459 (description
4460 "@code{path.py} implements path objects as first-class entities, allowing
4461common operations on files to be invoked on those path objects directly.")
4462 (license license:expat)))
4463
4464(define-public python2-pathpy
4465 (package-with-python2 python-pathpy))
4466
4467(define-public python-pickleshare
4468 (package
4469 (name "python-pickleshare")
4470 (version "0.5")
4471 (source
4472 (origin
4473 (method url-fetch)
4474 (uri (string-append "https://pypi.python.org/packages/source/p/"
4475 "pickleshare/pickleshare-" version ".tar.gz"))
4476 (sha256
4477 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4478 (build-system python-build-system)
4479 (propagated-inputs
4480 `(("python-pathpy" ,python-pathpy)))
4481 (home-page "https://github.com/vivainio/pickleshare")
4482 (synopsis "Tiny key value database with concurrency support")
4483 (description
4484 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4485Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4486shelve, many processes can access the database simultaneously. Changing a
4487value in database is immediately visible to other processes accessing the same
4488database. Concurrency is possible because the values are stored in separate
4489files. Hence the “database” is a directory where all files are governed by
4490PickleShare.")
4491 (license license:expat)))
4492
4493(define-public python2-pickleshare
4494 (package-with-python2 python-pickleshare))
4495
4496(define-public python-simplegeneric
4497 (package
4498 (name "python-simplegeneric")
4499 (version "0.8.1")
4500 (source
4501 (origin
4502 (method url-fetch)
4503 (uri (string-append "https://pypi.python.org/packages/source/s/"
4504 "simplegeneric/simplegeneric-" version ".zip"))
4505 (sha256
4506 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4507 (build-system python-build-system)
4508 (native-inputs
4509 `(("unzip" ,unzip)))
4510 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4511 (synopsis "Python module for simple generic functions")
4512 (description
4513 "The simplegeneric module lets you define simple single-dispatch generic
4514functions, akin to Python’s built-in generic functions like @code{len()},
4515@code{iter()} and so on. However, instead of using specially-named methods,
4516these generic functions use simple lookup tables, akin to those used by
4517e.g. @code{pickle.dump()} and other generic functions found in the Python
4518standard library.")
4519 (license license:zpl2.1)))
4520
4521(define-public python2-simplegeneric
4522 (package-with-python2 python-simplegeneric))
4523
4524(define-public python-ipython-genutils
4525 ;; TODO: This package is retired, check if can be removed, see description.
4526 (package
4527 (name "python-ipython-genutils")
4528 (version "0.1.0")
4529 (source
4530 (origin
4531 (method url-fetch)
4532 (uri (string-append "https://pypi.python.org/packages/source/i/"
4533 "ipython_genutils/ipython_genutils-"
4534 version ".tar.gz"))
4535 (sha256
4536 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4537 (build-system python-build-system)
4538 (arguments `(#:tests? #f)) ; no tests
4539 (home-page "http://ipython.org")
4540 (synopsis "Vestigial utilities from IPython")
4541 (description
4542 "This package provides retired utilities from IPython. No packages
4543outside IPython/Jupyter should depend on it.
4544
4545This package shouldn't exist. It contains some common utilities shared by
4546Jupyter and IPython projects during The Big Split. As soon as possible, those
4547packages will remove their dependency on this, and this package will go
4548away.")
4549 (license license:bsd-3)))
4550
4551(define-public python2-ipython-genutils
4552 (package-with-python2 python-ipython-genutils))
4553
4554(define-public python-traitlets
4555 (package
4556 (name "python-traitlets")
4557 (version "4.2.0")
4558 (source
4559 (origin
4560 (method url-fetch)
4561 (uri (pypi-uri "traitlets" version))
4562 (sha256
4563 (base32
4564 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4565 (build-system python-build-system)
4566 (arguments
4567 `(#:phases
4568 (modify-phases %standard-phases
4569 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4570 (propagated-inputs
4571 `(("python-ipython-genutils" ,python-ipython-genutils)
4572 ("python-decorator" ,python-decorator)))
4573 (native-inputs
4574 `(("python-mock" ,python-mock)
4575 ("python-nose" ,python-nose)))
4576 (home-page "http://ipython.org")
4577 (synopsis "Configuration system for Python applications")
4578 (description
4579 "Traitlets is a framework that lets Python classes have attributes with
4580type checking, dynamically calculated default values, and ‘on change’
4581callbacks. The package also includes a mechanism to use traitlets for
4582configuration, loading values from files or from command line arguments. This
4583is a distinct layer on top of traitlets, so you can use traitlets in your code
4584without using the configuration machinery.")
4585 (license license:bsd-3)))
4586
4587(define-public python2-traitlets
4588 (package-with-python2 python-traitlets))
4589
4590(define-public python-jupyter-core
4591 (package
4592 (name "python-jupyter-core")
4593 (version "4.2.0")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (string-append (pypi-uri "jupyter_core" version)))
4598 (sha256
4599 (base32
4600 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4601 (build-system python-build-system)
4602 ;; FIXME: not sure how to run the tests
4603 (arguments `(#:tests? #f))
4604 (propagated-inputs
4605 `(("python-traitlets" ,python-traitlets)))
4606 (home-page "http://jupyter.org/")
4607 (synopsis "Jupyter base package")
4608 (description
4609 "Jupyter core is the base package on which Jupyter projects rely.")
4610 (license license:bsd-3)))
4611
4612(define-public python2-jupyter-core
4613 (package-with-python2 python-jupyter-core))
4614
4615(define-public python-jupyter-client
4616 (package
4617 (name "python-jupyter-client")
4618 (version "4.4.0")
4619 (source
4620 (origin
4621 (method url-fetch)
4622 (uri (pypi-uri "jupyter_client" version))
4623 (sha256
4624 (base32
4625 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4626 (build-system python-build-system)
4627 ;; Tests fail because of missing native python kernel which I assume is
4628 ;; provided by the ipython package, which we cannot use because it would
4629 ;; cause a dependency cycle.
4630 (arguments `(#:tests? #f))
4631 (propagated-inputs
4632 `(("python-pyzmq" ,python-pyzmq)
4633 ("python-traitlets" ,python-traitlets)
4634 ("python-jupyter-core" ,python-jupyter-core)))
4635 (home-page "http://jupyter.org/")
4636 (synopsis "Jupyter protocol implementation and client libraries")
4637 (description
4638 "The @code{jupyter_client} package contains the reference implementation
4639of the Jupyter protocol. It also provides client and kernel management APIs
4640for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4641installing @code{kernelspec}s for use with Jupyter frontends.")
4642 (license license:bsd-3)))
4643
4644(define-public python2-jupyter-client
4645 (package-with-python2 python-jupyter-client))
4646
4647(define-public python-ipykernel
4648 (package
4649 (name "python-ipykernel")
4650 (version "4.5.0")
4651 (source
4652 (origin
4653 (method url-fetch)
4654 (uri (pypi-uri "ipykernel" version))
4655 (sha256
4656 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4657 (build-system python-build-system)
4658 ;; The tests load a submodule of IPython. However, IPython itself depends
4659 ;; on ipykernel.
4660 (arguments `(#:tests? #f))
4661 (propagated-inputs
4662 ;; imported at runtime during connect
4663 `(("python-jupyter-client" ,python-jupyter-client)))
4664 (home-page "http://ipython.org")
4665 (synopsis "IPython Kernel for Jupyter")
4666 (description
4667 "This package provides the IPython kernel for Jupyter.")
4668 (license license:bsd-3)))
4669
4670(define-public python2-ipykernel
4671 (package-with-python2 python-ipykernel))
4672
4673(define-public python-testpath
4674 (package
4675 (name "python-testpath")
4676 (version "0.2")
4677 (source
4678 (origin
4679 (method url-fetch)
4680 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4681 version ".tar.gz"))
4682 (file-name (string-append name "-" version ".tar.gz"))
4683 (sha256
4684 (base32
4685 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4686 (build-system python-build-system)
4687 (arguments
4688 `(#:tests? #f ; this package does not even have a setup.py
4689 #:phases
4690 (modify-phases %standard-phases
4691 (delete 'install)
4692 (replace 'build
4693 (lambda* (#:key inputs outputs #:allow-other-keys)
4694 (let ((dir (string-append
4695 (assoc-ref outputs "out")
4696 "/lib/python"
4697 (string-take (string-take-right
4698 (assoc-ref inputs "python") 5) 3)
4699 "/site-packages/testpath")))
4700 (mkdir-p dir)
4701 (copy-recursively "testpath" dir))
4702 #t)))))
4703 (home-page "https://github.com/takluyver/testpath")
4704 (synopsis "Test utilities for code working with files and commands")
4705 (description
4706 "Testpath is a collection of utilities for Python code working with files
4707and commands. It contains functions to check things on the filesystem, and
4708tools for mocking system commands and recording calls to those.")
4709 (license license:expat)))
4710
4711(define-public python2-testpath
4712 (package-with-python2 python-testpath))
4713
4714(define-public python-ipython
4715 (package
4716 (name "python-ipython")
4717 (version "4.0.3")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "ipython" version ".tar.gz"))
4722 (sha256
4723 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
4724 (build-system python-build-system)
4725 (outputs '("out" "doc"))
4726 (propagated-inputs
4727 `(("python-pyzmq" ,python-pyzmq)
4728 ("python-terminado" ,python-terminado)
4729 ("python-matplotlib" ,python-matplotlib)
4730 ("python-numpy" ,python-numpy)
4731 ("python-numpydoc" ,python-numpydoc)
4732 ("python-jinja2" ,python-jinja2)
4733 ("python-mistune" ,python-mistune)
4734 ("python-pexpect" ,python-pexpect)
4735 ("python-pickleshare" ,python-pickleshare)
4736 ("python-simplegeneric" ,python-simplegeneric)
4737 ("python-jsonschema" ,python-jsonschema)
4738 ("python-traitlets" ,python-traitlets)
4739 ("python-ipykernel" ,python-ipykernel)
4740 ("python-pygments" ,python-pygments)))
4741 (inputs
4742 `(("readline" ,readline)
4743 ("which" ,which)))
4744 (native-inputs
4745 `(("pkg-config" ,pkg-config)
4746 ("python-requests" ,python-requests) ;; for tests
4747 ("python-testpath" ,python-testpath)
4748 ("python-nose" ,python-nose)
4749 ("python-sphinx" ,python-sphinx)
4750 ("texlive" ,texlive)
4751 ("texinfo" ,texinfo)))
4752 (arguments
4753 `(#:phases
4754 (modify-phases %standard-phases
4755 (add-after
4756 'install 'install-doc
4757 (lambda* (#:key inputs outputs #:allow-other-keys)
4758 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4759 (doc (string-append data "/doc/" ,name "-" ,version))
4760 (html (string-append doc "/html"))
4761 (man1 (string-append data "/man/man1"))
4762 (info (string-append data "/info"))
4763 (examples (string-append doc "/examples")))
4764 (setenv "LANG" "en_US.utf8")
4765 ;; Make installed package available for running the tests
4766 (add-installed-pythonpath inputs outputs)
4767 (with-directory-excursion "docs"
4768 ;; FIXME: pdf fails to build
4769 ;;(system* "make" "pdf" "PAPER=a4")
4770 (system* "make" "html")
4771 (system* "make" "info"))
4772 (copy-recursively "docs/man" man1)
4773 (copy-recursively "examples" examples)
4774 (copy-recursively "docs/build/html" html)
4775 ;; (copy-file "docs/build/latex/ipython.pdf"
4776 ;; (string-append doc "/ipython.pdf"))
4777 (mkdir-p info)
4778 (copy-file "docs/build/texinfo/ipython.info"
4779 (string-append info "/ipython.info"))
4780 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4781 ;; Tests can only be run after the library has been installed and not
4782 ;; within the source directory.
4783 (delete 'check)
4784 (add-after
4785 'install 'check
4786 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4787 (if tests?
4788 (with-directory-excursion "/tmp"
4789 ;; Make installed package available for running the tests
4790 (add-installed-pythonpath inputs outputs)
4791 (setenv "HOME" "/tmp/") ;; required by a test
4792 (zero? (system* (string-append (assoc-ref outputs "out")
4793 "/bin/iptest"))))
4794 #t)))
4795 (add-before
4796 'install 'fix-tests
4797 (lambda* (#:key inputs #:allow-other-keys)
4798 (substitute* "./IPython/utils/_process_posix.py"
4799 (("/usr/bin/env', 'which") (which "which")))
4800 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4801 (("#!/usr/bin/env python")
4802 (string-append "#!" (which "python"))))
4803 ;; Disable 1 failing test
4804 (substitute* "./IPython/core/tests/test_magic.py"
4805 (("def test_dirops\\(\\):" all)
4806 (string-append "@dec.skipif(True)\n" all))))))))
4807 (home-page "http://ipython.org")
4808 (synopsis "IPython is a tool for interactive computing in Python")
4809 (description
4810 "IPython provides a rich architecture for interactive computing with:
4811Powerful interactive shells, a browser-based notebook, support for interactive
4812data visualization, embeddable interpreters and tools for parallel
4813computing.")
4814 (license license:bsd-3)
4815 (properties `((python2-variant . ,(delay python2-ipython))))))
4816
4817(define-public python2-ipython
4818 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4819 (package
4820 (inherit ipython)
4821 ;; FIXME: some tests are failing
4822 (arguments
4823 `(#:tests? #f ,@(package-arguments ipython)))
4824 ;; FIXME: add pyreadline once available.
4825 (native-inputs
4826 `(("python2-mock" ,python2-mock)
4827 ,@(package-native-inputs ipython))))))
4828
4829(define-public python-isodate
4830 (package
4831 (name "python-isodate")
4832 (version "0.5.4")
4833 (source
4834 (origin
4835 (method url-fetch)
4836 (uri (pypi-uri "isodate" version))
4837 (sha256
4838 (base32
4839 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4840 (build-system python-build-system)
4841 (home-page
4842 "http://cheeseshop.python.org/pypi/isodate")
4843 (synopsis
4844 "Python date parser and formatter")
4845 (description
4846 "Python-isodate is a python module for parsing and formatting
4847ISO 8601 dates, time and duration.")
4848 (license license:bsd-3)))
4849
4850(define-public python2-isodate
4851 (package-with-python2 python-isodate))
4852
4853(define-public python-html5lib
4854 (package
4855 (name "python-html5lib")
4856 (version "1.0b10")
4857 (source
4858 (origin
4859 (method url-fetch)
4860 (uri (pypi-uri "html5lib" version))
4861 (sha256
4862 (base32
4863 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
4864 (build-system python-build-system)
4865 (propagated-inputs
4866 `(("python-six" ,python-six)
4867 ("python-webencodings" ,python-webencodings)))
4868 (arguments
4869 `(#:test-target "check"))
4870 (home-page
4871 "https://github.com/html5lib/html5lib-python")
4872 (synopsis
4873 "Python HTML parser based on the WHATWG HTML specifcation")
4874 (description
4875 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4876and written in Python.")
4877 (license license:expat)))
4878
4879(define-public python2-html5lib
4880 (package-with-python2 python-html5lib))
4881
4882;; Needed for python-bleach, a dependency of python-notebook
4883(define-public python-html5lib-0.9
4884 (package
4885 (inherit python-html5lib)
4886 (version "0.999")
4887 (source
4888 (origin
4889 (method url-fetch)
4890 (uri (pypi-uri "html5lib" version))
4891 (sha256
4892 (base32
4893 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4894
4895(define-public python2-html5lib-0.9
4896 (package-with-python2 python-html5lib-0.9))
4897
4898(define-public python-webencodings
4899 (package
4900 (name "python-webencodings")
4901 (version "0.5")
4902 (source (origin
4903 (method url-fetch)
4904 (uri (pypi-uri "webencodings" version))
4905 (sha256
4906 (base32
4907 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
4908 (build-system python-build-system)
4909 (arguments
4910 '(#:phases
4911 (modify-phases %standard-phases
4912 (replace 'check
4913 (lambda _
4914 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
4915 (native-inputs
4916 `(("python-pytest" ,python-pytest)))
4917 (home-page "https://github.com/SimonSapin/python-webencodings")
4918 (synopsis "Character encoding aliases for legacy web content")
4919 (description
4920 "In order to be compatible with legacy web content when interpreting
4921something like @code{Content-Type: text/html; charset=latin1}, tools need
4922to use a particular set of aliases for encoding labels as well as some
4923overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
4924the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
4925or @code{UTF-16} BOM takes precedence over any other encoding declaration.
4926The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
4927defines all such details so that implementations do not have to
4928reverse-engineer each other.
4929
4930This module implements the Encoding standard and has encoding labels and
4931BOM detection, but the actual implementation for encoders and decoders
4932is Python’s.")
4933 (license license:bsd-3)))
4934
4935(define-public python2-webencodings
4936 (package-with-python2 python-webencodings))
4937
4938(define-public python-urwid
4939 (package
4940 (name "python-urwid")
4941 (version "1.3.1")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (pypi-uri "urwid" version))
4946 (sha256
4947 (base32
4948 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4949 (build-system python-build-system)
4950 (arguments
4951 `(#:phases
4952 (modify-phases %standard-phases
4953 ;; Disable failing test. Bug filed upstream:
4954 ;; https://github.com/wardi/urwid/issues/164
4955 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4956 (add-after 'unpack 'disable-failing-test
4957 (lambda _
4958 (substitute* "urwid/tests/test_event_loops.py"
4959 (("test_remove_watch_file")
4960 "disable_remove_watch_file")))))))
4961 (home-page "http://urwid.org")
4962 (synopsis "Console user interface library for Python")
4963 (description
4964 "Urwid is a curses-based UI/widget library for Python. It includes many
4965features useful for text console applications.")
4966 (license license:lgpl2.1+)))
4967
4968(define-public python2-urwid
4969 (package-with-python2 python-urwid))
4970
4971(define-public python-urwidtrees
4972 (package
4973 (name "python-urwidtrees")
4974 (version "1.0.2")
4975 (source
4976 (origin
4977 (method url-fetch)
4978 ;; package author intends on distributing via github rather than pypi:
4979 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4980 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4981 version ".tar.gz"))
4982 (file-name (string-append name "-" version ".tar.gz"))
4983 (sha256
4984 (base32
4985 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4986 (build-system python-build-system)
4987 (arguments
4988 '(#:tests? #f)) ; no tests
4989 (propagated-inputs `(("python-urwid" ,python-urwid)))
4990 (home-page "https://github.com/pazz/urwidtrees")
4991 (synopsis "Tree widgets for urwid")
4992 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4993toolkit. Use it to build trees of widgets.")
4994 (license license:gpl3+)))
4995
4996(define-public python2-urwidtrees
4997 (package-with-python2 python-urwidtrees))
4998
4999(define-public python-dbus
5000 (package
5001 (name "python-dbus")
5002 (version "1.2.0")
5003 (source
5004 (origin
5005 (method url-fetch)
5006 (uri (string-append
5007 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5008 version ".tar.gz"))
5009 (sha256
5010 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5011 (build-system gnu-build-system)
5012 (arguments
5013 '(#:phases
5014 (modify-phases %standard-phases
5015 (add-before
5016 'check 'pre-check
5017 (lambda _
5018 ;; XXX: For the missing '/etc/machine-id'.
5019 (substitute* "test/run-test.sh"
5020 (("DBUS_FATAL_WARNINGS=1")
5021 "DBUS_FATAL_WARNINGS=0"))
5022 #t)))))
5023 (native-inputs
5024 `(("pkg-config" ,pkg-config)))
5025 (inputs
5026 `(("python" ,python)
5027 ("dbus-glib" ,dbus-glib)))
5028 (synopsis "Python bindings for D-bus")
5029 (description "python-dbus provides bindings for libdbus, the reference
5030implementation of D-Bus.")
5031 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5032 (license license:expat)))
5033
5034(define-public python2-dbus
5035 (package (inherit python-dbus)
5036 (name "python2-dbus")
5037 (inputs `(("python" ,python-2)
5038 ,@(alist-delete "python"
5039 (package-inputs python-dbus)
5040 equal?)))
5041 ;; FIXME: on Python 2, the test_utf8 fails with:
5042 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5043 (arguments `(#:tests? #f))))
5044
5045(define-public python-apsw
5046 (package
5047 (name "python-apsw")
5048 (version "3.9.2-r1")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (pypi-uri "apsw" version))
5053 (sha256
5054 (base32
5055 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5056 (build-system python-build-system)
5057 (inputs
5058 `(("sqlite" ,sqlite)))
5059 (arguments
5060 `(#:phases
5061 ;; swap check and install phases
5062 (alist-cons-after
5063 'install 'check
5064 (assoc-ref %standard-phases 'check)
5065 (alist-delete
5066 'check
5067 %standard-phases))))
5068 (home-page "https://github.com/rogerbinns/apsw/")
5069 (synopsis "Another Python SQLite Wrapper")
5070 (description "APSW is a Python wrapper for the SQLite
5071embedded relational database engine. In contrast to other wrappers such as
5072pysqlite it focuses on being a minimal layer over SQLite attempting just to
5073translate the complete SQLite API into Python.")
5074 (license license:zlib)))
5075
5076(define-public python2-apsw
5077 (package-with-python2 python-apsw))
5078
5079(define-public python-lxml
5080 (package
5081 (name "python-lxml")
5082 (version "3.6.0")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (pypi-uri "lxml" version))
5087 (sha256
5088 (base32
5089 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5090 (build-system python-build-system)
5091 (inputs
5092 `(("libxml2" ,libxml2)
5093 ("libxslt" ,libxslt)))
5094 (home-page "http://lxml.de/")
5095 (synopsis
5096 "Python XML processing library")
5097 (description
5098 "The lxml XML toolkit is a Pythonic binding for the C libraries
5099libxml2 and libxslt.")
5100 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5101
5102(define-public python2-lxml
5103 (package-with-python2 python-lxml))
5104
5105;; beautifulsoup4 has a totally different namespace than 3.x,
5106;; and pypi seems to put it under its own name, so I guess we should too
5107(define-public python-beautifulsoup4
5108 (package
5109 (name "python-beautifulsoup4")
5110 (version "4.5.1")
5111 (source
5112 (origin
5113 (method url-fetch)
5114 (uri (pypi-uri "beautifulsoup4" version))
5115 (sha256
5116 (base32
5117 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5118 (build-system python-build-system)
5119 (arguments
5120 `(#:phases
5121 (modify-phases %standard-phases
5122 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5123 ;; must use this conversion script when building with Python 3. The
5124 ;; conversion script also runs the tests.
5125 ;; For more information, see the file 'convert-py3k' in the source
5126 ;; distribution.
5127 (replace 'check
5128 (lambda _ (zero? (system* "./convert-py3k")))))))
5129 (home-page
5130 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5131 (synopsis
5132 "Python screen-scraping library")
5133 (description
5134 "Beautiful Soup is a Python library designed for rapidly setting up
5135screen-scraping projects. It offers Pythonic idioms for navigating,
5136searching, and modifying a parse tree, providing a toolkit for
5137dissecting a document and extracting what you need. It automatically
5138converts incoming documents to Unicode and outgoing documents to UTF-8.")
5139 (license license:expat)))
5140
5141(define-public python2-beautifulsoup4
5142 (package
5143 (inherit (package-with-python2
5144 (strip-python2-variant python-beautifulsoup4)))
5145 (arguments `(#:python ,python-2))))
5146
5147(define-public python2-cssutils
5148 (package
5149 (name "python2-cssutils")
5150 (version "1.0.1")
5151 (source
5152 (origin
5153 (method url-fetch)
5154 (uri (pypi-uri "cssutils" version))
5155 (sha256
5156 (base32
5157 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5158 (build-system python-build-system)
5159 (native-inputs
5160 `(("python2-mock" ,python2-mock) ; for the tests
5161 ("unzip" ,unzip))) ; for unpacking the source
5162 (arguments
5163 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5164 #:tests? #f ; The tests apparently download an external URL.
5165 ))
5166 (home-page "http://cthedot.de/cssutils/")
5167 (synopsis
5168 "CSS Cascading Style Sheets library for Python")
5169 (description
5170 "Cssutils is a Python package for parsing and building CSS
5171Cascading Style Sheets. Currently it provides a DOM only and no rendering
5172options.")
5173 (license license:lgpl3+)))
5174
5175(define-public python-cssselect
5176 (package
5177 (name "python-cssselect")
5178 (version "0.9.2")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (pypi-uri "cssselect" version))
5183 (sha256
5184 (base32
5185 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5186 (build-system python-build-system)
5187 (arguments
5188 ;; tests fail with message
5189 ;; AttributeError: 'module' object has no attribute 'tests'
5190 `(#:tests? #f))
5191 (home-page
5192 "https://pythonhosted.org/cssselect/")
5193 (synopsis
5194 "CSS3 selector parser and translator to XPath 1.0")
5195 (description
5196 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5197them to XPath 1.0 expressions. Such expressions can be used in lxml or
5198another XPath engine to find the matching elements in an XML or HTML document.")
5199 (license license:bsd-3)))
5200
5201(define-public python2-cssselect
5202 (package-with-python2 python-cssselect))
5203
5204(define-public python-netifaces
5205 (package
5206 (name "python-netifaces")
5207 (version "0.10.4")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (string-append
5212 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5213 version
5214 ".tar.gz"))
5215 (sha256
5216 (base32
5217 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5218 (build-system python-build-system)
5219 (home-page
5220 "https://bitbucket.org/al45tair/netifaces")
5221 (synopsis
5222 "Python module for portable network interface information")
5223 (description
5224 "Netifaces is a Python module providing information on network
5225interfaces in an easy and portable manner.")
5226 (license license:expat)))
5227
5228(define-public python2-netifaces
5229 (package-with-python2 python-netifaces))
5230
5231(define-public python-networkx
5232 (package
5233 (name "python-networkx")
5234 (version "1.11")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (pypi-uri "networkx" version))
5239 (sha256
5240 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5241 (build-system python-build-system)
5242 ;; python-decorator is needed at runtime
5243 (propagated-inputs
5244 `(("python-decorator" ,python-decorator)))
5245 (native-inputs
5246 `(("python-nose" ,python-nose)))
5247 (home-page "http://networkx.github.io/")
5248 (synopsis "Python module for creating and manipulating graphs and networks")
5249 (description
5250 "NetworkX is a Python package for the creation, manipulation, and study
5251of the structure, dynamics, and functions of complex networks.")
5252 (license license:bsd-3)))
5253
5254(define-public python2-networkx
5255 (package-with-python2 python-networkx))
5256
5257(define-public snakemake
5258 (package
5259 (name "snakemake")
5260 (version "3.2.1")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (string-append
5265 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5266 version ".tar.gz"))
5267 (sha256
5268 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5269 (build-system python-build-system)
5270 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5271 (synopsis "Python-based execution environment for make-like workflows")
5272 (description
5273 "Snakemake aims to reduce the complexity of creating workflows by
5274providing a clean and modern domain specific specification language (DSL) in
5275Python style, together with a fast and comfortable execution environment.")
5276 (license license:expat)))
5277
5278(define-public python-seaborn
5279 (package
5280 (name "python-seaborn")
5281 (version "0.7.0")
5282 (source
5283 (origin
5284 (method url-fetch)
5285 (uri (pypi-uri "seaborn" version))
5286 (sha256
5287 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5288 (build-system python-build-system)
5289 (propagated-inputs
5290 `(("python-pandas" ,python-pandas)
5291 ("python-matplotlib" ,python-matplotlib)
5292 ("python-scipy" ,python-scipy)))
5293 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5294 (synopsis "Statistical data visualization")
5295 (description
5296 "Seaborn is a library for making attractive and informative statistical
5297graphics in Python. It is built on top of matplotlib and tightly integrated
5298with the PyData stack, including support for numpy and pandas data structures
5299and statistical routines from scipy and statsmodels.")
5300 (license license:bsd-3)
5301 (properties `((python2-variant . ,(delay python2-seaborn))))))
5302
5303(define-public python2-seaborn
5304 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5305 (package
5306 (inherit base)
5307 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5308 ,@(package-propagated-inputs base))))))
5309
5310(define-public python-sympy
5311 (package
5312 (name "python-sympy")
5313 (version "0.7.6")
5314 (source
5315 (origin
5316 (method url-fetch)
5317 (uri (string-append
5318 "https://github.com/sympy/sympy/releases/download/sympy-"
5319 version "/sympy-" version ".tar.gz"))
5320 (sha256
5321 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5322 (build-system python-build-system)
5323 (home-page "http://www.sympy.org/")
5324 (synopsis "Python library for symbolic mathematics")
5325 (description
5326 "SymPy is a Python library for symbolic mathematics. It aims to become a
5327full-featured computer algebra system (CAS) while keeping the code as simple
5328as possible in order to be comprehensible and easily extensible.")
5329 (license license:bsd-3)))
5330
5331(define-public python2-sympy
5332 (package-with-python2 python-sympy))
5333
5334(define-public python-q
5335 (package
5336 (name "python-q")
5337 (version "2.6")
5338 (source
5339 (origin
5340 (method url-fetch)
5341 (uri (pypi-uri "q" version))
5342 (sha256
5343 (base32
5344 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5345 (build-system python-build-system)
5346 (home-page "https://github.com/zestyping/q")
5347 (synopsis "Quick-and-dirty debugging output for tired programmers")
5348 (description
5349 "q is a Python module for \"print\" style of debugging Python code. It
5350provides convenient short API for print out of values, tracebacks, and
5351falling into the Python interpreter.")
5352 (license license:asl2.0)))
5353
5354(define-public python2-q
5355 (package-with-python2 python-q))
5356
5357(define-public python-testlib
5358 (package
5359 (name "python-testlib")
5360 (version "0.6.5")
5361 (source
5362 (origin
5363 (method url-fetch)
5364 (uri (string-append
5365 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5366 version ".zip"))
5367 (sha256
5368 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5369 (build-system python-build-system)
5370 (native-inputs
5371 `(("unzip" ,unzip))) ; for unpacking the source
5372 (synopsis "Python micro test suite harness")
5373 (description "A micro unittest suite harness for Python.")
5374 (home-page "https://github.com/trentm/testlib")
5375 (license license:expat)))
5376
5377(define-public python2-testlib
5378 (package-with-python2 python-testlib))
5379
5380(define-public python2-xlib
5381 (package
5382 (name "python2-xlib")
5383 (version "0.14")
5384 (source (origin
5385 (method url-fetch)
5386 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5387 "/" version "/"
5388 "python-xlib-" version ".tar.gz"))
5389 (sha256
5390 (base32
5391 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5392 (build-system python-build-system)
5393 (arguments
5394 `(#:python ,python-2 ;Python 2 only
5395 #:tests? #f)) ;no tests
5396 (home-page "http://python-xlib.sourceforge.net/")
5397 (synopsis "Python X11 client library")
5398 (description
5399 "The Python X Library is intended to be a fully functional X client
5400library for Python programs. It is useful to implement low-level X clients.
5401It is written entirely in Python.")
5402 (license license:gpl2+)))
5403
5404(define-public python-singledispatch
5405 (package
5406 (name "python-singledispatch")
5407 (version "3.4.0.3")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "singledispatch" version))
5412 (sha256
5413 (base32
5414 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5415 (build-system python-build-system)
5416 (native-inputs
5417 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5418 (home-page
5419 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5420 (synopsis "Backport of singledispatch feature from Python 3.4")
5421 (description
5422 "This library brings functools.singledispatch from Python 3.4 to Python
54232.6-3.3.")
5424 (license license:expat)))
5425
5426(define-public python2-singledispatch
5427 (package-with-python2 python-singledispatch))
5428
5429(define-public python-tornado
5430 (package
5431 (name "python-tornado")
5432 (version "4.3")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "tornado" version))
5437 (sha256
5438 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5439 (build-system python-build-system)
5440 (native-inputs
5441 `(("python-certifi" ,python-certifi)))
5442 (propagated-inputs
5443 `(("python-backports-abc" ,python-backports-abc)))
5444 (home-page "http://www.tornadoweb.org/")
5445 (synopsis "Python web framework and asynchronous networking library")
5446 (description
5447 "Tornado is a Python web framework and asynchronous networking library,
5448originally developed at FriendFeed. By using non-blocking network I/O,
5449Tornado can scale to tens of thousands of open connections, making it ideal
5450for long polling, WebSockets, and other applications that require a long-lived
5451connection to each user.")
5452 (license license:asl2.0)
5453 (properties `((python2-variant . ,(delay python2-tornado))))))
5454
5455(define-public python2-tornado
5456 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5457 (package (inherit tornado)
5458 (propagated-inputs
5459 `(("python2-backport-ssl-match-hostname"
5460 ,python2-backport-ssl-match-hostname)
5461 ("python2-singledispatch" ,python2-singledispatch)
5462 ,@(package-propagated-inputs tornado))))))
5463
5464;; the python- version can be removed with python-3.5
5465(define-public python-backports-abc
5466 (package
5467 (name "python-backports-abc")
5468 (version "0.4")
5469 (source
5470 (origin
5471 (method url-fetch)
5472 (uri (pypi-uri "backports_abc" version))
5473 (sha256
5474 (base32
5475 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5476 (build-system python-build-system)
5477 (home-page "https://github.com/cython/backports_abc")
5478 (synopsis "Backport of additions to the 'collections.abc' module")
5479 (description
5480 "Python-backports-abc provides a backport of additions to the
5481'collections.abc' module in Python-3.5.")
5482 (license license:psfl)))
5483
5484(define-public python2-backports-abc
5485 (package-with-python2 python-backports-abc))
5486
5487(define-public python-waf
5488 (package
5489 (name "python-waf")
5490 (version "1.9.5")
5491 (source (origin
5492 (method url-fetch)
5493 (uri (string-append "https://waf.io/"
5494 "waf-" version ".tar.bz2"))
5495 (sha256
5496 (base32
5497 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5498 (build-system python-build-system)
5499 (arguments
5500 '(#:phases
5501 (modify-phases %standard-phases
5502 (replace 'build
5503 (lambda _
5504 (zero? (system* "python" "waf-light" "configure" "build"))))
5505 (replace 'check
5506 (lambda _
5507 (zero? (system* "python" "waf" "--version"))))
5508 (replace 'install
5509 (lambda _
5510 (copy-file "waf" %output))))))
5511 (home-page "http://waf.io/")
5512 (synopsis "Python-based build system")
5513 (description
5514 "Waf is a Python-based framework for configuring, compiling and installing
5515applications.")
5516 (license license:bsd-3)))
5517
5518(define-public python2-waf
5519 (package-with-python2 python-waf))
5520
5521(define-public python-pyzmq
5522 (package
5523 (name "python-pyzmq")
5524 (version "15.1.0")
5525 (source
5526 (origin
5527 (method url-fetch)
5528 (uri (pypi-uri "pyzmq" version))
5529 (sha256
5530 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5531 (build-system python-build-system)
5532 (arguments
5533 `(#:configure-flags
5534 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5535 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5536 ;; --inplace' for 'python setup.py test' to work.
5537 #:tests? #f))
5538 (inputs
5539 `(("zeromq" ,zeromq)))
5540 (native-inputs
5541 `(("pkg-config" ,pkg-config)
5542 ("python-nose" ,python-nose)))
5543 (home-page "http://github.com/zeromq/pyzmq")
5544 (synopsis "Python bindings for 0MQ")
5545 (description
5546 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5547 (license license:bsd-4)))
5548
5549(define-public python2-pyzmq
5550 (package-with-python2 python-pyzmq))
5551
5552(define-public python-pep8
5553 (package
5554 (name "python-pep8")
5555 (version "1.7.0")
5556 (source
5557 (origin
5558 (method url-fetch)
5559 (uri (pypi-uri "pep8" version))
5560 (sha256
5561 (base32
5562 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5563 (build-system python-build-system)
5564 (home-page "http://pep8.readthedocs.org/")
5565 (synopsis "Python style guide checker")
5566 (description
5567 "This tools checks Python code against some of the style conventions in
5568PEP 8.")
5569 (license license:expat)))
5570
5571(define-public python2-pep8
5572 (package-with-python2 python-pep8))
5573
5574(define-public python-pyflakes
5575 (package
5576 (name "python-pyflakes")
5577 (version "1.0.0")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (pypi-uri "pyflakes" version))
5582 (sha256
5583 (base32
5584 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5585 (build-system python-build-system)
5586 (home-page
5587 "https://github.com/pyflakes/pyflakes")
5588 (synopsis "Passive checker of Python programs")
5589 (description
5590 "Pyflakes statically checks Python source code for common errors.")
5591 (license license:expat)))
5592
5593(define-public python2-pyflakes
5594 (package-with-python2 python-pyflakes))
5595
5596(define-public python-mccabe
5597 (package
5598 (name "python-mccabe")
5599 (version "0.4.0")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "mccabe" version))
5604 (sha256
5605 (base32
5606 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5607 (build-system python-build-system)
5608 (native-inputs
5609 `(("python-pytest" ,python-pytest)
5610 ("python-pytest-runner" ,python-pytest-runner)))
5611 (home-page "https://github.com/flintwork/mccabe")
5612 (synopsis "McCabe checker, plugin for flake8")
5613 (description
5614 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5615complexity of Python source code.")
5616 (license license:expat)))
5617
5618(define-public python2-mccabe
5619 (package-with-python2 python-mccabe))
5620
5621(define-public python-mccabe-0.2.1
5622 (package (inherit python-mccabe)
5623 (version "0.2.1")
5624 (source
5625 (origin
5626 (method url-fetch)
5627 (uri (pypi-uri "mccabe" version))
5628 (sha256
5629 (base32
5630 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5631
5632(define-public python2-mccabe-0.2.1
5633 (package-with-python2 python-mccabe-0.2.1))
5634
5635;; Flake8 2.4.1 requires an older version of pep8.
5636;; This should be removed ASAP.
5637(define-public python-pep8-1.5.7
5638 (package (inherit python-pep8)
5639 (version "1.5.7")
5640 (source
5641 (origin
5642 (method url-fetch)
5643 (uri (string-append
5644 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5645 version
5646 ".tar.gz"))
5647 (sha256
5648 (base32
5649 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5650
5651(define-public python2-pep8-1.5.7
5652 (package-with-python2 python-pep8-1.5.7))
5653
5654;; Flake8 2.4.1 requires an older version of pyflakes.
5655;; This should be removed ASAP.
5656(define-public python-pyflakes-0.8.1
5657 (package (inherit python-pyflakes)
5658 (version "0.8.1")
5659 (source
5660 (origin
5661 (method url-fetch)
5662 (uri (string-append
5663 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5664 version
5665 ".tar.gz"))
5666 (sha256
5667 (base32
5668 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5669
5670(define-public python2-pyflakes-0.8.1
5671 (package-with-python2 python-pyflakes-0.8.1))
5672
5673(define-public python-flake8
5674 (package
5675 (name "python-flake8")
5676 (version "2.5.4")
5677 (source
5678 (origin
5679 (method url-fetch)
5680 (uri (pypi-uri "flake8" version))
5681 (sha256
5682 (base32
5683 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5684 (modules '((guix build utils)))
5685 (snippet
5686 '(begin
5687 ;; Remove pre-compiled .pyc files from source.
5688 (for-each delete-file-recursively
5689 (find-files "." "__pycache__" #:directories? #t))
5690 (for-each delete-file (find-files "." "\\.pyc$"))
5691 #t))))
5692 (build-system python-build-system)
5693 (propagated-inputs
5694 `(("python-pep8" ,python-pep8)
5695 ("python-pyflakes" ,python-pyflakes)
5696 ("python-mccabe" ,python-mccabe)))
5697 (native-inputs
5698 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5699 ("python-nose" ,python-nose)))
5700 (home-page "https://gitlab.com/pycqa/flake8")
5701 (synopsis
5702 "The modular source code checker: pep8, pyflakes and co")
5703 (description
5704 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5705 (license license:expat)))
5706
5707(define-public python2-flake8
5708 (package-with-python2 python-flake8))
5709
5710;; This will only be needed by the python-hacking package and will not be
5711;; necessary once python-hacking > 0.10.2 is released.
5712(define-public python-flake8-2.2.4
5713 (package (inherit python-flake8)
5714 (propagated-inputs
5715 `(("python-pep8" ,python-pep8-1.5.7)
5716 ("python-pyflakes" ,python-pyflakes-0.8.1)
5717 ("python-mccabe" ,python-mccabe-0.2.1)))
5718 (native-inputs
5719 `(("python-mock" ,python-mock)
5720 ("python-nose" ,python-nose)))
5721 (version "2.2.4")
5722 (source
5723 (origin
5724 (method url-fetch)
5725 (uri (pypi-uri "flake8" version))
5726 (sha256
5727 (base32
5728 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5729 (modules '((guix build utils)))
5730 (snippet
5731 '(begin
5732 ;; Remove pre-compiled .pyc files from source.
5733 (for-each delete-file-recursively
5734 (find-files "." "__pycache__" #:directories? #t))
5735 (for-each delete-file (find-files "." "\\.pyc$"))
5736 #t))))))
5737
5738(define-public python2-flake8-2.2.4
5739 (package-with-python2 python-flake8-2.2.4))
5740
5741(define-public python-mistune
5742 (package
5743 (name "python-mistune")
5744 (version "0.7")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (string-append
5749 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5750 version
5751 ".tar.gz"))
5752 (sha256
5753 (base32
5754 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5755 (build-system python-build-system)
5756 (native-inputs
5757 `(("python-nose" ,python-nose)
5758 ("python-cython" ,python-cython)))
5759 (home-page "https://github.com/lepture/mistune")
5760 (synopsis "Markdown parser in pure Python")
5761 (description "This package provides a fast markdown parser in pure
5762Python.")
5763 (license license:bsd-3)))
5764
5765(define-public python2-mistune
5766 (package-with-python2 python-mistune))
5767
5768(define-public python-markdown
5769 (package
5770 (name "python-markdown")
5771 (version "2.6.5")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (pypi-uri "Markdown" version))
5776 (sha256
5777 (base32
5778 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5779 (build-system python-build-system)
5780 (arguments
5781 `(#:phases
5782 (modify-phases %standard-phases
5783 (replace 'check
5784 (lambda _
5785 (zero? (system* "python" "run-tests.py")))))))
5786 (native-inputs
5787 `(("python-nose" ,python-nose)
5788 ("python-pyyaml" ,python-pyyaml)))
5789 (home-page "https://pythonhosted.org/Markdown/")
5790 (synopsis "Python implementation of Markdown")
5791 (description
5792 "This package provides a Python implementation of John Gruber's
5793Markdown. The library features international input, various Markdown
5794extensions, and several HTML output formats. A command line wrapper
5795markdown_py is also provided to convert Markdown files to HTML.")
5796 (license license:bsd-3)))
5797
5798(define-public python2-markdown
5799 (package-with-python2 python-markdown))
5800
5801(define-public python-ptyprocess
5802 (package
5803 (name "python-ptyprocess")
5804 (version "0.5")
5805 (source
5806 (origin
5807 (method url-fetch)
5808 (uri (string-append
5809 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5810 version ".tar.gz"))
5811 (sha256
5812 (base32
5813 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5814 (build-system python-build-system)
5815 (native-inputs
5816 `(("python-nose" ,python-nose)))
5817 (arguments
5818 `(#:phases
5819 (modify-phases %standard-phases
5820 (replace 'check
5821 (lambda _
5822 (zero? (system* "nosetests")))))))
5823 (home-page "https://github.com/pexpect/ptyprocess")
5824 (synopsis "Run a subprocess in a pseudo terminal")
5825 (description
5826 "This package provides a Python library used to launch a subprocess in a
5827pseudo terminal (pty), and interact with both the process and its pty.")
5828 (license license:isc)))
5829
5830(define-public python2-ptyprocess
5831 (package-with-python2 python-ptyprocess))
5832
5833(define-public python-terminado
5834 (package
5835 (name "python-terminado")
5836 (version "0.6")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (pypi-uri "terminado" version))
5841 (sha256
5842 (base32
5843 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5844 (build-system python-build-system)
5845 (propagated-inputs
5846 `(("python-tornado" ,python-tornado)
5847 ("python-ptyprocess" ,python-ptyprocess)))
5848 (native-inputs
5849 `(("python-nose" ,python-nose)))
5850 (arguments
5851 `(#:phases
5852 (modify-phases %standard-phases
5853 (replace 'check
5854 (lambda _
5855 (zero? (system* "nosetests")))))))
5856 (home-page "https://github.com/takluyver/terminado")
5857 (synopsis "Terminals served to term.js using Tornado websockets")
5858 (description "This package provides a Tornado websocket backend for the
5859term.js Javascript terminal emulator library.")
5860 (license license:bsd-2)
5861 (properties `((python2-variant . ,(delay python2-terminado))))))
5862
5863(define-public python2-terminado
5864 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5865 (package (inherit terminado)
5866 (propagated-inputs
5867 `(("python2-backport-ssl-match-hostname"
5868 ,python2-backport-ssl-match-hostname)
5869 ,@(package-propagated-inputs terminado))))))
5870
5871(define-public python-fonttools
5872 (package
5873 (name "python-fonttools")
5874 (version "2.5")
5875 (source (origin
5876 (method url-fetch)
5877 (uri (string-append
5878 "https://pypi.python.org/packages/source/F/FontTools/"
5879 "fonttools-" version ".tar.gz"))
5880 (sha256
5881 (base32
5882 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5883 (build-system python-build-system)
5884 (arguments
5885 '(#:test-target "check"
5886 #:phases
5887 (modify-phases %standard-phases
5888 (add-after 'unpack 'patch-setuppy
5889 ;; Remove the undocumented "extra_path" argument, which adds an
5890 ;; intervening directories between site-packages and the package
5891 ;; directory.
5892 (lambda _
5893 (substitute* "setup.py"
5894 (("^[ \t]*extra_path *= *'FontTools',") ""))
5895 #t)))))
5896 (home-page "http://github.com/behdad/fonttools")
5897 (synopsis "Tools to manipulate font files")
5898 (description
5899 "FontTools/TTX is a library to manipulate font files from Python. It
5900supports reading and writing of TrueType/OpenType fonts, reading and writing
5901of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5902also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5903from an XML-based format.")
5904 (license (license:non-copyleft
5905 "file://LICENSE.txt"
5906 "See LICENSE.txt in the distribution."))))
5907
5908(define-public python2-fonttools
5909 (package-with-python2 python-fonttools))
5910
5911(define-public python-ly
5912 (package
5913 (name "python-ly")
5914 (version "0.9.4")
5915 (source
5916 (origin
5917 (method url-fetch)
5918 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5919 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5920 "/python-ly-" version ".tar.gz"))
5921 (sha256
5922 (base32
5923 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5924 (build-system python-build-system)
5925 (synopsis "Tool and library for manipulating LilyPond files")
5926 (description "This package provides a Python library to parse, manipulate
5927or create documents in LilyPond format. A command line program ly is also
5928provided that can be used to do various manipulations with LilyPond files.")
5929 (home-page "https://pypi.python.org/pypi/python-ly")
5930 (license license:gpl2+)))
5931
5932(define-public python-appdirs
5933 (package
5934 (name "python-appdirs")
5935 (version "1.4.0")
5936 (source
5937 (origin
5938 (method url-fetch)
5939 (uri (string-append
5940 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5941 version
5942 ".tar.gz"))
5943 (sha256
5944 (base32
5945 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5946 (build-system python-build-system)
5947 (home-page "http://github.com/ActiveState/appdirs")
5948 (synopsis
5949 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5950 (description
5951 "This module provides a portable way of finding out where user data
5952should be stored on various operating systems.")
5953 (license license:expat)))
5954
5955(define-public python2-appdirs
5956 (package-with-python2 python-appdirs))
5957
5958(define-public python-llfuse
5959 (package
5960 (name "python-llfuse")
5961 (version "1.1.1")
5962 (source (origin
5963 (method url-fetch)
5964 (uri (string-append
5965 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5966 "llfuse-" version ".tar.bz2"))
5967 (sha256
5968 (base32
5969 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5970 (build-system python-build-system)
5971 (inputs
5972 `(("fuse" ,fuse)
5973 ("attr" ,attr)))
5974 (native-inputs
5975 `(("pkg-config" ,pkg-config)))
5976 (synopsis "Python bindings for FUSE")
5977 (description
5978 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5979 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5980 (license license:lgpl2.0+)
5981 (properties `((python2-variant . ,(delay python2-llfuse))))))
5982
5983(define-public python2-llfuse
5984 (package (inherit (package-with-python2
5985 (strip-python2-variant python-llfuse)))
5986 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5987
5988;; For attic-0.16
5989(define-public python-llfuse-0.41
5990 (package (inherit python-llfuse)
5991 (version "0.41.1")
5992 (source (origin
5993 (method url-fetch)
5994 (uri (string-append
5995 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5996 "llfuse-" version ".tar.bz2"))
5997 (sha256
5998 (base32
5999 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6000 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6001 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6002 (license (list license:expat license:lgpl2.0+))))
6003
6004(define-public python-msgpack
6005 (package
6006 (name "python-msgpack")
6007 (version "0.4.8")
6008 (source (origin
6009 (method url-fetch)
6010 (uri (pypi-uri "msgpack-python" version))
6011 (sha256
6012 (base32
6013 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6014 (build-system python-build-system)
6015 (synopsis "MessagePack (de)serializer")
6016 (description "MessagePack is a fast, compact binary serialization format,
6017suitable for similar data to JSON. This package provides CPython bindings for
6018reading and writing MessagePack data.")
6019 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6020 (license license:asl2.0)))
6021
6022(define-public python2-msgpack
6023 (package-with-python2 python-msgpack))
6024
6025(define-public python-netaddr
6026 (package
6027 (name "python-netaddr")
6028 (version "0.7.18")
6029 (source
6030 (origin
6031 (method url-fetch)
6032 (uri (string-append
6033 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6034 version
6035 ".tar.gz"))
6036 (sha256
6037 (base32
6038 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6039 (build-system python-build-system)
6040 (arguments `(#:tests? #f)) ;; No tests.
6041 (home-page "https://github.com/drkjam/netaddr/")
6042 (synopsis "Pythonic manipulation of network addresses")
6043 (description
6044 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6045and MAC network addresses.")
6046 (license license:bsd-3)))
6047
6048(define-public python2-netaddr
6049 (package-with-python2 python-netaddr))
6050
6051(define-public python-wrapt
6052 (package
6053 (name "python-wrapt")
6054 (version "1.10.5")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (string-append
6059 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6060 version
6061 ".tar.gz"))
6062 (sha256
6063 (base32
6064 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6065 (build-system python-build-system)
6066 (arguments
6067 ;; Tests are not included in the tarball, they are only available in the
6068 ;; git repository.
6069 `(#:tests? #f))
6070 (home-page "https://github.com/GrahamDumpleton/wrapt")
6071 (synopsis "Module for decorators, wrappers and monkey patching")
6072 (description
6073 "The aim of the wrapt module is to provide a transparent object proxy for
6074 Python, which can be used as the basis for the construction of function
6075 wrappers and decorator functions.")
6076 (license license:bsd-2)))
6077
6078(define-public python2-wrapt
6079 (package-with-python2 python-wrapt))
6080
6081(define-public python-iso8601
6082 (package
6083 (name "python-iso8601")
6084 (version "0.1.11")
6085 (source
6086 (origin
6087 (method url-fetch)
6088 (uri (pypi-uri "iso8601" version))
6089 (sha256
6090 (base32
6091 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6092 (build-system python-build-system)
6093 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6094 (synopsis "Module to parse ISO 8601 dates")
6095 (description
6096 "This module parses the most common forms of ISO 8601 date strings (e.g.
6097@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6098 (license license:expat)))
6099
6100(define-public python2-iso8601
6101 (package-with-python2 python-iso8601))
6102
6103(define-public python-monotonic
6104 (package
6105 (name "python-monotonic")
6106 (version "0.3")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (string-append
6111 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6112 version
6113 ".tar.gz"))
6114 (sha256
6115 (base32
6116 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6117 (build-system python-build-system)
6118 (home-page "https://github.com/atdt/monotonic")
6119 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6120 (description
6121 "This module provides a monotonic() function which returns the value (in
6122fractional seconds) of a clock which never goes backwards.")
6123 (license license:asl2.0)))
6124
6125(define-public python2-monotonic
6126 (package-with-python2 python-monotonic))
6127
6128(define-public python-webob
6129 (package
6130 (name "python-webob")
6131 (version "1.5.1")
6132 (source
6133 (origin
6134 (method url-fetch)
6135 (uri (pypi-uri "WebOb" version))
6136 (sha256
6137 (base32
6138 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6139 (build-system python-build-system)
6140 (native-inputs
6141 `(("python-nose" ,python-nose)))
6142 (home-page "http://webob.org/")
6143 (synopsis "WSGI request and response object")
6144 (description
6145 "WebOb provides wrappers around the WSGI request environment, and an
6146object to help create WSGI responses.")
6147 (license license:expat)))
6148
6149(define-public python2-webob
6150 (package-with-python2 python-webob))
6151
6152(define-public python-xlrd
6153 (package
6154 (name "python-xlrd")
6155 (version "1.0.0")
6156 (source (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "xlrd" version))
6159 (sha256
6160 (base32
6161 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6162 (build-system python-build-system)
6163 (arguments
6164 `(#:phases
6165 (modify-phases %standard-phases
6166 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6167 ;; run tests instead for now.
6168 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6169 (native-inputs `(("python-nose" ,python-nose)))
6170 (home-page "http://www.python-excel.org/")
6171 (synopsis "Library for extracting data from Excel files")
6172 (description "This packages provides a library to extract data from
6173spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6174@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6175Unicode-aware. It is not intended as an end-user tool.")
6176 (license license:bsd-3)))
6177
6178(define-public python2-xlrd
6179 (package-with-python2 python-xlrd))
6180
6181(define-public python-prettytable
6182 (package
6183 (name "python-prettytable")
6184 (version "0.7.2")
6185 (source
6186 (origin
6187 (method url-fetch)
6188 (uri (string-append
6189 "https://pypi.python.org/packages/source/P/PrettyTable/"
6190 "prettytable-" version ".tar.bz2"))
6191 (sha256
6192 (base32
6193 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6194 (build-system python-build-system)
6195 (home-page "http://code.google.com/p/prettytable/")
6196 (synopsis "Display tabular data in an ASCII table format")
6197 (description
6198 "A library designed to represent tabular data in visually appealing ASCII
6199tables. PrettyTable allows for selection of which columns are to be printed,
6200independent alignment of columns (left or right justified or centred) and
6201printing of sub-tables by specifying a row range.")
6202 (license license:bsd-3)))
6203
6204(define-public python2-prettytable
6205 (package-with-python2 python-prettytable))
6206
6207(define-public python-tables
6208 (package
6209 (name "python-tables")
6210 (version "3.2.2")
6211 (source
6212 (origin
6213 (method url-fetch)
6214 (uri (pypi-uri "tables" version))
6215 (sha256
6216 (base32
6217 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6218 (modules '((guix build utils)))
6219 (snippet
6220 '(begin
6221 ;; Remove pre-compiled .pyc files from source.
6222 (for-each delete-file-recursively
6223 (find-files "." "__pycache__" #:directories? #t))
6224 (for-each delete-file (find-files "." "\\.pyc$"))
6225 #t))))
6226 (build-system python-build-system)
6227 (arguments
6228 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6229 ;; or "check", so we must override the build and check phases.
6230 #:phases
6231 (modify-phases %standard-phases
6232 (add-after 'unpack 'use-gcc
6233 (lambda _
6234 (substitute* "setup.py"
6235 (("compiler = new_compiler\\(\\)" line)
6236 (string-append line
6237 "\ncompiler.set_executables(compiler='gcc',"
6238 "compiler_so='gcc',"
6239 "linker_exe='gcc',"
6240 "linker_so='gcc -shared')")))
6241 #t))
6242 (replace 'build
6243 (lambda* (#:key inputs #:allow-other-keys)
6244 (zero? (system* "python" "setup.py" "build"
6245 (string-append "--hdf5="
6246 (assoc-ref inputs "hdf5"))))))
6247 (replace 'check
6248 (lambda* (#:key inputs #:allow-other-keys)
6249 (zero? (system* "python" "setup.py" "check"
6250 (string-append "--hdf5="
6251 (assoc-ref inputs "hdf5")))))))))
6252 (propagated-inputs
6253 `(("python-numexpr" ,python-numexpr)
6254 ("python-numpy" ,python-numpy)))
6255 (native-inputs
6256 `(("python-cython" ,python-cython)
6257 ("pkg-config" ,pkg-config)))
6258 (inputs
6259 `(("hdf5" ,hdf5)
6260 ("bzip2" ,bzip2)
6261 ("zlib" ,zlib)))
6262 (home-page "http://www.pytables.org/")
6263 (synopsis "Hierarchical datasets for Python")
6264 (description "PyTables is a package for managing hierarchical datasets and
6265designed to efficently cope with extremely large amounts of data.")
6266 (license license:bsd-3)))
6267
6268(define-public python2-tables
6269 (package-with-python2 python-tables))
6270
6271(define-public python-pyasn1
6272 (package
6273 (name "python-pyasn1")
6274 (version "0.1.9")
6275 (source
6276 (origin
6277 (method url-fetch)
6278 (uri (pypi-uri "pyasn1" version))
6279 (sha256
6280 (base32
6281 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6282 (build-system python-build-system)
6283 (home-page "http://pyasn1.sourceforge.net/")
6284 (synopsis "ASN.1 types and codecs")
6285 (description
6286 "This is an implementation of ASN.1 types and codecs in Python. It is
6287suitable for a wide range of protocols based on the ASN.1 specification.")
6288 (license license:bsd-2)))
6289
6290(define-public python2-pyasn1
6291 (package-with-python2 python-pyasn1))
6292
6293(define-public python-pyasn1-modules
6294 (package
6295 (name "python-pyasn1-modules")
6296 (version "0.0.8")
6297 (source
6298 (origin
6299 (method url-fetch)
6300 (uri (pypi-uri "pyasn1-modules" version))
6301 (sha256
6302 (base32
6303 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6304 (build-system python-build-system)
6305 (propagated-inputs
6306 `(("python-pyasn1" ,python-pyasn1)))
6307 (home-page "http://sourceforge.net/projects/pyasn1/")
6308 (synopsis "ASN.1 codec implementations")
6309 (description
6310 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6311implementations of ASN.1-based codecs and protocols.")
6312 (license license:bsd-3)))
6313
6314(define-public python2-pyasn1-modules
6315 (package-with-python2 python-pyasn1-modules))
6316
6317(define-public python-ipaddress
6318 (package
6319 (name "python-ipaddress")
6320 (version "1.0.16")
6321 (source (origin
6322 (method url-fetch)
6323 (uri (pypi-uri "ipaddress" version))
6324 (sha256
6325 (base32
6326 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6327 (build-system python-build-system)
6328 (home-page "https://github.com/phihag/ipaddress")
6329 (synopsis "IP address manipulation library")
6330 (description
6331 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6332 in Python. This library is used to create, poke at, and manipulate IPv4 and
6333 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6334 module to older versions of Python.")
6335 (license license:psfl)))
6336
6337(define-public python2-ipaddress
6338 (package-with-python2 python-ipaddress))
6339
6340(define-public python2-ipaddr
6341 (package
6342 (name "python2-ipaddr")
6343 (version "2.1.11")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (pypi-uri "ipaddr" version))
6348 (sha256
6349 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6350 (build-system python-build-system)
6351 (arguments
6352 `(#:python ,python-2 ;version 2 only
6353 #:phases
6354 (modify-phases %standard-phases
6355 (replace 'check
6356 (lambda* _
6357 (zero? (system* "python" "ipaddr_test.py")))))))
6358 (home-page "https://github.com/google/ipaddr-py")
6359 (synopsis "IP address manipulation library")
6360 (description
6361 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6362IPv6 addresses and networks.
6363
6364For new implementations you may prefer to use the standard module
6365@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6366versions of Python.")
6367 (license license:asl2.0)))
6368
6369(define-public python-idna
6370 (package
6371 (name "python-idna")
6372 (version "2.0")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (string-append "https://pypi.python.org/packages/source/i/"
6377 "idna/idna-" version ".tar.gz"))
6378 (sha256
6379 (base32
6380 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6381 (build-system python-build-system)
6382 (home-page "https://github.com/kjd/idna")
6383 (synopsis "Internationalized domain names in applications")
6384 (description
6385 "This is a library to support the Internationalised Domain Names in
6386Applications (IDNA) protocol as specified in RFC 5891. This version of the
6387protocol is often referred to as “IDNA2008” and can produce different results
6388from the earlier standard from 2003. The library is also intended to act as a
6389suitable drop-in replacement for the “encodings.idna” module that comes with
6390the Python standard library but currently only supports the older 2003
6391specification.")
6392 (license license:bsd-4)))
6393
6394(define-public python2-idna
6395 (package-with-python2 python-idna))
6396
6397(define-public python-pretend
6398 (package
6399 (name "python-pretend")
6400 (version "1.0.8")
6401 (source
6402 (origin
6403 (method url-fetch)
6404 (uri (string-append "https://pypi.python.org/packages/source/p/"
6405 "pretend/pretend-" version ".tar.gz"))
6406 (sha256
6407 (base32
6408 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6409 (build-system python-build-system)
6410 (home-page "https://github.com/alex/pretend")
6411 (synopsis "Library for stubbing in Python")
6412 (description
6413 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6414technique for writing tests. You may hear the term mixed up with mocks,
6415fakes, or doubles. Basically, a stub is an object that returns pre-canned
6416responses, rather than doing any computation.")
6417 (license license:bsd-3)))
6418
6419(define-public python2-pretend
6420 (package-with-python2 python-pretend))
6421
6422(define-public python-cryptography-vectors
6423 (package
6424 (name "python-cryptography-vectors")
6425 (version "1.7.1")
6426 (source
6427 (origin
6428 (method url-fetch)
6429 (uri (pypi-uri "cryptography_vectors" version))
6430 (sha256
6431 (base32
6432 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
6433 (build-system python-build-system)
6434 (home-page "https://github.com/pyca/cryptography")
6435 (synopsis "Test vectors for the cryptography package")
6436 (description
6437 "This package contains test vectors for the cryptography package.")
6438 ;; Distributed under either BSD-3 or ASL2.0
6439 (license (list license:bsd-3 license:asl2.0))))
6440
6441(define-public python2-cryptography-vectors
6442 (package-with-python2 python-cryptography-vectors))
6443
6444(define-public python-cryptography
6445 (package
6446 (name "python-cryptography")
6447 (version "1.7.1")
6448 (source
6449 (origin
6450 (method url-fetch)
6451 (uri (pypi-uri "cryptography" version))
6452 (sha256
6453 (base32
6454 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
6455 (build-system python-build-system)
6456 (inputs
6457 `(("openssl" ,openssl)))
6458 (propagated-inputs
6459 `(("python-cffi" ,python-cffi)
6460 ("python-six" ,python-six)
6461 ("python-pyasn1" ,python-pyasn1)
6462 ("python-idna" ,python-idna)
6463 ("python-iso8601" ,python-iso8601)))
6464 (native-inputs
6465 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6466 ("python-hypothesis" ,python-hypothesis)
6467 ("python-pretend" ,python-pretend)
6468 ("python-pyasn1" ,python-pyasn1)
6469 ("python-pyasn1-modules" ,python-pyasn1-modules)
6470 ("python-pytz" ,python-pytz)
6471 ("python-pytest" ,python-pytest-2.9.2)))
6472 (home-page "https://github.com/pyca/cryptography")
6473 (synopsis "Cryptographic recipes and primitives for Python")
6474 (description
6475 "cryptography is a package which provides cryptographic recipes and
6476primitives to Python developers. It aims to be the “cryptographic standard
6477library” for Python. The package includes both high level recipes, and low
6478level interfaces to common cryptographic algorithms such as symmetric ciphers,
6479message digests and key derivation functions.")
6480 ;; Distributed under either BSD-3 or ASL2.0
6481 (license (list license:bsd-3 license:asl2.0))
6482 (properties `((python2-variant . ,(delay python2-cryptography))))))
6483
6484(define-public python2-cryptography
6485 (let ((crypto (package-with-python2
6486 (strip-python2-variant python-cryptography))))
6487 (package (inherit crypto)
6488 (propagated-inputs
6489 `(("python2-ipaddress" ,python2-ipaddress)
6490 ("python2-backport-ssl-match-hostname"
6491 ,python2-backport-ssl-match-hostname)
6492 ("python2-enum34" ,python2-enum34)
6493 ,@(package-propagated-inputs crypto))))))
6494
6495(define-public python-pyopenssl
6496 (package
6497 (name "python-pyopenssl")
6498 (version "16.2.0")
6499 (source
6500 (origin
6501 (method url-fetch)
6502 (uri (pypi-uri "pyOpenSSL" version))
6503 (sha256
6504 (base32
6505 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
6506 (build-system python-build-system)
6507 (propagated-inputs
6508 `(("python-cryptography" ,python-cryptography)
6509 ("python-six" ,python-six)))
6510 (inputs
6511 `(("openssl" ,openssl)))
6512 (home-page "https://github.com/pyca/pyopenssl")
6513 (synopsis "Python wrapper module around the OpenSSL library")
6514 (description
6515 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6516library.")
6517 (license license:asl2.0)))
6518
6519(define-public python2-pyopenssl
6520 (package-with-python2 python-pyopenssl))
6521
6522(define-public python-pip
6523 (package
6524 (name "python-pip")
6525 (version "8.0.2")
6526 (source
6527 (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "pip" version))
6530 (sha256
6531 (base32
6532 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6533 (build-system python-build-system)
6534 (native-inputs
6535 `(;; Tests
6536 ("python-virtualenv" ,python-virtualenv)
6537 ("python-mock" ,python-mock)
6538 ("python-pytest" ,python-pytest)
6539 ("python-scripttest" ,python-scripttest)))
6540 (home-page "https://pip.pypa.io/")
6541 (synopsis
6542 "Package manager for Python software")
6543 (description
6544 "Pip is a package manager for Python software, that finds packages on the
6545Python Package Index (PyPI).")
6546 (license license:expat)))
6547
6548(define-public python2-pip
6549 (package-with-python2 python-pip))
6550
6551(define-public python-tlsh
6552 (package
6553 (name "python-tlsh")
6554 (version "3.4.4")
6555 (home-page "https://github.com/trendmicro/tlsh")
6556 (source (origin
6557 (method url-fetch)
6558 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6559 version ".tar.gz"))
6560 (sha256
6561 (base32
6562 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6563 (file-name (string-append name "-" version ".tar.gz"))))
6564 (build-system cmake-build-system)
6565 (arguments
6566 '(#:out-of-source? #f
6567 #:phases (modify-phases %standard-phases
6568 (replace
6569 'install
6570 (lambda* (#:key outputs #:allow-other-keys)
6571 ;; Build and install the Python bindings. The underlying
6572 ;; C++ library is apparently not meant to be installed.
6573 (let ((out (assoc-ref outputs "out")))
6574 (with-directory-excursion "py_ext"
6575 (and (system* "python" "setup.py" "build")
6576 (system* "python" "setup.py" "install"
6577 (string-append "--prefix=" out))))))))))
6578 (inputs `(("python" ,python-wrapper))) ;for the bindings
6579 (synopsis "Fuzzy matching library for Python")
6580 (description
6581 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6582Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6583value which can be used for similarity comparisons. Similar objects have
6584similar hash values, which allows for the detection of similar objects by
6585comparing their hash values. The byte stream should have a sufficient amount
6586of complexity; for example, a byte stream of identical bytes will not generate
6587a hash value.")
6588 (license license:asl2.0)))
6589
6590(define-public python2-tlsh
6591 (package
6592 (inherit python-tlsh)
6593 (name "python2-tlsh")
6594 (inputs `(("python" ,python-2)))))
6595
6596(define-public python-termcolor
6597 (package
6598 (name "python-termcolor")
6599 (version "1.1.0")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "python-termcolor" version))
6604 (sha256
6605 (base32
6606 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6607 (build-system python-build-system)
6608 (arguments
6609 ;; There are no tests.
6610 `(#:tests? #f))
6611 (home-page "http://pypi.python.org/pypi/termcolor")
6612 (synopsis "ANSII Color formatting for terminal output")
6613 (description
6614 "This package provides ANSII Color formatting for output in terminals.")
6615 (license license:expat)))
6616
6617(define-public python2-termcolor
6618 (package-with-python2 python-termcolor))
6619
6620(define-public python-libarchive-c
6621 (package
6622 (name "python-libarchive-c")
6623 (version "2.2")
6624 (source (origin
6625 (method url-fetch)
6626 (uri (pypi-uri "libarchive-c" version))
6627 (sha256
6628 (base32
6629 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6630 (build-system python-build-system)
6631 (arguments
6632 '(#:phases (modify-phases %standard-phases
6633 (add-before
6634 'build 'reference-libarchive
6635 (lambda* (#:key inputs #:allow-other-keys)
6636 ;; Retain the absolute file name of libarchive.so.
6637 (let ((libarchive (assoc-ref inputs "libarchive")))
6638 (substitute* "libarchive/ffi.py"
6639 (("find_library\\('archive'\\)")
6640 (string-append "'" libarchive
6641 "/lib/libarchive.so'")))))))))
6642 (inputs
6643 `(("libarchive" ,libarchive)))
6644 (home-page "https://github.com/Changaco/python-libarchive-c")
6645 (synopsis "Python interface to libarchive")
6646 (description
6647 "This package provides Python bindings to libarchive, a C library to
6648access possibly compressed archives in many different formats. It uses
6649Python's @code{ctypes} foreign function interface (FFI).")
6650 (license license:lgpl2.0+)))
6651
6652(define-public python2-libarchive-c
6653 (package-with-python2 python-libarchive-c))
6654
6655(define-public python-file
6656 (package
6657 (inherit file)
6658 (name "python-file")
6659 (source (origin
6660 (inherit (package-source file))
6661 ;; This patch should not be applied to python2-file.
6662 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6663 (build-system python-build-system)
6664 (arguments
6665 '(#:tests? #f ;no tests
6666 #:configure-flags '("--single-version-externally-managed" "--root=/")
6667 #:phases (modify-phases %standard-phases
6668 (add-before 'build 'change-directory
6669 (lambda _
6670 (chdir "python")
6671 #t))
6672 (add-before 'build 'set-library-file-name
6673 (lambda* (#:key inputs #:allow-other-keys)
6674 (let ((file (assoc-ref inputs "file")))
6675 (substitute* "magic.py"
6676 (("find_library\\('magic'\\)")
6677 (string-append "'" file "/lib/libmagic.so'")))
6678 #t))))))
6679 (inputs `(("file" ,file)))
6680 (self-native-input? #f)
6681 (synopsis "Python bindings to the libmagic file type guesser. Note that
6682this module and the python-magic module both provide a \"magic.py\" file;
6683these two modules, which are different and were developed separately, both
6684serve the same purpose: provide Python bindings for libmagic.")))
6685
6686(define-public python2-file
6687 (package-with-python2 python-file))
6688
6689(define-public python-debian
6690 (package
6691 (name "python-debian")
6692 (version "0.1.23")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (string-append
6697 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6698 version ".tar.gz"))
6699 (sha256
6700 (base32
6701 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6702 (build-system python-build-system)
6703 (propagated-inputs
6704 `(("python-six" ,python-six)))
6705 (home-page "http://packages.debian.org/sid/python-debian")
6706 (synopsis "Debian package related modules")
6707 (description
6708 ;; XXX: Use @enumerate instead of @itemize to work around
6709 ;; <http://bugs.gnu.org/21772>.
6710 "This package provides Python modules that abstract many formats of
6711Debian-related files, such as:
6712
6713@enumerate
6714@item Debtags information;
6715@item @file{debian/changelog} files;
6716@item packages files, pdiffs;
6717@item control files of single or multiple RFC822-style paragraphs---e.g.
6718 @file{debian/control}, @file{.changes}, @file{.dsc};
6719@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6720 contained files and meta-information.
6721@end enumerate\n")
6722
6723 ;; Modules are either GPLv2+ or GPLv3+.
6724 (license license:gpl3+)))
6725
6726(define-public python2-debian
6727 (package-with-python2 python-debian))
6728
6729(define-public python-nbformat
6730 (package
6731 (name "python-nbformat")
6732 (version "4.1.0")
6733 (source
6734 (origin
6735 (method url-fetch)
6736 (uri (pypi-uri "nbformat" version))
6737 (sha256
6738 (base32
6739 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6740 (build-system python-build-system)
6741 (arguments `(#:tests? #f)) ; no test target
6742 (propagated-inputs
6743 `(("python-ipython-genutils" ,python-ipython-genutils)
6744 ("python-jsonschema" ,python-jsonschema)
6745 ("python-jupyter-core" ,python-jupyter-core)
6746 ("python-traitlets" ,python-traitlets)))
6747 (home-page "http://jupyter.org")
6748 (synopsis "Jupyter Notebook format")
6749 (description "This package provides the reference implementation of the
6750Jupyter Notebook format and Python APIs for working with notebooks.")
6751 (license license:bsd-3)))
6752
6753(define-public python2-nbformat
6754 (package-with-python2 python-nbformat))
6755
6756(define-public python-bleach
6757 (package
6758 (name "python-bleach")
6759 (version "1.4.3")
6760 (source
6761 (origin
6762 (method url-fetch)
6763 (uri (pypi-uri "bleach" version))
6764 (sha256
6765 (base32
6766 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6767 (build-system python-build-system)
6768 (propagated-inputs
6769 `(("python-html5lib" ,python-html5lib-0.9)
6770 ("python-six" ,python-six)))
6771 (native-inputs
6772 `(("python-nose" ,python-nose)))
6773 (home-page "http://github.com/jsocol/bleach")
6774 (synopsis "Whitelist-based HTML-sanitizing tool")
6775 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6776 (license license:asl2.0)))
6777
6778(define-public python2-bleach
6779 (package-with-python2 python-bleach))
6780
6781(define-public python-entrypoints
6782 (package
6783 (name "python-entrypoints")
6784 (version "0.2.2")
6785 (source
6786 (origin
6787 (method url-fetch)
6788 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6789 version ".tar.gz"))
6790 (file-name (string-append name "-" version ".tar.gz"))
6791 (sha256
6792 (base32
6793 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6794 (build-system python-build-system)
6795 ;; The package does not come with a setup.py file, so we have to generate
6796 ;; one ourselves.
6797 (arguments
6798 `(#:tests? #f
6799 #:phases
6800 (modify-phases %standard-phases
6801 (add-after 'unpack 'create-setup.py
6802 (lambda _
6803 (call-with-output-file "setup.py"
6804 (lambda (port)
6805 (format port "\
6806from setuptools import setup
6807setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6808" ,version))))))))
6809 (home-page "https://github.com/takluyver/entrypoints")
6810 (synopsis "Discover and load entry points from installed Python packages")
6811 (description "Entry points are a way for Python packages to advertise
6812objects with some common interface. The most common examples are
6813@code{console_scripts} entry points, which define shell commands by
6814identifying a Python function to run. The @code{entrypoints} module contains
6815functions to find and load entry points.")
6816 (license license:expat)))
6817
6818(define-public python2-entrypoints
6819 (package-with-python2 python-entrypoints))
6820
6821(define-public python-nbconvert
6822 (package
6823 (name "python-nbconvert")
6824 (version "5.0.0b1")
6825 (source
6826 (origin
6827 (method url-fetch)
6828 (uri (pypi-uri "nbconvert" version))
6829 (sha256
6830 (base32
6831 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6832 (build-system python-build-system)
6833 ;; The "bdist_egg" target is disabled by default, causing the installation
6834 ;; to fail.
6835 (arguments `(#:configure-flags (list "bdist_egg")))
6836 (propagated-inputs
6837 `(("python-bleach" ,python-bleach)
6838 ("python-entrypoints" ,python-entrypoints)
6839 ("python-jinja2" ,python-jinja2)
6840 ("python-jupyter-core" ,python-jupyter-core)
6841 ("python-mistune" ,python-mistune)
6842 ("python-nbformat" ,python-nbformat)
6843 ("python-pygments" ,python-pygments)
6844 ("python-traitlets" ,python-traitlets)))
6845 (home-page "http://jupyter.org")
6846 (synopsis "Converting Jupyter Notebooks")
6847 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6848notebooks to various other formats via Jinja templates. It allows you to
6849convert an @code{.ipynb} notebook file into various static formats including:
6850
6851@enumerate
6852@item HTML
6853@item LaTeX
6854@item PDF
6855@item Reveal JS
6856@item Markdown (md)
6857@item ReStructured Text (rst)
6858@item executable script
6859@end enumerate\n")
6860 (license license:bsd-3)))
6861
6862(define-public python2-nbconvert
6863 (package-with-python2 python-nbconvert))
6864
6865(define-public python-notebook
6866 (package
6867 (name "python-notebook")
6868 (version "4.2.3")
6869 (source (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "notebook" version))
6872 (sha256
6873 (base32
6874 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6875 (build-system python-build-system)
6876 (arguments
6877 `(#:phases
6878 (modify-phases %standard-phases
6879 (replace 'check
6880 (lambda _
6881 ;; HOME must be set for tests
6882 (setenv "HOME" "/tmp")
6883 (zero? (system* "nosetests")))))))
6884 (propagated-inputs
6885 `(("python-jupyter-core" ,python-jupyter-core)
6886 ("python-nbformat" ,python-nbformat)
6887 ("python-nbconvert" ,python-nbconvert)
6888 ("python-ipython" ,python-ipython)))
6889 (native-inputs
6890 `(("python-nose" ,python-nose)
6891 ("python-sphinx" ,python-sphinx)
6892 ("python-requests" ,python-requests)))
6893 (home-page "http://jupyter.org/")
6894 (synopsis "Web-based notebook environment for interactive computing")
6895 (description
6896 "The Jupyter HTML notebook is a web-based notebook environment for
6897interactive computing.")
6898 (properties `((python2-variant . ,(delay python2-notebook))))
6899 (license license:bsd-3)))
6900
6901(define-public python2-notebook
6902 (let ((base (package-with-python2
6903 (strip-python2-variant python-notebook))))
6904 (package (inherit base)
6905 (native-inputs
6906 `(("python2-mock" ,python2-mock)
6907 ,@(package-native-inputs base)))
6908 (arguments
6909 (substitute-keyword-arguments (package-arguments base)
6910 ((#:phases phases)
6911 `(modify-phases ,phases
6912 (add-before 'check 'disable-test-case
6913 ;; The test requires network access to localhost. Curiously it
6914 ;; fails with Python 2 only. Simply make the test-case return
6915 ;; immediately.
6916 (lambda _
6917 (substitute*
6918 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6919 (("formats = self.nbconvert_api") "return #")))))))))))
6920
6921(define-public python-widgetsnbextension
6922 (package
6923 (name "python-widgetsnbextension")
6924 (version "1.2.6")
6925 (source
6926 (origin
6927 (method url-fetch)
6928 (uri (pypi-uri "widgetsnbextension" version))
6929 (sha256
6930 (base32
6931 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6932 (build-system python-build-system)
6933 (propagated-inputs
6934 `(("python-notebook" ,python-notebook)))
6935 (native-inputs
6936 `(("python-nose" ,python-nose)))
6937 (home-page "http://ipython.org")
6938 (synopsis "IPython HTML widgets for Jupyter")
6939 (description "This package provides interactive HTML widgets for Jupyter
6940notebooks.")
6941 (license license:bsd-3)))
6942
6943(define-public python2-widgetsnbextension
6944 (package-with-python2 python-widgetsnbextension))
6945
6946(define-public python-ipywidgets
6947 (package
6948 (name "python-ipywidgets")
6949 (version "5.2.2")
6950 (source
6951 (origin
6952 (method url-fetch)
6953 (uri (pypi-uri "ipywidgets" version))
6954 (sha256
6955 (base32
6956 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6957 (build-system python-build-system)
6958 ;; FIXME: it's not clear how to run the tests.
6959 (arguments `(#:tests? #f))
6960 (propagated-inputs
6961 `(("python-ipykernel" ,python-ipykernel)
6962 ("python-ipython" ,python-ipython)
6963 ("python-traitlets" ,python-traitlets)
6964 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6965 (home-page "http://ipython.org")
6966 (synopsis "IPython HTML widgets for Jupyter")
6967 (description "Ipywidgets are interactive HTML widgets for Jupyter
6968notebooks and the IPython kernel. Notebooks come alive when interactive
6969widgets are used. Users gain control of their data and can visualize changes
6970in the data.")
6971 (license license:bsd-3)))
6972
6973(define-public python2-ipywidgets
6974 (package-with-python2 python-ipywidgets))
6975
6976(define-public python-jupyter-console
6977 (package
6978 (name "python-jupyter-console")
6979 (version "5.0.0")
6980 (source
6981 (origin
6982 (method url-fetch)
6983 (uri (pypi-uri "jupyter_console" version))
6984 (sha256
6985 (base32
6986 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6987 (build-system python-build-system)
6988 ;; FIXME: it's not clear how to run the tests.
6989 (arguments `(#:tests? #f))
6990 (propagated-inputs
6991 `(("python-ipykernel" ,python-ipykernel)
6992 ("python-ipython" ,python-ipython)
6993 ("python-jupyter-client" ,python-jupyter-client)
6994 ("python-prompt-toolkit" ,python-prompt-toolkit)
6995 ("python-pygments" ,python-pygments)))
6996 (home-page "https://jupyter.org")
6997 (synopsis "Jupyter terminal console")
6998 (description "This package provides a terminal-based console frontend for
6999Jupyter kernels. It also allows for console-based interaction with non-Python
7000Jupyter kernels such as IJulia and IRKernel.")
7001 (license license:bsd-3)))
7002
7003(define-public python2-jupyter-console
7004 (package-with-python2 python-jupyter-console))
7005
7006(define-public jupyter
7007 (package
7008 (name "jupyter")
7009 (version "1.0.0")
7010 (source
7011 (origin
7012 (method url-fetch)
7013 (uri (pypi-uri "jupyter" version))
7014 (sha256
7015 (base32
7016 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7017 (build-system python-build-system)
7018 ;; FIXME: it's not clear how to run the tests.
7019 (arguments `(#:tests? #f))
7020 (propagated-inputs
7021 `(("python-ipykernel" ,python-ipykernel)
7022 ("python-ipywidgets" ,python-ipywidgets)
7023 ("python-jupyter-console" ,python-jupyter-console)
7024 ("python-nbconvert" ,python-nbconvert)
7025 ("python-notebook" ,python-notebook)))
7026 (home-page "http://jupyter.org")
7027 (synopsis "Web application for interactive documents")
7028 (description
7029 "The Jupyter Notebook is a web application that allows you to create and
7030share documents that contain live code, equations, visualizations and
7031explanatory text. Uses include: data cleaning and transformation, numerical
7032simulation, statistical modeling, machine learning and much more.")
7033 (license license:bsd-3)))
7034
7035(define-public python-chardet
7036 (package
7037 (name "python-chardet")
7038 (version "2.3.0")
7039 (source
7040 (origin
7041 (method url-fetch)
7042 (uri (string-append
7043 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7044 version
7045 ".tar.gz"))
7046 (sha256
7047 (base32
7048 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7049 (build-system python-build-system)
7050 (home-page "https://github.com/chardet/chardet")
7051 (synopsis "Universal encoding detector for Python 2 and 3")
7052 (description
7053 "This package provides @code{chardet}, a Python module that can
7054automatically detect a wide range of file encodings.")
7055 (license license:lgpl2.1+)))
7056
7057(define-public python2-chardet
7058 (package-with-python2 python-chardet))
7059
7060(define-public python-docopt
7061 (package
7062 (name "python-docopt")
7063 (version "0.6.2")
7064 (source
7065 (origin
7066 (method url-fetch)
7067 ;; The release on PyPI does not include tests.
7068 (uri (string-append
7069 "https://github.com/docopt/docopt/archive/"
7070 version ".tar.gz"))
7071 (file-name (string-append name "-" version ".tar.gz"))
7072 (sha256
7073 (base32
7074 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7075 (build-system python-build-system)
7076 (native-inputs
7077 `(("python-pytest" ,python-pytest)))
7078 (arguments
7079 `(#:phases (alist-replace
7080 'check
7081 (lambda _ (zero? (system* "py.test")))
7082 %standard-phases)))
7083 (home-page "http://docopt.org")
7084 (synopsis "Command-line interface description language for Python")
7085 (description "This library allows the user to define a command-line
7086interface from a program's help message rather than specifying it
7087programatically with command-line parsers like @code{getopt} and
7088@code{argparse}.")
7089 (license license:expat)))
7090
7091(define-public python2-docopt
7092 (package-with-python2 python-docopt))
7093
7094(define-public python-zope-event
7095 (package
7096 (name "python-zope-event")
7097 (version "4.1.0")
7098 (source
7099 (origin
7100 (method url-fetch)
7101 (uri (string-append "https://pypi.python.org/packages/source/z"
7102 "/zope.event/zope.event-" version ".tar.gz"))
7103 (sha256
7104 (base32
7105 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7106 (build-system python-build-system)
7107 (home-page "http://pypi.python.org/pypi/zope.event")
7108 (synopsis "Event publishing system for Python")
7109 (description "Zope.event provides an event publishing API, intended for
7110use by applications which are unaware of any subscribers to their events. It
7111is a simple event-dispatching system on which more sophisticated event
7112dispatching systems can be built.")
7113 (license license:zpl2.1)))
7114
7115(define-public python2-zope-event
7116 (package-with-python2 python-zope-event))
7117
7118(define-public python-zope-interface
7119 (package
7120 (name "python-zope-interface")
7121 (version "4.1.3")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (string-append "https://pypi.python.org/packages/source/z"
7126 "/zope.interface/zope.interface-" version ".tar.gz"))
7127 (sha256
7128 (base32
7129 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7130 (build-system python-build-system)
7131 (native-inputs
7132 `(("python-zope-event" ,python-zope-event)))
7133 (home-page "https://github.com/zopefoundation/zope.interface")
7134 (synopsis "Python implementation of the \"design by contract\"
7135methodology")
7136 (description "Zope.interface provides an implementation of \"object
7137interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7138conforming to a given API or contract.")
7139 (license license:zpl2.1)))
7140
7141(define-public python2-zope-interface
7142 (package-with-python2 python-zope-interface))
7143
7144(define-public python-zope-exceptions
7145 (package
7146 (name "python-zope-exceptions")
7147 (version "4.0.8")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (string-append "https://pypi.python.org/packages/source/z"
7152 "/zope.exceptions/zope.exceptions-"
7153 version ".tar.gz"))
7154 (sha256
7155 (base32
7156 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7157 (build-system python-build-system)
7158 (arguments
7159 '(#:tests? #f)) ; circular dependency with zope.testrunner
7160 (propagated-inputs
7161 `(("python-zope-interface" ,python-zope-interface)))
7162 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7163 (synopsis "Zope exceptions")
7164 (description "Zope.exceptions provides general-purpose exception types
7165that have uses outside of the Zope framework.")
7166 (license license:zpl2.1)))
7167
7168(define-public python2-zope-exceptions
7169 (package-with-python2 python-zope-exceptions))
7170
7171(define-public python-zope-testing
7172 (package
7173 (name "python-zope-testing")
7174 (version "4.5.0")
7175 (source
7176 (origin
7177 (method url-fetch)
7178 (uri (string-append "https://pypi.python.org/packages/source/z"
7179 "/zope.testing/zope.testing-" version ".tar.gz"))
7180 (sha256
7181 (base32
7182 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7183 (modules '((guix build utils)))
7184 (snippet
7185 '(begin
7186 ;; Remove pre-compiled .pyc files backup files from source.
7187 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7188 #t))))
7189 (build-system python-build-system)
7190 (native-inputs
7191 `(("python-zope-exceptions" ,python-zope-exceptions)))
7192 (propagated-inputs
7193 `(("python-zope-interface" ,python-zope-interface)))
7194 (home-page "http://pypi.python.org/pypi/zope.testing")
7195 (synopsis "Zope testing helpers")
7196 (description "Zope.testing provides a number of testing utilities for HTML
7197forms, HTTP servers, regular expressions, and more.")
7198 (license license:zpl2.1)))
7199
7200(define-public python2-zope-testing
7201 (package-with-python2 python-zope-testing))
7202
7203(define-public python-zope-testrunner
7204 (package
7205 (name "python-zope-testrunner")
7206 (version "4.4.9")
7207 (source
7208 (origin
7209 (method url-fetch)
7210 (uri (string-append "https://pypi.python.org/packages/source/z"
7211 "/zope.testrunner/zope.testrunner-"
7212 version ".zip"))
7213 (sha256
7214 (base32
7215 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7216 (build-system python-build-system)
7217 (native-inputs
7218 `(("python-six" ,python-six)
7219 ;("python-zope-interface" ,python-zope-interface)
7220 ("python-zope-exceptions" ,python-zope-exceptions)
7221 ("python-zope-testing" ,python-zope-testing)
7222 ("unzip" ,unzip)))
7223 (propagated-inputs
7224 `(("python-zope-interface" ,python-zope-interface)))
7225 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7226 (synopsis "Zope testrunner script")
7227 (description "Zope.testrunner provides a script for running Python
7228tests.")
7229 (license license:zpl2.1)))
7230
7231(define-public python2-zope-testrunner
7232 (let ((base (package-with-python2 python-zope-testrunner)))
7233 (package
7234 (inherit base)
7235 (native-inputs
7236 (append (package-native-inputs base)
7237 `(("python2-subunit" ,python2-subunit)
7238 ("python2-mimeparse" ,python2-mimeparse)))))))
7239
7240(define-public python-zope-i18nmessageid
7241 (package
7242 (name "python-zope-i18nmessageid")
7243 (version "4.0.3")
7244 (source
7245 (origin
7246 (method url-fetch)
7247 (uri (string-append
7248 "https://pypi.python.org/packages/source/z"
7249 "/zope.i18nmessageid/zope.i18nmessageid-"
7250 version ".tar.gz"))
7251 (sha256
7252 (base32
7253 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7254 (build-system python-build-system)
7255 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7256 (synopsis "Message identifiers for internationalization")
7257 (description "Zope.i18nmessageid provides facilities for declaring
7258internationalized messages within program source text.")
7259 (license license:zpl2.1)))
7260
7261(define-public python2-zope-i18nmessageid
7262 (package-with-python2 python-zope-i18nmessageid))
7263
7264(define-public python-zope-schema
7265 (package
7266 (name "python-zope-schema")
7267 (version "4.4.2")
7268 (source
7269 (origin
7270 (method url-fetch)
7271 (uri (string-append "https://pypi.python.org/packages/source/z"
7272 "/zope.schema/zope.schema-" version ".tar.gz"))
7273 (sha256
7274 (base32
7275 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7276 (build-system python-build-system)
7277 (propagated-inputs
7278 `(("python-zope-event" ,python-zope-event)
7279 ("python-zope-interface" ,python-zope-interface)))
7280 (native-inputs
7281 `(("python-zope-testing" ,python-zope-testing)
7282 ("python-coverage" ,python-coverage)
7283 ("python-nose" ,python-nose)))
7284 (home-page "http://pypi.python.org/pypi/zope.schema")
7285 (synopsis "Zope data schemas")
7286 (description "Zope.scheme provides extensions to zope.interface for
7287defining data schemas.")
7288 (license license:zpl2.1)))
7289
7290(define-public python2-zope-schema
7291 (package-with-python2 python-zope-schema))
7292
7293(define-public python-zope-configuration
7294 (package
7295 (name "python-zope-configuration")
7296 (version "4.0.3")
7297 (source (origin
7298 (method url-fetch)
7299 (uri (string-append "https://pypi.python.org/packages/source/z"
7300 "/zope.configuration/zope.configuration-"
7301 version ".tar.gz"))
7302 (sha256
7303 (base32
7304 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7305 (build-system python-build-system)
7306 (propagated-inputs
7307 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7308 ("python-zope-schema" ,python-zope-schema)))
7309 (home-page "http://pypi.python.org/pypi/zope.configuration")
7310 (synopsis "Zope Configuration Markup Language")
7311 (description "Zope.configuration implements ZCML, the Zope Configuration
7312Markup Language.")
7313 (license license:zpl2.1)))
7314
7315(define-public python2-zope-configuration
7316 (package-with-python2 python-zope-configuration))
7317
7318(define-public python-zope-proxy
7319 (package
7320 (name "python-zope-proxy")
7321 (version "4.1.6")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (string-append "https://pypi.python.org/packages/source/z"
7326 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7327 (sha256
7328 (base32
7329 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7330 (build-system python-build-system)
7331 (propagated-inputs
7332 `(("python-zope-interface" ,python-zope-interface)))
7333 (home-page "http://pypi.python.org/pypi/zope.proxy")
7334 (synopsis "Generic, transparent proxies")
7335 (description "Zope.proxy provides generic, transparent proxies for Python.
7336Proxies are special objects which serve as mostly-transparent wrappers around
7337another object, intervening in the apparent behavior of the wrapped object
7338only when necessary to apply the policy (e.g., access checking, location
7339brokering, etc.) for which the proxy is responsible.")
7340 (license license:zpl2.1)))
7341
7342(define-public python2-zope-proxy
7343 (package-with-python2 python-zope-proxy))
7344
7345(define-public python-zope-location
7346 (package
7347 (name "python-zope-location")
7348 (version "4.0.3")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (string-append "https://pypi.python.org/packages/source/z"
7353 "/zope.location/zope.location-" version ".tar.gz"))
7354 (sha256
7355 (base32
7356 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7357 (build-system python-build-system)
7358 (propagated-inputs
7359 `(("python-zope-proxy" ,python-zope-proxy)
7360 ("python-zope-schema" ,python-zope-schema)))
7361 (home-page "http://pypi.python.org/pypi/zope.location/")
7362 (synopsis "Zope location library")
7363 (description "Zope.location implements the concept of \"locations\" in
7364Zope3, which are are special objects that have a structural location.")
7365 (license license:zpl2.1)))
7366
7367(define-public python2-zope-location
7368 (package-with-python2 python-zope-location))
7369
7370(define-public python-zope-security
7371 (package
7372 (name "python-zope-security")
7373 (version "4.0.3")
7374 (source
7375 (origin
7376 (method url-fetch)
7377 (uri (string-append "https://pypi.python.org/packages/source/z"
7378 "/zope.security/zope.security-" version ".tar.gz"))
7379 (sha256
7380 (base32
7381 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7382 (build-system python-build-system)
7383 (propagated-inputs
7384 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7385 ("python-zope-proxy" ,python-zope-proxy)
7386 ("python-zope-schema" ,python-zope-schema)))
7387 (native-inputs
7388 `(("python-zope-component" ,python-zope-component)
7389 ("python-zope-configuration" ,python-zope-configuration)
7390 ("python-zope-location" ,python-zope-location)
7391 ("python-zope-testrunner" ,python-zope-testrunner)
7392 ("python-zope-testing" ,python-zope-testing)))
7393 (home-page "http://pypi.python.org/pypi/zope.security")
7394 (synopsis "Zope security framework")
7395 (description "Zope.security provides a generic mechanism to implement
7396security policies on Python objects.")
7397 (license license:zpl2.1)))
7398
7399(define-public python2-zope-security
7400 (let ((zope-security (package-with-python2 python-zope-security)))
7401 (package (inherit zope-security)
7402 (propagated-inputs
7403 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7404 ,@(alist-delete
7405 "python-zope-testrunner"
7406 (package-propagated-inputs zope-security)))))))
7407
7408(define-public python-zope-component
7409 (package
7410 (name "python-zope-component")
7411 (version "4.2.2")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 (uri (string-append "https://pypi.python.org/packages/source/z"
7416 "/zope.component/zope.component-" version ".tar.gz"))
7417 (sha256
7418 (base32
7419 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7420 (build-system python-build-system)
7421 (arguments
7422 ;; Skip tests due to circular dependency with python-zope-security.
7423 '(#:tests? #f))
7424 (native-inputs
7425 `(("python-zope-testing" ,python-zope-testing)))
7426 (propagated-inputs
7427 `(("python-zope-event" ,python-zope-event)
7428 ("python-zope-interface" ,python-zope-interface)
7429 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7430 ("python-zope-configuration" ,python-zope-configuration)))
7431 (home-page "https://github.com/zopefoundation/zope.component")
7432 (synopsis "Zope Component Architecture")
7433 (description "Zope.component represents the core of the Zope Component
7434Architecture. Together with the zope.interface package, it provides
7435facilities for defining, registering and looking up components.")
7436 (license license:zpl2.1)))
7437
7438(define-public python2-zope-component
7439 (package-with-python2 python-zope-component))
7440
7441(define-public python-pythondialog
7442 (package
7443 (name "python-pythondialog")
7444 (version "3.4.0")
7445 (source
7446 (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "pythondialog" version))
7449 (sha256
7450 (base32
7451 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7452 (build-system python-build-system)
7453 (arguments
7454 `(#:phases
7455 (modify-phases %standard-phases
7456 (add-after 'unpack 'patch-path
7457 (lambda* (#:key inputs #:allow-other-keys)
7458 (let* ((dialog (assoc-ref inputs "dialog")))
7459 ;; Since this library really wants to grovel the search path, we
7460 ;; must hardcode dialog's store path into it.
7461 (substitute* "dialog.py"
7462 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7463 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7464 #t))))
7465 #:tests? #f)) ; no test suite
7466 (propagated-inputs
7467 `(("dialog" ,dialog)))
7468 (home-page "http://pythondialog.sourceforge.net/")
7469 (synopsis "Python interface to the UNIX dialog utility")
7470 (description "A Python wrapper for the dialog utility. Its purpose is to
7471provide an easy to use, pythonic and comprehensive Python interface to dialog.
7472This allows one to make simple text-mode user interfaces on Unix-like systems")
7473 (license license:lgpl2.1)
7474 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7475
7476(define-public python2-pythondialog
7477 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7478 (package
7479 (inherit base)
7480 (version (package-version python-pythondialog))
7481 (source (origin
7482 (method url-fetch)
7483 (uri (pypi-uri "python2-pythondialog" version))
7484 (sha256
7485 (base32
7486 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7487
7488(define-public python-pyrfc3339
7489 (package
7490 (name "python-pyrfc3339")
7491 (version "1.0")
7492 (source
7493 (origin
7494 (method url-fetch)
7495 (uri (pypi-uri "pyRFC3339" version))
7496 (sha256
7497 (base32
7498 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7499 (build-system python-build-system)
7500 (propagated-inputs
7501 `(("python-pytz" ,python-pytz)))
7502 (native-inputs
7503 `(("python-nose" ,python-nose)))
7504 (home-page "https://github.com/kurtraschke/pyRFC3339")
7505 (synopsis "Python timestamp library")
7506 (description "Python library for generating and parsing RFC 3339-compliant
7507timestamps.")
7508 (license license:expat)))
7509
7510(define-public python2-pyrfc3339
7511 (package-with-python2 python-pyrfc3339))
7512
7513(define-public python-werkzeug
7514 (package
7515 (name "python-werkzeug")
7516 (version "0.11.11")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "Werkzeug" version))
7521 (sha256
7522 (base32
7523 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7524 (build-system python-build-system)
7525 (native-inputs
7526 `(("python-pytest" ,python-pytest)))
7527 (home-page "http://werkzeug.pocoo.org/")
7528 (synopsis "Utilities for WSGI applications")
7529 (description "One of the most advanced WSGI utility modules. It includes a
7530powerful debugger, full-featured request and response objects, HTTP utilities to
7531handle entity tags, cache control headers, HTTP dates, cookie handling, file
7532uploads, a powerful URL routing system and a bunch of community-contributed
7533addon modules.")
7534 (license license:x11)))
7535
7536(define-public python2-werkzeug
7537 (package-with-python2 python-werkzeug))
7538
7539(define-public python-configobj
7540 (package
7541 (name "python-configobj")
7542 (version "5.0.6")
7543 (source (origin
7544 (method url-fetch)
7545 (uri (string-append
7546 "https://pypi.python.org/packages/source/c/configobj/"
7547 "configobj-" version ".tar.gz"))
7548 (sha256
7549 (base32
7550 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7551 ;; Patch setup.py so it looks for python-setuptools, which is
7552 ;; required to parse the keyword 'install_requires' in setup.py.
7553 (patches (search-patches "python-configobj-setuptools.patch"))))
7554 (build-system python-build-system)
7555 (propagated-inputs
7556 `(("python-six" ,python-six)))
7557 (synopsis "Config file reading, writing and validation")
7558 (description "ConfigObj is a simple but powerful config file reader and
7559writer: an ini file round tripper. Its main feature is that it is very easy to
7560use, with a straightforward programmer’s interface and a simple syntax for
7561config files.")
7562 (home-page "https://github.com/DiffSK/configobj")
7563 (license license:bsd-3)))
7564
7565(define-public python2-configobj
7566 (package-with-python2 python-configobj))
7567
7568(define-public python-configargparse
7569 (package
7570 (name "python-configargparse")
7571 (version "0.10.0")
7572 (source (origin
7573 (method url-fetch)
7574 (uri (string-append
7575 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7576 "ConfigArgParse-" version ".tar.gz"))
7577 (sha256
7578 (base32
7579 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7580 (build-system python-build-system)
7581 (arguments
7582 ;; FIXME: Bug in test suite filed upstream:
7583 ;; https://github.com/bw2/ConfigArgParse/issues/32
7584 '(#:tests? #f))
7585 (synopsis "Replacement for argparse")
7586 (description "A drop-in replacement for argparse that allows options to also
7587be set via config files and/or environment variables.")
7588 (home-page "https://github.com/bw2/ConfigArgParse")
7589 (license license:expat)))
7590
7591(define-public python2-configargparse
7592 (package-with-python2 python-configargparse))
7593
7594(define-public python-ndg-httpsclient
7595 (package
7596 (name "python-ndg-httpsclient")
7597 (version "0.4.0")
7598 (source (origin
7599 (method url-fetch)
7600 (uri (string-append
7601 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7602 "ndg_httpsclient-" version ".tar.gz"))
7603 (sha256
7604 (base32
7605 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7606 (build-system python-build-system)
7607 (arguments
7608 '(;; The tests appear to require networking.
7609 #:tests? #f))
7610 (propagated-inputs
7611 `(("python-pyopenssl" ,python-pyopenssl)))
7612 (synopsis "HTTPS support for Python's httplib and urllib2")
7613 (description "This is a HTTPS client implementation for httplib and urllib2
7614based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7615over the default provided with Python and importantly enables full verification
7616of the SSL peer.")
7617 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7618 (license license:bsd-3)))
7619
7620;; python2-openssl requires special care, so package-with-python2 is
7621;; insufficient.
7622(define-public python2-ndg-httpsclient
7623 (package (inherit python-ndg-httpsclient)
7624 (name "python2-ndg-httpsclient")
7625 (arguments `(#:python ,python-2))
7626 (propagated-inputs
7627 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7628
7629(define-public python-contextlib2
7630 (package
7631 (name "python-contextlib2")
7632 (version "0.4.0")
7633 (source
7634 (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "contextlib2" version))
7637 (sha256
7638 (base32
7639 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7640 (build-system python-build-system)
7641 (arguments
7642 `(#:phases
7643 (modify-phases %standard-phases
7644 (replace 'check
7645 (lambda _ (zero?
7646 (system*
7647 "python" "test_contextlib2.py" "-v")))))))
7648 (home-page "http://contextlib2.readthedocs.org/")
7649 (synopsis "Tools for decorators and context managers")
7650 (description "This module is primarily a backport of the Python
76513.2 contextlib to earlier Python versions. Like contextlib, it
7652provides utilities for common tasks involving decorators and context
7653managers. It also contains additional features that are not part of
7654the standard library.")
7655 (license license:psfl)))
7656
7657(define-public python2-contextlib2
7658 (package-with-python2 python-contextlib2))
7659
7660(define-public python-texttable
7661 (package
7662 (name "python-texttable")
7663 (version "0.8.4")
7664 (source
7665 (origin
7666 (method url-fetch)
7667 (uri (pypi-uri "texttable" version))
7668 (sha256
7669 (base32
7670 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7671 (build-system python-build-system)
7672 (arguments '(#:tests? #f)) ; no tests
7673 (home-page "https://github.com/foutaise/texttable/")
7674 (synopsis "Python module for creating simple ASCII tables")
7675 (description "Texttable is a Python module for creating simple ASCII
7676tables.")
7677 (license license:lgpl2.1+)))
7678
7679(define-public python2-texttable
7680 (package-with-python2 python-texttable))
7681
7682(define-public python-websocket-client
7683 (package
7684 (name "python-websocket-client")
7685 (version "0.37.0")
7686 (source
7687 (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "websocket_client" version))
7690 (sha256
7691 (base32
7692 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7693 (build-system python-build-system)
7694 (propagated-inputs
7695 `(("python-six" ,python-six)))
7696 (home-page "https://github.com/liris/websocket-client")
7697 (synopsis "WebSocket client for Python")
7698 (description "The Websocket-client module provides the low level APIs for
7699WebSocket usage in Python programs.")
7700 (license license:lgpl2.1+)))
7701
7702(define-public python2-websocket-client
7703 (package-with-python2 python-websocket-client))
7704
7705(define-public python-atomicwrites
7706 (package
7707 (name "python-atomicwrites")
7708 (version "1.1.0")
7709 (source (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "atomicwrites" version))
7712 (sha256
7713 (base32
7714 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7715 (build-system python-build-system)
7716 (synopsis "Atomic file writes in Python")
7717 (description "Library for atomic file writes using platform dependent tools
7718for atomic file system operations.")
7719 (home-page "https://github.com/untitaker/python-atomicwrites")
7720 (license license:expat)))
7721
7722(define-public python2-atomicwrites
7723 (package-with-python2 python-atomicwrites))
7724
7725(define-public python-requests-toolbelt
7726 (package
7727 (name "python-requests-toolbelt")
7728 (version "0.6.2")
7729 (source (origin
7730 (method url-fetch)
7731 (uri (string-append
7732 "https://pypi.python.org/packages/"
7733 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7734 "requests-toolbelt-" version ".tar.gz"))
7735 (sha256
7736 (base32
7737 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7738 (build-system python-build-system)
7739 (native-inputs
7740 `(("python-betamax" ,python-betamax)
7741 ("python-mock" ,python-mock)
7742 ("python-pytest" ,python-pytest)))
7743 (propagated-inputs
7744 `(("python-requests" ,python-requests)))
7745 (synopsis "Extensions to python-requests")
7746 (description "This is a toolbelt of useful classes and functions to be used
7747with python-requests.")
7748 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7749 (license license:asl2.0)))
7750
7751(define-public python-click-threading
7752 (package
7753 (name "python-click-threading")
7754 (version "0.2.0")
7755 (source (origin
7756 (method url-fetch)
7757 (uri (string-append
7758 "https://pypi.python.org/packages/"
7759 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7760 "click-threading-" version ".tar.gz"))
7761 (sha256
7762 (base32
7763 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7764 (build-system python-build-system)
7765 (propagated-inputs
7766 `(("python-click" ,python-click)))
7767 (synopsis "Utilities for multithreading in Click")
7768 (description "This package provides utilities for multithreading in Click
7769applications.")
7770 (home-page "https://github.com/click-contrib/click-threading")
7771 (license license:expat)))
7772
7773(define-public python-click-log
7774 (package
7775 (name "python-click-log")
7776 (version "0.1.3")
7777 (source (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "click-log" version))
7780 (sha256
7781 (base32
7782 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7783 (build-system python-build-system)
7784 (propagated-inputs
7785 `(("python-click" ,python-click)))
7786 (synopsis "Logging for click applications")
7787 (description "This package provides a Python library for logging Click
7788applications.")
7789 (home-page "https://github.com/click-contrib/click-log")
7790 (license license:expat)))
7791
7792(define-public python-apipkg
7793 (package
7794 (name "python-apipkg")
7795 (version "1.4")
7796 (source (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "apipkg" version))
7799 (sha256
7800 (base32
7801 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7802 (build-system python-build-system)
7803 (native-inputs
7804 `(("python-pytest" ,python-pytest)))
7805 (synopsis "Namespace control and lazy-import mechanism")
7806 (description "With apipkg you can control the exported namespace of a Python
7807package and greatly reduce the number of imports for your users. It is a small
7808pure Python module that works on virtually all Python versions.")
7809 (home-page "https://bitbucket.org/hpk42/apipkg")
7810 (license license:expat)))
7811
7812(define-public python2-apipkg
7813 (package-with-python2 python-apipkg))
7814
7815(define-public python-execnet
7816 (package
7817 (name "python-execnet")
7818 (version "1.4.1")
7819 (source (origin
7820 (method url-fetch)
7821 (uri (pypi-uri "execnet" version))
7822 (sha256
7823 (base32
7824 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7825 (build-system python-build-system)
7826 (arguments
7827 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7828 ;; The two test failures are caused by the lack of an `ssh` executable.
7829 ;; The test suite can be run with pytest after the 'install' phase.
7830 #:tests? #f))
7831 (native-inputs
7832 `(("python-pytest" ,python-pytest)
7833 ("python-setuptools-scm" ,python-setuptools-scm)))
7834 (propagated-inputs
7835 `(("python-apipkg" ,python-apipkg)))
7836 (synopsis "Rapid multi-Python deployment")
7837 (description "Execnet provides a share-nothing model with
7838channel-send/receive communication for distributing execution across many
7839Python interpreters across version, platform and network barriers. It has a
7840minimal and fast API targetting the following uses:
7841@enumerate
7842@item distribute tasks to (many) local or remote CPUs
7843@item write and deploy hybrid multi-process applications
7844@item write scripts to administer multiple environments
7845@end enumerate")
7846 (home-page "http://codespeak.net/execnet/")
7847 (license license:expat)))
7848
7849(define-public python2-execnet
7850 (package-with-python2 python-execnet))
7851
7852;;; The software provided by this package was integrated into pytest 2.8.
7853(define-public python-pytest-cache
7854 (package
7855 (name "python-pytest-cache")
7856 (version "1.0")
7857 (source (origin
7858 (method url-fetch)
7859 (uri (pypi-uri "pytest-cache" version))
7860 (sha256
7861 (base32
7862 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7863 (build-system python-build-system)
7864 (propagated-inputs
7865 `(("python-apipkg" ,python-apipkg)
7866 ("python-execnet" ,python-execnet)
7867 ("python-py" ,python-py)
7868 ("python-pytest" ,python-pytest)))
7869 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7870 (description "The pytest-cache plugin provides tools to rerun failures from
7871the last py.test invocation.")
7872 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7873 (license license:expat)))
7874
7875(define-public python2-pytest-cache
7876 (package-with-python2 python-pytest-cache))
7877
7878(define-public python-pytest-localserver
7879 (package
7880 (name "python-pytest-localserver")
7881 (version "0.3.5")
7882 (source (origin
7883 (method url-fetch)
7884 (uri (pypi-uri "pytest-localserver" version))
7885 (sha256
7886 (base32
7887 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7888 (build-system python-build-system)
7889 (arguments
7890 `(#:phases (modify-phases %standard-phases
7891 (replace 'check
7892 (lambda _
7893 (zero? (system* "py.test" "--genscript=runtests.py"))
7894 (zero? (system* "py.test")))))))
7895 (native-inputs
7896 `(("python-pytest" ,python-pytest)
7897 ("python-requests" ,python-requests)
7898 ("python-six" ,python-six)))
7899 (propagated-inputs
7900 `(("python-werkzeug" ,python-werkzeug)))
7901 (synopsis "Py.test plugin to test server connections locally")
7902 (description "Pytest-localserver is a plugin for the pytest testing
7903framework which enables you to test server connections locally.")
7904 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7905 (license license:expat)))
7906
7907(define-public python-wsgi-intercept
7908 (package
7909 (name "python-wsgi-intercept")
7910 (version "1.2.2")
7911 (source (origin
7912 (method url-fetch)
7913 (uri (string-append
7914 "https://pypi.python.org/packages/"
7915 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7916 "wsgi_intercept-" version ".tar.gz"))
7917 (sha256
7918 (base32
7919 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7920 (build-system python-build-system)
7921 (propagated-inputs
7922 `(("python-six" ,python-six)))
7923 (native-inputs
7924 `(("python-pytest" ,python-pytest)
7925 ("python-httplib2" ,python-httplib2)
7926 ("python-requests" ,python-requests)
7927 ("python-urllib3" ,python-urllib3)))
7928 (synopsis "Puts a WSGI application in place of a real URI for testing")
7929 (description "Wsgi_intercept installs a WSGI application in place of a real
7930URI for testing. Testing a WSGI application normally involves starting a
7931server at a local host and port, then pointing your test code to that address.
7932Instead, this library lets you intercept calls to any specific host/port
7933combination and redirect them into a WSGI application importable by your test
7934program. Thus, you can avoid spawning multiple processes or threads to test
7935your Web app.")
7936 (home-page "https://github.com/cdent/wsgi-intercept")
7937 (license license:expat)))
7938
7939(define-public python-pytest-xprocess
7940 (package
7941 (name "python-pytest-xprocess")
7942 (version "0.9.1")
7943 (source (origin
7944 (method url-fetch)
7945 (uri (pypi-uri "pytest-xprocess" version))
7946 (sha256
7947 (base32
7948 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7949 (build-system python-build-system)
7950 (propagated-inputs
7951 `(("python-pytest" ,python-pytest)
7952 ("python-pytest-cache" ,python-pytest-cache)
7953 ("python-psutil" ,python-psutil)))
7954 (synopsis "Pytest plugin to manage external processes across test runs")
7955 (description "Pytest-xprocess is an experimental py.test plugin for managing
7956processes across test runs.")
7957 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7958 (license license:expat)))
7959
7960(define-public python-icalendar
7961 (package
7962 (name "python-icalendar")
7963 (version "3.11")
7964 (source (origin
7965 (method url-fetch)
7966 (uri (pypi-uri "icalendar" version))
7967 (sha256
7968 (base32
7969 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
7970 (build-system python-build-system)
7971 (propagated-inputs
7972 `(("python-dateutil-2" ,python-dateutil-2)
7973 ("python-pytz" ,python-pytz)))
7974 (synopsis "Python library for parsing iCalendar files")
7975 (description "The icalendar package is a parser/generator of iCalendar
7976files for use with Python.")
7977 (home-page "https://github.com/collective/icalendar")
7978 (license license:bsd-2)))
7979
7980(define-public python-sphinxcontrib-newsfeed
7981 (package
7982 (name "python-sphinxcontrib-newsfeed")
7983 (version "0.1.4")
7984 (source (origin
7985 (method url-fetch)
7986 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7987 (sha256
7988 (base32
7989 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7990 (build-system python-build-system)
7991 (propagated-inputs
7992 `(("python-sphinx" ,python-sphinx)))
7993 (synopsis "News Feed extension for Sphinx")
7994 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7995Blog, News or Announcements section to a Sphinx website.")
7996 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7997 (license license:bsd-2)))
7998
7999(define-public python-args
8000 (package
8001 (name "python-args")
8002 (version "0.1.0")
8003 (source (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "args" version))
8006 (sha256
8007 (base32
8008 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8009 (build-system python-build-system)
8010 (home-page "https://github.com/kennethreitz/args")
8011 (synopsis "Command-line argument parser")
8012 (description
8013 "This library provides a Python module to parse command-line arguments.")
8014 (license license:bsd-3)))
8015
8016(define-public python2-args
8017 (package-with-python2 python-args))
8018
8019(define-public python-clint
8020 (package
8021 (name "python-clint")
8022 (version "0.5.1")
8023 (source (origin
8024 (method url-fetch)
8025 (uri (pypi-uri "clint" version))
8026 (sha256
8027 (base32
8028 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8029 (build-system python-build-system)
8030 (propagated-inputs
8031 `(("python-args" ,python-args)))
8032 (home-page "https://github.com/kennethreitz/clint")
8033 (synopsis "Command-line interface tools")
8034 (description
8035 "Clint is a Python module filled with a set of tools for developing
8036command-line applications, including tools for colored and indented
8037output, progress bar display, and pipes.")
8038 (license license:isc)))
8039
8040(define-public python2-clint
8041 (package-with-python2 python-clint))
8042
8043(define-public python-astor
8044 (package
8045 (name "python-astor")
8046 (version "0.5")
8047 (source (origin
8048 (method url-fetch)
8049 (uri (pypi-uri "astor" version))
8050 (sha256
8051 (base32
8052 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8053 (build-system python-build-system)
8054 (home-page "https://github.com/berkerpeksag/astor")
8055 (synopsis "Read and write Python ASTs")
8056 (description
8057 "Astor is designed to allow easy manipulation of Python source via the
8058Abstract Syntax Tree.")
8059 (license license:bsd-3)))
8060
8061(define-public python2-astor
8062 (package-with-python2 python-astor))
8063
8064(define-public python-rply
8065 (package
8066 (name "python-rply")
8067 (version "0.7.4")
8068 (source (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "rply" version))
8071 (sha256
8072 (base32
8073 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8074 (build-system python-build-system)
8075 (propagated-inputs
8076 `(("python-appdirs" ,python-appdirs)))
8077 (home-page "https://github.com/alex/rply")
8078 (synopsis "Parser generator for Python")
8079 (description
8080 "This package provides a pure Python based parser generator, that also
8081works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8082with a new public API, and RPython support.")
8083 (license license:bsd-3)))
8084
8085(define-public python2-rply
8086 (package-with-python2 python-rply))
8087
8088(define-public python-hy
8089 (package
8090 (name "python-hy")
8091 (version "0.11.1")
8092 (source (origin
8093 (method url-fetch)
8094 (uri (pypi-uri "hy" version))
8095 (sha256
8096 (base32
8097 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8098 (build-system python-build-system)
8099 (propagated-inputs
8100 `(("python-astor" ,python-astor)
8101 ("python-clint" ,python-clint)
8102 ("python-rply" ,python-rply)))
8103 (home-page "http://hylang.org/")
8104 (synopsis "Lisp frontend to Python")
8105 (description
8106 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8107its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8108Python at your fingertips, in Lisp form.")
8109 (license license:expat)))
8110
8111(define-public python2-hy
8112 (package-with-python2 python-hy))
8113
8114(define-public python-rauth
8115 (package
8116 (name "python-rauth")
8117 (version "0.7.2")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "rauth" version))
8122 (sha256
8123 (base32
8124 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8125 (build-system python-build-system)
8126 (arguments
8127 `(#:test-target "check"))
8128 (propagated-inputs
8129 `(("python-requests" ,python-requests)))
8130 (home-page "https://github.com/litl/rauth")
8131 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8132 (description
8133 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8134provides service wrappers for convenient connection initialization and
8135authenticated session objects providing things like keep-alive.")
8136 (license license:expat)
8137 (properties `((python2-variant . ,(delay python2-rauth))))))
8138
8139(define-public python2-rauth
8140 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8141 (package
8142 (inherit base)
8143 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8144 ,@(package-native-inputs base))))))
8145
8146(define-public python2-functools32
8147 (package
8148 (name "python2-functools32")
8149 (version "3.2.3-2")
8150 (source
8151 (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "functools32" version))
8154 (sha256
8155 (base32
8156 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8157 (build-system python-build-system)
8158 (arguments
8159 `(#:python ,python-2
8160 #:tests? #f)) ; no test target
8161 (home-page "https://github.com/MiCHiLU/python-functools32")
8162 (synopsis
8163 "Backport of the functools module from Python 3.2.3")
8164 (description
8165 "This package is a backport of the @code{functools} module from Python
81663.2.3 for use with older versions of Python and PyPy.")
8167 (license license:expat)))
8168
8169(define-public python2-futures
8170 (package
8171 (name "python2-futures")
8172 (version "3.0.3")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "futures" version))
8177 (sha256
8178 (base32
8179 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8180 (build-system python-build-system)
8181 (arguments `(#:python ,python-2))
8182 (home-page "https://github.com/agronholm/pythonfutures")
8183 (synopsis
8184 "Backport of the concurrent.futures package from Python 3.2")
8185 (description
8186 "The concurrent.futures module provides a high-level interface for
8187asynchronously executing callables. This package backports the
8188concurrent.futures package from Python 3.2")
8189 (license license:bsd-3)))
8190
8191(define-public python-promise
8192 (package
8193 (name "python-promise")
8194 (version "0.4.2")
8195 (source
8196 (origin
8197 (method url-fetch)
8198 (uri (pypi-uri "promise" version))
8199 (sha256
8200 (base32
8201 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8202 (build-system python-build-system)
8203 ;; Tests wants python-futures, which is a python2 only program, and
8204 ;; can't be found by python-promise at test time.
8205 (arguments `(#:tests? #f))
8206 (home-page "https://github.com/syrusakbary/promise")
8207 (synopsis "Promises/A+ implementation for Python")
8208 (description
8209 "Promises/A+ implementation for Python")
8210 (properties `((python2-variant . ,(delay python2-promise))))
8211 (license license:expat)))
8212
8213(define-public python2-promise
8214 (let ((promise (package-with-python2
8215 (strip-python2-variant python-promise))))
8216 (package (inherit promise)
8217 (arguments (substitute-keyword-arguments (package-arguments promise)
8218 ((#:tests? _) #t)))
8219 (native-inputs
8220 `(("python2-futures" ,python2-futures)
8221 ("python2-pytest" ,python2-pytest)
8222 ,@(package-native-inputs promise))))))
8223
8224(define-public python-urllib3
8225 (package
8226 (name "python-urllib3")
8227 (version "1.18.1")
8228 (source
8229 (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "urllib3" version))
8232 (sha256
8233 (base32
8234 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8235 (build-system python-build-system)
8236 (arguments `(#:tests? #f))
8237 (native-inputs
8238 `(;; some packages for tests
8239 ("python-nose" ,python-nose)
8240 ("python-mock" ,python-mock)
8241 ("python-tornado" ,python-tornado)))
8242 (propagated-inputs
8243 `(;; extra packages for https security
8244 ("python-certifi" ,python-certifi)
8245 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8246 ("python-pyasn1" ,python-pyasn1)
8247 ("python-pyopenssl" ,python-pyopenssl)))
8248 (home-page "https://urllib3.readthedocs.org/")
8249 (synopsis "HTTP library with thread-safe connection pooling")
8250 (description
8251 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8252can reuse the same socket connection for multiple requests, it can POST files,
8253supports url redirection and retries, and also gzip and deflate decoding.")
8254 (license license:expat)))
8255
8256(define-public python2-urllib3
8257 (package-with-python2 python-urllib3))
8258
8259(define-public python-colorama
8260 (package
8261 (name "python-colorama")
8262 (version "0.3.3")
8263 (source
8264 (origin
8265 (method url-fetch)
8266 (uri (pypi-uri "colorama" version))
8267 (sha256
8268 (base32
8269 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8270 (build-system python-build-system)
8271 (synopsis "colored terminal text rendering for Python")
8272 (description "Colorama is a Python library for rendering colored terminal
8273text.")
8274 (home-page "https://pypi.python.org/pypi/colorama")
8275 (license license:bsd-3)))
8276
8277(define-public python2-colorama
8278 (package-with-python2 python-colorama))
8279
8280(define-public python-rsa
8281 (package
8282 (name "python-rsa")
8283 (version "3.4.2")
8284 (source
8285 (origin
8286 (method url-fetch)
8287 (uri (pypi-uri "rsa" version))
8288 (sha256
8289 (base32
8290 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8291 (build-system python-build-system)
8292 (propagated-inputs
8293 `(("python-pyasn1" ,python-pyasn1)))
8294 (synopsis "Pure-Python RSA implementation")
8295 (description "Python-RSA is a pure-Python RSA implementation. It supports
8296encryption and decryption, signing and verifying signatures, and key
8297generation according to PKCS#1 version 1.5. It can be used as a Python
8298library as well as on the command line.")
8299 (home-page "http://stuvel.eu/rsa")
8300 (license license:asl2.0)))
8301
8302(define-public python2-rsa
8303 (package-with-python2 python-rsa))
8304
8305(define-public python-pluggy
8306 (package
8307 (name "python-pluggy")
8308 (version "0.3.1")
8309 (source
8310 (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "pluggy" version))
8313 (sha256
8314 (base32
8315 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8316 (build-system python-build-system)
8317 (synopsis "Plugin and hook calling mechanism for Python")
8318 (description "Pluggy is an extraction of the plugin manager as used by
8319Pytest but stripped of Pytest specific details.")
8320 (home-page "https://pypi.python.org/pypi/pluggy")
8321 (license license:expat)))
8322
8323(define-public python2-pluggy
8324 (package-with-python2 python-pluggy))
8325
8326(define-public python-tox
8327 (package
8328 (name "python-tox")
8329 (version "2.3.1")
8330 (source
8331 (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "tox" version))
8334 (sha256
8335 (base32
8336 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8337 (build-system python-build-system)
8338 (arguments
8339 ;; FIXME: Tests require pytest-timeout, which itself requires
8340 ;; pytest>=2.8.0 for installation.
8341 '(#:tests? #f))
8342 (propagated-inputs
8343 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8344 ("python-py" ,python-py)
8345 ("python-virtualenv" ,python-virtualenv)))
8346 (native-inputs
8347 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8348 ("python-pytest" ,python-pytest))) ; >= 2.3.5
8349 (home-page "http://tox.testrun.org/")
8350 (synopsis "Virtualenv-based automation of test activities")
8351 (description "Tox is a generic virtualenv management and test command line
8352tool. It can be used to check that a package installs correctly with
8353different Python versions and interpreters, or run tests in each type of
8354supported environment, or act as a frontend to continuous integration
8355servers.")
8356 (license license:expat)))
8357
8358(define-public python2-tox
8359 (package-with-python2 python-tox))
8360
8361(define-public python-jmespath
8362 (package
8363 (name "python-jmespath")
8364 (version "0.9.0")
8365 (source
8366 (origin
8367 (method url-fetch)
8368 (uri (pypi-uri "jmespath" version))
8369 (sha256
8370 (base32
8371 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8372 (build-system python-build-system)
8373 (synopsis "JSON Matching Expressions")
8374 (description "JMESPath (pronounced “james path”) is a Python library that
8375allows one to declaratively specify how to extract elements from a JSON
8376document.")
8377 (home-page "https://github.com/jmespath/jmespath.py")
8378 (license license:expat)))
8379
8380(define-public python2-jmespath
8381 (package-with-python2 python-jmespath))
8382
8383(define-public python-botocore
8384 (package
8385 (name "python-botocore")
8386 (version "1.4.62")
8387 (source
8388 (origin
8389 (method url-fetch)
8390 (uri (pypi-uri "botocore" version))
8391 (sha256
8392 (base32
8393 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8394 (build-system python-build-system)
8395 (propagated-inputs
8396 `(("python-dateutil" ,python-dateutil-2)
8397 ("python-docutils" ,python-docutils)
8398 ("python-jmespath" ,python-jmespath)))
8399 (native-inputs
8400 `(("python-mock" ,python-mock)
8401 ("python-nose" ,python-nose)
8402 ("behave" ,behave)
8403 ("python-tox" ,python-tox)
8404 ("python-wheel" ,python-wheel)))
8405 (home-page "https://github.com/boto/botocore")
8406 (synopsis "Low-level interface to AWS")
8407 (description "Botocore is a Python library that provides a low-level
8408interface to the Amazon Web Services (AWS) API.")
8409 (license license:asl2.0)))
8410
8411(define-public python2-botocore
8412 (package-with-python2 python-botocore))
8413
8414(define-public awscli
8415 (package
8416 (name "awscli")
8417 (version "1.11.5")
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri name version))
8422 (sha256
8423 (base32
8424 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8425 (build-system python-build-system)
8426 (propagated-inputs
8427 `(("python-colorama" ,python-colorama)
8428 ("python-botocore" ,python-botocore)
8429 ("python-s3transfer" ,python-s3transfer)
8430 ("python-docutils" ,python-docutils)
8431 ("python-rsa" ,python-rsa)))
8432 (native-inputs
8433 `(("python-mock" ,python-mock)
8434 ("python-nose" ,python-nose)
8435 ("python-sphinx" ,python-sphinx)
8436 ("python-tox" ,python-tox)
8437 ("python-wheel" ,python-wheel)))
8438 (home-page "http://aws.amazon.com/cli/")
8439 (synopsis "Command line client for AWS")
8440 (description "AWS CLI provides a unified command line interface to the
8441Amazon Web Services (AWS) API.")
8442 (license license:asl2.0)))
8443
8444(define-public python-hypothesis
8445 (package
8446 (name "python-hypothesis")
8447 (version "3.1.0")
8448 (source (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "hypothesis" version))
8451 (sha256
8452 (base32
8453 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8454 (build-system python-build-system)
8455 (propagated-inputs
8456 `(("python-flake8" ,python-flake8)
8457 ("python-pytest" ,python-pytest)))
8458 (synopsis "Library for property based testing")
8459 (description "Hypothesis is a library for testing your Python code against a
8460much larger range of examples than you would ever want to write by hand. It’s
8461based on the Haskell library, Quickcheck, and is designed to integrate
8462seamlessly into your existing Python unit testing work flow.")
8463 (home-page "https://github.com/DRMacIver/hypothesis")
8464 (license license:mpl2.0)
8465 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8466
8467(define-public python2-hypothesis
8468 (let ((hypothesis (package-with-python2
8469 (strip-python2-variant python-hypothesis))))
8470 (package (inherit hypothesis)
8471 (native-inputs
8472 `(("python2-enum34" ,python2-enum34))))))
8473
8474(define-public python-pytest-subtesthack
8475 (package
8476 (name "python-pytest-subtesthack")
8477 (version "0.1.1")
8478 (source (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "pytest-subtesthack" version))
8481 (sha256
8482 (base32
8483 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8484 (build-system python-build-system)
8485 (propagated-inputs
8486 `(("python-pytest" ,python-pytest)))
8487 (synopsis "Set-up and tear-down fixtures for unit tests")
8488 (description "This plugin allows you to set up and tear down fixtures within
8489unit test functions that use @code{py.test}. This is useful for using
8490@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8491function multiple times, without setting up or tearing down fixture state as is
8492normally the case.")
8493 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8494 (license license:unlicense)))
8495
8496(define-public python2-pytest-subtesthack
8497 (package-with-python2 python-pytest-subtesthack))
8498
8499(define-public python2-xdo
8500 (package
8501 (name "python2-xdo")
8502 (version "0.2")
8503 (source (origin
8504 (method url-fetch)
8505 (uri (string-append
8506 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8507 "python-xdo_" version ".orig.tar.gz"))
8508 (sha256
8509 (base32
8510 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8511 (build-system python-build-system)
8512 (arguments
8513 `(#:python ,python-2
8514 #:tests? #f)) ; no tests provided
8515 (inputs
8516 `(("xdotool" ,xdotool)
8517 ("libX11" ,libx11)))
8518 (home-page "https://tracker.debian.org/pkg/python-xdo")
8519 (synopsis "Python library for simulating X11 keyboard/mouse input")
8520 (description "Provides bindings to libxdo for manipulating X11 via simulated
8521input. (Note that this is mostly a legacy library; you may wish to look at
8522python-xdo for newer bindings.)")
8523 (license license:bsd-3)))
8524
8525(define-public python-wtforms
8526 (package
8527 (name "python-wtforms")
8528 (version "2.1")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (pypi-uri "WTForms" version ".zip"))
8533 (sha256
8534 (base32
8535 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8536 (build-system python-build-system)
8537 (arguments
8538 '(#:phases
8539 (modify-phases %standard-phases
8540 (add-after 'unpack 'remove-django-test
8541 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8542 (lambda _
8543 (substitute*
8544 "tests/runtests.py"
8545 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8546 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8547 #t)))))
8548 (native-inputs
8549 `(("unzip" ,unzip)))
8550 (home-page "http://wtforms.simplecodes.com/")
8551 (synopsis
8552 "Form validation and rendering library for Python web development")
8553 (description
8554 "WTForms is a flexible forms validation and rendering library
8555for Python web development. It is very similar to the web form API
8556available in Django, but is a standalone package.")
8557 (license license:bsd-3)))
8558
8559(define-public python2-wtforms
8560 (package-with-python2 python-wtforms))
8561
8562(define-public python-mako
8563 (package
8564 (name "python-mako")
8565 (version "1.0.3")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "Mako" version))
8570 (sha256
8571 (base32
8572 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8573 (build-system python-build-system)
8574 (propagated-inputs
8575 `(("python-markupsafe" ,python-markupsafe)))
8576 (native-inputs
8577 `(("python-mock" ,python-mock)
8578 ("python-nose" ,python-nose)))
8579 (home-page "http://www.makotemplates.org/")
8580 (synopsis "Templating language for Python")
8581 (description "Mako is a templating language for Python that compiles
8582templates into Python modules.")
8583 (license license:expat)))
8584
8585(define-public python2-mako
8586 (package-with-python2 python-mako))
8587
8588(define-public python-waitress
8589 (package
8590 (name "python-waitress")
8591 (version "0.8.10")
8592 (source
8593 (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "waitress" version))
8596 (sha256
8597 (base32
8598 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8599 (build-system python-build-system)
8600 (home-page "https://github.com/Pylons/waitress")
8601 (synopsis "Waitress WSGI server")
8602 (description "Waitress is meant to be a production-quality pure-Python WSGI
8603server with very acceptable performance.")
8604 (license license:zpl2.1)))
8605
8606(define-public python2-waitress
8607 (package-with-python2 python-waitress))
8608
8609(define-public python-wsgiproxy2
8610 (package
8611 (name "python-wsgiproxy2")
8612 (version "0.4.2")
8613 (source
8614 (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8617 (sha256
8618 (base32
8619 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8620 (build-system python-build-system)
8621 (arguments
8622 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8623 ;; support Python 3:
8624 ;; https://github.com/benoitc/restkit/issues/140
8625 #:tests? #f))
8626 (native-inputs
8627 `(("unzip" ,unzip)
8628 ("python-nose" ,python-nose)
8629 ("python-coverage" ,python-coverage)))
8630 (propagated-inputs
8631 `(("python-six" ,python-six)
8632 ("python-webob" ,python-webob)))
8633 (home-page
8634 "https://github.com/gawel/WSGIProxy2/")
8635 (synopsis "WSGI Proxy with various http client backends")
8636 (description "WSGI turns HTTP requests into WSGI function calls.
8637WSGIProxy turns WSGI function calls into HTTP requests.
8638It also includes code to sign requests and pass private data,
8639and to spawn subprocesses to handle requests.")
8640 (license license:expat)))
8641
8642(define-public python2-wsgiproxy2
8643 (package-with-python2 python-wsgiproxy2))
8644
8645(define-public python-pastedeploy
8646 (package
8647 (name "python-pastedeploy")
8648 (version "1.5.2")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "PasteDeploy" version))
8653 (sha256
8654 (base32
8655 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8656 (build-system python-build-system)
8657 (native-inputs
8658 `(("python-nose" ,python-nose)))
8659 (home-page "http://pythonpaste.org/deploy/")
8660 (synopsis
8661 "Load, configure, and compose WSGI applications and servers")
8662 (description
8663 "This tool provides code to load WSGI applications and servers from URIs;
8664these URIs can refer to Python Eggs for INI-style configuration files. Paste
8665Script provides commands to serve applications based on this configuration
8666file.")
8667 (license license:expat)))
8668
8669(define-public python2-pastedeploy
8670 (package-with-python2 python-pastedeploy))
8671
8672(define-public python-paste
8673 (package
8674 (name "python-paste")
8675 (version "2.0.2")
8676 (source
8677 (origin
8678 (method url-fetch)
8679 (uri (pypi-uri "Paste" version))
8680 (sha256
8681 (base32
8682 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8683 (patches (search-patches "python-paste-remove-website-test.patch"
8684 "python-paste-remove-timing-test.patch"))))
8685 (build-system python-build-system)
8686 (native-inputs
8687 `(("python-nose" ,python-nose)))
8688 (propagated-inputs
8689 `(("python-six" ,python-six)))
8690 (arguments
8691 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8692 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8693 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8694 ;; still... things should be better by the next Paste release.)
8695 #:tests? #f))
8696 (home-page "http://pythonpaste.org")
8697 (synopsis
8698 "Python web development tools, focusing on WSGI")
8699 (description
8700 "Paste provides a variety of web development tools and middleware which
8701can be nested together to build web applications. Paste's design closely
8702follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8703 (license license:expat)
8704 (properties `((python2-variant . ,(delay python2-paste))))))
8705
8706(define-public python2-paste
8707 (let ((paste (package-with-python2
8708 (strip-python2-variant python-paste))))
8709 (package
8710 (inherit paste)
8711 (arguments
8712 ;; Tests are back for Python 2!
8713 `(#:tests? #t
8714 ,@(package-arguments paste))))))
8715
8716(define-public python-pastescript
8717 (package
8718 (name "python-pastescript")
8719 (version "2.0.2")
8720 (source
8721 (origin
8722 (method url-fetch)
8723 (uri (pypi-uri "PasteScript" version))
8724 (sha256
8725 (base32
8726 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8727 (build-system python-build-system)
8728 (native-inputs
8729 `(("python-nose" ,python-nose)))
8730 (propagated-inputs
8731 `(("python-paste" ,python-paste)
8732 ("python-pastedeploy" ,python-pastedeploy)))
8733 (home-page "http://pythonpaste.org/script/")
8734 (arguments
8735 '(;; Unfortunately, this requires the latest unittest2,
8736 ;; but that requires traceback2 which requires linecache2 which requires
8737 ;; unittest2. So we're skipping tests for now.
8738 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8739 ;; so in theory we could get around this situation somehow.)
8740 #:tests? #f))
8741 (synopsis
8742 "Pluggable command line tool for serving web applications and more")
8743 (description
8744 "PasteScript is a plugin-friendly command line tool which provides a
8745variety of features, from launching web applications to bootstrapping project
8746layouts.")
8747 (license license:expat)))
8748
8749(define-public python2-pastescript
8750 (package-with-python2 python-pastescript))
8751
8752(define-public python-pyquery
8753 (package
8754 (name "python-pyquery")
8755 (version "1.2.13")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "pyquery" version))
8760 (sha256
8761 (base32
8762 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8763 (build-system python-build-system)
8764 (native-inputs
8765 `(("python-webob" ,python-webob)
8766 ("python-webtest" ,python-webtest)))
8767 (propagated-inputs
8768 `(("python-lxml" ,python-lxml)
8769 ("python-cssselect" ,python-cssselect)))
8770 (home-page "https://github.com/gawel/pyquery")
8771 (synopsis "Make jQuery-like queries on xml documents")
8772 (description "pyquery allows you to make jQuery queries on xml documents.
8773The API is as much as possible the similar to jQuery. pyquery uses lxml for
8774fast xml and html manipulation.")
8775 (license license:bsd-3)))
8776
8777(define-public python2-pyquery
8778 (package-with-python2 python-pyquery))
8779
8780(define-public python-webtest
8781 (package
8782 (name "python-webtest")
8783 (version "2.0.20")
8784 (source
8785 (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "WebTest" version))
8788 (sha256
8789 (base32
8790 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8791 (build-system python-build-system)
8792 (arguments
8793 `(;; Unfortunately we have to disable tests!
8794 ;; This release of WebTest is pinned to python-nose < 1.3,
8795 ;; but older versions of python-nose are plagued with the following
8796 ;; bug(s), which rears its ugly head during test execution:
8797 ;; https://github.com/nose-devs/nose/issues/759
8798 ;; https://github.com/nose-devs/nose/pull/811
8799 #:tests? #f))
8800 ;; Commented out code is no good, but in this case, once tests
8801 ;; are ready to be enabled again, we should put the following
8802 ;; in place:
8803 ;; (native-inputs
8804 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8805 ;; ; but see above comment
8806 ;; ("python-coverage" ,python-coverage)
8807 ;; ("python-mock" ,python-mock)
8808 ;; ("python-pastedeploy" ,python-pastedeploy)
8809 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8810 ;; ("python-pyquery" ,python-pyquery)))
8811 (propagated-inputs
8812 `(("python-waitress" ,python-waitress)
8813 ("python-webob" ,python-webob)
8814 ("python-six" ,python-six)
8815 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8816 (home-page "http://webtest.pythonpaste.org/")
8817 (synopsis "Helper to test WSGI applications")
8818 (description "Webtest allows you to test your Python web applications
8819without starting an HTTP server. It supports anything that supports the
8820minimum of WSGI.")
8821 (license license:expat)))
8822
8823(define-public python2-webtest
8824 (package-with-python2 python-webtest))
8825
8826(define-public python-anyjson
8827 (package
8828 (name "python-anyjson")
8829 (version "0.3.3")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "anyjson" version))
8834 (sha256
8835 (base32
8836 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8837 (build-system python-build-system)
8838 (arguments
8839 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8840 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8841 ;; whatever) so this transformation needs to be done before the tests
8842 ;; can be run. Maybe we could add a build step to transform beforehand
8843 ;; but it could be annoying/difficult.
8844 ;; We can enable tests for the Python 2 version, though, and do below.
8845 #:tests? #f))
8846 (home-page "http://bitbucket.org/runeh/anyjson/")
8847 (synopsis
8848 "Wraps best available JSON implementation in a common interface")
8849 (description
8850 "Anyjson loads whichever is the fastest JSON module installed
8851and provides a uniform API regardless of which JSON implementation is used.")
8852 (license license:bsd-3)
8853 (properties `((python2-variant . ,(delay python2-anyjson))))))
8854
8855(define-public python2-anyjson
8856 (let ((anyjson (package-with-python2
8857 (strip-python2-variant python-anyjson))))
8858 (package
8859 (inherit anyjson)
8860 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8861 #:tests? #t
8862 ,@(package-arguments anyjson)))
8863 (native-inputs `(("python2-nose" ,python2-nose))))))
8864
8865(define-public python-amqp
8866 (package
8867 (name "python-amqp")
8868 (version "1.4.9")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "amqp" version))
8873 (sha256
8874 (base32
8875 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8876 (build-system python-build-system)
8877 (native-inputs
8878 `(("python-nose" ,python-nose)
8879 ("python-mock" ,python-mock)))
8880 (home-page "http://github.com/celery/py-amqp")
8881 (synopsis
8882 "Low-level AMQP client for Python (fork of amqplib)")
8883 (description
8884 "This is a fork of amqplib which was originally written by Barry Pederson.
8885It is maintained by the Celery project, and used by kombu as a pure python
8886alternative when librabbitmq is not available.")
8887 (license license:lgpl2.1+)
8888 (properties `((python2-variant . ,(delay python2-amqp))))))
8889
8890(define-public python2-amqp
8891 (let ((amqp (package-with-python2
8892 (strip-python2-variant python-amqp))))
8893 (package
8894 (inherit amqp)
8895 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8896 ;; unmaintained. Weirdly, does not do this on the python 3
8897 ;; version?
8898 #:tests? #f
8899 ,@(package-arguments amqp))))))
8900
8901(define-public python-kombu
8902 (package
8903 (name "python-kombu")
8904 (version "3.0.37")
8905 (source
8906 (origin
8907 (method url-fetch)
8908 (uri (pypi-uri "kombu" version))
8909 (sha256
8910 (base32
8911 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8912 (build-system python-build-system)
8913 (native-inputs
8914 `(("python-mock" ,python-mock)
8915 ("python-nose" ,python-nose)))
8916 (propagated-inputs
8917 `(("python-anyjson" ,python-anyjson)
8918 ("python-amqp" ,python-amqp)
8919 ("python-redis" ,python-redis)))
8920 (home-page "http://kombu.readthedocs.org")
8921 (synopsis "Message passing library for Python")
8922 (description "The aim of Kombu is to make messaging in Python as easy as
8923possible by providing an idiomatic high-level interface for the AMQ protocol,
8924and also provide proven and tested solutions to common messaging problems.
8925AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8926message orientation, queuing, routing, reliability and security, for which the
8927RabbitMQ messaging server is the most popular implementation.")
8928 (license license:bsd-3)
8929 (properties `((python2-variant . ,(delay python2-kombu))))))
8930
8931(define-public python2-kombu
8932 (let ((kombu (package-with-python2
8933 (strip-python2-variant python-kombu))))
8934 (package
8935 (inherit kombu)
8936 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8937 ,@(package-native-inputs kombu))))))
8938
8939(define-public python-billiard
8940 (package
8941 (name "python-billiard")
8942 (version "3.3.0.23")
8943 (source
8944 (origin
8945 (method url-fetch)
8946 (uri (pypi-uri "billiard" version))
8947 (sha256
8948 (base32
8949 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8950 (build-system python-build-system)
8951 (native-inputs
8952 `(("python-nose" ,python-nose)))
8953 (home-page "http://github.com/celery/billiard")
8954 (synopsis
8955 "Python multiprocessing fork with improvements and bugfixes")
8956 (description
8957 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8958multiprocessing package itself is a renamed and updated version of R Oudkerk's
8959pyprocessing package. This standalone variant is intended to be compatible with
8960Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8961 (license license:bsd-3)
8962 (properties `((python2-variant . ,(delay python2-billiard))))))
8963
8964(define-public python2-billiard
8965 (let ((billiard (package-with-python2
8966 (strip-python2-variant python-billiard))))
8967 (package
8968 (inherit billiard)
8969 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8970 ("python2-mock" ,python2-mock)
8971 ,@(package-native-inputs billiard))))))
8972
8973(define-public python-celery
8974 (package
8975 (name "python-celery")
8976 (version "3.1.24")
8977 (source
8978 (origin
8979 (method url-fetch)
8980 (uri (pypi-uri "celery" version))
8981 (sha256
8982 (base32
8983 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8984 (build-system python-build-system)
8985 (arguments
8986 `(#:phases
8987 (modify-phases %standard-phases
8988 ;; These tests break with Python 3.5:
8989 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8990 (replace 'check
8991 (lambda _
8992 (zero?
8993 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8994 (native-inputs
8995 `(("python-nose" ,python-nose)))
8996 (propagated-inputs
8997 `(("python-pytz" ,python-pytz)
8998 ("python-billiard" ,python-billiard)
8999 ("python-kombu" ,python-kombu)))
9000 (home-page "http://celeryproject.org")
9001 (synopsis "Distributed Task Queue")
9002 (description "Celery is an asynchronous task queue/job queue based on
9003distributed message passing. It is focused on real-time operation, but
9004supports scheduling as well. The execution units, called tasks, are executed
9005concurrently on a single or more worker servers using multiprocessing,
9006Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9007synchronously (wait until ready).")
9008 (license license:bsd-3)
9009 (properties `((python2-variant . ,(delay python2-celery))))))
9010
9011(define-public python2-celery
9012 (let ((celery (package-with-python2
9013 (strip-python2-variant python-celery))))
9014 (package
9015 (inherit celery)
9016 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9017 ("python2-mock" ,python2-mock)
9018 ,@(package-native-inputs celery))))))
9019
9020(define-public python-translitcodec
9021 (package
9022 (name "python-translitcodec")
9023 (version "0.4.0")
9024 (source
9025 (origin
9026 (method url-fetch)
9027 (uri (pypi-uri "translitcodec" version))
9028 (sha256
9029 (base32
9030 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9031 (build-system python-build-system)
9032 (arguments
9033 `(#:tests? #f)) ; no tests provided
9034 (home-page
9035 "https://github.com/claudep/translitcodec")
9036 (synopsis
9037 "Unicode to 8-bit charset transliteration codec")
9038 (description
9039 "This package contains codecs for transliterating ISO 10646 texts into
9040best-effort representations using smaller coded character sets (ASCII,
9041ISO 8859, etc.).")
9042 (license license:expat)))
9043
9044(define-public python2-translitcodec
9045 (package-with-python2 python-translitcodec))
9046
9047(define-public python-editor
9048 (package
9049 (name "python-editor")
9050 (version "0.5")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "python-editor" version))
9055 (sha256
9056 (base32
9057 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9058 (build-system python-build-system)
9059 (home-page
9060 "https://github.com/fmoo/python-editor")
9061 (synopsis
9062 "Programmatically open an editor, capture the result")
9063 (description
9064 "python-editor is a library that provides the editor module for
9065programmatically interfacing with your system's $EDITOR.")
9066 (license license:asl2.0)))
9067
9068(define-public python2-editor
9069 (package-with-python2 python-editor))
9070
9071(define-public python-sphinxcontrib-programoutput
9072 (package
9073 (name "python-sphinxcontrib-programoutput")
9074 (version "0.8")
9075 (source (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9078 (sha256
9079 (base32
9080 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9081 (build-system python-build-system)
9082 (propagated-inputs
9083 `(("python-sphinx" ,python-sphinx)))
9084 (synopsis "Sphinx extension to include program output")
9085 (description "A Sphinx extension to literally insert the output of arbitrary
9086commands into documents, helping you to keep your command examples up to date.")
9087 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
9088 (license license:bsd-2)))
9089
9090(define-public python2-sphinxcontrib-programoutput
9091 (package-with-python2 python-sphinxcontrib-programoutput))
9092
9093(define-public python-sphinx-repoze-autointerface
9094 (package
9095 (name "python-sphinx-repoze-autointerface")
9096 (version "0.8")
9097 (source (origin
9098 (method url-fetch)
9099 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9100 (sha256
9101 (base32
9102 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
9103 (build-system python-build-system)
9104 (propagated-inputs
9105 `(("python-sphinx" ,python-sphinx)
9106 ("python-zope-interface" ,python-zope-interface)))
9107 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9108 (description "This package defines an extension for the Sphinx documentation
9109system. The extension allows generation of API documentation by
9110introspection of @code{zope.interface} instances in code.")
9111 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
9112 (license license:repoze)))
9113
9114(define-public python2-sphinx-repoze-autointerface
9115 (package-with-python2 python-sphinx-repoze-autointerface))
9116
9117(define-public python-psycopg2
9118 (package
9119 (name "python-psycopg2")
9120 (version "2.6.1")
9121 (source
9122 (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "psycopg2" version))
9125 (sha256
9126 (base32
9127 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9128 (build-system python-build-system)
9129 (arguments
9130 ;; Tests would require a postgresql database "psycopg2_test"
9131 ;; and a running postgresql database management service.
9132 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9133 (inputs
9134 `(("postgresql" ,postgresql))) ; libpq
9135 (home-page "http://initd.org/psycopg/")
9136 (synopsis "Python PostgreSQL adapter")
9137 (description
9138 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
9139 (license license:lgpl3+)))
9140
9141(define-public python2-psycopg2
9142 (package-with-python2 python-psycopg2))
9143
9144(define-public python-vobject
9145 (package
9146 (name "python-vobject")
9147 (version "0.9.2")
9148 (source (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "vobject" version))
9151 (sha256
9152 (base32
9153 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9154 (build-system python-build-system)
9155 (arguments
9156 '(;; The test suite relies on some non-portable Windows interfaces.
9157 #:tests? #f))
9158 (propagated-inputs
9159 `(("python-dateutil-2" ,python-dateutil-2)
9160 ("python-pyicu" ,python-pyicu)))
9161 (synopsis "Parse and generate vCard and vCalendar files")
9162 (description "Vobject is intended to be a full featured Python package for
9163parsing and generating vCard and vCalendar files. Currently, iCalendar files
9164are supported and well tested. vCard 3.0 files are supported, and all data
9165should be imported, but only a few components are understood in a sophisticated
9166way.")
9167 (home-page "http://eventable.github.io/vobject/")
9168 (license license:asl2.0)))
9169
9170(define-public python2-vobject
9171 (package-with-python2 python-vobject))
9172
9173(define-public python-munkres
9174 (package
9175 (name "python-munkres")
9176 (version "1.0.8")
9177 (source (origin
9178 (method url-fetch)
9179 (uri (pypi-uri "munkres" version))
9180 (sha256
9181 (base32
9182 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9183 (build-system python-build-system)
9184 (arguments
9185 '(#:tests? #f)) ; no test suite
9186 (home-page "http://software.clapper.org/munkres/")
9187 (synopsis "Implementation of the Munkres algorithm")
9188 (description "The Munkres module provides an implementation of the Munkres
9189algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9190useful for solving the Assignment Problem.")
9191 (license license:bsd-3)))
9192
9193(define-public python2-munkres
9194 (package-with-python2 python-munkres))
9195
9196(define-public python-flask
9197 (package
9198 (name "python-flask")
9199 (version "0.11.1")
9200 (source (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "Flask" version))
9203 (sha256
9204 (base32
9205 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
9206 (build-system python-build-system)
9207 (propagated-inputs
9208 `(("python-itsdangerous" ,python-itsdangerous)
9209 ("python-jinja2" ,python-jinja2)
9210 ("python-click" ,python-click)
9211 ("python-werkzeug" ,python-werkzeug)))
9212 (home-page "https://github.com/mitsuhiko/flask/")
9213 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9214 (description "Flask is a micro web framework based on the Werkzeug toolkit
9215and Jinja2 template engine. It is called a micro framework because it does not
9216presume or force a developer to use a particular tool or library.")
9217 (license license:bsd-3)))
9218
9219(define-public python2-flask
9220 (package-with-python2 python-flask))
9221
9222(define-public python-cookies
9223 (package
9224 (name "python-cookies")
9225 (version "2.2.1")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (pypi-uri "cookies" version))
9229 (sha256
9230 (base32
9231 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9232 (build-system python-build-system)
9233 (arguments
9234 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9235 #:tests? #f))
9236 (native-inputs
9237 `(("python-pytest" ,python2-pytest)))
9238 (synopsis "HTTP cookie parser and renderer")
9239 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9240Python.")
9241 (home-page "https://gitlab.com/sashahart/cookies")
9242 (license license:expat)))
9243
9244(define-public python2-cookies
9245 (package-with-python2 python-cookies))
9246
9247(define-public python-responses
9248 (package
9249 (name "python-responses")
9250 (version "0.5.1")
9251 (source (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "responses" version))
9254 (sha256
9255 (base32
9256 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9257 (build-system python-build-system)
9258 (arguments
9259 `(;; Test suite is not distributed:
9260 ;; https://github.com/getsentry/responses/issues/38
9261 #:tests? #f))
9262 (native-inputs
9263 `(("python-mock" ,python-mock)))
9264 (propagated-inputs
9265 `(("python-requests" ,python-requests)
9266 ("python-cookies" ,python-cookies)
9267 ("python-six" ,python-six)))
9268 (home-page "https://github.com/getsentry/responses")
9269 (synopsis "Utility for mocking out the `requests` Python library")
9270 (description "A utility library for mocking out the `requests` Python
9271library.")
9272 (license license:asl2.0)))
9273
9274(define-public python2-responses
9275 (package-with-python2 python-responses))
9276
9277(define-public python-whoosh
9278 (package
9279 (name "python-whoosh")
9280 (version "2.7.4")
9281 (source
9282 (origin
9283 (method url-fetch)
9284 (uri (pypi-uri "Whoosh" version))
9285 (sha256
9286 (base32
9287 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9288 (build-system python-build-system)
9289 (native-inputs
9290 `(("python-pytest" ,python-pytest)))
9291 (home-page "http://bitbucket.org/mchaput/whoosh")
9292 (synopsis "Full text indexing, search, and spell checking library")
9293 (description
9294 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9295checking library.")
9296 (license license:bsd-2)))
9297
9298(define-public python2-whoosh
9299 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9300 (package (inherit whoosh)
9301 (propagated-inputs
9302 `(("python2-backport-ssl-match-hostname"
9303 ,python2-backport-ssl-match-hostname)
9304 ,@(package-propagated-inputs whoosh))))))
9305
9306(define-public python-pathlib
9307 (package
9308 (name "python-pathlib")
9309 (version "1.0.1")
9310 (source (origin
9311 (method url-fetch)
9312 (uri (pypi-uri "pathlib" version))
9313 (sha256
9314 (base32
9315 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9316 (build-system python-build-system)
9317 ;; The tests depend on the internal "test" module, which does not provide
9318 ;; a stable interface.
9319 (arguments `(#:tests? #f))
9320 (home-page "https://pathlib.readthedocs.org/")
9321 (synopsis "Object-oriented file system paths")
9322 (description "Pathlib offers a set of classes to handle file system paths.
9323It offers the following advantages over using string objects:
9324
9325@enumerate
9326@item No more cumbersome use of os and os.path functions. Everything can
9327be done easily through operators, attribute accesses, and method calls.
9328@item Embodies the semantics of different path types. For example,
9329comparing Windows paths ignores casing.
9330@item Well-defined semantics, eliminating any inconsistencies or
9331ambiguities (forward vs. backward slashes, etc.).
9332@end enumerate
9333
9334Note: In Python 3.4, pathlib is now part of the standard library. For other
9335Python versions please consider python-pathlib2 instead, which tracks the
9336standard library module. This module (python-pathlib) isn't maintained
9337anymore.")
9338 (license license:expat)))
9339
9340(define-public python2-pathlib
9341 (package-with-python2 python-pathlib))
9342
9343(define-public python2-pathlib2
9344 (package
9345 (name "python2-pathlib2")
9346 (version "2.1.0")
9347 (source (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "pathlib2" version))
9350 (sha256
9351 (base32
9352 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9353 (build-system python-build-system)
9354 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9355 ;; version is 3.4 which already includes this package as part of the
9356 ;; standard library.
9357 (arguments
9358 `(#:python ,python-2))
9359 (native-inputs
9360 `(("python2-six" ,python2-six)))
9361 (home-page "http://pypi.python.org/pypi/pathlib2/")
9362 (synopsis "Object-oriented file system paths - backport of standard
9363pathlib module")
9364 (description "The goal of pathlib2 is to provide a backport of standard
9365pathlib module which tracks the standard library module, so all the newest
9366features of the standard pathlib can be used also on older Python versions.
9367
9368Pathlib offers a set of classes to handle file system paths. It offers the
9369following advantages over using string objects:
9370
9371@enumerate
9372@item No more cumbersome use of os and os.path functions. Everything can
9373be done easily through operators, attribute accesses, and method calls.
9374@item Embodies the semantics of different path types. For example,
9375comparing Windows paths ignores casing.
9376@item Well-defined semantics, eliminating any inconsistencies or
9377ambiguities (forward vs. backward slashes, etc.).
9378@end enumerate")
9379 (license license:expat)))
9380
9381(define-public python-jellyfish
9382 (package
9383 (name "python-jellyfish")
9384 (version "0.5.6")
9385 (source (origin
9386 (method url-fetch)
9387 (uri (pypi-uri "jellyfish" version))
9388 (sha256
9389 (base32
9390 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9391 (build-system python-build-system)
9392 (native-inputs
9393 `(("python-pytest" ,python-pytest)))
9394 (home-page "https://github.com/jamesturk/jellyfish")
9395 (synopsis "Approximate and phonetic matching of strings")
9396 (description "Jellyfish uses a variety of string comparison and phonetic
9397encoding algorithms to do fuzzy string matching.")
9398 (license license:bsd-2)
9399 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9400
9401(define-public python2-jellyfish
9402 (let ((jellyfish (package-with-python2
9403 (strip-python2-variant python-jellyfish))))
9404 (package (inherit jellyfish)
9405 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9406 ,@(package-native-inputs jellyfish))))))
9407
9408(define-public python2-unicodecsv
9409 (package
9410 (name "python2-unicodecsv")
9411 (version "0.14.1")
9412 (source (origin
9413 (method url-fetch)
9414 ;; The test suite is not included in the PyPi release.
9415 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9416 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9417 "archive/" version ".tar.gz"))
9418 (file-name (string-append name "-" version ".tar.gz"))
9419 (sha256
9420 (base32
9421 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9422 (build-system python-build-system)
9423 (arguments
9424 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9425 #:python ,python-2))
9426 (native-inputs
9427 `(("python2-unittest2" ,python2-unittest2)))
9428 (home-page "https://github.com/jdunck/python-unicodecsv")
9429 (synopsis "Unicode CSV module for Python 2")
9430 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9431module, adding support for Unicode strings.")
9432 (license license:bsd-2)))
9433
9434(define-public python-rarfile
9435 (package
9436 (name "python-rarfile")
9437 (version "2.8")
9438 (source (origin
9439 (method url-fetch)
9440 (uri (pypi-uri "rarfile" version))
9441 (sha256
9442 (base32
9443 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9444 (build-system python-build-system)
9445 (arguments
9446 '(#:phases
9447 (modify-phases %standard-phases
9448 (replace 'check
9449 ;; Many tests fail, but the installation proceeds.
9450 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9451 (native-inputs
9452 `(("which" ,which))) ; required for tests
9453 (propagated-inputs
9454 `(("libarchive" ,libarchive)))
9455 (home-page "https://github.com/markokr/rarfile")
9456 (synopsis "RAR archive reader for Python")
9457 (description "This is Python module for RAR archive reading. The interface
9458is made as zipfile like as possible.")
9459 (license license:isc)))
9460
9461(define-public python2-rarfile
9462 (package-with-python2 python-rarfile))
9463
9464(define-public python-magic
9465 (package
9466 (name "python-magic")
9467 (version "0.4.3")
9468 (source
9469 (origin
9470 (method url-fetch)
9471 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9472 version ".tar.gz"))
9473 (sha256
9474 (base32
9475 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9476 (file-name (string-append name "-" version "-checkout"))))
9477 (build-system python-build-system)
9478 (arguments
9479 ;; The tests are unreliable, so don't run them. The tests fail
9480 ;; under Python3 because they were written for Python2 and
9481 ;; contain import statements that do not work in Python3. One of
9482 ;; the tests fails under Python2 because its assertions are
9483 ;; overly stringent; it relies on comparing output strings which
9484 ;; are brittle and can change depending on the version of
9485 ;; libmagic being used and the system on which the test is
9486 ;; running. In my case, under GuixSD 0.10.0, only one test
9487 ;; failed, and it seems to have failed only because the version
9488 ;; of libmagic that is packaged in Guix outputs a slightly
9489 ;; different (but not wrong) string than the one that the test
9490 ;; expected.
9491 '(#:tests? #f
9492 #:phases (modify-phases %standard-phases
9493 ;; Replace a specific method call with a hard-coded
9494 ;; path to the necessary libmagic.so file in the
9495 ;; store. If we don't do this, then the method call
9496 ;; will fail to find the libmagic.so file, which in
9497 ;; turn will cause any application using
9498 ;; python-magic to fail.
9499 (add-before 'build 'hard-code-path-to-libmagic
9500 (lambda* (#:key inputs #:allow-other-keys)
9501 (let ((file (assoc-ref inputs "file")))
9502 (substitute* "magic.py"
9503 (("ctypes.util.find_library\\('magic'\\)")
9504 (string-append "'" file "/lib/libmagic.so'")))
9505 #t)))
9506 (add-before 'install 'disable-egg-compression
9507 (lambda _
9508 (let ((port (open-file "setup.cfg" "a")))
9509 (display "\n[easy_install]\nzip_ok = 0\n"
9510 port)
9511 (close-port port)
9512 #t))))))
9513 (inputs
9514 ;; python-magic needs to be able to find libmagic.so.
9515 `(("file" ,file)))
9516 (home-page "https://github.com/ahupp/python-magic")
9517 (synopsis "File type identification using libmagic")
9518 (description
9519 "This module uses ctypes to access the libmagic file type
9520identification library. It makes use of the local magic database and
9521supports both textual and MIME-type output. Note that this module and
9522the python-file module both provide a \"magic.py\" file; these two
9523modules, which are different and were developed separately, both serve
9524the same purpose: to provide Python bindings for libmagic.")
9525 (license license:expat)))
9526
9527(define-public python2-magic
9528 (package-with-python2 python-magic))
9529
9530(define-public python2-s3cmd
9531 (package
9532 (name "python2-s3cmd")
9533 (version "1.6.1")
9534 (source
9535 (origin
9536 (method url-fetch)
9537 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9538 "s3cmd-" version ".tar.gz"))
9539 (sha256
9540 (base32
9541 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9542 (build-system python-build-system)
9543 (arguments
9544 ;; s3cmd is written for python2 only and contains no tests.
9545 `(#:python ,python-2
9546 #:tests? #f))
9547 (propagated-inputs
9548 `(("python2-dateutil" ,python2-dateutil)
9549 ;; The python-file package also provides a magic.py module.
9550 ;; This is an unfortunate state of affairs; however, s3cmd
9551 ;; fails to install if it cannot find specifically the
9552 ;; python-magic package. Thus we include it, instead of using
9553 ;; python-file. Ironically, s3cmd sometimes works better
9554 ;; without libmagic bindings at all:
9555 ;; https://github.com/s3tools/s3cmd/issues/198
9556 ("python2-magic" ,python2-magic)))
9557 (home-page "http://s3tools.org/s3cmd")
9558 (synopsis "Command line tool for S3-compatible storage services")
9559 (description
9560 "S3cmd is a command line tool for uploading, retrieving and managing data
9561in storage services that are compatible with the Amazon Simple Storage
9562Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9563GnuPG encryption, and more. It also supports management of Amazon's
9564CloudFront content delivery network.")
9565 (license license:gpl2+)))
9566
9567(define-public python-pkgconfig
9568 (package
9569 (name "python-pkgconfig")
9570 (version "1.1.0")
9571 (source
9572 (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "pkgconfig" version))
9575 (sha256
9576 (base32
9577 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9578 (build-system python-build-system)
9579 (native-inputs
9580 `(("python-nose" ,python-nose)))
9581 (inputs
9582 `(("pkg-config" ,pkg-config)))
9583 (arguments
9584 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9585 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9586 #:tests? #f
9587 ;; Hard-code the path to pkg-config.
9588 #:phases
9589 (modify-phases %standard-phases
9590 (add-before
9591 'build 'patch
9592 (lambda _
9593 (substitute* "pkgconfig/pkgconfig.py"
9594 (("cmd = 'pkg-config")
9595 (string-append "cmd = '" (which "pkg-config"))))
9596 #t)))))
9597 (home-page "http://github.com/matze/pkgconfig")
9598 (synopsis "Python interface for pkg-config")
9599 (description "This module provides a Python interface to pkg-config. It
9600can be used to find all pkg-config packages, check if a package exists,
9601check if a package meets certain version requirements, query CFLAGS and
9602LDFLAGS and parse the output to build extensions with setup.py.")
9603 (license license:expat)))
9604
9605(define-public python2-pkgconfig
9606 (package-with-python2 python-pkgconfig))
9607
9608(define-public python-bz2file
9609 (package
9610 (name "python-bz2file")
9611 (version "0.98")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "bz2file" version))
9616 (sha256
9617 (base32
9618 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9619 (build-system python-build-system)
9620 (arguments
9621 `(#:tests? #f)) ; Tests use deprecated python modules.
9622 (home-page "https://github.com/nvawda/bz2file")
9623 (synopsis "Read and write bzip2-compressed files")
9624 (description
9625 "Bz2file is a Python library for reading and writing bzip2-compressed
9626files. It contains a drop-in replacement for the I/O interface in the
9627standard library's @code{bz2} module, including features from the latest
9628development version of CPython that are not available in older releases.")
9629 (license license:asl2.0)
9630 (properties `((python2-variant . ,(delay python2-bz2file))))))
9631
9632(define-public python2-bz2file
9633 (let ((base (package-with-python2
9634 (strip-python2-variant python-bz2file))))
9635 (package
9636 (inherit base)
9637 (arguments
9638 `(#:python ,python-2
9639 #:phases
9640 (modify-phases %standard-phases
9641 ;; 'python setup.py test' does not work as of 0.98.
9642 ;; There is only the one test file, so we run it directly.
9643 (replace 'check
9644 (lambda _ (zero? (system* "python"
9645 "test_bz2file.py"))))))))))
9646
9647(define-public python-future
9648 (package
9649 (name "python-future")
9650 (version "0.15.2")
9651 (source
9652 (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "future" version))
9655 (sha256
9656 (base32
9657 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9658 (build-system python-build-system)
9659 ;; Many tests connect to the network or are otherwise flawed.
9660 ;; https://github.com/PythonCharmers/python-future/issues/210
9661 (arguments
9662 `(#:tests? #f))
9663 (home-page "http://python-future.org")
9664 (synopsis "Single-source support for Python 3 and 2")
9665 (description
9666 "@code{python-future} is the missing compatibility layer between Python 2 and
9667Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9668to support both Python 2 and Python 3 with minimal overhead.")
9669 (license license:expat)))
9670
9671(define-public python2-future
9672 (package-with-python2 python-future))
9673
9674(define-public python-cysignals
9675 (package
9676 (name "python-cysignals")
9677 (version "1.1.0")
9678 (source
9679 (origin
9680 (method url-fetch)
9681 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9682 (sha256
9683 (base32
9684 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9685 (build-system python-build-system)
9686 (native-inputs
9687 `(("python-cython" ,python-cython)
9688 ("python-sphinx" ,python-sphinx)))
9689 (inputs
9690 `(("pari-gp" ,pari-gp)))
9691 (arguments
9692 `(#:modules ((guix build python-build-system)
9693 ((guix build gnu-build-system) #:prefix gnu:)
9694 (guix build utils))
9695 ;; FIXME: Tests are executed after installation and currently fail
9696 ;; when not installing into standard locations; the author is working
9697 ;; on a fix.
9698 #:tests? #f
9699 #:phases
9700 (modify-phases %standard-phases
9701 (add-before
9702 'build 'configure
9703 (assoc-ref gnu:%standard-phases 'configure)))))
9704 (home-page
9705 "https://github.com/sagemath/cysignals")
9706 (synopsis
9707 "Handling of interrupts and signals for Cython")
9708 (description
9709 "The cysignals package provides mechanisms to handle interrupts (and
9710other signals and errors) in Cython code, using two related approaches,
9711for mixed Cython/Python code or external C libraries and pure Cython code,
9712respectively.")
9713 (license license:lgpl3+)))
9714
9715(define-public python2-cysignals
9716 (package-with-python2 python-cysignals))
9717
9718(define-public python2-shedskin
9719 (package
9720 (name "python2-shedskin")
9721 (version "0.9.4")
9722 (source
9723 (origin
9724 (method url-fetch)
9725 (uri (string-append "https://github.com/shedskin/shedskin/"
9726 "releases/download/v" version
9727 "/shedskin-" version ".tgz"))
9728 (sha256
9729 (base32
9730 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9731 (build-system python-build-system)
9732 (arguments
9733 `(#:python ,python-2
9734 #:phases (modify-phases %standard-phases
9735 (add-after 'unpack 'fix-resulting-include-libs
9736 (lambda* (#:key inputs #:allow-other-keys)
9737 (let ((libgc (assoc-ref inputs "libgc"))
9738 (pcre (assoc-ref inputs "pcre")))
9739 (substitute* "shedskin/makefile.py"
9740 (("variable == 'CCFLAGS':[ ]*")
9741 (string-append "variable == 'CCFLAGS':\n"
9742 " line += ' -I " pcre "/include"
9743 " -I " libgc "/include'"))
9744 (("variable == 'LFLAGS':[ ]*")
9745 (string-append "variable == 'LFLAGS':\n"
9746 " line += ' -L" pcre "/lib"
9747 " -L " libgc "/lib'")))
9748 #t))))))
9749 (inputs `(("pcre" ,pcre)
9750 ("libgc" ,libgc)))
9751 (home-page "https://shedskin.github.io/")
9752 (synopsis "Experimental Python-2 to C++ Compiler")
9753 (description (string-append "This is an experimental compiler for a subset of
9754Python. It generates C++ code and a Makefile."))
9755 (license (list license:gpl3 license:bsd-3 license:expat))))
9756
9757(define-public python2-rope
9758 (package
9759 (name "python2-rope")
9760 (version "0.10.3")
9761 (source
9762 (origin
9763 (method url-fetch)
9764 (uri (pypi-uri "rope" version))
9765 (sha256
9766 (base32
9767 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9768 (arguments
9769 ;; Rope is currently python-2 only.
9770 ;; https://github.com/python-rope/rope/issues/57
9771 `(#:python ,python-2))
9772 (build-system python-build-system)
9773 (native-inputs
9774 `(("python2-unittest2" ,python2-unittest2)))
9775 (home-page "https://github.com/python-rope/rope")
9776 (synopsis "Refactoring library for Python")
9777 (description "Rope is a refactoring library for Python. It facilitates
9778the renaming, moving and extracting of attributes, functions, modules, fields
9779and parameters in Python 2 source code. These refactorings can also be applied
9780to occurences in strings and comments.")
9781 (license license:gpl2)))
9782
9783(define-public python-py3status
9784 (package
9785 (name "python-py3status")
9786 (version "3.1")
9787 (source
9788 (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "py3status" version))
9791 (sha256
9792 (base32
9793 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9794 (build-system python-build-system)
9795 (home-page "https://github.com/ultrabug/py3status")
9796 (synopsis "Extensible i3status wrapper written in Python")
9797 (description "py3status is an i3status wrapper which extends i3status
9798functionality in a modular way, allowing you to extend your panel with your
9799own code, responding to click events and updating clock every second.")
9800 (license license:bsd-3)))
9801
9802(define-public python-tblib
9803 (package
9804 (name "python-tblib")
9805 (version "1.3.0")
9806 (source (origin
9807 (method url-fetch)
9808 (uri (pypi-uri "tblib" version))
9809 (sha256 (base32
9810 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9811 (build-system python-build-system)
9812 (arguments
9813 `(#:phases
9814 (modify-phases %standard-phases
9815 (replace 'check
9816 (lambda _
9817 ;; Upstream runs tests after installation and the package itself
9818 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9819 ;; found.
9820 (setenv "PYTHONPATH"
9821 (string-append (getcwd) "/build/lib:"
9822 (getenv "PYTHONPATH")))
9823 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9824 (native-inputs
9825 `(("python-pytest" ,python-pytest)
9826 ("python-six" ,python-six)))
9827 (home-page "https://github.com/ionelmc/python-tblib")
9828 (synopsis "Traceback serialization library")
9829 (description
9830 "Traceback serialization allows you to:
9831
9832@enumerate
9833@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9834different processes. This allows better error handling when running code over
9835multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9836
9837@item Parse traceback strings and raise with the parsed tracebacks.
9838@end itemize")
9839 (license license:bsd-3)))
9840
9841(define-public python2-tblib
9842 (package-with-python2 python-tblib))
9843
9844(define-public python-sqlparse
9845 (package
9846 (name "python-sqlparse")
9847 (version "0.1.19")
9848 (source (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "sqlparse" version))
9851 (sha256
9852 (base32
9853 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9854 (build-system python-build-system)
9855 (arguments
9856 `(#:phases
9857 (modify-phases %standard-phases
9858 (replace 'check
9859 (lambda* _
9860 ;; setup.py-integrated 2to3 only affects the build files, but
9861 ;; py.test is using the source files. So we need to convert them
9862 ;; manually.
9863 (when (zero? (system* "python3"))
9864 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9865 (zero? (system* "py.test")))))))
9866 (native-inputs
9867 `(("python-pytest" ,python-pytest)))
9868 (home-page "https://github.com/andialbrecht/sqlparse")
9869 (synopsis "Non-validating SQL parser")
9870 (description "Sqlparse is a non-validating SQL parser for Python. It
9871provides support for parsing, splitting and formatting SQL statements.")
9872 (license license:bsd-3)))
9873
9874(define-public python2-sqlparse
9875 (package-with-python2 python-sqlparse))
9876
9877(define-public python-greenlet
9878 (package
9879 (name "python-greenlet")
9880 (version "0.4.9")
9881 (source (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "greenlet" version))
9884 (sha256
9885 (base32
9886 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9887 (build-system python-build-system)
9888 (home-page "https://greenlet.readthedocs.io/")
9889 (synopsis "Lightweight in-process concurrent programming")
9890 (description
9891 "Greenlet package is a spin-off of Stackless, a version of CPython
9892that supports micro-threads called \"tasklets\". Tasklets run
9893pseudo-concurrently (typically in a single or a few OS-level threads) and
9894are synchronized with data exchanges on \"channels\".")
9895 (license (list license:psfl license:expat))))
9896
9897(define-public python2-greenlet
9898 (package-with-python2 python-greenlet))
9899
9900(define-public python-gevent
9901 (package
9902 (name "python-gevent")
9903 (version "1.1.1")
9904 (source (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "gevent" version))
9907 (sha256
9908 (base32
9909 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9910 (modules '((guix build utils)))
9911 (snippet
9912 '(begin
9913 ;; unbunding libev and c-ares
9914 (for-each delete-file-recursively '("libev" "c-ares"))
9915 ;; fixing testsuite
9916 (call-with-output-file "greentest/__init__.py" noop)
9917 (substitute* "greentest/testrunner.py"
9918 (("import util") "from . import util")
9919 (("from util import log") "from .util import log"))))))
9920 (build-system python-build-system)
9921 (propagated-inputs
9922 `(("python-greenlet" ,python-greenlet)))
9923 (native-inputs
9924 `(("python-six" ,python-six)))
9925 (inputs
9926 `(("c-ares" ,c-ares)
9927 ("libev" ,libev)))
9928 (home-page "http://www.gevent.org/")
9929 (synopsis "Coroutine-based network library")
9930 (description
9931 "gevent is a coroutine-based Python networking library that uses greenlet
9932to provide a high-level synchronous API on top of the libev event loop.")
9933 (license license:expat)))
9934
9935(define-public python2-gevent
9936 (package-with-python2 python-gevent))
9937
9938(define-public python-twisted
9939 (package
9940 (name "python-twisted")
9941 (version "16.2.0")
9942 (source (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9945 (sha256
9946 (base32
9947 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9948 (build-system python-build-system)
9949 (propagated-inputs
9950 `(("python-zope-interface" ,python-zope-interface)))
9951 (home-page "https://twistedmatrix.com/")
9952 (synopsis "Asynchronous networking framework written in Python")
9953 (description
9954 "Twisted is an extensible framework for Python programming, with special
9955focus on event-based network programming and multiprotocol integration.")
9956 (license license:expat)))
9957
9958(define-public python2-twisted
9959 (package-with-python2 python-twisted))
9960
9961(define-public python-pika
9962 (package
9963 (name "python-pika")
9964 (version "0.10.0")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "pika" version))
9969 (sha256
9970 (base32
9971 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9972 (build-system python-build-system)
9973 (native-inputs
9974 `(("python-pyev" ,python-pyev)
9975 ("python-tornado" ,python-tornado)
9976 ("python-twisted" ,python-twisted)))
9977 (home-page "https://pika.readthedocs.org")
9978 (synopsis "Pure Python AMQP Client Library")
9979 (description
9980 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9981Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9982network support library.")
9983 (license license:bsd-3)))
9984
9985(define-public python2-pika
9986 (package-with-python2 python-pika))
9987
9988(define-public python-ply
9989 (package
9990 (name "python-ply")
9991 (version "3.8")
9992 (source
9993 (origin
9994 (method url-fetch)
9995 (uri (string-append
9996 "https://pypi.python.org/packages/"
9997 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9998 "/ply-" version ".tar.gz"))
9999 (sha256
10000 (base32
10001 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10002 (build-system python-build-system)
10003 (home-page "http://www.dabeaz.com/ply/")
10004 (synopsis "Python Lex & Yacc")
10005 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10006It uses LR parsing and does extensive error checking.")
10007 (license license:bsd-3)))
10008
10009(define-public python2-ply
10010 (package-with-python2 python-ply))
10011
10012(define-public python-tabulate
10013 (package
10014 (name "python-tabulate")
10015 (version "0.7.5")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "tabulate" version))
10019 (sha256
10020 (base32
10021 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10022 ;; Fix tests
10023 (modules '((guix build utils)))
10024 (snippet '(substitute* '("test/test_cli.py"
10025 "test/test_input.py"
10026 "test/test_output.py"
10027 "test/test_regression.py")
10028 (("from common") "from nose.tools")))))
10029 (build-system python-build-system)
10030 (native-inputs
10031 `(;; For testing
10032 ("python-nose" ,python-nose)))
10033 (home-page "https://bitbucket.org/astanin/python-tabulate")
10034 (synopsis "Pretty-print tabular data")
10035 (description
10036 "Tabulate is a library and command-line utility to pretty-print tabular
10037data in Python.")
10038 (license license:expat)))
10039
10040(define-public python2-tabulate
10041 (package-with-python2 python-tabulate))
10042
10043(define-public python-kazoo
10044 (package
10045 (name "python-kazoo")
10046 (version "2.2.1")
10047 (source
10048 (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "kazoo" version))
10051 (sha256
10052 (base32
10053 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10054 (build-system python-build-system)
10055 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10056 (propagated-inputs
10057 `(("python-six" ,python-six)))
10058 (home-page "https://kazoo.readthedocs.org")
10059 (synopsis "High-level Zookeeper client library")
10060 (description
10061 "Kazoo is a Python client library for the Apache Zookeeper distributed
10062application service. It is designed to be easy to use and to avoid common
10063programming errors.")
10064 (license license:asl2.0)))
10065
10066(define-public python2-kazoo
10067 (package-with-python2 python-kazoo))
10068
10069(define-public python-pykafka
10070 (package
10071 (name "python-pykafka")
10072 (version "2.4.0")
10073 (source (origin
10074 (method url-fetch)
10075 (uri (string-append
10076 "https://pypi.python.org/packages/8b/3e/"
10077 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10078 "pykafka-" version ".tar.gz"))
10079 (sha256
10080 (base32
10081 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10082 (build-system python-build-system)
10083 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10084 (propagated-inputs
10085 `(("python-gevent" ,python-gevent)
10086 ("python-kazoo" ,python-kazoo)
10087 ("python-tabulate" ,python-tabulate)))
10088 (inputs
10089 `(("librdkafka" ,librdkafka)))
10090 (home-page "https://pykafka.readthedocs.io/")
10091 (synopsis "Apache Kafka client for Python")
10092 (description
10093 "PyKafka is a client for the Apache Kafka distributed messaging system.
10094It includes Python implementations of Kafka producers and consumers, which
10095are optionally backed by a C extension built on librdkafka.")
10096 (license license:asl2.0)))
10097
10098(define-public python2-pykafka
10099 (package-with-python2 python-pykafka))
10100
10101(define-public python-wcwidth
10102 (package
10103 (name "python-wcwidth")
10104 (version "0.1.6")
10105 (source
10106 (origin
10107 (method url-fetch)
10108 (uri (string-append
10109 "https://pypi.python.org/packages/"
10110 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10111 "wcwidth-" version ".tar.gz"))
10112 (sha256
10113 (base32
10114 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10115 (build-system python-build-system)
10116 (home-page "https://github.com/jquast/wcwidth")
10117 (synopsis "Measure number of terminal column cells of wide-character codes")
10118 (description "Wcwidth measures the number of terminal column cells of
10119wide-character codes. It is useful for those implementing a terminal emulator,
10120or programs that carefully produce output to be interpreted by one. It is a
10121Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10122specified in POSIX.1-2001 and POSIX.1-2008.")
10123 (license license:expat)))
10124
10125(define-public python2-wcwidth
10126 (package-with-python2 python-wcwidth))
10127
10128(define-public python2-jsonrpclib
10129 (package
10130 (name "python2-jsonrpclib")
10131 (version "0.1.7")
10132 (source (origin
10133 (method url-fetch)
10134 (uri (string-append
10135 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10136 "jsonrpclib-" version ".tar.gz"))
10137 (sha256
10138 (base32
10139 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10140 (build-system python-build-system)
10141 (arguments
10142 `(#:tests? #f
10143 #:python ,python-2))
10144 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10145 (synopsis "Implementation of JSON-RPC specification for Python")
10146 (description
10147 "This library is an implementation of the JSON-RPC specification.
10148It supports both the original 1.0 specification, as well as the
10149new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10150etc.")
10151 (license license:asl2.0)))
10152
10153(define-public python-chai
10154 (package
10155 (name "python-chai")
10156 (version "1.1.1")
10157 (source (origin
10158 (method url-fetch)
10159 (uri (pypi-uri "chai" version))
10160 (sha256
10161 (base32
10162 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10163 (build-system python-build-system)
10164 (home-page "https://github.com/agoragames/chai")
10165 (synopsis "Mocking framework for Python")
10166 (description
10167 "Chai provides an api for mocking, stubbing and spying your python
10168objects, patterned after the Mocha library for Ruby.")
10169 (license license:bsd-3)))
10170
10171(define-public python2-chai
10172 (package-with-python2 python-chai))
10173
10174(define-public python-arrow
10175 (package
10176 (name "python-arrow")
10177 (version "0.8.0")
10178 (source (origin
10179 (method url-fetch)
10180 (uri (pypi-uri "arrow" version))
10181 (sha256
10182 (base32
10183 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10184 (build-system python-build-system)
10185 (native-inputs
10186 `(;; For testing
10187 ("python-chai" ,python-chai)
10188 ("python-simplejson" ,python-simplejson)))
10189 (propagated-inputs
10190 `(("python-dateutil" ,python-dateutil-2)))
10191 (home-page "https://github.com/crsmithdev/arrow/")
10192 (synopsis "Dates and times for Python")
10193 (description
10194 "Arrow is a Python library to creating, manipulating, formatting and
10195converting dates, times, and timestamps. It implements and updates the
10196datetime type.")
10197 (license license:asl2.0)))
10198
10199(define-public python2-arrow
10200 (package-with-python2 python-arrow))
10201
10202(define-public python-inflection
10203 (package
10204 (name "python-inflection")
10205 (version "0.3.1")
10206 (source
10207 (origin (method url-fetch)
10208 (uri (pypi-uri "inflection" version))
10209 (sha256
10210 (base32
10211 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10212 (build-system python-build-system)
10213 (home-page "http://github.com/jpvanhal/inflection")
10214 (synopsis "Python string transformation library")
10215 (description
10216 "Inflection is a string transformation library. It singularizes
10217and pluralizes English words, and transforms strings from CamelCase to
10218underscored string.")
10219 (license license:expat)))
10220
10221(define-public python2-inflection
10222 (package-with-python2 python-inflection))
10223
10224(define-public python-pylev
10225 (package
10226 (name "python-pylev")
10227 (version "1.3.0")
10228 (source (origin
10229 (method url-fetch)
10230 (uri (pypi-uri "pylev" version))
10231 (sha256
10232 (base32
10233 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10234 (build-system python-build-system)
10235 (home-page "http://github.com/toastdriven/pylev")
10236 (synopsis "Levenshtein distance implementation in Python")
10237 (description "Pure Python Levenshtein implementation, based off the
10238Wikipedia code samples at
10239@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10240 (license license:bsd-3)))
10241
10242(define-public python2-pylev
10243 (package-with-python2 python-pylev))
10244
10245(define-public python-cleo
10246 (package
10247 (name "python-cleo")
10248 (version "0.4.1")
10249 (source (origin
10250 (method url-fetch)
10251 (uri (pypi-uri "cleo" version))
10252 (sha256
10253 (base32
10254 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10255 (build-system python-build-system)
10256 (native-inputs
10257 `(;; For testing
10258 ("python-mock" ,python-mock)
10259 ("python-pytest" ,python-pytest)))
10260 (propagated-inputs
10261 `(("python-psutil" ,python-psutil)
10262 ("python-pylev" ,python-pylev)))
10263 (home-page "https://github.com/sdispater/cleo")
10264 (synopsis "Command-line arguments library for Python")
10265 (description
10266 "Cleo allows you to create command-line commands with signature in
10267docstring and colored output.")
10268 (license license:expat)))
10269
10270(define-public python2-cleo
10271 (package-with-python2 python-cleo))
10272
10273(define-public python-lazy-object-proxy
10274 (package
10275 (name "python-lazy-object-proxy")
10276 (version "1.2.2")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "lazy-object-proxy" version))
10280 (sha256
10281 (base32
10282 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10283 (build-system python-build-system)
10284 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10285 (synopsis "Lazy object proxy for python")
10286 (description
10287 "Lazy object proxy is an object that wraps a callable but defers the call
10288until the object is actually required, and caches the result of said call.")
10289 (license license:bsd-2)))
10290
10291(define-public python2-lazy-object-proxy
10292 (package-with-python2 python-lazy-object-proxy))
10293
10294(define-public python-dnspython
10295 (package
10296 (name "python-dnspython")
10297 (version "1.15.0")
10298 (source (origin
10299 (method url-fetch)
10300 (uri (string-append "http://www.dnspython.org/kits/"
10301 version "/dnspython-" version ".tar.gz"))
10302 (sha256
10303 (base32
10304 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10305 (build-system python-build-system)
10306 (arguments '(#:tests? #f)) ; XXX: requires internet access
10307 (home-page "http://www.dnspython.org")
10308 (synopsis "DNS toolkit for Python")
10309 (description
10310 "dnspython is a DNS toolkit for Python. It supports almost all record
10311types. It can be used for queries, zone transfers, and dynamic updates.
10312It supports TSIG authenticated messages and EDNS0.")
10313 (license license:expat)))
10314
10315(define-public python2-dnspython
10316 (package-with-python2 python-dnspython))
10317
10318(define-public python-email-validator
10319 (package
10320 (name "python-email-validator")
10321 (version "1.0.1")
10322 (source
10323 (origin (method url-fetch)
10324 (uri (pypi-uri "email_validator" version))
10325 (sha256
10326 (base32
10327 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10328 (build-system python-build-system)
10329 (arguments
10330 '(#:phases
10331 (modify-phases %standard-phases
10332 (add-before 'build 'use-dnspython
10333 (lambda _
10334 (substitute* "setup.py"
10335 (("dnspython3") "dnspython"))
10336 #t)))))
10337 (propagated-inputs
10338 `(("python-dnspython" ,python-dnspython)
10339 ("python-idna" ,python-idna)))
10340 (home-page "https://github.com/JoshData/python-email-validator")
10341 (synopsis "Email address validation library for Python")
10342 (description
10343 "This library validates email address syntax and deliverability.")
10344 (license license:cc0)))
10345
10346(define-public python2-email-validator
10347 (package-with-python2 python-email-validator))
10348
10349(define-public python-ukpostcodeparser
10350 (package
10351 (name "python-ukpostcodeparser")
10352 (version "1.0.3")
10353 (source (origin
10354 (method url-fetch)
10355 (uri (pypi-uri "UkPostcodeParser" version))
10356 (sha256
10357 (base32
10358 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10359 (build-system python-build-system)
10360 (home-page "https://github.com/hamstah/ukpostcodeparser")
10361 (synopsis "UK Postcode parser for Python")
10362 (description
10363 "This library provides the @code{parse_uk_postcode} function for
10364parsing UK postcodes.")
10365 (license license:expat)))
10366
10367(define-public python2-ukpostcodeparser
10368 (package-with-python2 python-ukpostcodeparser))
10369
10370(define-public python-fake-factory
10371 (package
10372 (name "python-fake-factory")
10373 (version "0.7.2")
10374 (source (origin
10375 (method url-fetch)
10376 (uri (pypi-uri "fake-factory" version))
10377 (sha256
10378 (base32
10379 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10380 (build-system python-build-system)
10381 (native-inputs
10382 `(;; For testing
10383 ("python-email-validator" ,python-email-validator)
10384 ("python-mock" ,python-mock)
10385 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10386 (propagated-inputs
10387 `(("python-dateutil" ,python-dateutil-2)
10388 ("python-six" ,python-six)))
10389 (home-page "https://github.com/joke2k/faker")
10390 (synopsis "Python package that generates fake data")
10391 (description
10392 "Faker is a Python package that generates fake data such as names,
10393addresses, and phone numbers.")
10394 (license license:expat)
10395 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10396
10397(define-public python2-fake-factory
10398 (let ((base (package-with-python2 (strip-python2-variant
10399 python-fake-factory))))
10400 (package
10401 (inherit base)
10402 (propagated-inputs
10403 `(("python2-ipaddress" ,python2-ipaddress)
10404 ,@(package-propagated-inputs base))))))
10405
10406(define-public python-pyaml
10407 (package
10408 (name "python-pyaml")
10409 (version "15.8.2")
10410 (source (origin
10411 (method url-fetch)
10412 (uri (pypi-uri "pyaml" version))
10413 (sha256
10414 (base32
10415 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10416 (build-system python-build-system)
10417 (propagated-inputs
10418 `(("python-pyyaml" ,python-pyyaml)))
10419 (home-page "https://github.com/mk-fg/pretty-yaml")
10420 (synopsis "YAML pretty-print library for Python")
10421 (description
10422 "pyaml is a PyYAML based python module to produce pretty and readable
10423YAML-serialized data.")
10424 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10425
10426(define-public python2-pyaml
10427 (package-with-python2 python-pyaml))
10428
10429(define-public python-flexmock
10430 (package
10431 (name "python-flexmock")
10432 (version "0.10.2")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "flexmock" version))
10436 (sha256
10437 (base32
10438 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10439 (build-system python-build-system)
10440 (home-page "https://flexmock.readthedocs.org")
10441 (synopsis "Testing library for Python")
10442 (description
10443 "flexmock is a testing library for Python that makes it easy to create
10444mocks, stubs and fakes.")
10445 (license license:bsd-3)))
10446
10447(define-public python2-flexmock
10448 (package-with-python2 python-flexmock))
10449
10450(define-public python-orator
10451 (package
10452 (name "python-orator")
10453 (version "0.8.2")
10454 (source (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "orator" version))
10457 (sha256
10458 (base32
10459 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10460 (build-system python-build-system)
10461 (arguments '(#:tests? #f)) ; no tests
10462 (propagated-inputs
10463 `(("python-arrow" ,python-arrow)
10464 ("python-blinker" ,python-blinker)
10465 ("python-cleo" ,python-cleo)
10466 ("python-fake-factory" ,python-fake-factory)
10467 ("python-inflection" ,python-inflection)
10468 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10469 ("python-pyaml" ,python-pyaml)
10470 ("python-simplejson" ,python-simplejson)
10471 ("python-wrapt" ,python-wrapt)))
10472 (home-page "https://orator-orm.com/")
10473 (synopsis "ActiveRecord ORM for Python")
10474 (description
10475 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10476implementation for Python.")
10477 (license license:expat)
10478 (properties `((python2-variant . ,(delay python2-orator))))))
10479
10480(define-public python2-orator
10481 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10482 (package
10483 (inherit base)
10484 (propagated-inputs
10485 `(("python2-ipaddress" ,python2-ipaddress)
10486 ,@(package-propagated-inputs base))))))
10487
10488(define-public python-prompt-toolkit
10489 (package
10490 (name "python-prompt-toolkit")
10491 (version "1.0.7")
10492 (source
10493 (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10496 (sha256
10497 (base32
10498 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10499 (build-system python-build-system)
10500 (arguments
10501 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10502 (propagated-inputs
10503 `(("python-wcwidth" ,python-wcwidth)
10504 ("python-six" ,python-six)
10505 ("python-pygments" ,python-pygments)))
10506 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10507 (synopsis "Library for building command line interfaces in Python")
10508 (description
10509 "Prompt-Toolkit is a library for building interactive command line
10510interfaces in Python. It's like GNU Readline but it also features syntax
10511highlighting while typing, out-of-the-box multi-line input editing, advanced
10512code completion, incremental search, support for Chinese double-width
10513characters, mouse support, and auto suggestions.")
10514 (license license:bsd-3)))
10515
10516(define-public python2-prompt-toolkit
10517 (package-with-python2 python-prompt-toolkit))
10518
10519(define-public python-jedi
10520 (package
10521 (name "python-jedi")
10522 (version "0.9.0")
10523 (source
10524 (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "jedi" version))
10527 (sha256
10528 (base32
10529 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10530 (build-system python-build-system)
10531 (home-page "https://github.com/davidhalter/jedi")
10532 (synopsis
10533 "Autocompletion for Python that can be used for text editors")
10534 (description
10535 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10536 (license license:expat)))
10537
10538(define-public python2-jedi
10539 (package-with-python2 python-jedi))
10540
10541(define-public ptpython
10542 (package
10543 (name "ptpython")
10544 (version "0.34")
10545 (source (origin
10546 (method url-fetch)
10547 (uri (pypi-uri "ptpython" version))
10548 (sha256
10549 (base32
10550 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10551 (build-system python-build-system)
10552 (propagated-inputs
10553 `(("python-docopt" ,python-docopt)
10554 ("python-jedi" ,python-jedi)
10555 ("python-prompt-toolkit" ,python-prompt-toolkit)
10556 ("python-pygments" ,python-pygments)))
10557 (home-page "https://github.com/jonathanslenders/ptpython")
10558 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10559 (description
10560 "ptpython is a Python read-eval-print loop with IDE-like features.
10561It supports syntax highlighting, multiline editing, autocompletion, mouse,
10562color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10563etc.")
10564 (license license:bsd-3)
10565 (properties `((python2-variant . ,(delay ptpython-2))))))
10566
10567(define-public ptpython-2
10568 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10569 (package
10570 (inherit base)
10571 (name "ptpython2"))))
10572
10573(define-public python-requests-oauthlib
10574 (package
10575 (name "python-requests-oauthlib")
10576 (version "0.6.2")
10577 (source
10578 (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "requests-oauthlib" version))
10581 (sha256
10582 (base32
10583 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10584 (build-system python-build-system)
10585 (arguments
10586 `(#:phases
10587 (modify-phases %standard-phases
10588 ;; removes tests that require network access
10589 (add-before 'check 'pre-check
10590 (lambda _
10591 (delete-file "tests/test_core.py")
10592 #t)))))
10593 (native-inputs
10594 `(("python-requests-mock" ,python-requests-mock)
10595 ("python-mock" ,python-mock)))
10596 (propagated-inputs
10597 `(("python-oauthlib" ,python-oauthlib)
10598 ("python-requests" ,python-requests)))
10599 (home-page
10600 "https://github.com/requests/requests-oauthlib")
10601 (synopsis
10602 "OAuthlib authentication support for Requests")
10603 (description
10604 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10605provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10606 (license license:isc)))
10607
10608(define-public python2-requests-oauthlib
10609 (package-with-python2 python-requests-oauthlib))
10610
10611(define-public python-stem
10612 (package
10613 (name "python-stem")
10614 (version "1.4.1b")
10615 (source
10616 (origin
10617 (method url-fetch)
10618 (uri (pypi-uri "stem" version ".tar.bz2"))
10619 (sha256
10620 (base32
10621 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10622 (build-system python-build-system)
10623 (arguments
10624 `(#:phases
10625 (modify-phases %standard-phases
10626 (replace 'check
10627 (lambda _
10628 (zero? (system* "./run_tests.py" "--unit")))))))
10629 (native-inputs
10630 `(("python-mock" ,python-mock)
10631 ("python-pep8" ,python-pep8)
10632 ("python-pyflakes" ,python-pyflakes)))
10633 (propagated-inputs
10634 `(("python-pycrypto" ,python-pycrypto)))
10635 (home-page "https://stem.torproject.org/")
10636 (synopsis
10637 "Python controller library that allows applications to interact with Tor")
10638 (description
10639 "Stem is a Python controller library for Tor. With it you can use Tor's
10640control protocol to script against the Tor process and read descriptor data
10641relays publish about themselves.")
10642 (license license:lgpl3)))
10643
10644(define-public python2-stem
10645 (package-with-python2 python-stem))
10646
10647(define-public python-pyserial
10648 (package
10649 (name "python-pyserial")
10650 (version "3.1.1")
10651 (source
10652 (origin
10653 (method url-fetch)
10654 (uri (pypi-uri "pyserial" version))
10655 (sha256
10656 (base32
10657 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10658 (build-system python-build-system)
10659 (home-page
10660 "https://github.com/pyserial/pyserial")
10661 (synopsis "Python Serial Port Bindings")
10662 (description "@code{pyserial} provide serial port bindings for Python. It
10663supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10664and/or Xon/Xoff. The port is accessed in RAW mode.")
10665 (license license:bsd-3)))
10666
10667(define-public python2-pyserial
10668 (package-with-python2 python-pyserial))
10669
10670(define-public python-kivy
10671 (package
10672 (name "python-kivy")
10673 (version "1.9.1")
10674 (source
10675 (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "kivy" version))
10678 (file-name (string-append name "-" version ".tar.gz"))
10679 (sha256
10680 (base32
10681 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10682 (build-system python-build-system)
10683 (arguments
10684 `(#:tests? #f ; Tests require many optional packages
10685 #:phases
10686 (modify-phases %standard-phases
10687 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10688 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10689 (lambda* (#:key inputs #:allow-other-keys)
10690 (setenv "KIVY_SDL2_PATH"
10691 (string-append (assoc-ref inputs "sdl-union")
10692 "/include/SDL2"))
10693 #t)))))
10694 (native-inputs
10695 `(("pkg-config" ,pkg-config)
10696 ("python-cython" ,python-cython)))
10697 (inputs
10698 `(("gstreamer" ,gstreamer)
10699 ("mesa" ,mesa)
10700 ("sdl-union"
10701 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10702 (home-page "http://kivy.org")
10703 (synopsis
10704 "Multitouch application framework")
10705 (description
10706 "A software library for rapid development of
10707hardware-accelerated multitouch applications.")
10708 (license license:expat)))
10709
10710(define-public python2-kivy
10711 (package-with-python2 python-kivy))
10712
10713(define-public python-kivy-next
10714 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10715 (revision "1"))
10716 (package (inherit python-kivy)
10717 (name "python-kivy-next")
10718 (version (string-append "1.9.1-" revision "."
10719 (string-take commit 7)))
10720 (source
10721 (origin
10722 (method git-fetch)
10723 (uri (git-reference
10724 (url "https://github.com/kivy/kivy")
10725 (commit commit)))
10726 (file-name (string-append name "-" version "-checkout"))
10727 (sha256
10728 (base32
10729 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10730
10731(define-public python2-kivy-next
10732 (package-with-python2 python-kivy-next))
10733
10734(define-public python-binaryornot
10735 (package
10736 (name "python-binaryornot")
10737 (version "0.4.0")
10738 (source (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "binaryornot" version))
10741 (sha256
10742 (base32
10743 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10744 (build-system python-build-system)
10745 (propagated-inputs
10746 `(("python-chardet" ,python-chardet)
10747 ("python-hypothesis" ,python-hypothesis)))
10748 (home-page "https://github.com/audreyr/binaryornot")
10749 (synopsis "Package to check if a file is binary or text")
10750 (description "Ultra-lightweight pure Python package to check if a file is
10751binary or text.")
10752 (license license:bsd-3)
10753 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10754
10755(define-public python2-binaryornot
10756 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10757 (package (inherit base)
10758 (propagated-inputs
10759 `(("python2-enum34" ,python2-enum34)
10760 ,@(package-propagated-inputs base))))))
10761
10762(define-public python-nltk
10763 (package
10764 (name "python-nltk")
10765 (version "3.2.1")
10766 (source (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "nltk" version))
10769 (sha256
10770 (base32
10771 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10772 (build-system python-build-system)
10773 (arguments
10774 '(;; The tests require some extra resources to be downloaded.
10775 ;; TODO Try packaging these resources.
10776 #:tests? #f))
10777 (home-page "http://nltk.org/")
10778 (synopsis "Natural Language Toolkit")
10779 (description "It provides interfaces to over 50 corpora and lexical
10780resources such as WordNet, along with a suite of text processing libraries
10781for classification, tokenization, stemming, tagging, parsing, and semantic
10782reasoning, wrappers for natural language processing libraries.")
10783 (license license:asl2.0)))
10784
10785(define-public python2-nltk
10786 (package-with-python2 python-nltk))
10787
10788(define-public python-pymongo
10789 (package
10790 (name "python-pymongo")
10791 (version "3.3.0")
10792 (source (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "pymongo" version))
10795 (sha256
10796 (base32
10797 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10798 (build-system python-build-system)
10799 (propagated-inputs
10800 `(("python-certifi" ,python-certifi)))
10801 (home-page "http://github.com/mongodb/mongo-python-driver")
10802 (synopsis "Python driver for MongoDB")
10803 (description "Python driver for MongoDB.")
10804 (license license:asl2.0)))
10805
10806(define-public python2-pymongo
10807 (package-with-python2 python-pymongo))
10808
10809(define-public python-sh
10810 (package
10811 (name "python-sh")
10812 (version "1.11")
10813 (source (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "sh" version))
10816 (sha256
10817 (base32
10818 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10819 (build-system python-build-system)
10820 (arguments
10821 `(#:tests? #f)) ; no tests
10822 (home-page "https://github.com/amoffat/sh")
10823 (synopsis "Python subprocess interface")
10824 (description "Abstracts process invocation by providing a function
10825interface for programs.")
10826 (license license:expat)))
10827
10828(define-public python2-sh
10829 (package-with-python2 python-sh))
10830
10831(define-public python-consul
10832 (package
10833 (name "python-consul")
10834 (version "0.6.1")
10835 (source
10836 (origin
10837 (method url-fetch)
10838 (uri (pypi-uri "python-consul" version))
10839 (sha256
10840 (base32
10841 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10842 (build-system python-build-system)
10843 (native-inputs
10844 `(("python-pytest" ,python-pytest)))
10845 (propagated-inputs
10846 `(("python-requests" ,python-requests)
10847 ("python-six" ,python-six)))
10848 (home-page "https://github.com/cablehead/python-consul")
10849 (synopsis "Python client for Consul")
10850 (description
10851 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10852discovery, monitoring and configuration.")
10853 (license license:expat)))
10854
10855(define-public python2-consul
10856 (package-with-python2 python-consul))
10857
10858(define-public python-schematics
10859 (package
10860 (name "python-schematics")
10861 (version "1.1.1")
10862 (source
10863 (origin
10864 (method url-fetch)
10865 (uri (string-append
10866 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10867 (file-name (string-append name "-" version ".tar.gz"))
10868 (sha256
10869 (base32
10870 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10871 (build-system python-build-system)
10872 (propagated-inputs
10873 `(("python-six" ,python-six)))
10874 (arguments
10875 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10876 ; version requirements (eg python-coveralls)
10877 (home-page "https://github.com/schematics/schematics")
10878 (synopsis "Python Data Structures for Humans")
10879 (description "Python Data Structures for Humans.")
10880 (license license:bsd-3)))
10881
10882(define-public python2-schematics
10883 (package-with-python2 python-schematics))
10884
10885(define-public python-publicsuffix
10886 (package
10887 (name "python-publicsuffix")
10888 (version "1.1.0")
10889 (source (origin
10890 (method url-fetch)
10891 (uri (pypi-uri "publicsuffix" version))
10892 (sha256
10893 (base32
10894 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10895 (build-system python-build-system)
10896 (arguments
10897 `(#:tests? #f)) ; tests use the internet
10898 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10899 (synopsis "Get suffix for a domain name")
10900 (description "Get a public suffix for a domain name using the Public Suffix
10901List.")
10902 (license license:expat)))
10903
10904(define-public python2-publicsuffix
10905 (package-with-python2 python-publicsuffix))
10906
10907(define-public python-publicsuffix2
10908 (package
10909 (name "python-publicsuffix2")
10910 (version "2.20160621")
10911 (source
10912 (origin
10913 (method url-fetch)
10914 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10915 (sha256
10916 (base32
10917 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10918 (build-system python-build-system)
10919 (arguments
10920 '(#:tests? #f)) ; The test suite requires network access.
10921 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10922 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10923 (description "Get a public suffix for a domain name using the Public Suffix
10924List. Forked from and using the same API as the publicsuffix package.")
10925 (license (list license:expat license:mpl2.0))))
10926
10927(define-public python2-publicsuffix2
10928 (package-with-python2 python-publicsuffix2))
10929
10930(define-public python-url
10931 (package
10932 (name "python-url")
10933 (version "0.2.0")
10934 (source (origin
10935 (method url-fetch)
10936 (uri (pypi-uri "url" version))
10937 (sha256
10938 (base32
10939 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10940 (build-system python-build-system)
10941 (propagated-inputs
10942 `(("python-publicsuffix" ,python-publicsuffix)))
10943 (native-inputs
10944 `(("python-coverage" ,python-coverage)
10945 ("python-nose" ,python-nose)))
10946 (arguments
10947 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10948 (home-page "http://github.com/seomoz/url-py")
10949 (synopsis "URL Parsing")
10950 (description "Library for parsing urls.")
10951 (license license:expat)
10952 (properties `((python2-variant . ,(delay python2-url))))))
10953
10954(define-public python2-url
10955 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10956 (package (inherit base)
10957 (propagated-inputs
10958 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10959
10960(define-public python-freezegun
10961 (package
10962 (name "python-freezegun")
10963 (version "0.3.7")
10964 (source
10965 (origin
10966 (method url-fetch)
10967 (uri (pypi-uri "freezegun" version))
10968 (sha256
10969 (base32
10970 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10971 (build-system python-build-system)
10972 (native-inputs
10973 `(("python-mock" ,python-mock)
10974 ("python-nose" ,python-nose)
10975 ("python-coverage" ,python-coverage)))
10976 (propagated-inputs
10977 `(("python-six" ,python-six)
10978 ("python-dateutil-2" ,python-dateutil-2)))
10979 (arguments
10980 `(#:phases (modify-phases %standard-phases
10981 ;; The tests are normally executed via `make test`, but the PyPi
10982 ;; package does not include the Makefile.
10983 (replace 'check
10984 (lambda _
10985 (zero? (system* "nosetests" "./tests/")))))))
10986 (home-page "https://github.com/spulec/freezegun")
10987 (synopsis "Test utility for mocking the datetime module")
10988 (description
10989 "FreezeGun is a library that allows your python tests to travel through
10990time by mocking the datetime module.")
10991 (license license:asl2.0)))
10992
10993(define-public python2-freezegun
10994 (package-with-python2 python-freezegun))
10995
10996
10997(define-public python-odfpy
10998 (package
10999 (name "python-odfpy")
11000 (version "1.3.3")
11001 (source (origin
11002 (method url-fetch)
11003 (uri (pypi-uri "odfpy" version))
11004 (sha256
11005 (base32
11006 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11007 (arguments
11008 `(#:modules ((srfi srfi-1)
11009 (guix build python-build-system)
11010 (guix build utils))
11011 #:phases
11012 (modify-phases %standard-phases
11013 (replace 'check
11014 ;; The test runner invokes python2 and python3 for test*.py.
11015 ;; To avoid having both in inputs, we replicate it here.
11016 (lambda _
11017 (every (lambda (test-file)
11018 (zero? (system* "python" test-file)))
11019 (find-files "tests" "^test.*\\.py$")))))))
11020 (build-system python-build-system)
11021 (home-page "https://github.com/eea/odfpy")
11022 (synopsis "Python API and tools to manipulate OpenDocument files")
11023 (description "Collection of libraries and utility programs written in
11024Python to manipulate OpenDocument 1.2 files.")
11025 (license
11026 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11027 ;; number of files with other licenses.
11028 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11029
11030(define-public python2-odfpy
11031 (package-with-python2 python-odfpy))
11032
11033(define-public python-cachecontrol
11034 (package
11035 (name "python-cachecontrol")
11036 (version "0.11.6")
11037 (source
11038 (origin
11039 (method url-fetch)
11040 ;; Pypi does not have tests.
11041 (uri (string-append
11042 "https://github.com/ionrock/cachecontrol/archive/v"
11043 version ".tar.gz"))
11044 (file-name (string-append name "-" version ".tar.gz"))
11045 (sha256
11046 (base32
11047 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11048 (build-system python-build-system)
11049 (arguments
11050 `(#:phases
11051 (modify-phases %standard-phases
11052 (replace 'check
11053 (lambda _
11054 ;; Drop test that requires internet access.
11055 (delete-file "tests/test_regressions.py")
11056 (setenv "PYTHONPATH"
11057 (string-append (getcwd) "/build/lib:"
11058 (getenv "PYTHONPATH")))
11059 (zero? (system* "py.test" "-vv")))))))
11060 (native-inputs
11061 `(("python-pytest" ,python-pytest)
11062 ("python-redis" ,python-redis)
11063 ("python-webtest" ,python-webtest)
11064 ("python-mock" ,python-mock)))
11065 (propagated-inputs
11066 `(("python-requests" ,python-requests)
11067 ("python-lockfile" ,python-lockfile)))
11068 (home-page "https://github.com/ionrock/cachecontrol")
11069 (synopsis "The httplib2 caching algorithms for use with requests")
11070 (description "CacheControl is a port of the caching algorithms in
11071@code{httplib2} for use with @code{requests} session objects.")
11072 (license license:asl2.0)))
11073
11074(define-public python2-cachecontrol
11075 (package-with-python2 python-cachecontrol))
11076
11077(define-public python-lit
11078 (package
11079 (name "python-lit")
11080 (version "0.5.0")
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "lit" version))
11085 (sha256
11086 (base32
11087 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11088 (build-system python-build-system)
11089 (home-page "http://llvm.org/")
11090 (synopsis "LLVM Software Testing Tool")
11091 (description "@code{lit} is a portable tool for executing LLVM and Clang
11092style test suites, summarizing their results, and providing indication of
11093failures.")
11094 (license license:ncsa)))
11095
11096(define-public python2-lit
11097 (package-with-python2 python-lit))
11098
11099(define-public python-pytest-pep8
11100 (package
11101 (name "python-pytest-pep8")
11102 (version "1.0.6")
11103 (source (origin
11104 (method url-fetch)
11105 (uri (pypi-uri "pytest-pep8" version))
11106 (sha256
11107 (base32
11108 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11109 (build-system python-build-system)
11110 (arguments
11111 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11112 (native-inputs
11113 `(("python-pytest" ,python-pytest)))
11114 (propagated-inputs
11115 `(("python-pep8" ,python-pep8)))
11116 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11117 (synopsis "Py.test plugin to check PEP8 requirements")
11118 (description "Pytest plugin for checking PEP8 compliance.")
11119 (license license:expat)))
11120
11121(define-public python2-pytest-pep8
11122 (package-with-python2 python-pytest-pep8))
11123
11124(define-public python-pytest-flakes
11125 (package
11126 (name "python-pytest-flakes")
11127 (version "1.0.1")
11128 (source (origin
11129 (method url-fetch)
11130 (uri (pypi-uri "pytest-flakes" version))
11131 (sha256
11132 (base32
11133 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11134 (build-system python-build-system)
11135 (arguments
11136 `(#:phases
11137 (modify-phases %standard-phases
11138 (delete 'check)
11139 (add-after 'install 'check
11140 (lambda* (#:key outputs inputs #:allow-other-keys)
11141 ;; It's easier to run tests after install.
11142 ;; Make installed package available for running the tests
11143 (add-installed-pythonpath inputs outputs)
11144 (zero? (system* "py.test" "-vv")))))))
11145 (native-inputs
11146 `(("python-coverage" ,python-coverage)
11147 ("python-pytest" ,python-pytest)
11148 ("python-pytest-cache" ,python-pytest-cache)
11149 ("python-pytest-pep8" ,python-pytest-pep8)))
11150 (propagated-inputs
11151 `(("python-pyflakes" ,python-pyflakes)))
11152 (home-page "https://github.com/fschulze/pytest-flakes")
11153 (synopsis "Py.test plugin to check source code with pyflakes")
11154 (description "Pytest plugin for checking Python source code with pyflakes.")
11155 (license license:expat)))
11156
11157(define-public python2-pytest-flakes
11158 (package-with-python2 python-pytest-flakes))
11159
11160(define-public python-natsort
11161 (package
11162 (name "python-natsort")
11163 (version "5.0.1")
11164 (source (origin
11165 (method url-fetch)
11166 (uri (pypi-uri "natsort" version))
11167 (sha256
11168 (base32
11169 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11170 (build-system python-build-system)
11171 (arguments
11172 `(#:phases
11173 (modify-phases %standard-phases
11174 (add-before 'check 'set-cachedir
11175 ;; Tests require write access to $HOME by default
11176 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11177 (native-inputs
11178 `(("python-hypothesis" ,python-hypothesis)
11179 ("python-pytest-cache" ,python-pytest-cache)
11180 ("python-pytest-cov" ,python-pytest-cov)
11181 ("python-pytest-flakes" ,python-pytest-flakes)
11182 ("python-pytest-pep8" ,python-pytest-pep8)))
11183 (propagated-inputs ; TODO: Add python-fastnumbers.
11184 `(("python-pyicu" ,python-pyicu)))
11185 (home-page "https://github.com/SethMMorton/natsort")
11186 (synopsis "Natural sorting for python and shell")
11187 (description
11188 "Natsort lets you apply natural sorting on lists instead of
11189lexicographical. If you use the built-in @code{sorted} method in python
11190on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11191returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11192function @code{natsorted} that identifies numbers and sorts them separately
11193from strings. It can also sort version numbers, real numbers, mixed types
11194and more, and comes with a shell command @command{natsort} that exposes this
11195functionality in the command line.")
11196 (license license:expat)
11197 (properties `((python2-variant . ,(delay python2-natsort))))))
11198
11199(define-public python2-natsort
11200 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11201 (package (inherit base)
11202 (native-inputs
11203 `(("python2-pathlib" ,python2-pathlib)
11204 ("python2-mock" ,python2-mock)
11205 ("python2-enum34" ,python2-enum34)
11206 ,@(package-native-inputs base))))))
11207
11208(define-public python-glances
11209 (package
11210 (name "python-glances")
11211 (version "2.7.1")
11212 (source
11213 (origin
11214 (method url-fetch)
11215 (uri (pypi-uri "Glances" version))
11216 (sha256
11217 (base32
11218 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11219 (build-system python-build-system)
11220 (propagated-inputs
11221 `(("python-psutil" ,python-psutil)))
11222 (home-page
11223 "https://github.com/nicolargo/glances")
11224 (synopsis
11225 "A cross-platform curses-based monitoring tool")
11226 (description
11227 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11228Glances uses the PsUtil library to get information from your system. It monitors
11229CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11230 (license license:lgpl3+)))
11231
11232(define-public python2-glances
11233 (package-with-python2 python-glances))
11234
11235(define-public python-graphql-core
11236 (package
11237 (name "python-graphql-core")
11238 (version "0.5.3")
11239 (source
11240 (origin
11241 (method url-fetch)
11242 (uri (pypi-uri "graphql-core" version))
11243 (sha256
11244 (base32
11245 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11246 (build-system python-build-system)
11247 (arguments
11248 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11249 #:phases
11250 (modify-phases %standard-phases
11251 (add-after 'unpack 'patch-hardcoded-version
11252 (lambda _ (substitute*
11253 "setup.py"
11254 (("'gevent==1.1rc1'") "'gevent'"))
11255 #t)))))
11256 (native-inputs
11257 `(("python-gevent" ,python-gevent)
11258 ("python-mock" ,python-mock)
11259 ("python-pytest-mock" ,python-pytest-mock)))
11260 (propagated-inputs
11261 `(("python-promise" ,python-promise)
11262 ("python-six" ,python-six)))
11263 (home-page "https://github.com/graphql-python/graphql-core")
11264 (synopsis "GraphQL implementation for Python")
11265 (description
11266 "GraphQL implementation for Python. GraphQL is a data query language and
11267runtime designed and used to request and deliver data to mobile and web apps.
11268This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11269to Python.")
11270 (license license:expat)))
11271
11272(define-public python2-graphql-core
11273 (package-with-python2 python-graphql-core))
11274
11275(define-public python-graphql-relay
11276 (package
11277 (name "python-graphql-relay")
11278 (version "0.4.4")
11279 (source
11280 (origin
11281 (method url-fetch)
11282 (uri (pypi-uri "graphql-relay" version))
11283 (sha256
11284 (base32
11285 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11286 (build-system python-build-system)
11287 (native-inputs
11288 `(("python-pytest" ,python-pytest)))
11289 (propagated-inputs
11290 `(("python-graphql-core" ,python-graphql-core)
11291 ("python-promise" ,python-promise)
11292 ("python-six" ,python-six)))
11293 (home-page "https://github.com/graphql-python/graphql-relay-py")
11294 (synopsis "Relay implementation for Python")
11295 (description
11296 "This is a library to allow the easy creation of Relay-compliant servers
11297using the GraphQL Python reference implementation of a GraphQL server. It
11298should be noted that the code is a exact port of the original
11299@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11300from Facebook.")
11301 (license license:expat)))
11302
11303(define-public python2-graphql-relay
11304 (package-with-python2 python-graphql-relay))
11305
11306(define-public python-graphene
11307 (package
11308 (name "python-graphene")
11309 (version "0.10.2")
11310 (source
11311 (origin
11312 (method url-fetch)
11313 (uri (pypi-uri "graphene" version))
11314 (sha256
11315 (base32
11316 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11317 (build-system python-build-system)
11318 (native-inputs
11319 `(("python-django-filter" ,python-django-filter)
11320 ("python-mock" ,python-mock)
11321 ("python-psycopg2" ,python-psycopg2)
11322 ("python-pytest-django" ,python-pytest-django)
11323 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11324 (propagated-inputs
11325 `(("python-graphql-core" ,python-graphql-core)
11326 ("python-graphql-relay" ,python-graphql-relay)
11327 ("python-iso8601" ,python-iso8601)
11328 ("python-promise" ,python-promise)
11329 ("python-six" ,python-six)))
11330 (home-page "http://graphene-python.org/")
11331 (synopsis "GraphQL Framework for Python")
11332 (description
11333 "Graphene is a Python library for building GraphQL schemas/types.
11334A GraphQL schema describes your data model, and provides a GraphQL server
11335with an associated set of resolve methods that know how to fetch data.")
11336 (properties `((python2-variant . ,(delay python2-graphene))))
11337 (license license:expat)))
11338
11339(define-public python2-graphene
11340 (let ((base (package-with-python2
11341 (strip-python2-variant python-graphene))))
11342 (package (inherit base)
11343 (native-inputs
11344 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11345 ,@(package-native-inputs base))))))
11346
11347(define-public python-nautilus
11348 (package
11349 (name "python-nautilus")
11350 (version "0.4.9")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (pypi-uri "nautilus" version))
11355 (sha256
11356 (base32
11357 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11358 (build-system python-build-system)
11359 (arguments `(#:tests? #f)) ; fails to import test modules
11360 (propagated-inputs
11361 `(("python-bcrypt" ,python-bcrypt)
11362 ("python-click" ,python-click)
11363 ("python-consul" ,python-consul)
11364 ("python-graphene" ,python-graphene)
11365 ("python-jinja2" ,python-jinja2)
11366 ("python-peewee" ,python-peewee)
11367 ("python-pika" ,python-pika)
11368 ("python-tornado" ,python-tornado)
11369 ("python-wtforms" ,python-wtforms)))
11370 (native-inputs
11371 `(("python-nose2" ,python-nose2)))
11372 (home-page "https://github.com/AlecAivazis/nautilus")
11373 (synopsis "Library for creating microservice applications")
11374 (description
11375 "Nautilus is a framework for flux based microservices that looks to
11376provide extendible implementations of common aspects of a cloud so that you can
11377focus on building massively scalable web applications.")
11378 (license license:expat)))
11379
11380(define-public python-betamax
11381 (package
11382 (name "python-betamax")
11383 (version "0.8.0")
11384 (source
11385 (origin
11386 (method url-fetch)
11387 (uri (pypi-uri "betamax" version))
11388 (sha256
11389 (base32
11390 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11391 (build-system python-build-system)
11392 (arguments
11393 '(;; Many tests fail because they require networking.
11394 #:tests? #f))
11395 (propagated-inputs
11396 `(("python-requests" ,python-requests)))
11397 (home-page "https://github.com/sigmavirus24/betamax")
11398 (synopsis "Record HTTP interactions with python-requests")
11399 (description "Betamax will record your test suite's HTTP interactions and
11400replay them during future tests. It is designed to work with python-requests.")
11401 (license license:expat)))
11402
11403(define-public python2-betamax
11404 (package-with-python2 python-betamax))
11405
11406(define-public python-s3transfer
11407 (package
11408 (name "python-s3transfer")
11409 (version "0.1.8")
11410 (source (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "s3transfer" version))
11413 (sha256
11414 (base32
11415 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11416 (build-system python-build-system)
11417 (arguments
11418 `(#:phases
11419 (modify-phases %standard-phases
11420 (replace 'check
11421 (lambda _
11422 ;; 7 of the 'integration' tests require network access or login
11423 ;; credentials.
11424 (zero? (system* "nosetests" "--exclude=integration")))))))
11425 (native-inputs
11426 `(("python-docutils" ,python-docutils)
11427 ("python-mock" ,python-mock)
11428 ("python-nose" ,python-nose)))
11429 (propagated-inputs
11430 `(("python-botocore" ,python-botocore)))
11431 (synopsis "Amazon S3 Transfer Manager")
11432 (description "S3transfer is a Python library for managing Amazon S3
11433transfers.")
11434 (home-page "https://github.com/boto/s3transfer")
11435 (license license:asl2.0)
11436 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11437
11438(define-public python2-s3transfer
11439 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11440 (package
11441 (inherit base)
11442 (native-inputs
11443 `(("python2-futures" ,python2-futures)
11444 ,@(package-native-inputs base))))))
11445
11446(define-public python-setproctitle
11447(package
11448 (name "python-setproctitle")
11449 (version "1.1.10")
11450 (source
11451 (origin
11452 (method url-fetch)
11453 (uri (pypi-uri "setproctitle" version))
11454 (sha256
11455 (base32
11456 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11457 (build-system python-build-system)
11458 (arguments
11459 '(#:phases
11460 (modify-phases %standard-phases
11461 (add-before 'check 'patch-Makefile
11462 ;; Stricly this is only required for the python2 variant.
11463 ;; But adding a phase in an inherited package seems to be
11464 ;; cumbersum. So we patch even for python3.
11465 (lambda _
11466 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11467 (when nose
11468 (substitute* "Makefile"
11469 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11470 (string-append nose "/bin/nosetests "))))
11471 #t)))
11472 (replace 'check
11473 (lambda _
11474 (setenv "PYTHON" (or (which "python3") (which "python")))
11475 (setenv "PYCONFIG" (or (which "python3-config")
11476 (which "python-config")))
11477 (setenv "CC" "gcc")
11478 ;; No need to extend PYTHONPATH to find the built package, since
11479 ;; the Makefile will build anyway
11480 (zero? (system* "make" "check")))))))
11481 (native-inputs
11482 `(("procps" ,procps))) ; required for tests
11483 (home-page
11484 "https://github.com/dvarrazzo/py-setproctitle")
11485 (synopsis
11486 "Setproctitle implementation for Python to customize the process title")
11487 (description "The library allows a process to change its title (as displayed
11488by system tools such as ps and top).
11489
11490Changing the title is mostly useful in multi-process systems, for
11491example when a master process is forked: changing the children's title
11492allows to identify the task each process is busy with. The technique
11493is used by PostgreSQL and the OpenSSH Server for example.")
11494 (license license:bsd-3)
11495 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11496
11497(define-public python2-setproctitle
11498 (let ((base (package-with-python2
11499 (strip-python2-variant python-setproctitle))))
11500 (package
11501 (inherit base)
11502 (native-inputs `(("python2-nose" ,python2-nose)
11503 ,@(package-native-inputs base))))))
11504
11505(define-public python-validictory
11506 (package
11507 (name "python-validictory")
11508 (version "1.0.1")
11509 (source
11510 (origin
11511 (method url-fetch)
11512 (uri (pypi-uri "validictory" version))
11513 (sha256
11514 (base32
11515 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11516 (build-system python-build-system)
11517 (arguments
11518 '(#:phases
11519 (modify-phases %standard-phases
11520 (add-after 'unpack 'bootstrap
11521 ;; Move the tests out of the package directory to avoid
11522 ;; packaging them.
11523 (lambda* _
11524 (rename-file "validictory/tests" "tests")
11525 (delete-file "tests/__init__.py")))
11526 (replace 'check
11527 (lambda _
11528 ;; Extend PYTHONPATH so the built package will be found.
11529 (setenv "PYTHONPATH"
11530 (string-append (getcwd) "/build/lib:"
11531 (getenv "PYTHONPATH")))
11532 (zero? (system* "py.test" "-vv" )))))))
11533 (native-inputs
11534 `(("python-pytest" ,python-pytest)))
11535 (home-page
11536 "https://github.com/jamesturk/validictory")
11537 (synopsis "General purpose Python data validator")
11538 (description "It allows validation of arbitrary Python data structures.
11539
11540The schema format is based on the JSON Schema
11541proposal (http://json-schema.org), so combined with json the library is also
11542useful as a validator for JSON data.")
11543 (license license:expat)))
11544
11545(define-public python2-validictory
11546 (package-with-python2 python-validictory))
11547
11548(define-public python-aniso8601
11549 (package
11550 (name "python-aniso8601")
11551 (version "1.1.0")
11552 (source
11553 (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "aniso8601" version))
11556 (sha256
11557 (base32
11558 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11559 (build-system python-build-system)
11560 (propagated-inputs
11561 `(("python-dateutil-2" ,python-dateutil-2)))
11562 (home-page
11563 "https://bitbucket.org/nielsenb/aniso8601")
11564 (synopsis
11565 "Python library for parsing ISO 8601 strings")
11566 (description
11567 "This package contains a library for parsing ISO 8601 datetime strings.")
11568 (license license:bsd-3)))
11569
11570(define-public python-flask-restful
11571 (package
11572 (name "python-flask-restful")
11573 (version "0.3.5")
11574 (source
11575 (origin
11576 (method url-fetch)
11577 (uri (pypi-uri "Flask-RESTful" version))
11578 (sha256
11579 (base32
11580 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11581 (build-system python-build-system)
11582 (propagated-inputs
11583 `(("python-aniso8601" ,python-aniso8601)
11584 ("python-flask" ,python-flask)
11585 ("python-pycrypto" ,python-pycrypto)
11586 ("python-pytz" ,python-pytz)))
11587 (native-inputs
11588 `(;; Optional dependency of Flask. Tests need it.
11589 ("python-blinker" ,python-blinker)
11590 ("python-mock" ,python-mock) ; For tests
11591 ("python-nose" ,python-nose) ; For tests
11592 ("python-sphinx" ,python-sphinx)))
11593 (home-page
11594 "https://www.github.com/flask-restful/flask-restful/")
11595 (synopsis
11596 "Flask module for creating REST APIs")
11597 (description
11598 "This package contains a Flask module for creating REST APIs.")
11599 (license license:bsd-3)))
11600
11601(define-public python-flask-basicauth
11602 (package
11603 (name "python-flask-basicauth")
11604 (version "0.2.0")
11605 (source
11606 (origin
11607 (method url-fetch)
11608 (uri (pypi-uri "Flask-BasicAuth" version))
11609 (sha256
11610 (base32
11611 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11612 (build-system python-build-system)
11613 (propagated-inputs
11614 `(("python-flask" ,python-flask)))
11615 (home-page
11616 "https://github.com/jpvanhal/flask-basicauth")
11617 (synopsis
11618 "HTTP basic access authentication for Flask")
11619 (description
11620 "This package provides HTTP basic access authentication for Flask.")
11621 (license license:bsd-3)))
11622
11623(define-public python-flask-sqlalchemy
11624 (package
11625 (name "python-flask-sqlalchemy")
11626 (version "2.1")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "Flask-SQLAlchemy" version))
11631 (sha256
11632 (base32
11633 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11634 (build-system python-build-system)
11635 (propagated-inputs
11636 `(("python-flask" ,python-flask)
11637 ("python-sqlalchemy" ,python-sqlalchemy)))
11638 (home-page
11639 "http://github.com/mitsuhiko/flask-sqlalchemy")
11640 (synopsis
11641 "Module adding SQLAlchemy support to your Flask application")
11642 (description
11643 "This package adds SQLAlchemy support to your Flask application.")
11644 (license license:bsd-3)))
11645
11646(define-public python-pyev
11647 (package
11648 (name "python-pyev")
11649 (version "0.9.0")
11650 (source
11651 (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "pyev" version))
11654 (sha256
11655 (base32
11656 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11657 (build-system python-build-system)
11658 (arguments
11659 `(#:tests? #f ; no test suite
11660 #:phases
11661 (modify-phases %standard-phases
11662 (add-after 'unpack 'patch
11663 (lambda* (#:key inputs #:allow-other-keys)
11664 (let ((libev (string-append (assoc-ref inputs "libev")
11665 "/lib/libev.so.4")))
11666 (substitute* "setup.py"
11667 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11668 (string-append "libev_dll_name = \"" libev "\"")))))))))
11669 (inputs
11670 `(("libev" ,libev)))
11671 (home-page "http://pythonhosted.org/pyev/")
11672 (synopsis "Python libev interface")
11673 (description "Pyev provides a Python interface to libev.")
11674 (license license:gpl3)))
11675
11676(define-public python2-pyev
11677 (package-with-python2 python-pyev))
11678
11679(define-public python-imagesize
11680 (package
11681 (name "python-imagesize")
11682 (version "0.7.1")
11683 (source
11684 (origin
11685 (method url-fetch)
11686 (uri (pypi-uri "imagesize" version))
11687 (sha256
11688 (base32
11689 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11690 (build-system python-build-system)
11691 (arguments
11692 '(;; Test files are not distributed on PyPi:
11693 ;; https://github.com/shibukawa/imagesize_py/issues/7
11694 #:tests? #f))
11695 (home-page "https://github.com/shibukawa/imagesize_py")
11696 (synopsis "Gets image size of files in variaous formats in Python")
11697 (description
11698 "This package allows determination of image size from
11699PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11700 (license license:expat)))
11701
11702(define-public python2-imagesize
11703 (package-with-python2 python-imagesize))
11704
11705(define-public python-axolotl-curve25519
11706 (package
11707 (name "python-axolotl-curve25519")
11708 (version "0.1")
11709 (source
11710 (origin
11711 (method git-fetch)
11712 (uri (git-reference
11713 (url "git://github.com/tgalal/python-axolotl-curve25519")
11714 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11715 (file-name (string-append name "-" version "-checkout"))
11716 (sha256
11717 (base32
11718 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11719 (build-system python-build-system)
11720 (arguments
11721 `(;; Prevent creation of the egg. This works around
11722 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11723 #:configure-flags '("--root=/")))
11724 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11725 (synopsis "Python wrapper for curve25519 library")
11726 (description "This is a python wrapper for the curve25519 library
11727with ed25519 signatures. The C code was pulled from
11728libaxolotl-android. At the moment this wrapper is meant for use by
11729python-axolotl.")
11730 (license (list license:gpl3 ; Most files
11731 license:bsd-3)))) ; curve/curve25519-donna.c
11732
11733(define-public python2-axolotl-curve25519
11734 (package-with-python2 python-axolotl-curve25519))
11735
11736(define-public python-axolotl
11737 (package
11738 (name "python-axolotl")
11739 (version "0.1.35")
11740 (source
11741 (origin
11742 (method url-fetch)
11743 (uri (string-append
11744 "https://github.com/tgalal/python-axolotl/archive/"
11745 version ".tar.gz"))
11746 (file-name (string-append name "-" version ".tar.gz"))
11747 (sha256
11748 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11749 (build-system python-build-system)
11750 (arguments
11751 `(#:phases
11752 (modify-phases %standard-phases
11753 ;; Don't install tests
11754 (add-before 'install 'remove-tests
11755 (lambda _
11756 (for-each delete-file-recursively
11757 '("axolotl/tests" "build/lib/axolotl/tests"))
11758 #t)))
11759 ;; Prevent creation of the egg. This works around
11760 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11761 #:configure-flags '("--root=/")))
11762 (propagated-inputs
11763 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11764 ("python-dateutil" ,python-dateutil)
11765 ("python-protobuf" ,python-protobuf)
11766 ("python-pycrypto" ,python-pycrypto)))
11767 (home-page "https://github.com/tgalal/python-axolotl")
11768 (synopsis "Python port of libaxolotl-android")
11769 (description "This is a python port of libaxolotl-android. This
11770is a ratcheting forward secrecy protocol that works in synchronous and
11771asynchronous messaging environments.")
11772 (license license:gpl3)))
11773
11774(define-public python2-axolotl
11775 (package-with-python2 python-axolotl))
11776
11777(define-public python-termstyle
11778 (package
11779 (name "python-termstyle")
11780 (version "0.1.11")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "termstyle" version))
11785 (sha256
11786 (base32
11787 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11788 (build-system python-build-system)
11789 (home-page "http://github.com/gfxmonk/termstyle")
11790 (synopsis "Console text coloring for Python")
11791 (description "This package provides console text coloring for Python.")
11792 (license license:bsd-3)))
11793
11794(define-public python-rednose
11795 (package
11796 (name "python-rednose")
11797 (version "1.2.1")
11798 (source
11799 (origin
11800 (method url-fetch)
11801 (uri (pypi-uri "rednose" version))
11802 (sha256
11803 (base32
11804 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11805 (build-system python-build-system)
11806 (arguments
11807 `(#:phases
11808 (modify-phases %standard-phases
11809 (add-after 'unpack 'fix-deps
11810 (lambda _
11811 ;; See <https://github.com/JBKahn/rednose/issues/12>
11812 (substitute* "setup.py"
11813 (("python-termstyle") "termstyle"))
11814 #t)))))
11815 (propagated-inputs
11816 `(("python-colorama" ,python-colorama)
11817 ("python-termstyle" ,python-termstyle)))
11818 (native-inputs
11819 `(("python-six" ,python-six)
11820 ("python-nose" ,python-nose)))
11821 (home-page "https://github.com/JBKahn/rednose")
11822 (synopsis "Colored output for Python nosetests")
11823 (description "This package provides colored output for the
11824@command{nosetests} command of the Python Nose unit test framework.")
11825 (license license:bsd-3)))
11826
11827(define-public python-flask-restplus
11828 (package
11829 (name "python-flask-restplus")
11830 (version "0.9.2")
11831 (source
11832 (origin
11833 (method url-fetch)
11834 (uri (pypi-uri "flask-restplus" version))
11835 (sha256
11836 (base32
11837 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11838 (build-system python-build-system)
11839 (propagated-inputs
11840 `(("python-aniso8601" ,python-aniso8601)
11841 ("python-flask" ,python-flask)
11842 ("python-jsonschema" ,python-jsonschema)
11843 ("python-pytz" ,python-pytz)
11844 ("python-six" ,python-six)))
11845 (native-inputs
11846 `(("python-tzlocal" ,python-tzlocal)
11847 ("python-blinker" ,python-blinker)
11848 ("python-nose" ,python-nose)
11849 ("python-rednose" ,python-rednose)))
11850 (home-page "https://github.com/noirbizarre/flask-restplus")
11851 (synopsis "Framework for documented API development with Flask")
11852 (description "This package provides a framework for API development with
11853the Flask web framework in Python. It is similar to package
11854@code{python-flask-restful} but supports the @code{python-swagger}
11855documentation builder.")
11856 (license license:expat)))
11857
11858(define-public python-sadisplay
11859 (package
11860 (name "python-sadisplay")
11861 (version "0.4.6")
11862 (source
11863 (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "sadisplay" version))
11866 (sha256
11867 (base32
11868 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
11869 (build-system python-build-system)
11870 (propagated-inputs
11871 `(("python-sqlalchemy" ,python-sqlalchemy)))
11872 (native-inputs
11873 `(("python-nose" ,python-nose)))
11874 (home-page "https://bitbucket.org/estin/sadisplay")
11875 (synopsis "SQLAlchemy schema displayer")
11876 (description "This package provides a program to build Entity
11877Relationship diagrams from a SQLAlchemy model (or directly from the
11878database).")
11879 (license license:bsd-3)))
11880
11881(define-public python2-sadisplay
11882 (package-with-python2 python-sadisplay))
11883
11884(define-public python-flask-restful-swagger
11885 (package
11886 (name "python-flask-restful-swagger")
11887 (version "0.19")
11888 (source
11889 (origin
11890 (method url-fetch)
11891 (uri (pypi-uri "flask-restful-swagger" version))
11892 (sha256
11893 (base32
11894 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
11895 (build-system python-build-system)
11896 (propagated-inputs
11897 `(("python-flask-restful" ,python-flask-restful)))
11898 (home-page "https://github.com/rantav/flask-restful-swagger")
11899 (synopsis "Extract Swagger specs from Flask-Restful projects")
11900 (description "This package lets you extract Swagger API documentation
11901specs from your Flask-Restful projects.")
11902 (license license:expat)))
11903
11904(define-public python2-flask-restful-swagger
11905 (package-with-python2 python-flask-restful-swagger))
11906
11907(define-public python-argcomplete
11908 (package
11909 (name "python-argcomplete")
11910 (version "1.7.0")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "argcomplete" version))
11915 (sha256
11916 (base32
11917 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11918 (build-system python-build-system)
11919 (home-page "https://github.com/kislyuk/argcomplete")
11920 (synopsis "Shell tab completion for Python argparse")
11921 (description "argcomplete provides extensible command line tab completion
11922of arguments and options for Python scripts using @code{argparse}. It's
11923particularly useful for programs with many options or sub-parsers that can
11924dynamically suggest completions; for example, when browsing resources over the
11925network.")
11926 (license license:asl2.0)))
11927
11928(define-public python2-argcomplete
11929 (package-with-python2 python-argcomplete))
11930
11931(define-public python-xopen
11932 (package
11933 (name "python-xopen")
11934 (version "0.1.1")
11935 (source
11936 (origin
11937 (method url-fetch)
11938 (uri (pypi-uri "xopen" version))
11939 (sha256
11940 (base32
11941 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
11942 (file-name (string-append name "-" version ".tar.gz"))))
11943 (build-system python-build-system)
11944 (home-page "https://github.com/marcelm/xopen/")
11945 (synopsis "Open compressed files transparently")
11946 (description "This module provides an @code{xopen} function that works like
11947Python's built-in @code{open} function, but can also deal with compressed files.
11948Supported compression formats are gzip, bzip2 and, xz, and are automatically
11949recognized by their file extensions. The focus is on being as efficient as
11950possible on all supported Python versions.")
11951 (license license:expat)))
11952
11953(define-public python2-xopen
11954 (package-with-python2 python-xopen))