gnu: Remove python-setuptools and python2-setuptools from inputs (part 2)
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages python)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages adns)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages file)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages imagemagick)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages multiprecision)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages openstack)
80 #:use-module (gnu packages password-utils)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages statistics)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages version-control)
92 #:use-module (gnu packages video)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages base)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages zip)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages bdw-gc)
101 #:use-module (guix packages)
102 #:use-module (guix download)
103 #:use-module (guix git-download)
104 #:use-module (guix utils)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system cmake)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
110
111 (define-public python-2.7
112 (package
113 (name "python")
114 (version "2.7.12")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "https://www.python.org/ftp/python/"
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
125 "python-2.7-site-prefixes.patch"
126 "python-2.7-source-date-epoch.patch"))
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
135 "Lib/test/test_ctypes.py" ; fails on mips64el
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
140 "Lib/test/test_subprocess.py"))
141 #t))))
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
144 (build-system gnu-build-system)
145 (arguments
146 `(;; 356 tests OK.
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
162 #:test-target "test"
163 #:configure-flags
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 "--with-ensurepip=install" ;install pip and setuptools
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
169
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
172 #:phases
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
189 (setenv "SOURCE_DATE_EPOCH" "1")
190 #t))
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t)))
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
277 (inputs
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
280 ("libffi" ,libffi) ; for ctypes
281 ("sqlite" ,sqlite) ; for sqlite extension
282 ("openssl" ,openssl)
283 ("readline" ,readline)
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
292 (files '("lib/python2.7/site-packages")))))
293 (home-page "https://www.python.org")
294 (synopsis "High-level, dynamically-typed programming language")
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297 is used in a wide variety of application domains. Some of its key
298 distinguishing features include: clear, readable syntax; strong
299 introspection capabilities; intuitive object orientation; natural
300 expression of procedural code; full modularity, supporting hierarchical
301 packages; exception-based error handling; and very high level dynamic
302 data types.")
303 (license license:psfl)))
304
305 ;; Current 2.x version.
306 (define-public python-2 python-2.7)
307
308 (define-public python-3.5
309 (package (inherit python-2)
310 (version "3.5.2")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
315 (patches (search-patches
316 "python-fix-tests.patch"
317 "python-3.5-fix-tests.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 (define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
350 ;; Current 3.x version.
351 (define-public python-3 python-3.5)
352
353 ;; Current major version.
354 (define-public python python-3)
355
356 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
357 ;; Python (Tk -> libxcb -> Python.)
358
359 (define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
362 (outputs '("out"))
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
367 (inputs '()))) ;none of the optional dependencies
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (home-page "https://www.github.com/giampaolo/psutil")
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442 information on running processes and system utilization (CPU, memory, disks,
443 network) in Python. It is useful mainly for system monitoring, profiling and
444 limiting process resources and management of running processes. It implements
445 many functionalities offered by command line tools such as: ps, top, lsof,
446 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447 pidof, tty, taskset, pmap.")
448 (license license:bsd-3)))
449
450 (define-public python2-psutil
451 (package-with-python2 python-psutil))
452
453 (define-public python-passlib
454 (package
455 (name "python-passlib")
456 (version "1.6.5")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "passlib" version))
461 (sha256
462 (base32
463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-nose" ,python-nose)))
467 (inputs
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481 cross-platform implementations of over 30 password hashing algorithms, as well
482 as a framework for managing existing password hashes. It's designed to be
483 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484 to providing full-strength password hashing for multi-user application.")
485 (license license:bsd-3)))
486
487 (define-public python2-passlib
488 (package-with-python2 python-passlib))
489
490 (define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510 system hashes passwords using a version of Bruce Schneier's Blowfish block
511 cipher with modifications designed to raise the cost of off-line password
512 cracking and frustrate fast hardware implementation. The computation cost of
513 the algorithm is parametised, so it can be increased as computers get faster.
514 The intent is to make a compromise of a password database less likely to
515 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516 John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
520 (license (list license:isc license:bsd-3 license:bsd-4))))
521
522 (define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
526 (define-public python-paramiko
527 (package
528 (name "python-paramiko")
529 (version "1.16.0")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "paramiko" version))
534 (sha256
535 (base32
536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
537 (build-system python-build-system)
538 (propagated-inputs
539 `(("python-pycrypto" ,python-pycrypto)))
540 (inputs
541 `(("python-ecdsa" ,python-ecdsa)))
542 (home-page "http://www.paramiko.org/")
543 (synopsis "SSHv2 protocol library")
544 (description "Paramiko is a python implementation of the SSHv2 protocol,
545 providing both client and server functionality. While it leverages a Python C
546 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
547 Python interface around SSH networking concepts.")
548 (license license:lgpl2.1+)))
549
550 (define-public python2-paramiko
551 (package-with-python2 python-paramiko))
552
553
554 (define-public python-httplib2
555 (package
556 (name "python-httplib2")
557 (version "0.9.2")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "httplib2" version))
562 (sha256
563 (base32
564 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
565 (build-system python-build-system)
566 (home-page "https://github.com/jcgregorio/httplib2")
567 (synopsis "Comprehensive HTTP client library")
568 (description
569 "A comprehensive HTTP client library supporting many features left out of
570 other HTTP libraries.")
571 (license license:expat)))
572
573 (define-public python2-httplib2
574 (package-with-python2 python-httplib2))
575
576 (define-public python-ecdsa
577 (package
578 (name "python-ecdsa")
579 (version "0.13")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (string-append
584 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
585 version
586 ".tar.gz"))
587 (sha256
588 (base32
589 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
590 (build-system python-build-system)
591 (inputs
592 `(("openssl" ,openssl)))
593 (home-page
594 "http://github.com/warner/python-ecdsa")
595 (synopsis
596 "ECDSA cryptographic signature library (pure python)")
597 (description
598 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
599 Curve Digital Signature Algorithm), implemented purely in Python. With this
600 library, you can quickly create keypairs (signing key and verifying key), sign
601 messages, and verify the signatures. The keys and signatures are very short,
602 making them easy to handle and incorporate into other protocols.")
603 (license license:expat)))
604
605 (define-public python2-ecdsa
606 (package-with-python2 python-ecdsa))
607
608 (define-public python-ccm
609 (package
610 (name "python-ccm")
611 (version "2.1.6")
612 (source
613 (origin
614 (method url-fetch)
615 (uri (pypi-uri "ccm" version))
616 (sha256
617 (base32
618 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
619 (build-system python-build-system)
620 (inputs
621 `(("python-pyyaml" ,python-pyyaml)
622 ("python-six" ,python-six)))
623 (home-page "https://github.com/pcmanus/ccm")
624 (synopsis "Cassandra Cluster Manager")
625 (description "A script/library to create, launch and remove an Apache
626 Cassandra cluster on localhost.")
627 (license license:asl2.0)))
628
629 (define-public python2-ccm
630 (package-with-python2 python-ccm))
631
632 (define-public python-pytz
633 (package
634 (name "python-pytz")
635 (version "2016.3")
636 (source
637 (origin
638 (method url-fetch)
639 (uri (pypi-uri "pytz" version ".tar.bz2"))
640 (sha256
641 (base32
642 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
643 (build-system python-build-system)
644 (arguments `(#:tests? #f)) ; no test target
645 (home-page "http://pythonhosted.org/pytz")
646 (synopsis "Python timezone library")
647 (description
648 "This library allows accurate and cross platform timezone calculations
649 using Python 2.4 or higher and provides access to the Olson timezone database.")
650 (license license:expat)))
651
652 (define-public python2-pytz
653 (package-with-python2 python-pytz))
654
655
656 (define-public python-babel
657 (package
658 (name "python-babel")
659 (version "2.3.2")
660 (source
661 (origin
662 (method url-fetch)
663 (uri (pypi-uri "Babel" version))
664 (sha256
665 (base32
666 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
667 (build-system python-build-system)
668 (inputs
669 `(("python-pytz" ,python-pytz)))
670 (arguments `(#:tests? #f)) ; no test target
671 (home-page "http://babel.pocoo.org/")
672 (synopsis
673 "Tools for internationalizing Python applications")
674 (description
675 "Babel is composed of two major parts:
676 - tools to build and work with gettext message catalogs
677 - a Python interface to the CLDR (Common Locale Data Repository), providing
678 access to various locale display names, localized number and date formatting,
679 etc. ")
680 (license license:bsd-3)))
681
682 (define-public python2-babel
683 (package-with-python2 python-babel))
684
685 (define-public python2-backport-ssl-match-hostname
686 (package
687 (name "python2-backport-ssl-match-hostname")
688 (version "3.5.0.1")
689 (source
690 (origin
691 (method url-fetch)
692 (uri (string-append
693 "https://pypi.python.org/packages/source/b/"
694 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
695 version ".tar.gz"))
696 (sha256
697 (base32
698 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
699 (build-system python-build-system)
700 (arguments
701 `(#:python ,python-2
702 #:tests? #f)) ; no test target
703 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
704 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
705 (description
706 "This backport brings the ssl.match_hostname() function to users of
707 earlier versions of Python. The function checks the hostname in the
708 certificate returned by the server to which a connection has been established,
709 and verifies that it matches the intended target hostname.")
710 (license license:psfl)))
711
712 (define-public python-h5py
713 (package
714 (name "python-h5py")
715 (version "2.6.0")
716 (source
717 (origin
718 (method url-fetch)
719 (uri (pypi-uri "h5py" version))
720 (sha256
721 (base32
722 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
723 (build-system python-build-system)
724 (arguments
725 `(#:tests? #f ; no test target
726 #:phases
727 (modify-phases %standard-phases
728 (add-after 'unpack 'fix-hdf5-paths
729 (lambda* (#:key inputs #:allow-other-keys)
730 (let ((prefix (assoc-ref inputs "hdf5")))
731 (substitute* "setup_build.py"
732 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
733 (string-append "['" prefix "/lib" "']"))
734 (("'/opt/local/include', '/usr/local/include'")
735 (string-append "'" prefix "/include" "'")))
736 (substitute* "setup_configure.py"
737 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
738 (string-append "['" prefix "/lib" "']")))
739 #t))))))
740 (propagated-inputs
741 `(("python-numpy" ,python-numpy)))
742 (inputs
743 `(("hdf5" ,hdf5)
744 ("python-six" ,python-six)))
745 (native-inputs
746 `(("python-cython" ,python-cython)
747 ("python-pkgconfig" ,python-pkgconfig)))
748 (home-page "http://www.h5py.org/")
749 (synopsis "Read and write HDF5 files from Python")
750 (description
751 "The h5py package provides both a high- and low-level interface to the
752 HDF5 library from Python. The low-level interface is intended to be a
753 complete wrapping of the HDF5 API, while the high-level component supports
754 access to HDF5 files, datasets and groups using established Python and NumPy
755 concepts.")
756 (license license:bsd-3)
757 (properties `((python2-variant . ,(delay python2-h5py))))))
758
759 (define-public python2-h5py
760 (package-with-python2 (strip-python2-variant python-h5py)))
761
762 (define-public python-lockfile
763 (package
764 (name "python-lockfile")
765 (version "0.12.2")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
770 "lockfile-" version ".tar.gz"))
771 (sha256
772 (base32
773 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
774 (build-system python-build-system)
775 (arguments '(#:test-target "check"))
776 (native-inputs
777 `(("python-pbr" ,python-pbr)))
778 (home-page "https://launchpad.net/pylockfile")
779 (synopsis "Platform-independent file locking module")
780 (description
781 "The lockfile package exports a LockFile class which provides a simple
782 API for locking files.")
783 (license license:expat)
784 (properties `((python2-variant . ,(delay python2-lockfile))))))
785
786 (define-public python2-lockfile
787 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
788 (package
789 (inherit base)
790 (native-inputs `(("python2-setuptools" ,python2-setuptools)
791 ,@(package-native-inputs base))))))
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 (string-append "https://pypi.python.org/packages/source/m/mock/"
801 "mock-" version ".tar.gz"))
802 (sha256
803 (base32
804 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
805 (build-system python-build-system)
806 (arguments '(#:test-target "check"))
807 (home-page "http://code.google.com/p/mock/")
808 (synopsis "Python mocking and patching library for testing")
809 (description
810 "Mock is a library for testing in Python. It allows you to replace parts
811 of your system under test with mock objects and make assertions about how they
812 have been used.")
813 (license license:expat)))
814
815 (define-public python2-mock
816 (package-with-python2 python-mock))
817
818
819 (define-public python-setuptools
820 (package
821 (name "python-setuptools")
822 (version "18.3.1")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
827 version ".tar.gz"))
828 (sha256
829 (base32
830 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
831 (build-system python-build-system)
832 ;; FIXME: Tests require pytest, which itself relies on setuptools.
833 ;; One could bootstrap with an internal untested setuptools.
834 (arguments
835 `(#:tests? #f))
836 (home-page "https://pypi.python.org/pypi/setuptools")
837 (synopsis
838 "Library designed to facilitate packaging Python projects")
839 (description
840 "Setuptools is a fully-featured, stable library designed to facilitate
841 packaging Python projects, where packaging includes:
842 Python package and module definitions,
843 distribution package metadata,
844 test hooks,
845 project installation,
846 platform-specific details,
847 Python 3 support.")
848 (license license:psfl)))
849
850 (define-public python2-setuptools
851 (package-with-python2 python-setuptools))
852
853
854 (define-public python-pycrypto
855 (package
856 (name "python-pycrypto")
857 (version "2.6.1")
858 (source
859 (origin
860 (method url-fetch)
861 (uri (string-append "https://pypi.python.org/packages/source/p/"
862 "pycrypto/pycrypto-" version ".tar.gz"))
863 (sha256
864 (base32
865 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
866 (build-system python-build-system)
867 (inputs
868 `(("python" ,python)
869 ("gmp" ,gmp)))
870 (arguments
871 `(#:phases
872 (alist-cons-before
873 'build 'set-build-env
874 ;; pycrypto runs an autoconf configure script behind the scenes
875 (lambda _
876 (setenv "CONFIG_SHELL" (which "bash")))
877 %standard-phases)))
878 (home-page "http://www.pycrypto.org/")
879 (synopsis "Cryptographic modules for Python")
880 (description
881 "Pycrypto is a collection of both secure hash functions (such as SHA256
882 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
883 etc.). The package is structured to make adding new modules easy.")
884 (license license:public-domain)))
885
886 (define-public python2-pycrypto
887 (let ((pycrypto (package-with-python2 python-pycrypto)))
888 (package (inherit pycrypto)
889 (inputs
890 `(("python" ,python-2)
891 ,@(alist-delete
892 "python"
893 (package-inputs pycrypto)))))))
894
895 (define-public python-keyring
896 (package
897 (name "python-keyring")
898 (version "8.7")
899 (source
900 (origin
901 (method url-fetch)
902 (uri (pypi-uri "keyring" version))
903 (sha256
904 (base32
905 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
906 (build-system python-build-system)
907 (native-inputs
908 `(("python-setuptools-scm" ,python-setuptools-scm)))
909 (inputs
910 `(("python-pycrypto" ,python-pycrypto)))
911 (arguments
912 `(#:tests? #f)) ;TODO: tests require pytest
913 (home-page "https://github.com/jaraco/keyring")
914 (synopsis "Store and access your passwords safely")
915 (description
916 "The Python keyring lib provides a easy way to access the system keyring
917 service from python. It can be used in any application that needs safe
918 password storage.")
919 ;; "MIT" and PSF dual license
920 (license license:x11)
921 (properties `((python2-variant . ,(delay python2-keyring))))))
922
923 (define-public python2-keyring
924 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
925 (package
926 (inherit base)
927 (native-inputs `(("python2-setuptools" ,python2-setuptools)
928 ,@(package-native-inputs base))))))
929
930 (define-public python-six
931 (package
932 (name "python-six")
933 (version "1.10.0")
934 (source
935 (origin
936 (method url-fetch)
937 (uri (pypi-uri "six" version))
938 (sha256
939 (base32
940 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
941 (build-system python-build-system)
942 (home-page "http://pypi.python.org/pypi/six/")
943 (synopsis "Python 2 and 3 compatibility utilities")
944 (description
945 "Six is a Python 2 and 3 compatibility library. It provides utility
946 functions for smoothing over the differences between the Python versions with
947 the goal of writing Python code that is compatible on both Python versions.
948 Six supports every Python version since 2.5. It is contained in only one
949 Python file, so it can be easily copied into your project.")
950 (license license:x11)))
951
952 (define-public python2-six
953 (package-with-python2 python-six))
954
955 (define-public python-dateutil-2
956 (package
957 (name "python-dateutil")
958 (version "2.5.2")
959 (source
960 (origin
961 (method url-fetch)
962 (uri (pypi-uri "python-dateutil" version))
963 (sha256
964 (base32
965 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
966 (build-system python-build-system)
967 (inputs
968 `(("python-six" ,python-six)))
969 (home-page "https://dateutil.readthedocs.io/en/stable/")
970 (synopsis "Extensions to the standard datetime module")
971 (description
972 "The dateutil module provides powerful extensions to the standard
973 datetime module, available in Python 2.3+.")
974 (license license:bsd-3)
975 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
976
977 (define-public python2-dateutil-2
978 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
979 (package
980 (inherit base)
981 (inputs `(("python2-setuptools" ,python2-setuptools)
982 ,@(package-inputs base))))))
983
984 (define-public python-dateutil
985 (package
986 (name "python-dateutil")
987 (version "1.5") ; last version for python < 3
988 (source
989 (origin
990 (method url-fetch)
991 (uri (string-append "http://labix.org/download/python-dateutil/"
992 "python-dateutil-" version ".tar.gz"))
993 (sha256
994 (base32
995 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
996 (build-system python-build-system)
997 (home-page "https://dateutil.readthedocs.io/en/stable/")
998 (synopsis "Extensions to the standard datetime module")
999 (description
1000 "The dateutil module provides powerful extensions to the standard
1001 datetime module, available in Python 2.3+.")
1002 (license license:psfl)))
1003
1004 (define-public python2-dateutil
1005 (package-with-python2 python-dateutil))
1006
1007 (define-public python-parsedatetime
1008 (package
1009 (name "python-parsedatetime")
1010 (version "2.1")
1011 (source
1012 (origin
1013 (method url-fetch)
1014 (uri (pypi-uri "parsedatetime" version))
1015 (sha256
1016 (base32
1017 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1018 (build-system python-build-system)
1019 (native-inputs
1020 `(("python-nose" ,python-nose)
1021 ("python-pyicu" ,python-pyicu)))
1022 (home-page "http://github.com/bear/parsedatetime/")
1023 (synopsis
1024 "Parse human-readable date/time text")
1025 (description
1026 "Parse human-readable date/time text.")
1027 (license license:asl2.0)
1028 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
1029
1030 (define-public python2-parsedatetime
1031 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1032 (package
1033 (inherit base)
1034 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1035 ,@(package-native-inputs base))))))
1036
1037 (define-public python-pandas
1038 (package
1039 (name "python-pandas")
1040 (version "0.18.1")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (string-append
1045 "https://pypi.python.org/packages/11/09/"
1046 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1047 "pandas-" version ".tar.gz"))
1048 (sha256
1049 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1050 (build-system python-build-system)
1051 (propagated-inputs
1052 `(("python-numpy" ,python-numpy)))
1053 (inputs
1054 `(("python-pytz" ,python-pytz)
1055 ("python-dateutil" ,python-dateutil-2)))
1056 (native-inputs
1057 `(("python-nose" ,python-nose)))
1058 (home-page "http://pandas.pydata.org")
1059 (synopsis "Data structures for data analysis, time series, and statistics")
1060 (description
1061 "Pandas is a Python package providing fast, flexible, and expressive data
1062 structures designed to make working with structured (tabular,
1063 multidimensional, potentially heterogeneous) and time series data both easy
1064 and intuitive. It aims to be the fundamental high-level building block for
1065 doing practical, real world data analysis in Python.")
1066 (license license:bsd-3)
1067 (properties `((python2-variant . ,(delay python2-pandas))))))
1068
1069 (define-public python2-pandas
1070 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1071 (package
1072 (inherit base)
1073 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1074 ,@(package-native-inputs base))))))
1075
1076 (define-public python-tzlocal
1077 (package
1078 (name "python-tzlocal")
1079 (version "1.2.2")
1080 (source
1081 (origin
1082 (method url-fetch)
1083 (uri (pypi-uri "tzlocal" version))
1084 (sha256
1085 (base32
1086 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1087 (build-system python-build-system)
1088 (inputs `(("python-pytz" ,python-pytz)))
1089 (home-page "https://github.com/regebro/tzlocal")
1090 (synopsis
1091 "Local timezone information for Python")
1092 (description
1093 "Tzlocal returns a tzinfo object with the local timezone information.
1094 This module attempts to fix a glaring hole in pytz, that there is no way to
1095 get the local timezone information, unless you know the zoneinfo name, and
1096 under several distributions that's hard or impossible to figure out.")
1097 (license license:cc0)))
1098
1099 (define-public python2-pysqlite
1100 (package
1101 (name "python2-pysqlite")
1102 (version "2.8.1")
1103 (source
1104 (origin
1105 (method url-fetch)
1106 (uri (pypi-uri "pysqlite" version))
1107 (sha256
1108 (base32
1109 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1110 (build-system python-build-system)
1111 (inputs
1112 `(("sqlite" ,sqlite)))
1113 (arguments
1114 `(#:python ,python-2 ; incompatible with Python 3
1115 #:tests? #f)) ; no test target
1116 (home-page "http://github.com/ghaering/pysqlite")
1117 (synopsis "SQLite bindings for Python")
1118 (description
1119 "Pysqlite provides SQLite bindings for Python that comply to the
1120 Database API 2.0T.")
1121 (license license:zlib)))
1122
1123
1124 (define-public python2-mechanize
1125 (package
1126 (name "python2-mechanize")
1127 (version "0.2.5")
1128 (source
1129 (origin
1130 (method url-fetch)
1131 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1132 version ".tar.gz"))
1133 (sha256
1134 (base32
1135 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1136 (build-system python-build-system)
1137 (arguments
1138 `(#:python ,python-2 ; apparently incompatible with Python 3
1139 #:tests? #f))
1140 ;; test fails with message
1141 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1142 ;; (python-3.3.2) or
1143 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1144 ;; (python-2.7.5).
1145 ;; The source code is from March 2011 and probably not up-to-date
1146 ;; with respect to python unit tests.
1147 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1148 (synopsis
1149 "Stateful programmatic web browsing in Python")
1150 (description
1151 "Mechanize implements stateful programmatic web browsing in Python,
1152 after Andy Lester’s Perl module WWW::Mechanize.")
1153 (license (license:non-copyleft
1154 "file://COPYING"
1155 "See COPYING in the distribution."))))
1156
1157
1158 (define-public python-simplejson
1159 (package
1160 (name "python-simplejson")
1161 (version "3.8.2")
1162 (source
1163 (origin
1164 (method url-fetch)
1165 (uri (pypi-uri "simplejson" version))
1166 (sha256
1167 (base32
1168 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1169 (build-system python-build-system)
1170 (home-page "http://simplejson.readthedocs.org/en/latest/")
1171 (synopsis
1172 "Json library for Python")
1173 (description
1174 "JSON (JavaScript Object Notation) is a subset of JavaScript
1175 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1176 format.
1177
1178 Simplejson exposes an API familiar to users of the standard library marshal
1179 and pickle modules. It is the externally maintained version of the json
1180 library contained in Python 2.6, but maintains compatibility with Python 2.5
1181 and (currently) has significant performance advantages, even without using
1182 the optional C extension for speedups. Simplejson is also supported on
1183 Python 3.3+.")
1184 (license license:x11)))
1185
1186 (define-public python2-simplejson
1187 (package-with-python2 python-simplejson))
1188
1189
1190 (define-public python-pyicu
1191 (package
1192 (name "python-pyicu")
1193 (version "1.9.2")
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1198 version ".tar.gz"))
1199 (sha256
1200 (base32
1201 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1202 (build-system python-build-system)
1203 (inputs
1204 `(("icu4c" ,icu4c)))
1205 (home-page "http://pyicu.osafoundation.org/")
1206 (synopsis "Python extension wrapping the ICU C++ API")
1207 (description
1208 "PyICU is a python extension wrapping the ICU C++ API.")
1209 (license license:x11)
1210 (properties `((python2-variant . ,(delay python2-pyicu))))))
1211
1212 (define-public python2-pyicu
1213 (package
1214 (inherit (package-with-python2
1215 (strip-python2-variant python-pyicu)))
1216 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
1217
1218 (define-public python2-dogtail
1219 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1220 ;; spaces in indentation" with Python 3.
1221 (package
1222 (name "python2-dogtail")
1223 (version "0.8.2")
1224 (source (origin
1225 (method url-fetch)
1226 (uri (string-append
1227 "https://fedorahosted.org/released/dogtail/dogtail-"
1228 version ".tar.gz"))
1229 (sha256
1230 (base32
1231 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1232 (build-system python-build-system)
1233 (arguments `(#:python ,python-2
1234 #:tests? #f)) ; invalid command "test"
1235 (home-page "https://fedorahosted.org/dogtail/")
1236 (synopsis "GUI test tool and automation framework written in ​Python")
1237 (description
1238 "Dogtail is a GUI test tool and automation framework written in Python.
1239 It uses Accessibility (a11y) technologies to communicate with desktop
1240 applications. dogtail scripts are written in Python and executed like any
1241 other Python program.")
1242 (license license:gpl2+)))
1243
1244 (define-public python2-empy
1245 (package
1246 (name "python2-empy")
1247 (version "3.3")
1248 (source (origin
1249 (method url-fetch)
1250 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1251 version ".tar.gz"))
1252 (sha256
1253 (base32
1254 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1255 (build-system python-build-system)
1256 (arguments
1257 `(#:python ,python-2
1258 #:phases (alist-replace
1259 'check
1260 (lambda _
1261 (zero? (system* "./test.sh")))
1262 %standard-phases)))
1263 (home-page "http://www.alcyone.com/software/empy/")
1264 (synopsis "Templating system for Python")
1265 (description
1266 "EmPy is a system for embedding Python expressions and statements in
1267 template text; it takes an EmPy source file, processes it, and produces
1268 output. This is accomplished via expansions, which are special signals to the
1269 EmPy system and are set off by a special prefix (by default the at sign, @@).
1270 EmPy can expand arbitrary Python expressions and statements in this way, as
1271 well as a variety of special forms. Textual data not explicitly delimited in
1272 this way is sent unaffected to the output, allowing Python to be used in
1273 effect as a markup language. Also supported are callbacks via hooks,
1274 recording and playback via diversions, and dynamic, chainable filters. The
1275 system is highly configurable via command line options and embedded
1276 commands.")
1277 (license license:lgpl2.1+)))
1278
1279 (define-public python2-element-tree
1280 (package
1281 (name "python2-element-tree")
1282 (version "1.2.6")
1283 (source (origin
1284 (method url-fetch)
1285 (uri (string-append
1286 "http://effbot.org/media/downloads/elementtree-"
1287 version "-20050316.tar.gz"))
1288 (sha256
1289 (base32
1290 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1291 (build-system python-build-system)
1292 (arguments
1293 `(#:python ,python-2 ; seems to be part of Python 3
1294 #:tests? #f)) ; no 'test' sub-command
1295 (synopsis "Toolkit for XML processing in Python")
1296 (description
1297 "ElementTree is a Python library supporting lightweight XML processing.")
1298 (home-page "http://effbot.org/zone/element-index.htm")
1299 (license (license:x11-style
1300 "http://docs.python.org/2/license.html"
1301 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1302
1303 (define-public python2-pybugz
1304 (package
1305 (name "python2-pybugz")
1306 (version "0.6.11")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append
1310 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1311 version ".tar.gz"))
1312 (sha256
1313 (base32
1314 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1315 (patches (search-patches "pybugz-stty.patch"
1316 "pybugz-encode-error.patch"))))
1317 (build-system python-build-system)
1318 (arguments
1319 `(#:python ,python-2 ; SyntaxError with Python 3
1320 #:tests? #f)) ; no 'test' sub-command
1321 (inputs `(("element-tree" ,python2-element-tree)))
1322 (synopsis "Python and command-line interface to Bugzilla")
1323 (description
1324 "PyBugz is a Python library and command-line tool to query the Bugzilla
1325 bug tracking system. It is meant as an aid to speed up interaction with the
1326 bug tracker.")
1327 (home-page "http://www.liquidx.net/pybugz/")
1328 (license license:gpl2)))
1329
1330 (define-public python-enum34
1331 (package
1332 (name "python-enum34")
1333 (version "1.1.0")
1334 (source
1335 (origin
1336 (method url-fetch)
1337 (uri (pypi-uri "enum34" version))
1338 (sha256
1339 (base32
1340 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1341 (build-system python-build-system)
1342 (arguments
1343 `(#:phases
1344 (alist-replace
1345 'check
1346 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1347 %standard-phases)))
1348 (home-page "https://pypi.python.org/pypi/enum34")
1349 (synopsis "Backported Python 3.4 Enum")
1350 (description
1351 "Enum34 is the new Python stdlib enum module available in Python 3.4
1352 backported for previous versions of Python from 2.4 to 3.3.")
1353 (license license:bsd-3)))
1354
1355 (define-public python2-enum34
1356 (package-with-python2 python-enum34))
1357
1358 (define-public python-parse-type
1359 (package
1360 (name "python-parse-type")
1361 (version "0.3.4")
1362 (source
1363 (origin
1364 (method url-fetch)
1365 (uri (string-append "https://pypi.python.org/packages/source/p/"
1366 "parse_type/parse_type-" version ".tar.gz"))
1367 (sha256
1368 (base32
1369 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1370 (build-system python-build-system)
1371 (inputs
1372 `(("python-six" ,python-six)
1373 ("python-parse" ,python-parse)))
1374 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1375 (home-page "https://github.com/jenisys/parse_type")
1376 (synopsis "Extended parse module")
1377 (description
1378 "Parse_type extends the python parse module.")
1379 (license license:bsd-3)))
1380
1381 (define-public python-parse
1382 (package
1383 (name "python-parse")
1384 (version "1.6.6")
1385 (source
1386 (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "parse" version))
1389 (sha256
1390 (base32
1391 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1392 (patches (search-patches "python-parse-too-many-fields.patch"))))
1393 (build-system python-build-system)
1394 (arguments
1395 `(#:phases
1396 (modify-phases %standard-phases
1397 (replace 'check
1398 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1399 (home-page "https://github.com/r1chardj0n3s/parse")
1400 (synopsis "Parse strings")
1401 (description
1402 "Parse strings using a specification based on the Python format()
1403 syntax.")
1404 (license license:x11)))
1405
1406
1407 (define-public scons
1408 (package
1409 (name "scons")
1410 (version "2.3.4")
1411 (source (origin
1412 (method url-fetch)
1413 (uri (string-append "mirror://sourceforge/scons/scons/" version
1414 "/scons-" version ".tar.gz"))
1415 (sha256
1416 (base32
1417 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1418 (build-system python-build-system)
1419 (arguments
1420 ;; With Python 3.x, fails to build with a syntax error.
1421 `(#:python ,python-2
1422 #:tests? #f)) ; no 'python setup.py test' command
1423 (home-page "http://scons.org/")
1424 (synopsis "Software construction tool written in Python")
1425 (description
1426 "SCons is a software construction tool. Think of SCons as an improved,
1427 cross-platform substitute for the classic Make utility with integrated
1428 functionality similar to autoconf/automake and compiler caches such as ccache.
1429 In short, SCons is an easier, more reliable and faster way to build
1430 software.")
1431 (license license:x11)))
1432
1433 (define-public python-extras
1434 (package
1435 (name "python-extras")
1436 (version "0.0.3")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (string-append
1441 "https://pypi.python.org/packages/source/e/extras/extras-"
1442 version ".tar.gz"))
1443 (sha256
1444 (base32
1445 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1446 (build-system python-build-system)
1447 (arguments
1448 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1449 '(#:tests? #f))
1450 (home-page "https://github.com/testing-cabal/extras")
1451 (synopsis "Useful extensions to the Python standard library")
1452 (description
1453 "Extras is a set of extensions to the Python standard library.")
1454 (license license:expat)))
1455
1456 (define-public python2-extras
1457 (package-with-python2 python-extras))
1458
1459 (define-public python-mimeparse
1460 (package
1461 (name "python-mimeparse")
1462 (version "0.1.4")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (string-append
1467 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1468 version ".tar.gz"))
1469 (sha256
1470 (base32
1471 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1472 (build-system python-build-system)
1473 (arguments
1474 '(#:tests? #f)) ; no setup.py test command
1475 (home-page
1476 "https://github.com/dbtsai/python-mimeparse")
1477 (synopsis "Python library for parsing MIME types")
1478 (description
1479 "Mimeparse provides basic functions for parsing MIME type names and
1480 matching them against a list of media-ranges.")
1481 (license license:expat)))
1482
1483 (define-public python2-mimeparse
1484 (package-with-python2 python-mimeparse))
1485
1486 (define-public python-nose
1487 (package
1488 (name "python-nose")
1489 (version "1.3.7")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (pypi-uri "nose" version))
1494 (sha256
1495 (base32
1496 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1497 (build-system python-build-system)
1498 (arguments
1499 '(#:tests? #f)) ; FIXME: test suite fails
1500 (home-page "http://readthedocs.org/docs/nose/")
1501 (synopsis "Python testing library")
1502 (description
1503 "Nose extends the unittest library to make testing easier.")
1504 (license license:lgpl2.0+)))
1505
1506 (define-public python2-nose
1507 (package-with-python2 python-nose))
1508
1509 (define-public python-nose2
1510 (package
1511 (name "python-nose2")
1512 (version "0.6.5")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "nose2" version))
1517 (sha256
1518 (base32
1519 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1520 (build-system python-build-system)
1521 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1522 (inputs
1523 `(("python-cov-core" ,python-cov-core)
1524 ("python-pytest-cov" ,python-pytest-cov)
1525 ("python-six" ,python-six)))
1526 (home-page "https://github.com/nose-devs/nose2")
1527 (synopsis "Next generation of nicer testing for Python")
1528 (description
1529 "Nose2 is the next generation of nicer testing for Python, based on the
1530 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1531 better plugin api, being easier for users to configure, and simplifying internal
1532 interfaces and processes.")
1533 (license license:bsd-2)))
1534
1535 (define-public python2-nose2
1536 (package-with-python2 python-nose2))
1537
1538 (define-public python-unittest2
1539 (package
1540 (name "python-unittest2")
1541 (version "0.5.1")
1542 (source
1543 (origin
1544 (method url-fetch)
1545 (uri (string-append
1546 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1547 version ".tar.gz"))
1548 (sha256
1549 (base32
1550 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1551 (build-system python-build-system)
1552 (home-page "http://pypi.python.org/pypi/unittest2")
1553 (synopsis "Python unit testing library")
1554 (description
1555 "Unittest2 is a replacement for the unittest module in the Python
1556 standard library.")
1557 (license license:psfl)))
1558
1559 (define-public python2-unittest2
1560 (package (inherit python-unittest2)
1561 (name "python2-unittest2")
1562 (version "0.5.1")
1563 (source
1564 (origin
1565 (method url-fetch)
1566 (uri (string-append
1567 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1568 version ".tar.gz"))
1569 (sha256
1570 (base32
1571 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1572 (arguments
1573 `(#:python ,python-2
1574 #:tests? #f)))) ; no setup.py test command
1575
1576 (define-public python-pafy
1577 (package
1578 (name "python-pafy")
1579 (version "0.5.2")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "pafy" version))
1584 (sha256
1585 (base32
1586 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1587 (build-system python-build-system)
1588 (propagated-inputs
1589 ;; Youtube-dl is a python package which is imported in the file
1590 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1591 `(("youtube-dl" ,youtube-dl)))
1592 (home-page "https://np1.github.io/pafy/")
1593 (synopsis "Retrieve YouTube content and metadata")
1594 (description
1595 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1596 (license license:lgpl3+)))
1597
1598 (define-public python-py
1599 (package
1600 (name "python-py")
1601 (version "1.4.31")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "py" version))
1606 (sha256
1607 (base32
1608 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1609 (build-system python-build-system)
1610 (home-page "http://pylib.readthedocs.org/")
1611 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1612 (description
1613 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1614 code introspection, and logging.")
1615 (license license:expat)))
1616
1617 (define-public python2-py
1618 (package-with-python2 python-py))
1619
1620 (define-public python-pytest
1621 (package
1622 (name "python-pytest")
1623 (version "2.7.3")
1624 (source
1625 (origin
1626 (method url-fetch)
1627 (uri (string-append
1628 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1629 version ".tar.gz"))
1630 (sha256
1631 (base32
1632 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1633 (modules '((guix build utils)))
1634 (snippet
1635 ;; One of the tests involves the /usr directory, so it fails.
1636 '(substitute* "testing/test_argcomplete.py"
1637 (("def test_remove_dir_prefix\\(self\\):")
1638 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1639 (build-system python-build-system)
1640 (inputs
1641 `(("python-py" ,python-py)
1642 ("python-nose" ,python-nose)
1643 ("python-mock" ,python-mock)))
1644 (home-page "http://pytest.org")
1645 (synopsis "Python testing library")
1646 (description
1647 "Pytest is a testing tool that provides auto-discovery of test modules
1648 and functions, detailed info on failing assert statements, modular fixtures,
1649 and many external plugins.")
1650 (license license:expat)))
1651
1652 (define-public python2-pytest
1653 (package-with-python2 python-pytest))
1654
1655 ;; This package is used by Borg until we can upgrade all our Python packages to
1656 ;; use a more recent pytest.
1657 (define-public python-pytest-2.9.2
1658 (package
1659 (inherit python-pytest)
1660 (name "python-pytest")
1661 (version "2.9.2")
1662 (source (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "pytest" version))
1665 (sha256
1666 (base32
1667 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1668 (arguments
1669 `(#:phases
1670 (modify-phases %standard-phases
1671 (add-before 'check 'disable-invalid-test
1672 (lambda _
1673 (substitute* "testing/test_argcomplete.py"
1674 (("def test_remove_dir_prefix" line)
1675 (string-append "@pytest.mark.skip"
1676 "(reason=\"Assumes that /usr exists.\")\n "
1677 line)))
1678 #t)))))))
1679
1680 (define-public python-pytest-cov
1681 (package
1682 (name "python-pytest-cov")
1683 (version "2.2.1")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (pypi-uri "pytest-cov" version))
1688 (sha256
1689 (base32
1690 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1691 (build-system python-build-system)
1692 (inputs
1693 `(("python-coverage" ,python-coverage)
1694 ("python-pytest" ,python-pytest)))
1695 (home-page "https://github.com/pytest-dev/pytest-cov")
1696 (synopsis "Pytest plugin for measuring coverage")
1697 (description
1698 "Pytest-cov produces coverage reports. It supports centralised testing and
1699 distributed testing in both @code{load} and @code{each} modes. It also
1700 supports coverage of subprocesses.")
1701 (license license:expat)
1702 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
1703
1704 (define-public python2-pytest-cov
1705 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1706 (package
1707 (inherit base)
1708 (inputs `(("python2-setuptools" ,python2-setuptools)
1709 ,@(package-inputs base))))))
1710
1711 (define-public python-pytest-runner
1712 (package
1713 (name "python-pytest-runner")
1714 (version "2.6.2")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (pypi-uri "pytest-runner" version))
1719 (sha256
1720 (base32
1721 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1722 (build-system python-build-system)
1723 (arguments
1724 `(#:phases
1725 (modify-phases %standard-phases
1726 ;; The fancy way of setting the version with setuptools_scm does not
1727 ;; seem to work here.
1728 (add-after 'unpack 'set-version
1729 (lambda _
1730 (substitute* "docs/conf.py"
1731 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1732 (string-append "version = \"" ,version "\"")))
1733 #t)))))
1734 (native-inputs
1735 `(("python-pytest" ,python-pytest)
1736 ("python-setuptools-scm" ,python-setuptools-scm)))
1737 (home-page "https://github.com/pytest-dev/pytest-runner")
1738 (synopsis "Invoke py.test as a distutils command")
1739 (description
1740 "This package provides a @command{pytest-runner} command that
1741 @file{setup.py} files can use to run tests.")
1742 (license license:expat)
1743 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1744
1745 (define-public python2-pytest-runner
1746 (let ((base (package-with-python2
1747 (strip-python2-variant python-pytest-runner))))
1748 (package
1749 (inherit base)
1750 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1751 ,@(package-native-inputs base))))))
1752
1753 (define-public python-pytest-mock
1754 (package
1755 (name "python-pytest-mock")
1756 (version "1.2")
1757 (source
1758 (origin
1759 (method url-fetch)
1760 (uri (pypi-uri "pytest-mock" version ".zip"))
1761 (sha256
1762 (base32
1763 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1764 (build-system python-build-system)
1765 (native-inputs
1766 `(("unzip" ,unzip)))
1767 (inputs
1768 `(("python-py" ,python-py)
1769 ("python-pytest" ,python-pytest)))
1770 (home-page "https://github.com/pytest-dev/pytest-mock/")
1771 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1772 (description
1773 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1774 around the patching API provided by the @code{mock} package, but with the
1775 benefit of not having to worry about undoing patches at the end of a test.
1776 The mocker fixture has the same API as @code{mock.patch}, supporting the
1777 same arguments.")
1778 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1779 (license license:expat)))
1780
1781 (define-public python2-pytest-mock
1782 (let ((base (package-with-python2
1783 (strip-python2-variant python-pytest-mock))))
1784 (package (inherit base)
1785 (native-inputs
1786 `(("python2-setuptools" ,python2-setuptools)
1787 ,@(package-native-inputs base)))
1788 (inputs
1789 `(("python2-mock" ,python2-mock)
1790 ,@(package-inputs base))))))
1791
1792 (define-public python-pytest-xdist
1793 (package
1794 (name "python-pytest-xdist")
1795 (version "1.14")
1796 (source
1797 (origin
1798 (method url-fetch)
1799 (uri (pypi-uri "pytest-xdist" version ".zip"))
1800 (sha256
1801 (base32
1802 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1803 (modules '((guix build utils)))
1804 (snippet
1805 '(begin
1806 ;; Remove pre-compiled .pyc files from source.
1807 (for-each delete-file-recursively
1808 (find-files "." "__pycache__" #:directories? #t))
1809 (for-each delete-file (find-files "." "\\.pyc$"))
1810 #t))))
1811 (build-system python-build-system)
1812 (native-inputs
1813 `(("unzip" ,unzip)
1814 ("python-setuptools-scm" ,python-setuptools-scm)))
1815 (inputs
1816 `(("python-apipkg" ,python-apipkg)
1817 ("python-execnet" ,python-execnet)
1818 ("python-pytest" ,python-pytest)
1819 ("python-py" ,python-py)))
1820 (home-page
1821 "https://github.com/pytest-dev/pytest-xdist")
1822 (synopsis
1823 "Plugin for py.test with distributed testing and loop-on-failing modes")
1824 (description
1825 "The pytest-xdist plugin extends py.test with some unique test execution
1826 modes: parallelization, running tests in boxed subprocesses, the ability
1827 to run tests repeatedly when failed, and the ability to run tests on multiple
1828 Python interpreters or platforms. It uses rsync to copy the existing
1829 program code to a remote location, executes there, and then syncs the
1830 result back.")
1831 (license license:expat)
1832 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
1833
1834 (define-public python2-pytest-xdist
1835 (let ((base (package-with-python2
1836 (strip-python2-variant python-pytest-xdist))))
1837 (package
1838 (inherit base)
1839 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1840 ,@(package-native-inputs base))))))
1841
1842 (define-public python-scripttest
1843 (package
1844 (name "python-scripttest")
1845 (version "1.3")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (string-append
1850 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1851 version ".tar.gz"))
1852 (sha256
1853 (base32
1854 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1855 (build-system python-build-system)
1856 (inputs
1857 `(("python-pytest" ,python-pytest)))
1858 (home-page "http://pythonpaste.org/scripttest/")
1859 (synopsis "Python library to test command-line scripts")
1860 (description "Scripttest is a Python helper library for testing
1861 interactive command-line applications. With it you can run a script in a
1862 subprocess and see the output as well as any file modifications.")
1863 (license license:expat)))
1864
1865 (define-public python2-scripttest
1866 (package-with-python2 python-scripttest))
1867
1868 (define-public python-testtools
1869 (package
1870 (name "python-testtools")
1871 (version "1.0.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (string-append
1876 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1877 version ".tar.gz"))
1878 (sha256
1879 (base32
1880 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1881 (build-system python-build-system)
1882 (propagated-inputs
1883 `(("python-mimeparse" ,python-mimeparse)))
1884 (inputs
1885 `(("python-extras" ,python-extras)))
1886 (home-page "https://github.com/testing-cabal/testtools")
1887 (synopsis
1888 "Extensions to the Python standard library unit testing framework")
1889 (description
1890 "Testtools extends the Python standard library unit testing framework to
1891 provide matchers, more debugging information, and cross-Python
1892 compatibility.")
1893 (license license:psfl)))
1894
1895 (define-public python2-testtools
1896 (package-with-python2 python-testtools))
1897
1898 (define-public python-testscenarios
1899 (package
1900 (name "python-testscenarios")
1901 (version "0.4")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (string-append
1906 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1907 version ".tar.gz"))
1908 (sha256
1909 (base32
1910 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1911 (build-system python-build-system)
1912 (inputs
1913 `(("python-testtools" ,python-testtools)
1914 ("python-mimeparse" ,python-mimeparse)))
1915 (home-page "https://launchpad.net/testscenarios")
1916 (synopsis "Pyunit extension for dependency injection")
1917 (description
1918 "Testscenarios provides clean dependency injection for Python unittest
1919 style tests.")
1920 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1921
1922 (define-public python2-testscenarios
1923 (package-with-python2 python-testscenarios))
1924
1925 (define-public python-testresources
1926 (package
1927 (name "python-testresources")
1928 (version "0.2.7")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (string-append
1933 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1934 version ".tar.gz"))
1935 (sha256
1936 (base32
1937 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1938 (build-system python-build-system)
1939 (home-page "https://launchpad.net/testresources")
1940 (synopsis
1941 "Pyunit extension for managing test resources")
1942 (description
1943 "Testresources is an extension to Python's unittest to allow declarative
1944 use of resources by test cases.")
1945 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1946
1947 (define-public python2-testresources
1948 (package-with-python2 python-testresources))
1949
1950 (define-public python-subunit
1951 (package
1952 (name "python-subunit")
1953 (version "0.0.21")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (string-append
1958 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1959 version ".tar.gz"))
1960 (sha256
1961 (base32
1962 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1963 (build-system python-build-system)
1964 (inputs
1965 `(("python-testtools" ,python-testtools)
1966 ("python-mimeparse" ,python-mimeparse)
1967 ("python-testscenarios" ,python-testscenarios)))
1968 (home-page "http://launchpad.net/subunit")
1969 (synopsis "Python implementation of the subunit protocol")
1970 (description
1971 "Python-subunit is a Python implementation of the subunit test streaming
1972 protocol.")
1973 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1974
1975 (define-public python2-subunit
1976 (package-with-python2 python-subunit))
1977
1978 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1979 ;; which needs a recent version of python-fixtures. To fix this circular
1980 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1981 ;; bootstrap the whole thing:
1982 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1983 ;; - python-pbr-0.11 is used to build python-fixtures
1984 ;; - python-fixtures is used to build python-pbr
1985 (define-public python-fixtures-0.3.16
1986 (package
1987 (name "python-fixtures")
1988 (version "0.3.16")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (string-append
1993 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1994 version ".tar.gz"))
1995 (sha256
1996 (base32
1997 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1998 (build-system python-build-system)
1999 (arguments
2000 '(#:tests? #f)) ; no setup.py test command
2001 (home-page "https://launchpad.net/python-fixtures")
2002 (synopsis "Python test fixture library")
2003 (description
2004 "Fixtures provides a way to create reusable state, useful when writing
2005 Python tests.")
2006 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2007
2008 (define-public python2-fixtures-0.3.16
2009 (package-with-python2 python-fixtures-0.3.16))
2010
2011 (define-public python-pbr-0.11
2012 (package
2013 (name "python-pbr")
2014 (version "0.11.0")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (string-append
2019 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2020 version ".tar.gz"))
2021 (sha256
2022 (base32
2023 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
2024 (build-system python-build-system)
2025 (arguments
2026 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2027 (inputs
2028 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)))
2029 (home-page "https://launchpad.net/pbr")
2030 (synopsis "Change the default behavior of Python’s setuptools")
2031 (description
2032 "Python Build Reasonableness (PBR) is a library that injects some useful
2033 and sensible default behaviors into your setuptools run.")
2034 (license license:asl2.0)))
2035
2036 (define-public python2-pbr-0.11
2037 (package-with-python2 python-pbr-0.11))
2038
2039 (define-public python-pbr
2040 (package
2041 (name "python-pbr")
2042 (version "1.8.1")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (string-append
2047 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2048 version
2049 ".tar.gz"))
2050 (sha256
2051 (base32
2052 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2053 (build-system python-build-system)
2054 (arguments
2055 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2056 (propagated-inputs
2057 `(("python-testrepository" ,python-testrepository)
2058 ("git" ,git))) ;; pbr actually uses the "git" binary.
2059 (inputs
2060 `(("python-fixtures" ,python-fixtures)
2061 ("python-mimeparse" ,python-mimeparse)
2062 ("python-mock" ,python-mock)
2063 ("python-six" ,python-six)
2064 ("python-sphinx" ,python-sphinx)
2065 ("python-testrepository" ,python-testrepository)
2066 ("python-testresources" ,python-testresources)
2067 ("python-testscenarios" ,python-testscenarios)
2068 ("python-testtools" ,python-testtools)
2069 ("python-virtualenv" ,python-virtualenv)))
2070 (home-page "https://launchpad.net/pbr")
2071 (synopsis "Change the default behavior of Python’s setuptools")
2072 (description
2073 "Python Build Reasonableness (PBR) is a library that injects some useful
2074 and sensible default behaviors into your setuptools run.")
2075 (license license:asl2.0)))
2076
2077 (define-public python2-pbr
2078 (package-with-python2 python-pbr))
2079
2080 (define-public python-fixtures
2081 (package
2082 (name "python-fixtures")
2083 (version "1.4.0")
2084 (source
2085 (origin
2086 (method url-fetch)
2087 (uri (pypi-uri "fixtures" version))
2088 (sha256
2089 (base32
2090 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2091 (build-system python-build-system)
2092 (propagated-inputs
2093 `(("python-six" ,python-six)
2094 ("python-pbr-0.11" ,python-pbr-0.11)))
2095 (inputs
2096 `(("python-pip" ,python-pip)
2097 ;; Tests
2098 ("python-testtools" ,python-testtools)))
2099 (arguments
2100 '(#:tests? #f)) ; no setup.py test command
2101 (home-page "https://launchpad.net/python-fixtures")
2102 (synopsis "Python test fixture library")
2103 (description
2104 "Fixtures provides a way to create reusable state, useful when writing
2105 Python tests.")
2106 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2107
2108 (define-public python2-fixtures
2109 (package-with-python2 python-fixtures))
2110
2111 (define-public python-testrepository
2112 (package
2113 (name "python-testrepository")
2114 (version "0.0.20")
2115 (source
2116 (origin
2117 (method url-fetch)
2118 (uri (string-append
2119 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2120 version ".tar.gz"))
2121 (sha256
2122 (base32
2123 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2124 (build-system python-build-system)
2125 (propagated-inputs
2126 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2127 ("python-testtools" ,python-testtools)))
2128 (inputs
2129 `(("python-subunit" ,python-subunit)
2130 ("python-mimeparse" ,python-mimeparse)))
2131 (home-page "https://launchpad.net/testrepository")
2132 (synopsis "Database for Python test results")
2133 (description "Testrepository provides a database of test results which can
2134 be used as part of a developer's workflow to check things such as what tests
2135 have failed since the last commit or what tests are currently failing.")
2136 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2137
2138 (define-public python2-testrepository
2139 (package-with-python2 python-testrepository))
2140
2141 (define-public python-coverage
2142 (package
2143 (name "python-coverage")
2144 (version "4.1")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "coverage" version))
2149 (sha256
2150 (base32
2151 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2152 (build-system python-build-system)
2153 (home-page "http://nedbatchelder.com/code/coverage")
2154 (synopsis "Code coverage measurement for Python")
2155 (description
2156 "Coverage measures code coverage, typically during test execution. It
2157 uses the code analysis tools and tracing hooks provided in the Python standard
2158 library to determine which lines are executable, and which have been
2159 executed.")
2160 (license license:bsd-3)))
2161
2162 (define-public python2-coverage
2163 (package-with-python2 python-coverage))
2164
2165 (define-public python-cov-core
2166 (package
2167 (name "python-cov-core")
2168 (version "1.15.0")
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "cov-core" version))
2173 (sha256
2174 (base32
2175 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2176 (build-system python-build-system)
2177 (native-inputs
2178 `(("python-coverage" ,python-coverage)))
2179 (home-page "https://github.com/schlamar/cov-core")
2180 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2181 (description
2182 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2183 It is useful for developing coverage plugins for these testing frameworks.")
2184 (license license:expat)
2185 (properties `((python2-variant . ,(delay python2-cov-core))))))
2186
2187 (define-public python2-cov-core
2188 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
2189 (package (inherit cov-core)
2190 (native-inputs
2191 `(("python2-setuptools" ,python2-setuptools)
2192 ,@(package-native-inputs cov-core))))))
2193
2194 (define-public python-discover
2195 (package
2196 (name "python-discover")
2197 (version "0.4.0")
2198 (source
2199 (origin
2200 (method url-fetch)
2201 (uri (string-append
2202 "https://pypi.python.org/packages/source/d/discover/discover-"
2203 version ".tar.gz"))
2204 (sha256
2205 (base32
2206 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2207 (build-system python-build-system)
2208 (home-page "http://pypi.python.org/pypi/discover/")
2209 (synopsis
2210 "Python test discovery for unittest")
2211 (description
2212 "Discover provides test discovery for unittest, a feature that has been
2213 backported from Python 2.7 for Python 2.4+.")
2214 (license license:bsd-3)))
2215
2216 (define-public python2-discover
2217 (package-with-python2 python-discover))
2218
2219 (define-public behave
2220 (package
2221 (name "behave")
2222 (version "1.2.5")
2223 (source (origin
2224 (method url-fetch)
2225 (uri (pypi-uri "behave" version ".tar.bz2"))
2226 (sha256
2227 (base32
2228 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2229 (build-system python-build-system)
2230 (inputs
2231 `(("python-six" ,python-six)
2232 ("python-parse" ,python-parse)
2233 ("python-parse-type" ,python-parse-type)))
2234 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2235 ;PyHamcrest>=1.8
2236 (home-page "http://github.com/behave/behave")
2237 (synopsis "Python behavior-driven development")
2238 (description
2239 "Behave is a tool for behavior-driven development in python.
2240 Behavior-driven development (or BDD) is an agile software development
2241 technique that encourages collaboration between developers, QA and
2242 non-technical or business participants in a software project. Behave uses
2243 tests written in a natural language style, backed up by Python code.")
2244 (license license:x11)))
2245
2246 (define-public python-exif-read
2247 (package
2248 (name "python-exif-read")
2249 (version "2.1.2")
2250 (source (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "ExifRead" version))
2253 (sha256
2254 (base32
2255 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2256 (build-system python-build-system)
2257 (arguments `(#:tests? #f)) ; no tests
2258 (home-page "https://github.com/ianare/exif-py")
2259 (synopsis "Python library to extract EXIF data from image files")
2260 (description
2261 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2262 files.")
2263 (license license:bsd-3)))
2264
2265 (define-public python2-exif-read
2266 (package-with-python2 python-exif-read))
2267
2268 (define-public python-pyld
2269 (package
2270 (name "python-pyld")
2271 (version "0.6.8")
2272 (source (origin
2273 (method url-fetch)
2274 (uri (pypi-uri "PyLD" version))
2275 (sha256
2276 (base32
2277 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2278 (build-system python-build-system)
2279 (arguments `(#:tests? #f)) ; no tests
2280 (home-page "http://github.com/digitalbazaar/pyld")
2281 (synopsis "Python implementation of the JSON-LD specification")
2282 (description
2283 "PyLD is an implementation of the JSON-LD specification.")
2284 (license license:bsd-3)))
2285
2286 (define-public python2-pyld
2287 (package-with-python2 python-pyld))
2288
2289 (define-public python-certifi
2290 (package
2291 (name "python-certifi")
2292 (version "2016.8.31")
2293 (source (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "certifi" version))
2296 (sha256
2297 (base32
2298 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2299 (build-system python-build-system)
2300 (arguments `(#:tests? #f)) ; no tests
2301 (home-page "http://python-requests.org/")
2302 (synopsis "Python CA certificate bundle")
2303 (description
2304 "Certifi is a Python library that contains a CA certificate bundle, which
2305 is used by the Requests library to verify HTTPS requests.")
2306 (license license:asl2.0)))
2307
2308 (define-public python2-certifi
2309 (package-with-python2 python-certifi))
2310
2311 (define-public python-click
2312 (package
2313 (name "python-click")
2314 (version "6.6")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "click" version))
2319 (sha256
2320 (base32
2321 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2322 (build-system python-build-system)
2323 (arguments
2324 `(#:phases
2325 (modify-phases %standard-phases
2326 (add-after 'unpack 'fix-paths
2327 (lambda* (#:key inputs #:allow-other-keys)
2328 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2329 "cross-libc" "libc"))))
2330 (substitute* "click/_unicodefun.py"
2331 (("'locale'")
2332 (string-append "'" glibc "/bin/locale'"))))
2333 #t)))))
2334 (home-page "http://click.pocoo.org")
2335 (synopsis "Command line library for Python")
2336 (description
2337 "Click is a Python package for creating command line interfaces in a
2338 composable way with as little code as necessary. Its name stands for
2339 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2340 with sensible defaults out of the box.")
2341 (license license:bsd-3)))
2342
2343 (define-public python2-click
2344 (package-with-python2 python-click))
2345
2346 (define-public python-wheel
2347 (package
2348 (name "python-wheel")
2349 (version "0.29.0")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "wheel" version))
2354 (sha256
2355 (base32
2356 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2357 (build-system python-build-system)
2358 (native-inputs
2359 `(("python-jsonschema" ,python-jsonschema)
2360 ("python-pytest-cov" ,python-pytest-cov)))
2361 (home-page "https://bitbucket.org/pypa/wheel/")
2362 (synopsis "Format for built Python packages")
2363 (description
2364 "A wheel is a ZIP-format archive with a specially formatted filename and
2365 the @code{.whl} extension. It is designed to contain all the files for a PEP
2366 376 compatible install in a way that is very close to the on-disk format. Many
2367 packages will be properly installed with only the @code{Unpack} step and the
2368 unpacked archive preserves enough information to @code{Spread} (copy data and
2369 scripts to their final locations) at any later time. Wheel files can be
2370 installed with a newer @code{pip} or with wheel's own command line utility.")
2371 (license license:expat)
2372 (properties `((python2-variant . ,(delay python2-wheel))))))
2373
2374 (define-public python2-wheel
2375 (let ((wheel (package-with-python2
2376 (strip-python2-variant python-wheel))))
2377 (package (inherit wheel)
2378 (native-inputs `(("python2-functools32" ,python2-functools32)
2379 ,@(package-native-inputs wheel))))))
2380
2381
2382 (define-public python-requests
2383 (package
2384 (name "python-requests")
2385 (version "2.9.1")
2386 (source (origin
2387 (method url-fetch)
2388 (uri (pypi-uri "requests" version))
2389 (sha256
2390 (base32
2391 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2392 (build-system python-build-system)
2393 (native-inputs
2394 `(("python-py" ,python-py)
2395 ("python-pytest" ,python-pytest)
2396 ("python-pytest-cov" ,python-pytest-cov)
2397 ("python-wheel" ,python-wheel)))
2398 (home-page "http://python-requests.org/")
2399 (synopsis "Python HTTP library")
2400 (description
2401 "Requests is a Python HTTP client library. It aims to be easier to use
2402 than Python’s urllib2 library.")
2403 (license license:asl2.0)))
2404
2405 ;; Some software requires an older version of Requests, notably Docker
2406 ;; Compose.
2407 (define-public python-requests-2.7
2408 (package (inherit python-requests)
2409 (version "2.7.0")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "requests" version))
2413 (sha256
2414 (base32
2415 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2416
2417 (define-public python2-requests
2418 (package-with-python2 python-requests))
2419
2420 (define-public python-vcversioner
2421 (package
2422 (name "python-vcversioner")
2423 (version "2.16.0.0")
2424 (source
2425 (origin
2426 (method url-fetch)
2427 (uri (pypi-uri "vcversioner" version))
2428 (sha256
2429 (base32
2430 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2431 (build-system python-build-system)
2432 (synopsis "Python library for version number discovery")
2433 (description "Vcversioner is a Python library that inspects tagging
2434 information in a variety of version control systems in order to discover
2435 version numbers.")
2436 (home-page "https://github.com/habnabit/vcversioner")
2437 (license license:isc)
2438 (properties `((python2-variant . ,(delay python2-vcversioner))))))
2439
2440 (define-public python2-vcversioner
2441 (let ((vcversioner (package-with-python2
2442 (strip-python2-variant python-vcversioner))))
2443 (package (inherit vcversioner)
2444 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2445 ,@(package-native-inputs vcversioner))))))
2446
2447 (define-public python-jsonschema
2448 (package
2449 (name "python-jsonschema")
2450 (version "2.5.1")
2451 (source (origin
2452 (method url-fetch)
2453 (uri
2454 (string-append
2455 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2456 version ".tar.gz"))
2457 (sha256
2458 (base32
2459 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2460 (build-system python-build-system)
2461 (arguments
2462 '(#:phases
2463 (modify-phases %standard-phases
2464 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2465 (native-inputs
2466 `(("python-nose" ,python-nose)
2467 ("python-vcversioner" ,python-vcversioner)))
2468 (home-page "https://github.com/Julian/jsonschema")
2469 (synopsis "Implementation of JSON Schema for Python")
2470 (description
2471 "Jsonschema is an implementation of JSON Schema for Python.")
2472 (license license:expat)
2473 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2474
2475 (define-public python2-jsonschema
2476 (let ((jsonschema (package-with-python2
2477 (strip-python2-variant python-jsonschema))))
2478 (package (inherit jsonschema)
2479 (native-inputs
2480 `(("python2-mock" ,python2-mock)
2481 ,@(package-native-inputs jsonschema)))
2482 (propagated-inputs
2483 `(("python2-functools32" ,python2-functools32))))))
2484
2485 (define-public python-unidecode
2486 (package
2487 (name "python-unidecode")
2488 (version "0.04.18")
2489 (source (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "Unidecode" version))
2492 (sha256
2493 (base32
2494 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2495 (build-system python-build-system)
2496 (home-page "https://pypi.python.org/pypi/Unidecode")
2497 (synopsis "ASCII transliterations of Unicode text")
2498 (description
2499 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2500 useful when integrating with legacy code that doesn't support Unicode, or for
2501 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2502 machine identifiers from human-readable Unicode strings that should still be
2503 somewhat intelligeble.")
2504 (license license:gpl2+)))
2505
2506 (define-public python2-unidecode
2507 (package-with-python2 python-unidecode))
2508
2509 (define-public python-pyjwt
2510 (package
2511 (name "python-pyjwt")
2512 (version "1.4.0")
2513 (source
2514 (origin
2515 (method url-fetch)
2516 (uri (pypi-uri "PyJWT" version))
2517 (sha256
2518 (base32
2519 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2520 (build-system python-build-system)
2521 (native-inputs
2522 `(("python-pytest-runner" ,python-pytest-runner)))
2523 (arguments
2524 '(#:tests? #f)) ; test suite doesn't work
2525 (home-page "http://github.com/progrium/pyjwt")
2526 (synopsis "JSON Web Token implementation in Python")
2527 (description
2528 "PyJWT is a JSON Web Token implementation written in Python.")
2529 (license license:expat)))
2530
2531 (define-public python2-pyjwt
2532 (package-with-python2 python-pyjwt))
2533
2534 (define-public python-oauthlib
2535 (package
2536 (name "python-oauthlib")
2537 (version "1.0.3")
2538 (source (origin
2539 (method url-fetch)
2540 (uri (pypi-uri "oauthlib" version))
2541 (sha256
2542 (base32
2543 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2544 (build-system python-build-system)
2545 (native-inputs
2546 `(("python-coverage" ,python-coverage)
2547 ("python-nose" ,python-nose)
2548 ("python-mock" ,python-mock)))
2549 (inputs
2550 `(("python-blinker" ,python-blinker)
2551 ("python-cryptography" ,python-cryptography)
2552 ("python-pyjwt" ,python-pyjwt)))
2553 (home-page "https://github.com/idan/oauthlib")
2554 (synopsis "OAuth implementation for Python")
2555 (description
2556 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2557 OAuth request-signing logic.")
2558 (license license:bsd-3)
2559 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2560
2561 (define-public python2-oauthlib
2562 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2563 (package
2564 (inherit base)
2565 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2566 ("python2-unittest2" ,python2-unittest2)
2567 ,@(package-native-inputs base))))))
2568
2569 (define-public python-itsdangerous
2570 (package
2571 (name "python-itsdangerous")
2572 (version "0.24")
2573 (source
2574 (origin
2575 (method url-fetch)
2576 (uri (string-append
2577 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2578 version ".tar.gz"))
2579 (sha256
2580 (base32
2581 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2582 (build-system python-build-system)
2583 (home-page "http://github.com/mitsuhiko/itsdangerous")
2584 (synopsis "Python library for passing data to/from untrusted environments")
2585 (description
2586 "Itsdangerous provides various helpers to pass trusted data to untrusted
2587 environments and back.")
2588 (license license:bsd-3)
2589 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
2590
2591 (define-public python2-itsdangerous
2592 (let ((base (package-with-python2
2593 (strip-python2-variant python-itsdangerous))))
2594 (package
2595 (inherit base)
2596 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2597 ,@(package-native-inputs base))))))
2598
2599 (define-public python-pyyaml
2600 (package
2601 (name "python-pyyaml")
2602 (version "3.11")
2603 (source
2604 (origin
2605 (method url-fetch)
2606 (uri (string-append
2607 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2608 version ".tar.gz"))
2609 (sha256
2610 (base32
2611 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2612 (build-system python-build-system)
2613 (inputs
2614 `(("libyaml" ,libyaml)))
2615 (home-page "http://pyyaml.org/wiki/PyYAML")
2616 (synopsis "YAML parser and emitter for Python")
2617 (description
2618 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2619 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2620 API, and sensible error messages. PyYAML supports standard YAML tags and
2621 provides Python-specific tags that allow to represent an arbitrary Python
2622 object.")
2623 (license license:expat)))
2624
2625 (define-public python2-pyyaml
2626 (package-with-python2 python-pyyaml))
2627
2628 (define-public python-virtualenv
2629 (package
2630 (name "python-virtualenv")
2631 (version "15.0.3")
2632 (source
2633 (origin
2634 (method url-fetch)
2635 (uri (pypi-uri "virtualenv" version))
2636 (sha256
2637 (base32
2638 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2639 (build-system python-build-system)
2640 (arguments
2641 `(#:phases
2642 (modify-phases %standard-phases
2643 (replace 'check
2644 (lambda _
2645 ;; Disable failing test. See upstream bug report
2646 ;; https://github.com/pypa/virtualenv/issues/957
2647 (substitute* "tests/test_virtualenv.py"
2648 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2649 (zero? (system* "py.test")))))))
2650 (inputs
2651 `(("python-mock" ,python-mock)
2652 ("python-pytest" ,python-pytest)))
2653 (home-page "https://virtualenv.pypa.io/")
2654 (synopsis "Virtual Python environment builder")
2655 (description
2656 "Virtualenv is a tool to create isolated Python environments.")
2657 (license license:expat)))
2658
2659 (define-public python2-virtualenv
2660 (package-with-python2 python-virtualenv))
2661
2662 (define-public python-markupsafe
2663 (package
2664 (name "python-markupsafe")
2665 (version "0.23")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (string-append
2670 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2671 version ".tar.gz"))
2672 (sha256
2673 (base32
2674 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2675 (build-system python-build-system)
2676 (home-page "http://github.com/mitsuhiko/markupsafe")
2677 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2678 (description
2679 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2680 for Python.")
2681 (license license:bsd-3)))
2682
2683 (define-public python2-markupsafe
2684 (package-with-python2 python-markupsafe))
2685
2686 (define-public python-jinja2
2687 (package
2688 (name "python-jinja2")
2689 (version "2.8")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "Jinja2" version))
2694 (sha256
2695 (base32
2696 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2697 (build-system python-build-system)
2698 (inputs
2699 `(("python-markupsafe" ,python-markupsafe)))
2700 (home-page "http://jinja.pocoo.org/")
2701 (synopsis "Python template engine")
2702 (description
2703 "Jinja2 is a small but fast and easy to use stand-alone template engine
2704 written in pure Python.")
2705 (license license:bsd-3)))
2706
2707 (define-public python2-jinja2
2708 (package-with-python2 python-jinja2))
2709
2710 (define-public python-pystache
2711 (package
2712 (name "python-pystache")
2713 (version "0.5.4")
2714 (source (origin
2715 (method url-fetch)
2716 (uri (pypi-uri "pystache" version))
2717 (sha256
2718 (base32
2719 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2720 (build-system python-build-system)
2721 (home-page "http://defunkt.io/pystache/")
2722 (synopsis "Python logic-less template engine")
2723 (description
2724 "Pystache is a Python implementation of the framework agnostic,
2725 logic-free templating system Mustache.")
2726 (license license:expat)))
2727
2728 (define-public python2-pystache
2729 (package-with-python2 python-pystache))
2730
2731 (define-public python-joblib
2732 (package
2733 (name "python-joblib")
2734 (version "0.10.3")
2735 (source (origin
2736 (method url-fetch)
2737 (uri (pypi-uri "joblib" version))
2738 (sha256
2739 (base32
2740 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
2741 (build-system python-build-system)
2742 (arguments
2743 `(#:phases
2744 (modify-phases %standard-phases
2745 (add-before 'check 'disable-failing-tests
2746 (lambda _
2747 ;; This numpydoc tests fails for unknown reasons
2748 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2749 ;; This numpydoc test depends on matplotlib, which is not a
2750 ;; required input.
2751 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2752 ;; These tests fail to execute sys.executable
2753 (substitute* "joblib/test/test_parallel.py"
2754 (("import nose" line)
2755 (string-append "from nose.plugins.skip import SkipTest\n" line))
2756 (("def test_nested_parallel_warnings" line)
2757 (string-append "@SkipTest\n" line))
2758 (("def test_parallel_with_interactively_defined_functions" line)
2759 (string-append "@SkipTest\n" line)))
2760 #t)))))
2761 (native-inputs
2762 `(("python-nose" ,python-nose)
2763 ("python-sphinx" ,python-sphinx)
2764 ("python-docutils" ,python-docutils)
2765 ("python-numpydoc" ,python-numpydoc)))
2766 (home-page "http://pythonhosted.org/joblib/")
2767 (synopsis "Using Python functions as pipeline jobs")
2768 (description
2769 "Joblib is a set of tools to provide lightweight pipelining in Python.
2770 In particular, joblib offers: transparent disk-caching of the output values
2771 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2772 logging and tracing of the execution.")
2773 (license license:bsd-3)))
2774
2775 (define-public python2-joblib
2776 (package-with-python2 python-joblib))
2777
2778 (define-public python-docutils
2779 (package
2780 (name "python-docutils")
2781 (version "0.12")
2782 (source
2783 (origin
2784 (method url-fetch)
2785 (uri (string-append
2786 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2787 version ".tar.gz"))
2788 (sha256
2789 (base32
2790 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2791 (build-system python-build-system)
2792 (arguments
2793 '(#:tests? #f)) ; no setup.py test command
2794 (home-page "http://docutils.sourceforge.net/")
2795 (synopsis "Python Documentation Utilities")
2796 (description
2797 "Docutils is a modular system for processing documentation into useful
2798 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2799 reStructuredText.")
2800 ;; Most of the source code is public domain, but some source files are
2801 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2802 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2803
2804 (define-public python2-docutils
2805 (package-with-python2 python-docutils))
2806
2807 (define-public python-pygments
2808 (package
2809 (name "python-pygments")
2810 (version "2.0.2")
2811 (source
2812 (origin
2813 (method url-fetch)
2814 (uri (pypi-uri "Pygments" version))
2815 (sha256
2816 (base32
2817 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2818 (build-system python-build-system)
2819 (home-page "http://pygments.org/")
2820 (synopsis "Syntax highlighting")
2821 (description
2822 "Pygments is a syntax highlighting package written in Python.")
2823 (license license:bsd-2)))
2824
2825 (define-public python2-pygments
2826 (package-with-python2 python-pygments))
2827
2828 (define-public python-sphinx
2829 (package
2830 (name "python-sphinx")
2831 (version "1.2.3")
2832 (source
2833 (origin
2834 (method url-fetch)
2835 (uri (string-append
2836 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2837 version ".tar.gz"))
2838 (sha256
2839 (base32
2840 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2841 (build-system python-build-system)
2842 (inputs
2843 `(("python-jinja2" ,python-jinja2)
2844 ("python-docutils" ,python-docutils)
2845 ("python-pygments" ,python-pygments)))
2846 (home-page "http://sphinx-doc.org/")
2847 (synopsis "Python documentation generator")
2848 (description "Sphinx is a tool that makes it easy to create documentation
2849 for Python projects or other documents consisting of multiple reStructuredText
2850 sources.")
2851 (license license:bsd-3)))
2852
2853 (define-public python2-sphinx
2854 (package-with-python2 python-sphinx))
2855
2856 (define-public python-sphinx-rtd-theme
2857 (package
2858 (name "python-sphinx-rtd-theme")
2859 (version "0.1.6")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (string-append "https://pypi.python.org/packages/source/s/"
2864 "sphinx_rtd_theme/sphinx_rtd_theme-"
2865 version ".tar.gz"))
2866 (sha256
2867 (base32
2868 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2869 (build-system python-build-system)
2870 (arguments
2871 `(;; With standard flags, the install phase attempts to create a zip'd
2872 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2873 ;; before 1980'
2874 #:configure-flags '("--single-version-externally-managed"
2875 "--record=sphinx-rtd-theme.txt")))
2876 (inputs
2877 `(("python-docutils" ,python-docutils)
2878 ("python-sphinx" ,python-sphinx)))
2879 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2880 (synopsis "ReadTheDocs.org theme for Sphinx")
2881 (description "A theme for Sphinx used by ReadTheDocs.org.")
2882 (license license:expat)))
2883
2884 (define-public python2-sphinx-rtd-theme
2885 (package-with-python2 python-sphinx-rtd-theme))
2886
2887 (define-public python-feedgenerator
2888 (package
2889 (name "python-feedgenerator")
2890 (version "1.8")
2891 (source
2892 (origin
2893 (method url-fetch)
2894 (uri (pypi-uri "feedgenerator" version))
2895 (sha256
2896 (base32
2897 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2898 (build-system python-build-system)
2899 (native-inputs
2900 `(("python-pytz" ,python-pytz)
2901 ("python-six" ,python-six)))
2902 (home-page "https://github.com/getpelican/feedgenerator")
2903 (synopsis
2904 "Standalone version of Django's Atom/RSS feed generator")
2905 (description
2906 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2907 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2908 (license license:bsd-3)))
2909
2910 (define-public python2-feedgenerator
2911 (package-with-python2 python-feedgenerator))
2912
2913 (define-public python-blinker
2914 (package
2915 (name "python-blinker")
2916 (version "1.4")
2917 (source
2918 (origin
2919 (method url-fetch)
2920 (uri (pypi-uri "blinker" version))
2921 (sha256
2922 (base32
2923 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2924 (build-system python-build-system)
2925 ;; No "test" command supplied to setuptools, so unless there's another way
2926 ;; to run tests, we're skipping them!
2927 (arguments '(#:tests? #f))
2928 (home-page "http://pythonhosted.org/blinker/")
2929 (synopsis "Fast, simple object-to-object and broadcast signaling")
2930 (description
2931 "Blinker provides a fast dispatching system that allows any number of
2932 interested parties to subscribe to events, or \"signals\".")
2933 (license license:expat)))
2934
2935 (define-public python2-blinker
2936 (package-with-python2 python-blinker))
2937
2938 (define-public pelican
2939 (package
2940 (name "pelican")
2941 (version "3.6.3")
2942 (source
2943 (origin
2944 (method url-fetch)
2945 (uri (pypi-uri "pelican" version))
2946 (sha256
2947 (base32
2948 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2949 (build-system python-build-system)
2950 (inputs
2951 `(("python-feedgenerator" ,python-feedgenerator)
2952 ("python-jinja2" ,python-jinja2)
2953 ("python-pygments" ,python-pygments)
2954 ("python-docutils" ,python-docutils)
2955 ("python-pytz" ,python-pytz)
2956 ("python-blinker" ,python-blinker)
2957 ("python-unidecode" ,python-unidecode)
2958 ("python-six" ,python-six)
2959 ("python-dateutil-2" ,python-dateutil-2)))
2960 (home-page "http://getpelican.com/")
2961 (arguments
2962 `(;; XXX Requires a lot more packages to do unit tests :P
2963 #:tests? #f
2964 #:phases (modify-phases %standard-phases
2965 (add-before
2966 'install 'adjust-requires
2967 ;; Since feedgenerator is installed from git, it doesn't
2968 ;; conform to the version requirements.
2969 ;;
2970 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2971 ;; version requirement so setuptools doesn't get confused.
2972 (lambda _
2973 (substitute* "setup.py"
2974 (("['\"]feedgenerator.*?['\"]")
2975 "'feedgenerator'")))))))
2976 (synopsis "Python-based static site publishing system")
2977 (description
2978 "Pelican is a tool to generate a static blog from reStructuredText,
2979 Markdown input files, and more. Pelican uses Jinja2 for templating
2980 and is very extensible.")
2981 (license license:agpl3+)))
2982
2983 (define-public python-scikit-learn
2984 (package
2985 (name "python-scikit-learn")
2986 (version "0.16.1")
2987 (source
2988 (origin
2989 (method url-fetch)
2990 (uri (string-append
2991 "https://github.com/scikit-learn/scikit-learn/archive/"
2992 version ".tar.gz"))
2993 (file-name (string-append name "-" version ".tar.gz"))
2994 (sha256
2995 (base32
2996 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2997 (build-system python-build-system)
2998 (arguments
2999 `(#:phases
3000 (alist-cons-before
3001 'check 'set-HOME
3002 ;; some tests require access to "$HOME"
3003 (lambda _ (setenv "HOME" "/tmp"))
3004 ;; Tests can only be run after the library has been installed and not
3005 ;; within the source directory.
3006 (alist-cons-after
3007 'install 'check
3008 (lambda _
3009 (with-directory-excursion "/tmp"
3010 ;; With Python 3 one test of 3334 fails
3011 ;; (sklearn.tests.test_common.test_transformers); see
3012 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3013 (system* "nosetests" "-v" "sklearn")))
3014 (alist-delete 'check %standard-phases)))))
3015 (inputs
3016 `(("openblas" ,openblas)
3017 ("python-nose" ,python-nose)))
3018 (propagated-inputs
3019 `(("python-numpy" ,python-numpy)
3020 ("python-scipy" ,python-scipy)))
3021 (home-page "http://scikit-learn.org/")
3022 (synopsis "Machine Learning in Python")
3023 (description
3024 "Scikit-learn provides simple and efficient tools for data
3025 mining and data analysis.")
3026 (license license:bsd-3)
3027 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
3028
3029 (define-public python2-scikit-learn
3030 (package-with-python2 (strip-python2-variant python-scikit-learn)))
3031
3032 (define-public python-scikit-image
3033 (package
3034 (name "python-scikit-image")
3035 (version "0.11.3")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (string-append
3040 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3041 version ".tar.gz"))
3042 (sha256
3043 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3044 (build-system python-build-system)
3045 (propagated-inputs
3046 `(("python-matplotlib" ,python-matplotlib)
3047 ("python-networkx" ,python-networkx)
3048 ("python-numpy" ,python-numpy)
3049 ("python-scipy" ,python-scipy)
3050 ("python-six" ,python-six)
3051 ("python-pillow" ,python-pillow)))
3052 (native-inputs
3053 `(("python-cython" ,python-cython)))
3054 (home-page "http://scikit-image.org/")
3055 (synopsis "Image processing in Python")
3056 (description
3057 "Scikit-image is a collection of algorithms for image processing.")
3058 (license license:bsd-3)
3059 (properties `((python2-variant . ,(delay python2-scikit-image))))))
3060
3061 (define-public python2-scikit-image
3062 (let ((scikit-image (package-with-python2
3063 (strip-python2-variant python-scikit-image))))
3064 (package (inherit scikit-image)
3065 (native-inputs
3066 `(("python2-mock" ,python2-mock)
3067 ,@(package-native-inputs scikit-image)))
3068 (propagated-inputs
3069 `(("python2-pytz" ,python2-pytz)
3070 ,@(package-propagated-inputs scikit-image))))))
3071
3072 (define-public python-redis
3073 (package
3074 (name "python-redis")
3075 (version "2.10.3")
3076 (source
3077 (origin
3078 (method url-fetch)
3079 (uri (string-append
3080 "https://pypi.python.org/packages/source/r/redis/redis-"
3081 version ".tar.gz"))
3082 (sha256
3083 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3084 (build-system python-build-system)
3085 ;; Tests require a running Redis server
3086 (arguments '(#:tests? #f))
3087 (native-inputs
3088 `(("python-pytest" ,python-pytest)))
3089 (home-page "https://github.com/andymccurdy/redis-py")
3090 (synopsis "Redis Python client")
3091 (description
3092 "This package provides a Python interface to the Redis key-value store.")
3093 (license license:expat)))
3094
3095 (define-public python2-redis
3096 (package-with-python2 python-redis))
3097
3098 (define-public python-rq
3099 (package
3100 (name "python-rq")
3101 (version "0.5.2")
3102 (source
3103 (origin
3104 (method url-fetch)
3105 (uri (string-append
3106 "https://pypi.python.org/packages/source/r/rq/rq-"
3107 version ".tar.gz"))
3108 (sha256
3109 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3110 (build-system python-build-system)
3111 (propagated-inputs
3112 `(("python-click" ,python-click)
3113 ("python-redis" ,python-redis)))
3114 (home-page "http://python-rq.org/")
3115 (synopsis "Simple job queues for Python")
3116 (description
3117 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3118 processing them in the background with workers. It is backed by Redis and it
3119 is designed to have a low barrier to entry.")
3120 (license license:bsd-2)))
3121
3122 (define-public python2-rq
3123 (package-with-python2 python-rq))
3124
3125 (define-public python-cython
3126 (package
3127 (name "python-cython")
3128 (version "0.24.1")
3129 (source
3130 (origin
3131 (method url-fetch)
3132 (uri (pypi-uri "Cython" version))
3133 (sha256
3134 (base32
3135 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3136 (build-system python-build-system)
3137 ;; we need the full python package and not just the python-wrapper
3138 ;; because we need libpython3.3m.so
3139 (inputs
3140 `(("python" ,python)))
3141 (arguments
3142 `(#:phases
3143 (modify-phases %standard-phases
3144 (add-before 'check 'set-HOME
3145 ;; some tests require access to "$HOME/.cython"
3146 (lambda _ (setenv "HOME" "/tmp")))
3147 (replace 'check
3148 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3149 (home-page "http://cython.org/")
3150 (synopsis "C extensions for Python")
3151 (description "Cython is an optimising static compiler for both the Python
3152 programming language and the extended Cython programming language. It makes
3153 writing C extensions for Python as easy as Python itself.")
3154 (license license:asl2.0)
3155 (properties `((python2-variant . ,(delay python2-cython))))))
3156
3157 (define-public python2-cython
3158 (package (inherit (package-with-python2
3159 (strip-python2-variant python-cython)))
3160 (name "python2-cython")
3161 (inputs
3162 `(("python-2" ,python-2))))) ; this is not automatically changed
3163
3164 ;; The RPython toolchain currently does not support Python 3.
3165 (define-public python2-rpython
3166 (package
3167 (name "python2-rpython")
3168 (version "0.1.4")
3169 (source
3170 (origin
3171 (method url-fetch)
3172 (uri (pypi-uri "rpython" version))
3173 (sha256
3174 (base32
3175 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3176 (build-system python-build-system)
3177 (arguments `(#:python ,python-2))
3178 (native-inputs
3179 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3180 (home-page "https://rpython.readthedocs.org")
3181 (synopsis "Framework for implementing interpreters and virtual machines")
3182 (description "RPython is a translation and support framework for
3183 producing implementations of dynamic languages, emphasizing a clean separation
3184 between language specification and implementation aspects.")
3185 (license license:expat)))
3186
3187 ;; This version of numpy is missing the documentation and is only used to
3188 ;; build matplotlib which is required to build numpy's documentation.
3189 (define python-numpy-bootstrap
3190 (package
3191 (name "python-numpy-bootstrap")
3192 (version "1.10.4")
3193 (source
3194 (origin
3195 (method url-fetch)
3196 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3197 "/numpy-" version ".tar.gz"))
3198 (sha256
3199 (base32
3200 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3201 (build-system python-build-system)
3202 (inputs
3203 `(("python-nose" ,python-nose)
3204 ("openblas" ,openblas)
3205 ("lapack" ,lapack)))
3206 (native-inputs
3207 `(("gfortran" ,gfortran)))
3208 (arguments
3209 `(#:phases
3210 (alist-cons-before
3211 'build 'set-environment-variables
3212 (lambda* (#:key inputs #:allow-other-keys)
3213 (call-with-output-file "site.cfg"
3214 (lambda (port)
3215 (format port
3216 "[openblas]
3217 libraries = openblas
3218 library_dirs = ~a/lib
3219 include_dirs = ~a/include
3220
3221 [lapack]
3222 lapack_libs = lapack
3223 library_dirs = ~a/lib
3224 include_dirs = ~a/include
3225 "
3226 (assoc-ref inputs "openblas")
3227 (assoc-ref inputs "openblas")
3228 (assoc-ref inputs "lapack")
3229 (assoc-ref inputs "lapack"))))
3230 ;; Use "gcc" executable, not "cc".
3231 (substitute* "numpy/distutils/system_info.py"
3232 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3233 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3234 #t)
3235 ;; Tests can only be run after the library has been installed and not
3236 ;; within the source directory.
3237 (alist-cons-after
3238 'install 'check
3239 (lambda _
3240 (with-directory-excursion "/tmp"
3241 (zero? (system* "python" "-c"
3242 "import numpy; numpy.test(verbose=2)"))))
3243 (alist-delete
3244 'check
3245 %standard-phases)))))
3246 (home-page "http://www.numpy.org/")
3247 (synopsis "Fundamental package for scientific computing with Python")
3248 (description "NumPy is the fundamental package for scientific computing
3249 with Python. It contains among other things: a powerful N-dimensional array
3250 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3251 and Fortran code, useful linear algebra, Fourier transform, and random number
3252 capabilities.")
3253 (license license:bsd-3)))
3254
3255 (define python2-numpy-bootstrap
3256 (package-with-python2 python-numpy-bootstrap))
3257
3258 (define-public python2-fastlmm
3259 (package
3260 (name "python2-fastlmm")
3261 (version "0.2.21")
3262 (source
3263 (origin
3264 (method url-fetch)
3265 (uri (pypi-uri "fastlmm" version ".zip"))
3266 (sha256
3267 (base32
3268 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3269 (build-system python-build-system)
3270 (arguments
3271 `(#:python ,python-2)) ; only Python 2.7 is supported
3272 (propagated-inputs
3273 `(("python2-numpy" ,python2-numpy)
3274 ("python2-scipy" ,python2-scipy)
3275 ("python2-matplotlib" ,python2-matplotlib)
3276 ("python2-pandas" ,python2-pandas)
3277 ("python2-scikit-learn" ,python2-scikit-learn)
3278 ("python2-cython" ,python2-cython)
3279 ("python2-pysnptools" ,python2-pysnptools)))
3280 (native-inputs
3281 `(("unzip" ,unzip)
3282 ("python2-mock" ,python2-mock)))
3283 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3284 (synopsis "Perform genome-wide association studies on large data sets")
3285 (description
3286 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3287 Models, is a program for performing both single-SNP and SNP-set genome-wide
3288 association studies (GWAS) on extremely large data sets.")
3289 (license license:asl2.0)))
3290
3291 (define-public python-numpy
3292 (package (inherit python-numpy-bootstrap)
3293 (name "python-numpy")
3294 (outputs '("out" "doc"))
3295 (inputs
3296 `(("which" ,which)
3297 ("python-matplotlib" ,python-matplotlib)
3298 ("python-sphinx" ,python-sphinx)
3299 ("python-pyparsing" ,python-pyparsing)
3300 ("python-numpydoc" ,python-numpydoc)
3301 ,@(package-inputs python-numpy-bootstrap)))
3302 (native-inputs
3303 `(("pkg-config" ,pkg-config)
3304 ("texlive" ,texlive)
3305 ("texinfo" ,texinfo)
3306 ("perl" ,perl)
3307 ,@(package-native-inputs python-numpy-bootstrap)))
3308 (arguments
3309 `(,@(substitute-keyword-arguments
3310 (package-arguments python-numpy-bootstrap)
3311 ((#:phases phases)
3312 `(alist-cons-after
3313 'install 'install-doc
3314 (lambda* (#:key outputs #:allow-other-keys)
3315 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3316 (doc (string-append
3317 data "/doc/" ,name "-"
3318 ,(package-version python-numpy-bootstrap)))
3319 (info (string-append data "/info"))
3320 (html (string-append doc "/html"))
3321 (pyver ,(string-append "PYVER=")))
3322 (with-directory-excursion "doc"
3323 (mkdir-p html)
3324 (system* "make" "html" pyver)
3325 (system* "make" "latex" "PAPER=a4" pyver)
3326 (system* "make" "-C" "build/latex"
3327 "all-pdf" "PAPER=a4" pyver)
3328 ;; FIXME: Generation of the info file fails.
3329 ;; (system* "make" "info" pyver)
3330 ;; (mkdir-p info)
3331 ;; (copy-file "build/texinfo/numpy.info"
3332 ;; (string-append info "/numpy.info"))
3333 (for-each (lambda (file)
3334 (copy-file (string-append "build/latex" file)
3335 (string-append doc file)))
3336 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3337 (with-directory-excursion "build/html"
3338 (for-each (lambda (file)
3339 (let* ((dir (dirname file))
3340 (tgt-dir (string-append html "/" dir)))
3341 (unless (equal? "." dir)
3342 (mkdir-p tgt-dir))
3343 (install-file file html)))
3344 (find-files "." ".*"))))))
3345 ,phases)))))))
3346
3347 (define-public python2-numpy
3348 (package-with-python2 python-numpy))
3349
3350 (define-public python-pyparsing
3351 (package
3352 (name "python-pyparsing")
3353 (version "2.0.3")
3354 (source
3355 (origin
3356 (method url-fetch)
3357 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3358 "/pyparsing-" version
3359 "/pyparsing-" version ".tar.gz"))
3360 (sha256
3361 (base32
3362 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3363 (build-system python-build-system)
3364 (outputs '("out" "doc"))
3365 (arguments
3366 `(#:tests? #f ; no test target
3367 #:modules ((guix build python-build-system)
3368 (guix build utils))
3369 #:phases
3370 (alist-cons-after
3371 'install 'install-doc
3372 (lambda* (#:key outputs #:allow-other-keys)
3373 (let* ((doc (string-append (assoc-ref outputs "doc")
3374 "/share/doc/" ,name "-" ,version))
3375 (html-doc (string-append doc "/html"))
3376 (examples (string-append doc "/examples")))
3377 (mkdir-p html-doc)
3378 (mkdir-p examples)
3379 (for-each
3380 (lambda (dir tgt)
3381 (map (lambda (file)
3382 (install-file file tgt))
3383 (find-files dir ".*")))
3384 (list "docs" "htmldoc" "examples")
3385 (list doc html-doc examples))))
3386 %standard-phases)))
3387 (home-page "http://pyparsing.wikispaces.com")
3388 (synopsis "Python parsing class library")
3389 (description
3390 "The pyparsing module is an alternative approach to creating and
3391 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3392 of regular expressions. The pyparsing module provides a library of classes
3393 that client code uses to construct the grammar directly in Python code.")
3394 (license license:expat)))
3395
3396 (define-public python2-pyparsing
3397 (package-with-python2 python-pyparsing))
3398
3399 (define-public python-numpydoc
3400 (package
3401 (name "python-numpydoc")
3402 (version "0.5")
3403 (source
3404 (origin
3405 (method url-fetch)
3406 (uri (string-append
3407 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3408 version ".tar.gz"))
3409 (sha256
3410 (base32
3411 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3412 (modules '((guix build utils)))
3413 (snippet
3414 '(begin
3415 ;; Drop a test requiring matplotlib, which we cannot add as an
3416 ;; input since it would create a circular dependency: Extend the
3417 ;; test for Python 3, where it is already dropped, to Python 2.
3418 (substitute* "numpydoc/tests/test_plot_directive.py"
3419 (("3") "2"))))))
3420 (build-system python-build-system)
3421 (inputs
3422 `(("python-docutils" ,python-docutils)
3423 ("python-sphinx" ,python-sphinx)
3424 ("python-nose" ,python-nose)))
3425 (home-page "https://pypi.python.org/pypi/numpydoc")
3426 (synopsis
3427 "Numpy's Sphinx extensions")
3428 (description
3429 "Sphinx extension to support docstrings in Numpy format.")
3430 (license license:bsd-2)))
3431
3432 (define-public python2-numpydoc
3433 (package-with-python2 python-numpydoc))
3434
3435 (define-public python-numexpr
3436 (package
3437 (name "python-numexpr")
3438 (version "2.6.0")
3439 (source
3440 (origin
3441 (method url-fetch)
3442 (uri (pypi-uri "numexpr" version))
3443 (sha256
3444 (base32
3445 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3446 (build-system python-build-system)
3447 (arguments `(#:tests? #f)) ; no tests included
3448 (propagated-inputs
3449 `(("python-numpy" ,python-numpy)))
3450 (home-page "https://github.com/pydata/numexpr")
3451 (synopsis "Fast numerical expression evaluator for NumPy")
3452 (description
3453 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3454 expressions that operate on arrays are accelerated and use less memory than
3455 doing the same calculation in Python. In addition, its multi-threaded
3456 capabilities can make use of all your cores, which may accelerate
3457 computations, most specially if they are not memory-bounded (e.g. those using
3458 transcendental functions).")
3459 (license license:expat)
3460 (properties `((python2-variant . ,(delay python2-numexpr))))))
3461
3462 (define-public python2-numexpr
3463 (package-with-python2 (strip-python2-variant python-numexpr)))
3464
3465 (define-public python-matplotlib
3466 (package
3467 (name "python-matplotlib")
3468 (version "1.4.3")
3469 (source
3470 (origin
3471 (method url-fetch)
3472 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3473 "/matplotlib-" version
3474 "/matplotlib-" version ".tar.gz"))
3475 (sha256
3476 (base32
3477 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3478 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3479 (build-system python-build-system)
3480 (outputs '("out" "doc"))
3481 (propagated-inputs ; the following packages are all needed at run time
3482 `(("python-pyparsing" ,python-pyparsing)
3483 ("python-pygobject" ,python-pygobject)
3484 ("gobject-introspection" ,gobject-introspection)
3485 ("python-tkinter" ,python "tk")
3486 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3487 ;; from 'gtk+') provides the required 'typelib' files used by
3488 ;; 'gobject-introspection'. The location of these files is set with the
3489 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3490 ;; is done automatically by a 'native-search-path' procedure. However,
3491 ;; at run-time the user must set this variable as follows:
3492 ;;
3493 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3494 ("gtk+" ,gtk+)
3495 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3496 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3497 ;; object. For this reason we need to import both libraries.
3498 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3499 ("python-pycairo" ,python-pycairo)
3500 ("python-cairocffi" ,python-cairocffi)))
3501 (inputs
3502 `(("python-dateutil" ,python-dateutil-2)
3503 ("python-six" ,python-six)
3504 ("python-pytz" ,python-pytz)
3505 ("python-numpy" ,python-numpy-bootstrap)
3506 ("python-sphinx" ,python-sphinx)
3507 ("python-numpydoc" ,python-numpydoc)
3508 ("python-nose" ,python-nose)
3509 ("python-mock" ,python-mock)
3510 ("libpng" ,libpng)
3511 ("imagemagick" ,imagemagick)
3512 ("freetype" ,freetype)
3513 ("cairo" ,cairo)
3514 ("glib" ,glib)
3515 ("python-pillow" ,python-pillow)
3516 ;; FIXME: Add backends when available.
3517 ;("python-wxpython" ,python-wxpython)
3518 ;("python-pyqt" ,python-pyqt)
3519 ("tcl" ,tcl)
3520 ("tk" ,tk)))
3521 (native-inputs
3522 `(("pkg-config" ,pkg-config)
3523 ("texlive" ,texlive)
3524 ("texinfo" ,texinfo)))
3525 (arguments
3526 `(#:phases
3527 (alist-cons-before
3528 'build 'configure-environment
3529 (lambda* (#:key outputs inputs #:allow-other-keys)
3530 (let ((cairo (assoc-ref inputs "cairo"))
3531 (gtk+ (assoc-ref inputs "gtk+")))
3532 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3533 ;; has not effect.
3534 (setenv "LD_LIBRARY_PATH"
3535 (string-append cairo "/lib:" gtk+ "/lib"))
3536 (setenv "HOME" (getcwd))
3537 (call-with-output-file "setup.cfg"
3538 (lambda (port)
3539 (format port "[directories]~%
3540 basedirlist = ~a,~a~%
3541 [rc_options]~%
3542 backend = TkAgg~%"
3543 (assoc-ref inputs "tcl")
3544 (assoc-ref inputs "tk"))))))
3545 (alist-cons-after
3546 'install 'install-doc
3547 (lambda* (#:key outputs #:allow-other-keys)
3548 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3549 (doc (string-append data "/doc/" ,name "-" ,version))
3550 (info (string-append data "/info"))
3551 (html (string-append doc "/html")))
3552 (with-directory-excursion "doc"
3553 ;; Produce pdf in 'A4' format.
3554 (substitute* (find-files "." "conf\\.py")
3555 (("latex_paper_size = 'letter'")
3556 "latex_paper_size = 'a4'"))
3557 (mkdir-p html)
3558 (mkdir-p info)
3559 ;; The doc recommends to run the 'html' target twice.
3560 (system* "python" "make.py" "html")
3561 (system* "python" "make.py" "html")
3562 (copy-recursively "build/html" html)
3563 (system* "python" "make.py" "latex")
3564 (system* "python" "make.py" "texinfo")
3565 (symlink (string-append html "/_images")
3566 (string-append info "/matplotlib-figures"))
3567 (with-directory-excursion "build/texinfo"
3568 (substitute* "matplotlib.texi"
3569 (("@image\\{([^,]*)" all file)
3570 (string-append "@image{matplotlib-figures/" file)))
3571 (symlink (string-append html "/_images")
3572 "./matplotlib-figures")
3573 (system* "makeinfo" "--no-split"
3574 "-o" "matplotlib.info" "matplotlib.texi"))
3575 (copy-file "build/texinfo/matplotlib.info"
3576 (string-append info "/matplotlib.info"))
3577 (copy-file "build/latex/Matplotlib.pdf"
3578 (string-append doc "/Matplotlib.pdf")))))
3579 %standard-phases))))
3580 (home-page "http://matplotlib.org")
3581 (synopsis "2D plotting library for Python")
3582 (description
3583 "Matplotlib is a Python 2D plotting library which produces publication
3584 quality figures in a variety of hardcopy formats and interactive environments
3585 across platforms. Matplotlib can be used in Python scripts, the python and
3586 ipython shell, web application servers, and six graphical user interface
3587 toolkits.")
3588 (license license:psfl)
3589 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3590
3591 (define-public python2-matplotlib
3592 (let ((matplotlib (package-with-python2
3593 (strip-python2-variant python-matplotlib))))
3594 (package (inherit matplotlib)
3595 ;; Make sure to use special packages for Python 2 instead
3596 ;; of those automatically rewritten by package-with-python2.
3597 (propagated-inputs
3598 `(("python2-pycairo" ,python2-pycairo)
3599 ("python2-pygobject-2" ,python2-pygobject-2)
3600 ("python2-tkinter" ,python-2 "tk")
3601 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3602 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3603
3604 (define-public python2-pysnptools
3605 (package
3606 (name "python2-pysnptools")
3607 (version "0.3.9")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (pypi-uri "pysnptools" version ".zip"))
3612 (sha256
3613 (base32
3614 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3615 (build-system python-build-system)
3616 (arguments
3617 `(#:python ,python-2)) ; only Python 2.7 is supported
3618 (propagated-inputs
3619 `(("python2-numpy" ,python2-numpy)
3620 ("python2-scipy" ,python2-scipy)
3621 ("python2-pytz" ,python2-pytz)
3622 ("python2-cython" ,python2-cython)))
3623 (inputs
3624 `(("python2-dateutil-2" ,python2-dateutil-2)
3625 ("python2-pandas" ,python2-pandas)
3626 ("python2-six" ,python2-six)))
3627 (native-inputs
3628 `(("unzip" ,unzip)))
3629 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3630 (synopsis "Library for reading and manipulating genetic data")
3631 (description
3632 "PySnpTools is a library for reading and manipulating genetic data. It
3633 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3634 those files. It can also efficiently manipulate ranges of integers using set
3635 operators such as union, intersection, and difference.")
3636 (license license:asl2.0)))
3637
3638 (define-public python-rpy2
3639 (package
3640 (name "python-rpy2")
3641 (version "2.7.6")
3642 (source
3643 (origin
3644 (method url-fetch)
3645 (uri (pypi-uri "rpy2" version))
3646 (sha256
3647 (base32
3648 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3649 (build-system python-build-system)
3650 (inputs
3651 `(("python-six" ,python-six)
3652 ("readline" ,readline)
3653 ("icu4c" ,icu4c)
3654 ("pcre" ,pcre)
3655 ("r" ,r)))
3656 (native-inputs
3657 `(("zlib" ,zlib)))
3658 (home-page "http://rpy.sourceforge.net/")
3659 (synopsis "Python interface to the R language")
3660 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3661 low-level interface to R from Python, a proposed high-level interface,
3662 including wrappers to graphical libraries, as well as R-like structures and
3663 functions.")
3664 (license license:gpl3+)))
3665
3666 (define-public python2-rpy2
3667 (let ((rpy2 (package-with-python2 python-rpy2)))
3668 (package (inherit rpy2)
3669 (native-inputs
3670 `(("python2-singledispatch" ,python2-singledispatch)
3671 ,@(package-native-inputs rpy2))))))
3672
3673 (define-public python-scipy
3674 (package
3675 (name "python-scipy")
3676 (version "0.16.0")
3677 (source
3678 (origin
3679 (method url-fetch)
3680 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3681 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3682 "/scipy-" version ".tar.xz"))
3683 (sha256
3684 (base32
3685 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3686 (build-system python-build-system)
3687 (propagated-inputs
3688 `(("python-numpy" ,python-numpy)
3689 ("python-matplotlib" ,python-matplotlib)
3690 ("python-pyparsing" ,python-pyparsing)))
3691 (inputs
3692 `(("lapack" ,lapack)
3693 ("openblas" ,openblas)))
3694 (native-inputs
3695 `(("python-nose" ,python-nose)
3696 ("python-sphinx" ,python-sphinx)
3697 ("python-numpydoc" ,python-numpydoc)
3698 ("gfortran" ,gfortran)
3699 ("texlive" ,texlive)
3700 ("perl" ,perl)))
3701 (outputs '("out" "doc"))
3702 (arguments
3703 `(#:phases
3704 (alist-cons-before
3705 'build 'configure-openblas
3706 (lambda* (#:key inputs #:allow-other-keys)
3707 (call-with-output-file "site.cfg"
3708 (lambda (port)
3709 (format port
3710 "[blas]
3711 libraries = openblas
3712 library_dirs = ~a/lib
3713 include_dirs = ~a/include
3714 [atlas]
3715 library_dirs = ~a/lib
3716 atlas_libs = openblas
3717 "
3718 (assoc-ref inputs "openblas")
3719 (assoc-ref inputs "openblas")
3720 (assoc-ref inputs "openblas"))))
3721 #t)
3722 (alist-cons-after
3723 'install 'install-doc
3724 (lambda* (#:key outputs #:allow-other-keys)
3725 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3726 (doc (string-append data "/doc/" ,name "-" ,version))
3727 (html (string-append doc "/html"))
3728 (pyver ,(string-append "PYVER=")))
3729 (with-directory-excursion "doc"
3730 ;; Fix generation of images for mathematical expressions.
3731 (substitute* (find-files "source" "conf\\.py")
3732 (("pngmath_use_preview = True")
3733 "pngmath_use_preview = False"))
3734 (mkdir-p html)
3735 (system* "make" "html" pyver)
3736 (system* "make" "latex" "PAPER=a4" pyver)
3737 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3738 (copy-file "build/latex/scipy-ref.pdf"
3739 (string-append doc "/scipy-ref.pdf"))
3740 (with-directory-excursion "build/html"
3741 (for-each (lambda (file)
3742 (let* ((dir (dirname file))
3743 (tgt-dir (string-append html "/" dir)))
3744 (install-file file html)))
3745 (find-files "." ".*"))))))
3746 ;; Tests can only be run after the library has been installed and not
3747 ;; within the source directory.
3748 (alist-cons-after
3749 'install 'check
3750 (lambda _
3751 (with-directory-excursion "/tmp"
3752 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3753 (alist-delete
3754 'check
3755 (alist-cons-after
3756 'unpack 'fix-tests
3757 (lambda _
3758 (substitute* "scipy/integrate/tests/test_quadpack.py"
3759 (("libm.so") "libm.so.6"))
3760 #t)
3761 %standard-phases)))))))
3762 (home-page "http://www.scipy.org/")
3763 (synopsis "The Scipy library provides efficient numerical routines")
3764 (description "The SciPy library is one of the core packages that make up
3765 the SciPy stack. It provides many user-friendly and efficient numerical
3766 routines such as routines for numerical integration and optimization.")
3767 (license license:bsd-3)))
3768
3769 (define-public python2-scipy
3770 (package-with-python2 python-scipy))
3771
3772 (define-public python-socksipy-branch
3773 (package
3774 (name "python-socksipy-branch")
3775 (version "1.01")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (pypi-uri "SocksiPy-branch" version))
3780 (sha256
3781 (base32
3782 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3783 (build-system python-build-system)
3784 (arguments
3785 `(#:tests? #f)) ; There are no tests
3786 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3787 (synopsis "Python SOCKS module")
3788 (description
3789 "SocksiPy - A Python SOCKS client module. It provides a
3790 socket-like interface that supports connections to any TCP
3791 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3792 The original version was developed by Dan Haim, this is a
3793 branch created by Mario Vilas to address some open issues,
3794 as the original project seems to have been abandoned circa 2007.")
3795 (license license:bsd-3)))
3796
3797 (define-public python2-socksipy-branch
3798 (package-with-python2 python-socksipy-branch))
3799
3800 (define-public python-sqlalchemy
3801 (package
3802 (name "python-sqlalchemy")
3803 (version "1.0.12")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (string-append "https://pypi.python.org/packages/source/S/"
3808 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3809 (sha256
3810 (base32
3811 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3812 (build-system python-build-system)
3813 (native-inputs
3814 `(("python-cython" ,python-cython) ;for c extensions
3815 ("python-pytest" ,python-pytest)
3816 ("python-mock" ,python-mock))) ;for tests
3817 (arguments
3818 `(#:phases (alist-replace
3819 'check
3820 (lambda _ (zero? (system* "py.test")))
3821 %standard-phases)))
3822 (home-page "http://www.sqlalchemy.org")
3823 (synopsis "Database abstraction library")
3824 (description
3825 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3826 gives application developers the full power and flexibility of SQL. It
3827 provides a full suite of well known enterprise-level persistence patterns,
3828 designed for efficient and high-performing database access, adapted into a
3829 simple and Pythonic domain language.")
3830 (license license:x11)))
3831
3832 (define-public python2-sqlalchemy
3833 (package-with-python2 python-sqlalchemy))
3834
3835 (define-public python-pycodestyle
3836 (package
3837 (name "python-pycodestyle")
3838 (version "2.0.0")
3839 (source
3840 (origin
3841 (method url-fetch)
3842 (uri (pypi-uri "pycodestyle" version))
3843 (sha256
3844 (base32
3845 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3846 (build-system python-build-system)
3847 (home-page "https://pycodestyle.readthedocs.io/")
3848 (synopsis "Python style guide checker")
3849 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3850 Python code against some of the style conventions in
3851 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3852 (license license:expat)
3853 (properties `((python2-variant . ,(delay python2-pycodestyle))))))
3854
3855 (define-public python2-pycodestyle
3856 (let ((base (package-with-python2 (strip-python2-variant
3857 python-pycodestyle))))
3858 (package (inherit base)
3859 (native-inputs
3860 `(("python2-setuptools" ,python2-setuptools)
3861 ,@(package-native-inputs base))))))
3862
3863 (define-public python-orderedmultidict
3864 (package
3865 (name "python-orderedmultidict")
3866 (version "0.7.10")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "orderedmultidict" version))
3871 (sha256
3872 (base32
3873 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3874 (build-system python-build-system)
3875 (arguments
3876 `(#:phases
3877 (modify-phases %standard-phases
3878 (add-after 'unpack 'fix-tests
3879 (lambda _
3880 ;; The package uses nosetest for running the tests.
3881 ;; Adding this initfile allows to run the test suite
3882 ;; without requiring nosetest.
3883 (zero? (system* "touch" "tests/__init__.py")))))))
3884 (propagated-inputs
3885 `(("python-six" ,python-six)))
3886 (native-inputs
3887 `(("python-pycodestyle" ,python-pycodestyle)))
3888 (home-page "https://github.com/gruns/orderedmultidict")
3889 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3890 (description "This package contains a library for ordered multivalue
3891 dictionaries. A multivalue dictionary is a dictionary that can store
3892 multiple values for the same key. An ordered multivalue dictionary is a
3893 multivalue dictionary that retains the order of insertions and deletions.")
3894 (license license:unlicense)
3895 (properties `((python2-variant . ,(delay python2-orderedmultidict))))))
3896
3897 (define-public python2-orderedmultidict
3898 (let ((base (package-with-python2 (strip-python2-variant
3899 python-orderedmultidict))))
3900 (package (inherit base)
3901 (native-inputs
3902 `(("python2-setuptools" ,python2-setuptools)
3903 ,@(package-native-inputs base))))))
3904
3905 (define-public python-furl
3906 (package
3907 (name "python-furl")
3908 (version "0.5.6")
3909 (source
3910 (origin
3911 (method url-fetch)
3912 (uri (pypi-uri "furl" version))
3913 (sha256
3914 (base32
3915 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3916 (build-system python-build-system)
3917 (propagated-inputs
3918 `(("python-six" ,python-six)
3919 ("python-orderedmultidict" ,python-orderedmultidict)))
3920 (native-inputs
3921 `(("python-pycodestyle" ,python-pycodestyle)))
3922 (home-page "https://github.com/gruns/furl")
3923 (synopsis "URL manipulation in Python")
3924 (description "Furl provides an easy-to-use alternative to the
3925 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3926 (license license:unlicense)
3927 (properties `((python2-variant . ,(delay python2-furl))))))
3928
3929 (define-public python2-furl
3930 (let ((base (package-with-python2 (strip-python2-variant
3931 python-furl))))
3932 (package (inherit base)
3933 (native-inputs
3934 `(("python2-setuptools" ,python2-setuptools)
3935 ,@(package-native-inputs base))))))
3936
3937 (define-public python-flask-babel
3938 (package
3939 (name "python-flask-babel")
3940 (version "0.11.1")
3941 (source
3942 (origin
3943 (method url-fetch)
3944 (uri (pypi-uri "Flask-Babel" version))
3945 (sha256
3946 (base32
3947 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3948 (build-system python-build-system)
3949 (propagated-inputs
3950 `(("python-flask" ,python-flask)
3951 ("python-babel" ,python-babel)
3952 ("python-jinja2" ,python-jinja2)
3953 ("python-pytz" ,python-pytz)))
3954 (home-page "https://github.com/python-babel/flask-babel")
3955 (synopsis "Add i18n/l10n support to Flask applications")
3956 (description "This package implements internationalization and localization
3957 support for Flask. This is based on the Python babel module as well as pytz -
3958 both of which are installed automatically if you install this library.")
3959 (license license:bsd-3)
3960 (properties `((python2-variant . ,(delay python2-flask-babel))))))
3961
3962 (define-public python2-flask-babel
3963 (let ((base (package-with-python2 (strip-python2-variant
3964 python-flask-babel))))
3965 (package (inherit base)
3966 (native-inputs
3967 `(("python2-setuptools" ,python2-setuptools)
3968 ,@(package-native-inputs base))))))
3969
3970 (define-public python-sqlalchemy-utils
3971 (package
3972 (name "python-sqlalchemy-utils")
3973 (version "0.32.9")
3974 (source
3975 (origin
3976 (method url-fetch)
3977 (uri (pypi-uri "SQLAlchemy-Utils" version))
3978 (sha256
3979 (base32
3980 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3981 (build-system python-build-system)
3982 (propagated-inputs
3983 `(("python-six" ,python-six)
3984 ("python-sqlalchemy" ,python-sqlalchemy)))
3985 (native-inputs
3986 `(("python-pytest" ,python-pytest)))
3987 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3988 (synopsis "Various utility functions for SQLAlchemy")
3989 (description
3990 "SQLAlchemy-utils provides various utility functions and custom data types
3991 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3992
3993 You might also want to install the following optional dependencies:
3994 @enumerate
3995 @item @code{python-passlib}
3996 @item @code{python-babel}
3997 @item @code{python-cryptography}
3998 @item @code{python-pytz}
3999 @item @code{python-psycopg2}
4000 @item @code{python-furl}
4001 @item @code{python-flask-babel}
4002 @end enumerate
4003 ")
4004 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
4005 (license license:bsd-3)))
4006
4007 (define-public python2-sqlalchemy-utils
4008 (let ((base (package-with-python2
4009 (strip-python2-variant python-sqlalchemy-utils))))
4010 (package (inherit base)
4011 (native-inputs
4012 `(("python2-setuptools" ,python2-setuptools)
4013 ,@(package-native-inputs base))))))
4014
4015 (define-public python-alembic
4016 (package
4017 (name "python-alembic")
4018 (version "0.8.7")
4019 (source
4020 (origin
4021 (method url-fetch)
4022 (uri (pypi-uri "alembic" version))
4023 (sha256
4024 (base32
4025 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
4026 (build-system python-build-system)
4027 (native-inputs
4028 `(("python-mock" ,python-mock)
4029 ("python-pytest-cov" ,python-pytest-cov)))
4030 (propagated-inputs
4031 `(("python-sqlalchemy" ,python-sqlalchemy)
4032 ("python-mako" ,python-mako)
4033 ("python-editor" ,python-editor)))
4034 (home-page "http://bitbucket.org/zzzeek/alembic")
4035 (synopsis
4036 "Database migration tool for SQLAlchemy")
4037 (description
4038 "Alembic is a lightweight database migration tool for usage with the
4039 SQLAlchemy Database Toolkit for Python.")
4040 (license license:expat)
4041 (properties `((python2-variant . ,(delay python2-alembic))))))
4042
4043 (define-public python2-alembic
4044 (let ((alembic (package-with-python2
4045 (strip-python2-variant python-alembic))))
4046 (package
4047 (inherit alembic)
4048 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4049 ,@(package-native-inputs alembic))))))
4050
4051 (define-public python-distutils-extra
4052 (package
4053 (name "python-distutils-extra")
4054 (version "2.38")
4055 (source
4056 (origin
4057 (method url-fetch)
4058 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4059 version "/+download/python-distutils-extra-"
4060 version ".tar.gz"))
4061 (sha256
4062 (base32
4063 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4064 (build-system python-build-system)
4065 (home-page "https://launchpad.net/python-distutils-extra/")
4066 (synopsis "Enhancements to Python's distutils")
4067 (description
4068 "The python-distutils-extra module enables you to easily integrate
4069 gettext support, themed icons, and scrollkeeper-based documentation into
4070 Python's distutils.")
4071 (license license:gpl2)))
4072
4073 (define-public python2-distutils-extra
4074 (package-with-python2 python-distutils-extra))
4075
4076 (define-public python2-elib.intl
4077 (package
4078 (name "python2-elib.intl")
4079 (version "0.0.3")
4080 (source
4081 (origin
4082 ;; This project doesn't tag releases or publish tarballs, so we take
4083 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4084 (method git-fetch)
4085 (uri (git-reference
4086 (url "https://github.com/dieterv/elib.intl.git")
4087 (commit "d09997cfef")))
4088 (sha256
4089 (base32
4090 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4091 (build-system python-build-system)
4092 (arguments
4093 ;; incompatible with Python 3 (exception syntax)
4094 `(#:python ,python-2
4095 #:tests? #f
4096 ;; With standard flags, the install phase attempts to create a zip'd
4097 ;; egg file, and fails with an error: 'ZIP does not support timestamps
4098 ;; before 1980'
4099 #:configure-flags '("--single-version-externally-managed"
4100 "--record=elib.txt")))
4101 (home-page "https://github.com/dieterv/elib.intl")
4102 (synopsis "Enhanced internationalization for Python")
4103 (description
4104 "The elib.intl module provides enhanced internationalization (I18N)
4105 services for your Python modules and applications.")
4106 (license license:lgpl3+)))
4107
4108 (define-public python-pillow
4109 (package
4110 (name "python-pillow")
4111 (version "3.3.3")
4112 (source
4113 (origin
4114 (method url-fetch)
4115 (uri (pypi-uri "Pillow" version))
4116 (sha256
4117 (base32
4118 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4119 (build-system python-build-system)
4120 (native-inputs
4121 `(("python-nose" ,python-nose)))
4122 (inputs
4123 `(("freetype" ,freetype)
4124 ("lcms" ,lcms)
4125 ("zlib" ,zlib)
4126 ("libjpeg" ,libjpeg)
4127 ("openjpeg" ,openjpeg)
4128 ("libtiff" ,libtiff)
4129 ("libwebp" ,libwebp)))
4130 ;; Note: setuptools used at runtime for pkg_resources
4131 (arguments
4132 `(#:phases (modify-phases %standard-phases
4133 (add-before
4134 'install 'disable-egg-compression
4135 (lambda _
4136 ;; Leave the .egg uncompressed since compressing it would
4137 ;; prevent the GC from identifying run-time dependencies.
4138 ;; See <http://bugs.gnu.org/20765>.
4139 (let ((port (open-file "setup.cfg" "a")))
4140 (display "\n[easy_install]\nzip_ok = 0\n"
4141 port)
4142 (close-port port)
4143 #t)))
4144 (add-after
4145 'install 'check-installed
4146 (lambda _
4147 (begin
4148 (setenv "HOME" (getcwd))
4149 (and (zero? (system* "python" "selftest.py"
4150 "--installed"))
4151 (zero? (system* "python" "test-installed.py"))))))
4152 (delete 'check))))
4153 (home-page "https://pypi.python.org/pypi/Pillow")
4154 (synopsis "Fork of the Python Imaging Library")
4155 (description
4156 "The Python Imaging Library adds image processing capabilities to your
4157 Python interpreter. This library provides extensive file format support, an
4158 efficient internal representation, and fairly powerful image processing
4159 capabilities. The core image library is designed for fast access to data
4160 stored in a few basic pixel formats. It should provide a solid foundation for
4161 a general image processing tool.")
4162 (license (license:x11-style
4163 "http://www.pythonware.com/products/pil/license.htm"
4164 "The PIL Software License"))))
4165
4166 (define-public python2-pillow
4167 (package-with-python2 python-pillow))
4168
4169 (define-public python-pycparser
4170 (package
4171 (name "python-pycparser")
4172 (version "2.14")
4173 (source
4174 (origin
4175 (method url-fetch)
4176 (uri (pypi-uri "pycparser" version))
4177 (sha256
4178 (base32
4179 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4180 (outputs '("out" "doc"))
4181 (build-system python-build-system)
4182 (native-inputs
4183 `(("pkg-config" ,pkg-config)))
4184 (arguments
4185 `(#:phases
4186 (alist-replace
4187 'check
4188 (lambda _
4189 (with-directory-excursion "tests"
4190 (zero? (system* "python" "all_tests.py"))))
4191 (alist-cons-after
4192 'install 'install-doc
4193 (lambda* (#:key outputs #:allow-other-keys)
4194 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4195 (doc (string-append data "/doc/" ,name "-" ,version))
4196 (examples (string-append doc "/examples")))
4197 (mkdir-p examples)
4198 (for-each (lambda (file)
4199 (copy-file (string-append "." file)
4200 (string-append doc file)))
4201 '("/README.rst" "/CHANGES" "/LICENSE"))
4202 (copy-recursively "examples" examples)))
4203 %standard-phases))))
4204 (home-page "https://github.com/eliben/pycparser")
4205 (synopsis "C parser in Python")
4206 (description
4207 "Pycparser is a complete parser of the C language, written in pure Python
4208 using the PLY parsing library. It parses C code into an AST and can serve as
4209 a front-end for C compilers or analysis tools.")
4210 (license license:bsd-3)))
4211
4212 (define-public python2-pycparser
4213 (package-with-python2 python-pycparser))
4214
4215 (define-public python-cffi
4216 (package
4217 (name "python-cffi")
4218 (version "1.4.2")
4219 (source
4220 (origin
4221 (method url-fetch)
4222 (uri (pypi-uri "cffi" version))
4223 (sha256
4224 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4225 (build-system python-build-system)
4226 (outputs '("out" "doc"))
4227 (inputs
4228 `(("libffi" ,libffi)))
4229 (propagated-inputs ; required at run-time
4230 `(("python-pycparser" ,python-pycparser)))
4231 (native-inputs
4232 `(("pkg-config" ,pkg-config)
4233 ("python-sphinx" ,python-sphinx)
4234 ("python-pytest" ,python-pytest)))
4235 (arguments
4236 `(#:phases
4237 (alist-cons-after
4238 'install 'install-doc
4239 (lambda* (#:key outputs #:allow-other-keys)
4240 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4241 (doc (string-append data "/doc/" ,name "-" ,version))
4242 (html (string-append doc "/html")))
4243 (with-directory-excursion "doc"
4244 (system* "make" "html")
4245 (mkdir-p html)
4246 (copy-recursively "build/html" html))
4247 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4248 %standard-phases)))
4249 (home-page "http://cffi.readthedocs.org")
4250 (synopsis "Foreign function interface for Python")
4251 (description
4252 "Foreign Function Interface for Python calling C code.")
4253 (license license:expat)))
4254
4255 (define-public python2-cffi
4256 (package-with-python2 python-cffi))
4257
4258 (define-public python-xcffib
4259 (package
4260 (name "python-xcffib")
4261 (version "0.1.9")
4262 (source
4263 (origin
4264 (method url-fetch)
4265 (uri (string-append "https://pypi.python.org/packages/source/x/"
4266 "xcffib/xcffib-" version ".tar.gz"))
4267 (sha256
4268 (base32
4269 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4270 (build-system python-build-system)
4271 (inputs
4272 `(("libxcb" ,libxcb)
4273 ("python-six" ,python-six)))
4274 (propagated-inputs
4275 `(("python-cffi" ,python-cffi))) ; used at run time
4276 (arguments
4277 `(#:phases
4278 (alist-cons-after
4279 'install 'install-doc
4280 (lambda* (#:key outputs #:allow-other-keys)
4281 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4282 "/doc/" ,name "-" ,version)))
4283 (mkdir-p doc)
4284 (copy-file "README.md"
4285 (string-append doc "/README.md"))))
4286 %standard-phases)))
4287 (home-page "https://github.com/tych0/xcffib")
4288 (synopsis "XCB Python bindings")
4289 (description
4290 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4291 support for Python 3 and PyPy. It is based on cffi.")
4292 (license license:expat)))
4293
4294 (define-public python2-xcffib
4295 (package-with-python2 python-xcffib))
4296
4297 (define-public python-cairocffi
4298 (package
4299 (name "python-cairocffi")
4300 (version "0.6")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 ;; The archive on pypi is missing the 'utils' directory!
4305 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4306 version ".tar.gz"))
4307 (file-name (string-append name "-" version ".tar.gz"))
4308 (sha256
4309 (base32
4310 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4311 (build-system python-build-system)
4312 (outputs '("out" "doc"))
4313 (inputs
4314 `(("gdk-pixbuf" ,gdk-pixbuf)
4315 ("cairo" ,cairo)))
4316 (native-inputs
4317 `(("pkg-config" ,pkg-config)
4318 ("python-sphinx" ,python-sphinx)
4319 ("python-docutils" ,python-docutils)))
4320 (propagated-inputs
4321 `(("python-xcffib" ,python-xcffib))) ; used at run time
4322 (arguments
4323 `(#:phases
4324 (alist-cons-after
4325 'install 'install-doc
4326 (lambda* (#:key inputs outputs #:allow-other-keys)
4327 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4328 (doc (string-append data "/doc/" ,name "-" ,version))
4329 (html (string-append doc "/html")))
4330 (setenv "LD_LIBRARY_PATH"
4331 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4332 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4333 (setenv "LANG" "en_US.UTF-8")
4334 (mkdir-p html)
4335 (for-each (lambda (file)
4336 (copy-file (string-append "." file)
4337 (string-append doc file)))
4338 '("/README.rst" "/CHANGES" "/LICENSE"))
4339 (system* "python" "setup.py" "build_sphinx")
4340 (copy-recursively "docs/_build/html" html)))
4341 %standard-phases)))
4342 (home-page "https://github.com/SimonSapin/cairocffi")
4343 (synopsis "Python bindings and object-oriented API for Cairo")
4344 (description
4345 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4346 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4347 graphics library with support for multiple backends including image buffers,
4348 PNG, PostScript, PDF, and SVG file output.")
4349 (license license:bsd-3)))
4350
4351 (define-public python2-cairocffi
4352 (package-with-python2 python-cairocffi))
4353
4354 (define-public python-decorator
4355 (package
4356 (name "python-decorator")
4357 (version "4.0.9")
4358 (source
4359 (origin
4360 (method url-fetch)
4361 (uri (pypi-uri "decorator" version))
4362 (sha256
4363 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4364 (build-system python-build-system)
4365 (arguments '(#:tests? #f)) ; no test target
4366 (home-page "https://pypi.python.org/pypi/decorator/")
4367 (synopsis "Python module to simplify usage of decorators")
4368 (description
4369 "The aim of the decorator module is to simplify the usage of decorators
4370 for the average programmer, and to popularize decorators usage giving examples
4371 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4372 etc. The core of this module is a decorator factory.")
4373 (license license:expat)))
4374
4375 (define-public python2-decorator
4376 (package-with-python2 python-decorator))
4377
4378 (define-public python-drmaa
4379 (package
4380 (name "python-drmaa")
4381 (version "0.7.6")
4382 (source
4383 (origin
4384 (method url-fetch)
4385 (uri (string-append
4386 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4387 version ".tar.gz"))
4388 (sha256
4389 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4390 (build-system python-build-system)
4391 ;; The test suite requires libdrmaa which is provided by the cluster
4392 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4393 ;; should be set to the path of the libdrmaa library.
4394 (arguments '(#:tests? #f))
4395 (native-inputs
4396 `(("python-nose" ,python-nose)))
4397 (home-page "https://pypi.python.org/pypi/drmaa")
4398 (synopsis "Python bindings for the DRMAA library")
4399 (description
4400 "A Python package for Distributed Resource Management (DRM) job
4401 submission and control. This package is an implementation of the DRMAA 1.0
4402 Python language binding specification.")
4403 (license license:bsd-3)))
4404
4405 (define-public python2-drmaa
4406 (package-with-python2 python-drmaa))
4407
4408 (define-public python-gridmap
4409 (package
4410 (name "python-gridmap")
4411 (version "0.13.0")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (string-append
4416 "https://github.com/pygridtools/gridmap/archive/v"
4417 version ".tar.gz"))
4418 (file-name (string-append name "-" version ".tar.gz"))
4419 (sha256
4420 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4421 (build-system python-build-system)
4422 (inputs
4423 `(("python-psutil" ,python-psutil)
4424 ("python-drmaa" ,python-drmaa)
4425 ("python-pyzmq" ,python-pyzmq)))
4426 (home-page "https://github.com/pygridtools/gridmap")
4427 (synopsis "Create jobs on a cluster directly from Python")
4428 (description
4429 "Gridmap is a Python package to allow you to easily create jobs on the
4430 cluster directly from Python. You can directly map Python functions onto the
4431 cluster without needing to write any wrapper code yourself.")
4432 (license license:gpl3+)))
4433
4434 (define-public python2-gridmap
4435 (package-with-python2 python-gridmap))
4436
4437 (define-public python-pexpect
4438 (package
4439 (name "python-pexpect")
4440 (version "3.3")
4441 (source
4442 (origin
4443 (method url-fetch)
4444 (uri (string-append "https://pypi.python.org/packages/source/p/"
4445 "pexpect/pexpect-" version ".tar.gz"))
4446 (sha256
4447 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4448 (build-system python-build-system)
4449 (arguments
4450 `(#:phases
4451 (modify-phases %standard-phases
4452 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4453 (native-inputs
4454 `(("python-nose" ,python-nose)))
4455 (home-page "http://pexpect.readthedocs.org/")
4456 (synopsis "Controlling interactive console applications")
4457 (description
4458 "Pexpect is a pure Python module for spawning child applications;
4459 controlling them; and responding to expected patterns in their output.
4460 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4461 child application and control it as if a human were typing commands.")
4462 (license license:isc)))
4463
4464 (define-public python2-pexpect
4465 (package-with-python2 python-pexpect))
4466
4467 (define-public python-setuptools-scm
4468 (package
4469 (name "python-setuptools-scm")
4470 (version "1.11.1")
4471 (source (origin
4472 (method url-fetch)
4473 (uri (pypi-uri "setuptools_scm" version))
4474 (sha256
4475 (base32
4476 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4477 (build-system python-build-system)
4478 (home-page "https://github.com/pypa/setuptools_scm/")
4479 (synopsis "Manage Python package versions in SCM metadata")
4480 (description
4481 "Setuptools_scm handles managing your Python package versions in
4482 @dfn{software configuration management} (SCM) metadata instead of declaring
4483 them as the version argument or in a SCM managed file.")
4484 (license license:expat)))
4485
4486 (define-public python2-setuptools-scm
4487 (package-with-python2 python-setuptools-scm))
4488
4489 (define-public python-pathpy
4490 (package
4491 (name "python-pathpy")
4492 (version "8.1.1")
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (string-append "https://pypi.python.org/packages/source/p/"
4497 "path.py/path.py-" version ".tar.gz"))
4498 (sha256
4499 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4500 (build-system python-build-system)
4501 (propagated-inputs
4502 `(("python-appdirs" ,python-appdirs)))
4503 (native-inputs
4504 `(("python-setuptools-scm" ,python-setuptools-scm)
4505 ("python-pytest" ,python-pytest)
4506 ("python-pytest-runner" ,python-pytest-runner)))
4507 (home-page "http://github.com/jaraco/path.py")
4508 (synopsis "Python module wrapper for built-in os.path")
4509 (description
4510 "@code{path.py} implements path objects as first-class entities, allowing
4511 common operations on files to be invoked on those path objects directly.")
4512 (license license:expat)))
4513
4514 (define-public python2-pathpy
4515 (package-with-python2 python-pathpy))
4516
4517 (define-public python-pickleshare
4518 (package
4519 (name "python-pickleshare")
4520 (version "0.5")
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (string-append "https://pypi.python.org/packages/source/p/"
4525 "pickleshare/pickleshare-" version ".tar.gz"))
4526 (sha256
4527 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4528 (build-system python-build-system)
4529 (propagated-inputs
4530 `(("python-pathpy" ,python-pathpy)))
4531 (home-page "https://github.com/vivainio/pickleshare")
4532 (synopsis "Tiny key value database with concurrency support")
4533 (description
4534 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4535 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4536 shelve, many processes can access the database simultaneously. Changing a
4537 value in database is immediately visible to other processes accessing the same
4538 database. Concurrency is possible because the values are stored in separate
4539 files. Hence the “database” is a directory where all files are governed by
4540 PickleShare.")
4541 (license license:expat)))
4542
4543 (define-public python2-pickleshare
4544 (package-with-python2 python-pickleshare))
4545
4546 (define-public python-simplegeneric
4547 (package
4548 (name "python-simplegeneric")
4549 (version "0.8.1")
4550 (source
4551 (origin
4552 (method url-fetch)
4553 (uri (string-append "https://pypi.python.org/packages/source/s/"
4554 "simplegeneric/simplegeneric-" version ".zip"))
4555 (sha256
4556 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4557 (build-system python-build-system)
4558 (native-inputs
4559 `(("unzip" ,unzip)))
4560 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4561 (synopsis "Python module for simple generic functions")
4562 (description
4563 "The simplegeneric module lets you define simple single-dispatch generic
4564 functions, akin to Python’s built-in generic functions like @code{len()},
4565 @code{iter()} and so on. However, instead of using specially-named methods,
4566 these generic functions use simple lookup tables, akin to those used by
4567 e.g. @code{pickle.dump()} and other generic functions found in the Python
4568 standard library.")
4569 (license license:zpl2.1)))
4570
4571 (define-public python2-simplegeneric
4572 (package-with-python2 python-simplegeneric))
4573
4574 (define-public python-ipython-genutils
4575 (package
4576 (name "python-ipython-genutils")
4577 (version "0.1.0")
4578 (source
4579 (origin
4580 (method url-fetch)
4581 (uri (string-append "https://pypi.python.org/packages/source/i/"
4582 "ipython_genutils/ipython_genutils-"
4583 version ".tar.gz"))
4584 (sha256
4585 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4586 (build-system python-build-system)
4587 (arguments `(#:tests? #f)) ; no tests
4588 (home-page "http://ipython.org")
4589 (synopsis "Vestigial utilities from IPython")
4590 (description
4591 "This package provides retired utilities from IPython.")
4592 (license license:bsd-3)))
4593
4594 (define-public python2-ipython-genutils
4595 (package-with-python2 python-ipython-genutils))
4596
4597 (define-public python-traitlets
4598 (package
4599 (name "python-traitlets")
4600 (version "4.2.0")
4601 (source
4602 (origin
4603 (method url-fetch)
4604 (uri (pypi-uri "traitlets" version))
4605 (sha256
4606 (base32
4607 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4608 (build-system python-build-system)
4609 (arguments
4610 `(#:phases
4611 (modify-phases %standard-phases
4612 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4613 (propagated-inputs
4614 `(("python-ipython-genutils" ,python-ipython-genutils)
4615 ("python-decorator" ,python-decorator)))
4616 (native-inputs
4617 `(("python-mock" ,python-mock)
4618 ("python-nose" ,python-nose)))
4619 (home-page "http://ipython.org")
4620 (synopsis "Configuration system for Python applications")
4621 (description
4622 "Traitlets is a framework that lets Python classes have attributes with
4623 type checking, dynamically calculated default values, and ‘on change’
4624 callbacks. The package also includes a mechanism to use traitlets for
4625 configuration, loading values from files or from command line arguments. This
4626 is a distinct layer on top of traitlets, so you can use traitlets in your code
4627 without using the configuration machinery.")
4628 (license license:bsd-3)))
4629
4630 (define-public python2-traitlets
4631 (package-with-python2 python-traitlets))
4632
4633 (define-public python-jupyter-core
4634 (package
4635 (name "python-jupyter-core")
4636 (version "4.2.0")
4637 (source
4638 (origin
4639 (method url-fetch)
4640 (uri (string-append (pypi-uri "jupyter_core" version)))
4641 (sha256
4642 (base32
4643 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4644 (build-system python-build-system)
4645 ;; FIXME: not sure how to run the tests
4646 (arguments `(#:tests? #f))
4647 (propagated-inputs
4648 `(("python-traitlets" ,python-traitlets)))
4649 (home-page "http://jupyter.org/")
4650 (synopsis "Jupyter base package")
4651 (description
4652 "Jupyter core is the base package on which Jupyter projects rely.")
4653 (license license:bsd-3)))
4654
4655 (define-public python2-jupyter-core
4656 (package-with-python2 python-jupyter-core))
4657
4658 (define-public python-jupyter-client
4659 (package
4660 (name "python-jupyter-client")
4661 (version "4.4.0")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "jupyter_client" version))
4666 (sha256
4667 (base32
4668 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4669 (build-system python-build-system)
4670 ;; Tests fail because of missing native python kernel which I assume is
4671 ;; provided by the ipython package, which we cannot use because it would
4672 ;; cause a dependency cycle.
4673 (arguments `(#:tests? #f))
4674 (propagated-inputs
4675 `(("python-pyzmq" ,python-pyzmq)
4676 ("python-traitlets" ,python-traitlets)
4677 ("python-jupyter-core" ,python-jupyter-core)))
4678 (home-page "http://jupyter.org/")
4679 (synopsis "Jupyter protocol implementation and client libraries")
4680 (description
4681 "The @code{jupyter_client} package contains the reference implementation
4682 of the Jupyter protocol. It also provides client and kernel management APIs
4683 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4684 installing @code{kernelspec}s for use with Jupyter frontends.")
4685 (license license:bsd-3)))
4686
4687 (define-public python2-jupyter-client
4688 (package-with-python2 python-jupyter-client))
4689
4690 (define-public python-ipykernel
4691 (package
4692 (name "python-ipykernel")
4693 (version "4.5.0")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (pypi-uri "ipykernel" version))
4698 (sha256
4699 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4700 (build-system python-build-system)
4701 ;; The tests load a submodule of IPython. However, IPython itself depends
4702 ;; on ipykernel.
4703 (arguments `(#:tests? #f))
4704 (propagated-inputs
4705 ;; imported at runtime during connect
4706 `(("python-jupyter-client" ,python-jupyter-client)))
4707 (home-page "http://ipython.org")
4708 (synopsis "IPython Kernel for Jupyter")
4709 (description
4710 "This package provides the IPython kernel for Jupyter.")
4711 (license license:bsd-3)))
4712
4713 (define-public python2-ipykernel
4714 (package-with-python2 python-ipykernel))
4715
4716 (define-public python-testpath
4717 (package
4718 (name "python-testpath")
4719 (version "0.2")
4720 (source
4721 (origin
4722 (method url-fetch)
4723 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4724 version ".tar.gz"))
4725 (file-name (string-append name "-" version ".tar.gz"))
4726 (sha256
4727 (base32
4728 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4729 (build-system python-build-system)
4730 (arguments
4731 `(#:tests? #f ; this package does not even have a setup.py
4732 #:phases
4733 (modify-phases %standard-phases
4734 (delete 'install)
4735 (replace 'build
4736 (lambda* (#:key inputs outputs #:allow-other-keys)
4737 (let ((dir (string-append
4738 (assoc-ref outputs "out")
4739 "/lib/python"
4740 (string-take (string-take-right
4741 (assoc-ref inputs "python") 5) 3)
4742 "/site-packages/testpath")))
4743 (mkdir-p dir)
4744 (copy-recursively "testpath" dir))
4745 #t)))))
4746 (home-page "https://github.com/takluyver/testpath")
4747 (synopsis "Test utilities for code working with files and commands")
4748 (description
4749 "Testpath is a collection of utilities for Python code working with files
4750 and commands. It contains functions to check things on the filesystem, and
4751 tools for mocking system commands and recording calls to those.")
4752 (license license:expat)))
4753
4754 (define-public python2-testpath
4755 (package-with-python2 python-testpath))
4756
4757 (define-public python-ipython
4758 (package
4759 (name "python-ipython")
4760 (version "4.0.0")
4761 (source
4762 (origin
4763 (method url-fetch)
4764 (uri (pypi-uri "ipython" version ".tar.gz"))
4765 (sha256
4766 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4767 (build-system python-build-system)
4768 (outputs '("out" "doc"))
4769 (propagated-inputs
4770 `(("python-pyzmq" ,python-pyzmq)
4771 ("python-terminado" ,python-terminado)
4772 ("python-matplotlib" ,python-matplotlib)
4773 ("python-numpy" ,python-numpy)
4774 ("python-numpydoc" ,python-numpydoc)
4775 ("python-jinja2" ,python-jinja2)
4776 ("python-mistune" ,python-mistune)
4777 ("python-pexpect" ,python-pexpect)
4778 ("python-pickleshare" ,python-pickleshare)
4779 ("python-simplegeneric" ,python-simplegeneric)
4780 ("python-jsonschema" ,python-jsonschema)
4781 ("python-traitlets" ,python-traitlets)
4782 ("python-ipykernel" ,python-ipykernel)
4783 ("python-pygments" ,python-pygments)))
4784 (inputs
4785 `(("readline" ,readline)
4786 ("which" ,which)))
4787 (native-inputs
4788 `(("pkg-config" ,pkg-config)
4789 ("python-requests" ,python-requests) ;; for tests
4790 ("python-testpath" ,python-testpath)
4791 ("python-nose" ,python-nose)
4792 ("python-sphinx" ,python-sphinx)
4793 ("texlive" ,texlive)
4794 ("texinfo" ,texinfo)))
4795 (arguments
4796 `(#:phases
4797 (modify-phases %standard-phases
4798 (add-after
4799 'install 'install-doc
4800 (lambda* (#:key inputs outputs #:allow-other-keys)
4801 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4802 (doc (string-append data "/doc/" ,name "-" ,version))
4803 (html (string-append doc "/html"))
4804 (man1 (string-append data "/man/man1"))
4805 (info (string-append data "/info"))
4806 (examples (string-append doc "/examples")))
4807 (setenv "LANG" "en_US.utf8")
4808 (with-directory-excursion "docs"
4809 ;; FIXME: pdf fails to build
4810 ;;(system* "make" "pdf" "PAPER=a4")
4811 (system* "make" "html")
4812 (system* "make" "info"))
4813 (copy-recursively "docs/man" man1)
4814 (copy-recursively "examples" examples)
4815 (copy-recursively "docs/build/html" html)
4816 ;; (copy-file "docs/build/latex/ipython.pdf"
4817 ;; (string-append doc "/ipython.pdf"))
4818 (mkdir-p info)
4819 (copy-file "docs/build/texinfo/ipython.info"
4820 (string-append info "/ipython.info"))
4821 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4822 ;; Tests can only be run after the library has been installed and not
4823 ;; within the source directory.
4824 (delete 'check)
4825 (add-after
4826 'install 'check
4827 (lambda* (#:key outputs tests? #:allow-other-keys)
4828 (if tests?
4829 (with-directory-excursion "/tmp"
4830 (setenv "HOME" "/tmp/") ;; required by a test
4831 (zero? (system* (string-append (assoc-ref outputs "out")
4832 "/bin/iptest"))))
4833 #t)))
4834 (add-before
4835 'install 'fix-tests
4836 (lambda* (#:key inputs #:allow-other-keys)
4837 (substitute* "./IPython/utils/_process_posix.py"
4838 (("/usr/bin/env', 'which") (which "which")))
4839 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4840 (("#!/usr/bin/env python")
4841 (string-append "#!" (which "python"))))
4842 ;; Disable 1 failing test
4843 (substitute* "./IPython/core/tests/test_magic.py"
4844 (("def test_dirops\\(\\):" all)
4845 (string-append "@dec.skipif(True)\n" all))))))))
4846 (home-page "http://ipython.org")
4847 (synopsis "IPython is a tool for interactive computing in Python")
4848 (description
4849 "IPython provides a rich architecture for interactive computing with:
4850 Powerful interactive shells, a browser-based notebook, support for interactive
4851 data visualization, embeddable interpreters and tools for parallel
4852 computing.")
4853 (license license:bsd-3)
4854 (properties `((python2-variant . ,(delay python2-ipython))))))
4855
4856 (define-public python2-ipython
4857 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4858 (package
4859 (inherit ipython)
4860 ;; FIXME: some tests are failing
4861 (arguments
4862 `(#:tests? #f ,@(package-arguments ipython)))
4863 ;; FIXME: add pyreadline once available.
4864 (inputs
4865 `(("python2-mock" ,python2-mock)
4866 ,@(package-inputs ipython))))))
4867
4868 (define-public python-isodate
4869 (package
4870 (name "python-isodate")
4871 (version "0.5.4")
4872 (source
4873 (origin
4874 (method url-fetch)
4875 (uri (pypi-uri "isodate" version))
4876 (sha256
4877 (base32
4878 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4879 (build-system python-build-system)
4880 (home-page
4881 "http://cheeseshop.python.org/pypi/isodate")
4882 (synopsis
4883 "Python date parser and formatter")
4884 (description
4885 "Python-isodate is a python module for parsing and formatting
4886 ISO 8601 dates, time and duration.")
4887 (license license:bsd-3)))
4888
4889 (define-public python2-isodate
4890 (package-with-python2 python-isodate))
4891
4892 (define-public python-html5lib
4893 (package
4894 (name "python-html5lib")
4895 (version "1.0b8")
4896 (source
4897 (origin
4898 (method url-fetch)
4899 (uri (pypi-uri "html5lib" version))
4900 (sha256
4901 (base32
4902 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4903 (build-system python-build-system)
4904 (propagated-inputs
4905 `(("python-six" ,python-six))) ; required to "import html5lib"
4906 (arguments
4907 `(#:test-target "check"))
4908 (home-page
4909 "https://github.com/html5lib/html5lib-python")
4910 (synopsis
4911 "Python HTML parser based on the WHATWG HTML specifcation")
4912 (description
4913 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4914 and written in Python.")
4915 (license license:expat)))
4916
4917 (define-public python2-html5lib
4918 (package-with-python2 python-html5lib))
4919
4920 ;; Needed for python-bleach, a dependency of python-notebook
4921 (define-public python-html5lib-0.9
4922 (package
4923 (inherit python-html5lib)
4924 (version "0.999")
4925 (source
4926 (origin
4927 (method url-fetch)
4928 (uri (pypi-uri "html5lib" version))
4929 (sha256
4930 (base32
4931 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4932
4933 (define-public python2-html5lib-0.9
4934 (package-with-python2 python-html5lib-0.9))
4935
4936 (define-public python-urwid
4937 (package
4938 (name "python-urwid")
4939 (version "1.3.1")
4940 (source
4941 (origin
4942 (method url-fetch)
4943 (uri (pypi-uri "urwid" version))
4944 (sha256
4945 (base32
4946 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4947 (build-system python-build-system)
4948 (arguments
4949 `(#:phases
4950 (modify-phases %standard-phases
4951 ;; Disable failing test. Bug filed upstream:
4952 ;; https://github.com/wardi/urwid/issues/164
4953 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4954 (add-after 'unpack 'disable-failing-test
4955 (lambda _
4956 (substitute* "urwid/tests/test_event_loops.py"
4957 (("test_remove_watch_file")
4958 "disable_remove_watch_file")))))))
4959 (home-page "http://urwid.org")
4960 (synopsis "Console user interface library for Python")
4961 (description
4962 "Urwid is a curses-based UI/widget library for Python. It includes many
4963 features useful for text console applications.")
4964 (license license:lgpl2.1+)))
4965
4966 (define-public python2-urwid
4967 (package-with-python2 python-urwid))
4968
4969 (define-public python-urwidtrees
4970 (package
4971 (name "python-urwidtrees")
4972 (version "1.0.2")
4973 (source
4974 (origin
4975 (method url-fetch)
4976 ;; package author intends on distributing via github rather than pypi:
4977 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4978 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4979 version ".tar.gz"))
4980 (file-name (string-append name "-" version ".tar.gz"))
4981 (sha256
4982 (base32
4983 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4984 (build-system python-build-system)
4985 (arguments
4986 '(#:tests? #f)) ; no tests
4987 (inputs `(("python-urwid" ,python-urwid)))
4988 (home-page "https://github.com/pazz/urwidtrees")
4989 (synopsis "Tree widgets for urwid")
4990 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4991 toolkit. Use it to build trees of widgets.")
4992 (license license:gpl3+)))
4993
4994 (define-public python2-urwidtrees
4995 (package-with-python2 python-urwidtrees))
4996
4997 (define-public python-dbus
4998 (package
4999 (name "python-dbus")
5000 (version "1.2.0")
5001 (source
5002 (origin
5003 (method url-fetch)
5004 (uri (string-append
5005 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5006 version ".tar.gz"))
5007 (sha256
5008 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5009 (build-system gnu-build-system)
5010 (arguments
5011 '(#:phases
5012 (modify-phases %standard-phases
5013 (add-before
5014 'check 'pre-check
5015 (lambda _
5016 ;; XXX: For the missing '/etc/machine-id'.
5017 (substitute* "test/run-test.sh"
5018 (("DBUS_FATAL_WARNINGS=1")
5019 "DBUS_FATAL_WARNINGS=0"))
5020 #t)))))
5021 (native-inputs
5022 `(("pkg-config" ,pkg-config)))
5023 (inputs
5024 `(("python" ,python)
5025 ("dbus-glib" ,dbus-glib)))
5026 (synopsis "Python bindings for D-bus")
5027 (description "python-dbus provides bindings for libdbus, the reference
5028 implementation of D-Bus.")
5029 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5030 (license license:expat)))
5031
5032 (define-public python2-dbus
5033 (package (inherit python-dbus)
5034 (name "python2-dbus")
5035 (inputs `(("python" ,python-2)
5036 ,@(alist-delete "python"
5037 (package-inputs python-dbus)
5038 equal?)))
5039 ;; FIXME: on Python 2, the test_utf8 fails with:
5040 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5041 (arguments `(#:tests? #f))))
5042
5043 (define-public python-apsw
5044 (package
5045 (name "python-apsw")
5046 (version "3.9.2-r1")
5047 (source
5048 (origin
5049 (method url-fetch)
5050 (uri (pypi-uri "apsw" version))
5051 (sha256
5052 (base32
5053 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5054 (build-system python-build-system)
5055 (inputs
5056 `(("sqlite" ,sqlite)))
5057 (arguments
5058 `(#:phases
5059 ;; swap check and install phases
5060 (alist-cons-after
5061 'install 'check
5062 (assoc-ref %standard-phases 'check)
5063 (alist-delete
5064 'check
5065 %standard-phases))))
5066 (home-page "https://github.com/rogerbinns/apsw/")
5067 (synopsis "Another Python SQLite Wrapper")
5068 (description "APSW is a Python wrapper for the SQLite
5069 embedded relational database engine. In contrast to other wrappers such as
5070 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5071 translate the complete SQLite API into Python.")
5072 (license license:zlib)))
5073
5074 (define-public python2-apsw
5075 (package-with-python2 python-apsw))
5076
5077 (define-public python-lxml
5078 (package
5079 (name "python-lxml")
5080 (version "3.6.0")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "lxml" version))
5085 (sha256
5086 (base32
5087 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5088 (build-system python-build-system)
5089 (inputs
5090 `(("libxml2" ,libxml2)
5091 ("libxslt" ,libxslt)))
5092 (home-page "http://lxml.de/")
5093 (synopsis
5094 "Python XML processing library")
5095 (description
5096 "The lxml XML toolkit is a Pythonic binding for the C libraries
5097 libxml2 and libxslt.")
5098 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5099
5100 (define-public python2-lxml
5101 (package-with-python2 python-lxml))
5102
5103 ;; beautifulsoup4 has a totally different namespace than 3.x,
5104 ;; and pypi seems to put it under its own name, so I guess we should too
5105 (define-public python-beautifulsoup4
5106 (package
5107 (name "python-beautifulsoup4")
5108 (version "4.5.1")
5109 (source
5110 (origin
5111 (method url-fetch)
5112 (uri (pypi-uri "beautifulsoup4" version))
5113 (sha256
5114 (base32
5115 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5116 (build-system python-build-system)
5117 (arguments
5118 `(#:phases
5119 (modify-phases %standard-phases
5120 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5121 ;; must use this conversion script when building with Python 3. The
5122 ;; conversion script also runs the tests.
5123 ;; For more information, see the file 'convert-py3k' in the source
5124 ;; distribution.
5125 (replace 'check
5126 (lambda _ (zero? (system* "./convert-py3k")))))))
5127 (home-page
5128 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5129 (synopsis
5130 "Python screen-scraping library")
5131 (description
5132 "Beautiful Soup is a Python library designed for rapidly setting up
5133 screen-scraping projects. It offers Pythonic idioms for navigating,
5134 searching, and modifying a parse tree, providing a toolkit for
5135 dissecting a document and extracting what you need. It automatically
5136 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5137 (license license:expat)
5138 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5139
5140 (define-public python2-beautifulsoup4
5141 (package
5142 (inherit (package-with-python2
5143 (strip-python2-variant python-beautifulsoup4)))
5144 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
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
5171 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5172 options.")
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
5197 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5198 another 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
5225 interfaces 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
5251 of 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
5274 providing a clean and modern domain specific specification language (DSL) in
5275 Python 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
5297 graphics in Python. It is built on top of matplotlib and tightly integrated
5298 with the PyData stack, including support for numpy and pandas data structures
5299 and 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 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5310 ,@(package-native-inputs base))))))
5311
5312 (define-public python-sympy
5313 (package
5314 (name "python-sympy")
5315 (version "0.7.6")
5316 (source
5317 (origin
5318 (method url-fetch)
5319 (uri (string-append
5320 "https://github.com/sympy/sympy/releases/download/sympy-"
5321 version "/sympy-" version ".tar.gz"))
5322 (sha256
5323 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5324 (build-system python-build-system)
5325 (home-page "http://www.sympy.org/")
5326 (synopsis "Python library for symbolic mathematics")
5327 (description
5328 "SymPy is a Python library for symbolic mathematics. It aims to become a
5329 full-featured computer algebra system (CAS) while keeping the code as simple
5330 as possible in order to be comprehensible and easily extensible.")
5331 (license license:bsd-3)))
5332
5333 (define-public python2-sympy
5334 (package-with-python2 python-sympy))
5335
5336 (define-public python-q
5337 (package
5338 (name "python-q")
5339 (version "2.6")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "q" version))
5344 (sha256
5345 (base32
5346 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5347 (build-system python-build-system)
5348 (home-page "https://github.com/zestyping/q")
5349 (synopsis "Quick-and-dirty debugging output for tired programmers")
5350 (description
5351 "q is a Python module for \"print\" style of debugging Python code. It
5352 provides convenient short API for print out of values, tracebacks, and
5353 falling into the Python interpreter.")
5354 (license license:asl2.0)
5355 (properties `((python2-variant . ,(delay python2-q))))))
5356
5357 (define-public python2-q
5358 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5359 (package
5360 (inherit base)
5361 (native-inputs
5362 `(("python2-setuptools" ,python2-setuptools)
5363 ,@(package-native-inputs base))))))
5364
5365 (define-public python-testlib
5366 (package
5367 (name "python-testlib")
5368 (version "0.6.5")
5369 (source
5370 (origin
5371 (method url-fetch)
5372 (uri (string-append
5373 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5374 version ".zip"))
5375 (sha256
5376 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5377 (build-system python-build-system)
5378 (native-inputs
5379 `(("unzip" ,unzip)))
5380 (arguments
5381 `(#:phases
5382 (alist-replace
5383 'unpack
5384 (lambda* (#:key inputs outputs #:allow-other-keys)
5385 (let ((unzip (string-append (assoc-ref inputs "unzip")
5386 "/bin/unzip"))
5387 (source (assoc-ref inputs "source")))
5388 (and (zero? (system* unzip source))
5389 (chdir (string-append "testlib-" ,version)))))
5390 %standard-phases)))
5391 (synopsis "Python micro test suite harness")
5392 (description "A micro unittest suite harness for Python.")
5393 (home-page "https://github.com/trentm/testlib")
5394 (license license:expat)))
5395
5396 (define-public python2-testlib
5397 (package-with-python2 python-testlib))
5398
5399 (define-public python2-xlib
5400 (package
5401 (name "python2-xlib")
5402 (version "0.14")
5403 (source (origin
5404 (method url-fetch)
5405 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5406 "/" version "/"
5407 "python-xlib-" version ".tar.gz"))
5408 (sha256
5409 (base32
5410 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5411 (build-system python-build-system)
5412 (arguments
5413 `(#:python ,python-2 ;Python 2 only
5414 #:tests? #f)) ;no tests
5415 (home-page "http://python-xlib.sourceforge.net/")
5416 (synopsis "Python X11 client library")
5417 (description
5418 "The Python X Library is intended to be a fully functional X client
5419 library for Python programs. It is useful to implement low-level X clients.
5420 It is written entirely in Python.")
5421 (license license:gpl2+)))
5422
5423 (define-public python-singledispatch
5424 (package
5425 (name "python-singledispatch")
5426 (version "3.4.0.3")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "singledispatch" version))
5431 (sha256
5432 (base32
5433 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5434 (build-system python-build-system)
5435 (inputs
5436 `(("python-six" ,python-six)))
5437 (home-page
5438 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5439 (synopsis "Backport of singledispatch feature from Python 3.4")
5440 (description
5441 "This library brings functools.singledispatch from Python 3.4 to Python
5442 2.6-3.3.")
5443 (license license:expat)))
5444
5445 (define-public python2-singledispatch
5446 (package-with-python2 python-singledispatch))
5447
5448 (define-public python-tornado
5449 (package
5450 (name "python-tornado")
5451 (version "4.3")
5452 (source
5453 (origin
5454 (method url-fetch)
5455 (uri (pypi-uri "tornado" version))
5456 (sha256
5457 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5458 (build-system python-build-system)
5459 (native-inputs
5460 `(("python-certifi" ,python-certifi)))
5461 (inputs
5462 `(("python-backports-abc" ,python-backports-abc)))
5463 (home-page "http://www.tornadoweb.org/")
5464 (synopsis "Python web framework and asynchronous networking library")
5465 (description
5466 "Tornado is a Python web framework and asynchronous networking library,
5467 originally developed at FriendFeed. By using non-blocking network I/O,
5468 Tornado can scale to tens of thousands of open connections, making it ideal
5469 for long polling, WebSockets, and other applications that require a long-lived
5470 connection to each user.")
5471 (license license:asl2.0)
5472 (properties `((python2-variant . ,(delay python2-tornado))))))
5473
5474 (define-public python2-tornado
5475 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5476 (package (inherit tornado)
5477 (inputs
5478 `(("python2-backport-ssl-match-hostname"
5479 ,python2-backport-ssl-match-hostname)
5480 ("python2-singledispatch" ,python2-singledispatch)
5481 ,@(package-inputs tornado)))
5482 (native-inputs
5483 `(("python2-setuptools" ,python2-setuptools)
5484 ,@(package-native-inputs tornado))))))
5485
5486 ;; the python- version can be removed with python-3.5
5487 (define-public python-backports-abc
5488 (package
5489 (name "python-backports-abc")
5490 (version "0.4")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "backports_abc" version))
5495 (sha256
5496 (base32
5497 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5498 (build-system python-build-system)
5499 (home-page "https://github.com/cython/backports_abc")
5500 (synopsis "Backport of additions to the 'collections.abc' module")
5501 (description
5502 "Python-backports-abc provides a backport of additions to the
5503 'collections.abc' module in Python-3.5.")
5504 (license license:psfl)))
5505
5506 (define-public python2-backports-abc
5507 (package-with-python2 python-backports-abc))
5508
5509 (define-public python-waf
5510 (package
5511 (name "python-waf")
5512 (version "1.9.5")
5513 (source (origin
5514 (method url-fetch)
5515 (uri (string-append "https://waf.io/"
5516 "waf-" version ".tar.bz2"))
5517 (sha256
5518 (base32
5519 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5520 (build-system python-build-system)
5521 (arguments
5522 '(#:phases
5523 (modify-phases %standard-phases
5524 (replace 'build
5525 (lambda _
5526 (zero? (system* "python" "waf-light" "configure" "build"))))
5527 (replace 'check
5528 (lambda _
5529 (zero? (system* "python" "waf" "--version"))))
5530 (replace 'install
5531 (lambda _
5532 (copy-file "waf" %output))))))
5533 (home-page "http://waf.io/")
5534 (synopsis "Python-based build system")
5535 (description
5536 "Waf is a Python-based framework for configuring, compiling and installing
5537 applications.")
5538 (license license:bsd-3)))
5539
5540 (define-public python2-waf
5541 (package-with-python2 python-waf))
5542
5543 (define-public python-pyzmq
5544 (package
5545 (name "python-pyzmq")
5546 (version "15.1.0")
5547 (source
5548 (origin
5549 (method url-fetch)
5550 (uri (pypi-uri "pyzmq" version))
5551 (sha256
5552 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5553 (build-system python-build-system)
5554 (arguments
5555 `(#:configure-flags
5556 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5557 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5558 ;; --inplace' for 'python setup.py test' to work.
5559 #:tests? #f))
5560 (inputs
5561 `(("zeromq" ,zeromq)))
5562 (native-inputs
5563 `(("pkg-config" ,pkg-config)
5564 ("python-nose" ,python-nose)))
5565 (home-page "http://github.com/zeromq/pyzmq")
5566 (synopsis "Python bindings for 0MQ")
5567 (description
5568 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5569 (license license:bsd-4)))
5570
5571 (define-public python2-pyzmq
5572 (package-with-python2 python-pyzmq))
5573
5574 (define-public python-pep8
5575 (package
5576 (name "python-pep8")
5577 (version "1.7.0")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (pypi-uri "pep8" version))
5582 (sha256
5583 (base32
5584 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5585 (build-system python-build-system)
5586 (home-page "http://pep8.readthedocs.org/")
5587 (synopsis "Python style guide checker")
5588 (description
5589 "This tools checks Python code against some of the style conventions in
5590 PEP 8.")
5591 (license license:expat)))
5592
5593 (define-public python2-pep8
5594 (package-with-python2 python-pep8))
5595
5596 (define-public python-pyflakes
5597 (package
5598 (name "python-pyflakes")
5599 (version "1.0.0")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "pyflakes" version))
5604 (sha256
5605 (base32
5606 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5607 (build-system python-build-system)
5608 (home-page
5609 "https://github.com/pyflakes/pyflakes")
5610 (synopsis "Passive checker of Python programs")
5611 (description
5612 "Pyflakes statically checks Python source code for common errors.")
5613 (license license:expat)))
5614
5615 (define-public python2-pyflakes
5616 (package-with-python2 python-pyflakes))
5617
5618 (define-public python-mccabe
5619 (package
5620 (name "python-mccabe")
5621 (version "0.4.0")
5622 (source
5623 (origin
5624 (method url-fetch)
5625 (uri (pypi-uri "mccabe" version))
5626 (sha256
5627 (base32
5628 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5629 (build-system python-build-system)
5630 (inputs
5631 `(("python-pytest" ,python-pytest)
5632 ("python-pytest-runner" ,python-pytest-runner)))
5633 (home-page "https://github.com/flintwork/mccabe")
5634 (synopsis "McCabe checker, plugin for flake8")
5635 (description
5636 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5637 complexity of Python source code.")
5638 (license license:expat)))
5639
5640 (define-public python2-mccabe
5641 (package-with-python2 python-mccabe))
5642
5643 (define-public python-mccabe-0.2.1
5644 (package (inherit python-mccabe)
5645 (version "0.2.1")
5646 (source
5647 (origin
5648 (method url-fetch)
5649 (uri (pypi-uri "mccabe" version))
5650 (sha256
5651 (base32
5652 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5653
5654 (define-public python2-mccabe-0.2.1
5655 (package-with-python2 python-mccabe-0.2.1))
5656
5657 ;; Flake8 2.4.1 requires an older version of pep8.
5658 ;; This should be removed ASAP.
5659 (define-public python-pep8-1.5.7
5660 (package (inherit python-pep8)
5661 (version "1.5.7")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (string-append
5666 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5667 version
5668 ".tar.gz"))
5669 (sha256
5670 (base32
5671 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5672
5673 (define-public python2-pep8-1.5.7
5674 (package-with-python2 python-pep8-1.5.7))
5675
5676 ;; Flake8 2.4.1 requires an older version of pyflakes.
5677 ;; This should be removed ASAP.
5678 (define-public python-pyflakes-0.8.1
5679 (package (inherit python-pyflakes)
5680 (version "0.8.1")
5681 (source
5682 (origin
5683 (method url-fetch)
5684 (uri (string-append
5685 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5686 version
5687 ".tar.gz"))
5688 (sha256
5689 (base32
5690 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5691
5692 (define-public python2-pyflakes-0.8.1
5693 (package-with-python2 python-pyflakes-0.8.1))
5694
5695 (define-public python-flake8
5696 (package
5697 (name "python-flake8")
5698 (version "2.5.4")
5699 (source
5700 (origin
5701 (method url-fetch)
5702 (uri (pypi-uri "flake8" version))
5703 (sha256
5704 (base32
5705 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5706 (build-system python-build-system)
5707 (inputs
5708 `(("python-pep8" ,python-pep8)
5709 ("python-pyflakes" ,python-pyflakes)
5710 ("python-mccabe" ,python-mccabe)
5711 ("python-mock" ,python-mock)
5712 ("python-nose" ,python-nose)))
5713 (home-page "https://gitlab.com/pycqa/flake8")
5714 (synopsis
5715 "The modular source code checker: pep8, pyflakes and co")
5716 (description
5717 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5718 (license license:expat)))
5719
5720 (define-public python2-flake8
5721 (package-with-python2 python-flake8))
5722
5723 ;; This will only be needed by the python-hacking package and will not be
5724 ;; necessary once python-hacking > 0.10.2 is released.
5725 (define-public python-flake8-2.2.4
5726 (package (inherit python-flake8)
5727 (inputs
5728 `(("python-pep8" ,python-pep8-1.5.7)
5729 ("python-pyflakes" ,python-pyflakes-0.8.1)
5730 ("python-mccabe" ,python-mccabe-0.2.1)
5731 ("python-mock" ,python-mock)
5732 ("python-nose" ,python-nose)))
5733 (version "2.2.4")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "flake8" version))
5738 (sha256
5739 (base32
5740 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5741
5742 (define-public python2-flake8-2.2.4
5743 (package-with-python2 python-flake8-2.2.4))
5744
5745 (define-public python-mistune
5746 (package
5747 (name "python-mistune")
5748 (version "0.7")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (string-append
5753 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5754 version
5755 ".tar.gz"))
5756 (sha256
5757 (base32
5758 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5759 (build-system python-build-system)
5760 (inputs
5761 `(("python-nose" ,python-nose)
5762 ("python-cython" ,python-cython)))
5763 (home-page "https://github.com/lepture/mistune")
5764 (synopsis "Markdown parser in pure Python")
5765 (description "This package provides a fast markdown parser in pure
5766 Python.")
5767 (license license:bsd-3)))
5768
5769 (define-public python2-mistune
5770 (package-with-python2 python-mistune))
5771
5772 (define-public python-markdown
5773 (package
5774 (name "python-markdown")
5775 (version "2.6.5")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "Markdown" version))
5780 (sha256
5781 (base32
5782 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5783 (build-system python-build-system)
5784 (arguments
5785 `(#:phases
5786 (modify-phases %standard-phases
5787 (replace 'check
5788 (lambda _
5789 (zero? (system* "python" "run-tests.py")))))))
5790 (native-inputs
5791 `(("python-nose" ,python-nose)
5792 ("python-pyyaml" ,python-pyyaml)))
5793 (home-page "https://pythonhosted.org/Markdown/")
5794 (synopsis "Python implementation of Markdown")
5795 (description
5796 "This package provides a Python implementation of John Gruber's
5797 Markdown. The library features international input, various Markdown
5798 extensions, and several HTML output formats. A command line wrapper
5799 markdown_py is also provided to convert Markdown files to HTML.")
5800 (license license:bsd-3)))
5801
5802 (define-public python2-markdown
5803 (package-with-python2 python-markdown))
5804
5805 (define-public python-ptyprocess
5806 (package
5807 (name "python-ptyprocess")
5808 (version "0.5")
5809 (source
5810 (origin
5811 (method url-fetch)
5812 (uri (string-append
5813 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5814 version ".tar.gz"))
5815 (sha256
5816 (base32
5817 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5818 (build-system python-build-system)
5819 (inputs
5820 `(("python-nose" ,python-nose)))
5821 (arguments
5822 `(#:phases
5823 (modify-phases %standard-phases
5824 (replace 'check
5825 (lambda _
5826 (zero? (system* "nosetests")))))))
5827 (home-page "https://github.com/pexpect/ptyprocess")
5828 (synopsis "Run a subprocess in a pseudo terminal")
5829 (description
5830 "This package provides a Python library used to launch a subprocess in a
5831 pseudo terminal (pty), and interact with both the process and its pty.")
5832 (license license:isc)))
5833
5834 (define-public python2-ptyprocess
5835 (package-with-python2 python-ptyprocess))
5836
5837 (define-public python-terminado
5838 (package
5839 (name "python-terminado")
5840 (version "0.6")
5841 (source
5842 (origin
5843 (method url-fetch)
5844 (uri (pypi-uri "terminado" version))
5845 (sha256
5846 (base32
5847 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5848 (build-system python-build-system)
5849 (propagated-inputs
5850 `(("python-tornado" ,python-tornado)
5851 ("python-ptyprocess" ,python-ptyprocess)))
5852 (native-inputs
5853 `(("python-nose" ,python-nose)))
5854 (arguments
5855 `(#:phases
5856 (modify-phases %standard-phases
5857 (replace 'check
5858 (lambda _
5859 (zero? (system* "nosetests")))))))
5860 (home-page "https://github.com/takluyver/terminado")
5861 (synopsis "Terminals served to term.js using Tornado websockets")
5862 (description "This package provides a Tornado websocket backend for the
5863 term.js Javascript terminal emulator library.")
5864 (license license:bsd-2)
5865 (properties `((python2-variant . ,(delay python2-terminado))))))
5866
5867 (define-public python2-terminado
5868 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5869 (package (inherit terminado)
5870 (propagated-inputs
5871 `(("python2-backport-ssl-match-hostname"
5872 ,python2-backport-ssl-match-hostname)
5873 ,@(package-propagated-inputs terminado)))
5874 (native-inputs
5875 `(("python2-setuptools" ,python2-setuptools)
5876 ,@(package-native-inputs terminado))))))
5877
5878 (define-public python-fonttools
5879 (package
5880 (name "python-fonttools")
5881 (version "2.5")
5882 (source (origin
5883 (method url-fetch)
5884 (uri (string-append
5885 "https://pypi.python.org/packages/source/F/FontTools/"
5886 "fonttools-" version ".tar.gz"))
5887 (sha256
5888 (base32
5889 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5890 (build-system python-build-system)
5891 (arguments '(#:test-target "check"))
5892 (home-page "http://github.com/behdad/fonttools")
5893 (synopsis "Tools to manipulate font files")
5894 (description
5895 "FontTools/TTX is a library to manipulate font files from Python. It
5896 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5897 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5898 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5899 from an XML-based format.")
5900 (license (license:non-copyleft
5901 "file://LICENSE.txt"
5902 "See LICENSE.txt in the distribution."))))
5903
5904 (define-public python2-fonttools
5905 (package-with-python2 python-fonttools))
5906
5907 (define-public python-ly
5908 (package
5909 (name "python-ly")
5910 (version "0.9.4")
5911 (source
5912 (origin
5913 (method url-fetch)
5914 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5915 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5916 "/python-ly-" version ".tar.gz"))
5917 (sha256
5918 (base32
5919 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5920 (build-system python-build-system)
5921 (synopsis "Tool and library for manipulating LilyPond files")
5922 (description "This package provides a Python library to parse, manipulate
5923 or create documents in LilyPond format. A command line program ly is also
5924 provided that can be used to do various manipulations with LilyPond files.")
5925 (home-page "https://pypi.python.org/pypi/python-ly")
5926 (license license:gpl2+)))
5927
5928 (define-public python-appdirs
5929 (package
5930 (name "python-appdirs")
5931 (version "1.4.0")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (string-append
5936 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5937 version
5938 ".tar.gz"))
5939 (sha256
5940 (base32
5941 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5942 (build-system python-build-system)
5943 (home-page "http://github.com/ActiveState/appdirs")
5944 (synopsis
5945 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5946 (description
5947 "This module provides a portable way of finding out where user data
5948 should be stored on various operating systems.")
5949 (license license:expat)))
5950
5951 (define-public python2-appdirs
5952 (package-with-python2 python-appdirs))
5953
5954 (define-public python-llfuse
5955 (package
5956 (name "python-llfuse")
5957 (version "1.1.1")
5958 (source (origin
5959 (method url-fetch)
5960 (uri (string-append
5961 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5962 "llfuse-" version ".tar.bz2"))
5963 (sha256
5964 (base32
5965 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5966 (build-system python-build-system)
5967 (inputs
5968 `(("fuse" ,fuse)
5969 ("attr" ,attr)))
5970 (native-inputs
5971 `(("pkg-config" ,pkg-config)))
5972 (synopsis "Python bindings for FUSE")
5973 (description
5974 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5975 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5976 (license license:lgpl2.0+)
5977 (properties `((python2-variant . ,(delay python2-llfuse))))))
5978
5979 (define-public python2-llfuse
5980 (package (inherit (package-with-python2
5981 (strip-python2-variant python-llfuse)))
5982 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5983
5984 ;; For attic-0.16
5985 (define-public python-llfuse-0.41
5986 (package (inherit python-llfuse)
5987 (version "0.41.1")
5988 (source (origin
5989 (method url-fetch)
5990 (uri (string-append
5991 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5992 "llfuse-" version ".tar.bz2"))
5993 (sha256
5994 (base32
5995 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5996 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5997 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5998 (license (list license:expat license:lgpl2.0+))))
5999
6000 (define-public python-msgpack
6001 (package
6002 (name "python-msgpack")
6003 (version "0.4.8")
6004 (source (origin
6005 (method url-fetch)
6006 (uri (pypi-uri "msgpack-python" version))
6007 (sha256
6008 (base32
6009 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6010 (build-system python-build-system)
6011 (synopsis "MessagePack (de)serializer")
6012 (description "MessagePack is a fast, compact binary serialization format,
6013 suitable for similar data to JSON. This package provides CPython bindings for
6014 reading and writing MessagePack data.")
6015 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6016 (license license:asl2.0)
6017 (properties `((python2-variant . ,(delay python2-msgpack))))))
6018
6019 (define-public python2-msgpack
6020 (package (inherit (package-with-python2
6021 (strip-python2-variant python-msgpack)))
6022 (native-inputs
6023 `(("python2-setuptools" ,python2-setuptools)))))
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
6045 and 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
6122 fractional 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 (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
6146 object 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
6173 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6174 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6175 Unicode-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
6199 tables. PrettyTable allows for selection of which columns are to be printed,
6200 independent alignment of columns (left or right justified or centred) and
6201 printing 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 (build-system python-build-system)
6219 (arguments
6220 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6221 ;; or "check", so we must override the build and check phases.
6222 #:phases
6223 (modify-phases %standard-phases
6224 (add-after 'unpack 'use-gcc
6225 (lambda _
6226 (substitute* "setup.py"
6227 (("compiler = new_compiler\\(\\)" line)
6228 (string-append line
6229 "\ncompiler.set_executables(compiler='gcc',"
6230 "compiler_so='gcc',"
6231 "linker_exe='gcc',"
6232 "linker_so='gcc -shared')")))
6233 #t))
6234 (replace 'build
6235 (lambda* (#:key inputs #:allow-other-keys)
6236 (zero? (system* "python" "setup.py" "build"
6237 (string-append "--hdf5="
6238 (assoc-ref inputs "hdf5"))))))
6239 (replace 'check
6240 (lambda* (#:key inputs #:allow-other-keys)
6241 (zero? (system* "python" "setup.py" "check"
6242 (string-append "--hdf5="
6243 (assoc-ref inputs "hdf5")))))))))
6244 (propagated-inputs
6245 `(("python-numexpr" ,python-numexpr)
6246 ("python-numpy" ,python-numpy)))
6247 (native-inputs
6248 `(("python-cython" ,python-cython)
6249 ("pkg-config" ,pkg-config)))
6250 (inputs
6251 `(("hdf5" ,hdf5)
6252 ("bzip2" ,bzip2)
6253 ("zlib" ,zlib)))
6254 (home-page "http://www.pytables.org/")
6255 (synopsis "Hierarchical datasets for Python")
6256 (description "PyTables is a package for managing hierarchical datasets and
6257 designed to efficently cope with extremely large amounts of data.")
6258 (license license:bsd-3)))
6259
6260 (define-public python2-tables
6261 (package-with-python2 python-tables))
6262
6263 (define-public python-pyasn1
6264 (package
6265 (name "python-pyasn1")
6266 (version "0.1.9")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "pyasn1" version))
6271 (sha256
6272 (base32
6273 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6274 (build-system python-build-system)
6275 (home-page "http://pyasn1.sourceforge.net/")
6276 (synopsis "ASN.1 types and codecs")
6277 (description
6278 "This is an implementation of ASN.1 types and codecs in Python. It is
6279 suitable for a wide range of protocols based on the ASN.1 specification.")
6280 (license license:bsd-2)))
6281
6282 (define-public python2-pyasn1
6283 (package-with-python2 python-pyasn1))
6284
6285 (define-public python-pyasn1-modules
6286 (package
6287 (name "python-pyasn1-modules")
6288 (version "0.0.8")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "pyasn1-modules" version))
6293 (sha256
6294 (base32
6295 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6296 (build-system python-build-system)
6297 (propagated-inputs
6298 `(("python-pyasn1" ,python-pyasn1)))
6299 (home-page "http://sourceforge.net/projects/pyasn1/")
6300 (synopsis "ASN.1 codec implementations")
6301 (description
6302 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6303 implementations of ASN.1-based codecs and protocols.")
6304 (license license:bsd-3)))
6305
6306 (define-public python2-pyasn1-modules
6307 (package-with-python2 python-pyasn1-modules))
6308
6309 (define-public python-ipaddress
6310 (package
6311 (name "python-ipaddress")
6312 (version "1.0.16")
6313 (source (origin
6314 (method url-fetch)
6315 (uri (pypi-uri "ipaddress" version))
6316 (sha256
6317 (base32
6318 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6319 (build-system python-build-system)
6320 (home-page "https://github.com/phihag/ipaddress")
6321 (synopsis "IP address manipulation library")
6322 (description
6323 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6324 in Python. This library is used to create, poke at, and manipulate IPv4 and
6325 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6326 module to older versions of Python.")
6327 (license license:psfl)
6328 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6329
6330 (define-public python2-ipaddress
6331 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6332 (package (inherit base)
6333 (native-inputs
6334 `(("python2-setuptools" ,python2-setuptools)
6335 ,@(package-native-inputs base))))))
6336
6337 (define-public python2-ipaddr
6338 (package
6339 (name "python2-ipaddr")
6340 (version "2.1.11")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (pypi-uri "ipaddr" version))
6345 (sha256
6346 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6347 (build-system python-build-system)
6348 (arguments
6349 `(#:python ,python-2 ;version 2 only
6350 #:phases
6351 (modify-phases %standard-phases
6352 (replace 'check
6353 (lambda* _
6354 (zero? (system* "python" "ipaddr_test.py")))))))
6355 (home-page "https://github.com/google/ipaddr-py")
6356 (synopsis "IP address manipulation library")
6357 (description
6358 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6359 IPv6 addresses and networks.
6360
6361 For new implementations you may prefer to use the standard module
6362 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6363 versions of Python.")
6364 (license license:asl2.0)))
6365
6366 (define-public python-idna
6367 (package
6368 (name "python-idna")
6369 (version "2.0")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (string-append "https://pypi.python.org/packages/source/i/"
6374 "idna/idna-" version ".tar.gz"))
6375 (sha256
6376 (base32
6377 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6378 (build-system python-build-system)
6379 (home-page "https://github.com/kjd/idna")
6380 (synopsis "Internationalized domain names in applications")
6381 (description
6382 "This is a library to support the Internationalised Domain Names in
6383 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6384 protocol is often referred to as “IDNA2008” and can produce different results
6385 from the earlier standard from 2003. The library is also intended to act as a
6386 suitable drop-in replacement for the “encodings.idna” module that comes with
6387 the Python standard library but currently only supports the older 2003
6388 specification.")
6389 (license license:bsd-4)))
6390
6391 (define-public python2-idna
6392 (package-with-python2 python-idna))
6393
6394 (define-public python-pretend
6395 (package
6396 (name "python-pretend")
6397 (version "1.0.8")
6398 (source
6399 (origin
6400 (method url-fetch)
6401 (uri (string-append "https://pypi.python.org/packages/source/p/"
6402 "pretend/pretend-" version ".tar.gz"))
6403 (sha256
6404 (base32
6405 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6406 (build-system python-build-system)
6407 (home-page "https://github.com/alex/pretend")
6408 (synopsis "Library for stubbing in Python")
6409 (description
6410 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6411 technique for writing tests. You may hear the term mixed up with mocks,
6412 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6413 responses, rather than doing any computation.")
6414 (license license:bsd-3)))
6415
6416 (define-public python2-pretend
6417 (package-with-python2 python-pretend))
6418
6419 (define-public python-cryptography-vectors
6420 (package
6421 (name "python-cryptography-vectors")
6422 (version "1.5.3")
6423 (source
6424 (origin
6425 (method url-fetch)
6426 (uri (pypi-uri "cryptography_vectors" version))
6427 (sha256
6428 (base32
6429 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6430 (build-system python-build-system)
6431 (home-page "https://github.com/pyca/cryptography")
6432 (synopsis "Test vectors for the cryptography package")
6433 (description
6434 "This package contains test vectors for the cryptography package.")
6435 ;; Distributed under either BSD-3 or ASL2.0
6436 (license (list license:bsd-3 license:asl2.0))))
6437
6438 (define-public python2-cryptography-vectors
6439 (package-with-python2 python-cryptography-vectors))
6440
6441 (define-public python-cryptography
6442 (package
6443 (name "python-cryptography")
6444 (version "1.5.3")
6445 (source
6446 (origin
6447 (method url-fetch)
6448 (uri (pypi-uri "cryptography" version))
6449 (sha256
6450 (base32
6451 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6452 (build-system python-build-system)
6453 (arguments
6454 `(#:phases
6455 (modify-phases %standard-phases
6456 (add-before 'check 'disable-failing-test
6457 (lambda _
6458 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6459 ;; versions of python-cryptography:
6460 ;; https://github.com/pyca/cryptography/issues/3196
6461 ;; TODO: Try re-enabling the test when upgrading
6462 ;; python-cryptography.
6463 (substitute* "tests/hazmat/backends/test_openssl.py"
6464 (("def test_numeric_string_x509_name_entry")
6465 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6466 #t)))))
6467 (inputs
6468 `(("openssl" ,openssl)))
6469 (propagated-inputs
6470 `(("python-cffi" ,python-cffi)
6471 ("python-six" ,python-six)
6472 ("python-pyasn1" ,python-pyasn1)
6473 ("python-idna" ,python-idna)
6474 ("python-iso8601" ,python-iso8601)))
6475 (native-inputs
6476 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6477 ("python-hypothesis" ,python-hypothesis)
6478 ("python-pretend" ,python-pretend)
6479 ("python-pyasn1" ,python-pyasn1)
6480 ("python-pyasn1-modules" ,python-pyasn1-modules)
6481 ("python-pytz" ,python-pytz)
6482 ("python-pytest" ,python-pytest-2.9.2)))
6483 (home-page "https://github.com/pyca/cryptography")
6484 (synopsis "Cryptographic recipes and primitives for Python")
6485 (description
6486 "cryptography is a package which provides cryptographic recipes and
6487 primitives to Python developers. It aims to be the “cryptographic standard
6488 library” for Python. The package includes both high level recipes, and low
6489 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6490 message digests and key derivation functions.")
6491 ;; Distributed under either BSD-3 or ASL2.0
6492 (license (list license:bsd-3 license:asl2.0))
6493 (properties `((python2-variant . ,(delay python2-cryptography))))))
6494
6495 (define-public python2-cryptography
6496 (let ((crypto (package-with-python2
6497 (strip-python2-variant python-cryptography))))
6498 (package (inherit crypto)
6499 (propagated-inputs
6500 `(("python2-ipaddress" ,python2-ipaddress)
6501 ("python2-backport-ssl-match-hostname"
6502 ,python2-backport-ssl-match-hostname)
6503 ("python2-enum34" ,python2-enum34)
6504 ,@(package-propagated-inputs crypto))))))
6505
6506 (define-public python-pyopenssl
6507 (package
6508 (name "python-pyopenssl")
6509 (version "16.1.0")
6510 (source
6511 (origin
6512 (method url-fetch)
6513 (uri (pypi-uri "pyOpenSSL" version))
6514 (sha256
6515 (base32
6516 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6517 (build-system python-build-system)
6518 (propagated-inputs
6519 `(("python-cryptography" ,python-cryptography)
6520 ("python-six" ,python-six)))
6521 (inputs
6522 `(("openssl" ,openssl)))
6523 (home-page "https://github.com/pyca/pyopenssl")
6524 (synopsis "Python wrapper module around the OpenSSL library")
6525 (description
6526 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6527 library.")
6528 (license license:asl2.0)))
6529
6530 (define-public python2-pyopenssl
6531 (package-with-python2 python-pyopenssl))
6532
6533 (define-public python-pip
6534 (package
6535 (name "python-pip")
6536 (version "8.0.2")
6537 (source
6538 (origin
6539 (method url-fetch)
6540 (uri (pypi-uri "pip" version))
6541 (sha256
6542 (base32
6543 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6544 (build-system python-build-system)
6545 (inputs
6546 `(("python-virtualenv" ,python-virtualenv)
6547 ;; Tests
6548 ("python-mock" ,python-mock)
6549 ("python-pytest" ,python-pytest)
6550 ("python-scripttest" ,python-scripttest)))
6551 (home-page "https://pip.pypa.io/")
6552 (synopsis
6553 "Package manager for Python software")
6554 (description
6555 "Pip is a package manager for Python software, that finds packages on the
6556 Python Package Index (PyPI).")
6557 (license license:expat)))
6558
6559 (define-public python2-pip
6560 (package-with-python2 python-pip))
6561
6562 (define-public python-tlsh
6563 (package
6564 (name "python-tlsh")
6565 (version "3.4.4")
6566 (home-page "https://github.com/trendmicro/tlsh")
6567 (source (origin
6568 (method url-fetch)
6569 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6570 version ".tar.gz"))
6571 (sha256
6572 (base32
6573 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6574 (file-name (string-append name "-" version ".tar.gz"))))
6575 (build-system cmake-build-system)
6576 (arguments
6577 '(#:out-of-source? #f
6578 #:phases (modify-phases %standard-phases
6579 (replace
6580 'install
6581 (lambda* (#:key outputs #:allow-other-keys)
6582 ;; Build and install the Python bindings. The underlying
6583 ;; C++ library is apparently not meant to be installed.
6584 (let ((out (assoc-ref outputs "out")))
6585 (with-directory-excursion "py_ext"
6586 (and (system* "python" "setup.py" "build")
6587 (system* "python" "setup.py" "install"
6588 (string-append "--prefix=" out))))))))))
6589 (inputs `(("python" ,python-wrapper))) ;for the bindings
6590 (synopsis "Fuzzy matching library for Python")
6591 (description
6592 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6593 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6594 value which can be used for similarity comparisons. Similar objects have
6595 similar hash values, which allows for the detection of similar objects by
6596 comparing their hash values. The byte stream should have a sufficient amount
6597 of complexity; for example, a byte stream of identical bytes will not generate
6598 a hash value.")
6599 (license license:asl2.0)))
6600
6601 (define-public python2-tlsh
6602 (package
6603 (inherit python-tlsh)
6604 (name "python2-tlsh")
6605 (inputs `(("python" ,python-2)))))
6606
6607 (define-public python-termcolor
6608 (package
6609 (name "python-termcolor")
6610 (version "1.1.0")
6611 (source
6612 (origin
6613 (method url-fetch)
6614 (uri (pypi-uri "python-termcolor" version))
6615 (sha256
6616 (base32
6617 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6618 (build-system python-build-system)
6619 (arguments
6620 ;; There are no tests.
6621 `(#:tests? #f))
6622 (home-page "http://pypi.python.org/pypi/termcolor")
6623 (synopsis "ANSII Color formatting for terminal output")
6624 (description
6625 "This package provides ANSII Color formatting for output in terminals.")
6626 (license license:expat)))
6627
6628 (define-public python2-termcolor
6629 (package-with-python2 python-termcolor))
6630
6631 (define-public python-libarchive-c
6632 (package
6633 (name "python-libarchive-c")
6634 (version "2.2")
6635 (source (origin
6636 (method url-fetch)
6637 (uri (pypi-uri "libarchive-c" version))
6638 (sha256
6639 (base32
6640 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6641 (build-system python-build-system)
6642 (arguments
6643 '(#:phases (modify-phases %standard-phases
6644 (add-before
6645 'build 'reference-libarchive
6646 (lambda* (#:key inputs #:allow-other-keys)
6647 ;; Retain the absolute file name of libarchive.so.
6648 (let ((libarchive (assoc-ref inputs "libarchive")))
6649 (substitute* "libarchive/ffi.py"
6650 (("find_library\\('archive'\\)")
6651 (string-append "'" libarchive
6652 "/lib/libarchive.so'"))))
6653
6654 ;; Do not make a compressed egg (see
6655 ;; <http://bugs.gnu.org/20765>).
6656 (let ((port (open-file "setup.cfg" "a")))
6657 (display "\n[easy_install]\nzip_ok = 0\n"
6658 port)
6659 (close-port port)
6660 #t))))))
6661 (inputs
6662 `(("libarchive" ,libarchive)))
6663 (home-page "https://github.com/Changaco/python-libarchive-c")
6664 (synopsis "Python interface to libarchive")
6665 (description
6666 "This package provides Python bindings to libarchive, a C library to
6667 access possibly compressed archives in many different formats. It uses
6668 Python's @code{ctypes} foreign function interface (FFI).")
6669 (license license:lgpl2.0+)))
6670
6671 (define-public python2-libarchive-c
6672 (package-with-python2 python-libarchive-c))
6673
6674 (define-public python-file
6675 (package
6676 (inherit file)
6677 (name "python-file")
6678 (source (origin
6679 (inherit (package-source file))
6680 ;; This patch should not be applied to python2-file.
6681 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6682 (build-system python-build-system)
6683 (arguments
6684 '(#:tests? #f ;no tests
6685 #:configure-flags '("--single-version-externally-managed" "--root=/")
6686 #:phases (modify-phases %standard-phases
6687 (add-before 'build 'change-directory
6688 (lambda _
6689 (chdir "python")
6690 #t))
6691 (add-before 'build 'set-library-file-name
6692 (lambda* (#:key inputs #:allow-other-keys)
6693 (let ((file (assoc-ref inputs "file")))
6694 (substitute* "magic.py"
6695 (("find_library\\('magic'\\)")
6696 (string-append "'" file "/lib/libmagic.so'")))
6697 #t))))))
6698 (inputs `(("file" ,file)))
6699 (self-native-input? #f)
6700 (synopsis "Python bindings to the libmagic file type guesser. Note that
6701 this module and the python-magic module both provide a \"magic.py\" file;
6702 these two modules, which are different and were developed separately, both
6703 serve the same purpose: provide Python bindings for libmagic.")
6704 (properties `((python2-variant . ,(delay python2-file))))))
6705
6706 (define-public python2-file
6707 (let ((base (package-with-python2 (strip-python2-variant python-file))))
6708 (package
6709 (inherit base)
6710 (source (package-source file))
6711 (native-inputs
6712 `(("python2-setuptools" ,python2-setuptools)
6713 ,@(package-native-inputs base))))))
6714
6715 (define-public python-debian
6716 (package
6717 (name "python-debian")
6718 (version "0.1.23")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (string-append
6723 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6724 version ".tar.gz"))
6725 (sha256
6726 (base32
6727 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6728 (build-system python-build-system)
6729 (inputs
6730 `(("python-six" ,python-six)))
6731 (home-page "http://packages.debian.org/sid/python-debian")
6732 (synopsis "Debian package related modules")
6733 (description
6734 ;; XXX: Use @enumerate instead of @itemize to work around
6735 ;; <http://bugs.gnu.org/21772>.
6736 "This package provides Python modules that abstract many formats of
6737 Debian-related files, such as:
6738
6739 @enumerate
6740 @item Debtags information;
6741 @item @file{debian/changelog} files;
6742 @item packages files, pdiffs;
6743 @item control files of single or multiple RFC822-style paragraphs---e.g.
6744 @file{debian/control}, @file{.changes}, @file{.dsc};
6745 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6746 contained files and meta-information.
6747 @end enumerate\n")
6748
6749 ;; Modules are either GPLv2+ or GPLv3+.
6750 (license license:gpl3+)))
6751
6752 (define-public python2-debian
6753 (package-with-python2 python-debian))
6754
6755 (define-public python-nbformat
6756 (package
6757 (name "python-nbformat")
6758 (version "4.1.0")
6759 (source
6760 (origin
6761 (method url-fetch)
6762 (uri (pypi-uri "nbformat" version))
6763 (sha256
6764 (base32
6765 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6766 (build-system python-build-system)
6767 (arguments `(#:tests? #f)) ; no test target
6768 (propagated-inputs
6769 `(("python-ipython-genutils" ,python-ipython-genutils)
6770 ("python-jsonschema" ,python-jsonschema)
6771 ("python-jupyter-core" ,python-jupyter-core)
6772 ("python-traitlets" ,python-traitlets)))
6773 (home-page "http://jupyter.org")
6774 (synopsis "Jupyter Notebook format")
6775 (description "This package provides the reference implementation of the
6776 Jupyter Notebook format and Python APIs for working with notebooks.")
6777 (license license:bsd-3)))
6778
6779 (define-public python2-nbformat
6780 (package-with-python2 python-nbformat))
6781
6782 (define-public python-bleach
6783 (package
6784 (name "python-bleach")
6785 (version "1.4.3")
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (pypi-uri "bleach" version))
6790 (sha256
6791 (base32
6792 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6793 (build-system python-build-system)
6794 (propagated-inputs
6795 `(("python-html5lib" ,python-html5lib-0.9)
6796 ("python-six" ,python-six)))
6797 (native-inputs
6798 `(("python-nose" ,python-nose)))
6799 (home-page "http://github.com/jsocol/bleach")
6800 (synopsis "Whitelist-based HTML-sanitizing tool")
6801 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6802 (license license:asl2.0)))
6803
6804 (define-public python2-bleach
6805 (package-with-python2 python-bleach))
6806
6807 (define-public python-entrypoints
6808 (package
6809 (name "python-entrypoints")
6810 (version "0.2.2")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6815 version ".tar.gz"))
6816 (file-name (string-append name "-" version ".tar.gz"))
6817 (sha256
6818 (base32
6819 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6820 (build-system python-build-system)
6821 ;; The package does not come with a setup.py file, so we have to generate
6822 ;; one ourselves.
6823 (arguments
6824 `(#:tests? #f
6825 #:phases
6826 (modify-phases %standard-phases
6827 (add-after 'unpack 'create-setup.py
6828 (lambda _
6829 (call-with-output-file "setup.py"
6830 (lambda (port)
6831 (format port "\
6832 from setuptools import setup
6833 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6834 " ,version))))))))
6835 (home-page "https://github.com/takluyver/entrypoints")
6836 (synopsis "Discover and load entry points from installed Python packages")
6837 (description "Entry points are a way for Python packages to advertise
6838 objects with some common interface. The most common examples are
6839 @code{console_scripts} entry points, which define shell commands by
6840 identifying a Python function to run. The @code{entrypoints} module contains
6841 functions to find and load entry points.")
6842 (license license:expat)))
6843
6844 (define-public python2-entrypoints
6845 (package-with-python2 python-entrypoints))
6846
6847 (define-public python-nbconvert
6848 (package
6849 (name "python-nbconvert")
6850 (version "5.0.0b1")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (pypi-uri "nbconvert" version))
6855 (sha256
6856 (base32
6857 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6858 (build-system python-build-system)
6859 ;; The "bdist_egg" target is disabled by default, causing the installation
6860 ;; to fail.
6861 (arguments `(#:configure-flags (list "bdist_egg")))
6862 (propagated-inputs
6863 `(("python-bleach" ,python-bleach)
6864 ("python-entrypoints" ,python-entrypoints)
6865 ("python-jinja2" ,python-jinja2)
6866 ("python-jupyter-core" ,python-jupyter-core)
6867 ("python-mistune" ,python-mistune)
6868 ("python-nbformat" ,python-nbformat)
6869 ("python-pygments" ,python-pygments)
6870 ("python-traitlets" ,python-traitlets)))
6871 (home-page "http://jupyter.org")
6872 (synopsis "Converting Jupyter Notebooks")
6873 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6874 notebooks to various other formats via Jinja templates. It allows you to
6875 convert an @code{.ipynb} notebook file into various static formats including:
6876
6877 @enumerate
6878 @item HTML
6879 @item LaTeX
6880 @item PDF
6881 @item Reveal JS
6882 @item Markdown (md)
6883 @item ReStructured Text (rst)
6884 @item executable script
6885 @end enumerate\n")
6886 (license license:bsd-3)))
6887
6888 (define-public python2-nbconvert
6889 (package-with-python2 python-nbconvert))
6890
6891 (define-public python-notebook
6892 (package
6893 (name "python-notebook")
6894 (version "4.2.3")
6895 (source (origin
6896 (method url-fetch)
6897 (uri (pypi-uri "notebook" version))
6898 (sha256
6899 (base32
6900 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6901 (build-system python-build-system)
6902 (arguments
6903 `(#:phases
6904 (modify-phases %standard-phases
6905 (replace 'check
6906 (lambda _
6907 ;; HOME must be set for tests
6908 (setenv "HOME" "/tmp")
6909 (zero? (system* "nosetests")))))))
6910 (propagated-inputs
6911 `(("python-jupyter-core" ,python-jupyter-core)
6912 ("python-nbformat" ,python-nbformat)
6913 ("python-nbconvert" ,python-nbconvert)
6914 ("python-ipython" ,python-ipython)))
6915 (native-inputs
6916 `(("python-nose" ,python-nose)
6917 ("python-sphinx" ,python-sphinx)
6918 ("python-requests" ,python-requests)))
6919 (home-page "http://jupyter.org/")
6920 (synopsis "Web-based notebook environment for interactive computing")
6921 (description
6922 "The Jupyter HTML notebook is a web-based notebook environment for
6923 interactive computing.")
6924 (license license:bsd-3)))
6925
6926 (define-public python2-notebook
6927 (package-with-python2 python-notebook))
6928
6929 (define-public python-widgetsnbextension
6930 (package
6931 (name "python-widgetsnbextension")
6932 (version "1.2.6")
6933 (source
6934 (origin
6935 (method url-fetch)
6936 (uri (pypi-uri "widgetsnbextension" version))
6937 (sha256
6938 (base32
6939 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6940 (build-system python-build-system)
6941 (propagated-inputs
6942 `(("python-notebook" ,python-notebook)))
6943 (native-inputs
6944 `(("python-nose" ,python-nose)))
6945 (home-page "http://ipython.org")
6946 (synopsis "IPython HTML widgets for Jupyter")
6947 (description "This package provides interactive HTML widgets for Jupyter
6948 notebooks.")
6949 (license license:bsd-3)))
6950
6951 (define-public python2-widgetsnbextension
6952 (package-with-python2 python-widgetsnbextension))
6953
6954 (define-public python-ipywidgets
6955 (package
6956 (name "python-ipywidgets")
6957 (version "5.2.2")
6958 (source
6959 (origin
6960 (method url-fetch)
6961 (uri (pypi-uri "ipywidgets" version))
6962 (sha256
6963 (base32
6964 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6965 (build-system python-build-system)
6966 ;; FIXME: it's not clear how to run the tests.
6967 (arguments `(#:tests? #f))
6968 (propagated-inputs
6969 `(("python-ipykernel" ,python-ipykernel)
6970 ("python-ipython" ,python-ipython)
6971 ("python-traitlets" ,python-traitlets)
6972 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6973 (home-page "http://ipython.org")
6974 (synopsis "IPython HTML widgets for Jupyter")
6975 (description "Ipywidgets are interactive HTML widgets for Jupyter
6976 notebooks and the IPython kernel. Notebooks come alive when interactive
6977 widgets are used. Users gain control of their data and can visualize changes
6978 in the data.")
6979 (license license:bsd-3)))
6980
6981 (define-public python2-ipywidgets
6982 (package-with-python2 python-ipywidgets))
6983
6984 (define-public python-jupyter-console
6985 (package
6986 (name "python-jupyter-console")
6987 (version "5.0.0")
6988 (source
6989 (origin
6990 (method url-fetch)
6991 (uri (pypi-uri "jupyter_console" version))
6992 (sha256
6993 (base32
6994 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6995 (build-system python-build-system)
6996 ;; FIXME: it's not clear how to run the tests.
6997 (arguments `(#:tests? #f))
6998 (propagated-inputs
6999 `(("python-ipykernel" ,python-ipykernel)
7000 ("python-ipython" ,python-ipython)
7001 ("python-jupyter-client" ,python-jupyter-client)
7002 ("python-prompt-toolkit" ,python-prompt-toolkit)
7003 ("python-pygments" ,python-pygments)))
7004 (home-page "https://jupyter.org")
7005 (synopsis "Jupyter terminal console")
7006 (description "This package provides a terminal-based console frontend for
7007 Jupyter kernels. It also allows for console-based interaction with non-Python
7008 Jupyter kernels such as IJulia and IRKernel.")
7009 (license license:bsd-3)))
7010
7011 (define-public python2-jupyter-console
7012 (package-with-python2 python-jupyter-console))
7013
7014 (define-public jupyter
7015 (package
7016 (name "jupyter")
7017 (version "1.0.0")
7018 (source
7019 (origin
7020 (method url-fetch)
7021 (uri (pypi-uri "jupyter" version))
7022 (sha256
7023 (base32
7024 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7025 (build-system python-build-system)
7026 ;; FIXME: it's not clear how to run the tests.
7027 (arguments `(#:tests? #f))
7028 (propagated-inputs
7029 `(("python-ipykernel" ,python-ipykernel)
7030 ("python-ipywidgets" ,python-ipywidgets)
7031 ("python-jupyter-console" ,python-jupyter-console)
7032 ("python-nbconvert" ,python-nbconvert)
7033 ("python-notebook" ,python-notebook)))
7034 (home-page "http://jupyter.org")
7035 (synopsis "Web application for interactive documents")
7036 (description
7037 "The Jupyter Notebook is a web application that allows you to create and
7038 share documents that contain live code, equations, visualizations and
7039 explanatory text. Uses include: data cleaning and transformation, numerical
7040 simulation, statistical modeling, machine learning and much more.")
7041 (license license:bsd-3)))
7042
7043 (define-public python-chardet
7044 (package
7045 (name "python-chardet")
7046 (version "2.3.0")
7047 (source
7048 (origin
7049 (method url-fetch)
7050 (uri (string-append
7051 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7052 version
7053 ".tar.gz"))
7054 (sha256
7055 (base32
7056 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7057 (build-system python-build-system)
7058 (home-page "https://github.com/chardet/chardet")
7059 (synopsis "Universal encoding detector for Python 2 and 3")
7060 (description
7061 "This package provides @code{chardet}, a Python module that can
7062 automatically detect a wide range of file encodings.")
7063 (license license:lgpl2.1+)))
7064
7065 (define-public python2-chardet
7066 (package-with-python2 python-chardet))
7067
7068 (define-public python-docopt
7069 (package
7070 (name "python-docopt")
7071 (version "0.6.2")
7072 (source
7073 (origin
7074 (method url-fetch)
7075 ;; The release on PyPI does not include tests.
7076 (uri (string-append
7077 "https://github.com/docopt/docopt/archive/"
7078 version ".tar.gz"))
7079 (file-name (string-append name "-" version ".tar.gz"))
7080 (sha256
7081 (base32
7082 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7083 (build-system python-build-system)
7084 (native-inputs
7085 `(("python-pytest" ,python-pytest)))
7086 (arguments
7087 `(#:phases (alist-replace
7088 'check
7089 (lambda _ (zero? (system* "py.test")))
7090 %standard-phases)))
7091 (home-page "http://docopt.org")
7092 (synopsis "Command-line interface description language for Python")
7093 (description "This library allows the user to define a command-line
7094 interface from a program's help message rather than specifying it
7095 programatically with command-line parsers like @code{getopt} and
7096 @code{argparse}.")
7097 (license license:expat)))
7098
7099 (define-public python2-docopt
7100 (package-with-python2 python-docopt))
7101
7102 (define-public python-zope-event
7103 (package
7104 (name "python-zope-event")
7105 (version "4.1.0")
7106 (source
7107 (origin
7108 (method url-fetch)
7109 (uri (string-append "https://pypi.python.org/packages/source/z"
7110 "/zope.event/zope.event-" version ".tar.gz"))
7111 (sha256
7112 (base32
7113 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7114 (build-system python-build-system)
7115 (home-page "http://pypi.python.org/pypi/zope.event")
7116 (synopsis "Event publishing system for Python")
7117 (description "Zope.event provides an event publishing API, intended for
7118 use by applications which are unaware of any subscribers to their events. It
7119 is a simple event-dispatching system on which more sophisticated event
7120 dispatching systems can be built.")
7121 (license license:zpl2.1)))
7122
7123 (define-public python2-zope-event
7124 (package-with-python2 python-zope-event))
7125
7126 (define-public python-zope-interface
7127 (package
7128 (name "python-zope-interface")
7129 (version "4.1.3")
7130 (source
7131 (origin
7132 (method url-fetch)
7133 (uri (string-append "https://pypi.python.org/packages/source/z"
7134 "/zope.interface/zope.interface-" version ".tar.gz"))
7135 (sha256
7136 (base32
7137 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7138 (build-system python-build-system)
7139 (propagated-inputs
7140 `(("python-zope-event" ,python-zope-event)))
7141 (home-page "https://github.com/zopefoundation/zope.interface")
7142 (synopsis "Python implementation of the \"design by contract\"
7143 methodology")
7144 (description "Zope.interface provides an implementation of \"object
7145 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7146 conforming to a given API or contract.")
7147 (license license:zpl2.1)))
7148
7149 (define-public python2-zope-interface
7150 (package-with-python2 python-zope-interface))
7151
7152 (define-public python-zope-exceptions
7153 (package
7154 (name "python-zope-exceptions")
7155 (version "4.0.8")
7156 (source
7157 (origin
7158 (method url-fetch)
7159 (uri (string-append "https://pypi.python.org/packages/source/z"
7160 "/zope.exceptions/zope.exceptions-"
7161 version ".tar.gz"))
7162 (sha256
7163 (base32
7164 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7165 (build-system python-build-system)
7166 (arguments
7167 '(#:tests? #f)) ; circular dependency with zope.testrunner
7168 (propagated-inputs
7169 `(("python-zope-interface" ,python-zope-interface)))
7170 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7171 (synopsis "Zope exceptions")
7172 (description "Zope.exceptions provides general-purpose exception types
7173 that have uses outside of the Zope framework.")
7174 (license license:zpl2.1)))
7175
7176 (define-public python2-zope-exceptions
7177 (package-with-python2 python-zope-exceptions))
7178
7179 (define-public python-zope-testing
7180 (package
7181 (name "python-zope-testing")
7182 (version "4.5.0")
7183 (source
7184 (origin
7185 (method url-fetch)
7186 (uri (string-append "https://pypi.python.org/packages/source/z"
7187 "/zope.testing/zope.testing-" version ".tar.gz"))
7188 (sha256
7189 (base32
7190 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7191 (modules '((guix build utils)))
7192 (snippet
7193 '(begin
7194 ;; Remove pre-compiled .pyc files backup files from source.
7195 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7196 #t))))
7197 (build-system python-build-system)
7198 (native-inputs
7199 `(("python-zope-exceptions" ,python-zope-exceptions)))
7200 (propagated-inputs
7201 `(("python-zope-interface" ,python-zope-interface)))
7202 (home-page "http://pypi.python.org/pypi/zope.testing")
7203 (synopsis "Zope testing helpers")
7204 (description "Zope.testing provides a number of testing utilities for HTML
7205 forms, HTTP servers, regular expressions, and more.")
7206 (license license:zpl2.1)))
7207
7208 (define-public python2-zope-testing
7209 (package-with-python2 python-zope-testing))
7210
7211 (define-public python-zope-testrunner
7212 (package
7213 (name "python-zope-testrunner")
7214 (version "4.4.9")
7215 (source
7216 (origin
7217 (method url-fetch)
7218 (uri (string-append "https://pypi.python.org/packages/source/z"
7219 "/zope.testrunner/zope.testrunner-"
7220 version ".zip"))
7221 (sha256
7222 (base32
7223 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7224 (build-system python-build-system)
7225 (native-inputs
7226 `(("python-six" ,python-six)
7227 ("python-zope-exceptions" ,python-zope-exceptions)
7228 ("python-zope-testing" ,python-zope-testing)
7229 ("unzip" ,unzip)))
7230 (propagated-inputs
7231 `(("python-zope-interface" ,python-zope-interface)))
7232 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7233 (synopsis "Zope testrunner script")
7234 (description "Zope.testrunner provides a script for running Python
7235 tests.")
7236 (license license:zpl2.1)))
7237
7238 (define-public python2-zope-testrunner
7239 (let ((base (package-with-python2 python-zope-testrunner)))
7240 (package
7241 (inherit base)
7242 (native-inputs
7243 (append (package-native-inputs base)
7244 `(("python2-subunit" ,python2-subunit)
7245 ("python2-mimeparse" ,python2-mimeparse)))))))
7246
7247 (define-public python-zope-i18nmessageid
7248 (package
7249 (name "python-zope-i18nmessageid")
7250 (version "4.0.3")
7251 (source
7252 (origin
7253 (method url-fetch)
7254 (uri (string-append
7255 "https://pypi.python.org/packages/source/z"
7256 "/zope.i18nmessageid/zope.i18nmessageid-"
7257 version ".tar.gz"))
7258 (sha256
7259 (base32
7260 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7261 (build-system python-build-system)
7262 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7263 (synopsis "Message identifiers for internationalization")
7264 (description "Zope.i18nmessageid provides facilities for declaring
7265 internationalized messages within program source text.")
7266 (license license:zpl2.1)))
7267
7268 (define-public python2-zope-i18nmessageid
7269 (package-with-python2 python-zope-i18nmessageid))
7270
7271 (define-public python-zope-schema
7272 (package
7273 (name "python-zope-schema")
7274 (version "4.4.2")
7275 (source
7276 (origin
7277 (method url-fetch)
7278 (uri (string-append "https://pypi.python.org/packages/source/z"
7279 "/zope.schema/zope.schema-" version ".tar.gz"))
7280 (sha256
7281 (base32
7282 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7283 (build-system python-build-system)
7284 (propagated-inputs
7285 `(("python-zope-event" ,python-zope-event)
7286 ("python-zope-interface" ,python-zope-interface)))
7287 (native-inputs
7288 `(("python-zope-testing" ,python-zope-testing)))
7289 (home-page "http://pypi.python.org/pypi/zope.schema")
7290 (synopsis "Zope data schemas")
7291 (description "Zope.scheme provides extensions to zope.interface for
7292 defining data schemas.")
7293 (license license:zpl2.1)))
7294
7295 (define-public python2-zope-schema
7296 (package-with-python2 python-zope-schema))
7297
7298 (define-public python-zope-configuration
7299 (package
7300 (name "python-zope-configuration")
7301 (version "4.0.3")
7302 (source (origin
7303 (method url-fetch)
7304 (uri (string-append "https://pypi.python.org/packages/source/z"
7305 "/zope.configuration/zope.configuration-"
7306 version ".tar.gz"))
7307 (sha256
7308 (base32
7309 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7310 (build-system python-build-system)
7311 (propagated-inputs
7312 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7313 ("python-zope-schema" ,python-zope-schema)))
7314 (home-page "http://pypi.python.org/pypi/zope.configuration")
7315 (synopsis "Zope Configuration Markup Language")
7316 (description "Zope.configuration implements ZCML, the Zope Configuration
7317 Markup Language.")
7318 (license license:zpl2.1)))
7319
7320 (define-public python2-zope-configuration
7321 (package-with-python2 python-zope-configuration))
7322
7323 (define-public python-zope-proxy
7324 (package
7325 (name "python-zope-proxy")
7326 (version "4.1.6")
7327 (source
7328 (origin
7329 (method url-fetch)
7330 (uri (string-append "https://pypi.python.org/packages/source/z"
7331 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7332 (sha256
7333 (base32
7334 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7335 (build-system python-build-system)
7336 (propagated-inputs
7337 `(("python-zope-interface" ,python-zope-interface)))
7338 (home-page "http://pypi.python.org/pypi/zope.proxy")
7339 (synopsis "Generic, transparent proxies")
7340 (description "Zope.proxy provides generic, transparent proxies for Python.
7341 Proxies are special objects which serve as mostly-transparent wrappers around
7342 another object, intervening in the apparent behavior of the wrapped object
7343 only when necessary to apply the policy (e.g., access checking, location
7344 brokering, etc.) for which the proxy is responsible.")
7345 (license license:zpl2.1)))
7346
7347 (define-public python2-zope-proxy
7348 (package-with-python2 python-zope-proxy))
7349
7350 (define-public python-zope-location
7351 (package
7352 (name "python-zope-location")
7353 (version "4.0.3")
7354 (source
7355 (origin
7356 (method url-fetch)
7357 (uri (string-append "https://pypi.python.org/packages/source/z"
7358 "/zope.location/zope.location-" version ".tar.gz"))
7359 (sha256
7360 (base32
7361 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7362 (build-system python-build-system)
7363 (native-inputs
7364 `(("python-zope-proxy" ,python-zope-proxy)
7365 ("python-zope-schema" ,python-zope-schema)))
7366 (home-page "http://pypi.python.org/pypi/zope.location/")
7367 (synopsis "Zope location library")
7368 (description "Zope.location implements the concept of \"locations\" in
7369 Zope3, which are are special objects that have a structural location.")
7370 (license license:zpl2.1)))
7371
7372 (define-public python2-zope-location
7373 (package-with-python2 python-zope-location))
7374
7375 (define-public python-zope-security
7376 (package
7377 (name "python-zope-security")
7378 (version "4.0.3")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (string-append "https://pypi.python.org/packages/source/z"
7383 "/zope.security/zope.security-" version ".tar.gz"))
7384 (sha256
7385 (base32
7386 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7387 (build-system python-build-system)
7388 (propagated-inputs
7389 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7390 ("python-zope-component" ,python-zope-component)
7391 ("python-zope-location" ,python-zope-location)
7392 ("python-zope-proxy" ,python-zope-proxy)
7393 ("python-zope-schema" ,python-zope-schema)
7394 ("python-zope-testrunner" ,python-zope-testrunner)
7395 ("python-zope-testing" ,python-zope-testing)))
7396 (home-page "http://pypi.python.org/pypi/zope.security")
7397 (synopsis "Zope security framework")
7398 (description "Zope.security provides a generic mechanism to implement
7399 security policies on Python objects.")
7400 (license license:zpl2.1)))
7401
7402 (define-public python2-zope-security
7403 (let ((zope-security (package-with-python2 python-zope-security)))
7404 (package (inherit zope-security)
7405 (propagated-inputs
7406 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7407 ,@(alist-delete
7408 "python-zope-testrunner"
7409 (package-propagated-inputs zope-security)))))))
7410
7411 (define-public python-zope-component
7412 (package
7413 (name "python-zope-component")
7414 (version "4.2.2")
7415 (source
7416 (origin
7417 (method url-fetch)
7418 (uri (string-append "https://pypi.python.org/packages/source/z"
7419 "/zope.component/zope.component-" version ".tar.gz"))
7420 (sha256
7421 (base32
7422 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7423 (build-system python-build-system)
7424 (arguments
7425 ;; Skip tests due to circular dependency with python-zope-security.
7426 '(#:tests? #f))
7427 (native-inputs
7428 `(("python-zope-testing" ,python-zope-testing)))
7429 (propagated-inputs
7430 `(("python-zope-event" ,python-zope-event)
7431 ("python-zope-interface" ,python-zope-interface)
7432 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7433 ("python-zope-configuration" ,python-zope-configuration)))
7434 (home-page "https://github.com/zopefoundation/zope.component")
7435 (synopsis "Zope Component Architecture")
7436 (description "Zope.component represents the core of the Zope Component
7437 Architecture. Together with the zope.interface package, it provides
7438 facilities for defining, registering and looking up components.")
7439 (license license:zpl2.1)))
7440
7441 (define-public python2-zope-component
7442 (package-with-python2 python-zope-component))
7443
7444 (define-public python-pythondialog
7445 (package
7446 (name "python-pythondialog")
7447 (version "3.4.0")
7448 (source
7449 (origin
7450 (method url-fetch)
7451 (uri (pypi-uri "pythondialog" version))
7452 (sha256
7453 (base32
7454 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7455 (build-system python-build-system)
7456 (arguments
7457 `(#:phases
7458 (modify-phases %standard-phases
7459 (add-after 'unpack 'patch-path
7460 (lambda* (#:key inputs #:allow-other-keys)
7461 (let* ((dialog (assoc-ref inputs "dialog")))
7462 ;; Since this library really wants to grovel the search path, we
7463 ;; must hardcode dialog's store path into it.
7464 (substitute* "dialog.py"
7465 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7466 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7467 #t))))
7468 #:tests? #f)) ; no test suite
7469 (propagated-inputs
7470 `(("dialog" ,dialog)))
7471 (home-page "http://pythondialog.sourceforge.net/")
7472 (synopsis "Python interface to the UNIX dialog utility")
7473 (description "A Python wrapper for the dialog utility. Its purpose is to
7474 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7475 This allows one to make simple text-mode user interfaces on Unix-like systems")
7476 (license license:lgpl2.1)
7477 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7478
7479 (define-public python2-pythondialog
7480 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7481 (package
7482 (inherit base)
7483 (version (package-version python-pythondialog))
7484 (source (origin
7485 (method url-fetch)
7486 (uri (pypi-uri "python2-pythondialog" version))
7487 (sha256
7488 (base32
7489 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7490
7491 (define-public python-pyrfc3339
7492 (package
7493 (name "python-pyrfc3339")
7494 (version "1.0")
7495 (source
7496 (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "pyRFC3339" version))
7499 (sha256
7500 (base32
7501 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7502 (build-system python-build-system)
7503 (propagated-inputs
7504 `(("python-pytz" ,python-pytz)))
7505 (native-inputs
7506 `(("python-nose" ,python-nose)))
7507 (home-page "https://github.com/kurtraschke/pyRFC3339")
7508 (synopsis "Python timestamp library")
7509 (description "Python library for generating and parsing RFC 3339-compliant
7510 timestamps.")
7511 (license license:expat)))
7512
7513 (define-public python2-pyrfc3339
7514 (package-with-python2 python-pyrfc3339))
7515
7516 (define-public python-werkzeug
7517 (package
7518 (name "python-werkzeug")
7519 (version "0.11.11")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "Werkzeug" version))
7524 (sha256
7525 (base32
7526 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7527 (build-system python-build-system)
7528 (native-inputs
7529 `(("python-pytest" ,python-pytest)))
7530 (home-page "http://werkzeug.pocoo.org/")
7531 (synopsis "Utilities for WSGI applications")
7532 (description "One of the most advanced WSGI utility modules. It includes a
7533 powerful debugger, full-featured request and response objects, HTTP utilities to
7534 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7535 uploads, a powerful URL routing system and a bunch of community-contributed
7536 addon modules.")
7537 (license license:x11)))
7538
7539 (define-public python2-werkzeug
7540 (package-with-python2 python-werkzeug))
7541
7542 (define-public python-configobj
7543 (package
7544 (name "python-configobj")
7545 (version "5.0.6")
7546 (source (origin
7547 (method url-fetch)
7548 (uri (string-append
7549 "https://pypi.python.org/packages/source/c/configobj/"
7550 "configobj-" version ".tar.gz"))
7551 (sha256
7552 (base32
7553 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7554 ;; Patch setup.py so it looks for python-setuptools, which is
7555 ;; required to parse the keyword 'install_requires' in setup.py.
7556 (patches (search-patches "python-configobj-setuptools.patch"))))
7557 (build-system python-build-system)
7558 (native-inputs
7559 `(("python-six" ,python-six)))
7560 (synopsis "Config file reading, writing and validation")
7561 (description "ConfigObj is a simple but powerful config file reader and
7562 writer: an ini file round tripper. Its main feature is that it is very easy to
7563 use, with a straightforward programmer’s interface and a simple syntax for
7564 config files.")
7565 (home-page "https://github.com/DiffSK/configobj")
7566 (license license:bsd-3)))
7567
7568 (define-public python2-configobj
7569 (package-with-python2 python-configobj))
7570
7571 (define-public python-configargparse
7572 (package
7573 (name "python-configargparse")
7574 (version "0.10.0")
7575 (source (origin
7576 (method url-fetch)
7577 (uri (string-append
7578 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7579 "ConfigArgParse-" version ".tar.gz"))
7580 (sha256
7581 (base32
7582 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7583 (build-system python-build-system)
7584 (arguments
7585 ;; FIXME: Bug in test suite filed upstream:
7586 ;; https://github.com/bw2/ConfigArgParse/issues/32
7587 '(#:tests? #f))
7588 (synopsis "Replacement for argparse")
7589 (description "A drop-in replacement for argparse that allows options to also
7590 be set via config files and/or environment variables.")
7591 (home-page "https://github.com/bw2/ConfigArgParse")
7592 (license license:expat)))
7593
7594 (define-public python2-configargparse
7595 (package-with-python2 python-configargparse))
7596
7597 (define-public python-ndg-httpsclient
7598 (package
7599 (name "python-ndg-httpsclient")
7600 (version "0.4.0")
7601 (source (origin
7602 (method url-fetch)
7603 (uri (string-append
7604 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7605 "ndg_httpsclient-" version ".tar.gz"))
7606 (sha256
7607 (base32
7608 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7609 (build-system python-build-system)
7610 (arguments
7611 '(;; The tests appear to require networking.
7612 #:tests? #f))
7613 (propagated-inputs
7614 `(("python-pyopenssl" ,python-pyopenssl)))
7615 (synopsis "HTTPS support for Python's httplib and urllib2")
7616 (description "This is a HTTPS client implementation for httplib and urllib2
7617 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7618 over the default provided with Python and importantly enables full verification
7619 of the SSL peer.")
7620 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7621 (license license:bsd-3)))
7622
7623 ;; python2-openssl requires special care, so package-with-python2 is
7624 ;; insufficient.
7625 (define-public python2-ndg-httpsclient
7626 (package (inherit python-ndg-httpsclient)
7627 (name "python2-ndg-httpsclient")
7628 (arguments `(#:python ,python-2))
7629 (propagated-inputs
7630 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7631
7632 (define-public python-contextlib2
7633 (package
7634 (name "python-contextlib2")
7635 (version "0.4.0")
7636 (source
7637 (origin
7638 (method url-fetch)
7639 (uri (pypi-uri "contextlib2" version))
7640 (sha256
7641 (base32
7642 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7643 (build-system python-build-system)
7644 (arguments
7645 `(#:phases
7646 (modify-phases %standard-phases
7647 (replace 'check
7648 (lambda _ (zero?
7649 (system*
7650 "python" "test_contextlib2.py" "-v")))))))
7651 (home-page "http://contextlib2.readthedocs.org/")
7652 (synopsis "Tools for decorators and context managers")
7653 (description "This module is primarily a backport of the Python
7654 3.2 contextlib to earlier Python versions. Like contextlib, it
7655 provides utilities for common tasks involving decorators and context
7656 managers. It also contains additional features that are not part of
7657 the standard library.")
7658 (license license:psfl)))
7659
7660 (define-public python2-contextlib2
7661 (package-with-python2 python-contextlib2))
7662
7663 (define-public python-texttable
7664 (package
7665 (name "python-texttable")
7666 (version "0.8.4")
7667 (source
7668 (origin
7669 (method url-fetch)
7670 (uri (pypi-uri "texttable" version))
7671 (sha256
7672 (base32
7673 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7674 (build-system python-build-system)
7675 (arguments '(#:tests? #f)) ; no tests
7676 (home-page "https://github.com/foutaise/texttable/")
7677 (synopsis "Python module for creating simple ASCII tables")
7678 (description "Texttable is a Python module for creating simple ASCII
7679 tables.")
7680 (license license:lgpl2.1+)))
7681
7682 (define-public python2-texttable
7683 (package-with-python2 python-texttable))
7684
7685 (define-public python-websocket-client
7686 (package
7687 (name "python-websocket-client")
7688 (version "0.37.0")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "websocket_client" version))
7693 (sha256
7694 (base32
7695 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7696 (build-system python-build-system)
7697 (native-inputs
7698 `(("python-six" ,python-six))) ; for tests
7699 (home-page "https://github.com/liris/websocket-client")
7700 (synopsis "WebSocket client for Python")
7701 (description "The Websocket-client module provides the low level APIs for
7702 WebSocket usage in Python programs.")
7703 (license license:lgpl2.1+)))
7704
7705 (define-public python2-websocket-client
7706 (package-with-python2 python-websocket-client))
7707
7708 (define-public python-atomicwrites
7709 (package
7710 (name "python-atomicwrites")
7711 (version "1.1.0")
7712 (source (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "atomicwrites" version))
7715 (sha256
7716 (base32
7717 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7718 (build-system python-build-system)
7719 (synopsis "Atomic file writes in Python")
7720 (description "Library for atomic file writes using platform dependent tools
7721 for atomic file system operations.")
7722 (home-page "https://github.com/untitaker/python-atomicwrites")
7723 (license license:expat)
7724 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7725
7726 (define-public python2-atomicwrites
7727 (package (inherit (package-with-python2
7728 (strip-python2-variant python-atomicwrites)))
7729 (native-inputs
7730 `(("python2-setuptools" ,python2-setuptools)))))
7731
7732 (define-public python-requests-toolbelt
7733 (package
7734 (name "python-requests-toolbelt")
7735 (version "0.6.2")
7736 (source (origin
7737 (method url-fetch)
7738 (uri (string-append
7739 "https://pypi.python.org/packages/"
7740 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7741 "requests-toolbelt-" version ".tar.gz"))
7742 (sha256
7743 (base32
7744 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7745 (build-system python-build-system)
7746 (native-inputs
7747 `(("python-betamax" ,python-betamax)
7748 ("python-mock" ,python-mock)
7749 ("python-pytest" ,python-pytest)))
7750 (propagated-inputs
7751 `(("python-requests" ,python-requests)))
7752 (synopsis "Extensions to python-requests")
7753 (description "This is a toolbelt of useful classes and functions to be used
7754 with python-requests.")
7755 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7756 (license license:asl2.0)))
7757
7758 (define-public python-click-threading
7759 (package
7760 (name "python-click-threading")
7761 (version "0.2.0")
7762 (source (origin
7763 (method url-fetch)
7764 (uri (string-append
7765 "https://pypi.python.org/packages/"
7766 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7767 "click-threading-" version ".tar.gz"))
7768 (sha256
7769 (base32
7770 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7771 (build-system python-build-system)
7772 (propagated-inputs
7773 `(("python-click" ,python-click)))
7774 (synopsis "Utilities for multithreading in Click")
7775 (description "This package provides utilities for multithreading in Click
7776 applications.")
7777 (home-page "https://github.com/click-contrib/click-threading")
7778 (license license:expat)))
7779
7780 (define-public python-click-log
7781 (package
7782 (name "python-click-log")
7783 (version "0.1.3")
7784 (source (origin
7785 (method url-fetch)
7786 (uri (pypi-uri "click-log" version))
7787 (sha256
7788 (base32
7789 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7790 (build-system python-build-system)
7791 (propagated-inputs
7792 `(("python-click" ,python-click)))
7793 (synopsis "Logging for click applications")
7794 (description "This package provides a Python library for logging Click
7795 applications.")
7796 (home-page "https://github.com/click-contrib/click-log")
7797 (license license:expat)))
7798
7799 (define-public python-apipkg
7800 (package
7801 (name "python-apipkg")
7802 (version "1.4")
7803 (source (origin
7804 (method url-fetch)
7805 (uri (pypi-uri "apipkg" version))
7806 (sha256
7807 (base32
7808 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7809 (build-system python-build-system)
7810 (inputs
7811 `(("python-pytest" ,python-pytest)))
7812 (synopsis "Namespace control and lazy-import mechanism")
7813 (description "With apipkg you can control the exported namespace of a Python
7814 package and greatly reduce the number of imports for your users. It is a small
7815 pure Python module that works on virtually all Python versions.")
7816 (home-page "https://bitbucket.org/hpk42/apipkg")
7817 (license license:expat)
7818 (properties `((python2-variant . ,(delay python2-apipkg))))))
7819
7820 (define-public python2-apipkg
7821 (package
7822 (inherit (package-with-python2
7823 (strip-python2-variant python-apipkg)))
7824 (native-inputs
7825 `(("python2-setuptools" ,python2-setuptools)))))
7826
7827 (define-public python-execnet
7828 (package
7829 (name "python-execnet")
7830 (version "1.4.1")
7831 (source (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "execnet" version))
7834 (sha256
7835 (base32
7836 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7837 (build-system python-build-system)
7838 (arguments
7839 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7840 ;; The two test failures are caused by the lack of an `ssh` executable.
7841 ;; The test suite can be run with pytest after the 'install' phase.
7842 #:tests? #f))
7843 (native-inputs
7844 `(("python-pytest" ,python-pytest)
7845 ("python-setuptools-scm" ,python-setuptools-scm)))
7846 (inputs
7847 `(("python-apipkg" ,python-apipkg)))
7848 (synopsis "Rapid multi-Python deployment")
7849 (description "Execnet provides a share-nothing model with
7850 channel-send/receive communication for distributing execution across many
7851 Python interpreters across version, platform and network barriers. It has a
7852 minimal and fast API targetting the following uses:
7853 @enumerate
7854 @item distribute tasks to (many) local or remote CPUs
7855 @item write and deploy hybrid multi-process applications
7856 @item write scripts to administer multiple environments
7857 @end enumerate")
7858 (home-page "http://codespeak.net/execnet/")
7859 (license license:expat)
7860 (properties `((python2-variant . ,(delay python2-execnet))))))
7861
7862 (define-public python2-execnet
7863 (let ((execnet (package-with-python2
7864 (strip-python2-variant python-execnet))))
7865 (package
7866 (inherit execnet)
7867 (native-inputs
7868 `(("python2-setuptools" ,python2-setuptools)
7869 ,@(package-native-inputs execnet))))))
7870
7871 ;;; The software provided by this package was integrated into pytest 2.8.
7872 (define-public python-pytest-cache
7873 (package
7874 (name "python-pytest-cache")
7875 (version "1.0")
7876 (source (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "pytest-cache" version))
7879 (sha256
7880 (base32
7881 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7882 (build-system python-build-system)
7883 (inputs
7884 `(("python-apipkg" ,python-apipkg)
7885 ("python-execnet" ,python-execnet)
7886 ("python-py" ,python-py)
7887 ("python-pytest" ,python-pytest)))
7888 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7889 (description "The pytest-cache plugin provides tools to rerun failures from
7890 the last py.test invocation.")
7891 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7892 (license license:expat)
7893 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7894
7895 (define-public python2-pytest-cache
7896 (let ((pytest-cache (package-with-python2
7897 (strip-python2-variant python-pytest-cache))))
7898 (package
7899 (inherit pytest-cache)
7900 (native-inputs
7901 `(("python2-setuptools" ,python2-setuptools)
7902 ,@(package-native-inputs pytest-cache))))))
7903
7904 (define-public python-pytest-localserver
7905 (package
7906 (name "python-pytest-localserver")
7907 (version "0.3.5")
7908 (source (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "pytest-localserver" version))
7911 (sha256
7912 (base32
7913 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7914 (build-system python-build-system)
7915 (arguments
7916 `(#:phases (modify-phases %standard-phases
7917 (replace 'check
7918 (lambda _
7919 (zero? (system* "py.test" "--genscript=runtests.py"))
7920 (zero? (system* "py.test")))))))
7921 (native-inputs
7922 `(("python-pytest" ,python-pytest)
7923 ("python-requests" ,python-requests)
7924 ("python-six" ,python-six)))
7925 (inputs
7926 `(("python-werkzeug" ,python-werkzeug)))
7927 (synopsis "Py.test plugin to test server connections locally")
7928 (description "Pytest-localserver is a plugin for the pytest testing
7929 framework which enables you to test server connections locally.")
7930 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7931 (license license:expat)))
7932
7933 (define-public python-wsgi-intercept
7934 (package
7935 (name "python-wsgi-intercept")
7936 (version "1.2.2")
7937 (source (origin
7938 (method url-fetch)
7939 (uri (string-append
7940 "https://pypi.python.org/packages/"
7941 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7942 "wsgi_intercept-" version ".tar.gz"))
7943 (sha256
7944 (base32
7945 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7946 (build-system python-build-system)
7947 (native-inputs
7948 `(("python-pytest" ,python-pytest)
7949 ("python-six" ,python-six)
7950 ("python-urllib3" ,python-urllib3)))
7951 (propagated-inputs
7952 `(("python-httplib2" ,python-httplib2)
7953 ("python-requests" ,python-requests)))
7954 (synopsis "Puts a WSGI application in place of a real URI for testing")
7955 (description "Wsgi_intercept installs a WSGI application in place of a real
7956 URI for testing. Testing a WSGI application normally involves starting a
7957 server at a local host and port, then pointing your test code to that address.
7958 Instead, this library lets you intercept calls to any specific host/port
7959 combination and redirect them into a WSGI application importable by your test
7960 program. Thus, you can avoid spawning multiple processes or threads to test
7961 your Web app.")
7962 (home-page "https://github.com/cdent/wsgi-intercept")
7963 (license license:expat)))
7964
7965 (define-public python-pytest-xprocess
7966 (package
7967 (name "python-pytest-xprocess")
7968 (version "0.9.1")
7969 (source (origin
7970 (method url-fetch)
7971 (uri (pypi-uri "pytest-xprocess" version))
7972 (sha256
7973 (base32
7974 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7975 (build-system python-build-system)
7976 (propagated-inputs
7977 `(("python-pytest" ,python-pytest)
7978 ("python-pytest-cache" ,python-pytest-cache)
7979 ("python-psutil" ,python-psutil)))
7980 (synopsis "Pytest plugin to manage external processes across test runs")
7981 (description "Pytest-xprocess is an experimental py.test plugin for managing
7982 processes across test runs.")
7983 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7984 (license license:expat)))
7985
7986 (define-public python-icalendar
7987 (package
7988 (name "python-icalendar")
7989 (version "3.10")
7990 (source (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "icalendar" version))
7993 (sha256
7994 (base32
7995 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7996 (build-system python-build-system)
7997 (propagated-inputs
7998 `(("python-dateutil-2" ,python-dateutil-2)
7999 ("python-pytz" ,python-pytz)))
8000 (synopsis "Python library for parsing iCalendar files")
8001 (description "The icalendar package is a parser/generator of iCalendar
8002 files for use with Python.")
8003 (home-page "https://github.com/collective/icalendar")
8004 (license license:bsd-2)))
8005
8006 (define-public python-sphinxcontrib-newsfeed
8007 (package
8008 (name "python-sphinxcontrib-newsfeed")
8009 (version "0.1.4")
8010 (source (origin
8011 (method url-fetch)
8012 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8013 (sha256
8014 (base32
8015 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8016 (build-system python-build-system)
8017 (propagated-inputs
8018 `(("python-docutils" ,python-docutils)
8019 ("python-sphinx" ,python-sphinx)))
8020 (synopsis "News Feed extension for Sphinx")
8021 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8022 Blog, News or Announcements section to a Sphinx website.")
8023 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8024 (license license:bsd-2)))
8025
8026 (define-public python-args
8027 (package
8028 (name "python-args")
8029 (version "0.1.0")
8030 (source (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "args" version))
8033 (sha256
8034 (base32
8035 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8036 (build-system python-build-system)
8037 (home-page "https://github.com/kennethreitz/args")
8038 (synopsis "Command-line argument parser")
8039 (description
8040 "This library provides a Python module to parse command-line arguments.")
8041 (license license:bsd-3)))
8042
8043 (define-public python2-args
8044 (package-with-python2 python-args))
8045
8046 (define-public python-clint
8047 (package
8048 (name "python-clint")
8049 (version "0.5.1")
8050 (source (origin
8051 (method url-fetch)
8052 (uri (pypi-uri "clint" version))
8053 (sha256
8054 (base32
8055 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8056 (build-system python-build-system)
8057 (inputs
8058 `(("python-args" ,python-args)))
8059 (home-page "https://github.com/kennethreitz/clint")
8060 (synopsis "Command-line interface tools")
8061 (description
8062 "Clint is a Python module filled with a set of tools for developing
8063 command-line applications, including tools for colored and indented
8064 output, progress bar display, and pipes.")
8065 (license license:isc)))
8066
8067 (define-public python2-clint
8068 (package-with-python2 python-clint))
8069
8070 (define-public python-astor
8071 (package
8072 (name "python-astor")
8073 (version "0.5")
8074 (source (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "astor" version))
8077 (sha256
8078 (base32
8079 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8080 (build-system python-build-system)
8081 (home-page "https://github.com/berkerpeksag/astor")
8082 (synopsis "Read and write Python ASTs")
8083 (description
8084 "Astor is designed to allow easy manipulation of Python source via the
8085 Abstract Syntax Tree.")
8086 (license license:bsd-3)))
8087
8088 (define-public python2-astor
8089 (package-with-python2 python-astor))
8090
8091 (define-public python-rply
8092 (package
8093 (name "python-rply")
8094 (version "0.7.4")
8095 (source (origin
8096 (method url-fetch)
8097 (uri (pypi-uri "rply" version))
8098 (sha256
8099 (base32
8100 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8101 (build-system python-build-system)
8102 (inputs
8103 `(("python-appdirs" ,python-appdirs)))
8104 (home-page "https://github.com/alex/rply")
8105 (synopsis "Parser generator for Python")
8106 (description
8107 "This package provides a pure Python based parser generator, that also
8108 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8109 with a new public API, and RPython support.")
8110 (license license:bsd-3)))
8111
8112 (define-public python2-rply
8113 (package-with-python2 python-rply))
8114
8115 (define-public python-hy
8116 (package
8117 (name "python-hy")
8118 (version "0.11.1")
8119 (source (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "hy" version))
8122 (sha256
8123 (base32
8124 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8125 (build-system python-build-system)
8126 (inputs
8127 `(("python-astor" ,python-astor)
8128 ("python-clint" ,python-clint)
8129 ("python-rply" ,python-rply)))
8130 (home-page "http://hylang.org/")
8131 (synopsis "Lisp frontend to Python")
8132 (description
8133 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8134 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8135 Python at your fingertips, in Lisp form.")
8136 (license license:expat)))
8137
8138 (define-public python2-hy
8139 (package-with-python2 python-hy))
8140
8141 (define-public python-rauth
8142 (package
8143 (name "python-rauth")
8144 (version "0.7.2")
8145 (source
8146 (origin
8147 (method url-fetch)
8148 (uri (pypi-uri "rauth" version))
8149 (sha256
8150 (base32
8151 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8152 (build-system python-build-system)
8153 (arguments
8154 `(#:test-target "check"))
8155 (inputs
8156 `(("python-requests" ,python-requests)))
8157 (home-page "https://github.com/litl/rauth")
8158 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8159 (description
8160 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8161 provides service wrappers for convenient connection initialization and
8162 authenticated session objects providing things like keep-alive.")
8163 (license license:expat)
8164 (properties `((python2-variant . ,(delay python2-rauth))))))
8165
8166 (define-public python2-rauth
8167 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8168 (package
8169 (inherit base)
8170 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8171 ("python2-unittest2" ,python2-unittest2)
8172 ,@(package-native-inputs base))))))
8173
8174 (define-public python2-functools32
8175 (package
8176 (name "python2-functools32")
8177 (version "3.2.3-2")
8178 (source
8179 (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "functools32" version))
8182 (sha256
8183 (base32
8184 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8185 (build-system python-build-system)
8186 (arguments
8187 `(#:python ,python-2
8188 #:tests? #f)) ; no test target
8189 (home-page "https://github.com/MiCHiLU/python-functools32")
8190 (synopsis
8191 "Backport of the functools module from Python 3.2.3")
8192 (description
8193 "This package is a backport of the @code{functools} module from Python
8194 3.2.3 for use with older versions of Python and PyPy.")
8195 (license license:expat)))
8196
8197 (define-public python2-futures
8198 (package
8199 (name "python2-futures")
8200 (version "3.0.3")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "futures" version))
8205 (sha256
8206 (base32
8207 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8208 (build-system python-build-system)
8209 (arguments `(#:python ,python-2))
8210 (home-page "https://github.com/agronholm/pythonfutures")
8211 (synopsis
8212 "Backport of the concurrent.futures package from Python 3.2")
8213 (description
8214 "The concurrent.futures module provides a high-level interface for
8215 asynchronously executing callables. This package backports the
8216 concurrent.futures package from Python 3.2")
8217 (license license:bsd-3)))
8218
8219 (define-public python-promise
8220 (package
8221 (name "python-promise")
8222 (version "0.4.2")
8223 (source
8224 (origin
8225 (method url-fetch)
8226 (uri (pypi-uri "promise" version))
8227 (sha256
8228 (base32
8229 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8230 (build-system python-build-system)
8231 ;; Tests wants python-futures, which is a python2 only program, and
8232 ;; can't be found by python-promise at test time.
8233 (arguments `(#:tests? #f))
8234 (home-page "https://github.com/syrusakbary/promise")
8235 (synopsis "Promises/A+ implementation for Python")
8236 (description
8237 "Promises/A+ implementation for Python")
8238 (properties `((python2-variant . ,(delay python2-promise))))
8239 (license license:expat)))
8240
8241 (define-public python2-promise
8242 (let ((promise (package-with-python2
8243 (strip-python2-variant python-promise))))
8244 (package (inherit promise)
8245 (arguments (substitute-keyword-arguments (package-arguments promise)
8246 ((#:tests? _) #t)))
8247 (native-inputs
8248 `(("python2-futures" ,python2-futures)
8249 ("python2-pytest" ,python2-pytest)
8250 ,@(package-native-inputs promise))))))
8251
8252 (define-public python-urllib3
8253 (package
8254 (name "python-urllib3")
8255 (version "1.18.1")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "urllib3" version))
8260 (sha256
8261 (base32
8262 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8263 (build-system python-build-system)
8264 (arguments `(#:tests? #f))
8265 (native-inputs
8266 `(;; some packages for tests
8267 ("python-nose" ,python-nose)
8268 ("python-mock" ,python-mock)
8269 ("python-tornado" ,python-tornado)))
8270 (propagated-inputs
8271 `(;; packages for https security
8272 ("python-certifi" ,python-certifi)
8273 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8274 ("python-pyasn1" ,python-pyasn1)
8275 ("python-pyopenssl" ,python-pyopenssl)))
8276 (home-page "https://urllib3.readthedocs.org/")
8277 (synopsis "HTTP library with thread-safe connection pooling")
8278 (description
8279 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8280 can reuse the same socket connection for multiple requests, it can POST files,
8281 supports url redirection and retries, and also gzip and deflate decoding.")
8282 (license license:expat)))
8283
8284 (define-public python2-urllib3
8285 (package-with-python2 python-urllib3))
8286
8287 (define-public python-colorama
8288 (package
8289 (name "python-colorama")
8290 (version "0.3.3")
8291 (source
8292 (origin
8293 (method url-fetch)
8294 (uri (pypi-uri "colorama" version))
8295 (sha256
8296 (base32
8297 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8298 (build-system python-build-system)
8299 (synopsis "colored terminal text rendering for Python")
8300 (description "Colorama is a Python library for rendering colored terminal
8301 text.")
8302 (home-page "https://pypi.python.org/pypi/colorama")
8303 (license license:bsd-3)))
8304
8305 (define-public python2-colorama
8306 (package-with-python2 python-colorama))
8307
8308 (define-public python-rsa
8309 (package
8310 (name "python-rsa")
8311 (version "3.4.2")
8312 (source
8313 (origin
8314 (method url-fetch)
8315 (uri (pypi-uri "rsa" version))
8316 (sha256
8317 (base32
8318 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8319 (build-system python-build-system)
8320 (inputs
8321 `(("python-pyasn1" ,python-pyasn1)))
8322 (synopsis "Pure-Python RSA implementation")
8323 (description "Python-RSA is a pure-Python RSA implementation. It supports
8324 encryption and decryption, signing and verifying signatures, and key
8325 generation according to PKCS#1 version 1.5. It can be used as a Python
8326 library as well as on the command line.")
8327 (home-page "http://stuvel.eu/rsa")
8328 (license license:asl2.0)))
8329
8330 (define-public python2-rsa
8331 (package-with-python2 python-rsa))
8332
8333 (define-public python-pluggy
8334 (package
8335 (name "python-pluggy")
8336 (version "0.3.1")
8337 (source
8338 (origin
8339 (method url-fetch)
8340 (uri (pypi-uri "pluggy" version))
8341 (sha256
8342 (base32
8343 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8344 (build-system python-build-system)
8345 (synopsis "Plugin and hook calling mechanism for Python")
8346 (description "Pluggy is an extraction of the plugin manager as used by
8347 Pytest but stripped of Pytest specific details.")
8348 (home-page "https://pypi.python.org/pypi/pluggy")
8349 (license license:expat)))
8350
8351 (define-public python2-pluggy
8352 (package-with-python2 python-pluggy))
8353
8354 (define-public python-tox
8355 (package
8356 (name "python-tox")
8357 (version "2.3.1")
8358 (source
8359 (origin
8360 (method url-fetch)
8361 (uri (pypi-uri "tox" version))
8362 (sha256
8363 (base32
8364 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8365 (build-system python-build-system)
8366 (arguments
8367 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8368 ;; pytest breaks other packages.
8369 '(#:tests? #f))
8370 (inputs
8371 `(("python-pluggy" ,python-pluggy)
8372 ("python-py" ,python-py)
8373 ("python-virtualenv" ,python-virtualenv)
8374 ("python-pytest" ,python-pytest)))
8375 (home-page "http://tox.testrun.org/")
8376 (synopsis "Virtualenv-based automation of test activities")
8377 (description "Tox is a generic virtualenv management and test command line
8378 tool. It can be used to check that a package installs correctly with
8379 different Python versions and interpreters, or run tests in each type of
8380 supported environment, or act as a frontend to continuous integration
8381 servers.")
8382 (license license:expat)))
8383
8384 (define-public python2-tox
8385 (package-with-python2 python-tox))
8386
8387 (define-public python-jmespath
8388 (package
8389 (name "python-jmespath")
8390 (version "0.9.0")
8391 (source
8392 (origin
8393 (method url-fetch)
8394 (uri (pypi-uri "jmespath" version))
8395 (sha256
8396 (base32
8397 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8398 (build-system python-build-system)
8399 (synopsis "JSON Matching Expressions")
8400 (description "JMESPath (pronounced “james path”) is a Python library that
8401 allows one to declaratively specify how to extract elements from a JSON
8402 document.")
8403 (home-page "https://github.com/jmespath/jmespath.py")
8404 (license license:expat)))
8405
8406 (define-public python2-jmespath
8407 (package-with-python2 python-jmespath))
8408
8409 (define-public python-botocore
8410 (package
8411 (name "python-botocore")
8412 (version "1.4.62")
8413 (source
8414 (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "botocore" version))
8417 (sha256
8418 (base32
8419 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8420 (build-system python-build-system)
8421 (inputs
8422 `(("python-dateutil" ,python-dateutil-2)
8423 ("python-docutils" ,python-docutils)
8424 ("python-mock" ,python-mock)
8425 ("python-nose" ,python-nose)
8426 ("python-tox" ,python-tox)
8427 ("python-wheel" ,python-wheel)
8428 ("python-jmespath" ,python-jmespath)))
8429 (home-page "https://github.com/boto/botocore")
8430 (synopsis "Low-level interface to AWS")
8431 (description "Botocore is a Python library that provides a low-level
8432 interface to the Amazon Web Services (AWS) API.")
8433 (license license:asl2.0)))
8434
8435 (define-public python2-botocore
8436 (package-with-python2 python-botocore))
8437
8438 (define-public awscli
8439 (package
8440 (name "awscli")
8441 (version "1.11.5")
8442 (source
8443 (origin
8444 (method url-fetch)
8445 (uri (pypi-uri name version))
8446 (sha256
8447 (base32
8448 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8449 (build-system python-build-system)
8450 (inputs
8451 `(("python-colorama" ,python-colorama)
8452 ("python-docutils" ,python-docutils)
8453 ("python-mock" ,python-mock)
8454 ("python-nose" ,python-nose)
8455 ("python-rsa" ,python-rsa)
8456 ("python-sphinx" ,python-sphinx)
8457 ("python-tox" ,python-tox)
8458 ("python-wheel" ,python-wheel)
8459 ("python-botocore" ,python-botocore)
8460 ("python-s3transfer" ,python-s3transfer)))
8461 (home-page "http://aws.amazon.com/cli/")
8462 (synopsis "Command line client for AWS")
8463 (description "AWS CLI provides a unified command line interface to the
8464 Amazon Web Services (AWS) API.")
8465 (license license:asl2.0)))
8466
8467 (define-public python-hypothesis
8468 (package
8469 (name "python-hypothesis")
8470 (version "3.1.0")
8471 (source (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "hypothesis" version))
8474 (sha256
8475 (base32
8476 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8477 (build-system python-build-system)
8478 (propagated-inputs
8479 `(("python-flake8" ,python-flake8)
8480 ("python-pytest" ,python-pytest)))
8481 (synopsis "Library for property based testing")
8482 (description "Hypothesis is a library for testing your Python code against a
8483 much larger range of examples than you would ever want to write by hand. It’s
8484 based on the Haskell library, Quickcheck, and is designed to integrate
8485 seamlessly into your existing Python unit testing work flow.")
8486 (home-page "https://github.com/DRMacIver/hypothesis")
8487 (license license:mpl2.0)
8488 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8489
8490 (define-public python2-hypothesis
8491 (let ((hypothesis (package-with-python2
8492 (strip-python2-variant python-hypothesis))))
8493 (package (inherit hypothesis)
8494 (native-inputs
8495 `(("python2-enum34" ,python2-enum34))))))
8496
8497 (define-public python-pytest-subtesthack
8498 (package
8499 (name "python-pytest-subtesthack")
8500 (version "0.1.1")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "pytest-subtesthack" version))
8504 (sha256
8505 (base32
8506 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8507 (build-system python-build-system)
8508 (propagated-inputs
8509 `(("python-pytest" ,python-pytest)))
8510 (synopsis "Set-up and tear-down fixtures for unit tests")
8511 (description "This plugin allows you to set up and tear down fixtures within
8512 unit test functions that use @code{py.test}. This is useful for using
8513 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8514 function multiple times, without setting up or tearing down fixture state as is
8515 normally the case.")
8516 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8517 (license license:unlicense)))
8518
8519 (define-public python2-pytest-subtesthack
8520 (package-with-python2 python-pytest-subtesthack))
8521
8522 (define-public python2-xdo
8523 (package
8524 (name "python2-xdo")
8525 (version "0.2")
8526 (source (origin
8527 (method url-fetch)
8528 (uri (string-append
8529 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8530 "python-xdo_" version ".orig.tar.gz"))
8531 (sha256
8532 (base32
8533 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8534 (build-system python-build-system)
8535 (arguments
8536 `(#:python ,python-2
8537 #:tests? #f)) ; no tests provided
8538 (inputs
8539 `(("xdotool" ,xdotool)
8540 ("libX11" ,libx11)))
8541 (home-page "https://tracker.debian.org/pkg/python-xdo")
8542 (synopsis "Python library for simulating X11 keyboard/mouse input")
8543 (description "Provides bindings to libxdo for manipulating X11 via simulated
8544 input. (Note that this is mostly a legacy library; you may wish to look at
8545 python-xdo for newer bindings.)")
8546 (license license:bsd-3)))
8547
8548 (define-public python-wtforms
8549 (package
8550 (name "python-wtforms")
8551 (version "2.1")
8552 (source
8553 (origin
8554 (method url-fetch)
8555 (uri (pypi-uri "WTForms" version ".zip"))
8556 (sha256
8557 (base32
8558 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8559 (build-system python-build-system)
8560 (arguments
8561 '(#:phases
8562 (modify-phases %standard-phases
8563 (add-after 'unpack 'remove-django-test
8564 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8565 (lambda _
8566 (substitute*
8567 "tests/runtests.py"
8568 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8569 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8570 #t)))))
8571 (native-inputs
8572 `(("unzip" ,unzip)))
8573 (home-page "http://wtforms.simplecodes.com/")
8574 (synopsis
8575 "Form validation and rendering library for Python web development")
8576 (description
8577 "WTForms is a flexible forms validation and rendering library
8578 for Python web development. It is very similar to the web form API
8579 available in Django, but is a standalone package.")
8580 (license license:bsd-3)
8581 (properties `((python2-variant . ,(delay python2-wtforms))))))
8582
8583 (define-public python2-wtforms
8584 (package
8585 (inherit (package-with-python2
8586 (strip-python2-variant python-wtforms)))
8587 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8588
8589 (define-public python-mako
8590 (package
8591 (name "python-mako")
8592 (version "1.0.3")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "Mako" version))
8597 (sha256
8598 (base32
8599 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8600 (build-system python-build-system)
8601 (native-inputs
8602 `(("python-markupsafe" ,python-markupsafe)
8603 ("python-mock" ,python-mock)
8604 ("python-nose" ,python-nose)))
8605 (home-page "http://www.makotemplates.org/")
8606 (synopsis "Templating language for Python")
8607 (description "Mako is a templating language for Python that compiles
8608 templates into Python modules.")
8609 (license license:expat)
8610 (properties `((python2-variant . ,(delay python2-mako))))))
8611
8612 (define-public python2-mako
8613 (let ((base (package-with-python2
8614 (strip-python2-variant python-mako))))
8615 (package
8616 (inherit base)
8617 (native-inputs
8618 (cons `("python2-setuptools" ,python2-setuptools)
8619 (package-native-inputs base))))))
8620
8621 (define-public python-waitress
8622 (package
8623 (name "python-waitress")
8624 (version "0.8.10")
8625 (source
8626 (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "waitress" version))
8629 (sha256
8630 (base32
8631 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8632 (build-system python-build-system)
8633 (home-page "https://github.com/Pylons/waitress")
8634 (synopsis "Waitress WSGI server")
8635 (description "Waitress is meant to be a production-quality pure-Python WSGI
8636 server with very acceptable performance.")
8637 (license license:zpl2.1)
8638 (properties `((python2-variant . ,(delay python2-waitress))))))
8639
8640 (define-public python2-waitress
8641 (package
8642 (inherit (package-with-python2
8643 (strip-python2-variant python-waitress)))
8644 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8645
8646 (define-public python-wsgiproxy2
8647 (package
8648 (name "python-wsgiproxy2")
8649 (version "0.4.2")
8650 (source
8651 (origin
8652 (method url-fetch)
8653 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8654 (sha256
8655 (base32
8656 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8657 (build-system python-build-system)
8658 (arguments
8659 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8660 ;; support Python 3:
8661 ;; https://github.com/benoitc/restkit/issues/140
8662 #:tests? #f))
8663 (native-inputs
8664 `(("unzip" ,unzip)
8665 ("python-nose" ,python-nose)
8666 ("python-coverage" ,python-coverage)))
8667 (propagated-inputs
8668 `(("python-six" ,python-six)
8669 ("python-webob" ,python-webob)))
8670 (home-page
8671 "https://github.com/gawel/WSGIProxy2/")
8672 (synopsis "WSGI Proxy with various http client backends")
8673 (description "WSGI turns HTTP requests into WSGI function calls.
8674 WSGIProxy turns WSGI function calls into HTTP requests.
8675 It also includes code to sign requests and pass private data,
8676 and to spawn subprocesses to handle requests.")
8677 (license license:expat)
8678 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8679
8680 (define-public python2-wsgiproxy2
8681 (let ((wsgiproxy2 (package-with-python2
8682 (strip-python2-variant python-wsgiproxy2))))
8683 (package
8684 (inherit wsgiproxy2)
8685 (inputs `(("python2-setuptools" ,python2-setuptools)
8686 ,@(package-inputs wsgiproxy2))))))
8687
8688 (define-public python-pastedeploy
8689 (package
8690 (name "python-pastedeploy")
8691 (version "1.5.2")
8692 (source
8693 (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "PasteDeploy" version))
8696 (sha256
8697 (base32
8698 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8699 (build-system python-build-system)
8700 (native-inputs
8701 `(("python-nose" ,python-nose)))
8702 ;; Note: setuptools used at runtime for pkg_resources
8703 (home-page "http://pythonpaste.org/deploy/")
8704 (synopsis
8705 "Load, configure, and compose WSGI applications and servers")
8706 (description
8707 "This tool provides code to load WSGI applications and servers from URIs;
8708 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8709 Script provides commands to serve applications based on this configuration
8710 file.")
8711 (license license:expat)))
8712
8713 (define-public python2-pastedeploy
8714 (package-with-python2 python-pastedeploy))
8715
8716 (define-public python-paste
8717 (package
8718 (name "python-paste")
8719 (version "2.0.2")
8720 (source
8721 (origin
8722 (method url-fetch)
8723 (uri (pypi-uri "Paste" version))
8724 (sha256
8725 (base32
8726 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8727 (patches (search-patches "python-paste-remove-website-test.patch"
8728 "python-paste-remove-timing-test.patch"))))
8729 (build-system python-build-system)
8730 (native-inputs
8731 `(("python-nose" ,python-nose)))
8732 ;; Note: setuptools used at runtime for pkg_resources
8733 (propagated-inputs
8734 `(("python-six" ,python-six)))
8735 (arguments
8736 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8737 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8738 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8739 ;; still... things should be better by the next Paste release.)
8740 #:tests? #f))
8741 (home-page "http://pythonpaste.org")
8742 (synopsis
8743 "Python web development tools, focusing on WSGI")
8744 (description
8745 "Paste provides a variety of web development tools and middleware which
8746 can be nested together to build web applications. Paste's design closely
8747 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8748 (license license:expat)
8749 (properties `((python2-variant . ,(delay python2-paste))))))
8750
8751 (define-public python2-paste
8752 (let ((paste (package-with-python2
8753 (strip-python2-variant python-paste))))
8754 (package
8755 (inherit paste)
8756 (arguments
8757 ;; Tests are back for Python 2!
8758 `(#:tests? #t
8759 ,@(package-arguments paste))))))
8760
8761 (define-public python-pastescript
8762 (package
8763 (name "python-pastescript")
8764 (version "2.0.2")
8765 (source
8766 (origin
8767 (method url-fetch)
8768 (uri (pypi-uri "PasteScript" version))
8769 (sha256
8770 (base32
8771 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8772 (build-system python-build-system)
8773 (native-inputs
8774 `(("python-nose" ,python-nose)))
8775 ;; Note: setuptools used at runtime for pkg_resources
8776 (propagated-inputs
8777 `(("python-paste" ,python-paste)
8778 ("python-pastedeploy" ,python-pastedeploy)))
8779 (home-page "http://pythonpaste.org/script/")
8780 (arguments
8781 '(;; Unfortunately, this requires the latest unittest2,
8782 ;; but that requires traceback2 which requires linecache2 which requires
8783 ;; unittest2. So we're skipping tests for now.
8784 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8785 ;; so in theory we could get around this situation somehow.)
8786 #:tests? #f))
8787 (synopsis
8788 "Pluggable command line tool for serving web applications and more")
8789 (description
8790 "PasteScript is a plugin-friendly command line tool which provides a
8791 variety of features, from launching web applications to bootstrapping project
8792 layouts.")
8793 (license license:expat)))
8794
8795 (define-public python2-pastescript
8796 (package-with-python2 python-pastescript))
8797
8798 (define-public python-pyquery
8799 (package
8800 (name "python-pyquery")
8801 (version "1.2.13")
8802 (source
8803 (origin
8804 (method url-fetch)
8805 (uri (pypi-uri "pyquery" version))
8806 (sha256
8807 (base32
8808 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8809 (build-system python-build-system)
8810 (native-inputs
8811 `(("python-webob" ,python-webob)
8812 ("python-webtest" ,python-webtest)))
8813 (propagated-inputs
8814 `(("python-lxml" ,python-lxml)
8815 ("python-cssselect" ,python-cssselect)))
8816 (home-page "https://github.com/gawel/pyquery")
8817 (synopsis "Make jQuery-like queries on xml documents")
8818 (description "pyquery allows you to make jQuery queries on xml documents.
8819 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8820 fast xml and html manipulation.")
8821 (license license:bsd-3)
8822 (properties `((python2-variant . ,(delay python2-pyquery))))))
8823
8824 (define-public python2-pyquery
8825 (let ((pyquery (package-with-python2
8826 (strip-python2-variant python-pyquery))))
8827 (package
8828 (inherit pyquery)
8829 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8830 ,@(package-native-inputs pyquery))))))
8831
8832 (define-public python-webtest
8833 (package
8834 (name "python-webtest")
8835 (version "2.0.20")
8836 (source
8837 (origin
8838 (method url-fetch)
8839 (uri (pypi-uri "WebTest" version))
8840 (sha256
8841 (base32
8842 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8843 (build-system python-build-system)
8844 (arguments
8845 `(;; Unfortunately we have to disable tests!
8846 ;; This release of WebTest is pinned to python-nose < 1.3,
8847 ;; but older versions of python-nose are plagued with the following
8848 ;; bug(s), which rears its ugly head during test execution:
8849 ;; https://github.com/nose-devs/nose/issues/759
8850 ;; https://github.com/nose-devs/nose/pull/811
8851 #:tests? #f))
8852 ;; Commented out code is no good, but in this case, once tests
8853 ;; are ready to be enabled again, we should put the following
8854 ;; in place:
8855 ;; (native-inputs
8856 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8857 ;; ; but see above comment
8858 ;; ("python-coverage" ,python-coverage)
8859 ;; ("python-mock" ,python-mock)
8860 ;; ("python-pastedeploy" ,python-pastedeploy)
8861 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8862 ;; ("python-pyquery" ,python-pyquery)))
8863 (propagated-inputs
8864 `(("python-waitress" ,python-waitress)
8865 ("python-webob" ,python-webob)
8866 ("python-six" ,python-six)
8867 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8868 (home-page "http://webtest.pythonpaste.org/")
8869 (synopsis "Helper to test WSGI applications")
8870 (description "Webtest allows you to test your Python web applications
8871 without starting an HTTP server. It supports anything that supports the
8872 minimum of WSGI.")
8873 (license license:expat)
8874 (properties `((python2-variant . ,(delay python2-webtest))))))
8875
8876 (define-public python2-webtest
8877 (let ((webtest (package-with-python2
8878 (strip-python2-variant python-webtest))))
8879 (package
8880 (inherit webtest)
8881 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8882 ,@(package-native-inputs webtest))))))
8883
8884 (define-public python-anyjson
8885 (package
8886 (name "python-anyjson")
8887 (version "0.3.3")
8888 (source
8889 (origin
8890 (method url-fetch)
8891 (uri (pypi-uri "anyjson" version))
8892 (sha256
8893 (base32
8894 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8895 (build-system python-build-system)
8896 (arguments
8897 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8898 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8899 ;; whatever) so this transformation needs to be done before the tests
8900 ;; can be run. Maybe we could add a build step to transform beforehand
8901 ;; but it could be annoying/difficult.
8902 ;; We can enable tests for the Python 2 version, though, and do below.
8903 #:tests? #f))
8904 (home-page "http://bitbucket.org/runeh/anyjson/")
8905 (synopsis
8906 "Wraps best available JSON implementation in a common interface")
8907 (description
8908 "Anyjson loads whichever is the fastest JSON module installed
8909 and provides a uniform API regardless of which JSON implementation is used.")
8910 (license license:bsd-3)
8911 (properties `((python2-variant . ,(delay python2-anyjson))))))
8912
8913 (define-public python2-anyjson
8914 (let ((anyjson (package-with-python2
8915 (strip-python2-variant python-anyjson))))
8916 (package
8917 (inherit anyjson)
8918 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8919 #:tests? #t
8920 ,@(package-arguments anyjson)))
8921 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8922 ("python2-nose" ,python2-nose))))))
8923
8924 (define-public python-amqp
8925 (package
8926 (name "python-amqp")
8927 (version "1.4.9")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "amqp" version))
8932 (sha256
8933 (base32
8934 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8935 (build-system python-build-system)
8936 (native-inputs
8937 `(("python-nose" ,python-nose)
8938 ("python-mock" ,python-mock)))
8939 (home-page "http://github.com/celery/py-amqp")
8940 (synopsis
8941 "Low-level AMQP client for Python (fork of amqplib)")
8942 (description
8943 "This is a fork of amqplib which was originally written by Barry Pederson.
8944 It is maintained by the Celery project, and used by kombu as a pure python
8945 alternative when librabbitmq is not available.")
8946 (license license:lgpl2.1+)
8947 (properties `((python2-variant . ,(delay python2-amqp))))))
8948
8949 (define-public python2-amqp
8950 (let ((amqp (package-with-python2
8951 (strip-python2-variant python-amqp))))
8952 (package
8953 (inherit amqp)
8954 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8955 ;; unmaintained. Weirdly, does not do this on the python 3
8956 ;; version?
8957 #:tests? #f
8958 ,@(package-arguments amqp)))
8959 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8960 ,@(package-native-inputs amqp))))))
8961
8962 (define-public python-kombu
8963 (package
8964 (name "python-kombu")
8965 (version "3.0.37")
8966 (source
8967 (origin
8968 (method url-fetch)
8969 (uri (pypi-uri "kombu" version))
8970 (sha256
8971 (base32
8972 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8973 (build-system python-build-system)
8974 (native-inputs
8975 `(("python-mock" ,python-mock)
8976 ("python-nose" ,python-nose)))
8977 (propagated-inputs
8978 `(("python-anyjson" ,python-anyjson)
8979 ("python-amqp" ,python-amqp)
8980 ("python-redis" ,python-redis)))
8981 (home-page "http://kombu.readthedocs.org")
8982 (synopsis "Message passing library for Python")
8983 (description "The aim of Kombu is to make messaging in Python as easy as
8984 possible by providing an idiomatic high-level interface for the AMQ protocol,
8985 and also provide proven and tested solutions to common messaging problems.
8986 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8987 message orientation, queuing, routing, reliability and security, for which the
8988 RabbitMQ messaging server is the most popular implementation.")
8989 (license license:bsd-3)
8990 (properties `((python2-variant . ,(delay python2-kombu))))))
8991
8992 (define-public python2-kombu
8993 (let ((kombu (package-with-python2
8994 (strip-python2-variant python-kombu))))
8995 (package
8996 (inherit kombu)
8997 (inputs `(("python2-setuptools" ,python2-setuptools)
8998 ("python2-unittest2" ,python2-unittest2)
8999 ,@(package-inputs kombu))))))
9000
9001 (define-public python-billiard
9002 (package
9003 (name "python-billiard")
9004 (version "3.3.0.23")
9005 (source
9006 (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "billiard" version))
9009 (sha256
9010 (base32
9011 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9012 (build-system python-build-system)
9013 (native-inputs
9014 `(("python-nose" ,python-nose)))
9015 (home-page "http://github.com/celery/billiard")
9016 (synopsis
9017 "Python multiprocessing fork with improvements and bugfixes")
9018 (description
9019 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9020 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9021 pyprocessing package. This standalone variant is intended to be compatible with
9022 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9023 (license license:bsd-3)
9024 (properties `((python2-variant . ,(delay python2-billiard))))))
9025
9026 (define-public python2-billiard
9027 (let ((billiard (package-with-python2
9028 (strip-python2-variant python-billiard))))
9029 (package
9030 (inherit billiard)
9031 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9032 ("python2-unittest2" ,python2-unittest2)
9033 ("python2-mock" ,python2-mock)
9034 ,@(package-native-inputs billiard))))))
9035
9036 (define-public python-celery
9037 (package
9038 (name "python-celery")
9039 (version "3.1.24")
9040 (source
9041 (origin
9042 (method url-fetch)
9043 (uri (pypi-uri "celery" version))
9044 (sha256
9045 (base32
9046 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9047 (build-system python-build-system)
9048 (arguments
9049 `(#:phases
9050 (modify-phases %standard-phases
9051 ;; These tests break with Python 3.5:
9052 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9053 (replace 'check
9054 (lambda _
9055 (zero?
9056 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9057 (native-inputs
9058 `(("python-nose" ,python-nose)))
9059 (inputs
9060 `(("python-pytz" ,python-pytz)
9061 ("python-amqp" ,python-amqp)
9062 ("python-anyjson" ,python-anyjson)
9063 ("python-billiard" ,python-billiard)
9064 ("python-kombu" ,python-kombu)))
9065 (home-page "http://celeryproject.org")
9066 (synopsis "Distributed Task Queue")
9067 (description "Celery is an asynchronous task queue/job queue based on
9068 distributed message passing. It is focused on real-time operation, but
9069 supports scheduling as well. The execution units, called tasks, are executed
9070 concurrently on a single or more worker servers using multiprocessing,
9071 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9072 synchronously (wait until ready).")
9073 (license license:bsd-3)
9074 (properties `((python2-variant . ,(delay python2-celery))))))
9075
9076 (define-public python2-celery
9077 (let ((celery (package-with-python2
9078 (strip-python2-variant python-celery))))
9079 (package
9080 (inherit celery)
9081 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9082 ("python2-unittest2" ,python2-unittest2)
9083 ("python2-mock" ,python2-mock)
9084 ,@(package-native-inputs celery))))))
9085
9086 (define-public python-translitcodec
9087 (package
9088 (name "python-translitcodec")
9089 (version "0.4.0")
9090 (source
9091 (origin
9092 (method url-fetch)
9093 (uri (pypi-uri "translitcodec" version))
9094 (sha256
9095 (base32
9096 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9097 (build-system python-build-system)
9098 (arguments
9099 `(#:tests? #f)) ; no tests provided
9100 (home-page
9101 "https://github.com/claudep/translitcodec")
9102 (synopsis
9103 "Unicode to 8-bit charset transliteration codec")
9104 (description
9105 "This package contains codecs for transliterating ISO 10646 texts into
9106 best-effort representations using smaller coded character sets (ASCII,
9107 ISO 8859, etc.).")
9108 (license license:expat)
9109 (properties `((python2-variant . ,(delay python2-translitcodec))))))
9110
9111 (define-public python2-translitcodec
9112 (package
9113 (inherit (package-with-python2
9114 (strip-python2-variant python-translitcodec)))
9115 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9116
9117 (define-public python-editor
9118 (package
9119 (name "python-editor")
9120 (version "0.5")
9121 (source
9122 (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "python-editor" version))
9125 (sha256
9126 (base32
9127 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9128 (build-system python-build-system)
9129 (home-page
9130 "https://github.com/fmoo/python-editor")
9131 (synopsis
9132 "Programmatically open an editor, capture the result")
9133 (description
9134 "python-editor is a library that provides the editor module for
9135 programmatically interfacing with your system's $EDITOR.")
9136 (license license:asl2.0)
9137 (properties `((python2-variant . ,(delay python2-editor))))))
9138
9139 (define-public python2-editor
9140 (package
9141 (inherit (package-with-python2
9142 (strip-python2-variant python-editor)))
9143 (inputs `(("python2-setuptools" ,python2-setuptools)))))
9144
9145 (define-public python-sphinxcontrib-programoutput
9146 (package
9147 (name "python-sphinxcontrib-programoutput")
9148 (version "0.8")
9149 (source (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9152 (sha256
9153 (base32
9154 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9155 (build-system python-build-system)
9156 (propagated-inputs
9157 `(("python-docutils" ,python-docutils)
9158 ("python-sphinx" ,python-sphinx)))
9159 (synopsis "Sphinx extension to include program output")
9160 (description "A Sphinx extension to literally insert the output of arbitrary
9161 commands into documents, helping you to keep your command examples up to date.")
9162 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
9163 (license license:bsd-2)
9164 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
9165
9166 (define-public python2-sphinxcontrib-programoutput
9167 (package
9168 (inherit (package-with-python2
9169 (strip-python2-variant python-sphinxcontrib-programoutput)))
9170 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9171
9172 (define-public python-sphinx-repoze-autointerface
9173 (package
9174 (name "python-sphinx-repoze-autointerface")
9175 (version "0.8")
9176 (source (origin
9177 (method url-fetch)
9178 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9179 (sha256
9180 (base32
9181 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
9182 (build-system python-build-system)
9183 (propagated-inputs
9184 `(("python-docutils" ,python-docutils)
9185 ("python-sphinx" ,python-sphinx)
9186 ("python-zope-interface" ,python-zope-interface)))
9187 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9188 (description "This package defines an extension for the Sphinx documentation
9189 system. The extension allows generation of API documentation by
9190 introspection of @code{zope.interface} instances in code.")
9191 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
9192 (license license:repoze)))
9193
9194 (define-public python2-sphinx-repoze-autointerface
9195 (package-with-python2 python-sphinx-repoze-autointerface))
9196
9197 (define-public python-psycopg2
9198 (package
9199 (name "python-psycopg2")
9200 (version "2.6.1")
9201 (source
9202 (origin
9203 (method url-fetch)
9204 (uri (pypi-uri "psycopg2" version))
9205 (sha256
9206 (base32
9207 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9208 (build-system python-build-system)
9209 (arguments
9210 ;; Tests would require a postgresql database "psycopg2_test"
9211 ;; and a running postgresql database management service.
9212 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9213 (inputs
9214 `(("postgresql" ,postgresql))) ; libpq
9215 (home-page "http://initd.org/psycopg/")
9216 (synopsis "Python PostgreSQL adapter")
9217 (description
9218 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
9219 (license license:lgpl3+)
9220 (properties `((python2-variant . ,(delay python2-psycopg2))))))
9221
9222 (define-public python2-psycopg2
9223 (package
9224 (inherit (package-with-python2
9225 (strip-python2-variant python-psycopg2)))
9226 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9227
9228 (define-public python-vobject
9229 (package
9230 (name "python-vobject")
9231 (version "0.9.2")
9232 (source (origin
9233 (method url-fetch)
9234 (uri (pypi-uri "vobject" version))
9235 (sha256
9236 (base32
9237 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9238 (build-system python-build-system)
9239 (arguments
9240 '(;; The test suite relies on some non-portable Windows interfaces.
9241 #:tests? #f))
9242 (inputs
9243 `(("python-dateutil-2" ,python-dateutil-2)
9244 ("python-pyicu" ,python-pyicu)))
9245 (synopsis "Parse and generate vCard and vCalendar files")
9246 (description "Vobject is intended to be a full featured Python package for
9247 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9248 are supported and well tested. vCard 3.0 files are supported, and all data
9249 should be imported, but only a few components are understood in a sophisticated
9250 way.")
9251 (home-page "http://eventable.github.io/vobject/")
9252 (license license:asl2.0)
9253 (properties `((python2-variant . ,(delay python2-vobject))))))
9254
9255 (define-public python2-vobject
9256 (package
9257 (inherit (package-with-python2
9258 (strip-python2-variant python-vobject)))
9259 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9260
9261 (define-public python-munkres
9262 (package
9263 (name "python-munkres")
9264 (version "1.0.7")
9265 (source (origin
9266 (method url-fetch)
9267 (uri (pypi-uri "munkres" version))
9268 (sha256
9269 (base32
9270 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9271 (build-system python-build-system)
9272 (arguments
9273 '(#:tests? #f)) ; no test suite
9274 (home-page "http://software.clapper.org/munkres/")
9275 (synopsis "Implementation of the Munkres algorithm")
9276 (description "The Munkres module provides an implementation of the Munkres
9277 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9278 useful for solving the Assignment Problem.")
9279 (license license:bsd-3)))
9280
9281 (define-public python2-munkres
9282 (package-with-python2 python-munkres))
9283
9284 (define-public python-flask
9285 (package
9286 (name "python-flask")
9287 (version "0.10.1")
9288 (source (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "Flask" version))
9291 (sha256
9292 (base32
9293 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9294 (build-system python-build-system)
9295 (propagated-inputs
9296 `(("python-itsdangerous" ,python-itsdangerous)
9297 ("python-jinja2" ,python-jinja2)
9298 ("python-werkzeug" ,python-werkzeug)))
9299 (home-page "https://github.com/mitsuhiko/flask/")
9300 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9301 (description "Flask is a micro web framework based on the Werkzeug toolkit
9302 and Jinja2 template engine. It is called a micro framework because it does not
9303 presume or force a developer to use a particular tool or library.")
9304 (license license:bsd-3)
9305 (properties `((python2-variant . ,(delay python2-flask))))))
9306
9307 (define-public python2-flask
9308 (package (inherit (package-with-python2
9309 (strip-python2-variant python-flask)))
9310 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9311
9312 (define-public python-cookies
9313 (package
9314 (name "python-cookies")
9315 (version "2.2.1")
9316 (source (origin
9317 (method url-fetch)
9318 (uri (pypi-uri "cookies" version))
9319 (sha256
9320 (base32
9321 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9322 (build-system python-build-system)
9323 (arguments
9324 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9325 #:tests? #f))
9326 (native-inputs
9327 `(("python-pytest" ,python2-pytest)))
9328 (synopsis "HTTP cookie parser and renderer")
9329 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9330 Python.")
9331 (home-page "https://gitlab.com/sashahart/cookies")
9332 (license license:expat)
9333 (properties `((python2-variant . ,(delay python2-cookies))))))
9334
9335 (define-public python2-cookies
9336 (let ((cookies (package-with-python2
9337 (strip-python2-variant python-cookies))))
9338 (package (inherit cookies)
9339 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9340 ,@(package-native-inputs cookies))))))
9341
9342 (define-public python-responses
9343 (package
9344 (name "python-responses")
9345 (version "0.5.1")
9346 (source (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "responses" version))
9349 (sha256
9350 (base32
9351 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9352 (build-system python-build-system)
9353 (arguments
9354 `(;; Test suite is not distributed:
9355 ;; https://github.com/getsentry/responses/issues/38
9356 #:tests? #f))
9357 (native-inputs
9358 `(("python-cookies" ,python-cookies)
9359 ("python-mock" ,python-mock)))
9360 (propagated-inputs
9361 `(("python-requests" ,python-requests)
9362 ("python-six" ,python-six)))
9363 (home-page "https://github.com/getsentry/responses")
9364 (synopsis "Utility for mocking out the `requests` Python library")
9365 (description "A utility library for mocking out the `requests` Python
9366 library.")
9367 (license license:asl2.0)
9368 (properties `((python2-variant . ,(delay python2-responses))))))
9369
9370 (define-public python2-responses
9371 (let ((responses (package-with-python2
9372 (strip-python2-variant python-responses))))
9373 (package (inherit responses)
9374 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9375 ,@(package-native-inputs responses))))))
9376
9377 (define-public python-whoosh
9378 (package
9379 (name "python-whoosh")
9380 (version "2.7.4")
9381 (source
9382 (origin
9383 (method url-fetch)
9384 (uri (pypi-uri "Whoosh" version))
9385 (sha256
9386 (base32
9387 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9388 (build-system python-build-system)
9389 (native-inputs
9390 `(("python-pytest" ,python-pytest)))
9391 (home-page "http://bitbucket.org/mchaput/whoosh")
9392 (synopsis "Full text indexing, search, and spell checking library")
9393 (description
9394 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9395 checking library.")
9396 (license license:bsd-2)))
9397
9398 (define-public python2-whoosh
9399 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9400 (package (inherit whoosh)
9401 (propagated-inputs
9402 `(("python2-backport-ssl-match-hostname"
9403 ,python2-backport-ssl-match-hostname)
9404 ,@(package-propagated-inputs whoosh))))))
9405
9406 (define-public python-pathlib
9407 (package
9408 (name "python-pathlib")
9409 (version "1.0.1")
9410 (source (origin
9411 (method url-fetch)
9412 (uri (pypi-uri "pathlib" version))
9413 (sha256
9414 (base32
9415 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9416 (build-system python-build-system)
9417 ;; The tests depend on the internal "test" module, which does not provide
9418 ;; a stable interface.
9419 (arguments `(#:tests? #f))
9420 (home-page "https://pathlib.readthedocs.org/")
9421 (synopsis "Object-oriented file system paths")
9422 (description "Pathlib offers a set of classes to handle file system paths.
9423 It offers the following advantages over using string objects:
9424
9425 @enumerate
9426 @item No more cumbersome use of os and os.path functions. Everything can
9427 be done easily through operators, attribute accesses, and method calls.
9428 @item Embodies the semantics of different path types. For example,
9429 comparing Windows paths ignores casing.
9430 @item Well-defined semantics, eliminating any inconsistencies or
9431 ambiguities (forward vs. backward slashes, etc.).
9432 @end enumerate
9433
9434 Note: In Python 3.4, pathlib is now part of the standard library. For other
9435 Python versions please consider python-pathlib2 instead, which tracks the
9436 standard library module. This module (python-pathlib) isn't maintained
9437 anymore.")
9438 (license license:expat)))
9439
9440 (define-public python2-pathlib
9441 (package-with-python2 python-pathlib))
9442
9443 (define-public python2-pathlib2
9444 (package
9445 (name "python2-pathlib2")
9446 (version "2.1.0")
9447 (source (origin
9448 (method url-fetch)
9449 (uri (pypi-uri "pathlib2" version))
9450 (sha256
9451 (base32
9452 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9453 (build-system python-build-system)
9454 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9455 ;; version is 3.4 which already includes this package as part of the
9456 ;; standard library.
9457 (arguments
9458 `(#:python ,python-2))
9459 (native-inputs
9460 `(("python2-six" ,python2-six)))
9461 (home-page "http://pypi.python.org/pypi/pathlib2/")
9462 (synopsis "Object-oriented file system paths - backport of standard
9463 pathlib module")
9464 (description "The goal of pathlib2 is to provide a backport of standard
9465 pathlib module which tracks the standard library module, so all the newest
9466 features of the standard pathlib can be used also on older Python versions.
9467
9468 Pathlib offers a set of classes to handle file system paths. It offers the
9469 following advantages over using string objects:
9470
9471 @enumerate
9472 @item No more cumbersome use of os and os.path functions. Everything can
9473 be done easily through operators, attribute accesses, and method calls.
9474 @item Embodies the semantics of different path types. For example,
9475 comparing Windows paths ignores casing.
9476 @item Well-defined semantics, eliminating any inconsistencies or
9477 ambiguities (forward vs. backward slashes, etc.).
9478 @end enumerate")
9479 (license license:expat)))
9480
9481 (define-public python-jellyfish
9482 (package
9483 (name "python-jellyfish")
9484 (version "0.5.3")
9485 (source (origin
9486 (method url-fetch)
9487 (uri (pypi-uri "jellyfish" version))
9488 (sha256
9489 (base32
9490 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9491 (build-system python-build-system)
9492 (native-inputs
9493 `(("python-pytest" ,python-pytest)))
9494 (home-page "https://github.com/jamesturk/jellyfish")
9495 (synopsis "Approximate and phonetic matching of strings")
9496 (description "Jellyfish uses a variety of string comparison and phonetic
9497 encoding algorithms to do fuzzy string matching.")
9498 (license license:bsd-2)
9499 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9500
9501 (define-public python2-jellyfish
9502 (let ((jellyfish (package-with-python2
9503 (strip-python2-variant python-jellyfish))))
9504 (package (inherit jellyfish)
9505 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9506 ("python2-unicodecsv" ,python2-unicodecsv)
9507 ,@(package-native-inputs jellyfish))))))
9508
9509 (define-public python2-unicodecsv
9510 (package
9511 (name "python2-unicodecsv")
9512 (version "0.14.1")
9513 (source (origin
9514 (method url-fetch)
9515 ;; The test suite is not included in the PyPi release.
9516 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9517 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9518 "archive/" version ".tar.gz"))
9519 (file-name (string-append name "-" version ".tar.gz"))
9520 (sha256
9521 (base32
9522 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9523 (build-system python-build-system)
9524 (arguments
9525 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9526 #:python ,python-2))
9527 (native-inputs
9528 `(("python2-unittest2" ,python2-unittest2)))
9529 (home-page "https://github.com/jdunck/python-unicodecsv")
9530 (synopsis "Unicode CSV module for Python 2")
9531 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9532 module, adding support for Unicode strings.")
9533 (license license:bsd-2)))
9534
9535 (define-public python-rarfile
9536 (package
9537 (name "python-rarfile")
9538 (version "2.7")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "rarfile" version))
9542 (sha256
9543 (base32
9544 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9545 ;; https://github.com/markokr/rarfile/pull/17/
9546 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9547 (build-system python-build-system)
9548 (arguments
9549 '(#:phases
9550 (modify-phases %standard-phases
9551 (replace 'check
9552 ;; Many tests fail, but the installation proceeds.
9553 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9554 (native-inputs
9555 `(("which" ,which))) ; required for tests
9556 (propagated-inputs
9557 `(("libarchive" ,libarchive)))
9558 (home-page "https://github.com/markokr/rarfile")
9559 (synopsis "RAR archive reader for Python")
9560 (description "This is Python module for RAR archive reading. The interface
9561 is made as zipfile like as possible.")
9562 (license license:isc)))
9563
9564 (define-public python2-rarfile
9565 (package-with-python2 python-rarfile))
9566
9567 (define-public python-magic
9568 (package
9569 (name "python-magic")
9570 (version "0.4.3")
9571 (source
9572 (origin
9573 (method url-fetch)
9574 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9575 version ".tar.gz"))
9576 (sha256
9577 (base32
9578 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9579 (file-name (string-append name "-" version "-checkout"))))
9580 (build-system python-build-system)
9581 (arguments
9582 ;; The tests are unreliable, so don't run them. The tests fail
9583 ;; under Python3 because they were written for Python2 and
9584 ;; contain import statements that do not work in Python3. One of
9585 ;; the tests fails under Python2 because its assertions are
9586 ;; overly stringent; it relies on comparing output strings which
9587 ;; are brittle and can change depending on the version of
9588 ;; libmagic being used and the system on which the test is
9589 ;; running. In my case, under GuixSD 0.10.0, only one test
9590 ;; failed, and it seems to have failed only because the version
9591 ;; of libmagic that is packaged in Guix outputs a slightly
9592 ;; different (but not wrong) string than the one that the test
9593 ;; expected.
9594 '(#:tests? #f
9595 #:phases (modify-phases %standard-phases
9596 ;; Replace a specific method call with a hard-coded
9597 ;; path to the necessary libmagic.so file in the
9598 ;; store. If we don't do this, then the method call
9599 ;; will fail to find the libmagic.so file, which in
9600 ;; turn will cause any application using
9601 ;; python-magic to fail.
9602 (add-before 'build 'hard-code-path-to-libmagic
9603 (lambda* (#:key inputs #:allow-other-keys)
9604 (let ((file (assoc-ref inputs "file")))
9605 (substitute* "magic.py"
9606 (("ctypes.util.find_library\\('magic'\\)")
9607 (string-append "'" file "/lib/libmagic.so'")))
9608 #t)))
9609 (add-before 'install 'disable-egg-compression
9610 (lambda _
9611 (let ((port (open-file "setup.cfg" "a")))
9612 (display "\n[easy_install]\nzip_ok = 0\n"
9613 port)
9614 (close-port port)
9615 #t))))))
9616 (inputs
9617 ;; python-magic needs to be able to find libmagic.so.
9618 `(("file" ,file)))
9619 (home-page "https://github.com/ahupp/python-magic")
9620 (synopsis "File type identification using libmagic")
9621 (description
9622 "This module uses ctypes to access the libmagic file type
9623 identification library. It makes use of the local magic database and
9624 supports both textual and MIME-type output. Note that this module and
9625 the python-file module both provide a \"magic.py\" file; these two
9626 modules, which are different and were developed separately, both serve
9627 the same purpose: to provide Python bindings for libmagic.")
9628 (license license:expat)))
9629
9630 (define-public python2-magic
9631 (package-with-python2 python-magic))
9632
9633 (define-public python2-s3cmd
9634 (package
9635 (name "python2-s3cmd")
9636 (version "1.6.1")
9637 (source
9638 (origin
9639 (method url-fetch)
9640 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9641 "s3cmd-" version ".tar.gz"))
9642 (sha256
9643 (base32
9644 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9645 (build-system python-build-system)
9646 (arguments
9647 ;; s3cmd is written for python2 only and contains no tests.
9648 `(#:python ,python-2
9649 #:tests? #f))
9650 (inputs
9651 `(("python2-dateutil" ,python2-dateutil)
9652 ;; The python-file package also provides a magic.py module.
9653 ;; This is an unfortunate state of affairs; however, s3cmd
9654 ;; fails to install if it cannot find specifically the
9655 ;; python-magic package. Thus we include it, instead of using
9656 ;; python-file. Ironically, s3cmd sometimes works better
9657 ;; without libmagic bindings at all:
9658 ;; https://github.com/s3tools/s3cmd/issues/198
9659 ("python2-magic" ,python2-magic)))
9660 (home-page "http://s3tools.org/s3cmd")
9661 (synopsis "Command line tool for S3-compatible storage services")
9662 (description
9663 "S3cmd is a command line tool for uploading, retrieving and managing data
9664 in storage services that are compatible with the Amazon Simple Storage
9665 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9666 GnuPG encryption, and more. It also supports management of Amazon's
9667 CloudFront content delivery network.")
9668 (license license:gpl2+)))
9669
9670 (define-public python-pkgconfig
9671 (package
9672 (name "python-pkgconfig")
9673 (version "1.1.0")
9674 (source
9675 (origin
9676 (method url-fetch)
9677 (uri (pypi-uri "pkgconfig" version))
9678 (sha256
9679 (base32
9680 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9681 (build-system python-build-system)
9682 (native-inputs
9683 `(("python-nose" ,python-nose)))
9684 (inputs
9685 `(("pkg-config" ,pkg-config)))
9686 (arguments
9687 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9688 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9689 #:tests? #f
9690 ;; Prevent creation of the egg. This works around
9691 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9692 #:configure-flags '("--single-version-externally-managed" "--root=/")
9693 ;; Hard-code the path to pkg-config.
9694 #:phases
9695 (modify-phases %standard-phases
9696 (add-before
9697 'build 'patch
9698 (lambda _
9699 (substitute* "pkgconfig/pkgconfig.py"
9700 (("cmd = 'pkg-config")
9701 (string-append "cmd = '" (which "pkg-config"))))
9702 #t)))))
9703 (home-page "http://github.com/matze/pkgconfig")
9704 (synopsis "Python interface for pkg-config")
9705 (description "This module provides a Python interface to pkg-config. It
9706 can be used to find all pkg-config packages, check if a package exists,
9707 check if a package meets certain version requirements, query CFLAGS and
9708 LDFLAGS and parse the output to build extensions with setup.py.")
9709 (license license:expat)))
9710
9711 (define-public python2-pkgconfig
9712 (package-with-python2 python-pkgconfig))
9713
9714 (define-public python-bz2file
9715 (package
9716 (name "python-bz2file")
9717 (version "0.98")
9718 (source
9719 (origin
9720 (method url-fetch)
9721 (uri (pypi-uri "bz2file" version))
9722 (sha256
9723 (base32
9724 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9725 (build-system python-build-system)
9726 (arguments
9727 `(#:tests? #f)) ; Tests use deprecated python modules.
9728 (home-page "https://github.com/nvawda/bz2file")
9729 (synopsis "Read and write bzip2-compressed files")
9730 (description
9731 "Bz2file is a Python library for reading and writing bzip2-compressed
9732 files. It contains a drop-in replacement for the I/O interface in the
9733 standard library's @code{bz2} module, including features from the latest
9734 development version of CPython that are not available in older releases.")
9735 (license license:asl2.0)
9736 (properties `((python2-variant . ,(delay python2-bz2file))))))
9737
9738 (define-public python2-bz2file
9739 (let ((base (package-with-python2
9740 (strip-python2-variant python-bz2file))))
9741 (package
9742 (inherit base)
9743 (arguments
9744 `(#:python ,python-2
9745 #:phases
9746 (modify-phases %standard-phases
9747 ;; 'python setup.py test' does not work as of 0.98.
9748 ;; There is only the one test file, so we run it directly.
9749 (replace 'check
9750 (lambda _ (zero? (system* "python"
9751 "test_bz2file.py"))))))))))
9752
9753 (define-public python-future
9754 (package
9755 (name "python-future")
9756 (version "0.15.2")
9757 (source
9758 (origin
9759 (method url-fetch)
9760 (uri (pypi-uri "future" version))
9761 (sha256
9762 (base32
9763 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9764 (build-system python-build-system)
9765 ;; Many tests connect to the network or are otherwise flawed.
9766 ;; https://github.com/PythonCharmers/python-future/issues/210
9767 (arguments
9768 `(#:tests? #f))
9769 (home-page "http://python-future.org")
9770 (synopsis "Single-source support for Python 3 and 2")
9771 (description
9772 "@code{python-future} is the missing compatibility layer between Python 2 and
9773 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9774 to support both Python 2 and Python 3 with minimal overhead.")
9775 (license license:expat)
9776 (properties `((python2-variant . ,(delay python2-future))))))
9777
9778 (define-public python2-future
9779 (let ((base (package-with-python2
9780 (strip-python2-variant python-future))))
9781 (package
9782 (inherit base)
9783 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9784
9785 (define-public python-cysignals
9786 (package
9787 (name "python-cysignals")
9788 (version "1.1.0")
9789 (source
9790 (origin
9791 (method url-fetch)
9792 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9793 (sha256
9794 (base32
9795 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9796 (build-system python-build-system)
9797 (native-inputs
9798 `(("python-cython" ,python-cython)
9799 ("python-sphinx" ,python-sphinx)))
9800 (inputs
9801 `(("pari-gp" ,pari-gp)))
9802 (arguments
9803 `(#:modules ((guix build python-build-system)
9804 ((guix build gnu-build-system) #:prefix gnu:)
9805 (guix build utils))
9806 ;; FIXME: Tests are executed after installation and currently fail
9807 ;; when not installing into standard locations; the author is working
9808 ;; on a fix.
9809 #:tests? #f
9810 #:phases
9811 (modify-phases %standard-phases
9812 (add-before
9813 'build 'configure
9814 (assoc-ref gnu:%standard-phases 'configure)))))
9815 (home-page
9816 "https://github.com/sagemath/cysignals")
9817 (synopsis
9818 "Handling of interrupts and signals for Cython")
9819 (description
9820 "The cysignals package provides mechanisms to handle interrupts (and
9821 other signals and errors) in Cython code, using two related approaches,
9822 for mixed Cython/Python code or external C libraries and pure Cython code,
9823 respectively.")
9824 (license license:lgpl3+)))
9825
9826 (define-public python2-cysignals
9827 (package-with-python2 python-cysignals))
9828
9829 (define-public python2-shedskin
9830 (package
9831 (name "python2-shedskin")
9832 (version "0.9.4")
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (string-append "https://github.com/shedskin/shedskin/"
9837 "releases/download/v" version
9838 "/shedskin-" version ".tgz"))
9839 (sha256
9840 (base32
9841 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9842 (build-system python-build-system)
9843 (arguments
9844 `(#:python ,python-2
9845 #:phases (modify-phases %standard-phases
9846 (add-after 'unpack 'fix-resulting-include-libs
9847 (lambda* (#:key inputs #:allow-other-keys)
9848 (let ((libgc (assoc-ref inputs "libgc"))
9849 (pcre (assoc-ref inputs "pcre")))
9850 (substitute* "shedskin/makefile.py"
9851 (("variable == 'CCFLAGS':[ ]*")
9852 (string-append "variable == 'CCFLAGS':\n"
9853 " line += ' -I " pcre "/include"
9854 " -I " libgc "/include'"))
9855 (("variable == 'LFLAGS':[ ]*")
9856 (string-append "variable == 'LFLAGS':\n"
9857 " line += ' -L" pcre "/lib"
9858 " -L " libgc "/lib'")))
9859 #t))))))
9860 (inputs `(("pcre" ,pcre)
9861 ("libgc" ,libgc)))
9862 (home-page "https://shedskin.github.io/")
9863 (synopsis "Experimental Python-2 to C++ Compiler")
9864 (description (string-append "This is an experimental compiler for a subset of
9865 Python. It generates C++ code and a Makefile."))
9866 (license (list license:gpl3 license:bsd-3 license:expat))))
9867
9868 (define-public python2-rope
9869 (package
9870 (name "python2-rope")
9871 (version "0.10.3")
9872 (source
9873 (origin
9874 (method url-fetch)
9875 (uri (pypi-uri "rope" version))
9876 (sha256
9877 (base32
9878 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9879 (arguments
9880 ;; Rope is currently python-2 only.
9881 ;; https://github.com/python-rope/rope/issues/57
9882 `(#:python ,python-2))
9883 (build-system python-build-system)
9884 (native-inputs
9885 `(("python2-unittest2" ,python2-unittest2)))
9886 (home-page "https://github.com/python-rope/rope")
9887 (synopsis "Refactoring library for Python")
9888 (description "Rope is a refactoring library for Python. It facilitates
9889 the renaming, moving and extracting of attributes, functions, modules, fields
9890 and parameters in Python 2 source code. These refactorings can also be applied
9891 to occurences in strings and comments.")
9892 (license license:gpl2)))
9893
9894 (define-public python-py3status
9895 (package
9896 (name "python-py3status")
9897 (version "3.1")
9898 (source
9899 (origin
9900 (method url-fetch)
9901 (uri (pypi-uri "py3status" version))
9902 (sha256
9903 (base32
9904 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9905 (build-system python-build-system)
9906 (home-page "https://github.com/ultrabug/py3status")
9907 (synopsis "Extensible i3status wrapper written in Python")
9908 (description "py3status is an i3status wrapper which extends i3status
9909 functionality in a modular way, allowing you to extend your panel with your
9910 own code, responding to click events and updating clock every second.")
9911 (license license:bsd-3)))
9912
9913 (define-public python-tblib
9914 (package
9915 (name "python-tblib")
9916 (version "1.3.0")
9917 (source (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "tblib" version))
9920 (sha256 (base32
9921 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9922 (build-system python-build-system)
9923 (arguments
9924 `(#:phases
9925 (modify-phases %standard-phases
9926 (replace 'check
9927 (lambda _
9928 ;; Upstream runs tests after installation and the package itself
9929 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9930 ;; found.
9931 (setenv "PYTHONPATH"
9932 (string-append (getcwd) "/build/lib:"
9933 (getenv "PYTHONPATH")))
9934 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9935 (native-inputs
9936 `(("python-pytest" ,python-pytest)
9937 ("python-six" ,python-six)))
9938 (home-page "https://github.com/ionelmc/python-tblib")
9939 (synopsis "Traceback serialization library")
9940 (description
9941 "Traceback serialization allows you to:
9942
9943 @enumerate
9944 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9945 different processes. This allows better error handling when running code over
9946 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9947
9948 @item Parse traceback strings and raise with the parsed tracebacks.
9949 @end itemize")
9950 (license license:bsd-3)))
9951
9952 (define-public python2-tblib
9953 (package-with-python2 python-tblib))
9954
9955 (define-public python-sqlparse
9956 (package
9957 (name "python-sqlparse")
9958 (version "0.1.19")
9959 (source (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "sqlparse" version))
9962 (sha256
9963 (base32
9964 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9965 (build-system python-build-system)
9966 (arguments
9967 `(#:phases
9968 (modify-phases %standard-phases
9969 (replace 'check
9970 (lambda* _
9971 ;; setup.py-integrated 2to3 only affects the build files, but
9972 ;; py.test is using the source files. So we need to convert them
9973 ;; manually.
9974 (when (zero? (system* "python3"))
9975 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9976 (zero? (system* "py.test")))))))
9977 (native-inputs
9978 `(("python-pytest" ,python-pytest)))
9979 (home-page "https://github.com/andialbrecht/sqlparse")
9980 (synopsis "Non-validating SQL parser")
9981 (description "Sqlparse is a non-validating SQL parser for Python. It
9982 provides support for parsing, splitting and formatting SQL statements.")
9983 (license license:bsd-3)))
9984
9985 (define-public python2-sqlparse
9986 (package-with-python2 python-sqlparse))
9987
9988 (define-public python-greenlet
9989 (package
9990 (name "python-greenlet")
9991 (version "0.4.9")
9992 (source (origin
9993 (method url-fetch)
9994 (uri (pypi-uri "greenlet" version))
9995 (sha256
9996 (base32
9997 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9998 (build-system python-build-system)
9999 (home-page "https://greenlet.readthedocs.io/")
10000 (synopsis "Lightweight in-process concurrent programming")
10001 (description
10002 "Greenlet package is a spin-off of Stackless, a version of CPython
10003 that supports micro-threads called \"tasklets\". Tasklets run
10004 pseudo-concurrently (typically in a single or a few OS-level threads) and
10005 are synchronized with data exchanges on \"channels\".")
10006 (license (list license:psfl license:expat))))
10007
10008 (define-public python2-greenlet
10009 (package-with-python2 python-greenlet))
10010
10011 (define-public python-gevent
10012 (package
10013 (name "python-gevent")
10014 (version "1.1.1")
10015 (source (origin
10016 (method url-fetch)
10017 (uri (pypi-uri "gevent" version))
10018 (sha256
10019 (base32
10020 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10021 (modules '((guix build utils)))
10022 (snippet
10023 '(begin
10024 ;; unbunding libev and c-ares
10025 (for-each delete-file-recursively '("libev" "c-ares"))
10026 ;; fixing testsuite
10027 (call-with-output-file "greentest/__init__.py" noop)
10028 (substitute* "greentest/testrunner.py"
10029 (("import util") "from . import util")
10030 (("from util import log") "from .util import log"))))))
10031 (build-system python-build-system)
10032 (propagated-inputs
10033 `(("python-greenlet" ,python-greenlet)))
10034 (native-inputs
10035 `(("python-six" ,python-six)))
10036 (inputs
10037 `(("c-ares" ,c-ares)
10038 ("libev" ,libev)))
10039 (home-page "http://www.gevent.org/")
10040 (synopsis "Coroutine-based network library")
10041 (description
10042 "gevent is a coroutine-based Python networking library that uses greenlet
10043 to provide a high-level synchronous API on top of the libev event loop.")
10044 (license license:expat)))
10045
10046 (define-public python2-gevent
10047 (package-with-python2 python-gevent))
10048
10049 (define-public python-twisted
10050 (package
10051 (name "python-twisted")
10052 (version "16.2.0")
10053 (source (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10056 (sha256
10057 (base32
10058 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10059 (build-system python-build-system)
10060 (propagated-inputs
10061 `(("python-zope-interface" ,python-zope-interface)))
10062 (home-page "https://twistedmatrix.com/")
10063 (synopsis "Asynchronous networking framework written in Python")
10064 (description
10065 "Twisted is an extensible framework for Python programming, with special
10066 focus on event-based network programming and multiprotocol integration.")
10067 (license license:expat)))
10068
10069 (define-public python2-twisted
10070 (package-with-python2 python-twisted))
10071
10072 (define-public python-pika
10073 (package
10074 (name "python-pika")
10075 (version "0.10.0")
10076 (source
10077 (origin
10078 (method url-fetch)
10079 (uri (pypi-uri "pika" version))
10080 (sha256
10081 (base32
10082 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10083 (build-system python-build-system)
10084 (native-inputs
10085 `(("python-pyev" ,python-pyev)
10086 ("python-tornado" ,python-tornado)
10087 ("python-twisted" ,python-twisted)))
10088 (home-page "https://pika.readthedocs.org")
10089 (synopsis "Pure Python AMQP Client Library")
10090 (description
10091 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10092 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10093 network support library.")
10094 (license license:bsd-3)))
10095
10096 (define-public python2-pika
10097 (package-with-python2 python-pika))
10098
10099 (define-public python-ply
10100 (package
10101 (name "python-ply")
10102 (version "3.8")
10103 (source
10104 (origin
10105 (method url-fetch)
10106 (uri (string-append
10107 "https://pypi.python.org/packages/"
10108 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10109 "/ply-" version ".tar.gz"))
10110 (sha256
10111 (base32
10112 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10113 (build-system python-build-system)
10114 (home-page "http://www.dabeaz.com/ply/")
10115 (synopsis "Python Lex & Yacc")
10116 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10117 It uses LR parsing and does extensive error checking.")
10118 (license license:bsd-3)
10119 (properties `((python2-variant . ,(delay python2-ply))))))
10120
10121 (define-public python2-ply
10122 (package
10123 (inherit (package-with-python2
10124 (strip-python2-variant python-ply)))
10125 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
10126
10127 (define-public python-tabulate
10128 (package
10129 (name "python-tabulate")
10130 (version "0.7.5")
10131 (source (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "tabulate" version))
10134 (sha256
10135 (base32
10136 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10137 ;; Fix tests
10138 (modules '((guix build utils)))
10139 (snippet '(substitute* '("test/test_cli.py"
10140 "test/test_input.py"
10141 "test/test_output.py"
10142 "test/test_regression.py")
10143 (("from common") "from nose.tools")))))
10144 (build-system python-build-system)
10145 (native-inputs
10146 `(;; For testing
10147 ("python-nose" ,python-nose)))
10148 (home-page "https://bitbucket.org/astanin/python-tabulate")
10149 (synopsis "Pretty-print tabular data")
10150 (description
10151 "Tabulate is a library and command-line utility to pretty-print tabular
10152 data in Python.")
10153 (license license:expat)))
10154
10155 (define-public python2-tabulate
10156 (package-with-python2 python-tabulate))
10157
10158 (define-public python-kazoo
10159 (package
10160 (name "python-kazoo")
10161 (version "2.2.1")
10162 (source
10163 (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "kazoo" version))
10166 (sha256
10167 (base32
10168 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10169 (build-system python-build-system)
10170 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10171 (propagated-inputs
10172 `(("python-six" ,python-six)))
10173 (home-page "https://kazoo.readthedocs.org")
10174 (synopsis "High-level Zookeeper client library")
10175 (description
10176 "Kazoo is a Python client library for the Apache Zookeeper distributed
10177 application service. It is designed to be easy to use and to avoid common
10178 programming errors.")
10179 (license license:asl2.0)))
10180
10181 (define-public python2-kazoo
10182 (package-with-python2 python-kazoo))
10183
10184 (define-public python-pykafka
10185 (package
10186 (name "python-pykafka")
10187 (version "2.4.0")
10188 (source (origin
10189 (method url-fetch)
10190 (uri (string-append
10191 "https://pypi.python.org/packages/8b/3e/"
10192 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10193 "pykafka-" version ".tar.gz"))
10194 (sha256
10195 (base32
10196 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10197 (build-system python-build-system)
10198 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10199 (propagated-inputs
10200 `(("python-gevent" ,python-gevent)
10201 ("python-kazoo" ,python-kazoo)
10202 ("python-tabulate" ,python-tabulate)))
10203 (inputs
10204 `(("librdkafka" ,librdkafka)))
10205 (home-page "https://pykafka.readthedocs.io/")
10206 (synopsis "Apache Kafka client for Python")
10207 (description
10208 "PyKafka is a client for the Apache Kafka distributed messaging system.
10209 It includes Python implementations of Kafka producers and consumers, which
10210 are optionally backed by a C extension built on librdkafka.")
10211 (license license:asl2.0)))
10212
10213 (define-public python2-pykafka
10214 (package-with-python2 python-pykafka))
10215
10216 (define-public python-wcwidth
10217 (package
10218 (name "python-wcwidth")
10219 (version "0.1.6")
10220 (source
10221 (origin
10222 (method url-fetch)
10223 (uri (string-append
10224 "https://pypi.python.org/packages/"
10225 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10226 "wcwidth-" version ".tar.gz"))
10227 (sha256
10228 (base32
10229 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10230 (build-system python-build-system)
10231 (home-page "https://github.com/jquast/wcwidth")
10232 (synopsis "Measure number of terminal column cells of wide-character codes")
10233 (description "Wcwidth measures the number of terminal column cells of
10234 wide-character codes. It is useful for those implementing a terminal emulator,
10235 or programs that carefully produce output to be interpreted by one. It is a
10236 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10237 specified in POSIX.1-2001 and POSIX.1-2008.")
10238 (license license:expat)
10239 (properties `((python2-variant . ,(delay python2-wcwidth))))))
10240
10241 (define-public python2-wcwidth
10242 (package
10243 (inherit (package-with-python2
10244 (strip-python2-variant python-wcwidth)))
10245 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
10246
10247 (define-public python2-jsonrpclib
10248 (package
10249 (name "python2-jsonrpclib")
10250 (version "0.1.7")
10251 (source (origin
10252 (method url-fetch)
10253 (uri (string-append
10254 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10255 "jsonrpclib-" version ".tar.gz"))
10256 (sha256
10257 (base32
10258 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10259 (build-system python-build-system)
10260 (arguments
10261 `(#:tests? #f
10262 #:python ,python-2))
10263 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10264 (synopsis "Implementation of JSON-RPC specification for Python")
10265 (description
10266 "This library is an implementation of the JSON-RPC specification.
10267 It supports both the original 1.0 specification, as well as the
10268 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10269 etc.")
10270 (license license:asl2.0)))
10271
10272 (define-public python-chai
10273 (package
10274 (name "python-chai")
10275 (version "1.1.1")
10276 (source (origin
10277 (method url-fetch)
10278 (uri (pypi-uri "chai" version))
10279 (sha256
10280 (base32
10281 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10282 (build-system python-build-system)
10283 (home-page "https://github.com/agoragames/chai")
10284 (synopsis "Mocking framework for Python")
10285 (description
10286 "Chai provides an api for mocking, stubbing and spying your python
10287 objects, patterned after the Mocha library for Ruby.")
10288 (license license:bsd-3)))
10289
10290 (define-public python2-chai
10291 (package-with-python2 python-chai))
10292
10293 (define-public python-arrow
10294 (package
10295 (name "python-arrow")
10296 (version "0.8.0")
10297 (source (origin
10298 (method url-fetch)
10299 (uri (pypi-uri "arrow" version))
10300 (sha256
10301 (base32
10302 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10303 (build-system python-build-system)
10304 (native-inputs
10305 `(;; For testing
10306 ("python-chai" ,python-chai)
10307 ("python-simplejson" ,python-simplejson)))
10308 (propagated-inputs
10309 `(("python-dateutil" ,python-dateutil-2)))
10310 (home-page "https://github.com/crsmithdev/arrow/")
10311 (synopsis "Dates and times for Python")
10312 (description
10313 "Arrow is a Python library to creating, manipulating, formatting and
10314 converting dates, times, and timestamps. It implements and updates the
10315 datetime type.")
10316 (license license:asl2.0)))
10317
10318 (define-public python2-arrow
10319 (package-with-python2 python-arrow))
10320
10321 (define-public python-inflection
10322 (package
10323 (name "python-inflection")
10324 (version "0.3.1")
10325 (source
10326 (origin (method url-fetch)
10327 (uri (pypi-uri "inflection" version))
10328 (sha256
10329 (base32
10330 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10331 (build-system python-build-system)
10332 (home-page "http://github.com/jpvanhal/inflection")
10333 (synopsis "Python string transformation library")
10334 (description
10335 "Inflection is a string transformation library. It singularizes
10336 and pluralizes English words, and transforms strings from CamelCase to
10337 underscored string.")
10338 (license license:expat)))
10339
10340 (define-public python2-inflection
10341 (package-with-python2 python-inflection))
10342
10343 (define-public python-pylev
10344 (package
10345 (name "python-pylev")
10346 (version "1.3.0")
10347 (source (origin
10348 (method url-fetch)
10349 (uri (pypi-uri "pylev" version))
10350 (sha256
10351 (base32
10352 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10353 (build-system python-build-system)
10354 (home-page "http://github.com/toastdriven/pylev")
10355 (synopsis "Levenshtein distance implementation in Python")
10356 (description "Pure Python Levenshtein implementation, based off the
10357 Wikipedia code samples at
10358 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10359 (license license:bsd-3)))
10360
10361 (define-public python2-pylev
10362 (package-with-python2 python-pylev))
10363
10364 (define-public python-cleo
10365 (package
10366 (name "python-cleo")
10367 (version "0.4.1")
10368 (source (origin
10369 (method url-fetch)
10370 (uri (pypi-uri "cleo" version))
10371 (sha256
10372 (base32
10373 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10374 (build-system python-build-system)
10375 (native-inputs
10376 `(;; For testing
10377 ("python-mock" ,python-mock)
10378 ("python-pytest" ,python-pytest)))
10379 (propagated-inputs
10380 `(("python-psutil" ,python-psutil)
10381 ("python-pylev" ,python-pylev)))
10382 (home-page "https://github.com/sdispater/cleo")
10383 (synopsis "Command-line arguments library for Python")
10384 (description
10385 "Cleo allows you to create command-line commands with signature in
10386 docstring and colored output.")
10387 (license license:expat)))
10388
10389 (define-public python2-cleo
10390 (package-with-python2 python-cleo))
10391
10392 (define-public python-lazy-object-proxy
10393 (package
10394 (name "python-lazy-object-proxy")
10395 (version "1.2.2")
10396 (source (origin
10397 (method url-fetch)
10398 (uri (pypi-uri "lazy-object-proxy" version))
10399 (sha256
10400 (base32
10401 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10402 (build-system python-build-system)
10403 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10404 (synopsis "Lazy object proxy for python")
10405 (description
10406 "Lazy object proxy is an object that wraps a callable but defers the call
10407 until the object is actually required, and caches the result of said call.")
10408 (license license:bsd-2)))
10409
10410 (define-public python2-lazy-object-proxy
10411 (package-with-python2 python-lazy-object-proxy))
10412
10413 (define-public python-dnspython
10414 (package
10415 (name "python-dnspython")
10416 (version "1.15.0")
10417 (source (origin
10418 (method url-fetch)
10419 (uri (string-append "http://www.dnspython.org/kits/"
10420 version "/dnspython-" version ".tar.gz"))
10421 (sha256
10422 (base32
10423 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10424 (build-system python-build-system)
10425 (arguments '(#:tests? #f)) ; XXX: requires internet access
10426 (home-page "http://www.dnspython.org")
10427 (synopsis "DNS toolkit for Python")
10428 (description
10429 "dnspython is a DNS toolkit for Python. It supports almost all record
10430 types. It can be used for queries, zone transfers, and dynamic updates.
10431 It supports TSIG authenticated messages and EDNS0.")
10432 (license license:expat)))
10433
10434 (define-public python2-dnspython
10435 (package-with-python2 python-dnspython))
10436
10437 (define-public python-email-validator
10438 (package
10439 (name "python-email-validator")
10440 (version "1.0.1")
10441 (source
10442 (origin (method url-fetch)
10443 (uri (pypi-uri "email_validator" version))
10444 (sha256
10445 (base32
10446 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10447 (build-system python-build-system)
10448 (arguments
10449 '(#:phases
10450 (modify-phases %standard-phases
10451 (add-before 'build 'use-dnspython
10452 (lambda _
10453 (substitute* "setup.py"
10454 (("dnspython3") "dnspython"))
10455 #t)))))
10456 (propagated-inputs
10457 `(("python-dnspython" ,python-dnspython)
10458 ("python-idna" ,python-idna)))
10459 (home-page "https://github.com/JoshData/python-email-validator")
10460 (synopsis "Email address validation library for Python")
10461 (description
10462 "This library validates email address syntax and deliverability.")
10463 (license license:cc0)))
10464
10465 (define-public python2-email-validator
10466 (package-with-python2 python-email-validator))
10467
10468 (define-public python-ukpostcodeparser
10469 (package
10470 (name "python-ukpostcodeparser")
10471 (version "1.0.3")
10472 (source (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "UkPostcodeParser" version))
10475 (sha256
10476 (base32
10477 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10478 (build-system python-build-system)
10479 (home-page "https://github.com/hamstah/ukpostcodeparser")
10480 (synopsis "UK Postcode parser for Python")
10481 (description
10482 "This library provides the @code{parse_uk_postcode} function for
10483 parsing UK postcodes.")
10484 (license license:expat)))
10485
10486 (define-public python2-ukpostcodeparser
10487 (package-with-python2 python-ukpostcodeparser))
10488
10489 (define-public python-fake-factory
10490 (package
10491 (name "python-fake-factory")
10492 (version "0.7.2")
10493 (source (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "fake-factory" version))
10496 (sha256
10497 (base32
10498 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10499 (build-system python-build-system)
10500 (native-inputs
10501 `(;; For testing
10502 ("python-email-validator" ,python-email-validator)
10503 ("python-mock" ,python-mock)
10504 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10505 (propagated-inputs
10506 `(("python-dateutil" ,python-dateutil-2)
10507 ("python-six" ,python-six)))
10508 (home-page "https://github.com/joke2k/faker")
10509 (synopsis "Python package that generates fake data")
10510 (description
10511 "Faker is a Python package that generates fake data such as names,
10512 addresses, and phone numbers.")
10513 (license license:expat)
10514 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10515
10516 (define-public python2-fake-factory
10517 (let ((base (package-with-python2 (strip-python2-variant
10518 python-fake-factory))))
10519 (package
10520 (inherit base)
10521 (propagated-inputs
10522 `(("python2-ipaddress" ,python2-ipaddress)
10523 ,@(package-propagated-inputs base))))))
10524
10525 (define-public python-pyaml
10526 (package
10527 (name "python-pyaml")
10528 (version "15.8.2")
10529 (source (origin
10530 (method url-fetch)
10531 (uri (pypi-uri "pyaml" version))
10532 (sha256
10533 (base32
10534 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10535 (build-system python-build-system)
10536 (propagated-inputs
10537 `(("python-pyyaml" ,python-pyyaml)))
10538 (home-page "https://github.com/mk-fg/pretty-yaml")
10539 (synopsis "YAML pretty-print library for Python")
10540 (description
10541 "pyaml is a PyYAML based python module to produce pretty and readable
10542 YAML-serialized data.")
10543 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10544
10545 (define-public python2-pyaml
10546 (package-with-python2 python-pyaml))
10547
10548 (define-public python-flexmock
10549 (package
10550 (name "python-flexmock")
10551 (version "0.10.2")
10552 (source (origin
10553 (method url-fetch)
10554 (uri (pypi-uri "flexmock" version))
10555 (sha256
10556 (base32
10557 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10558 (build-system python-build-system)
10559 (home-page "https://flexmock.readthedocs.org")
10560 (synopsis "Testing library for Python")
10561 (description
10562 "flexmock is a testing library for Python that makes it easy to create
10563 mocks, stubs and fakes.")
10564 (license license:bsd-3)))
10565
10566 (define-public python2-flexmock
10567 (package-with-python2 python-flexmock))
10568
10569 (define-public python-orator
10570 (package
10571 (name "python-orator")
10572 (version "0.8.2")
10573 (source (origin
10574 (method url-fetch)
10575 (uri (pypi-uri "orator" version))
10576 (sha256
10577 (base32
10578 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10579 (build-system python-build-system)
10580 (arguments '(#:tests? #f)) ; no tests
10581 (propagated-inputs
10582 `(("python-arrow" ,python-arrow)
10583 ("python-blinker" ,python-blinker)
10584 ("python-cleo" ,python-cleo)
10585 ("python-fake-factory" ,python-fake-factory)
10586 ("python-inflection" ,python-inflection)
10587 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10588 ("python-pyaml" ,python-pyaml)
10589 ("python-simplejson" ,python-simplejson)
10590 ("python-wrapt" ,python-wrapt)))
10591 (home-page "https://orator-orm.com/")
10592 (synopsis "ActiveRecord ORM for Python")
10593 (description
10594 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10595 implementation for Python.")
10596 (license license:expat)
10597 (properties `((python2-variant . ,(delay python2-orator))))))
10598
10599 (define-public python2-orator
10600 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10601 (package
10602 (inherit base)
10603 (propagated-inputs
10604 `(("python2-ipaddress" ,python2-ipaddress)
10605 ,@(package-propagated-inputs base))))))
10606
10607 (define-public python-prompt-toolkit
10608 (package
10609 (name "python-prompt-toolkit")
10610 (version "1.0.7")
10611 (source
10612 (origin
10613 (method url-fetch)
10614 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10615 (sha256
10616 (base32
10617 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10618 (build-system python-build-system)
10619 (arguments
10620 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10621 (inputs `(("python-wcwidth" ,python-wcwidth)
10622 ("python-pygments" ,python-pygments)))
10623 (native-inputs `(("python-six" ,python-six)))
10624 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10625 (synopsis "Library for building command line interfaces in Python")
10626 (description
10627 "Prompt-Toolkit is a library for building interactive command line
10628 interfaces in Python. It's like GNU Readline but it also features syntax
10629 highlighting while typing, out-of-the-box multi-line input editing, advanced
10630 code completion, incremental search, support for Chinese double-width
10631 characters, mouse support, and auto suggestions.")
10632 (license license:bsd-3)
10633 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10634
10635 (define-public python2-prompt-toolkit
10636 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10637 (package
10638 (inherit base)
10639 (native-inputs
10640 `(("python2-setuptools" ,python2-setuptools)
10641 ,@(package-native-inputs base))))))
10642
10643 (define-public python-jedi
10644 (package
10645 (name "python-jedi")
10646 (version "0.9.0")
10647 (source
10648 (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "jedi" version))
10651 (sha256
10652 (base32
10653 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10654 (build-system python-build-system)
10655 (home-page "https://github.com/davidhalter/jedi")
10656 (synopsis
10657 "Autocompletion for Python that can be used for text editors")
10658 (description
10659 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10660 (license license:expat)
10661 (properties `((python2-variant . ,(delay python2-jedi))))))
10662
10663 (define-public python2-jedi
10664 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10665 (package
10666 (inherit base)
10667 (native-inputs
10668 `(("python2-setuptools" ,python2-setuptools)
10669 ,@(package-native-inputs base))))))
10670
10671 (define-public ptpython
10672 (package
10673 (name "ptpython")
10674 (version "0.34")
10675 (source (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "ptpython" version))
10678 (sha256
10679 (base32
10680 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10681 (build-system python-build-system)
10682 (inputs
10683 `(("python-docopt" ,python-docopt)
10684 ("python-jedi" ,python-jedi)
10685 ("python-prompt-toolkit" ,python-prompt-toolkit)
10686 ("python-pygments" ,python-pygments)))
10687 (home-page "https://github.com/jonathanslenders/ptpython")
10688 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10689 (description
10690 "ptpython is a Python read-eval-print loop with IDE-like features.
10691 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10692 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10693 etc.")
10694 (license license:bsd-3)
10695 (properties `((python2-variant . ,(delay ptpython-2))))))
10696
10697 (define-public ptpython-2
10698 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10699 (package
10700 (inherit base)
10701 (name "ptpython2"))))
10702
10703 (define-public python-requests-oauthlib
10704 (package
10705 (name "python-requests-oauthlib")
10706 (version "0.6.2")
10707 (source
10708 (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "requests-oauthlib" version))
10711 (sha256
10712 (base32
10713 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10714 (build-system python-build-system)
10715 (arguments
10716 `(#:phases
10717 (modify-phases %standard-phases
10718 ;; removes tests that require network access
10719 (add-before 'check 'pre-check
10720 (lambda _
10721 (delete-file "tests/test_core.py")
10722 #t)))))
10723 (native-inputs
10724 `(("python-requests-mock" ,python-requests-mock)
10725 ("python-mock" ,python-mock)))
10726 (inputs
10727 `(("python-oauthlib" ,python-oauthlib)
10728 ("python-requests" ,python-requests)))
10729 (home-page
10730 "https://github.com/requests/requests-oauthlib")
10731 (synopsis
10732 "OAuthlib authentication support for Requests")
10733 (description
10734 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10735 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10736 (license license:isc)
10737 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10738
10739 (define-public python2-requests-oauthlib
10740 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10741 (package
10742 (inherit base)
10743 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10744 ,@(package-native-inputs base))))))
10745
10746 (define-public python-stem
10747 (package
10748 (name "python-stem")
10749 (version "1.4.1b")
10750 (source
10751 (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "stem" version ".tar.bz2"))
10754 (sha256
10755 (base32
10756 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10757 (build-system python-build-system)
10758 (arguments
10759 `(#:phases
10760 (modify-phases %standard-phases
10761 (replace 'check
10762 (lambda _
10763 (zero? (system* "./run_tests.py" "--unit")))))))
10764 (native-inputs
10765 `(("python-mock" ,python-mock)
10766 ("python-pep8" ,python-pep8)
10767 ("python-pyflakes" ,python-pyflakes)))
10768 (inputs
10769 `(("python-pycrypto" ,python-pycrypto)))
10770 (home-page "https://stem.torproject.org/")
10771 (synopsis
10772 "Python controller library that allows applications to interact with Tor")
10773 (description
10774 "Stem is a Python controller library for Tor. With it you can use Tor's
10775 control protocol to script against the Tor process and read descriptor data
10776 relays publish about themselves.")
10777 (license license:lgpl3)))
10778
10779 (define-public python2-stem
10780 (package-with-python2 python-stem))
10781
10782 (define-public python-pyserial
10783 (package
10784 (name "python-pyserial")
10785 (version "3.1.1")
10786 (source
10787 (origin
10788 (method url-fetch)
10789 (uri (pypi-uri "pyserial" version))
10790 (sha256
10791 (base32
10792 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10793 (build-system python-build-system)
10794 (home-page
10795 "https://github.com/pyserial/pyserial")
10796 (synopsis "Python Serial Port Bindings")
10797 (description "@code{pyserial} provide serial port bindings for Python. It
10798 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10799 and/or Xon/Xoff. The port is accessed in RAW mode.")
10800 (license license:bsd-3)
10801 (properties `((python2-variant . ,(delay python2-pyserial))))))
10802
10803 (define-public python2-pyserial
10804 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10805 (package
10806 (inherit base)
10807 (native-inputs
10808 `(("python2-setuptools" ,python2-setuptools)
10809 ,@(package-native-inputs base))))))
10810
10811 (define-public python-kivy
10812 (package
10813 (name "python-kivy")
10814 (version "1.9.1")
10815 (source
10816 (origin
10817 (method url-fetch)
10818 (uri (pypi-uri "kivy" version))
10819 (file-name (string-append name "-" version ".tar.gz"))
10820 (sha256
10821 (base32
10822 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10823 (build-system python-build-system)
10824 (arguments
10825 `(#:tests? #f ; Tests require many optional packages
10826 #:phases
10827 (modify-phases %standard-phases
10828 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10829 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10830 (lambda* (#:key inputs #:allow-other-keys)
10831 (setenv "KIVY_SDL2_PATH"
10832 (string-append (assoc-ref inputs "sdl-union")
10833 "/include/SDL2"))
10834 #t)))))
10835 (native-inputs
10836 `(("pkg-config" ,pkg-config)))
10837 (inputs
10838 `(("python-cython" ,python-cython)
10839 ("gstreamer" ,gstreamer)
10840 ("mesa" ,mesa)
10841 ("sdl-union"
10842 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10843 (home-page "http://kivy.org")
10844 (synopsis
10845 "Multitouch application framework")
10846 (description
10847 "A software library for rapid development of
10848 hardware-accelerated multitouch applications.")
10849 (license license:expat)))
10850
10851 (define-public python2-kivy
10852 (package-with-python2 python-kivy))
10853
10854 (define-public python-kivy-next
10855 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10856 (revision "1"))
10857 (package (inherit python-kivy)
10858 (name "python-kivy-next")
10859 (version (string-append "1.9.1-" revision "."
10860 (string-take commit 7)))
10861 (source
10862 (origin
10863 (method git-fetch)
10864 (uri (git-reference
10865 (url "https://github.com/kivy/kivy")
10866 (commit commit)))
10867 (file-name (string-append name "-" version "-checkout"))
10868 (sha256
10869 (base32
10870 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10871
10872 (define-public python2-kivy-next
10873 (package-with-python2 python-kivy-next))
10874
10875 (define-public python-binaryornot
10876 (package
10877 (name "python-binaryornot")
10878 (version "0.4.0")
10879 (source (origin
10880 (method url-fetch)
10881 (uri (pypi-uri "binaryornot" version))
10882 (sha256
10883 (base32
10884 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10885 (build-system python-build-system)
10886 (inputs
10887 `(("python-chardet" ,python-chardet)
10888 ("python-hypothesis" ,python-hypothesis)))
10889 (home-page "https://github.com/audreyr/binaryornot")
10890 (synopsis "Package to check if a file is binary or text")
10891 (description "Ultra-lightweight pure Python package to check if a file is
10892 binary or text.")
10893 (license license:bsd-3)
10894 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10895
10896 (define-public python2-binaryornot
10897 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10898 (package (inherit base)
10899 (native-inputs
10900 `(("python2-setuptools" ,python2-setuptools)
10901 ,@(package-native-inputs base)))
10902 (inputs
10903 `(("python2-enum34" ,python2-enum34)
10904 ,@(package-inputs base))))))
10905
10906 (define-public python-nltk
10907 (package
10908 (name "python-nltk")
10909 (version "3.2.1")
10910 (source (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "nltk" version))
10913 (sha256
10914 (base32
10915 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10916 (build-system python-build-system)
10917 (arguments
10918 '(;; The tests require some extra resources to be downloaded.
10919 ;; TODO Try packaging these resources.
10920 #:tests? #f))
10921 (home-page "http://nltk.org/")
10922 (synopsis "Natural Language Toolkit")
10923 (description "It provides interfaces to over 50 corpora and lexical
10924 resources such as WordNet, along with a suite of text processing libraries
10925 for classification, tokenization, stemming, tagging, parsing, and semantic
10926 reasoning, wrappers for natural language processing libraries.")
10927 (license license:asl2.0)
10928 (properties `((python2-variant . ,(delay python2-nltk))))))
10929
10930 (define-public python2-nltk
10931 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10932 (package (inherit base)
10933 (native-inputs
10934 `(("python2-setuptools" ,python2-setuptools)
10935 ,@(package-native-inputs base))))))
10936
10937 (define-public python-pymongo
10938 (package
10939 (name "python-pymongo")
10940 (version "3.3.0")
10941 (source (origin
10942 (method url-fetch)
10943 (uri (pypi-uri "pymongo" version))
10944 (sha256
10945 (base32
10946 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10947 (build-system python-build-system)
10948 (inputs
10949 `(("python-certifi" ,python-certifi)))
10950 (home-page "http://github.com/mongodb/mongo-python-driver")
10951 (synopsis "Python driver for MongoDB")
10952 (description "Python driver for MongoDB.")
10953 (license license:asl2.0)
10954 (properties `((python2-variant . ,(delay python2-pymongo))))))
10955
10956 (define-public python2-pymongo
10957 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10958 (package (inherit base)
10959 (native-inputs
10960 `(("python2-setuptools" ,python2-setuptools)
10961 ,@(package-native-inputs base))))))
10962
10963 (define-public python-sh
10964 (package
10965 (name "python-sh")
10966 (version "1.11")
10967 (source (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "sh" version))
10970 (sha256
10971 (base32
10972 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10973 (build-system python-build-system)
10974 (arguments
10975 `(#:tests? #f)) ; no tests
10976 (home-page "https://github.com/amoffat/sh")
10977 (synopsis "Python subprocess interface")
10978 (description "Abstracts process invocation by providing a function
10979 interface for programs.")
10980 (license license:expat)
10981 (properties `((python2-variant . ,(delay python2-sh))))))
10982
10983 (define-public python2-sh
10984 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10985 (package (inherit base)
10986 (native-inputs
10987 `(("python2-setuptools" ,python2-setuptools)
10988 ,@(package-native-inputs base))))))
10989
10990 (define-public python-consul
10991 (package
10992 (name "python-consul")
10993 (version "0.6.1")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "python-consul" version))
10998 (sha256
10999 (base32
11000 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11001 (build-system python-build-system)
11002 (native-inputs
11003 `(("python-pytest" ,python-pytest)
11004 ("python-requests" ,python-requests)
11005 ("python-six" ,python-six)))
11006 (home-page "https://github.com/cablehead/python-consul")
11007 (synopsis "Python client for Consul")
11008 (description
11009 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11010 discovery, monitoring and configuration.")
11011 (license license:expat)))
11012
11013 (define-public python2-consul
11014 (let ((consul (package-with-python2 python-consul)))
11015 (package (inherit consul)
11016 (native-inputs
11017 `(("python2-setuptools" ,python2-setuptools)
11018 ,@(package-native-inputs consul))))))
11019
11020 (define-public python-schematics
11021 (package
11022 (name "python-schematics")
11023 (version "1.1.1")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (string-append
11028 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11029 (file-name (string-append name "-" version ".tar.gz"))
11030 (sha256
11031 (base32
11032 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11033 (build-system python-build-system)
11034 (inputs
11035 `(("python-six" ,python-six)))
11036 (arguments
11037 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11038 ; version requirements (eg python-coveralls)
11039 (home-page "https://github.com/schematics/schematics")
11040 (synopsis "Python Data Structures for Humans")
11041 (description "Python Data Structures for Humans.")
11042 (license license:bsd-3)
11043 (properties `((python2-variant . ,(delay python2-schematics))))))
11044
11045 (define-public python2-schematics
11046 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
11047 (package (inherit base)
11048 (native-inputs
11049 `(("python2-setuptools" ,python2-setuptools)
11050 ,@(package-native-inputs base))))))
11051
11052 (define-public python-publicsuffix
11053 (package
11054 (name "python-publicsuffix")
11055 (version "1.1.0")
11056 (source (origin
11057 (method url-fetch)
11058 (uri (pypi-uri "publicsuffix" version))
11059 (sha256
11060 (base32
11061 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11062 (build-system python-build-system)
11063 (arguments
11064 `(#:tests? #f)) ; tests use the internet
11065 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11066 (synopsis "Get suffix for a domain name")
11067 (description "Get a public suffix for a domain name using the Public Suffix
11068 List.")
11069 (license license:expat)
11070 (properties `((python2-variant . ,(delay python2-nltk))))))
11071
11072 (define-public python2-publicsuffix
11073 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
11074 (package (inherit base)
11075 (native-inputs
11076 `(("python2-setuptools" ,python2-setuptools)
11077 ,@(package-native-inputs base))))))
11078
11079 (define-public python-publicsuffix2
11080 (package
11081 (name "python-publicsuffix2")
11082 (version "2.20160621")
11083 (source
11084 (origin
11085 (method url-fetch)
11086 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11087 (sha256
11088 (base32
11089 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11090 (build-system python-build-system)
11091 (arguments
11092 '(#:tests? #f)) ; The test suite requires network access.
11093 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11094 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11095 (description "Get a public suffix for a domain name using the Public Suffix
11096 List. Forked from and using the same API as the publicsuffix package.")
11097 (license (list license:expat license:mpl2.0))
11098 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
11099
11100 (define-public python2-publicsuffix2
11101 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
11102 (package (inherit base)
11103 (native-inputs
11104 `(("python2-setuptools" ,python2-setuptools)
11105 ,@(package-native-inputs base))))))
11106
11107 (define-public python-url
11108 (package
11109 (name "python-url")
11110 (version "0.2.0")
11111 (source (origin
11112 (method url-fetch)
11113 (uri (pypi-uri "url" version))
11114 (sha256
11115 (base32
11116 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11117 (build-system python-build-system)
11118 (inputs
11119 `(("python-publicsuffix" ,python-publicsuffix)))
11120 (native-inputs
11121 `(("python-coverage" ,python-coverage)
11122 ("python-nose" ,python-nose)))
11123 (arguments
11124 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11125 (home-page "http://github.com/seomoz/url-py")
11126 (synopsis "URL Parsing")
11127 (description "Library for parsing urls.")
11128 (license license:expat)
11129 (properties `((python2-variant . ,(delay python2-url))))))
11130
11131 (define-public python2-url
11132 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11133 (package (inherit base)
11134 (inputs
11135 `(("python2-publicsuffix" ,python2-publicsuffix)))
11136 (native-inputs
11137 `(("python2-setuptools" ,python2-setuptools)
11138 ,@(package-native-inputs base))))))
11139
11140 (define-public python-freezegun
11141 (package
11142 (name "python-freezegun")
11143 (version "0.3.7")
11144 (source
11145 (origin
11146 (method url-fetch)
11147 (uri (pypi-uri "freezegun" version))
11148 (sha256
11149 (base32
11150 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11151 (build-system python-build-system)
11152 (native-inputs
11153 `(("python-mock" ,python-mock)
11154 ("python-nose" ,python-nose)
11155 ("python-coverage" ,python-coverage)
11156 ("python-dateutil-2" ,python-dateutil-2)))
11157 (inputs
11158 `(("python-six" ,python-six)))
11159 (arguments
11160 `(#:phases (modify-phases %standard-phases
11161 ;; The tests are normally executed via `make test`, but the PyPi
11162 ;; package does not include the Makefile.
11163 (replace 'check
11164 (lambda _
11165 (zero? (system* "nosetests" "./tests/")))))))
11166 (home-page "https://github.com/spulec/freezegun")
11167 (synopsis "Test utility for mocking the datetime module")
11168 (description
11169 "FreezeGun is a library that allows your python tests to travel through
11170 time by mocking the datetime module.")
11171 (license license:asl2.0)))
11172
11173 (define-public python2-freezegun
11174 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
11175 (package (inherit base)
11176 (native-inputs
11177 `(("python2-setuptools" ,python2-setuptools)
11178 ,@(package-native-inputs base))))))
11179
11180 (define-public python-odfpy
11181 (package
11182 (name "python-odfpy")
11183 (version "1.3.3")
11184 (source (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "odfpy" version))
11187 (sha256
11188 (base32
11189 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11190 (arguments
11191 `(#:modules ((srfi srfi-1)
11192 (guix build python-build-system)
11193 (guix build utils))
11194 #:phases
11195 (modify-phases %standard-phases
11196 (replace 'check
11197 ;; The test runner invokes python2 and python3 for test*.py.
11198 ;; To avoid having both in inputs, we replicate it here.
11199 (lambda _
11200 (every (lambda (test-file)
11201 (zero? (system* "python" test-file)))
11202 (find-files "tests" "^test.*\\.py$")))))))
11203 (build-system python-build-system)
11204 (home-page "https://github.com/eea/odfpy")
11205 (synopsis "Python API and tools to manipulate OpenDocument files")
11206 (description "Collection of libraries and utility programs written in
11207 Python to manipulate OpenDocument 1.2 files.")
11208 (license
11209 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11210 ;; number of files with other licenses.
11211 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11212
11213 (define-public python2-odfpy
11214 (package-with-python2 python-odfpy))
11215
11216 (define-public python-cachecontrol
11217 (package
11218 (name "python-cachecontrol")
11219 (version "0.11.6")
11220 (source
11221 (origin
11222 (method url-fetch)
11223 ;; Pypi does not have tests.
11224 (uri (string-append
11225 "https://github.com/ionrock/cachecontrol/archive/v"
11226 version ".tar.gz"))
11227 (file-name (string-append name "-" version ".tar.gz"))
11228 (sha256
11229 (base32
11230 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11231 (build-system python-build-system)
11232 (arguments
11233 `(#:phases
11234 (modify-phases %standard-phases
11235 (replace 'check
11236 (lambda _
11237 ;; Drop test that requires internet access.
11238 (delete-file "tests/test_regressions.py")
11239 (setenv "PYTHONPATH"
11240 (string-append (getcwd) "/build/lib:"
11241 (getenv "PYTHONPATH")))
11242 (zero? (system* "py.test" "-vv")))))))
11243 (native-inputs
11244 `(("python-pytest" ,python-pytest)
11245 ("python-redis" ,python-redis)
11246 ("python-webtest" ,python-webtest)
11247 ("python-mock" ,python-mock)))
11248 (propagated-inputs
11249 `(("python-requests" ,python-requests)
11250 ("python-lockfile" ,python-lockfile)))
11251 (home-page "https://github.com/ionrock/cachecontrol")
11252 (synopsis "The httplib2 caching algorithms for use with requests")
11253 (description "CacheControl is a port of the caching algorithms in
11254 @code{httplib2} for use with @code{requests} session objects.")
11255 (license license:asl2.0)
11256 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
11257
11258 (define-public python2-cachecontrol
11259 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
11260 (package (inherit base)
11261 (native-inputs
11262 `(("python2-setuptools" ,python2-setuptools)
11263 ,@(package-native-inputs base))))))
11264
11265 (define-public python-lit
11266 (package
11267 (name "python-lit")
11268 (version "0.5.0")
11269 (source
11270 (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "lit" version))
11273 (sha256
11274 (base32
11275 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11276 (build-system python-build-system)
11277 (home-page "http://llvm.org/")
11278 (synopsis "LLVM Software Testing Tool")
11279 (description "@code{lit} is a portable tool for executing LLVM and Clang
11280 style test suites, summarizing their results, and providing indication of
11281 failures.")
11282 (license license:ncsa)
11283 (properties `((python2-variant . ,(delay python2-lit))))))
11284
11285 (define-public python2-lit
11286 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
11287 (package
11288 (inherit base)
11289 (native-inputs
11290 `(("python2-setuptools" ,python2-setuptools)
11291 ,@(package-native-inputs base))))))
11292
11293 (define-public python-pytest-pep8
11294 (package
11295 (name "python-pytest-pep8")
11296 (version "1.0.6")
11297 (source (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "pytest-pep8" version))
11300 (sha256
11301 (base32
11302 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11303 (build-system python-build-system)
11304 (arguments
11305 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11306 ;; Prevent creation of the egg. This works around
11307 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11308 #:configure-flags '("--single-version-externally-managed" "--root=/")))
11309 (native-inputs
11310 `(("python-pytest" ,python-pytest)))
11311 (propagated-inputs
11312 `(("python-pep8" ,python-pep8)))
11313 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11314 (synopsis "Py.test plugin to check PEP8 requirements")
11315 (description "Pytest plugin for checking PEP8 compliance.")
11316 (license license:expat)
11317 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
11318
11319 (define-public python2-pytest-pep8
11320 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
11321 (package (inherit base)
11322 (native-inputs
11323 `(("python2-setuptools" ,python2-setuptools)
11324 ,@(package-native-inputs base))))))
11325
11326 (define-public python-pytest-flakes
11327 (package
11328 (name "python-pytest-flakes")
11329 (version "1.0.1")
11330 (source (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "pytest-flakes" version))
11333 (sha256
11334 (base32
11335 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11336 (build-system python-build-system)
11337 (arguments
11338 `(;; Prevent creation of the egg. This works around
11339 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11340 #:configure-flags '("--single-version-externally-managed" "--root=/")
11341 #:phases
11342 (modify-phases %standard-phases
11343 (delete 'check)
11344 (add-after 'install 'check
11345 (lambda _ ; It's easier to run tests after install.
11346 (zero? (system* "py.test" "-vv")))))))
11347 (native-inputs
11348 `(("python-coverage" ,python-coverage)
11349 ("python-pytest" ,python-pytest)
11350 ("python-pytest-cache" ,python-pytest-cache)
11351 ("python-pytest-pep8" ,python-pytest-pep8)))
11352 (propagated-inputs
11353 `(("python-pyflakes" ,python-pyflakes)))
11354 (home-page "https://github.com/fschulze/pytest-flakes")
11355 (synopsis "Py.test plugin to check source code with pyflakes")
11356 (description "Pytest plugin for checking Python source code with pyflakes.")
11357 (license license:expat)
11358 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
11359
11360 (define-public python2-pytest-flakes
11361 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
11362 (package (inherit base)
11363 (native-inputs
11364 `(("python2-setuptools" ,python2-setuptools)
11365 ,@(package-native-inputs base))))))
11366
11367 (define-public python-natsort
11368 (package
11369 (name "python-natsort")
11370 (version "5.0.1")
11371 (source (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "natsort" version))
11374 (sha256
11375 (base32
11376 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:phases
11380 (modify-phases %standard-phases
11381 (add-before 'check 'set-cachedir
11382 ;; Tests require write access to $HOME by default
11383 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11384 (native-inputs
11385 `(("python-hypothesis" ,python-hypothesis)
11386 ("python-pytest-cache" ,python-pytest-cache)
11387 ("python-pytest-cov" ,python-pytest-cov)
11388 ("python-pytest-flakes" ,python-pytest-flakes)
11389 ("python-pytest-pep8" ,python-pytest-pep8)))
11390 (propagated-inputs ; TODO: Add python-fastnumbers.
11391 `(("python-pyicu" ,python-pyicu)))
11392 (home-page "https://github.com/SethMMorton/natsort")
11393 (synopsis "Natural sorting for python and shell")
11394 (description
11395 "Natsort lets you apply natural sorting on lists instead of
11396 lexicographical. If you use the built-in @code{sorted} method in python
11397 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11398 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11399 function @code{natsorted} that identifies numbers and sorts them separately
11400 from strings. It can also sort version numbers, real numbers, mixed types
11401 and more, and comes with a shell command @command{natsort} that exposes this
11402 functionality in the command line.")
11403 (license license:expat)
11404 (properties `((python2-variant . ,(delay python2-natsort))))))
11405
11406 (define-public python2-natsort
11407 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11408 (package (inherit base)
11409 (native-inputs
11410 `(("python2-setuptools" ,python2-setuptools)
11411 ("python2-pathlib" ,python2-pathlib)
11412 ("python2-mock" ,python2-mock)
11413 ("python2-enum34" ,python2-enum34)
11414 ,@(package-native-inputs base))))))
11415
11416 (define-public python-glances
11417 (package
11418 (name "python-glances")
11419 (version "2.7.1")
11420 (source
11421 (origin
11422 (method url-fetch)
11423 (uri (pypi-uri "Glances" version))
11424 (sha256
11425 (base32
11426 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11427 (build-system python-build-system)
11428 (inputs
11429 `(("python-psutil" ,python-psutil)))
11430 (home-page
11431 "https://github.com/nicolargo/glances")
11432 (synopsis
11433 "A cross-platform curses-based monitoring tool")
11434 (description
11435 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11436 Glances uses the PsUtil library to get information from your system. It monitors
11437 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11438 (license license:lgpl3+)
11439 (properties `((python2-variant . ,(delay python2-glances))))))
11440
11441 (define-public python2-glances
11442 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11443 (package
11444 (inherit base)
11445 (native-inputs
11446 `(("python2-setuptools" ,python2-setuptools)
11447 ,@(package-native-inputs base))))))
11448
11449 (define-public python-graphql-core
11450 (package
11451 (name "python-graphql-core")
11452 (version "0.5.3")
11453 (source
11454 (origin
11455 (method url-fetch)
11456 (uri (pypi-uri "graphql-core" version))
11457 (sha256
11458 (base32
11459 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11460 (build-system python-build-system)
11461 (arguments
11462 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11463 #:phases
11464 (modify-phases %standard-phases
11465 (add-after 'unpack 'patch-hardcoded-version
11466 (lambda _ (substitute*
11467 "setup.py"
11468 (("'gevent==1.1rc1'") "'gevent'"))
11469 #t)))))
11470 (native-inputs
11471 `(("python-gevent" ,python-gevent)
11472 ("python-mock" ,python-mock)
11473 ("python-pytest-mock" ,python-pytest-mock)))
11474 (inputs
11475 `(("python-promise" ,python-promise)
11476 ("python-six" ,python-six)))
11477 (home-page "https://github.com/graphql-python/graphql-core")
11478 (synopsis "GraphQL implementation for Python")
11479 (description
11480 "GraphQL implementation for Python. GraphQL is a data query language and
11481 runtime designed and used to request and deliver data to mobile and web apps.
11482 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11483 to Python.")
11484 (properties `((python2-variant . ,(delay python2-graphql-core))))
11485 (license license:expat)))
11486
11487 (define-public python2-graphql-core
11488 (let ((base (package-with-python2
11489 (strip-python2-variant python-graphql-core))))
11490 (package (inherit base)
11491 (native-inputs
11492 `(("python2-setuptools" ,python2-setuptools)
11493 ,@(package-native-inputs base))))))
11494
11495 (define-public python-graphql-relay
11496 (package
11497 (name "python-graphql-relay")
11498 (version "0.4.4")
11499 (source
11500 (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "graphql-relay" version))
11503 (sha256
11504 (base32
11505 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11506 (build-system python-build-system)
11507 (native-inputs
11508 `(("python-pytest" ,python-pytest)))
11509 (inputs
11510 `(("python-graphql-core" ,python-graphql-core)
11511 ("python-promise" ,python-promise)
11512 ("python-six" ,python-six)))
11513 (home-page "https://github.com/graphql-python/graphql-relay-py")
11514 (synopsis "Relay implementation for Python")
11515 (description
11516 "This is a library to allow the easy creation of Relay-compliant servers
11517 using the GraphQL Python reference implementation of a GraphQL server. It
11518 should be noted that the code is a exact port of the original
11519 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11520 from Facebook.")
11521 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11522 (license license:expat)))
11523
11524 (define-public python2-graphql-relay
11525 (let ((base (package-with-python2
11526 (strip-python2-variant python-graphql-relay))))
11527 (package (inherit base)
11528 (native-inputs
11529 `(("python2-setuptools" ,python2-setuptools)
11530 ,@(package-native-inputs base))))))
11531
11532 (define-public python-graphene
11533 (package
11534 (name "python-graphene")
11535 (version "0.10.2")
11536 (source
11537 (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "graphene" version))
11540 (sha256
11541 (base32
11542 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11543 (build-system python-build-system)
11544 (native-inputs
11545 `(("python-django-filter" ,python-django-filter)
11546 ("python-mock" ,python-mock)
11547 ("python-psycopg2" ,python-psycopg2)
11548 ("python-pytest-django" ,python-pytest-django)
11549 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11550 (inputs
11551 `(("python-graphql-core" ,python-graphql-core)
11552 ("python-graphql-relay" ,python-graphql-relay)
11553 ("python-iso8601" ,python-iso8601)
11554 ("python-promise" ,python-promise)
11555 ("python-six" ,python-six)))
11556 (home-page "http://graphene-python.org/")
11557 (synopsis "GraphQL Framework for Python")
11558 (description
11559 "Graphene is a Python library for building GraphQL schemas/types.
11560 A GraphQL schema describes your data model, and provides a GraphQL server
11561 with an associated set of resolve methods that know how to fetch data.")
11562 (properties `((python2-variant . ,(delay python2-graphene))))
11563 (license license:expat)))
11564
11565 (define-public python2-graphene
11566 (let ((base (package-with-python2
11567 (strip-python2-variant python-graphene))))
11568 (package (inherit base)
11569 (native-inputs
11570 `(("python2-setuptools" ,python2-setuptools)
11571 ("python2-sqlalchemy" ,python2-sqlalchemy)
11572 ,@(package-native-inputs base))))))
11573
11574 (define-public python-nautilus
11575 (package
11576 (name "python-nautilus")
11577 (version "0.4.9")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "nautilus" version))
11582 (sha256
11583 (base32
11584 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11585 (build-system python-build-system)
11586 (arguments `(#:tests? #f)) ; fails to import test modules
11587 (inputs
11588 `(("python-bcrypt" ,python-bcrypt)
11589 ("python-click" ,python-click)
11590 ("python-consul" ,python-consul)
11591 ("python-graphql-core" ,python-graphql-core)
11592 ("python-graphql-relay" ,python-graphql-relay)
11593 ("python-graphene" ,python-graphene)
11594 ("python-jinja2" ,python-jinja2)
11595 ("python-nose2" ,python-nose2)
11596 ("python-peewee" ,python-peewee)
11597 ("python-pika" ,python-pika)
11598 ("python-pycparser" ,python-pycparser)
11599 ("python-requests" ,python-requests)
11600 ("python-tornado" ,python-tornado)
11601 ("python-wtforms" ,python-wtforms)))
11602 (home-page "https://github.com/AlecAivazis/nautilus")
11603 (synopsis "Library for creating microservice applications")
11604 (description
11605 "Nautilus is a framework for flux based microservices that looks to
11606 provide extendible implementations of common aspects of a cloud so that you can
11607 focus on building massively scalable web applications.")
11608 (license license:expat)))
11609
11610 (define-public python-betamax
11611 (package
11612 (name "python-betamax")
11613 (version "0.8.0")
11614 (source
11615 (origin
11616 (method url-fetch)
11617 (uri (pypi-uri "betamax" version))
11618 (sha256
11619 (base32
11620 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11621 (build-system python-build-system)
11622 (arguments
11623 '(;; Many tests fail because they require networking.
11624 #:tests? #f))
11625 (inputs
11626 `(("python-requests" ,python-requests)))
11627 (home-page "https://github.com/sigmavirus24/betamax")
11628 (synopsis "Record HTTP interactions with python-requests")
11629 (description "Betamax will record your test suite's HTTP interactions and
11630 replay them during future tests. It is designed to work with python-requests.")
11631 (license license:expat)
11632 (properties `((python2-variant . ,(delay python2-betamax))))))
11633
11634 (define-public python2-betamax
11635 (let ((base (package-with-python2 (strip-python2-variant python-betamax))))
11636 (package
11637 (inherit base)
11638 (native-inputs
11639 `(("python2-setuptools" ,python2-setuptools)
11640 ,@(package-native-inputs base))))))
11641
11642 (define-public python-s3transfer
11643 (package
11644 (name "python-s3transfer")
11645 (version "0.1.8")
11646 (source (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "s3transfer" version))
11649 (sha256
11650 (base32
11651 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11652 (build-system python-build-system)
11653 (arguments
11654 `(#:phases
11655 (modify-phases %standard-phases
11656 (replace 'check
11657 (lambda _
11658 ;; 7 of the 'integration' tests require network access or login
11659 ;; credentials.
11660 (zero? (system* "nosetests" "--exclude=integration")))))))
11661 (native-inputs
11662 `(("python-docutils" ,python-docutils)
11663 ("python-mock" ,python-mock)
11664 ("python-nose" ,python-nose)))
11665 (inputs
11666 `(("python-botocore" ,python-botocore)))
11667 (synopsis "Amazon S3 Transfer Manager")
11668 (description "S3transfer is a Python library for managing Amazon S3
11669 transfers.")
11670 (home-page "https://github.com/boto/s3transfer")
11671 (license license:asl2.0)
11672 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11673
11674 (define-public python2-s3transfer
11675 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11676 (package
11677 (inherit base)
11678 (native-inputs
11679 `(("python2-futures" ,python2-futures)
11680 ,@(package-native-inputs base))))))
11681
11682 (define-public python-setproctitle
11683 (package
11684 (name "python-setproctitle")
11685 (version "1.1.10")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "setproctitle" version))
11690 (sha256
11691 (base32
11692 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11693 (build-system python-build-system)
11694 (arguments
11695 '(#:phases
11696 (modify-phases %standard-phases
11697 (add-before 'check 'patch-Makefile
11698 ;; Stricly this is only required for the python2 variant.
11699 ;; But adding a phase in an inherited package seems to be
11700 ;; cumbersum. So we patch even for python3.
11701 (lambda _
11702 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11703 (when nose
11704 (substitute* "Makefile"
11705 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11706 (string-append nose "/bin/nosetests "))))
11707 #t)))
11708 (replace 'check
11709 (lambda _
11710 (setenv "PYTHON" (or (which "python3") (which "python")))
11711 (setenv "PYCONFIG" (or (which "python3-config")
11712 (which "python-config")))
11713 (setenv "CC" "gcc")
11714 ;; No need to extend PYTHONPATH to find the built package, since
11715 ;; the Makefile will build anyway
11716 (zero? (system* "make" "check")))))))
11717 (native-inputs
11718 `(("procps" ,procps))) ; required for tests
11719 (home-page
11720 "https://github.com/dvarrazzo/py-setproctitle")
11721 (synopsis
11722 "Setproctitle implementation for Python to customize the process title")
11723 (description "The library allows a process to change its title (as displayed
11724 by system tools such as ps and top).
11725
11726 Changing the title is mostly useful in multi-process systems, for
11727 example when a master process is forked: changing the children's title
11728 allows to identify the task each process is busy with. The technique
11729 is used by PostgreSQL and the OpenSSH Server for example.")
11730 (license license:bsd-3)
11731 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11732
11733 (define-public python2-setproctitle
11734 (let ((base (package-with-python2
11735 (strip-python2-variant python-setproctitle))))
11736 (package
11737 (inherit base)
11738 (native-inputs `(("python2-nose" ,python2-nose)
11739 ,@(package-native-inputs base))))))
11740
11741 (define-public python-validictory
11742 (package
11743 (name "python-validictory")
11744 (version "1.0.1")
11745 (source
11746 (origin
11747 (method url-fetch)
11748 (uri (pypi-uri "validictory" version))
11749 (sha256
11750 (base32
11751 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11752 (build-system python-build-system)
11753 (arguments
11754 '(#:phases
11755 (modify-phases %standard-phases
11756 (add-after 'unpack 'bootstrap
11757 ;; Move the tests out of the package directory to avoid
11758 ;; packaging them.
11759 (lambda* _
11760 (rename-file "validictory/tests" "tests")
11761 (delete-file "tests/__init__.py")))
11762 (replace 'check
11763 (lambda _
11764 ;; Extend PYTHONPATH so the built package will be found.
11765 (setenv "PYTHONPATH"
11766 (string-append (getcwd) "/build/lib:"
11767 (getenv "PYTHONPATH")))
11768 (zero? (system* "py.test" "-vv" )))))))
11769 (native-inputs
11770 `(("python-pytest" ,python-pytest)))
11771 (home-page
11772 "https://github.com/jamesturk/validictory")
11773 (synopsis "General purpose Python data validator")
11774 (description "It allows validation of arbitrary Python data structures.
11775
11776 The schema format is based on the JSON Schema
11777 proposal (http://json-schema.org), so combined with json the library is also
11778 useful as a validator for JSON data.")
11779 (license license:expat)
11780 (properties `((python2-variant . ,(delay python2-validictory))))))
11781
11782 (define-public python2-validictory
11783 (let ((base (package-with-python2
11784 (strip-python2-variant python-validictory))))
11785 (package
11786 (inherit base)
11787 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11788 ,@(package-native-inputs base))))))
11789
11790 (define-public python-aniso8601
11791 (package
11792 (name "python-aniso8601")
11793 (version "1.1.0")
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "aniso8601" version))
11798 (sha256
11799 (base32
11800 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11801 (build-system python-build-system)
11802 (propagated-inputs
11803 `(("python-dateutil-2" ,python-dateutil-2)))
11804 (home-page
11805 "https://bitbucket.org/nielsenb/aniso8601")
11806 (synopsis
11807 "Python library for parsing ISO 8601 strings")
11808 (description
11809 "This package contains a library for parsing ISO 8601 datetime strings.")
11810 (license license:bsd-3)))
11811
11812 (define-public python-flask-restful
11813 (package
11814 (name "python-flask-restful")
11815 (version "0.3.5")
11816 (source
11817 (origin
11818 (method url-fetch)
11819 (uri (pypi-uri "Flask-RESTful" version))
11820 (sha256
11821 (base32
11822 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11823 (build-system python-build-system)
11824 (propagated-inputs
11825 `(("python-aniso8601" ,python-aniso8601)
11826 ("python-flask" ,python-flask)
11827 ("python-pycrypto" ,python-pycrypto)
11828 ("python-pytz" ,python-pytz)))
11829 (native-inputs
11830 `(;; Optional dependency of Flask. Tests need it.
11831 ("python-blinker" ,python-blinker)
11832 ("python-mock" ,python-mock) ; For tests
11833 ("python-nose" ,python-nose) ; For tests
11834 ("python-sphinx" ,python-sphinx)))
11835 (home-page
11836 "https://www.github.com/flask-restful/flask-restful/")
11837 (synopsis
11838 "Flask module for creating REST APIs")
11839 (description
11840 "This package contains a Flask module for creating REST APIs.")
11841 (license license:bsd-3)))
11842
11843 (define-public python-flask-basicauth
11844 (package
11845 (name "python-flask-basicauth")
11846 (version "0.2.0")
11847 (source
11848 (origin
11849 (method url-fetch)
11850 (uri (pypi-uri "Flask-BasicAuth" version))
11851 (sha256
11852 (base32
11853 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11854 (build-system python-build-system)
11855 (propagated-inputs
11856 `(("python-flask" ,python-flask)))
11857 (home-page
11858 "https://github.com/jpvanhal/flask-basicauth")
11859 (synopsis
11860 "HTTP basic access authentication for Flask")
11861 (description
11862 "This package provides HTTP basic access authentication for Flask.")
11863 (license license:bsd-3)))
11864
11865 (define-public python-flask-sqlalchemy
11866 (package
11867 (name "python-flask-sqlalchemy")
11868 (version "2.1")
11869 (source
11870 (origin
11871 (method url-fetch)
11872 (uri (pypi-uri "Flask-SQLAlchemy" version))
11873 (sha256
11874 (base32
11875 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11876 (build-system python-build-system)
11877 (propagated-inputs
11878 `(("python-flask" ,python-flask)
11879 ("python-sqlalchemy" ,python-sqlalchemy)))
11880 (home-page
11881 "http://github.com/mitsuhiko/flask-sqlalchemy")
11882 (synopsis
11883 "Module adding SQLAlchemy support to your Flask application")
11884 (description
11885 "This package adds SQLAlchemy support to your Flask application.")
11886 (license license:bsd-3)))
11887
11888 (define-public python-pyev
11889 (package
11890 (name "python-pyev")
11891 (version "0.9.0")
11892 (source
11893 (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "pyev" version))
11896 (sha256
11897 (base32
11898 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11899 (build-system python-build-system)
11900 (arguments
11901 `(#:tests? #f ; no test suite
11902 #:phases
11903 (modify-phases %standard-phases
11904 (add-after 'unpack 'patch
11905 (lambda* (#:key inputs #:allow-other-keys)
11906 (let ((libev (string-append (assoc-ref inputs "libev")
11907 "/lib/libev.so.4")))
11908 (substitute* "setup.py"
11909 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11910 (string-append "libev_dll_name = \"" libev "\"")))))))))
11911 (inputs
11912 `(("libev" ,libev)))
11913 (home-page "http://pythonhosted.org/pyev/")
11914 (synopsis "Python libev interface")
11915 (description "Pyev provides a Python interface to libev.")
11916 (license license:gpl3)))
11917
11918 (define-public python2-pyev
11919 (package-with-python2 python-pyev))
11920
11921 (define-public python-imagesize
11922 (package
11923 (name "python-imagesize")
11924 (version "0.7.1")
11925 (source
11926 (origin
11927 (method url-fetch)
11928 (uri (pypi-uri "imagesize" version))
11929 (sha256
11930 (base32
11931 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11932 (build-system python-build-system)
11933 (arguments
11934 '(;; Test files are not distributed on PyPi:
11935 ;; https://github.com/shibukawa/imagesize_py/issues/7
11936 #:tests? #f))
11937 (home-page "https://github.com/shibukawa/imagesize_py")
11938 (synopsis "Gets image size of files in variaous formats in Python")
11939 (description
11940 "This package allows determination of image size from
11941 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11942 (license license:expat)
11943 (properties `((python2-variant . ,(delay python2-imagesize))))))
11944
11945 (define-public python2-imagesize
11946 (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
11947 (package
11948 (inherit base)
11949 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11950 ,@(package-native-inputs base))))))
11951
11952 (define-public python-axolotl-curve25519
11953 (package
11954 (name "python-axolotl-curve25519")
11955 (version "0.1")
11956 (source
11957 (origin
11958 (method git-fetch)
11959 (uri (git-reference
11960 (url "git://github.com/tgalal/python-axolotl-curve25519")
11961 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11962 (file-name (string-append name "-" version "-checkout"))
11963 (sha256
11964 (base32
11965 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11966 (build-system python-build-system)
11967 (arguments
11968 `(;; Prevent creation of the egg. This works around
11969 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11970 #:configure-flags '("--root=/")))
11971 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11972 (synopsis "Python wrapper for curve25519 library")
11973 (description "This is a python wrapper for the curve25519 library
11974 with ed25519 signatures. The C code was pulled from
11975 libaxolotl-android. At the moment this wrapper is meant for use by
11976 python-axolotl.")
11977 (license (list license:gpl3 ; Most files
11978 license:bsd-3)))) ; curve/curve25519-donna.c
11979
11980 (define-public python2-axolotl-curve25519
11981 (package-with-python2 python-axolotl-curve25519))
11982
11983 (define-public python-axolotl
11984 (package
11985 (name "python-axolotl")
11986 (version "0.1.35")
11987 (source
11988 (origin
11989 (method url-fetch)
11990 (uri (string-append
11991 "https://github.com/tgalal/python-axolotl/archive/"
11992 version ".tar.gz"))
11993 (file-name (string-append name "-" version ".tar.gz"))
11994 (sha256
11995 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11996 (build-system python-build-system)
11997 (arguments
11998 `(#:phases
11999 (modify-phases %standard-phases
12000 ;; Don't install tests
12001 (add-before 'install 'remove-tests
12002 (lambda _
12003 (for-each delete-file-recursively
12004 '("axolotl/tests" "build/lib/axolotl/tests"))
12005 #t)))
12006 ;; Prevent creation of the egg. This works around
12007 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12008 #:configure-flags '("--root=/")))
12009 (propagated-inputs
12010 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12011 ("python-dateutil" ,python-dateutil)
12012 ("python-protobuf" ,python-protobuf)
12013 ("python-pycrypto" ,python-pycrypto)))
12014 (home-page "https://github.com/tgalal/python-axolotl")
12015 (synopsis "Python port of libaxolotl-android")
12016 (description "This is a python port of libaxolotl-android. This
12017 is a ratcheting forward secrecy protocol that works in synchronous and
12018 asynchronous messaging environments.")
12019 (license license:gpl3)))
12020
12021 (define-public python2-axolotl
12022 (package-with-python2 python-axolotl))
12023
12024 (define-public python-termstyle
12025 (package
12026 (name "python-termstyle")
12027 (version "0.1.11")
12028 (source
12029 (origin
12030 (method url-fetch)
12031 (uri (pypi-uri "termstyle" version))
12032 (sha256
12033 (base32
12034 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12035 (build-system python-build-system)
12036 (home-page "http://github.com/gfxmonk/termstyle")
12037 (synopsis "Console text coloring for Python")
12038 (description "This package provides console text coloring for Python.")
12039 (license license:bsd-3)))
12040
12041 (define-public python-rednose
12042 (package
12043 (name "python-rednose")
12044 (version "1.2.1")
12045 (source
12046 (origin
12047 (method url-fetch)
12048 (uri (pypi-uri "rednose" version))
12049 (sha256
12050 (base32
12051 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12052 (build-system python-build-system)
12053 (arguments
12054 `(#:phases
12055 (modify-phases %standard-phases
12056 (add-after 'unpack 'fix-deps
12057 (lambda _
12058 ;; See <https://github.com/JBKahn/rednose/issues/12>
12059 (substitute* "setup.py"
12060 (("python-termstyle") "termstyle"))
12061 #t)))))
12062 (propagated-inputs
12063 `(("python-colorama" ,python-colorama)
12064 ("python-termstyle" ,python-termstyle)))
12065 (native-inputs
12066 `(("python-six" ,python-six)
12067 ("python-nose" ,python-nose)))
12068 (home-page "https://github.com/JBKahn/rednose")
12069 (synopsis "Colored output for Python nosetests")
12070 (description "This package provides colored output for the
12071 @command{nosetests} command of the Python Nose unit test framework.")
12072 (license license:bsd-3)))
12073
12074 (define-public python-flask-restplus
12075 (package
12076 (name "python-flask-restplus")
12077 (version "0.9.2")
12078 (source
12079 (origin
12080 (method url-fetch)
12081 (uri (pypi-uri "flask-restplus" version))
12082 (sha256
12083 (base32
12084 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12085 (build-system python-build-system)
12086 (propagated-inputs
12087 `(("python-aniso8601" ,python-aniso8601)
12088 ("python-flask" ,python-flask)
12089 ("python-jsonschema" ,python-jsonschema)
12090 ("python-pytz" ,python-pytz)
12091 ("python-six" ,python-six)))
12092 (native-inputs
12093 `(("python-tzlocal" ,python-tzlocal)
12094 ("python-blinker" ,python-blinker)
12095 ("python-nose" ,python-nose)
12096 ("python-rednose" ,python-rednose)))
12097 (home-page "https://github.com/noirbizarre/flask-restplus")
12098 (synopsis "Framework for documented API development with Flask")
12099 (description "This package provides a framework for API development with
12100 the Flask web framework in Python. It is similar to package
12101 @code{python-flask-restful} but supports the @code{python-swagger}
12102 documentation builder.")
12103 (license license:expat)))