gnu: python: Skip one more test.
[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 ;;;
44 ;;; This file is part of GNU Guix.
45 ;;;
46 ;;; GNU Guix is free software; you can redistribute it and/or modify it
47 ;;; under the terms of the GNU General Public License as published by
48 ;;; the Free Software Foundation; either version 3 of the License, or (at
49 ;;; your option) any later version.
50 ;;;
51 ;;; GNU Guix is distributed in the hope that it will be useful, but
52 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
53 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 ;;; GNU General Public License for more details.
55 ;;;
56 ;;; You should have received a copy of the GNU General Public License
57 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
58
59 (define-module (gnu packages python)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages adns)
64 #:use-module (gnu packages attr)
65 #:use-module (gnu packages backup)
66 #:use-module (gnu packages bash)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages crypto)
69 #:use-module (gnu packages databases)
70 #:use-module (gnu packages django)
71 #:use-module (gnu packages file)
72 #:use-module (gnu packages fontutils)
73 #:use-module (gnu packages gcc)
74 #:use-module (gnu packages ghostscript)
75 #:use-module (gnu packages gl)
76 #:use-module (gnu packages glib)
77 #:use-module (gnu packages graphviz)
78 #:use-module (gnu packages gstreamer)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages icu4c)
81 #:use-module (gnu packages image)
82 #:use-module (gnu packages imagemagick)
83 #:use-module (gnu packages libevent)
84 #:use-module (gnu packages libffi)
85 #:use-module (gnu packages linux)
86 #:use-module (gnu packages man)
87 #:use-module (gnu packages maths)
88 #:use-module (gnu packages multiprecision)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages ncurses)
91 #:use-module (gnu packages openstack)
92 #:use-module (gnu packages password-utils)
93 #:use-module (gnu packages pcre)
94 #:use-module (gnu packages perl)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages protobuf)
97 #:use-module (gnu packages qt)
98 #:use-module (gnu packages readline)
99 #:use-module (gnu packages sdl)
100 #:use-module (gnu packages shells)
101 #:use-module (gnu packages ssh)
102 #:use-module (gnu packages statistics)
103 #:use-module (gnu packages tex)
104 #:use-module (gnu packages texinfo)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages version-control)
107 #:use-module (gnu packages video)
108 #:use-module (gnu packages web)
109 #:use-module (gnu packages base)
110 #:use-module (gnu packages xml)
111 #:use-module (gnu packages xorg)
112 #:use-module (gnu packages xdisorg)
113 #:use-module (gnu packages zip)
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 '(begin
344 (for-each delete-file
345 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
346 "Lib/test/test_fcntl.py"))
347 #t))))
348 (arguments (substitute-keyword-arguments (package-arguments python-2)
349 ((#:tests? _) #t)))
350 (native-search-paths
351 (list (search-path-specification
352 (variable "PYTHONPATH")
353 (files (list (string-append "lib/python"
354 (version-major+minor version)
355 "/site-packages"))))))))
356
357 ;; Current 3.x version.
358 (define-public python-3 python-3.5)
359
360 ;; Current major version.
361 (define-public python python-3)
362
363 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
364 ;; Python (Tk -> libxcb -> Python.)
365
366 (define-public python2-minimal
367 (package (inherit python-2)
368 (name "python-minimal")
369 (outputs '("out"))
370
371 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
372 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
373 ;; libffi.
374 (inputs `(("libffi" ,libffi)
375 ("zlib" ,zlib)))))
376
377 (define-public python-minimal
378 (package (inherit python)
379 (name "python-minimal")
380 (outputs '("out"))
381
382 ;; Build fails due to missing ctypes without libffi.
383 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
384 ;; zlib is required by 'zipimport', used by pip.
385 (inputs `(("libffi" ,libffi)
386 ("openssl" ,openssl)
387 ("zlib" ,zlib)))))
388
389 (define* (wrap-python3 python
390 #:optional
391 (name (string-append (package-name python) "-wrapper")))
392 (package (inherit python)
393 (name name)
394 (source #f)
395 (build-system trivial-build-system)
396 (outputs '("out"))
397 (inputs `(("bash" ,bash)))
398 (propagated-inputs `(("python" ,python)))
399 (arguments
400 `(#:modules ((guix build utils))
401 #:builder
402 (begin
403 (use-modules (guix build utils))
404 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
405 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
406 (mkdir-p bin)
407 (for-each
408 (lambda (old new)
409 (symlink (string-append python old)
410 (string-append bin "/" new)))
411 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
412 `("python" ,"pydoc" ,"idle" ,"pip"))
413 ;; python-config outputs search paths based upon its location,
414 ;; use a bash wrapper to avoid changing its outputs.
415 (let ((bash (string-append (assoc-ref %build-inputs "bash")
416 "/bin/bash"))
417 (old (string-append python "python3-config"))
418 (new (string-append bin "/python-config")))
419 (with-output-to-file new
420 (lambda ()
421 (format #t "#!~a~%" bash)
422 (format #t "exec \"~a\" \"$@\"~%" old)
423 (chmod new #o755)
424 #t)))))))
425 (synopsis "Wrapper for the Python 3 commands")
426 (description
427 "This package provides wrappers for the commands of Python@tie{}3.x such
428 that they can be invoked under their usual name---e.g., @command{python}
429 instead of @command{python3}.")))
430
431 (define-public python-wrapper (wrap-python3 python))
432 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
433
434 (define-public python-psutil
435 (package
436 (name "python-psutil")
437 (version "4.3.0")
438 (source
439 (origin
440 (method url-fetch)
441 (uri (pypi-uri "psutil" version))
442 (sha256
443 (base32
444 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
445 (build-system python-build-system)
446 (arguments
447 ;; FIXME: some tests does not return and times out.
448 '(#:tests? #f))
449 (home-page "https://www.github.com/giampaolo/psutil")
450 (synopsis "Library for retrieving information on running processes")
451 (description
452 "psutil (Python system and process utilities) is a library for retrieving
453 information on running processes and system utilization (CPU, memory, disks,
454 network) in Python. It is useful mainly for system monitoring, profiling and
455 limiting process resources and management of running processes. It implements
456 many functionalities offered by command line tools such as: ps, top, lsof,
457 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
458 pidof, tty, taskset, pmap.")
459 (license license:bsd-3)))
460
461 (define-public python2-psutil
462 (package-with-python2 python-psutil))
463
464 (define-public python-passlib
465 (package
466 (name "python-passlib")
467 (version "1.7.1")
468 (source
469 (origin
470 (method url-fetch)
471 (uri (pypi-uri "passlib" version))
472 (sha256
473 (base32
474 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
475 (build-system python-build-system)
476 (native-inputs
477 `(("python-nose" ,python-nose)))
478 (propagated-inputs
479 `(("python-py-bcrypt" ,python-py-bcrypt)))
480 (arguments
481 `(#:phases
482 (alist-cons-before
483 'check 'set-PYTHON_EGG_CACHE
484 ;; some tests require access to "$HOME/.cython"
485 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
486 %standard-phases)))
487 (home-page "https://bitbucket.org/ecollins/passlib")
488 (synopsis
489 "Comprehensive password hashing framework")
490 (description
491 "Passlib is a password hashing library for Python 2 & 3, which provides
492 cross-platform implementations of over 30 password hashing algorithms, as well
493 as a framework for managing existing password hashes. It's designed to be
494 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
495 to providing full-strength password hashing for multi-user application.")
496 (license license:bsd-3)))
497
498 (define-public python2-passlib
499 (package-with-python2 python-passlib))
500
501 (define-public python-py-bcrypt
502 (package
503 (name "python-py-bcrypt")
504 (version "0.4")
505 (source
506 (origin
507 (method url-fetch)
508 (uri (string-append
509 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
510 version
511 ".tar.gz"))
512 (sha256
513 (base32
514 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
515 (build-system python-build-system)
516 (home-page "https://code.google.com/p/py-bcrypt")
517 (synopsis
518 "Bcrypt password hashing and key derivation")
519 (description
520 "A python wrapper of OpenBSD's Blowfish password hashing code. This
521 system hashes passwords using a version of Bruce Schneier's Blowfish block
522 cipher with modifications designed to raise the cost of off-line password
523 cracking and frustrate fast hardware implementation. The computation cost of
524 the algorithm is parametised, so it can be increased as computers get faster.
525 The intent is to make a compromise of a password database less likely to
526 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
527 John the Ripper).")
528 ;; "sha2.c" is under BSD-3;
529 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
530 ;; the rest is under ISC.
531 (license (list license:isc license:bsd-3 license:bsd-4))))
532
533 (define-public python2-py-bcrypt
534 (package-with-python2 python-py-bcrypt))
535
536
537 (define-public python-paramiko
538 (package
539 (name "python-paramiko")
540 (version "2.1.2")
541 (source
542 (origin
543 (method url-fetch)
544 (uri (pypi-uri "paramiko" version))
545 (sha256
546 (base32
547 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
548 (build-system python-build-system)
549 (arguments
550 '(#:phases
551 (modify-phases %standard-phases
552 (replace 'check
553 (lambda _
554 (zero? (system* "python" "test.py")))))))
555 (propagated-inputs
556 `(("python-pyasn1" ,python-pyasn1)
557 ("python-cryptography" ,python-cryptography)))
558 (home-page "http://www.paramiko.org/")
559 (synopsis "SSHv2 protocol library")
560 (description "Paramiko is a python implementation of the SSHv2 protocol,
561 providing both client and server functionality. While it leverages a Python C
562 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
563 Python interface around SSH networking concepts.")
564 (license license:lgpl2.1+)))
565
566 (define-public python2-paramiko
567 (package-with-python2 python-paramiko))
568
569
570 (define-public python-httplib2
571 (package
572 (name "python-httplib2")
573 (version "0.9.2")
574 (source
575 (origin
576 (method url-fetch)
577 (uri (pypi-uri "httplib2" version))
578 (sha256
579 (base32
580 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
581 (build-system python-build-system)
582 (home-page "https://github.com/jcgregorio/httplib2")
583 (synopsis "Comprehensive HTTP client library")
584 (description
585 "A comprehensive HTTP client library supporting many features left out of
586 other HTTP libraries.")
587 (license license:expat)))
588
589 (define-public python2-httplib2
590 (package-with-python2 python-httplib2))
591
592 (define-public python-ecdsa
593 (package
594 (name "python-ecdsa")
595 (version "0.13")
596 (source
597 (origin
598 (method url-fetch)
599 (uri (string-append
600 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
601 version
602 ".tar.gz"))
603 (sha256
604 (base32
605 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
606 (build-system python-build-system)
607 (inputs
608 `(("openssl" ,openssl)))
609 (home-page
610 "https://github.com/warner/python-ecdsa")
611 (synopsis
612 "ECDSA cryptographic signature library (pure python)")
613 (description
614 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
615 Curve Digital Signature Algorithm), implemented purely in Python. With this
616 library, you can quickly create keypairs (signing key and verifying key), sign
617 messages, and verify the signatures. The keys and signatures are very short,
618 making them easy to handle and incorporate into other protocols.")
619 (license license:expat)))
620
621 (define-public python2-ecdsa
622 (package-with-python2 python-ecdsa))
623
624 (define-public python-ccm
625 (package
626 (name "python-ccm")
627 (version "2.1.6")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "ccm" version))
632 (sha256
633 (base32
634 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
635 (build-system python-build-system)
636 (propagated-inputs
637 `(("python-pyyaml" ,python-pyyaml)
638 ;; Not listed in setup.py, but used in ccmlib/node.py for full
639 ;; functionality
640 ("python-psutil" ,python-psutil)
641 ("python-six" ,python-six)))
642 (home-page "https://github.com/pcmanus/ccm")
643 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
644 localhost")
645 (description "Cassandra Cluster Manager is a development tool for testing
646 local Cassandra clusters. It creates, launches and removes Cassandra clusters
647 on localhost.")
648 (license license:asl2.0)))
649
650 (define-public python2-ccm
651 (package-with-python2 python-ccm))
652
653 (define-public python-pytz
654 (package
655 (name "python-pytz")
656 (version "2016.10")
657 (source
658 (origin
659 (method url-fetch)
660 (uri (pypi-uri "pytz" version ".tar.bz2"))
661 (sha256
662 (base32
663 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
664 (build-system python-build-system)
665 (arguments `(#:tests? #f)) ; no test target
666 (home-page "http://pythonhosted.org/pytz")
667 (synopsis "Python timezone library")
668 (description
669 "This library allows accurate and cross platform timezone calculations
670 using Python 2.4 or higher and provides access to the Olson timezone database.")
671 (license license:expat)))
672
673 (define-public python2-pytz
674 (package-with-python2 python-pytz))
675
676
677 (define-public python-babel
678 (package
679 (name "python-babel")
680 (version "2.3.4")
681 (source
682 (origin
683 (method url-fetch)
684 (uri (pypi-uri "Babel" version))
685 (sha256
686 (base32
687 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
688 (build-system python-build-system)
689 (propagated-inputs
690 `(("python-pytz" ,python-pytz)))
691 (arguments `(#:tests? #f)) ; no test target
692 (home-page "http://babel.pocoo.org/")
693 (synopsis
694 "Tools for internationalizing Python applications")
695 (description
696 "Babel is composed of two major parts:
697 - tools to build and work with gettext message catalogs
698 - a Python interface to the CLDR (Common Locale Data Repository), providing
699 access to various locale display names, localized number and date formatting,
700 etc. ")
701 (license license:bsd-3)))
702
703 (define-public python2-babel
704 (package-with-python2 python-babel))
705
706 (define-public python2-backport-ssl-match-hostname
707 (package
708 (name "python2-backport-ssl-match-hostname")
709 (version "3.5.0.1")
710 (source
711 (origin
712 (method url-fetch)
713 (uri (string-append
714 "https://pypi.python.org/packages/source/b/"
715 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
716 version ".tar.gz"))
717 (sha256
718 (base32
719 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
720 (build-system python-build-system)
721 (arguments
722 `(#:python ,python-2
723 #:tests? #f)) ; no test target
724 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
725 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
726 (description
727 "This backport brings the ssl.match_hostname() function to users of
728 earlier versions of Python. The function checks the hostname in the
729 certificate returned by the server to which a connection has been established,
730 and verifies that it matches the intended target hostname.")
731 (license license:psfl)))
732
733 (define-public python-hdf4
734 (package
735 (name "python-hdf4")
736 (version "0.9")
737 (source
738 (origin
739 (method url-fetch)
740 (uri (pypi-uri name version))
741 (sha256
742 (base32
743 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
744 (build-system python-build-system)
745 (native-inputs `(("nose" ,python-nose)))
746 (propagated-inputs `(("numpy" ,python-numpy)))
747 (inputs
748 `(("hdf4" ,hdf4)
749 ("libjpeg" ,libjpeg)
750 ("zlib" ,zlib)))
751 (arguments
752 `(#:phases
753 (modify-phases %standard-phases
754 (replace 'check
755 (lambda _
756 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
757 ;; on to import numpy. Somehow this works on their CI system.
758 ;; Let's just manage PYTHONPATH here instead.
759 (substitute* "runexamples.sh"
760 (("export PYTHONPATH=.*") ""))
761 (setenv "PYTHONPATH"
762 (string-append (getcwd) ":"
763 (getenv "PYTHONPATH")))
764 (and (zero? (system* "./runexamples.sh"))
765 (zero? (system* "nosetests" "-v"))))))))
766 (home-page "https://github.com/fhs/python-hdf4")
767 (synopsis "Python interface to the NCSA HDF4 library")
768 (description
769 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
770 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
771 NetCDF files can also be read and modified. Python-HDF4 is a fork of
772 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
773 (license license:expat)))
774
775 (define-public python2-hdf4
776 (package-with-python2 python-hdf4))
777
778 (define-public python-h5py
779 (package
780 (name "python-h5py")
781 (version "2.6.0")
782 (source
783 (origin
784 (method url-fetch)
785 (uri (pypi-uri "h5py" version))
786 (sha256
787 (base32
788 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
789 (build-system python-build-system)
790 (arguments
791 `(#:tests? #f ; no test target
792 #:phases
793 (modify-phases %standard-phases
794 (add-after 'unpack 'fix-hdf5-paths
795 (lambda* (#:key inputs #:allow-other-keys)
796 (let ((prefix (assoc-ref inputs "hdf5")))
797 (substitute* "setup_build.py"
798 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
799 (string-append "['" prefix "/lib" "']"))
800 (("'/opt/local/include', '/usr/local/include'")
801 (string-append "'" prefix "/include" "'")))
802 (substitute* "setup_configure.py"
803 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
804 (string-append "['" prefix "/lib" "']")))
805 #t))))))
806 (propagated-inputs
807 `(("python-six" ,python-six)
808 ("python-numpy" ,python-numpy)))
809 (inputs
810 `(("hdf5" ,hdf5)))
811 (native-inputs
812 `(("python-cython" ,python-cython)
813 ("python-pkgconfig" ,python-pkgconfig)))
814 (home-page "http://www.h5py.org/")
815 (synopsis "Read and write HDF5 files from Python")
816 (description
817 "The h5py package provides both a high- and low-level interface to the
818 HDF5 library from Python. The low-level interface is intended to be a
819 complete wrapping of the HDF5 API, while the high-level component supports
820 access to HDF5 files, datasets and groups using established Python and NumPy
821 concepts.")
822 (license license:bsd-3)))
823
824 (define-public python2-h5py
825 (package-with-python2 python-h5py))
826
827 (define-public python-netcdf4
828 (package
829 (name "python-netcdf4")
830 (version "1.2.7")
831 (source
832 (origin
833 (method url-fetch)
834 (uri (pypi-uri "netCDF4" version))
835 (sha256
836 (base32
837 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
838 (build-system python-build-system)
839 (native-inputs
840 `(("python-cython" ,python-cython)))
841 (propagated-inputs
842 `(("python-numpy" ,python-numpy)))
843 (inputs
844 `(("netcdf" ,netcdf)
845 ("hdf4" ,hdf4)
846 ("hdf5" ,hdf5)))
847 (arguments
848 '(#:phases
849 (modify-phases %standard-phases
850 (replace 'check
851 (lambda _
852 (setenv "NO_NET" "1") ; disable opendap tests
853 (with-directory-excursion "test"
854 (setenv "PYTHONPATH" ; find and add the library we just built
855 (string-append
856 (car (find-files "../build" "lib.*"
857 #:directories? #:t
858 #:fail-on-error? #:t))
859 ":" (getenv "PYTHONPATH")))
860 (zero? (system* "python" "run_all.py"))))))))
861 (home-page
862 "https://github.com/Unidata/netcdf4-python")
863 (synopsis "Python/numpy interface to the netCDF library")
864 (description "Netcdf4-python is a Python interface to the netCDF C
865 library. netCDF version 4 has many features not found in earlier
866 versions of the library and is implemented on top of HDF5. This module
867 can read and write files in both the new netCDF 4 and the old netCDF 3
868 format, and can create files that are readable by HDF5 clients. The
869 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
870 to users of that module.")
871 ;; The software is mainly ISC, but includes some files covered
872 ;; by the Expat license.
873 (license (list license:isc license:expat))))
874
875 (define-public python2-netcdf4
876 (package-with-python2 python-netcdf4))
877
878 (define-public python-lockfile
879 (package
880 (name "python-lockfile")
881 (version "0.12.2")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
886 "lockfile-" version ".tar.gz"))
887 (sha256
888 (base32
889 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
890 (build-system python-build-system)
891 (arguments '(#:test-target "check"))
892 (native-inputs
893 `(("python-pbr" ,python-pbr)))
894 (home-page "https://launchpad.net/pylockfile")
895 (synopsis "Platform-independent file locking module")
896 (description
897 "The lockfile package exports a LockFile class which provides a simple
898 API for locking files.")
899 (license license:expat)))
900
901 (define-public python2-lockfile
902 (package-with-python2 python-lockfile))
903
904 (define-public python-mock
905 (package
906 (name "python-mock")
907 (version "1.0.1")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (pypi-uri "mock" version))
912 (sha256
913 (base32
914 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
915 (build-system python-build-system)
916 (arguments '(#:test-target "check"))
917 (home-page "https://github.com/testing-cabal/mock")
918 (synopsis "Python mocking and patching library for testing")
919 (description
920 "Mock is a library for testing in Python. It allows you to replace parts
921 of your system under test with mock objects and make assertions about how they
922 have been used.")
923 (license license:expat)))
924
925 (define-public python2-mock
926 (package-with-python2 python-mock))
927
928
929 (define-public python-setuptools
930 (package
931 (name "python-setuptools")
932 (version "31.0.0")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (pypi-uri "setuptools" version))
937 (sha256
938 (base32
939 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
940 (modules '((guix build utils)))
941 (snippet
942 '(begin
943 ;; Remove included binaries which are used to build self-extracting
944 ;; installers for Windows.
945 ;; TODO: Find some way to build them ourself so we can include them.
946 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
947 #t))))
948 (build-system python-build-system)
949 ;; FIXME: Tests require pytest, which itself relies on setuptools.
950 ;; One could bootstrap with an internal untested setuptools.
951 (arguments
952 `(#:tests? #f))
953 (home-page "https://pypi.python.org/pypi/setuptools")
954 (synopsis
955 "Library designed to facilitate packaging Python projects")
956 (description
957 "Setuptools is a fully-featured, stable library designed to facilitate
958 packaging Python projects, where packaging includes:
959 Python package and module definitions,
960 distribution package metadata,
961 test hooks,
962 project installation,
963 platform-specific details,
964 Python 3 support.")
965 ;; TODO: setuptools now bundles the following libraries:
966 ;; packaging, pyparsing, six and appdirs. How to unbundle?
967 (license (list license:psfl ; setuptools itself
968 license:expat ; six, appdirs, pyparsing
969 license:asl2.0 ; packaging is dual ASL2/BSD-2
970 license:bsd-2))))
971
972 (define-public python2-setuptools
973 (package-with-python2 python-setuptools))
974
975 ;;; Pycrypto is abandoned upstream:
976 ;;;
977 ;;; https://github.com/dlitz/pycrypto/issues/173
978 ;;;
979 ;;; TODO Remove this package from GNU Guix.
980 (define-public python-pycrypto
981 (package
982 (name "python-pycrypto")
983 (version "2.6.1")
984 (source
985 (origin
986 (method url-fetch)
987 (uri (pypi-uri "pycrypto" version))
988 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
989 (sha256
990 (base32
991 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
992 (build-system python-build-system)
993 (inputs
994 `(("python" ,python)
995 ("gmp" ,gmp)))
996 (arguments
997 `(#:phases
998 (alist-cons-before
999 'build 'set-build-env
1000 ;; pycrypto runs an autoconf configure script behind the scenes
1001 (lambda _
1002 (setenv "CONFIG_SHELL" (which "bash")))
1003 %standard-phases)))
1004 (home-page "http://www.pycrypto.org/")
1005 (synopsis "Cryptographic modules for Python")
1006 (description
1007 "Pycrypto is a collection of both secure hash functions (such as SHA256
1008 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1009 etc.). The package is structured to make adding new modules easy.")
1010 (license license:public-domain)))
1011
1012 (define-public python2-pycrypto
1013 (let ((pycrypto (package-with-python2 python-pycrypto)))
1014 (package (inherit pycrypto)
1015 (inputs
1016 `(("python" ,python-2)
1017 ,@(alist-delete
1018 "python"
1019 (package-inputs pycrypto)))))))
1020
1021 (define-public python-eventlet
1022 (package
1023 (name "python-eventlet")
1024 (version "0.20.1")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (pypi-uri "eventlet" version))
1029 (sha256
1030 (base32
1031 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1032 (build-system python-build-system)
1033 (propagated-inputs
1034 `(("python-greenlet" ,python-greenlet)))
1035 (home-page "http://eventlet.net")
1036 (synopsis "Concurrent networking library for Python")
1037 (description
1038 "Eventlet is a concurrent networking library for Python that
1039 allows you to change how you run your code, not how you write it.
1040 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1041 Coroutines ensure that the developer uses a blocking style of programming
1042 that is similar to threading, but provide the benefits of non-blocking I/O.
1043 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1044 from the Python interpreter, or as a small part of a larger application.")
1045 (license license:expat)))
1046
1047 (define-public python2-eventlet
1048 (let ((base (package-with-python2
1049 (strip-python2-variant python-eventlet))))
1050 (package (inherit base)
1051 (propagated-inputs
1052 `(("python2-enum34" ,python2-enum34)
1053 ,@(package-propagated-inputs base))))))
1054
1055 (define-public python-keyring
1056 (package
1057 (name "python-keyring")
1058 (version "8.7")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "keyring" version))
1063 (sha256
1064 (base32
1065 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1066 (build-system python-build-system)
1067 (native-inputs
1068 `(("python-setuptools-scm" ,python-setuptools-scm)))
1069 (propagated-inputs
1070 `(("python-pycrypto" ,python-pycrypto)))
1071 (arguments
1072 `(#:tests? #f)) ;TODO: tests require pytest
1073 (home-page "https://github.com/jaraco/keyring")
1074 (synopsis "Store and access your passwords safely")
1075 (description
1076 "The Python keyring lib provides a easy way to access the system keyring
1077 service from python. It can be used in any application that needs safe
1078 password storage.")
1079 ;; "MIT" and PSF dual license
1080 (license license:x11)))
1081
1082 (define-public python2-keyring
1083 (package-with-python2 python-keyring))
1084
1085 (define-public python-six
1086 (package
1087 (name "python-six")
1088 (version "1.10.0")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (pypi-uri "six" version))
1093 (sha256
1094 (base32
1095 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1096 (build-system python-build-system)
1097 (native-inputs
1098 `(("python-py" ,python-py)
1099 ("python-pytest" ,python-pytest)))
1100 (home-page "http://pypi.python.org/pypi/six/")
1101 (synopsis "Python 2 and 3 compatibility utilities")
1102 (description
1103 "Six is a Python 2 and 3 compatibility library. It provides utility
1104 functions for smoothing over the differences between the Python versions with
1105 the goal of writing Python code that is compatible on both Python versions.
1106 Six supports every Python version since 2.5. It is contained in only one
1107 Python file, so it can be easily copied into your project.")
1108 (license license:x11)))
1109
1110 (define-public python2-six
1111 (package-with-python2 python-six))
1112
1113 (define-public python-dateutil
1114 (package
1115 (name "python-dateutil")
1116 (version "2.6.0")
1117 (source
1118 (origin
1119 (method url-fetch)
1120 (uri (pypi-uri "python-dateutil" version))
1121 (sha256
1122 (base32
1123 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1124 (build-system python-build-system)
1125 (propagated-inputs
1126 `(("python-six" ,python-six)))
1127 (home-page "https://dateutil.readthedocs.io/en/stable/")
1128 (synopsis "Extensions to the standard datetime module")
1129 (description
1130 "The dateutil module provides powerful extensions to the standard
1131 datetime module, available in Python 2.3+.")
1132 (license license:bsd-3)))
1133
1134 (define-public python2-dateutil
1135 (package-with-python2 python-dateutil))
1136
1137 (define-public python-parsedatetime
1138 (package
1139 (name "python-parsedatetime")
1140 (version "2.3")
1141 (source
1142 (origin
1143 (method url-fetch)
1144 (uri (pypi-uri "parsedatetime" version))
1145 (sha256
1146 (base32
1147 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1148 (build-system python-build-system)
1149 (native-inputs
1150 `(("python-nose" ,python-nose)
1151 ("python-pyicu" ,python-pyicu)
1152 ("python-pytest" ,python-pytest)
1153 ("python-pytest-runner" ,python-pytest-runner)))
1154 (propagated-inputs
1155 `(("python-future" ,python-future)))
1156 (home-page "https://github.com/bear/parsedatetime/")
1157 (synopsis
1158 "Parse human-readable date/time text")
1159 (description
1160 "Parse human-readable date/time text.")
1161 (license license:asl2.0)))
1162
1163 (define-public python2-parsedatetime
1164 (package-with-python2 python-parsedatetime))
1165
1166 (define-public python-pandas
1167 (package
1168 (name "python-pandas")
1169 (version "0.19.2")
1170 (source
1171 (origin
1172 (method url-fetch)
1173 (uri (pypi-uri "pandas" version))
1174 (sha256
1175 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1176 (patches
1177 (search-patches "python-pandas-skip-failing-tests.patch"))))
1178 (build-system python-build-system)
1179 (propagated-inputs
1180 `(("python-numpy" ,python-numpy)
1181 ("python-pytz" ,python-pytz)
1182 ("python-dateutil" ,python-dateutil)))
1183 (native-inputs
1184 `(("python-nose" ,python-nose)
1185 ("python-cython" ,python-cython)))
1186 (home-page "http://pandas.pydata.org")
1187 (synopsis "Data structures for data analysis, time series, and statistics")
1188 (description
1189 "Pandas is a Python package providing fast, flexible, and expressive data
1190 structures designed to make working with structured (tabular,
1191 multidimensional, potentially heterogeneous) and time series data both easy
1192 and intuitive. It aims to be the fundamental high-level building block for
1193 doing practical, real world data analysis in Python.")
1194 (license license:bsd-3)))
1195
1196 (define-public python2-pandas
1197 (package-with-python2 python-pandas))
1198
1199 (define-public python-tzlocal
1200 (package
1201 (name "python-tzlocal")
1202 (version "1.2.2")
1203 (source
1204 (origin
1205 (method url-fetch)
1206 (uri (pypi-uri "tzlocal" version))
1207 (sha256
1208 (base32
1209 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1210 (build-system python-build-system)
1211 (propagated-inputs
1212 `(("python-pytz" ,python-pytz)))
1213 (home-page "https://github.com/regebro/tzlocal")
1214 (synopsis
1215 "Local timezone information for Python")
1216 (description
1217 "Tzlocal returns a tzinfo object with the local timezone information.
1218 This module attempts to fix a glaring hole in pytz, that there is no way to
1219 get the local timezone information, unless you know the zoneinfo name, and
1220 under several distributions that's hard or impossible to figure out.")
1221 (license license:cc0)))
1222
1223 (define-public python2-pysqlite
1224 (package
1225 (name "python2-pysqlite")
1226 (version "2.8.3")
1227 (source
1228 (origin
1229 (method url-fetch)
1230 (uri (pypi-uri "pysqlite" version))
1231 (sha256
1232 (base32
1233 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1234 (build-system python-build-system)
1235 (inputs
1236 `(("sqlite" ,sqlite)))
1237 (arguments
1238 `(#:python ,python-2 ; incompatible with Python 3
1239 #:tests? #f)) ; no test target
1240 (home-page "https://github.com/ghaering/pysqlite")
1241 (synopsis "SQLite bindings for Python")
1242 (description
1243 "Pysqlite provides SQLite bindings for Python that comply to the
1244 Database API 2.0T.")
1245 (license license:zlib)))
1246
1247
1248 (define-public python2-mechanize
1249 (package
1250 (name "python2-mechanize")
1251 (version "0.2.5")
1252 (source
1253 (origin
1254 (method url-fetch)
1255 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1256 version ".tar.gz"))
1257 (sha256
1258 (base32
1259 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1260 (build-system python-build-system)
1261 (arguments
1262 `(#:python ,python-2 ; apparently incompatible with Python 3
1263 #:tests? #f))
1264 ;; test fails with message
1265 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1266 ;; (python-3.3.2) or
1267 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1268 ;; (python-2.7.5).
1269 ;; The source code is from March 2011 and probably not up-to-date
1270 ;; with respect to python unit tests.
1271 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1272 (synopsis
1273 "Stateful programmatic web browsing in Python")
1274 (description
1275 "Mechanize implements stateful programmatic web browsing in Python,
1276 after Andy Lester’s Perl module WWW::Mechanize.")
1277 (license (license:non-copyleft
1278 "file://COPYING"
1279 "See COPYING in the distribution."))))
1280
1281
1282 (define-public python-simplejson
1283 (package
1284 (name "python-simplejson")
1285 (version "3.10.0")
1286 (source
1287 (origin
1288 (method url-fetch)
1289 (uri (pypi-uri "simplejson" version))
1290 (sha256
1291 (base32
1292 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1293 (build-system python-build-system)
1294 (home-page "http://simplejson.readthedocs.org/en/latest/")
1295 (synopsis
1296 "Json library for Python")
1297 (description
1298 "JSON (JavaScript Object Notation) is a subset of JavaScript
1299 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1300 format.
1301
1302 Simplejson exposes an API familiar to users of the standard library marshal
1303 and pickle modules. It is the externally maintained version of the json
1304 library contained in Python 2.6, but maintains compatibility with Python 2.5
1305 and (currently) has significant performance advantages, even without using
1306 the optional C extension for speedups. Simplejson is also supported on
1307 Python 3.3+.")
1308 (license license:x11)))
1309
1310 (define-public python2-simplejson
1311 (package-with-python2 python-simplejson))
1312
1313
1314 (define-public python-pyicu
1315 (package
1316 (name "python-pyicu")
1317 (version "1.9.5")
1318 (source
1319 (origin
1320 (method url-fetch)
1321 (uri (pypi-uri "PyICU" version))
1322 (sha256
1323 (base32
1324 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1325 (build-system python-build-system)
1326 (arguments
1327 '(#:phases
1328 (modify-phases %standard-phases
1329 (add-before 'check 'delete-failing-test
1330 (lambda _
1331 ;; XXX: These tests require locales that are unavailable
1332 ;; in the build environment.
1333 (delete-file "test/test_DateTimeParserGenerator.py")
1334 #t)))))
1335 (inputs
1336 `(("icu4c" ,icu4c)))
1337 (home-page "http://pyicu.osafoundation.org/")
1338 (synopsis "Python extension wrapping the ICU C++ API")
1339 (description
1340 "PyICU is a python extension wrapping the ICU C++ API.")
1341 (license license:x11)))
1342
1343 (define-public python2-pyicu
1344 (package-with-python2 python-pyicu))
1345
1346 (define-public python2-dogtail
1347 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1348 ;; spaces in indentation" with Python 3.
1349 (package
1350 (name "python2-dogtail")
1351 (version "0.9.9")
1352 (source (origin
1353 (method url-fetch)
1354 (uri (pypi-uri "dogtail" version))
1355 (sha256
1356 (base32
1357 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1358 (build-system python-build-system)
1359 (arguments `(#:python ,python-2
1360 #:tests? #f)) ; invalid command "test"
1361 ;; Currently no offical homepage.
1362 (home-page "https://pypi.python.org/pypi/dogtail/")
1363 (synopsis "GUI test tool and automation framework written in Python")
1364 (description
1365 "Dogtail is a GUI test tool and automation framework written in Python.
1366 It uses Accessibility (a11y) technologies to communicate with desktop
1367 applications. dogtail scripts are written in Python and executed like any
1368 other Python program.")
1369 (license license:gpl2+)))
1370
1371 (define-public python2-empy
1372 (package
1373 (name "python2-empy")
1374 (version "3.3")
1375 (source (origin
1376 (method url-fetch)
1377 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1378 version ".tar.gz"))
1379 (sha256
1380 (base32
1381 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1382 (build-system python-build-system)
1383 (arguments
1384 `(#:python ,python-2
1385 #:phases (alist-replace
1386 'check
1387 (lambda _
1388 (zero? (system* "./test.sh")))
1389 %standard-phases)))
1390 (home-page "http://www.alcyone.com/software/empy/")
1391 (synopsis "Templating system for Python")
1392 (description
1393 "EmPy is a system for embedding Python expressions and statements in
1394 template text; it takes an EmPy source file, processes it, and produces
1395 output. This is accomplished via expansions, which are special signals to the
1396 EmPy system and are set off by a special prefix (by default the at sign, @@).
1397 EmPy can expand arbitrary Python expressions and statements in this way, as
1398 well as a variety of special forms. Textual data not explicitly delimited in
1399 this way is sent unaffected to the output, allowing Python to be used in
1400 effect as a markup language. Also supported are callbacks via hooks,
1401 recording and playback via diversions, and dynamic, chainable filters. The
1402 system is highly configurable via command line options and embedded
1403 commands.")
1404 (license license:lgpl2.1+)))
1405
1406 (define-public python2-element-tree
1407 (package
1408 (name "python2-element-tree")
1409 (version "1.2.6")
1410 (source (origin
1411 (method url-fetch)
1412 (uri (string-append
1413 "http://effbot.org/media/downloads/elementtree-"
1414 version "-20050316.tar.gz"))
1415 (sha256
1416 (base32
1417 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1418 (build-system python-build-system)
1419 (arguments
1420 `(#:python ,python-2 ; seems to be part of Python 3
1421 #:tests? #f)) ; no 'test' sub-command
1422 (synopsis "Toolkit for XML processing in Python")
1423 (description
1424 "ElementTree is a Python library supporting lightweight XML processing.")
1425 (home-page "http://effbot.org/zone/element-index.htm")
1426 (license (license:x11-style
1427 "http://docs.python.org/2/license.html"
1428 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1429
1430 (define-public python2-pybugz
1431 (package
1432 (name "python2-pybugz")
1433 (version "0.6.11")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (string-append
1437 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1438 version ".tar.gz"))
1439 (sha256
1440 (base32
1441 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1442 (patches (search-patches "pybugz-stty.patch"
1443 "pybugz-encode-error.patch"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:python ,python-2 ; SyntaxError with Python 3
1447 #:tests? #f)) ; no 'test' sub-command
1448 (propagated-inputs
1449 `(("element-tree" ,python2-element-tree)))
1450 (synopsis "Python and command-line interface to Bugzilla")
1451 (description
1452 "PyBugz is a Python library and command-line tool to query the Bugzilla
1453 bug tracking system. It is meant as an aid to speed up interaction with the
1454 bug tracker.")
1455 (home-page "http://www.liquidx.net/pybugz/")
1456 (license license:gpl2)))
1457
1458 (define-public python-enum34
1459 (package
1460 (name "python-enum34")
1461 (version "1.1.6")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "enum34" version))
1466 (sha256
1467 (base32
1468 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1469 (build-system python-build-system)
1470 (home-page "https://pypi.python.org/pypi/enum34")
1471 (synopsis "Backported Python 3.4 Enum")
1472 (description
1473 "Enum34 is the new Python stdlib enum module available in Python 3.4
1474 backported for previous versions of Python from 2.4 to 3.3.")
1475 (license license:bsd-3)))
1476
1477 (define-public python2-enum34
1478 (package-with-python2 python-enum34))
1479
1480 (define-public python-parse-type
1481 (package
1482 (name "python-parse-type")
1483 (version "0.3.4")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (string-append "https://pypi.python.org/packages/source/p/"
1488 "parse_type/parse_type-" version ".tar.gz"))
1489 (sha256
1490 (base32
1491 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1492 (build-system python-build-system)
1493 (arguments
1494 `(#:phases
1495 (modify-phases %standard-phases
1496 (add-after 'unpack 'patch-tests
1497 (lambda _
1498 (substitute* "tests/test_parse_type_parse.py"
1499 ;; Newer Python versions don't have the problem this test tests.
1500 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1501 ""))
1502 #t)))))
1503 (propagated-inputs
1504 `(("python-six" ,python-six)
1505 ("python-parse" ,python-parse)))
1506 (native-inputs
1507 `(("python-pytest" ,python-pytest)
1508 ("python-pytest-runner" ,python-pytest-runner)))
1509 (home-page "https://github.com/jenisys/parse_type")
1510 (synopsis "Extended parse module")
1511 (description
1512 "Parse_type extends the python parse module.")
1513 (properties
1514 `((python2-variant . ,(delay python2-parse-type))))
1515 (license license:bsd-3)))
1516
1517 (define-public python2-parse-type
1518 (let ((base (package-with-python2
1519 (strip-python2-variant python-parse-type))))
1520 (package (inherit base)
1521 (propagated-inputs
1522 `(("python2-enum34" ,python2-enum34)
1523 ,@(package-propagated-inputs base))))))
1524
1525 (define-public python-parse
1526 (package
1527 (name "python-parse")
1528 (version "1.6.6")
1529 (source
1530 (origin
1531 (method url-fetch)
1532 (uri (pypi-uri "parse" version))
1533 (sha256
1534 (base32
1535 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1536 (patches (search-patches "python-parse-too-many-fields.patch"))))
1537 (build-system python-build-system)
1538 (arguments
1539 `(#:phases
1540 (modify-phases %standard-phases
1541 (replace 'check
1542 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1543 (home-page "https://github.com/r1chardj0n3s/parse")
1544 (synopsis "Parse strings")
1545 (description
1546 "Parse strings using a specification based on the Python format()
1547 syntax.")
1548 (license license:x11)))
1549
1550 (define-public python-polib
1551 (package
1552 (name "python-polib")
1553 (version "1.0.8")
1554 (source (origin
1555 (method url-fetch)
1556 (uri (pypi-uri "polib" version))
1557 (sha256
1558 (base32
1559 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1560 (build-system python-build-system)
1561 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1562 (synopsis "Manipulate, create and modify gettext files")
1563 (description "Polib can manipulate any gettext format (po, pot and mo)
1564 files. It can be used to create po files from scratch or to modify
1565 existing ones.")
1566 (license license:expat)))
1567
1568 (define-public python2-polib
1569 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1570 (package
1571 (inherit base)
1572 (arguments `(,@(package-arguments base)
1573 ;; Tests don't work with python2.
1574 #:tests? #f)))))
1575
1576 (define-public scons
1577 (package
1578 (name "scons")
1579 (version "2.5.1")
1580 (source (origin
1581 (method url-fetch)
1582 (uri (string-append "mirror://sourceforge/scons/scons/" version
1583 "/scons-" version ".tar.gz"))
1584 (sha256
1585 (base32
1586 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1587 (build-system python-build-system)
1588 (arguments
1589 ;; With Python 3.x, fails to build with a syntax error.
1590 `(#:python ,python-2
1591 #:use-setuptools? #f ; still relies on distutils
1592 #:tests? #f)) ; no 'python setup.py test' command
1593 (home-page "http://scons.org/")
1594 (synopsis "Software construction tool written in Python")
1595 (description
1596 "SCons is a software construction tool. Think of SCons as an improved,
1597 cross-platform substitute for the classic Make utility with integrated
1598 functionality similar to autoconf/automake and compiler caches such as ccache.
1599 In short, SCons is an easier, more reliable and faster way to build
1600 software.")
1601 (license license:x11)))
1602
1603 (define-public python-extras
1604 (package
1605 (name "python-extras")
1606 (version "0.0.3")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (string-append
1611 "https://pypi.python.org/packages/source/e/extras/extras-"
1612 version ".tar.gz"))
1613 (sha256
1614 (base32
1615 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1616 (build-system python-build-system)
1617 (arguments
1618 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1619 '(#:tests? #f))
1620 (home-page "https://github.com/testing-cabal/extras")
1621 (synopsis "Useful extensions to the Python standard library")
1622 (description
1623 "Extras is a set of extensions to the Python standard library.")
1624 (license license:expat)))
1625
1626 (define-public python2-extras
1627 (package-with-python2 python-extras))
1628
1629 (define-public python-mimeparse
1630 (package
1631 (name "python-mimeparse")
1632 (version "0.1.4")
1633 (source
1634 (origin
1635 (method url-fetch)
1636 (uri (string-append
1637 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1638 version ".tar.gz"))
1639 (sha256
1640 (base32
1641 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1642 (build-system python-build-system)
1643 (arguments
1644 '(#:tests? #f)) ; no setup.py test command
1645 (home-page
1646 "https://github.com/dbtsai/python-mimeparse")
1647 (synopsis "Python library for parsing MIME types")
1648 (description
1649 "Mimeparse provides basic functions for parsing MIME type names and
1650 matching them against a list of media-ranges.")
1651 (license license:expat)))
1652
1653 (define-public python2-mimeparse
1654 (package-with-python2 python-mimeparse))
1655
1656 (define-public python-nose
1657 (package
1658 (name "python-nose")
1659 (version "1.3.7")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (pypi-uri "nose" version))
1664 (sha256
1665 (base32
1666 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1667 (build-system python-build-system)
1668 (arguments
1669 '(#:tests? #f)) ; FIXME: test suite fails
1670 (home-page "http://readthedocs.org/docs/nose/")
1671 (synopsis "Python testing library")
1672 (description
1673 "Nose extends the unittest library to make testing easier.")
1674 (license license:lgpl2.0+)))
1675
1676 (define-public python2-nose
1677 (package-with-python2 python-nose))
1678
1679 (define-public python-nose2
1680 (package
1681 (name "python-nose2")
1682 (version "0.6.5")
1683 (source
1684 (origin
1685 (method url-fetch)
1686 (uri (pypi-uri "nose2" version))
1687 (sha256
1688 (base32
1689 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1690 (build-system python-build-system)
1691 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1692 (propagated-inputs
1693 `(("python-cov-core" ,python-cov-core)
1694 ("python-pytest-cov" ,python-pytest-cov)
1695 ("python-six" ,python-six)))
1696 (home-page "https://github.com/nose-devs/nose2")
1697 (synopsis "Next generation of nicer testing for Python")
1698 (description
1699 "Nose2 is the next generation of nicer testing for Python, based on the
1700 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1701 better plugin api, being easier for users to configure, and simplifying internal
1702 interfaces and processes.")
1703 (license license:bsd-2)))
1704
1705 (define-public python2-nose2
1706 (package-with-python2 python-nose2))
1707
1708 (define-public python-unittest2
1709 (package
1710 (name "python-unittest2")
1711 (version "0.5.1")
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (string-append
1716 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1717 version ".tar.gz"))
1718 (sha256
1719 (base32
1720 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1721 (build-system python-build-system)
1722 (home-page "http://pypi.python.org/pypi/unittest2")
1723 (synopsis "Python unit testing library")
1724 (description
1725 "Unittest2 is a replacement for the unittest module in the Python
1726 standard library.")
1727 (license license:psfl)))
1728
1729 (define-public python2-unittest2
1730 (package (inherit python-unittest2)
1731 (name "python2-unittest2")
1732 (version "0.5.1")
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (string-append
1737 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1738 version ".tar.gz"))
1739 (sha256
1740 (base32
1741 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1742 (arguments
1743 `(#:python ,python-2
1744 #:tests? #f)))) ; no setup.py test command
1745
1746 (define-public python-pafy
1747 (package
1748 (name "python-pafy")
1749 (version "0.5.3.1")
1750 (source
1751 (origin
1752 (method url-fetch)
1753 (uri (pypi-uri "pafy" version))
1754 (sha256
1755 (base32
1756 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1757 (build-system python-build-system)
1758 (arguments
1759 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1760 (propagated-inputs
1761 ;; Youtube-dl is a python package which is imported in the file
1762 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1763 `(("youtube-dl" ,youtube-dl)))
1764 (home-page "https://np1.github.io/pafy/")
1765 (synopsis "Retrieve YouTube content and metadata")
1766 (description
1767 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1768 (license license:lgpl3+)))
1769
1770 (define-public python-py
1771 (package
1772 (name "python-py")
1773 (version "1.4.32")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "py" version))
1778 (sha256
1779 (base32
1780 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1781 (build-system python-build-system)
1782 (arguments
1783 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1784 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1785 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1786 ;; Is this module globally installed?"
1787 '(#:tests? #f))
1788 (home-page "http://pylib.readthedocs.org/")
1789 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1790 (description
1791 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1792 code introspection, and logging.")
1793 (license license:expat)))
1794
1795 (define-public python2-py
1796 (package-with-python2 python-py))
1797
1798 (define-public python-pytest
1799 (package
1800 (name "python-pytest")
1801 (version "2.7.3")
1802 (source
1803 (origin
1804 (method url-fetch)
1805 (uri (string-append
1806 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1807 version ".tar.gz"))
1808 (sha256
1809 (base32
1810 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1811 (modules '((guix build utils)))
1812 (snippet
1813 ;; One of the tests involves the /usr directory, so it fails.
1814 '(substitute* "testing/test_argcomplete.py"
1815 (("def test_remove_dir_prefix\\(self\\):")
1816 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1817 (build-system python-build-system)
1818 (propagated-inputs
1819 `(("python-py" ,python-py)))
1820 (native-inputs
1821 `(("python-nose" ,python-nose)
1822 ("python-mock" ,python-mock)))
1823 (home-page "http://pytest.org")
1824 (synopsis "Python testing library")
1825 (description
1826 "Pytest is a testing tool that provides auto-discovery of test modules
1827 and functions, detailed info on failing assert statements, modular fixtures,
1828 and many external plugins.")
1829 (license license:expat)))
1830
1831 (define-public python2-pytest
1832 (package-with-python2 python-pytest))
1833
1834 ;; Some packages require a newer pytest.
1835 (define-public python-pytest-3.0
1836 (package
1837 (inherit python-pytest)
1838 (name "python-pytest")
1839 (version "3.0.7")
1840 (source (origin
1841 (method url-fetch)
1842 (uri (pypi-uri "pytest" version))
1843 (sha256
1844 (base32
1845 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1846 (arguments
1847 `(#:phases
1848 (modify-phases %standard-phases
1849 (add-before 'check 'disable-invalid-test
1850 (lambda _
1851 (substitute* "testing/test_argcomplete.py"
1852 (("def test_remove_dir_prefix" line)
1853 (string-append "@pytest.mark.skip"
1854 "(reason=\"Assumes that /usr exists.\")\n "
1855 line)))
1856 #t)))))
1857 (native-inputs
1858 `(("python-nose" ,python-nose)
1859 ("python-mock" ,python-mock)
1860 ("python-hypothesis" ,python-hypothesis)))
1861 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1862
1863 (define-public python2-pytest-3.0
1864 (let ((base (package-with-python2
1865 (strip-python2-variant python-pytest-3.0))))
1866 (package (inherit base)
1867 (native-inputs
1868 `(("python2-enum34" ,python2-enum34)
1869 ,@(package-native-inputs base))))))
1870
1871 (define-public python-pytest-cov
1872 (package
1873 (name "python-pytest-cov")
1874 (version "2.4.0")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "pytest-cov" version))
1879 (sha256
1880 (base32
1881 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1882 (build-system python-build-system)
1883 (arguments
1884 `(#:phases
1885 (modify-phases %standard-phases
1886 (replace 'check
1887 (lambda _
1888 ;; options taken from tox.ini
1889 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1890 ;; with "Duplicate implicit target name"
1891 (zero? (system* "python" "./setup.py" "check"
1892 "--strict" "--metadata")))))))
1893 (propagated-inputs
1894 `(("python-coverage" ,python-coverage)
1895 ("python-pytest" ,python-pytest)))
1896 (home-page "https://github.com/pytest-dev/pytest-cov")
1897 (synopsis "Pytest plugin for measuring coverage")
1898 (description
1899 "Pytest-cov produces coverage reports. It supports centralised testing and
1900 distributed testing in both @code{load} and @code{each} modes. It also
1901 supports coverage of subprocesses.")
1902 (license license:expat)))
1903
1904 (define-public python2-pytest-cov
1905 (package-with-python2 python-pytest-cov))
1906
1907 (define-public python-pytest-runner
1908 (package
1909 (name "python-pytest-runner")
1910 (version "2.11.1")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "pytest-runner" version))
1915 (sha256
1916 (base32
1917 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1918 (build-system python-build-system)
1919 (arguments
1920 `(#:phases
1921 (modify-phases %standard-phases
1922 ;; The fancy way of setting the version with setuptools_scm does not
1923 ;; seem to work here.
1924 (add-after 'unpack 'set-version
1925 (lambda _
1926 (substitute* "docs/conf.py"
1927 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1928 (string-append "version = \"" ,version "\"")))
1929 #t)))))
1930 (native-inputs
1931 `(("python-pytest" ,python-pytest)
1932 ("python-setuptools-scm" ,python-setuptools-scm)))
1933 (home-page "https://github.com/pytest-dev/pytest-runner")
1934 (synopsis "Invoke py.test as a distutils command")
1935 (description
1936 "This package provides a @command{pytest-runner} command that
1937 @file{setup.py} files can use to run tests.")
1938 (license license:expat)))
1939
1940 (define-public python2-pytest-runner
1941 (package-with-python2 python-pytest-runner))
1942
1943 (define-public python-pytest-mock
1944 (package
1945 (name "python-pytest-mock")
1946 (version "1.2")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "pytest-mock" version ".zip"))
1951 (sha256
1952 (base32
1953 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1954 (build-system python-build-system)
1955 (native-inputs
1956 `(("unzip" ,unzip)))
1957 (propagated-inputs
1958 `(("python-pytest" ,python-pytest)))
1959 (home-page "https://github.com/pytest-dev/pytest-mock/")
1960 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1961 (description
1962 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1963 around the patching API provided by the @code{mock} package, but with the
1964 benefit of not having to worry about undoing patches at the end of a test.
1965 The mocker fixture has the same API as @code{mock.patch}, supporting the
1966 same arguments.")
1967 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1968 (license license:expat)))
1969
1970 (define-public python2-pytest-mock
1971 (let ((base (package-with-python2
1972 (strip-python2-variant python-pytest-mock))))
1973 (package (inherit base)
1974 (propagated-inputs
1975 `(("python2-mock" ,python2-mock)
1976 ,@(package-propagated-inputs base))))))
1977
1978 (define-public python-pytest-xdist
1979 (package
1980 (name "python-pytest-xdist")
1981 (version "1.14")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (pypi-uri "pytest-xdist" version ".zip"))
1986 (sha256
1987 (base32
1988 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1989 (modules '((guix build utils)))
1990 (snippet
1991 '(begin
1992 ;; Remove pre-compiled .pyc files from source.
1993 (for-each delete-file-recursively
1994 (find-files "." "__pycache__" #:directories? #t))
1995 (for-each delete-file (find-files "." "\\.pyc$"))
1996 #t))))
1997 (build-system python-build-system)
1998 (arguments
1999 '(#:tests? #f)) ;FIXME: Some tests are failing.
2000 ;; #:phases
2001 ;; (modify-phases %standard-phases
2002 ;; (delete 'check)
2003 ;; (add-after 'install 'check
2004 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2005 ;; (add-installed-pythonpath inputs outputs)
2006 ;; (zero? (system* "py.test" "-v")))))
2007 (native-inputs
2008 `(("unzip" ,unzip)
2009 ("python-setuptools-scm" ,python-setuptools-scm)))
2010 (propagated-inputs
2011 `(("python-execnet" ,python-execnet)
2012 ("python-pytest" ,python-pytest)
2013 ("python-py" ,python-py)))
2014 (home-page
2015 "https://github.com/pytest-dev/pytest-xdist")
2016 (synopsis
2017 "Plugin for py.test with distributed testing and loop-on-failing modes")
2018 (description
2019 "The pytest-xdist plugin extends py.test with some unique test execution
2020 modes: parallelization, running tests in boxed subprocesses, the ability
2021 to run tests repeatedly when failed, and the ability to run tests on multiple
2022 Python interpreters or platforms. It uses rsync to copy the existing
2023 program code to a remote location, executes there, and then syncs the
2024 result back.")
2025 (license license:expat)))
2026
2027 (define-public python2-pytest-xdist
2028 (package-with-python2 python-pytest-xdist))
2029
2030 (define-public python-scripttest
2031 (package
2032 (name "python-scripttest")
2033 (version "1.3")
2034 (source
2035 (origin
2036 (method url-fetch)
2037 (uri (string-append
2038 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2039 version ".tar.gz"))
2040 (sha256
2041 (base32
2042 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2043 (build-system python-build-system)
2044 (native-inputs
2045 `(("python-pytest" ,python-pytest)))
2046 (home-page "http://pythonpaste.org/scripttest/")
2047 (synopsis "Python library to test command-line scripts")
2048 (description "Scripttest is a Python helper library for testing
2049 interactive command-line applications. With it you can run a script in a
2050 subprocess and see the output as well as any file modifications.")
2051 (license license:expat)))
2052
2053 (define-public python2-scripttest
2054 (package-with-python2 python-scripttest))
2055
2056 (define-public python-testtools
2057 (package
2058 (name "python-testtools")
2059 (version "1.4.0")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (pypi-uri "testtools" version))
2064 (sha256
2065 (base32
2066 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2067 (build-system python-build-system)
2068 (arguments
2069 `(#:phases
2070 (modify-phases %standard-phases
2071 (add-after 'unpack 'fix-module-imports
2072 (lambda _
2073 (substitute* "setup.py"
2074 (("'unittest2>=0.8.0',") ""))
2075 (substitute* '("testtools/testcase.py"
2076 "testtools/testsuite.py"
2077 "testtools/run.py"
2078 "testtools/tests/test_run.py"
2079 "testtools/tests/test_testsuite.py"
2080 "testtools/tests/test_deferredruntest.py")
2081 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2082 (("import unittest2 as unittest") "import unittest")
2083 (("import unittest2") "import unittest as unittest2")
2084 (("from unittest2 import") "from unittest import"))
2085 (substitute* "testtools/tests/test_testresult.py"
2086 ;; NUL in source code is not allowed (raises ValueError).
2087 (("\\x00\\x04") "\\x04"))
2088 #t)))))
2089 (propagated-inputs
2090 `(("python-mimeparse" ,python-mimeparse)
2091 ("python-extras" ,python-extras)))
2092 (home-page "https://github.com/testing-cabal/testtools")
2093 (synopsis
2094 "Extensions to the Python standard library unit testing framework")
2095 (description
2096 "Testtools extends the Python standard library unit testing framework to
2097 provide matchers, more debugging information, and cross-Python
2098 compatibility.")
2099 (license license:psfl)))
2100
2101 (define-public python2-testtools
2102 (package-with-python2 python-testtools))
2103
2104 (define-public python-testscenarios
2105 (package
2106 (name "python-testscenarios")
2107 (version "0.4")
2108 (source
2109 (origin
2110 (method url-fetch)
2111 (uri (string-append
2112 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2113 version ".tar.gz"))
2114 (sha256
2115 (base32
2116 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2117 (build-system python-build-system)
2118 (propagated-inputs
2119 `(("python-testtools" ,python-testtools)))
2120 (home-page "https://launchpad.net/testscenarios")
2121 (synopsis "Pyunit extension for dependency injection")
2122 (description
2123 "Testscenarios provides clean dependency injection for Python unittest
2124 style tests.")
2125 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2126
2127 (define-public python2-testscenarios
2128 (package-with-python2 python-testscenarios))
2129
2130 (define-public python-testresources
2131 (package
2132 (name "python-testresources")
2133 (version "0.2.7")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (string-append
2138 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2139 version ".tar.gz"))
2140 (sha256
2141 (base32
2142 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2143 (build-system python-build-system)
2144 (home-page "https://launchpad.net/testresources")
2145 (synopsis
2146 "Pyunit extension for managing test resources")
2147 (description
2148 "Testresources is an extension to Python's unittest to allow declarative
2149 use of resources by test cases.")
2150 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2151
2152 (define-public python2-testresources
2153 (package-with-python2 python-testresources))
2154
2155 (define-public python-subunit
2156 (package
2157 (name "python-subunit")
2158 (version "0.0.21")
2159 (source
2160 (origin
2161 (method url-fetch)
2162 (uri (string-append
2163 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2164 version ".tar.gz"))
2165 (sha256
2166 (base32
2167 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2168 (build-system python-build-system)
2169 (propagated-inputs
2170 `(("python-extras" ,python-extras)
2171 ("python-mimeparse" ,python-mimeparse)))
2172 (native-inputs
2173 `(("python-testscenarios" ,python-testscenarios)))
2174 (home-page "http://launchpad.net/subunit")
2175 (synopsis "Python implementation of the subunit protocol")
2176 (description
2177 "Python-subunit is a Python implementation of the subunit test streaming
2178 protocol.")
2179 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2180
2181 (define-public python2-subunit
2182 (package-with-python2 python-subunit))
2183
2184 ;; Recent versions of python-fixtures and python-testrepository need
2185 ;; python-pbr for packaging, which itself needs these two packages for
2186 ;; testing.
2187 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2188 ;; same source, just without any test dependencies and with tests disabled.
2189 ;; python-pbr-minmal is then used to package python-fixtures and
2190 ;; python-testrepository.
2191 ;; Strictly speaking we currently could remove the test-requirements from the
2192 ;; normal python-pbr package (and save this package) since test are disabled
2193 ;; there anyway. But this may change in future.
2194 (define python-pbr-minimal
2195 (package
2196 (name "python-pbr-minimal")
2197 (version "1.10.0")
2198 (source
2199 (origin
2200 (method url-fetch)
2201 (uri (pypi-uri "pbr" version))
2202 (sha256
2203 (base32
2204 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2205 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2206 (build-system python-build-system)
2207 (arguments
2208 `(#:tests? #f))
2209 (home-page "http://docs.openstack.org/developer/pbr/")
2210 (synopsis "Minimal build of python-pbr used for bootstrapping")
2211 (description
2212 "Used only for bootstrapping python2-pbr, you should not need this.")
2213 (license license:asl2.0)))
2214
2215 (define python2-pbr-minimal
2216 (package-with-python2 python-pbr-minimal))
2217
2218 (define-public python-pbr
2219 (package
2220 (inherit python-pbr-minimal)
2221 (name "python-pbr")
2222 (arguments
2223 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2224 (propagated-inputs
2225 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2226 (native-inputs
2227 `(("python-fixtures" ,python-fixtures)
2228 ;; discover, coverage, hacking, subunit
2229 ("python-mock" ,python-mock)
2230 ("python-six" ,python-six)
2231 ("python-sphinx" ,python-sphinx)
2232 ("python-testrepository" ,python-testrepository)
2233 ("python-testresources" ,python-testresources)
2234 ("python-testscenarios" ,python-testscenarios)
2235 ("python-testtools" ,python-testtools)
2236 ("python-virtualenv" ,python-virtualenv)))
2237 (synopsis "Enhance the default behavior of Python’s setuptools")
2238 (description
2239 "Python Build Reasonableness (PBR) is a library that injects some useful
2240 and sensible default behaviors into your setuptools run. It will set
2241 versions, process requirements files and generate AUTHORS and ChangeLog file
2242 from git information.
2243 ")))
2244
2245 (define-public python2-pbr
2246 (package-with-python2 python-pbr))
2247
2248 (define-public python-fixtures
2249 (package
2250 (name "python-fixtures")
2251 (version "1.4.0")
2252 (source
2253 (origin
2254 (method url-fetch)
2255 (uri (pypi-uri "fixtures" version))
2256 (sha256
2257 (base32
2258 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2259 (build-system python-build-system)
2260 (arguments
2261 '(#:phases
2262 (modify-phases %standard-phases
2263 (replace 'check
2264 (lambda _
2265 (zero? (system* "python" "-m" "testtools.run"
2266 "fixtures.test_suite")))))))
2267 (propagated-inputs
2268 `(("python-six" ,python-six)))
2269 (native-inputs
2270 `(("python-mock" ,python-mock)
2271 ("python-pbr-minimal" ,python-pbr-minimal)
2272 ("python-testtools" ,python-testtools)))
2273 (home-page "https://launchpad.net/python-fixtures")
2274 (synopsis "Python test fixture library")
2275 (description
2276 "Fixtures provides a way to create reusable state, useful when writing
2277 Python tests.")
2278 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2279
2280 (define-public python2-fixtures
2281 (package-with-python2 python-fixtures))
2282
2283 (define-public python-testrepository
2284 (package
2285 (name "python-testrepository")
2286 (version "0.0.20")
2287 (source
2288 (origin
2289 (method url-fetch)
2290 (uri (string-append
2291 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2292 version ".tar.gz"))
2293 (sha256
2294 (base32
2295 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2296 (build-system python-build-system)
2297 (arguments
2298 ;; FIXME: Many tests are failing.
2299 '(#:tests? #f))
2300 (propagated-inputs
2301 `(("python-fixtures" ,python-fixtures)
2302 ("python-subunit" ,python-subunit)
2303 ("python-testtools" ,python-testtools)))
2304 (native-inputs
2305 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2306 ("python-mimeparse" ,python-mimeparse)))
2307 (home-page "https://launchpad.net/testrepository")
2308 (synopsis "Database for Python test results")
2309 (description "Testrepository provides a database of test results which can
2310 be used as part of a developer's workflow to check things such as what tests
2311 have failed since the last commit or what tests are currently failing.")
2312 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2313
2314 (define-public python2-testrepository
2315 (package-with-python2 python-testrepository))
2316
2317 (define-public python-coverage
2318 (package
2319 (name "python-coverage")
2320 (version "4.1")
2321 (source
2322 (origin
2323 (method url-fetch)
2324 (uri (pypi-uri "coverage" version))
2325 (sha256
2326 (base32
2327 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2328 (build-system python-build-system)
2329 (arguments
2330 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2331 '(#:tests? #f))
2332 (home-page "http://nedbatchelder.com/code/coverage")
2333 (synopsis "Code coverage measurement for Python")
2334 (description
2335 "Coverage measures code coverage, typically during test execution. It
2336 uses the code analysis tools and tracing hooks provided in the Python standard
2337 library to determine which lines are executable, and which have been
2338 executed.")
2339 (license license:bsd-3)))
2340
2341 (define-public python2-coverage
2342 (package-with-python2 python-coverage))
2343
2344 (define-public python-cov-core
2345 (package
2346 (name "python-cov-core")
2347 (version "1.15.0")
2348 (source
2349 (origin
2350 (method url-fetch)
2351 (uri (pypi-uri "cov-core" version))
2352 (sha256
2353 (base32
2354 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2355 (build-system python-build-system)
2356 (propagated-inputs
2357 `(("python-coverage" ,python-coverage)))
2358 (home-page "https://github.com/schlamar/cov-core")
2359 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2360 (description
2361 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2362 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2363 testing frameworks.")
2364 (license license:expat)))
2365
2366 (define-public python2-cov-core
2367 (package-with-python2 python-cov-core))
2368
2369 (define-public python-discover
2370 (package
2371 (name "python-discover")
2372 (version "0.4.0")
2373 (source
2374 (origin
2375 (method url-fetch)
2376 (uri (string-append
2377 "https://pypi.python.org/packages/source/d/discover/discover-"
2378 version ".tar.gz"))
2379 (sha256
2380 (base32
2381 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2382 (build-system python-build-system)
2383 (home-page "http://pypi.python.org/pypi/discover/")
2384 (synopsis
2385 "Python test discovery for unittest")
2386 (description
2387 "Discover provides test discovery for unittest, a feature that has been
2388 backported from Python 2.7 for Python 2.4+.")
2389 (license license:bsd-3)))
2390
2391 (define-public python2-discover
2392 (package-with-python2 python-discover))
2393
2394 (define-public behave
2395 (package
2396 (name "behave")
2397 (version "1.2.5")
2398 (source (origin
2399 (method url-fetch)
2400 (uri (pypi-uri "behave" version ".tar.bz2"))
2401 (sha256
2402 (base32
2403 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2404 (build-system python-build-system)
2405 (propagated-inputs
2406 `(("python-six" ,python-six)
2407 ("python-parse" ,python-parse)
2408 ("python-parse-type" ,python-parse-type)))
2409 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2410 ;PyHamcrest>=1.8
2411 (home-page "https://github.com/behave/behave")
2412 (synopsis "Python behavior-driven development")
2413 (description
2414 "Behave is a tool for behavior-driven development in python.
2415 Behavior-driven development (or BDD) is an agile software development
2416 technique that encourages collaboration between developers, QA and
2417 non-technical or business participants in a software project. Behave uses
2418 tests written in a natural language style, backed up by Python code.")
2419 (license license:x11)))
2420
2421 (define-public python-exif-read
2422 (package
2423 (name "python-exif-read")
2424 (version "2.1.2")
2425 (source (origin
2426 (method url-fetch)
2427 (uri (pypi-uri "ExifRead" version))
2428 (sha256
2429 (base32
2430 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2431 (build-system python-build-system)
2432 (arguments `(#:tests? #f)) ; no tests
2433 (home-page "https://github.com/ianare/exif-py")
2434 (synopsis "Python library to extract EXIF data from image files")
2435 (description
2436 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2437 files.")
2438 (license license:bsd-3)))
2439
2440 (define-public python2-exif-read
2441 (package-with-python2 python-exif-read))
2442
2443 (define-public python-pyld
2444 (package
2445 (name "python-pyld")
2446 (version "0.7.1")
2447 (source (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "PyLD" version))
2450 (sha256
2451 (base32
2452 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2453 (build-system python-build-system)
2454 (arguments `(#:tests? #f)) ; no tests
2455 (home-page "https://github.com/digitalbazaar/pyld")
2456 (synopsis "Python implementation of the JSON-LD specification")
2457 (description
2458 "PyLD is an implementation of the JSON-LD specification.")
2459 (license license:bsd-3)))
2460
2461 (define-public python2-pyld
2462 (package-with-python2 python-pyld))
2463
2464 (define-public python-certifi
2465 (package
2466 (name "python-certifi")
2467 (version "2017.1.23")
2468 (source (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "certifi" version))
2471 (sha256
2472 (base32
2473 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2474 (build-system python-build-system)
2475 (home-page "https://certifi.io/")
2476 (synopsis "Python CA certificate bundle")
2477 (description
2478 "Certifi is a Python library that contains a CA certificate bundle, which
2479 is used by the Requests library to verify HTTPS requests.")
2480 (license license:asl2.0)))
2481
2482 (define-public python2-certifi
2483 (package-with-python2 python-certifi))
2484
2485 (define-public python-click
2486 (package
2487 (name "python-click")
2488 (version "6.7")
2489 (source
2490 (origin
2491 (method url-fetch)
2492 (uri (pypi-uri "click" version))
2493 (sha256
2494 (base32
2495 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2496 (build-system python-build-system)
2497 (arguments
2498 `(#:phases
2499 (modify-phases %standard-phases
2500 (add-after 'unpack 'fix-paths
2501 (lambda* (#:key inputs #:allow-other-keys)
2502 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2503 "cross-libc" "libc"))))
2504 (substitute* "click/_unicodefun.py"
2505 (("'locale'")
2506 (string-append "'" glibc "/bin/locale'"))))
2507 #t))
2508 (replace 'check
2509 (lambda _
2510 (zero? (system* "make" "test")))))))
2511 (native-inputs
2512 `(("python-pytest" ,python-pytest)))
2513 (home-page "http://click.pocoo.org")
2514 (synopsis "Command line library for Python")
2515 (description
2516 "Click is a Python package for creating command line interfaces in a
2517 composable way with as little code as necessary. Its name stands for
2518 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2519 with sensible defaults out of the box.")
2520 (license license:bsd-3)))
2521
2522 (define-public python2-click
2523 (package-with-python2 python-click))
2524
2525 (define-public python-wheel
2526 (package
2527 (name "python-wheel")
2528 (version "0.30.0a0")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "wheel" version))
2533 (sha256
2534 (base32
2535 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2536 (build-system python-build-system)
2537 (native-inputs
2538 `(("python-jsonschema" ,python-jsonschema)
2539 ("python-pytest-cov" ,python-pytest-cov)))
2540 (home-page "https://bitbucket.org/pypa/wheel/")
2541 (synopsis "Format for built Python packages")
2542 (description
2543 "A wheel is a ZIP-format archive with a specially formatted filename and
2544 the @code{.whl} extension. It is designed to contain all the files for a PEP
2545 376 compatible install in a way that is very close to the on-disk format. Many
2546 packages will be properly installed with only the @code{Unpack} step and the
2547 unpacked archive preserves enough information to @code{Spread} (copy data and
2548 scripts to their final locations) at any later time. Wheel files can be
2549 installed with a newer @code{pip} or with wheel's own command line utility.")
2550 (license license:expat)
2551 (properties `((python2-variant . ,(delay python2-wheel))))))
2552
2553 (define-public python2-wheel
2554 (let ((wheel (package-with-python2
2555 (strip-python2-variant python-wheel))))
2556 (package (inherit wheel)
2557 (native-inputs `(("python2-functools32" ,python2-functools32)
2558 ,@(package-native-inputs wheel))))))
2559
2560
2561 (define-public python-requests
2562 (package
2563 (name "python-requests")
2564 (version "2.13.0")
2565 (source (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "requests" version))
2568 (sha256
2569 (base32
2570 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2571 ;; TODO: unbundle urllib3 and chardet.
2572 (build-system python-build-system)
2573 (arguments
2574 ;; FIXME: Some tests require network access.
2575 '(#:tests? #f))
2576 (home-page "http://python-requests.org/")
2577 (synopsis "Python HTTP library")
2578 (description
2579 "Requests is a Python HTTP client library. It aims to be easier to use
2580 than Python’s urllib2 library.")
2581 (license license:asl2.0)))
2582
2583 ;; Some software requires an older version of Requests, notably Docker
2584 ;; Compose.
2585 (define-public python-requests-2.7
2586 (package (inherit python-requests)
2587 (version "2.7.0")
2588 (source (origin
2589 (method url-fetch)
2590 (uri (pypi-uri "requests" version))
2591 (sha256
2592 (base32
2593 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2594
2595 (define-public python2-requests
2596 (package-with-python2 python-requests))
2597
2598 (define-public python-vcversioner
2599 (package
2600 (name "python-vcversioner")
2601 (version "2.16.0.0")
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (pypi-uri "vcversioner" version))
2606 (sha256
2607 (base32
2608 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2609 (build-system python-build-system)
2610 (synopsis "Python library for version number discovery")
2611 (description "Vcversioner is a Python library that inspects tagging
2612 information in a variety of version control systems in order to discover
2613 version numbers.")
2614 (home-page "https://github.com/habnabit/vcversioner")
2615 (license license:isc)))
2616
2617 (define-public python2-vcversioner
2618 (package-with-python2 python-vcversioner))
2619
2620 (define-public python-jsonschema
2621 (package
2622 (name "python-jsonschema")
2623 (version "2.5.1")
2624 (source (origin
2625 (method url-fetch)
2626 (uri
2627 (string-append
2628 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2629 version ".tar.gz"))
2630 (sha256
2631 (base32
2632 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2633 (build-system python-build-system)
2634 (arguments
2635 '(#:phases
2636 (modify-phases %standard-phases
2637 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2638 (native-inputs
2639 `(("python-nose" ,python-nose)
2640 ("python-vcversioner" ,python-vcversioner)))
2641 (home-page "https://github.com/Julian/jsonschema")
2642 (synopsis "Implementation of JSON Schema for Python")
2643 (description
2644 "Jsonschema is an implementation of JSON Schema for Python.")
2645 (license license:expat)
2646 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2647
2648 (define-public python2-jsonschema
2649 (let ((jsonschema (package-with-python2
2650 (strip-python2-variant python-jsonschema))))
2651 (package (inherit jsonschema)
2652 (native-inputs
2653 `(("python2-mock" ,python2-mock)
2654 ,@(package-native-inputs jsonschema)))
2655 (propagated-inputs
2656 `(("python2-functools32" ,python2-functools32))))))
2657
2658 (define-public python-kitchen
2659 (package
2660 (name "python-kitchen")
2661 (version "1.2.4")
2662 (source
2663 (origin
2664 (method url-fetch)
2665 (uri (pypi-uri "kitchen" version))
2666 (sha256
2667 (base32
2668 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2669 (build-system python-build-system)
2670 (propagated-inputs
2671 `(("python-chardet" ,python-chardet)))
2672 (home-page "https://github.com/fedora-infra/kitchen")
2673 (synopsis "Python API for snippets")
2674 (description "@code{kitchen} module provides a python API for all sorts of
2675 little useful snippets of code that everybody ends up writing for their projects
2676 but never seem big enough to build an independent release. Use kitchen and stop
2677 cutting and pasting that code over and over.")
2678 (license (list license:lgpl2.1+
2679 ;; subprocess.py, test_subprocess.py,
2680 ;; kitchen/pycompat25/defaultdict.py:
2681 license:psfl))))
2682
2683 (define-public python2-kitchen
2684 (package-with-python2 python-kitchen))
2685
2686 (define-public python-unidecode
2687 (package
2688 (name "python-unidecode")
2689 (version "0.04.20")
2690 (source (origin
2691 (method url-fetch)
2692 (uri (pypi-uri "Unidecode" version))
2693 (sha256
2694 (base32
2695 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2696 (build-system python-build-system)
2697 (home-page "https://pypi.python.org/pypi/Unidecode")
2698 (synopsis "ASCII transliterations of Unicode text")
2699 (description
2700 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2701 useful when integrating with legacy code that doesn't support Unicode, or for
2702 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2703 machine identifiers from human-readable Unicode strings that should still be
2704 somewhat intelligeble.")
2705 (license license:gpl2+)))
2706
2707 (define-public python2-unidecode
2708 (package-with-python2 python-unidecode))
2709
2710 (define-public python-pyjwt
2711 (package
2712 (name "python-pyjwt")
2713 (version "1.4.0")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (pypi-uri "PyJWT" version))
2718 (sha256
2719 (base32
2720 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2721 (build-system python-build-system)
2722 (native-inputs
2723 `(("python-pytest" ,python-pytest)
2724 ("python-pytest-cov" ,python-pytest-cov)
2725 ("python-pytest-runner" ,python-pytest-runner)))
2726 (home-page "https://github.com/progrium/pyjwt")
2727 (synopsis "JSON Web Token implementation in Python")
2728 (description
2729 "PyJWT is a JSON Web Token implementation written in Python.")
2730 (license license:expat)))
2731
2732 (define-public python2-pyjwt
2733 (package-with-python2 python-pyjwt))
2734
2735 (define-public python-pykka
2736 (package
2737 (name "python-pykka")
2738 (version "1.2.1")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (pypi-uri "Pykka" version))
2743 (sha256
2744 (base32
2745 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2746 (build-system python-build-system)
2747 (native-inputs
2748 `(("python-mock" ,python-mock)
2749 ("python-nose" ,python-nose)
2750 ("python-gevent" ,python-gevent)
2751 ("python-eventlet" ,python-eventlet)))
2752 (home-page "https://www.pykka.org/")
2753 (synopsis "Pykka is a Python implementation of the actor model")
2754 (description
2755 "Pykka is a Python implementation of the actor model.
2756 The actor model introduces some simple rules to control the sharing
2757 of state and cooperation between execution units, which makes it
2758 easier to build concurrent applications.")
2759 (license license:asl2.0)))
2760
2761 (define-public python2-pykka
2762 (package-with-python2 python-pykka))
2763
2764 (define-public python-oauthlib
2765 (package
2766 (name "python-oauthlib")
2767 (version "1.0.3")
2768 (source (origin
2769 (method url-fetch)
2770 (uri (pypi-uri "oauthlib" version))
2771 (sha256
2772 (base32
2773 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2774 (build-system python-build-system)
2775 (native-inputs
2776 `(("python-nose" ,python-nose)
2777 ("python-mock" ,python-mock)
2778 ("python-cryptography" ,python-cryptography)
2779 ("python-pyjwt" ,python-pyjwt)
2780 ("python-blinker" ,python-blinker)))
2781 (home-page "https://github.com/idan/oauthlib")
2782 (synopsis "OAuth implementation for Python")
2783 (description
2784 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2785 OAuth request-signing logic.")
2786 (license license:bsd-3)
2787 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2788
2789 (define-public python2-oauthlib
2790 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2791 (package
2792 (inherit base)
2793 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2794 ,@(package-native-inputs base))))))
2795
2796 (define-public python-itsdangerous
2797 (package
2798 (name "python-itsdangerous")
2799 (version "0.24")
2800 (source
2801 (origin
2802 (method url-fetch)
2803 (uri (string-append
2804 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2805 version ".tar.gz"))
2806 (sha256
2807 (base32
2808 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2809 (build-system python-build-system)
2810 (home-page "https://github.com/mitsuhiko/itsdangerous")
2811 (synopsis "Python library for passing data to/from untrusted environments")
2812 (description
2813 "Itsdangerous provides various helpers to pass trusted data to untrusted
2814 environments and back.")
2815 (license license:bsd-3)))
2816
2817 (define-public python2-itsdangerous
2818 (package-with-python2 python-itsdangerous))
2819
2820 (define-public python-pyyaml
2821 (package
2822 (name "python-pyyaml")
2823 (version "3.12")
2824 (source
2825 (origin
2826 (method url-fetch)
2827 (uri (pypi-uri "PyYAML" version))
2828 (sha256
2829 (base32
2830 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2831 (build-system python-build-system)
2832 (inputs
2833 `(("libyaml" ,libyaml)))
2834 (home-page "http://pyyaml.org/wiki/PyYAML")
2835 (synopsis "YAML parser and emitter for Python")
2836 (description
2837 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2838 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2839 API, and sensible error messages. PyYAML supports standard YAML tags and
2840 provides Python-specific tags that allow to represent an arbitrary Python
2841 object.")
2842 (license license:expat)))
2843
2844 (define-public python2-pyyaml
2845 (package-with-python2 python-pyyaml))
2846
2847 (define-public python-virtualenv
2848 (package
2849 (name "python-virtualenv")
2850 (version "15.0.3")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "virtualenv" version))
2855 (sha256
2856 (base32
2857 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2858 (build-system python-build-system)
2859 (arguments
2860 `(#:phases
2861 (modify-phases %standard-phases
2862 (replace 'check
2863 (lambda _
2864 ;; Disable failing test. See upstream bug report
2865 ;; https://github.com/pypa/virtualenv/issues/957
2866 (substitute* "tests/test_virtualenv.py"
2867 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2868 (zero? (system* "py.test")))))))
2869 (native-inputs
2870 `(("python-mock" ,python-mock)
2871 ("python-pytest" ,python-pytest)))
2872 (home-page "https://virtualenv.pypa.io/")
2873 (synopsis "Virtual Python environment builder")
2874 (description
2875 "Virtualenv is a tool to create isolated Python environments.")
2876 (license license:expat)))
2877
2878 (define-public python2-virtualenv
2879 (package-with-python2 python-virtualenv))
2880
2881 (define-public python-markupsafe
2882 (package
2883 (name "python-markupsafe")
2884 (version "0.23")
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (string-append
2889 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2890 version ".tar.gz"))
2891 (sha256
2892 (base32
2893 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2894 (build-system python-build-system)
2895 (home-page "https://github.com/mitsuhiko/markupsafe")
2896 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2897 (description
2898 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2899 for Python.")
2900 (license license:bsd-3)))
2901
2902 (define-public python2-markupsafe
2903 (package-with-python2 python-markupsafe))
2904
2905 (define-public python-jinja2
2906 (package
2907 (name "python-jinja2")
2908 (version "2.8")
2909 (source
2910 (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "Jinja2" version))
2913 (sha256
2914 (base32
2915 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2916 (build-system python-build-system)
2917 (propagated-inputs
2918 `(("python-markupsafe" ,python-markupsafe)))
2919 (home-page "http://jinja.pocoo.org/")
2920 (synopsis "Python template engine")
2921 (description
2922 "Jinja2 is a small but fast and easy to use stand-alone template engine
2923 written in pure Python.")
2924 (license license:bsd-3)))
2925
2926 (define-public python2-jinja2
2927 (package-with-python2 python-jinja2))
2928
2929 (define-public python-pystache
2930 (package
2931 (name "python-pystache")
2932 (version "0.5.4")
2933 (source (origin
2934 (method url-fetch)
2935 (uri (pypi-uri "pystache" version))
2936 (sha256
2937 (base32
2938 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2939 (build-system python-build-system)
2940 (arguments
2941 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2942 (home-page "http://defunkt.io/pystache/")
2943 (synopsis "Python logic-less template engine")
2944 (description
2945 "Pystache is a Python implementation of the framework agnostic,
2946 logic-free templating system Mustache.")
2947 (license license:expat)
2948 (properties `((python2-variant . ,(delay python2-pystache))))))
2949
2950 (define-public python2-pystache
2951 (package (inherit (package-with-python2
2952 (strip-python2-variant python-pystache)))
2953 (arguments
2954 `(#:python ,python-2
2955 #:phases
2956 (modify-phases %standard-phases
2957 (replace 'check
2958 (lambda _
2959 (zero? (system* "python" "test_pystache.py")))))))))
2960
2961 (define-public python-joblib
2962 (package
2963 (name "python-joblib")
2964 (version "0.10.3")
2965 (source (origin
2966 (method url-fetch)
2967 (uri (pypi-uri "joblib" version))
2968 (sha256
2969 (base32
2970 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2971 (modules '((guix build utils)))
2972 (snippet
2973 '(begin
2974 ;; Remove pre-compiled .pyc files from source.
2975 (for-each delete-file-recursively
2976 (find-files "." "__pycache__" #:directories? #t))
2977 (for-each delete-file (find-files "." "\\.pyc$"))
2978 #t))))
2979 (build-system python-build-system)
2980 (arguments
2981 `(#:phases
2982 (modify-phases %standard-phases
2983 (add-before 'check 'disable-failing-tests
2984 (lambda _
2985 ;; This numpydoc tests fails for unknown reasons
2986 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2987 ;; This numpydoc test depends on matplotlib, which is not a
2988 ;; required input.
2989 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2990 ;; These tests fail to execute sys.executable
2991 (substitute* "joblib/test/test_parallel.py"
2992 (("import nose" line)
2993 (string-append "from nose.plugins.skip import SkipTest\n" line))
2994 (("def test_nested_parallel_warnings" line)
2995 (string-append "@SkipTest\n" line))
2996 (("def test_parallel_with_interactively_defined_functions" line)
2997 (string-append "@SkipTest\n" line)))
2998 #t)))))
2999 ;; Provide nose to enable tests command
3000 (native-inputs
3001 `(("python-nose" ,python-nose)
3002 ("python-sphinx" ,python-sphinx)
3003 ("python-docutils" ,python-docutils)
3004 ("python-numpydoc" ,python-numpydoc)))
3005 (home-page "http://pythonhosted.org/joblib/")
3006 (synopsis "Using Python functions as pipeline jobs")
3007 (description
3008 "Joblib is a set of tools to provide lightweight pipelining in Python.
3009 In particular, joblib offers: transparent disk-caching of the output values
3010 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3011 logging and tracing of the execution.")
3012 (license license:bsd-3)))
3013
3014 (define-public python2-joblib
3015 (package-with-python2 python-joblib))
3016
3017 (define-public python-docutils
3018 (package
3019 (name "python-docutils")
3020 (version "0.13.1")
3021 (source
3022 (origin
3023 (method url-fetch)
3024 (uri (pypi-uri "docutils" version))
3025 (sha256
3026 (base32
3027 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3028 (build-system python-build-system)
3029 (arguments
3030 '(#:tests? #f)) ; no setup.py test command
3031 (home-page "http://docutils.sourceforge.net/")
3032 (synopsis "Python Documentation Utilities")
3033 (description
3034 "Docutils is a modular system for processing documentation into useful
3035 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3036 reStructuredText.")
3037 ;; Most of the source code is public domain, but some source files are
3038 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3039 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3040
3041 (define-public python2-docutils
3042 (package-with-python2 python-docutils))
3043
3044 (define-public python-pygments
3045 (package
3046 (name "python-pygments")
3047 (version "2.1.3")
3048 (source
3049 (origin
3050 (method url-fetch)
3051 (uri (pypi-uri "Pygments" version))
3052 (sha256
3053 (base32
3054 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3055 (build-system python-build-system)
3056 (arguments
3057 ;; FIXME: Tests require sphinx, which depends on this.
3058 '(#:tests? #f))
3059 (home-page "http://pygments.org/")
3060 (synopsis "Syntax highlighting")
3061 (description
3062 "Pygments is a syntax highlighting package written in Python.")
3063 (license license:bsd-2)))
3064
3065 (define-public python2-pygments
3066 (package-with-python2 python-pygments))
3067
3068 (define-public python-sphinx
3069 (package
3070 (name "python-sphinx")
3071 (version "1.5.1")
3072 (source
3073 (origin
3074 (method url-fetch)
3075 (uri (pypi-uri "Sphinx" version))
3076 (sha256
3077 (base32
3078 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3079 (build-system python-build-system)
3080 (arguments
3081 `(#:phases
3082 (modify-phases %standard-phases
3083 (replace 'check
3084 (lambda _
3085 ;; Requires Internet access.
3086 (delete-file "tests/test_build_linkcheck.py")
3087 (zero? (system* "make" "test")))))))
3088 (propagated-inputs
3089 `(("python-imagesize" ,python-imagesize)
3090 ("python-sphinx-alabaster-theme"
3091 ,python-sphinx-alabaster-theme)
3092 ("python-babel" ,python-babel)
3093 ("python-snowballstemmer" ,python-snowballstemmer)
3094 ("python-docutils" ,python-docutils)
3095 ("python-jinja2" ,python-jinja2)
3096 ("python-pygments" ,python-pygments)
3097 ("python-requests" ,python-requests)
3098 ("python-six" ,python-six)))
3099 (native-inputs
3100 `(("graphviz" ,graphviz)
3101 ("python-html5lib" ,python-html5lib)
3102 ("python-mock" ,python-mock)
3103 ("python-nose" ,python-nose)))
3104 (home-page "http://sphinx-doc.org/")
3105 (synopsis "Python documentation generator")
3106 (description "Sphinx is a tool that makes it easy to create documentation
3107 for Python projects or other documents consisting of multiple reStructuredText
3108 sources.")
3109 (license license:bsd-3)
3110 (properties `((python2-variant . ,(delay python2-sphinx))))))
3111
3112 (define-public python-sphinx-1.5.3
3113 (package
3114 (inherit python-sphinx)
3115 (name "python-sphinx")
3116 (version "1.5.3")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (pypi-uri "Sphinx" version))
3121 (sha256
3122 (base32
3123 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3124 (native-inputs
3125 `(("python-pytest" ,python-pytest-3.0)
3126 ,@(package-native-inputs python-sphinx)))))
3127
3128 (define-public python2-sphinx
3129 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3130 (package
3131 (inherit base)
3132 (native-inputs `(("python2-mock" ,python2-mock)
3133 ("python2-enum34" ,python2-enum34)
3134 ,@(package-native-inputs base)))
3135 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3136 ,@(package-propagated-inputs base))))))
3137
3138 (define-public python-sphinx-rtd-theme
3139 (package
3140 (name "python-sphinx-rtd-theme")
3141 (version "0.2.4")
3142 (source
3143 (origin
3144 (method url-fetch)
3145 (uri (pypi-uri "sphinx_rtd_theme" version))
3146 (sha256
3147 (base32
3148 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3149 (build-system python-build-system)
3150 (arguments '(#:tests? #f)) ; No tests.
3151 (propagated-inputs
3152 `(("python-sphinx" ,python-sphinx)))
3153 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3154 (synopsis "ReadTheDocs.org theme for Sphinx")
3155 (description "A theme for Sphinx used by ReadTheDocs.org.")
3156 (license license:expat)))
3157
3158 (define-public python2-sphinx-rtd-theme
3159 (package-with-python2 python-sphinx-rtd-theme))
3160
3161 (define-public python-rst.linker
3162 (package
3163 (name "python-rst.linker")
3164 (version "1.7")
3165 (source
3166 (origin
3167 (method url-fetch)
3168 (uri (pypi-uri "rst.linker" version))
3169 (sha256
3170 (base32
3171 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3172 (build-system python-build-system)
3173 (propagated-inputs
3174 `(("python-dateutil" ,python-dateutil)
3175 ("python-six" ,python-six)))
3176 (native-inputs
3177 `(("python-setuptools-scm" ,python-setuptools-scm)))
3178 ;; Test would require path.py, which would introduce a cyclic dependence.
3179 (arguments `(#:tests? #f))
3180 ;; Note: As of version 1.7 the documentation is not worth building.
3181 (home-page "https://github.com/jaraco/rst.linker")
3182 (synopsis "Sphinx plugin to add links and timestamps")
3183 (description "rst.linker allows to automatically replace text by a
3184 reStructuredText external reference or timestamps. It's primary purpose is to
3185 augment the changelog, but it can be used for other documents, too.")
3186 (license license:expat)))
3187
3188 (define-public python2-rst.linker
3189 (package-with-python2 python-rst.linker))
3190
3191 (define-public python-feedgenerator
3192 (package
3193 (name "python-feedgenerator")
3194 (version "1.9")
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "feedgenerator" version))
3199 (sha256
3200 (base32
3201 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3202 (modules '((guix build utils)))
3203 (snippet
3204 '(begin
3205 ;; Remove pre-compiled .pyc files from source.
3206 (for-each delete-file-recursively
3207 (find-files "." "__pycache__" #:directories? #t))
3208 (for-each delete-file (find-files "." "\\.pyc$"))
3209 #t))))
3210 (build-system python-build-system)
3211 (propagated-inputs
3212 `(("python-pytz" ,python-pytz)
3213 ("python-six" ,python-six)))
3214 (home-page "https://github.com/getpelican/feedgenerator")
3215 (synopsis
3216 "Standalone version of Django's Atom/RSS feed generator")
3217 (description
3218 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3219 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3220 (license license:bsd-3)))
3221
3222 (define-public python2-feedgenerator
3223 (package-with-python2 python-feedgenerator))
3224
3225 (define-public python-blinker
3226 (package
3227 (name "python-blinker")
3228 (version "1.4")
3229 (source
3230 (origin
3231 (method url-fetch)
3232 (uri (pypi-uri "blinker" version))
3233 (sha256
3234 (base32
3235 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3236 (build-system python-build-system)
3237 (home-page "http://pythonhosted.org/blinker/")
3238 (synopsis "Fast, simple object-to-object and broadcast signaling")
3239 (description
3240 "Blinker provides a fast dispatching system that allows any number of
3241 interested parties to subscribe to events, or \"signals\".")
3242 (license license:expat)))
3243
3244 (define-public python2-blinker
3245 (package-with-python2 python-blinker))
3246
3247 (define-public pelican
3248 (package
3249 (name "pelican")
3250 (version "3.6.3")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (pypi-uri "pelican" version))
3255 (sha256
3256 (base32
3257 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3258 (build-system python-build-system)
3259 (propagated-inputs
3260 `(("python-feedgenerator" ,python-feedgenerator)
3261 ("python-jinja2" ,python-jinja2)
3262 ("python-pygments" ,python-pygments)
3263 ("python-docutils" ,python-docutils)
3264 ("python-pytz" ,python-pytz)
3265 ("python-blinker" ,python-blinker)
3266 ("python-unidecode" ,python-unidecode)
3267 ("python-six" ,python-six)
3268 ("python-dateutil" ,python-dateutil)))
3269 (home-page "http://getpelican.com/")
3270 (arguments
3271 `(;; XXX Requires a lot more packages to do unit tests :P
3272 #:tests? #f
3273 #:phases (modify-phases %standard-phases
3274 (add-before
3275 'install 'adjust-requires
3276 ;; Since feedgenerator is installed from git, it doesn't
3277 ;; conform to the version requirements.
3278 ;;
3279 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3280 ;; version requirement so setuptools doesn't get confused.
3281 (lambda _
3282 (substitute* "setup.py"
3283 (("['\"]feedgenerator.*?['\"]")
3284 "'feedgenerator'")))))))
3285 (synopsis "Python-based static site publishing system")
3286 (description
3287 "Pelican is a tool to generate a static blog from reStructuredText,
3288 Markdown input files, and more. Pelican uses Jinja2 for templating
3289 and is very extensible.")
3290 (license license:agpl3+)))
3291
3292 (define-public python-scikit-learn
3293 (package
3294 (name "python-scikit-learn")
3295 (version "0.18.1")
3296 (source
3297 (origin
3298 (method url-fetch)
3299 (uri (string-append
3300 "https://github.com/scikit-learn/scikit-learn/archive/"
3301 version ".tar.gz"))
3302 (file-name (string-append name "-" version ".tar.gz"))
3303 (sha256
3304 (base32
3305 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3306 (build-system python-build-system)
3307 (arguments
3308 `(#:phases
3309 (modify-phases %standard-phases
3310 (delete 'check)
3311 (add-after 'install 'check
3312 ;; Running tests from the source directory requires
3313 ;; an "inplace" build with paths relative to CWD.
3314 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3315 ;; Use the installed version instead.
3316 (lambda* (#:key inputs outputs #:allow-other-keys)
3317 (add-installed-pythonpath inputs outputs)
3318 ;; some tests require access to "$HOME"
3319 (setenv "HOME" "/tmp")
3320 ;; Step out of the source directory just to be sure.
3321 (chdir "..")
3322 (zero? (system* "nosetests" "-v" "sklearn")))))))
3323 (inputs
3324 `(("openblas" ,openblas)))
3325 (native-inputs
3326 `(("python-nose" ,python-nose)
3327 ("python-cython" ,python-cython)))
3328 (propagated-inputs
3329 `(("python-numpy" ,python-numpy)
3330 ("python-scipy" ,python-scipy)))
3331 (home-page "http://scikit-learn.org/")
3332 (synopsis "Machine Learning in Python")
3333 (description
3334 "Scikit-learn provides simple and efficient tools for data
3335 mining and data analysis.")
3336 (license license:bsd-3)))
3337
3338 (define-public python2-scikit-learn
3339 (package-with-python2 python-scikit-learn))
3340
3341 (define-public python-scikit-image
3342 (package
3343 (name "python-scikit-image")
3344 (version "0.11.3")
3345 (source
3346 (origin
3347 (method url-fetch)
3348 (uri (string-append
3349 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3350 version ".tar.gz"))
3351 (sha256
3352 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3353 (build-system python-build-system)
3354 (arguments
3355 ;; TODO: Some tests require running X11 server. Disable them?
3356 '(#:tests? #f))
3357 ;; See DEPENDS.txt for the list of build and run time requiremnts
3358 (propagated-inputs
3359 `(("python-matplotlib" ,python-matplotlib)
3360 ("python-networkx" ,python-networkx)
3361 ("python-scipy" ,python-scipy)
3362 ("python-pillow" ,python-pillow)))
3363 (native-inputs
3364 `(("python-numpy" ,python-numpy)
3365 ("python-cython" ,python-cython)
3366 ("python-six" ,python-six)))
3367 (home-page "http://scikit-image.org/")
3368 (synopsis "Image processing in Python")
3369 (description
3370 "Scikit-image is a collection of algorithms for image processing.")
3371 (license license:bsd-3)))
3372
3373 (define-public python2-scikit-image
3374 (package-with-python2 python-scikit-image))
3375
3376 (define-public python-redis
3377 (package
3378 (name "python-redis")
3379 (version "2.10.5")
3380 (source
3381 (origin
3382 (method url-fetch)
3383 (uri (pypi-uri "redis" version))
3384 (sha256
3385 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3386 (build-system python-build-system)
3387 ;; Tests require a running Redis server
3388 (arguments '(#:tests? #f))
3389 ;; As long as we are not running test, we do not need this input :-)
3390 ;;(native-inputs
3391 ;; `(("python-pytest" ,python-pytest)))
3392 (home-page "https://github.com/andymccurdy/redis-py")
3393 (synopsis "Redis Python client")
3394 (description
3395 "This package provides a Python interface to the Redis key-value store.")
3396 (license license:expat)))
3397
3398 (define-public python2-redis
3399 (package-with-python2 python-redis))
3400
3401 (define-public python-rq
3402 (package
3403 (name "python-rq")
3404 (version "0.7.1")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "rq" version))
3409 (sha256
3410 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3411 (build-system python-build-system)
3412 (propagated-inputs
3413 `(("python-click" ,python-click)
3414 ("python-redis" ,python-redis)))
3415 (home-page "http://python-rq.org/")
3416 (synopsis "Simple job queues for Python")
3417 (description
3418 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3419 processing them in the background with workers. It is backed by Redis and it
3420 is designed to have a low barrier to entry.")
3421 (license license:bsd-2)))
3422
3423 (define-public python2-rq
3424 (package-with-python2 python-rq))
3425
3426 (define-public python-cython
3427 (package
3428 (name "python-cython")
3429 (version "0.25.2")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "Cython" version))
3434 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3435 (sha256
3436 (base32
3437 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3438 (build-system python-build-system)
3439 ;; we need the full python package and not just the python-wrapper
3440 ;; because we need libpython3.3m.so
3441 (inputs
3442 `(("python" ,python)))
3443 (arguments
3444 `(#:phases
3445 (modify-phases %standard-phases
3446 (add-before 'check 'set-HOME
3447 ;; some tests require access to "$HOME/.cython"
3448 (lambda _ (setenv "HOME" "/tmp")))
3449 (replace 'check
3450 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3451 (home-page "http://cython.org/")
3452 (synopsis "C extensions for Python")
3453 (description "Cython is an optimising static compiler for both the Python
3454 programming language and the extended Cython programming language. It makes
3455 writing C extensions for Python as easy as Python itself.")
3456 (license license:asl2.0)
3457 (properties `((python2-variant . ,(delay python2-cython))))))
3458
3459 (define-public python2-cython
3460 (package (inherit (package-with-python2
3461 (strip-python2-variant python-cython)))
3462 (name "python2-cython")
3463 (inputs
3464 `(("python-2" ,python-2))))) ; this is not automatically changed
3465
3466 ;; The RPython toolchain currently does not support Python 3.
3467 (define-public python2-rpython
3468 (package
3469 (name "python2-rpython")
3470 (version "0.1.4")
3471 (source
3472 (origin
3473 (method url-fetch)
3474 (uri (pypi-uri "rpython" version))
3475 (sha256
3476 (base32
3477 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3478 (build-system python-build-system)
3479 (arguments `(#:python ,python-2))
3480 (native-inputs
3481 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3482 (home-page "https://rpython.readthedocs.org")
3483 (synopsis "Framework for implementing interpreters and virtual machines")
3484 (description "RPython is a translation and support framework for
3485 producing implementations of dynamic languages, emphasizing a clean separation
3486 between language specification and implementation aspects.")
3487 (license license:expat)))
3488
3489 (define-public python-numpy
3490 (package
3491 (name "python-numpy")
3492 (version "1.12.0")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (string-append
3497 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3498 (file-name (string-append name "-" version ".tar.gz"))
3499 (sha256
3500 (base32
3501 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3502 (build-system python-build-system)
3503 (inputs
3504 `(("openblas" ,openblas)
3505 ("lapack" ,lapack)))
3506 (native-inputs
3507 `(("python-cython" ,python-cython)
3508 ("python-nose" ,python-nose)
3509 ("gfortran" ,gfortran)))
3510 (arguments
3511 `(#:phases
3512 (modify-phases %standard-phases
3513 (add-before 'build 'set-environment-variables
3514 (lambda* (#:key inputs #:allow-other-keys)
3515 (call-with-output-file "site.cfg"
3516 (lambda (port)
3517 (format port
3518 "[openblas]
3519 libraries = openblas
3520 library_dirs = ~a/lib
3521 include_dirs = ~a/include
3522
3523 # backslash-n to make emacs happy
3524 \n[lapack]
3525 lapack_libs = lapack
3526 library_dirs = ~a/lib
3527 include_dirs = ~a/include
3528 "
3529 (assoc-ref inputs "openblas")
3530 (assoc-ref inputs "openblas")
3531 (assoc-ref inputs "lapack")
3532 (assoc-ref inputs "lapack"))))
3533 ;; Use "gcc" executable, not "cc".
3534 (substitute* "numpy/distutils/system_info.py"
3535 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3536 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3537 #t))
3538 ;; Tests can only be run after the library has been installed and not
3539 ;; within the source directory.
3540 (delete 'check)
3541 (add-after 'install 'check
3542 (lambda* (#:key outputs inputs #:allow-other-keys)
3543 ;; Make installed package available for running the tests
3544 (add-installed-pythonpath inputs outputs)
3545 (with-directory-excursion "/tmp"
3546 (zero? (system* "python" "-c"
3547 "import numpy; numpy.test(verbose=2)"))))))))
3548 (home-page "http://www.numpy.org/")
3549 (synopsis "Fundamental package for scientific computing with Python")
3550 (description "NumPy is the fundamental package for scientific computing
3551 with Python. It contains among other things: a powerful N-dimensional array
3552 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3553 and Fortran code, useful linear algebra, Fourier transform, and random number
3554 capabilities.")
3555 (license license:bsd-3)))
3556
3557 (define-public python2-numpy
3558 (package-with-python2 python-numpy))
3559
3560 (define-public python-munch
3561 (package
3562 (name "python-munch")
3563 (version "2.0.4")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (pypi-uri "munch" version))
3568 (sha256
3569 (base32
3570 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3571 (build-system python-build-system)
3572 (home-page "https://github.com/Infinidat/munch")
3573 (synopsis "Dot-accessible dictionary")
3574 (description "Munch is a dot-accessible dictionary similar to JavaScript
3575 objects.")
3576 (license license:expat)))
3577
3578 (define-public python2-munch
3579 (package-with-python2 python-munch))
3580
3581 (define-public python2-fastlmm
3582 (package
3583 (name "python2-fastlmm")
3584 (version "0.2.21")
3585 (source
3586 (origin
3587 (method url-fetch)
3588 (uri (pypi-uri "fastlmm" version ".zip"))
3589 (sha256
3590 (base32
3591 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3592 (build-system python-build-system)
3593 (arguments
3594 `(#:python ,python-2)) ; only Python 2.7 is supported
3595 (propagated-inputs
3596 `(("python2-numpy" ,python2-numpy)
3597 ("python2-scipy" ,python2-scipy)
3598 ("python2-matplotlib" ,python2-matplotlib)
3599 ("python2-pandas" ,python2-pandas)
3600 ("python2-scikit-learn" ,python2-scikit-learn)
3601 ("python2-pysnptools" ,python2-pysnptools)))
3602 (native-inputs
3603 `(("unzip" ,unzip)
3604 ("python2-cython" ,python2-cython)
3605 ("python2-mock" ,python2-mock)
3606 ("python2-nose" ,python2-nose)))
3607 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3608 (synopsis "Perform genome-wide association studies on large data sets")
3609 (description
3610 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3611 Models, is a program for performing both single-SNP and SNP-set genome-wide
3612 association studies (GWAS) on extremely large data sets.")
3613 (license license:asl2.0)))
3614
3615 (define-public python-numpy-documentation
3616 (package
3617 (name "python-numpy-documentation")
3618 (version (package-version python-numpy))
3619 (source (package-source python-numpy))
3620 (build-system python-build-system)
3621 (native-inputs
3622 `(("python-matplotlib" ,python-matplotlib)
3623 ("python-numpy" ,python-numpy)
3624 ("pkg-config" ,pkg-config)
3625 ("python-sphinx" ,python-sphinx)
3626 ("python-numpydoc" ,python-numpydoc)
3627 ("texlive" ,texlive)
3628 ("texinfo" ,texinfo)
3629 ("perl" ,perl)
3630 ("scipy-sphinx-theme"
3631 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3632 (method git-fetch)
3633 (uri (git-reference
3634 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3635 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3636 (sha256
3637 (base32
3638 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3639 ,@(package-native-inputs python-numpy)))
3640 (arguments
3641 `(#:tests? #f ; we're only generating the documentation
3642 #:phases
3643 (modify-phases %standard-phases
3644 (delete 'build)
3645 (replace 'install
3646 (lambda* (#:key inputs outputs #:allow-other-keys)
3647 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3648 (doc (string-append
3649 data "/doc/" ,name "-"
3650 ,(package-version python-numpy)))
3651 (info-reader (string-append data "/info"))
3652 (html (string-append doc "/html"))
3653 (scipy-sphinx-theme "scipy-sphinx-theme")
3654 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3655 (pyver ,(string-append "PYVER=")))
3656 (with-directory-excursion "doc"
3657 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3658 (mkdir-p html)
3659 (system* "make" "html" pyver)
3660 (system* "make" "latex" "PAPER=a4" pyver)
3661 (system* "make" "-C" "build/latex"
3662 "all-pdf" "PAPER=a4" pyver)
3663 ;; FIXME: Generation of the info file fails.
3664 ;; (system* "make" "info" pyver)
3665 ;; (mkdir-p info)
3666 ;; (copy-file "build/texinfo/numpy.info"
3667 ;; (string-append info "/numpy.info"))
3668 (for-each (lambda (file)
3669 (copy-file (string-append "build/latex" file)
3670 (string-append doc file)))
3671 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3672 (with-directory-excursion "build/html"
3673 (for-each (lambda (file)
3674 (let* ((dir (dirname file))
3675 (tgt-dir (string-append html "/" dir)))
3676 (unless (equal? "." dir)
3677 (mkdir-p tgt-dir))
3678 (install-file file html)))
3679 (find-files "." ".*")))))
3680 #t)))))
3681 (home-page (package-home-page python-numpy))
3682 (synopsis "Documentation for the python-numpy package")
3683 (description (package-description python-numpy))
3684 (license (package-license python-numpy))))
3685
3686 (define-public python2-numpy-documentation
3687 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3688 (package
3689 (inherit numpy-documentation)
3690 (native-inputs `(("python2-functools32" ,python2-functools32)
3691 ,@(package-native-inputs numpy-documentation))))))
3692
3693 (define-public python-pygit2
3694 (package
3695 (name "python-pygit2")
3696 (version "0.25.0")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (pypi-uri "pygit2" version))
3701 (sha256
3702 (base32
3703 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3704 (patches
3705 (search-patches "python-pygit2-disable-network-tests.patch"))))
3706 (build-system python-build-system)
3707 (propagated-inputs
3708 `(("python-six" ,python-six)
3709 ("python-cffi" ,python-cffi)
3710 ("libgit2" ,libgit2)
3711 ("python-tox" ,python-tox)))
3712 (home-page "https://github.com/libgit2/pygit2")
3713 (synopsis "Python bindings for libgit2")
3714 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3715 library, libgit2 implements Git plumbing.")
3716 ;; GPL2.0 only, with linking exception.
3717 (license license:gpl2)))
3718
3719 (define-public python2-pygit2
3720 (package-with-python2 python-pygit2))
3721
3722 (define-public python-pyparsing
3723 (package
3724 (name "python-pyparsing")
3725 (version "2.0.3")
3726 (source
3727 (origin
3728 (method url-fetch)
3729 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3730 "/pyparsing-" version
3731 "/pyparsing-" version ".tar.gz"))
3732 (sha256
3733 (base32
3734 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3735 (build-system python-build-system)
3736 (outputs '("out" "doc"))
3737 (arguments
3738 `(#:tests? #f ; no test target
3739 #:modules ((guix build python-build-system)
3740 (guix build utils))
3741 #:phases
3742 (alist-cons-after
3743 'install 'install-doc
3744 (lambda* (#:key outputs #:allow-other-keys)
3745 (let* ((doc (string-append (assoc-ref outputs "doc")
3746 "/share/doc/" ,name "-" ,version))
3747 (html-doc (string-append doc "/html"))
3748 (examples (string-append doc "/examples")))
3749 (mkdir-p html-doc)
3750 (mkdir-p examples)
3751 (for-each
3752 (lambda (dir tgt)
3753 (map (lambda (file)
3754 (install-file file tgt))
3755 (find-files dir ".*")))
3756 (list "docs" "htmldoc" "examples")
3757 (list doc html-doc examples))))
3758 %standard-phases)))
3759 (home-page "http://pyparsing.wikispaces.com")
3760 (synopsis "Python parsing class library")
3761 (description
3762 "The pyparsing module is an alternative approach to creating and
3763 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3764 of regular expressions. The pyparsing module provides a library of classes
3765 that client code uses to construct the grammar directly in Python code.")
3766 (license license:expat)))
3767
3768 (define-public python2-pyparsing
3769 (package-with-python2 python-pyparsing))
3770
3771 (define-public python-numpydoc
3772 (package
3773 (name "python-numpydoc")
3774 (version "0.5")
3775 (source
3776 (origin
3777 (method url-fetch)
3778 (uri (string-append
3779 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3780 version ".tar.gz"))
3781 (sha256
3782 (base32
3783 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3784 (modules '((guix build utils)))
3785 (snippet
3786 '(begin
3787 ;; Drop a test requiring matplotlib, which we cannot add as an
3788 ;; input since it would create a circular dependency: Extend the
3789 ;; test for Python 3, where it is already dropped, to Python 2.
3790 (substitute* "numpydoc/tests/test_plot_directive.py"
3791 (("3") "2"))))))
3792 (build-system python-build-system)
3793 (propagated-inputs
3794 `(("python-sphinx" ,python-sphinx)))
3795 (native-inputs
3796 `(("python-nose" ,python-nose)))
3797 (home-page "https://pypi.python.org/pypi/numpydoc")
3798 (synopsis
3799 "Numpy's Sphinx extensions")
3800 (description
3801 "Sphinx extension to support docstrings in Numpy format.")
3802 (license license:bsd-2)))
3803
3804 (define-public python2-numpydoc
3805 (package-with-python2 python-numpydoc))
3806
3807 (define-public python-numexpr
3808 (package
3809 (name "python-numexpr")
3810 (version "2.6.1")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "numexpr" version))
3815 (sha256
3816 (base32
3817 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3818 (build-system python-build-system)
3819 (arguments `(#:tests? #f)) ; no tests included
3820 (propagated-inputs
3821 `(("python-numpy" ,python-numpy)))
3822 (home-page "https://github.com/pydata/numexpr")
3823 (synopsis "Fast numerical expression evaluator for NumPy")
3824 (description
3825 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3826 expressions that operate on arrays are accelerated and use less memory than
3827 doing the same calculation in Python. In addition, its multi-threaded
3828 capabilities can make use of all your cores, which may accelerate
3829 computations, most specially if they are not memory-bounded (e.g. those using
3830 transcendental functions).")
3831 (license license:expat)))
3832
3833 (define-public python2-numexpr
3834 (package-with-python2 python-numexpr))
3835
3836 (define-public python-cycler
3837 (package
3838 (name "python-cycler")
3839 (version "0.10.0")
3840 (source (origin
3841 (method url-fetch)
3842 (uri (pypi-uri "cycler" version))
3843 (sha256
3844 (base32
3845 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3846 (build-system python-build-system)
3847 (arguments
3848 ;; XXX: The current version requires 'coveralls' which we don't have.
3849 ;; Enable this for the next release which uses 'python-pytest'.
3850 '(#:tests? #f))
3851 (propagated-inputs
3852 `(("python-six" ,python-six)))
3853 (home-page "http://matplotlib.org/cycler/")
3854 (synopsis "Composable keyword argument iterator")
3855 (description
3856 "When using @code{matplotlib} and plotting more than one line, it is
3857 common to want to be able to want to be able to cycle over one or more artist
3858 styles; but the plotting logic can quickly become involved.
3859 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3860 @code{Cycler} class was developed.")
3861 (license license:bsd-3)))
3862
3863 (define-public python2-cycler
3864 (package-with-python2 python-cycler))
3865
3866 (define-public python-colorspacious
3867 (package
3868 (name "python-colorspacious")
3869 (version "1.1.0")
3870 (source
3871 (origin
3872 (method url-fetch)
3873 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3874 version ".tar.gz"))
3875 (file-name (string-append name "-" version))
3876 (sha256
3877 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3878 (build-system python-build-system)
3879 (propagated-inputs
3880 `(("python-numpy" ,python-numpy)))
3881 (native-inputs
3882 `(("python-nose" ,python-nose)))
3883 (arguments
3884 `(#:phases
3885 (modify-phases %standard-phases
3886 (replace 'check
3887 (lambda _
3888 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3889 (home-page "https://github.com/njsmith/colorspacious")
3890 (synopsis "Python library for colorspace conversions")
3891 (description "@code{colorspacious} is a Python library that lets you
3892 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3893 (license license:expat)))
3894
3895 (define-public python2-colorspacious
3896 (package-with-python2 python-colorspacious))
3897
3898 (define-public python-matplotlib
3899 (package
3900 (name "python-matplotlib")
3901 (version "2.0.0")
3902 (source
3903 (origin
3904 (method url-fetch)
3905 (uri (string-append
3906 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3907 (file-name (string-append name "-" version ".tar.gz"))
3908 (sha256
3909 (base32
3910 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3911 (build-system python-build-system)
3912 (propagated-inputs ; the following packages are all needed at run time
3913 `(("python-cycler" ,python-cycler)
3914 ("python-pyparsing" ,python-pyparsing)
3915 ("python-pygobject" ,python-pygobject)
3916 ("gobject-introspection" ,gobject-introspection)
3917 ("python-tkinter" ,python "tk")
3918 ("python-dateutil" ,python-dateutil)
3919 ("python-numpy" ,python-numpy)
3920 ("python-pillow" ,python-pillow)
3921 ("python-pytz" ,python-pytz)
3922 ("python-six" ,python-six)
3923 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3924 ;; from 'gtk+') provides the required 'typelib' files used by
3925 ;; 'gobject-introspection'. The location of these files is set with the
3926 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3927 ;; is done automatically by a 'native-search-path' procedure. However,
3928 ;; at run-time the user must set this variable as follows:
3929 ;;
3930 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3931 ("gtk+" ,gtk+)
3932 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3933 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3934 ;; object. For this reason we need to import both libraries.
3935 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3936 ("python-pycairo" ,python-pycairo)
3937 ("python-cairocffi" ,python-cairocffi)))
3938 (inputs
3939 `(("libpng" ,libpng)
3940 ("imagemagick" ,imagemagick)
3941 ("freetype" ,freetype)
3942 ("cairo" ,cairo)
3943 ("glib" ,glib)
3944 ;; FIXME: Add backends when available.
3945 ;("python-wxpython" ,python-wxpython)
3946 ("python-pyqt" ,python-pyqt)
3947 ("tcl" ,tcl)
3948 ("tk" ,tk)))
3949 (native-inputs
3950 `(("pkg-config" ,pkg-config)
3951 ("python-nose" ,python-nose)
3952 ("python-mock" ,python-mock)))
3953 (arguments
3954 `(#:phases
3955 (modify-phases %standard-phases
3956 (add-before 'build 'configure-environment
3957 (lambda* (#:key outputs inputs #:allow-other-keys)
3958 (let ((cairo (assoc-ref inputs "cairo"))
3959 (gtk+ (assoc-ref inputs "gtk+")))
3960 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3961 ;; has not effect.
3962 (setenv "LD_LIBRARY_PATH"
3963 (string-append cairo "/lib:" gtk+ "/lib"))
3964 (setenv "HOME" (getcwd))
3965 (call-with-output-file "setup.cfg"
3966 (lambda (port)
3967 (format port "[directories]~%
3968 basedirlist = ~a,~a~%
3969 [rc_options]~%
3970 backend = TkAgg~%"
3971 (assoc-ref inputs "tcl")
3972 (assoc-ref inputs "tk")))))
3973 #t)))))
3974 (home-page "http://matplotlib.org")
3975 (synopsis "2D plotting library for Python")
3976 (description
3977 "Matplotlib is a Python 2D plotting library which produces publication
3978 quality figures in a variety of hardcopy formats and interactive environments
3979 across platforms. Matplotlib can be used in Python scripts, the python and
3980 ipython shell, web application servers, and six graphical user interface
3981 toolkits.")
3982 (license license:psfl)
3983 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3984
3985 (define-public python2-matplotlib
3986 (let ((matplotlib (package-with-python2
3987 (strip-python2-variant python-matplotlib))))
3988 (package (inherit matplotlib)
3989 ;; Make sure to use special packages for Python 2 instead
3990 ;; of those automatically rewritten by package-with-python2.
3991 (propagated-inputs
3992 `(("python2-pycairo" ,python2-pycairo)
3993 ("python2-functools32" ,python2-functools32)
3994 ("python2-pygobject-2" ,python2-pygobject-2)
3995 ("python2-subprocess32" ,python2-subprocess32)
3996 ("python2-tkinter" ,python-2 "tk")
3997 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3998 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3999
4000 (define-public python-matplotlib-documentation
4001 (package
4002 (name "python-matplotlib-documentation")
4003 (version (package-version python-matplotlib))
4004 (source (package-source python-matplotlib))
4005 (build-system python-build-system)
4006 (native-inputs
4007 `(("python-matplotlib" ,python-matplotlib)
4008 ("python-colorspacious" ,python-colorspacious)
4009 ("python-sphinx" ,python-sphinx)
4010 ("python-numpydoc" ,python-numpydoc)
4011 ("python-ipython" ,python-ipython)
4012 ("python-mock" ,python-mock)
4013 ("graphviz" ,graphviz)
4014 ("texlive" ,texlive)
4015 ("texinfo" ,texinfo)
4016 ,@(package-native-inputs python-matplotlib)))
4017 (arguments
4018 `(#:tests? #f ; we're only generating documentation
4019 #:phases
4020 (modify-phases %standard-phases
4021 (replace 'build
4022 (lambda _
4023 (chdir "doc")
4024 ;; Produce pdf in 'A4' format.
4025 (substitute* "conf.py"
4026 (("latex_paper_size = 'letter'") "")
4027 ;; latex_paper_size is deprecated -> set paper size using
4028 ;; latex_elements
4029 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4030 ;; insert at a point where latex_elements{} is defined:
4031 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4032 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4033 (replace 'install
4034 (lambda* (#:key inputs outputs #:allow-other-keys)
4035 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4036 (doc (string-append data "/doc/python-matplotlib-" ,version))
4037 (info (string-append data "/info"))
4038 (html (string-append doc "/html")))
4039 (mkdir-p html)
4040 (mkdir-p info)
4041 (copy-recursively "build/html" html)
4042 (symlink (string-append html "/_images")
4043 (string-append info "/matplotlib-figures"))
4044 (with-directory-excursion "build/texinfo"
4045 (substitute* "matplotlib.texi"
4046 (("@image\\{([^,]*)" all file)
4047 (string-append "@image{matplotlib-figures/" file)))
4048 (symlink (string-append html "/_images")
4049 "./matplotlib-figures")
4050 (system* "makeinfo" "--no-split"
4051 "-o" "matplotlib.info" "matplotlib.texi"))
4052 (copy-file "build/texinfo/matplotlib.info"
4053 (string-append info "/matplotlib.info"))
4054 (copy-file "build/latex/Matplotlib.pdf"
4055 (string-append doc "/Matplotlib.pdf")))
4056 #t)))))
4057 (home-page (package-home-page python-matplotlib))
4058 (synopsis "Documentation for the python-matplotlib package")
4059 (description (package-description python-matplotlib))
4060 (license (package-license python-matplotlib))))
4061
4062 (define-public python2-matplotlib-documentation
4063 (package-with-python2 python-matplotlib-documentation))
4064
4065 (define-public python2-pysnptools
4066 (package
4067 (name "python2-pysnptools")
4068 (version "0.3.9")
4069 (source
4070 (origin
4071 (method url-fetch)
4072 (uri (pypi-uri "pysnptools" version ".zip"))
4073 (sha256
4074 (base32
4075 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4076 (build-system python-build-system)
4077 (arguments
4078 `(#:python ,python-2)) ; only Python 2.7 is supported
4079 (propagated-inputs
4080 `(("python2-numpy" ,python2-numpy)
4081 ("python2-scipy" ,python2-scipy)
4082 ("python2-pandas" ,python2-pandas)))
4083 (native-inputs
4084 `(("python2-cython" ,python2-cython)))
4085 (native-inputs
4086 `(("unzip" ,unzip)))
4087 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4088 (synopsis "Library for reading and manipulating genetic data")
4089 (description
4090 "PySnpTools is a library for reading and manipulating genetic data. It
4091 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4092 those files. It can also efficiently manipulate ranges of integers using set
4093 operators such as union, intersection, and difference.")
4094 (license license:asl2.0)))
4095
4096 (define-public python-rpy2
4097 (package
4098 (name "python-rpy2")
4099 (version "2.7.6")
4100 (source
4101 (origin
4102 (method url-fetch)
4103 (uri (pypi-uri "rpy2" version))
4104 (sha256
4105 (base32
4106 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4107 (build-system python-build-system)
4108 (arguments
4109 '(#:phases
4110 (modify-phases %standard-phases
4111 (delete 'check)
4112 (add-after 'install 'check
4113 (lambda* (#:key outputs inputs #:allow-other-keys)
4114 ;; It's easier to run tests after install.
4115 ;; Make installed package available for running the tests
4116 (add-installed-pythonpath inputs outputs)
4117 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4118 (propagated-inputs
4119 `(("python-six" ,python-six)))
4120 (inputs
4121 `(("readline" ,readline)
4122 ("icu4c" ,icu4c)
4123 ("pcre" ,pcre)
4124 ("r-minimal" ,r-minimal)
4125 ("r-survival" ,r-survival)))
4126 (native-inputs
4127 `(("zlib" ,zlib)))
4128 (home-page "http://rpy.sourceforge.net/")
4129 (synopsis "Python interface to the R language")
4130 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4131 low-level interface to R from Python, a proposed high-level interface,
4132 including wrappers to graphical libraries, as well as R-like structures and
4133 functions.")
4134 (license license:gpl3+)))
4135
4136 (define-public python2-rpy2
4137 (let ((rpy2 (package-with-python2 python-rpy2)))
4138 (package (inherit rpy2)
4139 (propagated-inputs
4140 `(("python2-singledispatch" ,python2-singledispatch)
4141 ,@(package-propagated-inputs rpy2))))))
4142
4143 (define-public python-scipy
4144 (package
4145 (name "python-scipy")
4146 (version "0.18.1")
4147 (source
4148 (origin
4149 (method url-fetch)
4150 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4151 version ".tar.gz"))
4152 (file-name (string-append name "-" version ".tar.gz"))
4153 (sha256
4154 (base32
4155 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4156 (build-system python-build-system)
4157 (propagated-inputs
4158 `(("python-numpy" ,python-numpy)
4159 ("python-matplotlib" ,python-matplotlib)
4160 ("python-pyparsing" ,python-pyparsing)))
4161 (inputs
4162 `(("lapack" ,lapack)
4163 ("openblas" ,openblas)))
4164 (native-inputs
4165 `(("python-cython" ,python-cython)
4166 ("python-nose" ,python-nose)
4167 ("python-sphinx" ,python-sphinx)
4168 ("python-numpydoc" ,python-numpydoc)
4169 ("gfortran" ,gfortran)
4170 ("perl" ,perl)))
4171 (outputs '("out" "doc"))
4172 (arguments
4173 `(#:phases
4174 (modify-phases %standard-phases
4175 (add-before 'build 'configure-openblas
4176 (lambda* (#:key inputs #:allow-other-keys)
4177 (call-with-output-file "site.cfg"
4178 (lambda (port)
4179 (format port
4180 "[blas]
4181 libraries = openblas
4182 library_dirs = ~a/lib
4183 include_dirs = ~a/include
4184
4185 # backslash-n to make emacs happy
4186 \n[atlas]
4187 library_dirs = ~a/lib
4188 atlas_libs = openblas
4189 "
4190 (assoc-ref inputs "openblas")
4191 (assoc-ref inputs "openblas")
4192 (assoc-ref inputs "openblas"))))
4193 #t))
4194 (add-after 'install 'install-doc
4195 (lambda* (#:key inputs outputs #:allow-other-keys)
4196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4197 (doc (string-append data "/doc/" ,name "-" ,version))
4198 (html (string-append doc "/html"))
4199 (pyver ,(string-append "PYVER=")))
4200 ;; Make installed package available for building the
4201 ;; documentation
4202 (add-installed-pythonpath inputs outputs)
4203 (with-directory-excursion "doc"
4204 ;; Fix generation of images for mathematical expressions.
4205 (substitute* (find-files "source" "conf\\.py")
4206 (("pngmath_use_preview = True")
4207 "pngmath_use_preview = False"))
4208 (mkdir-p html)
4209 (system* "make" "html" pyver)
4210 (with-directory-excursion "build/html"
4211 (for-each (lambda (file)
4212 (let* ((dir (dirname file))
4213 (tgt-dir (string-append html "/" dir)))
4214 (install-file file html)))
4215 (find-files "." ".*")))))
4216 #t))
4217 (add-after 'unpack 'fix-tests
4218 (lambda _
4219 (substitute* "scipy/integrate/tests/test_quadpack.py"
4220 (("libm.so") "libm.so.6"))
4221 #t))
4222 ;; Tests can only be run after the library has been installed and not
4223 ;; within the source directory.
4224 (delete 'check)
4225 (add-after 'install 'check
4226 (lambda* (#:key inputs outputs #:allow-other-keys)
4227 (add-installed-pythonpath inputs outputs)
4228 (with-directory-excursion "/tmp"
4229 (zero? (system* "python" "-c"
4230 "import scipy; scipy.test('full')")))
4231 #t)))))
4232 (home-page "http://www.scipy.org/")
4233 (synopsis "The Scipy library provides efficient numerical routines")
4234 (description "The SciPy library is one of the core packages that make up
4235 the SciPy stack. It provides many user-friendly and efficient numerical
4236 routines such as routines for numerical integration and optimization.")
4237 (properties `((python2-variant . ,(delay python2-scipy))))
4238 (license license:bsd-3)))
4239
4240 (define-public python2-scipy
4241 (package-with-python2
4242 (strip-python2-variant python-scipy)))
4243
4244 (define-public python-sockjs-tornado
4245 (package
4246 (name "python-sockjs-tornado")
4247 (version "1.0.3")
4248 (source
4249 (origin
4250 (method url-fetch)
4251 (uri (pypi-uri "sockjs-tornado" version))
4252 (sha256
4253 (base32
4254 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4255 (build-system python-build-system)
4256 (arguments
4257 `(;; There are no tests, and running the test phase requires missing
4258 ;; dependencies
4259 #:tests? #f))
4260 (propagated-inputs
4261 `(("python-tornado" ,python-tornado)))
4262 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4263 (synopsis
4264 "SockJS python server implementation on top of Tornado framework")
4265 (description
4266 "SockJS-tornado provides the server side counterpart to a SockJS client
4267 library, through the Tornado framework.
4268
4269 SockJS provides a low latency, full duplex, cross-domain communication channel
4270 between a web browser and web server.")
4271 (license license:expat)))
4272
4273 (define-public python2-sockjs-tornado
4274 (package-with-python2 python-sockjs-tornado))
4275
4276 (define-public python-socksipy-branch
4277 (package
4278 (name "python-socksipy-branch")
4279 (version "1.01")
4280 (source
4281 (origin
4282 (method url-fetch)
4283 (uri (pypi-uri "SocksiPy-branch" version))
4284 (sha256
4285 (base32
4286 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4287 (build-system python-build-system)
4288 (arguments
4289 `(#:tests? #f)) ; There are no tests
4290 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4291 (synopsis "Python SOCKS module")
4292 (description
4293 "SocksiPy - A Python SOCKS client module. It provides a
4294 socket-like interface that supports connections to any TCP
4295 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4296 The original version was developed by Dan Haim, this is a
4297 branch created by Mario Vilas to address some open issues,
4298 as the original project seems to have been abandoned circa 2007.")
4299 (license license:bsd-3)))
4300
4301 (define-public python2-socksipy-branch
4302 (package-with-python2 python-socksipy-branch))
4303
4304 (define-public python-sqlalchemy
4305 (package
4306 (name "python-sqlalchemy")
4307 (version "1.0.12")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (string-append "https://pypi.python.org/packages/source/S/"
4312 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4313 (sha256
4314 (base32
4315 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4316 (build-system python-build-system)
4317 (native-inputs
4318 `(("python-cython" ,python-cython) ;for c extensions
4319 ("python-pytest" ,python-pytest)
4320 ("python-mock" ,python-mock))) ;for tests
4321 (arguments
4322 `(#:phases (alist-replace
4323 'check
4324 (lambda _ (zero? (system* "py.test")))
4325 %standard-phases)))
4326 (home-page "http://www.sqlalchemy.org")
4327 (synopsis "Database abstraction library")
4328 (description
4329 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4330 gives application developers the full power and flexibility of SQL. It
4331 provides a full suite of well known enterprise-level persistence patterns,
4332 designed for efficient and high-performing database access, adapted into a
4333 simple and Pythonic domain language.")
4334 (license license:x11)))
4335
4336 (define-public python2-sqlalchemy
4337 (package-with-python2 python-sqlalchemy))
4338
4339 (define-public python-pycodestyle
4340 (package
4341 (name "python-pycodestyle")
4342 (version "2.0.0")
4343 (source
4344 (origin
4345 (method url-fetch)
4346 (uri (pypi-uri "pycodestyle" version))
4347 (sha256
4348 (base32
4349 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4350 (build-system python-build-system)
4351 (home-page "https://pycodestyle.readthedocs.io/")
4352 (synopsis "Python style guide checker")
4353 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4354 Python code against some of the style conventions in
4355 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4356 (license license:expat)))
4357
4358 (define-public python2-pycodestyle
4359 (package-with-python2 python-pycodestyle))
4360
4361 (define-public python-orderedmultidict
4362 (package
4363 (name "python-orderedmultidict")
4364 (version "0.7.11")
4365 (source
4366 (origin
4367 (method url-fetch)
4368 (uri (pypi-uri "orderedmultidict" version))
4369 (sha256
4370 (base32
4371 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4372 (build-system python-build-system)
4373 (arguments
4374 `(#:phases
4375 (modify-phases %standard-phases
4376 (add-after 'unpack 'fix-tests
4377 (lambda _
4378 ;; The package uses nosetest for running the tests.
4379 ;; Adding this initfile allows to run the test suite
4380 ;; without requiring nosetest.
4381 (zero? (system* "touch" "tests/__init__.py")))))))
4382 (propagated-inputs
4383 `(("python-six" ,python-six)))
4384 (native-inputs
4385 `(("python-pycodestyle" ,python-pycodestyle)))
4386 (home-page "https://github.com/gruns/orderedmultidict")
4387 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4388 (description "This package contains a library for ordered multivalue
4389 dictionaries. A multivalue dictionary is a dictionary that can store
4390 multiple values for the same key. An ordered multivalue dictionary is a
4391 multivalue dictionary that retains the order of insertions and deletions.")
4392 (license license:unlicense)))
4393
4394 (define-public python2-orderedmultidict
4395 (package-with-python2 python-orderedmultidict))
4396
4397 (define-public python-furl
4398 (package
4399 (name "python-furl")
4400 (version "0.5.6")
4401 (source
4402 (origin
4403 (method url-fetch)
4404 (uri (pypi-uri "furl" version))
4405 (sha256
4406 (base32
4407 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4408 (build-system python-build-system)
4409 (propagated-inputs
4410 `(("python-six" ,python-six)
4411 ("python-orderedmultidict" ,python-orderedmultidict)))
4412 (native-inputs
4413 `(("python-pycodestyle" ,python-pycodestyle)))
4414 (home-page "https://github.com/gruns/furl")
4415 (synopsis "URL manipulation in Python")
4416 (description "Furl provides an easy-to-use alternative to the
4417 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4418 (license license:unlicense)))
4419
4420 (define-public python2-furl
4421 (package-with-python2 python-furl))
4422
4423 (define-public python-flask-babel
4424 (package
4425 (name "python-flask-babel")
4426 (version "0.11.1")
4427 (source
4428 (origin
4429 (method url-fetch)
4430 (uri (pypi-uri "Flask-Babel" version))
4431 (sha256
4432 (base32
4433 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4434 (build-system python-build-system)
4435 (propagated-inputs
4436 `(("python-flask" ,python-flask)
4437 ("python-babel" ,python-babel)
4438 ("python-jinja2" ,python-jinja2)
4439 ("python-pytz" ,python-pytz)))
4440 (home-page "https://github.com/python-babel/flask-babel")
4441 (synopsis "Add i18n/l10n support to Flask applications")
4442 (description "This package implements internationalization and localization
4443 support for Flask. This is based on the Python babel module as well as pytz -
4444 both of which are installed automatically if you install this library.")
4445 (license license:bsd-3)))
4446
4447 (define-public python2-flask-babel
4448 (package-with-python2 python-flask-babel))
4449
4450 (define-public python-sqlalchemy-utils
4451 (package
4452 (name "python-sqlalchemy-utils")
4453 (version "0.32.13")
4454 (source
4455 (origin
4456 (method url-fetch)
4457 (uri (pypi-uri "SQLAlchemy-Utils" version))
4458 (sha256
4459 (base32
4460 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4461 (build-system python-build-system)
4462 (arguments
4463 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4464 ;; #:phases
4465 ;; (modify-phases %standard-phases
4466 ;; (replace 'check
4467 ;; (lambda _
4468 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4469 (propagated-inputs
4470 `(("python-six" ,python-six)
4471 ("python-sqlalchemy" ,python-sqlalchemy)))
4472 (native-inputs
4473 `(("python-dateutil" ,python-dateutil)
4474 ("python-flexmock" ,python-flexmock)
4475 ("python-psycopg2" ,python-psycopg2)
4476 ("python-pytest" ,python-pytest)
4477 ("python-pytz" ,python-pytz)))
4478 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4479 (synopsis "Various utility functions for SQLAlchemy")
4480 (description
4481 "SQLAlchemy-utils provides various utility functions and custom data types
4482 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4483
4484 You might also want to install the following optional dependencies:
4485 @enumerate
4486 @item @code{python-passlib}
4487 @item @code{python-babel}
4488 @item @code{python-cryptography}
4489 @item @code{python-pytz}
4490 @item @code{python-psycopg2}
4491 @item @code{python-furl}
4492 @item @code{python-flask-babel}
4493 @end enumerate
4494 ")
4495 (license license:bsd-3)))
4496
4497 (define-public python2-sqlalchemy-utils
4498 (package-with-python2 python-sqlalchemy-utils))
4499
4500 (define-public python-alembic
4501 (package
4502 (name "python-alembic")
4503 (version "0.8.10")
4504 (source
4505 (origin
4506 (method url-fetch)
4507 (uri (pypi-uri "alembic" version))
4508 (sha256
4509 (base32
4510 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4511 (build-system python-build-system)
4512 (native-inputs
4513 `(("python-mock" ,python-mock)
4514 ("python-pytest-cov" ,python-pytest-cov)))
4515 (propagated-inputs
4516 `(("python-sqlalchemy" ,python-sqlalchemy)
4517 ("python-mako" ,python-mako)
4518 ("python-editor" ,python-editor)))
4519 (home-page "http://bitbucket.org/zzzeek/alembic")
4520 (synopsis
4521 "Database migration tool for SQLAlchemy")
4522 (description
4523 "Alembic is a lightweight database migration tool for usage with the
4524 SQLAlchemy Database Toolkit for Python.")
4525 (license license:expat)))
4526
4527 (define-public python2-alembic
4528 (package-with-python2 python-alembic))
4529
4530 (define-public python-autopep8
4531 (package
4532 (name "python-autopep8")
4533 (version "1.2.4")
4534 (source
4535 (origin
4536 (method url-fetch)
4537 (uri (pypi-uri "autopep8" version))
4538 (sha256
4539 (base32
4540 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4541 (build-system python-build-system)
4542 (propagated-inputs
4543 `(("python-pep8" ,python-pep8)))
4544 (home-page "https://github.com/hhatto/autopep8")
4545 (synopsis "Format Python code according to the PEP 8 style guide")
4546 (description
4547 "@code{autopep8} automatically formats Python code to conform to
4548 the PEP 8 style guide. It uses the pycodestyle utility to determine
4549 what parts of the code needs to be formatted. @code{autopep8} is
4550 capable of fixing most of the formatting issues that can be reported
4551 by pycodestyle.")
4552 (license (license:non-copyleft
4553 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4554
4555 (define-public python2-autopep8
4556 (package-with-python2 python-autopep8))
4557
4558 (define-public python-distutils-extra
4559 (package
4560 (name "python-distutils-extra")
4561 (version "2.38")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4566 version "/+download/python-distutils-extra-"
4567 version ".tar.gz"))
4568 (sha256
4569 (base32
4570 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4571 (build-system python-build-system)
4572 (home-page "https://launchpad.net/python-distutils-extra/")
4573 (synopsis "Enhancements to Python's distutils")
4574 (description
4575 "The python-distutils-extra module enables you to easily integrate
4576 gettext support, themed icons, and scrollkeeper-based documentation into
4577 Python's distutils.")
4578 (license license:gpl2)))
4579
4580 (define-public python2-distutils-extra
4581 (package-with-python2 python-distutils-extra))
4582
4583 (define-public python2-elib.intl
4584 (package
4585 (name "python2-elib.intl")
4586 (version "0.0.3")
4587 (source
4588 (origin
4589 ;; This project doesn't tag releases or publish tarballs, so we take
4590 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4591 (method git-fetch)
4592 (uri (git-reference
4593 (url "https://github.com/dieterv/elib.intl.git")
4594 (commit "d09997cfef")))
4595 (sha256
4596 (base32
4597 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4598 (build-system python-build-system)
4599 (arguments
4600 ;; incompatible with Python 3 (exception syntax)
4601 `(#:python ,python-2
4602 #:tests? #f))
4603 (home-page "https://github.com/dieterv/elib.intl")
4604 (synopsis "Enhanced internationalization for Python")
4605 (description
4606 "The elib.intl module provides enhanced internationalization (I18N)
4607 services for your Python modules and applications.")
4608 (license license:lgpl3+)))
4609
4610 (define-public python-pillow
4611 (package
4612 (name "python-pillow")
4613 (version "3.3.3")
4614 (source
4615 (origin
4616 (method url-fetch)
4617 (uri (pypi-uri "Pillow" version))
4618 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4619 (sha256
4620 (base32
4621 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4622 (build-system python-build-system)
4623 (native-inputs
4624 `(("python-nose" ,python-nose)))
4625 (inputs
4626 `(("freetype" ,freetype)
4627 ("lcms" ,lcms)
4628 ("zlib" ,zlib)
4629 ("libjpeg" ,libjpeg)
4630 ("openjpeg" ,openjpeg)
4631 ("libtiff" ,libtiff)
4632 ("libwebp" ,libwebp)))
4633 (arguments
4634 `(#:phases (modify-phases %standard-phases
4635 (add-after
4636 'install 'check-installed
4637 (lambda* (#:key outputs inputs #:allow-other-keys)
4638 (begin
4639 (setenv "HOME" (getcwd))
4640 ;; Make installed package available for running the
4641 ;; tests
4642 (add-installed-pythonpath inputs outputs)
4643 (and (zero? (system* "python" "selftest.py"
4644 "--installed"))
4645 (zero? (system* "python" "test-installed.py"))))))
4646 (delete 'check))))
4647 (home-page "https://pypi.python.org/pypi/Pillow")
4648 (synopsis "Fork of the Python Imaging Library")
4649 (description
4650 "The Python Imaging Library adds image processing capabilities to your
4651 Python interpreter. This library provides extensive file format support, an
4652 efficient internal representation, and fairly powerful image processing
4653 capabilities. The core image library is designed for fast access to data
4654 stored in a few basic pixel formats. It should provide a solid foundation for
4655 a general image processing tool.")
4656 (license (license:x11-style
4657 "http://www.pythonware.com/products/pil/license.htm"
4658 "The PIL Software License"))))
4659
4660 (define-public python2-pillow
4661 (package-with-python2 python-pillow))
4662
4663 (define-public python-pycparser
4664 (package
4665 (name "python-pycparser")
4666 (version "2.17")
4667 (source
4668 (origin
4669 (method url-fetch)
4670 (uri (pypi-uri "pycparser" version))
4671 (sha256
4672 (base32
4673 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4674 (outputs '("out" "doc"))
4675 (build-system python-build-system)
4676 (native-inputs
4677 `(("pkg-config" ,pkg-config)))
4678 (arguments
4679 `(#:phases
4680 (modify-phases %standard-phases
4681 (replace 'check
4682 (lambda _
4683 (with-directory-excursion "tests"
4684 (zero? (system* "python" "all_tests.py")))))
4685 (add-after 'install 'install-doc
4686 (lambda* (#:key outputs #:allow-other-keys)
4687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4688 (doc (string-append data "/doc/" ,name "-" ,version))
4689 (examples (string-append doc "/examples")))
4690 (mkdir-p examples)
4691 (for-each (lambda (file)
4692 (copy-file (string-append "." file)
4693 (string-append doc file)))
4694 '("/README.rst" "/CHANGES" "/LICENSE"))
4695 (copy-recursively "examples" examples)))))))
4696 (home-page "https://github.com/eliben/pycparser")
4697 (synopsis "C parser in Python")
4698 (description
4699 "Pycparser is a complete parser of the C language, written in pure Python
4700 using the PLY parsing library. It parses C code into an AST and can serve as
4701 a front-end for C compilers or analysis tools.")
4702 (license license:bsd-3)))
4703
4704 (define-public python2-pycparser
4705 (package-with-python2 python-pycparser))
4706
4707 (define-public python-cffi
4708 (package
4709 (name "python-cffi")
4710 (version "1.4.2")
4711 (source
4712 (origin
4713 (method url-fetch)
4714 (uri (pypi-uri "cffi" version))
4715 (sha256
4716 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4717 (build-system python-build-system)
4718 (outputs '("out" "doc"))
4719 (inputs
4720 `(("libffi" ,libffi)))
4721 (propagated-inputs ; required at run-time
4722 `(("python-pycparser" ,python-pycparser)))
4723 (native-inputs
4724 `(("pkg-config" ,pkg-config)
4725 ("python-sphinx" ,python-sphinx)
4726 ("python-pytest" ,python-pytest)))
4727 (arguments
4728 `(#:phases
4729 (alist-cons-after
4730 'install 'install-doc
4731 (lambda* (#:key outputs #:allow-other-keys)
4732 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4733 (doc (string-append data "/doc/" ,name "-" ,version))
4734 (html (string-append doc "/html")))
4735 (with-directory-excursion "doc"
4736 (system* "make" "html")
4737 (mkdir-p html)
4738 (copy-recursively "build/html" html))
4739 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4740 %standard-phases)))
4741 (home-page "http://cffi.readthedocs.org")
4742 (synopsis "Foreign function interface for Python")
4743 (description
4744 "Foreign Function Interface for Python calling C code.")
4745 (license license:expat)))
4746
4747 (define-public python2-cffi
4748 (package-with-python2 python-cffi))
4749
4750 (define-public python-xcffib
4751 (package
4752 (name "python-xcffib")
4753 (version "0.5.1")
4754 (source
4755 (origin
4756 (method url-fetch)
4757 (uri (pypi-uri "xcffib" version))
4758 (sha256
4759 (base32
4760 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4761 (build-system python-build-system)
4762 (inputs
4763 `(("libxcb" ,libxcb)))
4764 (propagated-inputs
4765 `(("python-cffi" ,python-cffi) ; used at run time
4766 ("python-six" ,python-six)))
4767 (arguments
4768 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4769 #:tests? #f
4770 #:phases
4771 (modify-phases %standard-phases
4772 (add-after 'unpack 'fix-libxcb-path
4773 (lambda* (#:key inputs #:allow-other-keys)
4774 (let ((libxcb (assoc-ref inputs "libxcb")))
4775 (substitute* '("xcffib/__init__.py")
4776 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4777 #t)))
4778 (add-after 'install 'install-doc
4779 (lambda* (#:key outputs #:allow-other-keys)
4780 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4781 "/doc/" ,name "-" ,version)))
4782 (mkdir-p doc)
4783 (copy-file "README.md"
4784 (string-append doc "/README.md"))
4785 #t))))))
4786 (home-page "https://github.com/tych0/xcffib")
4787 (synopsis "XCB Python bindings")
4788 (description
4789 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4790 support for Python 3 and PyPy. It is based on cffi.")
4791 (license license:expat)))
4792
4793 (define-public python2-xcffib
4794 (package-with-python2 python-xcffib))
4795
4796 (define-public python-cairocffi
4797 (package
4798 (name "python-cairocffi")
4799 (version "0.8.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 ;; The archive on pypi is missing the 'utils' directory!
4804 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4805 version ".tar.gz"))
4806 (file-name (string-append name "-" version ".tar.gz"))
4807 (sha256
4808 (base32
4809 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4810 (build-system python-build-system)
4811 (outputs '("out" "doc"))
4812 (inputs
4813 `(("gdk-pixbuf" ,gdk-pixbuf)
4814 ("cairo" ,cairo)))
4815 (native-inputs
4816 `(("pkg-config" ,pkg-config)
4817 ("python-sphinx" ,python-sphinx)
4818 ("python-docutils" ,python-docutils)))
4819 (propagated-inputs
4820 `(("python-xcffib" ,python-xcffib))) ; used at run time
4821 (arguments
4822 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4823 #:tests? #f
4824 #:phases
4825 (modify-phases %standard-phases
4826 (add-after 'install 'install-doc
4827 (lambda* (#:key inputs outputs #:allow-other-keys)
4828 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4829 (doc (string-append data "/doc/" ,name "-" ,version))
4830 (html (string-append doc "/html")))
4831 (setenv "LD_LIBRARY_PATH"
4832 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4833 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4834 (setenv "LANG" "en_US.UTF-8")
4835 (mkdir-p html)
4836 (for-each (lambda (file)
4837 (copy-file (string-append "." file)
4838 (string-append doc file)))
4839 '("/README.rst" "/CHANGES" "/LICENSE"))
4840 (system* "python" "setup.py" "build_sphinx")
4841 (copy-recursively "docs/_build/html" html)
4842 #t))))))
4843 (home-page "https://github.com/Kozea/cairocffi")
4844 (synopsis "Python bindings and object-oriented API for Cairo")
4845 (description
4846 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4847 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4848 graphics library with support for multiple backends including image buffers,
4849 PNG, PostScript, PDF, and SVG file output.")
4850 (license license:bsd-3)))
4851
4852 (define-public python2-cairocffi
4853 (package-with-python2 python-cairocffi))
4854
4855 (define-public python-decorator
4856 (package
4857 (name "python-decorator")
4858 (version "4.0.10")
4859 (source
4860 (origin
4861 (method url-fetch)
4862 (uri (pypi-uri "decorator" version))
4863 (sha256
4864 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4865 (build-system python-build-system)
4866 (arguments '(#:tests? #f)) ; no test target
4867 (home-page "https://pypi.python.org/pypi/decorator/")
4868 (synopsis "Python module to simplify usage of decorators")
4869 (description
4870 "The aim of the decorator module is to simplify the usage of decorators
4871 for the average programmer, and to popularize decorators usage giving examples
4872 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4873 etc. The core of this module is a decorator factory.")
4874 (license license:expat)))
4875
4876 (define-public python2-decorator
4877 (package-with-python2 python-decorator))
4878
4879 (define-public python-drmaa
4880 (package
4881 (name "python-drmaa")
4882 (version "0.7.7")
4883 (source
4884 (origin
4885 (method url-fetch)
4886 (uri (string-append
4887 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4888 version ".tar.gz"))
4889 (sha256
4890 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4891 (build-system python-build-system)
4892 ;; The test suite requires libdrmaa which is provided by the cluster
4893 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4894 ;; should be set to the path of the libdrmaa library.
4895 (arguments '(#:tests? #f))
4896 (native-inputs
4897 `(("python-nose" ,python-nose)))
4898 (home-page "https://pypi.python.org/pypi/drmaa")
4899 (synopsis "Python bindings for the DRMAA library")
4900 (description
4901 "A Python package for Distributed Resource Management (DRM) job
4902 submission and control. This package is an implementation of the DRMAA 1.0
4903 Python language binding specification.")
4904 (license license:bsd-3)))
4905
4906 (define-public python2-drmaa
4907 (package-with-python2 python-drmaa))
4908
4909 (define-public python-gridmap
4910 (package
4911 (name "python-gridmap")
4912 (version "0.13.0")
4913 (source
4914 (origin
4915 (method url-fetch)
4916 (uri (string-append
4917 "https://github.com/pygridtools/gridmap/archive/v"
4918 version ".tar.gz"))
4919 (file-name (string-append name "-" version ".tar.gz"))
4920 (sha256
4921 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4922 (build-system python-build-system)
4923 (arguments
4924 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4925 (propagated-inputs
4926 `(("python-psutil" ,python-psutil)
4927 ("python-drmaa" ,python-drmaa)
4928 ("python-pyzmq" ,python-pyzmq)))
4929 (home-page "https://github.com/pygridtools/gridmap")
4930 (synopsis "Create jobs on a cluster directly from Python")
4931 (description
4932 "Gridmap is a Python package to allow you to easily create jobs on the
4933 cluster directly from Python. You can directly map Python functions onto the
4934 cluster without needing to write any wrapper code yourself.")
4935 (license license:gpl3+)))
4936
4937 (define-public python2-gridmap
4938 (package-with-python2 python-gridmap))
4939
4940 (define-public python-pexpect
4941 (package
4942 (name "python-pexpect")
4943 (version "4.2.1")
4944 (source
4945 (origin
4946 (method url-fetch)
4947 (uri (pypi-uri "pexpect" version))
4948 (sha256
4949 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4950 (build-system python-build-system)
4951 (arguments
4952 `(#:phases
4953 (modify-phases %standard-phases
4954 (add-before 'check 'prepare-tests
4955 (lambda _
4956 (substitute* (find-files "tests")
4957 (("/bin/ls") (which "ls"))
4958 (("/bin/echo") (which "echo"))
4959 (("/bin/which") (which "which"))
4960 ;; Many tests try to use the /bin directory which
4961 ;; is not present in the build environment.
4962 ;; Use one that's non-empty and unlikely to change.
4963 (("/bin'") "/dev'"))
4964 ;; XXX: Socket connection test gets "Connection reset by peer".
4965 ;; Why does it not work? Delete for now.
4966 (delete-file "tests/test_socket.py")
4967 #t))
4968 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4969 (native-inputs
4970 `(("python-nose" ,python-nose)
4971 ("python-pytest" ,python-pytest-3.0)
4972 ("man-db" ,man-db)
4973 ("which" ,which)))
4974 (propagated-inputs
4975 `(("python-ptyprocess" ,python-ptyprocess)))
4976 (home-page "http://pexpect.readthedocs.org/")
4977 (synopsis "Controlling interactive console applications")
4978 (description
4979 "Pexpect is a pure Python module for spawning child applications;
4980 controlling them; and responding to expected patterns in their output.
4981 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4982 child application and control it as if a human were typing commands.")
4983 (license license:isc)))
4984
4985 (define-public python2-pexpect
4986 (package-with-python2 python-pexpect))
4987
4988 (define-public python-setuptools-scm
4989 (package
4990 (name "python-setuptools-scm")
4991 (version "1.15.0")
4992 (source (origin
4993 (method url-fetch)
4994 (uri (pypi-uri "setuptools_scm" version))
4995 (sha256
4996 (base32
4997 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4998 (build-system python-build-system)
4999 (home-page "https://github.com/pypa/setuptools_scm/")
5000 (synopsis "Manage Python package versions in SCM metadata")
5001 (description
5002 "Setuptools_scm handles managing your Python package versions in
5003 @dfn{software configuration management} (SCM) metadata instead of declaring
5004 them as the version argument or in a SCM managed file.")
5005 (license license:expat)))
5006
5007 (define-public python2-setuptools-scm
5008 (package-with-python2 python-setuptools-scm))
5009
5010 (define-public python-pathpy
5011 (package
5012 (name "python-pathpy")
5013 (version "8.1.1")
5014 (source
5015 (origin
5016 (method url-fetch)
5017 (uri (string-append "https://pypi.python.org/packages/source/p/"
5018 "path.py/path.py-" version ".tar.gz"))
5019 (sha256
5020 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5021 (outputs '("out" "doc"))
5022 (build-system python-build-system)
5023 (propagated-inputs
5024 `(("python-appdirs" ,python-appdirs)))
5025 (native-inputs
5026 `(("python-setuptools-scm" ,python-setuptools-scm)
5027 ("python-sphinx" ,python-sphinx)
5028 ("python-rst.linker" ,python-rst.linker)
5029 ("python-pytest" ,python-pytest)
5030 ("python-pytest-runner" ,python-pytest-runner)))
5031 (arguments
5032 `(#:phases
5033 (modify-phases %standard-phases
5034 (add-after 'build 'build-doc
5035 (lambda _
5036 (setenv "LANG" "en_US.UTF-8")
5037 (zero? (system* "python" "setup.py" "build_sphinx"))))
5038 (add-after 'install 'install-doc
5039 (lambda* (#:key outputs #:allow-other-keys)
5040 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5041 (doc (string-append data "/doc/" ,name "-" ,version))
5042 (html (string-append doc "/html")))
5043 (mkdir-p html)
5044 (for-each (lambda (file)
5045 (copy-file file (string-append doc "/" file)))
5046 '("README.rst" "CHANGES.rst"))
5047 (copy-recursively "build/sphinx/html" html)))))))
5048 (home-page "https://github.com/jaraco/path.py")
5049 (synopsis "Python module wrapper for built-in os.path")
5050 (description
5051 "@code{path.py} implements path objects as first-class entities, allowing
5052 common operations on files to be invoked on those path objects directly.")
5053 (license license:expat)))
5054
5055 (define-public python2-pathpy
5056 (package-with-python2 python-pathpy))
5057
5058 (define-public python-pickleshare
5059 (package
5060 (name "python-pickleshare")
5061 (version "0.5")
5062 (source
5063 (origin
5064 (method url-fetch)
5065 (uri (string-append "https://pypi.python.org/packages/source/p/"
5066 "pickleshare/pickleshare-" version ".tar.gz"))
5067 (sha256
5068 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5069 (build-system python-build-system)
5070 (propagated-inputs
5071 `(("python-pathpy" ,python-pathpy)))
5072 (home-page "https://github.com/vivainio/pickleshare")
5073 (synopsis "Tiny key value database with concurrency support")
5074 (description
5075 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5076 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5077 shelve, many processes can access the database simultaneously. Changing a
5078 value in database is immediately visible to other processes accessing the same
5079 database. Concurrency is possible because the values are stored in separate
5080 files. Hence the “database” is a directory where all files are governed by
5081 PickleShare.")
5082 (license license:expat)))
5083
5084 (define-public python2-pickleshare
5085 (package-with-python2 python-pickleshare))
5086
5087 (define-public python-simplegeneric
5088 (package
5089 (name "python-simplegeneric")
5090 (version "0.8.1")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (string-append "https://pypi.python.org/packages/source/s/"
5095 "simplegeneric/simplegeneric-" version ".zip"))
5096 (sha256
5097 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5098 (build-system python-build-system)
5099 (native-inputs
5100 `(("unzip" ,unzip)))
5101 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5102 (synopsis "Python module for simple generic functions")
5103 (description
5104 "The simplegeneric module lets you define simple single-dispatch generic
5105 functions, akin to Python’s built-in generic functions like @code{len()},
5106 @code{iter()} and so on. However, instead of using specially-named methods,
5107 these generic functions use simple lookup tables, akin to those used by
5108 e.g. @code{pickle.dump()} and other generic functions found in the Python
5109 standard library.")
5110 (license license:zpl2.1)))
5111
5112 (define-public python2-simplegeneric
5113 (package-with-python2 python-simplegeneric))
5114
5115 (define-public python-ipython-genutils
5116 ;; TODO: This package is retired, check if can be removed, see description.
5117 (package
5118 (name "python-ipython-genutils")
5119 (version "0.1.0")
5120 (source
5121 (origin
5122 (method url-fetch)
5123 (uri (string-append "https://pypi.python.org/packages/source/i/"
5124 "ipython_genutils/ipython_genutils-"
5125 version ".tar.gz"))
5126 (sha256
5127 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5128 (build-system python-build-system)
5129 (arguments `(#:tests? #f)) ; no tests
5130 (home-page "http://ipython.org")
5131 (synopsis "Vestigial utilities from IPython")
5132 (description
5133 "This package provides retired utilities from IPython. No packages
5134 outside IPython/Jupyter should depend on it.
5135
5136 This package shouldn't exist. It contains some common utilities shared by
5137 Jupyter and IPython projects during The Big Split. As soon as possible, those
5138 packages will remove their dependency on this, and this package will go
5139 away.")
5140 (license license:bsd-3)))
5141
5142 (define-public python2-ipython-genutils
5143 (package-with-python2 python-ipython-genutils))
5144
5145 (define-public python-traitlets
5146 (package
5147 (name "python-traitlets")
5148 (version "4.2.0")
5149 (source
5150 (origin
5151 (method url-fetch)
5152 (uri (pypi-uri "traitlets" version))
5153 (sha256
5154 (base32
5155 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5156 (build-system python-build-system)
5157 (arguments
5158 `(#:phases
5159 (modify-phases %standard-phases
5160 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5161 (propagated-inputs
5162 `(("python-ipython-genutils" ,python-ipython-genutils)
5163 ("python-decorator" ,python-decorator)))
5164 (native-inputs
5165 `(("python-mock" ,python-mock)
5166 ("python-nose" ,python-nose)))
5167 (home-page "http://ipython.org")
5168 (synopsis "Configuration system for Python applications")
5169 (description
5170 "Traitlets is a framework that lets Python classes have attributes with
5171 type checking, dynamically calculated default values, and ‘on change’
5172 callbacks. The package also includes a mechanism to use traitlets for
5173 configuration, loading values from files or from command line arguments. This
5174 is a distinct layer on top of traitlets, so you can use traitlets in your code
5175 without using the configuration machinery.")
5176 (license license:bsd-3)))
5177
5178 (define-public python2-traitlets
5179 (package-with-python2 python-traitlets))
5180
5181 (define-public python-jupyter-core
5182 (package
5183 (name "python-jupyter-core")
5184 (version "4.2.1")
5185 (source
5186 (origin
5187 (method url-fetch)
5188 (uri (string-append (pypi-uri "jupyter_core" version)))
5189 (sha256
5190 (base32
5191 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5192 (build-system python-build-system)
5193 ;; FIXME: not sure how to run the tests
5194 (arguments `(#:tests? #f))
5195 (propagated-inputs
5196 `(("python-traitlets" ,python-traitlets)))
5197 (home-page "http://jupyter.org/")
5198 (synopsis "Jupyter base package")
5199 (description
5200 "Jupyter core is the base package on which Jupyter projects rely.")
5201 (license license:bsd-3)))
5202
5203 (define-public python2-jupyter-core
5204 (package-with-python2 python-jupyter-core))
5205
5206 (define-public python-jupyter-client
5207 (package
5208 (name "python-jupyter-client")
5209 (version "4.4.0")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "jupyter_client" version))
5214 (sha256
5215 (base32
5216 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5217 (build-system python-build-system)
5218 ;; Tests fail because of missing native python kernel which I assume is
5219 ;; provided by the ipython package, which we cannot use because it would
5220 ;; cause a dependency cycle.
5221 (arguments `(#:tests? #f))
5222 (propagated-inputs
5223 `(("python-pyzmq" ,python-pyzmq)
5224 ("python-traitlets" ,python-traitlets)
5225 ("python-jupyter-core" ,python-jupyter-core)))
5226 (home-page "http://jupyter.org/")
5227 (synopsis "Jupyter protocol implementation and client libraries")
5228 (description
5229 "The @code{jupyter_client} package contains the reference implementation
5230 of the Jupyter protocol. It also provides client and kernel management APIs
5231 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5232 installing @code{kernelspec}s for use with Jupyter frontends.")
5233 (license license:bsd-3)))
5234
5235 (define-public python2-jupyter-client
5236 (package-with-python2 python-jupyter-client))
5237
5238 (define-public python-ipykernel
5239 (package
5240 (name "python-ipykernel")
5241 (version "4.5.2")
5242 (source
5243 (origin
5244 (method url-fetch)
5245 (uri (pypi-uri "ipykernel" version))
5246 (sha256
5247 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5248 (build-system python-build-system)
5249 ;; The tests load a submodule of IPython. However, IPython itself depends
5250 ;; on ipykernel.
5251 (arguments `(#:tests? #f))
5252 (propagated-inputs
5253 ;; imported at runtime during connect
5254 `(("python-jupyter-client" ,python-jupyter-client)))
5255 (home-page "http://ipython.org")
5256 (synopsis "IPython Kernel for Jupyter")
5257 (description
5258 "This package provides the IPython kernel for Jupyter.")
5259 (license license:bsd-3)))
5260
5261 (define-public python2-ipykernel
5262 (package-with-python2 python-ipykernel))
5263
5264 (define-public python-testpath
5265 (package
5266 (name "python-testpath")
5267 (version "0.2")
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5272 version ".tar.gz"))
5273 (file-name (string-append name "-" version ".tar.gz"))
5274 (sha256
5275 (base32
5276 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5277 (build-system python-build-system)
5278 (arguments
5279 `(#:tests? #f ; this package does not even have a setup.py
5280 #:modules ((guix build python-build-system)
5281 (guix build utils)
5282 (srfi srfi-1))
5283 #:imported-modules (,@%python-build-system-modules
5284 (srfi srfi-1))
5285 #:phases
5286 (modify-phases %standard-phases
5287 (delete 'install)
5288 (replace 'build
5289 (lambda* (#:key inputs outputs #:allow-other-keys)
5290 (let* ((version (last
5291 (string-split (assoc-ref inputs "python") #\-)))
5292 (x.y (string-join (take (string-split version #\.) 2)
5293 "."))
5294 (dir (string-append
5295 (assoc-ref outputs "out")
5296 "/lib/python" x.y "/site-packages/testpath")))
5297 (mkdir-p dir)
5298 (copy-recursively "testpath" dir))
5299 #t)))))
5300 (home-page "https://github.com/takluyver/testpath")
5301 (synopsis "Test utilities for code working with files and commands")
5302 (description
5303 "Testpath is a collection of utilities for Python code working with files
5304 and commands. It contains functions to check things on the filesystem, and
5305 tools for mocking system commands and recording calls to those.")
5306 (license license:expat)))
5307
5308 (define-public python2-testpath
5309 (package-with-python2 python-testpath))
5310
5311 (define-public python-ipython
5312 (package
5313 (name "python-ipython")
5314 (version "5.2.2")
5315 (source
5316 (origin
5317 (method url-fetch)
5318 (uri (pypi-uri "ipython" version ".tar.gz"))
5319 (sha256
5320 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5321 (build-system python-build-system)
5322 (outputs '("out" "doc"))
5323 (propagated-inputs
5324 `(("python-pyzmq" ,python-pyzmq)
5325 ("python-prompt-toolkit" ,python-prompt-toolkit)
5326 ("python-terminado" ,python-terminado)
5327 ("python-matplotlib" ,python-matplotlib)
5328 ("python-numpy" ,python-numpy)
5329 ("python-numpydoc" ,python-numpydoc)
5330 ("python-jinja2" ,python-jinja2)
5331 ("python-mistune" ,python-mistune)
5332 ("python-pexpect" ,python-pexpect)
5333 ("python-pickleshare" ,python-pickleshare)
5334 ("python-simplegeneric" ,python-simplegeneric)
5335 ("python-jsonschema" ,python-jsonschema)
5336 ("python-traitlets" ,python-traitlets)
5337 ("python-ipykernel" ,python-ipykernel)
5338 ("python-nbformat" ,python-nbformat)
5339 ("python-pygments" ,python-pygments)))
5340 (inputs
5341 `(("readline" ,readline)
5342 ("which" ,which)))
5343 (native-inputs
5344 `(("graphviz" ,graphviz)
5345 ("pkg-config" ,pkg-config)
5346 ("python-requests" ,python-requests) ;; for tests
5347 ("python-testpath" ,python-testpath)
5348 ("python-nose" ,python-nose)
5349 ("python-sphinx" ,python-sphinx)
5350 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5351 ("texlive" ,texlive)
5352 ("texinfo" ,texinfo)))
5353 (arguments
5354 `(#:phases
5355 (modify-phases %standard-phases
5356 (add-after
5357 'install 'install-doc
5358 (lambda* (#:key inputs outputs #:allow-other-keys)
5359 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5360 (doc (string-append data "/doc/" ,name "-" ,version))
5361 (html (string-append doc "/html"))
5362 (man1 (string-append data "/man/man1"))
5363 (info (string-append data "/info"))
5364 (examples (string-append doc "/examples"))
5365 (python-arg (string-append "PYTHON=" (which "python"))))
5366 (setenv "LANG" "en_US.utf8")
5367 ;; Make installed package available for running the tests
5368 (add-installed-pythonpath inputs outputs)
5369 (with-directory-excursion "docs"
5370 ;; FIXME: pdf fails to build
5371 ;;(system* "make" "pdf" "PAPER=a4")
5372 (system* "make" python-arg "html")
5373 (system* "make" python-arg "info"))
5374 (copy-recursively "docs/man" man1)
5375 (copy-recursively "examples" examples)
5376 (copy-recursively "docs/build/html" html)
5377 ;; (copy-file "docs/build/latex/ipython.pdf"
5378 ;; (string-append doc "/ipython.pdf"))
5379 (mkdir-p info)
5380 (copy-file "docs/build/texinfo/ipython.info"
5381 (string-append info "/ipython.info"))
5382 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5383 ;; Tests can only be run after the library has been installed and not
5384 ;; within the source directory.
5385 (delete 'check)
5386 (add-after
5387 'install 'check
5388 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5389 (if tests?
5390 (with-directory-excursion "/tmp"
5391 ;; Make installed package available for running the tests
5392 (add-installed-pythonpath inputs outputs)
5393 (setenv "HOME" "/tmp/") ;; required by a test
5394 (zero? (system* (string-append (assoc-ref outputs "out")
5395 "/bin/iptest"))))
5396 #t)))
5397 (add-before
5398 'install 'fix-tests
5399 (lambda* (#:key inputs #:allow-other-keys)
5400 (substitute* "./IPython/utils/_process_posix.py"
5401 (("/usr/bin/env', 'which") (which "which")))
5402 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5403 (("#!/usr/bin/env python")
5404 (string-append "#!" (which "python"))))
5405 ;; Disable 1 failing test
5406 (substitute* "./IPython/core/tests/test_magic.py"
5407 (("def test_dirops\\(\\):" all)
5408 (string-append "@dec.skipif(True)\n" all))))))))
5409 (home-page "http://ipython.org")
5410 (synopsis "IPython is a tool for interactive computing in Python")
5411 (description
5412 "IPython provides a rich architecture for interactive computing with:
5413 Powerful interactive shells, a browser-based notebook, support for interactive
5414 data visualization, embeddable interpreters and tools for parallel
5415 computing.")
5416 (license license:bsd-3)
5417 (properties `((python2-variant . ,(delay python2-ipython))))))
5418
5419 (define-public python2-ipython
5420 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5421 (package
5422 (inherit ipython)
5423 ;; FIXME: add pyreadline once available.
5424 (propagated-inputs
5425 `(("python2-backports-shutil-get-terminal-size"
5426 ,python2-backports-shutil-get-terminal-size)
5427 ("python2-pathlib2" ,python2-pathlib2)
5428 ,@(package-propagated-inputs ipython)))
5429 (native-inputs
5430 `(("python2-mock" ,python2-mock)
5431 ,@(package-native-inputs ipython))))))
5432
5433 (define-public python-isodate
5434 (package
5435 (name "python-isodate")
5436 (version "0.5.4")
5437 (source
5438 (origin
5439 (method url-fetch)
5440 (uri (pypi-uri "isodate" version))
5441 (sha256
5442 (base32
5443 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5444 (build-system python-build-system)
5445 (home-page
5446 "http://cheeseshop.python.org/pypi/isodate")
5447 (synopsis
5448 "Python date parser and formatter")
5449 (description
5450 "Python-isodate is a python module for parsing and formatting
5451 ISO 8601 dates, time and duration.")
5452 (license license:bsd-3)))
5453
5454 (define-public python2-isodate
5455 (package-with-python2 python-isodate))
5456
5457 (define-public python-html5lib
5458 (package
5459 (name "python-html5lib")
5460 (version "1.0b10")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "html5lib" version))
5465 (sha256
5466 (base32
5467 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5468 (build-system python-build-system)
5469 (propagated-inputs
5470 `(("python-six" ,python-six)
5471 ("python-webencodings" ,python-webencodings)))
5472 (arguments
5473 `(#:test-target "check"))
5474 (home-page
5475 "https://github.com/html5lib/html5lib-python")
5476 (synopsis
5477 "Python HTML parser based on the WHATWG HTML specifcation")
5478 (description
5479 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5480 and written in Python.")
5481 (license license:expat)))
5482
5483 (define-public python2-html5lib
5484 (package-with-python2 python-html5lib))
5485
5486 ;; Needed for python-bleach, a dependency of python-notebook
5487 (define-public python-html5lib-0.9
5488 (package
5489 (inherit python-html5lib)
5490 (version "0.999")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "html5lib" version))
5495 (sha256
5496 (base32
5497 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5498
5499 (define-public python2-html5lib-0.9
5500 (package-with-python2 python-html5lib-0.9))
5501
5502 (define-public python-webencodings
5503 (package
5504 (name "python-webencodings")
5505 (version "0.5")
5506 (source (origin
5507 (method url-fetch)
5508 (uri (pypi-uri "webencodings" version))
5509 (sha256
5510 (base32
5511 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5512 (build-system python-build-system)
5513 (arguments
5514 '(#:phases
5515 (modify-phases %standard-phases
5516 (replace 'check
5517 (lambda _
5518 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5519 (native-inputs
5520 `(("python-pytest" ,python-pytest)))
5521 (home-page "https://github.com/SimonSapin/python-webencodings")
5522 (synopsis "Character encoding aliases for legacy web content")
5523 (description
5524 "In order to be compatible with legacy web content when interpreting
5525 something like @code{Content-Type: text/html; charset=latin1}, tools need
5526 to use a particular set of aliases for encoding labels as well as some
5527 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5528 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5529 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5530 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5531 defines all such details so that implementations do not have to
5532 reverse-engineer each other.
5533
5534 This module implements the Encoding standard and has encoding labels and
5535 BOM detection, but the actual implementation for encoders and decoders
5536 is Python’s.")
5537 (license license:bsd-3)))
5538
5539 (define-public python2-webencodings
5540 (package-with-python2 python-webencodings))
5541
5542 (define-public python-urwid
5543 (package
5544 (name "python-urwid")
5545 (version "1.3.1")
5546 (source
5547 (origin
5548 (method url-fetch)
5549 (uri (pypi-uri "urwid" version))
5550 (sha256
5551 (base32
5552 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5553 (build-system python-build-system)
5554 (arguments
5555 `(#:phases
5556 (modify-phases %standard-phases
5557 ;; Disable failing test. Bug filed upstream:
5558 ;; https://github.com/wardi/urwid/issues/164
5559 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5560 (add-after 'unpack 'disable-failing-test
5561 (lambda _
5562 (substitute* "urwid/tests/test_event_loops.py"
5563 (("test_remove_watch_file")
5564 "disable_remove_watch_file")))))))
5565 (home-page "http://urwid.org")
5566 (synopsis "Console user interface library for Python")
5567 (description
5568 "Urwid is a curses-based UI/widget library for Python. It includes many
5569 features useful for text console applications.")
5570 (license license:lgpl2.1+)))
5571
5572 (define-public python2-urwid
5573 (let ((python2-urwid (package-with-python2 python-urwid)))
5574 (package
5575 (inherit python2-urwid)
5576 (arguments
5577 (append
5578 '(#:phases
5579 (modify-phases %standard-phases
5580 ;; Disable the vterm tests because of non-deterministic failures
5581 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5582 (add-after 'unpack 'delete-test_vterm.py
5583 (delete-file "urwid/tests/test_vterm.py"))))
5584 (package-arguments python-urwid))))))
5585
5586 (define-public python-openid
5587 (package
5588 (name "python-openid")
5589 (version "3.0.10")
5590 (source
5591 (origin
5592 (method url-fetch)
5593 (uri (pypi-uri "python3-openid" version))
5594 (sha256
5595 (base32
5596 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5597 (build-system python-build-system)
5598 (arguments
5599 `(#:phases
5600 (modify-phases %standard-phases
5601 (replace 'check
5602 (lambda _
5603 (zero? (system* "./admin/runtests")))))))
5604 (properties `((python2-variant . ,(delay python2-openid))))
5605 (propagated-inputs
5606 `(("python-defusedxml" ,python-defusedxml)))
5607 (native-inputs
5608 `(("python-psycopg2" ,python-psycopg2)
5609 ("python-django" ,python-django)))
5610 (home-page "https://github.com/necaris/python3-openid")
5611 (synopsis "OpenID support for servers and consumers")
5612 (description "This library provides OpenID authentication for Python, both
5613 for clients and servers.")
5614 (license license:asl2.0)))
5615
5616 (define-public python2-openid
5617 (package
5618 (name "python2-openid")
5619 (version "2.2.5")
5620 (source
5621 (origin
5622 (method url-fetch)
5623 (uri (pypi-uri "python-openid" version))
5624 (sha256
5625 (base32
5626 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5627 (build-system python-build-system)
5628 (arguments
5629 ;; Python 3 support is in `python3-openid`, a separate package.
5630 `(#:python ,python-2))
5631 (home-page "https://github.com/openid/python-openid")
5632 (synopsis "OpenID support for servers and consumers")
5633 (description "This library provides OpenID authentication for Python, both
5634 for clients and servers.")
5635 (license license:asl2.0)))
5636
5637 (define-public python-urwidtrees
5638 (package
5639 (name "python-urwidtrees")
5640 (version "1.0.2")
5641 (source
5642 (origin
5643 (method url-fetch)
5644 ;; package author intends on distributing via github rather than pypi:
5645 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5646 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5647 version ".tar.gz"))
5648 (file-name (string-append name "-" version ".tar.gz"))
5649 (sha256
5650 (base32
5651 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5652 (build-system python-build-system)
5653 (arguments
5654 '(#:tests? #f)) ; no tests
5655 (propagated-inputs `(("python-urwid" ,python-urwid)))
5656 (home-page "https://github.com/pazz/urwidtrees")
5657 (synopsis "Tree widgets for urwid")
5658 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5659 toolkit. Use it to build trees of widgets.")
5660 (license license:gpl3+)))
5661
5662 (define-public python2-urwidtrees
5663 (package-with-python2 python-urwidtrees))
5664
5665 (define-public python-dbus
5666 (package
5667 (name "python-dbus")
5668 (version "1.2.0")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (string-append
5673 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5674 version ".tar.gz"))
5675 (sha256
5676 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5677 (build-system gnu-build-system)
5678 (arguments
5679 '(#:phases
5680 (modify-phases %standard-phases
5681 (add-before
5682 'check 'pre-check
5683 (lambda _
5684 ;; XXX: For the missing '/etc/machine-id'.
5685 (substitute* "test/run-test.sh"
5686 (("DBUS_FATAL_WARNINGS=1")
5687 "DBUS_FATAL_WARNINGS=0"))
5688 #t)))))
5689 (native-inputs
5690 `(("pkg-config" ,pkg-config)))
5691 (inputs
5692 `(("python" ,python)
5693 ("dbus-glib" ,dbus-glib)))
5694 (synopsis "Python bindings for D-bus")
5695 (description "python-dbus provides bindings for libdbus, the reference
5696 implementation of D-Bus.")
5697 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5698 (license license:expat)))
5699
5700 (define-public python2-dbus
5701 (package (inherit python-dbus)
5702 (name "python2-dbus")
5703 (inputs `(("python" ,python-2)
5704 ,@(alist-delete "python"
5705 (package-inputs python-dbus)
5706 equal?)))
5707 ;; FIXME: on Python 2, the test_utf8 fails with:
5708 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5709 (arguments `(#:tests? #f))))
5710
5711 (define-public python-apsw
5712 (package
5713 (name "python-apsw")
5714 (version "3.9.2-r1")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "apsw" version))
5719 (sha256
5720 (base32
5721 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5722 (build-system python-build-system)
5723 (inputs
5724 `(("sqlite" ,sqlite)))
5725 (arguments
5726 `(#:phases
5727 (modify-phases %standard-phases
5728 (delete 'check)
5729 (add-after 'install 'check
5730 (lambda* (#:key inputs outputs #:allow-other-keys)
5731 (add-installed-pythonpath inputs outputs)
5732 (zero? (system* "python" "setup.py" "test")))))))
5733 (home-page "https://github.com/rogerbinns/apsw/")
5734 (synopsis "Another Python SQLite Wrapper")
5735 (description "APSW is a Python wrapper for the SQLite
5736 embedded relational database engine. In contrast to other wrappers such as
5737 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5738 translate the complete SQLite API into Python.")
5739 (license license:zlib)))
5740
5741 (define-public python2-apsw
5742 (package-with-python2 python-apsw))
5743
5744 (define-public python-lxml
5745 (package
5746 (name "python-lxml")
5747 (version "3.6.0")
5748 (source
5749 (origin
5750 (method url-fetch)
5751 (uri (pypi-uri "lxml" version))
5752 (sha256
5753 (base32
5754 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5755 (build-system python-build-system)
5756 (inputs
5757 `(("libxml2" ,libxml2)
5758 ("libxslt" ,libxslt)))
5759 (home-page "http://lxml.de/")
5760 (synopsis
5761 "Python XML processing library")
5762 (description
5763 "The lxml XML toolkit is a Pythonic binding for the C libraries
5764 libxml2 and libxslt.")
5765 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5766
5767 (define-public python2-lxml
5768 (package-with-python2 python-lxml))
5769
5770 ;; beautifulsoup4 has a totally different namespace than 3.x,
5771 ;; and pypi seems to put it under its own name, so I guess we should too
5772 (define-public python-beautifulsoup4
5773 (package
5774 (name "python-beautifulsoup4")
5775 (version "4.5.3")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "beautifulsoup4" version))
5780 (sha256
5781 (base32
5782 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5783 (build-system python-build-system)
5784 (arguments
5785 `(#:phases
5786 (modify-phases %standard-phases
5787 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5788 ;; must use this conversion script when building with Python 3. The
5789 ;; conversion script also runs the tests.
5790 ;; For more information, see the file 'convert-py3k' in the source
5791 ;; distribution.
5792 (replace 'check
5793 (lambda _ (zero? (system* "./convert-py3k")))))))
5794 (home-page
5795 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5796 (synopsis
5797 "Python screen-scraping library")
5798 (description
5799 "Beautiful Soup is a Python library designed for rapidly setting up
5800 screen-scraping projects. It offers Pythonic idioms for navigating,
5801 searching, and modifying a parse tree, providing a toolkit for
5802 dissecting a document and extracting what you need. It automatically
5803 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5804 (license license:expat)
5805 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5806
5807 (define-public python2-beautifulsoup4
5808 (package
5809 (inherit (package-with-python2
5810 (strip-python2-variant python-beautifulsoup4)))
5811 (arguments `(#:python ,python-2))))
5812
5813 (define-public python-cssutils
5814 (package
5815 (name "python-cssutils")
5816 (version "1.0.1")
5817 (source
5818 (origin
5819 (method url-fetch)
5820 (uri (pypi-uri "cssutils" version))
5821 (sha256
5822 (base32
5823 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5824 (build-system python-build-system)
5825 (native-inputs
5826 `(("unzip" ,unzip))) ; for unpacking the source
5827 (arguments
5828 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5829 (home-page "http://cthedot.de/cssutils/")
5830 (synopsis
5831 "CSS Cascading Style Sheets library for Python")
5832 (description
5833 "Cssutils is a Python package for parsing and building CSS
5834 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5835 options.")
5836 (license license:lgpl3+)))
5837
5838 (define-public python2-cssutils
5839 (package-with-python2 python-cssutils))
5840
5841 (define-public python-cssselect
5842 (package
5843 (name "python-cssselect")
5844 (version "0.9.2")
5845 (source
5846 (origin
5847 (method url-fetch)
5848 (uri (pypi-uri "cssselect" version))
5849 (sha256
5850 (base32
5851 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5852 (build-system python-build-system)
5853 (arguments
5854 ;; tests fail with message
5855 ;; AttributeError: 'module' object has no attribute 'tests'
5856 `(#:tests? #f))
5857 (home-page
5858 "https://pythonhosted.org/cssselect/")
5859 (synopsis
5860 "CSS3 selector parser and translator to XPath 1.0")
5861 (description
5862 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5863 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5864 another XPath engine to find the matching elements in an XML or HTML document.")
5865 (license license:bsd-3)))
5866
5867 (define-public python2-cssselect
5868 (package-with-python2 python-cssselect))
5869
5870 (define-public python-openid-cla
5871 (package
5872 (name "python-openid-cla")
5873 (version "1.2")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "python-openid-cla" version))
5878 (sha256
5879 (base32
5880 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5881 (build-system python-build-system)
5882 (arguments '(#:tests? #f)) ; No tests.
5883 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5884 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5885 (description "@code{openid-cla} is an implementation of the OpenID
5886 contributor license agreement extension for python-openid.")
5887 (license license:bsd-3)))
5888
5889 (define-public python2-openid-cla
5890 (package-with-python2 python-openid-cla))
5891
5892 (define-public python-openid-teams
5893 (package
5894 (name "python-openid-teams")
5895 (version "1.1")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "python-openid-teams" version))
5900 (sha256
5901 (base32
5902 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5903 (build-system python-build-system)
5904 (arguments '(#:tests? #f)) ; No tests.
5905 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5906 (synopsis "Implementation of the OpenID teams extension for python-openid")
5907 (description
5908 "@code{openid-teams} is an implementation of the OpenID
5909 teams extension for python-openid.")
5910 (license license:bsd-3)))
5911
5912 (define-public python2-openid-teams
5913 (package-with-python2 python-openid-teams))
5914
5915 (define-public python-netifaces
5916 (package
5917 (name "python-netifaces")
5918 (version "0.10.4")
5919 (source
5920 (origin
5921 (method url-fetch)
5922 (uri (string-append
5923 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5924 version
5925 ".tar.gz"))
5926 (sha256
5927 (base32
5928 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5929 (build-system python-build-system)
5930 (home-page
5931 "https://bitbucket.org/al45tair/netifaces")
5932 (synopsis
5933 "Python module for portable network interface information")
5934 (description
5935 "Netifaces is a Python module providing information on network
5936 interfaces in an easy and portable manner.")
5937 (license license:expat)))
5938
5939 (define-public python2-netifaces
5940 (package-with-python2 python-netifaces))
5941
5942 (define-public python-networkx
5943 (package
5944 (name "python-networkx")
5945 (version "1.11")
5946 (source
5947 (origin
5948 (method url-fetch)
5949 (uri (pypi-uri "networkx" version))
5950 (sha256
5951 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5952 (build-system python-build-system)
5953 ;; python-decorator is needed at runtime
5954 (propagated-inputs
5955 `(("python-decorator" ,python-decorator)))
5956 (native-inputs
5957 `(("python-nose" ,python-nose)))
5958 (home-page "http://networkx.github.io/")
5959 (synopsis "Python module for creating and manipulating graphs and networks")
5960 (description
5961 "NetworkX is a Python package for the creation, manipulation, and study
5962 of the structure, dynamics, and functions of complex networks.")
5963 (license license:bsd-3)))
5964
5965 (define-public python2-networkx
5966 (package-with-python2 python-networkx))
5967
5968 (define-public snakemake
5969 (package
5970 (name "snakemake")
5971 (version "3.11.2")
5972 (source
5973 (origin
5974 (method url-fetch)
5975 (uri (pypi-uri "snakemake" version))
5976 (sha256
5977 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
5978 (build-system python-build-system)
5979 (arguments
5980 ;; TODO: Package missing test dependencies.
5981 '(#:tests? #f))
5982 (propagated-inputs
5983 `(("python-wrapt" ,python-wrapt)
5984 ("python-requests" ,python-requests)))
5985 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5986 (synopsis "Python-based execution environment for make-like workflows")
5987 (description
5988 "Snakemake aims to reduce the complexity of creating workflows by
5989 providing a clean and modern domain specific specification language (DSL) in
5990 Python style, together with a fast and comfortable execution environment.")
5991 (license license:expat)))
5992
5993 (define-public python-seaborn
5994 (package
5995 (name "python-seaborn")
5996 (version "0.7.1")
5997 (source
5998 (origin
5999 (method url-fetch)
6000 (uri (pypi-uri "seaborn" version))
6001 (sha256
6002 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6003 (build-system python-build-system)
6004 (arguments
6005 '(#:tests? #f)) ; Tests requires a running X11 server.
6006 (propagated-inputs
6007 `(("python-pandas" ,python-pandas)
6008 ("python-matplotlib" ,python-matplotlib)
6009 ("python-scipy" ,python-scipy)))
6010 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6011 (synopsis "Statistical data visualization")
6012 (description
6013 "Seaborn is a library for making attractive and informative statistical
6014 graphics in Python. It is built on top of matplotlib and tightly integrated
6015 with the PyData stack, including support for numpy and pandas data structures
6016 and statistical routines from scipy and statsmodels.")
6017 (license license:bsd-3)
6018 (properties `((python2-variant . ,(delay python2-seaborn))))))
6019
6020 (define-public python2-seaborn
6021 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6022 (package
6023 (inherit base)
6024 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6025 ,@(package-propagated-inputs base))))))
6026
6027 (define-public python-mpmath
6028 (package
6029 (name "python-mpmath")
6030 (version "0.19")
6031 (source (origin
6032 (method url-fetch)
6033 (uri (string-append "http://mpmath.org/files/mpmath-"
6034 version ".tar.gz"))
6035 (sha256
6036 (base32
6037 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6038 (build-system python-build-system)
6039 (arguments
6040 '(#:phases
6041 (modify-phases %standard-phases
6042 (replace 'check
6043 (lambda _
6044 (zero?
6045 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6046 (home-page "http://mpmath.org")
6047 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6048 (description
6049 "@code{mpmath} can be used as an arbitrary-precision substitute for
6050 Python's float/complex types and math/cmath modules, but also does much
6051 more advanced mathematics.")
6052 (license license:bsd-3)))
6053
6054 (define-public python2-mpmath
6055 (package-with-python2 python-mpmath))
6056
6057 (define-public python-sympy
6058 (package
6059 (name "python-sympy")
6060 (version "1.0")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (string-append
6065 "https://github.com/sympy/sympy/releases/download/sympy-"
6066 version "/sympy-" version ".tar.gz"))
6067 (sha256
6068 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6069 (build-system python-build-system)
6070 (propagated-inputs
6071 `(("python-mpmath" ,python-mpmath)))
6072 (home-page "http://www.sympy.org/")
6073 (synopsis "Python library for symbolic mathematics")
6074 (description
6075 "SymPy is a Python library for symbolic mathematics. It aims to become a
6076 full-featured computer algebra system (CAS) while keeping the code as simple
6077 as possible in order to be comprehensible and easily extensible.")
6078 (license license:bsd-3)))
6079
6080 (define-public python2-sympy
6081 (package-with-python2 python-sympy))
6082
6083 (define-public python-q
6084 (package
6085 (name "python-q")
6086 (version "2.6")
6087 (source
6088 (origin
6089 (method url-fetch)
6090 (uri (pypi-uri "q" version))
6091 (sha256
6092 (base32
6093 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6094 (build-system python-build-system)
6095 (home-page "https://github.com/zestyping/q")
6096 (synopsis "Quick-and-dirty debugging output for tired programmers")
6097 (description
6098 "q is a Python module for \"print\" style of debugging Python code. It
6099 provides convenient short API for print out of values, tracebacks, and
6100 falling into the Python interpreter.")
6101 (license license:asl2.0)))
6102
6103 (define-public python2-q
6104 (package-with-python2 python-q))
6105
6106 (define-public python-testlib
6107 (package
6108 (name "python-testlib")
6109 (version "0.6.5")
6110 (source
6111 (origin
6112 (method url-fetch)
6113 (uri (string-append
6114 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6115 version ".zip"))
6116 (sha256
6117 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6118 (build-system python-build-system)
6119 (native-inputs
6120 `(("unzip" ,unzip))) ; for unpacking the source
6121 (synopsis "Python micro test suite harness")
6122 (description "A micro unittest suite harness for Python.")
6123 (home-page "https://github.com/trentm/testlib")
6124 (license license:expat)))
6125
6126 (define-public python2-testlib
6127 (package-with-python2 python-testlib))
6128
6129 (define-public python2-xlib
6130 (package
6131 (name "python2-xlib")
6132 (version "0.14")
6133 (source (origin
6134 (method url-fetch)
6135 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6136 "/" version "/"
6137 "python-xlib-" version ".tar.gz"))
6138 (sha256
6139 (base32
6140 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6141 (build-system python-build-system)
6142 (arguments
6143 `(#:python ,python-2 ;Python 2 only
6144 #:tests? #f)) ;no tests
6145 (home-page "http://python-xlib.sourceforge.net/")
6146 (synopsis "Python X11 client library")
6147 (description
6148 "The Python X Library is intended to be a fully functional X client
6149 library for Python programs. It is useful to implement low-level X clients.
6150 It is written entirely in Python.")
6151 (license license:gpl2+)))
6152
6153 (define-public python-singledispatch
6154 (package
6155 (name "python-singledispatch")
6156 (version "3.4.0.3")
6157 (source
6158 (origin
6159 (method url-fetch)
6160 (uri (pypi-uri "singledispatch" version))
6161 (sha256
6162 (base32
6163 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6164 (build-system python-build-system)
6165 (native-inputs
6166 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6167 (home-page
6168 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6169 (synopsis "Backport of singledispatch feature from Python 3.4")
6170 (description
6171 "This library brings functools.singledispatch from Python 3.4 to Python
6172 2.6-3.3.")
6173 (license license:expat)))
6174
6175 (define-public python2-singledispatch
6176 (package-with-python2 python-singledispatch))
6177
6178 (define-public python-tornado
6179 (package
6180 (name "python-tornado")
6181 (version "4.5.1")
6182 (source
6183 (origin
6184 (method url-fetch)
6185 (uri (pypi-uri "tornado" version))
6186 (sha256
6187 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6188 (build-system python-build-system)
6189 (arguments
6190 '(;; FIXME: Two tests error out with:
6191 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6192 ;; #:phases
6193 ;; (modify-phases %standard-phases
6194 ;; (replace 'check
6195 ;; (lambda _
6196 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6197 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6198 ;; (zero? (system* "python" "-m" "tornado.test")))))
6199 #:tests? #f))
6200 (native-inputs
6201 `(("python-certifi" ,python-certifi)))
6202 (propagated-inputs
6203 `(("python-backports-abc" ,python-backports-abc)))
6204 (home-page "http://www.tornadoweb.org/")
6205 (synopsis "Python web framework and asynchronous networking library")
6206 (description
6207 "Tornado is a Python web framework and asynchronous networking library,
6208 originally developed at FriendFeed. By using non-blocking network I/O,
6209 Tornado can scale to tens of thousands of open connections, making it ideal
6210 for long polling, WebSockets, and other applications that require a long-lived
6211 connection to each user.")
6212 (license license:asl2.0)
6213 (properties `((python2-variant . ,(delay python2-tornado))))))
6214
6215 (define-public python2-tornado
6216 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6217 (package (inherit tornado)
6218 (propagated-inputs
6219 `(("python2-backport-ssl-match-hostname"
6220 ,python2-backport-ssl-match-hostname)
6221 ("python2-singledispatch" ,python2-singledispatch)
6222 ,@(package-propagated-inputs tornado))))))
6223
6224 ;; the python- version can be removed with python-3.5
6225 (define-public python-backports-abc
6226 (package
6227 (name "python-backports-abc")
6228 (version "0.5")
6229 (source
6230 (origin
6231 (method url-fetch)
6232 (uri (pypi-uri "backports_abc" version))
6233 (sha256
6234 (base32
6235 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6236 (build-system python-build-system)
6237 (home-page "https://github.com/cython/backports_abc")
6238 (synopsis "Backport of additions to the 'collections.abc' module")
6239 (description
6240 "Python-backports-abc provides a backport of additions to the
6241 'collections.abc' module in Python-3.5.")
6242 (license license:psfl)))
6243
6244 (define-public python2-backports-abc
6245 (package-with-python2 python-backports-abc))
6246
6247 (define-public python2-backports-shutil-get-terminal-size
6248 (package
6249 (name "python2-backports-shutil-get-terminal-size")
6250 (version "1.0.0")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6255 (sha256
6256 (base32
6257 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6258 (build-system python-build-system)
6259 (arguments
6260 `(#:python ,python-2
6261 #:phases
6262 (modify-phases %standard-phases
6263 (replace 'check
6264 (lambda _
6265 (zero? (system* "py.test" "-v")))))))
6266 (native-inputs
6267 `(("python2-pytest" ,python2-pytest)))
6268 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6269 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6270 (description
6271 "This package provides a backport of the @code{get_terminal_size
6272 function} from Python 3.3's @code{shutil}.
6273 Unlike the original version it is written in pure Python rather than C,
6274 so it might be a tiny bit slower.")
6275 (license license:expat)))
6276
6277 (define-public python-waf
6278 (package
6279 (name "python-waf")
6280 (version "1.9.8")
6281 (source (origin
6282 (method url-fetch)
6283 (uri (string-append "https://waf.io/"
6284 "waf-" version ".tar.bz2"))
6285 (sha256
6286 (base32
6287 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6288 (build-system python-build-system)
6289 (arguments
6290 '(#:phases
6291 (modify-phases %standard-phases
6292 (replace 'build
6293 (lambda _
6294 (zero? (system* "python" "waf-light" "configure" "build"))))
6295 (replace 'check
6296 (lambda _
6297 (zero? (system* "python" "waf" "--version"))))
6298 (replace 'install
6299 (lambda _
6300 (copy-file "waf" %output))))))
6301 (home-page "https://waf.io/")
6302 (synopsis "Python-based build system")
6303 (description
6304 "Waf is a Python-based framework for configuring, compiling and installing
6305 applications.")
6306 (license license:bsd-3)))
6307
6308 (define-public python2-waf
6309 (package-with-python2 python-waf))
6310
6311 (define-public python-pyzmq
6312 (package
6313 (name "python-pyzmq")
6314 (version "15.1.0")
6315 (source
6316 (origin
6317 (method url-fetch)
6318 (uri (pypi-uri "pyzmq" version))
6319 (sha256
6320 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6321 (build-system python-build-system)
6322 (arguments
6323 `(#:configure-flags
6324 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6325 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6326 ;; --inplace' for 'python setup.py test' to work.
6327 #:tests? #f))
6328 (inputs
6329 `(("zeromq" ,zeromq)))
6330 (native-inputs
6331 `(("pkg-config" ,pkg-config)
6332 ("python-nose" ,python-nose)))
6333 (home-page "https://github.com/zeromq/pyzmq")
6334 (synopsis "Python bindings for 0MQ")
6335 (description
6336 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6337 (license license:bsd-4)))
6338
6339 (define-public python2-pyzmq
6340 (package-with-python2 python-pyzmq))
6341
6342 (define-public python-pep8
6343 (package
6344 (name "python-pep8")
6345 (version "1.7.0")
6346 (source
6347 (origin
6348 (method url-fetch)
6349 (uri (pypi-uri "pep8" version))
6350 (sha256
6351 (base32
6352 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6353 (build-system python-build-system)
6354 (home-page "http://pep8.readthedocs.org/")
6355 (synopsis "Python style guide checker")
6356 (description
6357 "This tools checks Python code against some of the style conventions in
6358 PEP 8.")
6359 (license license:expat)))
6360
6361 (define-public python2-pep8
6362 (package-with-python2 python-pep8))
6363
6364 (define-public python-pyflakes
6365 (package
6366 (name "python-pyflakes")
6367 (version "1.0.0")
6368 (source
6369 (origin
6370 (method url-fetch)
6371 (uri (pypi-uri "pyflakes" version))
6372 (sha256
6373 (base32
6374 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6375 (build-system python-build-system)
6376 (home-page
6377 "https://github.com/pyflakes/pyflakes")
6378 (synopsis "Passive checker of Python programs")
6379 (description
6380 "Pyflakes statically checks Python source code for common errors.")
6381 (license license:expat)))
6382
6383 (define-public python2-pyflakes
6384 (package-with-python2 python-pyflakes))
6385
6386 (define-public python-mccabe
6387 (package
6388 (name "python-mccabe")
6389 (version "0.4.0")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (pypi-uri "mccabe" version))
6394 (sha256
6395 (base32
6396 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6397 (build-system python-build-system)
6398 (native-inputs
6399 `(("python-pytest" ,python-pytest)
6400 ("python-pytest-runner" ,python-pytest-runner)))
6401 (home-page "https://github.com/flintwork/mccabe")
6402 (synopsis "McCabe checker, plugin for flake8")
6403 (description
6404 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6405 complexity of Python source code.")
6406 (license license:expat)))
6407
6408 (define-public python2-mccabe
6409 (package-with-python2 python-mccabe))
6410
6411 (define-public python-mccabe-0.2.1
6412 (package (inherit python-mccabe)
6413 (version "0.2.1")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "mccabe" version))
6418 (sha256
6419 (base32
6420 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6421
6422 (define-public python2-mccabe-0.2.1
6423 (package-with-python2 python-mccabe-0.2.1))
6424
6425 ;; Flake8 2.4.1 requires an older version of pep8.
6426 ;; This should be removed ASAP.
6427 (define-public python-pep8-1.5.7
6428 (package (inherit python-pep8)
6429 (version "1.5.7")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (string-append
6434 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6435 version
6436 ".tar.gz"))
6437 (sha256
6438 (base32
6439 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6440 (arguments
6441 ;; XXX Tests not compatible with Python 3.5.
6442 '(#:tests? #f))))
6443
6444 (define-public python2-pep8-1.5.7
6445 (package-with-python2 python-pep8-1.5.7))
6446
6447 ;; Flake8 2.4.1 requires an older version of pyflakes.
6448 ;; This should be removed ASAP.
6449 (define-public python-pyflakes-0.8.1
6450 (package (inherit python-pyflakes)
6451 (version "0.8.1")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (string-append
6456 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6457 version
6458 ".tar.gz"))
6459 (sha256
6460 (base32
6461 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6462 (arguments
6463 ;; XXX Tests not compatible with Python 3.5.
6464 '(#:tests? #f))))
6465
6466 (define-public python2-pyflakes-0.8.1
6467 (package-with-python2 python-pyflakes-0.8.1))
6468
6469 (define-public python-flake8
6470 (package
6471 (name "python-flake8")
6472 (version "2.5.4")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "flake8" version))
6477 (sha256
6478 (base32
6479 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6480 (modules '((guix build utils)))
6481 (snippet
6482 '(begin
6483 ;; Remove pre-compiled .pyc files from source.
6484 (for-each delete-file-recursively
6485 (find-files "." "__pycache__" #:directories? #t))
6486 (for-each delete-file (find-files "." "\\.pyc$"))
6487 #t))))
6488 (build-system python-build-system)
6489 (propagated-inputs
6490 `(("python-pep8" ,python-pep8)
6491 ("python-pyflakes" ,python-pyflakes)
6492 ("python-mccabe" ,python-mccabe)))
6493 (native-inputs
6494 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6495 ("python-nose" ,python-nose)))
6496 (home-page "https://gitlab.com/pycqa/flake8")
6497 (synopsis
6498 "The modular source code checker: pep8, pyflakes and co")
6499 (description
6500 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6501 (license license:expat)))
6502
6503 (define-public python2-flake8
6504 (package-with-python2 python-flake8))
6505
6506 ;; This will only be needed by the python-hacking package and will not be
6507 ;; necessary once python-hacking > 0.10.2 is released.
6508 (define-public python-flake8-2.2.4
6509 (package (inherit python-flake8)
6510 (propagated-inputs
6511 `(("python-pep8" ,python-pep8-1.5.7)
6512 ("python-pyflakes" ,python-pyflakes-0.8.1)
6513 ("python-mccabe" ,python-mccabe-0.2.1)))
6514 (native-inputs
6515 `(("python-mock" ,python-mock)
6516 ("python-nose" ,python-nose)))
6517 (version "2.2.4")
6518 (source
6519 (origin
6520 (method url-fetch)
6521 (uri (pypi-uri "flake8" version))
6522 (sha256
6523 (base32
6524 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6525 (modules '((guix build utils)))
6526 (snippet
6527 '(begin
6528 ;; Remove pre-compiled .pyc files from source.
6529 (for-each delete-file-recursively
6530 (find-files "." "__pycache__" #:directories? #t))
6531 (for-each delete-file (find-files "." "\\.pyc$"))
6532 #t))))
6533 (arguments
6534 ;; XXX Fails with Python 3.5.
6535 '(#:tests? #f))))
6536
6537 (define-public python2-flake8-2.2.4
6538 (package-with-python2 python-flake8-2.2.4))
6539
6540 (define-public python-flake8-polyfill
6541 (package
6542 (name "python-flake8-polyfill")
6543 (version "1.0.1")
6544 (source
6545 (origin
6546 (method url-fetch)
6547 (uri (pypi-uri "flake8-polyfill" version))
6548 (sha256
6549 (base32
6550 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6551 (build-system python-build-system)
6552 (arguments
6553 '(#:phases
6554 (modify-phases %standard-phases
6555 (replace 'check
6556 (lambda _
6557 (setenv "PYTHONPATH"
6558 (string-append (getcwd) "/build/lib:"
6559 (getenv "PYTHONPATH")))
6560 (zero? (system* "py.test" "-v")))))))
6561 (native-inputs
6562 `(("python-flake8" ,python-flake8)
6563 ("python-mock" ,python-mock)
6564 ("python-pycodestyle" ,python-pycodestyle)
6565 ("python-pytest" ,python-pytest)))
6566 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6567 (synopsis "Polyfill package for Flake8 plugins")
6568 (description
6569 "This package that provides some compatibility helpers for Flake8
6570 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6571 (license license:expat)))
6572
6573 (define-public python2-flake8-polyfill
6574 (package-with-python2 python-flake8-polyfill))
6575
6576 (define-public python-mistune
6577 (package
6578 (name "python-mistune")
6579 (version "0.7.3")
6580 (source
6581 (origin
6582 (method url-fetch)
6583 (uri (pypi-uri "mistune" version))
6584 (sha256
6585 (base32
6586 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6587 (build-system python-build-system)
6588 (native-inputs
6589 `(("python-nose" ,python-nose)
6590 ("python-cython" ,python-cython)))
6591 (home-page "https://github.com/lepture/mistune")
6592 (synopsis "Markdown parser in pure Python")
6593 (description "This package provides a fast markdown parser in pure
6594 Python.")
6595 (license license:bsd-3)))
6596
6597 (define-public python2-mistune
6598 (package-with-python2 python-mistune))
6599
6600 (define-public python-markdown
6601 (package
6602 (name "python-markdown")
6603 (version "2.6.8")
6604 (source
6605 (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "Markdown" version))
6608 (sha256
6609 (base32
6610 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6611 (build-system python-build-system)
6612 (arguments
6613 `(#:phases
6614 (modify-phases %standard-phases
6615 (replace 'check
6616 (lambda _
6617 (zero? (system* "python" "run-tests.py")))))))
6618 (native-inputs
6619 `(("python-nose" ,python-nose)
6620 ("python-pyyaml" ,python-pyyaml)))
6621 (home-page "https://pythonhosted.org/Markdown/")
6622 (synopsis "Python implementation of Markdown")
6623 (description
6624 "This package provides a Python implementation of John Gruber's
6625 Markdown. The library features international input, various Markdown
6626 extensions, and several HTML output formats. A command line wrapper
6627 markdown_py is also provided to convert Markdown files to HTML.")
6628 (license license:bsd-3)))
6629
6630 (define-public python2-markdown
6631 (package-with-python2 python-markdown))
6632
6633 (define-public python-ptyprocess
6634 (package
6635 (name "python-ptyprocess")
6636 (version "0.5.1")
6637 (source
6638 (origin
6639 (method url-fetch)
6640 (uri (string-append
6641 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6642 version ".tar.gz"))
6643 (sha256
6644 (base32
6645 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6646 (build-system python-build-system)
6647 (native-inputs
6648 `(("python-nose" ,python-nose)))
6649 (arguments
6650 `(#:phases
6651 (modify-phases %standard-phases
6652 (replace 'check
6653 (lambda _
6654 (zero? (system* "nosetests")))))))
6655 (home-page "https://github.com/pexpect/ptyprocess")
6656 (synopsis "Run a subprocess in a pseudo terminal")
6657 (description
6658 "This package provides a Python library used to launch a subprocess in a
6659 pseudo terminal (pty), and interact with both the process and its pty.")
6660 (license license:isc)))
6661
6662 (define-public python2-ptyprocess
6663 (package-with-python2 python-ptyprocess))
6664
6665 (define-public python-cram
6666 (package
6667 (name "python-cram")
6668 (version "0.7")
6669 (home-page "https://bitheap.org/cram/")
6670 (source (origin
6671 (method url-fetch)
6672 (uri (list (string-append home-page "cram-"
6673 version ".tar.gz")
6674 (pypi-uri "cram" version)))
6675 (sha256
6676 (base32
6677 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6678 (arguments
6679 '(#:phases
6680 (modify-phases %standard-phases
6681 (add-after 'unpack 'patch-source
6682 (lambda _
6683 (substitute* (find-files "cram" ".*\\.py$")
6684 ;; Replace default shell path.
6685 (("/bin/sh") (which "sh")))
6686 (substitute* (find-files "tests" ".*\\.t$")
6687 (("md5") "md5sum")
6688 (("/bin/bash") (which "bash"))
6689 (("/bin/sh") (which "sh")))
6690 (substitute* "cram/_test.py"
6691 ;; This hack works around a bug triggered by substituting
6692 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6693 ;; "cram -h", which breaks the output at 80 characters. This
6694 ;; causes the line showing the default shell to break into two
6695 ;; lines, but the test expects a single line...
6696 (("env\\['COLUMNS'\\] = '80'")
6697 "env['COLUMNS'] = '160'"))
6698 #t))
6699 (delete 'check)
6700 (add-after 'install 'check
6701 ;; The test phase uses the built library and executable.
6702 ;; It's easier to run it after install since the build
6703 ;; directory contains version-specific PATH.
6704 (lambda* (#:key inputs outputs #:allow-other-keys)
6705 (add-installed-pythonpath inputs outputs)
6706 (setenv "PATH" (string-append (getenv "PATH") ":"
6707 (assoc-ref outputs "out") "/bin"))
6708 (zero? (system* "make" "test")))))))
6709 (build-system python-build-system)
6710 (native-inputs
6711 `(("python-coverage" ,python-coverage)
6712 ("which" ,which)))
6713 (synopsis "Simple testing framework for command line applications")
6714 (description
6715 "Cram is a functional testing framework for command line applications.
6716 Cram tests look like snippets of interactive shell sessions. Cram runs each
6717 command and compares the command output in the test with the command’s actual
6718 output.")
6719 (license license:gpl2+)))
6720
6721 (define-public python2-cram
6722 (package-with-python2 python-cram))
6723
6724 (define-public python-terminado
6725 (package
6726 (name "python-terminado")
6727 (version "0.6")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (pypi-uri "terminado" version))
6732 (sha256
6733 (base32
6734 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6735 (build-system python-build-system)
6736 (propagated-inputs
6737 `(("python-tornado" ,python-tornado)
6738 ("python-ptyprocess" ,python-ptyprocess)))
6739 (native-inputs
6740 `(("python-nose" ,python-nose)))
6741 (arguments
6742 `(#:phases
6743 (modify-phases %standard-phases
6744 (replace 'check
6745 (lambda _
6746 (zero? (system* "nosetests")))))))
6747 (home-page "https://github.com/takluyver/terminado")
6748 (synopsis "Terminals served to term.js using Tornado websockets")
6749 (description "This package provides a Tornado websocket backend for the
6750 term.js Javascript terminal emulator library.")
6751 (license license:bsd-2)
6752 (properties `((python2-variant . ,(delay python2-terminado))))))
6753
6754 (define-public python2-terminado
6755 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6756 (package (inherit terminado)
6757 (propagated-inputs
6758 `(("python2-backport-ssl-match-hostname"
6759 ,python2-backport-ssl-match-hostname)
6760 ,@(package-propagated-inputs terminado))))))
6761
6762 (define-public python-straight-plugin
6763 (package
6764 (name "python-straight-plugin")
6765 (version "1.4.1")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "straight.plugin" version))
6770 (sha256
6771 (base32
6772 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6773 (build-system python-build-system)
6774 (home-page "https://github.com/ironfroggy/straight.plugin")
6775 (synopsis "Simple namespaced plugin facility")
6776 (description "Straight Plugin provides a type of plugin you can create from
6777 almost any existing Python modules, and an easy way for outside developers to
6778 add functionality and customization to your projects with their own plugins.")
6779 (license license:expat)))
6780
6781 (define-public python2-straight-plugin
6782 (package-with-python2 python-straight-plugin))
6783
6784 (define-public python-fonttools
6785 (package
6786 (name "python-fonttools")
6787 (version "2.5")
6788 (source (origin
6789 (method url-fetch)
6790 (uri (string-append
6791 "https://pypi.python.org/packages/source/F/FontTools/"
6792 "fonttools-" version ".tar.gz"))
6793 (sha256
6794 (base32
6795 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6796 (build-system python-build-system)
6797 (arguments
6798 '(#:test-target "check"
6799 #:phases
6800 (modify-phases %standard-phases
6801 (add-after 'unpack 'patch-setuppy
6802 ;; Remove the undocumented "extra_path" argument, which adds an
6803 ;; intervening directories between site-packages and the package
6804 ;; directory.
6805 (lambda _
6806 (substitute* "setup.py"
6807 (("^[ \t]*extra_path *= *'FontTools',") ""))
6808 #t)))))
6809 (home-page "https://github.com/behdad/fonttools")
6810 (synopsis "Tools to manipulate font files")
6811 (description
6812 "FontTools/TTX is a library to manipulate font files from Python. It
6813 supports reading and writing of TrueType/OpenType fonts, reading and writing
6814 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6815 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6816 from an XML-based format.")
6817 (license (license:non-copyleft
6818 "file://LICENSE.txt"
6819 "See LICENSE.txt in the distribution."))))
6820
6821 (define-public python2-fonttools
6822 (package-with-python2 python-fonttools))
6823
6824 (define-public python-ly
6825 (package
6826 (name "python-ly")
6827 (version "0.9.4")
6828 (source
6829 (origin
6830 (method url-fetch)
6831 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6832 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6833 "/python-ly-" version ".tar.gz"))
6834 (sha256
6835 (base32
6836 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6837 (build-system python-build-system)
6838 (arguments
6839 ;; FIXME: Some tests need network access.
6840 '(#:tests? #f))
6841 (synopsis "Tool and library for manipulating LilyPond files")
6842 (description "This package provides a Python library to parse, manipulate
6843 or create documents in LilyPond format. A command line program ly is also
6844 provided that can be used to do various manipulations with LilyPond files.")
6845 (home-page "https://pypi.python.org/pypi/python-ly")
6846 (license license:gpl2+)))
6847
6848 (define-public python-appdirs
6849 (package
6850 (name "python-appdirs")
6851 (version "1.4.3")
6852 (source
6853 (origin
6854 (method url-fetch)
6855 (uri (pypi-uri "appdirs" version))
6856 (sha256
6857 (base32
6858 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6859 (build-system python-build-system)
6860 (home-page "https://github.com/ActiveState/appdirs")
6861 (synopsis
6862 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6863 (description
6864 "This module provides a portable way of finding out where user data
6865 should be stored on various operating systems.")
6866 (license license:expat)))
6867
6868 (define-public python2-appdirs
6869 (package-with-python2 python-appdirs))
6870
6871 (define-public python-llfuse
6872 (package
6873 (name "python-llfuse")
6874 (version "1.2")
6875 (source (origin
6876 (method url-fetch)
6877 (uri (string-append
6878 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6879 "llfuse-" version ".tar.bz2"))
6880 (sha256
6881 (base32
6882 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
6883 (build-system python-build-system)
6884 (inputs
6885 `(("fuse" ,fuse)
6886 ("attr" ,attr)))
6887 (native-inputs
6888 `(("pkg-config" ,pkg-config)))
6889 (synopsis "Python bindings for FUSE")
6890 (description
6891 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6892 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6893 (license license:lgpl2.0+)
6894 (properties `((python2-variant . ,(delay python2-llfuse))))))
6895
6896 (define-public python2-llfuse
6897 (package (inherit (package-with-python2
6898 (strip-python2-variant python-llfuse)))
6899 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6900
6901 ;; For attic-0.16
6902 (define-public python-llfuse-0.41
6903 (package (inherit python-llfuse)
6904 (version "0.41.1")
6905 (source (origin
6906 (method url-fetch)
6907 (uri (string-append
6908 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6909 "llfuse-" version ".tar.bz2"))
6910 (sha256
6911 (base32
6912 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6913 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6914 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6915 (license (list license:expat license:lgpl2.0+))))
6916
6917 (define-public python-msgpack
6918 (package
6919 (name "python-msgpack")
6920 (version "0.4.8")
6921 (source (origin
6922 (method url-fetch)
6923 (uri (pypi-uri "msgpack-python" version))
6924 (sha256
6925 (base32
6926 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6927 (build-system python-build-system)
6928 (synopsis "MessagePack (de)serializer")
6929 (description "MessagePack is a fast, compact binary serialization format,
6930 suitable for similar data to JSON. This package provides CPython bindings for
6931 reading and writing MessagePack data.")
6932 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6933 (license license:asl2.0)))
6934
6935 (define-public python2-msgpack
6936 (package-with-python2 python-msgpack))
6937
6938 (define-public python-netaddr
6939 (package
6940 (name "python-netaddr")
6941 (version "0.7.18")
6942 (source
6943 (origin
6944 (method url-fetch)
6945 (uri (string-append
6946 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6947 version
6948 ".tar.gz"))
6949 (sha256
6950 (base32
6951 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6952 (build-system python-build-system)
6953 (arguments `(#:tests? #f)) ;; No tests.
6954 (home-page "https://github.com/drkjam/netaddr/")
6955 (synopsis "Pythonic manipulation of network addresses")
6956 (description
6957 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6958 and MAC network addresses.")
6959 (license license:bsd-3)))
6960
6961 (define-public python2-netaddr
6962 (package-with-python2 python-netaddr))
6963
6964 (define-public python-wrapt
6965 (package
6966 (name "python-wrapt")
6967 (version "1.10.8")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "wrapt" version))
6972 (sha256
6973 (base32
6974 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
6975 (build-system python-build-system)
6976 (arguments
6977 ;; Tests are not included in the tarball, they are only available in the
6978 ;; git repository.
6979 `(#:tests? #f))
6980 (home-page "https://github.com/GrahamDumpleton/wrapt")
6981 (synopsis "Module for decorators, wrappers and monkey patching")
6982 (description
6983 "The aim of the wrapt module is to provide a transparent object proxy for
6984 Python, which can be used as the basis for the construction of function
6985 wrappers and decorator functions.")
6986 (license license:bsd-2)))
6987
6988 (define-public python2-wrapt
6989 (package-with-python2 python-wrapt))
6990
6991 (define-public python-iso8601
6992 (package
6993 (name "python-iso8601")
6994 (version "0.1.11")
6995 (source
6996 (origin
6997 (method url-fetch)
6998 (uri (pypi-uri "iso8601" version))
6999 (sha256
7000 (base32
7001 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7002 (build-system python-build-system)
7003 (native-inputs
7004 `(("python-pytest" ,python-pytest)))
7005 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7006 (synopsis "Module to parse ISO 8601 dates")
7007 (description
7008 "This module parses the most common forms of ISO 8601 date strings (e.g.
7009 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7010 (license license:expat)))
7011
7012 (define-public python2-iso8601
7013 (package-with-python2 python-iso8601))
7014
7015 (define-public python-monotonic
7016 (package
7017 (name "python-monotonic")
7018 (version "0.3")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (string-append
7023 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7024 version
7025 ".tar.gz"))
7026 (sha256
7027 (base32
7028 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7029 (build-system python-build-system)
7030 (home-page "https://github.com/atdt/monotonic")
7031 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7032 (description
7033 "This module provides a monotonic() function which returns the value (in
7034 fractional seconds) of a clock which never goes backwards.")
7035 (license license:asl2.0)))
7036
7037 (define-public python2-monotonic
7038 (package-with-python2 python-monotonic))
7039
7040 (define-public python-webob
7041 (package
7042 (name "python-webob")
7043 (version "1.5.1")
7044 (source
7045 (origin
7046 (method url-fetch)
7047 (uri (pypi-uri "WebOb" version))
7048 (sha256
7049 (base32
7050 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7051 (build-system python-build-system)
7052 (native-inputs
7053 `(("python-nose" ,python-nose)))
7054 (home-page "http://webob.org/")
7055 (synopsis "WSGI request and response object")
7056 (description
7057 "WebOb provides wrappers around the WSGI request environment, and an
7058 object to help create WSGI responses.")
7059 (license license:expat)))
7060
7061 (define-public python2-webob
7062 (package-with-python2 python-webob))
7063
7064 (define-public python-xlrd
7065 (package
7066 (name "python-xlrd")
7067 (version "1.0.0")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (pypi-uri "xlrd" version))
7071 (sha256
7072 (base32
7073 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7074 (build-system python-build-system)
7075 (arguments
7076 `(#:phases
7077 (modify-phases %standard-phases
7078 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7079 ;; run tests instead for now.
7080 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7081 (native-inputs `(("python-nose" ,python-nose)))
7082 (home-page "http://www.python-excel.org/")
7083 (synopsis "Library for extracting data from Excel files")
7084 (description "This packages provides a library to extract data from
7085 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7086 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7087 Unicode-aware. It is not intended as an end-user tool.")
7088 (license license:bsd-3)))
7089
7090 (define-public python2-xlrd
7091 (package-with-python2 python-xlrd))
7092
7093 (define-public python-prettytable
7094 (package
7095 (name "python-prettytable")
7096 (version "0.7.2")
7097 (source
7098 (origin
7099 (method url-fetch)
7100 (uri (string-append
7101 "https://pypi.python.org/packages/source/P/PrettyTable/"
7102 "prettytable-" version ".tar.bz2"))
7103 (sha256
7104 (base32
7105 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7106 (build-system python-build-system)
7107 (home-page "http://code.google.com/p/prettytable/")
7108 (synopsis "Display tabular data in an ASCII table format")
7109 (description
7110 "A library designed to represent tabular data in visually appealing ASCII
7111 tables. PrettyTable allows for selection of which columns are to be printed,
7112 independent alignment of columns (left or right justified or centred) and
7113 printing of sub-tables by specifying a row range.")
7114 (license license:bsd-3)))
7115
7116 (define-public python2-prettytable
7117 (package-with-python2 python-prettytable))
7118
7119 (define-public python-tables
7120 (package
7121 (name "python-tables")
7122 (version "3.2.2")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "tables" version))
7127 (sha256
7128 (base32
7129 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7130 (modules '((guix build utils)))
7131 (snippet
7132 '(begin
7133 ;; Remove pre-compiled .pyc files from source.
7134 (for-each delete-file-recursively
7135 (find-files "." "__pycache__" #:directories? #t))
7136 (for-each delete-file (find-files "." "\\.pyc$"))
7137 #t))))
7138 (build-system python-build-system)
7139 (arguments
7140 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7141 ;; or "check", so we must override the build and check phases.
7142 #:phases
7143 (modify-phases %standard-phases
7144 (add-after 'unpack 'use-gcc
7145 (lambda _
7146 (substitute* "setup.py"
7147 (("compiler = new_compiler\\(\\)" line)
7148 (string-append line
7149 "\ncompiler.set_executables(compiler='gcc',"
7150 "compiler_so='gcc',"
7151 "linker_exe='gcc',"
7152 "linker_so='gcc -shared')")))
7153 #t))
7154 (replace 'build
7155 (lambda* (#:key inputs #:allow-other-keys)
7156 (zero? (system* "python" "setup.py" "build"
7157 (string-append "--hdf5="
7158 (assoc-ref inputs "hdf5"))))))
7159 (replace 'check
7160 (lambda* (#:key inputs #:allow-other-keys)
7161 (zero? (system* "python" "setup.py" "check"
7162 (string-append "--hdf5="
7163 (assoc-ref inputs "hdf5")))))))))
7164 (propagated-inputs
7165 `(("python-numexpr" ,python-numexpr)
7166 ("python-numpy" ,python-numpy)))
7167 (native-inputs
7168 `(("python-cython" ,python-cython)
7169 ("pkg-config" ,pkg-config)))
7170 (inputs
7171 `(("hdf5" ,hdf5)
7172 ("bzip2" ,bzip2)
7173 ("zlib" ,zlib)))
7174 (home-page "http://www.pytables.org/")
7175 (synopsis "Hierarchical datasets for Python")
7176 (description "PyTables is a package for managing hierarchical datasets and
7177 designed to efficiently cope with extremely large amounts of data.")
7178 (license license:bsd-3)))
7179
7180 (define-public python2-tables
7181 (package-with-python2 python-tables))
7182
7183 (define-public python-pyasn1
7184 (package
7185 (name "python-pyasn1")
7186 (version "0.2.3")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "pyasn1" version))
7191 (sha256
7192 (base32
7193 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7194 (build-system python-build-system)
7195 (home-page "http://pyasn1.sourceforge.net/")
7196 (synopsis "ASN.1 types and codecs")
7197 (description
7198 "This is an implementation of ASN.1 types and codecs in Python. It is
7199 suitable for a wide range of protocols based on the ASN.1 specification.")
7200 (license license:bsd-2)))
7201
7202 (define-public python2-pyasn1
7203 (package-with-python2 python-pyasn1))
7204
7205 (define-public python-pyasn1-modules
7206 (package
7207 (name "python-pyasn1-modules")
7208 (version "0.0.8")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (pypi-uri "pyasn1-modules" version))
7213 (sha256
7214 (base32
7215 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7216 (build-system python-build-system)
7217 (propagated-inputs
7218 `(("python-pyasn1" ,python-pyasn1)))
7219 (home-page "https://sourceforge.net/projects/pyasn1/")
7220 (synopsis "ASN.1 codec implementations")
7221 (description
7222 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7223 implementations of ASN.1-based codecs and protocols.")
7224 (license license:bsd-3)))
7225
7226 (define-public python2-pyasn1-modules
7227 (package-with-python2 python-pyasn1-modules))
7228
7229 (define-public python-ipaddress
7230 (package
7231 (name "python-ipaddress")
7232 (version "1.0.18")
7233 (source (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "ipaddress" version))
7236 (sha256
7237 (base32
7238 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/phihag/ipaddress")
7241 (synopsis "IP address manipulation library")
7242 (description
7243 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7244 in Python. This library is used to create, poke at, and manipulate IPv4 and
7245 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7246 module to older versions of Python.")
7247 (license license:psfl)))
7248
7249 (define-public python2-ipaddress
7250 (package-with-python2 python-ipaddress))
7251
7252 (define-public python2-ipaddr
7253 (package
7254 (name "python2-ipaddr")
7255 (version "2.1.11")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "ipaddr" version))
7260 (sha256
7261 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7262 (build-system python-build-system)
7263 (arguments
7264 `(#:python ,python-2 ;version 2 only
7265 #:phases
7266 (modify-phases %standard-phases
7267 (replace 'check
7268 (lambda* _
7269 (zero? (system* "python" "ipaddr_test.py")))))))
7270 (home-page "https://github.com/google/ipaddr-py")
7271 (synopsis "IP address manipulation library")
7272 (description
7273 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7274 IPv6 addresses and networks.
7275
7276 For new implementations you may prefer to use the standard module
7277 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7278 versions of Python.")
7279 (license license:asl2.0)))
7280
7281 (define-public python-idna
7282 (package
7283 (name "python-idna")
7284 (version "2.5")
7285 (source
7286 (origin
7287 (method url-fetch)
7288 (uri (pypi-uri "idna" version))
7289 (sha256
7290 (base32
7291 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7292 (build-system python-build-system)
7293 (home-page "https://github.com/kjd/idna")
7294 (synopsis "Internationalized domain names in applications")
7295 (description
7296 "This is a library to support the Internationalised Domain Names in
7297 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7298 protocol is often referred to as “IDNA2008” and can produce different results
7299 from the earlier standard from 2003. The library is also intended to act as a
7300 suitable drop-in replacement for the “encodings.idna” module that comes with
7301 the Python standard library but currently only supports the older 2003
7302 specification.")
7303 (license license:bsd-4)))
7304
7305 (define-public python2-idna
7306 (package-with-python2 python-idna))
7307
7308 (define-public python-pretend
7309 (package
7310 (name "python-pretend")
7311 (version "1.0.8")
7312 (source
7313 (origin
7314 (method url-fetch)
7315 (uri (string-append "https://pypi.python.org/packages/source/p/"
7316 "pretend/pretend-" version ".tar.gz"))
7317 (sha256
7318 (base32
7319 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7320 (build-system python-build-system)
7321 (home-page "https://github.com/alex/pretend")
7322 (synopsis "Library for stubbing in Python")
7323 (description
7324 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7325 technique for writing tests. You may hear the term mixed up with mocks,
7326 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7327 responses, rather than doing any computation.")
7328 (license license:bsd-3)))
7329
7330 (define-public python2-pretend
7331 (package-with-python2 python-pretend))
7332
7333 (define-public python-cryptography-vectors
7334 (package
7335 (name "python-cryptography-vectors")
7336 (version "1.8.2")
7337 (source
7338 (origin
7339 (method url-fetch)
7340 (uri (pypi-uri "cryptography_vectors" version))
7341 (sha256
7342 (base32
7343 "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0"))))
7344 (build-system python-build-system)
7345 (home-page "https://github.com/pyca/cryptography")
7346 (synopsis "Test vectors for the cryptography package")
7347 (description
7348 "This package contains test vectors for the cryptography package.")
7349 ;; Distributed under either BSD-3 or ASL2.0
7350 (license (list license:bsd-3 license:asl2.0))))
7351
7352 (define-public python2-cryptography-vectors
7353 (package-with-python2 python-cryptography-vectors))
7354
7355 (define-public python-cryptography
7356 (package
7357 (name "python-cryptography")
7358 (version "1.8.2")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "cryptography" version))
7363 (sha256
7364 (base32
7365 "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f"))))
7366 (build-system python-build-system)
7367 (inputs
7368 `(("openssl" ,openssl)))
7369 (propagated-inputs
7370 `(("python-asn1crypto" ,python-asn1crypto)
7371 ("python-cffi" ,python-cffi)
7372 ("python-six" ,python-six)
7373 ("python-idna" ,python-idna)
7374 ;; Packaging is used to check the version of python-cffi in
7375 ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be
7376 ;; able to remove this dependency in the next release of cryptography:
7377 ;; python-cryptography:
7378 ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1
7379 ("python-packaging" ,python-packaging)
7380 ("python-iso8601" ,python-iso8601)))
7381 (native-inputs
7382 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7383 ("python-hypothesis" ,python-hypothesis)
7384 ("python-pretend" ,python-pretend)
7385 ("python-pytz" ,python-pytz)
7386 ("python-pytest" ,python-pytest-3.0)))
7387 (home-page "https://github.com/pyca/cryptography")
7388 (synopsis "Cryptographic recipes and primitives for Python")
7389 (description
7390 "cryptography is a package which provides cryptographic recipes and
7391 primitives to Python developers. It aims to be the “cryptographic standard
7392 library” for Python. The package includes both high level recipes, and low
7393 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7394 message digests and key derivation functions.")
7395 ;; Distributed under either BSD-3 or ASL2.0
7396 (license (list license:bsd-3 license:asl2.0))
7397 (properties `((python2-variant . ,(delay python2-cryptography))))))
7398
7399 (define-public python2-cryptography
7400 (let ((crypto (package-with-python2
7401 (strip-python2-variant python-cryptography))))
7402 (package (inherit crypto)
7403 (propagated-inputs
7404 `(("python2-ipaddress" ,python2-ipaddress)
7405 ("python2-backport-ssl-match-hostname"
7406 ,python2-backport-ssl-match-hostname)
7407 ("python2-enum34" ,python2-enum34)
7408 ,@(package-propagated-inputs crypto))))))
7409
7410 (define-public python-pyopenssl
7411 (package
7412 (name "python-pyopenssl")
7413 (version "17.0.0")
7414 (source
7415 (origin
7416 (method url-fetch)
7417 (uri (pypi-uri "pyOpenSSL" version))
7418 (sha256
7419 (base32
7420 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7421 (patches
7422 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7423 (build-system python-build-system)
7424 (arguments
7425 '(#:phases
7426 (modify-phases %standard-phases
7427 (delete 'check)
7428 (add-after 'install 'check
7429 (lambda* (#:key inputs outputs #:allow-other-keys)
7430 (add-installed-pythonpath inputs outputs)
7431 (zero? (system* "py.test" "-v")))))))
7432 (propagated-inputs
7433 `(("python-cryptography" ,python-cryptography)
7434 ("python-six" ,python-six)))
7435 (inputs
7436 `(("openssl" ,openssl)))
7437 (native-inputs
7438 `(("python-pytest" ,python-pytest-3.0)))
7439 (home-page "https://github.com/pyca/pyopenssl")
7440 (synopsis "Python wrapper module around the OpenSSL library")
7441 (description
7442 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7443 library.")
7444 (license license:asl2.0)))
7445
7446 (define-public python2-pyopenssl
7447 (package-with-python2 python-pyopenssl))
7448
7449 (define-public python-pip
7450 (package
7451 (name "python-pip")
7452 (version "9.0.1")
7453 (source
7454 (origin
7455 (method url-fetch)
7456 (uri (pypi-uri "pip" version))
7457 (sha256
7458 (base32
7459 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7460 (build-system python-build-system)
7461 (arguments
7462 '(#:tests? #f)) ; there are no tests in the pypi archive.
7463 (home-page "https://pip.pypa.io/")
7464 (synopsis "Package manager for Python software")
7465 (description
7466 "Pip is a package manager for Python software, that finds packages on the
7467 Python Package Index (PyPI).")
7468 (license license:expat)))
7469
7470 (define-public python2-pip
7471 (package-with-python2 python-pip))
7472
7473 (define-public python-tlsh
7474 (package
7475 (name "python-tlsh")
7476 (version "3.4.4")
7477 (home-page "https://github.com/trendmicro/tlsh")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7481 version ".tar.gz"))
7482 (sha256
7483 (base32
7484 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7485 (file-name (string-append name "-" version ".tar.gz"))))
7486 (build-system cmake-build-system)
7487 (arguments
7488 '(#:out-of-source? #f
7489 #:phases (modify-phases %standard-phases
7490 (replace
7491 'install
7492 (lambda* (#:key outputs #:allow-other-keys)
7493 ;; Build and install the Python bindings. The underlying
7494 ;; C++ library is apparently not meant to be installed.
7495 (let ((out (assoc-ref outputs "out")))
7496 (with-directory-excursion "py_ext"
7497 (and (system* "python" "setup.py" "build")
7498 (system* "python" "setup.py" "install"
7499 (string-append "--prefix=" out))))))))))
7500 (inputs `(("python" ,python-wrapper))) ;for the bindings
7501 (synopsis "Fuzzy matching library for Python")
7502 (description
7503 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7504 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7505 value which can be used for similarity comparisons. Similar objects have
7506 similar hash values, which allows for the detection of similar objects by
7507 comparing their hash values. The byte stream should have a sufficient amount
7508 of complexity; for example, a byte stream of identical bytes will not generate
7509 a hash value.")
7510 (license license:asl2.0)))
7511
7512 (define-public python2-tlsh
7513 (package
7514 (inherit python-tlsh)
7515 (name "python2-tlsh")
7516 (inputs `(("python" ,python-2)))))
7517
7518 (define-public python-termcolor
7519 (package
7520 (name "python-termcolor")
7521 (version "1.1.0")
7522 (source
7523 (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "termcolor" version))
7526 (sha256
7527 (base32
7528 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7529 (build-system python-build-system)
7530 (arguments
7531 ;; There are no tests.
7532 `(#:tests? #f))
7533 (home-page "http://pypi.python.org/pypi/termcolor")
7534 (synopsis "ANSII Color formatting for terminal output")
7535 (description
7536 "This package provides ANSII Color formatting for output in terminals.")
7537 (license license:expat)))
7538
7539 (define-public python2-termcolor
7540 (package-with-python2 python-termcolor))
7541
7542 (define-public python-libarchive-c
7543 (package
7544 (name "python-libarchive-c")
7545 (version "2.2")
7546 (source (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "libarchive-c" version))
7549 (sha256
7550 (base32
7551 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7552 (build-system python-build-system)
7553 (arguments
7554 '(#:phases (modify-phases %standard-phases
7555 (add-before
7556 'build 'reference-libarchive
7557 (lambda* (#:key inputs #:allow-other-keys)
7558 ;; Retain the absolute file name of libarchive.so.
7559 (let ((libarchive (assoc-ref inputs "libarchive")))
7560 (substitute* "libarchive/ffi.py"
7561 (("find_library\\('archive'\\)")
7562 (string-append "'" libarchive
7563 "/lib/libarchive.so'")))))))))
7564 (inputs
7565 `(("libarchive" ,libarchive)))
7566 (home-page "https://github.com/Changaco/python-libarchive-c")
7567 (synopsis "Python interface to libarchive")
7568 (description
7569 "This package provides Python bindings to libarchive, a C library to
7570 access possibly compressed archives in many different formats. It uses
7571 Python's @code{ctypes} foreign function interface (FFI).")
7572 (license license:lgpl2.0+)))
7573
7574 (define-public python2-libarchive-c
7575 (package-with-python2 python-libarchive-c))
7576
7577 (define-public python-file
7578 (package
7579 (inherit file)
7580 (name "python-file")
7581 (build-system python-build-system)
7582 (arguments
7583 '(#:tests? #f ;no tests
7584 #:configure-flags '("--single-version-externally-managed" "--root=/")
7585 #:phases (modify-phases %standard-phases
7586 (add-before 'build 'change-directory
7587 (lambda _
7588 (chdir "python")
7589 #t))
7590 (add-before 'build 'set-library-file-name
7591 (lambda* (#:key inputs #:allow-other-keys)
7592 (let ((file (assoc-ref inputs "file")))
7593 (substitute* "magic.py"
7594 (("find_library\\('magic'\\)")
7595 (string-append "'" file "/lib/libmagic.so'")))
7596 #t))))))
7597 (inputs `(("file" ,file)))
7598 (self-native-input? #f)
7599 (synopsis "Python bindings to the libmagic file type guesser. Note that
7600 this module and the python-magic module both provide a \"magic.py\" file;
7601 these two modules, which are different and were developed separately, both
7602 serve the same purpose: provide Python bindings for libmagic.")))
7603
7604 (define-public python2-file
7605 (package-with-python2 python-file))
7606
7607 (define-public python-debian
7608 (package
7609 (name "python-debian")
7610 (version "0.1.28")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (pypi-uri name version))
7615 (sha256
7616 (base32
7617 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7618 (build-system python-build-system)
7619 (propagated-inputs
7620 `(("python-six" ,python-six)))
7621 (home-page "http://packages.debian.org/sid/python-debian")
7622 (synopsis "Debian package related modules")
7623 (description
7624 ;; XXX: Use @enumerate instead of @itemize to work around
7625 ;; <http://bugs.gnu.org/21772>.
7626 "This package provides Python modules that abstract many formats of
7627 Debian-related files, such as:
7628
7629 @enumerate
7630 @item Debtags information;
7631 @item @file{debian/changelog} files;
7632 @item packages files, pdiffs;
7633 @item control files of single or multiple RFC822-style paragraphs---e.g.
7634 @file{debian/control}, @file{.changes}, @file{.dsc};
7635 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7636 contained files and meta-information.
7637 @end enumerate\n")
7638
7639 ;; Modules are either GPLv2+ or GPLv3+.
7640 (license license:gpl3+)))
7641
7642 (define-public python2-debian
7643 (package-with-python2 python-debian))
7644
7645 (define-public python-nbformat
7646 (package
7647 (name "python-nbformat")
7648 (version "4.1.0")
7649 (source
7650 (origin
7651 (method url-fetch)
7652 (uri (pypi-uri "nbformat" version))
7653 (sha256
7654 (base32
7655 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7656 (build-system python-build-system)
7657 (arguments `(#:tests? #f)) ; no test target
7658 (propagated-inputs
7659 `(("python-ipython-genutils" ,python-ipython-genutils)
7660 ("python-jsonschema" ,python-jsonschema)
7661 ("python-jupyter-core" ,python-jupyter-core)
7662 ("python-traitlets" ,python-traitlets)))
7663 (home-page "http://jupyter.org")
7664 (synopsis "Jupyter Notebook format")
7665 (description "This package provides the reference implementation of the
7666 Jupyter Notebook format and Python APIs for working with notebooks.")
7667 (license license:bsd-3)))
7668
7669 (define-public python2-nbformat
7670 (package-with-python2 python-nbformat))
7671
7672 (define-public python-bleach
7673 (package
7674 (name "python-bleach")
7675 (version "1.4.3")
7676 (source
7677 (origin
7678 (method url-fetch)
7679 (uri (pypi-uri "bleach" version))
7680 (sha256
7681 (base32
7682 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7683 (build-system python-build-system)
7684 (propagated-inputs
7685 `(("python-html5lib" ,python-html5lib-0.9)
7686 ("python-six" ,python-six)))
7687 (native-inputs
7688 `(("python-nose" ,python-nose)))
7689 (home-page "https://github.com/jsocol/bleach")
7690 (synopsis "Whitelist-based HTML-sanitizing tool")
7691 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7692 (license license:asl2.0)))
7693
7694 (define-public python2-bleach
7695 (package-with-python2 python-bleach))
7696
7697 (define-public python-entrypoints
7698 (package
7699 (name "python-entrypoints")
7700 (version "0.2.2")
7701 (source
7702 (origin
7703 (method url-fetch)
7704 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7705 version ".tar.gz"))
7706 (file-name (string-append name "-" version ".tar.gz"))
7707 (sha256
7708 (base32
7709 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7710 (build-system python-build-system)
7711 ;; The package does not come with a setup.py file, so we have to generate
7712 ;; one ourselves.
7713 (arguments
7714 `(#:tests? #f
7715 #:phases
7716 (modify-phases %standard-phases
7717 (add-after 'unpack 'create-setup.py
7718 (lambda _
7719 (call-with-output-file "setup.py"
7720 (lambda (port)
7721 (format port "\
7722 from setuptools import setup
7723 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7724 " ,version))))))))
7725 (home-page "https://github.com/takluyver/entrypoints")
7726 (synopsis "Discover and load entry points from installed Python packages")
7727 (description "Entry points are a way for Python packages to advertise
7728 objects with some common interface. The most common examples are
7729 @code{console_scripts} entry points, which define shell commands by
7730 identifying a Python function to run. The @code{entrypoints} module contains
7731 functions to find and load entry points.")
7732 (license license:expat)))
7733
7734 (define-public python2-entrypoints
7735 (package-with-python2 python-entrypoints))
7736
7737 (define-public python-nbconvert
7738 (package
7739 (name "python-nbconvert")
7740 (version "5.0.0b1")
7741 (source
7742 (origin
7743 (method url-fetch)
7744 (uri (pypi-uri "nbconvert" version))
7745 (sha256
7746 (base32
7747 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7748 (build-system python-build-system)
7749 (arguments
7750 `(;; The "bdist_egg" target is disabled by default, causing the installation
7751 ;; to fail.
7752 #:configure-flags (list "bdist_egg")
7753 ;; FIXME: 5 failures, 40 errors.
7754 #:tests? #f))
7755 ;; #:phases
7756 ;; (modify-phases %standard-phases
7757 ;; (replace 'check
7758 ;; (lambda _
7759 ;; (zero? (system* "py.test" "-v")))))
7760 (native-inputs
7761 `(("python-pytest" ,python-pytest)))
7762 (propagated-inputs
7763 `(("python-bleach" ,python-bleach)
7764 ("python-entrypoints" ,python-entrypoints)
7765 ("python-jinja2" ,python-jinja2)
7766 ("python-jupyter-core" ,python-jupyter-core)
7767 ("python-mistune" ,python-mistune)
7768 ("python-nbformat" ,python-nbformat)
7769 ("python-pygments" ,python-pygments)
7770 ("python-traitlets" ,python-traitlets)))
7771 (home-page "http://jupyter.org")
7772 (synopsis "Converting Jupyter Notebooks")
7773 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7774 notebooks to various other formats via Jinja templates. It allows you to
7775 convert an @code{.ipynb} notebook file into various static formats including:
7776
7777 @enumerate
7778 @item HTML
7779 @item LaTeX
7780 @item PDF
7781 @item Reveal JS
7782 @item Markdown (md)
7783 @item ReStructured Text (rst)
7784 @item executable script
7785 @end enumerate\n")
7786 (license license:bsd-3)))
7787
7788 (define-public python2-nbconvert
7789 (package-with-python2 python-nbconvert))
7790
7791 (define-public python-notebook
7792 (package
7793 (name "python-notebook")
7794 (version "4.2.3")
7795 (source (origin
7796 (method url-fetch)
7797 (uri (pypi-uri "notebook" version))
7798 (sha256
7799 (base32
7800 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7801 (build-system python-build-system)
7802 (arguments
7803 `(#:phases
7804 (modify-phases %standard-phases
7805 (replace 'check
7806 (lambda _
7807 ;; HOME must be set for tests
7808 (setenv "HOME" "/tmp")
7809 (zero? (system* "nosetests")))))))
7810 (propagated-inputs
7811 `(("python-jupyter-core" ,python-jupyter-core)
7812 ("python-nbformat" ,python-nbformat)
7813 ("python-nbconvert" ,python-nbconvert)
7814 ("python-ipython" ,python-ipython)))
7815 (native-inputs
7816 `(("python-nose" ,python-nose)
7817 ("python-sphinx" ,python-sphinx)
7818 ("python-requests" ,python-requests)))
7819 (home-page "http://jupyter.org/")
7820 (synopsis "Web-based notebook environment for interactive computing")
7821 (description
7822 "The Jupyter HTML notebook is a web-based notebook environment for
7823 interactive computing.")
7824 (properties `((python2-variant . ,(delay python2-notebook))))
7825 (license license:bsd-3)))
7826
7827 (define-public python2-notebook
7828 (let ((base (package-with-python2
7829 (strip-python2-variant python-notebook))))
7830 (package (inherit base)
7831 (native-inputs
7832 `(("python2-mock" ,python2-mock)
7833 ,@(package-native-inputs base)))
7834 (arguments
7835 (substitute-keyword-arguments (package-arguments base)
7836 ((#:phases phases)
7837 `(modify-phases ,phases
7838 (add-before 'check 'disable-test-case
7839 ;; The test requires network access to localhost. Curiously it
7840 ;; fails with Python 2 only. Simply make the test-case return
7841 ;; immediately.
7842 (lambda _
7843 (substitute*
7844 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7845 (("formats = self.nbconvert_api") "return #")))))))))))
7846
7847 (define-public python-widgetsnbextension
7848 (package
7849 (name "python-widgetsnbextension")
7850 (version "1.2.6")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (pypi-uri "widgetsnbextension" version))
7855 (sha256
7856 (base32
7857 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7858 (build-system python-build-system)
7859 (propagated-inputs
7860 `(("python-notebook" ,python-notebook)))
7861 (native-inputs
7862 `(("python-certifi" ,python-certifi)
7863 ("python-nose" ,python-nose)))
7864 (home-page "http://ipython.org")
7865 (synopsis "IPython HTML widgets for Jupyter")
7866 (description "This package provides interactive HTML widgets for Jupyter
7867 notebooks.")
7868 (license license:bsd-3)))
7869
7870 (define-public python2-widgetsnbextension
7871 (package-with-python2 python-widgetsnbextension))
7872
7873 (define-public python-ipywidgets
7874 (package
7875 (name "python-ipywidgets")
7876 (version "5.2.2")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "ipywidgets" version))
7881 (sha256
7882 (base32
7883 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7884 (build-system python-build-system)
7885 ;; FIXME: it's not clear how to run the tests.
7886 (arguments `(#:tests? #f))
7887 (propagated-inputs
7888 `(("python-ipykernel" ,python-ipykernel)
7889 ("python-ipython" ,python-ipython)
7890 ("python-traitlets" ,python-traitlets)
7891 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7892 (home-page "http://ipython.org")
7893 (synopsis "IPython HTML widgets for Jupyter")
7894 (description "Ipywidgets are interactive HTML widgets for Jupyter
7895 notebooks and the IPython kernel. Notebooks come alive when interactive
7896 widgets are used. Users gain control of their data and can visualize changes
7897 in the data.")
7898 (license license:bsd-3)))
7899
7900 (define-public python2-ipywidgets
7901 (package-with-python2 python-ipywidgets))
7902
7903 (define-public python-jupyter-console
7904 (package
7905 (name "python-jupyter-console")
7906 (version "5.0.0")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "jupyter_console" version))
7911 (sha256
7912 (base32
7913 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7914 (build-system python-build-system)
7915 ;; FIXME: it's not clear how to run the tests.
7916 (arguments `(#:tests? #f))
7917 (propagated-inputs
7918 `(("python-ipykernel" ,python-ipykernel)
7919 ("python-ipython" ,python-ipython)
7920 ("python-jupyter-client" ,python-jupyter-client)
7921 ("python-prompt-toolkit" ,python-prompt-toolkit)
7922 ("python-pygments" ,python-pygments)))
7923 (home-page "https://jupyter.org")
7924 (synopsis "Jupyter terminal console")
7925 (description "This package provides a terminal-based console frontend for
7926 Jupyter kernels. It also allows for console-based interaction with non-Python
7927 Jupyter kernels such as IJulia and IRKernel.")
7928 (license license:bsd-3)))
7929
7930 (define-public python2-jupyter-console
7931 (package-with-python2 python-jupyter-console))
7932
7933 (define-public jupyter
7934 (package
7935 (name "jupyter")
7936 (version "1.0.0")
7937 (source
7938 (origin
7939 (method url-fetch)
7940 (uri (pypi-uri "jupyter" version))
7941 (sha256
7942 (base32
7943 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7944 (build-system python-build-system)
7945 ;; FIXME: it's not clear how to run the tests.
7946 (arguments `(#:tests? #f))
7947 (propagated-inputs
7948 `(("python-ipykernel" ,python-ipykernel)
7949 ("python-ipywidgets" ,python-ipywidgets)
7950 ("python-jupyter-console" ,python-jupyter-console)
7951 ("python-nbconvert" ,python-nbconvert)
7952 ("python-notebook" ,python-notebook)))
7953 (home-page "http://jupyter.org")
7954 (synopsis "Web application for interactive documents")
7955 (description
7956 "The Jupyter Notebook is a web application that allows you to create and
7957 share documents that contain live code, equations, visualizations and
7958 explanatory text. Uses include: data cleaning and transformation, numerical
7959 simulation, statistical modeling, machine learning and much more.")
7960 (license license:bsd-3)))
7961
7962 (define-public python-chardet
7963 (package
7964 (name "python-chardet")
7965 (version "2.3.0")
7966 (source
7967 (origin
7968 (method url-fetch)
7969 (uri (string-append
7970 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7971 version
7972 ".tar.gz"))
7973 (sha256
7974 (base32
7975 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7976 (build-system python-build-system)
7977 (home-page "https://github.com/chardet/chardet")
7978 (synopsis "Universal encoding detector for Python 2 and 3")
7979 (description
7980 "This package provides @code{chardet}, a Python module that can
7981 automatically detect a wide range of file encodings.")
7982 (license license:lgpl2.1+)))
7983
7984 (define-public python2-chardet
7985 (package-with-python2 python-chardet))
7986
7987 (define-public python-docopt
7988 (package
7989 (name "python-docopt")
7990 (version "0.6.2")
7991 (source
7992 (origin
7993 (method url-fetch)
7994 ;; The release on PyPI does not include tests.
7995 (uri (string-append
7996 "https://github.com/docopt/docopt/archive/"
7997 version ".tar.gz"))
7998 (file-name (string-append name "-" version ".tar.gz"))
7999 (sha256
8000 (base32
8001 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8002 (build-system python-build-system)
8003 (native-inputs
8004 `(("python-pytest" ,python-pytest)))
8005 (arguments
8006 `(#:phases (alist-replace
8007 'check
8008 (lambda _ (zero? (system* "py.test")))
8009 %standard-phases)))
8010 (home-page "http://docopt.org")
8011 (synopsis "Command-line interface description language for Python")
8012 (description "This library allows the user to define a command-line
8013 interface from a program's help message rather than specifying it
8014 programatically with command-line parsers like @code{getopt} and
8015 @code{argparse}.")
8016 (license license:expat)))
8017
8018 (define-public python2-docopt
8019 (package-with-python2 python-docopt))
8020
8021 (define-public python-zope-event
8022 (package
8023 (name "python-zope-event")
8024 (version "4.1.0")
8025 (source
8026 (origin
8027 (method url-fetch)
8028 (uri (string-append "https://pypi.python.org/packages/source/z"
8029 "/zope.event/zope.event-" version ".tar.gz"))
8030 (sha256
8031 (base32
8032 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8033 (build-system python-build-system)
8034 (home-page "http://pypi.python.org/pypi/zope.event")
8035 (synopsis "Event publishing system for Python")
8036 (description "Zope.event provides an event publishing API, intended for
8037 use by applications which are unaware of any subscribers to their events. It
8038 is a simple event-dispatching system on which more sophisticated event
8039 dispatching systems can be built.")
8040 (license license:zpl2.1)))
8041
8042 (define-public python2-zope-event
8043 (package-with-python2 python-zope-event))
8044
8045 (define-public python-zope-interface
8046 (package
8047 (name "python-zope-interface")
8048 (version "4.1.3")
8049 (source
8050 (origin
8051 (method url-fetch)
8052 (uri (string-append "https://pypi.python.org/packages/source/z"
8053 "/zope.interface/zope.interface-" version ".tar.gz"))
8054 (sha256
8055 (base32
8056 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8057 (build-system python-build-system)
8058 (native-inputs
8059 `(("python-zope-event" ,python-zope-event)))
8060 (home-page "https://github.com/zopefoundation/zope.interface")
8061 (synopsis "Python implementation of the \"design by contract\"
8062 methodology")
8063 (description "Zope.interface provides an implementation of \"object
8064 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8065 conforming to a given API or contract.")
8066 (license license:zpl2.1)))
8067
8068 (define-public python2-zope-interface
8069 (package-with-python2 python-zope-interface))
8070
8071 (define-public python-zope-exceptions
8072 (package
8073 (name "python-zope-exceptions")
8074 (version "4.0.8")
8075 (source
8076 (origin
8077 (method url-fetch)
8078 (uri (string-append "https://pypi.python.org/packages/source/z"
8079 "/zope.exceptions/zope.exceptions-"
8080 version ".tar.gz"))
8081 (sha256
8082 (base32
8083 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8084 (build-system python-build-system)
8085 (arguments
8086 '(#:tests? #f)) ; circular dependency with zope.testrunner
8087 (propagated-inputs
8088 `(("python-zope-interface" ,python-zope-interface)))
8089 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8090 (synopsis "Zope exceptions")
8091 (description "Zope.exceptions provides general-purpose exception types
8092 that have uses outside of the Zope framework.")
8093 (license license:zpl2.1)))
8094
8095 (define-public python2-zope-exceptions
8096 (package-with-python2 python-zope-exceptions))
8097
8098 (define-public python-zope-testing
8099 (package
8100 (name "python-zope-testing")
8101 (version "4.5.0")
8102 (source
8103 (origin
8104 (method url-fetch)
8105 (uri (string-append "https://pypi.python.org/packages/source/z"
8106 "/zope.testing/zope.testing-" version ".tar.gz"))
8107 (sha256
8108 (base32
8109 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8110 (modules '((guix build utils)))
8111 (snippet
8112 '(begin
8113 ;; Remove pre-compiled .pyc files backup files from source.
8114 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8115 #t))))
8116 (build-system python-build-system)
8117 (native-inputs
8118 `(("python-zope-exceptions" ,python-zope-exceptions)))
8119 (propagated-inputs
8120 `(("python-zope-interface" ,python-zope-interface)))
8121 (home-page "http://pypi.python.org/pypi/zope.testing")
8122 (synopsis "Zope testing helpers")
8123 (description "Zope.testing provides a number of testing utilities for HTML
8124 forms, HTTP servers, regular expressions, and more.")
8125 (license license:zpl2.1)))
8126
8127 (define-public python2-zope-testing
8128 (package-with-python2 python-zope-testing))
8129
8130 (define-public python-zope-testrunner
8131 (package
8132 (name "python-zope-testrunner")
8133 (version "4.4.9")
8134 (source
8135 (origin
8136 (method url-fetch)
8137 (uri (string-append "https://pypi.python.org/packages/source/z"
8138 "/zope.testrunner/zope.testrunner-"
8139 version ".zip"))
8140 (sha256
8141 (base32
8142 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8143 (build-system python-build-system)
8144 (arguments
8145 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8146 (native-inputs
8147 `(("python-six" ,python-six)
8148 ;("python-zope-interface" ,python-zope-interface)
8149 ("python-zope-exceptions" ,python-zope-exceptions)
8150 ("python-zope-testing" ,python-zope-testing)
8151 ("unzip" ,unzip)))
8152 (propagated-inputs
8153 `(("python-zope-interface" ,python-zope-interface)))
8154 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8155 (synopsis "Zope testrunner script")
8156 (description "Zope.testrunner provides a script for running Python
8157 tests.")
8158 (license license:zpl2.1)))
8159
8160 (define-public python2-zope-testrunner
8161 (let ((base (package-with-python2 python-zope-testrunner)))
8162 (package
8163 (inherit base)
8164 (native-inputs
8165 (append (package-native-inputs base)
8166 `(("python2-subunit" ,python2-subunit)
8167 ("python2-mimeparse" ,python2-mimeparse)))))))
8168
8169 (define-public python-zope-i18nmessageid
8170 (package
8171 (name "python-zope-i18nmessageid")
8172 (version "4.0.3")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (string-append
8177 "https://pypi.python.org/packages/source/z"
8178 "/zope.i18nmessageid/zope.i18nmessageid-"
8179 version ".tar.gz"))
8180 (sha256
8181 (base32
8182 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8183 (build-system python-build-system)
8184 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8185 (synopsis "Message identifiers for internationalization")
8186 (description "Zope.i18nmessageid provides facilities for declaring
8187 internationalized messages within program source text.")
8188 (license license:zpl2.1)))
8189
8190 (define-public python2-zope-i18nmessageid
8191 (package-with-python2 python-zope-i18nmessageid))
8192
8193 (define-public python-zope-schema
8194 (package
8195 (name "python-zope-schema")
8196 (version "4.4.2")
8197 (source
8198 (origin
8199 (method url-fetch)
8200 (uri (string-append "https://pypi.python.org/packages/source/z"
8201 "/zope.schema/zope.schema-" version ".tar.gz"))
8202 (sha256
8203 (base32
8204 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8205 (build-system python-build-system)
8206 (arguments
8207 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8208 (propagated-inputs
8209 `(("python-zope-event" ,python-zope-event)
8210 ("python-zope-exceptions", python-zope-exceptions)
8211 ("python-zope-interface" ,python-zope-interface)))
8212 (native-inputs
8213 `(("python-zope-testing" ,python-zope-testing)
8214 ("python-coverage" ,python-coverage)
8215 ("python-nose" ,python-nose)))
8216 (home-page "http://pypi.python.org/pypi/zope.schema")
8217 (synopsis "Zope data schemas")
8218 (description "Zope.scheme provides extensions to zope.interface for
8219 defining data schemas.")
8220 (license license:zpl2.1)))
8221
8222 (define-public python2-zope-schema
8223 (package-with-python2 python-zope-schema))
8224
8225 (define-public python-zope-configuration
8226 (package
8227 (name "python-zope-configuration")
8228 (version "4.0.3")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (string-append "https://pypi.python.org/packages/source/z"
8232 "/zope.configuration/zope.configuration-"
8233 version ".tar.gz"))
8234 (sha256
8235 (base32
8236 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8237 (build-system python-build-system)
8238 (arguments
8239 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8240 (propagated-inputs
8241 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8242 ("python-zope-schema" ,python-zope-schema)))
8243 (home-page "http://pypi.python.org/pypi/zope.configuration")
8244 (synopsis "Zope Configuration Markup Language")
8245 (description "Zope.configuration implements ZCML, the Zope Configuration
8246 Markup Language.")
8247 (license license:zpl2.1)))
8248
8249 (define-public python2-zope-configuration
8250 (package-with-python2 python-zope-configuration))
8251
8252 (define-public python-zope-proxy
8253 (package
8254 (name "python-zope-proxy")
8255 (version "4.1.6")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (string-append "https://pypi.python.org/packages/source/z"
8260 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8261 (sha256
8262 (base32
8263 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8264 (build-system python-build-system)
8265 (arguments
8266 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8267 (propagated-inputs
8268 `(("python-zope-interface" ,python-zope-interface)))
8269 (home-page "http://pypi.python.org/pypi/zope.proxy")
8270 (synopsis "Generic, transparent proxies")
8271 (description "Zope.proxy provides generic, transparent proxies for Python.
8272 Proxies are special objects which serve as mostly-transparent wrappers around
8273 another object, intervening in the apparent behavior of the wrapped object
8274 only when necessary to apply the policy (e.g., access checking, location
8275 brokering, etc.) for which the proxy is responsible.")
8276 (license license:zpl2.1)))
8277
8278 (define-public python2-zope-proxy
8279 (package-with-python2 python-zope-proxy))
8280
8281 (define-public python-zope-location
8282 (package
8283 (name "python-zope-location")
8284 (version "4.0.3")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (string-append "https://pypi.python.org/packages/source/z"
8289 "/zope.location/zope.location-" version ".tar.gz"))
8290 (sha256
8291 (base32
8292 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8293 (build-system python-build-system)
8294 (arguments
8295 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8296 (propagated-inputs
8297 `(("python-zope-proxy" ,python-zope-proxy)
8298 ("python-zope-schema" ,python-zope-schema)))
8299 (home-page "http://pypi.python.org/pypi/zope.location/")
8300 (synopsis "Zope location library")
8301 (description "Zope.location implements the concept of \"locations\" in
8302 Zope3, which are are special objects that have a structural location.")
8303 (license license:zpl2.1)))
8304
8305 (define-public python2-zope-location
8306 (package-with-python2 python-zope-location))
8307
8308 (define-public python-zope-security
8309 (package
8310 (name "python-zope-security")
8311 (version "4.0.3")
8312 (source
8313 (origin
8314 (method url-fetch)
8315 (uri (string-append "https://pypi.python.org/packages/source/z"
8316 "/zope.security/zope.security-" version ".tar.gz"))
8317 (sha256
8318 (base32
8319 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8320 (build-system python-build-system)
8321 (arguments
8322 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8323 (propagated-inputs
8324 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8325 ("python-zope-proxy" ,python-zope-proxy)
8326 ("python-zope-schema" ,python-zope-schema)))
8327 (native-inputs
8328 `(("python-six" ,python-six)
8329 ("python-zope-component" ,python-zope-component)
8330 ("python-zope-configuration" ,python-zope-configuration)
8331 ("python-zope-location" ,python-zope-location)
8332 ("python-zope-testrunner" ,python-zope-testrunner)
8333 ("python-zope-testing" ,python-zope-testing)))
8334 (home-page "http://pypi.python.org/pypi/zope.security")
8335 (synopsis "Zope security framework")
8336 (description "Zope.security provides a generic mechanism to implement
8337 security policies on Python objects.")
8338 (license license:zpl2.1)))
8339
8340 (define-public python2-zope-security
8341 (let ((zope-security (package-with-python2 python-zope-security)))
8342 (package (inherit zope-security)
8343 (propagated-inputs
8344 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8345 ,@(alist-delete
8346 "python-zope-testrunner"
8347 (package-propagated-inputs zope-security)))))))
8348
8349 (define-public python-zope-component
8350 (package
8351 (name "python-zope-component")
8352 (version "4.3.0")
8353 (source
8354 (origin
8355 (method url-fetch)
8356 (uri (pypi-uri "zope.component" version))
8357 (sha256
8358 (base32
8359 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8360 (build-system python-build-system)
8361 (arguments
8362 ;; Skip tests due to circular dependency with python-zope-security.
8363 '(#:tests? #f))
8364 (native-inputs
8365 `(("python-zope-testing" ,python-zope-testing)))
8366 (propagated-inputs
8367 `(("python-zope-event" ,python-zope-event)
8368 ("python-zope-interface" ,python-zope-interface)
8369 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8370 ("python-zope-configuration" ,python-zope-configuration)))
8371 (home-page "https://github.com/zopefoundation/zope.component")
8372 (synopsis "Zope Component Architecture")
8373 (description "Zope.component represents the core of the Zope Component
8374 Architecture. Together with the zope.interface package, it provides
8375 facilities for defining, registering and looking up components.")
8376 (license license:zpl2.1)))
8377
8378 (define-public python2-zope-component
8379 (package-with-python2 python-zope-component))
8380
8381 (define-public python-pythondialog
8382 (package
8383 (name "python-pythondialog")
8384 (version "3.4.0")
8385 (source
8386 (origin
8387 (method url-fetch)
8388 (uri (pypi-uri "pythondialog" version))
8389 (sha256
8390 (base32
8391 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8392 (build-system python-build-system)
8393 (arguments
8394 `(#:phases
8395 (modify-phases %standard-phases
8396 (add-after 'unpack 'patch-path
8397 (lambda* (#:key inputs #:allow-other-keys)
8398 (let* ((dialog (assoc-ref inputs "dialog")))
8399 ;; Since this library really wants to grovel the search path, we
8400 ;; must hardcode dialog's store path into it.
8401 (substitute* "dialog.py"
8402 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8403 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8404 #t))))
8405 #:tests? #f)) ; no test suite
8406 (propagated-inputs
8407 `(("dialog" ,dialog)))
8408 (home-page "http://pythondialog.sourceforge.net/")
8409 (synopsis "Python interface to the UNIX dialog utility")
8410 (description "A Python wrapper for the dialog utility. Its purpose is to
8411 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8412 This allows one to make simple text-mode user interfaces on Unix-like systems")
8413 (license license:lgpl2.1)
8414 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8415
8416 (define-public python2-pythondialog
8417 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8418 (package
8419 (inherit base)
8420 (version (package-version python-pythondialog))
8421 (source (origin
8422 (method url-fetch)
8423 (uri (pypi-uri "python2-pythondialog" version))
8424 (sha256
8425 (base32
8426 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8427
8428 (define-public python-pyrfc3339
8429 (package
8430 (name "python-pyrfc3339")
8431 (version "1.0")
8432 (source
8433 (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "pyRFC3339" version))
8436 (sha256
8437 (base32
8438 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8439 (build-system python-build-system)
8440 (propagated-inputs
8441 `(("python-pytz" ,python-pytz)))
8442 (native-inputs
8443 `(("python-nose" ,python-nose)))
8444 (home-page "https://github.com/kurtraschke/pyRFC3339")
8445 (synopsis "Python timestamp library")
8446 (description "Python library for generating and parsing RFC 3339-compliant
8447 timestamps.")
8448 (license license:expat)))
8449
8450 (define-public python2-pyrfc3339
8451 (package-with-python2 python-pyrfc3339))
8452
8453 (define-public python-werkzeug
8454 (package
8455 (name "python-werkzeug")
8456 (version "0.11.15")
8457 (source
8458 (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "Werkzeug" version))
8461 (sha256
8462 (base32
8463 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8464 (build-system python-build-system)
8465 (native-inputs
8466 `(("python-pytest" ,python-pytest)))
8467 (home-page "http://werkzeug.pocoo.org/")
8468 (synopsis "Utilities for WSGI applications")
8469 (description "One of the most advanced WSGI utility modules. It includes a
8470 powerful debugger, full-featured request and response objects, HTTP utilities to
8471 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8472 uploads, a powerful URL routing system and a bunch of community-contributed
8473 addon modules.")
8474 (license license:x11)))
8475
8476 (define-public python2-werkzeug
8477 (package-with-python2 python-werkzeug))
8478
8479 (define-public python-configobj
8480 (package
8481 (name "python-configobj")
8482 (version "5.0.6")
8483 (source (origin
8484 (method url-fetch)
8485 (uri (string-append
8486 "https://pypi.python.org/packages/source/c/configobj/"
8487 "configobj-" version ".tar.gz"))
8488 (sha256
8489 (base32
8490 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8491 ;; Patch setup.py so it looks for python-setuptools, which is
8492 ;; required to parse the keyword 'install_requires' in setup.py.
8493 (patches (search-patches "python-configobj-setuptools.patch"))))
8494 (build-system python-build-system)
8495 (propagated-inputs
8496 `(("python-six" ,python-six)))
8497 (synopsis "Config file reading, writing and validation")
8498 (description "ConfigObj is a simple but powerful config file reader and
8499 writer: an ini file round tripper. Its main feature is that it is very easy to
8500 use, with a straightforward programmer’s interface and a simple syntax for
8501 config files.")
8502 (home-page "https://github.com/DiffSK/configobj")
8503 (license license:bsd-3)))
8504
8505 (define-public python2-configobj
8506 (package-with-python2 python-configobj))
8507
8508 (define-public python-configargparse
8509 (package
8510 (name "python-configargparse")
8511 (version "0.10.0")
8512 (source (origin
8513 (method url-fetch)
8514 (uri (string-append
8515 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8516 "ConfigArgParse-" version ".tar.gz"))
8517 (sha256
8518 (base32
8519 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8520 (build-system python-build-system)
8521 (arguments
8522 ;; FIXME: Bug in test suite filed upstream:
8523 ;; https://github.com/bw2/ConfigArgParse/issues/32
8524 '(#:tests? #f))
8525 (synopsis "Replacement for argparse")
8526 (description "A drop-in replacement for argparse that allows options to also
8527 be set via config files and/or environment variables.")
8528 (home-page "https://github.com/bw2/ConfigArgParse")
8529 (license license:expat)))
8530
8531 (define-public python2-configargparse
8532 (package-with-python2 python-configargparse))
8533
8534 (define-public python-ndg-httpsclient
8535 (package
8536 (name "python-ndg-httpsclient")
8537 (version "0.4.2")
8538 (source (origin
8539 (method url-fetch)
8540 (uri (pypi-uri "ndg_httpsclient" version))
8541 (sha256
8542 (base32
8543 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8544 (build-system python-build-system)
8545 (arguments
8546 '(;; The tests appear to require networking.
8547 #:tests? #f))
8548 (propagated-inputs
8549 `(("python-pyopenssl" ,python-pyopenssl)))
8550 (synopsis "HTTPS support for Python's httplib and urllib2")
8551 (description "This is a HTTPS client implementation for httplib and urllib2
8552 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8553 over the default provided with Python and importantly enables full verification
8554 of the SSL peer.")
8555 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8556 (license license:bsd-3)))
8557
8558 ;; python2-openssl requires special care, so package-with-python2 is
8559 ;; insufficient.
8560 (define-public python2-ndg-httpsclient
8561 (package (inherit python-ndg-httpsclient)
8562 (name "python2-ndg-httpsclient")
8563 (arguments `(#:python ,python-2))
8564 (propagated-inputs
8565 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8566
8567 (define-public python-contextlib2
8568 (package
8569 (name "python-contextlib2")
8570 (version "0.4.0")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "contextlib2" version))
8575 (sha256
8576 (base32
8577 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8578 (build-system python-build-system)
8579 (arguments
8580 `(#:phases
8581 (modify-phases %standard-phases
8582 (replace 'check
8583 (lambda _ (zero?
8584 (system*
8585 "python" "test_contextlib2.py" "-v")))))))
8586 (home-page "http://contextlib2.readthedocs.org/")
8587 (synopsis "Tools for decorators and context managers")
8588 (description "This module is primarily a backport of the Python
8589 3.2 contextlib to earlier Python versions. Like contextlib, it
8590 provides utilities for common tasks involving decorators and context
8591 managers. It also contains additional features that are not part of
8592 the standard library.")
8593 (license license:psfl)))
8594
8595 (define-public python2-contextlib2
8596 (package-with-python2 python-contextlib2))
8597
8598 (define-public python-texttable
8599 (package
8600 (name "python-texttable")
8601 (version "0.8.7")
8602 (source
8603 (origin
8604 (method url-fetch)
8605 (uri (pypi-uri "texttable" version))
8606 (sha256
8607 (base32
8608 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8609 (build-system python-build-system)
8610 (arguments '(#:tests? #f)) ; no tests
8611 (home-page "https://github.com/foutaise/texttable/")
8612 (synopsis "Python module for creating simple ASCII tables")
8613 (description "Texttable is a Python module for creating simple ASCII
8614 tables.")
8615 (license license:lgpl2.1+)))
8616
8617 (define-public python2-texttable
8618 (package-with-python2 python-texttable))
8619
8620 (define-public python-websocket-client
8621 (package
8622 (name "python-websocket-client")
8623 (version "0.37.0")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "websocket_client" version))
8628 (sha256
8629 (base32
8630 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8631 (build-system python-build-system)
8632 (propagated-inputs
8633 `(("python-six" ,python-six)))
8634 (home-page "https://github.com/liris/websocket-client")
8635 (synopsis "WebSocket client for Python")
8636 (description "The Websocket-client module provides the low level APIs for
8637 WebSocket usage in Python programs.")
8638 (license license:lgpl2.1+)))
8639
8640 (define-public python2-websocket-client
8641 (package-with-python2 python-websocket-client))
8642
8643 (define-public python-atomicwrites
8644 (package
8645 (name "python-atomicwrites")
8646 (version "1.1.5")
8647 (source (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "atomicwrites" version))
8650 (sha256
8651 (base32
8652 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8653 (build-system python-build-system)
8654 (synopsis "Atomic file writes in Python")
8655 (description "Library for atomic file writes using platform dependent tools
8656 for atomic file system operations.")
8657 (home-page "https://github.com/untitaker/python-atomicwrites")
8658 (license license:expat)))
8659
8660 (define-public python2-atomicwrites
8661 (package-with-python2 python-atomicwrites))
8662
8663 (define-public python-requests-toolbelt
8664 (package
8665 (name "python-requests-toolbelt")
8666 (version "0.6.2")
8667 (source (origin
8668 (method url-fetch)
8669 (uri (string-append
8670 "https://pypi.python.org/packages/"
8671 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8672 "requests-toolbelt-" version ".tar.gz"))
8673 (sha256
8674 (base32
8675 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8676 (build-system python-build-system)
8677 (native-inputs
8678 `(("python-betamax" ,python-betamax)
8679 ("python-mock" ,python-mock)
8680 ("python-pytest" ,python-pytest)))
8681 (propagated-inputs
8682 `(("python-requests" ,python-requests)))
8683 (synopsis "Extensions to python-requests")
8684 (description "This is a toolbelt of useful classes and functions to be used
8685 with python-requests.")
8686 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8687 (license license:asl2.0)))
8688
8689 (define-public python-click-threading
8690 (package
8691 (name "python-click-threading")
8692 (version "0.2.0")
8693 (source (origin
8694 (method url-fetch)
8695 (uri (string-append
8696 "https://pypi.python.org/packages/"
8697 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8698 "click-threading-" version ".tar.gz"))
8699 (sha256
8700 (base32
8701 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8702 (build-system python-build-system)
8703 (propagated-inputs
8704 `(("python-click" ,python-click)))
8705 (synopsis "Utilities for multithreading in Click")
8706 (description "This package provides utilities for multithreading in Click
8707 applications.")
8708 (home-page "https://github.com/click-contrib/click-threading")
8709 (license license:expat)))
8710
8711 (define-public python-click-log
8712 (package
8713 (name "python-click-log")
8714 (version "0.1.8")
8715 (source (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "click-log" version))
8718 (sha256
8719 (base32
8720 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8721 (build-system python-build-system)
8722 (propagated-inputs
8723 `(("python-click" ,python-click)))
8724 (synopsis "Logging for click applications")
8725 (description "This package provides a Python library for logging Click
8726 applications.")
8727 (home-page "https://github.com/click-contrib/click-log")
8728 (license license:expat)))
8729
8730 (define-public python-apipkg
8731 (package
8732 (name "python-apipkg")
8733 (version "1.4")
8734 (source (origin
8735 (method url-fetch)
8736 (uri (pypi-uri "apipkg" version))
8737 (sha256
8738 (base32
8739 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8740 (build-system python-build-system)
8741 (native-inputs
8742 `(("python-pytest" ,python-pytest)))
8743 (synopsis "Namespace control and lazy-import mechanism")
8744 (description "With apipkg you can control the exported namespace of a Python
8745 package and greatly reduce the number of imports for your users. It is a small
8746 pure Python module that works on virtually all Python versions.")
8747 (home-page "https://bitbucket.org/hpk42/apipkg")
8748 (license license:expat)))
8749
8750 (define-public python2-apipkg
8751 (package-with-python2 python-apipkg))
8752
8753 (define-public python-execnet
8754 (package
8755 (name "python-execnet")
8756 (version "1.4.1")
8757 (source (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "execnet" version))
8760 (sha256
8761 (base32
8762 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8763 (build-system python-build-system)
8764 (arguments
8765 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8766 ;; The two test failures are caused by the lack of an `ssh` executable.
8767 ;; The test suite can be run with pytest after the 'install' phase.
8768 #:tests? #f))
8769 (native-inputs
8770 `(("python-pytest" ,python-pytest)
8771 ("python-setuptools-scm" ,python-setuptools-scm)))
8772 (propagated-inputs
8773 `(("python-apipkg" ,python-apipkg)))
8774 (synopsis "Rapid multi-Python deployment")
8775 (description "Execnet provides a share-nothing model with
8776 channel-send/receive communication for distributing execution across many
8777 Python interpreters across version, platform and network barriers. It has a
8778 minimal and fast API targeting the following uses:
8779 @enumerate
8780 @item distribute tasks to (many) local or remote CPUs
8781 @item write and deploy hybrid multi-process applications
8782 @item write scripts to administer multiple environments
8783 @end enumerate")
8784 (home-page "http://codespeak.net/execnet/")
8785 (license license:expat)))
8786
8787 (define-public python2-execnet
8788 (package-with-python2 python-execnet))
8789
8790 (define-public python-trollius-redis
8791 (package
8792 (name "python-trollius-redis")
8793 (version "0.1.4")
8794 (source
8795 (origin
8796 (method url-fetch)
8797 (uri (pypi-uri "trollius_redis" version))
8798 (sha256
8799 (base32
8800 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8801 (build-system python-build-system)
8802 ;; TODO: Tests require packaging 'hiredis'.
8803 (arguments '(#:tests? #f))
8804 (home-page "https://github.com/benjolitz/trollius-redis")
8805 (synopsis "Port of asyncio-redis to trollius")
8806 (description "@code{trollius-redis} is a Redis client for Python
8807 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8808 Redis protocol.")
8809 (license license:bsd-2)))
8810
8811 (define-public python2-trollius-redis
8812 (package-with-python2 python-trollius-redis))
8813
8814 ;;; The software provided by this package was integrated into pytest 2.8.
8815 (define-public python-pytest-cache
8816 (package
8817 (name "python-pytest-cache")
8818 (version "1.0")
8819 (source (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "pytest-cache" version))
8822 (sha256
8823 (base32
8824 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8825 (build-system python-build-system)
8826 (propagated-inputs
8827 `(("python-apipkg" ,python-apipkg)
8828 ("python-execnet" ,python-execnet)
8829 ("python-py" ,python-py)
8830 ("python-pytest" ,python-pytest)))
8831 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8832 (description "The pytest-cache plugin provides tools to rerun failures from
8833 the last py.test invocation.")
8834 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8835 (license license:expat)))
8836
8837 (define-public python2-pytest-cache
8838 (package-with-python2 python-pytest-cache))
8839
8840 (define-public python-pytest-localserver
8841 (package
8842 (name "python-pytest-localserver")
8843 (version "0.3.5")
8844 (source (origin
8845 (method url-fetch)
8846 (uri (pypi-uri "pytest-localserver" version))
8847 (sha256
8848 (base32
8849 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8850 (build-system python-build-system)
8851 (arguments
8852 `(#:phases (modify-phases %standard-phases
8853 (replace 'check
8854 (lambda _
8855 (zero? (system* "py.test" "--genscript=runtests.py"))
8856 (zero? (system* "py.test")))))))
8857 (native-inputs
8858 `(("python-pytest" ,python-pytest)
8859 ("python-requests" ,python-requests)
8860 ("python-six" ,python-six)))
8861 (propagated-inputs
8862 `(("python-werkzeug" ,python-werkzeug)))
8863 (synopsis "Py.test plugin to test server connections locally")
8864 (description "Pytest-localserver is a plugin for the pytest testing
8865 framework which enables you to test server connections locally.")
8866 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8867 (license license:expat)))
8868
8869 (define-public python-wsgi-intercept
8870 (package
8871 (name "python-wsgi-intercept")
8872 (version "1.2.2")
8873 (source (origin
8874 (method url-fetch)
8875 (uri (string-append
8876 "https://pypi.python.org/packages/"
8877 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8878 "wsgi_intercept-" version ".tar.gz"))
8879 (sha256
8880 (base32
8881 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8882 (build-system python-build-system)
8883 (propagated-inputs
8884 `(("python-six" ,python-six)))
8885 (native-inputs
8886 `(("python-pytest" ,python-pytest)
8887 ("python-httplib2" ,python-httplib2)
8888 ("python-requests" ,python-requests)
8889 ("python-urllib3" ,python-urllib3)))
8890 (synopsis "Puts a WSGI application in place of a real URI for testing")
8891 (description "Wsgi_intercept installs a WSGI application in place of a real
8892 URI for testing. Testing a WSGI application normally involves starting a
8893 server at a local host and port, then pointing your test code to that address.
8894 Instead, this library lets you intercept calls to any specific host/port
8895 combination and redirect them into a WSGI application importable by your test
8896 program. Thus, you can avoid spawning multiple processes or threads to test
8897 your Web app.")
8898 (home-page "https://github.com/cdent/wsgi-intercept")
8899 (license license:expat)))
8900
8901 (define-public python-pytest-xprocess
8902 (package
8903 (name "python-pytest-xprocess")
8904 (version "0.9.1")
8905 (source (origin
8906 (method url-fetch)
8907 (uri (pypi-uri "pytest-xprocess" version))
8908 (sha256
8909 (base32
8910 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8911 (build-system python-build-system)
8912 (propagated-inputs
8913 `(("python-pytest" ,python-pytest)
8914 ("python-pytest-cache" ,python-pytest-cache)
8915 ("python-psutil" ,python-psutil)))
8916 (synopsis "Pytest plugin to manage external processes across test runs")
8917 (description "Pytest-xprocess is an experimental py.test plugin for managing
8918 processes across test runs.")
8919 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8920 (license license:expat)))
8921
8922 (define-public python-icalendar
8923 (package
8924 (name "python-icalendar")
8925 (version "3.11.4")
8926 (source (origin
8927 (method url-fetch)
8928 (uri (pypi-uri "icalendar" version))
8929 (sha256
8930 (base32
8931 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
8932 (build-system python-build-system)
8933 (propagated-inputs
8934 `(("python-dateutil" ,python-dateutil)
8935 ("python-pytz" ,python-pytz)))
8936 (synopsis "Python library for parsing iCalendar files")
8937 (description "The icalendar package is a parser/generator of iCalendar
8938 files for use with Python.")
8939 (home-page "https://github.com/collective/icalendar")
8940 (license license:bsd-2)))
8941
8942 (define-public python-sphinxcontrib-newsfeed
8943 (package
8944 (name "python-sphinxcontrib-newsfeed")
8945 (version "0.1.4")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8949 (sha256
8950 (base32
8951 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8952 (arguments '(#:tests? #f)) ; No tests.
8953 (build-system python-build-system)
8954 (propagated-inputs
8955 `(("python-sphinx" ,python-sphinx)))
8956 (synopsis "News Feed extension for Sphinx")
8957 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8958 Blog, News or Announcements section to a Sphinx website.")
8959 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8960 (license license:bsd-2)))
8961
8962 (define-public python-args
8963 (package
8964 (name "python-args")
8965 (version "0.1.0")
8966 (source (origin
8967 (method url-fetch)
8968 (uri (pypi-uri "args" version))
8969 (sha256
8970 (base32
8971 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8972 (build-system python-build-system)
8973 (home-page "https://github.com/kennethreitz/args")
8974 (synopsis "Command-line argument parser")
8975 (description
8976 "This library provides a Python module to parse command-line arguments.")
8977 (license license:bsd-3)))
8978
8979 (define-public python2-args
8980 (package-with-python2 python-args))
8981
8982 (define-public python-clint
8983 (package
8984 (name "python-clint")
8985 (version "0.5.1")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "clint" version))
8989 (sha256
8990 (base32
8991 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8992 (build-system python-build-system)
8993 (arguments
8994 '(#:phases
8995 (modify-phases %standard-phases
8996 (replace 'check
8997 (lambda _
8998 (zero? (system* "py.test" "-v")))))))
8999 (native-inputs
9000 `(("python-pytest" ,python-pytest)))
9001 (propagated-inputs
9002 `(("python-args" ,python-args)))
9003 (home-page "https://github.com/kennethreitz/clint")
9004 (synopsis "Command-line interface tools")
9005 (description
9006 "Clint is a Python module filled with a set of tools for developing
9007 command-line applications, including tools for colored and indented
9008 output, progress bar display, and pipes.")
9009 (license license:isc)))
9010
9011 (define-public python2-clint
9012 (package-with-python2 python-clint))
9013
9014 (define-public python-astor
9015 (package
9016 (name "python-astor")
9017 (version "0.5")
9018 (source (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "astor" version))
9021 (sha256
9022 (base32
9023 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9024 (build-system python-build-system)
9025 (home-page "https://github.com/berkerpeksag/astor")
9026 (synopsis "Read and write Python ASTs")
9027 (description
9028 "Astor is designed to allow easy manipulation of Python source via the
9029 Abstract Syntax Tree.")
9030 (license license:bsd-3)))
9031
9032 (define-public python2-astor
9033 (package-with-python2 python-astor))
9034
9035 (define-public python-rply
9036 (package
9037 (name "python-rply")
9038 (version "0.7.4")
9039 (source (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "rply" version))
9042 (sha256
9043 (base32
9044 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9045 (build-system python-build-system)
9046 (propagated-inputs
9047 `(("python-appdirs" ,python-appdirs)))
9048 (home-page "https://github.com/alex/rply")
9049 (synopsis "Parser generator for Python")
9050 (description
9051 "This package provides a pure Python based parser generator, that also
9052 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9053 with a new public API, and RPython support.")
9054 (license license:bsd-3)))
9055
9056 (define-public python2-rply
9057 (package-with-python2 python-rply))
9058
9059 (define-public python-hy
9060 (package
9061 (name "python-hy")
9062 (version "0.11.1")
9063 (source (origin
9064 (method url-fetch)
9065 (uri (pypi-uri "hy" version))
9066 (sha256
9067 (base32
9068 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9069 (build-system python-build-system)
9070 (arguments
9071 '(#:phases
9072 (modify-phases %standard-phases
9073 (replace 'check
9074 (lambda _
9075 ;; Tests require write access to HOME.
9076 (setenv "HOME" "/tmp")
9077 (zero? (system* "nosetests")))))))
9078 (native-inputs
9079 `(("python-coverage" ,python-coverage)
9080 ("python-nose" ,python-nose)))
9081 (propagated-inputs
9082 `(("python-astor" ,python-astor)
9083 ("python-clint" ,python-clint)
9084 ("python-rply" ,python-rply)))
9085 (home-page "http://hylang.org/")
9086 (synopsis "Lisp frontend to Python")
9087 (description
9088 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9089 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9090 Python at your fingertips, in Lisp form.")
9091 (license license:expat)))
9092
9093 (define-public python2-hy
9094 (package-with-python2 python-hy))
9095
9096 (define-public python-rauth
9097 (package
9098 (name "python-rauth")
9099 (version "0.7.3")
9100 (source
9101 (origin
9102 (method url-fetch)
9103 (uri (pypi-uri "rauth" version))
9104 (sha256
9105 (base32
9106 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9107 (build-system python-build-system)
9108 (arguments
9109 `(#:test-target "check"))
9110 (propagated-inputs
9111 `(("python-requests" ,python-requests)))
9112 (home-page "https://github.com/litl/rauth")
9113 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9114 (description
9115 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9116 provides service wrappers for convenient connection initialization and
9117 authenticated session objects providing things like keep-alive.")
9118 (license license:expat)
9119 (properties `((python2-variant . ,(delay python2-rauth))))))
9120
9121 (define-public python2-rauth
9122 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9123 (package
9124 (inherit base)
9125 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9126 ,@(package-native-inputs base))))))
9127
9128 (define-public python2-functools32
9129 (package
9130 (name "python2-functools32")
9131 (version "3.2.3-2")
9132 (source
9133 (origin
9134 (method url-fetch)
9135 (uri (pypi-uri "functools32" version))
9136 (sha256
9137 (base32
9138 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9139 (build-system python-build-system)
9140 (arguments
9141 `(#:python ,python-2
9142 #:tests? #f)) ; no test target
9143 (home-page "https://github.com/MiCHiLU/python-functools32")
9144 (synopsis
9145 "Backport of the functools module from Python 3.2.3")
9146 (description
9147 "This package is a backport of the @code{functools} module from Python
9148 3.2.3 for use with older versions of Python and PyPy.")
9149 (license license:expat)))
9150
9151 (define-public python2-subprocess32
9152 (package
9153 (name "python2-subprocess32")
9154 (version "3.2.7")
9155 (source (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "subprocess32" version))
9158 (sha256
9159 (base32
9160 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9161 (patches
9162 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9163 (build-system python-build-system)
9164 (arguments
9165 `(#:python ,python-2
9166 #:phases
9167 (modify-phases %standard-phases
9168 (add-after 'unpack 'patch-/bin/sh
9169 (lambda _
9170 (substitute* '("subprocess32.py"
9171 "test_subprocess32.py")
9172 (("/bin/sh") (which "sh")))
9173 #t))
9174 (delete 'check)
9175 (add-after 'install 'check
9176 (lambda* (#:key inputs outputs #:allow-other-keys)
9177 ;; For some reason this package fails to import
9178 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9179 ;; directory. Running tests after install is easier.
9180 (add-installed-pythonpath inputs outputs)
9181 (zero? (system* "python" "test_subprocess32.py")))))))
9182 (home-page "https://github.com/google/python-subprocess32")
9183 (synopsis "Backport of the subprocess module from Python 3.2")
9184 (description
9185 "This is a backport of the @code{subprocess} standard library module
9186 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9187 new features. On POSIX systems it is guaranteed to be reliable when used
9188 in threaded applications. It includes timeout support from Python 3.3 but
9189 otherwise matches 3.2’s API.")
9190 (license license:psfl)))
9191
9192 (define-public python2-futures
9193 (package
9194 (name "python2-futures")
9195 (version "3.0.5")
9196 (source
9197 (origin
9198 (method url-fetch)
9199 (uri (pypi-uri "futures" version))
9200 (sha256
9201 (base32
9202 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9203 (build-system python-build-system)
9204 (arguments `(#:python ,python-2))
9205 (home-page "https://github.com/agronholm/pythonfutures")
9206 (synopsis
9207 "Backport of the concurrent.futures package from Python 3.2")
9208 (description
9209 "The concurrent.futures module provides a high-level interface for
9210 asynchronously executing callables. This package backports the
9211 concurrent.futures package from Python 3.2")
9212 (license license:bsd-3)))
9213
9214 (define-public python-promise
9215 (package
9216 (name "python-promise")
9217 (version "0.4.2")
9218 (source
9219 (origin
9220 (method url-fetch)
9221 (uri (pypi-uri "promise" version))
9222 (sha256
9223 (base32
9224 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9225 (build-system python-build-system)
9226 ;; Tests wants python-futures, which is a python2 only program, and
9227 ;; can't be found by python-promise at test time.
9228 (arguments `(#:tests? #f))
9229 (home-page "https://github.com/syrusakbary/promise")
9230 (synopsis "Promises/A+ implementation for Python")
9231 (description
9232 "Promises/A+ implementation for Python")
9233 (properties `((python2-variant . ,(delay python2-promise))))
9234 (license license:expat)))
9235
9236 (define-public python2-promise
9237 (let ((promise (package-with-python2
9238 (strip-python2-variant python-promise))))
9239 (package (inherit promise)
9240 (arguments (substitute-keyword-arguments (package-arguments promise)
9241 ((#:tests? _) #t)))
9242 (native-inputs
9243 `(("python2-futures" ,python2-futures)
9244 ("python2-pytest" ,python2-pytest)
9245 ,@(package-native-inputs promise))))))
9246
9247 (define-public python-urllib3
9248 (package
9249 (name "python-urllib3")
9250 (version "1.18.1")
9251 (source
9252 (origin
9253 (method url-fetch)
9254 (uri (pypi-uri "urllib3" version))
9255 (sha256
9256 (base32
9257 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9258 (build-system python-build-system)
9259 (arguments `(#:tests? #f))
9260 (native-inputs
9261 `(;; some packages for tests
9262 ("python-nose" ,python-nose)
9263 ("python-mock" ,python-mock)
9264 ("python-tornado" ,python-tornado)))
9265 (propagated-inputs
9266 `(;; extra packages for https security
9267 ("python-certifi" ,python-certifi)
9268 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9269 ("python-pyasn1" ,python-pyasn1)
9270 ("python-pyopenssl" ,python-pyopenssl)))
9271 (home-page "https://urllib3.readthedocs.org/")
9272 (synopsis "HTTP library with thread-safe connection pooling")
9273 (description
9274 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9275 can reuse the same socket connection for multiple requests, it can POST files,
9276 supports url redirection and retries, and also gzip and deflate decoding.")
9277 (license license:expat)))
9278
9279 (define-public python2-urllib3
9280 (package-with-python2 python-urllib3))
9281
9282 (define-public python-colorama
9283 (package
9284 (name "python-colorama")
9285 (version "0.3.7")
9286 (source
9287 (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "colorama" version))
9290 (sha256
9291 (base32
9292 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9293 (build-system python-build-system)
9294 (synopsis "Colored terminal text rendering for Python")
9295 (description "Colorama is a Python library for rendering colored terminal
9296 text.")
9297 (home-page "https://pypi.python.org/pypi/colorama")
9298 (license license:bsd-3)))
9299
9300 (define-public python2-colorama
9301 (package-with-python2 python-colorama))
9302
9303 (define-public python-rsa
9304 (package
9305 (name "python-rsa")
9306 (version "3.4.2")
9307 (source
9308 (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "rsa" version))
9311 (sha256
9312 (base32
9313 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9314 (build-system python-build-system)
9315 (propagated-inputs
9316 `(("python-pyasn1" ,python-pyasn1)))
9317 (synopsis "Pure-Python RSA implementation")
9318 (description "Python-RSA is a pure-Python RSA implementation. It supports
9319 encryption and decryption, signing and verifying signatures, and key
9320 generation according to PKCS#1 version 1.5. It can be used as a Python
9321 library as well as on the command line.")
9322 (home-page "http://stuvel.eu/rsa")
9323 (license license:asl2.0)))
9324
9325 (define-public python2-rsa
9326 (package-with-python2 python-rsa))
9327
9328 (define-public python-pluggy
9329 (package
9330 (name "python-pluggy")
9331 (version "0.3.1")
9332 (source
9333 (origin
9334 (method url-fetch)
9335 (uri (pypi-uri "pluggy" version))
9336 (sha256
9337 (base32
9338 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9339 (build-system python-build-system)
9340 (synopsis "Plugin and hook calling mechanism for Python")
9341 (description "Pluggy is an extraction of the plugin manager as used by
9342 Pytest but stripped of Pytest specific details.")
9343 (home-page "https://pypi.python.org/pypi/pluggy")
9344 (license license:expat)))
9345
9346 (define-public python2-pluggy
9347 (package-with-python2 python-pluggy))
9348
9349 (define-public python-tox
9350 (package
9351 (name "python-tox")
9352 (version "2.3.1")
9353 (source
9354 (origin
9355 (method url-fetch)
9356 (uri (pypi-uri "tox" version))
9357 (sha256
9358 (base32
9359 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9360 (build-system python-build-system)
9361 (arguments
9362 ;; FIXME: Tests require pytest-timeout, which itself requires
9363 ;; pytest>=2.8.0 for installation.
9364 '(#:tests? #f))
9365 (propagated-inputs
9366 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9367 ("python-py" ,python-py)
9368 ("python-virtualenv" ,python-virtualenv)))
9369 (native-inputs
9370 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9371 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9372 (home-page "http://tox.testrun.org/")
9373 (synopsis "Virtualenv-based automation of test activities")
9374 (description "Tox is a generic virtualenv management and test command line
9375 tool. It can be used to check that a package installs correctly with
9376 different Python versions and interpreters, or run tests in each type of
9377 supported environment, or act as a frontend to continuous integration
9378 servers.")
9379 (license license:expat)))
9380
9381 (define-public python2-tox
9382 (package-with-python2 python-tox))
9383
9384 (define-public python-jmespath
9385 (package
9386 (name "python-jmespath")
9387 (version "0.9.0")
9388 (source
9389 (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "jmespath" version))
9392 (sha256
9393 (base32
9394 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9395 (build-system python-build-system)
9396 (native-inputs
9397 `(("python-nose" ,python-nose)))
9398 (synopsis "JSON Matching Expressions")
9399 (description "JMESPath (pronounced “james path”) is a Python library that
9400 allows one to declaratively specify how to extract elements from a JSON
9401 document.")
9402 (home-page "https://github.com/jmespath/jmespath.py")
9403 (license license:expat)))
9404
9405 (define-public python2-jmespath
9406 (package-with-python2 python-jmespath))
9407
9408 (define-public python-botocore
9409 (package
9410 (name "python-botocore")
9411 (version "1.5.26")
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "botocore" version))
9416 (sha256
9417 (base32
9418 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9419 (build-system python-build-system)
9420 (arguments
9421 ;; FIXME: Many tests are failing.
9422 '(#:tests? #f))
9423 (propagated-inputs
9424 `(("python-dateutil" ,python-dateutil)
9425 ("python-docutils" ,python-docutils)
9426 ("python-jmespath" ,python-jmespath)))
9427 (native-inputs
9428 `(("python-mock" ,python-mock)
9429 ("python-nose" ,python-nose)
9430 ("behave" ,behave)
9431 ("python-tox" ,python-tox)
9432 ("python-wheel" ,python-wheel)))
9433 (home-page "https://github.com/boto/botocore")
9434 (synopsis "Low-level interface to AWS")
9435 (description "Botocore is a Python library that provides a low-level
9436 interface to the Amazon Web Services (AWS) API.")
9437 (license license:asl2.0)))
9438
9439 (define-public python2-botocore
9440 (package-with-python2 python-botocore))
9441
9442 (define-public awscli
9443 (package
9444 (name "awscli")
9445 (version "1.11.63")
9446 (source
9447 (origin
9448 (method url-fetch)
9449 (uri (pypi-uri name version))
9450 (sha256
9451 (base32
9452 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9453 (build-system python-build-system)
9454 (propagated-inputs
9455 `(("python-colorama" ,python-colorama)
9456 ("python-botocore" ,python-botocore)
9457 ("python-s3transfer" ,python-s3transfer)
9458 ("python-docutils" ,python-docutils)
9459 ("python-pyyaml" ,python-pyyaml)
9460 ("python-rsa" ,python-rsa)))
9461 (arguments
9462 ;; FIXME: The 'pypi' release does not contain tests.
9463 '(#:tests? #f))
9464 (home-page "https://aws.amazon.com/cli/")
9465 (synopsis "Command line client for AWS")
9466 (description "AWS CLI provides a unified command line interface to the
9467 Amazon Web Services (AWS) API.")
9468 (license license:asl2.0)))
9469
9470 (define-public python-hypothesis
9471 (package
9472 (name "python-hypothesis")
9473 (version "3.1.0")
9474 (source (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "hypothesis" version))
9477 (sha256
9478 (base32
9479 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9480 (build-system python-build-system)
9481 (native-inputs
9482 `(("python-flake8" ,python-flake8)
9483 ("python-pytest" ,python-pytest)))
9484 (synopsis "Library for property based testing")
9485 (description "Hypothesis is a library for testing your Python code against a
9486 much larger range of examples than you would ever want to write by hand. It’s
9487 based on the Haskell library, Quickcheck, and is designed to integrate
9488 seamlessly into your existing Python unit testing work flow.")
9489 (home-page "https://github.com/DRMacIver/hypothesis")
9490 (license license:mpl2.0)
9491 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9492
9493 (define-public python2-hypothesis
9494 (let ((hypothesis (package-with-python2
9495 (strip-python2-variant python-hypothesis))))
9496 (package (inherit hypothesis)
9497 (native-inputs
9498 `(("python2-enum34" ,python2-enum34)
9499 ,@(package-native-inputs hypothesis))))))
9500
9501 (define-public python-pytest-subtesthack
9502 (package
9503 (name "python-pytest-subtesthack")
9504 (version "0.1.1")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "pytest-subtesthack" version))
9508 (sha256
9509 (base32
9510 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9511 (build-system python-build-system)
9512 (propagated-inputs
9513 `(("python-pytest" ,python-pytest)))
9514 (synopsis "Set-up and tear-down fixtures for unit tests")
9515 (description "This plugin allows you to set up and tear down fixtures within
9516 unit test functions that use @code{py.test}. This is useful for using
9517 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9518 function multiple times, without setting up or tearing down fixture state as is
9519 normally the case.")
9520 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9521 (license license:unlicense)))
9522
9523 (define-public python2-pytest-subtesthack
9524 (package-with-python2 python-pytest-subtesthack))
9525
9526 (define-public python-xdo
9527 (package
9528 (name "python-xdo")
9529 (version "0.3")
9530 (source (origin
9531 (method url-fetch)
9532 (uri (string-append
9533 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9534 "python-xdo_" version ".orig.tar.gz"))
9535 (sha256
9536 (base32
9537 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9538 (build-system python-build-system)
9539 (arguments
9540 '(#:phases
9541 (modify-phases %standard-phases
9542 (add-before 'install 'patch-libxdo-path
9543 ;; Hardcode the path of dynamically loaded libxdo library.
9544 (lambda* (#:key inputs #:allow-other-keys)
9545 (let ((libxdo (string-append
9546 (assoc-ref inputs "xdotool")
9547 "/lib/libxdo.so")))
9548 (substitute* "xdo/_xdo.py"
9549 (("find_library\\(\"xdo\"\\)")
9550 (simple-format #f "\"~a\"" libxdo)))
9551 #t))))
9552 #:tests? #f)) ; no tests provided
9553 (propagated-inputs
9554 `(("python-six" ,python-six)))
9555 (inputs
9556 `(("xdotool" ,xdotool)
9557 ("libX11" ,libx11)))
9558 (home-page "https://tracker.debian.org/pkg/python-xdo")
9559 (synopsis "Python library for simulating X11 keyboard/mouse input")
9560 (description "Provides bindings to libxdo for manipulating X11 via simulated
9561 input. (Note that this is mostly a legacy library; you may wish to look at
9562 python-xdo for newer bindings.)")
9563 (license license:bsd-3)))
9564
9565 (define-public python2-xdo
9566 (package-with-python2 python-xdo))
9567
9568 (define-public python-wtforms
9569 (package
9570 (name "python-wtforms")
9571 (version "2.1")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (pypi-uri "WTForms" version ".zip"))
9576 (sha256
9577 (base32
9578 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9579 (build-system python-build-system)
9580 (arguments
9581 '(#:phases
9582 (modify-phases %standard-phases
9583 (add-after 'unpack 'remove-django-test
9584 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9585 (lambda _
9586 (substitute*
9587 "tests/runtests.py"
9588 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9589 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9590 #t)))))
9591 (native-inputs
9592 `(("unzip" ,unzip)))
9593 (home-page "http://wtforms.simplecodes.com/")
9594 (synopsis
9595 "Form validation and rendering library for Python web development")
9596 (description
9597 "WTForms is a flexible forms validation and rendering library
9598 for Python web development. It is very similar to the web form API
9599 available in Django, but is a standalone package.")
9600 (license license:bsd-3)))
9601
9602 (define-public python2-wtforms
9603 (package-with-python2 python-wtforms))
9604
9605 (define-public python-mako
9606 (package
9607 (name "python-mako")
9608 (version "1.0.6")
9609 (source
9610 (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "Mako" version))
9613 (sha256
9614 (base32
9615 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9616 (build-system python-build-system)
9617 (propagated-inputs
9618 `(("python-markupsafe" ,python-markupsafe)))
9619 (native-inputs
9620 `(("python-mock" ,python-mock)
9621 ("python-nose" ,python-nose)
9622 ("python-pytest" ,python-pytest)))
9623 (home-page "http://www.makotemplates.org/")
9624 (synopsis "Templating language for Python")
9625 (description "Mako is a templating language for Python that compiles
9626 templates into Python modules.")
9627 (license license:expat)))
9628
9629 (define-public python2-mako
9630 (package-with-python2 python-mako))
9631
9632 (define-public python-waitress
9633 (package
9634 (name "python-waitress")
9635 (version "0.8.10")
9636 (source
9637 (origin
9638 (method url-fetch)
9639 (uri (pypi-uri "waitress" version))
9640 (sha256
9641 (base32
9642 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9643 (build-system python-build-system)
9644 (home-page "https://github.com/Pylons/waitress")
9645 (synopsis "Waitress WSGI server")
9646 (description "Waitress is meant to be a production-quality pure-Python WSGI
9647 server with very acceptable performance.")
9648 (license license:zpl2.1)))
9649
9650 (define-public python2-waitress
9651 (package-with-python2 python-waitress))
9652
9653 (define-public python-wsgiproxy2
9654 (package
9655 (name "python-wsgiproxy2")
9656 (version "0.4.2")
9657 (source
9658 (origin
9659 (method url-fetch)
9660 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9661 (sha256
9662 (base32
9663 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9664 (build-system python-build-system)
9665 (arguments
9666 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9667 ;; support Python 3:
9668 ;; https://github.com/benoitc/restkit/issues/140
9669 #:tests? #f))
9670 (native-inputs
9671 `(("unzip" ,unzip)
9672 ("python-nose" ,python-nose)
9673 ("python-coverage" ,python-coverage)))
9674 (propagated-inputs
9675 `(("python-six" ,python-six)
9676 ("python-webob" ,python-webob)))
9677 (home-page
9678 "https://github.com/gawel/WSGIProxy2/")
9679 (synopsis "WSGI Proxy with various http client backends")
9680 (description "WSGI turns HTTP requests into WSGI function calls.
9681 WSGIProxy turns WSGI function calls into HTTP requests.
9682 It also includes code to sign requests and pass private data,
9683 and to spawn subprocesses to handle requests.")
9684 (license license:expat)))
9685
9686 (define-public python2-wsgiproxy2
9687 (package-with-python2 python-wsgiproxy2))
9688
9689 (define-public python-pastedeploy
9690 (package
9691 (name "python-pastedeploy")
9692 (version "1.5.2")
9693 (source
9694 (origin
9695 (method url-fetch)
9696 (uri (pypi-uri "PasteDeploy" version))
9697 (sha256
9698 (base32
9699 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9700 (build-system python-build-system)
9701 (native-inputs
9702 `(("python-nose" ,python-nose)))
9703 (home-page "http://pythonpaste.org/deploy/")
9704 (synopsis
9705 "Load, configure, and compose WSGI applications and servers")
9706 (description
9707 "This tool provides code to load WSGI applications and servers from URIs;
9708 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9709 Script provides commands to serve applications based on this configuration
9710 file.")
9711 (license license:expat)))
9712
9713 (define-public python2-pastedeploy
9714 (package-with-python2 python-pastedeploy))
9715
9716 (define-public python-paste
9717 (package
9718 (name "python-paste")
9719 (version "2.0.3")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "Paste" version))
9724 (sha256
9725 (base32
9726 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9727 (patches (search-patches "python-paste-remove-website-test.patch"
9728 "python-paste-remove-timing-test.patch"))))
9729 (build-system python-build-system)
9730 (native-inputs
9731 `(("python-nose" ,python-nose)))
9732 (propagated-inputs
9733 `(("python-six" ,python-six)))
9734 (home-page "http://pythonpaste.org")
9735 (synopsis
9736 "Python web development tools, focusing on WSGI")
9737 (description
9738 "Paste provides a variety of web development tools and middleware which
9739 can be nested together to build web applications. Paste's design closely
9740 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9741 (license license:expat)))
9742
9743 (define-public python2-paste
9744 (package-with-python2 python-paste))
9745
9746 (define-public python-pastescript
9747 (package
9748 (name "python-pastescript")
9749 (version "2.0.2")
9750 (source
9751 (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "PasteScript" version))
9754 (sha256
9755 (base32
9756 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9757 (build-system python-build-system)
9758 (native-inputs
9759 `(("python-nose" ,python-nose)))
9760 (propagated-inputs
9761 `(("python-paste" ,python-paste)
9762 ("python-pastedeploy" ,python-pastedeploy)))
9763 (home-page "http://pythonpaste.org/script/")
9764 (arguments
9765 '(;; Unfortunately, this requires the latest unittest2,
9766 ;; but that requires traceback2 which requires linecache2 which requires
9767 ;; unittest2. So we're skipping tests for now.
9768 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9769 ;; so in theory we could get around this situation somehow.)
9770 #:tests? #f))
9771 (synopsis
9772 "Pluggable command line tool for serving web applications and more")
9773 (description
9774 "PasteScript is a plugin-friendly command line tool which provides a
9775 variety of features, from launching web applications to bootstrapping project
9776 layouts.")
9777 (license license:expat)))
9778
9779 (define-public python2-pastescript
9780 (package-with-python2 python-pastescript))
9781
9782 (define-public python-pyquery
9783 (package
9784 (name "python-pyquery")
9785 (version "1.2.17")
9786 (source
9787 (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "pyquery" version))
9790 (sha256
9791 (base32
9792 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9793 (build-system python-build-system)
9794 (native-inputs
9795 `(("python-webob" ,python-webob)
9796 ("python-webtest" ,python-webtest)))
9797 (propagated-inputs
9798 `(("python-lxml" ,python-lxml)
9799 ("python-cssselect" ,python-cssselect)))
9800 (home-page "https://github.com/gawel/pyquery")
9801 (synopsis "Make jQuery-like queries on xml documents")
9802 (description "pyquery allows you to make jQuery queries on xml documents.
9803 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9804 fast xml and html manipulation.")
9805 (license license:bsd-3)))
9806
9807 (define-public python2-pyquery
9808 (package-with-python2 python-pyquery))
9809
9810 (define-public python-webtest
9811 (package
9812 (name "python-webtest")
9813 (version "2.0.20")
9814 (source
9815 (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "WebTest" version))
9818 (sha256
9819 (base32
9820 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9821 (build-system python-build-system)
9822 (arguments
9823 `(;; Unfortunately we have to disable tests!
9824 ;; This release of WebTest is pinned to python-nose < 1.3,
9825 ;; but older versions of python-nose are plagued with the following
9826 ;; bug(s), which rears its ugly head during test execution:
9827 ;; https://github.com/nose-devs/nose/issues/759
9828 ;; https://github.com/nose-devs/nose/pull/811
9829 #:tests? #f))
9830 ;; Commented out code is no good, but in this case, once tests
9831 ;; are ready to be enabled again, we should put the following
9832 ;; in place:
9833 ;; (native-inputs
9834 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9835 ;; ; but see above comment
9836 ;; ("python-coverage" ,python-coverage)
9837 ;; ("python-mock" ,python-mock)
9838 ;; ("python-pastedeploy" ,python-pastedeploy)
9839 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9840 ;; ("python-pyquery" ,python-pyquery)))
9841 (propagated-inputs
9842 `(("python-waitress" ,python-waitress)
9843 ("python-webob" ,python-webob)
9844 ("python-six" ,python-six)
9845 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9846 (home-page "http://webtest.pythonpaste.org/")
9847 (synopsis "Helper to test WSGI applications")
9848 (description "Webtest allows you to test your Python web applications
9849 without starting an HTTP server. It supports anything that supports the
9850 minimum of WSGI.")
9851 (license license:expat)))
9852
9853 (define-public python2-webtest
9854 (package-with-python2 python-webtest))
9855
9856 (define-public python-anyjson
9857 (package
9858 (name "python-anyjson")
9859 (version "0.3.3")
9860 (source
9861 (origin
9862 (method url-fetch)
9863 (uri (pypi-uri "anyjson" version))
9864 (sha256
9865 (base32
9866 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9867 (build-system python-build-system)
9868 (arguments
9869 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9870 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9871 ;; whatever) so this transformation needs to be done before the tests
9872 ;; can be run. Maybe we could add a build step to transform beforehand
9873 ;; but it could be annoying/difficult.
9874 ;; We can enable tests for the Python 2 version, though, and do below.
9875 #:tests? #f))
9876 (home-page "http://bitbucket.org/runeh/anyjson/")
9877 (synopsis
9878 "Wraps best available JSON implementation in a common interface")
9879 (description
9880 "Anyjson loads whichever is the fastest JSON module installed
9881 and provides a uniform API regardless of which JSON implementation is used.")
9882 (license license:bsd-3)
9883 (properties `((python2-variant . ,(delay python2-anyjson))))))
9884
9885 (define-public python2-anyjson
9886 (let ((anyjson (package-with-python2
9887 (strip-python2-variant python-anyjson))))
9888 (package
9889 (inherit anyjson)
9890 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9891 #:tests? #t
9892 ,@(package-arguments anyjson)))
9893 (native-inputs `(("python2-nose" ,python2-nose))))))
9894
9895 (define-public python-amqp
9896 (package
9897 (name "python-amqp")
9898 (version "1.4.9")
9899 (source
9900 (origin
9901 (method url-fetch)
9902 (uri (pypi-uri "amqp" version))
9903 (sha256
9904 (base32
9905 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9906 (build-system python-build-system)
9907 (native-inputs
9908 `(("python-nose" ,python-nose)
9909 ("python-mock" ,python-mock)))
9910 (home-page "https://github.com/celery/py-amqp")
9911 (synopsis
9912 "Low-level AMQP client for Python (fork of amqplib)")
9913 (description
9914 "This is a fork of amqplib which was originally written by Barry Pederson.
9915 It is maintained by the Celery project, and used by kombu as a pure python
9916 alternative when librabbitmq is not available.")
9917 (license license:lgpl2.1+)
9918 (properties `((python2-variant . ,(delay python2-amqp))))))
9919
9920 (define-public python2-amqp
9921 (let ((amqp (package-with-python2
9922 (strip-python2-variant python-amqp))))
9923 (package
9924 (inherit amqp)
9925 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9926 ;; unmaintained. Weirdly, does not do this on the python 3
9927 ;; version?
9928 #:tests? #f
9929 ,@(package-arguments amqp))))))
9930
9931 (define-public python-kombu
9932 (package
9933 (name "python-kombu")
9934 (version "3.0.37")
9935 (source
9936 (origin
9937 (method url-fetch)
9938 (uri (pypi-uri "kombu" version))
9939 (sha256
9940 (base32
9941 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9942 (build-system python-build-system)
9943 (native-inputs
9944 `(("python-mock" ,python-mock)
9945 ("python-nose" ,python-nose)))
9946 (propagated-inputs
9947 `(("python-anyjson" ,python-anyjson)
9948 ("python-amqp" ,python-amqp)
9949 ("python-redis" ,python-redis)))
9950 (home-page "http://kombu.readthedocs.org")
9951 (synopsis "Message passing library for Python")
9952 (description "The aim of Kombu is to make messaging in Python as easy as
9953 possible by providing an idiomatic high-level interface for the AMQ protocol,
9954 and also provide proven and tested solutions to common messaging problems.
9955 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9956 message orientation, queuing, routing, reliability and security, for which the
9957 RabbitMQ messaging server is the most popular implementation.")
9958 (license license:bsd-3)
9959 (properties `((python2-variant . ,(delay python2-kombu))))))
9960
9961 (define-public python2-kombu
9962 (let ((kombu (package-with-python2
9963 (strip-python2-variant python-kombu))))
9964 (package
9965 (inherit kombu)
9966 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9967 ;; It works fine on the python3 variant.
9968 #:tests? #f
9969 ,@(package-arguments kombu)))
9970 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9971 ,@(package-native-inputs kombu))))))
9972
9973 (define-public python-billiard
9974 (package
9975 (name "python-billiard")
9976 (version "3.3.0.23")
9977 (source
9978 (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "billiard" version))
9981 (sha256
9982 (base32
9983 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9984 (build-system python-build-system)
9985 (native-inputs
9986 `(("python-nose" ,python-nose)))
9987 (home-page "https://github.com/celery/billiard")
9988 (synopsis
9989 "Python multiprocessing fork with improvements and bugfixes")
9990 (description
9991 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9992 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9993 pyprocessing package. This standalone variant is intended to be compatible with
9994 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9995 (license license:bsd-3)
9996 (properties `((python2-variant . ,(delay python2-billiard))))))
9997
9998 (define-public python2-billiard
9999 (let ((billiard (package-with-python2
10000 (strip-python2-variant python-billiard))))
10001 (package
10002 (inherit billiard)
10003 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10004 ("python2-mock" ,python2-mock)
10005 ,@(package-native-inputs billiard))))))
10006
10007 (define-public python-celery
10008 (package
10009 (name "python-celery")
10010 (version "3.1.24")
10011 (source
10012 (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "celery" version))
10015 (sha256
10016 (base32
10017 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10018 (build-system python-build-system)
10019 (arguments
10020 `(#:phases
10021 (modify-phases %standard-phases
10022 ;; These tests break with Python 3.5:
10023 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10024 (replace 'check
10025 (lambda _
10026 (zero?
10027 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10028 (native-inputs
10029 `(("python-nose" ,python-nose)))
10030 (propagated-inputs
10031 `(("python-pytz" ,python-pytz)
10032 ("python-billiard" ,python-billiard)
10033 ("python-kombu" ,python-kombu)))
10034 (home-page "http://celeryproject.org")
10035 (synopsis "Distributed Task Queue")
10036 (description "Celery is an asynchronous task queue/job queue based on
10037 distributed message passing. It is focused on real-time operation, but
10038 supports scheduling as well. The execution units, called tasks, are executed
10039 concurrently on a single or more worker servers using multiprocessing,
10040 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10041 synchronously (wait until ready).")
10042 (license license:bsd-3)
10043 (properties `((python2-variant . ,(delay python2-celery))))))
10044
10045 (define-public python2-celery
10046 (let ((celery (package-with-python2
10047 (strip-python2-variant python-celery))))
10048 (package
10049 (inherit celery)
10050 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10051 ("python2-mock" ,python2-mock)
10052 ,@(package-native-inputs celery))))))
10053
10054 (define-public python-translitcodec
10055 (package
10056 (name "python-translitcodec")
10057 (version "0.4.0")
10058 (source
10059 (origin
10060 (method url-fetch)
10061 (uri (pypi-uri "translitcodec" version))
10062 (sha256
10063 (base32
10064 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10065 (build-system python-build-system)
10066 (arguments
10067 `(#:tests? #f)) ; no tests provided
10068 (home-page
10069 "https://github.com/claudep/translitcodec")
10070 (synopsis
10071 "Unicode to 8-bit charset transliteration codec")
10072 (description
10073 "This package contains codecs for transliterating ISO 10646 texts into
10074 best-effort representations using smaller coded character sets (ASCII,
10075 ISO 8859, etc.).")
10076 (license license:expat)))
10077
10078 (define-public python2-translitcodec
10079 (package-with-python2 python-translitcodec))
10080
10081 (define-public python-editor
10082 (package
10083 (name "python-editor")
10084 (version "0.5")
10085 (source
10086 (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "python-editor" version))
10089 (sha256
10090 (base32
10091 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10092 (build-system python-build-system)
10093 (home-page
10094 "https://github.com/fmoo/python-editor")
10095 (synopsis
10096 "Programmatically open an editor, capture the result")
10097 (description
10098 "python-editor is a library that provides the editor module for
10099 programmatically interfacing with your system's $EDITOR.")
10100 (license license:asl2.0)))
10101
10102 (define-public python2-editor
10103 (package-with-python2 python-editor))
10104
10105 (define-public python-sphinxcontrib-programoutput
10106 (package
10107 (name "python-sphinxcontrib-programoutput")
10108 (version "0.10")
10109 (source (origin
10110 (method url-fetch)
10111 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10112 (sha256
10113 (base32
10114 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10115 (build-system python-build-system)
10116 (arguments
10117 ;; FIXME: Many tests are failing and the upstream is gone.
10118 '(#:tests? #f))
10119 (propagated-inputs
10120 `(("python-sphinx" ,python-sphinx)))
10121 (synopsis "Sphinx extension to include program output")
10122 (description "A Sphinx extension to literally insert the output of arbitrary
10123 commands into documents, helping you to keep your command examples up to date.")
10124 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10125 (license license:bsd-2)))
10126
10127 (define-public python2-sphinxcontrib-programoutput
10128 (package-with-python2 python-sphinxcontrib-programoutput))
10129
10130 (define-public python-sphinx-repoze-autointerface
10131 (package
10132 (name "python-sphinx-repoze-autointerface")
10133 (version "0.8")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10137 (sha256
10138 (base32
10139 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10140 (build-system python-build-system)
10141 (arguments '(#:tests? #f)) ; No tests.
10142 (propagated-inputs
10143 `(("python-sphinx" ,python-sphinx)
10144 ("python-zope-interface" ,python-zope-interface)))
10145 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10146 (description "This package defines an extension for the Sphinx documentation
10147 system. The extension allows generation of API documentation by
10148 introspection of @code{zope.interface} instances in code.")
10149 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10150 (license license:repoze)))
10151
10152 (define-public python2-sphinx-repoze-autointerface
10153 (package-with-python2 python-sphinx-repoze-autointerface))
10154
10155 (define-public python-psycopg2
10156 (package
10157 (name "python-psycopg2")
10158 (version "2.6.2")
10159 (source
10160 (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "psycopg2" version))
10163 (sha256
10164 (base32
10165 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10166 (build-system python-build-system)
10167 (arguments
10168 ;; Tests would require a postgresql database "psycopg2_test"
10169 ;; and a running postgresql database management service.
10170 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10171 (inputs
10172 `(("postgresql" ,postgresql))) ; libpq
10173 (home-page "http://initd.org/psycopg/")
10174 (synopsis "Python PostgreSQL adapter")
10175 (description
10176 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10177 (license license:lgpl3+)))
10178
10179 (define-public python2-psycopg2
10180 (package-with-python2 python-psycopg2))
10181
10182 (define-public python-vobject
10183 (package
10184 (name "python-vobject")
10185 (version "0.9.2")
10186 (source (origin
10187 (method url-fetch)
10188 (uri (pypi-uri "vobject" version))
10189 (sha256
10190 (base32
10191 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10192 (build-system python-build-system)
10193 (arguments
10194 '(;; The test suite relies on some non-portable Windows interfaces.
10195 #:tests? #f))
10196 (propagated-inputs
10197 `(("python-dateutil" ,python-dateutil)
10198 ("python-pyicu" ,python-pyicu)))
10199 (synopsis "Parse and generate vCard and vCalendar files")
10200 (description "Vobject is intended to be a full featured Python package for
10201 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10202 are supported and well tested. vCard 3.0 files are supported, and all data
10203 should be imported, but only a few components are understood in a sophisticated
10204 way.")
10205 (home-page "http://eventable.github.io/vobject/")
10206 (license license:asl2.0)))
10207
10208 (define-public python2-vobject
10209 (package-with-python2 python-vobject))
10210
10211 (define-public python-munkres
10212 (package
10213 (name "python-munkres")
10214 (version "1.0.8")
10215 (source (origin
10216 (method url-fetch)
10217 (uri (pypi-uri "munkres" version))
10218 (sha256
10219 (base32
10220 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10221 (build-system python-build-system)
10222 (arguments
10223 '(#:tests? #f)) ; no test suite
10224 (home-page "http://software.clapper.org/munkres/")
10225 (synopsis "Implementation of the Munkres algorithm")
10226 (description "The Munkres module provides an implementation of the Munkres
10227 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10228 useful for solving the Assignment Problem.")
10229 (license license:bsd-3)))
10230
10231 (define-public python2-munkres
10232 (package-with-python2 python-munkres))
10233
10234 (define-public python-flask
10235 (package
10236 (name "python-flask")
10237 (version "0.11.1")
10238 (source (origin
10239 (method url-fetch)
10240 (uri (pypi-uri "Flask" version))
10241 (sha256
10242 (base32
10243 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10244 (build-system python-build-system)
10245 (propagated-inputs
10246 `(("python-itsdangerous" ,python-itsdangerous)
10247 ("python-jinja2" ,python-jinja2)
10248 ("python-click" ,python-click)
10249 ("python-werkzeug" ,python-werkzeug)))
10250 (home-page "https://github.com/mitsuhiko/flask/")
10251 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10252 (description "Flask is a micro web framework based on the Werkzeug toolkit
10253 and Jinja2 template engine. It is called a micro framework because it does not
10254 presume or force a developer to use a particular tool or library.")
10255 (license license:bsd-3)))
10256
10257 (define-public python2-flask
10258 (package-with-python2 python-flask))
10259
10260 (define-public python-flask-wtf
10261 (package
10262 (name "python-flask-wtf")
10263 (version "0.13.1")
10264 (source
10265 (origin
10266 (method url-fetch)
10267 (uri (pypi-uri "Flask-WTF" version))
10268 (sha256
10269 (base32
10270 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10271 (build-system python-build-system)
10272 (arguments
10273 '(#:phases
10274 (modify-phases %standard-phases
10275 (add-before 'check 'drop-failing-test
10276 (lambda _
10277 ;; FIXME: This file tries resolving an external server, which
10278 ;; fails. Try to patch out the offending section instead of
10279 ;; deleting the whole thing.
10280 (delete-file "tests/test_recaptcha.py")
10281 #t)))))
10282 (propagated-inputs
10283 `(("python-flask-babel" ,python-flask-babel)
10284 ("python-babel" ,python-babel)
10285 ("python-wtforms" ,python-wtforms)))
10286 (native-inputs
10287 `(("python-nose" ,python-nose)))
10288 (home-page "https://github.com/lepture/flask-wtf")
10289 (synopsis "Simple integration of Flask and WTForms")
10290 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10291 upload, and reCAPTCHA.")
10292 (license license:bsd-3)))
10293
10294 (define-public python2-flask-wtf
10295 (package-with-python2 python-flask-wtf))
10296
10297 (define-public python-flask-multistatic
10298 (package
10299 (name "python-flask-multistatic")
10300 (version "1.0")
10301 (source
10302 (origin
10303 (method url-fetch)
10304 (uri (pypi-uri "flask-multistatic" version))
10305 (sha256
10306 (base32
10307 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10308 (build-system python-build-system)
10309 (propagated-inputs
10310 `(("python-flask" ,python-flask)))
10311 (home-page "https://pagure.io/flask-multistatic")
10312 (synopsis "Flask plugin to allow overriding static files")
10313 (description "@code{flask-multistatic} is a flask plugin that adds support
10314 for overriding static files.")
10315 (license license:gpl3+)))
10316
10317 (define-public python2-flask-multistatic
10318 (package-with-python2 python-flask-multistatic))
10319
10320 (define-public python-cookies
10321 (package
10322 (name "python-cookies")
10323 (version "2.2.1")
10324 (source (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "cookies" version))
10327 (sha256
10328 (base32
10329 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10330 (build-system python-build-system)
10331 (arguments
10332 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10333 #:tests? #f))
10334 (native-inputs
10335 `(("python-pytest" ,python2-pytest)))
10336 (synopsis "HTTP cookie parser and renderer")
10337 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10338 Python.")
10339 (home-page "https://gitlab.com/sashahart/cookies")
10340 (license license:expat)))
10341
10342 (define-public python2-cookies
10343 (package-with-python2 python-cookies))
10344
10345 (define-public python-responses
10346 (package
10347 (name "python-responses")
10348 (version "0.5.1")
10349 (source (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "responses" version))
10352 (sha256
10353 (base32
10354 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10355 (build-system python-build-system)
10356 (arguments
10357 `(;; Test suite is not distributed:
10358 ;; https://github.com/getsentry/responses/issues/38
10359 #:tests? #f))
10360 (native-inputs
10361 `(("python-mock" ,python-mock)))
10362 (propagated-inputs
10363 `(("python-requests" ,python-requests)
10364 ("python-cookies" ,python-cookies)
10365 ("python-six" ,python-six)))
10366 (home-page "https://github.com/getsentry/responses")
10367 (synopsis "Utility for mocking out the `requests` Python library")
10368 (description "A utility library for mocking out the `requests` Python
10369 library.")
10370 (license license:asl2.0)))
10371
10372 (define-public python2-responses
10373 (package-with-python2 python-responses))
10374
10375 (define-public python-whoosh
10376 (package
10377 (name "python-whoosh")
10378 (version "2.7.4")
10379 (source
10380 (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "Whoosh" version))
10383 (sha256
10384 (base32
10385 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10386 (build-system python-build-system)
10387 (native-inputs
10388 `(("python-pytest" ,python-pytest)))
10389 (home-page "http://bitbucket.org/mchaput/whoosh")
10390 (synopsis "Full text indexing, search, and spell checking library")
10391 (description
10392 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10393 checking library.")
10394 (license license:bsd-2)))
10395
10396 (define-public python2-whoosh
10397 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10398 (package (inherit whoosh)
10399 (propagated-inputs
10400 `(("python2-backport-ssl-match-hostname"
10401 ,python2-backport-ssl-match-hostname)
10402 ,@(package-propagated-inputs whoosh))))))
10403
10404 (define-public python-pathlib
10405 (package
10406 (name "python-pathlib")
10407 (version "1.0.1")
10408 (source (origin
10409 (method url-fetch)
10410 (uri (pypi-uri "pathlib" version))
10411 (sha256
10412 (base32
10413 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10414 (build-system python-build-system)
10415 ;; The tests depend on the internal "test" module, which does not provide
10416 ;; a stable interface.
10417 (arguments `(#:tests? #f))
10418 (home-page "https://pathlib.readthedocs.org/")
10419 (synopsis "Object-oriented file system paths")
10420 (description "Pathlib offers a set of classes to handle file system paths.
10421 It offers the following advantages over using string objects:
10422
10423 @enumerate
10424 @item No more cumbersome use of os and os.path functions. Everything can
10425 be done easily through operators, attribute accesses, and method calls.
10426 @item Embodies the semantics of different path types. For example,
10427 comparing Windows paths ignores casing.
10428 @item Well-defined semantics, eliminating any inconsistencies or
10429 ambiguities (forward vs. backward slashes, etc.).
10430 @end enumerate
10431
10432 Note: In Python 3.4, pathlib is now part of the standard library. For other
10433 Python versions please consider python-pathlib2 instead, which tracks the
10434 standard library module. This module (python-pathlib) isn't maintained
10435 anymore.")
10436 (license license:expat)))
10437
10438 (define-public python2-pathlib
10439 (package-with-python2 python-pathlib))
10440
10441 (define-public python2-pathlib2
10442 (package
10443 (name "python2-pathlib2")
10444 (version "2.1.0")
10445 (source (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "pathlib2" version))
10448 (sha256
10449 (base32
10450 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10451 (build-system python-build-system)
10452 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10453 ;; version is 3.4 which already includes this package as part of the
10454 ;; standard library.
10455 (arguments
10456 `(#:python ,python-2))
10457 (native-inputs
10458 `(("python2-six" ,python2-six)))
10459 (home-page "http://pypi.python.org/pypi/pathlib2/")
10460 (synopsis "Object-oriented file system paths - backport of standard
10461 pathlib module")
10462 (description "The goal of pathlib2 is to provide a backport of standard
10463 pathlib module which tracks the standard library module, so all the newest
10464 features of the standard pathlib can be used also on older Python versions.
10465
10466 Pathlib offers a set of classes to handle file system paths. It offers the
10467 following advantages over using string objects:
10468
10469 @enumerate
10470 @item No more cumbersome use of os and os.path functions. Everything can
10471 be done easily through operators, attribute accesses, and method calls.
10472 @item Embodies the semantics of different path types. For example,
10473 comparing Windows paths ignores casing.
10474 @item Well-defined semantics, eliminating any inconsistencies or
10475 ambiguities (forward vs. backward slashes, etc.).
10476 @end enumerate")
10477 (license license:expat)))
10478
10479 (define-public python-jellyfish
10480 (package
10481 (name "python-jellyfish")
10482 (version "0.5.6")
10483 (source (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "jellyfish" version))
10486 (sha256
10487 (base32
10488 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10489 (build-system python-build-system)
10490 (native-inputs
10491 `(("python-pytest" ,python-pytest)))
10492 (home-page "https://github.com/jamesturk/jellyfish")
10493 (synopsis "Approximate and phonetic matching of strings")
10494 (description "Jellyfish uses a variety of string comparison and phonetic
10495 encoding algorithms to do fuzzy string matching.")
10496 (license license:bsd-2)
10497 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10498
10499 (define-public python2-jellyfish
10500 (let ((jellyfish (package-with-python2
10501 (strip-python2-variant python-jellyfish))))
10502 (package (inherit jellyfish)
10503 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10504 ,@(package-native-inputs jellyfish))))))
10505
10506 (define-public python2-unicodecsv
10507 (package
10508 (name "python2-unicodecsv")
10509 (version "0.14.1")
10510 (source (origin
10511 (method url-fetch)
10512 ;; The test suite is not included in the PyPi release.
10513 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10514 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10515 "archive/" version ".tar.gz"))
10516 (file-name (string-append name "-" version ".tar.gz"))
10517 (sha256
10518 (base32
10519 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10520 (build-system python-build-system)
10521 (arguments
10522 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10523 #:python ,python-2))
10524 (native-inputs
10525 `(("python2-unittest2" ,python2-unittest2)))
10526 (home-page "https://github.com/jdunck/python-unicodecsv")
10527 (synopsis "Unicode CSV module for Python 2")
10528 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10529 module, adding support for Unicode strings.")
10530 (license license:bsd-2)))
10531
10532 (define-public python-rarfile
10533 (package
10534 (name "python-rarfile")
10535 (version "2.8")
10536 (source (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "rarfile" version))
10539 (sha256
10540 (base32
10541 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10542 (build-system python-build-system)
10543 (arguments
10544 '(#:phases
10545 (modify-phases %standard-phases
10546 (replace 'check
10547 ;; Many tests fail, but the installation proceeds.
10548 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10549 (native-inputs
10550 `(("which" ,which))) ; required for tests
10551 (propagated-inputs
10552 `(("libarchive" ,libarchive)))
10553 (home-page "https://github.com/markokr/rarfile")
10554 (synopsis "RAR archive reader for Python")
10555 (description "This is Python module for RAR archive reading. The interface
10556 is made as zipfile like as possible.")
10557 (license license:isc)))
10558
10559 (define-public python2-rarfile
10560 (package-with-python2 python-rarfile))
10561
10562 (define-public python-magic
10563 (package
10564 (name "python-magic")
10565 (version "0.4.3")
10566 (source
10567 (origin
10568 (method url-fetch)
10569 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10570 version ".tar.gz"))
10571 (sha256
10572 (base32
10573 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10574 (file-name (string-append name "-" version "-checkout"))))
10575 (build-system python-build-system)
10576 (arguments
10577 ;; The tests are unreliable, so don't run them. The tests fail
10578 ;; under Python3 because they were written for Python2 and
10579 ;; contain import statements that do not work in Python3. One of
10580 ;; the tests fails under Python2 because its assertions are
10581 ;; overly stringent; it relies on comparing output strings which
10582 ;; are brittle and can change depending on the version of
10583 ;; libmagic being used and the system on which the test is
10584 ;; running. In my case, under GuixSD 0.10.0, only one test
10585 ;; failed, and it seems to have failed only because the version
10586 ;; of libmagic that is packaged in Guix outputs a slightly
10587 ;; different (but not wrong) string than the one that the test
10588 ;; expected.
10589 '(#:tests? #f
10590 #:phases (modify-phases %standard-phases
10591 ;; Replace a specific method call with a hard-coded
10592 ;; path to the necessary libmagic.so file in the
10593 ;; store. If we don't do this, then the method call
10594 ;; will fail to find the libmagic.so file, which in
10595 ;; turn will cause any application using
10596 ;; python-magic to fail.
10597 (add-before 'build 'hard-code-path-to-libmagic
10598 (lambda* (#:key inputs #:allow-other-keys)
10599 (let ((file (assoc-ref inputs "file")))
10600 (substitute* "magic.py"
10601 (("ctypes.util.find_library\\('magic'\\)")
10602 (string-append "'" file "/lib/libmagic.so'")))
10603 #t)))
10604 (add-before 'install 'disable-egg-compression
10605 (lambda _
10606 (let ((port (open-file "setup.cfg" "a")))
10607 (display "\n[easy_install]\nzip_ok = 0\n"
10608 port)
10609 (close-port port)
10610 #t))))))
10611 (inputs
10612 ;; python-magic needs to be able to find libmagic.so.
10613 `(("file" ,file)))
10614 (home-page "https://github.com/ahupp/python-magic")
10615 (synopsis "File type identification using libmagic")
10616 (description
10617 "This module uses ctypes to access the libmagic file type
10618 identification library. It makes use of the local magic database and
10619 supports both textual and MIME-type output. Note that this module and
10620 the python-file module both provide a \"magic.py\" file; these two
10621 modules, which are different and were developed separately, both serve
10622 the same purpose: to provide Python bindings for libmagic.")
10623 (license license:expat)))
10624
10625 (define-public python2-magic
10626 (package-with-python2 python-magic))
10627
10628 (define-public python2-s3cmd
10629 (package
10630 (name "python2-s3cmd")
10631 (version "1.6.1")
10632 (source
10633 (origin
10634 (method url-fetch)
10635 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10636 "s3cmd-" version ".tar.gz"))
10637 (sha256
10638 (base32
10639 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10640 (build-system python-build-system)
10641 (arguments
10642 ;; s3cmd is written for python2 only and contains no tests.
10643 `(#:python ,python-2
10644 #:tests? #f))
10645 (propagated-inputs
10646 `(("python2-dateutil" ,python2-dateutil)
10647 ;; The python-file package also provides a magic.py module.
10648 ;; This is an unfortunate state of affairs; however, s3cmd
10649 ;; fails to install if it cannot find specifically the
10650 ;; python-magic package. Thus we include it, instead of using
10651 ;; python-file. Ironically, s3cmd sometimes works better
10652 ;; without libmagic bindings at all:
10653 ;; https://github.com/s3tools/s3cmd/issues/198
10654 ("python2-magic" ,python2-magic)))
10655 (home-page "http://s3tools.org/s3cmd")
10656 (synopsis "Command line tool for S3-compatible storage services")
10657 (description
10658 "S3cmd is a command line tool for uploading, retrieving and managing data
10659 in storage services that are compatible with the Amazon Simple Storage
10660 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10661 GnuPG encryption, and more. It also supports management of Amazon's
10662 CloudFront content delivery network.")
10663 (license license:gpl2+)))
10664
10665 (define-public python-pkgconfig
10666 (package
10667 (name "python-pkgconfig")
10668 (version "1.1.0")
10669 (source
10670 (origin
10671 (method url-fetch)
10672 (uri (pypi-uri "pkgconfig" version))
10673 (sha256
10674 (base32
10675 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10676 (build-system python-build-system)
10677 (native-inputs
10678 `(("python-nose" ,python-nose)))
10679 (inputs
10680 `(("pkg-config" ,pkg-config)))
10681 (arguments
10682 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10683 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10684 #:tests? #f
10685 ;; Hard-code the path to pkg-config.
10686 #:phases
10687 (modify-phases %standard-phases
10688 (add-before
10689 'build 'patch
10690 (lambda _
10691 (substitute* "pkgconfig/pkgconfig.py"
10692 (("cmd = 'pkg-config")
10693 (string-append "cmd = '" (which "pkg-config"))))
10694 #t)))))
10695 (home-page "https://github.com/matze/pkgconfig")
10696 (synopsis "Python interface for pkg-config")
10697 (description "This module provides a Python interface to pkg-config. It
10698 can be used to find all pkg-config packages, check if a package exists,
10699 check if a package meets certain version requirements, query CFLAGS and
10700 LDFLAGS and parse the output to build extensions with setup.py.")
10701 (license license:expat)))
10702
10703 (define-public python2-pkgconfig
10704 (package-with-python2 python-pkgconfig))
10705
10706 (define-public python-bz2file
10707 (package
10708 (name "python-bz2file")
10709 (version "0.98")
10710 (source
10711 (origin
10712 (method url-fetch)
10713 (uri (pypi-uri "bz2file" version))
10714 (sha256
10715 (base32
10716 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10717 (build-system python-build-system)
10718 (arguments
10719 `(#:tests? #f)) ; Tests use deprecated python modules.
10720 (home-page "https://github.com/nvawda/bz2file")
10721 (synopsis "Read and write bzip2-compressed files")
10722 (description
10723 "Bz2file is a Python library for reading and writing bzip2-compressed
10724 files. It contains a drop-in replacement for the I/O interface in the
10725 standard library's @code{bz2} module, including features from the latest
10726 development version of CPython that are not available in older releases.")
10727 (license license:asl2.0)
10728 (properties `((python2-variant . ,(delay python2-bz2file))))))
10729
10730 (define-public python2-bz2file
10731 (let ((base (package-with-python2
10732 (strip-python2-variant python-bz2file))))
10733 (package
10734 (inherit base)
10735 (arguments
10736 `(#:python ,python-2
10737 #:phases
10738 (modify-phases %standard-phases
10739 ;; 'python setup.py test' does not work as of 0.98.
10740 ;; There is only the one test file, so we run it directly.
10741 (replace 'check
10742 (lambda _ (zero? (system* "python"
10743 "test_bz2file.py"))))))))))
10744
10745 (define-public python-future
10746 (package
10747 (name "python-future")
10748 (version "0.16.0")
10749 (source
10750 (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "future" version))
10753 (sha256
10754 (base32
10755 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10756 (build-system python-build-system)
10757 ;; Many tests connect to the network or are otherwise flawed.
10758 ;; https://github.com/PythonCharmers/python-future/issues/210
10759 (arguments
10760 `(#:tests? #f))
10761 (home-page "http://python-future.org")
10762 (synopsis "Single-source support for Python 3 and 2")
10763 (description
10764 "@code{python-future} is the missing compatibility layer between Python 2 and
10765 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10766 to support both Python 2 and Python 3 with minimal overhead.")
10767 (license license:expat)))
10768
10769 (define-public python2-future
10770 (package-with-python2 python-future))
10771
10772 (define-public python-cysignals
10773 (package
10774 (name "python-cysignals")
10775 (version "1.1.0")
10776 (source
10777 (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10780 (sha256
10781 (base32
10782 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10783 (build-system python-build-system)
10784 (native-inputs
10785 `(("python-cython" ,python-cython)
10786 ("python-sphinx" ,python-sphinx)))
10787 (inputs
10788 `(("pari-gp" ,pari-gp)))
10789 (arguments
10790 `(#:modules ((guix build python-build-system)
10791 ((guix build gnu-build-system) #:prefix gnu:)
10792 (guix build utils))
10793 ;; FIXME: Tests are executed after installation and currently fail
10794 ;; when not installing into standard locations; the author is working
10795 ;; on a fix.
10796 #:tests? #f
10797 #:phases
10798 (modify-phases %standard-phases
10799 (add-before
10800 'build 'configure
10801 (assoc-ref gnu:%standard-phases 'configure)))))
10802 (home-page
10803 "https://github.com/sagemath/cysignals")
10804 (synopsis
10805 "Handling of interrupts and signals for Cython")
10806 (description
10807 "The cysignals package provides mechanisms to handle interrupts (and
10808 other signals and errors) in Cython code, using two related approaches,
10809 for mixed Cython/Python code or external C libraries and pure Cython code,
10810 respectively.")
10811 (license license:lgpl3+)))
10812
10813 (define-public python2-cysignals
10814 (package-with-python2 python-cysignals))
10815
10816 (define-public python2-shedskin
10817 (package
10818 (name "python2-shedskin")
10819 (version "0.9.4")
10820 (source
10821 (origin
10822 (method url-fetch)
10823 (uri (string-append "https://github.com/shedskin/shedskin/"
10824 "releases/download/v" version
10825 "/shedskin-" version ".tgz"))
10826 (sha256
10827 (base32
10828 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10829 (build-system python-build-system)
10830 (arguments
10831 `(#:python ,python-2
10832 #:phases (modify-phases %standard-phases
10833 (add-after 'unpack 'fix-resulting-include-libs
10834 (lambda* (#:key inputs #:allow-other-keys)
10835 (let ((libgc (assoc-ref inputs "libgc"))
10836 (pcre (assoc-ref inputs "pcre")))
10837 (substitute* "shedskin/makefile.py"
10838 (("variable == 'CCFLAGS':[ ]*")
10839 (string-append "variable == 'CCFLAGS':\n"
10840 " line += ' -I " pcre "/include"
10841 " -I " libgc "/include'"))
10842 (("variable == 'LFLAGS':[ ]*")
10843 (string-append "variable == 'LFLAGS':\n"
10844 " line += ' -L" pcre "/lib"
10845 " -L " libgc "/lib'")))
10846 #t))))))
10847 (inputs `(("pcre" ,pcre)
10848 ("libgc" ,libgc)))
10849 (home-page "https://shedskin.github.io/")
10850 (synopsis "Experimental Python-2 to C++ Compiler")
10851 (description (string-append "This is an experimental compiler for a subset of
10852 Python. It generates C++ code and a Makefile."))
10853 (license (list license:gpl3 license:bsd-3 license:expat))))
10854
10855 (define-public python2-rope
10856 (package
10857 (name "python2-rope")
10858 (version "0.10.3")
10859 (source
10860 (origin
10861 (method url-fetch)
10862 (uri (pypi-uri "rope" version))
10863 (sha256
10864 (base32
10865 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10866 (arguments
10867 ;; Rope is currently python-2 only.
10868 ;; https://github.com/python-rope/rope/issues/57
10869 `(#:python ,python-2))
10870 (build-system python-build-system)
10871 (native-inputs
10872 `(("python2-unittest2" ,python2-unittest2)))
10873 (home-page "https://github.com/python-rope/rope")
10874 (synopsis "Refactoring library for Python")
10875 (description "Rope is a refactoring library for Python. It facilitates
10876 the renaming, moving and extracting of attributes, functions, modules, fields
10877 and parameters in Python 2 source code. These refactorings can also be applied
10878 to occurrences in strings and comments.")
10879 (license license:gpl2)))
10880
10881 (define-public python-py3status
10882 (package
10883 (name "python-py3status")
10884 (version "3.1")
10885 (source
10886 (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "py3status" version))
10889 (sha256
10890 (base32
10891 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10892 (build-system python-build-system)
10893 (arguments
10894 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10895 (home-page "https://github.com/ultrabug/py3status")
10896 (synopsis "Extensible i3status wrapper written in Python")
10897 (description "py3status is an i3status wrapper which extends i3status
10898 functionality in a modular way, allowing you to extend your panel with your
10899 own code, responding to click events and updating clock every second.")
10900 (license license:bsd-3)))
10901
10902 (define-public python-tblib
10903 (package
10904 (name "python-tblib")
10905 (version "1.3.0")
10906 (source (origin
10907 (method url-fetch)
10908 (uri (pypi-uri "tblib" version))
10909 (sha256 (base32
10910 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10911 (build-system python-build-system)
10912 (arguments
10913 `(#:phases
10914 (modify-phases %standard-phases
10915 (replace 'check
10916 (lambda _
10917 ;; Upstream runs tests after installation and the package itself
10918 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10919 ;; found.
10920 (setenv "PYTHONPATH"
10921 (string-append (getcwd) "/build/lib:"
10922 (getenv "PYTHONPATH")))
10923 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10924 (native-inputs
10925 `(("python-pytest" ,python-pytest)
10926 ("python-six" ,python-six)))
10927 (home-page "https://github.com/ionelmc/python-tblib")
10928 (synopsis "Traceback serialization library")
10929 (description
10930 "Traceback serialization allows you to:
10931
10932 @enumerate
10933 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10934 different processes. This allows better error handling when running code over
10935 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10936
10937 @item Parse traceback strings and raise with the parsed tracebacks.
10938 @end enumerate\n")
10939 (license license:bsd-3)))
10940
10941 (define-public python2-tblib
10942 (package-with-python2 python-tblib))
10943
10944 (define-public python-sqlparse
10945 (package
10946 (name "python-sqlparse")
10947 (version "0.1.19")
10948 (source (origin
10949 (method url-fetch)
10950 (uri (pypi-uri "sqlparse" version))
10951 (sha256
10952 (base32
10953 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10954 (build-system python-build-system)
10955 (arguments
10956 `(#:phases
10957 (modify-phases %standard-phases
10958 (replace 'check
10959 (lambda* _
10960 ;; setup.py-integrated 2to3 only affects the build files, but
10961 ;; py.test is using the source files. So we need to convert them
10962 ;; manually.
10963 (when (zero? (system* "python3"))
10964 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10965 (zero? (system* "py.test")))))))
10966 (native-inputs
10967 `(("python-pytest" ,python-pytest)))
10968 (home-page "https://github.com/andialbrecht/sqlparse")
10969 (synopsis "Non-validating SQL parser")
10970 (description "Sqlparse is a non-validating SQL parser for Python. It
10971 provides support for parsing, splitting and formatting SQL statements.")
10972 (license license:bsd-3)))
10973
10974 (define-public python2-sqlparse
10975 (package-with-python2 python-sqlparse))
10976
10977 (define-public python-greenlet
10978 (package
10979 (name "python-greenlet")
10980 (version "0.4.11")
10981 (source (origin
10982 (method url-fetch)
10983 (uri (pypi-uri "greenlet" version))
10984 (sha256
10985 (base32
10986 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10987 (build-system python-build-system)
10988 (home-page "https://greenlet.readthedocs.io/")
10989 (synopsis "Lightweight in-process concurrent programming")
10990 (description
10991 "Greenlet package is a spin-off of Stackless, a version of CPython
10992 that supports micro-threads called \"tasklets\". Tasklets run
10993 pseudo-concurrently (typically in a single or a few OS-level threads) and
10994 are synchronized with data exchanges on \"channels\".")
10995 (license (list license:psfl license:expat))))
10996
10997 (define-public python2-greenlet
10998 (package-with-python2 python-greenlet))
10999
11000 (define-public python-gevent
11001 (package
11002 (name "python-gevent")
11003 (version "1.1.1")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "gevent" version))
11007 (sha256
11008 (base32
11009 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11010 (modules '((guix build utils)))
11011 (snippet
11012 '(begin
11013 ;; unbunding libev and c-ares
11014 (for-each delete-file-recursively '("libev" "c-ares"))
11015 ;; fixing testsuite
11016 (call-with-output-file "greentest/__init__.py" noop)
11017 (substitute* "greentest/testrunner.py"
11018 (("import util") "from . import util")
11019 (("from util import log") "from .util import log"))))))
11020 (build-system python-build-system)
11021 (propagated-inputs
11022 `(("python-greenlet" ,python-greenlet)))
11023 (native-inputs
11024 `(("python-six" ,python-six)))
11025 (inputs
11026 `(("c-ares" ,c-ares)
11027 ("libev" ,libev)))
11028 (home-page "http://www.gevent.org/")
11029 (synopsis "Coroutine-based network library")
11030 (description
11031 "gevent is a coroutine-based Python networking library that uses greenlet
11032 to provide a high-level synchronous API on top of the libev event loop.")
11033 (license license:expat)))
11034
11035 (define-public python2-gevent
11036 (package-with-python2 python-gevent))
11037
11038 (define-public python-geventhttpclient
11039 (package
11040 (name "python-geventhttpclient")
11041 (version "1.3.1")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "geventhttpclient" version))
11045 (sha256
11046 (base32
11047 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11048 (modules '((guix build utils)))
11049 (snippet
11050 '(begin
11051 ;; Delete pre-compiled files.
11052 (for-each delete-file (find-files "src/geventhttpclient"
11053 ".*\\.pyc"))
11054 #t))))
11055 (build-system python-build-system)
11056 (arguments
11057 '(#:phases
11058 (modify-phases %standard-phases
11059 (add-after 'unpack 'delete-network-tests
11060 (lambda _
11061 (delete-file "src/geventhttpclient/tests/test_client.py")
11062 #t))
11063 (delete 'check)
11064 (add-after 'install 'check
11065 (lambda* (#:key inputs outputs #:allow-other-keys)
11066 (add-installed-pythonpath inputs outputs)
11067 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11068 (native-inputs
11069 `(("python-pytest" ,python-pytest)))
11070 (propagated-inputs
11071 `(("python-certifi" ,python-certifi)
11072 ("python-gevent" ,python-gevent)
11073 ("python-six" ,python-six)))
11074 (home-page "https://github.com/gwik/geventhttpclient")
11075 (synopsis "HTTP client library for gevent")
11076 (description "@code{python-geventhttpclient} is a high performance,
11077 concurrent HTTP client library for python using @code{gevent}.")
11078 (license license:expat)))
11079
11080 (define-public python2-geventhttpclient
11081 (package-with-python2 python-geventhttpclient))
11082
11083 (define-public python-fastimport
11084 (package
11085 (name "python-fastimport")
11086 (version "0.9.6")
11087 (source
11088 (origin
11089 (method url-fetch)
11090 (uri (pypi-uri "fastimport" version))
11091 (sha256
11092 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11093 (build-system python-build-system)
11094 (home-page "https://github.com/jelmer/python-fastimport")
11095 (synopsis "VCS fastimport parser and generator in Python")
11096 (description "This package provides a parser for and generator of the Git
11097 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11098 format.")
11099 (license license:gpl2+)))
11100
11101 (define-public python2-fastimport
11102 (package-with-python2 python-fastimport))
11103
11104 (define-public python-twisted
11105 (package
11106 (name "python-twisted")
11107 (version "16.2.0")
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11111 (sha256
11112 (base32
11113 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11114 (build-system python-build-system)
11115 (arguments
11116 '(#:tests? #f)) ; FIXME: Some tests are failing.
11117 ;; #:phases
11118 ;; (modify-phases %standard-phases
11119 ;; (replace 'check
11120 ;; (lambda _
11121 ;; (zero? (system* "./bin/trial" "twisted")))))
11122 (propagated-inputs
11123 `(("python-zope-interface" ,python-zope-interface)))
11124 (home-page "https://twistedmatrix.com/")
11125 (synopsis "Asynchronous networking framework written in Python")
11126 (description
11127 "Twisted is an extensible framework for Python programming, with special
11128 focus on event-based network programming and multiprotocol integration.")
11129 (license license:expat)))
11130
11131 (define-public python2-twisted
11132 (package-with-python2 python-twisted))
11133
11134 (define-public python-pika
11135 (package
11136 (name "python-pika")
11137 (version "0.10.0")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "pika" version))
11142 (sha256
11143 (base32
11144 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11145 (build-system python-build-system)
11146 (native-inputs
11147 `(("python-pyev" ,python-pyev)
11148 ("python-tornado" ,python-tornado)
11149 ("python-twisted" ,python-twisted)))
11150 (home-page "https://pika.readthedocs.org")
11151 (synopsis "Pure Python AMQP Client Library")
11152 (description
11153 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11154 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11155 network support library.")
11156 (license license:bsd-3)))
11157
11158 (define-public python2-pika
11159 (package-with-python2 python-pika))
11160
11161 (define-public python-ply
11162 (package
11163 (name "python-ply")
11164 (version "3.9")
11165 (source
11166 (origin
11167 (method url-fetch)
11168 (uri (pypi-uri "ply" version))
11169 (sha256
11170 (base32
11171 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11172 (build-system python-build-system)
11173 (home-page "http://www.dabeaz.com/ply/")
11174 (synopsis "Python Lex & Yacc")
11175 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11176 It uses LR parsing and does extensive error checking.")
11177 (license license:bsd-3)))
11178
11179 (define-public python2-ply
11180 (package-with-python2 python-ply))
11181
11182 (define-public python-tabulate
11183 (package
11184 (name "python-tabulate")
11185 (version "0.7.7")
11186 (source (origin
11187 (method url-fetch)
11188 (uri (pypi-uri "tabulate" version))
11189 (sha256
11190 (base32
11191 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11192 (build-system python-build-system)
11193 (arguments
11194 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11195 ;; and the latest release is not tagged in the upstream repository.
11196 '(#:tests? #f))
11197 (home-page "https://bitbucket.org/astanin/python-tabulate")
11198 (synopsis "Pretty-print tabular data")
11199 (description
11200 "Tabulate is a library and command-line utility to pretty-print tabular
11201 data in Python.")
11202 (license license:expat)))
11203
11204 (define-public python2-tabulate
11205 (package-with-python2 python-tabulate))
11206
11207 (define-public python-kazoo
11208 (package
11209 (name "python-kazoo")
11210 (version "2.2.1")
11211 (source
11212 (origin
11213 (method url-fetch)
11214 (uri (pypi-uri "kazoo" version))
11215 (sha256
11216 (base32
11217 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11218 (build-system python-build-system)
11219 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11220 (propagated-inputs
11221 `(("python-six" ,python-six)))
11222 (home-page "https://kazoo.readthedocs.org")
11223 (synopsis "High-level Zookeeper client library")
11224 (description
11225 "Kazoo is a Python client library for the Apache Zookeeper distributed
11226 application service. It is designed to be easy to use and to avoid common
11227 programming errors.")
11228 (license license:asl2.0)))
11229
11230 (define-public python2-kazoo
11231 (package-with-python2 python-kazoo))
11232
11233 (define-public python-pykafka
11234 (package
11235 (name "python-pykafka")
11236 (version "2.4.0")
11237 (source (origin
11238 (method url-fetch)
11239 (uri (string-append
11240 "https://pypi.python.org/packages/8b/3e/"
11241 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11242 "pykafka-" version ".tar.gz"))
11243 (sha256
11244 (base32
11245 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11246 (build-system python-build-system)
11247 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11248 (propagated-inputs
11249 `(("python-gevent" ,python-gevent)
11250 ("python-kazoo" ,python-kazoo)
11251 ("python-tabulate" ,python-tabulate)))
11252 (inputs
11253 `(("librdkafka" ,librdkafka)))
11254 (home-page "https://pykafka.readthedocs.io/")
11255 (synopsis "Apache Kafka client for Python")
11256 (description
11257 "PyKafka is a client for the Apache Kafka distributed messaging system.
11258 It includes Python implementations of Kafka producers and consumers, which
11259 are optionally backed by a C extension built on librdkafka.")
11260 (license license:asl2.0)))
11261
11262 (define-public python2-pykafka
11263 (package-with-python2 python-pykafka))
11264
11265 (define-public python-wcwidth
11266 (package
11267 (name "python-wcwidth")
11268 (version "0.1.7")
11269 (source
11270 (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "wcwidth" version))
11273 (sha256
11274 (base32
11275 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11276 (build-system python-build-system)
11277 (home-page "https://github.com/jquast/wcwidth")
11278 (synopsis "Measure number of terminal column cells of wide-character codes")
11279 (description "Wcwidth measures the number of terminal column cells of
11280 wide-character codes. It is useful for those implementing a terminal emulator,
11281 or programs that carefully produce output to be interpreted by one. It is a
11282 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11283 specified in POSIX.1-2001 and POSIX.1-2008.")
11284 (license license:expat)))
11285
11286 (define-public python2-wcwidth
11287 (package-with-python2 python-wcwidth))
11288
11289 (define-public python2-jsonrpclib
11290 (package
11291 (name "python2-jsonrpclib")
11292 (version "0.1.7")
11293 (source (origin
11294 (method url-fetch)
11295 (uri (string-append
11296 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11297 "jsonrpclib-" version ".tar.gz"))
11298 (sha256
11299 (base32
11300 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11301 (build-system python-build-system)
11302 (arguments
11303 `(#:tests? #f
11304 #:python ,python-2))
11305 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11306 (synopsis "Implementation of JSON-RPC specification for Python")
11307 (description
11308 "This library is an implementation of the JSON-RPC specification.
11309 It supports both the original 1.0 specification, as well as the
11310 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11311 etc.")
11312 (license license:asl2.0)))
11313
11314 (define-public python-chai
11315 (package
11316 (name "python-chai")
11317 (version "1.1.1")
11318 (source (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "chai" version))
11321 (sha256
11322 (base32
11323 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11324 (build-system python-build-system)
11325 (home-page "https://github.com/agoragames/chai")
11326 (synopsis "Mocking framework for Python")
11327 (description
11328 "Chai provides an api for mocking, stubbing and spying your python
11329 objects, patterned after the Mocha library for Ruby.")
11330 (license license:bsd-3)))
11331
11332 (define-public python2-chai
11333 (package-with-python2 python-chai))
11334
11335 (define-public python-arrow
11336 (package
11337 (name "python-arrow")
11338 (version "0.8.0")
11339 (source (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "arrow" version))
11342 (sha256
11343 (base32
11344 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11345 (build-system python-build-system)
11346 (native-inputs
11347 `(;; For testing
11348 ("python-chai" ,python-chai)
11349 ("python-simplejson" ,python-simplejson)))
11350 (propagated-inputs
11351 `(("python-dateutil" ,python-dateutil)))
11352 (home-page "https://github.com/crsmithdev/arrow/")
11353 (synopsis "Dates and times for Python")
11354 (description
11355 "Arrow is a Python library to creating, manipulating, formatting and
11356 converting dates, times, and timestamps. It implements and updates the
11357 datetime type.")
11358 (license license:asl2.0)))
11359
11360 (define-public python2-arrow
11361 (package-with-python2 python-arrow))
11362
11363 (define-public python-inflection
11364 (package
11365 (name "python-inflection")
11366 (version "0.3.1")
11367 (source
11368 (origin (method url-fetch)
11369 (uri (pypi-uri "inflection" version))
11370 (sha256
11371 (base32
11372 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11373 (build-system python-build-system)
11374 (native-inputs
11375 `(("python-pytest" ,python-pytest)))
11376 (home-page "https://github.com/jpvanhal/inflection")
11377 (synopsis "Python string transformation library")
11378 (description
11379 "Inflection is a string transformation library. It singularizes
11380 and pluralizes English words, and transforms strings from CamelCase to
11381 underscored string.")
11382 (license license:expat)))
11383
11384 (define-public python2-inflection
11385 (package-with-python2 python-inflection))
11386
11387 (define-public python-pylev
11388 (package
11389 (name "python-pylev")
11390 (version "1.3.0")
11391 (source (origin
11392 (method url-fetch)
11393 (uri (pypi-uri "pylev" version))
11394 (sha256
11395 (base32
11396 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11397 (build-system python-build-system)
11398 (home-page "https://github.com/toastdriven/pylev")
11399 (synopsis "Levenshtein distance implementation in Python")
11400 (description "Pure Python Levenshtein implementation, based off the
11401 Wikipedia code samples at
11402 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11403 (license license:bsd-3)))
11404
11405 (define-public python2-pylev
11406 (package-with-python2 python-pylev))
11407
11408 (define-public python-cleo
11409 (package
11410 (name "python-cleo")
11411 (version "0.4.1")
11412 (source (origin
11413 (method url-fetch)
11414 (uri (pypi-uri "cleo" version))
11415 (sha256
11416 (base32
11417 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11418 (build-system python-build-system)
11419 (native-inputs
11420 `(;; For testing
11421 ("python-mock" ,python-mock)
11422 ("python-pytest" ,python-pytest)))
11423 (propagated-inputs
11424 `(("python-psutil" ,python-psutil)
11425 ("python-pylev" ,python-pylev)))
11426 (home-page "https://github.com/sdispater/cleo")
11427 (synopsis "Command-line arguments library for Python")
11428 (description
11429 "Cleo allows you to create command-line commands with signature in
11430 docstring and colored output.")
11431 (license license:expat)))
11432
11433 (define-public python2-cleo
11434 (package-with-python2 python-cleo))
11435
11436 (define-public python-lazy-object-proxy
11437 (package
11438 (name "python-lazy-object-proxy")
11439 (version "1.2.2")
11440 (source (origin
11441 (method url-fetch)
11442 (uri (pypi-uri "lazy-object-proxy" version))
11443 (sha256
11444 (base32
11445 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11446 (build-system python-build-system)
11447 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11448 (synopsis "Lazy object proxy for python")
11449 (description
11450 "Lazy object proxy is an object that wraps a callable but defers the call
11451 until the object is actually required, and caches the result of said call.")
11452 (license license:bsd-2)))
11453
11454 (define-public python2-lazy-object-proxy
11455 (package-with-python2 python-lazy-object-proxy))
11456
11457 (define-public python-dnspython
11458 (package
11459 (name "python-dnspython")
11460 (version "1.15.0")
11461 (source (origin
11462 (method url-fetch)
11463 (uri (string-append "http://www.dnspython.org/kits/"
11464 version "/dnspython-" version ".tar.gz"))
11465 (sha256
11466 (base32
11467 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11468 (build-system python-build-system)
11469 (arguments '(#:tests? #f)) ; XXX: requires internet access
11470 (home-page "http://www.dnspython.org")
11471 (synopsis "DNS toolkit for Python")
11472 (description
11473 "dnspython is a DNS toolkit for Python. It supports almost all record
11474 types. It can be used for queries, zone transfers, and dynamic updates.
11475 It supports TSIG authenticated messages and EDNS0.")
11476 (license license:expat)))
11477
11478 (define-public python2-dnspython
11479 (package-with-python2 python-dnspython))
11480
11481 (define-public python-email-validator
11482 (package
11483 (name "python-email-validator")
11484 (version "1.0.2")
11485 (source
11486 (origin (method url-fetch)
11487 (uri (pypi-uri "email_validator" version))
11488 (sha256
11489 (base32
11490 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11491 (build-system python-build-system)
11492 (arguments
11493 '(#:phases
11494 (modify-phases %standard-phases
11495 (add-before 'build 'use-dnspython
11496 (lambda _
11497 (substitute* "setup.py"
11498 (("dnspython3") "dnspython"))
11499 #t)))))
11500 (propagated-inputs
11501 `(("python-dnspython" ,python-dnspython)
11502 ("python-idna" ,python-idna)))
11503 (home-page "https://github.com/JoshData/python-email-validator")
11504 (synopsis "Email address validation library for Python")
11505 (description
11506 "This library validates email address syntax and deliverability.")
11507 (license license:cc0)))
11508
11509 (define-public python2-email-validator
11510 (package-with-python2 python-email-validator))
11511
11512 (define-public python-ukpostcodeparser
11513 (package
11514 (name "python-ukpostcodeparser")
11515 (version "1.0.3")
11516 (source (origin
11517 (method url-fetch)
11518 (uri (pypi-uri "UkPostcodeParser" version))
11519 (sha256
11520 (base32
11521 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11522 (build-system python-build-system)
11523 (home-page "https://github.com/hamstah/ukpostcodeparser")
11524 (synopsis "UK Postcode parser for Python")
11525 (description
11526 "This library provides the @code{parse_uk_postcode} function for
11527 parsing UK postcodes.")
11528 (license license:expat)))
11529
11530 (define-public python2-ukpostcodeparser
11531 (package-with-python2 python-ukpostcodeparser))
11532
11533 (define-public python-faker
11534 (package
11535 (name "python-faker")
11536 (version "0.7.9")
11537 (source (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "Faker" version))
11540 (sha256
11541 (base32
11542 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11543 (patches
11544 (search-patches "python-faker-fix-build-32bit.patch"))
11545 (modules '((guix build utils)))
11546 (snippet
11547 '(begin
11548 (for-each delete-file (find-files "." "\\.pyc$"))
11549 #t))))
11550 (build-system python-build-system)
11551 (arguments
11552 '(#:phases
11553 (modify-phases %standard-phases
11554 (replace 'check
11555 (lambda _
11556 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11557 (native-inputs
11558 `(;; For testing
11559 ("python-email-validator" ,python-email-validator)
11560 ("python-mock" ,python-mock)
11561 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11562 (propagated-inputs
11563 `(("python-dateutil" ,python-dateutil)
11564 ("python-six" ,python-six)))
11565 (home-page "https://github.com/joke2k/faker")
11566 (synopsis "Python package that generates fake data")
11567 (description
11568 "Faker is a Python package that generates fake data such as names,
11569 addresses, and phone numbers.")
11570 (license license:expat)
11571 (properties `((python2-variant . ,(delay python2-faker))))))
11572
11573 (define-public python2-faker
11574 (let ((base (package-with-python2 (strip-python2-variant
11575 python-faker))))
11576 (package
11577 (inherit base)
11578 (propagated-inputs
11579 `(("python2-ipaddress" ,python2-ipaddress)
11580 ,@(package-propagated-inputs base))))))
11581
11582 (define-public python-fake-factory
11583 (package
11584 (name "python-fake-factory")
11585 (version "0.7.2")
11586 (source (origin
11587 (method url-fetch)
11588 (uri (pypi-uri "fake-factory" version))
11589 (sha256
11590 (base32
11591 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11592 (patches
11593 (search-patches
11594 "python-fake-factory-fix-build-32bit.patch"))))
11595 (build-system python-build-system)
11596 (arguments
11597 '(#:phases
11598 (modify-phases %standard-phases
11599 (replace 'check
11600 (lambda _
11601 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11602 (native-inputs
11603 `(;; For testing
11604 ("python-email-validator" ,python-email-validator)
11605 ("python-mock" ,python-mock)
11606 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11607 (propagated-inputs
11608 `(("python-dateutil" ,python-dateutil)
11609 ("python-six" ,python-six)))
11610 (home-page "https://github.com/joke2k/faker")
11611 (synopsis "Python package that generates fake data")
11612 (description
11613 "Faker is a Python package that generates fake data such as names,
11614 addresses, and phone numbers.")
11615 (license license:expat)
11616 (properties `((python2-variant . ,(delay python2-fake-factory))
11617 (superseded . ,python-faker)))))
11618
11619 (define-public python2-fake-factory
11620 (let ((base (package-with-python2 (strip-python2-variant
11621 python-fake-factory))))
11622 (package
11623 (inherit base)
11624 (properties `((superseded . ,python2-faker)))
11625 (propagated-inputs
11626 `(("python2-ipaddress" ,python2-ipaddress)
11627 ,@(package-propagated-inputs base))))))
11628
11629 (define-public python-pyaml
11630 (package
11631 (name "python-pyaml")
11632 (version "15.8.2")
11633 (source (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "pyaml" version))
11636 (sha256
11637 (base32
11638 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11639 (build-system python-build-system)
11640 (native-inputs
11641 `(("python-unidecode" ,python-unidecode)))
11642 (propagated-inputs
11643 `(("python-pyyaml" ,python-pyyaml)))
11644 (home-page "https://github.com/mk-fg/pretty-yaml")
11645 (synopsis "YAML pretty-print library for Python")
11646 (description
11647 "pyaml is a PyYAML based python module to produce pretty and readable
11648 YAML-serialized data.")
11649 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11650
11651 (define-public python2-pyaml
11652 (package-with-python2 python-pyaml))
11653
11654 (define-public python-flexmock
11655 (package
11656 (name "python-flexmock")
11657 (version "0.10.2")
11658 (source (origin
11659 (method url-fetch)
11660 (uri (pypi-uri "flexmock" version))
11661 (sha256
11662 (base32
11663 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11664 (build-system python-build-system)
11665 (home-page "https://flexmock.readthedocs.org")
11666 (synopsis "Testing library for Python")
11667 (description
11668 "flexmock is a testing library for Python that makes it easy to create
11669 mocks, stubs and fakes.")
11670 (license license:bsd-3)))
11671
11672 (define-public python2-flexmock
11673 (package-with-python2 python-flexmock))
11674
11675 (define-public python-orator
11676 (package
11677 (name "python-orator")
11678 (version "0.8.2")
11679 (source (origin
11680 (method url-fetch)
11681 (uri (pypi-uri "orator" version))
11682 (sha256
11683 (base32
11684 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11685 (build-system python-build-system)
11686 (arguments '(#:tests? #f)) ; no tests
11687 (propagated-inputs
11688 `(("python-arrow" ,python-arrow)
11689 ("python-blinker" ,python-blinker)
11690 ("python-cleo" ,python-cleo)
11691 ("python-faker" ,python-faker)
11692 ("python-inflection" ,python-inflection)
11693 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11694 ("python-pyaml" ,python-pyaml)
11695 ("python-simplejson" ,python-simplejson)
11696 ("python-wrapt" ,python-wrapt)))
11697 (home-page "https://orator-orm.com/")
11698 (synopsis "ActiveRecord ORM for Python")
11699 (description
11700 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11701 implementation for Python.")
11702 (license license:expat)
11703 (properties `((python2-variant . ,(delay python2-orator))))))
11704
11705 (define-public python2-orator
11706 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11707 (package
11708 (inherit base)
11709 (propagated-inputs
11710 `(("python2-ipaddress" ,python2-ipaddress)
11711 ,@(package-propagated-inputs base))))))
11712
11713 (define-public python-prompt-toolkit
11714 (package
11715 (name "python-prompt-toolkit")
11716 (version "1.0.9")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11721 (sha256
11722 (base32
11723 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11724 (build-system python-build-system)
11725 (arguments
11726 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11727 (propagated-inputs
11728 `(("python-wcwidth" ,python-wcwidth)
11729 ("python-six" ,python-six)
11730 ("python-pygments" ,python-pygments)))
11731 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11732 (synopsis "Library for building command line interfaces in Python")
11733 (description
11734 "Prompt-Toolkit is a library for building interactive command line
11735 interfaces in Python. It's like GNU Readline but it also features syntax
11736 highlighting while typing, out-of-the-box multi-line input editing, advanced
11737 code completion, incremental search, support for Chinese double-width
11738 characters, mouse support, and auto suggestions.")
11739 (license license:bsd-3)))
11740
11741 (define-public python2-prompt-toolkit
11742 (package-with-python2 python-prompt-toolkit))
11743
11744 (define-public python-jedi
11745 (package
11746 (name "python-jedi")
11747 (version "0.9.0")
11748 (source
11749 (origin
11750 (method url-fetch)
11751 (uri (pypi-uri "jedi" version))
11752 (sha256
11753 (base32
11754 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11755 (build-system python-build-system)
11756 (arguments
11757 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11758 '(#:tests? #f))
11759 (native-inputs
11760 `(("python-pytest" ,python-pytest)))
11761 (home-page "https://github.com/davidhalter/jedi")
11762 (synopsis
11763 "Autocompletion for Python that can be used for text editors")
11764 (description
11765 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11766 (license license:expat)))
11767
11768 (define-public python2-jedi
11769 (package-with-python2 python-jedi))
11770
11771 (define-public ptpython
11772 (package
11773 (name "ptpython")
11774 (version "0.34")
11775 (source (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "ptpython" version))
11778 (sha256
11779 (base32
11780 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11781 (build-system python-build-system)
11782 (arguments
11783 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11784 (propagated-inputs
11785 `(("python-docopt" ,python-docopt)
11786 ("python-jedi" ,python-jedi)
11787 ("python-prompt-toolkit" ,python-prompt-toolkit)
11788 ("python-pygments" ,python-pygments)))
11789 (home-page "https://github.com/jonathanslenders/ptpython")
11790 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11791 (description
11792 "ptpython is a Python read-eval-print loop with IDE-like features.
11793 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11794 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11795 etc.")
11796 (license license:bsd-3)
11797 (properties `((python2-variant . ,(delay ptpython-2))))))
11798
11799 (define-public ptpython-2
11800 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11801 (package
11802 (inherit base)
11803 (name "ptpython2"))))
11804
11805 (define-public python-requests-oauthlib
11806 (package
11807 (name "python-requests-oauthlib")
11808 (version "0.6.2")
11809 (source
11810 (origin
11811 (method url-fetch)
11812 (uri (pypi-uri "requests-oauthlib" version))
11813 (sha256
11814 (base32
11815 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11816 (build-system python-build-system)
11817 (arguments
11818 `(#:phases
11819 (modify-phases %standard-phases
11820 ;; removes tests that require network access
11821 (add-before 'check 'pre-check
11822 (lambda _
11823 (delete-file "tests/test_core.py")
11824 #t)))))
11825 (native-inputs
11826 `(("python-requests-mock" ,python-requests-mock)
11827 ("python-mock" ,python-mock)))
11828 (propagated-inputs
11829 `(("python-oauthlib" ,python-oauthlib)
11830 ("python-requests" ,python-requests)))
11831 (home-page
11832 "https://github.com/requests/requests-oauthlib")
11833 (synopsis
11834 "OAuthlib authentication support for Requests")
11835 (description
11836 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11837 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11838 (license license:isc)))
11839
11840 (define-public python2-requests-oauthlib
11841 (package-with-python2 python-requests-oauthlib))
11842
11843 (define-public python-stem
11844 (package
11845 (name "python-stem")
11846 (version "1.5.4")
11847 (source
11848 (origin
11849 (method url-fetch)
11850 (uri (pypi-uri "stem" version))
11851 (sha256
11852 (base32
11853 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11854 (build-system python-build-system)
11855 (arguments
11856 `(#:phases
11857 (modify-phases %standard-phases
11858 (replace 'check
11859 (lambda _
11860 (zero? (system* "./run_tests.py" "--unit")))))))
11861 (native-inputs
11862 `(("python-mock" ,python-mock)
11863 ("python-pep8" ,python-pep8)
11864 ("python-pyflakes" ,python-pyflakes)))
11865 (home-page "https://stem.torproject.org/")
11866 (synopsis
11867 "Python controller library that allows applications to interact with Tor")
11868 (description
11869 "Stem is a Python controller library for Tor. With it you can use Tor's
11870 control protocol to script against the Tor process and read descriptor data
11871 relays publish about themselves.")
11872 (license license:lgpl3)))
11873
11874 (define-public python2-stem
11875 (package-with-python2 python-stem))
11876
11877 (define-public python-pyserial
11878 (package
11879 (name "python-pyserial")
11880 (version "3.1.1")
11881 (source
11882 (origin
11883 (method url-fetch)
11884 (uri (pypi-uri "pyserial" version))
11885 (sha256
11886 (base32
11887 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11888 (build-system python-build-system)
11889 (arguments
11890 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11891 ;; #:phases
11892 ;; (modify-phases %standard-phases
11893 ;; (replace 'check
11894 ;; (lambda _
11895 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11896 (home-page
11897 "https://github.com/pyserial/pyserial")
11898 (synopsis "Python Serial Port Bindings")
11899 (description "@code{pyserial} provide serial port bindings for Python. It
11900 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11901 and/or Xon/Xoff. The port is accessed in RAW mode.")
11902 (license license:bsd-3)))
11903
11904 (define-public python2-pyserial
11905 (package-with-python2 python-pyserial))
11906
11907 (define-public python-kivy
11908 (package
11909 (name "python-kivy")
11910 (version "1.9.1")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "kivy" version))
11915 (file-name (string-append name "-" version ".tar.gz"))
11916 (sha256
11917 (base32
11918 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11919 (build-system python-build-system)
11920 (arguments
11921 `(#:tests? #f ; Tests require many optional packages
11922 #:phases
11923 (modify-phases %standard-phases
11924 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11925 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11926 (lambda* (#:key inputs #:allow-other-keys)
11927 (setenv "KIVY_SDL2_PATH"
11928 (string-append (assoc-ref inputs "sdl-union")
11929 "/include/SDL2"))
11930 #t)))))
11931 (native-inputs
11932 `(("pkg-config" ,pkg-config)
11933 ("python-cython" ,python-cython)))
11934 (inputs
11935 `(("gstreamer" ,gstreamer)
11936 ("mesa" ,mesa)
11937 ("sdl-union"
11938 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11939 (home-page "http://kivy.org")
11940 (synopsis
11941 "Multitouch application framework")
11942 (description
11943 "A software library for rapid development of
11944 hardware-accelerated multitouch applications.")
11945 (license license:expat)))
11946
11947 (define-public python2-kivy
11948 (package-with-python2 python-kivy))
11949
11950 (define-public python-kivy-next
11951 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11952 (revision "1"))
11953 (package (inherit python-kivy)
11954 (name "python-kivy-next")
11955 (version (string-append "1.9.1-" revision "."
11956 (string-take commit 7)))
11957 (source
11958 (origin
11959 (method git-fetch)
11960 (uri (git-reference
11961 (url "https://github.com/kivy/kivy")
11962 (commit commit)))
11963 (file-name (string-append name "-" version "-checkout"))
11964 (sha256
11965 (base32
11966 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11967
11968 (define-public python2-kivy-next
11969 (package-with-python2 python-kivy-next))
11970
11971 (define-public python-binaryornot
11972 (package
11973 (name "python-binaryornot")
11974 (version "0.4.0")
11975 (source (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "binaryornot" version))
11978 (sha256
11979 (base32
11980 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11981 (build-system python-build-system)
11982 (propagated-inputs
11983 `(("python-chardet" ,python-chardet)
11984 ("python-hypothesis" ,python-hypothesis)))
11985 (home-page "https://github.com/audreyr/binaryornot")
11986 (synopsis "Package to check if a file is binary or text")
11987 (description "Ultra-lightweight pure Python package to check if a file is
11988 binary or text.")
11989 (license license:bsd-3)
11990 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11991
11992 (define-public python2-binaryornot
11993 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11994 (package (inherit base)
11995 (propagated-inputs
11996 `(("python2-enum34" ,python2-enum34)
11997 ,@(package-propagated-inputs base))))))
11998
11999 (define-public python-nltk
12000 (package
12001 (name "python-nltk")
12002 (version "3.2.1")
12003 (source (origin
12004 (method url-fetch)
12005 (uri (pypi-uri "nltk" version))
12006 (sha256
12007 (base32
12008 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12009 (build-system python-build-system)
12010 (arguments
12011 '(;; The tests require some extra resources to be downloaded.
12012 ;; TODO Try packaging these resources.
12013 #:tests? #f))
12014 (home-page "http://nltk.org/")
12015 (synopsis "Natural Language Toolkit")
12016 (description "It provides interfaces to over 50 corpora and lexical
12017 resources such as WordNet, along with a suite of text processing libraries
12018 for classification, tokenization, stemming, tagging, parsing, and semantic
12019 reasoning, wrappers for natural language processing libraries.")
12020 (license license:asl2.0)))
12021
12022 (define-public python2-nltk
12023 (package-with-python2 python-nltk))
12024
12025 (define-public python-pymongo
12026 (package
12027 (name "python-pymongo")
12028 (version "3.3.0")
12029 (source (origin
12030 (method url-fetch)
12031 (uri (pypi-uri "pymongo" version))
12032 (sha256
12033 (base32
12034 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12035 (build-system python-build-system)
12036 (propagated-inputs
12037 `(("python-certifi" ,python-certifi)))
12038 (home-page "https://github.com/mongodb/mongo-python-driver")
12039 (synopsis "Python driver for MongoDB")
12040 (description "Python driver for MongoDB.")
12041 (license license:asl2.0)))
12042
12043 (define-public python2-pymongo
12044 (package-with-python2 python-pymongo))
12045
12046 (define-public python-sh
12047 (package
12048 (name "python-sh")
12049 (version "1.11")
12050 (source (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "sh" version))
12053 (sha256
12054 (base32
12055 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12056 (build-system python-build-system)
12057 (arguments
12058 `(#:tests? #f)) ; no tests
12059 (home-page "https://github.com/amoffat/sh")
12060 (synopsis "Python subprocess interface")
12061 (description "Abstracts process invocation by providing a function
12062 interface for programs.")
12063 (license license:expat)))
12064
12065 (define-public python2-sh
12066 (package-with-python2 python-sh))
12067
12068 (define-public python-consul
12069 (package
12070 (name "python-consul")
12071 (version "0.6.1")
12072 (source
12073 (origin
12074 (method url-fetch)
12075 (uri (pypi-uri "python-consul" version))
12076 (sha256
12077 (base32
12078 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12079 (build-system python-build-system)
12080 (native-inputs
12081 `(("python-pytest" ,python-pytest)))
12082 (propagated-inputs
12083 `(("python-requests" ,python-requests)
12084 ("python-six" ,python-six)))
12085 (home-page "https://github.com/cablehead/python-consul")
12086 (synopsis "Python client for Consul")
12087 (description
12088 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12089 discovery, monitoring and configuration.")
12090 (license license:expat)))
12091
12092 (define-public python2-consul
12093 (package-with-python2 python-consul))
12094
12095 (define-public python-schematics
12096 (package
12097 (name "python-schematics")
12098 (version "1.1.1")
12099 (source
12100 (origin
12101 (method url-fetch)
12102 (uri (string-append
12103 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12104 (file-name (string-append name "-" version ".tar.gz"))
12105 (sha256
12106 (base32
12107 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12108 (build-system python-build-system)
12109 (propagated-inputs
12110 `(("python-six" ,python-six)))
12111 (arguments
12112 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12113 ; version requirements (eg python-coveralls)
12114 (home-page "https://github.com/schematics/schematics")
12115 (synopsis "Python Data Structures for Humans")
12116 (description "Python Data Structures for Humans.")
12117 (license license:bsd-3)))
12118
12119 (define-public python2-schematics
12120 (package-with-python2 python-schematics))
12121
12122 (define-public python-publicsuffix
12123 (package
12124 (name "python-publicsuffix")
12125 (version "1.1.0")
12126 (source (origin
12127 (method url-fetch)
12128 (uri (pypi-uri "publicsuffix" version))
12129 (sha256
12130 (base32
12131 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12132 (build-system python-build-system)
12133 (arguments
12134 `(#:tests? #f)) ; tests use the internet
12135 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12136 (synopsis "Get suffix for a domain name")
12137 (description "Get a public suffix for a domain name using the Public Suffix
12138 List.")
12139 (license license:expat)))
12140
12141 (define-public python2-publicsuffix
12142 (package-with-python2 python-publicsuffix))
12143
12144 (define-public python-publicsuffix2
12145 (package
12146 (name "python-publicsuffix2")
12147 (version "2.20160818")
12148 (source
12149 (origin
12150 (method url-fetch)
12151 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12152 (sha256
12153 (base32
12154 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12155 (build-system python-build-system)
12156 (arguments
12157 '(#:tests? #f)) ; The test suite requires network access.
12158 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12159 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12160 (description "Get a public suffix for a domain name using the Public Suffix
12161 List. Forked from and using the same API as the publicsuffix package.")
12162 (license (list license:expat license:mpl2.0))))
12163
12164 (define-public python2-publicsuffix2
12165 (package-with-python2 python-publicsuffix2))
12166
12167 (define-public python-url
12168 (package
12169 (name "python-url")
12170 (version "0.2.0")
12171 (source (origin
12172 (method url-fetch)
12173 (uri (pypi-uri "url" version))
12174 (sha256
12175 (base32
12176 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12177 (build-system python-build-system)
12178 (propagated-inputs
12179 `(("python-publicsuffix" ,python-publicsuffix)))
12180 (native-inputs
12181 `(("python-coverage" ,python-coverage)
12182 ("python-nose" ,python-nose)))
12183 (arguments
12184 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12185 (home-page "https://github.com/seomoz/url-py")
12186 (synopsis "URL Parsing")
12187 (description "Library for parsing urls.")
12188 (license license:expat)
12189 (properties `((python2-variant . ,(delay python2-url))))))
12190
12191 (define-public python2-url
12192 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12193 (package (inherit base)
12194 (propagated-inputs
12195 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12196
12197 (define-public python-freezegun
12198 (package
12199 (name "python-freezegun")
12200 (version "0.3.8")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "freezegun" version))
12205 (sha256
12206 (base32
12207 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12208 (build-system python-build-system)
12209 (native-inputs
12210 `(("python-mock" ,python-mock)
12211 ("python-nose" ,python-nose)
12212 ("python-coverage" ,python-coverage)))
12213 (propagated-inputs
12214 `(("python-six" ,python-six)
12215 ("python-dateutil" ,python-dateutil)))
12216 (arguments
12217 `(#:phases (modify-phases %standard-phases
12218 ;; The tests are normally executed via `make test`, but the PyPi
12219 ;; package does not include the Makefile.
12220 (replace 'check
12221 (lambda _
12222 (zero? (system* "nosetests" "./tests/")))))))
12223 (home-page "https://github.com/spulec/freezegun")
12224 (synopsis "Test utility for mocking the datetime module")
12225 (description
12226 "FreezeGun is a library that allows your python tests to travel through
12227 time by mocking the datetime module.")
12228 (license license:asl2.0)))
12229
12230 (define-public python2-freezegun
12231 (package-with-python2 python-freezegun))
12232
12233
12234 (define-public python-odfpy
12235 (package
12236 (name "python-odfpy")
12237 (version "1.3.3")
12238 (source (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "odfpy" version))
12241 (sha256
12242 (base32
12243 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12244 (arguments
12245 `(#:modules ((srfi srfi-1)
12246 (guix build python-build-system)
12247 (guix build utils))
12248 #:phases
12249 (modify-phases %standard-phases
12250 (replace 'check
12251 ;; The test runner invokes python2 and python3 for test*.py.
12252 ;; To avoid having both in inputs, we replicate it here.
12253 (lambda _
12254 (every (lambda (test-file)
12255 (zero? (system* "python" test-file)))
12256 (find-files "tests" "^test.*\\.py$")))))))
12257 (build-system python-build-system)
12258 (home-page "https://github.com/eea/odfpy")
12259 (synopsis "Python API and tools to manipulate OpenDocument files")
12260 (description "Collection of libraries and utility programs written in
12261 Python to manipulate OpenDocument 1.2 files.")
12262 (license
12263 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12264 ;; number of files with other licenses.
12265 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12266
12267 (define-public python2-odfpy
12268 (package-with-python2 python-odfpy))
12269
12270 (define-public python-cachecontrol
12271 (package
12272 (name "python-cachecontrol")
12273 (version "0.11.6")
12274 (source
12275 (origin
12276 (method url-fetch)
12277 ;; Pypi does not have tests.
12278 (uri (string-append
12279 "https://github.com/ionrock/cachecontrol/archive/v"
12280 version ".tar.gz"))
12281 (file-name (string-append name "-" version ".tar.gz"))
12282 (sha256
12283 (base32
12284 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12285 (build-system python-build-system)
12286 (arguments
12287 `(#:phases
12288 (modify-phases %standard-phases
12289 (replace 'check
12290 (lambda _
12291 ;; Drop test that requires internet access.
12292 (delete-file "tests/test_regressions.py")
12293 (setenv "PYTHONPATH"
12294 (string-append (getcwd) "/build/lib:"
12295 (getenv "PYTHONPATH")))
12296 (zero? (system* "py.test" "-vv")))))))
12297 (native-inputs
12298 `(("python-pytest" ,python-pytest)
12299 ("python-redis" ,python-redis)
12300 ("python-webtest" ,python-webtest)
12301 ("python-mock" ,python-mock)))
12302 (propagated-inputs
12303 `(("python-requests" ,python-requests)
12304 ("python-lockfile" ,python-lockfile)))
12305 (home-page "https://github.com/ionrock/cachecontrol")
12306 (synopsis "The httplib2 caching algorithms for use with requests")
12307 (description "CacheControl is a port of the caching algorithms in
12308 @code{httplib2} for use with @code{requests} session objects.")
12309 (license license:asl2.0)))
12310
12311 (define-public python2-cachecontrol
12312 (package-with-python2 python-cachecontrol))
12313
12314 (define-public python-lit
12315 (package
12316 (name "python-lit")
12317 (version "0.5.0")
12318 (source
12319 (origin
12320 (method url-fetch)
12321 (uri (pypi-uri "lit" version))
12322 (sha256
12323 (base32
12324 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12325 (build-system python-build-system)
12326 (home-page "http://llvm.org/")
12327 (synopsis "LLVM Software Testing Tool")
12328 (description "@code{lit} is a portable tool for executing LLVM and Clang
12329 style test suites, summarizing their results, and providing indication of
12330 failures.")
12331 (license license:ncsa)))
12332
12333 (define-public python2-lit
12334 (package-with-python2 python-lit))
12335
12336 (define-public python-pytest-pep8
12337 (package
12338 (name "python-pytest-pep8")
12339 (version "1.0.6")
12340 (source (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "pytest-pep8" version))
12343 (sha256
12344 (base32
12345 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12346 (build-system python-build-system)
12347 (arguments
12348 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12349 (native-inputs
12350 `(("python-pytest" ,python-pytest)))
12351 (propagated-inputs
12352 `(("python-pep8" ,python-pep8)))
12353 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12354 (synopsis "Py.test plugin to check PEP8 requirements")
12355 (description "Pytest plugin for checking PEP8 compliance.")
12356 (license license:expat)))
12357
12358 (define-public python2-pytest-pep8
12359 (package-with-python2 python-pytest-pep8))
12360
12361 (define-public python-pytest-flakes
12362 (package
12363 (name "python-pytest-flakes")
12364 (version "1.0.1")
12365 (source (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "pytest-flakes" version))
12368 (sha256
12369 (base32
12370 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12371 (build-system python-build-system)
12372 (arguments
12373 `(#:phases
12374 (modify-phases %standard-phases
12375 (delete 'check)
12376 (add-after 'install 'check
12377 (lambda* (#:key outputs inputs #:allow-other-keys)
12378 ;; It's easier to run tests after install.
12379 ;; Make installed package available for running the tests
12380 (add-installed-pythonpath inputs outputs)
12381 (zero? (system* "py.test" "-vv")))))))
12382 (native-inputs
12383 `(("python-coverage" ,python-coverage)
12384 ("python-pytest" ,python-pytest)
12385 ("python-pytest-cache" ,python-pytest-cache)
12386 ("python-pytest-pep8" ,python-pytest-pep8)))
12387 (propagated-inputs
12388 `(("python-pyflakes" ,python-pyflakes)))
12389 (home-page "https://github.com/fschulze/pytest-flakes")
12390 (synopsis "Py.test plugin to check source code with pyflakes")
12391 (description "Pytest plugin for checking Python source code with pyflakes.")
12392 (license license:expat)))
12393
12394 (define-public python2-pytest-flakes
12395 (package-with-python2 python-pytest-flakes))
12396
12397 (define-public python-natsort
12398 (package
12399 (name "python-natsort")
12400 (version "5.0.2")
12401 (source (origin
12402 (method url-fetch)
12403 (uri (pypi-uri "natsort" version))
12404 (sha256
12405 (base32
12406 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12407 (build-system python-build-system)
12408 (arguments
12409 `(#:phases
12410 (modify-phases %standard-phases
12411 (add-before 'check 'set-cachedir
12412 ;; Tests require write access to $HOME by default
12413 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12414 (native-inputs
12415 `(("python-hypothesis" ,python-hypothesis)
12416 ("python-pytest-cache" ,python-pytest-cache)
12417 ("python-pytest-cov" ,python-pytest-cov)
12418 ("python-pytest-flakes" ,python-pytest-flakes)
12419 ("python-pytest-pep8" ,python-pytest-pep8)))
12420 (propagated-inputs ; TODO: Add python-fastnumbers.
12421 `(("python-pyicu" ,python-pyicu)))
12422 (home-page "https://github.com/SethMMorton/natsort")
12423 (synopsis "Natural sorting for python and shell")
12424 (description
12425 "Natsort lets you apply natural sorting on lists instead of
12426 lexicographical. If you use the built-in @code{sorted} method in python
12427 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12428 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12429 function @code{natsorted} that identifies numbers and sorts them separately
12430 from strings. It can also sort version numbers, real numbers, mixed types
12431 and more, and comes with a shell command @command{natsort} that exposes this
12432 functionality in the command line.")
12433 (license license:expat)
12434 (properties `((python2-variant . ,(delay python2-natsort))))))
12435
12436 (define-public python2-natsort
12437 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12438 (package (inherit base)
12439 (native-inputs
12440 `(("python2-pathlib" ,python2-pathlib)
12441 ("python2-mock" ,python2-mock)
12442 ("python2-enum34" ,python2-enum34)
12443 ,@(package-native-inputs base))))))
12444
12445 (define-public python-glances
12446 (package
12447 (name "python-glances")
12448 (version "2.7.1")
12449 (source
12450 (origin
12451 (method url-fetch)
12452 (uri (pypi-uri "Glances" version))
12453 (sha256
12454 (base32
12455 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12456 (build-system python-build-system)
12457 (propagated-inputs
12458 `(("python-psutil" ,python-psutil)))
12459 (home-page
12460 "https://github.com/nicolargo/glances")
12461 (synopsis
12462 "A cross-platform curses-based monitoring tool")
12463 (description
12464 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12465 Glances uses the PsUtil library to get information from your system. It monitors
12466 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12467 (license license:lgpl3+)))
12468
12469 (define-public python2-glances
12470 (package-with-python2 python-glances))
12471
12472 (define-public python-graphql-core
12473 (package
12474 (name "python-graphql-core")
12475 (version "0.5.3")
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (pypi-uri "graphql-core" version))
12480 (sha256
12481 (base32
12482 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12483 (build-system python-build-system)
12484 (arguments
12485 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12486 #:phases
12487 (modify-phases %standard-phases
12488 (add-after 'unpack 'patch-hardcoded-version
12489 (lambda _ (substitute*
12490 "setup.py"
12491 (("'gevent==1.1rc1'") "'gevent'"))
12492 #t)))))
12493 (native-inputs
12494 `(("python-gevent" ,python-gevent)
12495 ("python-mock" ,python-mock)
12496 ("python-pytest-mock" ,python-pytest-mock)))
12497 (propagated-inputs
12498 `(("python-promise" ,python-promise)
12499 ("python-six" ,python-six)))
12500 (home-page "https://github.com/graphql-python/graphql-core")
12501 (synopsis "GraphQL implementation for Python")
12502 (description
12503 "GraphQL implementation for Python. GraphQL is a data query language and
12504 runtime designed and used to request and deliver data to mobile and web apps.
12505 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12506 to Python.")
12507 (license license:expat)))
12508
12509 (define-public python2-graphql-core
12510 (package-with-python2 python-graphql-core))
12511
12512 (define-public python-graphql-relay
12513 (package
12514 (name "python-graphql-relay")
12515 (version "0.4.5")
12516 (source
12517 (origin
12518 (method url-fetch)
12519 (uri (pypi-uri "graphql-relay" version))
12520 (sha256
12521 (base32
12522 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12523 (build-system python-build-system)
12524 (native-inputs
12525 `(("python-pytest" ,python-pytest)))
12526 (propagated-inputs
12527 `(("python-graphql-core" ,python-graphql-core)
12528 ("python-promise" ,python-promise)
12529 ("python-six" ,python-six)))
12530 (home-page "https://github.com/graphql-python/graphql-relay-py")
12531 (synopsis "Relay implementation for Python")
12532 (description
12533 "This is a library to allow the easy creation of Relay-compliant servers
12534 using the GraphQL Python reference implementation of a GraphQL server. It
12535 should be noted that the code is a exact port of the original
12536 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12537 from Facebook.")
12538 (license license:expat)))
12539
12540 (define-public python2-graphql-relay
12541 (package-with-python2 python-graphql-relay))
12542
12543 (define-public python-graphene
12544 (package
12545 (name "python-graphene")
12546 (version "0.10.2")
12547 (source
12548 (origin
12549 (method url-fetch)
12550 (uri (pypi-uri "graphene" version))
12551 (sha256
12552 (base32
12553 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12554 (build-system python-build-system)
12555 (native-inputs
12556 `(("python-django-filter" ,python-django-filter)
12557 ("python-mock" ,python-mock)
12558 ("python-psycopg2" ,python-psycopg2)
12559 ("python-pytest-django" ,python-pytest-django)
12560 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12561 (propagated-inputs
12562 `(("python-graphql-core" ,python-graphql-core)
12563 ("python-graphql-relay" ,python-graphql-relay)
12564 ("python-iso8601" ,python-iso8601)
12565 ("python-promise" ,python-promise)
12566 ("python-six" ,python-six)))
12567 (home-page "http://graphene-python.org/")
12568 (synopsis "GraphQL Framework for Python")
12569 (description
12570 "Graphene is a Python library for building GraphQL schemas/types.
12571 A GraphQL schema describes your data model, and provides a GraphQL server
12572 with an associated set of resolve methods that know how to fetch data.")
12573 (properties `((python2-variant . ,(delay python2-graphene))))
12574 (license license:expat)))
12575
12576 (define-public python2-graphene
12577 (let ((base (package-with-python2
12578 (strip-python2-variant python-graphene))))
12579 (package (inherit base)
12580 (native-inputs
12581 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12582 ,@(package-native-inputs base))))))
12583
12584 (define-public python-nautilus
12585 (package
12586 (name "python-nautilus")
12587 (version "0.4.9")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "nautilus" version))
12592 (sha256
12593 (base32
12594 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12595 (build-system python-build-system)
12596 (arguments `(#:tests? #f)) ; fails to import test modules
12597 (propagated-inputs
12598 `(("python-bcrypt" ,python-bcrypt)
12599 ("python-click" ,python-click)
12600 ("python-consul" ,python-consul)
12601 ("python-graphene" ,python-graphene)
12602 ("python-jinja2" ,python-jinja2)
12603 ("python-peewee" ,python-peewee)
12604 ("python-pika" ,python-pika)
12605 ("python-tornado" ,python-tornado)
12606 ("python-wtforms" ,python-wtforms)))
12607 (native-inputs
12608 `(("python-nose2" ,python-nose2)))
12609 (home-page "https://github.com/AlecAivazis/nautilus")
12610 (synopsis "Library for creating microservice applications")
12611 (description
12612 "Nautilus is a framework for flux based microservices that looks to
12613 provide extendible implementations of common aspects of a cloud so that you can
12614 focus on building massively scalable web applications.")
12615 (license license:expat)))
12616
12617 (define-public python-snowballstemmer
12618 (package
12619 (name "python-snowballstemmer")
12620 (version "1.2.1")
12621 (source (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "snowballstemmer" version))
12624 (sha256
12625 (base32
12626 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12627 (build-system python-build-system)
12628 (arguments
12629 `(;; No tests exist
12630 #:tests? #f))
12631 (home-page "https://github.com/shibukawa/snowball_py")
12632 (synopsis "Snowball stemming library collection for Python")
12633 (description "This package provides 16 word stemmer algorithms generated
12634 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12635 English stemmer.")
12636 (license license:bsd-3)))
12637
12638 (define-public python2-snowballstemmer
12639 (package-with-python2 python-snowballstemmer))
12640
12641 (define-public python-sphinx-cloud-sptheme
12642 (package
12643 (name "python-sphinx-cloud-sptheme")
12644 (version "1.8.0")
12645 (source (origin
12646 (method url-fetch)
12647 (uri (pypi-uri "cloud_sptheme" version))
12648 (sha256
12649 (base32
12650 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12651 (build-system python-build-system)
12652 ;; FIXME: The 'pypi' release archive does not contain tests.
12653 (arguments '(#:tests? #f))
12654 (native-inputs
12655 `(("python-sphinx" ,python-sphinx)))
12656 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12657 (synopsis "'Cloud' theme for Sphinx documenter")
12658 (description "This package contains the \"Cloud\" theme for Sphinx and some
12659 related extensions.")
12660 (license license:bsd-3)))
12661
12662 (define-public python2-sphinx-cloud-sptheme
12663 (package-with-python2 python-sphinx-cloud-sptheme))
12664
12665 (define-public python-sphinx-alabaster-theme
12666 (package
12667 (name "python-sphinx-alabaster-theme")
12668 (version "0.7.9")
12669 (source (origin
12670 (method url-fetch)
12671 (uri (pypi-uri "alabaster" version))
12672 (sha256
12673 (base32
12674 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12675 (build-system python-build-system)
12676 (propagated-inputs
12677 `(("python-pygments" ,python-pygments)))
12678 (home-page "https://alabaster.readthedocs.io/")
12679 (synopsis "Configurable sidebar-enabled Sphinx theme")
12680 (description "Alabaster is a visually (c)lean, responsive, configurable
12681 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12682 (license license:bsd-3)))
12683
12684 (define-public python2-sphinx-alabaster-theme
12685 (package-with-python2 python-sphinx-alabaster-theme))
12686
12687 (define-public python-betamax
12688 (package
12689 (name "python-betamax")
12690 (version "0.8.0")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "betamax" version))
12695 (sha256
12696 (base32
12697 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12698 (build-system python-build-system)
12699 (arguments
12700 '(;; Many tests fail because they require networking.
12701 #:tests? #f))
12702 (propagated-inputs
12703 `(("python-requests" ,python-requests)))
12704 (home-page "https://github.com/sigmavirus24/betamax")
12705 (synopsis "Record HTTP interactions with python-requests")
12706 (description "Betamax will record your test suite's HTTP interactions and
12707 replay them during future tests. It is designed to work with python-requests.")
12708 (license license:expat)))
12709
12710 (define-public python2-betamax
12711 (package-with-python2 python-betamax))
12712
12713 (define-public python-s3transfer
12714 (package
12715 (name "python-s3transfer")
12716 (version "0.1.10")
12717 (source (origin
12718 (method url-fetch)
12719 (uri (pypi-uri "s3transfer" version))
12720 (sha256
12721 (base32
12722 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12723 (build-system python-build-system)
12724 (arguments
12725 `(#:phases
12726 (modify-phases %standard-phases
12727 (replace 'check
12728 (lambda _
12729 ;; 7 of the 'integration' tests require network access or login
12730 ;; credentials.
12731 (zero? (system* "nosetests" "--exclude=integration")))))))
12732 (native-inputs
12733 `(("python-docutils" ,python-docutils)
12734 ("python-mock" ,python-mock)
12735 ("python-nose" ,python-nose)))
12736 (propagated-inputs
12737 `(("python-botocore" ,python-botocore)))
12738 (synopsis "Amazon S3 Transfer Manager")
12739 (description "S3transfer is a Python library for managing Amazon S3
12740 transfers.")
12741 (home-page "https://github.com/boto/s3transfer")
12742 (license license:asl2.0)
12743 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12744
12745 (define-public python2-s3transfer
12746 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12747 (package
12748 (inherit base)
12749 (native-inputs
12750 `(("python2-futures" ,python2-futures)
12751 ,@(package-native-inputs base))))))
12752
12753 (define-public python-setproctitle
12754 (package
12755 (name "python-setproctitle")
12756 (version "1.1.10")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "setproctitle" version))
12761 (sha256
12762 (base32
12763 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12764 (build-system python-build-system)
12765 (arguments
12766 '(#:phases
12767 (modify-phases %standard-phases
12768 (add-before 'check 'patch-Makefile
12769 ;; Stricly this is only required for the python2 variant.
12770 ;; But adding a phase in an inherited package seems to be
12771 ;; cumbersum. So we patch even for python3.
12772 (lambda _
12773 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12774 (when nose
12775 (substitute* "Makefile"
12776 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12777 (string-append nose "/bin/nosetests "))))
12778 #t)))
12779 (replace 'check
12780 (lambda _
12781 (setenv "PYTHON" (or (which "python3") (which "python")))
12782 (setenv "PYCONFIG" (or (which "python3-config")
12783 (which "python-config")))
12784 (setenv "CC" "gcc")
12785 ;; No need to extend PYTHONPATH to find the built package, since
12786 ;; the Makefile will build anyway
12787 (zero? (system* "make" "check")))))))
12788 (native-inputs
12789 `(("procps" ,procps))) ; required for tests
12790 (home-page
12791 "https://github.com/dvarrazzo/py-setproctitle")
12792 (synopsis
12793 "Setproctitle implementation for Python to customize the process title")
12794 (description "The library allows a process to change its title (as displayed
12795 by system tools such as ps and top).
12796
12797 Changing the title is mostly useful in multi-process systems, for
12798 example when a master process is forked: changing the children's title
12799 allows to identify the task each process is busy with. The technique
12800 is used by PostgreSQL and the OpenSSH Server for example.")
12801 (license license:bsd-3)
12802 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12803
12804 (define-public python2-setproctitle
12805 (let ((base (package-with-python2
12806 (strip-python2-variant python-setproctitle))))
12807 (package
12808 (inherit base)
12809 (native-inputs `(("python2-nose" ,python2-nose)
12810 ,@(package-native-inputs base))))))
12811
12812 (define-public python-validictory
12813 (package
12814 (name "python-validictory")
12815 (version "1.0.1")
12816 (source
12817 (origin
12818 (method url-fetch)
12819 (uri (pypi-uri "validictory" version))
12820 (sha256
12821 (base32
12822 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12823 (build-system python-build-system)
12824 (arguments
12825 '(#:phases
12826 (modify-phases %standard-phases
12827 (add-after 'unpack 'bootstrap
12828 ;; Move the tests out of the package directory to avoid
12829 ;; packaging them.
12830 (lambda* _
12831 (rename-file "validictory/tests" "tests")
12832 (delete-file "tests/__init__.py")))
12833 (replace 'check
12834 (lambda _
12835 ;; Extend PYTHONPATH so the built package will be found.
12836 (setenv "PYTHONPATH"
12837 (string-append (getcwd) "/build/lib:"
12838 (getenv "PYTHONPATH")))
12839 (zero? (system* "py.test" "-vv" )))))))
12840 (native-inputs
12841 `(("python-pytest" ,python-pytest)))
12842 (home-page
12843 "https://github.com/jamesturk/validictory")
12844 (synopsis "General purpose Python data validator")
12845 (description "It allows validation of arbitrary Python data structures.
12846
12847 The schema format is based on the JSON Schema
12848 proposal (http://json-schema.org), so combined with json the library is also
12849 useful as a validator for JSON data.")
12850 (license license:expat)))
12851
12852 (define-public python2-validictory
12853 (package-with-python2 python-validictory))
12854
12855 (define-public python-aniso8601
12856 (package
12857 (name "python-aniso8601")
12858 (version "1.1.0")
12859 (source
12860 (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "aniso8601" version))
12863 (sha256
12864 (base32
12865 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12866 (build-system python-build-system)
12867 (propagated-inputs
12868 `(("python-dateutil" ,python-dateutil)))
12869 (home-page
12870 "https://bitbucket.org/nielsenb/aniso8601")
12871 (synopsis
12872 "Python library for parsing ISO 8601 strings")
12873 (description
12874 "This package contains a library for parsing ISO 8601 datetime strings.")
12875 (license license:bsd-3)))
12876
12877 (define-public python-flask-restful
12878 (package
12879 (name "python-flask-restful")
12880 (version "0.3.5")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "Flask-RESTful" version))
12885 (sha256
12886 (base32
12887 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12888 (build-system python-build-system)
12889 (propagated-inputs
12890 `(("python-aniso8601" ,python-aniso8601)
12891 ("python-flask" ,python-flask)
12892 ("python-pycrypto" ,python-pycrypto)
12893 ("python-pytz" ,python-pytz)))
12894 (native-inputs
12895 `(;; Optional dependency of Flask. Tests need it.
12896 ("python-blinker" ,python-blinker)
12897 ("python-mock" ,python-mock) ; For tests
12898 ("python-nose" ,python-nose) ; For tests
12899 ("python-sphinx" ,python-sphinx)))
12900 (home-page
12901 "https://www.github.com/flask-restful/flask-restful/")
12902 (synopsis
12903 "Flask module for creating REST APIs")
12904 (description
12905 "This package contains a Flask module for creating REST APIs.")
12906 (license license:bsd-3)))
12907
12908 (define-public python-flask-basicauth
12909 (package
12910 (name "python-flask-basicauth")
12911 (version "0.2.0")
12912 (source
12913 (origin
12914 (method url-fetch)
12915 (uri (pypi-uri "Flask-BasicAuth" version))
12916 (sha256
12917 (base32
12918 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12919 (build-system python-build-system)
12920 (propagated-inputs
12921 `(("python-flask" ,python-flask)))
12922 (home-page
12923 "https://github.com/jpvanhal/flask-basicauth")
12924 (synopsis
12925 "HTTP basic access authentication for Flask")
12926 (description
12927 "This package provides HTTP basic access authentication for Flask.")
12928 (license license:bsd-3)))
12929
12930 (define-public python-flask-sqlalchemy
12931 (package
12932 (name "python-flask-sqlalchemy")
12933 (version "2.1")
12934 (source
12935 (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "Flask-SQLAlchemy" version))
12938 (sha256
12939 (base32
12940 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12941 (build-system python-build-system)
12942 (propagated-inputs
12943 `(("python-flask" ,python-flask)
12944 ("python-sqlalchemy" ,python-sqlalchemy)))
12945 (home-page
12946 "https://github.com/mitsuhiko/flask-sqlalchemy")
12947 (synopsis
12948 "Module adding SQLAlchemy support to your Flask application")
12949 (description
12950 "This package adds SQLAlchemy support to your Flask application.")
12951 (license license:bsd-3)))
12952
12953 (define-public python-pyev
12954 (package
12955 (name "python-pyev")
12956 (version "0.9.0")
12957 (source
12958 (origin
12959 (method url-fetch)
12960 (uri (pypi-uri "pyev" version))
12961 (sha256
12962 (base32
12963 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12964 (build-system python-build-system)
12965 (arguments
12966 `(#:tests? #f ; no test suite
12967 #:phases
12968 (modify-phases %standard-phases
12969 (add-after 'unpack 'patch
12970 (lambda* (#:key inputs #:allow-other-keys)
12971 (let ((libev (string-append (assoc-ref inputs "libev")
12972 "/lib/libev.so.4")))
12973 (substitute* "setup.py"
12974 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12975 (string-append "libev_dll_name = \"" libev "\"")))))))))
12976 (inputs
12977 `(("libev" ,libev)))
12978 (home-page "http://pythonhosted.org/pyev/")
12979 (synopsis "Python libev interface")
12980 (description "Pyev provides a Python interface to libev.")
12981 (license license:gpl3)))
12982
12983 (define-public python2-pyev
12984 (package-with-python2 python-pyev))
12985
12986 (define-public python-imagesize
12987 (package
12988 (name "python-imagesize")
12989 (version "0.7.1")
12990 (source
12991 (origin
12992 (method url-fetch)
12993 (uri (pypi-uri "imagesize" version))
12994 (sha256
12995 (base32
12996 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12997 (build-system python-build-system)
12998 (arguments
12999 '(;; Test files are not distributed on PyPi:
13000 ;; https://github.com/shibukawa/imagesize_py/issues/7
13001 #:tests? #f))
13002 (home-page "https://github.com/shibukawa/imagesize_py")
13003 (synopsis "Gets image size of files in variaous formats in Python")
13004 (description
13005 "This package allows determination of image size from
13006 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13007 (license license:expat)))
13008
13009 (define-public python2-imagesize
13010 (package-with-python2 python-imagesize))
13011
13012 (define-public python-axolotl-curve25519
13013 (package
13014 (name "python-axolotl-curve25519")
13015 (version "0.1")
13016 (source
13017 (origin
13018 (method git-fetch)
13019 (uri (git-reference
13020 (url "git://github.com/tgalal/python-axolotl-curve25519")
13021 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13022 (file-name (string-append name "-" version "-checkout"))
13023 (sha256
13024 (base32
13025 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13026 (build-system python-build-system)
13027 (arguments
13028 `(;; Prevent creation of the egg. This works around
13029 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13030 #:configure-flags '("--root=/")))
13031 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13032 (synopsis "Python wrapper for curve25519 library")
13033 (description "This is a python wrapper for the curve25519 library
13034 with ed25519 signatures. The C code was pulled from
13035 libaxolotl-android. At the moment this wrapper is meant for use by
13036 python-axolotl.")
13037 (license (list license:gpl3 ; Most files
13038 license:bsd-3)))) ; curve/curve25519-donna.c
13039
13040 (define-public python2-axolotl-curve25519
13041 (package-with-python2 python-axolotl-curve25519))
13042
13043 (define-public python-axolotl
13044 (package
13045 (name "python-axolotl")
13046 (version "0.1.35")
13047 (source
13048 (origin
13049 (method url-fetch)
13050 (uri (string-append
13051 "https://github.com/tgalal/python-axolotl/archive/"
13052 version ".tar.gz"))
13053 (file-name (string-append name "-" version ".tar.gz"))
13054 (sha256
13055 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13056 (build-system python-build-system)
13057 (arguments
13058 `(#:phases
13059 (modify-phases %standard-phases
13060 ;; Don't install tests
13061 (add-before 'install 'remove-tests
13062 (lambda _
13063 (for-each delete-file-recursively
13064 '("axolotl/tests" "build/lib/axolotl/tests"))
13065 #t)))))
13066 (propagated-inputs
13067 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13068 ("python-dateutil" ,python-dateutil)
13069 ("python-protobuf" ,python-protobuf)
13070 ("python-pycrypto" ,python-pycrypto)))
13071 (home-page "https://github.com/tgalal/python-axolotl")
13072 (synopsis "Python port of libaxolotl-android")
13073 (description "This is a python port of libaxolotl-android. This
13074 is a ratcheting forward secrecy protocol that works in synchronous and
13075 asynchronous messaging environments.")
13076 (license license:gpl3)))
13077
13078 (define-public python2-axolotl
13079 (package-with-python2 python-axolotl))
13080
13081 (define-public python-termstyle
13082 (package
13083 (name "python-termstyle")
13084 (version "0.1.11")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "termstyle" version))
13089 (sha256
13090 (base32
13091 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13092 (build-system python-build-system)
13093 (arguments
13094 '(#:phases
13095 (modify-phases %standard-phases
13096 (replace 'check
13097 (lambda _
13098 (zero? (system* "python" "test3.py")))))))
13099 (home-page "https://github.com/gfxmonk/termstyle")
13100 (synopsis "Console text coloring for Python")
13101 (description "This package provides console text coloring for Python.")
13102 (license license:bsd-3)))
13103
13104 (define-public python-rednose
13105 (package
13106 (name "python-rednose")
13107 (version "1.2.1")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "rednose" version))
13112 (sha256
13113 (base32
13114 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13115 (build-system python-build-system)
13116 (arguments
13117 `(#:phases
13118 (modify-phases %standard-phases
13119 (add-after 'unpack 'fix-deps
13120 (lambda _
13121 ;; See <https://github.com/JBKahn/rednose/issues/12>
13122 (substitute* "setup.py"
13123 (("python-termstyle") "termstyle"))
13124 #t)))))
13125 (propagated-inputs
13126 `(("python-colorama" ,python-colorama)
13127 ("python-termstyle" ,python-termstyle)))
13128 (native-inputs
13129 `(("python-six" ,python-six)
13130 ("python-nose" ,python-nose)))
13131 (home-page "https://github.com/JBKahn/rednose")
13132 (synopsis "Colored output for Python nosetests")
13133 (description "This package provides colored output for the
13134 @command{nosetests} command of the Python Nose unit test framework.")
13135 (license license:bsd-3)))
13136
13137 (define-public python2-rednose
13138 (package-with-python2 python-rednose))
13139
13140 (define-public python-flask-restplus
13141 (package
13142 (name "python-flask-restplus")
13143 (version "0.9.2")
13144 (source
13145 (origin
13146 (method url-fetch)
13147 (uri (pypi-uri "flask-restplus" version))
13148 (sha256
13149 (base32
13150 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13151 (build-system python-build-system)
13152 (arguments
13153 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13154 ;; #:phases
13155 ;; (modify-phases %standard-phases
13156 ;; (replace 'check
13157 ;; (lambda _
13158 ;; (zero? (system* "nosetests")))))))
13159 (propagated-inputs
13160 `(("python-aniso8601" ,python-aniso8601)
13161 ("python-flask" ,python-flask)
13162 ("python-jsonschema" ,python-jsonschema)
13163 ("python-pytz" ,python-pytz)
13164 ("python-six" ,python-six)))
13165 (native-inputs
13166 `(("python-tzlocal" ,python-tzlocal)
13167 ("python-blinker" ,python-blinker)
13168 ("python-nose" ,python-nose)
13169 ("python-rednose" ,python-rednose)))
13170 (home-page "https://github.com/noirbizarre/flask-restplus")
13171 (synopsis "Framework for documented API development with Flask")
13172 (description "This package provides a framework for API development with
13173 the Flask web framework in Python. It is similar to package
13174 @code{python-flask-restful} but supports the @code{python-swagger}
13175 documentation builder.")
13176 (license license:expat)))
13177
13178 (define-public python-sadisplay
13179 (package
13180 (name "python-sadisplay")
13181 (version "0.4.6")
13182 (source
13183 (origin
13184 (method url-fetch)
13185 (uri (pypi-uri "sadisplay" version))
13186 (sha256
13187 (base32
13188 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13189 (build-system python-build-system)
13190 (propagated-inputs
13191 `(("python-sqlalchemy" ,python-sqlalchemy)))
13192 (native-inputs
13193 `(("python-nose" ,python-nose)))
13194 (home-page "https://bitbucket.org/estin/sadisplay")
13195 (synopsis "SQLAlchemy schema displayer")
13196 (description "This package provides a program to build Entity
13197 Relationship diagrams from a SQLAlchemy model (or directly from the
13198 database).")
13199 (license license:bsd-3)))
13200
13201 (define-public python2-sadisplay
13202 (package-with-python2 python-sadisplay))
13203
13204 (define-public python-flask-restful-swagger
13205 (package
13206 (name "python-flask-restful-swagger")
13207 (version "0.19")
13208 (source
13209 (origin
13210 (method url-fetch)
13211 (uri (pypi-uri "flask-restful-swagger" version))
13212 (sha256
13213 (base32
13214 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13215 (build-system python-build-system)
13216 (propagated-inputs
13217 `(("python-flask-restful" ,python-flask-restful)))
13218 (home-page "https://github.com/rantav/flask-restful-swagger")
13219 (synopsis "Extract Swagger specs from Flask-Restful projects")
13220 (description "This package lets you extract Swagger API documentation
13221 specs from your Flask-Restful projects.")
13222 (license license:expat)))
13223
13224 (define-public python2-flask-restful-swagger
13225 (package-with-python2 python-flask-restful-swagger))
13226
13227 (define-public python-argcomplete
13228 (package
13229 (name "python-argcomplete")
13230 (version "1.7.0")
13231 (source
13232 (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "argcomplete" version))
13235 (sha256
13236 (base32
13237 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13238 (build-system python-build-system)
13239 (native-inputs
13240 `(("python-pexpect" ,python-pexpect)
13241 ("tcsh" ,tcsh)))
13242 (home-page "https://github.com/kislyuk/argcomplete")
13243 (synopsis "Shell tab completion for Python argparse")
13244 (description "argcomplete provides extensible command line tab completion
13245 of arguments and options for Python scripts using @code{argparse}. It's
13246 particularly useful for programs with many options or sub-parsers that can
13247 dynamically suggest completions; for example, when browsing resources over the
13248 network.")
13249 (license license:asl2.0)))
13250
13251 (define-public python2-argcomplete
13252 (package-with-python2 python-argcomplete))
13253
13254 (define-public python-xopen
13255 (package
13256 (name "python-xopen")
13257 (version "0.1.1")
13258 (source
13259 (origin
13260 (method url-fetch)
13261 (uri (pypi-uri "xopen" version))
13262 (sha256
13263 (base32
13264 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13265 (file-name (string-append name "-" version ".tar.gz"))))
13266 (build-system python-build-system)
13267 (home-page "https://github.com/marcelm/xopen/")
13268 (synopsis "Open compressed files transparently")
13269 (description "This module provides an @code{xopen} function that works like
13270 Python's built-in @code{open} function, but can also deal with compressed files.
13271 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13272 recognized by their file extensions. The focus is on being as efficient as
13273 possible on all supported Python versions.")
13274 (license license:expat)))
13275
13276 (define-public python2-xopen
13277 (package-with-python2 python-xopen))
13278
13279 (define-public python2-cheetah
13280 (package
13281 (name "python2-cheetah")
13282 (version "2.4.4")
13283 (source
13284 (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "Cheetah" version))
13287 (sha256
13288 (base32
13289 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13290 (build-system python-build-system)
13291 (arguments
13292 `(#:python ,python-2))
13293 (propagated-inputs
13294 `(("python2-markdown" ,python2-markdown)))
13295 (home-page "https://pythonhosted.org/Cheetah/")
13296 (synopsis "Template engine")
13297 (description "Cheetah is a text-based template engine and Python code
13298 generator.
13299
13300 Cheetah can be used as a standalone templating utility or referenced as
13301 a library from other Python applications. It has many potential uses,
13302 but web developers looking for a viable alternative to ASP, JSP, PHP and
13303 PSP are expected to be its principle user group.
13304
13305 Features:
13306 @enumerate
13307 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13308 text-based format.
13309 @item Cleanly separates content, graphic design, and program code.
13310 @item Blends the power and flexibility of Python with a simple template language
13311 that non-programmers can understand.
13312 @item Gives template writers full access to any Python data structure, module,
13313 function, object, or method in their templates.
13314 @item Makes code reuse easy by providing an object-orientated interface to
13315 templates that is accessible from Python code or other Cheetah templates.
13316 One template can subclass another and selectively reimplement sections of it.
13317 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13318 improve the performance of a dynamic website.
13319 @item Compiles templates into optimized, yet readable, Python code.
13320 @end enumerate")
13321 (license (license:x11-style "file://LICENSE"))))
13322
13323 (define-public python-dulwich
13324 (package
13325 (name "python-dulwich")
13326 (version "0.16.3")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 (uri (list (string-append "https://www.dulwich.io/releases/"
13331 "dulwich-" version ".tar.gz")
13332 (pypi-uri "dulwich" version)))
13333 (sha256
13334 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13335 (build-system python-build-system)
13336 (arguments
13337 `(#:phases
13338 (modify-phases %standard-phases
13339 (add-before 'check 'fix-tests
13340 (lambda* (#:key inputs #:allow-other-keys)
13341 ;; The tests use Popen with a custom environment which doesn't
13342 ;; include PATH.
13343 (substitute* "dulwich/tests/compat/utils.py"
13344 (("'git'") (string-append "'"
13345 (which "git")
13346 "'")))
13347 (substitute* '("dulwich/tests/test_repository.py"
13348 "dulwich/tests/test_hooks.py")
13349 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13350 (setenv "TEST_RUNNER" "unittest")
13351 (setenv "PYTHONHASHSEED" "random")
13352 #t)))))
13353 (propagated-inputs
13354 `(("python-fastimport" ,python-fastimport)))
13355 (native-inputs
13356 `(("python-mock" ,python-mock)
13357 ("python-geventhttpclient" ,python-geventhttpclient)
13358 ("git" ,git)))
13359 (home-page "https://www.dulwich.io/")
13360 (synopsis "Git implementation in Python")
13361 (description "Dulwich is an implementation of the Git file formats and
13362 protocols written in pure Python.")
13363 ;; Can be used with either license.
13364 (license (list license:asl2.0 license:gpl2+))))
13365
13366 (define-public python2-dulwich
13367 (package-with-python2 python-dulwich))
13368
13369 (define-public python-pbkdf2
13370 (package
13371 (name "python-pbkdf2")
13372 (version "1.3")
13373 (source
13374 (origin
13375 (method url-fetch)
13376 (uri (pypi-uri "pbkdf2" version))
13377 (sha256
13378 (base32
13379 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13380 (build-system python-build-system)
13381 (arguments
13382 '(#:phases
13383 (modify-phases %standard-phases
13384 (replace 'check
13385 (lambda _
13386 (setenv "PYTHONPATH"
13387 (string-append (getcwd) "/build/lib:"
13388 (getenv "PYTHONPATH")))
13389 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13390 (propagated-inputs
13391 `(("python-pycrypto" ,python-pycrypto))) ; optional
13392 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13393 (synopsis "Password-based key derivation")
13394 (description "This module implements the password-based key derivation
13395 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13396
13397 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13398 is part of the RSA Public Key Cryptography Standards series. The provided
13399 implementation takes a password or a passphrase and a salt value (and
13400 optionally a iteration count, a digest module, and a MAC module) and provides
13401 a file-like object from which an arbitrarly-sized key can be read.")
13402 (license license:expat)))
13403
13404 (define-public python2-pbkdf2
13405 (package-with-python2 python-pbkdf2))
13406
13407 (define-public python-qrcode
13408 (package
13409 (name "python-qrcode")
13410 (version "5.3")
13411 (source
13412 (origin
13413 (method url-fetch)
13414 (uri (pypi-uri "qrcode" version))
13415 (sha256
13416 (base32
13417 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13418 (build-system python-build-system)
13419 (arguments
13420 ;; FIXME: Tests require packaging 'pymaging'.
13421 '(#:tests? #f))
13422 (propagated-inputs
13423 `(("python-lxml" ,python-lxml) ; for SVG output
13424 ("python-pillow" ,python-pillow) ; for PNG output
13425 ("python-six" ,python-six)))
13426 (home-page "https://github.com/lincolnloop/python-qrcode")
13427 (synopsis "QR Code image generator")
13428 (description "This package provides a pure Python QR Code generator
13429 module. It uses the Python Imaging Library (PIL) to allow for the generation
13430 of QR Codes.
13431
13432 In addition this package provides a command line tool to generate QR codes and
13433 either write these QR codes to a file or do the output as ascii art at the
13434 console.")
13435 (license license:bsd-3)))
13436
13437 (define-public python2-qrcode
13438 (package-with-python2 python-qrcode))
13439
13440 ;; SlowAES isn't compatible with Python 3.
13441 (define-public python2-slowaes
13442 (package
13443 (name "python2-slowaes")
13444 (version "0.1a1")
13445 (source
13446 (origin
13447 (method url-fetch)
13448 (uri (pypi-uri "slowaes" version))
13449 (sha256
13450 (base32
13451 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13452 (build-system python-build-system)
13453 (arguments `(#:python ,python-2))
13454 (home-page "http://code.google.com/p/slowaes/")
13455 (synopsis "Implementation of AES in Python")
13456 (description "This package contains an implementation of AES in Python.
13457 This implementation is slow (hence the project name) but still useful when
13458 faster ones are not available.")
13459 (license license:asl2.0)))
13460
13461 (define-public python-rst2ansi
13462 (package
13463 (name "python-rst2ansi")
13464 (version "0.1.5")
13465 (source
13466 (origin
13467 (method url-fetch)
13468 (uri (pypi-uri "rst2ansi" version))
13469 (sha256
13470 (base32
13471 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13472 (build-system python-build-system)
13473 (propagated-inputs
13474 `(("python-docutils" ,python-docutils)))
13475 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13476 (synopsis "Convert RST to ANSI-decorated console output")
13477 (description
13478 "Python module dedicated to rendering RST (reStructuredText) documents
13479 to ansi-escaped strings suitable for display in a terminal.")
13480 (license license:expat)))
13481
13482 (define-public python-ansi2html
13483 (package
13484 (name "python-ansi2html")
13485 (version "1.2.0")
13486 (source
13487 (origin
13488 (method url-fetch)
13489 (uri (pypi-uri "ansi2html" version))
13490 (sha256
13491 (base32
13492 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13493 (build-system python-build-system)
13494 (native-inputs
13495 `(("python-mock" ,python-mock)
13496 ("python-nose" ,python-nose)))
13497 (propagated-inputs
13498 `(("python-six" ,python-six)))
13499 (home-page "http://github.com/ralphbean/ansi2html")
13500 (synopsis "Convert ANSI-decorated console output to HTML")
13501 (description
13502 "@command{ansi2html} is a Python library and command line utility for
13503 convering text with ANSI color codes to HTML or LaTeX.")
13504 (license license:gpl3+)))
13505
13506 (define-public python2-ansi2html
13507 (package-with-python2 python-ansi2html))
13508
13509 (define-public python-ddt
13510 (package
13511 (name "python-ddt")
13512 (version "1.1.1")
13513 (source
13514 (origin
13515 (method url-fetch)
13516 (uri (pypi-uri "ddt" version))
13517 (sha256
13518 (base32
13519 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13520 (build-system python-build-system)
13521 (native-inputs
13522 `(("python-mock" ,python-mock)
13523 ("python-nose" ,python-nose)))
13524 (propagated-inputs
13525 `(("python-six" ,python-six)
13526 ("python-pyyaml" ,python-pyyaml)))
13527 (home-page "https://github.com/txels/ddt")
13528 (synopsis "Data-Driven Tests")
13529 (description
13530 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13531 it with different test data, and make it appear as multiple test cases.")
13532 (license license:expat)))
13533
13534 (define-public python2-ddt
13535 (package-with-python2 python-ddt))
13536
13537 (define-public python-pycosat
13538 (package
13539 (name "python-pycosat")
13540 (version "0.6.1")
13541 (source
13542 (origin
13543 (method url-fetch)
13544 (uri (pypi-uri "pycosat" version))
13545 (sha256
13546 (base32
13547 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13548 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13549 (build-system python-build-system)
13550 (home-page "https://github.com/ContinuumIO/pycosat")
13551 (synopsis "Bindings to picosat (a SAT solver)")
13552 (description
13553 "This package provides efficient Python bindings to @code{picosat} on
13554 the C level. When importing pycosat, the @code{picosat} solver becomes part
13555 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13556 Problem} (SAT) solver.")
13557 (license license:expat)))
13558
13559 (define-public python2-pycosat
13560 (package-with-python2 python-pycosat))
13561
13562 (define-public python2-ruamel.ordereddict
13563 (package
13564 (name "python2-ruamel.ordereddict")
13565 (version "0.4.9")
13566 (source
13567 (origin
13568 (method url-fetch)
13569 (uri (pypi-uri "ruamel.ordereddict" version))
13570 (sha256
13571 (base32
13572 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13573 (build-system python-build-system)
13574 (arguments
13575 `(#:python ,python-2
13576 #:phases
13577 (modify-phases %standard-phases
13578 (delete 'check)
13579 (add-after 'install 'check
13580 (lambda* (#:key inputs outputs #:allow-other-keys)
13581 (add-installed-pythonpath inputs outputs)
13582 (zero? (system* "python" "test/testordereddict.py")))))))
13583 (home-page "https://bitbucket.org/ruamel/ordereddict")
13584 (synopsis "Version of dict that keeps keys in insertion order")
13585 (description
13586 "This is an implementation of an ordered dictionary with @dfn{Key
13587 Insertion Order} (KIO: updates of values do not affect the position of the
13588 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13589 removed and put at the back). The standard library module @code{OrderedDict},
13590 implemented later, implements a subset of @code{ordereddict} functionality.
13591 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13592 Order} (KSO, no sorting function can be specified, but a transform can be
13593 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13594 (license license:expat)))
13595
13596 (define-public python-pypeg2
13597 (package
13598 (name "python-pypeg2")
13599 (version "2.15.2")
13600 (source
13601 (origin
13602 (method url-fetch)
13603 (uri (pypi-uri "pyPEG2" version))
13604 (sha256
13605 (base32
13606 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13607 (build-system python-build-system)
13608 (propagated-inputs `(("python-lxml" ,python-lxml)))
13609 (arguments
13610 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13611 '(#:tests? #f))
13612 (home-page "https://fdik.org/pyPEG/")
13613 (synopsis "Parsering Expression Grammars in Python")
13614 (description "PyPEG is an intrinsic parser interpreter framework for
13615 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13616 parse many formal languages.")
13617 (license license:gpl2)))
13618
13619 (define-public python2-cliapp
13620 (package
13621 (name "python2-cliapp")
13622 (version "1.20160724")
13623 (source
13624 (origin
13625 (method url-fetch)
13626 (uri (string-append
13627 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13628 version ".tar.gz"))
13629 (sha256
13630 (base32
13631 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13632 (build-system python-build-system)
13633 (arguments
13634 `(#:python ,python-2))
13635 (propagated-inputs
13636 `(("python2-pyaml" ,python2-pyaml)))
13637 (home-page "https://liw.fi/cliapp/")
13638 (synopsis "Python framework for command line programs")
13639 (description "@code{python2-cliapp} is a python framework for
13640 command line programs. It contains the typical stuff such programs
13641 need to do, such as parsing the command line for options, and
13642 iterating over input files.")
13643 (license license:gpl2+)))
13644
13645 (define-public python2-ttystatus
13646 (package
13647 (name "python2-ttystatus")
13648 (version "0.32")
13649 (source
13650 (origin
13651 (method url-fetch)
13652 (uri (string-append
13653 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13654 version ".tar.gz"))
13655 (sha256
13656 (base32
13657 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13658 (build-system python-build-system)
13659 (arguments
13660 `(#:python ,python-2))
13661 (home-page "https://liw.fi/ttystatus/")
13662 (synopsis "Python library for showing progress reporting and
13663 status updates on terminals")
13664 (description "@code{python2-ttystatus} is a python library for
13665 showing progress reporting and status updates on terminals, for
13666 command line programs. Output is automatically adapted to the width
13667 of the terminal: truncated if it does not fit, and resized if the
13668 terminal size changes.")
13669 (license license:gpl3+)))
13670
13671 (define-public python2-tracing
13672 (package
13673 (name "python2-tracing")
13674 (version "0.10")
13675 (source
13676 (origin
13677 (method url-fetch)
13678 (uri (string-append
13679 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13680 version ".tar.gz"))
13681 (sha256
13682 (base32
13683 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13684 (build-system python-build-system)
13685 (arguments
13686 `(#:python ,python-2))
13687 (home-page "https://liw.fi/tracing/")
13688 (synopsis "Python debug logging helper")
13689 (description "@code{python2-tracing} is a python library for
13690 logging debug messages. It provides a way to turn debugging messages
13691 on and off, based on the filename they occur in. It is much faster
13692 than using @code{logging.Filter} to accomplish the same thing, which
13693 matters when code is run in production mode. The actual logging still
13694 happens using the @code{logging} library.")
13695 (license license:gpl3+)))
13696
13697 (define-public python2-larch
13698 (package
13699 (name "python2-larch")
13700 (version "1.20151025")
13701 (source
13702 (origin
13703 (method url-fetch)
13704 (uri (string-append
13705 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13706 version ".tar.gz"))
13707 (sha256
13708 (base32
13709 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13710 (build-system python-build-system)
13711 (arguments
13712 `(#:python ,python-2))
13713 (propagated-inputs
13714 `(("python2-tracing" ,python2-tracing)))
13715 (home-page "https://liw.fi/larch/")
13716 (synopsis "Python copy-on-write B-tree library")
13717 (description "@code{python2-larch} is an implementation of
13718 particular kind of B-tree, based on research by Ohad Rodeh. See
13719 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13720 on the data structure.
13721
13722 The distinctive feature of this B-tree is that a node is never
13723 (conceptually) modified. Instead, all updates are done by
13724 copy-on-write. This makes it easy to clone a tree, and modify only the
13725 clone, while other processes access the original tree.")
13726 (license license:gpl3+)))
13727
13728 (define-public python-htmlmin
13729 (package
13730 (name "python-htmlmin")
13731 (version "0.1.10")
13732 (source
13733 (origin
13734 (method url-fetch)
13735 (uri (pypi-uri "htmlmin" version))
13736 (sha256
13737 (base32
13738 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13739 (arguments
13740 `(#:tests? #f)) ;htmlmin has no tests
13741 (build-system python-build-system)
13742 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13743 (synopsis "HTML minifier")
13744 (description "@code{htmlmin} is an HTML minifier that just works.
13745 It comes with safe defaults and easily configurable options.")
13746 (license license:bsd-3)))
13747
13748 (define-public python2-htmlmin
13749 (package-with-python2 python-htmlmin))
13750
13751 (define-public python-flask-htmlmin
13752 (package
13753 (name "python-flask-htmlmin")
13754 (version "1.2")
13755 (source
13756 (origin
13757 (method url-fetch)
13758 (uri (pypi-uri "Flask-HTMLmin" version))
13759 (sha256
13760 (base32
13761 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13762 (propagated-inputs
13763 `(("python-flask" ,python-flask)
13764 ("python-htmlmin" ,python-htmlmin)))
13765 (build-system python-build-system)
13766 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13767 (synopsis "HTML response minifier for Flask")
13768 (description
13769 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13770 (license license:bsd-3)))
13771
13772 (define-public python2-flask-htmlmin
13773 (package-with-python2 python-flask-htmlmin))
13774
13775 (define-public python-flask-login
13776 (package
13777 (name "python-flask-login")
13778 (version "0.4.0")
13779 (source
13780 (origin
13781 (method url-fetch)
13782 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13783 version ".tar.gz"))
13784 (file-name (string-append name "-" version ".tar.gz"))
13785 (sha256
13786 (base32
13787 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13788 (arguments
13789 ;; Tests fail PEP8 compliance. See:
13790 ;; https://github.com/maxcountryman/flask-login/issues/340
13791 `(#:tests? #f))
13792 (build-system python-build-system)
13793 (home-page "https://github.com/maxcountryman/flask-login")
13794 (synopsis "User session management for Flask")
13795 (description
13796 "@code{Flask-Login} provides user session management for Flask. It
13797 handles the common tasks of logging in, logging out, and remembering your
13798 users' sessions over extended periods of time.")
13799 (license license:expat)))
13800
13801 (define-public python2-flask-login
13802 (package-with-python2 python-flask-login))
13803
13804 (define-public python-astroid
13805 (package
13806 (name "python-astroid")
13807 (version "1.4.9")
13808 (source
13809 (origin
13810 (method url-fetch)
13811 (uri (string-append
13812 "https://github.com/PyCQA/astroid/archive/astroid-"
13813 version ".tar.gz"))
13814 (sha256
13815 (base32
13816 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13817 (build-system python-build-system)
13818 (propagated-inputs
13819 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13820 ("python-six" ,python-six)
13821 ("python-wrapt" ,python-wrapt)))
13822 (arguments
13823 `(#:phases
13824 (modify-phases %standard-phases
13825 (replace 'check
13826 (lambda _
13827 (zero? (system* "python" "-m" "unittest" "discover"
13828 "-p" "unittest*.py")))))))
13829 (home-page "https://github.com/PyCQA/astroid")
13830 (synopsis "Common base representation of python source code for pylint and
13831 other projects")
13832 (description "@code{python-astroid} provides a common base representation
13833 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13834
13835 It provides a compatible representation which comes from the _ast module. It
13836 rebuilds the tree generated by the builtin _ast module by recursively walking
13837 down the AST and building an extended ast. The new node classes have
13838 additional methods and attributes for different usages. They include some
13839 support for static inference and local name scopes. Furthermore, astroid
13840 builds partial trees by inspecting living objects.")
13841 (license license:lgpl2.1+)))
13842
13843 (define-public python2-astroid
13844 (package-with-python2 python-astroid))
13845
13846 (define-public python-isort
13847 (package
13848 (name "python-isort")
13849 (version "4.2.5")
13850 (source
13851 (origin
13852 (method url-fetch)
13853 (uri (string-append
13854 "https://github.com/timothycrosley/isort/archive/"
13855 version ".tar.gz"))
13856 (file-name (string-append name "-" version ".tar.gz"))
13857 (sha256
13858 (base32
13859 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13860 (build-system python-build-system)
13861 (native-inputs
13862 `(("python-mock" ,python-mock)
13863 ("python-pytest" ,python-pytest)))
13864 (home-page "https://github.com/timothycrosley/isort")
13865 (synopsis "Python utility/library to sort python imports")
13866 (description "@code{python-isort} is a python utility/library to sort
13867 imports alphabetically, and automatically separated into sections. It
13868 provides a command line utility, a python library and plugins for various
13869 editors.")
13870 (license license:expat)))
13871
13872 (define-public python2-isort
13873 (package-with-python2 python-isort))
13874
13875 (define-public python2-backports-functools-lru-cache
13876 (package
13877 (name "python2-backports-functools-lru-cache")
13878 (version "1.3")
13879 (source
13880 (origin
13881 (method url-fetch)
13882 ;; only the pypi tarballs contain the necessary metadata
13883 (uri (pypi-uri "backports.functools_lru_cache" version))
13884 (sha256
13885 (base32
13886 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13887 (build-system python-build-system)
13888 (native-inputs
13889 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13890 (arguments
13891 `(#:python ,python-2))
13892 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13893 (synopsis "Backport of functools.lru_cache from Python 3.3")
13894 (description "@code{python2-backports-functools-lru-cache} is a backport
13895 of @code{functools.lru_cache} from python 3.3.")
13896 (license license:expat)))
13897
13898 (define-public python-configparser
13899 (package
13900 (name "python-configparser")
13901 (version "3.5.0")
13902 (source
13903 (origin
13904 (method url-fetch)
13905 (uri (string-append
13906 "https://bitbucket.org/ambv/configparser/get/"
13907 version ".tar.bz2"))
13908 (file-name (string-append name "-" version ".tar.gz"))
13909 (sha256
13910 (base32
13911 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13912 (build-system python-build-system)
13913 (home-page "http://docs.python.org/py3k/library/configparser.html")
13914 (synopsis "Backport of configparser from python 3.5")
13915 (description "@code{python-configparser} is a backport of
13916 @code{configparser} from Python 3.5 so that it can be used directly
13917 in other versions.")
13918 (license license:expat)))
13919
13920 (define-public python2-configparser
13921 (package-with-python2 python-configparser))
13922
13923 (define-public python2-coverage-test-runner
13924 (package
13925 (name "python2-coverage-test-runner")
13926 (version "1.11")
13927 (source
13928 (origin
13929 (method url-fetch)
13930 (uri (string-append
13931 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13932 "coverage-test-runner/snapshot/coverage-test-runner-"
13933 version ".tar.gz"))
13934 (sha256
13935 (base32
13936 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13937 (build-system python-build-system)
13938 (arguments
13939 `(#:python ,python-2
13940 #:phases
13941 (modify-phases %standard-phases
13942 (replace 'check
13943 (lambda _
13944 (zero? (system* "./testrun")))))))
13945 (propagated-inputs
13946 `(("python2-coverage" ,python2-coverage)))
13947 (home-page "https://liw.fi/coverage-test-runner/")
13948 (synopsis "Python module for running unit tests")
13949 (description "@code{CoverageTestRunner} is a python module for running
13950 unit tests and failing them if the unit test module does not exercise all
13951 statements in the module it tests.")
13952 (license license:gpl3+)))
13953
13954 (define-public python-pylint
13955 (package
13956 (name "python-pylint")
13957 (version "1.6.5")
13958 (source
13959 (origin
13960 (method url-fetch)
13961 (uri (string-append
13962 "https://github.com/PyCQA/pylint/archive/pylint-"
13963 version ".tar.gz"))
13964 (sha256
13965 (base32
13966 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13967 (build-system python-build-system)
13968 (native-inputs
13969 `(("python-tox" ,python-tox)))
13970 (propagated-inputs
13971 `(("python-astroid" ,python-astroid)
13972 ("python-isort" ,python-isort)
13973 ("python-mccabe" ,python-mccabe)
13974 ("python-six" ,python-six)))
13975 (arguments
13976 `(#:phases
13977 (modify-phases %standard-phases
13978 (replace 'check
13979 (lambda _
13980 ;; Somehow, tests for python2-pylint
13981 ;; fail if run from the build directory
13982 (let ((work "/tmp/work"))
13983 (mkdir-p work)
13984 (setenv "PYTHONPATH"
13985 (string-append (getenv "PYTHONPATH") ":" work))
13986 (copy-recursively "." work)
13987 (with-directory-excursion "/tmp"
13988 (zero? (system* "python" "-m" "unittest" "discover"
13989 "-s" (string-append work "/pylint/test")
13990 "-p" "*test_*.py")))))))))
13991 (home-page "https://github.com/PyCQA/pylint")
13992 (synopsis "Python source code analyzer which looks for coding standard
13993 errors")
13994 (description "Pylint is a Python source code analyzer which looks
13995 for programming errors, helps enforcing a coding standard and sniffs
13996 for some code smells (as defined in Martin Fowler's Refactoring book).
13997
13998 Pylint has many rules enabled by default, way too much to silence them
13999 all on a minimally sized program. It's highly configurable and handle
14000 pragmas to control it from within your code. Additionally, it is
14001 possible to write plugins to add your own checks.")
14002 (license license:gpl2+)))
14003
14004 (define-public python2-pylint
14005 (let ((pylint (package-with-python2 python-pylint)))
14006 (package (inherit pylint)
14007 (propagated-inputs
14008 `(("python2-backports-functools-lru-cache"
14009 ,python2-backports-functools-lru-cache)
14010 ("python2-configparser" ,python2-configparser)
14011 ,@(package-propagated-inputs pylint))))))
14012
14013 (define-public python-paramunittest
14014 (package
14015 (name "python-paramunittest")
14016 (version "0.2")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "ParamUnittest" version))
14021 (sha256
14022 (base32
14023 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14024 (build-system python-build-system)
14025 (home-page
14026 "https://github.com/rik0/ParamUnittest")
14027 (synopsis
14028 "Simple extension to have parametrized unit tests")
14029 (description
14030 "This package allows to create parametrized unit-tests that work with the standard
14031 unittest package. A parametrized test case is automatically converted to multiple test
14032 cases. Since they are TestCase subclasses, they work with other test suites that
14033 recognize TestCases.")
14034 (license license:bsd-2)))
14035
14036 (define-public python2-python-paramunittest
14037 (package-with-python2 python-paramunittest))
14038
14039 (define-public python-mando
14040 (package
14041 (name "python-mando")
14042 (version "0.5")
14043 (source
14044 (origin
14045 (method url-fetch)
14046 (uri (pypi-uri "mando" version))
14047 (sha256
14048 (base32
14049 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14050 (build-system python-build-system)
14051 (propagated-inputs
14052 `(("python-rst2ansi" ,python-rst2ansi)))
14053 (native-inputs
14054 `(("python-sphinx" ,python-sphinx-1.5.3)
14055 ("python-paramunittest" ,python-paramunittest)))
14056 (home-page "https://mando.readthedocs.org/")
14057 (synopsis
14058 "Wrapper around argparse, allowing creation of complete CLI applications")
14059 (description
14060 "This package is a wrapper around argparse, allowing you to write complete CLI
14061 applications in seconds while maintaining all the flexibility.")
14062 (license license:expat)))
14063
14064 (define-public python2-mando
14065 (package-with-python2 python-mando))
14066
14067 (define-public python-mando-0.3.1
14068 ;; python-radon (version 1.5.0) has a requirement
14069 ;; for mando<0.4,>=0.3
14070 (package
14071 (inherit python-mando)
14072 (name "python-mando")
14073 (version "0.3.1")
14074 (source
14075 (origin
14076 (method url-fetch)
14077 (uri (string-append "https://github.com/rubik/mando/archive/v"
14078 version
14079 ".tar.gz"))
14080 (sha256
14081 (base32
14082 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14083
14084 (define-public python-fudge
14085 (package
14086 (name "python-fudge")
14087 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14088 ;; package, which is currently the only use of this package.
14089 (version "0.9.6")
14090 (source
14091 (origin
14092 (method url-fetch)
14093 (uri (pypi-uri "fudge" version))
14094 (sha256
14095 (base32
14096 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14097 (build-system python-build-system)
14098 (arguments
14099 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14100 (home-page "https://github.com/fudge-py/fudge")
14101 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14102 (description
14103 "Fudge is a Python module for using fake objects (mocks and stubs) to
14104 test real ones.
14105
14106 In readable Python code, you declare the methods available on your fake object
14107 and how they should be called. Then you inject that into your application and
14108 start testing. This declarative approach means you don’t have to record and
14109 playback actions and you don’t have to inspect your fakes after running code.
14110 If the fake object was used incorrectly then you’ll see an informative
14111 exception message with a traceback that points to the culprit.")
14112 (license license:expat)))
14113
14114 (define-public python2-fudge
14115 (package-with-python2 python-fudge))
14116
14117 (define-public python-oauth2client
14118 (package
14119 (name "python-oauth2client")
14120 (version "4.0.0")
14121 (source
14122 (origin
14123 (method url-fetch)
14124 (uri (pypi-uri "oauth2client" version))
14125 (sha256
14126 (base32
14127 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14128 (build-system python-build-system)
14129 (arguments
14130 `(#:tests? #f))
14131 (propagated-inputs
14132 `(("python-httplib2" ,python-httplib2)
14133 ("python-pyasn1" ,python-pyasn1)
14134 ("python-pyasn1-modules" ,python-pyasn1-modules)
14135 ("python-rsa" ,python-rsa)
14136 ("python-six" ,python-six)))
14137 (home-page "http://github.com/google/oauth2client/")
14138 (synopsis "OAuth 2.0 client library")
14139 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14140 library for Python")
14141 (license license:asl2.0)))
14142
14143 (define-public python-flask-oidc
14144 (package
14145 (name "python-flask-oidc")
14146 (version "1.1.1")
14147 (source
14148 (origin
14149 (method url-fetch)
14150 (uri (pypi-uri "flask-oidc" version))
14151 (sha256
14152 (base32
14153 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14154 (build-system python-build-system)
14155 (propagated-inputs
14156 `(("python-flask" ,python-flask)
14157 ("python-itsdangerous" ,python-itsdangerous)
14158 ("python-oauth2client" ,python-oauth2client)
14159 ("python-six" ,python-six)))
14160 (native-inputs
14161 `(("python-nose" ,python-nose)
14162 ("python-mock" ,python-mock)))
14163 (home-page "https://github.com/puiterwijk/flask-oidc")
14164 (synopsis "OpenID Connect extension for Flask")
14165 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14166 for Flask.")
14167 (license license:bsd-2)))
14168
14169 (define-public python-mwclient
14170 (package
14171 (name "python-mwclient")
14172 (version "0.8.4")
14173 (source
14174 (origin
14175 (method url-fetch)
14176 ;; The PyPI version wouldn't contain tests.
14177 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14178 "v" version ".tar.gz"))
14179 (sha256
14180 (base32
14181 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14182 (build-system python-build-system)
14183 (propagated-inputs
14184 `(("python-requests" ,python-requests)
14185 ("python-requests-oauthlib"
14186 ,python-requests-oauthlib)
14187 ("python-six" ,python-six)))
14188 (native-inputs
14189 `(("python-mock" ,python-mock)
14190 ("python-pytest" ,python-pytest)
14191 ("python-pytest-pep8" ,python-pytest-pep8)
14192 ("python-pytest-cache" ,python-pytest-cache)
14193 ("python-pytest-cov" ,python-pytest-cov)
14194 ("python-responses" ,python-responses)))
14195 (home-page "https://github.com/btongminh/mwclient")
14196 (synopsis "MediaWiki API client")
14197 (description "This package provides a MediaWiki API client.")
14198 (license license:expat)))
14199
14200 (define-public python2-mwclient
14201 (package-with-python2 python-mwclient))
14202
14203 (define-public python-pytest-warnings
14204 (package
14205 (name "python-pytest-warnings")
14206 (version "0.2.0")
14207 (source
14208 (origin
14209 (method url-fetch)
14210 (uri (pypi-uri "pytest-warnings" version))
14211 (sha256
14212 (base32
14213 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14214 (build-system python-build-system)
14215 (propagated-inputs
14216 `(("pytest" ,python-pytest-3.0)))
14217 (home-page "https://github.com/fschulze/pytest-warnings")
14218 (synopsis "Pytest plugin to list Python warnings in pytest report")
14219 (description
14220 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14221 pytest report.")
14222 (license license:expat)))
14223
14224 (define-public python2-pytest-warnings
14225 (package-with-python2 python-pytest-warnings))
14226
14227 (define-public python-pytest-catchlog
14228 (package
14229 (name "python-pytest-catchlog")
14230 (version "1.2.2")
14231 (source
14232 (origin
14233 (method url-fetch)
14234 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14235 (sha256
14236 (base32
14237 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14238 (build-system python-build-system)
14239 (native-inputs
14240 `(("unzip" ,unzip)))
14241 (propagated-inputs
14242 `(("pytest" ,python-pytest-3.0)))
14243 (home-page "https://github.com/eisensheng/pytest-catchlog")
14244 (synopsis "Pytest plugin to catch log messages")
14245 (description
14246 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14247 a fork of pytest-capturelog.")
14248 (license license:expat)))
14249
14250 (define-public python2-pytest-catchlog
14251 (package-with-python2 python-pytest-catchlog))
14252
14253 (define-public python-utils
14254 (package
14255 (name "python-utils")
14256 (version "2.1.0")
14257 (source (origin
14258 (method url-fetch)
14259 (uri (pypi-uri "python-utils" version))
14260 (sha256
14261 (base32
14262 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14263 (build-system python-build-system)
14264 (native-inputs
14265 `(("pytest-runner" ,python-pytest-runner)
14266 ("pytest" ,python-pytest)
14267 ("six" ,python-six)))
14268 (home-page "https://github.com/WoLpH/python-utils")
14269 (synopsis "Convenient utilities not included with the standard Python install")
14270 (description
14271 "Python Utils is a collection of small Python functions and classes which
14272 make common patterns shorter and easier.")
14273 (license license:bsd-2)))
14274
14275 (define-public python2-utils
14276 (package-with-python2 python-utils))
14277
14278 (define-public python-webassets
14279 (package
14280 (name "python-webassets")
14281 (version "0.12.1")
14282 (source
14283 (origin
14284 (method url-fetch)
14285 (uri (pypi-uri "webassets" version))
14286 (sha256
14287 (base32
14288 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14289 (build-system python-build-system)
14290 (native-inputs
14291 `(("python-jinja2" ,python-jinja2)
14292 ("python-mock" ,python-mock)
14293 ("python-nose" ,python-nose)
14294 ("python-pytest" ,python-pytest)))
14295 (home-page "https://github.com/miracle2k/webassets")
14296 (synopsis "Media asset management")
14297 (description "Merges, minifies and compresses Javascript and CSS files,
14298 supporting a variety of different filters, including YUI, jsmin, jspacker or
14299 CSS tidy. Also supports URL rewriting in CSS files.")
14300 (license license:bsd-2)))
14301
14302 (define-public python-sphinx-me
14303 (package
14304 (name "python-sphinx-me")
14305 (version "0.3")
14306 (source
14307 (origin
14308 (method url-fetch)
14309 (uri (pypi-uri "sphinx-me" version))
14310 (sha256
14311 (base32
14312 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14313 (build-system python-build-system)
14314 (home-page "https://github.com/stephenmcd/sphinx-me")
14315 (synopsis "Create a Sphinx documentation shell")
14316 (description
14317 "Create a Sphinx documentation shell for your project and include the
14318 README file as the documentation index. It handles extracting the required
14319 meta data such as the project name, author and version from your project for
14320 use in your Sphinx docs.")
14321 (license license:bsd-2)))
14322
14323 (define-public python2-sphinx-me
14324 (package-with-python2 python-sphinx-me))
14325
14326 (define-public python-cssmin
14327 (package
14328 (name "python-cssmin")
14329 (version "0.2.0")
14330 (source
14331 (origin
14332 (method url-fetch)
14333 (uri (pypi-uri "cssmin" version))
14334 (sha256
14335 (base32
14336 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14337 (build-system python-build-system)
14338 (home-page "https://github.com/zacharyvoase/cssmin")
14339 (synopsis "Python port of the YUI CSS Compressor")
14340 (description "Python port of the YUI CSS Compressor.")
14341 (license (list license:expat license:bsd-3))))
14342
14343 (define-public python2-cssmin
14344 (package-with-python2 python-cssmin))
14345
14346 (define-public python-diff-match-patch
14347 (package
14348 (name "python-diff-match-patch")
14349 (version "20121119")
14350 (source
14351 (origin
14352 (method url-fetch)
14353 (uri (pypi-uri "diff-match-patch" version))
14354 (sha256
14355 (base32
14356 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14357 (build-system python-build-system)
14358 (home-page "https://code.google.com/p/google-diff-match-patch")
14359 (synopsis "Synchronize plain text")
14360 (description "Diff Match and Patch libraries offer robust algorithms to
14361 perform the operations required for synchronizing plain text.")
14362 (license license:asl2.0)))
14363
14364 (define-public python2-diff-match-patch
14365 (package-with-python2 python-diff-match-patch))
14366
14367 (define-public python-dirsync
14368 (package
14369 (name "python-dirsync")
14370 (version "2.2.2")
14371 (source
14372 (origin
14373 (method url-fetch)
14374 (uri (pypi-uri "dirsync" version ".zip"))
14375 (sha256
14376 (base32
14377 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14378 (build-system python-build-system)
14379 (native-inputs
14380 `(("unzip" ,unzip)))
14381 (propagated-inputs
14382 `(("six" ,python-six)))
14383 (home-page "https://bitbucket.org/tkhyn/dirsync")
14384 (synopsis "Advanced directory tree synchronisation tool")
14385 (description "Advanced directory tree synchronisation tool.")
14386 (license license:expat)))
14387
14388 (define-public python2-dirsync
14389 (package-with-python2 python-dirsync))
14390
14391 (define-public python-nosexcover
14392 (package
14393 (name "python-nosexcover")
14394 (version "1.0.11")
14395 (source (origin
14396 (method url-fetch)
14397 (uri (pypi-uri "nosexcover" version))
14398 (sha256
14399 (base32
14400 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14401 (build-system python-build-system)
14402 (propagated-inputs
14403 `(("python-coverage" ,python-coverage)
14404 ("python-nose" ,python-nose)))
14405 (home-page "http://github.com/cmheisel/nose-xcover")
14406 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14407 (description "Nose-xcover is a companion to the built-in
14408 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14409 to a file named coverage.xml.
14410
14411 It will honor all the options you pass to the Nose coverage plugin,
14412 especially -cover-package.")
14413 (license license:expat)))
14414
14415 (define-public python2-nosexcover
14416 (package-with-python2 python-nosexcover))
14417
14418 (define-public python-elasticsearch
14419 (package
14420 (name "python-elasticsearch")
14421 (version "1.0.0")
14422 (source
14423 (origin
14424 (method url-fetch)
14425 (uri (pypi-uri "elasticsearch" version))
14426 (sha256
14427 (base32
14428 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14429 (build-system python-build-system)
14430 (native-inputs
14431 `(("python-mock" ,python-mock)
14432 ("python-nosexcover" ,python-nosexcover)
14433 ("python-pyaml" ,python-pyaml)
14434 ("python-requests" ,python-requests)))
14435 (propagated-inputs
14436 `(("urllib3" ,python-urllib3)))
14437 (arguments
14438 ;; tests require the test_elasticsearch module but it is not distributed.
14439 `(#:tests? #f))
14440 (home-page "https://github.com/elastic/elasticsearch-py")
14441 (synopsis "Low-level client for Elasticsearch")
14442 (description "Official low-level client for Elasticsearch. Its goal is to
14443 provide common ground for all Elasticsearch-related code in Python; because of
14444 this it tries to be opinion-free and very extendable.")
14445 (license license:expat)))
14446
14447 (define-public python2-elasticsearch
14448 (package-with-python2 python-elasticsearch))
14449
14450 (define-public python-levenshtein
14451 (package
14452 (name "python-levenshtein")
14453 (version "0.12.0")
14454 (source
14455 (origin
14456 (method url-fetch)
14457 (uri (pypi-uri "python-Levenshtein" version))
14458 (sha256
14459 (base32
14460 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14461 (build-system python-build-system)
14462 (home-page "https://github.com/ztane/python-Levenshtein")
14463 (synopsis "Fast computation of Levenshtein distance and string similarity")
14464 (description
14465 "The Levenshtein Python C extension module contains functions for fast computation of
14466 @enumerate
14467 @item Levenshtein (edit) distance, and edit operations
14468 @item string similarity
14469 @item approximate median strings, and generally string averaging
14470 @item string sequence and set similarity
14471 @end enumerate
14472 It supports both normal and Unicode strings.")
14473 (license license:gpl2+)))
14474
14475 (define-public python2-levenshtein
14476 (package-with-python2 python-levenshtein))
14477
14478 (define-public python-scandir
14479 (package
14480 (name "python-scandir")
14481 (version "1.4")
14482 (source
14483 (origin
14484 (method url-fetch)
14485 (uri (pypi-uri "scandir" version))
14486 (sha256
14487 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14488 (build-system python-build-system)
14489 (home-page "https://github.com/benhoyt/scandir")
14490 (synopsis "Directory iteration function")
14491 (description
14492 "Directory iteration function like os.listdir(), except that instead of
14493 returning a list of bare filenames, it yields DirEntry objects that include
14494 file type and stat information along with the name. Using scandir() increases
14495 the speed of os.walk() by 2-20 times (depending on the platform and file
14496 system) by avoiding unnecessary calls to os.stat() in most cases.")
14497 (license license:bsd-3)))
14498
14499 (define-public python2-scandir
14500 (package-with-python2 python-scandir))
14501
14502 (define-public python2-stemming
14503 (package
14504 (name "python2-stemming")
14505 (version "1.0.1")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "stemming" version))
14510 (sha256
14511 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14512 (build-system python-build-system)
14513 (arguments
14514 `(#:python ,python-2))
14515 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14516 (synopsis "Python implementations of various stemming algorithms")
14517 (description
14518 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14519 stemming algorithms for English. These implementations are straightforward and
14520 efficient, unlike some Python versions of the same algorithms available on the
14521 Web. This package is an extraction of the stemming code included in the Whoosh
14522 search engine.")
14523 (license license:public-domain)))
14524
14525 (define-public python-factory-boy
14526 (package
14527 (name "python-factory-boy")
14528 (version "2.8.1")
14529 (source
14530 (origin
14531 (method url-fetch)
14532 (uri (pypi-uri "factory_boy" version))
14533 (sha256
14534 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14535 (build-system python-build-system)
14536 (arguments
14537 ;; Tests are not included in the tarball.
14538 `(#:tests? #f))
14539 (propagated-inputs
14540 `(("faker" ,python-faker)))
14541 (home-page "https://github.com/benhoyt/scandir")
14542 (synopsis "Versatile test fixtures replacement")
14543 (description
14544 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14545
14546 As a fixtures replacement tool, it aims to replace static, hard to maintain
14547 fixtures with easy-to-use factories for complex object.
14548
14549 Instead of building an exhaustive test setup with every possible combination
14550 of corner cases, factory_boy allows you to use objects customized for the
14551 current test, while only declaring the test-specific fields")
14552 (license license:expat)))
14553
14554 (define-public python2-factory-boy
14555 (package-with-python2 python-factory-boy))
14556
14557 (define-public python-translate-toolkit
14558 (package
14559 (name "python-translate-toolkit")
14560 (version "2.1.0")
14561 (source
14562 (origin
14563 (method url-fetch)
14564 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14565 (sha256
14566 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14567 (build-system python-build-system)
14568 (native-inputs
14569 `(("python-pytest" ,python-pytest)
14570 ("python-sphinx" ,python-sphinx)))
14571 (propagated-inputs
14572 `(("python-babel" ,python-babel)
14573 ("python-beautifulsoup4" ,python-beautifulsoup4)
14574 ("python-chardet" ,python-chardet)
14575 ("python-diff-match-patch" ,python-diff-match-patch)
14576 ("python-levenshtein" ,python-levenshtein)
14577 ("python-lxml" ,python-lxml)
14578 ("python-six" ,python-six)
14579 ("python-vobject" ,python-vobject)
14580 ("python-pyyaml" ,python-pyyaml)))
14581 (arguments
14582 ;; TODO: tests are not run, because they end with
14583 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14584 ;; 'parse_funcs'
14585 ;; during test setup.
14586 `(#:tests? #f))
14587 (home-page "http://toolkit.translatehouse.org")
14588 (synopsis "Tools and API for translation and localization engineering")
14589 (description
14590 "Tools and API for translation and localization engineering. It contains
14591 several utilities, as well as an API for building localization tools.")
14592 (license license:gpl2+)))
14593
14594 (define-public python2-translate-toolkit
14595 (package-with-python2 python-translate-toolkit))
14596
14597 (define-public python-mysqlclient
14598 (package
14599 (name "python-mysqlclient")
14600 (version "1.3.10")
14601 (source
14602 (origin
14603 (method url-fetch)
14604 (uri (pypi-uri "mysqlclient" version))
14605 (sha256
14606 (base32
14607 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14608 (build-system python-build-system)
14609 (native-inputs
14610 `(("mariadb" ,mariadb)
14611 ("nose" ,python-nose)
14612 ("mock" ,python-mock)
14613 ("py.test" ,python-pytest)))
14614 (inputs
14615 `(("mysql" ,mysql)
14616 ("libz" ,zlib)
14617 ("openssl" ,openssl)))
14618 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14619 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14620 (description "MySQLdb is an interface to the popular MySQL database server
14621 for Python. The design goals are:
14622 @enumerate
14623 @item Compliance with Python database API version 2.0 [PEP-0249],
14624 @item Thread-safety,
14625 @item Thread-friendliness (threads will not block each other).
14626 @end enumerate")
14627 (license license:gpl2)))
14628
14629 (define-public python2-mysqlclient
14630 (package-with-python2 python-mysqlclient))
14631
14632 (define-public python-hiredis
14633 (package
14634 (name "python-hiredis")
14635 (version "0.2.0")
14636 (source
14637 (origin
14638 (method url-fetch)
14639 (uri (pypi-uri "hiredis" version))
14640 (sha256
14641 (base32
14642 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14643 (build-system python-build-system)
14644 (arguments
14645 ;; no tests
14646 `(#:tests? #f))
14647 (home-page "https://github.com/redis/hiredis-py")
14648 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14649 (description "Python-hiredis is a python extension that wraps protocol
14650 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14651 (license license:bsd-3)))
14652
14653 (define-public python2-hiredis
14654 (package-with-python2 python-hiredis))
14655
14656 (define-public python-fakeredis
14657 (package
14658 (name "python-fakeredis")
14659 (version "0.8.2")
14660 (source
14661 (origin
14662 (method url-fetch)
14663 (uri (pypi-uri "fakeredis" version))
14664 (sha256
14665 (base32
14666 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14667 (build-system python-build-system)
14668 (arguments
14669 ;; no tests
14670 `(#:tests? #f))
14671 (home-page "https://github.com/jamesls/fakeredis")
14672 (synopsis "Fake implementation of redis API for testing purposes")
14673 (description "Fakeredis is a pure python implementation of the redis-py
14674 python client that simulates talking to a redis server. This was created for a
14675 single purpose: to write unittests. Setting up redis is not hard, but many time
14676 you want to write unittests that do not talk to an external server (such as
14677 redis). This module now allows tests to simply use this module as a reasonable
14678 substitute for redis.")
14679 (license license:bsd-3)))
14680
14681 (define-public python2-fakeredis
14682 (package-with-python2 python-fakeredis))
14683
14684 (define-public python-behave-web-api
14685 (package
14686 (name "python-behave-web-api")
14687 (version "1.0.6")
14688 (source
14689 (origin
14690 (method url-fetch)
14691 (uri (pypi-uri "behave-web-api" version))
14692 (sha256
14693 (base32
14694 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14695 (build-system python-build-system)
14696 (arguments
14697 `(#:phases
14698 (modify-phases %standard-phases
14699 (add-after 'unpack 'fix-dependencies
14700 (lambda _
14701 (substitute* "setup.py"
14702 (("'wheel'") "") ; We don't use it.
14703 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14704 (propagated-inputs
14705 `(("behave" ,behave)
14706 ("python-requests" ,python-requests)))
14707 (home-page "https://github.com/jefersondaniel/behave-web-api")
14708 (synopsis "Provides testing for JSON APIs with Behave for Python")
14709 (description "This package provides testing utility modules for testing
14710 JSON APIs with Behave.")
14711 (license license:expat)))
14712
14713 (define-public python2-behave-web-api
14714 (package-with-python2 python-behave-web-api))
14715
14716 (define-public python-flask-script
14717 (package
14718 (name "python-flask-script")
14719 (version "2.0.5")
14720 (source
14721 (origin
14722 (method url-fetch)
14723 (uri (pypi-uri "Flask-Script" version))
14724 (sha256
14725 (base32
14726 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14727 (build-system python-build-system)
14728 (propagated-inputs
14729 `(("python-flask" ,python-flask)
14730 ("python-argcomplete" ,python-argcomplete)
14731 ("python-werkzeug" ,python-werkzeug)))
14732 (native-inputs
14733 `(("python-pytest" ,python-pytest)))
14734 (home-page
14735 "http://github.com/smurfix/flask-script")
14736 (synopsis "Scripting support for Flask")
14737 (description "The Flask-Script extension provides support for writing
14738 external scripts in Flask. This includes running a development server,
14739 a customised Python shell, scripts to set up your database, cronjobs,
14740 and other command-line tasks that belong outside the web application
14741 itself.")
14742 (license license:bsd-3)))
14743
14744 (define-public python2-flask-script
14745 (package-with-python2 python-flask-script))
14746
14747 (define-public python-flask-migrate
14748 (package
14749 (name "python-flask-migrate")
14750 (version "2.0.3")
14751 (source
14752 (origin
14753 (method url-fetch)
14754 (uri (pypi-uri "Flask-Migrate" version))
14755 (sha256
14756 (base32
14757 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14758 (build-system python-build-system)
14759 (propagated-inputs
14760 `(("python-flask" ,python-flask)
14761 ("python-alembic" ,python-alembic)
14762 ("python-sqlalchemy" ,python-sqlalchemy)
14763 ("python-flask-script" ,python-flask-script)
14764 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14765 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14766 (synopsis "SQLAlchemy database migrations for Flask programs using
14767 Alembic")
14768 (description "This package contains SQLAlchemy database migration tools
14769 for Flask programs that are using @code{python-alembic}.")
14770 (license license:expat)))
14771
14772 (define-public python2-flask-migrate
14773 (package-with-python2 python-flask-migrate))
14774
14775 (define-public python-packaging
14776 (package
14777 (name "python-packaging")
14778 (version "16.8")
14779 (source
14780 (origin
14781 (method url-fetch)
14782 (uri (pypi-uri "packaging" version))
14783 (sha256
14784 (base32
14785 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14786 (build-system python-build-system)
14787 (native-inputs
14788 `(("python-pretend" ,python-pretend)
14789 ("python-pytest" ,python-pytest)))
14790 (propagated-inputs
14791 `(("python-pyparsing" ,python-pyparsing)
14792 ("python-six" ,python-six)))
14793 (home-page "https://github.com/pypa/packaging")
14794 (synopsis "Core utilities for Python packages")
14795 (description "Packaging is a Python module for dealing with Python packages.
14796 It offers an interface for working with package versions, names, and dependency
14797 information.")
14798 ;; From 'LICENSE': This software is made available under the terms of
14799 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14800 ;; Contributions to this software is made under the terms of *both* these
14801 ;; licenses.
14802 (license (list license:asl2.0 license:bsd-2))))
14803
14804 (define-public python2-packaging
14805 (package-with-python2 python-packaging))
14806
14807 (define-public python-sql
14808 (package
14809 (name "python-sql")
14810 (version "0.9")
14811 (source
14812 (origin
14813 (method url-fetch)
14814 (uri (pypi-uri "python-sql" version))
14815 (sha256
14816 (base32
14817 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14818 (build-system python-build-system)
14819 (home-page "https://python-sql.tryton.org/")
14820 (synopsis "Library to write SQL queries in a pythonic way")
14821 (description "@code{python-sql} is a library to write SQL queries, that
14822 transforms idiomatic python function calls to well-formed SQL queries.")
14823 (license license:bsd-3)))
14824
14825 (define-public python2-sql
14826 (package-with-python2 python-sql))
14827
14828 (define-public python-genshi
14829 (package
14830 (name "python-genshi")
14831 (version "0.7")
14832 (source
14833 (origin
14834 (method url-fetch)
14835 (uri (string-append
14836 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14837 version ".tar.gz"))
14838 (patches
14839 (search-patches
14840 ;; The first 4 patches are in the master branch upstream.
14841 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14842 ;; The last 2 are NOT in any branch.
14843 ;; They were sent as attachments to a ticket opened at
14844 ;; https://genshi.edgewall.org/ticket/602#no1
14845 "python-genshi-stripping-of-unsafe-script-tags.patch"
14846 "python-genshi-disable-speedups-on-python-3.3.patch"
14847 "python-genshi-isstring-helper.patch"
14848 "python-genshi-add-support-for-python-3.4-AST.patch"
14849 "python-genshi-fix-tests-on-python-3.5.patch"
14850 "python-genshi-buildable-on-python-2.7.patch"))
14851 (sha256
14852 (base32
14853 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14854 (build-system python-build-system)
14855 (home-page "https://genshi.edgewall.org/")
14856 (synopsis "Toolkit for generation of output for the web")
14857 (description "Genshi is a Python library that provides an integrated set
14858 of components for parsing, generating, and processing HTML, XML or other
14859 textual content for output generation on the web.")
14860 (license license:bsd-3)))
14861
14862 ;; The linter here claims that patch file names should start with the package
14863 ;; name. But, in this case the patches are inherited from python-genshi with
14864 ;; the "python-genshi-" prefix instead of "python2-genshi-".
14865 (define-public python2-genshi
14866 (package-with-python2 python-genshi))
14867
14868 (define-public python-relatorio
14869 (package
14870 (name "python-relatorio")
14871 (version "0.6.4")
14872 (source
14873 (origin
14874 (method url-fetch)
14875 (uri (pypi-uri "relatorio" version))
14876 (sha256
14877 (base32
14878 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
14879 (build-system python-build-system)
14880 (propagated-inputs
14881 `(("python-lxml" ,python-lxml)
14882 ("python-genshi" ,python-genshi)))
14883 (home-page "https://relatorio.tryton.org/")
14884 (synopsis "Templating library able to output ODT and PDF files")
14885 (description "Relatorio is a templating library which provides a way to
14886 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14887 for more filetypes can be easily added by creating plugins for them.")
14888 (license license:gpl3+)))
14889
14890 (define-public python2-relatorio
14891 (package-with-python2 python-relatorio))
14892
14893 (define-public python-radon
14894 (package
14895 (name "python-radon")
14896 (version "1.5.0")
14897 (source
14898 (origin
14899 (method url-fetch)
14900 (uri (pypi-uri "radon" version))
14901 (sha256
14902 (base32
14903 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
14904 (build-system python-build-system)
14905 (propagated-inputs
14906 `(("python-colorama" ,python-colorama)
14907 ("python-flake8-polyfill" ,python-flake8-polyfill)
14908 ("python-mando" ,python-mando-0.3.1)))
14909 (native-inputs
14910 `(("python-flake8" ,python-flake8)
14911 ("python-tox" ,python-tox)
14912 ("python-pytest" ,python-pytest)
14913 ("python-paramunittest" ,python-paramunittest)))
14914 (home-page "https://radon.readthedocs.org/")
14915 (synopsis "Code Metrics in Python")
14916 (description "Radon is a Python tool which computes various code metrics.
14917 Supported metrics are:
14918 @itemize @bullet
14919 @item raw metrics: SLOC, comment lines, blank lines, &c.
14920 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14921 @item Halstead metrics (all of them)
14922 @item the Maintainability Index (a Visual Studio metric)
14923 @end itemize")
14924 (license license:expat)))
14925
14926 (define-public python2-radon
14927 (package-with-python2 python-radon))
14928
14929 (define-public python-sure
14930 (package
14931 (name "python-sure")
14932 (version "1.4.6")
14933 (source
14934 (origin
14935 (method url-fetch)
14936 (uri (pypi-uri "sure" version))
14937 (sha256
14938 (base32
14939 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
14940 (build-system python-build-system)
14941 (propagated-inputs
14942 `(("python-mock" ,python-mock)
14943 ("python-six" ,python-six)))
14944 (native-inputs
14945 `(("python-nose" ,python-nose)))
14946 (home-page "https://github.com/gabrielfalcao/sure")
14947 (synopsis "Automated testing library in python for python")
14948 (description
14949 "Sure is a python library that leverages a DSL for writing assertions.
14950 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14951 (license license:gpl3+)))
14952
14953 (define-public python2-sure
14954 (package-with-python2 python-sure))
14955
14956 (define-public python2-couleur
14957 ;; This package does not seem to support python3 at all, hence,
14958 ;; only the python2 variant definition is provided.
14959 (package
14960 (name "python2-couleur")
14961 (version "0.6.2")
14962 (source
14963 (origin
14964 (method url-fetch)
14965 (uri (pypi-uri "couleur" version))
14966 (sha256
14967 (base32
14968 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14969 (build-system python-build-system)
14970 (arguments
14971 `(#:python ,python-2))
14972 (home-page "https://github.com/gabrielfalcao/couleur")
14973 (synopsis
14974 "ANSI terminal tool for python, colored shell and other handy fancy features")
14975 (description
14976 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14977 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14978 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14979 ;; https://github.com/gabrielfalcao/couleur/issues/11
14980 (license license:lgpl3+)))
14981
14982 (define-public python-misaka
14983 (package
14984 (name "python-misaka")
14985 (version "2.1.0")
14986 (source
14987 (origin
14988 (method url-fetch)
14989 (uri (pypi-uri "misaka" version))
14990 (sha256
14991 (base32
14992 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
14993 (build-system python-build-system)
14994 (arguments
14995 `(;; Line 37 of setup.py calls self.run_command('develop')
14996 ;; in the 'check' phase. This command seems to be trying
14997 ;; to write to
14998 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14999 ;; for which it does not have the permission to write.
15000 #:tests? #f))
15001 (propagated-inputs
15002 `(("python-cffi" ,python-cffi)))
15003 (home-page "https://github.com/FSX/misaka")
15004 (synopsis "Python binding for Hoedown")
15005 (description
15006 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15007 library written in C. It features a fast HTML renderer and functionality to make custom
15008 renderers (e.g. man pages or LaTeX).")
15009 (license license:expat)))
15010
15011 (define-public python2-misaka
15012 (package-with-python2 python-misaka))
15013
15014 (define-public python2-steadymark
15015 ;; This is forced into being a python2 only variant
15016 ;; due to its dependence on couleur that has no support
15017 ;; for python3
15018 (package
15019 (name "python2-steadymark")
15020 (version "0.7.3")
15021 (source
15022 (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "steadymark" version))
15025 (sha256
15026 (base32
15027 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15028 (build-system python-build-system)
15029 (native-inputs
15030 `(("python-couleur" ,python2-couleur)
15031 ("python-sure" ,python2-sure)
15032 ("python-misaka" ,python2-misaka)))
15033 (arguments
15034 `(#:python ,python-2
15035 #:phases
15036 (modify-phases %standard-phases
15037 (add-before 'build 'patch-setup-py
15038 (lambda _
15039 ;; Update requirements from dependency==version
15040 ;; to dependency>=version
15041 (substitute* "setup.py"
15042 (("==") ">="))
15043 #t)))))
15044 (home-page "https://github.com/gabrielfalcao/steadymark")
15045 (synopsis "Markdown-based test runner for python")
15046 (description
15047 "@code{Steadymark} allows documentation to be written in github-flavoured
15048 markdown. The documentation may contain snippets of code surrounded by python
15049 code blocks and @code{Steadymark} will find these snippets and run them, making
15050 sure that there are no old malfunctional examples in the documentation examples.")
15051 (license license:expat)))
15052
15053 (define-public python-nose-randomly
15054 (package
15055 (name "python-nose-randomly")
15056 (version "1.2.5")
15057 (source
15058 (origin
15059 (method url-fetch)
15060 (uri (pypi-uri "nose-randomly" version))
15061 (sha256
15062 (base32
15063 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15064 (build-system python-build-system)
15065 (native-inputs
15066 `(("python-nose" ,python-nose)
15067 ("python-numpy" ,python-numpy)))
15068 (home-page "https://github.com/adamchainz/nose-randomly")
15069 (synopsis
15070 "Nose plugin to randomly order tests and control random.seed")
15071 (description
15072 "This is a @code{Nose} plugin to randomly order tests which can be quite
15073 powerful in discovering hidden flaws in the tests themselves, while helping to
15074 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15075 by resetting it to a repeatable number for each test, enabling the tests to
15076 create data based on random numbers and yet remain repeatable.")
15077 (license license:bsd-3)))
15078
15079 (define-public python2-nose-randomly
15080 (package-with-python2 python-nose-randomly))
15081
15082 (define-public python-jsonpointer
15083 (package
15084 (name "python-jsonpointer")
15085 (version "1.10")
15086 (source
15087 (origin
15088 (method url-fetch)
15089 (uri (pypi-uri "jsonpointer" version))
15090 (sha256
15091 (base32
15092 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15093 (build-system python-build-system)
15094 (home-page "https://github.com/stefankoegl/python-json-pointer")
15095 (synopsis "Identify specific nodes in a JSON document")
15096 (description "@code{jsonpointer} allows you to access specific nodes
15097 by path in a JSON document (see RFC 6901).")
15098 (license license:bsd-3)))
15099
15100 (define-public python2-jsonpointer
15101 (package-with-python2 python-jsonpointer))
15102
15103 (define-public python-rfc3987
15104 (package
15105 (name "python-rfc3987")
15106 (version "1.3.7")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "rfc3987" version))
15111 (sha256
15112 (base32
15113 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15114 (build-system python-build-system)
15115 (home-page "http://pypi.python.org/pypi/rfc3987")
15116 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15117 (description "@code{rfc3987} provides routines for parsing and
15118 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15119 (license license:gpl3+)))
15120
15121 (define-public python2-rfc3987
15122 (package-with-python2 python-rfc3987))
15123
15124 (define-public python-validate-email
15125 (package
15126 (name "python-validate-email")
15127 (version "1.3")
15128 (source
15129 (origin
15130 (method url-fetch)
15131 (uri (pypi-uri "validate_email" version))
15132 (sha256
15133 (base32
15134 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15135 (build-system python-build-system)
15136 (home-page "http://github.com/syrusakbary/validate_email")
15137 (synopsis "Verifies if an email address is valid and really exists")
15138 (description "@code{validate_email} can be used to verify if an email
15139 address is valid and really exists.")
15140 (license license:lgpl3+)))
15141
15142 (define-public python2-validate-email
15143 (package-with-python2 python-validate-email))
15144
15145 (define-public python-flex
15146 (package
15147 (name "python-flex")
15148 (version "6.10.0")
15149 (source
15150 (origin
15151 (method url-fetch)
15152 (uri (pypi-uri "flex" version))
15153 (sha256
15154 (base32
15155 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15156 (build-system python-build-system)
15157 (propagated-inputs
15158 `(("python-click" ,python-click)
15159 ("python-iso8601" ,python-iso8601)
15160 ("python-jsonpointer" ,python-jsonpointer)
15161 ("python-pyyaml" ,python-pyyaml)
15162 ("python-requests" ,python-requests)
15163 ("python-rfc3987" ,python-rfc3987)
15164 ("python-six" ,python-six)
15165 ("python-validate-email" ,python-validate-email)))
15166 (home-page "https://github.com/pipermerriam/flex")
15167 (synopsis "Validates Swagger schemata")
15168 (description "@code{flex} can be used to validate Swagger schemata.")
15169 (license license:bsd-3)))
15170
15171 (define-public python2-flex
15172 (package-with-python2 python-flex))
15173
15174 (define-public python-marshmallow
15175 (package
15176 (name "python-marshmallow")
15177 (version "3.0.0b2")
15178 (source
15179 (origin
15180 (method url-fetch)
15181 (uri (pypi-uri "marshmallow" version))
15182 (sha256
15183 (base32
15184 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15185 (build-system python-build-system)
15186 (propagated-inputs
15187 `(("python-dateutil" ,python-dateutil)
15188 ("python-simplejson" ,python-simplejson)))
15189 (native-inputs
15190 `(("python-pytest-3.0" ,python-pytest-3.0)
15191 ("python-pytz" ,python-pytz)))
15192 (home-page "https://github.com/marshmallow-code/marshmallow")
15193 (synopsis "Convert complex datatypes to and from native
15194 Python datatypes.")
15195 (description "@code{marshmallow} provides a library for converting
15196 complex datatypes to and from native Python datatypes.")
15197 (license license:expat)))
15198
15199 (define-public python2-marshmallow
15200 (package-with-python2 python-marshmallow))
15201
15202 (define-public python-bottle
15203 (package
15204 (name "python-bottle")
15205 (version "0.12.13")
15206 (source
15207 (origin
15208 (method url-fetch)
15209 (uri (pypi-uri "bottle" version))
15210 (sha256
15211 (base32
15212 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15213 (build-system python-build-system)
15214 (home-page "http://bottlepy.org/")
15215 (synopsis "WSGI framework for small web-applications.")
15216 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15217 (license license:expat)))
15218
15219 (define-public python2-bottle
15220 (package-with-python2 python-bottle))
15221
15222 (define-public python-apispec
15223 (package
15224 (name "python-apispec")
15225 (version "0.22.0")
15226 (source
15227 (origin
15228 (method url-fetch)
15229 (uri (pypi-uri "apispec" version))
15230 (sha256
15231 (base32
15232 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15233 (build-system python-build-system)
15234 (propagated-inputs
15235 `(("python-pyyaml" ,python-pyyaml)))
15236 (native-inputs
15237 `(("python-pytest-3.0" ,python-pytest-3.0)
15238 ("python-flask" ,python-flask)
15239 ("python-marshmallow" ,python-marshmallow)
15240 ("python-tornado" ,python-tornado)
15241 ("python-bottle" ,python-bottle)
15242 ("python-mock" ,python-mock)))
15243 (home-page "https://github.com/marshmallow-code/apispec")
15244 (synopsis "Swagger 2.0 API specification generator")
15245 (description "@code{python-apispec} is a pluggable API specification
15246 generator. Currently supports the OpenAPI specification (f.k.a.
15247 Swagger 2.0).")
15248 (license license:expat)))
15249
15250 (define-public python2-apispec
15251 (package-with-python2 python-apispec))
15252
15253 (define-public python-flasgger
15254 (package
15255 (name "python-flasgger")
15256 (version "0.6.3")
15257 (source
15258 (origin
15259 (method url-fetch)
15260 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15261 version ".tar.gz"))
15262 (file-name (string-append name "-" version ".tar.gz"))
15263 (sha256
15264 (base32
15265 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15266 (build-system python-build-system)
15267 (arguments
15268 `(#:phases
15269 (modify-phases %standard-phases
15270 (replace 'check
15271 (lambda* (#:key inputs outputs #:allow-other-keys)
15272 (substitute* "Makefile"
15273 (("flake8 flasgger --ignore=F403")
15274 "flake8 flasgger --ignore=E731,F403"))
15275 (setenv "PYTHONPATH" (string-append (getcwd)
15276 ":"
15277 (getenv "PYTHONPATH")))
15278 (zero? (system* "py.test")))))))
15279 (propagated-inputs
15280 `(("python-flask" ,python-flask)
15281 ("python-pyyaml" ,python-pyyaml)
15282 ("python-jsonschema" ,python-jsonschema)
15283 ("python-mistune" ,python-mistune)
15284 ("python-six" ,python-six)))
15285 (native-inputs
15286 `(("python-decorator" ,python-decorator)
15287 ("python-flake8" ,python-flake8)
15288 ("python-flask-restful" ,python-flask-restful)
15289 ("python-flex" ,python-flex)
15290 ("python-pytest-3.0" ,python-pytest-3.0)
15291 ("python-pytest-cov" ,python-pytest-cov)
15292 ("python-marshmallow" ,python-marshmallow)
15293 ("python-apispec" ,python-apispec)))
15294 (home-page "https://github.com/rochacbruno/flasgger/")
15295 (synopsis "Extract Swagger specs from your Flask project")
15296 (description "@code{python-flasgger} allows extracting Swagger specs
15297 from your Flask project. It is a fork of Flask-Swagger.")
15298 (license license:expat)))
15299
15300 (define-public python2-flasgger
15301 (package-with-python2 python-flasgger))
15302
15303 (define-public python-swagger-spec-validator
15304 (package
15305 (name "python-swagger-spec-validator")
15306 (version "2.1.0")
15307 (source
15308 (origin
15309 (method url-fetch)
15310 (uri (pypi-uri "swagger-spec-validator" version))
15311 (sha256
15312 (base32
15313 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15314 (build-system python-build-system)
15315 (propagated-inputs
15316 `(("python-jsonschema" ,python-jsonschema)
15317 ("python-six" ,python-six)))
15318 (home-page
15319 "http://github.com/Yelp/swagger_spec_validator")
15320 (synopsis "Validation of Swagger specifications")
15321 (description "@code{swagger_spec_validator} provides a library for
15322 validating Swagger API specifications.")
15323 (license license:asl2.0)))
15324
15325 (define-public python2-swagger-spec-validator
15326 (package-with-python2 python-swagger-spec-validator))
15327
15328 (define-public python-apache-libcloud
15329 (package
15330 (name "python-apache-libcloud")
15331 (version "2.0.0")
15332 (source
15333 (origin
15334 (method url-fetch)
15335 (uri (pypi-uri "apache-libcloud" version))
15336 (sha256
15337 (base32
15338 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15339 (build-system python-build-system)
15340 (arguments
15341 `(#:phases
15342 (modify-phases %standard-phases
15343 (add-after 'unpack 'patch-ssh
15344 (lambda* (#:key inputs #:allow-other-keys)
15345 (substitute* "libcloud/compute/ssh.py"
15346 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15347 "/bin/ssh" "'")))
15348 #t))
15349 (add-after 'unpack 'patch-tests
15350 (lambda _
15351 (substitute* "./libcloud/test/test_file_fixtures.py"
15352 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15353 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15354 return (httplib.OK,
15355 \"1234abcd\",
15356 {\"test\": \"value\"},
15357 httplib.responses[httplib.OK])
15358 def _ascii"))
15359 (substitute* "libcloud/test/compute/test_ssh_client.py"
15360 (("class ShellOutSSHClientTests")
15361 "@unittest.skip(\"Guix container doesn't have ssh service\")
15362 class ShellOutSSHClientTests")
15363 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15364 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15365 (("'.xF0', '.x90', '.x8D', '.x88'")
15366 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15367 #t)))))
15368 (inputs
15369 `(("openssh" ,openssh)))
15370 (propagated-inputs
15371 `(("python-paramiko" ,python-paramiko)
15372 ("python-requests" ,python-requests)))
15373 (native-inputs
15374 `(("python-lockfile" ,python-lockfile)
15375 ("python-mock" ,python-mock)
15376 ("python-requests-mock" ,python-requests-mock)))
15377 (home-page "https://libcloud.apache.org/")
15378 (synopsis "Unified Cloud API")
15379 (description "@code{libcloud} is a Python library for interacting with
15380 many of the popular cloud service providers using a unified API.")
15381 (license license:asl2.0)))
15382
15383 (define-public python2-apache-libcloud
15384 (package-with-python2 python-apache-libcloud))