gnu: python-eventlet: Skip failing test phase.
[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, 2017 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, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;;
45 ;;; This file is part of GNU Guix.
46 ;;;
47 ;;; GNU Guix is free software; you can redistribute it and/or modify it
48 ;;; under the terms of the GNU General Public License as published by
49 ;;; the Free Software Foundation; either version 3 of the License, or (at
50 ;;; your option) any later version.
51 ;;;
52 ;;; GNU Guix is distributed in the hope that it will be useful, but
53 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
54 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55 ;;; GNU General Public License for more details.
56 ;;;
57 ;;; You should have received a copy of the GNU General Public License
58 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
59
60 (define-module (gnu packages python)
61 #:use-module ((guix licenses) #:prefix license:)
62 #:use-module (gnu packages)
63 #:use-module (gnu packages algebra)
64 #:use-module (gnu packages adns)
65 #:use-module (gnu packages attr)
66 #:use-module (gnu packages backup)
67 #:use-module (gnu packages bash)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages crypto)
70 #:use-module (gnu packages databases)
71 #:use-module (gnu packages django)
72 #:use-module (gnu packages file)
73 #:use-module (gnu packages fontutils)
74 #:use-module (gnu packages gcc)
75 #:use-module (gnu packages ghostscript)
76 #:use-module (gnu packages gl)
77 #:use-module (gnu packages glib)
78 #:use-module (gnu packages graphviz)
79 #:use-module (gnu packages gstreamer)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages icu4c)
82 #:use-module (gnu packages image)
83 #:use-module (gnu packages imagemagick)
84 #:use-module (gnu packages libevent)
85 #:use-module (gnu packages libffi)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages multiprecision)
90 #:use-module (gnu packages networking)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages openstack)
93 #:use-module (gnu packages password-utils)
94 #:use-module (gnu packages pcre)
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages pkg-config)
97 #:use-module (gnu packages protobuf)
98 #:use-module (gnu packages qt)
99 #:use-module (gnu packages readline)
100 #:use-module (gnu packages sdl)
101 #:use-module (gnu packages shells)
102 #:use-module (gnu packages ssh)
103 #:use-module (gnu packages statistics)
104 #:use-module (gnu packages tex)
105 #:use-module (gnu packages texinfo)
106 #:use-module (gnu packages tls)
107 #:use-module (gnu packages version-control)
108 #:use-module (gnu packages video)
109 #:use-module (gnu packages web)
110 #:use-module (gnu packages base)
111 #:use-module (gnu packages xml)
112 #:use-module (gnu packages xorg)
113 #:use-module (gnu packages xdisorg)
114 #:use-module (gnu packages tcl)
115 #:use-module (gnu packages bdw-gc)
116 #:use-module (guix packages)
117 #:use-module (guix download)
118 #:use-module (guix git-download)
119 #:use-module (guix utils)
120 #:use-module (guix build-system gnu)
121 #:use-module (guix build-system cmake)
122 #:use-module (guix build-system python)
123 #:use-module (guix build-system trivial)
124 #:use-module (srfi srfi-1))
125
126 (define-public python-2.7
127 (package
128 (name "python")
129 (version "2.7.13")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (string-append "https://www.python.org/ftp/python/"
134 version "/Python-" version ".tar.xz"))
135 (sha256
136 (base32
137 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
138 (patches (search-patches "python-2.7-search-paths.patch"
139 "python-2-deterministic-build-info.patch"
140 "python-2.7-site-prefixes.patch"
141 "python-2.7-source-date-epoch.patch"
142 "python-2.7-getentropy-on-old-kernels.patch"))
143 (modules '((guix build utils)))
144 ;; suboptimal to delete failing tests here, but if we delete them in the
145 ;; arguments then we need to make sure to strip out that phase when it
146 ;; gets inherited by python and python-minimal.
147 (snippet
148 '(begin
149 (for-each delete-file
150 '("Lib/test/test_compileall.py"
151 "Lib/test/test_ctypes.py" ; fails on mips64el
152 "Lib/test/test_distutils.py"
153 "Lib/test/test_import.py"
154 "Lib/test/test_shutil.py"
155 "Lib/test/test_socket.py"
156 "Lib/test/test_subprocess.py"))
157 #t))))
158 (outputs '("out"
159 "tk")) ;tkinter; adds 50 MiB to the closure
160 (build-system gnu-build-system)
161 (arguments
162 `(;; 356 tests OK.
163 ;; 6 tests failed:
164 ;; test_compileall test_distutils test_import test_shutil test_socket
165 ;; test_subprocess
166 ;; 39 tests skipped:
167 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
168 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
169 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
170 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
171 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
172 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
173 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
174 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
175 ;; test_winreg test_winsound test_zipfile64
176 ;; 4 skips unexpected on linux2:
177 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
178 #:test-target "test"
179 #:configure-flags
180 (list "--enable-shared" ;allow embedding
181 "--with-system-ffi" ;build ctypes
182 "--with-ensurepip=install" ;install pip and setuptools
183 "--enable-unicode=ucs4"
184 (string-append "LDFLAGS=-Wl,-rpath="
185 (assoc-ref %outputs "out") "/lib"))
186
187 #:modules ((ice-9 ftw) (ice-9 match)
188 (guix build utils) (guix build gnu-build-system))
189 #:phases
190 (modify-phases %standard-phases
191 (add-before
192 'configure 'patch-lib-shells
193 (lambda _
194 ;; Filter for existing files, since some may not exist in all
195 ;; versions of python that are built with this recipe.
196 (substitute* (filter file-exists?
197 '("Lib/subprocess.py"
198 "Lib/popen2.py"
199 "Lib/distutils/tests/test_spawn.py"
200 "Lib/test/test_subprocess.py"))
201 (("/bin/sh") (which "sh")))
202
203 ;; Use zero as the timestamp in .pyc files so that builds are
204 ;; deterministic. TODO: Remove it when this variable is set in
205 ;; gnu-build-system.scm.
206 (setenv "SOURCE_DATE_EPOCH" "1")
207 #t))
208 (add-before 'configure 'do-not-record-configure-flags
209 (lambda* (#:key configure-flags #:allow-other-keys)
210 ;; Remove configure flags from the installed '_sysconfigdata.py'
211 ;; and 'Makefile' so we don't end up keeping references to the
212 ;; build tools.
213 ;;
214 ;; Preserve at least '--with-system-ffi' since otherwise the
215 ;; thing tries to build libffi, fails, and we end up with a
216 ;; Python that lacks ctypes.
217 (substitute* "configure"
218 (("^CONFIG_ARGS=.*$")
219 (format #f "CONFIG_ARGS='~a'\n"
220 (if (member "--with-system-ffi" configure-flags)
221 "--with-system-ffi"
222 ""))))
223 #t))
224 (add-before
225 'check 'pre-check
226 (lambda _
227 ;; 'Lib/test/test_site.py' needs a valid $HOME
228 (setenv "HOME" (getcwd))
229 #t))
230 (add-after
231 'unpack 'set-source-file-times-to-1980
232 ;; XXX One of the tests uses a ZIP library to pack up some of the
233 ;; source tree, and fails with "ZIP does not support timestamps
234 ;; before 1980". Work around this by setting the file times in the
235 ;; source tree to sometime in early 1980.
236 (lambda _
237 (let ((circa-1980 (* 10 366 24 60 60)))
238 (ftw "." (lambda (file stat flag)
239 (utime file circa-1980 circa-1980)
240 #t))
241 #t)))
242 (add-after 'install 'remove-tests
243 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
244 ;; because these files are used by some libraries out there.
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let ((out (assoc-ref outputs "out")))
247 (match (scandir (string-append out "/lib")
248 (lambda (name)
249 (string-prefix? "python" name)))
250 ((pythonX.Y)
251 (let ((testdir (string-append out "/lib/" pythonX.Y
252 "/test")))
253 (with-directory-excursion testdir
254 (for-each delete-file-recursively
255 (scandir testdir
256 (match-lambda
257 ((or "." "..") #f)
258 (file
259 (not
260 (string-prefix? "test_support."
261 file))))))
262 (call-with-output-file "__init__.py" (const #t))
263 #t)))))))
264 (add-before 'strip 'make-libraries-writable
265 (lambda* (#:key outputs #:allow-other-keys)
266 ;; Make .so files writable so they can be stripped.
267 (let ((out (assoc-ref outputs "out")))
268 (for-each (lambda (file)
269 (chmod file #o755))
270 (find-files (string-append out "/lib")
271 "\\.so"))
272 #t)))
273 (add-after 'install 'move-tk-inter
274 (lambda* (#:key outputs #:allow-other-keys)
275 ;; When Tkinter support is built move it to a separate output so
276 ;; that the main output doesn't contain a reference to Tcl/Tk.
277 (let ((out (assoc-ref outputs "out"))
278 (tk (assoc-ref outputs "tk")))
279 (when tk
280 (match (find-files out "tkinter.*\\.so")
281 ((tkinter.so)
282 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
283 ;; want it under TK/lib/pythonX.Y/site-packages.
284 (let* ((len (string-length out))
285 (target (string-append
286 tk "/"
287 (string-drop
288 (dirname (dirname tkinter.so))
289 len)
290 "/site-packages")))
291 (install-file tkinter.so target)
292 (delete-file tkinter.so)))))
293 #t))))))
294 (inputs
295 `(("bzip2" ,bzip2)
296 ("gdbm" ,gdbm)
297 ("libffi" ,libffi) ; for ctypes
298 ("sqlite" ,sqlite) ; for sqlite extension
299 ("openssl" ,openssl)
300 ("readline" ,readline)
301 ("zlib" ,zlib)
302 ("tcl" ,tcl)
303 ("tk" ,tk))) ; for tkinter
304 (native-inputs
305 `(("pkg-config" ,pkg-config)))
306 (native-search-paths
307 (list (search-path-specification
308 (variable "PYTHONPATH")
309 (files '("lib/python2.7/site-packages")))))
310 (home-page "https://www.python.org")
311 (synopsis "High-level, dynamically-typed programming language")
312 (description
313 "Python is a remarkably powerful dynamic programming language that
314 is used in a wide variety of application domains. Some of its key
315 distinguishing features include: clear, readable syntax; strong
316 introspection capabilities; intuitive object orientation; natural
317 expression of procedural code; full modularity, supporting hierarchical
318 packages; exception-based error handling; and very high level dynamic
319 data types.")
320 (license license:psfl)))
321
322 ;; Current 2.x version.
323 (define-public python-2 python-2.7)
324
325 (define-public python-3.5
326 (package (inherit python-2)
327 (version "3.5.3")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "https://www.python.org/ftp/python/"
331 version "/Python-" version ".tar.xz"))
332 (patches (search-patches
333 "python-fix-tests.patch"
334 "python-3.5-fix-tests.patch"
335 "python-3.5-getentropy-on-old-kernels.patch"
336 "python-3-deterministic-build-info.patch"
337 "python-3-search-paths.patch"))
338 (patch-flags '("-p0"))
339 (sha256
340 (base32
341 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
342 (snippet
343 '(delete-file
344 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
345 (arguments (substitute-keyword-arguments (package-arguments python-2)
346 ((#:tests? _) #t)))
347 (native-search-paths
348 (list (search-path-specification
349 (variable "PYTHONPATH")
350 (files (list (string-append "lib/python"
351 (version-major+minor version)
352 "/site-packages"))))))))
353
354 ;; Current 3.x version.
355 (define-public python-3 python-3.5)
356
357 ;; Current major version.
358 (define-public python python-3)
359
360 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
361 ;; Python (Tk -> libxcb -> Python.)
362
363 (define-public python2-minimal
364 (package (inherit python-2)
365 (name "python-minimal")
366 (outputs '("out"))
367
368 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
369 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
370 ;; libffi.
371 (inputs `(("libffi" ,libffi)
372 ("zlib" ,zlib)))))
373
374 (define-public python-minimal
375 (package (inherit python)
376 (name "python-minimal")
377 (outputs '("out"))
378
379 ;; Build fails due to missing ctypes without libffi.
380 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
381 ;; zlib is required by 'zipimport', used by pip.
382 (inputs `(("libffi" ,libffi)
383 ("openssl" ,openssl)
384 ("zlib" ,zlib)))))
385
386 (define* (wrap-python3 python
387 #:optional
388 (name (string-append (package-name python) "-wrapper")))
389 (package (inherit python)
390 (name name)
391 (source #f)
392 (build-system trivial-build-system)
393 (outputs '("out"))
394 (inputs `(("bash" ,bash)))
395 (propagated-inputs `(("python" ,python)))
396 (arguments
397 `(#:modules ((guix build utils))
398 #:builder
399 (begin
400 (use-modules (guix build utils))
401 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
402 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
403 (mkdir-p bin)
404 (for-each
405 (lambda (old new)
406 (symlink (string-append python old)
407 (string-append bin "/" new)))
408 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
409 `("python" ,"pydoc" ,"idle" ,"pip"))
410 ;; python-config outputs search paths based upon its location,
411 ;; use a bash wrapper to avoid changing its outputs.
412 (let ((bash (string-append (assoc-ref %build-inputs "bash")
413 "/bin/bash"))
414 (old (string-append python "python3-config"))
415 (new (string-append bin "/python-config")))
416 (with-output-to-file new
417 (lambda ()
418 (format #t "#!~a~%" bash)
419 (format #t "exec \"~a\" \"$@\"~%" old)
420 (chmod new #o755)
421 #t)))))))
422 (synopsis "Wrapper for the Python 3 commands")
423 (description
424 "This package provides wrappers for the commands of Python@tie{}3.x such
425 that they can be invoked under their usual name---e.g., @command{python}
426 instead of @command{python3}.")))
427
428 (define-public python-wrapper (wrap-python3 python))
429 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
430
431 (define-public python-psutil
432 (package
433 (name "python-psutil")
434 (version "4.3.0")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (pypi-uri "psutil" version))
439 (sha256
440 (base32
441 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
442 (build-system python-build-system)
443 (arguments
444 ;; FIXME: some tests does not return and times out.
445 '(#:tests? #f))
446 (home-page "https://www.github.com/giampaolo/psutil")
447 (synopsis "Library for retrieving information on running processes")
448 (description
449 "psutil (Python system and process utilities) is a library for retrieving
450 information on running processes and system utilization (CPU, memory, disks,
451 network) in Python. It is useful mainly for system monitoring, profiling and
452 limiting process resources and management of running processes. It implements
453 many functionalities offered by command line tools such as: ps, top, lsof,
454 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
455 pidof, tty, taskset, pmap.")
456 (license license:bsd-3)))
457
458 (define-public python2-psutil
459 (package-with-python2 python-psutil))
460
461 (define-public python-passlib
462 (package
463 (name "python-passlib")
464 (version "1.7.1")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (pypi-uri "passlib" version))
469 (sha256
470 (base32
471 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
472 (build-system python-build-system)
473 (native-inputs
474 `(("python-nose" ,python-nose)))
475 (propagated-inputs
476 `(("python-py-bcrypt" ,python-py-bcrypt)))
477 (arguments
478 `(#:phases
479 (alist-cons-before
480 'check 'set-PYTHON_EGG_CACHE
481 ;; some tests require access to "$HOME/.cython"
482 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
483 %standard-phases)))
484 (home-page "https://bitbucket.org/ecollins/passlib")
485 (synopsis
486 "Comprehensive password hashing framework")
487 (description
488 "Passlib is a password hashing library for Python 2 & 3, which provides
489 cross-platform implementations of over 30 password hashing algorithms, as well
490 as a framework for managing existing password hashes. It's designed to be
491 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
492 to providing full-strength password hashing for multi-user application.")
493 (license license:bsd-3)))
494
495 (define-public python2-passlib
496 (package-with-python2 python-passlib))
497
498 (define-public python-py-bcrypt
499 (package
500 (name "python-py-bcrypt")
501 (version "0.4")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (string-append
506 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
507 version
508 ".tar.gz"))
509 (sha256
510 (base32
511 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
512 (build-system python-build-system)
513 (home-page "https://code.google.com/p/py-bcrypt")
514 (synopsis
515 "Bcrypt password hashing and key derivation")
516 (description
517 "A python wrapper of OpenBSD's Blowfish password hashing code. This
518 system hashes passwords using a version of Bruce Schneier's Blowfish block
519 cipher with modifications designed to raise the cost of off-line password
520 cracking and frustrate fast hardware implementation. The computation cost of
521 the algorithm is parametised, so it can be increased as computers get faster.
522 The intent is to make a compromise of a password database less likely to
523 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
524 John the Ripper).")
525 ;; "sha2.c" is under BSD-3;
526 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
527 ;; the rest is under ISC.
528 (license (list license:isc license:bsd-3 license:bsd-4))))
529
530 (define-public python2-py-bcrypt
531 (package-with-python2 python-py-bcrypt))
532
533
534 (define-public python-paramiko
535 (package
536 (name "python-paramiko")
537 (version "2.1.2")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (pypi-uri "paramiko" version))
542 (sha256
543 (base32
544 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
545 (build-system python-build-system)
546 (arguments
547 '(#:phases
548 (modify-phases %standard-phases
549 (replace 'check
550 (lambda _
551 (zero? (system* "python" "test.py")))))))
552 (propagated-inputs
553 `(("python-pyasn1" ,python-pyasn1)
554 ("python-cryptography" ,python-cryptography)))
555 (home-page "http://www.paramiko.org/")
556 (synopsis "SSHv2 protocol library")
557 (description "Paramiko is a python implementation of the SSHv2 protocol,
558 providing both client and server functionality. While it leverages a Python C
559 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
560 Python interface around SSH networking concepts.")
561 (license license:lgpl2.1+)))
562
563 (define-public python2-paramiko
564 (package-with-python2 python-paramiko))
565
566
567 (define-public python-httplib2
568 (package
569 (name "python-httplib2")
570 (version "0.9.2")
571 (source
572 (origin
573 (method url-fetch)
574 (uri (pypi-uri "httplib2" version))
575 (sha256
576 (base32
577 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
578 (build-system python-build-system)
579 (home-page "https://github.com/jcgregorio/httplib2")
580 (synopsis "Comprehensive HTTP client library")
581 (description
582 "A comprehensive HTTP client library supporting many features left out of
583 other HTTP libraries.")
584 (license license:expat)))
585
586 (define-public python2-httplib2
587 (package-with-python2 python-httplib2))
588
589 (define-public python-ecdsa
590 (package
591 (name "python-ecdsa")
592 (version "0.13")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (string-append
597 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
598 version
599 ".tar.gz"))
600 (sha256
601 (base32
602 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
603 (build-system python-build-system)
604 (inputs
605 `(("openssl" ,openssl)))
606 (home-page
607 "https://github.com/warner/python-ecdsa")
608 (synopsis
609 "ECDSA cryptographic signature library (pure python)")
610 (description
611 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
612 Curve Digital Signature Algorithm), implemented purely in Python. With this
613 library, you can quickly create keypairs (signing key and verifying key), sign
614 messages, and verify the signatures. The keys and signatures are very short,
615 making them easy to handle and incorporate into other protocols.")
616 (license license:expat)))
617
618 (define-public python2-ecdsa
619 (package-with-python2 python-ecdsa))
620
621 (define-public python-ccm
622 (package
623 (name "python-ccm")
624 (version "2.1.6")
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "ccm" version))
629 (sha256
630 (base32
631 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
632 (build-system python-build-system)
633 (propagated-inputs
634 `(("python-pyyaml" ,python-pyyaml)
635 ;; Not listed in setup.py, but used in ccmlib/node.py for full
636 ;; functionality
637 ("python-psutil" ,python-psutil)
638 ("python-six" ,python-six)))
639 (home-page "https://github.com/pcmanus/ccm")
640 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
641 localhost")
642 (description "Cassandra Cluster Manager is a development tool for testing
643 local Cassandra clusters. It creates, launches and removes Cassandra clusters
644 on localhost.")
645 (license license:asl2.0)))
646
647 (define-public python2-ccm
648 (package-with-python2 python-ccm))
649
650 (define-public python-pytz
651 (package
652 (name "python-pytz")
653 (version "2016.10")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "pytz" version ".tar.bz2"))
658 (sha256
659 (base32
660 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
661 (build-system python-build-system)
662 (arguments `(#:tests? #f)) ; no test target
663 (home-page "http://pythonhosted.org/pytz")
664 (synopsis "Python timezone library")
665 (description
666 "This library allows accurate and cross platform timezone calculations
667 using Python 2.4 or higher and provides access to the Olson timezone database.")
668 (license license:expat)))
669
670 (define-public python2-pytz
671 (package-with-python2 python-pytz))
672
673
674 (define-public python-babel
675 (package
676 (name "python-babel")
677 (version "2.3.4")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (pypi-uri "Babel" version))
682 (sha256
683 (base32
684 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
685 (build-system python-build-system)
686 (propagated-inputs
687 `(("python-pytz" ,python-pytz)))
688 (arguments `(#:tests? #f)) ; no test target
689 (home-page "http://babel.pocoo.org/")
690 (synopsis
691 "Tools for internationalizing Python applications")
692 (description
693 "Babel is composed of two major parts:
694 - tools to build and work with gettext message catalogs
695 - a Python interface to the CLDR (Common Locale Data Repository), providing
696 access to various locale display names, localized number and date formatting,
697 etc. ")
698 (license license:bsd-3)))
699
700 (define-public python2-babel
701 (package-with-python2 python-babel))
702
703 (define-public python2-backport-ssl-match-hostname
704 (package
705 (name "python2-backport-ssl-match-hostname")
706 (version "3.5.0.1")
707 (source
708 (origin
709 (method url-fetch)
710 (uri (string-append
711 "https://pypi.python.org/packages/source/b/"
712 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
713 version ".tar.gz"))
714 (sha256
715 (base32
716 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
717 (build-system python-build-system)
718 (arguments
719 `(#:python ,python-2
720 #:tests? #f)) ; no test target
721 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
722 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
723 (description
724 "This backport brings the ssl.match_hostname() function to users of
725 earlier versions of Python. The function checks the hostname in the
726 certificate returned by the server to which a connection has been established,
727 and verifies that it matches the intended target hostname.")
728 (license license:psfl)))
729
730 (define-public python-hdf4
731 (package
732 (name "python-hdf4")
733 (version "0.9")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (pypi-uri name version))
738 (sha256
739 (base32
740 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
741 (build-system python-build-system)
742 (native-inputs `(("nose" ,python-nose)))
743 (propagated-inputs `(("numpy" ,python-numpy)))
744 (inputs
745 `(("hdf4" ,hdf4)
746 ("libjpeg" ,libjpeg)
747 ("zlib" ,zlib)))
748 (arguments
749 `(#:phases
750 (modify-phases %standard-phases
751 (replace 'check
752 (lambda _
753 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
754 ;; on to import numpy. Somehow this works on their CI system.
755 ;; Let's just manage PYTHONPATH here instead.
756 (substitute* "runexamples.sh"
757 (("export PYTHONPATH=.*") ""))
758 (setenv "PYTHONPATH"
759 (string-append (getcwd) ":"
760 (getenv "PYTHONPATH")))
761 (and (zero? (system* "./runexamples.sh"))
762 (zero? (system* "nosetests" "-v"))))))))
763 (home-page "https://github.com/fhs/python-hdf4")
764 (synopsis "Python interface to the NCSA HDF4 library")
765 (description
766 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
767 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
768 NetCDF files can also be read and modified. Python-HDF4 is a fork of
769 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
770 (license license:expat)))
771
772 (define-public python2-hdf4
773 (package-with-python2 python-hdf4))
774
775 (define-public python-h5py
776 (package
777 (name "python-h5py")
778 (version "2.6.0")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (pypi-uri "h5py" version))
783 (sha256
784 (base32
785 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
786 (build-system python-build-system)
787 (arguments
788 `(#:tests? #f ; no test target
789 #:phases
790 (modify-phases %standard-phases
791 (add-after 'unpack 'fix-hdf5-paths
792 (lambda* (#:key inputs #:allow-other-keys)
793 (let ((prefix (assoc-ref inputs "hdf5")))
794 (substitute* "setup_build.py"
795 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
796 (string-append "['" prefix "/lib" "']"))
797 (("'/opt/local/include', '/usr/local/include'")
798 (string-append "'" prefix "/include" "'")))
799 (substitute* "setup_configure.py"
800 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
801 (string-append "['" prefix "/lib" "']")))
802 #t))))))
803 (propagated-inputs
804 `(("python-six" ,python-six)
805 ("python-numpy" ,python-numpy)))
806 (inputs
807 `(("hdf5" ,hdf5)))
808 (native-inputs
809 `(("python-cython" ,python-cython)
810 ("python-pkgconfig" ,python-pkgconfig)))
811 (home-page "http://www.h5py.org/")
812 (synopsis "Read and write HDF5 files from Python")
813 (description
814 "The h5py package provides both a high- and low-level interface to the
815 HDF5 library from Python. The low-level interface is intended to be a
816 complete wrapping of the HDF5 API, while the high-level component supports
817 access to HDF5 files, datasets and groups using established Python and NumPy
818 concepts.")
819 (license license:bsd-3)))
820
821 (define-public python2-h5py
822 (package-with-python2 python-h5py))
823
824 (define-public python-netcdf4
825 (package
826 (name "python-netcdf4")
827 (version "1.2.7")
828 (source
829 (origin
830 (method url-fetch)
831 (uri (pypi-uri "netCDF4" version))
832 (sha256
833 (base32
834 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
835 (build-system python-build-system)
836 (native-inputs
837 `(("python-cython" ,python-cython)))
838 (propagated-inputs
839 `(("python-numpy" ,python-numpy)))
840 (inputs
841 `(("netcdf" ,netcdf)
842 ("hdf4" ,hdf4)
843 ("hdf5" ,hdf5)))
844 (arguments
845 '(#:phases
846 (modify-phases %standard-phases
847 (replace 'check
848 (lambda _
849 (setenv "NO_NET" "1") ; disable opendap tests
850 (with-directory-excursion "test"
851 (setenv "PYTHONPATH" ; find and add the library we just built
852 (string-append
853 (car (find-files "../build" "lib.*"
854 #:directories? #:t
855 #:fail-on-error? #:t))
856 ":" (getenv "PYTHONPATH")))
857 (zero? (system* "python" "run_all.py"))))))))
858 (home-page
859 "https://github.com/Unidata/netcdf4-python")
860 (synopsis "Python/numpy interface to the netCDF library")
861 (description "Netcdf4-python is a Python interface to the netCDF C
862 library. netCDF version 4 has many features not found in earlier
863 versions of the library and is implemented on top of HDF5. This module
864 can read and write files in both the new netCDF 4 and the old netCDF 3
865 format, and can create files that are readable by HDF5 clients. The
866 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
867 to users of that module.")
868 ;; The software is mainly ISC, but includes some files covered
869 ;; by the Expat license.
870 (license (list license:isc license:expat))))
871
872 (define-public python2-netcdf4
873 (package-with-python2 python-netcdf4))
874
875 (define-public python-lockfile
876 (package
877 (name "python-lockfile")
878 (version "0.12.2")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
883 "lockfile-" version ".tar.gz"))
884 (sha256
885 (base32
886 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
887 (build-system python-build-system)
888 (arguments '(#:test-target "check"))
889 (native-inputs
890 `(("python-pbr" ,python-pbr)))
891 (home-page "https://launchpad.net/pylockfile")
892 (synopsis "Platform-independent file locking module")
893 (description
894 "The lockfile package exports a LockFile class which provides a simple
895 API for locking files.")
896 (license license:expat)))
897
898 (define-public python2-lockfile
899 (package-with-python2 python-lockfile))
900
901 (define-public python-mock
902 (package
903 (name "python-mock")
904 (version "1.0.1")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "mock" version))
909 (sha256
910 (base32
911 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
912 (build-system python-build-system)
913 (arguments '(#:test-target "check"))
914 (home-page "https://github.com/testing-cabal/mock")
915 (synopsis "Python mocking and patching library for testing")
916 (description
917 "Mock is a library for testing in Python. It allows you to replace parts
918 of your system under test with mock objects and make assertions about how they
919 have been used.")
920 (license license:expat)))
921
922 (define-public python2-mock
923 (package-with-python2 python-mock))
924
925 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
926 ;;; of python-mock. However, a large number of packages fail to build with
927 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
928 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
929 (define-public python-mock-2
930 (package
931 (inherit python-mock)
932 (version "2.0.0")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (pypi-uri "mock" version))
937 (sha256
938 (base32
939 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
940 (propagated-inputs
941 `(("python-pbr" ,python-pbr-minimal)
942 ,@(package-propagated-inputs python-mock)))))
943
944 (define-public python-setuptools
945 (package
946 (name "python-setuptools")
947 (version "31.0.0")
948 (source
949 (origin
950 (method url-fetch)
951 (uri (pypi-uri "setuptools" version))
952 (sha256
953 (base32
954 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
955 (modules '((guix build utils)))
956 (snippet
957 '(begin
958 ;; Remove included binaries which are used to build self-extracting
959 ;; installers for Windows.
960 ;; TODO: Find some way to build them ourself so we can include them.
961 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
962 #t))))
963 (build-system python-build-system)
964 ;; FIXME: Tests require pytest, which itself relies on setuptools.
965 ;; One could bootstrap with an internal untested setuptools.
966 (arguments
967 `(#:tests? #f))
968 (home-page "https://pypi.python.org/pypi/setuptools")
969 (synopsis
970 "Library designed to facilitate packaging Python projects")
971 (description
972 "Setuptools is a fully-featured, stable library designed to facilitate
973 packaging Python projects, where packaging includes:
974 Python package and module definitions,
975 distribution package metadata,
976 test hooks,
977 project installation,
978 platform-specific details,
979 Python 3 support.")
980 ;; TODO: setuptools now bundles the following libraries:
981 ;; packaging, pyparsing, six and appdirs. How to unbundle?
982 (license (list license:psfl ; setuptools itself
983 license:expat ; six, appdirs, pyparsing
984 license:asl2.0 ; packaging is dual ASL2/BSD-2
985 license:bsd-2))))
986
987 (define-public python2-setuptools
988 (package-with-python2 python-setuptools))
989
990 ;;; Pycrypto is abandoned upstream:
991 ;;;
992 ;;; https://github.com/dlitz/pycrypto/issues/173
993 ;;;
994 ;;; TODO Remove this package from GNU Guix.
995 (define-public python-pycrypto
996 (package
997 (name "python-pycrypto")
998 (version "2.6.1")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "pycrypto" version))
1003 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1004 (sha256
1005 (base32
1006 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1007 (build-system python-build-system)
1008 (inputs
1009 `(("python" ,python)
1010 ("gmp" ,gmp)))
1011 (arguments
1012 `(#:phases
1013 (alist-cons-before
1014 'build 'set-build-env
1015 ;; pycrypto runs an autoconf configure script behind the scenes
1016 (lambda _
1017 (setenv "CONFIG_SHELL" (which "bash")))
1018 %standard-phases)))
1019 (home-page "http://www.pycrypto.org/")
1020 (synopsis "Cryptographic modules for Python")
1021 (description
1022 "Pycrypto is a collection of both secure hash functions (such as SHA256
1023 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1024 etc.). The package is structured to make adding new modules easy.")
1025 (license license:public-domain)))
1026
1027 (define-public python2-pycrypto
1028 (let ((pycrypto (package-with-python2 python-pycrypto)))
1029 (package (inherit pycrypto)
1030 (inputs
1031 `(("python" ,python-2)
1032 ,@(alist-delete
1033 "python"
1034 (package-inputs pycrypto)))))))
1035
1036 (define-public python-eventlet
1037 (package
1038 (name "python-eventlet")
1039 (version "0.20.1")
1040 (source
1041 (origin
1042 (method url-fetch)
1043 (uri (pypi-uri "eventlet" version))
1044 (sha256
1045 (base32
1046 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1047 (build-system python-build-system)
1048 (propagated-inputs
1049 `(("python-greenlet" ,python-greenlet)))
1050 (arguments
1051 ;; TODO: Requires unpackaged 'enum-compat'.
1052 '(#:tests? #f))
1053 (home-page "http://eventlet.net")
1054 (synopsis "Concurrent networking library for Python")
1055 (description
1056 "Eventlet is a concurrent networking library for Python that
1057 allows you to change how you run your code, not how you write it.
1058 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1059 Coroutines ensure that the developer uses a blocking style of programming
1060 that is similar to threading, but provide the benefits of non-blocking I/O.
1061 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1062 from the Python interpreter, or as a small part of a larger application.")
1063 (license license:expat)))
1064
1065 (define-public python2-eventlet
1066 (let ((base (package-with-python2
1067 (strip-python2-variant python-eventlet))))
1068 (package (inherit base)
1069 (propagated-inputs
1070 `(("python2-enum34" ,python2-enum34)
1071 ,@(package-propagated-inputs base))))))
1072
1073 (define-public python-keyring
1074 (package
1075 (name "python-keyring")
1076 (version "8.7")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "keyring" version))
1081 (sha256
1082 (base32
1083 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1084 (build-system python-build-system)
1085 (native-inputs
1086 `(("python-setuptools-scm" ,python-setuptools-scm)))
1087 (propagated-inputs
1088 `(("python-pycrypto" ,python-pycrypto)))
1089 (arguments
1090 `(#:tests? #f)) ;TODO: tests require pytest
1091 (home-page "https://github.com/jaraco/keyring")
1092 (synopsis "Store and access your passwords safely")
1093 (description
1094 "The Python keyring lib provides a easy way to access the system keyring
1095 service from python. It can be used in any application that needs safe
1096 password storage.")
1097 ;; "MIT" and PSF dual license
1098 (license license:x11)))
1099
1100 (define-public python2-keyring
1101 (package-with-python2 python-keyring))
1102
1103 (define-public python-six
1104 (package
1105 (name "python-six")
1106 (version "1.10.0")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (pypi-uri "six" version))
1111 (sha256
1112 (base32
1113 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1114 (build-system python-build-system)
1115 (native-inputs
1116 `(("python-py" ,python-py)
1117 ("python-pytest" ,python-pytest)))
1118 (home-page "http://pypi.python.org/pypi/six/")
1119 (synopsis "Python 2 and 3 compatibility utilities")
1120 (description
1121 "Six is a Python 2 and 3 compatibility library. It provides utility
1122 functions for smoothing over the differences between the Python versions with
1123 the goal of writing Python code that is compatible on both Python versions.
1124 Six supports every Python version since 2.5. It is contained in only one
1125 Python file, so it can be easily copied into your project.")
1126 (license license:x11)))
1127
1128 (define-public python2-six
1129 (package-with-python2 python-six))
1130
1131 (define-public python-dateutil
1132 (package
1133 (name "python-dateutil")
1134 (version "2.6.0")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "python-dateutil" version))
1139 (sha256
1140 (base32
1141 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1142 (build-system python-build-system)
1143 (propagated-inputs
1144 `(("python-six" ,python-six)))
1145 (home-page "https://dateutil.readthedocs.io/en/stable/")
1146 (synopsis "Extensions to the standard datetime module")
1147 (description
1148 "The dateutil module provides powerful extensions to the standard
1149 datetime module, available in Python 2.3+.")
1150 (license license:bsd-3)))
1151
1152 (define-public python2-dateutil
1153 (package-with-python2 python-dateutil))
1154
1155 (define-public python-parsedatetime
1156 (package
1157 (name "python-parsedatetime")
1158 (version "2.3")
1159 (source
1160 (origin
1161 (method url-fetch)
1162 (uri (pypi-uri "parsedatetime" version))
1163 (sha256
1164 (base32
1165 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1166 (build-system python-build-system)
1167 (native-inputs
1168 `(("python-nose" ,python-nose)
1169 ("python-pyicu" ,python-pyicu)
1170 ("python-pytest" ,python-pytest)
1171 ("python-pytest-runner" ,python-pytest-runner)))
1172 (propagated-inputs
1173 `(("python-future" ,python-future)))
1174 (home-page "https://github.com/bear/parsedatetime/")
1175 (synopsis
1176 "Parse human-readable date/time text")
1177 (description
1178 "Parse human-readable date/time text.")
1179 (license license:asl2.0)))
1180
1181 (define-public python2-parsedatetime
1182 (package-with-python2 python-parsedatetime))
1183
1184 (define-public python-pandas
1185 (package
1186 (name "python-pandas")
1187 (version "0.19.2")
1188 (source
1189 (origin
1190 (method url-fetch)
1191 (uri (pypi-uri "pandas" version))
1192 (sha256
1193 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1194 (patches
1195 (search-patches "python-pandas-skip-failing-tests.patch"))))
1196 (build-system python-build-system)
1197 (propagated-inputs
1198 `(("python-numpy" ,python-numpy)
1199 ("python-pytz" ,python-pytz)
1200 ("python-dateutil" ,python-dateutil)))
1201 (native-inputs
1202 `(("python-nose" ,python-nose)
1203 ("python-cython" ,python-cython)))
1204 (home-page "http://pandas.pydata.org")
1205 (synopsis "Data structures for data analysis, time series, and statistics")
1206 (description
1207 "Pandas is a Python package providing fast, flexible, and expressive data
1208 structures designed to make working with structured (tabular,
1209 multidimensional, potentially heterogeneous) and time series data both easy
1210 and intuitive. It aims to be the fundamental high-level building block for
1211 doing practical, real world data analysis in Python.")
1212 (license license:bsd-3)))
1213
1214 (define-public python2-pandas
1215 (package-with-python2 python-pandas))
1216
1217 (define-public python-tzlocal
1218 (package
1219 (name "python-tzlocal")
1220 (version "1.2.2")
1221 (source
1222 (origin
1223 (method url-fetch)
1224 (uri (pypi-uri "tzlocal" version))
1225 (sha256
1226 (base32
1227 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1228 (build-system python-build-system)
1229 (propagated-inputs
1230 `(("python-pytz" ,python-pytz)))
1231 (home-page "https://github.com/regebro/tzlocal")
1232 (synopsis
1233 "Local timezone information for Python")
1234 (description
1235 "Tzlocal returns a tzinfo object with the local timezone information.
1236 This module attempts to fix a glaring hole in pytz, that there is no way to
1237 get the local timezone information, unless you know the zoneinfo name, and
1238 under several distributions that's hard or impossible to figure out.")
1239 (license license:cc0)))
1240
1241 (define-public python2-pysqlite
1242 (package
1243 (name "python2-pysqlite")
1244 (version "2.8.3")
1245 (source
1246 (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "pysqlite" version))
1249 (sha256
1250 (base32
1251 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1252 (build-system python-build-system)
1253 (inputs
1254 `(("sqlite" ,sqlite)))
1255 (arguments
1256 `(#:python ,python-2 ; incompatible with Python 3
1257 #:tests? #f)) ; no test target
1258 (home-page "https://github.com/ghaering/pysqlite")
1259 (synopsis "SQLite bindings for Python")
1260 (description
1261 "Pysqlite provides SQLite bindings for Python that comply to the
1262 Database API 2.0T.")
1263 (license license:zlib)))
1264
1265
1266 (define-public python2-mechanize
1267 (package
1268 (name "python2-mechanize")
1269 (version "0.2.5")
1270 (source
1271 (origin
1272 (method url-fetch)
1273 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1274 version ".tar.gz"))
1275 (sha256
1276 (base32
1277 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1278 (build-system python-build-system)
1279 (arguments
1280 `(#:python ,python-2 ; apparently incompatible with Python 3
1281 #:tests? #f))
1282 ;; test fails with message
1283 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1284 ;; (python-3.3.2) or
1285 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1286 ;; (python-2.7.5).
1287 ;; The source code is from March 2011 and probably not up-to-date
1288 ;; with respect to python unit tests.
1289 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1290 (synopsis
1291 "Stateful programmatic web browsing in Python")
1292 (description
1293 "Mechanize implements stateful programmatic web browsing in Python,
1294 after Andy Lester’s Perl module WWW::Mechanize.")
1295 (license (license:non-copyleft
1296 "file://COPYING"
1297 "See COPYING in the distribution."))))
1298
1299
1300 (define-public python-simplejson
1301 (package
1302 (name "python-simplejson")
1303 (version "3.10.0")
1304 (source
1305 (origin
1306 (method url-fetch)
1307 (uri (pypi-uri "simplejson" version))
1308 (sha256
1309 (base32
1310 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1311 (build-system python-build-system)
1312 (home-page "http://simplejson.readthedocs.org/en/latest/")
1313 (synopsis
1314 "Json library for Python")
1315 (description
1316 "JSON (JavaScript Object Notation) is a subset of JavaScript
1317 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1318 format.
1319
1320 Simplejson exposes an API familiar to users of the standard library marshal
1321 and pickle modules. It is the externally maintained version of the json
1322 library contained in Python 2.6, but maintains compatibility with Python 2.5
1323 and (currently) has significant performance advantages, even without using
1324 the optional C extension for speedups. Simplejson is also supported on
1325 Python 3.3+.")
1326 (license license:x11)))
1327
1328 (define-public python2-simplejson
1329 (package-with-python2 python-simplejson))
1330
1331
1332 (define-public python-pyicu
1333 (package
1334 (name "python-pyicu")
1335 (version "1.9.5")
1336 (source
1337 (origin
1338 (method url-fetch)
1339 (uri (pypi-uri "PyICU" version))
1340 (sha256
1341 (base32
1342 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1343 (build-system python-build-system)
1344 (arguments
1345 '(#:phases
1346 (modify-phases %standard-phases
1347 (add-before 'check 'delete-failing-test
1348 (lambda _
1349 ;; XXX: These tests require locales that are unavailable
1350 ;; in the build environment.
1351 (delete-file "test/test_DateTimeParserGenerator.py")
1352 #t)))))
1353 (inputs
1354 `(("icu4c" ,icu4c)))
1355 (home-page "http://pyicu.osafoundation.org/")
1356 (synopsis "Python extension wrapping the ICU C++ API")
1357 (description
1358 "PyICU is a python extension wrapping the ICU C++ API.")
1359 (license license:x11)))
1360
1361 (define-public python2-pyicu
1362 (package-with-python2 python-pyicu))
1363
1364 (define-public python2-dogtail
1365 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1366 ;; spaces in indentation" with Python 3.
1367 (package
1368 (name "python2-dogtail")
1369 (version "0.9.9")
1370 (source (origin
1371 (method url-fetch)
1372 (uri (pypi-uri "dogtail" version))
1373 (sha256
1374 (base32
1375 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1376 (build-system python-build-system)
1377 (arguments `(#:python ,python-2
1378 #:tests? #f)) ; invalid command "test"
1379 ;; Currently no offical homepage.
1380 (home-page "https://pypi.python.org/pypi/dogtail/")
1381 (synopsis "GUI test tool and automation framework written in Python")
1382 (description
1383 "Dogtail is a GUI test tool and automation framework written in Python.
1384 It uses Accessibility (a11y) technologies to communicate with desktop
1385 applications. dogtail scripts are written in Python and executed like any
1386 other Python program.")
1387 (license license:gpl2+)))
1388
1389 (define-public python2-empy
1390 (package
1391 (name "python2-empy")
1392 (version "3.3")
1393 (source (origin
1394 (method url-fetch)
1395 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1396 version ".tar.gz"))
1397 (sha256
1398 (base32
1399 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1400 (build-system python-build-system)
1401 (arguments
1402 `(#:python ,python-2
1403 #:phases (alist-replace
1404 'check
1405 (lambda _
1406 (zero? (system* "./test.sh")))
1407 %standard-phases)))
1408 (home-page "http://www.alcyone.com/software/empy/")
1409 (synopsis "Templating system for Python")
1410 (description
1411 "EmPy is a system for embedding Python expressions and statements in
1412 template text; it takes an EmPy source file, processes it, and produces
1413 output. This is accomplished via expansions, which are special signals to the
1414 EmPy system and are set off by a special prefix (by default the at sign, @@).
1415 EmPy can expand arbitrary Python expressions and statements in this way, as
1416 well as a variety of special forms. Textual data not explicitly delimited in
1417 this way is sent unaffected to the output, allowing Python to be used in
1418 effect as a markup language. Also supported are callbacks via hooks,
1419 recording and playback via diversions, and dynamic, chainable filters. The
1420 system is highly configurable via command line options and embedded
1421 commands.")
1422 (license license:lgpl2.1+)))
1423
1424 (define-public python2-element-tree
1425 (package
1426 (name "python2-element-tree")
1427 (version "1.2.6")
1428 (source (origin
1429 (method url-fetch)
1430 (uri (string-append
1431 "http://effbot.org/media/downloads/elementtree-"
1432 version "-20050316.tar.gz"))
1433 (sha256
1434 (base32
1435 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1436 (build-system python-build-system)
1437 (arguments
1438 `(#:python ,python-2 ; seems to be part of Python 3
1439 #:tests? #f)) ; no 'test' sub-command
1440 (synopsis "Toolkit for XML processing in Python")
1441 (description
1442 "ElementTree is a Python library supporting lightweight XML processing.")
1443 (home-page "http://effbot.org/zone/element-index.htm")
1444 (license (license:x11-style
1445 "http://docs.python.org/2/license.html"
1446 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1447
1448 (define-public python2-pybugz
1449 (package
1450 (name "python2-pybugz")
1451 (version "0.6.11")
1452 (source (origin
1453 (method url-fetch)
1454 (uri (string-append
1455 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1456 version ".tar.gz"))
1457 (sha256
1458 (base32
1459 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1460 (patches (search-patches "pybugz-stty.patch"
1461 "pybugz-encode-error.patch"))))
1462 (build-system python-build-system)
1463 (arguments
1464 `(#:python ,python-2 ; SyntaxError with Python 3
1465 #:tests? #f)) ; no 'test' sub-command
1466 (propagated-inputs
1467 `(("element-tree" ,python2-element-tree)))
1468 (synopsis "Python and command-line interface to Bugzilla")
1469 (description
1470 "PyBugz is a Python library and command-line tool to query the Bugzilla
1471 bug tracking system. It is meant as an aid to speed up interaction with the
1472 bug tracker.")
1473 (home-page "http://www.liquidx.net/pybugz/")
1474 (license license:gpl2)))
1475
1476 (define-public python-enum34
1477 (package
1478 (name "python-enum34")
1479 (version "1.1.6")
1480 (source
1481 (origin
1482 (method url-fetch)
1483 (uri (pypi-uri "enum34" version))
1484 (sha256
1485 (base32
1486 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1487 (build-system python-build-system)
1488 (home-page "https://pypi.python.org/pypi/enum34")
1489 (synopsis "Backported Python 3.4 Enum")
1490 (description
1491 "Enum34 is the new Python stdlib enum module available in Python 3.4
1492 backported for previous versions of Python from 2.4 to 3.3.")
1493 (license license:bsd-3)))
1494
1495 (define-public python2-enum34
1496 (package-with-python2 python-enum34))
1497
1498 (define-public python-parse-type
1499 (package
1500 (name "python-parse-type")
1501 (version "0.3.4")
1502 (source
1503 (origin
1504 (method url-fetch)
1505 (uri (string-append "https://pypi.python.org/packages/source/p/"
1506 "parse_type/parse_type-" version ".tar.gz"))
1507 (sha256
1508 (base32
1509 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1510 (build-system python-build-system)
1511 (arguments
1512 `(#:phases
1513 (modify-phases %standard-phases
1514 (add-after 'unpack 'patch-tests
1515 (lambda _
1516 (substitute* "tests/test_parse_type_parse.py"
1517 ;; Newer Python versions don't have the problem this test tests.
1518 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1519 ""))
1520 #t)))))
1521 (propagated-inputs
1522 `(("python-six" ,python-six)
1523 ("python-parse" ,python-parse)))
1524 (native-inputs
1525 `(("python-pytest" ,python-pytest)
1526 ("python-pytest-runner" ,python-pytest-runner)))
1527 (home-page "https://github.com/jenisys/parse_type")
1528 (synopsis "Extended parse module")
1529 (description
1530 "Parse_type extends the python parse module.")
1531 (properties
1532 `((python2-variant . ,(delay python2-parse-type))))
1533 (license license:bsd-3)))
1534
1535 (define-public python2-parse-type
1536 (let ((base (package-with-python2
1537 (strip-python2-variant python-parse-type))))
1538 (package (inherit base)
1539 (propagated-inputs
1540 `(("python2-enum34" ,python2-enum34)
1541 ,@(package-propagated-inputs base))))))
1542
1543 (define-public python-parse
1544 (package
1545 (name "python-parse")
1546 (version "1.6.6")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "parse" version))
1551 (sha256
1552 (base32
1553 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1554 (patches (search-patches "python-parse-too-many-fields.patch"))))
1555 (build-system python-build-system)
1556 (arguments
1557 `(#:phases
1558 (modify-phases %standard-phases
1559 (replace 'check
1560 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1561 (home-page "https://github.com/r1chardj0n3s/parse")
1562 (synopsis "Parse strings")
1563 (description
1564 "Parse strings using a specification based on the Python format()
1565 syntax.")
1566 (license license:x11)))
1567
1568 (define-public python-polib
1569 (package
1570 (name "python-polib")
1571 (version "1.0.8")
1572 (source (origin
1573 (method url-fetch)
1574 (uri (pypi-uri "polib" version))
1575 (sha256
1576 (base32
1577 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1578 (build-system python-build-system)
1579 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1580 (synopsis "Manipulate, create and modify gettext files")
1581 (description "Polib can manipulate any gettext format (po, pot and mo)
1582 files. It can be used to create po files from scratch or to modify
1583 existing ones.")
1584 (license license:expat)))
1585
1586 (define-public python2-polib
1587 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1588 (package
1589 (inherit base)
1590 (arguments `(,@(package-arguments base)
1591 ;; Tests don't work with python2.
1592 #:tests? #f)))))
1593
1594 (define-public scons
1595 (package
1596 (name "scons")
1597 (version "2.5.1")
1598 (source (origin
1599 (method url-fetch)
1600 (uri (string-append "mirror://sourceforge/scons/scons/" version
1601 "/scons-" version ".tar.gz"))
1602 (sha256
1603 (base32
1604 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1605 (build-system python-build-system)
1606 (arguments
1607 ;; With Python 3.x, fails to build with a syntax error.
1608 `(#:python ,python-2
1609 #:use-setuptools? #f ; still relies on distutils
1610 #:tests? #f)) ; no 'python setup.py test' command
1611 (home-page "http://scons.org/")
1612 (synopsis "Software construction tool written in Python")
1613 (description
1614 "SCons is a software construction tool. Think of SCons as an improved,
1615 cross-platform substitute for the classic Make utility with integrated
1616 functionality similar to autoconf/automake and compiler caches such as ccache.
1617 In short, SCons is an easier, more reliable and faster way to build
1618 software.")
1619 (license license:x11)))
1620
1621 (define-public python-extras
1622 (package
1623 (name "python-extras")
1624 (version "0.0.3")
1625 (source
1626 (origin
1627 (method url-fetch)
1628 (uri (string-append
1629 "https://pypi.python.org/packages/source/e/extras/extras-"
1630 version ".tar.gz"))
1631 (sha256
1632 (base32
1633 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1634 (build-system python-build-system)
1635 (arguments
1636 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1637 '(#:tests? #f))
1638 (home-page "https://github.com/testing-cabal/extras")
1639 (synopsis "Useful extensions to the Python standard library")
1640 (description
1641 "Extras is a set of extensions to the Python standard library.")
1642 (license license:expat)))
1643
1644 (define-public python2-extras
1645 (package-with-python2 python-extras))
1646
1647 (define-public python-mimeparse
1648 (package
1649 (name "python-mimeparse")
1650 (version "0.1.4")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (string-append
1655 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1656 version ".tar.gz"))
1657 (sha256
1658 (base32
1659 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1660 (build-system python-build-system)
1661 (arguments
1662 '(#:tests? #f)) ; no setup.py test command
1663 (home-page
1664 "https://github.com/dbtsai/python-mimeparse")
1665 (synopsis "Python library for parsing MIME types")
1666 (description
1667 "Mimeparse provides basic functions for parsing MIME type names and
1668 matching them against a list of media-ranges.")
1669 (license license:expat)))
1670
1671 (define-public python2-mimeparse
1672 (package-with-python2 python-mimeparse))
1673
1674 (define-public python-nose
1675 (package
1676 (name "python-nose")
1677 (version "1.3.7")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "nose" version))
1682 (sha256
1683 (base32
1684 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1685 (build-system python-build-system)
1686 (arguments
1687 '(#:tests? #f)) ; FIXME: test suite fails
1688 (home-page "http://readthedocs.org/docs/nose/")
1689 (synopsis "Python testing library")
1690 (description
1691 "Nose extends the unittest library to make testing easier.")
1692 (license license:lgpl2.0+)))
1693
1694 (define-public python2-nose
1695 (package-with-python2 python-nose))
1696
1697 (define-public python-nose2
1698 (package
1699 (name "python-nose2")
1700 (version "0.6.5")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "nose2" version))
1705 (sha256
1706 (base32
1707 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1708 (build-system python-build-system)
1709 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1710 (propagated-inputs
1711 `(("python-cov-core" ,python-cov-core)
1712 ("python-pytest-cov" ,python-pytest-cov)
1713 ("python-six" ,python-six)))
1714 (home-page "https://github.com/nose-devs/nose2")
1715 (synopsis "Next generation of nicer testing for Python")
1716 (description
1717 "Nose2 is the next generation of nicer testing for Python, based on the
1718 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1719 better plugin api, being easier for users to configure, and simplifying internal
1720 interfaces and processes.")
1721 (license license:bsd-2)))
1722
1723 (define-public python2-nose2
1724 (package-with-python2 python-nose2))
1725
1726 (define-public python-unittest2
1727 (package
1728 (name "python-unittest2")
1729 (version "0.5.1")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (string-append
1734 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1739 (build-system python-build-system)
1740 (home-page "http://pypi.python.org/pypi/unittest2")
1741 (synopsis "Python unit testing library")
1742 (description
1743 "Unittest2 is a replacement for the unittest module in the Python
1744 standard library.")
1745 (license license:psfl)))
1746
1747 (define-public python2-unittest2
1748 (package (inherit python-unittest2)
1749 (name "python2-unittest2")
1750 (version "0.5.1")
1751 (source
1752 (origin
1753 (method url-fetch)
1754 (uri (string-append
1755 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1756 version ".tar.gz"))
1757 (sha256
1758 (base32
1759 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1760 (arguments
1761 `(#:python ,python-2
1762 #:tests? #f)))) ; no setup.py test command
1763
1764 (define-public python-pafy
1765 (package
1766 (name "python-pafy")
1767 (version "0.5.3.1")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "pafy" version))
1772 (sha256
1773 (base32
1774 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1775 (build-system python-build-system)
1776 (arguments
1777 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1778 (propagated-inputs
1779 ;; Youtube-dl is a python package which is imported in the file
1780 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1781 `(("youtube-dl" ,youtube-dl)))
1782 (home-page "https://np1.github.io/pafy/")
1783 (synopsis "Retrieve YouTube content and metadata")
1784 (description
1785 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1786 (license license:lgpl3+)))
1787
1788 (define-public python-py
1789 (package
1790 (name "python-py")
1791 (version "1.4.32")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "py" version))
1796 (sha256
1797 (base32
1798 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1799 (build-system python-build-system)
1800 (arguments
1801 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1802 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1803 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1804 ;; Is this module globally installed?"
1805 '(#:tests? #f))
1806 (home-page "http://pylib.readthedocs.org/")
1807 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1808 (description
1809 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1810 code introspection, and logging.")
1811 (license license:expat)))
1812
1813 (define-public python2-py
1814 (package-with-python2 python-py))
1815
1816 (define-public python-pytest
1817 (package
1818 (name "python-pytest")
1819 (version "2.7.3")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (string-append
1824 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1825 version ".tar.gz"))
1826 (sha256
1827 (base32
1828 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1829 (modules '((guix build utils)))
1830 (snippet
1831 ;; One of the tests involves the /usr directory, so it fails.
1832 '(substitute* "testing/test_argcomplete.py"
1833 (("def test_remove_dir_prefix\\(self\\):")
1834 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1835 (build-system python-build-system)
1836 (propagated-inputs
1837 `(("python-py" ,python-py)))
1838 (native-inputs
1839 `(("python-nose" ,python-nose)
1840 ("python-mock" ,python-mock)))
1841 (home-page "http://pytest.org")
1842 (synopsis "Python testing library")
1843 (description
1844 "Pytest is a testing tool that provides auto-discovery of test modules
1845 and functions, detailed info on failing assert statements, modular fixtures,
1846 and many external plugins.")
1847 (license license:expat)))
1848
1849 (define-public python2-pytest
1850 (package-with-python2 python-pytest))
1851
1852 ;; Some packages require a newer pytest.
1853 (define-public python-pytest-3.0
1854 (package
1855 (inherit python-pytest)
1856 (name "python-pytest")
1857 (version "3.0.7")
1858 (source (origin
1859 (method url-fetch)
1860 (uri (pypi-uri "pytest" version))
1861 (sha256
1862 (base32
1863 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1864 (arguments
1865 `(#:phases
1866 (modify-phases %standard-phases
1867 (add-before 'check 'disable-invalid-test
1868 (lambda _
1869 (substitute* "testing/test_argcomplete.py"
1870 (("def test_remove_dir_prefix" line)
1871 (string-append "@pytest.mark.skip"
1872 "(reason=\"Assumes that /usr exists.\")\n "
1873 line)))
1874 #t)))))
1875 (native-inputs
1876 `(("python-nose" ,python-nose)
1877 ("python-mock" ,python-mock)
1878 ("python-hypothesis" ,python-hypothesis)))
1879 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1880
1881 (define-public python2-pytest-3.0
1882 (let ((base (package-with-python2
1883 (strip-python2-variant python-pytest-3.0))))
1884 (package (inherit base)
1885 (native-inputs
1886 `(("python2-enum34" ,python2-enum34)
1887 ,@(package-native-inputs base))))))
1888
1889 (define-public python-pytest-cov
1890 (package
1891 (name "python-pytest-cov")
1892 (version "2.4.0")
1893 (source
1894 (origin
1895 (method url-fetch)
1896 (uri (pypi-uri "pytest-cov" version))
1897 (sha256
1898 (base32
1899 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1900 (build-system python-build-system)
1901 (arguments
1902 `(#:phases
1903 (modify-phases %standard-phases
1904 (replace 'check
1905 (lambda _
1906 ;; options taken from tox.ini
1907 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1908 ;; with "Duplicate implicit target name"
1909 (zero? (system* "python" "./setup.py" "check"
1910 "--strict" "--metadata")))))))
1911 (propagated-inputs
1912 `(("python-coverage" ,python-coverage)
1913 ("python-pytest" ,python-pytest)))
1914 (home-page "https://github.com/pytest-dev/pytest-cov")
1915 (synopsis "Pytest plugin for measuring coverage")
1916 (description
1917 "Pytest-cov produces coverage reports. It supports centralised testing and
1918 distributed testing in both @code{load} and @code{each} modes. It also
1919 supports coverage of subprocesses.")
1920 (license license:expat)))
1921
1922 (define-public python2-pytest-cov
1923 (package-with-python2 python-pytest-cov))
1924
1925 (define-public python-pytest-runner
1926 (package
1927 (name "python-pytest-runner")
1928 (version "2.11.1")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (pypi-uri "pytest-runner" version))
1933 (sha256
1934 (base32
1935 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1936 (build-system python-build-system)
1937 (arguments
1938 `(#:phases
1939 (modify-phases %standard-phases
1940 ;; The fancy way of setting the version with setuptools_scm does not
1941 ;; seem to work here.
1942 (add-after 'unpack 'set-version
1943 (lambda _
1944 (substitute* "docs/conf.py"
1945 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1946 (string-append "version = \"" ,version "\"")))
1947 #t)))))
1948 (native-inputs
1949 `(("python-pytest" ,python-pytest)
1950 ("python-setuptools-scm" ,python-setuptools-scm)))
1951 (home-page "https://github.com/pytest-dev/pytest-runner")
1952 (synopsis "Invoke py.test as a distutils command")
1953 (description
1954 "This package provides a @command{pytest-runner} command that
1955 @file{setup.py} files can use to run tests.")
1956 (license license:expat)))
1957
1958 (define-public python2-pytest-runner
1959 (package-with-python2 python-pytest-runner))
1960
1961 (define-public python-pytest-mock
1962 (package
1963 (name "python-pytest-mock")
1964 (version "1.2")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (pypi-uri "pytest-mock" version ".zip"))
1969 (sha256
1970 (base32
1971 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1972 (build-system python-build-system)
1973 (native-inputs
1974 `(("unzip" ,unzip)))
1975 (propagated-inputs
1976 `(("python-pytest" ,python-pytest)))
1977 (home-page "https://github.com/pytest-dev/pytest-mock/")
1978 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1979 (description
1980 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1981 around the patching API provided by the @code{mock} package, but with the
1982 benefit of not having to worry about undoing patches at the end of a test.
1983 The mocker fixture has the same API as @code{mock.patch}, supporting the
1984 same arguments.")
1985 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1986 (license license:expat)))
1987
1988 (define-public python2-pytest-mock
1989 (let ((base (package-with-python2
1990 (strip-python2-variant python-pytest-mock))))
1991 (package (inherit base)
1992 (propagated-inputs
1993 `(("python2-mock" ,python2-mock)
1994 ,@(package-propagated-inputs base))))))
1995
1996 (define-public python-pytest-xdist
1997 (package
1998 (name "python-pytest-xdist")
1999 (version "1.14")
2000 (source
2001 (origin
2002 (method url-fetch)
2003 (uri (pypi-uri "pytest-xdist" version ".zip"))
2004 (sha256
2005 (base32
2006 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2007 (modules '((guix build utils)))
2008 (snippet
2009 '(begin
2010 ;; Remove pre-compiled .pyc files from source.
2011 (for-each delete-file-recursively
2012 (find-files "." "__pycache__" #:directories? #t))
2013 (for-each delete-file (find-files "." "\\.pyc$"))
2014 #t))))
2015 (build-system python-build-system)
2016 (arguments
2017 '(#:tests? #f)) ;FIXME: Some tests are failing.
2018 ;; #:phases
2019 ;; (modify-phases %standard-phases
2020 ;; (delete 'check)
2021 ;; (add-after 'install 'check
2022 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2023 ;; (add-installed-pythonpath inputs outputs)
2024 ;; (zero? (system* "py.test" "-v")))))
2025 (native-inputs
2026 `(("unzip" ,unzip)
2027 ("python-setuptools-scm" ,python-setuptools-scm)))
2028 (propagated-inputs
2029 `(("python-execnet" ,python-execnet)
2030 ("python-pytest" ,python-pytest)
2031 ("python-py" ,python-py)))
2032 (home-page
2033 "https://github.com/pytest-dev/pytest-xdist")
2034 (synopsis
2035 "Plugin for py.test with distributed testing and loop-on-failing modes")
2036 (description
2037 "The pytest-xdist plugin extends py.test with some unique test execution
2038 modes: parallelization, running tests in boxed subprocesses, the ability
2039 to run tests repeatedly when failed, and the ability to run tests on multiple
2040 Python interpreters or platforms. It uses rsync to copy the existing
2041 program code to a remote location, executes there, and then syncs the
2042 result back.")
2043 (license license:expat)))
2044
2045 (define-public python2-pytest-xdist
2046 (package-with-python2 python-pytest-xdist))
2047
2048 (define-public python-scripttest
2049 (package
2050 (name "python-scripttest")
2051 (version "1.3")
2052 (source
2053 (origin
2054 (method url-fetch)
2055 (uri (string-append
2056 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2057 version ".tar.gz"))
2058 (sha256
2059 (base32
2060 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2061 (build-system python-build-system)
2062 (native-inputs
2063 `(("python-pytest" ,python-pytest)))
2064 (home-page "http://pythonpaste.org/scripttest/")
2065 (synopsis "Python library to test command-line scripts")
2066 (description "Scripttest is a Python helper library for testing
2067 interactive command-line applications. With it you can run a script in a
2068 subprocess and see the output as well as any file modifications.")
2069 (license license:expat)))
2070
2071 (define-public python2-scripttest
2072 (package-with-python2 python-scripttest))
2073
2074 (define-public python-testtools
2075 (package
2076 (name "python-testtools")
2077 (version "1.4.0")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (pypi-uri "testtools" version))
2082 (sha256
2083 (base32
2084 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2085 (build-system python-build-system)
2086 (arguments
2087 `(#:phases
2088 (modify-phases %standard-phases
2089 (add-after 'unpack 'fix-module-imports
2090 (lambda _
2091 (substitute* "setup.py"
2092 (("'unittest2>=0.8.0',") ""))
2093 (substitute* '("testtools/testcase.py"
2094 "testtools/testsuite.py"
2095 "testtools/run.py"
2096 "testtools/tests/test_run.py"
2097 "testtools/tests/test_testsuite.py"
2098 "testtools/tests/test_deferredruntest.py")
2099 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2100 (("import unittest2 as unittest") "import unittest")
2101 (("import unittest2") "import unittest as unittest2")
2102 (("from unittest2 import") "from unittest import"))
2103 (substitute* "testtools/tests/test_testresult.py"
2104 ;; NUL in source code is not allowed (raises ValueError).
2105 (("\\x00\\x04") "\\x04"))
2106 #t)))))
2107 (propagated-inputs
2108 `(("python-mimeparse" ,python-mimeparse)
2109 ("python-extras" ,python-extras)))
2110 (home-page "https://github.com/testing-cabal/testtools")
2111 (synopsis
2112 "Extensions to the Python standard library unit testing framework")
2113 (description
2114 "Testtools extends the Python standard library unit testing framework to
2115 provide matchers, more debugging information, and cross-Python
2116 compatibility.")
2117 (license license:psfl)))
2118
2119 (define-public python2-testtools
2120 (package-with-python2 python-testtools))
2121
2122 (define-public python-testscenarios
2123 (package
2124 (name "python-testscenarios")
2125 (version "0.4")
2126 (source
2127 (origin
2128 (method url-fetch)
2129 (uri (string-append
2130 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2131 version ".tar.gz"))
2132 (sha256
2133 (base32
2134 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2135 (build-system python-build-system)
2136 (propagated-inputs
2137 `(("python-testtools" ,python-testtools)))
2138 (home-page "https://launchpad.net/testscenarios")
2139 (synopsis "Pyunit extension for dependency injection")
2140 (description
2141 "Testscenarios provides clean dependency injection for Python unittest
2142 style tests.")
2143 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2144
2145 (define-public python2-testscenarios
2146 (package-with-python2 python-testscenarios))
2147
2148 (define-public python-testresources
2149 (package
2150 (name "python-testresources")
2151 (version "0.2.7")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (string-append
2156 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2157 version ".tar.gz"))
2158 (sha256
2159 (base32
2160 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2161 (build-system python-build-system)
2162 (home-page "https://launchpad.net/testresources")
2163 (synopsis
2164 "Pyunit extension for managing test resources")
2165 (description
2166 "Testresources is an extension to Python's unittest to allow declarative
2167 use of resources by test cases.")
2168 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2169
2170 (define-public python2-testresources
2171 (package-with-python2 python-testresources))
2172
2173 (define-public python-subunit
2174 (package
2175 (name "python-subunit")
2176 (version "0.0.21")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (string-append
2181 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2182 version ".tar.gz"))
2183 (sha256
2184 (base32
2185 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2186 (build-system python-build-system)
2187 (propagated-inputs
2188 `(("python-extras" ,python-extras)
2189 ("python-mimeparse" ,python-mimeparse)))
2190 (native-inputs
2191 `(("python-testscenarios" ,python-testscenarios)))
2192 (home-page "http://launchpad.net/subunit")
2193 (synopsis "Python implementation of the subunit protocol")
2194 (description
2195 "Python-subunit is a Python implementation of the subunit test streaming
2196 protocol.")
2197 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2198
2199 (define-public python2-subunit
2200 (package-with-python2 python-subunit))
2201
2202 ;; Recent versions of python-fixtures and python-testrepository need
2203 ;; python-pbr for packaging, which itself needs these two packages for
2204 ;; testing.
2205 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2206 ;; same source, just without any test dependencies and with tests disabled.
2207 ;; python-pbr-minmal is then used to package python-fixtures and
2208 ;; python-testrepository.
2209 ;; Strictly speaking we currently could remove the test-requirements from the
2210 ;; normal python-pbr package (and save this package) since test are disabled
2211 ;; there anyway. But this may change in future.
2212 (define python-pbr-minimal
2213 (package
2214 (name "python-pbr-minimal")
2215 (version "1.10.0")
2216 (source
2217 (origin
2218 (method url-fetch)
2219 (uri (pypi-uri "pbr" version))
2220 (sha256
2221 (base32
2222 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2223 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2224 (build-system python-build-system)
2225 (arguments
2226 `(#:tests? #f))
2227 (home-page "http://docs.openstack.org/developer/pbr/")
2228 (synopsis "Minimal build of python-pbr used for bootstrapping")
2229 (description
2230 "Used only for bootstrapping python2-pbr, you should not need this.")
2231 (license license:asl2.0)))
2232
2233 (define python2-pbr-minimal
2234 (package-with-python2 python-pbr-minimal))
2235
2236 (define-public python-pbr
2237 (package
2238 (inherit python-pbr-minimal)
2239 (name "python-pbr")
2240 (arguments
2241 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2242 (propagated-inputs
2243 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2244 (native-inputs
2245 `(("python-fixtures" ,python-fixtures)
2246 ;; discover, coverage, hacking, subunit
2247 ("python-mock" ,python-mock)
2248 ("python-six" ,python-six)
2249 ("python-sphinx" ,python-sphinx)
2250 ("python-testrepository" ,python-testrepository)
2251 ("python-testresources" ,python-testresources)
2252 ("python-testscenarios" ,python-testscenarios)
2253 ("python-testtools" ,python-testtools)
2254 ("python-virtualenv" ,python-virtualenv)))
2255 (synopsis "Enhance the default behavior of Python’s setuptools")
2256 (description
2257 "Python Build Reasonableness (PBR) is a library that injects some useful
2258 and sensible default behaviors into your setuptools run. It will set
2259 versions, process requirements files and generate AUTHORS and ChangeLog file
2260 from git information.
2261 ")))
2262
2263 (define-public python2-pbr
2264 (package-with-python2 python-pbr))
2265
2266 (define-public python-fixtures
2267 (package
2268 (name "python-fixtures")
2269 (version "1.4.0")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "fixtures" version))
2274 (sha256
2275 (base32
2276 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2277 (build-system python-build-system)
2278 (arguments
2279 '(#:phases
2280 (modify-phases %standard-phases
2281 (replace 'check
2282 (lambda _
2283 (zero? (system* "python" "-m" "testtools.run"
2284 "fixtures.test_suite")))))))
2285 (propagated-inputs
2286 `(("python-six" ,python-six)))
2287 (native-inputs
2288 `(("python-mock" ,python-mock)
2289 ("python-pbr-minimal" ,python-pbr-minimal)
2290 ("python-testtools" ,python-testtools)))
2291 (home-page "https://launchpad.net/python-fixtures")
2292 (synopsis "Python test fixture library")
2293 (description
2294 "Fixtures provides a way to create reusable state, useful when writing
2295 Python tests.")
2296 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2297
2298 (define-public python2-fixtures
2299 (package-with-python2 python-fixtures))
2300
2301 (define-public python-testrepository
2302 (package
2303 (name "python-testrepository")
2304 (version "0.0.20")
2305 (source
2306 (origin
2307 (method url-fetch)
2308 (uri (string-append
2309 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2310 version ".tar.gz"))
2311 (sha256
2312 (base32
2313 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2314 (build-system python-build-system)
2315 (arguments
2316 ;; FIXME: Many tests are failing.
2317 '(#:tests? #f))
2318 (propagated-inputs
2319 `(("python-fixtures" ,python-fixtures)
2320 ("python-subunit" ,python-subunit)
2321 ("python-testtools" ,python-testtools)))
2322 (native-inputs
2323 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2324 ("python-mimeparse" ,python-mimeparse)))
2325 (home-page "https://launchpad.net/testrepository")
2326 (synopsis "Database for Python test results")
2327 (description "Testrepository provides a database of test results which can
2328 be used as part of a developer's workflow to check things such as what tests
2329 have failed since the last commit or what tests are currently failing.")
2330 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2331
2332 (define-public python2-testrepository
2333 (package-with-python2 python-testrepository))
2334
2335 (define-public python-coverage
2336 (package
2337 (name "python-coverage")
2338 (version "4.1")
2339 (source
2340 (origin
2341 (method url-fetch)
2342 (uri (pypi-uri "coverage" version))
2343 (sha256
2344 (base32
2345 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2346 (build-system python-build-system)
2347 (arguments
2348 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2349 '(#:tests? #f))
2350 (home-page "http://nedbatchelder.com/code/coverage")
2351 (synopsis "Code coverage measurement for Python")
2352 (description
2353 "Coverage measures code coverage, typically during test execution. It
2354 uses the code analysis tools and tracing hooks provided in the Python standard
2355 library to determine which lines are executable, and which have been
2356 executed.")
2357 (license license:bsd-3)))
2358
2359 (define-public python2-coverage
2360 (package-with-python2 python-coverage))
2361
2362 (define-public python-cov-core
2363 (package
2364 (name "python-cov-core")
2365 (version "1.15.0")
2366 (source
2367 (origin
2368 (method url-fetch)
2369 (uri (pypi-uri "cov-core" version))
2370 (sha256
2371 (base32
2372 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2373 (build-system python-build-system)
2374 (propagated-inputs
2375 `(("python-coverage" ,python-coverage)))
2376 (home-page "https://github.com/schlamar/cov-core")
2377 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2378 (description
2379 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2380 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2381 testing frameworks.")
2382 (license license:expat)))
2383
2384 (define-public python2-cov-core
2385 (package-with-python2 python-cov-core))
2386
2387 (define-public python-discover
2388 (package
2389 (name "python-discover")
2390 (version "0.4.0")
2391 (source
2392 (origin
2393 (method url-fetch)
2394 (uri (string-append
2395 "https://pypi.python.org/packages/source/d/discover/discover-"
2396 version ".tar.gz"))
2397 (sha256
2398 (base32
2399 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2400 (build-system python-build-system)
2401 (home-page "http://pypi.python.org/pypi/discover/")
2402 (synopsis
2403 "Python test discovery for unittest")
2404 (description
2405 "Discover provides test discovery for unittest, a feature that has been
2406 backported from Python 2.7 for Python 2.4+.")
2407 (license license:bsd-3)))
2408
2409 (define-public python2-discover
2410 (package-with-python2 python-discover))
2411
2412 (define-public behave
2413 (package
2414 (name "behave")
2415 (version "1.2.5")
2416 (source (origin
2417 (method url-fetch)
2418 (uri (pypi-uri "behave" version ".tar.bz2"))
2419 (sha256
2420 (base32
2421 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2422 (build-system python-build-system)
2423 (propagated-inputs
2424 `(("python-six" ,python-six)
2425 ("python-parse" ,python-parse)
2426 ("python-parse-type" ,python-parse-type)))
2427 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2428 ;PyHamcrest>=1.8
2429 (home-page "https://github.com/behave/behave")
2430 (synopsis "Python behavior-driven development")
2431 (description
2432 "Behave is a tool for behavior-driven development in python.
2433 Behavior-driven development (or BDD) is an agile software development
2434 technique that encourages collaboration between developers, QA and
2435 non-technical or business participants in a software project. Behave uses
2436 tests written in a natural language style, backed up by Python code.")
2437 (license license:x11)))
2438
2439 (define-public python-exif-read
2440 (package
2441 (name "python-exif-read")
2442 (version "2.1.2")
2443 (source (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "ExifRead" version))
2446 (sha256
2447 (base32
2448 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2449 (build-system python-build-system)
2450 (arguments `(#:tests? #f)) ; no tests
2451 (home-page "https://github.com/ianare/exif-py")
2452 (synopsis "Python library to extract EXIF data from image files")
2453 (description
2454 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2455 files.")
2456 (license license:bsd-3)))
2457
2458 (define-public python2-exif-read
2459 (package-with-python2 python-exif-read))
2460
2461 (define-public python-pyld
2462 (package
2463 (name "python-pyld")
2464 (version "0.7.1")
2465 (source (origin
2466 (method url-fetch)
2467 (uri (pypi-uri "PyLD" version))
2468 (sha256
2469 (base32
2470 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2471 (build-system python-build-system)
2472 (arguments `(#:tests? #f)) ; no tests
2473 (home-page "https://github.com/digitalbazaar/pyld")
2474 (synopsis "Python implementation of the JSON-LD specification")
2475 (description
2476 "PyLD is an implementation of the JSON-LD specification.")
2477 (license license:bsd-3)))
2478
2479 (define-public python2-pyld
2480 (package-with-python2 python-pyld))
2481
2482 (define-public python-certifi
2483 (package
2484 (name "python-certifi")
2485 (version "2017.1.23")
2486 (source (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "certifi" version))
2489 (sha256
2490 (base32
2491 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2492 (build-system python-build-system)
2493 (home-page "https://certifi.io/")
2494 (synopsis "Python CA certificate bundle")
2495 (description
2496 "Certifi is a Python library that contains a CA certificate bundle, which
2497 is used by the Requests library to verify HTTPS requests.")
2498 (license license:asl2.0)))
2499
2500 (define-public python2-certifi
2501 (package-with-python2 python-certifi))
2502
2503 (define-public python-click
2504 (package
2505 (name "python-click")
2506 (version "6.7")
2507 (source
2508 (origin
2509 (method url-fetch)
2510 (uri (pypi-uri "click" version))
2511 (sha256
2512 (base32
2513 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2514 (build-system python-build-system)
2515 (arguments
2516 `(#:phases
2517 (modify-phases %standard-phases
2518 (add-after 'unpack 'fix-paths
2519 (lambda* (#:key inputs #:allow-other-keys)
2520 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2521 "cross-libc" "libc"))))
2522 (substitute* "click/_unicodefun.py"
2523 (("'locale'")
2524 (string-append "'" glibc "/bin/locale'"))))
2525 #t))
2526 (replace 'check
2527 (lambda _
2528 (zero? (system* "make" "test")))))))
2529 (native-inputs
2530 `(("python-pytest" ,python-pytest)))
2531 (home-page "http://click.pocoo.org")
2532 (synopsis "Command line library for Python")
2533 (description
2534 "Click is a Python package for creating command line interfaces in a
2535 composable way with as little code as necessary. Its name stands for
2536 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2537 with sensible defaults out of the box.")
2538 (license license:bsd-3)))
2539
2540 (define-public python2-click
2541 (package-with-python2 python-click))
2542
2543 (define-public python-wheel
2544 (package
2545 (name "python-wheel")
2546 (version "0.30.0a0")
2547 (source
2548 (origin
2549 (method url-fetch)
2550 (uri (pypi-uri "wheel" version))
2551 (sha256
2552 (base32
2553 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2554 (build-system python-build-system)
2555 (native-inputs
2556 `(("python-jsonschema" ,python-jsonschema)
2557 ("python-pytest-cov" ,python-pytest-cov)))
2558 (home-page "https://bitbucket.org/pypa/wheel/")
2559 (synopsis "Format for built Python packages")
2560 (description
2561 "A wheel is a ZIP-format archive with a specially formatted filename and
2562 the @code{.whl} extension. It is designed to contain all the files for a PEP
2563 376 compatible install in a way that is very close to the on-disk format. Many
2564 packages will be properly installed with only the @code{Unpack} step and the
2565 unpacked archive preserves enough information to @code{Spread} (copy data and
2566 scripts to their final locations) at any later time. Wheel files can be
2567 installed with a newer @code{pip} or with wheel's own command line utility.")
2568 (license license:expat)
2569 (properties `((python2-variant . ,(delay python2-wheel))))))
2570
2571 (define-public python2-wheel
2572 (let ((wheel (package-with-python2
2573 (strip-python2-variant python-wheel))))
2574 (package (inherit wheel)
2575 (native-inputs `(("python2-functools32" ,python2-functools32)
2576 ,@(package-native-inputs wheel))))))
2577
2578
2579 (define-public python-requests
2580 (package
2581 (name "python-requests")
2582 (version "2.13.0")
2583 (source (origin
2584 (method url-fetch)
2585 (uri (pypi-uri "requests" version))
2586 (sha256
2587 (base32
2588 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2589 ;; TODO: unbundle urllib3 and chardet.
2590 (build-system python-build-system)
2591 (arguments
2592 ;; FIXME: Some tests require network access.
2593 '(#:tests? #f))
2594 (home-page "http://python-requests.org/")
2595 (synopsis "Python HTTP library")
2596 (description
2597 "Requests is a Python HTTP client library. It aims to be easier to use
2598 than Python’s urllib2 library.")
2599 (license license:asl2.0)))
2600
2601 ;; Some software requires an older version of Requests, notably Docker
2602 ;; Compose.
2603 (define-public python-requests-2.7
2604 (package (inherit python-requests)
2605 (version "2.7.0")
2606 (source (origin
2607 (method url-fetch)
2608 (uri (pypi-uri "requests" version))
2609 (sha256
2610 (base32
2611 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2612
2613 (define-public python2-requests
2614 (package-with-python2 python-requests))
2615
2616 (define-public python-vcversioner
2617 (package
2618 (name "python-vcversioner")
2619 (version "2.16.0.0")
2620 (source
2621 (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "vcversioner" version))
2624 (sha256
2625 (base32
2626 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2627 (build-system python-build-system)
2628 (synopsis "Python library for version number discovery")
2629 (description "Vcversioner is a Python library that inspects tagging
2630 information in a variety of version control systems in order to discover
2631 version numbers.")
2632 (home-page "https://github.com/habnabit/vcversioner")
2633 (license license:isc)))
2634
2635 (define-public python2-vcversioner
2636 (package-with-python2 python-vcversioner))
2637
2638 (define-public python-jsonschema
2639 (package
2640 (name "python-jsonschema")
2641 (version "2.5.1")
2642 (source (origin
2643 (method url-fetch)
2644 (uri
2645 (string-append
2646 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2647 version ".tar.gz"))
2648 (sha256
2649 (base32
2650 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2651 (build-system python-build-system)
2652 (arguments
2653 '(#:phases
2654 (modify-phases %standard-phases
2655 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2656 (native-inputs
2657 `(("python-nose" ,python-nose)
2658 ("python-vcversioner" ,python-vcversioner)))
2659 (home-page "https://github.com/Julian/jsonschema")
2660 (synopsis "Implementation of JSON Schema for Python")
2661 (description
2662 "Jsonschema is an implementation of JSON Schema for Python.")
2663 (license license:expat)
2664 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2665
2666 (define-public python2-jsonschema
2667 (let ((jsonschema (package-with-python2
2668 (strip-python2-variant python-jsonschema))))
2669 (package (inherit jsonschema)
2670 (native-inputs
2671 `(("python2-mock" ,python2-mock)
2672 ,@(package-native-inputs jsonschema)))
2673 (propagated-inputs
2674 `(("python2-functools32" ,python2-functools32))))))
2675
2676 (define-public python-kitchen
2677 (package
2678 (name "python-kitchen")
2679 (version "1.2.4")
2680 (source
2681 (origin
2682 (method url-fetch)
2683 (uri (pypi-uri "kitchen" version))
2684 (sha256
2685 (base32
2686 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2687 (build-system python-build-system)
2688 (propagated-inputs
2689 `(("python-chardet" ,python-chardet)))
2690 (home-page "https://github.com/fedora-infra/kitchen")
2691 (synopsis "Python API for snippets")
2692 (description "@code{kitchen} module provides a python API for all sorts of
2693 little useful snippets of code that everybody ends up writing for their projects
2694 but never seem big enough to build an independent release. Use kitchen and stop
2695 cutting and pasting that code over and over.")
2696 (license (list license:lgpl2.1+
2697 ;; subprocess.py, test_subprocess.py,
2698 ;; kitchen/pycompat25/defaultdict.py:
2699 license:psfl))))
2700
2701 (define-public python2-kitchen
2702 (package-with-python2 python-kitchen))
2703
2704 (define-public python-unidecode
2705 (package
2706 (name "python-unidecode")
2707 (version "0.04.20")
2708 (source (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "Unidecode" version))
2711 (sha256
2712 (base32
2713 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2714 (build-system python-build-system)
2715 (home-page "https://pypi.python.org/pypi/Unidecode")
2716 (synopsis "ASCII transliterations of Unicode text")
2717 (description
2718 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2719 useful when integrating with legacy code that doesn't support Unicode, or for
2720 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2721 machine identifiers from human-readable Unicode strings that should still be
2722 somewhat intelligeble.")
2723 (license license:gpl2+)))
2724
2725 (define-public python2-unidecode
2726 (package-with-python2 python-unidecode))
2727
2728 (define-public python-pyjwt
2729 (package
2730 (name "python-pyjwt")
2731 (version "1.4.0")
2732 (source
2733 (origin
2734 (method url-fetch)
2735 (uri (pypi-uri "PyJWT" version))
2736 (sha256
2737 (base32
2738 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2739 (build-system python-build-system)
2740 (native-inputs
2741 `(("python-pytest" ,python-pytest)
2742 ("python-pytest-cov" ,python-pytest-cov)
2743 ("python-pytest-runner" ,python-pytest-runner)))
2744 (home-page "https://github.com/progrium/pyjwt")
2745 (synopsis "JSON Web Token implementation in Python")
2746 (description
2747 "PyJWT is a JSON Web Token implementation written in Python.")
2748 (license license:expat)))
2749
2750 (define-public python2-pyjwt
2751 (package-with-python2 python-pyjwt))
2752
2753 (define-public python-pykka
2754 (package
2755 (name "python-pykka")
2756 (version "1.2.1")
2757 (source
2758 (origin
2759 (method url-fetch)
2760 (uri (pypi-uri "Pykka" version))
2761 (sha256
2762 (base32
2763 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2764 (build-system python-build-system)
2765 (native-inputs
2766 `(("python-mock" ,python-mock)
2767 ("python-nose" ,python-nose)
2768 ("python-gevent" ,python-gevent)
2769 ("python-eventlet" ,python-eventlet)))
2770 (home-page "https://www.pykka.org/")
2771 (synopsis "Pykka is a Python implementation of the actor model")
2772 (description
2773 "Pykka is a Python implementation of the actor model.
2774 The actor model introduces some simple rules to control the sharing
2775 of state and cooperation between execution units, which makes it
2776 easier to build concurrent applications.")
2777 (license license:asl2.0)))
2778
2779 (define-public python2-pykka
2780 (package-with-python2 python-pykka))
2781
2782 (define-public python-oauthlib
2783 (package
2784 (name "python-oauthlib")
2785 (version "1.0.3")
2786 (source (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "oauthlib" version))
2789 (sha256
2790 (base32
2791 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2792 (build-system python-build-system)
2793 (native-inputs
2794 `(("python-nose" ,python-nose)
2795 ("python-mock" ,python-mock)
2796 ("python-cryptography" ,python-cryptography)
2797 ("python-pyjwt" ,python-pyjwt)
2798 ("python-blinker" ,python-blinker)))
2799 (home-page "https://github.com/idan/oauthlib")
2800 (synopsis "OAuth implementation for Python")
2801 (description
2802 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2803 OAuth request-signing logic.")
2804 (license license:bsd-3)
2805 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2806
2807 (define-public python2-oauthlib
2808 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2809 (package
2810 (inherit base)
2811 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2812 ,@(package-native-inputs base))))))
2813
2814 (define-public python-itsdangerous
2815 (package
2816 (name "python-itsdangerous")
2817 (version "0.24")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (string-append
2822 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2823 version ".tar.gz"))
2824 (sha256
2825 (base32
2826 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2827 (build-system python-build-system)
2828 (home-page "https://github.com/mitsuhiko/itsdangerous")
2829 (synopsis "Python library for passing data to/from untrusted environments")
2830 (description
2831 "Itsdangerous provides various helpers to pass trusted data to untrusted
2832 environments and back.")
2833 (license license:bsd-3)))
2834
2835 (define-public python2-itsdangerous
2836 (package-with-python2 python-itsdangerous))
2837
2838 (define-public python-pyyaml
2839 (package
2840 (name "python-pyyaml")
2841 (version "3.12")
2842 (source
2843 (origin
2844 (method url-fetch)
2845 (uri (pypi-uri "PyYAML" version))
2846 (sha256
2847 (base32
2848 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2849 (build-system python-build-system)
2850 (inputs
2851 `(("libyaml" ,libyaml)))
2852 (home-page "http://pyyaml.org/wiki/PyYAML")
2853 (synopsis "YAML parser and emitter for Python")
2854 (description
2855 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2856 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2857 API, and sensible error messages. PyYAML supports standard YAML tags and
2858 provides Python-specific tags that allow to represent an arbitrary Python
2859 object.")
2860 (license license:expat)))
2861
2862 (define-public python2-pyyaml
2863 (package-with-python2 python-pyyaml))
2864
2865 (define-public python-virtualenv
2866 (package
2867 (name "python-virtualenv")
2868 (version "15.0.3")
2869 (source
2870 (origin
2871 (method url-fetch)
2872 (uri (pypi-uri "virtualenv" version))
2873 (sha256
2874 (base32
2875 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2876 (build-system python-build-system)
2877 (arguments
2878 `(#:phases
2879 (modify-phases %standard-phases
2880 (replace 'check
2881 (lambda _
2882 ;; Disable failing test. See upstream bug report
2883 ;; https://github.com/pypa/virtualenv/issues/957
2884 (substitute* "tests/test_virtualenv.py"
2885 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2886 (zero? (system* "py.test")))))))
2887 (native-inputs
2888 `(("python-mock" ,python-mock)
2889 ("python-pytest" ,python-pytest)))
2890 (home-page "https://virtualenv.pypa.io/")
2891 (synopsis "Virtual Python environment builder")
2892 (description
2893 "Virtualenv is a tool to create isolated Python environments.")
2894 (license license:expat)))
2895
2896 (define-public python2-virtualenv
2897 (package-with-python2 python-virtualenv))
2898
2899 (define-public python-markupsafe
2900 (package
2901 (name "python-markupsafe")
2902 (version "0.23")
2903 (source
2904 (origin
2905 (method url-fetch)
2906 (uri (string-append
2907 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2908 version ".tar.gz"))
2909 (sha256
2910 (base32
2911 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2912 (build-system python-build-system)
2913 (home-page "https://github.com/mitsuhiko/markupsafe")
2914 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2915 (description
2916 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2917 for Python.")
2918 (license license:bsd-3)))
2919
2920 (define-public python2-markupsafe
2921 (package-with-python2 python-markupsafe))
2922
2923 (define-public python-jinja2
2924 (package
2925 (name "python-jinja2")
2926 (version "2.8")
2927 (source
2928 (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "Jinja2" version))
2931 (sha256
2932 (base32
2933 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2934 (build-system python-build-system)
2935 (propagated-inputs
2936 `(("python-markupsafe" ,python-markupsafe)))
2937 (home-page "http://jinja.pocoo.org/")
2938 (synopsis "Python template engine")
2939 (description
2940 "Jinja2 is a small but fast and easy to use stand-alone template engine
2941 written in pure Python.")
2942 (license license:bsd-3)))
2943
2944 (define-public python2-jinja2
2945 (package-with-python2 python-jinja2))
2946
2947 (define-public python-pystache
2948 (package
2949 (name "python-pystache")
2950 (version "0.5.4")
2951 (source (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "pystache" version))
2954 (sha256
2955 (base32
2956 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2957 (build-system python-build-system)
2958 (arguments
2959 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2960 (home-page "http://defunkt.io/pystache/")
2961 (synopsis "Python logic-less template engine")
2962 (description
2963 "Pystache is a Python implementation of the framework agnostic,
2964 logic-free templating system Mustache.")
2965 (license license:expat)
2966 (properties `((python2-variant . ,(delay python2-pystache))))))
2967
2968 (define-public python2-pystache
2969 (package (inherit (package-with-python2
2970 (strip-python2-variant python-pystache)))
2971 (arguments
2972 `(#:python ,python-2
2973 #:phases
2974 (modify-phases %standard-phases
2975 (replace 'check
2976 (lambda _
2977 (zero? (system* "python" "test_pystache.py")))))))))
2978
2979 (define-public python-joblib
2980 (package
2981 (name "python-joblib")
2982 (version "0.10.3")
2983 (source (origin
2984 (method url-fetch)
2985 (uri (pypi-uri "joblib" version))
2986 (sha256
2987 (base32
2988 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2989 (modules '((guix build utils)))
2990 (snippet
2991 '(begin
2992 ;; Remove pre-compiled .pyc files from source.
2993 (for-each delete-file-recursively
2994 (find-files "." "__pycache__" #:directories? #t))
2995 (for-each delete-file (find-files "." "\\.pyc$"))
2996 #t))))
2997 (build-system python-build-system)
2998 (arguments
2999 `(#:phases
3000 (modify-phases %standard-phases
3001 (add-before 'check 'disable-failing-tests
3002 (lambda _
3003 ;; This numpydoc tests fails for unknown reasons
3004 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3005 ;; This numpydoc test depends on matplotlib, which is not a
3006 ;; required input.
3007 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3008 ;; These tests fail to execute sys.executable
3009 (substitute* "joblib/test/test_parallel.py"
3010 (("import nose" line)
3011 (string-append "from nose.plugins.skip import SkipTest\n" line))
3012 (("def test_nested_parallel_warnings" line)
3013 (string-append "@SkipTest\n" line))
3014 (("def test_parallel_with_interactively_defined_functions" line)
3015 (string-append "@SkipTest\n" line)))
3016 #t)))))
3017 ;; Provide nose to enable tests command
3018 (native-inputs
3019 `(("python-nose" ,python-nose)
3020 ("python-sphinx" ,python-sphinx)
3021 ("python-docutils" ,python-docutils)
3022 ("python-numpydoc" ,python-numpydoc)))
3023 (home-page "http://pythonhosted.org/joblib/")
3024 (synopsis "Using Python functions as pipeline jobs")
3025 (description
3026 "Joblib is a set of tools to provide lightweight pipelining in Python.
3027 In particular, joblib offers: transparent disk-caching of the output values
3028 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3029 logging and tracing of the execution.")
3030 (license license:bsd-3)))
3031
3032 (define-public python2-joblib
3033 (package-with-python2 python-joblib))
3034
3035 (define-public python-docutils
3036 (package
3037 (name "python-docutils")
3038 (version "0.13.1")
3039 (source
3040 (origin
3041 (method url-fetch)
3042 (uri (pypi-uri "docutils" version))
3043 (sha256
3044 (base32
3045 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3046 (build-system python-build-system)
3047 (arguments
3048 '(#:tests? #f)) ; no setup.py test command
3049 (home-page "http://docutils.sourceforge.net/")
3050 (synopsis "Python Documentation Utilities")
3051 (description
3052 "Docutils is a modular system for processing documentation into useful
3053 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3054 reStructuredText.")
3055 ;; Most of the source code is public domain, but some source files are
3056 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3057 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3058
3059 (define-public python2-docutils
3060 (package-with-python2 python-docutils))
3061
3062 (define-public python-pygments
3063 (package
3064 (name "python-pygments")
3065 (version "2.1.3")
3066 (source
3067 (origin
3068 (method url-fetch)
3069 (uri (pypi-uri "Pygments" version))
3070 (sha256
3071 (base32
3072 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3073 (build-system python-build-system)
3074 (arguments
3075 ;; FIXME: Tests require sphinx, which depends on this.
3076 '(#:tests? #f))
3077 (home-page "http://pygments.org/")
3078 (synopsis "Syntax highlighting")
3079 (description
3080 "Pygments is a syntax highlighting package written in Python.")
3081 (license license:bsd-2)))
3082
3083 (define-public python2-pygments
3084 (package-with-python2 python-pygments))
3085
3086 (define-public python-sphinx
3087 (package
3088 (name "python-sphinx")
3089 (version "1.5.1")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (pypi-uri "Sphinx" version))
3094 (sha256
3095 (base32
3096 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3097 (build-system python-build-system)
3098 (arguments
3099 `(#:phases
3100 (modify-phases %standard-phases
3101 (replace 'check
3102 (lambda _
3103 ;; Requires Internet access.
3104 (delete-file "tests/test_build_linkcheck.py")
3105 (zero? (system* "make" "test")))))))
3106 (propagated-inputs
3107 `(("python-imagesize" ,python-imagesize)
3108 ("python-sphinx-alabaster-theme"
3109 ,python-sphinx-alabaster-theme)
3110 ("python-babel" ,python-babel)
3111 ("python-snowballstemmer" ,python-snowballstemmer)
3112 ("python-docutils" ,python-docutils)
3113 ("python-jinja2" ,python-jinja2)
3114 ("python-pygments" ,python-pygments)
3115 ("python-requests" ,python-requests)
3116 ("python-six" ,python-six)))
3117 (native-inputs
3118 `(("graphviz" ,graphviz)
3119 ("python-html5lib" ,python-html5lib)
3120 ("python-mock" ,python-mock)
3121 ("python-nose" ,python-nose)))
3122 (home-page "http://sphinx-doc.org/")
3123 (synopsis "Python documentation generator")
3124 (description "Sphinx is a tool that makes it easy to create documentation
3125 for Python projects or other documents consisting of multiple reStructuredText
3126 sources.")
3127 (license license:bsd-3)
3128 (properties `((python2-variant . ,(delay python2-sphinx))))))
3129
3130 (define-public python-sphinx-1.5.3
3131 (package
3132 (inherit python-sphinx)
3133 (name "python-sphinx")
3134 (version "1.5.3")
3135 (source
3136 (origin
3137 (method url-fetch)
3138 (uri (pypi-uri "Sphinx" version))
3139 (sha256
3140 (base32
3141 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3142 (native-inputs
3143 `(("python-pytest" ,python-pytest-3.0)
3144 ,@(package-native-inputs python-sphinx)))))
3145
3146 (define-public python2-sphinx
3147 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3148 (package
3149 (inherit base)
3150 (native-inputs `(("python2-mock" ,python2-mock)
3151 ("python2-enum34" ,python2-enum34)
3152 ,@(package-native-inputs base)))
3153 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3154 ,@(package-propagated-inputs base))))))
3155
3156 (define-public python-sphinx-rtd-theme
3157 (package
3158 (name "python-sphinx-rtd-theme")
3159 (version "0.2.4")
3160 (source
3161 (origin
3162 (method url-fetch)
3163 (uri (pypi-uri "sphinx_rtd_theme" version))
3164 (sha256
3165 (base32
3166 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3167 (build-system python-build-system)
3168 (arguments '(#:tests? #f)) ; No tests.
3169 (propagated-inputs
3170 `(("python-sphinx" ,python-sphinx)))
3171 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3172 (synopsis "ReadTheDocs.org theme for Sphinx")
3173 (description "A theme for Sphinx used by ReadTheDocs.org.")
3174 (license license:expat)))
3175
3176 (define-public python2-sphinx-rtd-theme
3177 (package-with-python2 python-sphinx-rtd-theme))
3178
3179 (define-public python-rst.linker
3180 (package
3181 (name "python-rst.linker")
3182 (version "1.7")
3183 (source
3184 (origin
3185 (method url-fetch)
3186 (uri (pypi-uri "rst.linker" version))
3187 (sha256
3188 (base32
3189 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3190 (build-system python-build-system)
3191 (propagated-inputs
3192 `(("python-dateutil" ,python-dateutil)
3193 ("python-six" ,python-six)))
3194 (native-inputs
3195 `(("python-setuptools-scm" ,python-setuptools-scm)))
3196 ;; Test would require path.py, which would introduce a cyclic dependence.
3197 (arguments `(#:tests? #f))
3198 ;; Note: As of version 1.7 the documentation is not worth building.
3199 (home-page "https://github.com/jaraco/rst.linker")
3200 (synopsis "Sphinx plugin to add links and timestamps")
3201 (description "rst.linker allows to automatically replace text by a
3202 reStructuredText external reference or timestamps. It's primary purpose is to
3203 augment the changelog, but it can be used for other documents, too.")
3204 (license license:expat)))
3205
3206 (define-public python2-rst.linker
3207 (package-with-python2 python-rst.linker))
3208
3209 (define-public python-feedgenerator
3210 (package
3211 (name "python-feedgenerator")
3212 (version "1.9")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "feedgenerator" version))
3217 (sha256
3218 (base32
3219 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3220 (modules '((guix build utils)))
3221 (snippet
3222 '(begin
3223 ;; Remove pre-compiled .pyc files from source.
3224 (for-each delete-file-recursively
3225 (find-files "." "__pycache__" #:directories? #t))
3226 (for-each delete-file (find-files "." "\\.pyc$"))
3227 #t))))
3228 (build-system python-build-system)
3229 (propagated-inputs
3230 `(("python-pytz" ,python-pytz)
3231 ("python-six" ,python-six)))
3232 (home-page "https://github.com/getpelican/feedgenerator")
3233 (synopsis
3234 "Standalone version of Django's Atom/RSS feed generator")
3235 (description
3236 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3237 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3238 (license license:bsd-3)))
3239
3240 (define-public python2-feedgenerator
3241 (package-with-python2 python-feedgenerator))
3242
3243 (define-public python-blinker
3244 (package
3245 (name "python-blinker")
3246 (version "1.4")
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (pypi-uri "blinker" version))
3251 (sha256
3252 (base32
3253 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3254 (build-system python-build-system)
3255 (home-page "http://pythonhosted.org/blinker/")
3256 (synopsis "Fast, simple object-to-object and broadcast signaling")
3257 (description
3258 "Blinker provides a fast dispatching system that allows any number of
3259 interested parties to subscribe to events, or \"signals\".")
3260 (license license:expat)))
3261
3262 (define-public python2-blinker
3263 (package-with-python2 python-blinker))
3264
3265 (define-public pelican
3266 (package
3267 (name "pelican")
3268 (version "3.6.3")
3269 (source
3270 (origin
3271 (method url-fetch)
3272 (uri (pypi-uri "pelican" version))
3273 (sha256
3274 (base32
3275 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3276 (build-system python-build-system)
3277 (propagated-inputs
3278 `(("python-feedgenerator" ,python-feedgenerator)
3279 ("python-jinja2" ,python-jinja2)
3280 ("python-pygments" ,python-pygments)
3281 ("python-docutils" ,python-docutils)
3282 ("python-pytz" ,python-pytz)
3283 ("python-blinker" ,python-blinker)
3284 ("python-unidecode" ,python-unidecode)
3285 ("python-six" ,python-six)
3286 ("python-dateutil" ,python-dateutil)))
3287 (home-page "http://getpelican.com/")
3288 (arguments
3289 `(;; XXX Requires a lot more packages to do unit tests :P
3290 #:tests? #f
3291 #:phases (modify-phases %standard-phases
3292 (add-before
3293 'install 'adjust-requires
3294 ;; Since feedgenerator is installed from git, it doesn't
3295 ;; conform to the version requirements.
3296 ;;
3297 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3298 ;; version requirement so setuptools doesn't get confused.
3299 (lambda _
3300 (substitute* "setup.py"
3301 (("['\"]feedgenerator.*?['\"]")
3302 "'feedgenerator'")))))))
3303 (synopsis "Python-based static site publishing system")
3304 (description
3305 "Pelican is a tool to generate a static blog from reStructuredText,
3306 Markdown input files, and more. Pelican uses Jinja2 for templating
3307 and is very extensible.")
3308 (license license:agpl3+)))
3309
3310 (define-public python-scikit-learn
3311 (package
3312 (name "python-scikit-learn")
3313 (version "0.18.1")
3314 (source
3315 (origin
3316 (method url-fetch)
3317 (uri (string-append
3318 "https://github.com/scikit-learn/scikit-learn/archive/"
3319 version ".tar.gz"))
3320 (file-name (string-append name "-" version ".tar.gz"))
3321 (sha256
3322 (base32
3323 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3324 (build-system python-build-system)
3325 (arguments
3326 `(#:phases
3327 (modify-phases %standard-phases
3328 (delete 'check)
3329 (add-after 'install 'check
3330 ;; Running tests from the source directory requires
3331 ;; an "inplace" build with paths relative to CWD.
3332 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3333 ;; Use the installed version instead.
3334 (lambda* (#:key inputs outputs #:allow-other-keys)
3335 (add-installed-pythonpath inputs outputs)
3336 ;; some tests require access to "$HOME"
3337 (setenv "HOME" "/tmp")
3338 ;; Step out of the source directory just to be sure.
3339 (chdir "..")
3340 (zero? (system* "nosetests" "-v" "sklearn")))))))
3341 (inputs
3342 `(("openblas" ,openblas)))
3343 (native-inputs
3344 `(("python-nose" ,python-nose)
3345 ("python-cython" ,python-cython)))
3346 (propagated-inputs
3347 `(("python-numpy" ,python-numpy)
3348 ("python-scipy" ,python-scipy)))
3349 (home-page "http://scikit-learn.org/")
3350 (synopsis "Machine Learning in Python")
3351 (description
3352 "Scikit-learn provides simple and efficient tools for data
3353 mining and data analysis.")
3354 (license license:bsd-3)))
3355
3356 (define-public python2-scikit-learn
3357 (package-with-python2 python-scikit-learn))
3358
3359 (define-public python-scikit-image
3360 (package
3361 (name "python-scikit-image")
3362 (version "0.11.3")
3363 (source
3364 (origin
3365 (method url-fetch)
3366 (uri (string-append
3367 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3368 version ".tar.gz"))
3369 (sha256
3370 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3371 (build-system python-build-system)
3372 (arguments
3373 ;; TODO: Some tests require running X11 server. Disable them?
3374 '(#:tests? #f))
3375 ;; See DEPENDS.txt for the list of build and run time requiremnts
3376 (propagated-inputs
3377 `(("python-matplotlib" ,python-matplotlib)
3378 ("python-networkx" ,python-networkx)
3379 ("python-scipy" ,python-scipy)
3380 ("python-pillow" ,python-pillow)))
3381 (native-inputs
3382 `(("python-numpy" ,python-numpy)
3383 ("python-cython" ,python-cython)
3384 ("python-six" ,python-six)))
3385 (home-page "http://scikit-image.org/")
3386 (synopsis "Image processing in Python")
3387 (description
3388 "Scikit-image is a collection of algorithms for image processing.")
3389 (license license:bsd-3)))
3390
3391 (define-public python2-scikit-image
3392 (package-with-python2 python-scikit-image))
3393
3394 (define-public python-redis
3395 (package
3396 (name "python-redis")
3397 (version "2.10.5")
3398 (source
3399 (origin
3400 (method url-fetch)
3401 (uri (pypi-uri "redis" version))
3402 (sha256
3403 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3404 (build-system python-build-system)
3405 ;; Tests require a running Redis server
3406 (arguments '(#:tests? #f))
3407 ;; As long as we are not running test, we do not need this input :-)
3408 ;;(native-inputs
3409 ;; `(("python-pytest" ,python-pytest)))
3410 (home-page "https://github.com/andymccurdy/redis-py")
3411 (synopsis "Redis Python client")
3412 (description
3413 "This package provides a Python interface to the Redis key-value store.")
3414 (license license:expat)))
3415
3416 (define-public python2-redis
3417 (package-with-python2 python-redis))
3418
3419 (define-public python-rq
3420 (package
3421 (name "python-rq")
3422 (version "0.7.1")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (pypi-uri "rq" version))
3427 (sha256
3428 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3429 (build-system python-build-system)
3430 (propagated-inputs
3431 `(("python-click" ,python-click)
3432 ("python-redis" ,python-redis)))
3433 (home-page "http://python-rq.org/")
3434 (synopsis "Simple job queues for Python")
3435 (description
3436 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3437 processing them in the background with workers. It is backed by Redis and it
3438 is designed to have a low barrier to entry.")
3439 (license license:bsd-2)))
3440
3441 (define-public python2-rq
3442 (package-with-python2 python-rq))
3443
3444 (define-public python-cython
3445 (package
3446 (name "python-cython")
3447 (version "0.25.2")
3448 (source
3449 (origin
3450 (method url-fetch)
3451 (uri (pypi-uri "Cython" version))
3452 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3453 (sha256
3454 (base32
3455 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3456 (build-system python-build-system)
3457 ;; we need the full python package and not just the python-wrapper
3458 ;; because we need libpython3.3m.so
3459 (inputs
3460 `(("python" ,python)))
3461 (arguments
3462 `(#:phases
3463 (modify-phases %standard-phases
3464 (add-before 'check 'set-HOME
3465 ;; some tests require access to "$HOME/.cython"
3466 (lambda _ (setenv "HOME" "/tmp")))
3467 (replace 'check
3468 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3469 (home-page "http://cython.org/")
3470 (synopsis "C extensions for Python")
3471 (description "Cython is an optimising static compiler for both the Python
3472 programming language and the extended Cython programming language. It makes
3473 writing C extensions for Python as easy as Python itself.")
3474 (license license:asl2.0)
3475 (properties `((python2-variant . ,(delay python2-cython))))))
3476
3477 (define-public python2-cython
3478 (package (inherit (package-with-python2
3479 (strip-python2-variant python-cython)))
3480 (name "python2-cython")
3481 (inputs
3482 `(("python-2" ,python-2))))) ; this is not automatically changed
3483
3484 ;; The RPython toolchain currently does not support Python 3.
3485 (define-public python2-rpython
3486 (package
3487 (name "python2-rpython")
3488 (version "0.1.4")
3489 (source
3490 (origin
3491 (method url-fetch)
3492 (uri (pypi-uri "rpython" version))
3493 (sha256
3494 (base32
3495 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3496 (build-system python-build-system)
3497 (arguments `(#:python ,python-2))
3498 (native-inputs
3499 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3500 (home-page "https://rpython.readthedocs.org")
3501 (synopsis "Framework for implementing interpreters and virtual machines")
3502 (description "RPython is a translation and support framework for
3503 producing implementations of dynamic languages, emphasizing a clean separation
3504 between language specification and implementation aspects.")
3505 (license license:expat)))
3506
3507 (define-public python-numpy
3508 (package
3509 (name "python-numpy")
3510 (version "1.12.0")
3511 (source
3512 (origin
3513 (method url-fetch)
3514 (uri (string-append
3515 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3516 (file-name (string-append name "-" version ".tar.gz"))
3517 (sha256
3518 (base32
3519 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3520 (build-system python-build-system)
3521 (inputs
3522 `(("openblas" ,openblas)
3523 ("lapack" ,lapack)))
3524 (native-inputs
3525 `(("python-cython" ,python-cython)
3526 ("python-nose" ,python-nose)
3527 ("gfortran" ,gfortran)))
3528 (arguments
3529 `(#:phases
3530 (modify-phases %standard-phases
3531 (add-before 'build 'set-environment-variables
3532 (lambda* (#:key inputs #:allow-other-keys)
3533 (call-with-output-file "site.cfg"
3534 (lambda (port)
3535 (format port
3536 "[openblas]
3537 libraries = openblas
3538 library_dirs = ~a/lib
3539 include_dirs = ~a/include
3540
3541 # backslash-n to make emacs happy
3542 \n[lapack]
3543 lapack_libs = lapack
3544 library_dirs = ~a/lib
3545 include_dirs = ~a/include
3546 "
3547 (assoc-ref inputs "openblas")
3548 (assoc-ref inputs "openblas")
3549 (assoc-ref inputs "lapack")
3550 (assoc-ref inputs "lapack"))))
3551 ;; Use "gcc" executable, not "cc".
3552 (substitute* "numpy/distutils/system_info.py"
3553 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3554 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3555 #t))
3556 ;; Tests can only be run after the library has been installed and not
3557 ;; within the source directory.
3558 (delete 'check)
3559 (add-after 'install 'check
3560 (lambda* (#:key outputs inputs #:allow-other-keys)
3561 ;; Make installed package available for running the tests
3562 (add-installed-pythonpath inputs outputs)
3563 (with-directory-excursion "/tmp"
3564 (zero? (system* "python" "-c"
3565 "import numpy; numpy.test(verbose=2)"))))))))
3566 (home-page "http://www.numpy.org/")
3567 (synopsis "Fundamental package for scientific computing with Python")
3568 (description "NumPy is the fundamental package for scientific computing
3569 with Python. It contains among other things: a powerful N-dimensional array
3570 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3571 and Fortran code, useful linear algebra, Fourier transform, and random number
3572 capabilities.")
3573 (license license:bsd-3)))
3574
3575 (define-public python2-numpy
3576 (package-with-python2 python-numpy))
3577
3578 (define-public python-munch
3579 (package
3580 (name "python-munch")
3581 (version "2.0.4")
3582 (source
3583 (origin
3584 (method url-fetch)
3585 (uri (pypi-uri "munch" version))
3586 (sha256
3587 (base32
3588 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3589 (build-system python-build-system)
3590 (home-page "https://github.com/Infinidat/munch")
3591 (synopsis "Dot-accessible dictionary")
3592 (description "Munch is a dot-accessible dictionary similar to JavaScript
3593 objects.")
3594 (license license:expat)))
3595
3596 (define-public python2-munch
3597 (package-with-python2 python-munch))
3598
3599 (define-public python2-fastlmm
3600 (package
3601 (name "python2-fastlmm")
3602 (version "0.2.21")
3603 (source
3604 (origin
3605 (method url-fetch)
3606 (uri (pypi-uri "fastlmm" version ".zip"))
3607 (sha256
3608 (base32
3609 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3610 (build-system python-build-system)
3611 (arguments
3612 `(#:python ,python-2)) ; only Python 2.7 is supported
3613 (propagated-inputs
3614 `(("python2-numpy" ,python2-numpy)
3615 ("python2-scipy" ,python2-scipy)
3616 ("python2-matplotlib" ,python2-matplotlib)
3617 ("python2-pandas" ,python2-pandas)
3618 ("python2-scikit-learn" ,python2-scikit-learn)
3619 ("python2-pysnptools" ,python2-pysnptools)))
3620 (native-inputs
3621 `(("unzip" ,unzip)
3622 ("python2-cython" ,python2-cython)
3623 ("python2-mock" ,python2-mock)
3624 ("python2-nose" ,python2-nose)))
3625 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3626 (synopsis "Perform genome-wide association studies on large data sets")
3627 (description
3628 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3629 Models, is a program for performing both single-SNP and SNP-set genome-wide
3630 association studies (GWAS) on extremely large data sets.")
3631 (license license:asl2.0)))
3632
3633 (define-public python-numpy-documentation
3634 (package
3635 (name "python-numpy-documentation")
3636 (version (package-version python-numpy))
3637 (source (package-source python-numpy))
3638 (build-system python-build-system)
3639 (native-inputs
3640 `(("python-matplotlib" ,python-matplotlib)
3641 ("python-numpy" ,python-numpy)
3642 ("pkg-config" ,pkg-config)
3643 ("python-sphinx" ,python-sphinx)
3644 ("python-numpydoc" ,python-numpydoc)
3645 ("texlive" ,texlive)
3646 ("texinfo" ,texinfo)
3647 ("perl" ,perl)
3648 ("scipy-sphinx-theme"
3649 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3650 (method git-fetch)
3651 (uri (git-reference
3652 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3653 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3654 (sha256
3655 (base32
3656 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3657 ,@(package-native-inputs python-numpy)))
3658 (arguments
3659 `(#:tests? #f ; we're only generating the documentation
3660 #:phases
3661 (modify-phases %standard-phases
3662 (delete 'build)
3663 (replace 'install
3664 (lambda* (#:key inputs outputs #:allow-other-keys)
3665 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3666 (doc (string-append
3667 data "/doc/" ,name "-"
3668 ,(package-version python-numpy)))
3669 (info-reader (string-append data "/info"))
3670 (html (string-append doc "/html"))
3671 (scipy-sphinx-theme "scipy-sphinx-theme")
3672 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3673 (pyver ,(string-append "PYVER=")))
3674 (with-directory-excursion "doc"
3675 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3676 (mkdir-p html)
3677 (system* "make" "html" pyver)
3678 (system* "make" "latex" "PAPER=a4" pyver)
3679 (system* "make" "-C" "build/latex"
3680 "all-pdf" "PAPER=a4" pyver)
3681 ;; FIXME: Generation of the info file fails.
3682 ;; (system* "make" "info" pyver)
3683 ;; (mkdir-p info)
3684 ;; (copy-file "build/texinfo/numpy.info"
3685 ;; (string-append info "/numpy.info"))
3686 (for-each (lambda (file)
3687 (copy-file (string-append "build/latex" file)
3688 (string-append doc file)))
3689 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3690 (with-directory-excursion "build/html"
3691 (for-each (lambda (file)
3692 (let* ((dir (dirname file))
3693 (tgt-dir (string-append html "/" dir)))
3694 (unless (equal? "." dir)
3695 (mkdir-p tgt-dir))
3696 (install-file file html)))
3697 (find-files "." ".*")))))
3698 #t)))))
3699 (home-page (package-home-page python-numpy))
3700 (synopsis "Documentation for the python-numpy package")
3701 (description (package-description python-numpy))
3702 (license (package-license python-numpy))))
3703
3704 (define-public python2-numpy-documentation
3705 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3706 (package
3707 (inherit numpy-documentation)
3708 (native-inputs `(("python2-functools32" ,python2-functools32)
3709 ,@(package-native-inputs numpy-documentation))))))
3710
3711 (define-public python-pygit2
3712 (package
3713 (name "python-pygit2")
3714 (version "0.25.0")
3715 (source
3716 (origin
3717 (method url-fetch)
3718 (uri (pypi-uri "pygit2" version))
3719 (sha256
3720 (base32
3721 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3722 (patches
3723 (search-patches "python-pygit2-disable-network-tests.patch"))))
3724 (build-system python-build-system)
3725 (propagated-inputs
3726 `(("python-six" ,python-six)
3727 ("python-cffi" ,python-cffi)
3728 ("libgit2" ,libgit2)
3729 ("python-tox" ,python-tox)))
3730 (home-page "https://github.com/libgit2/pygit2")
3731 (synopsis "Python bindings for libgit2")
3732 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3733 library, libgit2 implements Git plumbing.")
3734 ;; GPL2.0 only, with linking exception.
3735 (license license:gpl2)))
3736
3737 (define-public python2-pygit2
3738 (package-with-python2 python-pygit2))
3739
3740 (define-public python-pyparsing
3741 (package
3742 (name "python-pyparsing")
3743 (version "2.0.3")
3744 (source
3745 (origin
3746 (method url-fetch)
3747 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3748 "/pyparsing-" version
3749 "/pyparsing-" version ".tar.gz"))
3750 (sha256
3751 (base32
3752 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3753 (build-system python-build-system)
3754 (outputs '("out" "doc"))
3755 (arguments
3756 `(#:tests? #f ; no test target
3757 #:modules ((guix build python-build-system)
3758 (guix build utils))
3759 #:phases
3760 (alist-cons-after
3761 'install 'install-doc
3762 (lambda* (#:key outputs #:allow-other-keys)
3763 (let* ((doc (string-append (assoc-ref outputs "doc")
3764 "/share/doc/" ,name "-" ,version))
3765 (html-doc (string-append doc "/html"))
3766 (examples (string-append doc "/examples")))
3767 (mkdir-p html-doc)
3768 (mkdir-p examples)
3769 (for-each
3770 (lambda (dir tgt)
3771 (map (lambda (file)
3772 (install-file file tgt))
3773 (find-files dir ".*")))
3774 (list "docs" "htmldoc" "examples")
3775 (list doc html-doc examples))))
3776 %standard-phases)))
3777 (home-page "http://pyparsing.wikispaces.com")
3778 (synopsis "Python parsing class library")
3779 (description
3780 "The pyparsing module is an alternative approach to creating and
3781 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3782 of regular expressions. The pyparsing module provides a library of classes
3783 that client code uses to construct the grammar directly in Python code.")
3784 (license license:expat)))
3785
3786 (define-public python2-pyparsing
3787 (package-with-python2 python-pyparsing))
3788
3789 (define-public python-numpydoc
3790 (package
3791 (name "python-numpydoc")
3792 (version "0.5")
3793 (source
3794 (origin
3795 (method url-fetch)
3796 (uri (string-append
3797 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3798 version ".tar.gz"))
3799 (sha256
3800 (base32
3801 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3802 (modules '((guix build utils)))
3803 (snippet
3804 '(begin
3805 ;; Drop a test requiring matplotlib, which we cannot add as an
3806 ;; input since it would create a circular dependency: Extend the
3807 ;; test for Python 3, where it is already dropped, to Python 2.
3808 (substitute* "numpydoc/tests/test_plot_directive.py"
3809 (("3") "2"))))))
3810 (build-system python-build-system)
3811 (propagated-inputs
3812 `(("python-sphinx" ,python-sphinx)))
3813 (native-inputs
3814 `(("python-nose" ,python-nose)))
3815 (home-page "https://pypi.python.org/pypi/numpydoc")
3816 (synopsis
3817 "Numpy's Sphinx extensions")
3818 (description
3819 "Sphinx extension to support docstrings in Numpy format.")
3820 (license license:bsd-2)))
3821
3822 (define-public python2-numpydoc
3823 (package-with-python2 python-numpydoc))
3824
3825 (define-public python-numexpr
3826 (package
3827 (name "python-numexpr")
3828 (version "2.6.1")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "numexpr" version))
3833 (sha256
3834 (base32
3835 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3836 (build-system python-build-system)
3837 (arguments `(#:tests? #f)) ; no tests included
3838 (propagated-inputs
3839 `(("python-numpy" ,python-numpy)))
3840 (home-page "https://github.com/pydata/numexpr")
3841 (synopsis "Fast numerical expression evaluator for NumPy")
3842 (description
3843 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3844 expressions that operate on arrays are accelerated and use less memory than
3845 doing the same calculation in Python. In addition, its multi-threaded
3846 capabilities can make use of all your cores, which may accelerate
3847 computations, most specially if they are not memory-bounded (e.g. those using
3848 transcendental functions).")
3849 (license license:expat)))
3850
3851 (define-public python2-numexpr
3852 (package-with-python2 python-numexpr))
3853
3854 (define-public python-cycler
3855 (package
3856 (name "python-cycler")
3857 (version "0.10.0")
3858 (source (origin
3859 (method url-fetch)
3860 (uri (pypi-uri "cycler" version))
3861 (sha256
3862 (base32
3863 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3864 (build-system python-build-system)
3865 (arguments
3866 ;; XXX: The current version requires 'coveralls' which we don't have.
3867 ;; Enable this for the next release which uses 'python-pytest'.
3868 '(#:tests? #f))
3869 (propagated-inputs
3870 `(("python-six" ,python-six)))
3871 (home-page "http://matplotlib.org/cycler/")
3872 (synopsis "Composable keyword argument iterator")
3873 (description
3874 "When using @code{matplotlib} and plotting more than one line, it is
3875 common to want to be able to want to be able to cycle over one or more artist
3876 styles; but the plotting logic can quickly become involved.
3877 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3878 @code{Cycler} class was developed.")
3879 (license license:bsd-3)))
3880
3881 (define-public python2-cycler
3882 (package-with-python2 python-cycler))
3883
3884 (define-public python-colorspacious
3885 (package
3886 (name "python-colorspacious")
3887 (version "1.1.0")
3888 (source
3889 (origin
3890 (method url-fetch)
3891 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3892 version ".tar.gz"))
3893 (file-name (string-append name "-" version))
3894 (sha256
3895 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3896 (build-system python-build-system)
3897 (propagated-inputs
3898 `(("python-numpy" ,python-numpy)))
3899 (native-inputs
3900 `(("python-nose" ,python-nose)))
3901 (arguments
3902 `(#:phases
3903 (modify-phases %standard-phases
3904 (replace 'check
3905 (lambda _
3906 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3907 (home-page "https://github.com/njsmith/colorspacious")
3908 (synopsis "Python library for colorspace conversions")
3909 (description "@code{colorspacious} is a Python library that lets you
3910 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3911 (license license:expat)))
3912
3913 (define-public python2-colorspacious
3914 (package-with-python2 python-colorspacious))
3915
3916 (define-public python-matplotlib
3917 (package
3918 (name "python-matplotlib")
3919 (version "2.0.0")
3920 (source
3921 (origin
3922 (method url-fetch)
3923 (uri (string-append
3924 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3925 (file-name (string-append name "-" version ".tar.gz"))
3926 (sha256
3927 (base32
3928 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3929 (build-system python-build-system)
3930 (propagated-inputs ; the following packages are all needed at run time
3931 `(("python-cycler" ,python-cycler)
3932 ("python-pyparsing" ,python-pyparsing)
3933 ("python-pygobject" ,python-pygobject)
3934 ("gobject-introspection" ,gobject-introspection)
3935 ("python-tkinter" ,python "tk")
3936 ("python-dateutil" ,python-dateutil)
3937 ("python-numpy" ,python-numpy)
3938 ("python-pillow" ,python-pillow)
3939 ("python-pytz" ,python-pytz)
3940 ("python-six" ,python-six)
3941 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3942 ;; from 'gtk+') provides the required 'typelib' files used by
3943 ;; 'gobject-introspection'. The location of these files is set with the
3944 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3945 ;; is done automatically by a 'native-search-path' procedure. However,
3946 ;; at run-time the user must set this variable as follows:
3947 ;;
3948 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3949 ("gtk+" ,gtk+)
3950 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3951 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3952 ;; object. For this reason we need to import both libraries.
3953 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3954 ("python-pycairo" ,python-pycairo)
3955 ("python-cairocffi" ,python-cairocffi)))
3956 (inputs
3957 `(("libpng" ,libpng)
3958 ("imagemagick" ,imagemagick)
3959 ("freetype" ,freetype)
3960 ("cairo" ,cairo)
3961 ("glib" ,glib)
3962 ;; FIXME: Add backends when available.
3963 ;("python-wxpython" ,python-wxpython)
3964 ("python-pyqt" ,python-pyqt)
3965 ("tcl" ,tcl)
3966 ("tk" ,tk)))
3967 (native-inputs
3968 `(("pkg-config" ,pkg-config)
3969 ("python-nose" ,python-nose)
3970 ("python-mock" ,python-mock)))
3971 (arguments
3972 `(#:phases
3973 (modify-phases %standard-phases
3974 (add-before 'build 'configure-environment
3975 (lambda* (#:key outputs inputs #:allow-other-keys)
3976 (let ((cairo (assoc-ref inputs "cairo"))
3977 (gtk+ (assoc-ref inputs "gtk+")))
3978 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3979 ;; has not effect.
3980 (setenv "LD_LIBRARY_PATH"
3981 (string-append cairo "/lib:" gtk+ "/lib"))
3982 (setenv "HOME" (getcwd))
3983 (call-with-output-file "setup.cfg"
3984 (lambda (port)
3985 (format port "[directories]~%
3986 basedirlist = ~a,~a~%
3987 [rc_options]~%
3988 backend = TkAgg~%"
3989 (assoc-ref inputs "tcl")
3990 (assoc-ref inputs "tk")))))
3991 #t)))))
3992 (home-page "http://matplotlib.org")
3993 (synopsis "2D plotting library for Python")
3994 (description
3995 "Matplotlib is a Python 2D plotting library which produces publication
3996 quality figures in a variety of hardcopy formats and interactive environments
3997 across platforms. Matplotlib can be used in Python scripts, the python and
3998 ipython shell, web application servers, and six graphical user interface
3999 toolkits.")
4000 (license license:psfl)
4001 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4002
4003 (define-public python2-matplotlib
4004 (let ((matplotlib (package-with-python2
4005 (strip-python2-variant python-matplotlib))))
4006 (package (inherit matplotlib)
4007 ;; Make sure to use special packages for Python 2 instead
4008 ;; of those automatically rewritten by package-with-python2.
4009 (propagated-inputs
4010 `(("python2-pycairo" ,python2-pycairo)
4011 ("python2-functools32" ,python2-functools32)
4012 ("python2-pygobject-2" ,python2-pygobject-2)
4013 ("python2-subprocess32" ,python2-subprocess32)
4014 ("python2-tkinter" ,python-2 "tk")
4015 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4016 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4017
4018 (define-public python-matplotlib-documentation
4019 (package
4020 (name "python-matplotlib-documentation")
4021 (version (package-version python-matplotlib))
4022 (source (package-source python-matplotlib))
4023 (build-system python-build-system)
4024 (native-inputs
4025 `(("python-matplotlib" ,python-matplotlib)
4026 ("python-colorspacious" ,python-colorspacious)
4027 ("python-sphinx" ,python-sphinx)
4028 ("python-numpydoc" ,python-numpydoc)
4029 ("python-ipython" ,python-ipython)
4030 ("python-mock" ,python-mock)
4031 ("graphviz" ,graphviz)
4032 ("texlive" ,texlive)
4033 ("texinfo" ,texinfo)
4034 ,@(package-native-inputs python-matplotlib)))
4035 (arguments
4036 `(#:tests? #f ; we're only generating documentation
4037 #:phases
4038 (modify-phases %standard-phases
4039 (replace 'build
4040 (lambda _
4041 (chdir "doc")
4042 ;; Produce pdf in 'A4' format.
4043 (substitute* "conf.py"
4044 (("latex_paper_size = 'letter'") "")
4045 ;; latex_paper_size is deprecated -> set paper size using
4046 ;; latex_elements
4047 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4048 ;; insert at a point where latex_elements{} is defined:
4049 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4050 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4051 (replace 'install
4052 (lambda* (#:key inputs outputs #:allow-other-keys)
4053 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4054 (doc (string-append data "/doc/python-matplotlib-" ,version))
4055 (info (string-append data "/info"))
4056 (html (string-append doc "/html")))
4057 (mkdir-p html)
4058 (mkdir-p info)
4059 (copy-recursively "build/html" html)
4060 (symlink (string-append html "/_images")
4061 (string-append info "/matplotlib-figures"))
4062 (with-directory-excursion "build/texinfo"
4063 (substitute* "matplotlib.texi"
4064 (("@image\\{([^,]*)" all file)
4065 (string-append "@image{matplotlib-figures/" file)))
4066 (symlink (string-append html "/_images")
4067 "./matplotlib-figures")
4068 (system* "makeinfo" "--no-split"
4069 "-o" "matplotlib.info" "matplotlib.texi"))
4070 (copy-file "build/texinfo/matplotlib.info"
4071 (string-append info "/matplotlib.info"))
4072 (copy-file "build/latex/Matplotlib.pdf"
4073 (string-append doc "/Matplotlib.pdf")))
4074 #t)))))
4075 (home-page (package-home-page python-matplotlib))
4076 (synopsis "Documentation for the python-matplotlib package")
4077 (description (package-description python-matplotlib))
4078 (license (package-license python-matplotlib))))
4079
4080 (define-public python2-matplotlib-documentation
4081 (package-with-python2 python-matplotlib-documentation))
4082
4083 (define-public python2-pysnptools
4084 (package
4085 (name "python2-pysnptools")
4086 (version "0.3.9")
4087 (source
4088 (origin
4089 (method url-fetch)
4090 (uri (pypi-uri "pysnptools" version ".zip"))
4091 (sha256
4092 (base32
4093 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4094 (build-system python-build-system)
4095 (arguments
4096 `(#:python ,python-2)) ; only Python 2.7 is supported
4097 (propagated-inputs
4098 `(("python2-numpy" ,python2-numpy)
4099 ("python2-scipy" ,python2-scipy)
4100 ("python2-pandas" ,python2-pandas)))
4101 (native-inputs
4102 `(("python2-cython" ,python2-cython)))
4103 (native-inputs
4104 `(("unzip" ,unzip)))
4105 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4106 (synopsis "Library for reading and manipulating genetic data")
4107 (description
4108 "PySnpTools is a library for reading and manipulating genetic data. It
4109 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4110 those files. It can also efficiently manipulate ranges of integers using set
4111 operators such as union, intersection, and difference.")
4112 (license license:asl2.0)))
4113
4114 (define-public python-rpy2
4115 (package
4116 (name "python-rpy2")
4117 (version "2.7.6")
4118 (source
4119 (origin
4120 (method url-fetch)
4121 (uri (pypi-uri "rpy2" version))
4122 (sha256
4123 (base32
4124 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4125 (build-system python-build-system)
4126 (arguments
4127 '(#:phases
4128 (modify-phases %standard-phases
4129 (delete 'check)
4130 (add-after 'install 'check
4131 (lambda* (#:key outputs inputs #:allow-other-keys)
4132 ;; It's easier to run tests after install.
4133 ;; Make installed package available for running the tests
4134 (add-installed-pythonpath inputs outputs)
4135 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4136 (propagated-inputs
4137 `(("python-six" ,python-six)))
4138 (inputs
4139 `(("readline" ,readline)
4140 ("icu4c" ,icu4c)
4141 ("pcre" ,pcre)
4142 ("r-minimal" ,r-minimal)
4143 ("r-survival" ,r-survival)))
4144 (native-inputs
4145 `(("zlib" ,zlib)))
4146 (home-page "http://rpy.sourceforge.net/")
4147 (synopsis "Python interface to the R language")
4148 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4149 low-level interface to R from Python, a proposed high-level interface,
4150 including wrappers to graphical libraries, as well as R-like structures and
4151 functions.")
4152 (license license:gpl3+)))
4153
4154 (define-public python2-rpy2
4155 (let ((rpy2 (package-with-python2 python-rpy2)))
4156 (package (inherit rpy2)
4157 (propagated-inputs
4158 `(("python2-singledispatch" ,python2-singledispatch)
4159 ,@(package-propagated-inputs rpy2))))))
4160
4161 (define-public python-scipy
4162 (package
4163 (name "python-scipy")
4164 (version "0.18.1")
4165 (source
4166 (origin
4167 (method url-fetch)
4168 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4169 version ".tar.gz"))
4170 (file-name (string-append name "-" version ".tar.gz"))
4171 (sha256
4172 (base32
4173 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4174 (build-system python-build-system)
4175 (propagated-inputs
4176 `(("python-numpy" ,python-numpy)
4177 ("python-matplotlib" ,python-matplotlib)
4178 ("python-pyparsing" ,python-pyparsing)))
4179 (inputs
4180 `(("lapack" ,lapack)
4181 ("openblas" ,openblas)))
4182 (native-inputs
4183 `(("python-cython" ,python-cython)
4184 ("python-nose" ,python-nose)
4185 ("python-sphinx" ,python-sphinx)
4186 ("python-numpydoc" ,python-numpydoc)
4187 ("gfortran" ,gfortran)
4188 ("perl" ,perl)))
4189 (outputs '("out" "doc"))
4190 (arguments
4191 `(#:phases
4192 (modify-phases %standard-phases
4193 (add-before 'build 'configure-openblas
4194 (lambda* (#:key inputs #:allow-other-keys)
4195 (call-with-output-file "site.cfg"
4196 (lambda (port)
4197 (format port
4198 "[blas]
4199 libraries = openblas
4200 library_dirs = ~a/lib
4201 include_dirs = ~a/include
4202
4203 # backslash-n to make emacs happy
4204 \n[atlas]
4205 library_dirs = ~a/lib
4206 atlas_libs = openblas
4207 "
4208 (assoc-ref inputs "openblas")
4209 (assoc-ref inputs "openblas")
4210 (assoc-ref inputs "openblas"))))
4211 #t))
4212 (add-after 'install 'install-doc
4213 (lambda* (#:key inputs outputs #:allow-other-keys)
4214 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4215 (doc (string-append data "/doc/" ,name "-" ,version))
4216 (html (string-append doc "/html"))
4217 (pyver ,(string-append "PYVER=")))
4218 ;; Make installed package available for building the
4219 ;; documentation
4220 (add-installed-pythonpath inputs outputs)
4221 (with-directory-excursion "doc"
4222 ;; Fix generation of images for mathematical expressions.
4223 (substitute* (find-files "source" "conf\\.py")
4224 (("pngmath_use_preview = True")
4225 "pngmath_use_preview = False"))
4226 (mkdir-p html)
4227 (system* "make" "html" pyver)
4228 (with-directory-excursion "build/html"
4229 (for-each (lambda (file)
4230 (let* ((dir (dirname file))
4231 (tgt-dir (string-append html "/" dir)))
4232 (install-file file html)))
4233 (find-files "." ".*")))))
4234 #t))
4235 (add-after 'unpack 'fix-tests
4236 (lambda _
4237 (substitute* "scipy/integrate/tests/test_quadpack.py"
4238 (("libm.so") "libm.so.6"))
4239 #t))
4240 ;; Tests can only be run after the library has been installed and not
4241 ;; within the source directory.
4242 (delete 'check)
4243 (add-after 'install 'check
4244 (lambda* (#:key inputs outputs #:allow-other-keys)
4245 (add-installed-pythonpath inputs outputs)
4246 (with-directory-excursion "/tmp"
4247 (zero? (system* "python" "-c"
4248 "import scipy; scipy.test('full')")))
4249 #t)))))
4250 (home-page "http://www.scipy.org/")
4251 (synopsis "The Scipy library provides efficient numerical routines")
4252 (description "The SciPy library is one of the core packages that make up
4253 the SciPy stack. It provides many user-friendly and efficient numerical
4254 routines such as routines for numerical integration and optimization.")
4255 (properties `((python2-variant . ,(delay python2-scipy))))
4256 (license license:bsd-3)))
4257
4258 (define-public python2-scipy
4259 (package-with-python2
4260 (strip-python2-variant python-scipy)))
4261
4262 (define-public python-sockjs-tornado
4263 (package
4264 (name "python-sockjs-tornado")
4265 (version "1.0.3")
4266 (source
4267 (origin
4268 (method url-fetch)
4269 (uri (pypi-uri "sockjs-tornado" version))
4270 (sha256
4271 (base32
4272 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4273 (build-system python-build-system)
4274 (arguments
4275 `(;; There are no tests, and running the test phase requires missing
4276 ;; dependencies
4277 #:tests? #f))
4278 (propagated-inputs
4279 `(("python-tornado" ,python-tornado)))
4280 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4281 (synopsis
4282 "SockJS python server implementation on top of Tornado framework")
4283 (description
4284 "SockJS-tornado provides the server side counterpart to a SockJS client
4285 library, through the Tornado framework.
4286
4287 SockJS provides a low latency, full duplex, cross-domain communication channel
4288 between a web browser and web server.")
4289 (license license:expat)))
4290
4291 (define-public python2-sockjs-tornado
4292 (package-with-python2 python-sockjs-tornado))
4293
4294 (define-public python-socksipy-branch
4295 (package
4296 (name "python-socksipy-branch")
4297 (version "1.01")
4298 (source
4299 (origin
4300 (method url-fetch)
4301 (uri (pypi-uri "SocksiPy-branch" version))
4302 (sha256
4303 (base32
4304 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4305 (build-system python-build-system)
4306 (arguments
4307 `(#:tests? #f)) ; There are no tests
4308 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4309 (synopsis "Python SOCKS module")
4310 (description
4311 "SocksiPy - A Python SOCKS client module. It provides a
4312 socket-like interface that supports connections to any TCP
4313 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4314 The original version was developed by Dan Haim, this is a
4315 branch created by Mario Vilas to address some open issues,
4316 as the original project seems to have been abandoned circa 2007.")
4317 (license license:bsd-3)))
4318
4319 (define-public python2-socksipy-branch
4320 (package-with-python2 python-socksipy-branch))
4321
4322 (define-public python-sqlalchemy
4323 (package
4324 (name "python-sqlalchemy")
4325 (version "1.0.12")
4326 (source
4327 (origin
4328 (method url-fetch)
4329 (uri (string-append "https://pypi.python.org/packages/source/S/"
4330 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4331 (sha256
4332 (base32
4333 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4334 (build-system python-build-system)
4335 (native-inputs
4336 `(("python-cython" ,python-cython) ;for c extensions
4337 ("python-pytest" ,python-pytest)
4338 ("python-mock" ,python-mock))) ;for tests
4339 (arguments
4340 `(#:phases (alist-replace
4341 'check
4342 (lambda _ (zero? (system* "py.test")))
4343 %standard-phases)))
4344 (home-page "http://www.sqlalchemy.org")
4345 (synopsis "Database abstraction library")
4346 (description
4347 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4348 gives application developers the full power and flexibility of SQL. It
4349 provides a full suite of well known enterprise-level persistence patterns,
4350 designed for efficient and high-performing database access, adapted into a
4351 simple and Pythonic domain language.")
4352 (license license:x11)))
4353
4354 (define-public python2-sqlalchemy
4355 (package-with-python2 python-sqlalchemy))
4356
4357 (define-public python-pycodestyle
4358 (package
4359 (name "python-pycodestyle")
4360 (version "2.0.0")
4361 (source
4362 (origin
4363 (method url-fetch)
4364 (uri (pypi-uri "pycodestyle" version))
4365 (sha256
4366 (base32
4367 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4368 (build-system python-build-system)
4369 (home-page "https://pycodestyle.readthedocs.io/")
4370 (synopsis "Python style guide checker")
4371 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4372 Python code against some of the style conventions in
4373 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4374 (license license:expat)))
4375
4376 (define-public python2-pycodestyle
4377 (package-with-python2 python-pycodestyle))
4378
4379 (define-public python-orderedmultidict
4380 (package
4381 (name "python-orderedmultidict")
4382 (version "0.7.11")
4383 (source
4384 (origin
4385 (method url-fetch)
4386 (uri (pypi-uri "orderedmultidict" version))
4387 (sha256
4388 (base32
4389 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4390 (build-system python-build-system)
4391 (arguments
4392 `(#:phases
4393 (modify-phases %standard-phases
4394 (add-after 'unpack 'fix-tests
4395 (lambda _
4396 ;; The package uses nosetest for running the tests.
4397 ;; Adding this initfile allows to run the test suite
4398 ;; without requiring nosetest.
4399 (zero? (system* "touch" "tests/__init__.py")))))))
4400 (propagated-inputs
4401 `(("python-six" ,python-six)))
4402 (native-inputs
4403 `(("python-pycodestyle" ,python-pycodestyle)))
4404 (home-page "https://github.com/gruns/orderedmultidict")
4405 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4406 (description "This package contains a library for ordered multivalue
4407 dictionaries. A multivalue dictionary is a dictionary that can store
4408 multiple values for the same key. An ordered multivalue dictionary is a
4409 multivalue dictionary that retains the order of insertions and deletions.")
4410 (license license:unlicense)))
4411
4412 (define-public python2-orderedmultidict
4413 (package-with-python2 python-orderedmultidict))
4414
4415 (define-public python-furl
4416 (package
4417 (name "python-furl")
4418 (version "0.5.6")
4419 (source
4420 (origin
4421 (method url-fetch)
4422 (uri (pypi-uri "furl" version))
4423 (sha256
4424 (base32
4425 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4426 (build-system python-build-system)
4427 (propagated-inputs
4428 `(("python-six" ,python-six)
4429 ("python-orderedmultidict" ,python-orderedmultidict)))
4430 (native-inputs
4431 `(("python-pycodestyle" ,python-pycodestyle)))
4432 (home-page "https://github.com/gruns/furl")
4433 (synopsis "URL manipulation in Python")
4434 (description "Furl provides an easy-to-use alternative to the
4435 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4436 (license license:unlicense)))
4437
4438 (define-public python2-furl
4439 (package-with-python2 python-furl))
4440
4441 (define-public python-flask-babel
4442 (package
4443 (name "python-flask-babel")
4444 (version "0.11.1")
4445 (source
4446 (origin
4447 (method url-fetch)
4448 (uri (pypi-uri "Flask-Babel" version))
4449 (sha256
4450 (base32
4451 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4452 (build-system python-build-system)
4453 (propagated-inputs
4454 `(("python-flask" ,python-flask)
4455 ("python-babel" ,python-babel)
4456 ("python-jinja2" ,python-jinja2)
4457 ("python-pytz" ,python-pytz)))
4458 (home-page "https://github.com/python-babel/flask-babel")
4459 (synopsis "Add i18n/l10n support to Flask applications")
4460 (description "This package implements internationalization and localization
4461 support for Flask. This is based on the Python babel module as well as pytz -
4462 both of which are installed automatically if you install this library.")
4463 (license license:bsd-3)))
4464
4465 (define-public python2-flask-babel
4466 (package-with-python2 python-flask-babel))
4467
4468 (define-public python-sqlalchemy-utils
4469 (package
4470 (name "python-sqlalchemy-utils")
4471 (version "0.32.13")
4472 (source
4473 (origin
4474 (method url-fetch)
4475 (uri (pypi-uri "SQLAlchemy-Utils" version))
4476 (sha256
4477 (base32
4478 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4479 (build-system python-build-system)
4480 (arguments
4481 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4482 ;; #:phases
4483 ;; (modify-phases %standard-phases
4484 ;; (replace 'check
4485 ;; (lambda _
4486 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4487 (propagated-inputs
4488 `(("python-six" ,python-six)
4489 ("python-sqlalchemy" ,python-sqlalchemy)))
4490 (native-inputs
4491 `(("python-dateutil" ,python-dateutil)
4492 ("python-flexmock" ,python-flexmock)
4493 ("python-psycopg2" ,python-psycopg2)
4494 ("python-pytest" ,python-pytest)
4495 ("python-pytz" ,python-pytz)))
4496 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4497 (synopsis "Various utility functions for SQLAlchemy")
4498 (description
4499 "SQLAlchemy-utils provides various utility functions and custom data types
4500 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4501
4502 You might also want to install the following optional dependencies:
4503 @enumerate
4504 @item @code{python-passlib}
4505 @item @code{python-babel}
4506 @item @code{python-cryptography}
4507 @item @code{python-pytz}
4508 @item @code{python-psycopg2}
4509 @item @code{python-furl}
4510 @item @code{python-flask-babel}
4511 @end enumerate
4512 ")
4513 (license license:bsd-3)))
4514
4515 (define-public python2-sqlalchemy-utils
4516 (package-with-python2 python-sqlalchemy-utils))
4517
4518 (define-public python-alembic
4519 (package
4520 (name "python-alembic")
4521 (version "0.8.10")
4522 (source
4523 (origin
4524 (method url-fetch)
4525 (uri (pypi-uri "alembic" version))
4526 (sha256
4527 (base32
4528 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4529 (build-system python-build-system)
4530 (native-inputs
4531 `(("python-mock" ,python-mock)
4532 ("python-pytest-cov" ,python-pytest-cov)))
4533 (propagated-inputs
4534 `(("python-sqlalchemy" ,python-sqlalchemy)
4535 ("python-mako" ,python-mako)
4536 ("python-editor" ,python-editor)))
4537 (home-page "http://bitbucket.org/zzzeek/alembic")
4538 (synopsis
4539 "Database migration tool for SQLAlchemy")
4540 (description
4541 "Alembic is a lightweight database migration tool for usage with the
4542 SQLAlchemy Database Toolkit for Python.")
4543 (license license:expat)))
4544
4545 (define-public python2-alembic
4546 (package-with-python2 python-alembic))
4547
4548 (define-public python-autopep8
4549 (package
4550 (name "python-autopep8")
4551 (version "1.2.4")
4552 (source
4553 (origin
4554 (method url-fetch)
4555 (uri (pypi-uri "autopep8" version))
4556 (sha256
4557 (base32
4558 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4559 (build-system python-build-system)
4560 (propagated-inputs
4561 `(("python-pep8" ,python-pep8)))
4562 (home-page "https://github.com/hhatto/autopep8")
4563 (synopsis "Format Python code according to the PEP 8 style guide")
4564 (description
4565 "@code{autopep8} automatically formats Python code to conform to
4566 the PEP 8 style guide. It uses the pycodestyle utility to determine
4567 what parts of the code needs to be formatted. @code{autopep8} is
4568 capable of fixing most of the formatting issues that can be reported
4569 by pycodestyle.")
4570 (license (license:non-copyleft
4571 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4572
4573 (define-public python2-autopep8
4574 (package-with-python2 python-autopep8))
4575
4576 (define-public python-distutils-extra
4577 (package
4578 (name "python-distutils-extra")
4579 (version "2.38")
4580 (source
4581 (origin
4582 (method url-fetch)
4583 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4584 version "/+download/python-distutils-extra-"
4585 version ".tar.gz"))
4586 (sha256
4587 (base32
4588 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4589 (build-system python-build-system)
4590 (home-page "https://launchpad.net/python-distutils-extra/")
4591 (synopsis "Enhancements to Python's distutils")
4592 (description
4593 "The python-distutils-extra module enables you to easily integrate
4594 gettext support, themed icons, and scrollkeeper-based documentation into
4595 Python's distutils.")
4596 (license license:gpl2)))
4597
4598 (define-public python2-distutils-extra
4599 (package-with-python2 python-distutils-extra))
4600
4601 (define-public python2-elib.intl
4602 (package
4603 (name "python2-elib.intl")
4604 (version "0.0.3")
4605 (source
4606 (origin
4607 ;; This project doesn't tag releases or publish tarballs, so we take
4608 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4609 (method git-fetch)
4610 (uri (git-reference
4611 (url "https://github.com/dieterv/elib.intl.git")
4612 (commit "d09997cfef")))
4613 (sha256
4614 (base32
4615 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4616 (build-system python-build-system)
4617 (arguments
4618 ;; incompatible with Python 3 (exception syntax)
4619 `(#:python ,python-2
4620 #:tests? #f))
4621 (home-page "https://github.com/dieterv/elib.intl")
4622 (synopsis "Enhanced internationalization for Python")
4623 (description
4624 "The elib.intl module provides enhanced internationalization (I18N)
4625 services for your Python modules and applications.")
4626 (license license:lgpl3+)))
4627
4628 (define-public python-pillow
4629 (package
4630 (name "python-pillow")
4631 (version "3.3.3")
4632 (source
4633 (origin
4634 (method url-fetch)
4635 (uri (pypi-uri "Pillow" version))
4636 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4637 (sha256
4638 (base32
4639 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4640 (build-system python-build-system)
4641 (native-inputs
4642 `(("python-nose" ,python-nose)))
4643 (inputs
4644 `(("freetype" ,freetype)
4645 ("lcms" ,lcms)
4646 ("zlib" ,zlib)
4647 ("libjpeg" ,libjpeg)
4648 ("openjpeg" ,openjpeg)
4649 ("libtiff" ,libtiff)
4650 ("libwebp" ,libwebp)))
4651 (arguments
4652 `(#:phases (modify-phases %standard-phases
4653 (add-after
4654 'install 'check-installed
4655 (lambda* (#:key outputs inputs #:allow-other-keys)
4656 (begin
4657 (setenv "HOME" (getcwd))
4658 ;; Make installed package available for running the
4659 ;; tests
4660 (add-installed-pythonpath inputs outputs)
4661 (and (zero? (system* "python" "selftest.py"
4662 "--installed"))
4663 (zero? (system* "python" "test-installed.py"))))))
4664 (delete 'check))))
4665 (home-page "https://pypi.python.org/pypi/Pillow")
4666 (synopsis "Fork of the Python Imaging Library")
4667 (description
4668 "The Python Imaging Library adds image processing capabilities to your
4669 Python interpreter. This library provides extensive file format support, an
4670 efficient internal representation, and fairly powerful image processing
4671 capabilities. The core image library is designed for fast access to data
4672 stored in a few basic pixel formats. It should provide a solid foundation for
4673 a general image processing tool.")
4674 (license (license:x11-style
4675 "http://www.pythonware.com/products/pil/license.htm"
4676 "The PIL Software License"))))
4677
4678 (define-public python2-pillow
4679 (package-with-python2 python-pillow))
4680
4681 (define-public python-pycparser
4682 (package
4683 (name "python-pycparser")
4684 (version "2.17")
4685 (source
4686 (origin
4687 (method url-fetch)
4688 (uri (pypi-uri "pycparser" version))
4689 (sha256
4690 (base32
4691 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4692 (outputs '("out" "doc"))
4693 (build-system python-build-system)
4694 (native-inputs
4695 `(("pkg-config" ,pkg-config)))
4696 (arguments
4697 `(#:phases
4698 (modify-phases %standard-phases
4699 (replace 'check
4700 (lambda _
4701 (with-directory-excursion "tests"
4702 (zero? (system* "python" "all_tests.py")))))
4703 (add-after 'install 'install-doc
4704 (lambda* (#:key outputs #:allow-other-keys)
4705 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4706 (doc (string-append data "/doc/" ,name "-" ,version))
4707 (examples (string-append doc "/examples")))
4708 (mkdir-p examples)
4709 (for-each (lambda (file)
4710 (copy-file (string-append "." file)
4711 (string-append doc file)))
4712 '("/README.rst" "/CHANGES" "/LICENSE"))
4713 (copy-recursively "examples" examples)))))))
4714 (home-page "https://github.com/eliben/pycparser")
4715 (synopsis "C parser in Python")
4716 (description
4717 "Pycparser is a complete parser of the C language, written in pure Python
4718 using the PLY parsing library. It parses C code into an AST and can serve as
4719 a front-end for C compilers or analysis tools.")
4720 (license license:bsd-3)))
4721
4722 (define-public python2-pycparser
4723 (package-with-python2 python-pycparser))
4724
4725 (define-public python-cffi
4726 (package
4727 (name "python-cffi")
4728 (version "1.4.2")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (pypi-uri "cffi" version))
4733 (sha256
4734 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4735 (build-system python-build-system)
4736 (outputs '("out" "doc"))
4737 (inputs
4738 `(("libffi" ,libffi)))
4739 (propagated-inputs ; required at run-time
4740 `(("python-pycparser" ,python-pycparser)))
4741 (native-inputs
4742 `(("pkg-config" ,pkg-config)
4743 ("python-sphinx" ,python-sphinx)
4744 ("python-pytest" ,python-pytest)))
4745 (arguments
4746 `(#:phases
4747 (alist-cons-after
4748 'install 'install-doc
4749 (lambda* (#:key outputs #:allow-other-keys)
4750 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4751 (doc (string-append data "/doc/" ,name "-" ,version))
4752 (html (string-append doc "/html")))
4753 (with-directory-excursion "doc"
4754 (system* "make" "html")
4755 (mkdir-p html)
4756 (copy-recursively "build/html" html))
4757 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4758 %standard-phases)))
4759 (home-page "http://cffi.readthedocs.org")
4760 (synopsis "Foreign function interface for Python")
4761 (description
4762 "Foreign Function Interface for Python calling C code.")
4763 (license license:expat)))
4764
4765 (define-public python2-cffi
4766 (package-with-python2 python-cffi))
4767
4768 (define-public python-xcffib
4769 (package
4770 (name "python-xcffib")
4771 (version "0.5.1")
4772 (source
4773 (origin
4774 (method url-fetch)
4775 (uri (pypi-uri "xcffib" version))
4776 (sha256
4777 (base32
4778 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4779 (build-system python-build-system)
4780 (inputs
4781 `(("libxcb" ,libxcb)))
4782 (propagated-inputs
4783 `(("python-cffi" ,python-cffi) ; used at run time
4784 ("python-six" ,python-six)))
4785 (arguments
4786 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4787 #:tests? #f
4788 #:phases
4789 (modify-phases %standard-phases
4790 (add-after 'unpack 'fix-libxcb-path
4791 (lambda* (#:key inputs #:allow-other-keys)
4792 (let ((libxcb (assoc-ref inputs "libxcb")))
4793 (substitute* '("xcffib/__init__.py")
4794 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4795 #t)))
4796 (add-after 'install 'install-doc
4797 (lambda* (#:key outputs #:allow-other-keys)
4798 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4799 "/doc/" ,name "-" ,version)))
4800 (mkdir-p doc)
4801 (copy-file "README.md"
4802 (string-append doc "/README.md"))
4803 #t))))))
4804 (home-page "https://github.com/tych0/xcffib")
4805 (synopsis "XCB Python bindings")
4806 (description
4807 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4808 support for Python 3 and PyPy. It is based on cffi.")
4809 (license license:expat)))
4810
4811 (define-public python2-xcffib
4812 (package-with-python2 python-xcffib))
4813
4814 (define-public python-cairocffi
4815 (package
4816 (name "python-cairocffi")
4817 (version "0.8.0")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 ;; The archive on pypi is missing the 'utils' directory!
4822 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4823 version ".tar.gz"))
4824 (file-name (string-append name "-" version ".tar.gz"))
4825 (sha256
4826 (base32
4827 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4828 (build-system python-build-system)
4829 (outputs '("out" "doc"))
4830 (inputs
4831 `(("gdk-pixbuf" ,gdk-pixbuf)
4832 ("cairo" ,cairo)))
4833 (native-inputs
4834 `(("pkg-config" ,pkg-config)
4835 ("python-sphinx" ,python-sphinx)
4836 ("python-docutils" ,python-docutils)))
4837 (propagated-inputs
4838 `(("python-xcffib" ,python-xcffib))) ; used at run time
4839 (arguments
4840 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4841 #:tests? #f
4842 #:phases
4843 (modify-phases %standard-phases
4844 (add-after 'install 'install-doc
4845 (lambda* (#:key inputs outputs #:allow-other-keys)
4846 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4847 (doc (string-append data "/doc/" ,name "-" ,version))
4848 (html (string-append doc "/html")))
4849 (setenv "LD_LIBRARY_PATH"
4850 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4851 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4852 (setenv "LANG" "en_US.UTF-8")
4853 (mkdir-p html)
4854 (for-each (lambda (file)
4855 (copy-file (string-append "." file)
4856 (string-append doc file)))
4857 '("/README.rst" "/CHANGES" "/LICENSE"))
4858 (system* "python" "setup.py" "build_sphinx")
4859 (copy-recursively "docs/_build/html" html)
4860 #t))))))
4861 (home-page "https://github.com/Kozea/cairocffi")
4862 (synopsis "Python bindings and object-oriented API for Cairo")
4863 (description
4864 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4865 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4866 graphics library with support for multiple backends including image buffers,
4867 PNG, PostScript, PDF, and SVG file output.")
4868 (license license:bsd-3)))
4869
4870 (define-public python2-cairocffi
4871 (package-with-python2 python-cairocffi))
4872
4873 (define-public python-decorator
4874 (package
4875 (name "python-decorator")
4876 (version "4.0.10")
4877 (source
4878 (origin
4879 (method url-fetch)
4880 (uri (pypi-uri "decorator" version))
4881 (sha256
4882 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4883 (build-system python-build-system)
4884 (arguments '(#:tests? #f)) ; no test target
4885 (home-page "https://pypi.python.org/pypi/decorator/")
4886 (synopsis "Python module to simplify usage of decorators")
4887 (description
4888 "The aim of the decorator module is to simplify the usage of decorators
4889 for the average programmer, and to popularize decorators usage giving examples
4890 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4891 etc. The core of this module is a decorator factory.")
4892 (license license:expat)))
4893
4894 (define-public python2-decorator
4895 (package-with-python2 python-decorator))
4896
4897 (define-public python-drmaa
4898 (package
4899 (name "python-drmaa")
4900 (version "0.7.7")
4901 (source
4902 (origin
4903 (method url-fetch)
4904 (uri (string-append
4905 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4906 version ".tar.gz"))
4907 (sha256
4908 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4909 (build-system python-build-system)
4910 ;; The test suite requires libdrmaa which is provided by the cluster
4911 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4912 ;; should be set to the path of the libdrmaa library.
4913 (arguments '(#:tests? #f))
4914 (native-inputs
4915 `(("python-nose" ,python-nose)))
4916 (home-page "https://pypi.python.org/pypi/drmaa")
4917 (synopsis "Python bindings for the DRMAA library")
4918 (description
4919 "A Python package for Distributed Resource Management (DRM) job
4920 submission and control. This package is an implementation of the DRMAA 1.0
4921 Python language binding specification.")
4922 (license license:bsd-3)))
4923
4924 (define-public python2-drmaa
4925 (package-with-python2 python-drmaa))
4926
4927 (define-public python-gridmap
4928 (package
4929 (name "python-gridmap")
4930 (version "0.13.0")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 (uri (string-append
4935 "https://github.com/pygridtools/gridmap/archive/v"
4936 version ".tar.gz"))
4937 (file-name (string-append name "-" version ".tar.gz"))
4938 (sha256
4939 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4940 (build-system python-build-system)
4941 (arguments
4942 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4943 (propagated-inputs
4944 `(("python-psutil" ,python-psutil)
4945 ("python-drmaa" ,python-drmaa)
4946 ("python-pyzmq" ,python-pyzmq)))
4947 (home-page "https://github.com/pygridtools/gridmap")
4948 (synopsis "Create jobs on a cluster directly from Python")
4949 (description
4950 "Gridmap is a Python package to allow you to easily create jobs on the
4951 cluster directly from Python. You can directly map Python functions onto the
4952 cluster without needing to write any wrapper code yourself.")
4953 (license license:gpl3+)))
4954
4955 (define-public python2-gridmap
4956 (package-with-python2 python-gridmap))
4957
4958 (define-public python-pexpect
4959 (package
4960 (name "python-pexpect")
4961 (version "4.2.1")
4962 (source
4963 (origin
4964 (method url-fetch)
4965 (uri (pypi-uri "pexpect" version))
4966 (sha256
4967 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4968 (build-system python-build-system)
4969 (arguments
4970 `(#:phases
4971 (modify-phases %standard-phases
4972 (add-before 'check 'prepare-tests
4973 (lambda _
4974 (substitute* (find-files "tests")
4975 (("/bin/ls") (which "ls"))
4976 (("/bin/echo") (which "echo"))
4977 (("/bin/which") (which "which"))
4978 ;; Many tests try to use the /bin directory which
4979 ;; is not present in the build environment.
4980 ;; Use one that's non-empty and unlikely to change.
4981 (("/bin'") "/dev'"))
4982 ;; XXX: Socket connection test gets "Connection reset by peer".
4983 ;; Why does it not work? Delete for now.
4984 (delete-file "tests/test_socket.py")
4985 #t))
4986 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4987 (native-inputs
4988 `(("python-nose" ,python-nose)
4989 ("python-pytest" ,python-pytest-3.0)
4990 ("man-db" ,man-db)
4991 ("which" ,which)))
4992 (propagated-inputs
4993 `(("python-ptyprocess" ,python-ptyprocess)))
4994 (home-page "http://pexpect.readthedocs.org/")
4995 (synopsis "Controlling interactive console applications")
4996 (description
4997 "Pexpect is a pure Python module for spawning child applications;
4998 controlling them; and responding to expected patterns in their output.
4999 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5000 child application and control it as if a human were typing commands.")
5001 (license license:isc)))
5002
5003 (define-public python2-pexpect
5004 (package-with-python2 python-pexpect))
5005
5006 (define-public python-setuptools-scm
5007 (package
5008 (name "python-setuptools-scm")
5009 (version "1.15.0")
5010 (source (origin
5011 (method url-fetch)
5012 (uri (pypi-uri "setuptools_scm" version))
5013 (sha256
5014 (base32
5015 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5016 (build-system python-build-system)
5017 (home-page "https://github.com/pypa/setuptools_scm/")
5018 (synopsis "Manage Python package versions in SCM metadata")
5019 (description
5020 "Setuptools_scm handles managing your Python package versions in
5021 @dfn{software configuration management} (SCM) metadata instead of declaring
5022 them as the version argument or in a SCM managed file.")
5023 (license license:expat)))
5024
5025 (define-public python2-setuptools-scm
5026 (package-with-python2 python-setuptools-scm))
5027
5028 (define-public python-pathpy
5029 (package
5030 (name "python-pathpy")
5031 (version "8.1.1")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (string-append "https://pypi.python.org/packages/source/p/"
5036 "path.py/path.py-" version ".tar.gz"))
5037 (sha256
5038 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5039 (outputs '("out" "doc"))
5040 (build-system python-build-system)
5041 (propagated-inputs
5042 `(("python-appdirs" ,python-appdirs)))
5043 (native-inputs
5044 `(("python-setuptools-scm" ,python-setuptools-scm)
5045 ("python-sphinx" ,python-sphinx)
5046 ("python-rst.linker" ,python-rst.linker)
5047 ("python-pytest" ,python-pytest)
5048 ("python-pytest-runner" ,python-pytest-runner)))
5049 (arguments
5050 `(#:phases
5051 (modify-phases %standard-phases
5052 (add-after 'build 'build-doc
5053 (lambda _
5054 (setenv "LANG" "en_US.UTF-8")
5055 (zero? (system* "python" "setup.py" "build_sphinx"))))
5056 (add-after 'install 'install-doc
5057 (lambda* (#:key outputs #:allow-other-keys)
5058 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5059 (doc (string-append data "/doc/" ,name "-" ,version))
5060 (html (string-append doc "/html")))
5061 (mkdir-p html)
5062 (for-each (lambda (file)
5063 (copy-file file (string-append doc "/" file)))
5064 '("README.rst" "CHANGES.rst"))
5065 (copy-recursively "build/sphinx/html" html)))))))
5066 (home-page "https://github.com/jaraco/path.py")
5067 (synopsis "Python module wrapper for built-in os.path")
5068 (description
5069 "@code{path.py} implements path objects as first-class entities, allowing
5070 common operations on files to be invoked on those path objects directly.")
5071 (license license:expat)))
5072
5073 (define-public python2-pathpy
5074 (package-with-python2 python-pathpy))
5075
5076 (define-public python-pickleshare
5077 (package
5078 (name "python-pickleshare")
5079 (version "0.5")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (string-append "https://pypi.python.org/packages/source/p/"
5084 "pickleshare/pickleshare-" version ".tar.gz"))
5085 (sha256
5086 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5087 (build-system python-build-system)
5088 (propagated-inputs
5089 `(("python-pathpy" ,python-pathpy)))
5090 (home-page "https://github.com/vivainio/pickleshare")
5091 (synopsis "Tiny key value database with concurrency support")
5092 (description
5093 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5094 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5095 shelve, many processes can access the database simultaneously. Changing a
5096 value in database is immediately visible to other processes accessing the same
5097 database. Concurrency is possible because the values are stored in separate
5098 files. Hence the “database” is a directory where all files are governed by
5099 PickleShare.")
5100 (license license:expat)))
5101
5102 (define-public python2-pickleshare
5103 (package-with-python2 python-pickleshare))
5104
5105 (define-public python-simplegeneric
5106 (package
5107 (name "python-simplegeneric")
5108 (version "0.8.1")
5109 (source
5110 (origin
5111 (method url-fetch)
5112 (uri (string-append "https://pypi.python.org/packages/source/s/"
5113 "simplegeneric/simplegeneric-" version ".zip"))
5114 (sha256
5115 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5116 (build-system python-build-system)
5117 (native-inputs
5118 `(("unzip" ,unzip)))
5119 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5120 (synopsis "Python module for simple generic functions")
5121 (description
5122 "The simplegeneric module lets you define simple single-dispatch generic
5123 functions, akin to Python’s built-in generic functions like @code{len()},
5124 @code{iter()} and so on. However, instead of using specially-named methods,
5125 these generic functions use simple lookup tables, akin to those used by
5126 e.g. @code{pickle.dump()} and other generic functions found in the Python
5127 standard library.")
5128 (license license:zpl2.1)))
5129
5130 (define-public python2-simplegeneric
5131 (package-with-python2 python-simplegeneric))
5132
5133 (define-public python-ipython-genutils
5134 ;; TODO: This package is retired, check if can be removed, see description.
5135 (package
5136 (name "python-ipython-genutils")
5137 (version "0.1.0")
5138 (source
5139 (origin
5140 (method url-fetch)
5141 (uri (string-append "https://pypi.python.org/packages/source/i/"
5142 "ipython_genutils/ipython_genutils-"
5143 version ".tar.gz"))
5144 (sha256
5145 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5146 (build-system python-build-system)
5147 (arguments `(#:tests? #f)) ; no tests
5148 (home-page "http://ipython.org")
5149 (synopsis "Vestigial utilities from IPython")
5150 (description
5151 "This package provides retired utilities from IPython. No packages
5152 outside IPython/Jupyter should depend on it.
5153
5154 This package shouldn't exist. It contains some common utilities shared by
5155 Jupyter and IPython projects during The Big Split. As soon as possible, those
5156 packages will remove their dependency on this, and this package will go
5157 away.")
5158 (license license:bsd-3)))
5159
5160 (define-public python2-ipython-genutils
5161 (package-with-python2 python-ipython-genutils))
5162
5163 (define-public python-traitlets
5164 (package
5165 (name "python-traitlets")
5166 (version "4.2.0")
5167 (source
5168 (origin
5169 (method url-fetch)
5170 (uri (pypi-uri "traitlets" version))
5171 (sha256
5172 (base32
5173 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5174 (build-system python-build-system)
5175 (arguments
5176 `(#:phases
5177 (modify-phases %standard-phases
5178 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5179 (propagated-inputs
5180 `(("python-ipython-genutils" ,python-ipython-genutils)
5181 ("python-decorator" ,python-decorator)))
5182 (native-inputs
5183 `(("python-mock" ,python-mock)
5184 ("python-nose" ,python-nose)))
5185 (home-page "http://ipython.org")
5186 (synopsis "Configuration system for Python applications")
5187 (description
5188 "Traitlets is a framework that lets Python classes have attributes with
5189 type checking, dynamically calculated default values, and ‘on change’
5190 callbacks. The package also includes a mechanism to use traitlets for
5191 configuration, loading values from files or from command line arguments. This
5192 is a distinct layer on top of traitlets, so you can use traitlets in your code
5193 without using the configuration machinery.")
5194 (license license:bsd-3)))
5195
5196 (define-public python2-traitlets
5197 (package-with-python2 python-traitlets))
5198
5199 (define-public python-jupyter-core
5200 (package
5201 (name "python-jupyter-core")
5202 (version "4.2.1")
5203 (source
5204 (origin
5205 (method url-fetch)
5206 (uri (string-append (pypi-uri "jupyter_core" version)))
5207 (sha256
5208 (base32
5209 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5210 (build-system python-build-system)
5211 ;; FIXME: not sure how to run the tests
5212 (arguments `(#:tests? #f))
5213 (propagated-inputs
5214 `(("python-traitlets" ,python-traitlets)))
5215 (home-page "http://jupyter.org/")
5216 (synopsis "Jupyter base package")
5217 (description
5218 "Jupyter core is the base package on which Jupyter projects rely.")
5219 (license license:bsd-3)))
5220
5221 (define-public python2-jupyter-core
5222 (package-with-python2 python-jupyter-core))
5223
5224 (define-public python-jupyter-client
5225 (package
5226 (name "python-jupyter-client")
5227 (version "4.4.0")
5228 (source
5229 (origin
5230 (method url-fetch)
5231 (uri (pypi-uri "jupyter_client" version))
5232 (sha256
5233 (base32
5234 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5235 (build-system python-build-system)
5236 ;; Tests fail because of missing native python kernel which I assume is
5237 ;; provided by the ipython package, which we cannot use because it would
5238 ;; cause a dependency cycle.
5239 (arguments `(#:tests? #f))
5240 (propagated-inputs
5241 `(("python-pyzmq" ,python-pyzmq)
5242 ("python-traitlets" ,python-traitlets)
5243 ("python-jupyter-core" ,python-jupyter-core)))
5244 (home-page "http://jupyter.org/")
5245 (synopsis "Jupyter protocol implementation and client libraries")
5246 (description
5247 "The @code{jupyter_client} package contains the reference implementation
5248 of the Jupyter protocol. It also provides client and kernel management APIs
5249 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5250 installing @code{kernelspec}s for use with Jupyter frontends.")
5251 (license license:bsd-3)))
5252
5253 (define-public python2-jupyter-client
5254 (package-with-python2 python-jupyter-client))
5255
5256 (define-public python-ipykernel
5257 (package
5258 (name "python-ipykernel")
5259 (version "4.5.2")
5260 (source
5261 (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "ipykernel" version))
5264 (sha256
5265 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5266 (build-system python-build-system)
5267 ;; The tests load a submodule of IPython. However, IPython itself depends
5268 ;; on ipykernel.
5269 (arguments `(#:tests? #f))
5270 (propagated-inputs
5271 ;; imported at runtime during connect
5272 `(("python-jupyter-client" ,python-jupyter-client)))
5273 (home-page "http://ipython.org")
5274 (synopsis "IPython Kernel for Jupyter")
5275 (description
5276 "This package provides the IPython kernel for Jupyter.")
5277 (license license:bsd-3)))
5278
5279 (define-public python2-ipykernel
5280 (package-with-python2 python-ipykernel))
5281
5282 (define-public python-testpath
5283 (package
5284 (name "python-testpath")
5285 (version "0.2")
5286 (source
5287 (origin
5288 (method url-fetch)
5289 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5290 version ".tar.gz"))
5291 (file-name (string-append name "-" version ".tar.gz"))
5292 (sha256
5293 (base32
5294 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5295 (build-system python-build-system)
5296 (arguments
5297 `(#:tests? #f ; this package does not even have a setup.py
5298 #:modules ((guix build python-build-system)
5299 (guix build utils)
5300 (srfi srfi-1))
5301 #:imported-modules (,@%python-build-system-modules
5302 (srfi srfi-1))
5303 #:phases
5304 (modify-phases %standard-phases
5305 (delete 'install)
5306 (replace 'build
5307 (lambda* (#:key inputs outputs #:allow-other-keys)
5308 (let* ((version (last
5309 (string-split (assoc-ref inputs "python") #\-)))
5310 (x.y (string-join (take (string-split version #\.) 2)
5311 "."))
5312 (dir (string-append
5313 (assoc-ref outputs "out")
5314 "/lib/python" x.y "/site-packages/testpath")))
5315 (mkdir-p dir)
5316 (copy-recursively "testpath" dir))
5317 #t)))))
5318 (home-page "https://github.com/takluyver/testpath")
5319 (synopsis "Test utilities for code working with files and commands")
5320 (description
5321 "Testpath is a collection of utilities for Python code working with files
5322 and commands. It contains functions to check things on the filesystem, and
5323 tools for mocking system commands and recording calls to those.")
5324 (license license:expat)))
5325
5326 (define-public python2-testpath
5327 (package-with-python2 python-testpath))
5328
5329 (define-public python-ipython
5330 (package
5331 (name "python-ipython")
5332 (version "5.2.2")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "ipython" version ".tar.gz"))
5337 (sha256
5338 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5339 (build-system python-build-system)
5340 (outputs '("out" "doc"))
5341 (propagated-inputs
5342 `(("python-pyzmq" ,python-pyzmq)
5343 ("python-prompt-toolkit" ,python-prompt-toolkit)
5344 ("python-terminado" ,python-terminado)
5345 ("python-matplotlib" ,python-matplotlib)
5346 ("python-numpy" ,python-numpy)
5347 ("python-numpydoc" ,python-numpydoc)
5348 ("python-jinja2" ,python-jinja2)
5349 ("python-mistune" ,python-mistune)
5350 ("python-pexpect" ,python-pexpect)
5351 ("python-pickleshare" ,python-pickleshare)
5352 ("python-simplegeneric" ,python-simplegeneric)
5353 ("python-jsonschema" ,python-jsonschema)
5354 ("python-traitlets" ,python-traitlets)
5355 ("python-ipykernel" ,python-ipykernel)
5356 ("python-nbformat" ,python-nbformat)
5357 ("python-pygments" ,python-pygments)))
5358 (inputs
5359 `(("readline" ,readline)
5360 ("which" ,which)))
5361 (native-inputs
5362 `(("graphviz" ,graphviz)
5363 ("pkg-config" ,pkg-config)
5364 ("python-requests" ,python-requests) ;; for tests
5365 ("python-testpath" ,python-testpath)
5366 ("python-nose" ,python-nose)
5367 ("python-sphinx" ,python-sphinx)
5368 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5369 ("texlive" ,texlive)
5370 ("texinfo" ,texinfo)))
5371 (arguments
5372 `(#:phases
5373 (modify-phases %standard-phases
5374 (add-after
5375 'install 'install-doc
5376 (lambda* (#:key inputs outputs #:allow-other-keys)
5377 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5378 (doc (string-append data "/doc/" ,name "-" ,version))
5379 (html (string-append doc "/html"))
5380 (man1 (string-append data "/man/man1"))
5381 (info (string-append data "/info"))
5382 (examples (string-append doc "/examples"))
5383 (python-arg (string-append "PYTHON=" (which "python"))))
5384 (setenv "LANG" "en_US.utf8")
5385 ;; Make installed package available for running the tests
5386 (add-installed-pythonpath inputs outputs)
5387 (with-directory-excursion "docs"
5388 ;; FIXME: pdf fails to build
5389 ;;(system* "make" "pdf" "PAPER=a4")
5390 (system* "make" python-arg "html")
5391 (system* "make" python-arg "info"))
5392 (copy-recursively "docs/man" man1)
5393 (copy-recursively "examples" examples)
5394 (copy-recursively "docs/build/html" html)
5395 ;; (copy-file "docs/build/latex/ipython.pdf"
5396 ;; (string-append doc "/ipython.pdf"))
5397 (mkdir-p info)
5398 (copy-file "docs/build/texinfo/ipython.info"
5399 (string-append info "/ipython.info"))
5400 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5401 ;; Tests can only be run after the library has been installed and not
5402 ;; within the source directory.
5403 (delete 'check)
5404 (add-after
5405 'install 'check
5406 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5407 (if tests?
5408 (with-directory-excursion "/tmp"
5409 ;; Make installed package available for running the tests
5410 (add-installed-pythonpath inputs outputs)
5411 (setenv "HOME" "/tmp/") ;; required by a test
5412 (zero? (system* (string-append (assoc-ref outputs "out")
5413 "/bin/iptest"))))
5414 #t)))
5415 (add-before
5416 'install 'fix-tests
5417 (lambda* (#:key inputs #:allow-other-keys)
5418 (substitute* "./IPython/utils/_process_posix.py"
5419 (("/usr/bin/env', 'which") (which "which")))
5420 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5421 (("#!/usr/bin/env python")
5422 (string-append "#!" (which "python"))))
5423 ;; Disable 1 failing test
5424 (substitute* "./IPython/core/tests/test_magic.py"
5425 (("def test_dirops\\(\\):" all)
5426 (string-append "@dec.skipif(True)\n" all))))))))
5427 (home-page "http://ipython.org")
5428 (synopsis "IPython is a tool for interactive computing in Python")
5429 (description
5430 "IPython provides a rich architecture for interactive computing with:
5431 Powerful interactive shells, a browser-based notebook, support for interactive
5432 data visualization, embeddable interpreters and tools for parallel
5433 computing.")
5434 (license license:bsd-3)
5435 (properties `((python2-variant . ,(delay python2-ipython))))))
5436
5437 (define-public python2-ipython
5438 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5439 (package
5440 (inherit ipython)
5441 ;; FIXME: add pyreadline once available.
5442 (propagated-inputs
5443 `(("python2-backports-shutil-get-terminal-size"
5444 ,python2-backports-shutil-get-terminal-size)
5445 ("python2-pathlib2" ,python2-pathlib2)
5446 ,@(package-propagated-inputs ipython)))
5447 (native-inputs
5448 `(("python2-mock" ,python2-mock)
5449 ,@(package-native-inputs ipython))))))
5450
5451 (define-public python-isodate
5452 (package
5453 (name "python-isodate")
5454 (version "0.5.4")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (pypi-uri "isodate" version))
5459 (sha256
5460 (base32
5461 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5462 (build-system python-build-system)
5463 (home-page
5464 "http://cheeseshop.python.org/pypi/isodate")
5465 (synopsis
5466 "Python date parser and formatter")
5467 (description
5468 "Python-isodate is a python module for parsing and formatting
5469 ISO 8601 dates, time and duration.")
5470 (license license:bsd-3)))
5471
5472 (define-public python2-isodate
5473 (package-with-python2 python-isodate))
5474
5475 (define-public python-html5lib
5476 (package
5477 (name "python-html5lib")
5478 (version "1.0b10")
5479 (source
5480 (origin
5481 (method url-fetch)
5482 (uri (pypi-uri "html5lib" version))
5483 (sha256
5484 (base32
5485 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5486 (build-system python-build-system)
5487 (propagated-inputs
5488 `(("python-six" ,python-six)
5489 ("python-webencodings" ,python-webencodings)))
5490 (arguments
5491 `(#:test-target "check"))
5492 (home-page
5493 "https://github.com/html5lib/html5lib-python")
5494 (synopsis
5495 "Python HTML parser based on the WHATWG HTML specifcation")
5496 (description
5497 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5498 and written in Python.")
5499 (license license:expat)))
5500
5501 (define-public python2-html5lib
5502 (package-with-python2 python-html5lib))
5503
5504 ;; Needed for python-bleach, a dependency of python-notebook
5505 (define-public python-html5lib-0.9
5506 (package
5507 (inherit python-html5lib)
5508 (version "0.999")
5509 (source
5510 (origin
5511 (method url-fetch)
5512 (uri (pypi-uri "html5lib" version))
5513 (sha256
5514 (base32
5515 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5516
5517 (define-public python2-html5lib-0.9
5518 (package-with-python2 python-html5lib-0.9))
5519
5520 (define-public python-webencodings
5521 (package
5522 (name "python-webencodings")
5523 (version "0.5")
5524 (source (origin
5525 (method url-fetch)
5526 (uri (pypi-uri "webencodings" version))
5527 (sha256
5528 (base32
5529 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5530 (build-system python-build-system)
5531 (arguments
5532 '(#:phases
5533 (modify-phases %standard-phases
5534 (replace 'check
5535 (lambda _
5536 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5537 (native-inputs
5538 `(("python-pytest" ,python-pytest)))
5539 (home-page "https://github.com/SimonSapin/python-webencodings")
5540 (synopsis "Character encoding aliases for legacy web content")
5541 (description
5542 "In order to be compatible with legacy web content when interpreting
5543 something like @code{Content-Type: text/html; charset=latin1}, tools need
5544 to use a particular set of aliases for encoding labels as well as some
5545 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5546 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5547 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5548 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5549 defines all such details so that implementations do not have to
5550 reverse-engineer each other.
5551
5552 This module implements the Encoding standard and has encoding labels and
5553 BOM detection, but the actual implementation for encoders and decoders
5554 is Python’s.")
5555 (license license:bsd-3)))
5556
5557 (define-public python2-webencodings
5558 (package-with-python2 python-webencodings))
5559
5560 (define-public python-urwid
5561 (package
5562 (name "python-urwid")
5563 (version "1.3.1")
5564 (source
5565 (origin
5566 (method url-fetch)
5567 (uri (pypi-uri "urwid" version))
5568 (sha256
5569 (base32
5570 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5571 (build-system python-build-system)
5572 (arguments
5573 `(#:phases
5574 (modify-phases %standard-phases
5575 ;; Disable failing test. Bug filed upstream:
5576 ;; https://github.com/wardi/urwid/issues/164
5577 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5578 (add-after 'unpack 'disable-failing-test
5579 (lambda _
5580 (substitute* "urwid/tests/test_event_loops.py"
5581 (("test_remove_watch_file")
5582 "disable_remove_watch_file")))))))
5583 (home-page "http://urwid.org")
5584 (synopsis "Console user interface library for Python")
5585 (description
5586 "Urwid is a curses-based UI/widget library for Python. It includes many
5587 features useful for text console applications.")
5588 (license license:lgpl2.1+)))
5589
5590 (define-public python2-urwid
5591 (let ((python2-urwid (package-with-python2 python-urwid)))
5592 (package
5593 (inherit python2-urwid)
5594 (arguments
5595 (append
5596 '(#:phases
5597 (modify-phases %standard-phases
5598 ;; Disable the vterm tests because of non-deterministic failures
5599 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5600 (add-after 'unpack 'delete-test_vterm.py
5601 (delete-file "urwid/tests/test_vterm.py"))))
5602 (package-arguments python-urwid))))))
5603
5604 (define-public python-openid
5605 (package
5606 (name "python-openid")
5607 (version "3.0.10")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "python3-openid" version))
5612 (sha256
5613 (base32
5614 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5615 (build-system python-build-system)
5616 (arguments
5617 `(#:phases
5618 (modify-phases %standard-phases
5619 (replace 'check
5620 (lambda _
5621 (zero? (system* "./admin/runtests")))))))
5622 (properties `((python2-variant . ,(delay python2-openid))))
5623 (propagated-inputs
5624 `(("python-defusedxml" ,python-defusedxml)))
5625 (native-inputs
5626 `(("python-psycopg2" ,python-psycopg2)
5627 ("python-django" ,python-django)))
5628 (home-page "https://github.com/necaris/python3-openid")
5629 (synopsis "OpenID support for servers and consumers")
5630 (description "This library provides OpenID authentication for Python, both
5631 for clients and servers.")
5632 (license license:asl2.0)))
5633
5634 (define-public python2-openid
5635 (package
5636 (name "python2-openid")
5637 (version "2.2.5")
5638 (source
5639 (origin
5640 (method url-fetch)
5641 (uri (pypi-uri "python-openid" version))
5642 (sha256
5643 (base32
5644 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5645 (build-system python-build-system)
5646 (arguments
5647 ;; Python 3 support is in `python3-openid`, a separate package.
5648 `(#:python ,python-2))
5649 (home-page "https://github.com/openid/python-openid")
5650 (synopsis "OpenID support for servers and consumers")
5651 (description "This library provides OpenID authentication for Python, both
5652 for clients and servers.")
5653 (license license:asl2.0)))
5654
5655 (define-public python-urwidtrees
5656 (package
5657 (name "python-urwidtrees")
5658 (version "1.0.2")
5659 (source
5660 (origin
5661 (method url-fetch)
5662 ;; package author intends on distributing via github rather than pypi:
5663 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5664 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5665 version ".tar.gz"))
5666 (file-name (string-append name "-" version ".tar.gz"))
5667 (sha256
5668 (base32
5669 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5670 (build-system python-build-system)
5671 (arguments
5672 '(#:tests? #f)) ; no tests
5673 (propagated-inputs `(("python-urwid" ,python-urwid)))
5674 (home-page "https://github.com/pazz/urwidtrees")
5675 (synopsis "Tree widgets for urwid")
5676 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5677 toolkit. Use it to build trees of widgets.")
5678 (license license:gpl3+)))
5679
5680 (define-public python2-urwidtrees
5681 (package-with-python2 python-urwidtrees))
5682
5683 (define-public python-dbus
5684 (package
5685 (name "python-dbus")
5686 (version "1.2.0")
5687 (source
5688 (origin
5689 (method url-fetch)
5690 (uri (string-append
5691 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5692 version ".tar.gz"))
5693 (sha256
5694 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5695 (build-system gnu-build-system)
5696 (arguments
5697 '(#:phases
5698 (modify-phases %standard-phases
5699 (add-before
5700 'check 'pre-check
5701 (lambda _
5702 ;; XXX: For the missing '/etc/machine-id'.
5703 (substitute* "test/run-test.sh"
5704 (("DBUS_FATAL_WARNINGS=1")
5705 "DBUS_FATAL_WARNINGS=0"))
5706 #t)))))
5707 (native-inputs
5708 `(("pkg-config" ,pkg-config)))
5709 (inputs
5710 `(("python" ,python)
5711 ("dbus-glib" ,dbus-glib)))
5712 (synopsis "Python bindings for D-bus")
5713 (description "python-dbus provides bindings for libdbus, the reference
5714 implementation of D-Bus.")
5715 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5716 (license license:expat)))
5717
5718 (define-public python2-dbus
5719 (package (inherit python-dbus)
5720 (name "python2-dbus")
5721 (inputs `(("python" ,python-2)
5722 ,@(alist-delete "python"
5723 (package-inputs python-dbus)
5724 equal?)))
5725 ;; FIXME: on Python 2, the test_utf8 fails with:
5726 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5727 (arguments `(#:tests? #f))))
5728
5729 (define-public python-apsw
5730 (package
5731 (name "python-apsw")
5732 (version "3.9.2-r1")
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (pypi-uri "apsw" version))
5737 (sha256
5738 (base32
5739 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5740 (build-system python-build-system)
5741 (inputs
5742 `(("sqlite" ,sqlite)))
5743 (arguments
5744 `(#:phases
5745 (modify-phases %standard-phases
5746 (delete 'check)
5747 (add-after 'install 'check
5748 (lambda* (#:key inputs outputs #:allow-other-keys)
5749 (add-installed-pythonpath inputs outputs)
5750 (zero? (system* "python" "setup.py" "test")))))))
5751 (home-page "https://github.com/rogerbinns/apsw/")
5752 (synopsis "Another Python SQLite Wrapper")
5753 (description "APSW is a Python wrapper for the SQLite
5754 embedded relational database engine. In contrast to other wrappers such as
5755 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5756 translate the complete SQLite API into Python.")
5757 (license license:zlib)))
5758
5759 (define-public python2-apsw
5760 (package-with-python2 python-apsw))
5761
5762 (define-public python-lxml
5763 (package
5764 (name "python-lxml")
5765 (version "3.6.0")
5766 (source
5767 (origin
5768 (method url-fetch)
5769 (uri (pypi-uri "lxml" version))
5770 (sha256
5771 (base32
5772 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5773 (build-system python-build-system)
5774 (inputs
5775 `(("libxml2" ,libxml2)
5776 ("libxslt" ,libxslt)))
5777 (home-page "http://lxml.de/")
5778 (synopsis
5779 "Python XML processing library")
5780 (description
5781 "The lxml XML toolkit is a Pythonic binding for the C libraries
5782 libxml2 and libxslt.")
5783 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5784
5785 (define-public python2-lxml
5786 (package-with-python2 python-lxml))
5787
5788 ;; beautifulsoup4 has a totally different namespace than 3.x,
5789 ;; and pypi seems to put it under its own name, so I guess we should too
5790 (define-public python-beautifulsoup4
5791 (package
5792 (name "python-beautifulsoup4")
5793 (version "4.5.3")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (pypi-uri "beautifulsoup4" version))
5798 (sha256
5799 (base32
5800 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5801 (build-system python-build-system)
5802 (arguments
5803 `(#:phases
5804 (modify-phases %standard-phases
5805 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5806 ;; must use this conversion script when building with Python 3. The
5807 ;; conversion script also runs the tests.
5808 ;; For more information, see the file 'convert-py3k' in the source
5809 ;; distribution.
5810 (replace 'check
5811 (lambda _ (zero? (system* "./convert-py3k")))))))
5812 (home-page
5813 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5814 (synopsis
5815 "Python screen-scraping library")
5816 (description
5817 "Beautiful Soup is a Python library designed for rapidly setting up
5818 screen-scraping projects. It offers Pythonic idioms for navigating,
5819 searching, and modifying a parse tree, providing a toolkit for
5820 dissecting a document and extracting what you need. It automatically
5821 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5822 (license license:expat)
5823 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5824
5825 (define-public python2-beautifulsoup4
5826 (package
5827 (inherit (package-with-python2
5828 (strip-python2-variant python-beautifulsoup4)))
5829 (arguments `(#:python ,python-2))))
5830
5831 (define-public python-cssutils
5832 (package
5833 (name "python-cssutils")
5834 (version "1.0.1")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "cssutils" version))
5839 (sha256
5840 (base32
5841 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5842 (build-system python-build-system)
5843 (native-inputs
5844 `(("unzip" ,unzip))) ; for unpacking the source
5845 (arguments
5846 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5847 (home-page "http://cthedot.de/cssutils/")
5848 (synopsis
5849 "CSS Cascading Style Sheets library for Python")
5850 (description
5851 "Cssutils is a Python package for parsing and building CSS
5852 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5853 options.")
5854 (license license:lgpl3+)))
5855
5856 (define-public python2-cssutils
5857 (package-with-python2 python-cssutils))
5858
5859 (define-public python-cssselect
5860 (package
5861 (name "python-cssselect")
5862 (version "0.9.2")
5863 (source
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "cssselect" version))
5867 (sha256
5868 (base32
5869 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5870 (build-system python-build-system)
5871 (arguments
5872 ;; tests fail with message
5873 ;; AttributeError: 'module' object has no attribute 'tests'
5874 `(#:tests? #f))
5875 (home-page
5876 "https://pythonhosted.org/cssselect/")
5877 (synopsis
5878 "CSS3 selector parser and translator to XPath 1.0")
5879 (description
5880 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5881 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5882 another XPath engine to find the matching elements in an XML or HTML document.")
5883 (license license:bsd-3)))
5884
5885 (define-public python2-cssselect
5886 (package-with-python2 python-cssselect))
5887
5888 (define-public python-openid-cla
5889 (package
5890 (name "python-openid-cla")
5891 (version "1.2")
5892 (source
5893 (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "python-openid-cla" version))
5896 (sha256
5897 (base32
5898 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5899 (build-system python-build-system)
5900 (arguments '(#:tests? #f)) ; No tests.
5901 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5902 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5903 (description "@code{openid-cla} is an implementation of the OpenID
5904 contributor license agreement extension for python-openid.")
5905 (license license:bsd-3)))
5906
5907 (define-public python2-openid-cla
5908 (package-with-python2 python-openid-cla))
5909
5910 (define-public python-openid-teams
5911 (package
5912 (name "python-openid-teams")
5913 (version "1.1")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 (uri (pypi-uri "python-openid-teams" version))
5918 (sha256
5919 (base32
5920 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5921 (build-system python-build-system)
5922 (arguments '(#:tests? #f)) ; No tests.
5923 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5924 (synopsis "Implementation of the OpenID teams extension for python-openid")
5925 (description
5926 "@code{openid-teams} is an implementation of the OpenID
5927 teams extension for python-openid.")
5928 (license license:bsd-3)))
5929
5930 (define-public python2-openid-teams
5931 (package-with-python2 python-openid-teams))
5932
5933 (define-public python-netifaces
5934 (package
5935 (name "python-netifaces")
5936 (version "0.10.4")
5937 (source
5938 (origin
5939 (method url-fetch)
5940 (uri (string-append
5941 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5942 version
5943 ".tar.gz"))
5944 (sha256
5945 (base32
5946 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5947 (build-system python-build-system)
5948 (home-page
5949 "https://bitbucket.org/al45tair/netifaces")
5950 (synopsis
5951 "Python module for portable network interface information")
5952 (description
5953 "Netifaces is a Python module providing information on network
5954 interfaces in an easy and portable manner.")
5955 (license license:expat)))
5956
5957 (define-public python2-netifaces
5958 (package-with-python2 python-netifaces))
5959
5960 (define-public python-networkx
5961 (package
5962 (name "python-networkx")
5963 (version "1.11")
5964 (source
5965 (origin
5966 (method url-fetch)
5967 (uri (pypi-uri "networkx" version))
5968 (sha256
5969 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5970 (build-system python-build-system)
5971 ;; python-decorator is needed at runtime
5972 (propagated-inputs
5973 `(("python-decorator" ,python-decorator)))
5974 (native-inputs
5975 `(("python-nose" ,python-nose)))
5976 (home-page "http://networkx.github.io/")
5977 (synopsis "Python module for creating and manipulating graphs and networks")
5978 (description
5979 "NetworkX is a Python package for the creation, manipulation, and study
5980 of the structure, dynamics, and functions of complex networks.")
5981 (license license:bsd-3)))
5982
5983 (define-public python2-networkx
5984 (package-with-python2 python-networkx))
5985
5986 (define-public snakemake
5987 (package
5988 (name "snakemake")
5989 (version "3.11.2")
5990 (source
5991 (origin
5992 (method url-fetch)
5993 (uri (pypi-uri "snakemake" version))
5994 (sha256
5995 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
5996 (build-system python-build-system)
5997 (arguments
5998 ;; TODO: Package missing test dependencies.
5999 '(#:tests? #f))
6000 (propagated-inputs
6001 `(("python-wrapt" ,python-wrapt)
6002 ("python-requests" ,python-requests)))
6003 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6004 (synopsis "Python-based execution environment for make-like workflows")
6005 (description
6006 "Snakemake aims to reduce the complexity of creating workflows by
6007 providing a clean and modern domain specific specification language (DSL) in
6008 Python style, together with a fast and comfortable execution environment.")
6009 (license license:expat)))
6010
6011 (define-public python-seaborn
6012 (package
6013 (name "python-seaborn")
6014 (version "0.7.1")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "seaborn" version))
6019 (sha256
6020 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6021 (build-system python-build-system)
6022 (arguments
6023 '(#:tests? #f)) ; Tests requires a running X11 server.
6024 (propagated-inputs
6025 `(("python-pandas" ,python-pandas)
6026 ("python-matplotlib" ,python-matplotlib)
6027 ("python-scipy" ,python-scipy)))
6028 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6029 (synopsis "Statistical data visualization")
6030 (description
6031 "Seaborn is a library for making attractive and informative statistical
6032 graphics in Python. It is built on top of matplotlib and tightly integrated
6033 with the PyData stack, including support for numpy and pandas data structures
6034 and statistical routines from scipy and statsmodels.")
6035 (license license:bsd-3)
6036 (properties `((python2-variant . ,(delay python2-seaborn))))))
6037
6038 (define-public python2-seaborn
6039 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6040 (package
6041 (inherit base)
6042 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6043 ,@(package-propagated-inputs base))))))
6044
6045 (define-public python-mpmath
6046 (package
6047 (name "python-mpmath")
6048 (version "0.19")
6049 (source (origin
6050 (method url-fetch)
6051 (uri (string-append "http://mpmath.org/files/mpmath-"
6052 version ".tar.gz"))
6053 (sha256
6054 (base32
6055 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6056 (build-system python-build-system)
6057 (arguments
6058 '(#:phases
6059 (modify-phases %standard-phases
6060 (replace 'check
6061 (lambda _
6062 (zero?
6063 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6064 (home-page "http://mpmath.org")
6065 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6066 (description
6067 "@code{mpmath} can be used as an arbitrary-precision substitute for
6068 Python's float/complex types and math/cmath modules, but also does much
6069 more advanced mathematics.")
6070 (license license:bsd-3)))
6071
6072 (define-public python2-mpmath
6073 (package-with-python2 python-mpmath))
6074
6075 (define-public python-sympy
6076 (package
6077 (name "python-sympy")
6078 (version "1.0")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (string-append
6083 "https://github.com/sympy/sympy/releases/download/sympy-"
6084 version "/sympy-" version ".tar.gz"))
6085 (sha256
6086 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6087 (build-system python-build-system)
6088 (propagated-inputs
6089 `(("python-mpmath" ,python-mpmath)))
6090 (home-page "http://www.sympy.org/")
6091 (synopsis "Python library for symbolic mathematics")
6092 (description
6093 "SymPy is a Python library for symbolic mathematics. It aims to become a
6094 full-featured computer algebra system (CAS) while keeping the code as simple
6095 as possible in order to be comprehensible and easily extensible.")
6096 (license license:bsd-3)))
6097
6098 (define-public python2-sympy
6099 (package-with-python2 python-sympy))
6100
6101 (define-public python-q
6102 (package
6103 (name "python-q")
6104 (version "2.6")
6105 (source
6106 (origin
6107 (method url-fetch)
6108 (uri (pypi-uri "q" version))
6109 (sha256
6110 (base32
6111 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6112 (build-system python-build-system)
6113 (home-page "https://github.com/zestyping/q")
6114 (synopsis "Quick-and-dirty debugging output for tired programmers")
6115 (description
6116 "q is a Python module for \"print\" style of debugging Python code. It
6117 provides convenient short API for print out of values, tracebacks, and
6118 falling into the Python interpreter.")
6119 (license license:asl2.0)))
6120
6121 (define-public python2-q
6122 (package-with-python2 python-q))
6123
6124 (define-public python-testlib
6125 (package
6126 (name "python-testlib")
6127 (version "0.6.5")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (string-append
6132 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6133 version ".zip"))
6134 (sha256
6135 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6136 (build-system python-build-system)
6137 (native-inputs
6138 `(("unzip" ,unzip))) ; for unpacking the source
6139 (synopsis "Python micro test suite harness")
6140 (description "A micro unittest suite harness for Python.")
6141 (home-page "https://github.com/trentm/testlib")
6142 (license license:expat)))
6143
6144 (define-public python2-testlib
6145 (package-with-python2 python-testlib))
6146
6147 (define-public python2-xlib
6148 (package
6149 (name "python2-xlib")
6150 (version "0.14")
6151 (source (origin
6152 (method url-fetch)
6153 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6154 "/" version "/"
6155 "python-xlib-" version ".tar.gz"))
6156 (sha256
6157 (base32
6158 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6159 (build-system python-build-system)
6160 (arguments
6161 `(#:python ,python-2 ;Python 2 only
6162 #:tests? #f)) ;no tests
6163 (home-page "http://python-xlib.sourceforge.net/")
6164 (synopsis "Python X11 client library")
6165 (description
6166 "The Python X Library is intended to be a fully functional X client
6167 library for Python programs. It is useful to implement low-level X clients.
6168 It is written entirely in Python.")
6169 (license license:gpl2+)))
6170
6171 (define-public python-singledispatch
6172 (package
6173 (name "python-singledispatch")
6174 (version "3.4.0.3")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "singledispatch" version))
6179 (sha256
6180 (base32
6181 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6182 (build-system python-build-system)
6183 (native-inputs
6184 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6185 (home-page
6186 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6187 (synopsis "Backport of singledispatch feature from Python 3.4")
6188 (description
6189 "This library brings functools.singledispatch from Python 3.4 to Python
6190 2.6-3.3.")
6191 (license license:expat)))
6192
6193 (define-public python2-singledispatch
6194 (package-with-python2 python-singledispatch))
6195
6196 (define-public python-tornado
6197 (package
6198 (name "python-tornado")
6199 (version "4.5.1")
6200 (source
6201 (origin
6202 (method url-fetch)
6203 (uri (pypi-uri "tornado" version))
6204 (sha256
6205 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6206 (build-system python-build-system)
6207 (arguments
6208 '(;; FIXME: Two tests error out with:
6209 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6210 ;; #:phases
6211 ;; (modify-phases %standard-phases
6212 ;; (replace 'check
6213 ;; (lambda _
6214 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6215 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6216 ;; (zero? (system* "python" "-m" "tornado.test")))))
6217 #:tests? #f))
6218 (native-inputs
6219 `(("python-certifi" ,python-certifi)))
6220 (propagated-inputs
6221 `(("python-backports-abc" ,python-backports-abc)))
6222 (home-page "http://www.tornadoweb.org/")
6223 (synopsis "Python web framework and asynchronous networking library")
6224 (description
6225 "Tornado is a Python web framework and asynchronous networking library,
6226 originally developed at FriendFeed. By using non-blocking network I/O,
6227 Tornado can scale to tens of thousands of open connections, making it ideal
6228 for long polling, WebSockets, and other applications that require a long-lived
6229 connection to each user.")
6230 (license license:asl2.0)
6231 (properties `((python2-variant . ,(delay python2-tornado))))))
6232
6233 (define-public python2-tornado
6234 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6235 (package (inherit tornado)
6236 (propagated-inputs
6237 `(("python2-backport-ssl-match-hostname"
6238 ,python2-backport-ssl-match-hostname)
6239 ("python2-singledispatch" ,python2-singledispatch)
6240 ,@(package-propagated-inputs tornado))))))
6241
6242 ;; the python- version can be removed with python-3.5
6243 (define-public python-backports-abc
6244 (package
6245 (name "python-backports-abc")
6246 (version "0.5")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "backports_abc" version))
6251 (sha256
6252 (base32
6253 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6254 (build-system python-build-system)
6255 (home-page "https://github.com/cython/backports_abc")
6256 (synopsis "Backport of additions to the 'collections.abc' module")
6257 (description
6258 "Python-backports-abc provides a backport of additions to the
6259 'collections.abc' module in Python-3.5.")
6260 (license license:psfl)))
6261
6262 (define-public python2-backports-abc
6263 (package-with-python2 python-backports-abc))
6264
6265 (define-public python2-backports-shutil-get-terminal-size
6266 (package
6267 (name "python2-backports-shutil-get-terminal-size")
6268 (version "1.0.0")
6269 (source
6270 (origin
6271 (method url-fetch)
6272 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6273 (sha256
6274 (base32
6275 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6276 (build-system python-build-system)
6277 (arguments
6278 `(#:python ,python-2
6279 #:phases
6280 (modify-phases %standard-phases
6281 (replace 'check
6282 (lambda _
6283 (zero? (system* "py.test" "-v")))))))
6284 (native-inputs
6285 `(("python2-pytest" ,python2-pytest)))
6286 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6287 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6288 (description
6289 "This package provides a backport of the @code{get_terminal_size
6290 function} from Python 3.3's @code{shutil}.
6291 Unlike the original version it is written in pure Python rather than C,
6292 so it might be a tiny bit slower.")
6293 (license license:expat)))
6294
6295 (define-public python-waf
6296 (package
6297 (name "python-waf")
6298 (version "1.9.8")
6299 (source (origin
6300 (method url-fetch)
6301 (uri (string-append "https://waf.io/"
6302 "waf-" version ".tar.bz2"))
6303 (sha256
6304 (base32
6305 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6306 (build-system python-build-system)
6307 (arguments
6308 '(#:phases
6309 (modify-phases %standard-phases
6310 (replace 'build
6311 (lambda _
6312 (zero? (system* "python" "waf-light" "configure" "build"))))
6313 (replace 'check
6314 (lambda _
6315 (zero? (system* "python" "waf" "--version"))))
6316 (replace 'install
6317 (lambda _
6318 (copy-file "waf" %output))))))
6319 (home-page "https://waf.io/")
6320 (synopsis "Python-based build system")
6321 (description
6322 "Waf is a Python-based framework for configuring, compiling and installing
6323 applications.")
6324 (license license:bsd-3)))
6325
6326 (define-public python2-waf
6327 (package-with-python2 python-waf))
6328
6329 (define-public python-pyzmq
6330 (package
6331 (name "python-pyzmq")
6332 (version "15.1.0")
6333 (source
6334 (origin
6335 (method url-fetch)
6336 (uri (pypi-uri "pyzmq" version))
6337 (sha256
6338 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6339 (build-system python-build-system)
6340 (arguments
6341 `(#:configure-flags
6342 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6343 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6344 ;; --inplace' for 'python setup.py test' to work.
6345 #:tests? #f))
6346 (inputs
6347 `(("zeromq" ,zeromq)))
6348 (native-inputs
6349 `(("pkg-config" ,pkg-config)
6350 ("python-nose" ,python-nose)))
6351 (home-page "https://github.com/zeromq/pyzmq")
6352 (synopsis "Python bindings for 0MQ")
6353 (description
6354 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6355 (license license:bsd-4)))
6356
6357 (define-public python2-pyzmq
6358 (package-with-python2 python-pyzmq))
6359
6360 (define-public python-pep8
6361 (package
6362 (name "python-pep8")
6363 (version "1.7.0")
6364 (source
6365 (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "pep8" version))
6368 (sha256
6369 (base32
6370 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6371 (build-system python-build-system)
6372 (home-page "http://pep8.readthedocs.org/")
6373 (synopsis "Python style guide checker")
6374 (description
6375 "This tools checks Python code against some of the style conventions in
6376 PEP 8.")
6377 (license license:expat)))
6378
6379 (define-public python2-pep8
6380 (package-with-python2 python-pep8))
6381
6382 (define-public python-pyflakes
6383 (package
6384 (name "python-pyflakes")
6385 (version "1.0.0")
6386 (source
6387 (origin
6388 (method url-fetch)
6389 (uri (pypi-uri "pyflakes" version))
6390 (sha256
6391 (base32
6392 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6393 (build-system python-build-system)
6394 (home-page
6395 "https://github.com/pyflakes/pyflakes")
6396 (synopsis "Passive checker of Python programs")
6397 (description
6398 "Pyflakes statically checks Python source code for common errors.")
6399 (license license:expat)))
6400
6401 (define-public python2-pyflakes
6402 (package-with-python2 python-pyflakes))
6403
6404 (define-public python-mccabe
6405 (package
6406 (name "python-mccabe")
6407 (version "0.4.0")
6408 (source
6409 (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "mccabe" version))
6412 (sha256
6413 (base32
6414 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6415 (build-system python-build-system)
6416 (native-inputs
6417 `(("python-pytest" ,python-pytest)
6418 ("python-pytest-runner" ,python-pytest-runner)))
6419 (home-page "https://github.com/flintwork/mccabe")
6420 (synopsis "McCabe checker, plugin for flake8")
6421 (description
6422 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6423 complexity of Python source code.")
6424 (license license:expat)))
6425
6426 (define-public python2-mccabe
6427 (package-with-python2 python-mccabe))
6428
6429 (define-public python-mccabe-0.2.1
6430 (package (inherit python-mccabe)
6431 (version "0.2.1")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "mccabe" version))
6436 (sha256
6437 (base32
6438 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6439
6440 (define-public python2-mccabe-0.2.1
6441 (package-with-python2 python-mccabe-0.2.1))
6442
6443 ;; Flake8 2.4.1 requires an older version of pep8.
6444 ;; This should be removed ASAP.
6445 (define-public python-pep8-1.5.7
6446 (package (inherit python-pep8)
6447 (version "1.5.7")
6448 (source
6449 (origin
6450 (method url-fetch)
6451 (uri (string-append
6452 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6453 version
6454 ".tar.gz"))
6455 (sha256
6456 (base32
6457 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6458 (arguments
6459 ;; XXX Tests not compatible with Python 3.5.
6460 '(#:tests? #f))))
6461
6462 (define-public python2-pep8-1.5.7
6463 (package-with-python2 python-pep8-1.5.7))
6464
6465 ;; Flake8 2.4.1 requires an older version of pyflakes.
6466 ;; This should be removed ASAP.
6467 (define-public python-pyflakes-0.8.1
6468 (package (inherit python-pyflakes)
6469 (version "0.8.1")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (string-append
6474 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6475 version
6476 ".tar.gz"))
6477 (sha256
6478 (base32
6479 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6480 (arguments
6481 ;; XXX Tests not compatible with Python 3.5.
6482 '(#:tests? #f))))
6483
6484 (define-public python2-pyflakes-0.8.1
6485 (package-with-python2 python-pyflakes-0.8.1))
6486
6487 (define-public python-flake8
6488 (package
6489 (name "python-flake8")
6490 (version "2.5.4")
6491 (source
6492 (origin
6493 (method url-fetch)
6494 (uri (pypi-uri "flake8" version))
6495 (sha256
6496 (base32
6497 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6498 (modules '((guix build utils)))
6499 (snippet
6500 '(begin
6501 ;; Remove pre-compiled .pyc files from source.
6502 (for-each delete-file-recursively
6503 (find-files "." "__pycache__" #:directories? #t))
6504 (for-each delete-file (find-files "." "\\.pyc$"))
6505 #t))))
6506 (build-system python-build-system)
6507 (propagated-inputs
6508 `(("python-pep8" ,python-pep8)
6509 ("python-pyflakes" ,python-pyflakes)
6510 ("python-mccabe" ,python-mccabe)))
6511 (native-inputs
6512 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6513 ("python-nose" ,python-nose)))
6514 (home-page "https://gitlab.com/pycqa/flake8")
6515 (synopsis
6516 "The modular source code checker: pep8, pyflakes and co")
6517 (description
6518 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6519 (license license:expat)))
6520
6521 (define-public python2-flake8
6522 (package-with-python2 python-flake8))
6523
6524 ;; This will only be needed by the python-hacking package and will not be
6525 ;; necessary once python-hacking > 0.10.2 is released.
6526 (define-public python-flake8-2.2.4
6527 (package (inherit python-flake8)
6528 (propagated-inputs
6529 `(("python-pep8" ,python-pep8-1.5.7)
6530 ("python-pyflakes" ,python-pyflakes-0.8.1)
6531 ("python-mccabe" ,python-mccabe-0.2.1)))
6532 (native-inputs
6533 `(("python-mock" ,python-mock)
6534 ("python-nose" ,python-nose)))
6535 (version "2.2.4")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (pypi-uri "flake8" version))
6540 (sha256
6541 (base32
6542 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6543 (modules '((guix build utils)))
6544 (snippet
6545 '(begin
6546 ;; Remove pre-compiled .pyc files from source.
6547 (for-each delete-file-recursively
6548 (find-files "." "__pycache__" #:directories? #t))
6549 (for-each delete-file (find-files "." "\\.pyc$"))
6550 #t))))
6551 (arguments
6552 ;; XXX Fails with Python 3.5.
6553 '(#:tests? #f))))
6554
6555 (define-public python2-flake8-2.2.4
6556 (package-with-python2 python-flake8-2.2.4))
6557
6558 (define-public python-flake8-polyfill
6559 (package
6560 (name "python-flake8-polyfill")
6561 (version "1.0.1")
6562 (source
6563 (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "flake8-polyfill" version))
6566 (sha256
6567 (base32
6568 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6569 (build-system python-build-system)
6570 (arguments
6571 '(#:phases
6572 (modify-phases %standard-phases
6573 (replace 'check
6574 (lambda _
6575 (setenv "PYTHONPATH"
6576 (string-append (getcwd) "/build/lib:"
6577 (getenv "PYTHONPATH")))
6578 (zero? (system* "py.test" "-v")))))))
6579 (native-inputs
6580 `(("python-flake8" ,python-flake8)
6581 ("python-mock" ,python-mock)
6582 ("python-pycodestyle" ,python-pycodestyle)
6583 ("python-pytest" ,python-pytest)))
6584 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6585 (synopsis "Polyfill package for Flake8 plugins")
6586 (description
6587 "This package that provides some compatibility helpers for Flake8
6588 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6589 (license license:expat)))
6590
6591 (define-public python2-flake8-polyfill
6592 (package-with-python2 python-flake8-polyfill))
6593
6594 (define-public python-mistune
6595 (package
6596 (name "python-mistune")
6597 (version "0.7.3")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "mistune" version))
6602 (sha256
6603 (base32
6604 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6605 (build-system python-build-system)
6606 (native-inputs
6607 `(("python-nose" ,python-nose)
6608 ("python-cython" ,python-cython)))
6609 (home-page "https://github.com/lepture/mistune")
6610 (synopsis "Markdown parser in pure Python")
6611 (description "This package provides a fast markdown parser in pure
6612 Python.")
6613 (license license:bsd-3)))
6614
6615 (define-public python2-mistune
6616 (package-with-python2 python-mistune))
6617
6618 (define-public python-markdown
6619 (package
6620 (name "python-markdown")
6621 (version "2.6.8")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "Markdown" version))
6626 (sha256
6627 (base32
6628 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6629 (build-system python-build-system)
6630 (arguments
6631 `(#:phases
6632 (modify-phases %standard-phases
6633 (replace 'check
6634 (lambda _
6635 (zero? (system* "python" "run-tests.py")))))))
6636 (native-inputs
6637 `(("python-nose" ,python-nose)
6638 ("python-pyyaml" ,python-pyyaml)))
6639 (home-page "https://pythonhosted.org/Markdown/")
6640 (synopsis "Python implementation of Markdown")
6641 (description
6642 "This package provides a Python implementation of John Gruber's
6643 Markdown. The library features international input, various Markdown
6644 extensions, and several HTML output formats. A command line wrapper
6645 markdown_py is also provided to convert Markdown files to HTML.")
6646 (license license:bsd-3)))
6647
6648 (define-public python2-markdown
6649 (package-with-python2 python-markdown))
6650
6651 (define-public python-ptyprocess
6652 (package
6653 (name "python-ptyprocess")
6654 (version "0.5.1")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (string-append
6659 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6660 version ".tar.gz"))
6661 (sha256
6662 (base32
6663 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6664 (build-system python-build-system)
6665 (native-inputs
6666 `(("python-nose" ,python-nose)))
6667 (arguments
6668 `(#:phases
6669 (modify-phases %standard-phases
6670 (replace 'check
6671 (lambda _
6672 (zero? (system* "nosetests")))))))
6673 (home-page "https://github.com/pexpect/ptyprocess")
6674 (synopsis "Run a subprocess in a pseudo terminal")
6675 (description
6676 "This package provides a Python library used to launch a subprocess in a
6677 pseudo terminal (pty), and interact with both the process and its pty.")
6678 (license license:isc)))
6679
6680 (define-public python2-ptyprocess
6681 (package-with-python2 python-ptyprocess))
6682
6683 (define-public python-cram
6684 (package
6685 (name "python-cram")
6686 (version "0.7")
6687 (home-page "https://bitheap.org/cram/")
6688 (source (origin
6689 (method url-fetch)
6690 (uri (list (string-append home-page "cram-"
6691 version ".tar.gz")
6692 (pypi-uri "cram" version)))
6693 (sha256
6694 (base32
6695 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6696 (arguments
6697 '(#:phases
6698 (modify-phases %standard-phases
6699 (add-after 'unpack 'patch-source
6700 (lambda _
6701 (substitute* (find-files "cram" ".*\\.py$")
6702 ;; Replace default shell path.
6703 (("/bin/sh") (which "sh")))
6704 (substitute* (find-files "tests" ".*\\.t$")
6705 (("md5") "md5sum")
6706 (("/bin/bash") (which "bash"))
6707 (("/bin/sh") (which "sh")))
6708 (substitute* "cram/_test.py"
6709 ;; This hack works around a bug triggered by substituting
6710 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6711 ;; "cram -h", which breaks the output at 80 characters. This
6712 ;; causes the line showing the default shell to break into two
6713 ;; lines, but the test expects a single line...
6714 (("env\\['COLUMNS'\\] = '80'")
6715 "env['COLUMNS'] = '160'"))
6716 #t))
6717 (delete 'check)
6718 (add-after 'install 'check
6719 ;; The test phase uses the built library and executable.
6720 ;; It's easier to run it after install since the build
6721 ;; directory contains version-specific PATH.
6722 (lambda* (#:key inputs outputs #:allow-other-keys)
6723 (add-installed-pythonpath inputs outputs)
6724 (setenv "PATH" (string-append (getenv "PATH") ":"
6725 (assoc-ref outputs "out") "/bin"))
6726 (zero? (system* "make" "test")))))))
6727 (build-system python-build-system)
6728 (native-inputs
6729 `(("python-coverage" ,python-coverage)
6730 ("which" ,which)))
6731 (synopsis "Simple testing framework for command line applications")
6732 (description
6733 "Cram is a functional testing framework for command line applications.
6734 Cram tests look like snippets of interactive shell sessions. Cram runs each
6735 command and compares the command output in the test with the command’s actual
6736 output.")
6737 (license license:gpl2+)))
6738
6739 (define-public python2-cram
6740 (package-with-python2 python-cram))
6741
6742 (define-public python-terminado
6743 (package
6744 (name "python-terminado")
6745 (version "0.6")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (pypi-uri "terminado" version))
6750 (sha256
6751 (base32
6752 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6753 (build-system python-build-system)
6754 (propagated-inputs
6755 `(("python-tornado" ,python-tornado)
6756 ("python-ptyprocess" ,python-ptyprocess)))
6757 (native-inputs
6758 `(("python-nose" ,python-nose)))
6759 (arguments
6760 `(#:phases
6761 (modify-phases %standard-phases
6762 (replace 'check
6763 (lambda _
6764 (zero? (system* "nosetests")))))))
6765 (home-page "https://github.com/takluyver/terminado")
6766 (synopsis "Terminals served to term.js using Tornado websockets")
6767 (description "This package provides a Tornado websocket backend for the
6768 term.js Javascript terminal emulator library.")
6769 (license license:bsd-2)
6770 (properties `((python2-variant . ,(delay python2-terminado))))))
6771
6772 (define-public python2-terminado
6773 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6774 (package (inherit terminado)
6775 (propagated-inputs
6776 `(("python2-backport-ssl-match-hostname"
6777 ,python2-backport-ssl-match-hostname)
6778 ,@(package-propagated-inputs terminado))))))
6779
6780 (define-public python-straight-plugin
6781 (package
6782 (name "python-straight-plugin")
6783 (version "1.4.1")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri "straight.plugin" version))
6788 (sha256
6789 (base32
6790 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6791 (build-system python-build-system)
6792 (home-page "https://github.com/ironfroggy/straight.plugin")
6793 (synopsis "Simple namespaced plugin facility")
6794 (description "Straight Plugin provides a type of plugin you can create from
6795 almost any existing Python modules, and an easy way for outside developers to
6796 add functionality and customization to your projects with their own plugins.")
6797 (license license:expat)))
6798
6799 (define-public python2-straight-plugin
6800 (package-with-python2 python-straight-plugin))
6801
6802 (define-public python-fonttools
6803 (package
6804 (name "python-fonttools")
6805 (version "2.5")
6806 (source (origin
6807 (method url-fetch)
6808 (uri (string-append
6809 "https://pypi.python.org/packages/source/F/FontTools/"
6810 "fonttools-" version ".tar.gz"))
6811 (sha256
6812 (base32
6813 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6814 (build-system python-build-system)
6815 (arguments
6816 '(#:test-target "check"
6817 #:phases
6818 (modify-phases %standard-phases
6819 (add-after 'unpack 'patch-setuppy
6820 ;; Remove the undocumented "extra_path" argument, which adds an
6821 ;; intervening directories between site-packages and the package
6822 ;; directory.
6823 (lambda _
6824 (substitute* "setup.py"
6825 (("^[ \t]*extra_path *= *'FontTools',") ""))
6826 #t)))))
6827 (home-page "https://github.com/behdad/fonttools")
6828 (synopsis "Tools to manipulate font files")
6829 (description
6830 "FontTools/TTX is a library to manipulate font files from Python. It
6831 supports reading and writing of TrueType/OpenType fonts, reading and writing
6832 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6833 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6834 from an XML-based format.")
6835 (license (license:non-copyleft
6836 "file://LICENSE.txt"
6837 "See LICENSE.txt in the distribution."))))
6838
6839 (define-public python2-fonttools
6840 (package-with-python2 python-fonttools))
6841
6842 (define-public python-ly
6843 (package
6844 (name "python-ly")
6845 (version "0.9.4")
6846 (source
6847 (origin
6848 (method url-fetch)
6849 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6850 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6851 "/python-ly-" version ".tar.gz"))
6852 (sha256
6853 (base32
6854 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6855 (build-system python-build-system)
6856 (arguments
6857 ;; FIXME: Some tests need network access.
6858 '(#:tests? #f))
6859 (synopsis "Tool and library for manipulating LilyPond files")
6860 (description "This package provides a Python library to parse, manipulate
6861 or create documents in LilyPond format. A command line program ly is also
6862 provided that can be used to do various manipulations with LilyPond files.")
6863 (home-page "https://pypi.python.org/pypi/python-ly")
6864 (license license:gpl2+)))
6865
6866 (define-public python-appdirs
6867 (package
6868 (name "python-appdirs")
6869 (version "1.4.3")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (pypi-uri "appdirs" version))
6874 (sha256
6875 (base32
6876 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6877 (build-system python-build-system)
6878 (home-page "https://github.com/ActiveState/appdirs")
6879 (synopsis
6880 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6881 (description
6882 "This module provides a portable way of finding out where user data
6883 should be stored on various operating systems.")
6884 (license license:expat)))
6885
6886 (define-public python2-appdirs
6887 (package-with-python2 python-appdirs))
6888
6889 (define-public python-llfuse
6890 (package
6891 (name "python-llfuse")
6892 (version "1.2")
6893 (source (origin
6894 (method url-fetch)
6895 (uri (string-append
6896 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6897 "llfuse-" version ".tar.bz2"))
6898 (sha256
6899 (base32
6900 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
6901 (build-system python-build-system)
6902 (inputs
6903 `(("fuse" ,fuse)
6904 ("attr" ,attr)))
6905 (native-inputs
6906 `(("pkg-config" ,pkg-config)))
6907 (synopsis "Python bindings for FUSE")
6908 (description
6909 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6910 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6911 (license license:lgpl2.0+)
6912 (properties `((python2-variant . ,(delay python2-llfuse))))))
6913
6914 (define-public python2-llfuse
6915 (package (inherit (package-with-python2
6916 (strip-python2-variant python-llfuse)))
6917 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6918
6919 ;; For attic-0.16
6920 (define-public python-llfuse-0.41
6921 (package (inherit python-llfuse)
6922 (version "0.41.1")
6923 (source (origin
6924 (method url-fetch)
6925 (uri (string-append
6926 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6927 "llfuse-" version ".tar.bz2"))
6928 (sha256
6929 (base32
6930 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6931 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6932 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6933 (license (list license:expat license:lgpl2.0+))))
6934
6935 (define-public python-msgpack
6936 (package
6937 (name "python-msgpack")
6938 (version "0.4.8")
6939 (source (origin
6940 (method url-fetch)
6941 (uri (pypi-uri "msgpack-python" version))
6942 (sha256
6943 (base32
6944 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6945 (build-system python-build-system)
6946 (synopsis "MessagePack (de)serializer")
6947 (description "MessagePack is a fast, compact binary serialization format,
6948 suitable for similar data to JSON. This package provides CPython bindings for
6949 reading and writing MessagePack data.")
6950 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6951 (license license:asl2.0)))
6952
6953 (define-public python2-msgpack
6954 (package-with-python2 python-msgpack))
6955
6956 (define-public python-netaddr
6957 (package
6958 (name "python-netaddr")
6959 (version "0.7.18")
6960 (source
6961 (origin
6962 (method url-fetch)
6963 (uri (string-append
6964 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6965 version
6966 ".tar.gz"))
6967 (sha256
6968 (base32
6969 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6970 (build-system python-build-system)
6971 (arguments `(#:tests? #f)) ;; No tests.
6972 (home-page "https://github.com/drkjam/netaddr/")
6973 (synopsis "Pythonic manipulation of network addresses")
6974 (description
6975 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6976 and MAC network addresses.")
6977 (license license:bsd-3)))
6978
6979 (define-public python2-netaddr
6980 (package-with-python2 python-netaddr))
6981
6982 (define-public python-wrapt
6983 (package
6984 (name "python-wrapt")
6985 (version "1.10.8")
6986 (source
6987 (origin
6988 (method url-fetch)
6989 (uri (pypi-uri "wrapt" version))
6990 (sha256
6991 (base32
6992 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
6993 (build-system python-build-system)
6994 (arguments
6995 ;; Tests are not included in the tarball, they are only available in the
6996 ;; git repository.
6997 `(#:tests? #f))
6998 (home-page "https://github.com/GrahamDumpleton/wrapt")
6999 (synopsis "Module for decorators, wrappers and monkey patching")
7000 (description
7001 "The aim of the wrapt module is to provide a transparent object proxy for
7002 Python, which can be used as the basis for the construction of function
7003 wrappers and decorator functions.")
7004 (license license:bsd-2)))
7005
7006 (define-public python2-wrapt
7007 (package-with-python2 python-wrapt))
7008
7009 (define-public python-iso8601
7010 (package
7011 (name "python-iso8601")
7012 (version "0.1.11")
7013 (source
7014 (origin
7015 (method url-fetch)
7016 (uri (pypi-uri "iso8601" version))
7017 (sha256
7018 (base32
7019 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7020 (build-system python-build-system)
7021 (native-inputs
7022 `(("python-pytest" ,python-pytest)))
7023 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7024 (synopsis "Module to parse ISO 8601 dates")
7025 (description
7026 "This module parses the most common forms of ISO 8601 date strings (e.g.
7027 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7028 (license license:expat)))
7029
7030 (define-public python2-iso8601
7031 (package-with-python2 python-iso8601))
7032
7033 (define-public python-monotonic
7034 (package
7035 (name "python-monotonic")
7036 (version "0.3")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (string-append
7041 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7042 version
7043 ".tar.gz"))
7044 (sha256
7045 (base32
7046 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7047 (build-system python-build-system)
7048 (home-page "https://github.com/atdt/monotonic")
7049 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7050 (description
7051 "This module provides a monotonic() function which returns the value (in
7052 fractional seconds) of a clock which never goes backwards.")
7053 (license license:asl2.0)))
7054
7055 (define-public python2-monotonic
7056 (package-with-python2 python-monotonic))
7057
7058 (define-public python-webob
7059 (package
7060 (name "python-webob")
7061 (version "1.5.1")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (pypi-uri "WebOb" version))
7066 (sha256
7067 (base32
7068 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7069 (build-system python-build-system)
7070 (native-inputs
7071 `(("python-nose" ,python-nose)))
7072 (home-page "http://webob.org/")
7073 (synopsis "WSGI request and response object")
7074 (description
7075 "WebOb provides wrappers around the WSGI request environment, and an
7076 object to help create WSGI responses.")
7077 (license license:expat)))
7078
7079 (define-public python2-webob
7080 (package-with-python2 python-webob))
7081
7082 (define-public python-xlrd
7083 (package
7084 (name "python-xlrd")
7085 (version "1.0.0")
7086 (source (origin
7087 (method url-fetch)
7088 (uri (pypi-uri "xlrd" version))
7089 (sha256
7090 (base32
7091 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7092 (build-system python-build-system)
7093 (arguments
7094 `(#:phases
7095 (modify-phases %standard-phases
7096 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7097 ;; run tests instead for now.
7098 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7099 (native-inputs `(("python-nose" ,python-nose)))
7100 (home-page "http://www.python-excel.org/")
7101 (synopsis "Library for extracting data from Excel files")
7102 (description "This packages provides a library to extract data from
7103 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7104 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7105 Unicode-aware. It is not intended as an end-user tool.")
7106 (license license:bsd-3)))
7107
7108 (define-public python2-xlrd
7109 (package-with-python2 python-xlrd))
7110
7111 (define-public python-prettytable
7112 (package
7113 (name "python-prettytable")
7114 (version "0.7.2")
7115 (source
7116 (origin
7117 (method url-fetch)
7118 (uri (string-append
7119 "https://pypi.python.org/packages/source/P/PrettyTable/"
7120 "prettytable-" version ".tar.bz2"))
7121 (sha256
7122 (base32
7123 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7124 (build-system python-build-system)
7125 (home-page "http://code.google.com/p/prettytable/")
7126 (synopsis "Display tabular data in an ASCII table format")
7127 (description
7128 "A library designed to represent tabular data in visually appealing ASCII
7129 tables. PrettyTable allows for selection of which columns are to be printed,
7130 independent alignment of columns (left or right justified or centred) and
7131 printing of sub-tables by specifying a row range.")
7132 (license license:bsd-3)))
7133
7134 (define-public python2-prettytable
7135 (package-with-python2 python-prettytable))
7136
7137 (define-public python-tables
7138 (package
7139 (name "python-tables")
7140 (version "3.2.2")
7141 (source
7142 (origin
7143 (method url-fetch)
7144 (uri (pypi-uri "tables" version))
7145 (sha256
7146 (base32
7147 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7148 (modules '((guix build utils)))
7149 (snippet
7150 '(begin
7151 ;; Remove pre-compiled .pyc files from source.
7152 (for-each delete-file-recursively
7153 (find-files "." "__pycache__" #:directories? #t))
7154 (for-each delete-file (find-files "." "\\.pyc$"))
7155 #t))))
7156 (build-system python-build-system)
7157 (arguments
7158 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7159 ;; or "check", so we must override the build and check phases.
7160 #:phases
7161 (modify-phases %standard-phases
7162 (add-after 'unpack 'use-gcc
7163 (lambda _
7164 (substitute* "setup.py"
7165 (("compiler = new_compiler\\(\\)" line)
7166 (string-append line
7167 "\ncompiler.set_executables(compiler='gcc',"
7168 "compiler_so='gcc',"
7169 "linker_exe='gcc',"
7170 "linker_so='gcc -shared')")))
7171 #t))
7172 (replace 'build
7173 (lambda* (#:key inputs #:allow-other-keys)
7174 (zero? (system* "python" "setup.py" "build"
7175 (string-append "--hdf5="
7176 (assoc-ref inputs "hdf5"))))))
7177 (replace 'check
7178 (lambda* (#:key inputs #:allow-other-keys)
7179 (zero? (system* "python" "setup.py" "check"
7180 (string-append "--hdf5="
7181 (assoc-ref inputs "hdf5")))))))))
7182 (propagated-inputs
7183 `(("python-numexpr" ,python-numexpr)
7184 ("python-numpy" ,python-numpy)))
7185 (native-inputs
7186 `(("python-cython" ,python-cython)
7187 ("pkg-config" ,pkg-config)))
7188 (inputs
7189 `(("hdf5" ,hdf5)
7190 ("bzip2" ,bzip2)
7191 ("zlib" ,zlib)))
7192 (home-page "http://www.pytables.org/")
7193 (synopsis "Hierarchical datasets for Python")
7194 (description "PyTables is a package for managing hierarchical datasets and
7195 designed to efficiently cope with extremely large amounts of data.")
7196 (license license:bsd-3)))
7197
7198 (define-public python2-tables
7199 (package-with-python2 python-tables))
7200
7201 (define-public python-pyasn1
7202 (package
7203 (name "python-pyasn1")
7204 (version "0.2.3")
7205 (source
7206 (origin
7207 (method url-fetch)
7208 (uri (pypi-uri "pyasn1" version))
7209 (sha256
7210 (base32
7211 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7212 (build-system python-build-system)
7213 (home-page "http://pyasn1.sourceforge.net/")
7214 (synopsis "ASN.1 types and codecs")
7215 (description
7216 "This is an implementation of ASN.1 types and codecs in Python. It is
7217 suitable for a wide range of protocols based on the ASN.1 specification.")
7218 (license license:bsd-2)))
7219
7220 (define-public python2-pyasn1
7221 (package-with-python2 python-pyasn1))
7222
7223 (define-public python-pyasn1-modules
7224 (package
7225 (name "python-pyasn1-modules")
7226 (version "0.0.8")
7227 (source
7228 (origin
7229 (method url-fetch)
7230 (uri (pypi-uri "pyasn1-modules" version))
7231 (sha256
7232 (base32
7233 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7234 (build-system python-build-system)
7235 (propagated-inputs
7236 `(("python-pyasn1" ,python-pyasn1)))
7237 (home-page "https://sourceforge.net/projects/pyasn1/")
7238 (synopsis "ASN.1 codec implementations")
7239 (description
7240 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7241 implementations of ASN.1-based codecs and protocols.")
7242 (license license:bsd-3)))
7243
7244 (define-public python2-pyasn1-modules
7245 (package-with-python2 python-pyasn1-modules))
7246
7247 (define-public python-ipaddress
7248 (package
7249 (name "python-ipaddress")
7250 (version "1.0.18")
7251 (source (origin
7252 (method url-fetch)
7253 (uri (pypi-uri "ipaddress" version))
7254 (sha256
7255 (base32
7256 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7257 (build-system python-build-system)
7258 (home-page "https://github.com/phihag/ipaddress")
7259 (synopsis "IP address manipulation library")
7260 (description
7261 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7262 in Python. This library is used to create, poke at, and manipulate IPv4 and
7263 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7264 module to older versions of Python.")
7265 (license license:psfl)))
7266
7267 (define-public python2-ipaddress
7268 (package-with-python2 python-ipaddress))
7269
7270 (define-public python2-ipaddr
7271 (package
7272 (name "python2-ipaddr")
7273 (version "2.1.11")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (pypi-uri "ipaddr" version))
7278 (sha256
7279 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7280 (build-system python-build-system)
7281 (arguments
7282 `(#:python ,python-2 ;version 2 only
7283 #:phases
7284 (modify-phases %standard-phases
7285 (replace 'check
7286 (lambda* _
7287 (zero? (system* "python" "ipaddr_test.py")))))))
7288 (home-page "https://github.com/google/ipaddr-py")
7289 (synopsis "IP address manipulation library")
7290 (description
7291 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7292 IPv6 addresses and networks.
7293
7294 For new implementations you may prefer to use the standard module
7295 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7296 versions of Python.")
7297 (license license:asl2.0)))
7298
7299 (define-public python-idna
7300 (package
7301 (name "python-idna")
7302 (version "2.5")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "idna" version))
7307 (sha256
7308 (base32
7309 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7310 (build-system python-build-system)
7311 (home-page "https://github.com/kjd/idna")
7312 (synopsis "Internationalized domain names in applications")
7313 (description
7314 "This is a library to support the Internationalised Domain Names in
7315 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7316 protocol is often referred to as “IDNA2008” and can produce different results
7317 from the earlier standard from 2003. The library is also intended to act as a
7318 suitable drop-in replacement for the “encodings.idna” module that comes with
7319 the Python standard library but currently only supports the older 2003
7320 specification.")
7321 (license license:bsd-4)))
7322
7323 (define-public python2-idna
7324 (package-with-python2 python-idna))
7325
7326 (define-public python-pretend
7327 (package
7328 (name "python-pretend")
7329 (version "1.0.8")
7330 (source
7331 (origin
7332 (method url-fetch)
7333 (uri (string-append "https://pypi.python.org/packages/source/p/"
7334 "pretend/pretend-" version ".tar.gz"))
7335 (sha256
7336 (base32
7337 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7338 (build-system python-build-system)
7339 (home-page "https://github.com/alex/pretend")
7340 (synopsis "Library for stubbing in Python")
7341 (description
7342 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7343 technique for writing tests. You may hear the term mixed up with mocks,
7344 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7345 responses, rather than doing any computation.")
7346 (license license:bsd-3)))
7347
7348 (define-public python2-pretend
7349 (package-with-python2 python-pretend))
7350
7351 (define-public python-cryptography-vectors
7352 (package
7353 (name "python-cryptography-vectors")
7354 (version "1.8.2")
7355 (source
7356 (origin
7357 (method url-fetch)
7358 (uri (pypi-uri "cryptography_vectors" version))
7359 (sha256
7360 (base32
7361 "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0"))))
7362 (build-system python-build-system)
7363 (home-page "https://github.com/pyca/cryptography")
7364 (synopsis "Test vectors for the cryptography package")
7365 (description
7366 "This package contains test vectors for the cryptography package.")
7367 ;; Distributed under either BSD-3 or ASL2.0
7368 (license (list license:bsd-3 license:asl2.0))))
7369
7370 (define-public python2-cryptography-vectors
7371 (package-with-python2 python-cryptography-vectors))
7372
7373 (define-public python-cryptography
7374 (package
7375 (name "python-cryptography")
7376 (version "1.8.2")
7377 (source
7378 (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "cryptography" version))
7381 (sha256
7382 (base32
7383 "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f"))))
7384 (build-system python-build-system)
7385 (inputs
7386 `(("openssl" ,openssl)))
7387 (propagated-inputs
7388 `(("python-asn1crypto" ,python-asn1crypto)
7389 ("python-cffi" ,python-cffi)
7390 ("python-six" ,python-six)
7391 ("python-idna" ,python-idna)
7392 ;; Packaging is used to check the version of python-cffi in
7393 ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be
7394 ;; able to remove this dependency in the next release of cryptography:
7395 ;; python-cryptography:
7396 ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1
7397 ("python-packaging" ,python-packaging)
7398 ("python-iso8601" ,python-iso8601)))
7399 (native-inputs
7400 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7401 ("python-hypothesis" ,python-hypothesis)
7402 ("python-pretend" ,python-pretend)
7403 ("python-pytz" ,python-pytz)
7404 ("python-pytest" ,python-pytest-3.0)))
7405 (home-page "https://github.com/pyca/cryptography")
7406 (synopsis "Cryptographic recipes and primitives for Python")
7407 (description
7408 "cryptography is a package which provides cryptographic recipes and
7409 primitives to Python developers. It aims to be the “cryptographic standard
7410 library” for Python. The package includes both high level recipes, and low
7411 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7412 message digests and key derivation functions.")
7413 ;; Distributed under either BSD-3 or ASL2.0
7414 (license (list license:bsd-3 license:asl2.0))
7415 (properties `((python2-variant . ,(delay python2-cryptography))))))
7416
7417 (define-public python2-cryptography
7418 (let ((crypto (package-with-python2
7419 (strip-python2-variant python-cryptography))))
7420 (package (inherit crypto)
7421 (propagated-inputs
7422 `(("python2-ipaddress" ,python2-ipaddress)
7423 ("python2-backport-ssl-match-hostname"
7424 ,python2-backport-ssl-match-hostname)
7425 ("python2-enum34" ,python2-enum34)
7426 ,@(package-propagated-inputs crypto))))))
7427
7428 (define-public python-pyopenssl
7429 (package
7430 (name "python-pyopenssl")
7431 (version "17.0.0")
7432 (source
7433 (origin
7434 (method url-fetch)
7435 (uri (pypi-uri "pyOpenSSL" version))
7436 (sha256
7437 (base32
7438 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7439 (patches
7440 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7441 (build-system python-build-system)
7442 (arguments
7443 '(#:phases
7444 (modify-phases %standard-phases
7445 (delete 'check)
7446 (add-after 'install 'check
7447 (lambda* (#:key inputs outputs #:allow-other-keys)
7448 (add-installed-pythonpath inputs outputs)
7449 (zero? (system* "py.test" "-v")))))))
7450 (propagated-inputs
7451 `(("python-cryptography" ,python-cryptography)
7452 ("python-six" ,python-six)))
7453 (inputs
7454 `(("openssl" ,openssl)))
7455 (native-inputs
7456 `(("python-pytest" ,python-pytest-3.0)))
7457 (home-page "https://github.com/pyca/pyopenssl")
7458 (synopsis "Python wrapper module around the OpenSSL library")
7459 (description
7460 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7461 library.")
7462 (license license:asl2.0)))
7463
7464 (define-public python2-pyopenssl
7465 (package-with-python2 python-pyopenssl))
7466
7467 (define-public python-pip
7468 (package
7469 (name "python-pip")
7470 (version "9.0.1")
7471 (source
7472 (origin
7473 (method url-fetch)
7474 (uri (pypi-uri "pip" version))
7475 (sha256
7476 (base32
7477 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7478 (build-system python-build-system)
7479 (arguments
7480 '(#:tests? #f)) ; there are no tests in the pypi archive.
7481 (home-page "https://pip.pypa.io/")
7482 (synopsis "Package manager for Python software")
7483 (description
7484 "Pip is a package manager for Python software, that finds packages on the
7485 Python Package Index (PyPI).")
7486 (license license:expat)))
7487
7488 (define-public python2-pip
7489 (package-with-python2 python-pip))
7490
7491 (define-public python-tlsh
7492 (package
7493 (name "python-tlsh")
7494 (version "3.4.4")
7495 (home-page "https://github.com/trendmicro/tlsh")
7496 (source (origin
7497 (method url-fetch)
7498 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7499 version ".tar.gz"))
7500 (sha256
7501 (base32
7502 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7503 (file-name (string-append name "-" version ".tar.gz"))))
7504 (build-system cmake-build-system)
7505 (arguments
7506 '(#:out-of-source? #f
7507 #:phases (modify-phases %standard-phases
7508 (replace
7509 'install
7510 (lambda* (#:key outputs #:allow-other-keys)
7511 ;; Build and install the Python bindings. The underlying
7512 ;; C++ library is apparently not meant to be installed.
7513 (let ((out (assoc-ref outputs "out")))
7514 (with-directory-excursion "py_ext"
7515 (and (system* "python" "setup.py" "build")
7516 (system* "python" "setup.py" "install"
7517 (string-append "--prefix=" out))))))))))
7518 (inputs `(("python" ,python-wrapper))) ;for the bindings
7519 (synopsis "Fuzzy matching library for Python")
7520 (description
7521 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7522 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7523 value which can be used for similarity comparisons. Similar objects have
7524 similar hash values, which allows for the detection of similar objects by
7525 comparing their hash values. The byte stream should have a sufficient amount
7526 of complexity; for example, a byte stream of identical bytes will not generate
7527 a hash value.")
7528 (license license:asl2.0)))
7529
7530 (define-public python2-tlsh
7531 (package
7532 (inherit python-tlsh)
7533 (name "python2-tlsh")
7534 (inputs `(("python" ,python-2)))))
7535
7536 (define-public python-termcolor
7537 (package
7538 (name "python-termcolor")
7539 (version "1.1.0")
7540 (source
7541 (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "termcolor" version))
7544 (sha256
7545 (base32
7546 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7547 (build-system python-build-system)
7548 (arguments
7549 ;; There are no tests.
7550 `(#:tests? #f))
7551 (home-page "http://pypi.python.org/pypi/termcolor")
7552 (synopsis "ANSII Color formatting for terminal output")
7553 (description
7554 "This package provides ANSII Color formatting for output in terminals.")
7555 (license license:expat)))
7556
7557 (define-public python2-termcolor
7558 (package-with-python2 python-termcolor))
7559
7560 (define-public python-libarchive-c
7561 (package
7562 (name "python-libarchive-c")
7563 (version "2.2")
7564 (source (origin
7565 (method url-fetch)
7566 (uri (pypi-uri "libarchive-c" version))
7567 (sha256
7568 (base32
7569 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7570 (build-system python-build-system)
7571 (arguments
7572 '(#:phases (modify-phases %standard-phases
7573 (add-before
7574 'build 'reference-libarchive
7575 (lambda* (#:key inputs #:allow-other-keys)
7576 ;; Retain the absolute file name of libarchive.so.
7577 (let ((libarchive (assoc-ref inputs "libarchive")))
7578 (substitute* "libarchive/ffi.py"
7579 (("find_library\\('archive'\\)")
7580 (string-append "'" libarchive
7581 "/lib/libarchive.so'")))))))))
7582 (inputs
7583 `(("libarchive" ,libarchive)))
7584 (home-page "https://github.com/Changaco/python-libarchive-c")
7585 (synopsis "Python interface to libarchive")
7586 (description
7587 "This package provides Python bindings to libarchive, a C library to
7588 access possibly compressed archives in many different formats. It uses
7589 Python's @code{ctypes} foreign function interface (FFI).")
7590 (license license:lgpl2.0+)))
7591
7592 (define-public python2-libarchive-c
7593 (package-with-python2 python-libarchive-c))
7594
7595 (define-public python-file
7596 (package
7597 (inherit file)
7598 (name "python-file")
7599 (source (origin
7600 (inherit (package-source file))
7601 ;; This patch should not be applied to python2-file.
7602 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7603 (build-system python-build-system)
7604 (arguments
7605 '(#:tests? #f ;no tests
7606 #:configure-flags '("--single-version-externally-managed" "--root=/")
7607 #:phases (modify-phases %standard-phases
7608 (add-before 'build 'change-directory
7609 (lambda _
7610 (chdir "python")
7611 #t))
7612 (add-before 'build 'set-library-file-name
7613 (lambda* (#:key inputs #:allow-other-keys)
7614 (let ((file (assoc-ref inputs "file")))
7615 (substitute* "magic.py"
7616 (("find_library\\('magic'\\)")
7617 (string-append "'" file "/lib/libmagic.so'")))
7618 #t))))))
7619 (inputs `(("file" ,file)))
7620 (self-native-input? #f)
7621 (synopsis "Python bindings to the libmagic file type guesser. Note that
7622 this module and the python-magic module both provide a \"magic.py\" file;
7623 these two modules, which are different and were developed separately, both
7624 serve the same purpose: provide Python bindings for libmagic.")))
7625
7626 (define-public python2-file
7627 (package-with-python2 python-file))
7628
7629 (define-public python-debian
7630 (package
7631 (name "python-debian")
7632 (version "0.1.28")
7633 (source
7634 (origin
7635 (method url-fetch)
7636 (uri (pypi-uri name version))
7637 (sha256
7638 (base32
7639 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7640 (build-system python-build-system)
7641 (propagated-inputs
7642 `(("python-six" ,python-six)))
7643 (home-page "http://packages.debian.org/sid/python-debian")
7644 (synopsis "Debian package related modules")
7645 (description
7646 ;; XXX: Use @enumerate instead of @itemize to work around
7647 ;; <http://bugs.gnu.org/21772>.
7648 "This package provides Python modules that abstract many formats of
7649 Debian-related files, such as:
7650
7651 @enumerate
7652 @item Debtags information;
7653 @item @file{debian/changelog} files;
7654 @item packages files, pdiffs;
7655 @item control files of single or multiple RFC822-style paragraphs---e.g.
7656 @file{debian/control}, @file{.changes}, @file{.dsc};
7657 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7658 contained files and meta-information.
7659 @end enumerate\n")
7660
7661 ;; Modules are either GPLv2+ or GPLv3+.
7662 (license license:gpl3+)))
7663
7664 (define-public python2-debian
7665 (package-with-python2 python-debian))
7666
7667 (define-public python-nbformat
7668 (package
7669 (name "python-nbformat")
7670 (version "4.1.0")
7671 (source
7672 (origin
7673 (method url-fetch)
7674 (uri (pypi-uri "nbformat" version))
7675 (sha256
7676 (base32
7677 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7678 (build-system python-build-system)
7679 (arguments `(#:tests? #f)) ; no test target
7680 (propagated-inputs
7681 `(("python-ipython-genutils" ,python-ipython-genutils)
7682 ("python-jsonschema" ,python-jsonschema)
7683 ("python-jupyter-core" ,python-jupyter-core)
7684 ("python-traitlets" ,python-traitlets)))
7685 (home-page "http://jupyter.org")
7686 (synopsis "Jupyter Notebook format")
7687 (description "This package provides the reference implementation of the
7688 Jupyter Notebook format and Python APIs for working with notebooks.")
7689 (license license:bsd-3)))
7690
7691 (define-public python2-nbformat
7692 (package-with-python2 python-nbformat))
7693
7694 (define-public python-bleach
7695 (package
7696 (name "python-bleach")
7697 (version "1.4.3")
7698 (source
7699 (origin
7700 (method url-fetch)
7701 (uri (pypi-uri "bleach" version))
7702 (sha256
7703 (base32
7704 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7705 (build-system python-build-system)
7706 (propagated-inputs
7707 `(("python-html5lib" ,python-html5lib-0.9)
7708 ("python-six" ,python-six)))
7709 (native-inputs
7710 `(("python-nose" ,python-nose)))
7711 (home-page "https://github.com/jsocol/bleach")
7712 (synopsis "Whitelist-based HTML-sanitizing tool")
7713 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7714 (license license:asl2.0)))
7715
7716 (define-public python2-bleach
7717 (package-with-python2 python-bleach))
7718
7719 (define-public python-entrypoints
7720 (package
7721 (name "python-entrypoints")
7722 (version "0.2.2")
7723 (source
7724 (origin
7725 (method url-fetch)
7726 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7727 version ".tar.gz"))
7728 (file-name (string-append name "-" version ".tar.gz"))
7729 (sha256
7730 (base32
7731 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7732 (build-system python-build-system)
7733 ;; The package does not come with a setup.py file, so we have to generate
7734 ;; one ourselves.
7735 (arguments
7736 `(#:tests? #f
7737 #:phases
7738 (modify-phases %standard-phases
7739 (add-after 'unpack 'create-setup.py
7740 (lambda _
7741 (call-with-output-file "setup.py"
7742 (lambda (port)
7743 (format port "\
7744 from setuptools import setup
7745 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7746 " ,version))))))))
7747 (home-page "https://github.com/takluyver/entrypoints")
7748 (synopsis "Discover and load entry points from installed Python packages")
7749 (description "Entry points are a way for Python packages to advertise
7750 objects with some common interface. The most common examples are
7751 @code{console_scripts} entry points, which define shell commands by
7752 identifying a Python function to run. The @code{entrypoints} module contains
7753 functions to find and load entry points.")
7754 (license license:expat)))
7755
7756 (define-public python2-entrypoints
7757 (package-with-python2 python-entrypoints))
7758
7759 (define-public python-nbconvert
7760 (package
7761 (name "python-nbconvert")
7762 (version "5.0.0b1")
7763 (source
7764 (origin
7765 (method url-fetch)
7766 (uri (pypi-uri "nbconvert" version))
7767 (sha256
7768 (base32
7769 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7770 (build-system python-build-system)
7771 (arguments
7772 `(;; The "bdist_egg" target is disabled by default, causing the installation
7773 ;; to fail.
7774 #:configure-flags (list "bdist_egg")
7775 ;; FIXME: 5 failures, 40 errors.
7776 #:tests? #f))
7777 ;; #:phases
7778 ;; (modify-phases %standard-phases
7779 ;; (replace 'check
7780 ;; (lambda _
7781 ;; (zero? (system* "py.test" "-v")))))
7782 (native-inputs
7783 `(("python-pytest" ,python-pytest)))
7784 (propagated-inputs
7785 `(("python-bleach" ,python-bleach)
7786 ("python-entrypoints" ,python-entrypoints)
7787 ("python-jinja2" ,python-jinja2)
7788 ("python-jupyter-core" ,python-jupyter-core)
7789 ("python-mistune" ,python-mistune)
7790 ("python-nbformat" ,python-nbformat)
7791 ("python-pygments" ,python-pygments)
7792 ("python-traitlets" ,python-traitlets)))
7793 (home-page "http://jupyter.org")
7794 (synopsis "Converting Jupyter Notebooks")
7795 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7796 notebooks to various other formats via Jinja templates. It allows you to
7797 convert an @code{.ipynb} notebook file into various static formats including:
7798
7799 @enumerate
7800 @item HTML
7801 @item LaTeX
7802 @item PDF
7803 @item Reveal JS
7804 @item Markdown (md)
7805 @item ReStructured Text (rst)
7806 @item executable script
7807 @end enumerate\n")
7808 (license license:bsd-3)))
7809
7810 (define-public python2-nbconvert
7811 (package-with-python2 python-nbconvert))
7812
7813 (define-public python-notebook
7814 (package
7815 (name "python-notebook")
7816 (version "4.2.3")
7817 (source (origin
7818 (method url-fetch)
7819 (uri (pypi-uri "notebook" version))
7820 (sha256
7821 (base32
7822 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7823 (build-system python-build-system)
7824 (arguments
7825 `(#:phases
7826 (modify-phases %standard-phases
7827 (replace 'check
7828 (lambda _
7829 ;; HOME must be set for tests
7830 (setenv "HOME" "/tmp")
7831 (zero? (system* "nosetests")))))))
7832 (propagated-inputs
7833 `(("python-jupyter-core" ,python-jupyter-core)
7834 ("python-nbformat" ,python-nbformat)
7835 ("python-nbconvert" ,python-nbconvert)
7836 ("python-ipython" ,python-ipython)))
7837 (native-inputs
7838 `(("python-nose" ,python-nose)
7839 ("python-sphinx" ,python-sphinx)
7840 ("python-requests" ,python-requests)))
7841 (home-page "http://jupyter.org/")
7842 (synopsis "Web-based notebook environment for interactive computing")
7843 (description
7844 "The Jupyter HTML notebook is a web-based notebook environment for
7845 interactive computing.")
7846 (properties `((python2-variant . ,(delay python2-notebook))))
7847 (license license:bsd-3)))
7848
7849 (define-public python2-notebook
7850 (let ((base (package-with-python2
7851 (strip-python2-variant python-notebook))))
7852 (package (inherit base)
7853 (native-inputs
7854 `(("python2-mock" ,python2-mock)
7855 ,@(package-native-inputs base)))
7856 (arguments
7857 (substitute-keyword-arguments (package-arguments base)
7858 ((#:phases phases)
7859 `(modify-phases ,phases
7860 (add-before 'check 'disable-test-case
7861 ;; The test requires network access to localhost. Curiously it
7862 ;; fails with Python 2 only. Simply make the test-case return
7863 ;; immediately.
7864 (lambda _
7865 (substitute*
7866 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7867 (("formats = self.nbconvert_api") "return #")))))))))))
7868
7869 (define-public python-widgetsnbextension
7870 (package
7871 (name "python-widgetsnbextension")
7872 (version "1.2.6")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "widgetsnbextension" version))
7877 (sha256
7878 (base32
7879 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7880 (build-system python-build-system)
7881 (propagated-inputs
7882 `(("python-notebook" ,python-notebook)))
7883 (native-inputs
7884 `(("python-certifi" ,python-certifi)
7885 ("python-nose" ,python-nose)))
7886 (home-page "http://ipython.org")
7887 (synopsis "IPython HTML widgets for Jupyter")
7888 (description "This package provides interactive HTML widgets for Jupyter
7889 notebooks.")
7890 (license license:bsd-3)))
7891
7892 (define-public python2-widgetsnbextension
7893 (package-with-python2 python-widgetsnbextension))
7894
7895 (define-public python-ipywidgets
7896 (package
7897 (name "python-ipywidgets")
7898 (version "5.2.2")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (pypi-uri "ipywidgets" version))
7903 (sha256
7904 (base32
7905 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7906 (build-system python-build-system)
7907 ;; FIXME: it's not clear how to run the tests.
7908 (arguments `(#:tests? #f))
7909 (propagated-inputs
7910 `(("python-ipykernel" ,python-ipykernel)
7911 ("python-ipython" ,python-ipython)
7912 ("python-traitlets" ,python-traitlets)
7913 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7914 (home-page "http://ipython.org")
7915 (synopsis "IPython HTML widgets for Jupyter")
7916 (description "Ipywidgets are interactive HTML widgets for Jupyter
7917 notebooks and the IPython kernel. Notebooks come alive when interactive
7918 widgets are used. Users gain control of their data and can visualize changes
7919 in the data.")
7920 (license license:bsd-3)))
7921
7922 (define-public python2-ipywidgets
7923 (package-with-python2 python-ipywidgets))
7924
7925 (define-public python-jupyter-console
7926 (package
7927 (name "python-jupyter-console")
7928 (version "5.0.0")
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "jupyter_console" version))
7933 (sha256
7934 (base32
7935 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7936 (build-system python-build-system)
7937 ;; FIXME: it's not clear how to run the tests.
7938 (arguments `(#:tests? #f))
7939 (propagated-inputs
7940 `(("python-ipykernel" ,python-ipykernel)
7941 ("python-ipython" ,python-ipython)
7942 ("python-jupyter-client" ,python-jupyter-client)
7943 ("python-prompt-toolkit" ,python-prompt-toolkit)
7944 ("python-pygments" ,python-pygments)))
7945 (home-page "https://jupyter.org")
7946 (synopsis "Jupyter terminal console")
7947 (description "This package provides a terminal-based console frontend for
7948 Jupyter kernels. It also allows for console-based interaction with non-Python
7949 Jupyter kernels such as IJulia and IRKernel.")
7950 (license license:bsd-3)))
7951
7952 (define-public python2-jupyter-console
7953 (package-with-python2 python-jupyter-console))
7954
7955 (define-public jupyter
7956 (package
7957 (name "jupyter")
7958 (version "1.0.0")
7959 (source
7960 (origin
7961 (method url-fetch)
7962 (uri (pypi-uri "jupyter" version))
7963 (sha256
7964 (base32
7965 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7966 (build-system python-build-system)
7967 ;; FIXME: it's not clear how to run the tests.
7968 (arguments `(#:tests? #f))
7969 (propagated-inputs
7970 `(("python-ipykernel" ,python-ipykernel)
7971 ("python-ipywidgets" ,python-ipywidgets)
7972 ("python-jupyter-console" ,python-jupyter-console)
7973 ("python-nbconvert" ,python-nbconvert)
7974 ("python-notebook" ,python-notebook)))
7975 (home-page "http://jupyter.org")
7976 (synopsis "Web application for interactive documents")
7977 (description
7978 "The Jupyter Notebook is a web application that allows you to create and
7979 share documents that contain live code, equations, visualizations and
7980 explanatory text. Uses include: data cleaning and transformation, numerical
7981 simulation, statistical modeling, machine learning and much more.")
7982 (license license:bsd-3)))
7983
7984 (define-public python-chardet
7985 (package
7986 (name "python-chardet")
7987 (version "2.3.0")
7988 (source
7989 (origin
7990 (method url-fetch)
7991 (uri (string-append
7992 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7993 version
7994 ".tar.gz"))
7995 (sha256
7996 (base32
7997 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7998 (build-system python-build-system)
7999 (home-page "https://github.com/chardet/chardet")
8000 (synopsis "Universal encoding detector for Python 2 and 3")
8001 (description
8002 "This package provides @code{chardet}, a Python module that can
8003 automatically detect a wide range of file encodings.")
8004 (license license:lgpl2.1+)))
8005
8006 (define-public python2-chardet
8007 (package-with-python2 python-chardet))
8008
8009 (define-public python-docopt
8010 (package
8011 (name "python-docopt")
8012 (version "0.6.2")
8013 (source
8014 (origin
8015 (method url-fetch)
8016 ;; The release on PyPI does not include tests.
8017 (uri (string-append
8018 "https://github.com/docopt/docopt/archive/"
8019 version ".tar.gz"))
8020 (file-name (string-append name "-" version ".tar.gz"))
8021 (sha256
8022 (base32
8023 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8024 (build-system python-build-system)
8025 (native-inputs
8026 `(("python-pytest" ,python-pytest)))
8027 (arguments
8028 `(#:phases (alist-replace
8029 'check
8030 (lambda _ (zero? (system* "py.test")))
8031 %standard-phases)))
8032 (home-page "http://docopt.org")
8033 (synopsis "Command-line interface description language for Python")
8034 (description "This library allows the user to define a command-line
8035 interface from a program's help message rather than specifying it
8036 programatically with command-line parsers like @code{getopt} and
8037 @code{argparse}.")
8038 (license license:expat)))
8039
8040 (define-public python2-docopt
8041 (package-with-python2 python-docopt))
8042
8043 (define-public python-zope-event
8044 (package
8045 (name "python-zope-event")
8046 (version "4.1.0")
8047 (source
8048 (origin
8049 (method url-fetch)
8050 (uri (string-append "https://pypi.python.org/packages/source/z"
8051 "/zope.event/zope.event-" version ".tar.gz"))
8052 (sha256
8053 (base32
8054 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8055 (build-system python-build-system)
8056 (home-page "http://pypi.python.org/pypi/zope.event")
8057 (synopsis "Event publishing system for Python")
8058 (description "Zope.event provides an event publishing API, intended for
8059 use by applications which are unaware of any subscribers to their events. It
8060 is a simple event-dispatching system on which more sophisticated event
8061 dispatching systems can be built.")
8062 (license license:zpl2.1)))
8063
8064 (define-public python2-zope-event
8065 (package-with-python2 python-zope-event))
8066
8067 (define-public python-zope-interface
8068 (package
8069 (name "python-zope-interface")
8070 (version "4.1.3")
8071 (source
8072 (origin
8073 (method url-fetch)
8074 (uri (string-append "https://pypi.python.org/packages/source/z"
8075 "/zope.interface/zope.interface-" version ".tar.gz"))
8076 (sha256
8077 (base32
8078 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8079 (build-system python-build-system)
8080 (native-inputs
8081 `(("python-zope-event" ,python-zope-event)))
8082 (home-page "https://github.com/zopefoundation/zope.interface")
8083 (synopsis "Python implementation of the \"design by contract\"
8084 methodology")
8085 (description "Zope.interface provides an implementation of \"object
8086 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8087 conforming to a given API or contract.")
8088 (license license:zpl2.1)))
8089
8090 (define-public python2-zope-interface
8091 (package-with-python2 python-zope-interface))
8092
8093 (define-public python-zope-exceptions
8094 (package
8095 (name "python-zope-exceptions")
8096 (version "4.0.8")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (string-append "https://pypi.python.org/packages/source/z"
8101 "/zope.exceptions/zope.exceptions-"
8102 version ".tar.gz"))
8103 (sha256
8104 (base32
8105 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8106 (build-system python-build-system)
8107 (arguments
8108 '(#:tests? #f)) ; circular dependency with zope.testrunner
8109 (propagated-inputs
8110 `(("python-zope-interface" ,python-zope-interface)))
8111 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8112 (synopsis "Zope exceptions")
8113 (description "Zope.exceptions provides general-purpose exception types
8114 that have uses outside of the Zope framework.")
8115 (license license:zpl2.1)))
8116
8117 (define-public python2-zope-exceptions
8118 (package-with-python2 python-zope-exceptions))
8119
8120 (define-public python-zope-testing
8121 (package
8122 (name "python-zope-testing")
8123 (version "4.5.0")
8124 (source
8125 (origin
8126 (method url-fetch)
8127 (uri (string-append "https://pypi.python.org/packages/source/z"
8128 "/zope.testing/zope.testing-" version ".tar.gz"))
8129 (sha256
8130 (base32
8131 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8132 (modules '((guix build utils)))
8133 (snippet
8134 '(begin
8135 ;; Remove pre-compiled .pyc files backup files from source.
8136 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8137 #t))))
8138 (build-system python-build-system)
8139 (native-inputs
8140 `(("python-zope-exceptions" ,python-zope-exceptions)))
8141 (propagated-inputs
8142 `(("python-zope-interface" ,python-zope-interface)))
8143 (home-page "http://pypi.python.org/pypi/zope.testing")
8144 (synopsis "Zope testing helpers")
8145 (description "Zope.testing provides a number of testing utilities for HTML
8146 forms, HTTP servers, regular expressions, and more.")
8147 (license license:zpl2.1)))
8148
8149 (define-public python2-zope-testing
8150 (package-with-python2 python-zope-testing))
8151
8152 (define-public python-zope-testrunner
8153 (package
8154 (name "python-zope-testrunner")
8155 (version "4.4.9")
8156 (source
8157 (origin
8158 (method url-fetch)
8159 (uri (string-append "https://pypi.python.org/packages/source/z"
8160 "/zope.testrunner/zope.testrunner-"
8161 version ".zip"))
8162 (sha256
8163 (base32
8164 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8165 (build-system python-build-system)
8166 (arguments
8167 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8168 (native-inputs
8169 `(("python-six" ,python-six)
8170 ;("python-zope-interface" ,python-zope-interface)
8171 ("python-zope-exceptions" ,python-zope-exceptions)
8172 ("python-zope-testing" ,python-zope-testing)
8173 ("unzip" ,unzip)))
8174 (propagated-inputs
8175 `(("python-zope-interface" ,python-zope-interface)))
8176 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8177 (synopsis "Zope testrunner script")
8178 (description "Zope.testrunner provides a script for running Python
8179 tests.")
8180 (license license:zpl2.1)))
8181
8182 (define-public python2-zope-testrunner
8183 (let ((base (package-with-python2 python-zope-testrunner)))
8184 (package
8185 (inherit base)
8186 (native-inputs
8187 (append (package-native-inputs base)
8188 `(("python2-subunit" ,python2-subunit)
8189 ("python2-mimeparse" ,python2-mimeparse)))))))
8190
8191 (define-public python-zope-i18nmessageid
8192 (package
8193 (name "python-zope-i18nmessageid")
8194 (version "4.0.3")
8195 (source
8196 (origin
8197 (method url-fetch)
8198 (uri (string-append
8199 "https://pypi.python.org/packages/source/z"
8200 "/zope.i18nmessageid/zope.i18nmessageid-"
8201 version ".tar.gz"))
8202 (sha256
8203 (base32
8204 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8205 (build-system python-build-system)
8206 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8207 (synopsis "Message identifiers for internationalization")
8208 (description "Zope.i18nmessageid provides facilities for declaring
8209 internationalized messages within program source text.")
8210 (license license:zpl2.1)))
8211
8212 (define-public python2-zope-i18nmessageid
8213 (package-with-python2 python-zope-i18nmessageid))
8214
8215 (define-public python-zope-schema
8216 (package
8217 (name "python-zope-schema")
8218 (version "4.4.2")
8219 (source
8220 (origin
8221 (method url-fetch)
8222 (uri (string-append "https://pypi.python.org/packages/source/z"
8223 "/zope.schema/zope.schema-" version ".tar.gz"))
8224 (sha256
8225 (base32
8226 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8227 (build-system python-build-system)
8228 (arguments
8229 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8230 (propagated-inputs
8231 `(("python-zope-event" ,python-zope-event)
8232 ("python-zope-exceptions", python-zope-exceptions)
8233 ("python-zope-interface" ,python-zope-interface)))
8234 (native-inputs
8235 `(("python-zope-testing" ,python-zope-testing)
8236 ("python-coverage" ,python-coverage)
8237 ("python-nose" ,python-nose)))
8238 (home-page "http://pypi.python.org/pypi/zope.schema")
8239 (synopsis "Zope data schemas")
8240 (description "Zope.scheme provides extensions to zope.interface for
8241 defining data schemas.")
8242 (license license:zpl2.1)))
8243
8244 (define-public python2-zope-schema
8245 (package-with-python2 python-zope-schema))
8246
8247 (define-public python-zope-configuration
8248 (package
8249 (name "python-zope-configuration")
8250 (version "4.0.3")
8251 (source (origin
8252 (method url-fetch)
8253 (uri (string-append "https://pypi.python.org/packages/source/z"
8254 "/zope.configuration/zope.configuration-"
8255 version ".tar.gz"))
8256 (sha256
8257 (base32
8258 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8259 (build-system python-build-system)
8260 (arguments
8261 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8262 (propagated-inputs
8263 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8264 ("python-zope-schema" ,python-zope-schema)))
8265 (home-page "http://pypi.python.org/pypi/zope.configuration")
8266 (synopsis "Zope Configuration Markup Language")
8267 (description "Zope.configuration implements ZCML, the Zope Configuration
8268 Markup Language.")
8269 (license license:zpl2.1)))
8270
8271 (define-public python2-zope-configuration
8272 (package-with-python2 python-zope-configuration))
8273
8274 (define-public python-zope-proxy
8275 (package
8276 (name "python-zope-proxy")
8277 (version "4.1.6")
8278 (source
8279 (origin
8280 (method url-fetch)
8281 (uri (string-append "https://pypi.python.org/packages/source/z"
8282 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8283 (sha256
8284 (base32
8285 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8286 (build-system python-build-system)
8287 (arguments
8288 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8289 (propagated-inputs
8290 `(("python-zope-interface" ,python-zope-interface)))
8291 (home-page "http://pypi.python.org/pypi/zope.proxy")
8292 (synopsis "Generic, transparent proxies")
8293 (description "Zope.proxy provides generic, transparent proxies for Python.
8294 Proxies are special objects which serve as mostly-transparent wrappers around
8295 another object, intervening in the apparent behavior of the wrapped object
8296 only when necessary to apply the policy (e.g., access checking, location
8297 brokering, etc.) for which the proxy is responsible.")
8298 (license license:zpl2.1)))
8299
8300 (define-public python2-zope-proxy
8301 (package-with-python2 python-zope-proxy))
8302
8303 (define-public python-zope-location
8304 (package
8305 (name "python-zope-location")
8306 (version "4.0.3")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (string-append "https://pypi.python.org/packages/source/z"
8311 "/zope.location/zope.location-" version ".tar.gz"))
8312 (sha256
8313 (base32
8314 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8315 (build-system python-build-system)
8316 (arguments
8317 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8318 (propagated-inputs
8319 `(("python-zope-proxy" ,python-zope-proxy)
8320 ("python-zope-schema" ,python-zope-schema)))
8321 (home-page "http://pypi.python.org/pypi/zope.location/")
8322 (synopsis "Zope location library")
8323 (description "Zope.location implements the concept of \"locations\" in
8324 Zope3, which are are special objects that have a structural location.")
8325 (license license:zpl2.1)))
8326
8327 (define-public python2-zope-location
8328 (package-with-python2 python-zope-location))
8329
8330 (define-public python-zope-security
8331 (package
8332 (name "python-zope-security")
8333 (version "4.0.3")
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (string-append "https://pypi.python.org/packages/source/z"
8338 "/zope.security/zope.security-" version ".tar.gz"))
8339 (sha256
8340 (base32
8341 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8342 (build-system python-build-system)
8343 (arguments
8344 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8345 (propagated-inputs
8346 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8347 ("python-zope-proxy" ,python-zope-proxy)
8348 ("python-zope-schema" ,python-zope-schema)))
8349 (native-inputs
8350 `(("python-six" ,python-six)
8351 ("python-zope-component" ,python-zope-component)
8352 ("python-zope-configuration" ,python-zope-configuration)
8353 ("python-zope-location" ,python-zope-location)
8354 ("python-zope-testrunner" ,python-zope-testrunner)
8355 ("python-zope-testing" ,python-zope-testing)))
8356 (home-page "http://pypi.python.org/pypi/zope.security")
8357 (synopsis "Zope security framework")
8358 (description "Zope.security provides a generic mechanism to implement
8359 security policies on Python objects.")
8360 (license license:zpl2.1)))
8361
8362 (define-public python2-zope-security
8363 (let ((zope-security (package-with-python2 python-zope-security)))
8364 (package (inherit zope-security)
8365 (propagated-inputs
8366 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8367 ,@(alist-delete
8368 "python-zope-testrunner"
8369 (package-propagated-inputs zope-security)))))))
8370
8371 (define-public python-zope-component
8372 (package
8373 (name "python-zope-component")
8374 (version "4.3.0")
8375 (source
8376 (origin
8377 (method url-fetch)
8378 (uri (pypi-uri "zope.component" version))
8379 (sha256
8380 (base32
8381 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8382 (build-system python-build-system)
8383 (arguments
8384 ;; Skip tests due to circular dependency with python-zope-security.
8385 '(#:tests? #f))
8386 (native-inputs
8387 `(("python-zope-testing" ,python-zope-testing)))
8388 (propagated-inputs
8389 `(("python-zope-event" ,python-zope-event)
8390 ("python-zope-interface" ,python-zope-interface)
8391 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8392 ("python-zope-configuration" ,python-zope-configuration)))
8393 (home-page "https://github.com/zopefoundation/zope.component")
8394 (synopsis "Zope Component Architecture")
8395 (description "Zope.component represents the core of the Zope Component
8396 Architecture. Together with the zope.interface package, it provides
8397 facilities for defining, registering and looking up components.")
8398 (license license:zpl2.1)))
8399
8400 (define-public python2-zope-component
8401 (package-with-python2 python-zope-component))
8402
8403 (define-public python-pythondialog
8404 (package
8405 (name "python-pythondialog")
8406 (version "3.4.0")
8407 (source
8408 (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "pythondialog" version))
8411 (sha256
8412 (base32
8413 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8414 (build-system python-build-system)
8415 (arguments
8416 `(#:phases
8417 (modify-phases %standard-phases
8418 (add-after 'unpack 'patch-path
8419 (lambda* (#:key inputs #:allow-other-keys)
8420 (let* ((dialog (assoc-ref inputs "dialog")))
8421 ;; Since this library really wants to grovel the search path, we
8422 ;; must hardcode dialog's store path into it.
8423 (substitute* "dialog.py"
8424 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8425 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8426 #t))))
8427 #:tests? #f)) ; no test suite
8428 (propagated-inputs
8429 `(("dialog" ,dialog)))
8430 (home-page "http://pythondialog.sourceforge.net/")
8431 (synopsis "Python interface to the UNIX dialog utility")
8432 (description "A Python wrapper for the dialog utility. Its purpose is to
8433 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8434 This allows one to make simple text-mode user interfaces on Unix-like systems")
8435 (license license:lgpl2.1)
8436 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8437
8438 (define-public python2-pythondialog
8439 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8440 (package
8441 (inherit base)
8442 (version (package-version python-pythondialog))
8443 (source (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "python2-pythondialog" version))
8446 (sha256
8447 (base32
8448 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8449
8450 (define-public python-pyrfc3339
8451 (package
8452 (name "python-pyrfc3339")
8453 (version "1.0")
8454 (source
8455 (origin
8456 (method url-fetch)
8457 (uri (pypi-uri "pyRFC3339" version))
8458 (sha256
8459 (base32
8460 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8461 (build-system python-build-system)
8462 (propagated-inputs
8463 `(("python-pytz" ,python-pytz)))
8464 (native-inputs
8465 `(("python-nose" ,python-nose)))
8466 (home-page "https://github.com/kurtraschke/pyRFC3339")
8467 (synopsis "Python timestamp library")
8468 (description "Python library for generating and parsing RFC 3339-compliant
8469 timestamps.")
8470 (license license:expat)))
8471
8472 (define-public python2-pyrfc3339
8473 (package-with-python2 python-pyrfc3339))
8474
8475 (define-public python-werkzeug
8476 (package
8477 (name "python-werkzeug")
8478 (version "0.11.15")
8479 (source
8480 (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "Werkzeug" version))
8483 (sha256
8484 (base32
8485 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8486 (build-system python-build-system)
8487 (native-inputs
8488 `(("python-pytest" ,python-pytest)))
8489 (home-page "http://werkzeug.pocoo.org/")
8490 (synopsis "Utilities for WSGI applications")
8491 (description "One of the most advanced WSGI utility modules. It includes a
8492 powerful debugger, full-featured request and response objects, HTTP utilities to
8493 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8494 uploads, a powerful URL routing system and a bunch of community-contributed
8495 addon modules.")
8496 (license license:x11)))
8497
8498 (define-public python2-werkzeug
8499 (package-with-python2 python-werkzeug))
8500
8501 (define-public python-configobj
8502 (package
8503 (name "python-configobj")
8504 (version "5.0.6")
8505 (source (origin
8506 (method url-fetch)
8507 (uri (string-append
8508 "https://pypi.python.org/packages/source/c/configobj/"
8509 "configobj-" version ".tar.gz"))
8510 (sha256
8511 (base32
8512 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8513 ;; Patch setup.py so it looks for python-setuptools, which is
8514 ;; required to parse the keyword 'install_requires' in setup.py.
8515 (patches (search-patches "python-configobj-setuptools.patch"))))
8516 (build-system python-build-system)
8517 (propagated-inputs
8518 `(("python-six" ,python-six)))
8519 (synopsis "Config file reading, writing and validation")
8520 (description "ConfigObj is a simple but powerful config file reader and
8521 writer: an ini file round tripper. Its main feature is that it is very easy to
8522 use, with a straightforward programmer’s interface and a simple syntax for
8523 config files.")
8524 (home-page "https://github.com/DiffSK/configobj")
8525 (license license:bsd-3)))
8526
8527 (define-public python2-configobj
8528 (package-with-python2 python-configobj))
8529
8530 (define-public python-configargparse
8531 (package
8532 (name "python-configargparse")
8533 (version "0.10.0")
8534 (source (origin
8535 (method url-fetch)
8536 (uri (string-append
8537 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8538 "ConfigArgParse-" version ".tar.gz"))
8539 (sha256
8540 (base32
8541 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8542 (build-system python-build-system)
8543 (arguments
8544 ;; FIXME: Bug in test suite filed upstream:
8545 ;; https://github.com/bw2/ConfigArgParse/issues/32
8546 '(#:tests? #f))
8547 (synopsis "Replacement for argparse")
8548 (description "A drop-in replacement for argparse that allows options to also
8549 be set via config files and/or environment variables.")
8550 (home-page "https://github.com/bw2/ConfigArgParse")
8551 (license license:expat)))
8552
8553 (define-public python2-configargparse
8554 (package-with-python2 python-configargparse))
8555
8556 (define-public python-ndg-httpsclient
8557 (package
8558 (name "python-ndg-httpsclient")
8559 (version "0.4.2")
8560 (source (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "ndg_httpsclient" version))
8563 (sha256
8564 (base32
8565 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8566 (build-system python-build-system)
8567 (arguments
8568 '(;; The tests appear to require networking.
8569 #:tests? #f))
8570 (propagated-inputs
8571 `(("python-pyopenssl" ,python-pyopenssl)))
8572 (synopsis "HTTPS support for Python's httplib and urllib2")
8573 (description "This is a HTTPS client implementation for httplib and urllib2
8574 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8575 over the default provided with Python and importantly enables full verification
8576 of the SSL peer.")
8577 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8578 (license license:bsd-3)))
8579
8580 ;; python2-openssl requires special care, so package-with-python2 is
8581 ;; insufficient.
8582 (define-public python2-ndg-httpsclient
8583 (package (inherit python-ndg-httpsclient)
8584 (name "python2-ndg-httpsclient")
8585 (arguments `(#:python ,python-2))
8586 (propagated-inputs
8587 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8588
8589 (define-public python-contextlib2
8590 (package
8591 (name "python-contextlib2")
8592 (version "0.4.0")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "contextlib2" version))
8597 (sha256
8598 (base32
8599 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8600 (build-system python-build-system)
8601 (arguments
8602 `(#:phases
8603 (modify-phases %standard-phases
8604 (replace 'check
8605 (lambda _ (zero?
8606 (system*
8607 "python" "test_contextlib2.py" "-v")))))))
8608 (home-page "http://contextlib2.readthedocs.org/")
8609 (synopsis "Tools for decorators and context managers")
8610 (description "This module is primarily a backport of the Python
8611 3.2 contextlib to earlier Python versions. Like contextlib, it
8612 provides utilities for common tasks involving decorators and context
8613 managers. It also contains additional features that are not part of
8614 the standard library.")
8615 (license license:psfl)))
8616
8617 (define-public python2-contextlib2
8618 (package-with-python2 python-contextlib2))
8619
8620 (define-public python-texttable
8621 (package
8622 (name "python-texttable")
8623 (version "0.8.7")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "texttable" version))
8628 (sha256
8629 (base32
8630 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8631 (build-system python-build-system)
8632 (arguments '(#:tests? #f)) ; no tests
8633 (home-page "https://github.com/foutaise/texttable/")
8634 (synopsis "Python module for creating simple ASCII tables")
8635 (description "Texttable is a Python module for creating simple ASCII
8636 tables.")
8637 (license license:lgpl2.1+)))
8638
8639 (define-public python2-texttable
8640 (package-with-python2 python-texttable))
8641
8642 (define-public python-websocket-client
8643 (package
8644 (name "python-websocket-client")
8645 (version "0.37.0")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "websocket_client" version))
8650 (sha256
8651 (base32
8652 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8653 (build-system python-build-system)
8654 (propagated-inputs
8655 `(("python-six" ,python-six)))
8656 (home-page "https://github.com/liris/websocket-client")
8657 (synopsis "WebSocket client for Python")
8658 (description "The Websocket-client module provides the low level APIs for
8659 WebSocket usage in Python programs.")
8660 (license license:lgpl2.1+)))
8661
8662 (define-public python2-websocket-client
8663 (package-with-python2 python-websocket-client))
8664
8665 (define-public python-atomicwrites
8666 (package
8667 (name "python-atomicwrites")
8668 (version "1.1.5")
8669 (source (origin
8670 (method url-fetch)
8671 (uri (pypi-uri "atomicwrites" version))
8672 (sha256
8673 (base32
8674 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8675 (build-system python-build-system)
8676 (synopsis "Atomic file writes in Python")
8677 (description "Library for atomic file writes using platform dependent tools
8678 for atomic file system operations.")
8679 (home-page "https://github.com/untitaker/python-atomicwrites")
8680 (license license:expat)))
8681
8682 (define-public python2-atomicwrites
8683 (package-with-python2 python-atomicwrites))
8684
8685 (define-public python-requests-toolbelt
8686 (package
8687 (name "python-requests-toolbelt")
8688 (version "0.6.2")
8689 (source (origin
8690 (method url-fetch)
8691 (uri (string-append
8692 "https://pypi.python.org/packages/"
8693 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8694 "requests-toolbelt-" version ".tar.gz"))
8695 (sha256
8696 (base32
8697 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8698 (build-system python-build-system)
8699 (native-inputs
8700 `(("python-betamax" ,python-betamax)
8701 ("python-mock" ,python-mock)
8702 ("python-pytest" ,python-pytest)))
8703 (propagated-inputs
8704 `(("python-requests" ,python-requests)))
8705 (synopsis "Extensions to python-requests")
8706 (description "This is a toolbelt of useful classes and functions to be used
8707 with python-requests.")
8708 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8709 (license license:asl2.0)))
8710
8711 (define-public python-click-threading
8712 (package
8713 (name "python-click-threading")
8714 (version "0.2.0")
8715 (source (origin
8716 (method url-fetch)
8717 (uri (string-append
8718 "https://pypi.python.org/packages/"
8719 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8720 "click-threading-" version ".tar.gz"))
8721 (sha256
8722 (base32
8723 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8724 (build-system python-build-system)
8725 (propagated-inputs
8726 `(("python-click" ,python-click)))
8727 (synopsis "Utilities for multithreading in Click")
8728 (description "This package provides utilities for multithreading in Click
8729 applications.")
8730 (home-page "https://github.com/click-contrib/click-threading")
8731 (license license:expat)))
8732
8733 (define-public python-click-log
8734 (package
8735 (name "python-click-log")
8736 (version "0.1.8")
8737 (source (origin
8738 (method url-fetch)
8739 (uri (pypi-uri "click-log" version))
8740 (sha256
8741 (base32
8742 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8743 (build-system python-build-system)
8744 (propagated-inputs
8745 `(("python-click" ,python-click)))
8746 (synopsis "Logging for click applications")
8747 (description "This package provides a Python library for logging Click
8748 applications.")
8749 (home-page "https://github.com/click-contrib/click-log")
8750 (license license:expat)))
8751
8752 (define-public python-apipkg
8753 (package
8754 (name "python-apipkg")
8755 (version "1.4")
8756 (source (origin
8757 (method url-fetch)
8758 (uri (pypi-uri "apipkg" version))
8759 (sha256
8760 (base32
8761 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8762 (build-system python-build-system)
8763 (native-inputs
8764 `(("python-pytest" ,python-pytest)))
8765 (synopsis "Namespace control and lazy-import mechanism")
8766 (description "With apipkg you can control the exported namespace of a Python
8767 package and greatly reduce the number of imports for your users. It is a small
8768 pure Python module that works on virtually all Python versions.")
8769 (home-page "https://bitbucket.org/hpk42/apipkg")
8770 (license license:expat)))
8771
8772 (define-public python2-apipkg
8773 (package-with-python2 python-apipkg))
8774
8775 (define-public python-execnet
8776 (package
8777 (name "python-execnet")
8778 (version "1.4.1")
8779 (source (origin
8780 (method url-fetch)
8781 (uri (pypi-uri "execnet" version))
8782 (sha256
8783 (base32
8784 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8785 (build-system python-build-system)
8786 (arguments
8787 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8788 ;; The two test failures are caused by the lack of an `ssh` executable.
8789 ;; The test suite can be run with pytest after the 'install' phase.
8790 #:tests? #f))
8791 (native-inputs
8792 `(("python-pytest" ,python-pytest)
8793 ("python-setuptools-scm" ,python-setuptools-scm)))
8794 (propagated-inputs
8795 `(("python-apipkg" ,python-apipkg)))
8796 (synopsis "Rapid multi-Python deployment")
8797 (description "Execnet provides a share-nothing model with
8798 channel-send/receive communication for distributing execution across many
8799 Python interpreters across version, platform and network barriers. It has a
8800 minimal and fast API targeting the following uses:
8801 @enumerate
8802 @item distribute tasks to (many) local or remote CPUs
8803 @item write and deploy hybrid multi-process applications
8804 @item write scripts to administer multiple environments
8805 @end enumerate")
8806 (home-page "http://codespeak.net/execnet/")
8807 (license license:expat)))
8808
8809 (define-public python2-execnet
8810 (package-with-python2 python-execnet))
8811
8812 (define-public python-trollius-redis
8813 (package
8814 (name "python-trollius-redis")
8815 (version "0.1.4")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "trollius_redis" version))
8820 (sha256
8821 (base32
8822 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8823 (build-system python-build-system)
8824 ;; TODO: Tests require packaging 'hiredis'.
8825 (arguments '(#:tests? #f))
8826 (home-page "https://github.com/benjolitz/trollius-redis")
8827 (synopsis "Port of asyncio-redis to trollius")
8828 (description "@code{trollius-redis} is a Redis client for Python
8829 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8830 Redis protocol.")
8831 (license license:bsd-2)))
8832
8833 (define-public python2-trollius-redis
8834 (package-with-python2 python-trollius-redis))
8835
8836 ;;; The software provided by this package was integrated into pytest 2.8.
8837 (define-public python-pytest-cache
8838 (package
8839 (name "python-pytest-cache")
8840 (version "1.0")
8841 (source (origin
8842 (method url-fetch)
8843 (uri (pypi-uri "pytest-cache" version))
8844 (sha256
8845 (base32
8846 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8847 (build-system python-build-system)
8848 (propagated-inputs
8849 `(("python-apipkg" ,python-apipkg)
8850 ("python-execnet" ,python-execnet)
8851 ("python-py" ,python-py)
8852 ("python-pytest" ,python-pytest)))
8853 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8854 (description "The pytest-cache plugin provides tools to rerun failures from
8855 the last py.test invocation.")
8856 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8857 (license license:expat)))
8858
8859 (define-public python2-pytest-cache
8860 (package-with-python2 python-pytest-cache))
8861
8862 (define-public python-pytest-localserver
8863 (package
8864 (name "python-pytest-localserver")
8865 (version "0.3.5")
8866 (source (origin
8867 (method url-fetch)
8868 (uri (pypi-uri "pytest-localserver" version))
8869 (sha256
8870 (base32
8871 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8872 (build-system python-build-system)
8873 (arguments
8874 `(#:phases (modify-phases %standard-phases
8875 (replace 'check
8876 (lambda _
8877 (zero? (system* "py.test" "--genscript=runtests.py"))
8878 (zero? (system* "py.test")))))))
8879 (native-inputs
8880 `(("python-pytest" ,python-pytest)
8881 ("python-requests" ,python-requests)
8882 ("python-six" ,python-six)))
8883 (propagated-inputs
8884 `(("python-werkzeug" ,python-werkzeug)))
8885 (synopsis "Py.test plugin to test server connections locally")
8886 (description "Pytest-localserver is a plugin for the pytest testing
8887 framework which enables you to test server connections locally.")
8888 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8889 (license license:expat)))
8890
8891 (define-public python-wsgi-intercept
8892 (package
8893 (name "python-wsgi-intercept")
8894 (version "1.2.2")
8895 (source (origin
8896 (method url-fetch)
8897 (uri (string-append
8898 "https://pypi.python.org/packages/"
8899 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8900 "wsgi_intercept-" version ".tar.gz"))
8901 (sha256
8902 (base32
8903 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8904 (build-system python-build-system)
8905 (propagated-inputs
8906 `(("python-six" ,python-six)))
8907 (native-inputs
8908 `(("python-pytest" ,python-pytest)
8909 ("python-httplib2" ,python-httplib2)
8910 ("python-requests" ,python-requests)
8911 ("python-urllib3" ,python-urllib3)))
8912 (synopsis "Puts a WSGI application in place of a real URI for testing")
8913 (description "Wsgi_intercept installs a WSGI application in place of a real
8914 URI for testing. Testing a WSGI application normally involves starting a
8915 server at a local host and port, then pointing your test code to that address.
8916 Instead, this library lets you intercept calls to any specific host/port
8917 combination and redirect them into a WSGI application importable by your test
8918 program. Thus, you can avoid spawning multiple processes or threads to test
8919 your Web app.")
8920 (home-page "https://github.com/cdent/wsgi-intercept")
8921 (license license:expat)))
8922
8923 (define-public python-pytest-xprocess
8924 (package
8925 (name "python-pytest-xprocess")
8926 (version "0.9.1")
8927 (source (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "pytest-xprocess" version))
8930 (sha256
8931 (base32
8932 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8933 (build-system python-build-system)
8934 (propagated-inputs
8935 `(("python-pytest" ,python-pytest)
8936 ("python-pytest-cache" ,python-pytest-cache)
8937 ("python-psutil" ,python-psutil)))
8938 (synopsis "Pytest plugin to manage external processes across test runs")
8939 (description "Pytest-xprocess is an experimental py.test plugin for managing
8940 processes across test runs.")
8941 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8942 (license license:expat)))
8943
8944 (define-public python-icalendar
8945 (package
8946 (name "python-icalendar")
8947 (version "3.11.4")
8948 (source (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "icalendar" version))
8951 (sha256
8952 (base32
8953 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
8954 (build-system python-build-system)
8955 (propagated-inputs
8956 `(("python-dateutil" ,python-dateutil)
8957 ("python-pytz" ,python-pytz)))
8958 (synopsis "Python library for parsing iCalendar files")
8959 (description "The icalendar package is a parser/generator of iCalendar
8960 files for use with Python.")
8961 (home-page "https://github.com/collective/icalendar")
8962 (license license:bsd-2)))
8963
8964 (define-public python-sphinxcontrib-newsfeed
8965 (package
8966 (name "python-sphinxcontrib-newsfeed")
8967 (version "0.1.4")
8968 (source (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8971 (sha256
8972 (base32
8973 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8974 (arguments '(#:tests? #f)) ; No tests.
8975 (build-system python-build-system)
8976 (propagated-inputs
8977 `(("python-sphinx" ,python-sphinx)))
8978 (synopsis "News Feed extension for Sphinx")
8979 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8980 Blog, News or Announcements section to a Sphinx website.")
8981 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8982 (license license:bsd-2)))
8983
8984 (define-public python-args
8985 (package
8986 (name "python-args")
8987 (version "0.1.0")
8988 (source (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "args" version))
8991 (sha256
8992 (base32
8993 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8994 (build-system python-build-system)
8995 (home-page "https://github.com/kennethreitz/args")
8996 (synopsis "Command-line argument parser")
8997 (description
8998 "This library provides a Python module to parse command-line arguments.")
8999 (license license:bsd-3)))
9000
9001 (define-public python2-args
9002 (package-with-python2 python-args))
9003
9004 (define-public python-clint
9005 (package
9006 (name "python-clint")
9007 (version "0.5.1")
9008 (source (origin
9009 (method url-fetch)
9010 (uri (pypi-uri "clint" version))
9011 (sha256
9012 (base32
9013 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9014 (build-system python-build-system)
9015 (arguments
9016 '(#:phases
9017 (modify-phases %standard-phases
9018 (replace 'check
9019 (lambda _
9020 (zero? (system* "py.test" "-v")))))))
9021 (native-inputs
9022 `(("python-pytest" ,python-pytest)))
9023 (propagated-inputs
9024 `(("python-args" ,python-args)))
9025 (home-page "https://github.com/kennethreitz/clint")
9026 (synopsis "Command-line interface tools")
9027 (description
9028 "Clint is a Python module filled with a set of tools for developing
9029 command-line applications, including tools for colored and indented
9030 output, progress bar display, and pipes.")
9031 (license license:isc)))
9032
9033 (define-public python2-clint
9034 (package-with-python2 python-clint))
9035
9036 (define-public python-astor
9037 (package
9038 (name "python-astor")
9039 (version "0.5")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "astor" version))
9043 (sha256
9044 (base32
9045 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9046 (build-system python-build-system)
9047 (home-page "https://github.com/berkerpeksag/astor")
9048 (synopsis "Read and write Python ASTs")
9049 (description
9050 "Astor is designed to allow easy manipulation of Python source via the
9051 Abstract Syntax Tree.")
9052 (license license:bsd-3)))
9053
9054 (define-public python2-astor
9055 (package-with-python2 python-astor))
9056
9057 (define-public python-rply
9058 (package
9059 (name "python-rply")
9060 (version "0.7.4")
9061 (source (origin
9062 (method url-fetch)
9063 (uri (pypi-uri "rply" version))
9064 (sha256
9065 (base32
9066 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9067 (build-system python-build-system)
9068 (propagated-inputs
9069 `(("python-appdirs" ,python-appdirs)))
9070 (home-page "https://github.com/alex/rply")
9071 (synopsis "Parser generator for Python")
9072 (description
9073 "This package provides a pure Python based parser generator, that also
9074 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9075 with a new public API, and RPython support.")
9076 (license license:bsd-3)))
9077
9078 (define-public python2-rply
9079 (package-with-python2 python-rply))
9080
9081 (define-public python-hy
9082 (package
9083 (name "python-hy")
9084 (version "0.11.1")
9085 (source (origin
9086 (method url-fetch)
9087 (uri (pypi-uri "hy" version))
9088 (sha256
9089 (base32
9090 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9091 (build-system python-build-system)
9092 (arguments
9093 '(#:phases
9094 (modify-phases %standard-phases
9095 (replace 'check
9096 (lambda _
9097 ;; Tests require write access to HOME.
9098 (setenv "HOME" "/tmp")
9099 (zero? (system* "nosetests")))))))
9100 (native-inputs
9101 `(("python-coverage" ,python-coverage)
9102 ("python-nose" ,python-nose)))
9103 (propagated-inputs
9104 `(("python-astor" ,python-astor)
9105 ("python-clint" ,python-clint)
9106 ("python-rply" ,python-rply)))
9107 (home-page "http://hylang.org/")
9108 (synopsis "Lisp frontend to Python")
9109 (description
9110 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9111 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9112 Python at your fingertips, in Lisp form.")
9113 (license license:expat)))
9114
9115 (define-public python2-hy
9116 (package-with-python2 python-hy))
9117
9118 (define-public python-rauth
9119 (package
9120 (name "python-rauth")
9121 (version "0.7.3")
9122 (source
9123 (origin
9124 (method url-fetch)
9125 (uri (pypi-uri "rauth" version))
9126 (sha256
9127 (base32
9128 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9129 (build-system python-build-system)
9130 (arguments
9131 `(#:test-target "check"))
9132 (propagated-inputs
9133 `(("python-requests" ,python-requests)))
9134 (home-page "https://github.com/litl/rauth")
9135 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9136 (description
9137 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9138 provides service wrappers for convenient connection initialization and
9139 authenticated session objects providing things like keep-alive.")
9140 (license license:expat)
9141 (properties `((python2-variant . ,(delay python2-rauth))))))
9142
9143 (define-public python2-rauth
9144 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9145 (package
9146 (inherit base)
9147 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9148 ,@(package-native-inputs base))))))
9149
9150 (define-public python2-functools32
9151 (package
9152 (name "python2-functools32")
9153 (version "3.2.3-2")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "functools32" version))
9158 (sha256
9159 (base32
9160 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9161 (build-system python-build-system)
9162 (arguments
9163 `(#:python ,python-2
9164 #:tests? #f)) ; no test target
9165 (home-page "https://github.com/MiCHiLU/python-functools32")
9166 (synopsis
9167 "Backport of the functools module from Python 3.2.3")
9168 (description
9169 "This package is a backport of the @code{functools} module from Python
9170 3.2.3 for use with older versions of Python and PyPy.")
9171 (license license:expat)))
9172
9173 (define-public python2-subprocess32
9174 (package
9175 (name "python2-subprocess32")
9176 (version "3.2.7")
9177 (source (origin
9178 (method url-fetch)
9179 (uri (pypi-uri "subprocess32" version))
9180 (sha256
9181 (base32
9182 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9183 (patches
9184 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9185 (build-system python-build-system)
9186 (arguments
9187 `(#:python ,python-2
9188 #:phases
9189 (modify-phases %standard-phases
9190 (add-after 'unpack 'patch-/bin/sh
9191 (lambda _
9192 (substitute* '("subprocess32.py"
9193 "test_subprocess32.py")
9194 (("/bin/sh") (which "sh")))
9195 #t))
9196 (delete 'check)
9197 (add-after 'install 'check
9198 (lambda* (#:key inputs outputs #:allow-other-keys)
9199 ;; For some reason this package fails to import
9200 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9201 ;; directory. Running tests after install is easier.
9202 (add-installed-pythonpath inputs outputs)
9203 (zero? (system* "python" "test_subprocess32.py")))))))
9204 (home-page "https://github.com/google/python-subprocess32")
9205 (synopsis "Backport of the subprocess module from Python 3.2")
9206 (description
9207 "This is a backport of the @code{subprocess} standard library module
9208 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9209 new features. On POSIX systems it is guaranteed to be reliable when used
9210 in threaded applications. It includes timeout support from Python 3.3 but
9211 otherwise matches 3.2’s API.")
9212 (license license:psfl)))
9213
9214 (define-public python2-futures
9215 (package
9216 (name "python2-futures")
9217 (version "3.0.5")
9218 (source
9219 (origin
9220 (method url-fetch)
9221 (uri (pypi-uri "futures" version))
9222 (sha256
9223 (base32
9224 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9225 (build-system python-build-system)
9226 (arguments `(#:python ,python-2))
9227 (home-page "https://github.com/agronholm/pythonfutures")
9228 (synopsis
9229 "Backport of the concurrent.futures package from Python 3.2")
9230 (description
9231 "The concurrent.futures module provides a high-level interface for
9232 asynchronously executing callables. This package backports the
9233 concurrent.futures package from Python 3.2")
9234 (license license:bsd-3)))
9235
9236 (define-public python-promise
9237 (package
9238 (name "python-promise")
9239 (version "0.4.2")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "promise" version))
9244 (sha256
9245 (base32
9246 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9247 (build-system python-build-system)
9248 ;; Tests wants python-futures, which is a python2 only program, and
9249 ;; can't be found by python-promise at test time.
9250 (arguments `(#:tests? #f))
9251 (home-page "https://github.com/syrusakbary/promise")
9252 (synopsis "Promises/A+ implementation for Python")
9253 (description
9254 "Promises/A+ implementation for Python")
9255 (properties `((python2-variant . ,(delay python2-promise))))
9256 (license license:expat)))
9257
9258 (define-public python2-promise
9259 (let ((promise (package-with-python2
9260 (strip-python2-variant python-promise))))
9261 (package (inherit promise)
9262 (arguments (substitute-keyword-arguments (package-arguments promise)
9263 ((#:tests? _) #t)))
9264 (native-inputs
9265 `(("python2-futures" ,python2-futures)
9266 ("python2-pytest" ,python2-pytest)
9267 ,@(package-native-inputs promise))))))
9268
9269 (define-public python-urllib3
9270 (package
9271 (name "python-urllib3")
9272 (version "1.18.1")
9273 (source
9274 (origin
9275 (method url-fetch)
9276 (uri (pypi-uri "urllib3" version))
9277 (sha256
9278 (base32
9279 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9280 (build-system python-build-system)
9281 (arguments `(#:tests? #f))
9282 (native-inputs
9283 `(;; some packages for tests
9284 ("python-nose" ,python-nose)
9285 ("python-mock" ,python-mock)
9286 ("python-tornado" ,python-tornado)))
9287 (propagated-inputs
9288 `(;; extra packages for https security
9289 ("python-certifi" ,python-certifi)
9290 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9291 ("python-pyasn1" ,python-pyasn1)
9292 ("python-pyopenssl" ,python-pyopenssl)))
9293 (home-page "https://urllib3.readthedocs.org/")
9294 (synopsis "HTTP library with thread-safe connection pooling")
9295 (description
9296 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9297 can reuse the same socket connection for multiple requests, it can POST files,
9298 supports url redirection and retries, and also gzip and deflate decoding.")
9299 (license license:expat)))
9300
9301 (define-public python2-urllib3
9302 (package-with-python2 python-urllib3))
9303
9304 (define-public python-colorama
9305 (package
9306 (name "python-colorama")
9307 (version "0.3.7")
9308 (source
9309 (origin
9310 (method url-fetch)
9311 (uri (pypi-uri "colorama" version))
9312 (sha256
9313 (base32
9314 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9315 (build-system python-build-system)
9316 (synopsis "Colored terminal text rendering for Python")
9317 (description "Colorama is a Python library for rendering colored terminal
9318 text.")
9319 (home-page "https://pypi.python.org/pypi/colorama")
9320 (license license:bsd-3)))
9321
9322 (define-public python2-colorama
9323 (package-with-python2 python-colorama))
9324
9325 (define-public python-rsa
9326 (package
9327 (name "python-rsa")
9328 (version "3.4.2")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "rsa" version))
9333 (sha256
9334 (base32
9335 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9336 (build-system python-build-system)
9337 (propagated-inputs
9338 `(("python-pyasn1" ,python-pyasn1)))
9339 (synopsis "Pure-Python RSA implementation")
9340 (description "Python-RSA is a pure-Python RSA implementation. It supports
9341 encryption and decryption, signing and verifying signatures, and key
9342 generation according to PKCS#1 version 1.5. It can be used as a Python
9343 library as well as on the command line.")
9344 (home-page "http://stuvel.eu/rsa")
9345 (license license:asl2.0)))
9346
9347 (define-public python2-rsa
9348 (package-with-python2 python-rsa))
9349
9350 (define-public python-pluggy
9351 (package
9352 (name "python-pluggy")
9353 (version "0.3.1")
9354 (source
9355 (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "pluggy" version))
9358 (sha256
9359 (base32
9360 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9361 (build-system python-build-system)
9362 (synopsis "Plugin and hook calling mechanism for Python")
9363 (description "Pluggy is an extraction of the plugin manager as used by
9364 Pytest but stripped of Pytest specific details.")
9365 (home-page "https://pypi.python.org/pypi/pluggy")
9366 (license license:expat)))
9367
9368 (define-public python2-pluggy
9369 (package-with-python2 python-pluggy))
9370
9371 (define-public python-tox
9372 (package
9373 (name "python-tox")
9374 (version "2.3.1")
9375 (source
9376 (origin
9377 (method url-fetch)
9378 (uri (pypi-uri "tox" version))
9379 (sha256
9380 (base32
9381 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9382 (build-system python-build-system)
9383 (arguments
9384 ;; FIXME: Tests require pytest-timeout, which itself requires
9385 ;; pytest>=2.8.0 for installation.
9386 '(#:tests? #f))
9387 (propagated-inputs
9388 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9389 ("python-py" ,python-py)
9390 ("python-virtualenv" ,python-virtualenv)))
9391 (native-inputs
9392 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9393 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9394 (home-page "http://tox.testrun.org/")
9395 (synopsis "Virtualenv-based automation of test activities")
9396 (description "Tox is a generic virtualenv management and test command line
9397 tool. It can be used to check that a package installs correctly with
9398 different Python versions and interpreters, or run tests in each type of
9399 supported environment, or act as a frontend to continuous integration
9400 servers.")
9401 (license license:expat)))
9402
9403 (define-public python2-tox
9404 (package-with-python2 python-tox))
9405
9406 (define-public python-jmespath
9407 (package
9408 (name "python-jmespath")
9409 (version "0.9.0")
9410 (source
9411 (origin
9412 (method url-fetch)
9413 (uri (pypi-uri "jmespath" version))
9414 (sha256
9415 (base32
9416 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9417 (build-system python-build-system)
9418 (native-inputs
9419 `(("python-nose" ,python-nose)))
9420 (synopsis "JSON Matching Expressions")
9421 (description "JMESPath (pronounced “james path”) is a Python library that
9422 allows one to declaratively specify how to extract elements from a JSON
9423 document.")
9424 (home-page "https://github.com/jmespath/jmespath.py")
9425 (license license:expat)))
9426
9427 (define-public python2-jmespath
9428 (package-with-python2 python-jmespath))
9429
9430 (define-public python-botocore
9431 (package
9432 (name "python-botocore")
9433 (version "1.5.26")
9434 (source
9435 (origin
9436 (method url-fetch)
9437 (uri (pypi-uri "botocore" version))
9438 (sha256
9439 (base32
9440 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9441 (build-system python-build-system)
9442 (arguments
9443 ;; FIXME: Many tests are failing.
9444 '(#:tests? #f))
9445 (propagated-inputs
9446 `(("python-dateutil" ,python-dateutil)
9447 ("python-docutils" ,python-docutils)
9448 ("python-jmespath" ,python-jmespath)))
9449 (native-inputs
9450 `(("python-mock" ,python-mock)
9451 ("python-nose" ,python-nose)
9452 ("behave" ,behave)
9453 ("python-tox" ,python-tox)
9454 ("python-wheel" ,python-wheel)))
9455 (home-page "https://github.com/boto/botocore")
9456 (synopsis "Low-level interface to AWS")
9457 (description "Botocore is a Python library that provides a low-level
9458 interface to the Amazon Web Services (AWS) API.")
9459 (license license:asl2.0)))
9460
9461 (define-public python2-botocore
9462 (package-with-python2 python-botocore))
9463
9464 (define-public awscli
9465 (package
9466 (name "awscli")
9467 (version "1.11.63")
9468 (source
9469 (origin
9470 (method url-fetch)
9471 (uri (pypi-uri name version))
9472 (sha256
9473 (base32
9474 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9475 (build-system python-build-system)
9476 (propagated-inputs
9477 `(("python-colorama" ,python-colorama)
9478 ("python-botocore" ,python-botocore)
9479 ("python-s3transfer" ,python-s3transfer)
9480 ("python-docutils" ,python-docutils)
9481 ("python-pyyaml" ,python-pyyaml)
9482 ("python-rsa" ,python-rsa)))
9483 (arguments
9484 ;; FIXME: The 'pypi' release does not contain tests.
9485 '(#:tests? #f))
9486 (home-page "https://aws.amazon.com/cli/")
9487 (synopsis "Command line client for AWS")
9488 (description "AWS CLI provides a unified command line interface to the
9489 Amazon Web Services (AWS) API.")
9490 (license license:asl2.0)))
9491
9492 (define-public python-hypothesis
9493 (package
9494 (name "python-hypothesis")
9495 (version "3.1.0")
9496 (source (origin
9497 (method url-fetch)
9498 (uri (pypi-uri "hypothesis" version))
9499 (sha256
9500 (base32
9501 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9502 (build-system python-build-system)
9503 (native-inputs
9504 `(("python-flake8" ,python-flake8)
9505 ("python-pytest" ,python-pytest)))
9506 (synopsis "Library for property based testing")
9507 (description "Hypothesis is a library for testing your Python code against a
9508 much larger range of examples than you would ever want to write by hand. It’s
9509 based on the Haskell library, Quickcheck, and is designed to integrate
9510 seamlessly into your existing Python unit testing work flow.")
9511 (home-page "https://github.com/DRMacIver/hypothesis")
9512 (license license:mpl2.0)
9513 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9514
9515 (define-public python2-hypothesis
9516 (let ((hypothesis (package-with-python2
9517 (strip-python2-variant python-hypothesis))))
9518 (package (inherit hypothesis)
9519 (native-inputs
9520 `(("python2-enum34" ,python2-enum34)
9521 ,@(package-native-inputs hypothesis))))))
9522
9523 (define-public python-pytest-subtesthack
9524 (package
9525 (name "python-pytest-subtesthack")
9526 (version "0.1.1")
9527 (source (origin
9528 (method url-fetch)
9529 (uri (pypi-uri "pytest-subtesthack" version))
9530 (sha256
9531 (base32
9532 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9533 (build-system python-build-system)
9534 (propagated-inputs
9535 `(("python-pytest" ,python-pytest)))
9536 (synopsis "Set-up and tear-down fixtures for unit tests")
9537 (description "This plugin allows you to set up and tear down fixtures within
9538 unit test functions that use @code{py.test}. This is useful for using
9539 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9540 function multiple times, without setting up or tearing down fixture state as is
9541 normally the case.")
9542 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9543 (license license:unlicense)))
9544
9545 (define-public python2-pytest-subtesthack
9546 (package-with-python2 python-pytest-subtesthack))
9547
9548 (define-public python-xdo
9549 (package
9550 (name "python-xdo")
9551 (version "0.3")
9552 (source (origin
9553 (method url-fetch)
9554 (uri (string-append
9555 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9556 "python-xdo_" version ".orig.tar.gz"))
9557 (sha256
9558 (base32
9559 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9560 (build-system python-build-system)
9561 (arguments
9562 '(#:phases
9563 (modify-phases %standard-phases
9564 (add-before 'install 'patch-libxdo-path
9565 ;; Hardcode the path of dynamically loaded libxdo library.
9566 (lambda* (#:key inputs #:allow-other-keys)
9567 (let ((libxdo (string-append
9568 (assoc-ref inputs "xdotool")
9569 "/lib/libxdo.so")))
9570 (substitute* "xdo/_xdo.py"
9571 (("find_library\\(\"xdo\"\\)")
9572 (simple-format #f "\"~a\"" libxdo)))
9573 #t))))
9574 #:tests? #f)) ; no tests provided
9575 (propagated-inputs
9576 `(("python-six" ,python-six)))
9577 (inputs
9578 `(("xdotool" ,xdotool)
9579 ("libX11" ,libx11)))
9580 (home-page "https://tracker.debian.org/pkg/python-xdo")
9581 (synopsis "Python library for simulating X11 keyboard/mouse input")
9582 (description "Provides bindings to libxdo for manipulating X11 via simulated
9583 input. (Note that this is mostly a legacy library; you may wish to look at
9584 python-xdo for newer bindings.)")
9585 (license license:bsd-3)))
9586
9587 (define-public python2-xdo
9588 (package-with-python2 python-xdo))
9589
9590 (define-public python-wtforms
9591 (package
9592 (name "python-wtforms")
9593 (version "2.1")
9594 (source
9595 (origin
9596 (method url-fetch)
9597 (uri (pypi-uri "WTForms" version ".zip"))
9598 (sha256
9599 (base32
9600 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9601 (build-system python-build-system)
9602 (arguments
9603 '(#:phases
9604 (modify-phases %standard-phases
9605 (add-after 'unpack 'remove-django-test
9606 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9607 (lambda _
9608 (substitute*
9609 "tests/runtests.py"
9610 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9611 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9612 #t)))))
9613 (native-inputs
9614 `(("unzip" ,unzip)))
9615 (home-page "http://wtforms.simplecodes.com/")
9616 (synopsis
9617 "Form validation and rendering library for Python web development")
9618 (description
9619 "WTForms is a flexible forms validation and rendering library
9620 for Python web development. It is very similar to the web form API
9621 available in Django, but is a standalone package.")
9622 (license license:bsd-3)))
9623
9624 (define-public python2-wtforms
9625 (package-with-python2 python-wtforms))
9626
9627 (define-public python-mako
9628 (package
9629 (name "python-mako")
9630 (version "1.0.6")
9631 (source
9632 (origin
9633 (method url-fetch)
9634 (uri (pypi-uri "Mako" version))
9635 (sha256
9636 (base32
9637 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9638 (build-system python-build-system)
9639 (propagated-inputs
9640 `(("python-markupsafe" ,python-markupsafe)))
9641 (native-inputs
9642 `(("python-mock" ,python-mock)
9643 ("python-nose" ,python-nose)
9644 ("python-pytest" ,python-pytest)))
9645 (home-page "http://www.makotemplates.org/")
9646 (synopsis "Templating language for Python")
9647 (description "Mako is a templating language for Python that compiles
9648 templates into Python modules.")
9649 (license license:expat)))
9650
9651 (define-public python2-mako
9652 (package-with-python2 python-mako))
9653
9654 (define-public python-waitress
9655 (package
9656 (name "python-waitress")
9657 (version "0.8.10")
9658 (source
9659 (origin
9660 (method url-fetch)
9661 (uri (pypi-uri "waitress" version))
9662 (sha256
9663 (base32
9664 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9665 (build-system python-build-system)
9666 (home-page "https://github.com/Pylons/waitress")
9667 (synopsis "Waitress WSGI server")
9668 (description "Waitress is meant to be a production-quality pure-Python WSGI
9669 server with very acceptable performance.")
9670 (license license:zpl2.1)))
9671
9672 (define-public python2-waitress
9673 (package-with-python2 python-waitress))
9674
9675 (define-public python-wsgiproxy2
9676 (package
9677 (name "python-wsgiproxy2")
9678 (version "0.4.2")
9679 (source
9680 (origin
9681 (method url-fetch)
9682 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9683 (sha256
9684 (base32
9685 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9686 (build-system python-build-system)
9687 (arguments
9688 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9689 ;; support Python 3:
9690 ;; https://github.com/benoitc/restkit/issues/140
9691 #:tests? #f))
9692 (native-inputs
9693 `(("unzip" ,unzip)
9694 ("python-nose" ,python-nose)
9695 ("python-coverage" ,python-coverage)))
9696 (propagated-inputs
9697 `(("python-six" ,python-six)
9698 ("python-webob" ,python-webob)))
9699 (home-page
9700 "https://github.com/gawel/WSGIProxy2/")
9701 (synopsis "WSGI Proxy with various http client backends")
9702 (description "WSGI turns HTTP requests into WSGI function calls.
9703 WSGIProxy turns WSGI function calls into HTTP requests.
9704 It also includes code to sign requests and pass private data,
9705 and to spawn subprocesses to handle requests.")
9706 (license license:expat)))
9707
9708 (define-public python2-wsgiproxy2
9709 (package-with-python2 python-wsgiproxy2))
9710
9711 (define-public python-pastedeploy
9712 (package
9713 (name "python-pastedeploy")
9714 (version "1.5.2")
9715 (source
9716 (origin
9717 (method url-fetch)
9718 (uri (pypi-uri "PasteDeploy" version))
9719 (sha256
9720 (base32
9721 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9722 (build-system python-build-system)
9723 (native-inputs
9724 `(("python-nose" ,python-nose)))
9725 (home-page "http://pythonpaste.org/deploy/")
9726 (synopsis
9727 "Load, configure, and compose WSGI applications and servers")
9728 (description
9729 "This tool provides code to load WSGI applications and servers from URIs;
9730 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9731 Script provides commands to serve applications based on this configuration
9732 file.")
9733 (license license:expat)))
9734
9735 (define-public python2-pastedeploy
9736 (package-with-python2 python-pastedeploy))
9737
9738 (define-public python-paste
9739 (package
9740 (name "python-paste")
9741 (version "2.0.3")
9742 (source
9743 (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "Paste" version))
9746 (sha256
9747 (base32
9748 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9749 (patches (search-patches "python-paste-remove-website-test.patch"
9750 "python-paste-remove-timing-test.patch"))))
9751 (build-system python-build-system)
9752 (native-inputs
9753 `(("python-nose" ,python-nose)))
9754 (propagated-inputs
9755 `(("python-six" ,python-six)))
9756 (home-page "http://pythonpaste.org")
9757 (synopsis
9758 "Python web development tools, focusing on WSGI")
9759 (description
9760 "Paste provides a variety of web development tools and middleware which
9761 can be nested together to build web applications. Paste's design closely
9762 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9763 (license license:expat)))
9764
9765 (define-public python2-paste
9766 (package-with-python2 python-paste))
9767
9768 (define-public python-pastescript
9769 (package
9770 (name "python-pastescript")
9771 (version "2.0.2")
9772 (source
9773 (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "PasteScript" version))
9776 (sha256
9777 (base32
9778 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9779 (build-system python-build-system)
9780 (native-inputs
9781 `(("python-nose" ,python-nose)))
9782 (propagated-inputs
9783 `(("python-paste" ,python-paste)
9784 ("python-pastedeploy" ,python-pastedeploy)))
9785 (home-page "http://pythonpaste.org/script/")
9786 (arguments
9787 '(;; Unfortunately, this requires the latest unittest2,
9788 ;; but that requires traceback2 which requires linecache2 which requires
9789 ;; unittest2. So we're skipping tests for now.
9790 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9791 ;; so in theory we could get around this situation somehow.)
9792 #:tests? #f))
9793 (synopsis
9794 "Pluggable command line tool for serving web applications and more")
9795 (description
9796 "PasteScript is a plugin-friendly command line tool which provides a
9797 variety of features, from launching web applications to bootstrapping project
9798 layouts.")
9799 (license license:expat)))
9800
9801 (define-public python2-pastescript
9802 (package-with-python2 python-pastescript))
9803
9804 (define-public python-pyquery
9805 (package
9806 (name "python-pyquery")
9807 (version "1.2.17")
9808 (source
9809 (origin
9810 (method url-fetch)
9811 (uri (pypi-uri "pyquery" version))
9812 (sha256
9813 (base32
9814 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9815 (build-system python-build-system)
9816 (native-inputs
9817 `(("python-webob" ,python-webob)
9818 ("python-webtest" ,python-webtest)))
9819 (propagated-inputs
9820 `(("python-lxml" ,python-lxml)
9821 ("python-cssselect" ,python-cssselect)))
9822 (home-page "https://github.com/gawel/pyquery")
9823 (synopsis "Make jQuery-like queries on xml documents")
9824 (description "pyquery allows you to make jQuery queries on xml documents.
9825 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9826 fast xml and html manipulation.")
9827 (license license:bsd-3)))
9828
9829 (define-public python2-pyquery
9830 (package-with-python2 python-pyquery))
9831
9832 (define-public python-webtest
9833 (package
9834 (name "python-webtest")
9835 (version "2.0.20")
9836 (source
9837 (origin
9838 (method url-fetch)
9839 (uri (pypi-uri "WebTest" version))
9840 (sha256
9841 (base32
9842 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9843 (build-system python-build-system)
9844 (arguments
9845 `(;; Unfortunately we have to disable tests!
9846 ;; This release of WebTest is pinned to python-nose < 1.3,
9847 ;; but older versions of python-nose are plagued with the following
9848 ;; bug(s), which rears its ugly head during test execution:
9849 ;; https://github.com/nose-devs/nose/issues/759
9850 ;; https://github.com/nose-devs/nose/pull/811
9851 #:tests? #f))
9852 ;; Commented out code is no good, but in this case, once tests
9853 ;; are ready to be enabled again, we should put the following
9854 ;; in place:
9855 ;; (native-inputs
9856 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9857 ;; ; but see above comment
9858 ;; ("python-coverage" ,python-coverage)
9859 ;; ("python-mock" ,python-mock)
9860 ;; ("python-pastedeploy" ,python-pastedeploy)
9861 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9862 ;; ("python-pyquery" ,python-pyquery)))
9863 (propagated-inputs
9864 `(("python-waitress" ,python-waitress)
9865 ("python-webob" ,python-webob)
9866 ("python-six" ,python-six)
9867 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9868 (home-page "http://webtest.pythonpaste.org/")
9869 (synopsis "Helper to test WSGI applications")
9870 (description "Webtest allows you to test your Python web applications
9871 without starting an HTTP server. It supports anything that supports the
9872 minimum of WSGI.")
9873 (license license:expat)))
9874
9875 (define-public python2-webtest
9876 (package-with-python2 python-webtest))
9877
9878 (define-public python-anyjson
9879 (package
9880 (name "python-anyjson")
9881 (version "0.3.3")
9882 (source
9883 (origin
9884 (method url-fetch)
9885 (uri (pypi-uri "anyjson" version))
9886 (sha256
9887 (base32
9888 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9889 (build-system python-build-system)
9890 (arguments
9891 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9892 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9893 ;; whatever) so this transformation needs to be done before the tests
9894 ;; can be run. Maybe we could add a build step to transform beforehand
9895 ;; but it could be annoying/difficult.
9896 ;; We can enable tests for the Python 2 version, though, and do below.
9897 #:tests? #f))
9898 (home-page "http://bitbucket.org/runeh/anyjson/")
9899 (synopsis
9900 "Wraps best available JSON implementation in a common interface")
9901 (description
9902 "Anyjson loads whichever is the fastest JSON module installed
9903 and provides a uniform API regardless of which JSON implementation is used.")
9904 (license license:bsd-3)
9905 (properties `((python2-variant . ,(delay python2-anyjson))))))
9906
9907 (define-public python2-anyjson
9908 (let ((anyjson (package-with-python2
9909 (strip-python2-variant python-anyjson))))
9910 (package
9911 (inherit anyjson)
9912 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9913 #:tests? #t
9914 ,@(package-arguments anyjson)))
9915 (native-inputs `(("python2-nose" ,python2-nose))))))
9916
9917 (define-public python-amqp
9918 (package
9919 (name "python-amqp")
9920 (version "1.4.9")
9921 (source
9922 (origin
9923 (method url-fetch)
9924 (uri (pypi-uri "amqp" version))
9925 (sha256
9926 (base32
9927 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9928 (build-system python-build-system)
9929 (native-inputs
9930 `(("python-nose" ,python-nose)
9931 ("python-mock" ,python-mock)))
9932 (home-page "https://github.com/celery/py-amqp")
9933 (synopsis
9934 "Low-level AMQP client for Python (fork of amqplib)")
9935 (description
9936 "This is a fork of amqplib which was originally written by Barry Pederson.
9937 It is maintained by the Celery project, and used by kombu as a pure python
9938 alternative when librabbitmq is not available.")
9939 (license license:lgpl2.1+)
9940 (properties `((python2-variant . ,(delay python2-amqp))))))
9941
9942 (define-public python2-amqp
9943 (let ((amqp (package-with-python2
9944 (strip-python2-variant python-amqp))))
9945 (package
9946 (inherit amqp)
9947 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9948 ;; unmaintained. Weirdly, does not do this on the python 3
9949 ;; version?
9950 #:tests? #f
9951 ,@(package-arguments amqp))))))
9952
9953 (define-public python-kombu
9954 (package
9955 (name "python-kombu")
9956 (version "3.0.37")
9957 (source
9958 (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "kombu" version))
9961 (sha256
9962 (base32
9963 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9964 (build-system python-build-system)
9965 (native-inputs
9966 `(("python-mock" ,python-mock)
9967 ("python-nose" ,python-nose)))
9968 (propagated-inputs
9969 `(("python-anyjson" ,python-anyjson)
9970 ("python-amqp" ,python-amqp)
9971 ("python-redis" ,python-redis)))
9972 (home-page "http://kombu.readthedocs.org")
9973 (synopsis "Message passing library for Python")
9974 (description "The aim of Kombu is to make messaging in Python as easy as
9975 possible by providing an idiomatic high-level interface for the AMQ protocol,
9976 and also provide proven and tested solutions to common messaging problems.
9977 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9978 message orientation, queuing, routing, reliability and security, for which the
9979 RabbitMQ messaging server is the most popular implementation.")
9980 (license license:bsd-3)
9981 (properties `((python2-variant . ,(delay python2-kombu))))))
9982
9983 (define-public python2-kombu
9984 (let ((kombu (package-with-python2
9985 (strip-python2-variant python-kombu))))
9986 (package
9987 (inherit kombu)
9988 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9989 ;; It works fine on the python3 variant.
9990 #:tests? #f
9991 ,@(package-arguments kombu)))
9992 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9993 ,@(package-native-inputs kombu))))))
9994
9995 (define-public python-billiard
9996 (package
9997 (name "python-billiard")
9998 (version "3.3.0.23")
9999 (source
10000 (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "billiard" version))
10003 (sha256
10004 (base32
10005 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10006 (build-system python-build-system)
10007 (native-inputs
10008 `(("python-nose" ,python-nose)))
10009 (home-page "https://github.com/celery/billiard")
10010 (synopsis
10011 "Python multiprocessing fork with improvements and bugfixes")
10012 (description
10013 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10014 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10015 pyprocessing package. This standalone variant is intended to be compatible with
10016 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10017 (license license:bsd-3)
10018 (properties `((python2-variant . ,(delay python2-billiard))))))
10019
10020 (define-public python2-billiard
10021 (let ((billiard (package-with-python2
10022 (strip-python2-variant python-billiard))))
10023 (package
10024 (inherit billiard)
10025 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10026 ("python2-mock" ,python2-mock)
10027 ,@(package-native-inputs billiard))))))
10028
10029 (define-public python-celery
10030 (package
10031 (name "python-celery")
10032 (version "3.1.24")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "celery" version))
10037 (sha256
10038 (base32
10039 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10040 (build-system python-build-system)
10041 (arguments
10042 `(#:phases
10043 (modify-phases %standard-phases
10044 ;; These tests break with Python 3.5:
10045 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10046 (replace 'check
10047 (lambda _
10048 (zero?
10049 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10050 (native-inputs
10051 `(("python-nose" ,python-nose)))
10052 (propagated-inputs
10053 `(("python-pytz" ,python-pytz)
10054 ("python-billiard" ,python-billiard)
10055 ("python-kombu" ,python-kombu)))
10056 (home-page "http://celeryproject.org")
10057 (synopsis "Distributed Task Queue")
10058 (description "Celery is an asynchronous task queue/job queue based on
10059 distributed message passing. It is focused on real-time operation, but
10060 supports scheduling as well. The execution units, called tasks, are executed
10061 concurrently on a single or more worker servers using multiprocessing,
10062 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10063 synchronously (wait until ready).")
10064 (license license:bsd-3)
10065 (properties `((python2-variant . ,(delay python2-celery))))))
10066
10067 (define-public python2-celery
10068 (let ((celery (package-with-python2
10069 (strip-python2-variant python-celery))))
10070 (package
10071 (inherit celery)
10072 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10073 ("python2-mock" ,python2-mock)
10074 ,@(package-native-inputs celery))))))
10075
10076 (define-public python-translitcodec
10077 (package
10078 (name "python-translitcodec")
10079 (version "0.4.0")
10080 (source
10081 (origin
10082 (method url-fetch)
10083 (uri (pypi-uri "translitcodec" version))
10084 (sha256
10085 (base32
10086 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10087 (build-system python-build-system)
10088 (arguments
10089 `(#:tests? #f)) ; no tests provided
10090 (home-page
10091 "https://github.com/claudep/translitcodec")
10092 (synopsis
10093 "Unicode to 8-bit charset transliteration codec")
10094 (description
10095 "This package contains codecs for transliterating ISO 10646 texts into
10096 best-effort representations using smaller coded character sets (ASCII,
10097 ISO 8859, etc.).")
10098 (license license:expat)))
10099
10100 (define-public python2-translitcodec
10101 (package-with-python2 python-translitcodec))
10102
10103 (define-public python-editor
10104 (package
10105 (name "python-editor")
10106 (version "0.5")
10107 (source
10108 (origin
10109 (method url-fetch)
10110 (uri (pypi-uri "python-editor" version))
10111 (sha256
10112 (base32
10113 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10114 (build-system python-build-system)
10115 (home-page
10116 "https://github.com/fmoo/python-editor")
10117 (synopsis
10118 "Programmatically open an editor, capture the result")
10119 (description
10120 "python-editor is a library that provides the editor module for
10121 programmatically interfacing with your system's $EDITOR.")
10122 (license license:asl2.0)))
10123
10124 (define-public python2-editor
10125 (package-with-python2 python-editor))
10126
10127 (define-public python-sphinxcontrib-programoutput
10128 (package
10129 (name "python-sphinxcontrib-programoutput")
10130 (version "0.10")
10131 (source (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10134 (sha256
10135 (base32
10136 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10137 (build-system python-build-system)
10138 (arguments
10139 ;; FIXME: Many tests are failing and the upstream is gone.
10140 '(#:tests? #f))
10141 (propagated-inputs
10142 `(("python-sphinx" ,python-sphinx)))
10143 (synopsis "Sphinx extension to include program output")
10144 (description "A Sphinx extension to literally insert the output of arbitrary
10145 commands into documents, helping you to keep your command examples up to date.")
10146 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10147 (license license:bsd-2)))
10148
10149 (define-public python2-sphinxcontrib-programoutput
10150 (package-with-python2 python-sphinxcontrib-programoutput))
10151
10152 (define-public python-sphinx-repoze-autointerface
10153 (package
10154 (name "python-sphinx-repoze-autointerface")
10155 (version "0.8")
10156 (source (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10159 (sha256
10160 (base32
10161 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10162 (build-system python-build-system)
10163 (arguments '(#:tests? #f)) ; No tests.
10164 (propagated-inputs
10165 `(("python-sphinx" ,python-sphinx)
10166 ("python-zope-interface" ,python-zope-interface)))
10167 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10168 (description "This package defines an extension for the Sphinx documentation
10169 system. The extension allows generation of API documentation by
10170 introspection of @code{zope.interface} instances in code.")
10171 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10172 (license license:repoze)))
10173
10174 (define-public python2-sphinx-repoze-autointerface
10175 (package-with-python2 python-sphinx-repoze-autointerface))
10176
10177 (define-public python-psycopg2
10178 (package
10179 (name "python-psycopg2")
10180 (version "2.6.2")
10181 (source
10182 (origin
10183 (method url-fetch)
10184 (uri (pypi-uri "psycopg2" version))
10185 (sha256
10186 (base32
10187 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10188 (build-system python-build-system)
10189 (arguments
10190 ;; Tests would require a postgresql database "psycopg2_test"
10191 ;; and a running postgresql database management service.
10192 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10193 (inputs
10194 `(("postgresql" ,postgresql))) ; libpq
10195 (home-page "http://initd.org/psycopg/")
10196 (synopsis "Python PostgreSQL adapter")
10197 (description
10198 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10199 (license license:lgpl3+)))
10200
10201 (define-public python2-psycopg2
10202 (package-with-python2 python-psycopg2))
10203
10204 (define-public python-vobject
10205 (package
10206 (name "python-vobject")
10207 (version "0.9.4.1")
10208 (source (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "vobject" version))
10211 (sha256
10212 (base32
10213 "0741h2cf743sbk89dpfm1yca26l4s159nzvy6vv8xg72nd7pvsps"))))
10214 (build-system python-build-system)
10215 (arguments
10216 '(;; The test suite relies on some non-portable Windows interfaces.
10217 #:tests? #f))
10218 (propagated-inputs
10219 `(("python-dateutil" ,python-dateutil)
10220 ("python-pyicu" ,python-pyicu)))
10221 (synopsis "Parse and generate vCard and vCalendar files")
10222 (description "Vobject is intended to be a full featured Python package for
10223 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10224 are supported and well tested. vCard 3.0 files are supported, and all data
10225 should be imported, but only a few components are understood in a sophisticated
10226 way.")
10227 (home-page "http://eventable.github.io/vobject/")
10228 (license license:asl2.0)))
10229
10230 (define-public python2-vobject
10231 (package-with-python2 python-vobject))
10232
10233 (define-public python-munkres
10234 (package
10235 (name "python-munkres")
10236 (version "1.0.8")
10237 (source (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "munkres" version))
10240 (sha256
10241 (base32
10242 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10243 (build-system python-build-system)
10244 (arguments
10245 '(#:tests? #f)) ; no test suite
10246 (home-page "http://software.clapper.org/munkres/")
10247 (synopsis "Implementation of the Munkres algorithm")
10248 (description "The Munkres module provides an implementation of the Munkres
10249 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10250 useful for solving the Assignment Problem.")
10251 (license license:bsd-3)))
10252
10253 (define-public python2-munkres
10254 (package-with-python2 python-munkres))
10255
10256 (define-public python-flask
10257 (package
10258 (name "python-flask")
10259 (version "0.11.1")
10260 (source (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "Flask" version))
10263 (sha256
10264 (base32
10265 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10266 (build-system python-build-system)
10267 (propagated-inputs
10268 `(("python-itsdangerous" ,python-itsdangerous)
10269 ("python-jinja2" ,python-jinja2)
10270 ("python-click" ,python-click)
10271 ("python-werkzeug" ,python-werkzeug)))
10272 (home-page "https://github.com/mitsuhiko/flask/")
10273 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10274 (description "Flask is a micro web framework based on the Werkzeug toolkit
10275 and Jinja2 template engine. It is called a micro framework because it does not
10276 presume or force a developer to use a particular tool or library.")
10277 (license license:bsd-3)))
10278
10279 (define-public python2-flask
10280 (package-with-python2 python-flask))
10281
10282 (define-public python-flask-wtf
10283 (package
10284 (name "python-flask-wtf")
10285 (version "0.13.1")
10286 (source
10287 (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "Flask-WTF" version))
10290 (sha256
10291 (base32
10292 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10293 (build-system python-build-system)
10294 (arguments
10295 '(#:phases
10296 (modify-phases %standard-phases
10297 (add-before 'check 'drop-failing-test
10298 (lambda _
10299 ;; FIXME: This file tries resolving an external server, which
10300 ;; fails. Try to patch out the offending section instead of
10301 ;; deleting the whole thing.
10302 (delete-file "tests/test_recaptcha.py")
10303 #t)))))
10304 (propagated-inputs
10305 `(("python-flask-babel" ,python-flask-babel)
10306 ("python-babel" ,python-babel)
10307 ("python-wtforms" ,python-wtforms)))
10308 (native-inputs
10309 `(("python-nose" ,python-nose)))
10310 (home-page "https://github.com/lepture/flask-wtf")
10311 (synopsis "Simple integration of Flask and WTForms")
10312 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10313 upload, and reCAPTCHA.")
10314 (license license:bsd-3)))
10315
10316 (define-public python2-flask-wtf
10317 (package-with-python2 python-flask-wtf))
10318
10319 (define-public python-flask-multistatic
10320 (package
10321 (name "python-flask-multistatic")
10322 (version "1.0")
10323 (source
10324 (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "flask-multistatic" version))
10327 (sha256
10328 (base32
10329 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10330 (build-system python-build-system)
10331 (propagated-inputs
10332 `(("python-flask" ,python-flask)))
10333 (home-page "https://pagure.io/flask-multistatic")
10334 (synopsis "Flask plugin to allow overriding static files")
10335 (description "@code{flask-multistatic} is a flask plugin that adds support
10336 for overriding static files.")
10337 (license license:gpl3+)))
10338
10339 (define-public python2-flask-multistatic
10340 (package-with-python2 python-flask-multistatic))
10341
10342 (define-public python-cookies
10343 (package
10344 (name "python-cookies")
10345 (version "2.2.1")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (pypi-uri "cookies" version))
10349 (sha256
10350 (base32
10351 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10352 (build-system python-build-system)
10353 (arguments
10354 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10355 #:tests? #f))
10356 (native-inputs
10357 `(("python-pytest" ,python2-pytest)))
10358 (synopsis "HTTP cookie parser and renderer")
10359 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10360 Python.")
10361 (home-page "https://gitlab.com/sashahart/cookies")
10362 (license license:expat)))
10363
10364 (define-public python2-cookies
10365 (package-with-python2 python-cookies))
10366
10367 (define-public python-responses
10368 (package
10369 (name "python-responses")
10370 (version "0.5.1")
10371 (source (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "responses" version))
10374 (sha256
10375 (base32
10376 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10377 (build-system python-build-system)
10378 (arguments
10379 `(;; Test suite is not distributed:
10380 ;; https://github.com/getsentry/responses/issues/38
10381 #:tests? #f))
10382 (native-inputs
10383 `(("python-mock" ,python-mock)))
10384 (propagated-inputs
10385 `(("python-requests" ,python-requests)
10386 ("python-cookies" ,python-cookies)
10387 ("python-six" ,python-six)))
10388 (home-page "https://github.com/getsentry/responses")
10389 (synopsis "Utility for mocking out the `requests` Python library")
10390 (description "A utility library for mocking out the `requests` Python
10391 library.")
10392 (license license:asl2.0)))
10393
10394 (define-public python2-responses
10395 (package-with-python2 python-responses))
10396
10397 (define-public python-whoosh
10398 (package
10399 (name "python-whoosh")
10400 (version "2.7.4")
10401 (source
10402 (origin
10403 (method url-fetch)
10404 (uri (pypi-uri "Whoosh" version))
10405 (sha256
10406 (base32
10407 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10408 (build-system python-build-system)
10409 (native-inputs
10410 `(("python-pytest" ,python-pytest)))
10411 (home-page "http://bitbucket.org/mchaput/whoosh")
10412 (synopsis "Full text indexing, search, and spell checking library")
10413 (description
10414 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10415 checking library.")
10416 (license license:bsd-2)))
10417
10418 (define-public python2-whoosh
10419 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10420 (package (inherit whoosh)
10421 (propagated-inputs
10422 `(("python2-backport-ssl-match-hostname"
10423 ,python2-backport-ssl-match-hostname)
10424 ,@(package-propagated-inputs whoosh))))))
10425
10426 (define-public python-pathlib
10427 (package
10428 (name "python-pathlib")
10429 (version "1.0.1")
10430 (source (origin
10431 (method url-fetch)
10432 (uri (pypi-uri "pathlib" version))
10433 (sha256
10434 (base32
10435 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10436 (build-system python-build-system)
10437 ;; The tests depend on the internal "test" module, which does not provide
10438 ;; a stable interface.
10439 (arguments `(#:tests? #f))
10440 (home-page "https://pathlib.readthedocs.org/")
10441 (synopsis "Object-oriented file system paths")
10442 (description "Pathlib offers a set of classes to handle file system paths.
10443 It offers the following advantages over using string objects:
10444
10445 @enumerate
10446 @item No more cumbersome use of os and os.path functions. Everything can
10447 be done easily through operators, attribute accesses, and method calls.
10448 @item Embodies the semantics of different path types. For example,
10449 comparing Windows paths ignores casing.
10450 @item Well-defined semantics, eliminating any inconsistencies or
10451 ambiguities (forward vs. backward slashes, etc.).
10452 @end enumerate
10453
10454 Note: In Python 3.4, pathlib is now part of the standard library. For other
10455 Python versions please consider python-pathlib2 instead, which tracks the
10456 standard library module. This module (python-pathlib) isn't maintained
10457 anymore.")
10458 (license license:expat)))
10459
10460 (define-public python2-pathlib
10461 (package-with-python2 python-pathlib))
10462
10463 (define-public python2-pathlib2
10464 (package
10465 (name "python2-pathlib2")
10466 (version "2.1.0")
10467 (source (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "pathlib2" version))
10470 (sha256
10471 (base32
10472 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10473 (build-system python-build-system)
10474 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10475 ;; version is 3.4 which already includes this package as part of the
10476 ;; standard library.
10477 (arguments
10478 `(#:python ,python-2))
10479 (native-inputs
10480 `(("python2-six" ,python2-six)))
10481 (home-page "http://pypi.python.org/pypi/pathlib2/")
10482 (synopsis "Object-oriented file system paths - backport of standard
10483 pathlib module")
10484 (description "The goal of pathlib2 is to provide a backport of standard
10485 pathlib module which tracks the standard library module, so all the newest
10486 features of the standard pathlib can be used also on older Python versions.
10487
10488 Pathlib offers a set of classes to handle file system paths. It offers the
10489 following advantages over using string objects:
10490
10491 @enumerate
10492 @item No more cumbersome use of os and os.path functions. Everything can
10493 be done easily through operators, attribute accesses, and method calls.
10494 @item Embodies the semantics of different path types. For example,
10495 comparing Windows paths ignores casing.
10496 @item Well-defined semantics, eliminating any inconsistencies or
10497 ambiguities (forward vs. backward slashes, etc.).
10498 @end enumerate")
10499 (license license:expat)))
10500
10501 (define-public python-jellyfish
10502 (package
10503 (name "python-jellyfish")
10504 (version "0.5.6")
10505 (source (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "jellyfish" version))
10508 (sha256
10509 (base32
10510 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10511 (build-system python-build-system)
10512 (native-inputs
10513 `(("python-pytest" ,python-pytest)))
10514 (home-page "https://github.com/jamesturk/jellyfish")
10515 (synopsis "Approximate and phonetic matching of strings")
10516 (description "Jellyfish uses a variety of string comparison and phonetic
10517 encoding algorithms to do fuzzy string matching.")
10518 (license license:bsd-2)
10519 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10520
10521 (define-public python2-jellyfish
10522 (let ((jellyfish (package-with-python2
10523 (strip-python2-variant python-jellyfish))))
10524 (package (inherit jellyfish)
10525 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10526 ,@(package-native-inputs jellyfish))))))
10527
10528 (define-public python2-unicodecsv
10529 (package
10530 (name "python2-unicodecsv")
10531 (version "0.14.1")
10532 (source (origin
10533 (method url-fetch)
10534 ;; The test suite is not included in the PyPi release.
10535 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10536 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10537 "archive/" version ".tar.gz"))
10538 (file-name (string-append name "-" version ".tar.gz"))
10539 (sha256
10540 (base32
10541 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10542 (build-system python-build-system)
10543 (arguments
10544 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10545 #:python ,python-2))
10546 (native-inputs
10547 `(("python2-unittest2" ,python2-unittest2)))
10548 (home-page "https://github.com/jdunck/python-unicodecsv")
10549 (synopsis "Unicode CSV module for Python 2")
10550 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10551 module, adding support for Unicode strings.")
10552 (license license:bsd-2)))
10553
10554 (define-public python-rarfile
10555 (package
10556 (name "python-rarfile")
10557 (version "2.8")
10558 (source (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "rarfile" version))
10561 (sha256
10562 (base32
10563 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10564 (build-system python-build-system)
10565 (arguments
10566 '(#:phases
10567 (modify-phases %standard-phases
10568 (replace 'check
10569 ;; Many tests fail, but the installation proceeds.
10570 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10571 (native-inputs
10572 `(("which" ,which))) ; required for tests
10573 (propagated-inputs
10574 `(("libarchive" ,libarchive)))
10575 (home-page "https://github.com/markokr/rarfile")
10576 (synopsis "RAR archive reader for Python")
10577 (description "This is Python module for RAR archive reading. The interface
10578 is made as zipfile like as possible.")
10579 (license license:isc)))
10580
10581 (define-public python2-rarfile
10582 (package-with-python2 python-rarfile))
10583
10584 (define-public python-magic
10585 (package
10586 (name "python-magic")
10587 (version "0.4.3")
10588 (source
10589 (origin
10590 (method url-fetch)
10591 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10592 version ".tar.gz"))
10593 (sha256
10594 (base32
10595 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10596 (file-name (string-append name "-" version "-checkout"))))
10597 (build-system python-build-system)
10598 (arguments
10599 ;; The tests are unreliable, so don't run them. The tests fail
10600 ;; under Python3 because they were written for Python2 and
10601 ;; contain import statements that do not work in Python3. One of
10602 ;; the tests fails under Python2 because its assertions are
10603 ;; overly stringent; it relies on comparing output strings which
10604 ;; are brittle and can change depending on the version of
10605 ;; libmagic being used and the system on which the test is
10606 ;; running. In my case, under GuixSD 0.10.0, only one test
10607 ;; failed, and it seems to have failed only because the version
10608 ;; of libmagic that is packaged in Guix outputs a slightly
10609 ;; different (but not wrong) string than the one that the test
10610 ;; expected.
10611 '(#:tests? #f
10612 #:phases (modify-phases %standard-phases
10613 ;; Replace a specific method call with a hard-coded
10614 ;; path to the necessary libmagic.so file in the
10615 ;; store. If we don't do this, then the method call
10616 ;; will fail to find the libmagic.so file, which in
10617 ;; turn will cause any application using
10618 ;; python-magic to fail.
10619 (add-before 'build 'hard-code-path-to-libmagic
10620 (lambda* (#:key inputs #:allow-other-keys)
10621 (let ((file (assoc-ref inputs "file")))
10622 (substitute* "magic.py"
10623 (("ctypes.util.find_library\\('magic'\\)")
10624 (string-append "'" file "/lib/libmagic.so'")))
10625 #t)))
10626 (add-before 'install 'disable-egg-compression
10627 (lambda _
10628 (let ((port (open-file "setup.cfg" "a")))
10629 (display "\n[easy_install]\nzip_ok = 0\n"
10630 port)
10631 (close-port port)
10632 #t))))))
10633 (inputs
10634 ;; python-magic needs to be able to find libmagic.so.
10635 `(("file" ,file)))
10636 (home-page "https://github.com/ahupp/python-magic")
10637 (synopsis "File type identification using libmagic")
10638 (description
10639 "This module uses ctypes to access the libmagic file type
10640 identification library. It makes use of the local magic database and
10641 supports both textual and MIME-type output. Note that this module and
10642 the python-file module both provide a \"magic.py\" file; these two
10643 modules, which are different and were developed separately, both serve
10644 the same purpose: to provide Python bindings for libmagic.")
10645 (license license:expat)))
10646
10647 (define-public python2-magic
10648 (package-with-python2 python-magic))
10649
10650 (define-public python2-s3cmd
10651 (package
10652 (name "python2-s3cmd")
10653 (version "1.6.1")
10654 (source
10655 (origin
10656 (method url-fetch)
10657 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10658 "s3cmd-" version ".tar.gz"))
10659 (sha256
10660 (base32
10661 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10662 (build-system python-build-system)
10663 (arguments
10664 ;; s3cmd is written for python2 only and contains no tests.
10665 `(#:python ,python-2
10666 #:tests? #f))
10667 (propagated-inputs
10668 `(("python2-dateutil" ,python2-dateutil)
10669 ;; The python-file package also provides a magic.py module.
10670 ;; This is an unfortunate state of affairs; however, s3cmd
10671 ;; fails to install if it cannot find specifically the
10672 ;; python-magic package. Thus we include it, instead of using
10673 ;; python-file. Ironically, s3cmd sometimes works better
10674 ;; without libmagic bindings at all:
10675 ;; https://github.com/s3tools/s3cmd/issues/198
10676 ("python2-magic" ,python2-magic)))
10677 (home-page "http://s3tools.org/s3cmd")
10678 (synopsis "Command line tool for S3-compatible storage services")
10679 (description
10680 "S3cmd is a command line tool for uploading, retrieving and managing data
10681 in storage services that are compatible with the Amazon Simple Storage
10682 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10683 GnuPG encryption, and more. It also supports management of Amazon's
10684 CloudFront content delivery network.")
10685 (license license:gpl2+)))
10686
10687 (define-public python-pkgconfig
10688 (package
10689 (name "python-pkgconfig")
10690 (version "1.1.0")
10691 (source
10692 (origin
10693 (method url-fetch)
10694 (uri (pypi-uri "pkgconfig" version))
10695 (sha256
10696 (base32
10697 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10698 (build-system python-build-system)
10699 (native-inputs
10700 `(("python-nose" ,python-nose)))
10701 (inputs
10702 `(("pkg-config" ,pkg-config)))
10703 (arguments
10704 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10705 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10706 #:tests? #f
10707 ;; Hard-code the path to pkg-config.
10708 #:phases
10709 (modify-phases %standard-phases
10710 (add-before
10711 'build 'patch
10712 (lambda _
10713 (substitute* "pkgconfig/pkgconfig.py"
10714 (("cmd = 'pkg-config")
10715 (string-append "cmd = '" (which "pkg-config"))))
10716 #t)))))
10717 (home-page "https://github.com/matze/pkgconfig")
10718 (synopsis "Python interface for pkg-config")
10719 (description "This module provides a Python interface to pkg-config. It
10720 can be used to find all pkg-config packages, check if a package exists,
10721 check if a package meets certain version requirements, query CFLAGS and
10722 LDFLAGS and parse the output to build extensions with setup.py.")
10723 (license license:expat)))
10724
10725 (define-public python2-pkgconfig
10726 (package-with-python2 python-pkgconfig))
10727
10728 (define-public python-bz2file
10729 (package
10730 (name "python-bz2file")
10731 (version "0.98")
10732 (source
10733 (origin
10734 (method url-fetch)
10735 (uri (pypi-uri "bz2file" version))
10736 (sha256
10737 (base32
10738 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10739 (build-system python-build-system)
10740 (arguments
10741 `(#:tests? #f)) ; Tests use deprecated python modules.
10742 (home-page "https://github.com/nvawda/bz2file")
10743 (synopsis "Read and write bzip2-compressed files")
10744 (description
10745 "Bz2file is a Python library for reading and writing bzip2-compressed
10746 files. It contains a drop-in replacement for the I/O interface in the
10747 standard library's @code{bz2} module, including features from the latest
10748 development version of CPython that are not available in older releases.")
10749 (license license:asl2.0)
10750 (properties `((python2-variant . ,(delay python2-bz2file))))))
10751
10752 (define-public python2-bz2file
10753 (let ((base (package-with-python2
10754 (strip-python2-variant python-bz2file))))
10755 (package
10756 (inherit base)
10757 (arguments
10758 `(#:python ,python-2
10759 #:phases
10760 (modify-phases %standard-phases
10761 ;; 'python setup.py test' does not work as of 0.98.
10762 ;; There is only the one test file, so we run it directly.
10763 (replace 'check
10764 (lambda _ (zero? (system* "python"
10765 "test_bz2file.py"))))))))))
10766
10767 (define-public python-future
10768 (package
10769 (name "python-future")
10770 (version "0.16.0")
10771 (source
10772 (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "future" version))
10775 (sha256
10776 (base32
10777 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10778 (build-system python-build-system)
10779 ;; Many tests connect to the network or are otherwise flawed.
10780 ;; https://github.com/PythonCharmers/python-future/issues/210
10781 (arguments
10782 `(#:tests? #f))
10783 (home-page "http://python-future.org")
10784 (synopsis "Single-source support for Python 3 and 2")
10785 (description
10786 "@code{python-future} is the missing compatibility layer between Python 2 and
10787 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10788 to support both Python 2 and Python 3 with minimal overhead.")
10789 (license license:expat)))
10790
10791 (define-public python2-future
10792 (package-with-python2 python-future))
10793
10794 (define-public python-cysignals
10795 (package
10796 (name "python-cysignals")
10797 (version "1.1.0")
10798 (source
10799 (origin
10800 (method url-fetch)
10801 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10802 (sha256
10803 (base32
10804 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10805 (build-system python-build-system)
10806 (native-inputs
10807 `(("python-cython" ,python-cython)
10808 ("python-sphinx" ,python-sphinx)))
10809 (inputs
10810 `(("pari-gp" ,pari-gp)))
10811 (arguments
10812 `(#:modules ((guix build python-build-system)
10813 ((guix build gnu-build-system) #:prefix gnu:)
10814 (guix build utils))
10815 ;; FIXME: Tests are executed after installation and currently fail
10816 ;; when not installing into standard locations; the author is working
10817 ;; on a fix.
10818 #:tests? #f
10819 #:phases
10820 (modify-phases %standard-phases
10821 (add-before
10822 'build 'configure
10823 (assoc-ref gnu:%standard-phases 'configure)))))
10824 (home-page
10825 "https://github.com/sagemath/cysignals")
10826 (synopsis
10827 "Handling of interrupts and signals for Cython")
10828 (description
10829 "The cysignals package provides mechanisms to handle interrupts (and
10830 other signals and errors) in Cython code, using two related approaches,
10831 for mixed Cython/Python code or external C libraries and pure Cython code,
10832 respectively.")
10833 (license license:lgpl3+)))
10834
10835 (define-public python2-cysignals
10836 (package-with-python2 python-cysignals))
10837
10838 (define-public python2-shedskin
10839 (package
10840 (name "python2-shedskin")
10841 (version "0.9.4")
10842 (source
10843 (origin
10844 (method url-fetch)
10845 (uri (string-append "https://github.com/shedskin/shedskin/"
10846 "releases/download/v" version
10847 "/shedskin-" version ".tgz"))
10848 (sha256
10849 (base32
10850 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10851 (build-system python-build-system)
10852 (arguments
10853 `(#:python ,python-2
10854 #:phases (modify-phases %standard-phases
10855 (add-after 'unpack 'fix-resulting-include-libs
10856 (lambda* (#:key inputs #:allow-other-keys)
10857 (let ((libgc (assoc-ref inputs "libgc"))
10858 (pcre (assoc-ref inputs "pcre")))
10859 (substitute* "shedskin/makefile.py"
10860 (("variable == 'CCFLAGS':[ ]*")
10861 (string-append "variable == 'CCFLAGS':\n"
10862 " line += ' -I " pcre "/include"
10863 " -I " libgc "/include'"))
10864 (("variable == 'LFLAGS':[ ]*")
10865 (string-append "variable == 'LFLAGS':\n"
10866 " line += ' -L" pcre "/lib"
10867 " -L " libgc "/lib'")))
10868 #t))))))
10869 (inputs `(("pcre" ,pcre)
10870 ("libgc" ,libgc)))
10871 (home-page "https://shedskin.github.io/")
10872 (synopsis "Experimental Python-2 to C++ Compiler")
10873 (description (string-append "This is an experimental compiler for a subset of
10874 Python. It generates C++ code and a Makefile."))
10875 (license (list license:gpl3 license:bsd-3 license:expat))))
10876
10877 (define-public python2-rope
10878 (package
10879 (name "python2-rope")
10880 (version "0.10.3")
10881 (source
10882 (origin
10883 (method url-fetch)
10884 (uri (pypi-uri "rope" version))
10885 (sha256
10886 (base32
10887 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10888 (arguments
10889 ;; Rope is currently python-2 only.
10890 ;; https://github.com/python-rope/rope/issues/57
10891 `(#:python ,python-2))
10892 (build-system python-build-system)
10893 (native-inputs
10894 `(("python2-unittest2" ,python2-unittest2)))
10895 (home-page "https://github.com/python-rope/rope")
10896 (synopsis "Refactoring library for Python")
10897 (description "Rope is a refactoring library for Python. It facilitates
10898 the renaming, moving and extracting of attributes, functions, modules, fields
10899 and parameters in Python 2 source code. These refactorings can also be applied
10900 to occurrences in strings and comments.")
10901 (license license:gpl2)))
10902
10903 (define-public python-py3status
10904 (package
10905 (name "python-py3status")
10906 (version "3.1")
10907 (source
10908 (origin
10909 (method url-fetch)
10910 (uri (pypi-uri "py3status" version))
10911 (sha256
10912 (base32
10913 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10914 (build-system python-build-system)
10915 (arguments
10916 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10917 (home-page "https://github.com/ultrabug/py3status")
10918 (synopsis "Extensible i3status wrapper written in Python")
10919 (description "py3status is an i3status wrapper which extends i3status
10920 functionality in a modular way, allowing you to extend your panel with your
10921 own code, responding to click events and updating clock every second.")
10922 (license license:bsd-3)))
10923
10924 (define-public python-tblib
10925 (package
10926 (name "python-tblib")
10927 (version "1.3.0")
10928 (source (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "tblib" version))
10931 (sha256 (base32
10932 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10933 (build-system python-build-system)
10934 (arguments
10935 `(#:phases
10936 (modify-phases %standard-phases
10937 (replace 'check
10938 (lambda _
10939 ;; Upstream runs tests after installation and the package itself
10940 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10941 ;; found.
10942 (setenv "PYTHONPATH"
10943 (string-append (getcwd) "/build/lib:"
10944 (getenv "PYTHONPATH")))
10945 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10946 (native-inputs
10947 `(("python-pytest" ,python-pytest)
10948 ("python-six" ,python-six)))
10949 (home-page "https://github.com/ionelmc/python-tblib")
10950 (synopsis "Traceback serialization library")
10951 (description
10952 "Traceback serialization allows you to:
10953
10954 @enumerate
10955 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10956 different processes. This allows better error handling when running code over
10957 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10958
10959 @item Parse traceback strings and raise with the parsed tracebacks.
10960 @end enumerate\n")
10961 (license license:bsd-3)))
10962
10963 (define-public python2-tblib
10964 (package-with-python2 python-tblib))
10965
10966 (define-public python-sqlparse
10967 (package
10968 (name "python-sqlparse")
10969 (version "0.1.19")
10970 (source (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "sqlparse" version))
10973 (sha256
10974 (base32
10975 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10976 (build-system python-build-system)
10977 (arguments
10978 `(#:phases
10979 (modify-phases %standard-phases
10980 (replace 'check
10981 (lambda* _
10982 ;; setup.py-integrated 2to3 only affects the build files, but
10983 ;; py.test is using the source files. So we need to convert them
10984 ;; manually.
10985 (when (zero? (system* "python3"))
10986 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10987 (zero? (system* "py.test")))))))
10988 (native-inputs
10989 `(("python-pytest" ,python-pytest)))
10990 (home-page "https://github.com/andialbrecht/sqlparse")
10991 (synopsis "Non-validating SQL parser")
10992 (description "Sqlparse is a non-validating SQL parser for Python. It
10993 provides support for parsing, splitting and formatting SQL statements.")
10994 (license license:bsd-3)))
10995
10996 (define-public python2-sqlparse
10997 (package-with-python2 python-sqlparse))
10998
10999 (define-public python-greenlet
11000 (package
11001 (name "python-greenlet")
11002 (version "0.4.11")
11003 (source (origin
11004 (method url-fetch)
11005 (uri (pypi-uri "greenlet" version))
11006 (sha256
11007 (base32
11008 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11009 (build-system python-build-system)
11010 (home-page "https://greenlet.readthedocs.io/")
11011 (synopsis "Lightweight in-process concurrent programming")
11012 (description
11013 "Greenlet package is a spin-off of Stackless, a version of CPython
11014 that supports micro-threads called \"tasklets\". Tasklets run
11015 pseudo-concurrently (typically in a single or a few OS-level threads) and
11016 are synchronized with data exchanges on \"channels\".")
11017 (license (list license:psfl license:expat))))
11018
11019 (define-public python2-greenlet
11020 (package-with-python2 python-greenlet))
11021
11022 (define-public python-gevent
11023 (package
11024 (name "python-gevent")
11025 (version "1.1.1")
11026 (source (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "gevent" version))
11029 (sha256
11030 (base32
11031 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11032 (modules '((guix build utils)))
11033 (snippet
11034 '(begin
11035 ;; unbunding libev and c-ares
11036 (for-each delete-file-recursively '("libev" "c-ares"))
11037 ;; fixing testsuite
11038 (call-with-output-file "greentest/__init__.py" noop)
11039 (substitute* "greentest/testrunner.py"
11040 (("import util") "from . import util")
11041 (("from util import log") "from .util import log"))))))
11042 (build-system python-build-system)
11043 (propagated-inputs
11044 `(("python-greenlet" ,python-greenlet)))
11045 (native-inputs
11046 `(("python-six" ,python-six)))
11047 (inputs
11048 `(("c-ares" ,c-ares)
11049 ("libev" ,libev)))
11050 (home-page "http://www.gevent.org/")
11051 (synopsis "Coroutine-based network library")
11052 (description
11053 "gevent is a coroutine-based Python networking library that uses greenlet
11054 to provide a high-level synchronous API on top of the libev event loop.")
11055 (license license:expat)))
11056
11057 (define-public python2-gevent
11058 (package-with-python2 python-gevent))
11059
11060 (define-public python-geventhttpclient
11061 (package
11062 (name "python-geventhttpclient")
11063 (version "1.3.1")
11064 (source (origin
11065 (method url-fetch)
11066 (uri (pypi-uri "geventhttpclient" version))
11067 (sha256
11068 (base32
11069 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11070 (modules '((guix build utils)))
11071 (snippet
11072 '(begin
11073 ;; Delete pre-compiled files.
11074 (for-each delete-file (find-files "src/geventhttpclient"
11075 ".*\\.pyc"))
11076 #t))))
11077 (build-system python-build-system)
11078 (arguments
11079 '(#:phases
11080 (modify-phases %standard-phases
11081 (add-after 'unpack 'delete-network-tests
11082 (lambda _
11083 (delete-file "src/geventhttpclient/tests/test_client.py")
11084 #t))
11085 (delete 'check)
11086 (add-after 'install 'check
11087 (lambda* (#:key inputs outputs #:allow-other-keys)
11088 (add-installed-pythonpath inputs outputs)
11089 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11090 (native-inputs
11091 `(("python-pytest" ,python-pytest)))
11092 (propagated-inputs
11093 `(("python-certifi" ,python-certifi)
11094 ("python-gevent" ,python-gevent)
11095 ("python-six" ,python-six)))
11096 (home-page "https://github.com/gwik/geventhttpclient")
11097 (synopsis "HTTP client library for gevent")
11098 (description "@code{python-geventhttpclient} is a high performance,
11099 concurrent HTTP client library for python using @code{gevent}.")
11100 (license license:expat)))
11101
11102 (define-public python2-geventhttpclient
11103 (package-with-python2 python-geventhttpclient))
11104
11105 (define-public python-fastimport
11106 (package
11107 (name "python-fastimport")
11108 (version "0.9.6")
11109 (source
11110 (origin
11111 (method url-fetch)
11112 (uri (pypi-uri "fastimport" version))
11113 (sha256
11114 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11115 (build-system python-build-system)
11116 (home-page "https://github.com/jelmer/python-fastimport")
11117 (synopsis "VCS fastimport parser and generator in Python")
11118 (description "This package provides a parser for and generator of the Git
11119 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11120 format.")
11121 (license license:gpl2+)))
11122
11123 (define-public python2-fastimport
11124 (package-with-python2 python-fastimport))
11125
11126 (define-public python-twisted
11127 (package
11128 (name "python-twisted")
11129 (version "16.2.0")
11130 (source (origin
11131 (method url-fetch)
11132 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11133 (sha256
11134 (base32
11135 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11136 (build-system python-build-system)
11137 (arguments
11138 '(#:tests? #f)) ; FIXME: Some tests are failing.
11139 ;; #:phases
11140 ;; (modify-phases %standard-phases
11141 ;; (replace 'check
11142 ;; (lambda _
11143 ;; (zero? (system* "./bin/trial" "twisted")))))
11144 (propagated-inputs
11145 `(("python-zope-interface" ,python-zope-interface)))
11146 (home-page "https://twistedmatrix.com/")
11147 (synopsis "Asynchronous networking framework written in Python")
11148 (description
11149 "Twisted is an extensible framework for Python programming, with special
11150 focus on event-based network programming and multiprotocol integration.")
11151 (license license:expat)))
11152
11153 (define-public python2-twisted
11154 (package-with-python2 python-twisted))
11155
11156 (define-public python-pika
11157 (package
11158 (name "python-pika")
11159 (version "0.10.0")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "pika" version))
11164 (sha256
11165 (base32
11166 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11167 (build-system python-build-system)
11168 (native-inputs
11169 `(("python-pyev" ,python-pyev)
11170 ("python-tornado" ,python-tornado)
11171 ("python-twisted" ,python-twisted)))
11172 (home-page "https://pika.readthedocs.org")
11173 (synopsis "Pure Python AMQP Client Library")
11174 (description
11175 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11176 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11177 network support library.")
11178 (license license:bsd-3)))
11179
11180 (define-public python2-pika
11181 (package-with-python2 python-pika))
11182
11183 (define-public python-ply
11184 (package
11185 (name "python-ply")
11186 (version "3.9")
11187 (source
11188 (origin
11189 (method url-fetch)
11190 (uri (pypi-uri "ply" version))
11191 (sha256
11192 (base32
11193 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11194 (build-system python-build-system)
11195 (home-page "http://www.dabeaz.com/ply/")
11196 (synopsis "Python Lex & Yacc")
11197 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11198 It uses LR parsing and does extensive error checking.")
11199 (license license:bsd-3)))
11200
11201 (define-public python2-ply
11202 (package-with-python2 python-ply))
11203
11204 (define-public python-tabulate
11205 (package
11206 (name "python-tabulate")
11207 (version "0.7.7")
11208 (source (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "tabulate" version))
11211 (sha256
11212 (base32
11213 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11214 (build-system python-build-system)
11215 (arguments
11216 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11217 ;; and the latest release is not tagged in the upstream repository.
11218 '(#:tests? #f))
11219 (home-page "https://bitbucket.org/astanin/python-tabulate")
11220 (synopsis "Pretty-print tabular data")
11221 (description
11222 "Tabulate is a library and command-line utility to pretty-print tabular
11223 data in Python.")
11224 (license license:expat)))
11225
11226 (define-public python2-tabulate
11227 (package-with-python2 python-tabulate))
11228
11229 (define-public python-kazoo
11230 (package
11231 (name "python-kazoo")
11232 (version "2.2.1")
11233 (source
11234 (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "kazoo" version))
11237 (sha256
11238 (base32
11239 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11240 (build-system python-build-system)
11241 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11242 (propagated-inputs
11243 `(("python-six" ,python-six)))
11244 (home-page "https://kazoo.readthedocs.org")
11245 (synopsis "High-level Zookeeper client library")
11246 (description
11247 "Kazoo is a Python client library for the Apache Zookeeper distributed
11248 application service. It is designed to be easy to use and to avoid common
11249 programming errors.")
11250 (license license:asl2.0)))
11251
11252 (define-public python2-kazoo
11253 (package-with-python2 python-kazoo))
11254
11255 (define-public python-pykafka
11256 (package
11257 (name "python-pykafka")
11258 (version "2.4.0")
11259 (source (origin
11260 (method url-fetch)
11261 (uri (string-append
11262 "https://pypi.python.org/packages/8b/3e/"
11263 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11264 "pykafka-" version ".tar.gz"))
11265 (sha256
11266 (base32
11267 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11268 (build-system python-build-system)
11269 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11270 (propagated-inputs
11271 `(("python-gevent" ,python-gevent)
11272 ("python-kazoo" ,python-kazoo)
11273 ("python-tabulate" ,python-tabulate)))
11274 (inputs
11275 `(("librdkafka" ,librdkafka)))
11276 (home-page "https://pykafka.readthedocs.io/")
11277 (synopsis "Apache Kafka client for Python")
11278 (description
11279 "PyKafka is a client for the Apache Kafka distributed messaging system.
11280 It includes Python implementations of Kafka producers and consumers, which
11281 are optionally backed by a C extension built on librdkafka.")
11282 (license license:asl2.0)))
11283
11284 (define-public python2-pykafka
11285 (package-with-python2 python-pykafka))
11286
11287 (define-public python-wcwidth
11288 (package
11289 (name "python-wcwidth")
11290 (version "0.1.7")
11291 (source
11292 (origin
11293 (method url-fetch)
11294 (uri (pypi-uri "wcwidth" version))
11295 (sha256
11296 (base32
11297 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11298 (build-system python-build-system)
11299 (home-page "https://github.com/jquast/wcwidth")
11300 (synopsis "Measure number of terminal column cells of wide-character codes")
11301 (description "Wcwidth measures the number of terminal column cells of
11302 wide-character codes. It is useful for those implementing a terminal emulator,
11303 or programs that carefully produce output to be interpreted by one. It is a
11304 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11305 specified in POSIX.1-2001 and POSIX.1-2008.")
11306 (license license:expat)))
11307
11308 (define-public python2-wcwidth
11309 (package-with-python2 python-wcwidth))
11310
11311 (define-public python2-jsonrpclib
11312 (package
11313 (name "python2-jsonrpclib")
11314 (version "0.1.7")
11315 (source (origin
11316 (method url-fetch)
11317 (uri (string-append
11318 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11319 "jsonrpclib-" version ".tar.gz"))
11320 (sha256
11321 (base32
11322 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11323 (build-system python-build-system)
11324 (arguments
11325 `(#:tests? #f
11326 #:python ,python-2))
11327 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11328 (synopsis "Implementation of JSON-RPC specification for Python")
11329 (description
11330 "This library is an implementation of the JSON-RPC specification.
11331 It supports both the original 1.0 specification, as well as the
11332 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11333 etc.")
11334 (license license:asl2.0)))
11335
11336 (define-public python-chai
11337 (package
11338 (name "python-chai")
11339 (version "1.1.1")
11340 (source (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "chai" version))
11343 (sha256
11344 (base32
11345 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11346 (build-system python-build-system)
11347 (home-page "https://github.com/agoragames/chai")
11348 (synopsis "Mocking framework for Python")
11349 (description
11350 "Chai provides an api for mocking, stubbing and spying your python
11351 objects, patterned after the Mocha library for Ruby.")
11352 (license license:bsd-3)))
11353
11354 (define-public python2-chai
11355 (package-with-python2 python-chai))
11356
11357 (define-public python-arrow
11358 (package
11359 (name "python-arrow")
11360 (version "0.8.0")
11361 (source (origin
11362 (method url-fetch)
11363 (uri (pypi-uri "arrow" version))
11364 (sha256
11365 (base32
11366 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11367 (build-system python-build-system)
11368 (native-inputs
11369 `(;; For testing
11370 ("python-chai" ,python-chai)
11371 ("python-simplejson" ,python-simplejson)))
11372 (propagated-inputs
11373 `(("python-dateutil" ,python-dateutil)))
11374 (home-page "https://github.com/crsmithdev/arrow/")
11375 (synopsis "Dates and times for Python")
11376 (description
11377 "Arrow is a Python library to creating, manipulating, formatting and
11378 converting dates, times, and timestamps. It implements and updates the
11379 datetime type.")
11380 (license license:asl2.0)))
11381
11382 (define-public python2-arrow
11383 (package-with-python2 python-arrow))
11384
11385 (define-public python-inflection
11386 (package
11387 (name "python-inflection")
11388 (version "0.3.1")
11389 (source
11390 (origin (method url-fetch)
11391 (uri (pypi-uri "inflection" version))
11392 (sha256
11393 (base32
11394 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11395 (build-system python-build-system)
11396 (native-inputs
11397 `(("python-pytest" ,python-pytest)))
11398 (home-page "https://github.com/jpvanhal/inflection")
11399 (synopsis "Python string transformation library")
11400 (description
11401 "Inflection is a string transformation library. It singularizes
11402 and pluralizes English words, and transforms strings from CamelCase to
11403 underscored string.")
11404 (license license:expat)))
11405
11406 (define-public python2-inflection
11407 (package-with-python2 python-inflection))
11408
11409 (define-public python-pylev
11410 (package
11411 (name "python-pylev")
11412 (version "1.3.0")
11413 (source (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "pylev" version))
11416 (sha256
11417 (base32
11418 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11419 (build-system python-build-system)
11420 (home-page "https://github.com/toastdriven/pylev")
11421 (synopsis "Levenshtein distance implementation in Python")
11422 (description "Pure Python Levenshtein implementation, based off the
11423 Wikipedia code samples at
11424 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11425 (license license:bsd-3)))
11426
11427 (define-public python2-pylev
11428 (package-with-python2 python-pylev))
11429
11430 (define-public python-cleo
11431 (package
11432 (name "python-cleo")
11433 (version "0.4.1")
11434 (source (origin
11435 (method url-fetch)
11436 (uri (pypi-uri "cleo" version))
11437 (sha256
11438 (base32
11439 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11440 (build-system python-build-system)
11441 (native-inputs
11442 `(;; For testing
11443 ("python-mock" ,python-mock)
11444 ("python-pytest" ,python-pytest)))
11445 (propagated-inputs
11446 `(("python-psutil" ,python-psutil)
11447 ("python-pylev" ,python-pylev)))
11448 (home-page "https://github.com/sdispater/cleo")
11449 (synopsis "Command-line arguments library for Python")
11450 (description
11451 "Cleo allows you to create command-line commands with signature in
11452 docstring and colored output.")
11453 (license license:expat)))
11454
11455 (define-public python2-cleo
11456 (package-with-python2 python-cleo))
11457
11458 (define-public python-lazy-object-proxy
11459 (package
11460 (name "python-lazy-object-proxy")
11461 (version "1.2.2")
11462 (source (origin
11463 (method url-fetch)
11464 (uri (pypi-uri "lazy-object-proxy" version))
11465 (sha256
11466 (base32
11467 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11468 (build-system python-build-system)
11469 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11470 (synopsis "Lazy object proxy for python")
11471 (description
11472 "Lazy object proxy is an object that wraps a callable but defers the call
11473 until the object is actually required, and caches the result of said call.")
11474 (license license:bsd-2)))
11475
11476 (define-public python2-lazy-object-proxy
11477 (package-with-python2 python-lazy-object-proxy))
11478
11479 (define-public python-dnspython
11480 (package
11481 (name "python-dnspython")
11482 (version "1.15.0")
11483 (source (origin
11484 (method url-fetch)
11485 (uri (string-append "http://www.dnspython.org/kits/"
11486 version "/dnspython-" version ".tar.gz"))
11487 (sha256
11488 (base32
11489 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11490 (build-system python-build-system)
11491 (arguments '(#:tests? #f)) ; XXX: requires internet access
11492 (home-page "http://www.dnspython.org")
11493 (synopsis "DNS toolkit for Python")
11494 (description
11495 "dnspython is a DNS toolkit for Python. It supports almost all record
11496 types. It can be used for queries, zone transfers, and dynamic updates.
11497 It supports TSIG authenticated messages and EDNS0.")
11498 (license license:expat)))
11499
11500 (define-public python2-dnspython
11501 (package-with-python2 python-dnspython))
11502
11503 (define-public python-email-validator
11504 (package
11505 (name "python-email-validator")
11506 (version "1.0.2")
11507 (source
11508 (origin (method url-fetch)
11509 (uri (pypi-uri "email_validator" version))
11510 (sha256
11511 (base32
11512 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11513 (build-system python-build-system)
11514 (arguments
11515 '(#:phases
11516 (modify-phases %standard-phases
11517 (add-before 'build 'use-dnspython
11518 (lambda _
11519 (substitute* "setup.py"
11520 (("dnspython3") "dnspython"))
11521 #t)))))
11522 (propagated-inputs
11523 `(("python-dnspython" ,python-dnspython)
11524 ("python-idna" ,python-idna)))
11525 (home-page "https://github.com/JoshData/python-email-validator")
11526 (synopsis "Email address validation library for Python")
11527 (description
11528 "This library validates email address syntax and deliverability.")
11529 (license license:cc0)))
11530
11531 (define-public python2-email-validator
11532 (package-with-python2 python-email-validator))
11533
11534 (define-public python-ukpostcodeparser
11535 (package
11536 (name "python-ukpostcodeparser")
11537 (version "1.0.3")
11538 (source (origin
11539 (method url-fetch)
11540 (uri (pypi-uri "UkPostcodeParser" version))
11541 (sha256
11542 (base32
11543 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11544 (build-system python-build-system)
11545 (home-page "https://github.com/hamstah/ukpostcodeparser")
11546 (synopsis "UK Postcode parser for Python")
11547 (description
11548 "This library provides the @code{parse_uk_postcode} function for
11549 parsing UK postcodes.")
11550 (license license:expat)))
11551
11552 (define-public python2-ukpostcodeparser
11553 (package-with-python2 python-ukpostcodeparser))
11554
11555 (define-public python-faker
11556 (package
11557 (name "python-faker")
11558 (version "0.7.9")
11559 (source (origin
11560 (method url-fetch)
11561 (uri (pypi-uri "Faker" version))
11562 (sha256
11563 (base32
11564 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11565 (patches
11566 (search-patches "python-faker-fix-build-32bit.patch"))
11567 (modules '((guix build utils)))
11568 (snippet
11569 '(begin
11570 (for-each delete-file (find-files "." "\\.pyc$"))
11571 #t))))
11572 (build-system python-build-system)
11573 (arguments
11574 '(#:phases
11575 (modify-phases %standard-phases
11576 (replace 'check
11577 (lambda _
11578 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11579 (native-inputs
11580 `(;; For testing
11581 ("python-email-validator" ,python-email-validator)
11582 ("python-mock" ,python-mock)
11583 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11584 (propagated-inputs
11585 `(("python-dateutil" ,python-dateutil)
11586 ("python-six" ,python-six)))
11587 (home-page "https://github.com/joke2k/faker")
11588 (synopsis "Python package that generates fake data")
11589 (description
11590 "Faker is a Python package that generates fake data such as names,
11591 addresses, and phone numbers.")
11592 (license license:expat)
11593 (properties `((python2-variant . ,(delay python2-faker))))))
11594
11595 (define-public python2-faker
11596 (let ((base (package-with-python2 (strip-python2-variant
11597 python-faker))))
11598 (package
11599 (inherit base)
11600 (propagated-inputs
11601 `(("python2-ipaddress" ,python2-ipaddress)
11602 ,@(package-propagated-inputs base))))))
11603
11604 (define-public python-fake-factory
11605 (package
11606 (name "python-fake-factory")
11607 (version "0.7.2")
11608 (source (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "fake-factory" version))
11611 (sha256
11612 (base32
11613 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11614 (patches
11615 (search-patches
11616 "python-fake-factory-fix-build-32bit.patch"))))
11617 (build-system python-build-system)
11618 (arguments
11619 '(#:phases
11620 (modify-phases %standard-phases
11621 (replace 'check
11622 (lambda _
11623 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11624 (native-inputs
11625 `(;; For testing
11626 ("python-email-validator" ,python-email-validator)
11627 ("python-mock" ,python-mock)
11628 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11629 (propagated-inputs
11630 `(("python-dateutil" ,python-dateutil)
11631 ("python-six" ,python-six)))
11632 (home-page "https://github.com/joke2k/faker")
11633 (synopsis "Python package that generates fake data")
11634 (description
11635 "Faker is a Python package that generates fake data such as names,
11636 addresses, and phone numbers.")
11637 (license license:expat)
11638 (properties `((python2-variant . ,(delay python2-fake-factory))
11639 (superseded . ,python-faker)))))
11640
11641 (define-public python2-fake-factory
11642 (let ((base (package-with-python2 (strip-python2-variant
11643 python-fake-factory))))
11644 (package
11645 (inherit base)
11646 (properties `((superseded . ,python2-faker)))
11647 (propagated-inputs
11648 `(("python2-ipaddress" ,python2-ipaddress)
11649 ,@(package-propagated-inputs base))))))
11650
11651 (define-public python-pyaml
11652 (package
11653 (name "python-pyaml")
11654 (version "15.8.2")
11655 (source (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "pyaml" version))
11658 (sha256
11659 (base32
11660 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11661 (build-system python-build-system)
11662 (native-inputs
11663 `(("python-unidecode" ,python-unidecode)))
11664 (propagated-inputs
11665 `(("python-pyyaml" ,python-pyyaml)))
11666 (home-page "https://github.com/mk-fg/pretty-yaml")
11667 (synopsis "YAML pretty-print library for Python")
11668 (description
11669 "pyaml is a PyYAML based python module to produce pretty and readable
11670 YAML-serialized data.")
11671 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11672
11673 (define-public python2-pyaml
11674 (package-with-python2 python-pyaml))
11675
11676 (define-public python-flexmock
11677 (package
11678 (name "python-flexmock")
11679 (version "0.10.2")
11680 (source (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "flexmock" version))
11683 (sha256
11684 (base32
11685 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11686 (build-system python-build-system)
11687 (home-page "https://flexmock.readthedocs.org")
11688 (synopsis "Testing library for Python")
11689 (description
11690 "flexmock is a testing library for Python that makes it easy to create
11691 mocks, stubs and fakes.")
11692 (license license:bsd-3)))
11693
11694 (define-public python2-flexmock
11695 (package-with-python2 python-flexmock))
11696
11697 (define-public python-orator
11698 (package
11699 (name "python-orator")
11700 (version "0.8.2")
11701 (source (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "orator" version))
11704 (sha256
11705 (base32
11706 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11707 (build-system python-build-system)
11708 (arguments '(#:tests? #f)) ; no tests
11709 (propagated-inputs
11710 `(("python-arrow" ,python-arrow)
11711 ("python-blinker" ,python-blinker)
11712 ("python-cleo" ,python-cleo)
11713 ("python-faker" ,python-faker)
11714 ("python-inflection" ,python-inflection)
11715 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11716 ("python-pyaml" ,python-pyaml)
11717 ("python-simplejson" ,python-simplejson)
11718 ("python-wrapt" ,python-wrapt)))
11719 (home-page "https://orator-orm.com/")
11720 (synopsis "ActiveRecord ORM for Python")
11721 (description
11722 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11723 implementation for Python.")
11724 (license license:expat)
11725 (properties `((python2-variant . ,(delay python2-orator))))))
11726
11727 (define-public python2-orator
11728 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11729 (package
11730 (inherit base)
11731 (propagated-inputs
11732 `(("python2-ipaddress" ,python2-ipaddress)
11733 ,@(package-propagated-inputs base))))))
11734
11735 (define-public python-prompt-toolkit
11736 (package
11737 (name "python-prompt-toolkit")
11738 (version "1.0.9")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11743 (sha256
11744 (base32
11745 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11746 (build-system python-build-system)
11747 (arguments
11748 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11749 (propagated-inputs
11750 `(("python-wcwidth" ,python-wcwidth)
11751 ("python-six" ,python-six)
11752 ("python-pygments" ,python-pygments)))
11753 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11754 (synopsis "Library for building command line interfaces in Python")
11755 (description
11756 "Prompt-Toolkit is a library for building interactive command line
11757 interfaces in Python. It's like GNU Readline but it also features syntax
11758 highlighting while typing, out-of-the-box multi-line input editing, advanced
11759 code completion, incremental search, support for Chinese double-width
11760 characters, mouse support, and auto suggestions.")
11761 (license license:bsd-3)))
11762
11763 (define-public python2-prompt-toolkit
11764 (package-with-python2 python-prompt-toolkit))
11765
11766 (define-public python-jedi
11767 (package
11768 (name "python-jedi")
11769 (version "0.9.0")
11770 (source
11771 (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "jedi" version))
11774 (sha256
11775 (base32
11776 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11777 (build-system python-build-system)
11778 (arguments
11779 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11780 '(#:tests? #f))
11781 (native-inputs
11782 `(("python-pytest" ,python-pytest)))
11783 (home-page "https://github.com/davidhalter/jedi")
11784 (synopsis
11785 "Autocompletion for Python that can be used for text editors")
11786 (description
11787 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11788 (license license:expat)))
11789
11790 (define-public python2-jedi
11791 (package-with-python2 python-jedi))
11792
11793 (define-public ptpython
11794 (package
11795 (name "ptpython")
11796 (version "0.34")
11797 (source (origin
11798 (method url-fetch)
11799 (uri (pypi-uri "ptpython" version))
11800 (sha256
11801 (base32
11802 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11803 (build-system python-build-system)
11804 (arguments
11805 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11806 (propagated-inputs
11807 `(("python-docopt" ,python-docopt)
11808 ("python-jedi" ,python-jedi)
11809 ("python-prompt-toolkit" ,python-prompt-toolkit)
11810 ("python-pygments" ,python-pygments)))
11811 (home-page "https://github.com/jonathanslenders/ptpython")
11812 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11813 (description
11814 "ptpython is a Python read-eval-print loop with IDE-like features.
11815 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11816 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11817 etc.")
11818 (license license:bsd-3)
11819 (properties `((python2-variant . ,(delay ptpython-2))))))
11820
11821 (define-public ptpython-2
11822 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11823 (package
11824 (inherit base)
11825 (name "ptpython2"))))
11826
11827 (define-public python-requests-oauthlib
11828 (package
11829 (name "python-requests-oauthlib")
11830 (version "0.6.2")
11831 (source
11832 (origin
11833 (method url-fetch)
11834 (uri (pypi-uri "requests-oauthlib" version))
11835 (sha256
11836 (base32
11837 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11838 (build-system python-build-system)
11839 (arguments
11840 `(#:phases
11841 (modify-phases %standard-phases
11842 ;; removes tests that require network access
11843 (add-before 'check 'pre-check
11844 (lambda _
11845 (delete-file "tests/test_core.py")
11846 #t)))))
11847 (native-inputs
11848 `(("python-requests-mock" ,python-requests-mock)
11849 ("python-mock" ,python-mock)))
11850 (propagated-inputs
11851 `(("python-oauthlib" ,python-oauthlib)
11852 ("python-requests" ,python-requests)))
11853 (home-page
11854 "https://github.com/requests/requests-oauthlib")
11855 (synopsis
11856 "OAuthlib authentication support for Requests")
11857 (description
11858 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11859 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11860 (license license:isc)))
11861
11862 (define-public python2-requests-oauthlib
11863 (package-with-python2 python-requests-oauthlib))
11864
11865 (define-public python-stem
11866 (package
11867 (name "python-stem")
11868 (version "1.5.4")
11869 (source
11870 (origin
11871 (method url-fetch)
11872 (uri (pypi-uri "stem" version))
11873 (sha256
11874 (base32
11875 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11876 (build-system python-build-system)
11877 (arguments
11878 `(#:phases
11879 (modify-phases %standard-phases
11880 (replace 'check
11881 (lambda _
11882 (zero? (system* "./run_tests.py" "--unit")))))))
11883 (native-inputs
11884 `(("python-mock" ,python-mock)
11885 ("python-pep8" ,python-pep8)
11886 ("python-pyflakes" ,python-pyflakes)))
11887 (home-page "https://stem.torproject.org/")
11888 (synopsis
11889 "Python controller library that allows applications to interact with Tor")
11890 (description
11891 "Stem is a Python controller library for Tor. With it you can use Tor's
11892 control protocol to script against the Tor process and read descriptor data
11893 relays publish about themselves.")
11894 (license license:lgpl3)))
11895
11896 (define-public python2-stem
11897 (package-with-python2 python-stem))
11898
11899 (define-public python-pyserial
11900 (package
11901 (name "python-pyserial")
11902 (version "3.1.1")
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "pyserial" version))
11907 (sha256
11908 (base32
11909 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11910 (build-system python-build-system)
11911 (arguments
11912 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11913 ;; #:phases
11914 ;; (modify-phases %standard-phases
11915 ;; (replace 'check
11916 ;; (lambda _
11917 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11918 (home-page
11919 "https://github.com/pyserial/pyserial")
11920 (synopsis "Python Serial Port Bindings")
11921 (description "@code{pyserial} provide serial port bindings for Python. It
11922 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11923 and/or Xon/Xoff. The port is accessed in RAW mode.")
11924 (license license:bsd-3)))
11925
11926 (define-public python2-pyserial
11927 (package-with-python2 python-pyserial))
11928
11929 (define-public python-kivy
11930 (package
11931 (name "python-kivy")
11932 (version "1.9.1")
11933 (source
11934 (origin
11935 (method url-fetch)
11936 (uri (pypi-uri "kivy" version))
11937 (file-name (string-append name "-" version ".tar.gz"))
11938 (sha256
11939 (base32
11940 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11941 (build-system python-build-system)
11942 (arguments
11943 `(#:tests? #f ; Tests require many optional packages
11944 #:phases
11945 (modify-phases %standard-phases
11946 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11947 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11948 (lambda* (#:key inputs #:allow-other-keys)
11949 (setenv "KIVY_SDL2_PATH"
11950 (string-append (assoc-ref inputs "sdl-union")
11951 "/include/SDL2"))
11952 #t)))))
11953 (native-inputs
11954 `(("pkg-config" ,pkg-config)
11955 ("python-cython" ,python-cython)))
11956 (inputs
11957 `(("gstreamer" ,gstreamer)
11958 ("mesa" ,mesa)
11959 ("sdl-union"
11960 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11961 (home-page "http://kivy.org")
11962 (synopsis
11963 "Multitouch application framework")
11964 (description
11965 "A software library for rapid development of
11966 hardware-accelerated multitouch applications.")
11967 (license license:expat)))
11968
11969 (define-public python2-kivy
11970 (package-with-python2 python-kivy))
11971
11972 (define-public python-kivy-next
11973 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11974 (revision "1"))
11975 (package (inherit python-kivy)
11976 (name "python-kivy-next")
11977 (version (string-append "1.9.1-" revision "."
11978 (string-take commit 7)))
11979 (source
11980 (origin
11981 (method git-fetch)
11982 (uri (git-reference
11983 (url "https://github.com/kivy/kivy")
11984 (commit commit)))
11985 (file-name (string-append name "-" version "-checkout"))
11986 (sha256
11987 (base32
11988 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11989
11990 (define-public python2-kivy-next
11991 (package-with-python2 python-kivy-next))
11992
11993 (define-public python-binaryornot
11994 (package
11995 (name "python-binaryornot")
11996 (version "0.4.0")
11997 (source (origin
11998 (method url-fetch)
11999 (uri (pypi-uri "binaryornot" version))
12000 (sha256
12001 (base32
12002 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12003 (build-system python-build-system)
12004 (propagated-inputs
12005 `(("python-chardet" ,python-chardet)
12006 ("python-hypothesis" ,python-hypothesis)))
12007 (home-page "https://github.com/audreyr/binaryornot")
12008 (synopsis "Package to check if a file is binary or text")
12009 (description "Ultra-lightweight pure Python package to check if a file is
12010 binary or text.")
12011 (license license:bsd-3)
12012 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12013
12014 (define-public python2-binaryornot
12015 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12016 (package (inherit base)
12017 (propagated-inputs
12018 `(("python2-enum34" ,python2-enum34)
12019 ,@(package-propagated-inputs base))))))
12020
12021 (define-public python-nltk
12022 (package
12023 (name "python-nltk")
12024 (version "3.2.1")
12025 (source (origin
12026 (method url-fetch)
12027 (uri (pypi-uri "nltk" version))
12028 (sha256
12029 (base32
12030 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12031 (build-system python-build-system)
12032 (arguments
12033 '(;; The tests require some extra resources to be downloaded.
12034 ;; TODO Try packaging these resources.
12035 #:tests? #f))
12036 (home-page "http://nltk.org/")
12037 (synopsis "Natural Language Toolkit")
12038 (description "It provides interfaces to over 50 corpora and lexical
12039 resources such as WordNet, along with a suite of text processing libraries
12040 for classification, tokenization, stemming, tagging, parsing, and semantic
12041 reasoning, wrappers for natural language processing libraries.")
12042 (license license:asl2.0)))
12043
12044 (define-public python2-nltk
12045 (package-with-python2 python-nltk))
12046
12047 (define-public python-pymongo
12048 (package
12049 (name "python-pymongo")
12050 (version "3.3.0")
12051 (source (origin
12052 (method url-fetch)
12053 (uri (pypi-uri "pymongo" version))
12054 (sha256
12055 (base32
12056 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12057 (build-system python-build-system)
12058 (propagated-inputs
12059 `(("python-certifi" ,python-certifi)))
12060 (home-page "https://github.com/mongodb/mongo-python-driver")
12061 (synopsis "Python driver for MongoDB")
12062 (description "Python driver for MongoDB.")
12063 (license license:asl2.0)))
12064
12065 (define-public python2-pymongo
12066 (package-with-python2 python-pymongo))
12067
12068 (define-public python-sh
12069 (package
12070 (name "python-sh")
12071 (version "1.11")
12072 (source (origin
12073 (method url-fetch)
12074 (uri (pypi-uri "sh" version))
12075 (sha256
12076 (base32
12077 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12078 (build-system python-build-system)
12079 (arguments
12080 `(#:tests? #f)) ; no tests
12081 (home-page "https://github.com/amoffat/sh")
12082 (synopsis "Python subprocess interface")
12083 (description "Abstracts process invocation by providing a function
12084 interface for programs.")
12085 (license license:expat)))
12086
12087 (define-public python2-sh
12088 (package-with-python2 python-sh))
12089
12090 (define-public python-consul
12091 (package
12092 (name "python-consul")
12093 (version "0.6.1")
12094 (source
12095 (origin
12096 (method url-fetch)
12097 (uri (pypi-uri "python-consul" version))
12098 (sha256
12099 (base32
12100 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12101 (build-system python-build-system)
12102 (native-inputs
12103 `(("python-pytest" ,python-pytest)))
12104 (propagated-inputs
12105 `(("python-requests" ,python-requests)
12106 ("python-six" ,python-six)))
12107 (home-page "https://github.com/cablehead/python-consul")
12108 (synopsis "Python client for Consul")
12109 (description
12110 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12111 discovery, monitoring and configuration.")
12112 (license license:expat)))
12113
12114 (define-public python2-consul
12115 (package-with-python2 python-consul))
12116
12117 (define-public python-schematics
12118 (package
12119 (name "python-schematics")
12120 (version "1.1.1")
12121 (source
12122 (origin
12123 (method url-fetch)
12124 (uri (string-append
12125 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12126 (file-name (string-append name "-" version ".tar.gz"))
12127 (sha256
12128 (base32
12129 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12130 (build-system python-build-system)
12131 (propagated-inputs
12132 `(("python-six" ,python-six)))
12133 (arguments
12134 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12135 ; version requirements (eg python-coveralls)
12136 (home-page "https://github.com/schematics/schematics")
12137 (synopsis "Python Data Structures for Humans")
12138 (description "Python Data Structures for Humans.")
12139 (license license:bsd-3)))
12140
12141 (define-public python2-schematics
12142 (package-with-python2 python-schematics))
12143
12144 (define-public python-publicsuffix
12145 (package
12146 (name "python-publicsuffix")
12147 (version "1.1.0")
12148 (source (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "publicsuffix" version))
12151 (sha256
12152 (base32
12153 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12154 (build-system python-build-system)
12155 (arguments
12156 `(#:tests? #f)) ; tests use the internet
12157 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12158 (synopsis "Get suffix for a domain name")
12159 (description "Get a public suffix for a domain name using the Public Suffix
12160 List.")
12161 (license license:expat)))
12162
12163 (define-public python2-publicsuffix
12164 (package-with-python2 python-publicsuffix))
12165
12166 (define-public python-publicsuffix2
12167 (package
12168 (name "python-publicsuffix2")
12169 (version "2.20160818")
12170 (source
12171 (origin
12172 (method url-fetch)
12173 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12174 (sha256
12175 (base32
12176 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12177 (build-system python-build-system)
12178 (arguments
12179 '(#:tests? #f)) ; The test suite requires network access.
12180 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12181 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12182 (description "Get a public suffix for a domain name using the Public Suffix
12183 List. Forked from and using the same API as the publicsuffix package.")
12184 (license (list license:expat license:mpl2.0))))
12185
12186 (define-public python2-publicsuffix2
12187 (package-with-python2 python-publicsuffix2))
12188
12189 (define-public python-url
12190 (package
12191 (name "python-url")
12192 (version "0.2.0")
12193 (source (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "url" version))
12196 (sha256
12197 (base32
12198 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12199 (build-system python-build-system)
12200 (propagated-inputs
12201 `(("python-publicsuffix" ,python-publicsuffix)))
12202 (native-inputs
12203 `(("python-coverage" ,python-coverage)
12204 ("python-nose" ,python-nose)))
12205 (arguments
12206 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12207 (home-page "https://github.com/seomoz/url-py")
12208 (synopsis "URL Parsing")
12209 (description "Library for parsing urls.")
12210 (license license:expat)
12211 (properties `((python2-variant . ,(delay python2-url))))))
12212
12213 (define-public python2-url
12214 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12215 (package (inherit base)
12216 (propagated-inputs
12217 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12218
12219 (define-public python-freezegun
12220 (package
12221 (name "python-freezegun")
12222 (version "0.3.8")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "freezegun" version))
12227 (sha256
12228 (base32
12229 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12230 (build-system python-build-system)
12231 (native-inputs
12232 `(("python-mock" ,python-mock)
12233 ("python-nose" ,python-nose)
12234 ("python-coverage" ,python-coverage)))
12235 (propagated-inputs
12236 `(("python-six" ,python-six)
12237 ("python-dateutil" ,python-dateutil)))
12238 (arguments
12239 `(#:phases (modify-phases %standard-phases
12240 ;; The tests are normally executed via `make test`, but the PyPi
12241 ;; package does not include the Makefile.
12242 (replace 'check
12243 (lambda _
12244 (zero? (system* "nosetests" "./tests/")))))))
12245 (home-page "https://github.com/spulec/freezegun")
12246 (synopsis "Test utility for mocking the datetime module")
12247 (description
12248 "FreezeGun is a library that allows your python tests to travel through
12249 time by mocking the datetime module.")
12250 (license license:asl2.0)))
12251
12252 (define-public python2-freezegun
12253 (package-with-python2 python-freezegun))
12254
12255
12256 (define-public python-odfpy
12257 (package
12258 (name "python-odfpy")
12259 (version "1.3.3")
12260 (source (origin
12261 (method url-fetch)
12262 (uri (pypi-uri "odfpy" version))
12263 (sha256
12264 (base32
12265 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12266 (arguments
12267 `(#:modules ((srfi srfi-1)
12268 (guix build python-build-system)
12269 (guix build utils))
12270 #:phases
12271 (modify-phases %standard-phases
12272 (replace 'check
12273 ;; The test runner invokes python2 and python3 for test*.py.
12274 ;; To avoid having both in inputs, we replicate it here.
12275 (lambda _
12276 (every (lambda (test-file)
12277 (zero? (system* "python" test-file)))
12278 (find-files "tests" "^test.*\\.py$")))))))
12279 (build-system python-build-system)
12280 (home-page "https://github.com/eea/odfpy")
12281 (synopsis "Python API and tools to manipulate OpenDocument files")
12282 (description "Collection of libraries and utility programs written in
12283 Python to manipulate OpenDocument 1.2 files.")
12284 (license
12285 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12286 ;; number of files with other licenses.
12287 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12288
12289 (define-public python2-odfpy
12290 (package-with-python2 python-odfpy))
12291
12292 (define-public python-cachecontrol
12293 (package
12294 (name "python-cachecontrol")
12295 (version "0.11.6")
12296 (source
12297 (origin
12298 (method url-fetch)
12299 ;; Pypi does not have tests.
12300 (uri (string-append
12301 "https://github.com/ionrock/cachecontrol/archive/v"
12302 version ".tar.gz"))
12303 (file-name (string-append name "-" version ".tar.gz"))
12304 (sha256
12305 (base32
12306 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12307 (build-system python-build-system)
12308 (arguments
12309 `(#:phases
12310 (modify-phases %standard-phases
12311 (replace 'check
12312 (lambda _
12313 ;; Drop test that requires internet access.
12314 (delete-file "tests/test_regressions.py")
12315 (setenv "PYTHONPATH"
12316 (string-append (getcwd) "/build/lib:"
12317 (getenv "PYTHONPATH")))
12318 (zero? (system* "py.test" "-vv")))))))
12319 (native-inputs
12320 `(("python-pytest" ,python-pytest)
12321 ("python-redis" ,python-redis)
12322 ("python-webtest" ,python-webtest)
12323 ("python-mock" ,python-mock)))
12324 (propagated-inputs
12325 `(("python-requests" ,python-requests)
12326 ("python-lockfile" ,python-lockfile)))
12327 (home-page "https://github.com/ionrock/cachecontrol")
12328 (synopsis "The httplib2 caching algorithms for use with requests")
12329 (description "CacheControl is a port of the caching algorithms in
12330 @code{httplib2} for use with @code{requests} session objects.")
12331 (license license:asl2.0)))
12332
12333 (define-public python2-cachecontrol
12334 (package-with-python2 python-cachecontrol))
12335
12336 (define-public python-lit
12337 (package
12338 (name "python-lit")
12339 (version "0.5.0")
12340 (source
12341 (origin
12342 (method url-fetch)
12343 (uri (pypi-uri "lit" version))
12344 (sha256
12345 (base32
12346 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12347 (build-system python-build-system)
12348 (home-page "http://llvm.org/")
12349 (synopsis "LLVM Software Testing Tool")
12350 (description "@code{lit} is a portable tool for executing LLVM and Clang
12351 style test suites, summarizing their results, and providing indication of
12352 failures.")
12353 (license license:ncsa)))
12354
12355 (define-public python2-lit
12356 (package-with-python2 python-lit))
12357
12358 (define-public python-pytest-pep8
12359 (package
12360 (name "python-pytest-pep8")
12361 (version "1.0.6")
12362 (source (origin
12363 (method url-fetch)
12364 (uri (pypi-uri "pytest-pep8" version))
12365 (sha256
12366 (base32
12367 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12368 (build-system python-build-system)
12369 (arguments
12370 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12371 (native-inputs
12372 `(("python-pytest" ,python-pytest)))
12373 (propagated-inputs
12374 `(("python-pep8" ,python-pep8)))
12375 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12376 (synopsis "Py.test plugin to check PEP8 requirements")
12377 (description "Pytest plugin for checking PEP8 compliance.")
12378 (license license:expat)))
12379
12380 (define-public python2-pytest-pep8
12381 (package-with-python2 python-pytest-pep8))
12382
12383 (define-public python-pytest-flakes
12384 (package
12385 (name "python-pytest-flakes")
12386 (version "1.0.1")
12387 (source (origin
12388 (method url-fetch)
12389 (uri (pypi-uri "pytest-flakes" version))
12390 (sha256
12391 (base32
12392 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12393 (build-system python-build-system)
12394 (arguments
12395 `(#:phases
12396 (modify-phases %standard-phases
12397 (delete 'check)
12398 (add-after 'install 'check
12399 (lambda* (#:key outputs inputs #:allow-other-keys)
12400 ;; It's easier to run tests after install.
12401 ;; Make installed package available for running the tests
12402 (add-installed-pythonpath inputs outputs)
12403 (zero? (system* "py.test" "-vv")))))))
12404 (native-inputs
12405 `(("python-coverage" ,python-coverage)
12406 ("python-pytest" ,python-pytest)
12407 ("python-pytest-cache" ,python-pytest-cache)
12408 ("python-pytest-pep8" ,python-pytest-pep8)))
12409 (propagated-inputs
12410 `(("python-pyflakes" ,python-pyflakes)))
12411 (home-page "https://github.com/fschulze/pytest-flakes")
12412 (synopsis "Py.test plugin to check source code with pyflakes")
12413 (description "Pytest plugin for checking Python source code with pyflakes.")
12414 (license license:expat)))
12415
12416 (define-public python2-pytest-flakes
12417 (package-with-python2 python-pytest-flakes))
12418
12419 (define-public python-natsort
12420 (package
12421 (name "python-natsort")
12422 (version "5.0.2")
12423 (source (origin
12424 (method url-fetch)
12425 (uri (pypi-uri "natsort" version))
12426 (sha256
12427 (base32
12428 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12429 (build-system python-build-system)
12430 (arguments
12431 `(#:phases
12432 (modify-phases %standard-phases
12433 (add-before 'check 'set-cachedir
12434 ;; Tests require write access to $HOME by default
12435 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12436 (native-inputs
12437 `(("python-hypothesis" ,python-hypothesis)
12438 ("python-pytest-cache" ,python-pytest-cache)
12439 ("python-pytest-cov" ,python-pytest-cov)
12440 ("python-pytest-flakes" ,python-pytest-flakes)
12441 ("python-pytest-pep8" ,python-pytest-pep8)))
12442 (propagated-inputs ; TODO: Add python-fastnumbers.
12443 `(("python-pyicu" ,python-pyicu)))
12444 (home-page "https://github.com/SethMMorton/natsort")
12445 (synopsis "Natural sorting for python and shell")
12446 (description
12447 "Natsort lets you apply natural sorting on lists instead of
12448 lexicographical. If you use the built-in @code{sorted} method in python
12449 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12450 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12451 function @code{natsorted} that identifies numbers and sorts them separately
12452 from strings. It can also sort version numbers, real numbers, mixed types
12453 and more, and comes with a shell command @command{natsort} that exposes this
12454 functionality in the command line.")
12455 (license license:expat)
12456 (properties `((python2-variant . ,(delay python2-natsort))))))
12457
12458 (define-public python2-natsort
12459 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12460 (package (inherit base)
12461 (native-inputs
12462 `(("python2-pathlib" ,python2-pathlib)
12463 ("python2-mock" ,python2-mock)
12464 ("python2-enum34" ,python2-enum34)
12465 ,@(package-native-inputs base))))))
12466
12467 (define-public python-glances
12468 (package
12469 (name "python-glances")
12470 (version "2.7.1")
12471 (source
12472 (origin
12473 (method url-fetch)
12474 (uri (pypi-uri "Glances" version))
12475 (sha256
12476 (base32
12477 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12478 (build-system python-build-system)
12479 (propagated-inputs
12480 `(("python-psutil" ,python-psutil)))
12481 (home-page
12482 "https://github.com/nicolargo/glances")
12483 (synopsis
12484 "A cross-platform curses-based monitoring tool")
12485 (description
12486 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12487 Glances uses the PsUtil library to get information from your system. It monitors
12488 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12489 (license license:lgpl3+)))
12490
12491 (define-public python2-glances
12492 (package-with-python2 python-glances))
12493
12494 (define-public python-graphql-core
12495 (package
12496 (name "python-graphql-core")
12497 (version "0.5.3")
12498 (source
12499 (origin
12500 (method url-fetch)
12501 (uri (pypi-uri "graphql-core" version))
12502 (sha256
12503 (base32
12504 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12505 (build-system python-build-system)
12506 (arguments
12507 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12508 #:phases
12509 (modify-phases %standard-phases
12510 (add-after 'unpack 'patch-hardcoded-version
12511 (lambda _ (substitute*
12512 "setup.py"
12513 (("'gevent==1.1rc1'") "'gevent'"))
12514 #t)))))
12515 (native-inputs
12516 `(("python-gevent" ,python-gevent)
12517 ("python-mock" ,python-mock)
12518 ("python-pytest-mock" ,python-pytest-mock)))
12519 (propagated-inputs
12520 `(("python-promise" ,python-promise)
12521 ("python-six" ,python-six)))
12522 (home-page "https://github.com/graphql-python/graphql-core")
12523 (synopsis "GraphQL implementation for Python")
12524 (description
12525 "GraphQL implementation for Python. GraphQL is a data query language and
12526 runtime designed and used to request and deliver data to mobile and web apps.
12527 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12528 to Python.")
12529 (license license:expat)))
12530
12531 (define-public python2-graphql-core
12532 (package-with-python2 python-graphql-core))
12533
12534 (define-public python-graphql-relay
12535 (package
12536 (name "python-graphql-relay")
12537 (version "0.4.5")
12538 (source
12539 (origin
12540 (method url-fetch)
12541 (uri (pypi-uri "graphql-relay" version))
12542 (sha256
12543 (base32
12544 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12545 (build-system python-build-system)
12546 (native-inputs
12547 `(("python-pytest" ,python-pytest)))
12548 (propagated-inputs
12549 `(("python-graphql-core" ,python-graphql-core)
12550 ("python-promise" ,python-promise)
12551 ("python-six" ,python-six)))
12552 (home-page "https://github.com/graphql-python/graphql-relay-py")
12553 (synopsis "Relay implementation for Python")
12554 (description
12555 "This is a library to allow the easy creation of Relay-compliant servers
12556 using the GraphQL Python reference implementation of a GraphQL server. It
12557 should be noted that the code is a exact port of the original
12558 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12559 from Facebook.")
12560 (license license:expat)))
12561
12562 (define-public python2-graphql-relay
12563 (package-with-python2 python-graphql-relay))
12564
12565 (define-public python-graphene
12566 (package
12567 (name "python-graphene")
12568 (version "0.10.2")
12569 (source
12570 (origin
12571 (method url-fetch)
12572 (uri (pypi-uri "graphene" version))
12573 (sha256
12574 (base32
12575 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12576 (build-system python-build-system)
12577 (native-inputs
12578 `(("python-django-filter" ,python-django-filter)
12579 ("python-mock" ,python-mock)
12580 ("python-psycopg2" ,python-psycopg2)
12581 ("python-pytest-django" ,python-pytest-django)
12582 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12583 (propagated-inputs
12584 `(("python-graphql-core" ,python-graphql-core)
12585 ("python-graphql-relay" ,python-graphql-relay)
12586 ("python-iso8601" ,python-iso8601)
12587 ("python-promise" ,python-promise)
12588 ("python-six" ,python-six)))
12589 (home-page "http://graphene-python.org/")
12590 (synopsis "GraphQL Framework for Python")
12591 (description
12592 "Graphene is a Python library for building GraphQL schemas/types.
12593 A GraphQL schema describes your data model, and provides a GraphQL server
12594 with an associated set of resolve methods that know how to fetch data.")
12595 (properties `((python2-variant . ,(delay python2-graphene))))
12596 (license license:expat)))
12597
12598 (define-public python2-graphene
12599 (let ((base (package-with-python2
12600 (strip-python2-variant python-graphene))))
12601 (package (inherit base)
12602 (native-inputs
12603 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12604 ,@(package-native-inputs base))))))
12605
12606 (define-public python-nautilus
12607 (package
12608 (name "python-nautilus")
12609 (version "0.4.9")
12610 (source
12611 (origin
12612 (method url-fetch)
12613 (uri (pypi-uri "nautilus" version))
12614 (sha256
12615 (base32
12616 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12617 (build-system python-build-system)
12618 (arguments `(#:tests? #f)) ; fails to import test modules
12619 (propagated-inputs
12620 `(("python-bcrypt" ,python-bcrypt)
12621 ("python-click" ,python-click)
12622 ("python-consul" ,python-consul)
12623 ("python-graphene" ,python-graphene)
12624 ("python-jinja2" ,python-jinja2)
12625 ("python-peewee" ,python-peewee)
12626 ("python-pika" ,python-pika)
12627 ("python-tornado" ,python-tornado)
12628 ("python-wtforms" ,python-wtforms)))
12629 (native-inputs
12630 `(("python-nose2" ,python-nose2)))
12631 (home-page "https://github.com/AlecAivazis/nautilus")
12632 (synopsis "Library for creating microservice applications")
12633 (description
12634 "Nautilus is a framework for flux based microservices that looks to
12635 provide extendible implementations of common aspects of a cloud so that you can
12636 focus on building massively scalable web applications.")
12637 (license license:expat)))
12638
12639 (define-public python-snowballstemmer
12640 (package
12641 (name "python-snowballstemmer")
12642 (version "1.2.1")
12643 (source (origin
12644 (method url-fetch)
12645 (uri (pypi-uri "snowballstemmer" version))
12646 (sha256
12647 (base32
12648 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12649 (build-system python-build-system)
12650 (arguments
12651 `(;; No tests exist
12652 #:tests? #f))
12653 (home-page "https://github.com/shibukawa/snowball_py")
12654 (synopsis "Snowball stemming library collection for Python")
12655 (description "This package provides 16 word stemmer algorithms generated
12656 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12657 English stemmer.")
12658 (license license:bsd-3)))
12659
12660 (define-public python2-snowballstemmer
12661 (package-with-python2 python-snowballstemmer))
12662
12663 (define-public python-sphinx-cloud-sptheme
12664 (package
12665 (name "python-sphinx-cloud-sptheme")
12666 (version "1.8.0")
12667 (source (origin
12668 (method url-fetch)
12669 (uri (pypi-uri "cloud_sptheme" version))
12670 (sha256
12671 (base32
12672 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12673 (build-system python-build-system)
12674 ;; FIXME: The 'pypi' release archive does not contain tests.
12675 (arguments '(#:tests? #f))
12676 (native-inputs
12677 `(("python-sphinx" ,python-sphinx)))
12678 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12679 (synopsis "'Cloud' theme for Sphinx documenter")
12680 (description "This package contains the \"Cloud\" theme for Sphinx and some
12681 related extensions.")
12682 (license license:bsd-3)))
12683
12684 (define-public python2-sphinx-cloud-sptheme
12685 (package-with-python2 python-sphinx-cloud-sptheme))
12686
12687 (define-public python-sphinx-alabaster-theme
12688 (package
12689 (name "python-sphinx-alabaster-theme")
12690 (version "0.7.9")
12691 (source (origin
12692 (method url-fetch)
12693 (uri (pypi-uri "alabaster" version))
12694 (sha256
12695 (base32
12696 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12697 (build-system python-build-system)
12698 (propagated-inputs
12699 `(("python-pygments" ,python-pygments)))
12700 (home-page "https://alabaster.readthedocs.io/")
12701 (synopsis "Configurable sidebar-enabled Sphinx theme")
12702 (description "Alabaster is a visually (c)lean, responsive, configurable
12703 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12704 (license license:bsd-3)))
12705
12706 (define-public python2-sphinx-alabaster-theme
12707 (package-with-python2 python-sphinx-alabaster-theme))
12708
12709 (define-public python-betamax
12710 (package
12711 (name "python-betamax")
12712 (version "0.8.0")
12713 (source
12714 (origin
12715 (method url-fetch)
12716 (uri (pypi-uri "betamax" version))
12717 (sha256
12718 (base32
12719 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12720 (build-system python-build-system)
12721 (arguments
12722 '(;; Many tests fail because they require networking.
12723 #:tests? #f))
12724 (propagated-inputs
12725 `(("python-requests" ,python-requests)))
12726 (home-page "https://github.com/sigmavirus24/betamax")
12727 (synopsis "Record HTTP interactions with python-requests")
12728 (description "Betamax will record your test suite's HTTP interactions and
12729 replay them during future tests. It is designed to work with python-requests.")
12730 (license license:expat)))
12731
12732 (define-public python2-betamax
12733 (package-with-python2 python-betamax))
12734
12735 (define-public python-s3transfer
12736 (package
12737 (name "python-s3transfer")
12738 (version "0.1.10")
12739 (source (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "s3transfer" version))
12742 (sha256
12743 (base32
12744 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12745 (build-system python-build-system)
12746 (arguments
12747 `(#:phases
12748 (modify-phases %standard-phases
12749 (replace 'check
12750 (lambda _
12751 ;; 7 of the 'integration' tests require network access or login
12752 ;; credentials.
12753 (zero? (system* "nosetests" "--exclude=integration")))))))
12754 (native-inputs
12755 `(("python-docutils" ,python-docutils)
12756 ("python-mock" ,python-mock)
12757 ("python-nose" ,python-nose)))
12758 (propagated-inputs
12759 `(("python-botocore" ,python-botocore)))
12760 (synopsis "Amazon S3 Transfer Manager")
12761 (description "S3transfer is a Python library for managing Amazon S3
12762 transfers.")
12763 (home-page "https://github.com/boto/s3transfer")
12764 (license license:asl2.0)
12765 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12766
12767 (define-public python2-s3transfer
12768 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12769 (package
12770 (inherit base)
12771 (native-inputs
12772 `(("python2-futures" ,python2-futures)
12773 ,@(package-native-inputs base))))))
12774
12775 (define-public python-setproctitle
12776 (package
12777 (name "python-setproctitle")
12778 (version "1.1.10")
12779 (source
12780 (origin
12781 (method url-fetch)
12782 (uri (pypi-uri "setproctitle" version))
12783 (sha256
12784 (base32
12785 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12786 (build-system python-build-system)
12787 (arguments
12788 '(#:phases
12789 (modify-phases %standard-phases
12790 (add-before 'check 'patch-Makefile
12791 ;; Stricly this is only required for the python2 variant.
12792 ;; But adding a phase in an inherited package seems to be
12793 ;; cumbersum. So we patch even for python3.
12794 (lambda _
12795 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12796 (when nose
12797 (substitute* "Makefile"
12798 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12799 (string-append nose "/bin/nosetests "))))
12800 #t)))
12801 (replace 'check
12802 (lambda _
12803 (setenv "PYTHON" (or (which "python3") (which "python")))
12804 (setenv "PYCONFIG" (or (which "python3-config")
12805 (which "python-config")))
12806 (setenv "CC" "gcc")
12807 ;; No need to extend PYTHONPATH to find the built package, since
12808 ;; the Makefile will build anyway
12809 (zero? (system* "make" "check")))))))
12810 (native-inputs
12811 `(("procps" ,procps))) ; required for tests
12812 (home-page
12813 "https://github.com/dvarrazzo/py-setproctitle")
12814 (synopsis
12815 "Setproctitle implementation for Python to customize the process title")
12816 (description "The library allows a process to change its title (as displayed
12817 by system tools such as ps and top).
12818
12819 Changing the title is mostly useful in multi-process systems, for
12820 example when a master process is forked: changing the children's title
12821 allows to identify the task each process is busy with. The technique
12822 is used by PostgreSQL and the OpenSSH Server for example.")
12823 (license license:bsd-3)
12824 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12825
12826 (define-public python2-setproctitle
12827 (let ((base (package-with-python2
12828 (strip-python2-variant python-setproctitle))))
12829 (package
12830 (inherit base)
12831 (native-inputs `(("python2-nose" ,python2-nose)
12832 ,@(package-native-inputs base))))))
12833
12834 (define-public python-validictory
12835 (package
12836 (name "python-validictory")
12837 (version "1.0.1")
12838 (source
12839 (origin
12840 (method url-fetch)
12841 (uri (pypi-uri "validictory" version))
12842 (sha256
12843 (base32
12844 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12845 (build-system python-build-system)
12846 (arguments
12847 '(#:phases
12848 (modify-phases %standard-phases
12849 (add-after 'unpack 'bootstrap
12850 ;; Move the tests out of the package directory to avoid
12851 ;; packaging them.
12852 (lambda* _
12853 (rename-file "validictory/tests" "tests")
12854 (delete-file "tests/__init__.py")))
12855 (replace 'check
12856 (lambda _
12857 ;; Extend PYTHONPATH so the built package will be found.
12858 (setenv "PYTHONPATH"
12859 (string-append (getcwd) "/build/lib:"
12860 (getenv "PYTHONPATH")))
12861 (zero? (system* "py.test" "-vv" )))))))
12862 (native-inputs
12863 `(("python-pytest" ,python-pytest)))
12864 (home-page
12865 "https://github.com/jamesturk/validictory")
12866 (synopsis "General purpose Python data validator")
12867 (description "It allows validation of arbitrary Python data structures.
12868
12869 The schema format is based on the JSON Schema
12870 proposal (http://json-schema.org), so combined with json the library is also
12871 useful as a validator for JSON data.")
12872 (license license:expat)))
12873
12874 (define-public python2-validictory
12875 (package-with-python2 python-validictory))
12876
12877 (define-public python-aniso8601
12878 (package
12879 (name "python-aniso8601")
12880 (version "1.1.0")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "aniso8601" version))
12885 (sha256
12886 (base32
12887 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12888 (build-system python-build-system)
12889 (propagated-inputs
12890 `(("python-dateutil" ,python-dateutil)))
12891 (home-page
12892 "https://bitbucket.org/nielsenb/aniso8601")
12893 (synopsis
12894 "Python library for parsing ISO 8601 strings")
12895 (description
12896 "This package contains a library for parsing ISO 8601 datetime strings.")
12897 (license license:bsd-3)))
12898
12899 (define-public python-flask-restful
12900 (package
12901 (name "python-flask-restful")
12902 (version "0.3.5")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "Flask-RESTful" version))
12907 (sha256
12908 (base32
12909 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12910 (build-system python-build-system)
12911 (propagated-inputs
12912 `(("python-aniso8601" ,python-aniso8601)
12913 ("python-flask" ,python-flask)
12914 ("python-pycrypto" ,python-pycrypto)
12915 ("python-pytz" ,python-pytz)))
12916 (native-inputs
12917 `(;; Optional dependency of Flask. Tests need it.
12918 ("python-blinker" ,python-blinker)
12919 ("python-mock" ,python-mock) ; For tests
12920 ("python-nose" ,python-nose) ; For tests
12921 ("python-sphinx" ,python-sphinx)))
12922 (home-page
12923 "https://www.github.com/flask-restful/flask-restful/")
12924 (synopsis
12925 "Flask module for creating REST APIs")
12926 (description
12927 "This package contains a Flask module for creating REST APIs.")
12928 (license license:bsd-3)))
12929
12930 (define-public python-flask-basicauth
12931 (package
12932 (name "python-flask-basicauth")
12933 (version "0.2.0")
12934 (source
12935 (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "Flask-BasicAuth" version))
12938 (sha256
12939 (base32
12940 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12941 (build-system python-build-system)
12942 (propagated-inputs
12943 `(("python-flask" ,python-flask)))
12944 (home-page
12945 "https://github.com/jpvanhal/flask-basicauth")
12946 (synopsis
12947 "HTTP basic access authentication for Flask")
12948 (description
12949 "This package provides HTTP basic access authentication for Flask.")
12950 (license license:bsd-3)))
12951
12952 (define-public python-flask-sqlalchemy
12953 (package
12954 (name "python-flask-sqlalchemy")
12955 (version "2.1")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "Flask-SQLAlchemy" version))
12960 (sha256
12961 (base32
12962 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12963 (build-system python-build-system)
12964 (propagated-inputs
12965 `(("python-flask" ,python-flask)
12966 ("python-sqlalchemy" ,python-sqlalchemy)))
12967 (home-page
12968 "https://github.com/mitsuhiko/flask-sqlalchemy")
12969 (synopsis
12970 "Module adding SQLAlchemy support to your Flask application")
12971 (description
12972 "This package adds SQLAlchemy support to your Flask application.")
12973 (license license:bsd-3)))
12974
12975 (define-public python-pyev
12976 (package
12977 (name "python-pyev")
12978 (version "0.9.0")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "pyev" version))
12983 (sha256
12984 (base32
12985 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12986 (build-system python-build-system)
12987 (arguments
12988 `(#:tests? #f ; no test suite
12989 #:phases
12990 (modify-phases %standard-phases
12991 (add-after 'unpack 'patch
12992 (lambda* (#:key inputs #:allow-other-keys)
12993 (let ((libev (string-append (assoc-ref inputs "libev")
12994 "/lib/libev.so.4")))
12995 (substitute* "setup.py"
12996 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12997 (string-append "libev_dll_name = \"" libev "\"")))))))))
12998 (inputs
12999 `(("libev" ,libev)))
13000 (home-page "http://pythonhosted.org/pyev/")
13001 (synopsis "Python libev interface")
13002 (description "Pyev provides a Python interface to libev.")
13003 (license license:gpl3)))
13004
13005 (define-public python2-pyev
13006 (package-with-python2 python-pyev))
13007
13008 (define-public python-imagesize
13009 (package
13010 (name "python-imagesize")
13011 (version "0.7.1")
13012 (source
13013 (origin
13014 (method url-fetch)
13015 (uri (pypi-uri "imagesize" version))
13016 (sha256
13017 (base32
13018 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13019 (build-system python-build-system)
13020 (arguments
13021 '(;; Test files are not distributed on PyPi:
13022 ;; https://github.com/shibukawa/imagesize_py/issues/7
13023 #:tests? #f))
13024 (home-page "https://github.com/shibukawa/imagesize_py")
13025 (synopsis "Gets image size of files in variaous formats in Python")
13026 (description
13027 "This package allows determination of image size from
13028 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13029 (license license:expat)))
13030
13031 (define-public python2-imagesize
13032 (package-with-python2 python-imagesize))
13033
13034 (define-public python-axolotl-curve25519
13035 (package
13036 (name "python-axolotl-curve25519")
13037 (version "0.1")
13038 (source
13039 (origin
13040 (method git-fetch)
13041 (uri (git-reference
13042 (url "git://github.com/tgalal/python-axolotl-curve25519")
13043 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13044 (file-name (string-append name "-" version "-checkout"))
13045 (sha256
13046 (base32
13047 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13048 (build-system python-build-system)
13049 (arguments
13050 `(;; Prevent creation of the egg. This works around
13051 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13052 #:configure-flags '("--root=/")))
13053 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13054 (synopsis "Python wrapper for curve25519 library")
13055 (description "This is a python wrapper for the curve25519 library
13056 with ed25519 signatures. The C code was pulled from
13057 libaxolotl-android. At the moment this wrapper is meant for use by
13058 python-axolotl.")
13059 (license (list license:gpl3 ; Most files
13060 license:bsd-3)))) ; curve/curve25519-donna.c
13061
13062 (define-public python2-axolotl-curve25519
13063 (package-with-python2 python-axolotl-curve25519))
13064
13065 (define-public python-axolotl
13066 (package
13067 (name "python-axolotl")
13068 (version "0.1.35")
13069 (source
13070 (origin
13071 (method url-fetch)
13072 (uri (string-append
13073 "https://github.com/tgalal/python-axolotl/archive/"
13074 version ".tar.gz"))
13075 (file-name (string-append name "-" version ".tar.gz"))
13076 (sha256
13077 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13078 (build-system python-build-system)
13079 (arguments
13080 `(#:phases
13081 (modify-phases %standard-phases
13082 ;; Don't install tests
13083 (add-before 'install 'remove-tests
13084 (lambda _
13085 (for-each delete-file-recursively
13086 '("axolotl/tests" "build/lib/axolotl/tests"))
13087 #t)))))
13088 (propagated-inputs
13089 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13090 ("python-dateutil" ,python-dateutil)
13091 ("python-protobuf" ,python-protobuf)
13092 ("python-pycrypto" ,python-pycrypto)))
13093 (home-page "https://github.com/tgalal/python-axolotl")
13094 (synopsis "Python port of libaxolotl-android")
13095 (description "This is a python port of libaxolotl-android. This
13096 is a ratcheting forward secrecy protocol that works in synchronous and
13097 asynchronous messaging environments.")
13098 (license license:gpl3)))
13099
13100 (define-public python2-axolotl
13101 (package-with-python2 python-axolotl))
13102
13103 (define-public python-termstyle
13104 (package
13105 (name "python-termstyle")
13106 (version "0.1.11")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "termstyle" version))
13111 (sha256
13112 (base32
13113 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13114 (build-system python-build-system)
13115 (arguments
13116 '(#:phases
13117 (modify-phases %standard-phases
13118 (replace 'check
13119 (lambda _
13120 (zero? (system* "python" "test3.py")))))))
13121 (home-page "https://github.com/gfxmonk/termstyle")
13122 (synopsis "Console text coloring for Python")
13123 (description "This package provides console text coloring for Python.")
13124 (license license:bsd-3)))
13125
13126 (define-public python-rednose
13127 (package
13128 (name "python-rednose")
13129 (version "1.2.1")
13130 (source
13131 (origin
13132 (method url-fetch)
13133 (uri (pypi-uri "rednose" version))
13134 (sha256
13135 (base32
13136 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13137 (build-system python-build-system)
13138 (arguments
13139 `(#:phases
13140 (modify-phases %standard-phases
13141 (add-after 'unpack 'fix-deps
13142 (lambda _
13143 ;; See <https://github.com/JBKahn/rednose/issues/12>
13144 (substitute* "setup.py"
13145 (("python-termstyle") "termstyle"))
13146 #t)))))
13147 (propagated-inputs
13148 `(("python-colorama" ,python-colorama)
13149 ("python-termstyle" ,python-termstyle)))
13150 (native-inputs
13151 `(("python-six" ,python-six)
13152 ("python-nose" ,python-nose)))
13153 (home-page "https://github.com/JBKahn/rednose")
13154 (synopsis "Colored output for Python nosetests")
13155 (description "This package provides colored output for the
13156 @command{nosetests} command of the Python Nose unit test framework.")
13157 (license license:bsd-3)))
13158
13159 (define-public python2-rednose
13160 (package-with-python2 python-rednose))
13161
13162 (define-public python-flask-restplus
13163 (package
13164 (name "python-flask-restplus")
13165 (version "0.9.2")
13166 (source
13167 (origin
13168 (method url-fetch)
13169 (uri (pypi-uri "flask-restplus" version))
13170 (sha256
13171 (base32
13172 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13173 (build-system python-build-system)
13174 (arguments
13175 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13176 ;; #:phases
13177 ;; (modify-phases %standard-phases
13178 ;; (replace 'check
13179 ;; (lambda _
13180 ;; (zero? (system* "nosetests")))))))
13181 (propagated-inputs
13182 `(("python-aniso8601" ,python-aniso8601)
13183 ("python-flask" ,python-flask)
13184 ("python-jsonschema" ,python-jsonschema)
13185 ("python-pytz" ,python-pytz)
13186 ("python-six" ,python-six)))
13187 (native-inputs
13188 `(("python-tzlocal" ,python-tzlocal)
13189 ("python-blinker" ,python-blinker)
13190 ("python-nose" ,python-nose)
13191 ("python-rednose" ,python-rednose)))
13192 (home-page "https://github.com/noirbizarre/flask-restplus")
13193 (synopsis "Framework for documented API development with Flask")
13194 (description "This package provides a framework for API development with
13195 the Flask web framework in Python. It is similar to package
13196 @code{python-flask-restful} but supports the @code{python-swagger}
13197 documentation builder.")
13198 (license license:expat)))
13199
13200 (define-public python-sadisplay
13201 (package
13202 (name "python-sadisplay")
13203 (version "0.4.6")
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (pypi-uri "sadisplay" version))
13208 (sha256
13209 (base32
13210 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13211 (build-system python-build-system)
13212 (propagated-inputs
13213 `(("python-sqlalchemy" ,python-sqlalchemy)))
13214 (native-inputs
13215 `(("python-nose" ,python-nose)))
13216 (home-page "https://bitbucket.org/estin/sadisplay")
13217 (synopsis "SQLAlchemy schema displayer")
13218 (description "This package provides a program to build Entity
13219 Relationship diagrams from a SQLAlchemy model (or directly from the
13220 database).")
13221 (license license:bsd-3)))
13222
13223 (define-public python2-sadisplay
13224 (package-with-python2 python-sadisplay))
13225
13226 (define-public python-flask-restful-swagger
13227 (package
13228 (name "python-flask-restful-swagger")
13229 (version "0.19")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (pypi-uri "flask-restful-swagger" version))
13234 (sha256
13235 (base32
13236 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13237 (build-system python-build-system)
13238 (propagated-inputs
13239 `(("python-flask-restful" ,python-flask-restful)))
13240 (home-page "https://github.com/rantav/flask-restful-swagger")
13241 (synopsis "Extract Swagger specs from Flask-Restful projects")
13242 (description "This package lets you extract Swagger API documentation
13243 specs from your Flask-Restful projects.")
13244 (license license:expat)))
13245
13246 (define-public python2-flask-restful-swagger
13247 (package-with-python2 python-flask-restful-swagger))
13248
13249 (define-public python-argcomplete
13250 (package
13251 (name "python-argcomplete")
13252 (version "1.7.0")
13253 (source
13254 (origin
13255 (method url-fetch)
13256 (uri (pypi-uri "argcomplete" version))
13257 (sha256
13258 (base32
13259 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13260 (build-system python-build-system)
13261 (native-inputs
13262 `(("python-pexpect" ,python-pexpect)
13263 ("tcsh" ,tcsh)))
13264 (home-page "https://github.com/kislyuk/argcomplete")
13265 (synopsis "Shell tab completion for Python argparse")
13266 (description "argcomplete provides extensible command line tab completion
13267 of arguments and options for Python scripts using @code{argparse}. It's
13268 particularly useful for programs with many options or sub-parsers that can
13269 dynamically suggest completions; for example, when browsing resources over the
13270 network.")
13271 (license license:asl2.0)))
13272
13273 (define-public python2-argcomplete
13274 (package-with-python2 python-argcomplete))
13275
13276 (define-public python-xopen
13277 (package
13278 (name "python-xopen")
13279 (version "0.1.1")
13280 (source
13281 (origin
13282 (method url-fetch)
13283 (uri (pypi-uri "xopen" version))
13284 (sha256
13285 (base32
13286 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13287 (file-name (string-append name "-" version ".tar.gz"))))
13288 (build-system python-build-system)
13289 (home-page "https://github.com/marcelm/xopen/")
13290 (synopsis "Open compressed files transparently")
13291 (description "This module provides an @code{xopen} function that works like
13292 Python's built-in @code{open} function, but can also deal with compressed files.
13293 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13294 recognized by their file extensions. The focus is on being as efficient as
13295 possible on all supported Python versions.")
13296 (license license:expat)))
13297
13298 (define-public python2-xopen
13299 (package-with-python2 python-xopen))
13300
13301 (define-public python2-cheetah
13302 (package
13303 (name "python2-cheetah")
13304 (version "2.4.4")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 (uri (pypi-uri "Cheetah" version))
13309 (sha256
13310 (base32
13311 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13312 (build-system python-build-system)
13313 (arguments
13314 `(#:python ,python-2))
13315 (propagated-inputs
13316 `(("python2-markdown" ,python2-markdown)))
13317 (home-page "https://pythonhosted.org/Cheetah/")
13318 (synopsis "Template engine")
13319 (description "Cheetah is a text-based template engine and Python code
13320 generator.
13321
13322 Cheetah can be used as a standalone templating utility or referenced as
13323 a library from other Python applications. It has many potential uses,
13324 but web developers looking for a viable alternative to ASP, JSP, PHP and
13325 PSP are expected to be its principle user group.
13326
13327 Features:
13328 @enumerate
13329 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13330 text-based format.
13331 @item Cleanly separates content, graphic design, and program code.
13332 @item Blends the power and flexibility of Python with a simple template language
13333 that non-programmers can understand.
13334 @item Gives template writers full access to any Python data structure, module,
13335 function, object, or method in their templates.
13336 @item Makes code reuse easy by providing an object-orientated interface to
13337 templates that is accessible from Python code or other Cheetah templates.
13338 One template can subclass another and selectively reimplement sections of it.
13339 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13340 improve the performance of a dynamic website.
13341 @item Compiles templates into optimized, yet readable, Python code.
13342 @end enumerate")
13343 (license (license:x11-style "file://LICENSE"))))
13344
13345 (define-public python-dulwich
13346 (package
13347 (name "python-dulwich")
13348 (version "0.16.3")
13349 (source
13350 (origin
13351 (method url-fetch)
13352 (uri (list (string-append "https://www.dulwich.io/releases/"
13353 "dulwich-" version ".tar.gz")
13354 (pypi-uri "dulwich" version)))
13355 (sha256
13356 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13357 (build-system python-build-system)
13358 (arguments
13359 `(#:phases
13360 (modify-phases %standard-phases
13361 (add-before 'check 'fix-tests
13362 (lambda* (#:key inputs #:allow-other-keys)
13363 ;; The tests use Popen with a custom environment which doesn't
13364 ;; include PATH.
13365 (substitute* "dulwich/tests/compat/utils.py"
13366 (("'git'") (string-append "'"
13367 (which "git")
13368 "'")))
13369 (substitute* '("dulwich/tests/test_repository.py"
13370 "dulwich/tests/test_hooks.py")
13371 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13372 (setenv "TEST_RUNNER" "unittest")
13373 (setenv "PYTHONHASHSEED" "random")
13374 #t)))))
13375 (propagated-inputs
13376 `(("python-fastimport" ,python-fastimport)))
13377 (native-inputs
13378 `(("python-mock" ,python-mock)
13379 ("python-geventhttpclient" ,python-geventhttpclient)
13380 ("git" ,git)))
13381 (home-page "https://www.dulwich.io/")
13382 (synopsis "Git implementation in Python")
13383 (description "Dulwich is an implementation of the Git file formats and
13384 protocols written in pure Python.")
13385 ;; Can be used with either license.
13386 (license (list license:asl2.0 license:gpl2+))))
13387
13388 (define-public python2-dulwich
13389 (package-with-python2 python-dulwich))
13390
13391 (define-public python-pbkdf2
13392 (package
13393 (name "python-pbkdf2")
13394 (version "1.3")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "pbkdf2" version))
13399 (sha256
13400 (base32
13401 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13402 (build-system python-build-system)
13403 (arguments
13404 '(#:phases
13405 (modify-phases %standard-phases
13406 (replace 'check
13407 (lambda _
13408 (setenv "PYTHONPATH"
13409 (string-append (getcwd) "/build/lib:"
13410 (getenv "PYTHONPATH")))
13411 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13412 (propagated-inputs
13413 `(("python-pycrypto" ,python-pycrypto))) ; optional
13414 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13415 (synopsis "Password-based key derivation")
13416 (description "This module implements the password-based key derivation
13417 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13418
13419 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13420 is part of the RSA Public Key Cryptography Standards series. The provided
13421 implementation takes a password or a passphrase and a salt value (and
13422 optionally a iteration count, a digest module, and a MAC module) and provides
13423 a file-like object from which an arbitrarly-sized key can be read.")
13424 (license license:expat)))
13425
13426 (define-public python2-pbkdf2
13427 (package-with-python2 python-pbkdf2))
13428
13429 (define-public python-qrcode
13430 (package
13431 (name "python-qrcode")
13432 (version "5.3")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (pypi-uri "qrcode" version))
13437 (sha256
13438 (base32
13439 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13440 (build-system python-build-system)
13441 (arguments
13442 ;; FIXME: Tests require packaging 'pymaging'.
13443 '(#:tests? #f))
13444 (propagated-inputs
13445 `(("python-lxml" ,python-lxml) ; for SVG output
13446 ("python-pillow" ,python-pillow) ; for PNG output
13447 ("python-six" ,python-six)))
13448 (home-page "https://github.com/lincolnloop/python-qrcode")
13449 (synopsis "QR Code image generator")
13450 (description "This package provides a pure Python QR Code generator
13451 module. It uses the Python Imaging Library (PIL) to allow for the generation
13452 of QR Codes.
13453
13454 In addition this package provides a command line tool to generate QR codes and
13455 either write these QR codes to a file or do the output as ascii art at the
13456 console.")
13457 (license license:bsd-3)))
13458
13459 (define-public python2-qrcode
13460 (package-with-python2 python-qrcode))
13461
13462 ;; SlowAES isn't compatible with Python 3.
13463 (define-public python2-slowaes
13464 (package
13465 (name "python2-slowaes")
13466 (version "0.1a1")
13467 (source
13468 (origin
13469 (method url-fetch)
13470 (uri (pypi-uri "slowaes" version))
13471 (sha256
13472 (base32
13473 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13474 (build-system python-build-system)
13475 (arguments `(#:python ,python-2))
13476 (home-page "http://code.google.com/p/slowaes/")
13477 (synopsis "Implementation of AES in Python")
13478 (description "This package contains an implementation of AES in Python.
13479 This implementation is slow (hence the project name) but still useful when
13480 faster ones are not available.")
13481 (license license:asl2.0)))
13482
13483 (define-public python-rst2ansi
13484 (package
13485 (name "python-rst2ansi")
13486 (version "0.1.5")
13487 (source
13488 (origin
13489 (method url-fetch)
13490 (uri (pypi-uri "rst2ansi" version))
13491 (sha256
13492 (base32
13493 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13494 (build-system python-build-system)
13495 (propagated-inputs
13496 `(("python-docutils" ,python-docutils)))
13497 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13498 (synopsis "Convert RST to ANSI-decorated console output")
13499 (description
13500 "Python module dedicated to rendering RST (reStructuredText) documents
13501 to ansi-escaped strings suitable for display in a terminal.")
13502 (license license:expat)))
13503
13504 (define-public python-ansi2html
13505 (package
13506 (name "python-ansi2html")
13507 (version "1.2.0")
13508 (source
13509 (origin
13510 (method url-fetch)
13511 (uri (pypi-uri "ansi2html" version))
13512 (sha256
13513 (base32
13514 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13515 (build-system python-build-system)
13516 (native-inputs
13517 `(("python-mock" ,python-mock)
13518 ("python-nose" ,python-nose)))
13519 (propagated-inputs
13520 `(("python-six" ,python-six)))
13521 (home-page "http://github.com/ralphbean/ansi2html")
13522 (synopsis "Convert ANSI-decorated console output to HTML")
13523 (description
13524 "@command{ansi2html} is a Python library and command line utility for
13525 convering text with ANSI color codes to HTML or LaTeX.")
13526 (license license:gpl3+)))
13527
13528 (define-public python2-ansi2html
13529 (package-with-python2 python-ansi2html))
13530
13531 (define-public python-ddt
13532 (package
13533 (name "python-ddt")
13534 (version "1.1.1")
13535 (source
13536 (origin
13537 (method url-fetch)
13538 (uri (pypi-uri "ddt" version))
13539 (sha256
13540 (base32
13541 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13542 (build-system python-build-system)
13543 (native-inputs
13544 `(("python-mock" ,python-mock)
13545 ("python-nose" ,python-nose)))
13546 (propagated-inputs
13547 `(("python-six" ,python-six)
13548 ("python-pyyaml" ,python-pyyaml)))
13549 (home-page "https://github.com/txels/ddt")
13550 (synopsis "Data-Driven Tests")
13551 (description
13552 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13553 it with different test data, and make it appear as multiple test cases.")
13554 (license license:expat)))
13555
13556 (define-public python2-ddt
13557 (package-with-python2 python-ddt))
13558
13559 (define-public python-pycosat
13560 (package
13561 (name "python-pycosat")
13562 (version "0.6.1")
13563 (source
13564 (origin
13565 (method url-fetch)
13566 (uri (pypi-uri "pycosat" version))
13567 (sha256
13568 (base32
13569 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13570 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13571 (build-system python-build-system)
13572 (home-page "https://github.com/ContinuumIO/pycosat")
13573 (synopsis "Bindings to picosat (a SAT solver)")
13574 (description
13575 "This package provides efficient Python bindings to @code{picosat} on
13576 the C level. When importing pycosat, the @code{picosat} solver becomes part
13577 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13578 Problem} (SAT) solver.")
13579 (license license:expat)))
13580
13581 (define-public python2-pycosat
13582 (package-with-python2 python-pycosat))
13583
13584 (define-public python2-ruamel.ordereddict
13585 (package
13586 (name "python2-ruamel.ordereddict")
13587 (version "0.4.9")
13588 (source
13589 (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "ruamel.ordereddict" version))
13592 (sha256
13593 (base32
13594 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13595 (build-system python-build-system)
13596 (arguments
13597 `(#:python ,python-2
13598 #:phases
13599 (modify-phases %standard-phases
13600 (delete 'check)
13601 (add-after 'install 'check
13602 (lambda* (#:key inputs outputs #:allow-other-keys)
13603 (add-installed-pythonpath inputs outputs)
13604 (zero? (system* "python" "test/testordereddict.py")))))))
13605 (home-page "https://bitbucket.org/ruamel/ordereddict")
13606 (synopsis "Version of dict that keeps keys in insertion order")
13607 (description
13608 "This is an implementation of an ordered dictionary with @dfn{Key
13609 Insertion Order} (KIO: updates of values do not affect the position of the
13610 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13611 removed and put at the back). The standard library module @code{OrderedDict},
13612 implemented later, implements a subset of @code{ordereddict} functionality.
13613 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13614 Order} (KSO, no sorting function can be specified, but a transform can be
13615 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13616 (license license:expat)))
13617
13618 (define-public python-pypeg2
13619 (package
13620 (name "python-pypeg2")
13621 (version "2.15.2")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "pyPEG2" version))
13626 (sha256
13627 (base32
13628 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13629 (build-system python-build-system)
13630 (propagated-inputs `(("python-lxml" ,python-lxml)))
13631 (arguments
13632 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13633 '(#:tests? #f))
13634 (home-page "https://fdik.org/pyPEG/")
13635 (synopsis "Parsering Expression Grammars in Python")
13636 (description "PyPEG is an intrinsic parser interpreter framework for
13637 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13638 parse many formal languages.")
13639 (license license:gpl2)))
13640
13641 (define-public python2-cliapp
13642 (package
13643 (name "python2-cliapp")
13644 (version "1.20160724")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (string-append
13649 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13650 version ".tar.gz"))
13651 (sha256
13652 (base32
13653 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13654 (build-system python-build-system)
13655 (arguments
13656 `(#:python ,python-2))
13657 (propagated-inputs
13658 `(("python2-pyaml" ,python2-pyaml)))
13659 (home-page "https://liw.fi/cliapp/")
13660 (synopsis "Python framework for command line programs")
13661 (description "@code{python2-cliapp} is a python framework for
13662 command line programs. It contains the typical stuff such programs
13663 need to do, such as parsing the command line for options, and
13664 iterating over input files.")
13665 (license license:gpl2+)))
13666
13667 (define-public python2-ttystatus
13668 (package
13669 (name "python2-ttystatus")
13670 (version "0.32")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (string-append
13675 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13676 version ".tar.gz"))
13677 (sha256
13678 (base32
13679 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13680 (build-system python-build-system)
13681 (arguments
13682 `(#:python ,python-2))
13683 (home-page "https://liw.fi/ttystatus/")
13684 (synopsis "Python library for showing progress reporting and
13685 status updates on terminals")
13686 (description "@code{python2-ttystatus} is a python library for
13687 showing progress reporting and status updates on terminals, for
13688 command line programs. Output is automatically adapted to the width
13689 of the terminal: truncated if it does not fit, and resized if the
13690 terminal size changes.")
13691 (license license:gpl3+)))
13692
13693 (define-public python2-tracing
13694 (package
13695 (name "python2-tracing")
13696 (version "0.10")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (string-append
13701 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13702 version ".tar.gz"))
13703 (sha256
13704 (base32
13705 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13706 (build-system python-build-system)
13707 (arguments
13708 `(#:python ,python-2))
13709 (home-page "https://liw.fi/tracing/")
13710 (synopsis "Python debug logging helper")
13711 (description "@code{python2-tracing} is a python library for
13712 logging debug messages. It provides a way to turn debugging messages
13713 on and off, based on the filename they occur in. It is much faster
13714 than using @code{logging.Filter} to accomplish the same thing, which
13715 matters when code is run in production mode. The actual logging still
13716 happens using the @code{logging} library.")
13717 (license license:gpl3+)))
13718
13719 (define-public python2-larch
13720 (package
13721 (name "python2-larch")
13722 (version "1.20151025")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (string-append
13727 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13728 version ".tar.gz"))
13729 (sha256
13730 (base32
13731 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13732 (build-system python-build-system)
13733 (arguments
13734 `(#:python ,python-2))
13735 (propagated-inputs
13736 `(("python2-tracing" ,python2-tracing)))
13737 (home-page "https://liw.fi/larch/")
13738 (synopsis "Python copy-on-write B-tree library")
13739 (description "@code{python2-larch} is an implementation of
13740 particular kind of B-tree, based on research by Ohad Rodeh. See
13741 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13742 on the data structure.
13743
13744 The distinctive feature of this B-tree is that a node is never
13745 (conceptually) modified. Instead, all updates are done by
13746 copy-on-write. This makes it easy to clone a tree, and modify only the
13747 clone, while other processes access the original tree.")
13748 (license license:gpl3+)))
13749
13750 (define-public python-htmlmin
13751 (package
13752 (name "python-htmlmin")
13753 (version "0.1.10")
13754 (source
13755 (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "htmlmin" version))
13758 (sha256
13759 (base32
13760 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13761 (arguments
13762 `(#:tests? #f)) ;htmlmin has no tests
13763 (build-system python-build-system)
13764 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13765 (synopsis "HTML minifier")
13766 (description "@code{htmlmin} is an HTML minifier that just works.
13767 It comes with safe defaults and easily configurable options.")
13768 (license license:bsd-3)))
13769
13770 (define-public python2-htmlmin
13771 (package-with-python2 python-htmlmin))
13772
13773 (define-public python-flask-htmlmin
13774 (package
13775 (name "python-flask-htmlmin")
13776 (version "1.2")
13777 (source
13778 (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "Flask-HTMLmin" version))
13781 (sha256
13782 (base32
13783 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13784 (propagated-inputs
13785 `(("python-flask" ,python-flask)
13786 ("python-htmlmin" ,python-htmlmin)))
13787 (build-system python-build-system)
13788 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13789 (synopsis "HTML response minifier for Flask")
13790 (description
13791 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13792 (license license:bsd-3)))
13793
13794 (define-public python2-flask-htmlmin
13795 (package-with-python2 python-flask-htmlmin))
13796
13797 (define-public python-flask-login
13798 (package
13799 (name "python-flask-login")
13800 (version "0.4.0")
13801 (source
13802 (origin
13803 (method url-fetch)
13804 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13805 version ".tar.gz"))
13806 (file-name (string-append name "-" version ".tar.gz"))
13807 (sha256
13808 (base32
13809 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13810 (arguments
13811 ;; Tests fail PEP8 compliance. See:
13812 ;; https://github.com/maxcountryman/flask-login/issues/340
13813 `(#:tests? #f))
13814 (build-system python-build-system)
13815 (home-page "https://github.com/maxcountryman/flask-login")
13816 (synopsis "User session management for Flask")
13817 (description
13818 "@code{Flask-Login} provides user session management for Flask. It
13819 handles the common tasks of logging in, logging out, and remembering your
13820 users' sessions over extended periods of time.")
13821 (license license:expat)))
13822
13823 (define-public python2-flask-login
13824 (package-with-python2 python-flask-login))
13825
13826 (define-public python-astroid
13827 (package
13828 (name "python-astroid")
13829 (version "1.4.9")
13830 (source
13831 (origin
13832 (method url-fetch)
13833 (uri (string-append
13834 "https://github.com/PyCQA/astroid/archive/astroid-"
13835 version ".tar.gz"))
13836 (sha256
13837 (base32
13838 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13839 (build-system python-build-system)
13840 (propagated-inputs
13841 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13842 ("python-six" ,python-six)
13843 ("python-wrapt" ,python-wrapt)))
13844 (arguments
13845 `(#:phases
13846 (modify-phases %standard-phases
13847 (replace 'check
13848 (lambda _
13849 (zero? (system* "python" "-m" "unittest" "discover"
13850 "-p" "unittest*.py")))))))
13851 (home-page "https://github.com/PyCQA/astroid")
13852 (synopsis "Common base representation of python source code for pylint and
13853 other projects")
13854 (description "@code{python-astroid} provides a common base representation
13855 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13856
13857 It provides a compatible representation which comes from the _ast module. It
13858 rebuilds the tree generated by the builtin _ast module by recursively walking
13859 down the AST and building an extended ast. The new node classes have
13860 additional methods and attributes for different usages. They include some
13861 support for static inference and local name scopes. Furthermore, astroid
13862 builds partial trees by inspecting living objects.")
13863 (license license:lgpl2.1+)))
13864
13865 (define-public python2-astroid
13866 (package-with-python2 python-astroid))
13867
13868 (define-public python-isort
13869 (package
13870 (name "python-isort")
13871 (version "4.2.5")
13872 (source
13873 (origin
13874 (method url-fetch)
13875 (uri (string-append
13876 "https://github.com/timothycrosley/isort/archive/"
13877 version ".tar.gz"))
13878 (file-name (string-append name "-" version ".tar.gz"))
13879 (sha256
13880 (base32
13881 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13882 (build-system python-build-system)
13883 (native-inputs
13884 `(("python-mock" ,python-mock)
13885 ("python-pytest" ,python-pytest)))
13886 (home-page "https://github.com/timothycrosley/isort")
13887 (synopsis "Python utility/library to sort python imports")
13888 (description "@code{python-isort} is a python utility/library to sort
13889 imports alphabetically, and automatically separated into sections. It
13890 provides a command line utility, a python library and plugins for various
13891 editors.")
13892 (license license:expat)))
13893
13894 (define-public python2-isort
13895 (package-with-python2 python-isort))
13896
13897 (define-public python2-backports-functools-lru-cache
13898 (package
13899 (name "python2-backports-functools-lru-cache")
13900 (version "1.3")
13901 (source
13902 (origin
13903 (method url-fetch)
13904 ;; only the pypi tarballs contain the necessary metadata
13905 (uri (pypi-uri "backports.functools_lru_cache" version))
13906 (sha256
13907 (base32
13908 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13909 (build-system python-build-system)
13910 (native-inputs
13911 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13912 (arguments
13913 `(#:python ,python-2))
13914 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13915 (synopsis "Backport of functools.lru_cache from Python 3.3")
13916 (description "@code{python2-backports-functools-lru-cache} is a backport
13917 of @code{functools.lru_cache} from python 3.3.")
13918 (license license:expat)))
13919
13920 (define-public python-configparser
13921 (package
13922 (name "python-configparser")
13923 (version "3.5.0")
13924 (source
13925 (origin
13926 (method url-fetch)
13927 (uri (string-append
13928 "https://bitbucket.org/ambv/configparser/get/"
13929 version ".tar.bz2"))
13930 (file-name (string-append name "-" version ".tar.gz"))
13931 (sha256
13932 (base32
13933 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13934 (build-system python-build-system)
13935 (home-page "http://docs.python.org/py3k/library/configparser.html")
13936 (synopsis "Backport of configparser from python 3.5")
13937 (description "@code{python-configparser} is a backport of
13938 @code{configparser} from Python 3.5 so that it can be used directly
13939 in other versions.")
13940 (license license:expat)))
13941
13942 (define-public python2-configparser
13943 (package-with-python2 python-configparser))
13944
13945 (define-public python2-coverage-test-runner
13946 (package
13947 (name "python2-coverage-test-runner")
13948 (version "1.11")
13949 (source
13950 (origin
13951 (method url-fetch)
13952 (uri (string-append
13953 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13954 "coverage-test-runner/snapshot/coverage-test-runner-"
13955 version ".tar.gz"))
13956 (sha256
13957 (base32
13958 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13959 (build-system python-build-system)
13960 (arguments
13961 `(#:python ,python-2
13962 #:phases
13963 (modify-phases %standard-phases
13964 (replace 'check
13965 (lambda _
13966 (zero? (system* "./testrun")))))))
13967 (propagated-inputs
13968 `(("python2-coverage" ,python2-coverage)))
13969 (home-page "https://liw.fi/coverage-test-runner/")
13970 (synopsis "Python module for running unit tests")
13971 (description "@code{CoverageTestRunner} is a python module for running
13972 unit tests and failing them if the unit test module does not exercise all
13973 statements in the module it tests.")
13974 (license license:gpl3+)))
13975
13976 (define-public python-pylint
13977 (package
13978 (name "python-pylint")
13979 (version "1.6.5")
13980 (source
13981 (origin
13982 (method url-fetch)
13983 (uri (string-append
13984 "https://github.com/PyCQA/pylint/archive/pylint-"
13985 version ".tar.gz"))
13986 (sha256
13987 (base32
13988 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13989 (build-system python-build-system)
13990 (native-inputs
13991 `(("python-tox" ,python-tox)))
13992 (propagated-inputs
13993 `(("python-astroid" ,python-astroid)
13994 ("python-isort" ,python-isort)
13995 ("python-mccabe" ,python-mccabe)
13996 ("python-six" ,python-six)))
13997 (arguments
13998 `(#:phases
13999 (modify-phases %standard-phases
14000 (replace 'check
14001 (lambda _
14002 ;; Somehow, tests for python2-pylint
14003 ;; fail if run from the build directory
14004 (let ((work "/tmp/work"))
14005 (mkdir-p work)
14006 (setenv "PYTHONPATH"
14007 (string-append (getenv "PYTHONPATH") ":" work))
14008 (copy-recursively "." work)
14009 (with-directory-excursion "/tmp"
14010 (zero? (system* "python" "-m" "unittest" "discover"
14011 "-s" (string-append work "/pylint/test")
14012 "-p" "*test_*.py")))))))))
14013 (home-page "https://github.com/PyCQA/pylint")
14014 (synopsis "Python source code analyzer which looks for coding standard
14015 errors")
14016 (description "Pylint is a Python source code analyzer which looks
14017 for programming errors, helps enforcing a coding standard and sniffs
14018 for some code smells (as defined in Martin Fowler's Refactoring book).
14019
14020 Pylint has many rules enabled by default, way too much to silence them
14021 all on a minimally sized program. It's highly configurable and handle
14022 pragmas to control it from within your code. Additionally, it is
14023 possible to write plugins to add your own checks.")
14024 (license license:gpl2+)))
14025
14026 (define-public python2-pylint
14027 (let ((pylint (package-with-python2 python-pylint)))
14028 (package (inherit pylint)
14029 (propagated-inputs
14030 `(("python2-backports-functools-lru-cache"
14031 ,python2-backports-functools-lru-cache)
14032 ("python2-configparser" ,python2-configparser)
14033 ,@(package-propagated-inputs pylint))))))
14034
14035 (define-public python-paramunittest
14036 (package
14037 (name "python-paramunittest")
14038 (version "0.2")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "ParamUnittest" version))
14043 (sha256
14044 (base32
14045 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14046 (build-system python-build-system)
14047 (home-page
14048 "https://github.com/rik0/ParamUnittest")
14049 (synopsis
14050 "Simple extension to have parametrized unit tests")
14051 (description
14052 "This package allows to create parametrized unit-tests that work with the standard
14053 unittest package. A parametrized test case is automatically converted to multiple test
14054 cases. Since they are TestCase subclasses, they work with other test suites that
14055 recognize TestCases.")
14056 (license license:bsd-2)))
14057
14058 (define-public python2-python-paramunittest
14059 (package-with-python2 python-paramunittest))
14060
14061 (define-public python-mando
14062 (package
14063 (name "python-mando")
14064 (version "0.5")
14065 (source
14066 (origin
14067 (method url-fetch)
14068 (uri (pypi-uri "mando" version))
14069 (sha256
14070 (base32
14071 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14072 (build-system python-build-system)
14073 (propagated-inputs
14074 `(("python-rst2ansi" ,python-rst2ansi)))
14075 (native-inputs
14076 `(("python-sphinx" ,python-sphinx-1.5.3)
14077 ("python-paramunittest" ,python-paramunittest)))
14078 (home-page "https://mando.readthedocs.org/")
14079 (synopsis
14080 "Wrapper around argparse, allowing creation of complete CLI applications")
14081 (description
14082 "This package is a wrapper around argparse, allowing you to write complete CLI
14083 applications in seconds while maintaining all the flexibility.")
14084 (license license:expat)))
14085
14086 (define-public python2-mando
14087 (package-with-python2 python-mando))
14088
14089 (define-public python-mando-0.3.1
14090 ;; python-radon (version 1.5.0) has a requirement
14091 ;; for mando<0.4,>=0.3
14092 (package
14093 (inherit python-mando)
14094 (name "python-mando")
14095 (version "0.3.1")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (string-append "https://github.com/rubik/mando/archive/v"
14100 version
14101 ".tar.gz"))
14102 (sha256
14103 (base32
14104 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14105
14106 (define-public python-fudge
14107 (package
14108 (name "python-fudge")
14109 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14110 ;; package, which is currently the only use of this package.
14111 (version "0.9.6")
14112 (source
14113 (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "fudge" version))
14116 (sha256
14117 (base32
14118 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14119 (build-system python-build-system)
14120 (arguments
14121 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14122 (home-page "https://github.com/fudge-py/fudge")
14123 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14124 (description
14125 "Fudge is a Python module for using fake objects (mocks and stubs) to
14126 test real ones.
14127
14128 In readable Python code, you declare the methods available on your fake object
14129 and how they should be called. Then you inject that into your application and
14130 start testing. This declarative approach means you don’t have to record and
14131 playback actions and you don’t have to inspect your fakes after running code.
14132 If the fake object was used incorrectly then you’ll see an informative
14133 exception message with a traceback that points to the culprit.")
14134 (license license:expat)))
14135
14136 (define-public python2-fudge
14137 (package-with-python2 python-fudge))
14138
14139 (define-public python-oauth2client
14140 (package
14141 (name "python-oauth2client")
14142 (version "4.0.0")
14143 (source
14144 (origin
14145 (method url-fetch)
14146 (uri (pypi-uri "oauth2client" version))
14147 (sha256
14148 (base32
14149 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14150 (build-system python-build-system)
14151 (arguments
14152 `(#:tests? #f))
14153 (propagated-inputs
14154 `(("python-httplib2" ,python-httplib2)
14155 ("python-pyasn1" ,python-pyasn1)
14156 ("python-pyasn1-modules" ,python-pyasn1-modules)
14157 ("python-rsa" ,python-rsa)
14158 ("python-six" ,python-six)))
14159 (home-page "http://github.com/google/oauth2client/")
14160 (synopsis "OAuth 2.0 client library")
14161 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14162 library for Python")
14163 (license license:asl2.0)))
14164
14165 (define-public python-flask-oidc
14166 (package
14167 (name "python-flask-oidc")
14168 (version "1.1.1")
14169 (source
14170 (origin
14171 (method url-fetch)
14172 (uri (pypi-uri "flask-oidc" version))
14173 (sha256
14174 (base32
14175 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14176 (build-system python-build-system)
14177 (propagated-inputs
14178 `(("python-flask" ,python-flask)
14179 ("python-itsdangerous" ,python-itsdangerous)
14180 ("python-oauth2client" ,python-oauth2client)
14181 ("python-six" ,python-six)))
14182 (native-inputs
14183 `(("python-nose" ,python-nose)
14184 ("python-mock" ,python-mock)))
14185 (home-page "https://github.com/puiterwijk/flask-oidc")
14186 (synopsis "OpenID Connect extension for Flask")
14187 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14188 for Flask.")
14189 (license license:bsd-2)))
14190
14191 (define-public python-mwclient
14192 (package
14193 (name "python-mwclient")
14194 (version "0.8.4")
14195 (source
14196 (origin
14197 (method url-fetch)
14198 ;; The PyPI version wouldn't contain tests.
14199 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14200 "v" version ".tar.gz"))
14201 (sha256
14202 (base32
14203 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14204 (build-system python-build-system)
14205 (propagated-inputs
14206 `(("python-requests" ,python-requests)
14207 ("python-requests-oauthlib"
14208 ,python-requests-oauthlib)
14209 ("python-six" ,python-six)))
14210 (native-inputs
14211 `(("python-mock" ,python-mock)
14212 ("python-pytest" ,python-pytest)
14213 ("python-pytest-pep8" ,python-pytest-pep8)
14214 ("python-pytest-cache" ,python-pytest-cache)
14215 ("python-pytest-cov" ,python-pytest-cov)
14216 ("python-responses" ,python-responses)))
14217 (home-page "https://github.com/btongminh/mwclient")
14218 (synopsis "MediaWiki API client")
14219 (description "This package provides a MediaWiki API client.")
14220 (license license:expat)))
14221
14222 (define-public python2-mwclient
14223 (package-with-python2 python-mwclient))
14224
14225 (define-public python-pytest-warnings
14226 (package
14227 (name "python-pytest-warnings")
14228 (version "0.2.0")
14229 (source
14230 (origin
14231 (method url-fetch)
14232 (uri (pypi-uri "pytest-warnings" version))
14233 (sha256
14234 (base32
14235 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14236 (build-system python-build-system)
14237 (propagated-inputs
14238 `(("pytest" ,python-pytest-3.0)))
14239 (home-page "https://github.com/fschulze/pytest-warnings")
14240 (synopsis "Pytest plugin to list Python warnings in pytest report")
14241 (description
14242 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14243 pytest report.")
14244 (license license:expat)))
14245
14246 (define-public python2-pytest-warnings
14247 (package-with-python2 python-pytest-warnings))
14248
14249 (define-public python-pytest-catchlog
14250 (package
14251 (name "python-pytest-catchlog")
14252 (version "1.2.2")
14253 (source
14254 (origin
14255 (method url-fetch)
14256 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14257 (sha256
14258 (base32
14259 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14260 (build-system python-build-system)
14261 (native-inputs
14262 `(("unzip" ,unzip)))
14263 (propagated-inputs
14264 `(("pytest" ,python-pytest-3.0)))
14265 (home-page "https://github.com/eisensheng/pytest-catchlog")
14266 (synopsis "Pytest plugin to catch log messages")
14267 (description
14268 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14269 a fork of pytest-capturelog.")
14270 (license license:expat)))
14271
14272 (define-public python2-pytest-catchlog
14273 (package-with-python2 python-pytest-catchlog))
14274
14275 (define-public python-utils
14276 (package
14277 (name "python-utils")
14278 (version "2.1.0")
14279 (source (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "python-utils" version))
14282 (sha256
14283 (base32
14284 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14285 (build-system python-build-system)
14286 (native-inputs
14287 `(("pytest-runner" ,python-pytest-runner)
14288 ("pytest" ,python-pytest)
14289 ("six" ,python-six)))
14290 (home-page "https://github.com/WoLpH/python-utils")
14291 (synopsis "Convenient utilities not included with the standard Python install")
14292 (description
14293 "Python Utils is a collection of small Python functions and classes which
14294 make common patterns shorter and easier.")
14295 (license license:bsd-2)))
14296
14297 (define-public python2-utils
14298 (package-with-python2 python-utils))
14299
14300 (define-public python-webassets
14301 (package
14302 (name "python-webassets")
14303 (version "0.12.1")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "webassets" version))
14308 (sha256
14309 (base32
14310 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14311 (build-system python-build-system)
14312 (native-inputs
14313 `(("python-jinja2" ,python-jinja2)
14314 ("python-mock" ,python-mock)
14315 ("python-nose" ,python-nose)
14316 ("python-pytest" ,python-pytest)))
14317 (home-page "https://github.com/miracle2k/webassets")
14318 (synopsis "Media asset management")
14319 (description "Merges, minifies and compresses Javascript and CSS files,
14320 supporting a variety of different filters, including YUI, jsmin, jspacker or
14321 CSS tidy. Also supports URL rewriting in CSS files.")
14322 (license license:bsd-2)))
14323
14324 (define-public python-sphinx-me
14325 (package
14326 (name "python-sphinx-me")
14327 (version "0.3")
14328 (source
14329 (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "sphinx-me" version))
14332 (sha256
14333 (base32
14334 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14335 (build-system python-build-system)
14336 (home-page "https://github.com/stephenmcd/sphinx-me")
14337 (synopsis "Create a Sphinx documentation shell")
14338 (description
14339 "Create a Sphinx documentation shell for your project and include the
14340 README file as the documentation index. It handles extracting the required
14341 meta data such as the project name, author and version from your project for
14342 use in your Sphinx docs.")
14343 (license license:bsd-2)))
14344
14345 (define-public python2-sphinx-me
14346 (package-with-python2 python-sphinx-me))
14347
14348 (define-public python-cssmin
14349 (package
14350 (name "python-cssmin")
14351 (version "0.2.0")
14352 (source
14353 (origin
14354 (method url-fetch)
14355 (uri (pypi-uri "cssmin" version))
14356 (sha256
14357 (base32
14358 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14359 (build-system python-build-system)
14360 (home-page "https://github.com/zacharyvoase/cssmin")
14361 (synopsis "Python port of the YUI CSS Compressor")
14362 (description "Python port of the YUI CSS Compressor.")
14363 (license (list license:expat license:bsd-3))))
14364
14365 (define-public python2-cssmin
14366 (package-with-python2 python-cssmin))
14367
14368 (define-public python-diff-match-patch
14369 (package
14370 (name "python-diff-match-patch")
14371 (version "20121119")
14372 (source
14373 (origin
14374 (method url-fetch)
14375 (uri (pypi-uri "diff-match-patch" version))
14376 (sha256
14377 (base32
14378 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14379 (build-system python-build-system)
14380 (home-page "https://code.google.com/p/google-diff-match-patch")
14381 (synopsis "Synchronize plain text")
14382 (description "Diff Match and Patch libraries offer robust algorithms to
14383 perform the operations required for synchronizing plain text.")
14384 (license license:asl2.0)))
14385
14386 (define-public python2-diff-match-patch
14387 (package-with-python2 python-diff-match-patch))
14388
14389 (define-public python-dirsync
14390 (package
14391 (name "python-dirsync")
14392 (version "2.2.2")
14393 (source
14394 (origin
14395 (method url-fetch)
14396 (uri (pypi-uri "dirsync" version ".zip"))
14397 (sha256
14398 (base32
14399 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14400 (build-system python-build-system)
14401 (native-inputs
14402 `(("unzip" ,unzip)))
14403 (propagated-inputs
14404 `(("six" ,python-six)))
14405 (home-page "https://bitbucket.org/tkhyn/dirsync")
14406 (synopsis "Advanced directory tree synchronisation tool")
14407 (description "Advanced directory tree synchronisation tool.")
14408 (license license:expat)))
14409
14410 (define-public python2-dirsync
14411 (package-with-python2 python-dirsync))
14412
14413 (define-public python-nosexcover
14414 (package
14415 (name "python-nosexcover")
14416 (version "1.0.11")
14417 (source (origin
14418 (method url-fetch)
14419 (uri (pypi-uri "nosexcover" version))
14420 (sha256
14421 (base32
14422 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14423 (build-system python-build-system)
14424 (propagated-inputs
14425 `(("python-coverage" ,python-coverage)
14426 ("python-nose" ,python-nose)))
14427 (home-page "http://github.com/cmheisel/nose-xcover")
14428 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14429 (description "Nose-xcover is a companion to the built-in
14430 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14431 to a file named coverage.xml.
14432
14433 It will honor all the options you pass to the Nose coverage plugin,
14434 especially -cover-package.")
14435 (license license:expat)))
14436
14437 (define-public python2-nosexcover
14438 (package-with-python2 python-nosexcover))
14439
14440 (define-public python-elasticsearch
14441 (package
14442 (name "python-elasticsearch")
14443 (version "1.0.0")
14444 (source
14445 (origin
14446 (method url-fetch)
14447 (uri (pypi-uri "elasticsearch" version))
14448 (sha256
14449 (base32
14450 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14451 (build-system python-build-system)
14452 (native-inputs
14453 `(("python-mock" ,python-mock)
14454 ("python-nosexcover" ,python-nosexcover)
14455 ("python-pyaml" ,python-pyaml)
14456 ("python-requests" ,python-requests)))
14457 (propagated-inputs
14458 `(("urllib3" ,python-urllib3)))
14459 (arguments
14460 ;; tests require the test_elasticsearch module but it is not distributed.
14461 `(#:tests? #f))
14462 (home-page "https://github.com/elastic/elasticsearch-py")
14463 (synopsis "Low-level client for Elasticsearch")
14464 (description "Official low-level client for Elasticsearch. Its goal is to
14465 provide common ground for all Elasticsearch-related code in Python; because of
14466 this it tries to be opinion-free and very extendable.")
14467 (license license:expat)))
14468
14469 (define-public python2-elasticsearch
14470 (package-with-python2 python-elasticsearch))
14471
14472 (define-public python-levenshtein
14473 (package
14474 (name "python-levenshtein")
14475 (version "0.12.0")
14476 (source
14477 (origin
14478 (method url-fetch)
14479 (uri (pypi-uri "python-Levenshtein" version))
14480 (sha256
14481 (base32
14482 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14483 (build-system python-build-system)
14484 (home-page "https://github.com/ztane/python-Levenshtein")
14485 (synopsis "Fast computation of Levenshtein distance and string similarity")
14486 (description
14487 "The Levenshtein Python C extension module contains functions for fast computation of
14488 @enumerate
14489 @item Levenshtein (edit) distance, and edit operations
14490 @item string similarity
14491 @item approximate median strings, and generally string averaging
14492 @item string sequence and set similarity
14493 @end enumerate
14494 It supports both normal and Unicode strings.")
14495 (license license:gpl2+)))
14496
14497 (define-public python2-levenshtein
14498 (package-with-python2 python-levenshtein))
14499
14500 (define-public python-scandir
14501 (package
14502 (name "python-scandir")
14503 (version "1.4")
14504 (source
14505 (origin
14506 (method url-fetch)
14507 (uri (pypi-uri "scandir" version))
14508 (sha256
14509 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14510 (build-system python-build-system)
14511 (home-page "https://github.com/benhoyt/scandir")
14512 (synopsis "Directory iteration function")
14513 (description
14514 "Directory iteration function like os.listdir(), except that instead of
14515 returning a list of bare filenames, it yields DirEntry objects that include
14516 file type and stat information along with the name. Using scandir() increases
14517 the speed of os.walk() by 2-20 times (depending on the platform and file
14518 system) by avoiding unnecessary calls to os.stat() in most cases.")
14519 (license license:bsd-3)))
14520
14521 (define-public python2-scandir
14522 (package-with-python2 python-scandir))
14523
14524 (define-public python2-stemming
14525 (package
14526 (name "python2-stemming")
14527 (version "1.0.1")
14528 (source
14529 (origin
14530 (method url-fetch)
14531 (uri (pypi-uri "stemming" version))
14532 (sha256
14533 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14534 (build-system python-build-system)
14535 (arguments
14536 `(#:python ,python-2))
14537 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14538 (synopsis "Python implementations of various stemming algorithms")
14539 (description
14540 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14541 stemming algorithms for English. These implementations are straightforward and
14542 efficient, unlike some Python versions of the same algorithms available on the
14543 Web. This package is an extraction of the stemming code included in the Whoosh
14544 search engine.")
14545 (license license:public-domain)))
14546
14547 (define-public python-factory-boy
14548 (package
14549 (name "python-factory-boy")
14550 (version "2.8.1")
14551 (source
14552 (origin
14553 (method url-fetch)
14554 (uri (pypi-uri "factory_boy" version))
14555 (sha256
14556 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14557 (build-system python-build-system)
14558 (arguments
14559 ;; Tests are not included in the tarball.
14560 `(#:tests? #f))
14561 (propagated-inputs
14562 `(("faker" ,python-faker)))
14563 (home-page "https://github.com/benhoyt/scandir")
14564 (synopsis "Versatile test fixtures replacement")
14565 (description
14566 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14567
14568 As a fixtures replacement tool, it aims to replace static, hard to maintain
14569 fixtures with easy-to-use factories for complex object.
14570
14571 Instead of building an exhaustive test setup with every possible combination
14572 of corner cases, factory_boy allows you to use objects customized for the
14573 current test, while only declaring the test-specific fields")
14574 (license license:expat)))
14575
14576 (define-public python2-factory-boy
14577 (package-with-python2 python-factory-boy))
14578
14579 (define-public python-translate-toolkit
14580 (package
14581 (name "python-translate-toolkit")
14582 (version "2.1.0")
14583 (source
14584 (origin
14585 (method url-fetch)
14586 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14587 (sha256
14588 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14589 (build-system python-build-system)
14590 (native-inputs
14591 `(("python-pytest" ,python-pytest)
14592 ("python-sphinx" ,python-sphinx)))
14593 (propagated-inputs
14594 `(("python-babel" ,python-babel)
14595 ("python-beautifulsoup4" ,python-beautifulsoup4)
14596 ("python-chardet" ,python-chardet)
14597 ("python-diff-match-patch" ,python-diff-match-patch)
14598 ("python-levenshtein" ,python-levenshtein)
14599 ("python-lxml" ,python-lxml)
14600 ("python-six" ,python-six)
14601 ("python-vobject" ,python-vobject)
14602 ("python-pyyaml" ,python-pyyaml)))
14603 (arguments
14604 ;; TODO: tests are not run, because they end with
14605 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14606 ;; 'parse_funcs'
14607 ;; during test setup.
14608 `(#:tests? #f))
14609 (home-page "http://toolkit.translatehouse.org")
14610 (synopsis "Tools and API for translation and localization engineering")
14611 (description
14612 "Tools and API for translation and localization engineering. It contains
14613 several utilities, as well as an API for building localization tools.")
14614 (license license:gpl2+)))
14615
14616 (define-public python2-translate-toolkit
14617 (package-with-python2 python-translate-toolkit))
14618
14619 (define-public python-mysqlclient
14620 (package
14621 (name "python-mysqlclient")
14622 (version "1.3.10")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (pypi-uri "mysqlclient" version))
14627 (sha256
14628 (base32
14629 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14630 (build-system python-build-system)
14631 (native-inputs
14632 `(("mariadb" ,mariadb)
14633 ("nose" ,python-nose)
14634 ("mock" ,python-mock)
14635 ("py.test" ,python-pytest)))
14636 (inputs
14637 `(("mysql" ,mysql)
14638 ("libz" ,zlib)
14639 ("openssl" ,openssl)))
14640 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14641 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14642 (description "MySQLdb is an interface to the popular MySQL database server
14643 for Python. The design goals are:
14644 @enumerate
14645 @item Compliance with Python database API version 2.0 [PEP-0249],
14646 @item Thread-safety,
14647 @item Thread-friendliness (threads will not block each other).
14648 @end enumerate")
14649 (license license:gpl2)))
14650
14651 (define-public python2-mysqlclient
14652 (package-with-python2 python-mysqlclient))
14653
14654 (define-public python-hiredis
14655 (package
14656 (name "python-hiredis")
14657 (version "0.2.0")
14658 (source
14659 (origin
14660 (method url-fetch)
14661 (uri (pypi-uri "hiredis" version))
14662 (sha256
14663 (base32
14664 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14665 (build-system python-build-system)
14666 (arguments
14667 ;; no tests
14668 `(#:tests? #f))
14669 (home-page "https://github.com/redis/hiredis-py")
14670 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14671 (description "Python-hiredis is a python extension that wraps protocol
14672 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14673 (license license:bsd-3)))
14674
14675 (define-public python2-hiredis
14676 (package-with-python2 python-hiredis))
14677
14678 (define-public python-fakeredis
14679 (package
14680 (name "python-fakeredis")
14681 (version "0.8.2")
14682 (source
14683 (origin
14684 (method url-fetch)
14685 (uri (pypi-uri "fakeredis" version))
14686 (sha256
14687 (base32
14688 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14689 (build-system python-build-system)
14690 (arguments
14691 ;; no tests
14692 `(#:tests? #f))
14693 (home-page "https://github.com/jamesls/fakeredis")
14694 (synopsis "Fake implementation of redis API for testing purposes")
14695 (description "Fakeredis is a pure python implementation of the redis-py
14696 python client that simulates talking to a redis server. This was created for a
14697 single purpose: to write unittests. Setting up redis is not hard, but many time
14698 you want to write unittests that do not talk to an external server (such as
14699 redis). This module now allows tests to simply use this module as a reasonable
14700 substitute for redis.")
14701 (license license:bsd-3)))
14702
14703 (define-public python2-fakeredis
14704 (package-with-python2 python-fakeredis))
14705
14706 (define-public python-behave-web-api
14707 (package
14708 (name "python-behave-web-api")
14709 (version "1.0.6")
14710 (source
14711 (origin
14712 (method url-fetch)
14713 (uri (pypi-uri "behave-web-api" version))
14714 (sha256
14715 (base32
14716 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14717 (build-system python-build-system)
14718 (arguments
14719 `(#:phases
14720 (modify-phases %standard-phases
14721 (add-after 'unpack 'fix-dependencies
14722 (lambda _
14723 (substitute* "setup.py"
14724 (("'wheel'") "") ; We don't use it.
14725 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14726 (propagated-inputs
14727 `(("behave" ,behave)
14728 ("python-requests" ,python-requests)))
14729 (home-page "https://github.com/jefersondaniel/behave-web-api")
14730 (synopsis "Provides testing for JSON APIs with Behave for Python")
14731 (description "This package provides testing utility modules for testing
14732 JSON APIs with Behave.")
14733 (license license:expat)))
14734
14735 (define-public python2-behave-web-api
14736 (package-with-python2 python-behave-web-api))
14737
14738 (define-public python-flask-script
14739 (package
14740 (name "python-flask-script")
14741 (version "2.0.5")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "Flask-Script" version))
14746 (sha256
14747 (base32
14748 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14749 (build-system python-build-system)
14750 (propagated-inputs
14751 `(("python-flask" ,python-flask)
14752 ("python-argcomplete" ,python-argcomplete)
14753 ("python-werkzeug" ,python-werkzeug)))
14754 (native-inputs
14755 `(("python-pytest" ,python-pytest)))
14756 (home-page
14757 "http://github.com/smurfix/flask-script")
14758 (synopsis "Scripting support for Flask")
14759 (description "The Flask-Script extension provides support for writing
14760 external scripts in Flask. This includes running a development server,
14761 a customised Python shell, scripts to set up your database, cronjobs,
14762 and other command-line tasks that belong outside the web application
14763 itself.")
14764 (license license:bsd-3)))
14765
14766 (define-public python2-flask-script
14767 (package-with-python2 python-flask-script))
14768
14769 (define-public python-flask-migrate
14770 (package
14771 (name "python-flask-migrate")
14772 (version "2.0.3")
14773 (source
14774 (origin
14775 (method url-fetch)
14776 (uri (pypi-uri "Flask-Migrate" version))
14777 (sha256
14778 (base32
14779 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14780 (build-system python-build-system)
14781 (propagated-inputs
14782 `(("python-flask" ,python-flask)
14783 ("python-alembic" ,python-alembic)
14784 ("python-sqlalchemy" ,python-sqlalchemy)
14785 ("python-flask-script" ,python-flask-script)
14786 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14787 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14788 (synopsis "SQLAlchemy database migrations for Flask programs using
14789 Alembic")
14790 (description "This package contains SQLAlchemy database migration tools
14791 for Flask programs that are using @code{python-alembic}.")
14792 (license license:expat)))
14793
14794 (define-public python2-flask-migrate
14795 (package-with-python2 python-flask-migrate))
14796
14797 (define-public python-packaging
14798 (package
14799 (name "python-packaging")
14800 (version "16.8")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "packaging" version))
14805 (sha256
14806 (base32
14807 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14808 (build-system python-build-system)
14809 (native-inputs
14810 `(("python-pretend" ,python-pretend)
14811 ("python-pytest" ,python-pytest)))
14812 (propagated-inputs
14813 `(("python-pyparsing" ,python-pyparsing)
14814 ("python-six" ,python-six)))
14815 (home-page "https://github.com/pypa/packaging")
14816 (synopsis "Core utilities for Python packages")
14817 (description "Packaging is a Python module for dealing with Python packages.
14818 It offers an interface for working with package versions, names, and dependency
14819 information.")
14820 ;; From 'LICENSE': This software is made available under the terms of
14821 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14822 ;; Contributions to this software is made under the terms of *both* these
14823 ;; licenses.
14824 (license (list license:asl2.0 license:bsd-2))))
14825
14826 (define-public python2-packaging
14827 (package-with-python2 python-packaging))
14828
14829 (define-public python-sql
14830 (package
14831 (name "python-sql")
14832 (version "0.9")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (pypi-uri "python-sql" version))
14837 (sha256
14838 (base32
14839 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14840 (build-system python-build-system)
14841 (home-page "https://python-sql.tryton.org/")
14842 (synopsis "Library to write SQL queries in a pythonic way")
14843 (description "@code{python-sql} is a library to write SQL queries, that
14844 transforms idiomatic python function calls to well-formed SQL queries.")
14845 (license license:bsd-3)))
14846
14847 (define-public python2-sql
14848 (package-with-python2 python-sql))
14849
14850 (define-public python-genshi
14851 (package
14852 (name "python-genshi")
14853 (version "0.7")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (string-append
14858 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14859 version ".tar.gz"))
14860 (patches
14861 (search-patches
14862 ;; The first 4 patches are in the master branch upstream.
14863 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14864 ;; The last 2 are NOT in any branch.
14865 ;; They were sent as attachments to a ticket opened at
14866 ;; https://genshi.edgewall.org/ticket/602#no1
14867 "python-genshi-stripping-of-unsafe-script-tags.patch"
14868 "python-genshi-disable-speedups-on-python-3.3.patch"
14869 "python-genshi-isstring-helper.patch"
14870 "python-genshi-add-support-for-python-3.4-AST.patch"
14871 "python-genshi-fix-tests-on-python-3.5.patch"
14872 "python-genshi-buildable-on-python-2.7.patch"))
14873 (sha256
14874 (base32
14875 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14876 (build-system python-build-system)
14877 (home-page "https://genshi.edgewall.org/")
14878 (synopsis "Toolkit for generation of output for the web")
14879 (description "Genshi is a Python library that provides an integrated set
14880 of components for parsing, generating, and processing HTML, XML or other
14881 textual content for output generation on the web.")
14882 (license license:bsd-3)))
14883
14884 ;; The linter here claims that patch file names should start with the package
14885 ;; name. But, in this case the patches are inherited from python-genshi with
14886 ;; the "python-genshi-" prefix instead of "python2-genshi-".
14887 (define-public python2-genshi
14888 (package-with-python2 python-genshi))
14889
14890 (define-public python-relatorio
14891 (package
14892 (name "python-relatorio")
14893 (version "0.6.4")
14894 (source
14895 (origin
14896 (method url-fetch)
14897 (uri (pypi-uri "relatorio" version))
14898 (sha256
14899 (base32
14900 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
14901 (build-system python-build-system)
14902 (propagated-inputs
14903 `(("python-lxml" ,python-lxml)
14904 ("python-genshi" ,python-genshi)))
14905 (home-page "https://relatorio.tryton.org/")
14906 (synopsis "Templating library able to output ODT and PDF files")
14907 (description "Relatorio is a templating library which provides a way to
14908 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14909 for more filetypes can be easily added by creating plugins for them.")
14910 (license license:gpl3+)))
14911
14912 (define-public python2-relatorio
14913 (package-with-python2 python-relatorio))
14914
14915 (define-public python-radon
14916 (package
14917 (name "python-radon")
14918 (version "1.5.0")
14919 (source
14920 (origin
14921 (method url-fetch)
14922 (uri (pypi-uri "radon" version))
14923 (sha256
14924 (base32
14925 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
14926 (build-system python-build-system)
14927 (propagated-inputs
14928 `(("python-colorama" ,python-colorama)
14929 ("python-flake8-polyfill" ,python-flake8-polyfill)
14930 ("python-mando" ,python-mando-0.3.1)))
14931 (native-inputs
14932 `(("python-flake8" ,python-flake8)
14933 ("python-tox" ,python-tox)
14934 ("python-pytest" ,python-pytest)
14935 ("python-paramunittest" ,python-paramunittest)))
14936 (home-page "https://radon.readthedocs.org/")
14937 (synopsis "Code Metrics in Python")
14938 (description "Radon is a Python tool which computes various code metrics.
14939 Supported metrics are:
14940 @itemize @bullet
14941 @item raw metrics: SLOC, comment lines, blank lines, &c.
14942 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14943 @item Halstead metrics (all of them)
14944 @item the Maintainability Index (a Visual Studio metric)
14945 @end itemize")
14946 (license license:expat)))
14947
14948 (define-public python2-radon
14949 (package-with-python2 python-radon))
14950
14951 (define-public python-sure
14952 (package
14953 (name "python-sure")
14954 (version "1.4.6")
14955 (source
14956 (origin
14957 (method url-fetch)
14958 (uri (pypi-uri "sure" version))
14959 (sha256
14960 (base32
14961 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
14962 (build-system python-build-system)
14963 (propagated-inputs
14964 `(("python-mock" ,python-mock)
14965 ("python-six" ,python-six)))
14966 (native-inputs
14967 `(("python-nose" ,python-nose)))
14968 (home-page "https://github.com/gabrielfalcao/sure")
14969 (synopsis "Automated testing library in python for python")
14970 (description
14971 "Sure is a python library that leverages a DSL for writing assertions.
14972 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14973 (license license:gpl3+)))
14974
14975 (define-public python2-sure
14976 (package-with-python2 python-sure))
14977
14978 (define-public python2-couleur
14979 ;; This package does not seem to support python3 at all, hence,
14980 ;; only the python2 variant definition is provided.
14981 (package
14982 (name "python2-couleur")
14983 (version "0.6.2")
14984 (source
14985 (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "couleur" version))
14988 (sha256
14989 (base32
14990 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14991 (build-system python-build-system)
14992 (arguments
14993 `(#:python ,python-2))
14994 (home-page "https://github.com/gabrielfalcao/couleur")
14995 (synopsis
14996 "ANSI terminal tool for python, colored shell and other handy fancy features")
14997 (description
14998 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14999 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15000 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15001 ;; https://github.com/gabrielfalcao/couleur/issues/11
15002 (license license:lgpl3+)))
15003
15004 (define-public python-misaka
15005 (package
15006 (name "python-misaka")
15007 (version "2.1.0")
15008 (source
15009 (origin
15010 (method url-fetch)
15011 (uri (pypi-uri "misaka" version))
15012 (sha256
15013 (base32
15014 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15015 (build-system python-build-system)
15016 (arguments
15017 `(;; Line 37 of setup.py calls self.run_command('develop')
15018 ;; in the 'check' phase. This command seems to be trying
15019 ;; to write to
15020 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15021 ;; for which it does not have the permission to write.
15022 #:tests? #f))
15023 (propagated-inputs
15024 `(("python-cffi" ,python-cffi)))
15025 (home-page "https://github.com/FSX/misaka")
15026 (synopsis "Python binding for Hoedown")
15027 (description
15028 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15029 library written in C. It features a fast HTML renderer and functionality to make custom
15030 renderers (e.g. man pages or LaTeX).")
15031 (license license:expat)))
15032
15033 (define-public python2-misaka
15034 (package-with-python2 python-misaka))
15035
15036 (define-public python2-steadymark
15037 ;; This is forced into being a python2 only variant
15038 ;; due to its dependence on couleur that has no support
15039 ;; for python3
15040 (package
15041 (name "python2-steadymark")
15042 (version "0.7.3")
15043 (source
15044 (origin
15045 (method url-fetch)
15046 (uri (pypi-uri "steadymark" version))
15047 (sha256
15048 (base32
15049 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15050 (build-system python-build-system)
15051 (native-inputs
15052 `(("python-couleur" ,python2-couleur)
15053 ("python-sure" ,python2-sure)
15054 ("python-misaka" ,python2-misaka)))
15055 (arguments
15056 `(#:python ,python-2
15057 #:phases
15058 (modify-phases %standard-phases
15059 (add-before 'build 'patch-setup-py
15060 (lambda _
15061 ;; Update requirements from dependency==version
15062 ;; to dependency>=version
15063 (substitute* "setup.py"
15064 (("==") ">="))
15065 #t)))))
15066 (home-page "https://github.com/gabrielfalcao/steadymark")
15067 (synopsis "Markdown-based test runner for python")
15068 (description
15069 "@code{Steadymark} allows documentation to be written in github-flavoured
15070 markdown. The documentation may contain snippets of code surrounded by python
15071 code blocks and @code{Steadymark} will find these snippets and run them, making
15072 sure that there are no old malfunctional examples in the documentation examples.")
15073 (license license:expat)))
15074
15075 (define-public python-nose-randomly
15076 (package
15077 (name "python-nose-randomly")
15078 (version "1.2.5")
15079 (source
15080 (origin
15081 (method url-fetch)
15082 (uri (pypi-uri "nose-randomly" version))
15083 (sha256
15084 (base32
15085 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15086 (build-system python-build-system)
15087 (native-inputs
15088 `(("python-nose" ,python-nose)
15089 ("python-numpy" ,python-numpy)))
15090 (home-page "https://github.com/adamchainz/nose-randomly")
15091 (synopsis
15092 "Nose plugin to randomly order tests and control random.seed")
15093 (description
15094 "This is a @code{Nose} plugin to randomly order tests which can be quite
15095 powerful in discovering hidden flaws in the tests themselves, while helping to
15096 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15097 by resetting it to a repeatable number for each test, enabling the tests to
15098 create data based on random numbers and yet remain repeatable.")
15099 (license license:bsd-3)))
15100
15101 (define-public python2-nose-randomly
15102 (package-with-python2 python-nose-randomly))
15103
15104 (define-public python-jsonpointer
15105 (package
15106 (name "python-jsonpointer")
15107 (version "1.10")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "jsonpointer" version))
15112 (sha256
15113 (base32
15114 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15115 (build-system python-build-system)
15116 (home-page "https://github.com/stefankoegl/python-json-pointer")
15117 (synopsis "Identify specific nodes in a JSON document")
15118 (description "@code{jsonpointer} allows you to access specific nodes
15119 by path in a JSON document (see RFC 6901).")
15120 (license license:bsd-3)))
15121
15122 (define-public python2-jsonpointer
15123 (package-with-python2 python-jsonpointer))
15124
15125 (define-public python-rfc3987
15126 (package
15127 (name "python-rfc3987")
15128 (version "1.3.7")
15129 (source
15130 (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "rfc3987" version))
15133 (sha256
15134 (base32
15135 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15136 (build-system python-build-system)
15137 (home-page "http://pypi.python.org/pypi/rfc3987")
15138 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15139 (description "@code{rfc3987} provides routines for parsing and
15140 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15141 (license license:gpl3+)))
15142
15143 (define-public python2-rfc3987
15144 (package-with-python2 python-rfc3987))
15145
15146 (define-public python-validate-email
15147 (package
15148 (name "python-validate-email")
15149 (version "1.3")
15150 (source
15151 (origin
15152 (method url-fetch)
15153 (uri (pypi-uri "validate_email" version))
15154 (sha256
15155 (base32
15156 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15157 (build-system python-build-system)
15158 (home-page "http://github.com/syrusakbary/validate_email")
15159 (synopsis "Verifies if an email address is valid and really exists")
15160 (description "@code{validate_email} can be used to verify if an email
15161 address is valid and really exists.")
15162 (license license:lgpl3+)))
15163
15164 (define-public python2-validate-email
15165 (package-with-python2 python-validate-email))
15166
15167 (define-public python-flex
15168 (package
15169 (name "python-flex")
15170 (version "6.10.0")
15171 (source
15172 (origin
15173 (method url-fetch)
15174 (uri (pypi-uri "flex" version))
15175 (sha256
15176 (base32
15177 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15178 (build-system python-build-system)
15179 (propagated-inputs
15180 `(("python-click" ,python-click)
15181 ("python-iso8601" ,python-iso8601)
15182 ("python-jsonpointer" ,python-jsonpointer)
15183 ("python-pyyaml" ,python-pyyaml)
15184 ("python-requests" ,python-requests)
15185 ("python-rfc3987" ,python-rfc3987)
15186 ("python-six" ,python-six)
15187 ("python-validate-email" ,python-validate-email)))
15188 (home-page "https://github.com/pipermerriam/flex")
15189 (synopsis "Validates Swagger schemata")
15190 (description "@code{flex} can be used to validate Swagger schemata.")
15191 (license license:bsd-3)))
15192
15193 (define-public python2-flex
15194 (package-with-python2 python-flex))
15195
15196 (define-public python-marshmallow
15197 (package
15198 (name "python-marshmallow")
15199 (version "3.0.0b2")
15200 (source
15201 (origin
15202 (method url-fetch)
15203 (uri (pypi-uri "marshmallow" version))
15204 (sha256
15205 (base32
15206 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15207 (build-system python-build-system)
15208 (propagated-inputs
15209 `(("python-dateutil" ,python-dateutil)
15210 ("python-simplejson" ,python-simplejson)))
15211 (native-inputs
15212 `(("python-pytest-3.0" ,python-pytest-3.0)
15213 ("python-pytz" ,python-pytz)))
15214 (home-page "https://github.com/marshmallow-code/marshmallow")
15215 (synopsis "Convert complex datatypes to and from native
15216 Python datatypes.")
15217 (description "@code{marshmallow} provides a library for converting
15218 complex datatypes to and from native Python datatypes.")
15219 (license license:expat)))
15220
15221 (define-public python2-marshmallow
15222 (package-with-python2 python-marshmallow))
15223
15224 (define-public python-bottle
15225 (package
15226 (name "python-bottle")
15227 (version "0.12.13")
15228 (source
15229 (origin
15230 (method url-fetch)
15231 (uri (pypi-uri "bottle" version))
15232 (sha256
15233 (base32
15234 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15235 (build-system python-build-system)
15236 (home-page "http://bottlepy.org/")
15237 (synopsis "WSGI framework for small web-applications.")
15238 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15239 (license license:expat)))
15240
15241 (define-public python2-bottle
15242 (package-with-python2 python-bottle))
15243
15244 (define-public python-apispec
15245 (package
15246 (name "python-apispec")
15247 (version "0.22.0")
15248 (source
15249 (origin
15250 (method url-fetch)
15251 (uri (pypi-uri "apispec" version))
15252 (sha256
15253 (base32
15254 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15255 (build-system python-build-system)
15256 (propagated-inputs
15257 `(("python-pyyaml" ,python-pyyaml)))
15258 (native-inputs
15259 `(("python-pytest-3.0" ,python-pytest-3.0)
15260 ("python-flask" ,python-flask)
15261 ("python-marshmallow" ,python-marshmallow)
15262 ("python-tornado" ,python-tornado)
15263 ("python-bottle" ,python-bottle)
15264 ("python-mock" ,python-mock)))
15265 (home-page "https://github.com/marshmallow-code/apispec")
15266 (synopsis "Swagger 2.0 API specification generator")
15267 (description "@code{python-apispec} is a pluggable API specification
15268 generator. Currently supports the OpenAPI specification (f.k.a.
15269 Swagger 2.0).")
15270 (license license:expat)))
15271
15272 (define-public python2-apispec
15273 (package-with-python2 python-apispec))
15274
15275 (define-public python-flasgger
15276 (package
15277 (name "python-flasgger")
15278 (version "0.6.3")
15279 (source
15280 (origin
15281 (method url-fetch)
15282 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15283 version ".tar.gz"))
15284 (file-name (string-append name "-" version ".tar.gz"))
15285 (sha256
15286 (base32
15287 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15288 (build-system python-build-system)
15289 (arguments
15290 `(#:phases
15291 (modify-phases %standard-phases
15292 (replace 'check
15293 (lambda* (#:key inputs outputs #:allow-other-keys)
15294 (substitute* "Makefile"
15295 (("flake8 flasgger --ignore=F403")
15296 "flake8 flasgger --ignore=E731,F403"))
15297 (setenv "PYTHONPATH" (string-append (getcwd)
15298 ":"
15299 (getenv "PYTHONPATH")))
15300 (zero? (system* "py.test")))))))
15301 (propagated-inputs
15302 `(("python-flask" ,python-flask)
15303 ("python-pyyaml" ,python-pyyaml)
15304 ("python-jsonschema" ,python-jsonschema)
15305 ("python-mistune" ,python-mistune)
15306 ("python-six" ,python-six)))
15307 (native-inputs
15308 `(("python-decorator" ,python-decorator)
15309 ("python-flake8" ,python-flake8)
15310 ("python-flask-restful" ,python-flask-restful)
15311 ("python-flex" ,python-flex)
15312 ("python-pytest-3.0" ,python-pytest-3.0)
15313 ("python-pytest-cov" ,python-pytest-cov)
15314 ("python-marshmallow" ,python-marshmallow)
15315 ("python-apispec" ,python-apispec)))
15316 (home-page "https://github.com/rochacbruno/flasgger/")
15317 (synopsis "Extract Swagger specs from your Flask project")
15318 (description "@code{python-flasgger} allows extracting Swagger specs
15319 from your Flask project. It is a fork of Flask-Swagger.")
15320 (license license:expat)))
15321
15322 (define-public python2-flasgger
15323 (package-with-python2 python-flasgger))
15324
15325 (define-public python-swagger-spec-validator
15326 (package
15327 (name "python-swagger-spec-validator")
15328 (version "2.1.0")
15329 (source
15330 (origin
15331 (method url-fetch)
15332 (uri (pypi-uri "swagger-spec-validator" version))
15333 (sha256
15334 (base32
15335 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15336 (build-system python-build-system)
15337 (propagated-inputs
15338 `(("python-jsonschema" ,python-jsonschema)
15339 ("python-six" ,python-six)))
15340 (home-page
15341 "http://github.com/Yelp/swagger_spec_validator")
15342 (synopsis "Validation of Swagger specifications")
15343 (description "@code{swagger_spec_validator} provides a library for
15344 validating Swagger API specifications.")
15345 (license license:asl2.0)))
15346
15347 (define-public python2-swagger-spec-validator
15348 (package-with-python2 python-swagger-spec-validator))
15349
15350 (define-public python-apache-libcloud
15351 (package
15352 (name "python-apache-libcloud")
15353 (version "2.0.0")
15354 (source
15355 (origin
15356 (method url-fetch)
15357 (uri (pypi-uri "apache-libcloud" version))
15358 (sha256
15359 (base32
15360 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15361 (build-system python-build-system)
15362 (arguments
15363 `(#:phases
15364 (modify-phases %standard-phases
15365 (add-after 'unpack 'patch-ssh
15366 (lambda* (#:key inputs #:allow-other-keys)
15367 (substitute* "libcloud/compute/ssh.py"
15368 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15369 "/bin/ssh" "'")))
15370 #t))
15371 (add-after 'unpack 'patch-tests
15372 (lambda _
15373 (substitute* "./libcloud/test/test_file_fixtures.py"
15374 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15375 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15376 return (httplib.OK,
15377 \"1234abcd\",
15378 {\"test\": \"value\"},
15379 httplib.responses[httplib.OK])
15380 def _ascii"))
15381 (substitute* "libcloud/test/compute/test_ssh_client.py"
15382 (("class ShellOutSSHClientTests")
15383 "@unittest.skip(\"Guix container doesn't have ssh service\")
15384 class ShellOutSSHClientTests")
15385 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15386 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15387 (("'.xF0', '.x90', '.x8D', '.x88'")
15388 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15389 #t)))))
15390 (inputs
15391 `(("openssh" ,openssh)))
15392 (propagated-inputs
15393 `(("python-paramiko" ,python-paramiko)
15394 ("python-requests" ,python-requests)))
15395 (native-inputs
15396 `(("python-lockfile" ,python-lockfile)
15397 ("python-mock" ,python-mock)
15398 ("python-requests-mock" ,python-requests-mock)))
15399 (home-page "https://libcloud.apache.org/")
15400 (synopsis "Unified Cloud API")
15401 (description "@code{libcloud} is a Python library for interacting with
15402 many of the popular cloud service providers using a unified API.")
15403 (license license:asl2.0)))
15404
15405 (define-public python2-apache-libcloud
15406 (package-with-python2 python-apache-libcloud))
15407
15408 (define-public python-smmap2
15409 (package
15410 (name "python-smmap2")
15411 (version "2.0.3")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "smmap2" version))
15416 (sha256
15417 (base32
15418 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15419 (build-system python-build-system)
15420 (native-inputs
15421 `(("python-nosexcover" ,python-nosexcover)))
15422 (home-page "https://github.com/Byron/smmap")
15423 (synopsis "Python sliding window memory map manager")
15424 (description "@code{smmap2} is a pure Python implementation of a sliding
15425 window memory map manager.")
15426 (license license:bsd-3)))
15427
15428 (define-public python2-smmap2
15429 (package-with-python2 python-smmap2))
15430
15431 (define-public python-regex
15432 (package
15433 (name "python-regex")
15434 (version "2017.06.07")
15435 (source (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "regex" version))
15438 (sha256
15439 (base32
15440 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15441 (build-system python-build-system)
15442 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15443 (synopsis "Alternative regular expression module")
15444 (description "This regular expression implementation is backwards-
15445 compatible with the standard @code{re} module, but offers additional
15446 functionality like full case-folding for case-insensitive matches in Unicode.")
15447 (license license:psfl)))
15448
15449 (define-public python2-regex
15450 (package-with-python2 python-regex))