gnu: python-pylint: Update to 1.7.2.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 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, 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;;
47 ;;; This file is part of GNU Guix.
48 ;;;
49 ;;; GNU Guix is free software; you can redistribute it and/or modify it
50 ;;; under the terms of the GNU General Public License as published by
51 ;;; the Free Software Foundation; either version 3 of the License, or (at
52 ;;; your option) any later version.
53 ;;;
54 ;;; GNU Guix is distributed in the hope that it will be useful, but
55 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 ;;; GNU General Public License for more details.
58 ;;;
59 ;;; You should have received a copy of the GNU General Public License
60 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
61
62 (define-module (gnu packages python)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages algebra)
66 #:use-module (gnu packages adns)
67 #:use-module (gnu packages attr)
68 #:use-module (gnu packages backup)
69 #:use-module (gnu packages bash)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages crypto)
72 #:use-module (gnu packages databases)
73 #:use-module (gnu packages django)
74 #:use-module (gnu packages file)
75 #:use-module (gnu packages fontutils)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages ghostscript)
78 #:use-module (gnu packages gl)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages graphviz)
81 #:use-module (gnu packages gstreamer)
82 #:use-module (gnu packages gtk)
83 #:use-module (gnu packages icu4c)
84 #:use-module (gnu packages image)
85 #:use-module (gnu packages imagemagick)
86 #:use-module (gnu packages libevent)
87 #:use-module (gnu packages libffi)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages man)
90 #:use-module (gnu packages maths)
91 #:use-module (gnu packages multiprecision)
92 #:use-module (gnu packages networking)
93 #:use-module (gnu packages ncurses)
94 #:use-module (gnu packages openstack)
95 #:use-module (gnu packages password-utils)
96 #:use-module (gnu packages pcre)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages qt)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages sdl)
103 #:use-module (gnu packages shells)
104 #:use-module (gnu packages ssh)
105 #:use-module (gnu packages statistics)
106 #:use-module (gnu packages tex)
107 #:use-module (gnu packages texinfo)
108 #:use-module (gnu packages tls)
109 #:use-module (gnu packages version-control)
110 #:use-module (gnu packages video)
111 #:use-module (gnu packages web)
112 #:use-module (gnu packages base)
113 #:use-module (gnu packages xml)
114 #:use-module (gnu packages xorg)
115 #:use-module (gnu packages xdisorg)
116 #:use-module (gnu packages tcl)
117 #:use-module (gnu packages bdw-gc)
118 #:use-module (guix packages)
119 #:use-module (guix download)
120 #:use-module (guix git-download)
121 #:use-module (guix utils)
122 #:use-module (guix build-system gnu)
123 #:use-module (guix build-system cmake)
124 #:use-module (guix build-system python)
125 #:use-module (guix build-system trivial)
126 #:use-module (srfi srfi-1))
127
128 (define-public python-2.7
129 (package
130 (name "python")
131 (version "2.7.13")
132 (source
133 (origin
134 (method url-fetch)
135 (uri (string-append "https://www.python.org/ftp/python/"
136 version "/Python-" version ".tar.xz"))
137 (sha256
138 (base32
139 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
140 (patches (search-patches "python-2.7-search-paths.patch"
141 "python-2-deterministic-build-info.patch"
142 "python-2.7-site-prefixes.patch"
143 "python-2.7-source-date-epoch.patch"
144 "python-2.7-getentropy-on-old-kernels.patch"))
145 (modules '((guix build utils)))
146 ;; suboptimal to delete failing tests here, but if we delete them in the
147 ;; arguments then we need to make sure to strip out that phase when it
148 ;; gets inherited by python and python-minimal.
149 (snippet
150 '(begin
151 (for-each delete-file
152 '("Lib/test/test_compileall.py"
153 "Lib/test/test_ctypes.py" ; fails on mips64el
154 "Lib/test/test_distutils.py"
155 "Lib/test/test_import.py"
156 "Lib/test/test_shutil.py"
157 "Lib/test/test_socket.py"
158 "Lib/test/test_subprocess.py"))
159 #t))))
160 (outputs '("out"
161 "tk")) ;tkinter; adds 50 MiB to the closure
162 (build-system gnu-build-system)
163 (arguments
164 `(;; 356 tests OK.
165 ;; 6 tests failed:
166 ;; test_compileall test_distutils test_import test_shutil test_socket
167 ;; test_subprocess
168 ;; 39 tests skipped:
169 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
170 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
171 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
172 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
173 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
174 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
175 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
176 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
177 ;; test_winreg test_winsound test_zipfile64
178 ;; 4 skips unexpected on linux2:
179 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
180 #:test-target "test"
181 #:configure-flags
182 (list "--enable-shared" ;allow embedding
183 "--with-system-ffi" ;build ctypes
184 "--with-ensurepip=install" ;install pip and setuptools
185 "--enable-unicode=ucs4"
186 (string-append "LDFLAGS=-Wl,-rpath="
187 (assoc-ref %outputs "out") "/lib"))
188
189 #:modules ((ice-9 ftw) (ice-9 match)
190 (guix build utils) (guix build gnu-build-system))
191 #:phases
192 (modify-phases %standard-phases
193 (add-before
194 'configure 'patch-lib-shells
195 (lambda _
196 ;; Filter for existing files, since some may not exist in all
197 ;; versions of python that are built with this recipe.
198 (substitute* (filter file-exists?
199 '("Lib/subprocess.py"
200 "Lib/popen2.py"
201 "Lib/distutils/tests/test_spawn.py"
202 "Lib/test/test_subprocess.py"))
203 (("/bin/sh") (which "sh")))
204
205 ;; Use zero as the timestamp in .pyc files so that builds are
206 ;; deterministic. TODO: Remove it when this variable is set in
207 ;; gnu-build-system.scm.
208 (setenv "SOURCE_DATE_EPOCH" "1")
209 #t))
210 (add-before 'configure 'do-not-record-configure-flags
211 (lambda* (#:key configure-flags #:allow-other-keys)
212 ;; Remove configure flags from the installed '_sysconfigdata.py'
213 ;; and 'Makefile' so we don't end up keeping references to the
214 ;; build tools.
215 ;;
216 ;; Preserve at least '--with-system-ffi' since otherwise the
217 ;; thing tries to build libffi, fails, and we end up with a
218 ;; Python that lacks ctypes.
219 (substitute* "configure"
220 (("^CONFIG_ARGS=.*$")
221 (format #f "CONFIG_ARGS='~a'\n"
222 (if (member "--with-system-ffi" configure-flags)
223 "--with-system-ffi"
224 ""))))
225 #t))
226 (add-before
227 'check 'pre-check
228 (lambda _
229 ;; 'Lib/test/test_site.py' needs a valid $HOME
230 (setenv "HOME" (getcwd))
231 #t))
232 (add-after
233 'unpack 'set-source-file-times-to-1980
234 ;; XXX One of the tests uses a ZIP library to pack up some of the
235 ;; source tree, and fails with "ZIP does not support timestamps
236 ;; before 1980". Work around this by setting the file times in the
237 ;; source tree to sometime in early 1980.
238 (lambda _
239 (let ((circa-1980 (* 10 366 24 60 60)))
240 (ftw "." (lambda (file stat flag)
241 (utime file circa-1980 circa-1980)
242 #t))
243 #t)))
244 (add-after 'install 'remove-tests
245 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
246 ;; because these files are used by some libraries out there.
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out")))
249 (match (scandir (string-append out "/lib")
250 (lambda (name)
251 (string-prefix? "python" name)))
252 ((pythonX.Y)
253 (let ((testdir (string-append out "/lib/" pythonX.Y
254 "/test")))
255 (with-directory-excursion testdir
256 (for-each delete-file-recursively
257 (scandir testdir
258 (match-lambda
259 ((or "." "..") #f)
260 (file
261 (not
262 (string-prefix? "test_support."
263 file))))))
264 (call-with-output-file "__init__.py" (const #t))
265 #t)))))))
266 (add-before 'strip 'make-libraries-writable
267 (lambda* (#:key outputs #:allow-other-keys)
268 ;; Make .so files writable so they can be stripped.
269 (let ((out (assoc-ref outputs "out")))
270 (for-each (lambda (file)
271 (chmod file #o755))
272 (find-files (string-append out "/lib")
273 "\\.so"))
274 #t)))
275 (add-after 'install 'move-tk-inter
276 (lambda* (#:key outputs #:allow-other-keys)
277 ;; When Tkinter support is built move it to a separate output so
278 ;; that the main output doesn't contain a reference to Tcl/Tk.
279 (let ((out (assoc-ref outputs "out"))
280 (tk (assoc-ref outputs "tk")))
281 (when tk
282 (match (find-files out "tkinter.*\\.so")
283 ((tkinter.so)
284 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
285 ;; want it under TK/lib/pythonX.Y/site-packages.
286 (let* ((len (string-length out))
287 (target (string-append
288 tk "/"
289 (string-drop
290 (dirname (dirname tkinter.so))
291 len)
292 "/site-packages")))
293 (install-file tkinter.so target)
294 (delete-file tkinter.so)))))
295 #t))))))
296 (inputs
297 `(("bzip2" ,bzip2)
298 ("gdbm" ,gdbm)
299 ("libffi" ,libffi) ; for ctypes
300 ("sqlite" ,sqlite) ; for sqlite extension
301 ("openssl" ,openssl)
302 ("readline" ,readline)
303 ("zlib" ,zlib)
304 ("tcl" ,tcl)
305 ("tk" ,tk))) ; for tkinter
306 (native-inputs
307 `(("pkg-config" ,pkg-config)))
308 (native-search-paths
309 (list (search-path-specification
310 (variable "PYTHONPATH")
311 (files '("lib/python2.7/site-packages")))))
312 (home-page "https://www.python.org")
313 (synopsis "High-level, dynamically-typed programming language")
314 (description
315 "Python is a remarkably powerful dynamic programming language that
316 is used in a wide variety of application domains. Some of its key
317 distinguishing features include: clear, readable syntax; strong
318 introspection capabilities; intuitive object orientation; natural
319 expression of procedural code; full modularity, supporting hierarchical
320 packages; exception-based error handling; and very high level dynamic
321 data types.")
322 (license license:psfl)))
323
324 ;; Current 2.x version.
325 (define-public python-2 python-2.7)
326
327 (define-public python-3.5
328 (package (inherit python-2)
329 (version "3.5.3")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "https://www.python.org/ftp/python/"
333 version "/Python-" version ".tar.xz"))
334 (patches (search-patches
335 "python-fix-tests.patch"
336 "python-3.5-fix-tests.patch"
337 "python-3.5-getentropy-on-old-kernels.patch"
338 "python-3-deterministic-build-info.patch"
339 "python-3-search-paths.patch"))
340 (patch-flags '("-p0"))
341 (sha256
342 (base32
343 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
344 (snippet
345 '(delete-file
346 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
347 (arguments (substitute-keyword-arguments (package-arguments python-2)
348 ((#:tests? _) #t)))
349 (native-search-paths
350 (list (search-path-specification
351 (variable "PYTHONPATH")
352 (files (list (string-append "lib/python"
353 (version-major+minor version)
354 "/site-packages"))))))))
355
356 ;; Current 3.x version.
357 (define-public python-3 python-3.5)
358
359 ;; Current major version.
360 (define-public python python-3)
361
362 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
363 ;; Python (Tk -> libxcb -> Python.)
364
365 (define-public python2-minimal
366 (package (inherit python-2)
367 (name "python-minimal")
368 (outputs '("out"))
369
370 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
371 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
372 ;; libffi.
373 (inputs `(("libffi" ,libffi)
374 ("zlib" ,zlib)))))
375
376 (define-public python-minimal
377 (package (inherit python)
378 (name "python-minimal")
379 (outputs '("out"))
380
381 ;; Build fails due to missing ctypes without libffi.
382 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
383 ;; zlib is required by 'zipimport', used by pip.
384 (inputs `(("libffi" ,libffi)
385 ("openssl" ,openssl)
386 ("zlib" ,zlib)))))
387
388 (define* (wrap-python3 python
389 #:optional
390 (name (string-append (package-name python) "-wrapper")))
391 (package (inherit python)
392 (name name)
393 (source #f)
394 (build-system trivial-build-system)
395 (outputs '("out"))
396 (inputs `(("bash" ,bash)))
397 (propagated-inputs `(("python" ,python)))
398 (arguments
399 `(#:modules ((guix build utils))
400 #:builder
401 (begin
402 (use-modules (guix build utils))
403 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
404 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
405 (mkdir-p bin)
406 (for-each
407 (lambda (old new)
408 (symlink (string-append python old)
409 (string-append bin "/" new)))
410 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
411 `("python" ,"pydoc" ,"idle" ,"pip"))
412 ;; python-config outputs search paths based upon its location,
413 ;; use a bash wrapper to avoid changing its outputs.
414 (let ((bash (string-append (assoc-ref %build-inputs "bash")
415 "/bin/bash"))
416 (old (string-append python "python3-config"))
417 (new (string-append bin "/python-config")))
418 (with-output-to-file new
419 (lambda ()
420 (format #t "#!~a~%" bash)
421 (format #t "exec \"~a\" \"$@\"~%" old)
422 (chmod new #o755)
423 #t)))))))
424 (synopsis "Wrapper for the Python 3 commands")
425 (description
426 "This package provides wrappers for the commands of Python@tie{}3.x such
427 that they can be invoked under their usual name---e.g., @command{python}
428 instead of @command{python3}.")))
429
430 (define-public python-wrapper (wrap-python3 python))
431 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
432
433 (define-public python-psutil
434 (package
435 (name "python-psutil")
436 (version "4.3.0")
437 (source
438 (origin
439 (method url-fetch)
440 (uri (pypi-uri "psutil" version))
441 (sha256
442 (base32
443 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
444 (build-system python-build-system)
445 (arguments
446 ;; FIXME: some tests does not return and times out.
447 '(#:tests? #f))
448 (home-page "https://www.github.com/giampaolo/psutil")
449 (synopsis "Library for retrieving information on running processes")
450 (description
451 "psutil (Python system and process utilities) is a library for retrieving
452 information on running processes and system utilization (CPU, memory, disks,
453 network) in Python. It is useful mainly for system monitoring, profiling and
454 limiting process resources and management of running processes. It implements
455 many functionalities offered by command line tools such as: ps, top, lsof,
456 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
457 pidof, tty, taskset, pmap.")
458 (license license:bsd-3)))
459
460 (define-public python2-psutil
461 (package-with-python2 python-psutil))
462
463 (define-public python-passlib
464 (package
465 (name "python-passlib")
466 (version "1.7.1")
467 (source
468 (origin
469 (method url-fetch)
470 (uri (pypi-uri "passlib" version))
471 (sha256
472 (base32
473 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
474 (build-system python-build-system)
475 (native-inputs
476 `(("python-nose" ,python-nose)))
477 (propagated-inputs
478 `(("python-py-bcrypt" ,python-py-bcrypt)))
479 (arguments
480 `(#:phases
481 (alist-cons-before
482 'check 'set-PYTHON_EGG_CACHE
483 ;; some tests require access to "$HOME/.cython"
484 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
485 %standard-phases)))
486 (home-page "https://bitbucket.org/ecollins/passlib")
487 (synopsis
488 "Comprehensive password hashing framework")
489 (description
490 "Passlib is a password hashing library for Python 2 & 3, which provides
491 cross-platform implementations of over 30 password hashing algorithms, as well
492 as a framework for managing existing password hashes. It's designed to be
493 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
494 to providing full-strength password hashing for multi-user application.")
495 (license license:bsd-3)))
496
497 (define-public python2-passlib
498 (package-with-python2 python-passlib))
499
500 (define-public python-py-bcrypt
501 (package
502 (name "python-py-bcrypt")
503 (version "0.4")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (string-append
508 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
509 version
510 ".tar.gz"))
511 (sha256
512 (base32
513 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
514 (build-system python-build-system)
515 (home-page "https://code.google.com/p/py-bcrypt")
516 (synopsis
517 "Bcrypt password hashing and key derivation")
518 (description
519 "A python wrapper of OpenBSD's Blowfish password hashing code. This
520 system hashes passwords using a version of Bruce Schneier's Blowfish block
521 cipher with modifications designed to raise the cost of off-line password
522 cracking and frustrate fast hardware implementation. The computation cost of
523 the algorithm is parametised, so it can be increased as computers get faster.
524 The intent is to make a compromise of a password database less likely to
525 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
526 John the Ripper).")
527 ;; "sha2.c" is under BSD-3;
528 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
529 ;; the rest is under ISC.
530 (license (list license:isc license:bsd-3 license:bsd-4))))
531
532 (define-public python2-py-bcrypt
533 (package-with-python2 python-py-bcrypt))
534
535
536 (define-public python-paramiko
537 (package
538 (name "python-paramiko")
539 (version "2.1.2")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (pypi-uri "paramiko" version))
544 (sha256
545 (base32
546 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
547 (build-system python-build-system)
548 (arguments
549 '(#:phases
550 (modify-phases %standard-phases
551 (replace 'check
552 (lambda _
553 (zero? (system* "python" "test.py")))))))
554 (propagated-inputs
555 `(("python-pyasn1" ,python-pyasn1)
556 ("python-cryptography" ,python-cryptography)))
557 (home-page "http://www.paramiko.org/")
558 (synopsis "SSHv2 protocol library")
559 (description "Paramiko is a python implementation of the SSHv2 protocol,
560 providing both client and server functionality. While it leverages a Python C
561 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
562 Python interface around SSH networking concepts.")
563 (license license:lgpl2.1+)))
564
565 (define-public python2-paramiko
566 (package-with-python2 python-paramiko))
567
568
569 (define-public python-httplib2
570 (package
571 (name "python-httplib2")
572 (version "0.9.2")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (pypi-uri "httplib2" version))
577 (sha256
578 (base32
579 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
580 (build-system python-build-system)
581 (home-page "https://github.com/jcgregorio/httplib2")
582 (synopsis "Comprehensive HTTP client library")
583 (description
584 "A comprehensive HTTP client library supporting many features left out of
585 other HTTP libraries.")
586 (license license:expat)))
587
588 (define-public python2-httplib2
589 (package-with-python2 python-httplib2))
590
591 (define-public python-ecdsa
592 (package
593 (name "python-ecdsa")
594 (version "0.13")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (string-append
599 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
600 version
601 ".tar.gz"))
602 (sha256
603 (base32
604 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
605 (build-system python-build-system)
606 (inputs
607 `(("openssl" ,openssl)))
608 (home-page
609 "https://github.com/warner/python-ecdsa")
610 (synopsis
611 "ECDSA cryptographic signature library (pure python)")
612 (description
613 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
614 Curve Digital Signature Algorithm), implemented purely in Python. With this
615 library, you can quickly create keypairs (signing key and verifying key), sign
616 messages, and verify the signatures. The keys and signatures are very short,
617 making them easy to handle and incorporate into other protocols.")
618 (license license:expat)))
619
620 (define-public python2-ecdsa
621 (package-with-python2 python-ecdsa))
622
623 (define-public python-ccm
624 (package
625 (name "python-ccm")
626 (version "2.1.6")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "ccm" version))
631 (sha256
632 (base32
633 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
634 (build-system python-build-system)
635 (propagated-inputs
636 `(("python-pyyaml" ,python-pyyaml)
637 ;; Not listed in setup.py, but used in ccmlib/node.py for full
638 ;; functionality
639 ("python-psutil" ,python-psutil)
640 ("python-six" ,python-six)))
641 (home-page "https://github.com/pcmanus/ccm")
642 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
643 localhost")
644 (description "Cassandra Cluster Manager is a development tool for testing
645 local Cassandra clusters. It creates, launches and removes Cassandra clusters
646 on localhost.")
647 (license license:asl2.0)))
648
649 (define-public python2-ccm
650 (package-with-python2 python-ccm))
651
652 (define-public python-pytz
653 (package
654 (name "python-pytz")
655 (version "2016.10")
656 (source
657 (origin
658 (method url-fetch)
659 (uri (pypi-uri "pytz" version ".tar.bz2"))
660 (sha256
661 (base32
662 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
663 (build-system python-build-system)
664 (arguments `(#:tests? #f)) ; no test target
665 (home-page "http://pythonhosted.org/pytz")
666 (synopsis "Python timezone library")
667 (description
668 "This library allows accurate and cross platform timezone calculations
669 using Python 2.4 or higher and provides access to the Olson timezone database.")
670 (license license:expat)))
671
672 (define-public python2-pytz
673 (package-with-python2 python-pytz))
674
675
676 (define-public python-babel
677 (package
678 (name "python-babel")
679 (version "2.3.4")
680 (source
681 (origin
682 (method url-fetch)
683 (uri (pypi-uri "Babel" version))
684 (sha256
685 (base32
686 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
687 (build-system python-build-system)
688 (propagated-inputs
689 `(("python-pytz" ,python-pytz)))
690 (arguments `(#:tests? #f)) ; no test target
691 (home-page "http://babel.pocoo.org/")
692 (synopsis
693 "Tools for internationalizing Python applications")
694 (description
695 "Babel is composed of two major parts:
696 - tools to build and work with gettext message catalogs
697 - a Python interface to the CLDR (Common Locale Data Repository), providing
698 access to various locale display names, localized number and date formatting,
699 etc. ")
700 (license license:bsd-3)))
701
702 (define-public python2-babel
703 (package-with-python2 python-babel))
704
705 (define-public python2-backport-ssl-match-hostname
706 (package
707 (name "python2-backport-ssl-match-hostname")
708 (version "3.5.0.1")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://pypi.python.org/packages/source/b/"
714 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
715 version ".tar.gz"))
716 (sha256
717 (base32
718 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
719 (build-system python-build-system)
720 (arguments
721 `(#:python ,python-2
722 #:tests? #f)) ; no test target
723 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
724 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
725 (description
726 "This backport brings the ssl.match_hostname() function to users of
727 earlier versions of Python. The function checks the hostname in the
728 certificate returned by the server to which a connection has been established,
729 and verifies that it matches the intended target hostname.")
730 (license license:psfl)))
731
732 (define-public python-hdf4
733 (package
734 (name "python-hdf4")
735 (version "0.9")
736 (source
737 (origin
738 (method url-fetch)
739 (uri (pypi-uri name version))
740 (sha256
741 (base32
742 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
743 (build-system python-build-system)
744 (native-inputs `(("nose" ,python-nose)))
745 (propagated-inputs `(("numpy" ,python-numpy)))
746 (inputs
747 `(("hdf4" ,hdf4)
748 ("libjpeg" ,libjpeg)
749 ("zlib" ,zlib)))
750 (arguments
751 `(#:phases
752 (modify-phases %standard-phases
753 (replace 'check
754 (lambda _
755 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
756 ;; on to import numpy. Somehow this works on their CI system.
757 ;; Let's just manage PYTHONPATH here instead.
758 (substitute* "runexamples.sh"
759 (("export PYTHONPATH=.*") ""))
760 (setenv "PYTHONPATH"
761 (string-append (getcwd) ":"
762 (getenv "PYTHONPATH")))
763 (and (zero? (system* "./runexamples.sh"))
764 (zero? (system* "nosetests" "-v"))))))))
765 (home-page "https://github.com/fhs/python-hdf4")
766 (synopsis "Python interface to the NCSA HDF4 library")
767 (description
768 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
769 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
770 NetCDF files can also be read and modified. Python-HDF4 is a fork of
771 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
772 (license license:expat)))
773
774 (define-public python2-hdf4
775 (package-with-python2 python-hdf4))
776
777 (define-public python-h5py
778 (package
779 (name "python-h5py")
780 (version "2.6.0")
781 (source
782 (origin
783 (method url-fetch)
784 (uri (pypi-uri "h5py" version))
785 (sha256
786 (base32
787 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
788 (build-system python-build-system)
789 (arguments
790 `(#:tests? #f ; no test target
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'unpack 'fix-hdf5-paths
794 (lambda* (#:key inputs #:allow-other-keys)
795 (let ((prefix (assoc-ref inputs "hdf5")))
796 (substitute* "setup_build.py"
797 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']"))
799 (("'/opt/local/include', '/usr/local/include'")
800 (string-append "'" prefix "/include" "'")))
801 (substitute* "setup_configure.py"
802 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']")))
804 #t))))))
805 (propagated-inputs
806 `(("python-six" ,python-six)
807 ("python-numpy" ,python-numpy)))
808 (inputs
809 `(("hdf5" ,hdf5)))
810 (native-inputs
811 `(("python-cython" ,python-cython)
812 ("python-pkgconfig" ,python-pkgconfig)))
813 (home-page "http://www.h5py.org/")
814 (synopsis "Read and write HDF5 files from Python")
815 (description
816 "The h5py package provides both a high- and low-level interface to the
817 HDF5 library from Python. The low-level interface is intended to be a
818 complete wrapping of the HDF5 API, while the high-level component supports
819 access to HDF5 files, datasets and groups using established Python and NumPy
820 concepts.")
821 (license license:bsd-3)))
822
823 (define-public python2-h5py
824 (package-with-python2 python-h5py))
825
826 (define-public python-netcdf4
827 (package
828 (name "python-netcdf4")
829 (version "1.2.7")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (pypi-uri "netCDF4" version))
834 (sha256
835 (base32
836 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
837 (build-system python-build-system)
838 (native-inputs
839 `(("python-cython" ,python-cython)))
840 (propagated-inputs
841 `(("python-numpy" ,python-numpy)))
842 (inputs
843 `(("netcdf" ,netcdf)
844 ("hdf4" ,hdf4)
845 ("hdf5" ,hdf5)))
846 (arguments
847 '(#:phases
848 (modify-phases %standard-phases
849 (replace 'check
850 (lambda _
851 (setenv "NO_NET" "1") ; disable opendap tests
852 (with-directory-excursion "test"
853 (setenv "PYTHONPATH" ; find and add the library we just built
854 (string-append
855 (car (find-files "../build" "lib.*"
856 #:directories? #:t
857 #:fail-on-error? #:t))
858 ":" (getenv "PYTHONPATH")))
859 (zero? (system* "python" "run_all.py"))))))))
860 (home-page
861 "https://github.com/Unidata/netcdf4-python")
862 (synopsis "Python/numpy interface to the netCDF library")
863 (description "Netcdf4-python is a Python interface to the netCDF C
864 library. netCDF version 4 has many features not found in earlier
865 versions of the library and is implemented on top of HDF5. This module
866 can read and write files in both the new netCDF 4 and the old netCDF 3
867 format, and can create files that are readable by HDF5 clients. The
868 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
869 to users of that module.")
870 ;; The software is mainly ISC, but includes some files covered
871 ;; by the Expat license.
872 (license (list license:isc license:expat))))
873
874 (define-public python2-netcdf4
875 (package-with-python2 python-netcdf4))
876
877 (define-public python-lockfile
878 (package
879 (name "python-lockfile")
880 (version "0.12.2")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
885 "lockfile-" version ".tar.gz"))
886 (sha256
887 (base32
888 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
889 (build-system python-build-system)
890 (arguments '(#:test-target "check"))
891 (native-inputs
892 `(("python-pbr" ,python-pbr)))
893 (home-page "https://launchpad.net/pylockfile")
894 (synopsis "Platform-independent file locking module")
895 (description
896 "The lockfile package exports a LockFile class which provides a simple
897 API for locking files.")
898 (license license:expat)))
899
900 (define-public python2-lockfile
901 (package-with-python2 python-lockfile))
902
903 (define-public python-mock
904 (package
905 (name "python-mock")
906 (version "1.0.1")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "mock" version))
911 (sha256
912 (base32
913 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
914 (build-system python-build-system)
915 (arguments '(#:test-target "check"))
916 (home-page "https://github.com/testing-cabal/mock")
917 (synopsis "Python mocking and patching library for testing")
918 (description
919 "Mock is a library for testing in Python. It allows you to replace parts
920 of your system under test with mock objects and make assertions about how they
921 have been used.")
922 (license license:expat)))
923
924 (define-public python2-mock
925 (package-with-python2 python-mock))
926
927 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
928 ;;; of python-mock. However, a large number of packages fail to build with
929 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
930 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
931 (define-public python-mock-2
932 (package
933 (inherit python-mock)
934 (version "2.0.0")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (pypi-uri "mock" version))
939 (sha256
940 (base32
941 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
942 (propagated-inputs
943 `(("python-pbr" ,python-pbr-minimal)
944 ,@(package-propagated-inputs python-mock)))))
945
946 (define-public python-setuptools
947 (package
948 (name "python-setuptools")
949 (version "31.0.0")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (pypi-uri "setuptools" version))
954 (sha256
955 (base32
956 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
957 (modules '((guix build utils)))
958 (snippet
959 '(begin
960 ;; Remove included binaries which are used to build self-extracting
961 ;; installers for Windows.
962 ;; TODO: Find some way to build them ourself so we can include them.
963 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
964 #t))))
965 (build-system python-build-system)
966 ;; FIXME: Tests require pytest, which itself relies on setuptools.
967 ;; One could bootstrap with an internal untested setuptools.
968 (arguments
969 `(#:tests? #f))
970 (home-page "https://pypi.python.org/pypi/setuptools")
971 (synopsis
972 "Library designed to facilitate packaging Python projects")
973 (description
974 "Setuptools is a fully-featured, stable library designed to facilitate
975 packaging Python projects, where packaging includes:
976 Python package and module definitions,
977 distribution package metadata,
978 test hooks,
979 project installation,
980 platform-specific details,
981 Python 3 support.")
982 ;; TODO: setuptools now bundles the following libraries:
983 ;; packaging, pyparsing, six and appdirs. How to unbundle?
984 (license (list license:psfl ; setuptools itself
985 license:expat ; six, appdirs, pyparsing
986 license:asl2.0 ; packaging is dual ASL2/BSD-2
987 license:bsd-2))))
988
989 (define-public python2-setuptools
990 (package-with-python2 python-setuptools))
991
992 (define-public python-uniseg
993 (package
994 (name "python-uniseg")
995 (version "0.7.1")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1000 "get/rel-" version ".tar.gz"))
1001 (file-name (string-append name "-" version ".tar.gz"))
1002 (sha256
1003 (base32
1004 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1005 (build-system python-build-system)
1006 (arguments
1007 '(#:tests? #f)) ; The test suite requires network access.
1008 (home-page
1009 "https://bitbucket.org/emptypage/uniseg-python")
1010 (synopsis
1011 "Python library to determine Unicode text segmentations")
1012 (description
1013 "Uniseg is a Python package used to determine Unicode text segmentations.
1014 Supported segmentations include:
1015 @enumerate
1016 @item @dfn{Code point} (any value in the Unicode codespace)
1017 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1018 multiple Unicode code points, e.g. \"G\" + acute-accent)
1019 @item Word break
1020 @item Sentence break
1021 @item Line break
1022 @end enumerate")
1023 (license license:expat)))
1024
1025 (define-public python2-uniseg
1026 (package-with-python2 python-uniseg))
1027
1028 ;;; Pycrypto is abandoned upstream:
1029 ;;;
1030 ;;; https://github.com/dlitz/pycrypto/issues/173
1031 ;;;
1032 ;;; TODO Remove this package from GNU Guix.
1033 (define-public python-pycrypto
1034 (package
1035 (name "python-pycrypto")
1036 (version "2.6.1")
1037 (source
1038 (origin
1039 (method url-fetch)
1040 (uri (pypi-uri "pycrypto" version))
1041 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1042 (sha256
1043 (base32
1044 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1045 (build-system python-build-system)
1046 (inputs
1047 `(("python" ,python)
1048 ("gmp" ,gmp)))
1049 (arguments
1050 `(#:phases
1051 (alist-cons-before
1052 'build 'set-build-env
1053 ;; pycrypto runs an autoconf configure script behind the scenes
1054 (lambda _
1055 (setenv "CONFIG_SHELL" (which "bash")))
1056 %standard-phases)))
1057 (home-page "http://www.pycrypto.org/")
1058 (synopsis "Cryptographic modules for Python")
1059 (description
1060 "Pycrypto is a collection of both secure hash functions (such as SHA256
1061 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1062 etc.). The package is structured to make adding new modules easy.")
1063 (license license:public-domain)))
1064
1065 (define-public python2-pycrypto
1066 (let ((pycrypto (package-with-python2 python-pycrypto)))
1067 (package (inherit pycrypto)
1068 (inputs
1069 `(("python" ,python-2)
1070 ,@(alist-delete
1071 "python"
1072 (package-inputs pycrypto)))))))
1073
1074 (define-public python-eventlet
1075 (package
1076 (name "python-eventlet")
1077 (version "0.20.1")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri (pypi-uri "eventlet" version))
1082 (sha256
1083 (base32
1084 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1085 (build-system python-build-system)
1086 (propagated-inputs
1087 `(("python-greenlet" ,python-greenlet)))
1088 (arguments
1089 ;; TODO: Requires unpackaged 'enum-compat'.
1090 '(#:tests? #f))
1091 (home-page "http://eventlet.net")
1092 (synopsis "Concurrent networking library for Python")
1093 (description
1094 "Eventlet is a concurrent networking library for Python that
1095 allows you to change how you run your code, not how you write it.
1096 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1097 Coroutines ensure that the developer uses a blocking style of programming
1098 that is similar to threading, but provide the benefits of non-blocking I/O.
1099 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1100 from the Python interpreter, or as a small part of a larger application.")
1101 (license license:expat)))
1102
1103 (define-public python2-eventlet
1104 (let ((base (package-with-python2
1105 (strip-python2-variant python-eventlet))))
1106 (package (inherit base)
1107 (propagated-inputs
1108 `(("python2-enum34" ,python2-enum34)
1109 ,@(package-propagated-inputs base))))))
1110
1111 (define-public python-keyring
1112 (package
1113 (name "python-keyring")
1114 (version "8.7")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (pypi-uri "keyring" version))
1119 (sha256
1120 (base32
1121 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1122 (build-system python-build-system)
1123 (native-inputs
1124 `(("python-setuptools-scm" ,python-setuptools-scm)))
1125 (propagated-inputs
1126 `(("python-pycrypto" ,python-pycrypto)))
1127 (arguments
1128 `(#:tests? #f)) ;TODO: tests require pytest
1129 (home-page "https://github.com/jaraco/keyring")
1130 (synopsis "Store and access your passwords safely")
1131 (description
1132 "The Python keyring lib provides a easy way to access the system keyring
1133 service from python. It can be used in any application that needs safe
1134 password storage.")
1135 ;; "MIT" and PSF dual license
1136 (license license:x11)))
1137
1138 (define-public python2-keyring
1139 (package-with-python2 python-keyring))
1140
1141 (define-public python-six
1142 (package
1143 (name "python-six")
1144 (version "1.10.0")
1145 (source
1146 (origin
1147 (method url-fetch)
1148 (uri (pypi-uri "six" version))
1149 (sha256
1150 (base32
1151 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1152 (build-system python-build-system)
1153 (native-inputs
1154 `(("python-py" ,python-py)
1155 ("python-pytest" ,python-pytest)))
1156 (home-page "http://pypi.python.org/pypi/six/")
1157 (synopsis "Python 2 and 3 compatibility utilities")
1158 (description
1159 "Six is a Python 2 and 3 compatibility library. It provides utility
1160 functions for smoothing over the differences between the Python versions with
1161 the goal of writing Python code that is compatible on both Python versions.
1162 Six supports every Python version since 2.5. It is contained in only one
1163 Python file, so it can be easily copied into your project.")
1164 (license license:x11)))
1165
1166 (define-public python2-six
1167 (package-with-python2 python-six))
1168
1169 (define-public python-dateutil
1170 (package
1171 (name "python-dateutil")
1172 (version "2.6.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "python-dateutil" version))
1177 (sha256
1178 (base32
1179 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1180 (build-system python-build-system)
1181 (propagated-inputs
1182 `(("python-six" ,python-six)))
1183 (home-page "https://dateutil.readthedocs.io/en/stable/")
1184 (synopsis "Extensions to the standard datetime module")
1185 (description
1186 "The dateutil module provides powerful extensions to the standard
1187 datetime module, available in Python 2.3+.")
1188 (license license:bsd-3)))
1189
1190 (define-public python2-dateutil
1191 (package-with-python2 python-dateutil))
1192
1193 (define-public python-parsedatetime
1194 (package
1195 (name "python-parsedatetime")
1196 (version "2.3")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "parsedatetime" version))
1201 (sha256
1202 (base32
1203 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1204 (build-system python-build-system)
1205 (native-inputs
1206 `(("python-nose" ,python-nose)
1207 ("python-pyicu" ,python-pyicu)
1208 ("python-pytest" ,python-pytest)
1209 ("python-pytest-runner" ,python-pytest-runner)))
1210 (propagated-inputs
1211 `(("python-future" ,python-future)))
1212 (home-page "https://github.com/bear/parsedatetime/")
1213 (synopsis
1214 "Parse human-readable date/time text")
1215 (description
1216 "Parse human-readable date/time text.")
1217 (license license:asl2.0)))
1218
1219 (define-public python2-parsedatetime
1220 (package-with-python2 python-parsedatetime))
1221
1222 (define-public python-pandas
1223 (package
1224 (name "python-pandas")
1225 (version "0.19.2")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "pandas" version))
1230 (sha256
1231 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1232 (patches
1233 (search-patches "python-pandas-skip-failing-tests.patch"))))
1234 (build-system python-build-system)
1235 (propagated-inputs
1236 `(("python-numpy" ,python-numpy)
1237 ("python-pytz" ,python-pytz)
1238 ("python-dateutil" ,python-dateutil)))
1239 (native-inputs
1240 `(("python-nose" ,python-nose)
1241 ("python-cython" ,python-cython)))
1242 (home-page "http://pandas.pydata.org")
1243 (synopsis "Data structures for data analysis, time series, and statistics")
1244 (description
1245 "Pandas is a Python package providing fast, flexible, and expressive data
1246 structures designed to make working with structured (tabular,
1247 multidimensional, potentially heterogeneous) and time series data both easy
1248 and intuitive. It aims to be the fundamental high-level building block for
1249 doing practical, real world data analysis in Python.")
1250 (license license:bsd-3)))
1251
1252 (define-public python2-pandas
1253 (package-with-python2 python-pandas))
1254
1255 (define-public python-tzlocal
1256 (package
1257 (name "python-tzlocal")
1258 (version "1.2.2")
1259 (source
1260 (origin
1261 (method url-fetch)
1262 (uri (pypi-uri "tzlocal" version))
1263 (sha256
1264 (base32
1265 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1266 (build-system python-build-system)
1267 (propagated-inputs
1268 `(("python-pytz" ,python-pytz)))
1269 (home-page "https://github.com/regebro/tzlocal")
1270 (synopsis
1271 "Local timezone information for Python")
1272 (description
1273 "Tzlocal returns a tzinfo object with the local timezone information.
1274 This module attempts to fix a glaring hole in pytz, that there is no way to
1275 get the local timezone information, unless you know the zoneinfo name, and
1276 under several distributions that's hard or impossible to figure out.")
1277 (license license:cc0)))
1278
1279 (define-public python2-pysqlite
1280 (package
1281 (name "python2-pysqlite")
1282 (version "2.8.3")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "pysqlite" version))
1287 (sha256
1288 (base32
1289 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1290 (build-system python-build-system)
1291 (inputs
1292 `(("sqlite" ,sqlite)))
1293 (arguments
1294 `(#:python ,python-2 ; incompatible with Python 3
1295 #:tests? #f)) ; no test target
1296 (home-page "https://github.com/ghaering/pysqlite")
1297 (synopsis "SQLite bindings for Python")
1298 (description
1299 "Pysqlite provides SQLite bindings for Python that comply to the
1300 Database API 2.0T.")
1301 (license license:zlib)))
1302
1303
1304 (define-public python2-mechanize
1305 (package
1306 (name "python2-mechanize")
1307 (version "0.2.5")
1308 (source
1309 (origin
1310 (method url-fetch)
1311 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32
1315 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1316 (build-system python-build-system)
1317 (arguments
1318 `(#:python ,python-2 ; apparently incompatible with Python 3
1319 #:tests? #f))
1320 ;; test fails with message
1321 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1322 ;; (python-3.3.2) or
1323 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1324 ;; (python-2.7.5).
1325 ;; The source code is from March 2011 and probably not up-to-date
1326 ;; with respect to python unit tests.
1327 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1328 (synopsis
1329 "Stateful programmatic web browsing in Python")
1330 (description
1331 "Mechanize implements stateful programmatic web browsing in Python,
1332 after Andy Lester’s Perl module WWW::Mechanize.")
1333 (license (license:non-copyleft
1334 "file://COPYING"
1335 "See COPYING in the distribution."))))
1336
1337
1338 (define-public python-simplejson
1339 (package
1340 (name "python-simplejson")
1341 (version "3.10.0")
1342 (source
1343 (origin
1344 (method url-fetch)
1345 (uri (pypi-uri "simplejson" version))
1346 (sha256
1347 (base32
1348 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1349 (build-system python-build-system)
1350 (home-page "http://simplejson.readthedocs.org/en/latest/")
1351 (synopsis
1352 "Json library for Python")
1353 (description
1354 "JSON (JavaScript Object Notation) is a subset of JavaScript
1355 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1356 format.
1357
1358 Simplejson exposes an API familiar to users of the standard library marshal
1359 and pickle modules. It is the externally maintained version of the json
1360 library contained in Python 2.6, but maintains compatibility with Python 2.5
1361 and (currently) has significant performance advantages, even without using
1362 the optional C extension for speedups. Simplejson is also supported on
1363 Python 3.3+.")
1364 (license license:x11)))
1365
1366 (define-public python2-simplejson
1367 (package-with-python2 python-simplejson))
1368
1369
1370 (define-public python-pyicu
1371 (package
1372 (name "python-pyicu")
1373 (version "1.9.5")
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (pypi-uri "PyICU" version))
1378 (sha256
1379 (base32
1380 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1381 (build-system python-build-system)
1382 (arguments
1383 '(#:phases
1384 (modify-phases %standard-phases
1385 (add-before 'check 'delete-failing-test
1386 (lambda _
1387 ;; XXX: These tests require locales that are unavailable
1388 ;; in the build environment.
1389 (delete-file "test/test_DateTimeParserGenerator.py")
1390 #t)))))
1391 (inputs
1392 `(("icu4c" ,icu4c)))
1393 (home-page "http://pyicu.osafoundation.org/")
1394 (synopsis "Python extension wrapping the ICU C++ API")
1395 (description
1396 "PyICU is a python extension wrapping the ICU C++ API.")
1397 (license license:x11)))
1398
1399 (define-public python2-pyicu
1400 (package-with-python2 python-pyicu))
1401
1402 (define-public python2-dogtail
1403 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1404 ;; spaces in indentation" with Python 3.
1405 (package
1406 (name "python2-dogtail")
1407 (version "0.9.9")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "dogtail" version))
1411 (sha256
1412 (base32
1413 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1414 (build-system python-build-system)
1415 (arguments `(#:python ,python-2
1416 #:tests? #f)) ; invalid command "test"
1417 ;; Currently no offical homepage.
1418 (home-page "https://pypi.python.org/pypi/dogtail/")
1419 (synopsis "GUI test tool and automation framework written in Python")
1420 (description
1421 "Dogtail is a GUI test tool and automation framework written in Python.
1422 It uses Accessibility (a11y) technologies to communicate with desktop
1423 applications. dogtail scripts are written in Python and executed like any
1424 other Python program.")
1425 (license license:gpl2+)))
1426
1427 (define-public python2-empy
1428 (package
1429 (name "python2-empy")
1430 (version "3.3")
1431 (source (origin
1432 (method url-fetch)
1433 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1434 version ".tar.gz"))
1435 (sha256
1436 (base32
1437 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1438 (build-system python-build-system)
1439 (arguments
1440 `(#:python ,python-2
1441 #:phases (alist-replace
1442 'check
1443 (lambda _
1444 (zero? (system* "./test.sh")))
1445 %standard-phases)))
1446 (home-page "http://www.alcyone.com/software/empy/")
1447 (synopsis "Templating system for Python")
1448 (description
1449 "EmPy is a system for embedding Python expressions and statements in
1450 template text; it takes an EmPy source file, processes it, and produces
1451 output. This is accomplished via expansions, which are special signals to the
1452 EmPy system and are set off by a special prefix (by default the at sign, @@).
1453 EmPy can expand arbitrary Python expressions and statements in this way, as
1454 well as a variety of special forms. Textual data not explicitly delimited in
1455 this way is sent unaffected to the output, allowing Python to be used in
1456 effect as a markup language. Also supported are callbacks via hooks,
1457 recording and playback via diversions, and dynamic, chainable filters. The
1458 system is highly configurable via command line options and embedded
1459 commands.")
1460 (license license:lgpl2.1+)))
1461
1462 (define-public python2-element-tree
1463 (package
1464 (name "python2-element-tree")
1465 (version "1.2.6")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (string-append
1469 "http://effbot.org/media/downloads/elementtree-"
1470 version "-20050316.tar.gz"))
1471 (sha256
1472 (base32
1473 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1474 (build-system python-build-system)
1475 (arguments
1476 `(#:python ,python-2 ; seems to be part of Python 3
1477 #:tests? #f)) ; no 'test' sub-command
1478 (synopsis "Toolkit for XML processing in Python")
1479 (description
1480 "ElementTree is a Python library supporting lightweight XML processing.")
1481 (home-page "http://effbot.org/zone/element-index.htm")
1482 (license (license:x11-style
1483 "http://docs.python.org/2/license.html"
1484 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1485
1486 (define-public python2-pybugz
1487 (package
1488 (name "python2-pybugz")
1489 (version "0.6.11")
1490 (source (origin
1491 (method url-fetch)
1492 (uri (string-append
1493 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1494 version ".tar.gz"))
1495 (sha256
1496 (base32
1497 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1498 (patches (search-patches "pybugz-stty.patch"
1499 "pybugz-encode-error.patch"))))
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2 ; SyntaxError with Python 3
1503 #:tests? #f)) ; no 'test' sub-command
1504 (propagated-inputs
1505 `(("element-tree" ,python2-element-tree)))
1506 (synopsis "Python and command-line interface to Bugzilla")
1507 (description
1508 "PyBugz is a Python library and command-line tool to query the Bugzilla
1509 bug tracking system. It is meant as an aid to speed up interaction with the
1510 bug tracker.")
1511 (home-page "http://www.liquidx.net/pybugz/")
1512 (license license:gpl2)))
1513
1514 (define-public python-enum34
1515 (package
1516 (name "python-enum34")
1517 (version "1.1.6")
1518 (source
1519 (origin
1520 (method url-fetch)
1521 (uri (pypi-uri "enum34" version))
1522 (sha256
1523 (base32
1524 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1525 (build-system python-build-system)
1526 (home-page "https://pypi.python.org/pypi/enum34")
1527 (synopsis "Backported Python 3.4 Enum")
1528 (description
1529 "Enum34 is the new Python stdlib enum module available in Python 3.4
1530 backported for previous versions of Python from 2.4 to 3.3.")
1531 (license license:bsd-3)))
1532
1533 (define-public python2-enum34
1534 (package-with-python2 python-enum34))
1535
1536 (define-public python-parse-type
1537 (package
1538 (name "python-parse-type")
1539 (version "0.3.4")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append "https://pypi.python.org/packages/source/p/"
1544 "parse_type/parse_type-" version ".tar.gz"))
1545 (sha256
1546 (base32
1547 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1548 (build-system python-build-system)
1549 (arguments
1550 `(#:phases
1551 (modify-phases %standard-phases
1552 (add-after 'unpack 'patch-tests
1553 (lambda _
1554 (substitute* "tests/test_parse_type_parse.py"
1555 ;; Newer Python versions don't have the problem this test tests.
1556 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1557 ""))
1558 #t)))))
1559 (propagated-inputs
1560 `(("python-six" ,python-six)
1561 ("python-parse" ,python-parse)))
1562 (native-inputs
1563 `(("python-pytest" ,python-pytest)
1564 ("python-pytest-runner" ,python-pytest-runner)))
1565 (home-page "https://github.com/jenisys/parse_type")
1566 (synopsis "Extended parse module")
1567 (description
1568 "Parse_type extends the python parse module.")
1569 (properties
1570 `((python2-variant . ,(delay python2-parse-type))))
1571 (license license:bsd-3)))
1572
1573 (define-public python2-parse-type
1574 (let ((base (package-with-python2
1575 (strip-python2-variant python-parse-type))))
1576 (package (inherit base)
1577 (propagated-inputs
1578 `(("python2-enum34" ,python2-enum34)
1579 ,@(package-propagated-inputs base))))))
1580
1581 (define-public python-parse
1582 (package
1583 (name "python-parse")
1584 (version "1.6.6")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "parse" version))
1589 (sha256
1590 (base32
1591 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1592 (patches (search-patches "python-parse-too-many-fields.patch"))))
1593 (build-system python-build-system)
1594 (arguments
1595 `(#:phases
1596 (modify-phases %standard-phases
1597 (replace 'check
1598 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1599 (home-page "https://github.com/r1chardj0n3s/parse")
1600 (synopsis "Parse strings")
1601 (description
1602 "Parse strings using a specification based on the Python format()
1603 syntax.")
1604 (license license:x11)))
1605
1606 (define-public python-polib
1607 (package
1608 (name "python-polib")
1609 (version "1.0.8")
1610 (source (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "polib" version))
1613 (sha256
1614 (base32
1615 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1616 (build-system python-build-system)
1617 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1618 (synopsis "Manipulate, create and modify gettext files")
1619 (description "Polib can manipulate any gettext format (po, pot and mo)
1620 files. It can be used to create po files from scratch or to modify
1621 existing ones.")
1622 (license license:expat)))
1623
1624 (define-public python2-polib
1625 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1626 (package
1627 (inherit base)
1628 (arguments `(,@(package-arguments base)
1629 ;; Tests don't work with python2.
1630 #:tests? #f)))))
1631
1632 (define-public scons
1633 (package
1634 (name "scons")
1635 (version "2.5.1")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (string-append "mirror://sourceforge/scons/scons/" version
1639 "/scons-" version ".tar.gz"))
1640 (sha256
1641 (base32
1642 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1643 (build-system python-build-system)
1644 (arguments
1645 ;; With Python 3.x, fails to build with a syntax error.
1646 `(#:python ,python-2
1647 #:use-setuptools? #f ; still relies on distutils
1648 #:tests? #f)) ; no 'python setup.py test' command
1649 (home-page "http://scons.org/")
1650 (synopsis "Software construction tool written in Python")
1651 (description
1652 "SCons is a software construction tool. Think of SCons as an improved,
1653 cross-platform substitute for the classic Make utility with integrated
1654 functionality similar to autoconf/automake and compiler caches such as ccache.
1655 In short, SCons is an easier, more reliable and faster way to build
1656 software.")
1657 (license license:x11)))
1658
1659 (define-public python-extras
1660 (package
1661 (name "python-extras")
1662 (version "0.0.3")
1663 (source
1664 (origin
1665 (method url-fetch)
1666 (uri (string-append
1667 "https://pypi.python.org/packages/source/e/extras/extras-"
1668 version ".tar.gz"))
1669 (sha256
1670 (base32
1671 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1672 (build-system python-build-system)
1673 (arguments
1674 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1675 '(#:tests? #f))
1676 (home-page "https://github.com/testing-cabal/extras")
1677 (synopsis "Useful extensions to the Python standard library")
1678 (description
1679 "Extras is a set of extensions to the Python standard library.")
1680 (license license:expat)))
1681
1682 (define-public python2-extras
1683 (package-with-python2 python-extras))
1684
1685 (define-public python-mimeparse
1686 (package
1687 (name "python-mimeparse")
1688 (version "0.1.4")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1698 (build-system python-build-system)
1699 (arguments
1700 '(#:tests? #f)) ; no setup.py test command
1701 (home-page
1702 "https://github.com/dbtsai/python-mimeparse")
1703 (synopsis "Python library for parsing MIME types")
1704 (description
1705 "Mimeparse provides basic functions for parsing MIME type names and
1706 matching them against a list of media-ranges.")
1707 (license license:expat)))
1708
1709 (define-public python2-mimeparse
1710 (package-with-python2 python-mimeparse))
1711
1712 (define-public python-nose
1713 (package
1714 (name "python-nose")
1715 (version "1.3.7")
1716 (source
1717 (origin
1718 (method url-fetch)
1719 (uri (pypi-uri "nose" version))
1720 (sha256
1721 (base32
1722 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1723 (build-system python-build-system)
1724 (arguments
1725 '(#:tests? #f)) ; FIXME: test suite fails
1726 (home-page "http://readthedocs.org/docs/nose/")
1727 (synopsis "Python testing library")
1728 (description
1729 "Nose extends the unittest library to make testing easier.")
1730 (license license:lgpl2.0+)))
1731
1732 (define-public python2-nose
1733 (package-with-python2 python-nose))
1734
1735 (define-public python-nose2
1736 (package
1737 (name "python-nose2")
1738 (version "0.6.5")
1739 (source
1740 (origin
1741 (method url-fetch)
1742 (uri (pypi-uri "nose2" version))
1743 (sha256
1744 (base32
1745 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1746 (build-system python-build-system)
1747 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1748 (propagated-inputs
1749 `(("python-cov-core" ,python-cov-core)
1750 ("python-pytest-cov" ,python-pytest-cov)
1751 ("python-six" ,python-six)))
1752 (home-page "https://github.com/nose-devs/nose2")
1753 (synopsis "Next generation of nicer testing for Python")
1754 (description
1755 "Nose2 is the next generation of nicer testing for Python, based on the
1756 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1757 better plugin api, being easier for users to configure, and simplifying internal
1758 interfaces and processes.")
1759 (license license:bsd-2)))
1760
1761 (define-public python2-nose2
1762 (package-with-python2 python-nose2))
1763
1764 (define-public python-unittest2
1765 (package
1766 (name "python-unittest2")
1767 (version "0.5.1")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (string-append
1772 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1773 version ".tar.gz"))
1774 (sha256
1775 (base32
1776 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1777 (build-system python-build-system)
1778 (home-page "http://pypi.python.org/pypi/unittest2")
1779 (synopsis "Python unit testing library")
1780 (description
1781 "Unittest2 is a replacement for the unittest module in the Python
1782 standard library.")
1783 (license license:psfl)))
1784
1785 (define-public python2-unittest2
1786 (package (inherit python-unittest2)
1787 (name "python2-unittest2")
1788 (version "0.5.1")
1789 (source
1790 (origin
1791 (method url-fetch)
1792 (uri (string-append
1793 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1794 version ".tar.gz"))
1795 (sha256
1796 (base32
1797 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1798 (arguments
1799 `(#:python ,python-2
1800 #:tests? #f)))) ; no setup.py test command
1801
1802 (define-public python-pafy
1803 (package
1804 (name "python-pafy")
1805 (version "0.5.3.1")
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "pafy" version))
1810 (sha256
1811 (base32
1812 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1813 (build-system python-build-system)
1814 (arguments
1815 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1816 (propagated-inputs
1817 ;; Youtube-dl is a python package which is imported in the file
1818 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1819 `(("youtube-dl" ,youtube-dl)))
1820 (home-page "https://np1.github.io/pafy/")
1821 (synopsis "Retrieve YouTube content and metadata")
1822 (description
1823 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1824 (license license:lgpl3+)))
1825
1826 (define-public python-py
1827 (package
1828 (name "python-py")
1829 (version "1.4.32")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "py" version))
1834 (sha256
1835 (base32
1836 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1837 (build-system python-build-system)
1838 (arguments
1839 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1840 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1841 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1842 ;; Is this module globally installed?"
1843 '(#:tests? #f))
1844 (home-page "http://pylib.readthedocs.org/")
1845 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1846 (description
1847 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1848 code introspection, and logging.")
1849 (license license:expat)))
1850
1851 (define-public python2-py
1852 (package-with-python2 python-py))
1853
1854 (define-public python-pytest
1855 (package
1856 (name "python-pytest")
1857 (version "2.7.3")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (string-append
1862 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1863 version ".tar.gz"))
1864 (sha256
1865 (base32
1866 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1867 (modules '((guix build utils)))
1868 (snippet
1869 ;; One of the tests involves the /usr directory, so it fails.
1870 '(substitute* "testing/test_argcomplete.py"
1871 (("def test_remove_dir_prefix\\(self\\):")
1872 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1873 (build-system python-build-system)
1874 (propagated-inputs
1875 `(("python-py" ,python-py)))
1876 (native-inputs
1877 `(("python-nose" ,python-nose)
1878 ("python-mock" ,python-mock)))
1879 (home-page "http://pytest.org")
1880 (synopsis "Python testing library")
1881 (description
1882 "Pytest is a testing tool that provides auto-discovery of test modules
1883 and functions, detailed info on failing assert statements, modular fixtures,
1884 and many external plugins.")
1885 (license license:expat)))
1886
1887 (define-public python2-pytest
1888 (package-with-python2 python-pytest))
1889
1890 ;; Some packages require a newer pytest.
1891 (define-public python-pytest-3.0
1892 (package
1893 (inherit python-pytest)
1894 (name "python-pytest")
1895 (version "3.0.7")
1896 (source (origin
1897 (method url-fetch)
1898 (uri (pypi-uri "pytest" version))
1899 (sha256
1900 (base32
1901 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1902 (arguments
1903 `(#:phases
1904 (modify-phases %standard-phases
1905 (add-before 'check 'disable-invalid-test
1906 (lambda _
1907 (substitute* "testing/test_argcomplete.py"
1908 (("def test_remove_dir_prefix" line)
1909 (string-append "@pytest.mark.skip"
1910 "(reason=\"Assumes that /usr exists.\")\n "
1911 line)))
1912 #t)))))
1913 (native-inputs
1914 `(("python-nose" ,python-nose)
1915 ("python-mock" ,python-mock)
1916 ("python-hypothesis" ,python-hypothesis)))
1917 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1918
1919 (define-public python2-pytest-3.0
1920 (let ((base (package-with-python2
1921 (strip-python2-variant python-pytest-3.0))))
1922 (package (inherit base)
1923 (native-inputs
1924 `(("python2-enum34" ,python2-enum34)
1925 ,@(package-native-inputs base))))))
1926
1927 (define-public python-pytest-cov
1928 (package
1929 (name "python-pytest-cov")
1930 (version "2.4.0")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "pytest-cov" version))
1935 (sha256
1936 (base32
1937 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1938 (build-system python-build-system)
1939 (arguments
1940 `(#:phases
1941 (modify-phases %standard-phases
1942 (replace 'check
1943 (lambda _
1944 ;; options taken from tox.ini
1945 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1946 ;; with "Duplicate implicit target name"
1947 (zero? (system* "python" "./setup.py" "check"
1948 "--strict" "--metadata")))))))
1949 (propagated-inputs
1950 `(("python-coverage" ,python-coverage)
1951 ("python-pytest" ,python-pytest)))
1952 (home-page "https://github.com/pytest-dev/pytest-cov")
1953 (synopsis "Pytest plugin for measuring coverage")
1954 (description
1955 "Pytest-cov produces coverage reports. It supports centralised testing and
1956 distributed testing in both @code{load} and @code{each} modes. It also
1957 supports coverage of subprocesses.")
1958 (license license:expat)))
1959
1960 (define-public python2-pytest-cov
1961 (package-with-python2 python-pytest-cov))
1962
1963 (define-public python-pytest-runner
1964 (package
1965 (name "python-pytest-runner")
1966 (version "2.11.1")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (pypi-uri "pytest-runner" version))
1971 (sha256
1972 (base32
1973 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:phases
1977 (modify-phases %standard-phases
1978 ;; The fancy way of setting the version with setuptools_scm does not
1979 ;; seem to work here.
1980 (add-after 'unpack 'set-version
1981 (lambda _
1982 (substitute* "docs/conf.py"
1983 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1984 (string-append "version = \"" ,version "\"")))
1985 #t)))))
1986 (native-inputs
1987 `(("python-pytest" ,python-pytest)
1988 ("python-setuptools-scm" ,python-setuptools-scm)))
1989 (home-page "https://github.com/pytest-dev/pytest-runner")
1990 (synopsis "Invoke py.test as a distutils command")
1991 (description
1992 "This package provides a @command{pytest-runner} command that
1993 @file{setup.py} files can use to run tests.")
1994 (license license:expat)))
1995
1996 (define-public python2-pytest-runner
1997 (package-with-python2 python-pytest-runner))
1998
1999 (define-public python-pytest-mock
2000 (package
2001 (name "python-pytest-mock")
2002 (version "1.2")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "pytest-mock" version ".zip"))
2007 (sha256
2008 (base32
2009 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2010 (build-system python-build-system)
2011 (native-inputs
2012 `(("unzip" ,unzip)))
2013 (propagated-inputs
2014 `(("python-pytest" ,python-pytest)))
2015 (home-page "https://github.com/pytest-dev/pytest-mock/")
2016 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2017 (description
2018 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2019 around the patching API provided by the @code{mock} package, but with the
2020 benefit of not having to worry about undoing patches at the end of a test.
2021 The mocker fixture has the same API as @code{mock.patch}, supporting the
2022 same arguments.")
2023 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2024 (license license:expat)))
2025
2026 (define-public python2-pytest-mock
2027 (let ((base (package-with-python2
2028 (strip-python2-variant python-pytest-mock))))
2029 (package (inherit base)
2030 (propagated-inputs
2031 `(("python2-mock" ,python2-mock)
2032 ,@(package-propagated-inputs base))))))
2033
2034 (define-public python-pytest-xdist
2035 (package
2036 (name "python-pytest-xdist")
2037 (version "1.14")
2038 (source
2039 (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "pytest-xdist" version ".zip"))
2042 (sha256
2043 (base32
2044 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2045 (modules '((guix build utils)))
2046 (snippet
2047 '(begin
2048 ;; Remove pre-compiled .pyc files from source.
2049 (for-each delete-file-recursively
2050 (find-files "." "__pycache__" #:directories? #t))
2051 (for-each delete-file (find-files "." "\\.pyc$"))
2052 #t))))
2053 (build-system python-build-system)
2054 (arguments
2055 '(#:tests? #f)) ;FIXME: Some tests are failing.
2056 ;; #:phases
2057 ;; (modify-phases %standard-phases
2058 ;; (delete 'check)
2059 ;; (add-after 'install 'check
2060 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2061 ;; (add-installed-pythonpath inputs outputs)
2062 ;; (zero? (system* "py.test" "-v")))))
2063 (native-inputs
2064 `(("unzip" ,unzip)
2065 ("python-setuptools-scm" ,python-setuptools-scm)))
2066 (propagated-inputs
2067 `(("python-execnet" ,python-execnet)
2068 ("python-pytest" ,python-pytest)
2069 ("python-py" ,python-py)))
2070 (home-page
2071 "https://github.com/pytest-dev/pytest-xdist")
2072 (synopsis
2073 "Plugin for py.test with distributed testing and loop-on-failing modes")
2074 (description
2075 "The pytest-xdist plugin extends py.test with some unique test execution
2076 modes: parallelization, running tests in boxed subprocesses, the ability
2077 to run tests repeatedly when failed, and the ability to run tests on multiple
2078 Python interpreters or platforms. It uses rsync to copy the existing
2079 program code to a remote location, executes there, and then syncs the
2080 result back.")
2081 (license license:expat)))
2082
2083 (define-public python2-pytest-xdist
2084 (package-with-python2 python-pytest-xdist))
2085
2086 (define-public python-scripttest
2087 (package
2088 (name "python-scripttest")
2089 (version "1.3")
2090 (source
2091 (origin
2092 (method url-fetch)
2093 (uri (string-append
2094 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2095 version ".tar.gz"))
2096 (sha256
2097 (base32
2098 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2099 (build-system python-build-system)
2100 (native-inputs
2101 `(("python-pytest" ,python-pytest)))
2102 (home-page "http://pythonpaste.org/scripttest/")
2103 (synopsis "Python library to test command-line scripts")
2104 (description "Scripttest is a Python helper library for testing
2105 interactive command-line applications. With it you can run a script in a
2106 subprocess and see the output as well as any file modifications.")
2107 (license license:expat)))
2108
2109 (define-public python2-scripttest
2110 (package-with-python2 python-scripttest))
2111
2112 (define-public python-testtools
2113 (package
2114 (name "python-testtools")
2115 (version "1.4.0")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (pypi-uri "testtools" version))
2120 (sha256
2121 (base32
2122 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2123 (build-system python-build-system)
2124 (arguments
2125 `(#:phases
2126 (modify-phases %standard-phases
2127 (add-after 'unpack 'fix-module-imports
2128 (lambda _
2129 (substitute* "setup.py"
2130 (("'unittest2>=0.8.0',") ""))
2131 (substitute* '("testtools/testcase.py"
2132 "testtools/testsuite.py"
2133 "testtools/run.py"
2134 "testtools/tests/test_run.py"
2135 "testtools/tests/test_testsuite.py"
2136 "testtools/tests/test_deferredruntest.py")
2137 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2138 (("import unittest2 as unittest") "import unittest")
2139 (("import unittest2") "import unittest as unittest2")
2140 (("from unittest2 import") "from unittest import"))
2141 (substitute* "testtools/tests/test_testresult.py"
2142 ;; NUL in source code is not allowed (raises ValueError).
2143 (("\\x00\\x04") "\\x04"))
2144 #t)))))
2145 (propagated-inputs
2146 `(("python-mimeparse" ,python-mimeparse)
2147 ("python-extras" ,python-extras)))
2148 (home-page "https://github.com/testing-cabal/testtools")
2149 (synopsis
2150 "Extensions to the Python standard library unit testing framework")
2151 (description
2152 "Testtools extends the Python standard library unit testing framework to
2153 provide matchers, more debugging information, and cross-Python
2154 compatibility.")
2155 (license license:psfl)))
2156
2157 (define-public python2-testtools
2158 (package-with-python2 python-testtools))
2159
2160 (define-public python-testscenarios
2161 (package
2162 (name "python-testscenarios")
2163 (version "0.4")
2164 (source
2165 (origin
2166 (method url-fetch)
2167 (uri (string-append
2168 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2169 version ".tar.gz"))
2170 (sha256
2171 (base32
2172 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2173 (build-system python-build-system)
2174 (propagated-inputs
2175 `(("python-testtools" ,python-testtools)))
2176 (home-page "https://launchpad.net/testscenarios")
2177 (synopsis "Pyunit extension for dependency injection")
2178 (description
2179 "Testscenarios provides clean dependency injection for Python unittest
2180 style tests.")
2181 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2182
2183 (define-public python2-testscenarios
2184 (package-with-python2 python-testscenarios))
2185
2186 (define-public python-testresources
2187 (package
2188 (name "python-testresources")
2189 (version "0.2.7")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32
2198 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2199 (build-system python-build-system)
2200 (home-page "https://launchpad.net/testresources")
2201 (synopsis
2202 "Pyunit extension for managing test resources")
2203 (description
2204 "Testresources is an extension to Python's unittest to allow declarative
2205 use of resources by test cases.")
2206 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2207
2208 (define-public python2-testresources
2209 (package-with-python2 python-testresources))
2210
2211 (define-public python-subunit
2212 (package
2213 (name "python-subunit")
2214 (version "0.0.21")
2215 (source
2216 (origin
2217 (method url-fetch)
2218 (uri (string-append
2219 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2220 version ".tar.gz"))
2221 (sha256
2222 (base32
2223 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2224 (build-system python-build-system)
2225 (propagated-inputs
2226 `(("python-extras" ,python-extras)
2227 ("python-mimeparse" ,python-mimeparse)))
2228 (native-inputs
2229 `(("python-testscenarios" ,python-testscenarios)))
2230 (home-page "http://launchpad.net/subunit")
2231 (synopsis "Python implementation of the subunit protocol")
2232 (description
2233 "Python-subunit is a Python implementation of the subunit test streaming
2234 protocol.")
2235 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2236
2237 (define-public python2-subunit
2238 (package-with-python2 python-subunit))
2239
2240 ;; Recent versions of python-fixtures and python-testrepository need
2241 ;; python-pbr for packaging, which itself needs these two packages for
2242 ;; testing.
2243 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2244 ;; same source, just without any test dependencies and with tests disabled.
2245 ;; python-pbr-minmal is then used to package python-fixtures and
2246 ;; python-testrepository.
2247 ;; Strictly speaking we currently could remove the test-requirements from the
2248 ;; normal python-pbr package (and save this package) since test are disabled
2249 ;; there anyway. But this may change in future.
2250 (define python-pbr-minimal
2251 (package
2252 (name "python-pbr-minimal")
2253 (version "1.10.0")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "pbr" version))
2258 (sha256
2259 (base32
2260 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2261 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2262 (build-system python-build-system)
2263 (arguments
2264 `(#:tests? #f))
2265 (home-page "http://docs.openstack.org/developer/pbr/")
2266 (synopsis "Minimal build of python-pbr used for bootstrapping")
2267 (description
2268 "Used only for bootstrapping python2-pbr, you should not need this.")
2269 (license license:asl2.0)))
2270
2271 (define python2-pbr-minimal
2272 (package-with-python2 python-pbr-minimal))
2273
2274 (define-public python-pbr
2275 (package
2276 (inherit python-pbr-minimal)
2277 (name "python-pbr")
2278 (arguments
2279 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2280 (propagated-inputs
2281 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2282 (native-inputs
2283 `(("python-fixtures" ,python-fixtures)
2284 ;; discover, coverage, hacking, subunit
2285 ("python-mock" ,python-mock)
2286 ("python-six" ,python-six)
2287 ("python-sphinx" ,python-sphinx)
2288 ("python-testrepository" ,python-testrepository)
2289 ("python-testresources" ,python-testresources)
2290 ("python-testscenarios" ,python-testscenarios)
2291 ("python-testtools" ,python-testtools)
2292 ("python-virtualenv" ,python-virtualenv)))
2293 (synopsis "Enhance the default behavior of Python’s setuptools")
2294 (description
2295 "Python Build Reasonableness (PBR) is a library that injects some useful
2296 and sensible default behaviors into your setuptools run. It will set
2297 versions, process requirements files and generate AUTHORS and ChangeLog file
2298 from git information.
2299 ")))
2300
2301 (define-public python2-pbr
2302 (package-with-python2 python-pbr))
2303
2304 (define-public python-fixtures
2305 (package
2306 (name "python-fixtures")
2307 (version "1.4.0")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "fixtures" version))
2312 (sha256
2313 (base32
2314 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2315 (build-system python-build-system)
2316 (arguments
2317 '(#:phases
2318 (modify-phases %standard-phases
2319 (replace 'check
2320 (lambda _
2321 (zero? (system* "python" "-m" "testtools.run"
2322 "fixtures.test_suite")))))))
2323 (propagated-inputs
2324 `(("python-six" ,python-six)))
2325 (native-inputs
2326 `(("python-mock" ,python-mock)
2327 ("python-pbr-minimal" ,python-pbr-minimal)
2328 ("python-testtools" ,python-testtools)))
2329 (home-page "https://launchpad.net/python-fixtures")
2330 (synopsis "Python test fixture library")
2331 (description
2332 "Fixtures provides a way to create reusable state, useful when writing
2333 Python tests.")
2334 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2335
2336 (define-public python2-fixtures
2337 (package-with-python2 python-fixtures))
2338
2339 (define-public python-testrepository
2340 (package
2341 (name "python-testrepository")
2342 (version "0.0.20")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2352 (build-system python-build-system)
2353 (arguments
2354 ;; FIXME: Many tests are failing.
2355 '(#:tests? #f))
2356 (propagated-inputs
2357 `(("python-fixtures" ,python-fixtures)
2358 ("python-subunit" ,python-subunit)
2359 ("python-testtools" ,python-testtools)))
2360 (native-inputs
2361 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2362 ("python-mimeparse" ,python-mimeparse)))
2363 (home-page "https://launchpad.net/testrepository")
2364 (synopsis "Database for Python test results")
2365 (description "Testrepository provides a database of test results which can
2366 be used as part of a developer's workflow to check things such as what tests
2367 have failed since the last commit or what tests are currently failing.")
2368 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2369
2370 (define-public python2-testrepository
2371 (package-with-python2 python-testrepository))
2372
2373 (define-public python-coverage
2374 (package
2375 (name "python-coverage")
2376 (version "4.1")
2377 (source
2378 (origin
2379 (method url-fetch)
2380 (uri (pypi-uri "coverage" version))
2381 (sha256
2382 (base32
2383 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2384 (build-system python-build-system)
2385 (arguments
2386 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2387 '(#:tests? #f))
2388 (home-page "http://nedbatchelder.com/code/coverage")
2389 (synopsis "Code coverage measurement for Python")
2390 (description
2391 "Coverage measures code coverage, typically during test execution. It
2392 uses the code analysis tools and tracing hooks provided in the Python standard
2393 library to determine which lines are executable, and which have been
2394 executed.")
2395 (license license:bsd-3)))
2396
2397 (define-public python2-coverage
2398 (package-with-python2 python-coverage))
2399
2400 (define-public python-cov-core
2401 (package
2402 (name "python-cov-core")
2403 (version "1.15.0")
2404 (source
2405 (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "cov-core" version))
2408 (sha256
2409 (base32
2410 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2411 (build-system python-build-system)
2412 (propagated-inputs
2413 `(("python-coverage" ,python-coverage)))
2414 (home-page "https://github.com/schlamar/cov-core")
2415 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2416 (description
2417 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2418 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2419 testing frameworks.")
2420 (license license:expat)))
2421
2422 (define-public python2-cov-core
2423 (package-with-python2 python-cov-core))
2424
2425 (define-public python-discover
2426 (package
2427 (name "python-discover")
2428 (version "0.4.0")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (string-append
2433 "https://pypi.python.org/packages/source/d/discover/discover-"
2434 version ".tar.gz"))
2435 (sha256
2436 (base32
2437 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2438 (build-system python-build-system)
2439 (home-page "http://pypi.python.org/pypi/discover/")
2440 (synopsis
2441 "Python test discovery for unittest")
2442 (description
2443 "Discover provides test discovery for unittest, a feature that has been
2444 backported from Python 2.7 for Python 2.4+.")
2445 (license license:bsd-3)))
2446
2447 (define-public python2-discover
2448 (package-with-python2 python-discover))
2449
2450 (define-public behave
2451 (package
2452 (name "behave")
2453 (version "1.2.5")
2454 (source (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "behave" version ".tar.bz2"))
2457 (sha256
2458 (base32
2459 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2460 (build-system python-build-system)
2461 (propagated-inputs
2462 `(("python-six" ,python-six)
2463 ("python-parse" ,python-parse)
2464 ("python-parse-type" ,python-parse-type)))
2465 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2466 ;PyHamcrest>=1.8
2467 (home-page "https://github.com/behave/behave")
2468 (synopsis "Python behavior-driven development")
2469 (description
2470 "Behave is a tool for behavior-driven development in python.
2471 Behavior-driven development (or BDD) is an agile software development
2472 technique that encourages collaboration between developers, QA and
2473 non-technical or business participants in a software project. Behave uses
2474 tests written in a natural language style, backed up by Python code.")
2475 (license license:x11)))
2476
2477 (define-public python-exif-read
2478 (package
2479 (name "python-exif-read")
2480 (version "2.1.2")
2481 (source (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "ExifRead" version))
2484 (sha256
2485 (base32
2486 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2487 (build-system python-build-system)
2488 (arguments `(#:tests? #f)) ; no tests
2489 (home-page "https://github.com/ianare/exif-py")
2490 (synopsis "Python library to extract EXIF data from image files")
2491 (description
2492 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2493 files.")
2494 (license license:bsd-3)))
2495
2496 (define-public python2-exif-read
2497 (package-with-python2 python-exif-read))
2498
2499 (define-public python-pyld
2500 (package
2501 (name "python-pyld")
2502 (version "0.7.1")
2503 (source (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "PyLD" version))
2506 (sha256
2507 (base32
2508 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2509 (build-system python-build-system)
2510 (arguments `(#:tests? #f)) ; no tests
2511 (home-page "https://github.com/digitalbazaar/pyld")
2512 (synopsis "Python implementation of the JSON-LD specification")
2513 (description
2514 "PyLD is an implementation of the JSON-LD specification.")
2515 (license license:bsd-3)))
2516
2517 (define-public python2-pyld
2518 (package-with-python2 python-pyld))
2519
2520 (define-public python-certifi
2521 (package
2522 (name "python-certifi")
2523 (version "2017.1.23")
2524 (source (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "certifi" version))
2527 (sha256
2528 (base32
2529 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2530 (build-system python-build-system)
2531 (home-page "https://certifi.io/")
2532 (synopsis "Python CA certificate bundle")
2533 (description
2534 "Certifi is a Python library that contains a CA certificate bundle, which
2535 is used by the Requests library to verify HTTPS requests.")
2536 (license license:asl2.0)))
2537
2538 (define-public python2-certifi
2539 (package-with-python2 python-certifi))
2540
2541 (define-public python-click
2542 (package
2543 (name "python-click")
2544 (version "6.7")
2545 (source
2546 (origin
2547 (method url-fetch)
2548 (uri (pypi-uri "click" version))
2549 (sha256
2550 (base32
2551 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2552 (build-system python-build-system)
2553 (arguments
2554 `(#:phases
2555 (modify-phases %standard-phases
2556 (add-after 'unpack 'fix-paths
2557 (lambda* (#:key inputs #:allow-other-keys)
2558 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2559 "cross-libc" "libc"))))
2560 (substitute* "click/_unicodefun.py"
2561 (("'locale'")
2562 (string-append "'" glibc "/bin/locale'"))))
2563 #t))
2564 (replace 'check
2565 (lambda _
2566 (zero? (system* "make" "test")))))))
2567 (native-inputs
2568 `(("python-pytest" ,python-pytest)))
2569 (home-page "http://click.pocoo.org")
2570 (synopsis "Command line library for Python")
2571 (description
2572 "Click is a Python package for creating command line interfaces in a
2573 composable way with as little code as necessary. Its name stands for
2574 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2575 with sensible defaults out of the box.")
2576 (license license:bsd-3)))
2577
2578 (define-public python2-click
2579 (package-with-python2 python-click))
2580
2581 (define-public python-wheel
2582 (package
2583 (name "python-wheel")
2584 (version "0.30.0a0")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "wheel" version))
2589 (sha256
2590 (base32
2591 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2592 (build-system python-build-system)
2593 (native-inputs
2594 `(("python-jsonschema" ,python-jsonschema)
2595 ("python-pytest-cov" ,python-pytest-cov)))
2596 (home-page "https://bitbucket.org/pypa/wheel/")
2597 (synopsis "Format for built Python packages")
2598 (description
2599 "A wheel is a ZIP-format archive with a specially formatted filename and
2600 the @code{.whl} extension. It is designed to contain all the files for a PEP
2601 376 compatible install in a way that is very close to the on-disk format. Many
2602 packages will be properly installed with only the @code{Unpack} step and the
2603 unpacked archive preserves enough information to @code{Spread} (copy data and
2604 scripts to their final locations) at any later time. Wheel files can be
2605 installed with a newer @code{pip} or with wheel's own command line utility.")
2606 (license license:expat)
2607 (properties `((python2-variant . ,(delay python2-wheel))))))
2608
2609 (define-public python2-wheel
2610 (let ((wheel (package-with-python2
2611 (strip-python2-variant python-wheel))))
2612 (package (inherit wheel)
2613 (native-inputs `(("python2-functools32" ,python2-functools32)
2614 ,@(package-native-inputs wheel))))))
2615
2616
2617 (define-public python-requests
2618 (package
2619 (name "python-requests")
2620 (version "2.13.0")
2621 (source (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "requests" version))
2624 (sha256
2625 (base32
2626 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2627 ;; TODO: unbundle urllib3 and chardet.
2628 (build-system python-build-system)
2629 (arguments
2630 ;; FIXME: Some tests require network access.
2631 '(#:tests? #f))
2632 (home-page "http://python-requests.org/")
2633 (synopsis "Python HTTP library")
2634 (description
2635 "Requests is a Python HTTP client library. It aims to be easier to use
2636 than Python’s urllib2 library.")
2637 (license license:asl2.0)))
2638
2639 ;; Some software requires an older version of Requests, notably Docker
2640 ;; Compose.
2641 (define-public python-requests-2.7
2642 (package (inherit python-requests)
2643 (version "2.7.0")
2644 (source (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "requests" version))
2647 (sha256
2648 (base32
2649 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2650
2651 (define-public python2-requests
2652 (package-with-python2 python-requests))
2653
2654 (define-public python-vcversioner
2655 (package
2656 (name "python-vcversioner")
2657 (version "2.16.0.0")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "vcversioner" version))
2662 (sha256
2663 (base32
2664 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2665 (build-system python-build-system)
2666 (synopsis "Python library for version number discovery")
2667 (description "Vcversioner is a Python library that inspects tagging
2668 information in a variety of version control systems in order to discover
2669 version numbers.")
2670 (home-page "https://github.com/habnabit/vcversioner")
2671 (license license:isc)))
2672
2673 (define-public python2-vcversioner
2674 (package-with-python2 python-vcversioner))
2675
2676 (define-public python-jsonschema
2677 (package
2678 (name "python-jsonschema")
2679 (version "2.5.1")
2680 (source (origin
2681 (method url-fetch)
2682 (uri
2683 (string-append
2684 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2685 version ".tar.gz"))
2686 (sha256
2687 (base32
2688 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2689 (build-system python-build-system)
2690 (arguments
2691 '(#:phases
2692 (modify-phases %standard-phases
2693 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2694 (native-inputs
2695 `(("python-nose" ,python-nose)
2696 ("python-vcversioner" ,python-vcversioner)))
2697 (home-page "https://github.com/Julian/jsonschema")
2698 (synopsis "Implementation of JSON Schema for Python")
2699 (description
2700 "Jsonschema is an implementation of JSON Schema for Python.")
2701 (license license:expat)
2702 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2703
2704 (define-public python2-jsonschema
2705 (let ((jsonschema (package-with-python2
2706 (strip-python2-variant python-jsonschema))))
2707 (package (inherit jsonschema)
2708 (native-inputs
2709 `(("python2-mock" ,python2-mock)
2710 ,@(package-native-inputs jsonschema)))
2711 (propagated-inputs
2712 `(("python2-functools32" ,python2-functools32))))))
2713
2714 (define-public python-kitchen
2715 (package
2716 (name "python-kitchen")
2717 (version "1.2.4")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "kitchen" version))
2722 (sha256
2723 (base32
2724 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2725 (build-system python-build-system)
2726 (propagated-inputs
2727 `(("python-chardet" ,python-chardet)))
2728 (home-page "https://github.com/fedora-infra/kitchen")
2729 (synopsis "Python API for snippets")
2730 (description "@code{kitchen} module provides a python API for all sorts of
2731 little useful snippets of code that everybody ends up writing for their projects
2732 but never seem big enough to build an independent release. Use kitchen and stop
2733 cutting and pasting that code over and over.")
2734 (license (list license:lgpl2.1+
2735 ;; subprocess.py, test_subprocess.py,
2736 ;; kitchen/pycompat25/defaultdict.py:
2737 license:psfl))))
2738
2739 (define-public python2-kitchen
2740 (package-with-python2 python-kitchen))
2741
2742 (define-public python-unidecode
2743 (package
2744 (name "python-unidecode")
2745 (version "0.04.20")
2746 (source (origin
2747 (method url-fetch)
2748 (uri (pypi-uri "Unidecode" version))
2749 (sha256
2750 (base32
2751 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2752 (build-system python-build-system)
2753 (home-page "https://pypi.python.org/pypi/Unidecode")
2754 (synopsis "ASCII transliterations of Unicode text")
2755 (description
2756 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2757 useful when integrating with legacy code that doesn't support Unicode, or for
2758 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2759 machine identifiers from human-readable Unicode strings that should still be
2760 somewhat intelligeble.")
2761 (license license:gpl2+)))
2762
2763 (define-public python2-unidecode
2764 (package-with-python2 python-unidecode))
2765
2766 (define-public python-pyjwt
2767 (package
2768 (name "python-pyjwt")
2769 (version "1.4.0")
2770 (source
2771 (origin
2772 (method url-fetch)
2773 (uri (pypi-uri "PyJWT" version))
2774 (sha256
2775 (base32
2776 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2777 (build-system python-build-system)
2778 (native-inputs
2779 `(("python-pytest" ,python-pytest)
2780 ("python-pytest-cov" ,python-pytest-cov)
2781 ("python-pytest-runner" ,python-pytest-runner)))
2782 (home-page "https://github.com/progrium/pyjwt")
2783 (synopsis "JSON Web Token implementation in Python")
2784 (description
2785 "PyJWT is a JSON Web Token implementation written in Python.")
2786 (license license:expat)))
2787
2788 (define-public python2-pyjwt
2789 (package-with-python2 python-pyjwt))
2790
2791 (define-public python-pykka
2792 (package
2793 (name "python-pykka")
2794 (version "1.2.1")
2795 (source
2796 (origin
2797 (method url-fetch)
2798 (uri (pypi-uri "Pykka" version))
2799 (sha256
2800 (base32
2801 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2802 (build-system python-build-system)
2803 (native-inputs
2804 `(("python-mock" ,python-mock)
2805 ("python-nose" ,python-nose)
2806 ("python-gevent" ,python-gevent)
2807 ("python-eventlet" ,python-eventlet)))
2808 (home-page "https://www.pykka.org/")
2809 (synopsis "Pykka is a Python implementation of the actor model")
2810 (description
2811 "Pykka is a Python implementation of the actor model.
2812 The actor model introduces some simple rules to control the sharing
2813 of state and cooperation between execution units, which makes it
2814 easier to build concurrent applications.")
2815 (license license:asl2.0)))
2816
2817 (define-public python2-pykka
2818 (package-with-python2 python-pykka))
2819
2820 (define-public python-oauthlib
2821 (package
2822 (name "python-oauthlib")
2823 (version "1.0.3")
2824 (source (origin
2825 (method url-fetch)
2826 (uri (pypi-uri "oauthlib" version))
2827 (sha256
2828 (base32
2829 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2830 (build-system python-build-system)
2831 (native-inputs
2832 `(("python-nose" ,python-nose)
2833 ("python-mock" ,python-mock)
2834 ("python-cryptography" ,python-cryptography)
2835 ("python-pyjwt" ,python-pyjwt)
2836 ("python-blinker" ,python-blinker)))
2837 (home-page "https://github.com/idan/oauthlib")
2838 (synopsis "OAuth implementation for Python")
2839 (description
2840 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2841 OAuth request-signing logic.")
2842 (license license:bsd-3)
2843 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2844
2845 (define-public python2-oauthlib
2846 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2847 (package
2848 (inherit base)
2849 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2850 ,@(package-native-inputs base))))))
2851
2852 (define-public python-itsdangerous
2853 (package
2854 (name "python-itsdangerous")
2855 (version "0.24")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (string-append
2860 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2861 version ".tar.gz"))
2862 (sha256
2863 (base32
2864 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2865 (build-system python-build-system)
2866 (home-page "https://github.com/mitsuhiko/itsdangerous")
2867 (synopsis "Python library for passing data to/from untrusted environments")
2868 (description
2869 "Itsdangerous provides various helpers to pass trusted data to untrusted
2870 environments and back.")
2871 (license license:bsd-3)))
2872
2873 (define-public python2-itsdangerous
2874 (package-with-python2 python-itsdangerous))
2875
2876 (define-public python-pyyaml
2877 (package
2878 (name "python-pyyaml")
2879 (version "3.12")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri "PyYAML" version))
2884 (sha256
2885 (base32
2886 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2887 (build-system python-build-system)
2888 (inputs
2889 `(("libyaml" ,libyaml)))
2890 (home-page "http://pyyaml.org/wiki/PyYAML")
2891 (synopsis "YAML parser and emitter for Python")
2892 (description
2893 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2894 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2895 API, and sensible error messages. PyYAML supports standard YAML tags and
2896 provides Python-specific tags that allow to represent an arbitrary Python
2897 object.")
2898 (license license:expat)))
2899
2900 (define-public python2-pyyaml
2901 (package-with-python2 python-pyyaml))
2902
2903 (define-public python-virtualenv
2904 (package
2905 (name "python-virtualenv")
2906 (version "15.0.3")
2907 (source
2908 (origin
2909 (method url-fetch)
2910 (uri (pypi-uri "virtualenv" version))
2911 (sha256
2912 (base32
2913 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2914 (build-system python-build-system)
2915 (arguments
2916 `(#:phases
2917 (modify-phases %standard-phases
2918 (replace 'check
2919 (lambda _
2920 ;; Disable failing test. See upstream bug report
2921 ;; https://github.com/pypa/virtualenv/issues/957
2922 (substitute* "tests/test_virtualenv.py"
2923 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2924 (zero? (system* "py.test")))))))
2925 (native-inputs
2926 `(("python-mock" ,python-mock)
2927 ("python-pytest" ,python-pytest)))
2928 (home-page "https://virtualenv.pypa.io/")
2929 (synopsis "Virtual Python environment builder")
2930 (description
2931 "Virtualenv is a tool to create isolated Python environments.")
2932 (license license:expat)))
2933
2934 (define-public python2-virtualenv
2935 (package-with-python2 python-virtualenv))
2936
2937 (define-public python-markupsafe
2938 (package
2939 (name "python-markupsafe")
2940 (version "0.23")
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (string-append
2945 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2946 version ".tar.gz"))
2947 (sha256
2948 (base32
2949 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2950 (build-system python-build-system)
2951 (home-page "https://github.com/mitsuhiko/markupsafe")
2952 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2953 (description
2954 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2955 for Python.")
2956 (license license:bsd-3)))
2957
2958 (define-public python2-markupsafe
2959 (package-with-python2 python-markupsafe))
2960
2961 (define-public python-jinja2
2962 (package
2963 (name "python-jinja2")
2964 (version "2.8")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "Jinja2" version))
2969 (sha256
2970 (base32
2971 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2972 (build-system python-build-system)
2973 (propagated-inputs
2974 `(("python-markupsafe" ,python-markupsafe)))
2975 (home-page "http://jinja.pocoo.org/")
2976 (synopsis "Python template engine")
2977 (description
2978 "Jinja2 is a small but fast and easy to use stand-alone template engine
2979 written in pure Python.")
2980 (license license:bsd-3)))
2981
2982 (define-public python2-jinja2
2983 (package-with-python2 python-jinja2))
2984
2985 (define-public python-pystache
2986 (package
2987 (name "python-pystache")
2988 (version "0.5.4")
2989 (source (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "pystache" version))
2992 (sha256
2993 (base32
2994 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2995 (build-system python-build-system)
2996 (arguments
2997 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2998 (home-page "http://defunkt.io/pystache/")
2999 (synopsis "Python logic-less template engine")
3000 (description
3001 "Pystache is a Python implementation of the framework agnostic,
3002 logic-free templating system Mustache.")
3003 (license license:expat)
3004 (properties `((python2-variant . ,(delay python2-pystache))))))
3005
3006 (define-public python2-pystache
3007 (package (inherit (package-with-python2
3008 (strip-python2-variant python-pystache)))
3009 (arguments
3010 `(#:python ,python-2
3011 #:phases
3012 (modify-phases %standard-phases
3013 (replace 'check
3014 (lambda _
3015 (zero? (system* "python" "test_pystache.py")))))))))
3016
3017 (define-public python-joblib
3018 (package
3019 (name "python-joblib")
3020 (version "0.10.3")
3021 (source (origin
3022 (method url-fetch)
3023 (uri (pypi-uri "joblib" version))
3024 (sha256
3025 (base32
3026 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3027 (modules '((guix build utils)))
3028 (snippet
3029 '(begin
3030 ;; Remove pre-compiled .pyc files from source.
3031 (for-each delete-file-recursively
3032 (find-files "." "__pycache__" #:directories? #t))
3033 (for-each delete-file (find-files "." "\\.pyc$"))
3034 #t))))
3035 (build-system python-build-system)
3036 (arguments
3037 `(#:phases
3038 (modify-phases %standard-phases
3039 (add-before 'check 'disable-failing-tests
3040 (lambda _
3041 ;; This numpydoc tests fails for unknown reasons
3042 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3043 ;; This numpydoc test depends on matplotlib, which is not a
3044 ;; required input.
3045 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3046 ;; These tests fail to execute sys.executable
3047 (substitute* "joblib/test/test_parallel.py"
3048 (("import nose" line)
3049 (string-append "from nose.plugins.skip import SkipTest\n" line))
3050 (("def test_nested_parallel_warnings" line)
3051 (string-append "@SkipTest\n" line))
3052 (("def test_parallel_with_interactively_defined_functions" line)
3053 (string-append "@SkipTest\n" line)))
3054 #t)))))
3055 ;; Provide nose to enable tests command
3056 (native-inputs
3057 `(("python-nose" ,python-nose)
3058 ("python-sphinx" ,python-sphinx)
3059 ("python-docutils" ,python-docutils)
3060 ("python-numpydoc" ,python-numpydoc)))
3061 (home-page "http://pythonhosted.org/joblib/")
3062 (synopsis "Using Python functions as pipeline jobs")
3063 (description
3064 "Joblib is a set of tools to provide lightweight pipelining in Python.
3065 In particular, joblib offers: transparent disk-caching of the output values
3066 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3067 logging and tracing of the execution.")
3068 (license license:bsd-3)))
3069
3070 (define-public python2-joblib
3071 (package-with-python2 python-joblib))
3072
3073 (define-public python-docutils
3074 (package
3075 (name "python-docutils")
3076 (version "0.13.1")
3077 (source
3078 (origin
3079 (method url-fetch)
3080 (uri (pypi-uri "docutils" version))
3081 (sha256
3082 (base32
3083 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3084 (build-system python-build-system)
3085 (arguments
3086 '(#:tests? #f)) ; no setup.py test command
3087 (home-page "http://docutils.sourceforge.net/")
3088 (synopsis "Python Documentation Utilities")
3089 (description
3090 "Docutils is a modular system for processing documentation into useful
3091 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3092 reStructuredText.")
3093 ;; Most of the source code is public domain, but some source files are
3094 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3095 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3096
3097 (define-public python2-docutils
3098 (package-with-python2 python-docutils))
3099
3100 (define-public python-pygments
3101 (package
3102 (name "python-pygments")
3103 (version "2.1.3")
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "Pygments" version))
3108 (sha256
3109 (base32
3110 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3111 (build-system python-build-system)
3112 (arguments
3113 ;; FIXME: Tests require sphinx, which depends on this.
3114 '(#:tests? #f))
3115 (home-page "http://pygments.org/")
3116 (synopsis "Syntax highlighting")
3117 (description
3118 "Pygments is a syntax highlighting package written in Python.")
3119 (license license:bsd-2)))
3120
3121 (define-public python2-pygments
3122 (package-with-python2 python-pygments))
3123
3124 (define-public python-sphinx
3125 (package
3126 (name "python-sphinx")
3127 (version "1.5.1")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "Sphinx" version))
3132 (sha256
3133 (base32
3134 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3135 (build-system python-build-system)
3136 (arguments
3137 `(#:phases
3138 (modify-phases %standard-phases
3139 (replace 'check
3140 (lambda _
3141 ;; Requires Internet access.
3142 (delete-file "tests/test_build_linkcheck.py")
3143 (zero? (system* "make" "test")))))))
3144 (propagated-inputs
3145 `(("python-imagesize" ,python-imagesize)
3146 ("python-sphinx-alabaster-theme"
3147 ,python-sphinx-alabaster-theme)
3148 ("python-babel" ,python-babel)
3149 ("python-snowballstemmer" ,python-snowballstemmer)
3150 ("python-docutils" ,python-docutils)
3151 ("python-jinja2" ,python-jinja2)
3152 ("python-pygments" ,python-pygments)
3153 ("python-requests" ,python-requests)
3154 ("python-six" ,python-six)))
3155 (native-inputs
3156 `(("graphviz" ,graphviz)
3157 ("python-html5lib" ,python-html5lib)
3158 ("python-mock" ,python-mock)
3159 ("python-nose" ,python-nose)))
3160 (home-page "http://sphinx-doc.org/")
3161 (synopsis "Python documentation generator")
3162 (description "Sphinx is a tool that makes it easy to create documentation
3163 for Python projects or other documents consisting of multiple reStructuredText
3164 sources.")
3165 (license license:bsd-3)
3166 (properties `((python2-variant . ,(delay python2-sphinx))))))
3167
3168 (define-public python-sphinx-1.5.3
3169 (package
3170 (inherit python-sphinx)
3171 (name "python-sphinx")
3172 (version "1.5.3")
3173 (source
3174 (origin
3175 (method url-fetch)
3176 (uri (pypi-uri "Sphinx" version))
3177 (sha256
3178 (base32
3179 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3180 (native-inputs
3181 `(("python-pytest" ,python-pytest-3.0)
3182 ,@(package-native-inputs python-sphinx)))))
3183
3184 (define-public python2-sphinx
3185 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3186 (package
3187 (inherit base)
3188 (native-inputs `(("python2-mock" ,python2-mock)
3189 ("python2-enum34" ,python2-enum34)
3190 ,@(package-native-inputs base)))
3191 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3192 ,@(package-propagated-inputs base))))))
3193
3194 (define-public python-sphinx-rtd-theme
3195 (package
3196 (name "python-sphinx-rtd-theme")
3197 (version "0.2.4")
3198 (source
3199 (origin
3200 (method url-fetch)
3201 (uri (pypi-uri "sphinx_rtd_theme" version))
3202 (sha256
3203 (base32
3204 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3205 (build-system python-build-system)
3206 (arguments '(#:tests? #f)) ; No tests.
3207 (propagated-inputs
3208 `(("python-sphinx" ,python-sphinx)))
3209 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3210 (synopsis "ReadTheDocs.org theme for Sphinx")
3211 (description "A theme for Sphinx used by ReadTheDocs.org.")
3212 (license license:expat)))
3213
3214 (define-public python2-sphinx-rtd-theme
3215 (package-with-python2 python-sphinx-rtd-theme))
3216
3217 (define-public python-rst.linker
3218 (package
3219 (name "python-rst.linker")
3220 (version "1.7")
3221 (source
3222 (origin
3223 (method url-fetch)
3224 (uri (pypi-uri "rst.linker" version))
3225 (sha256
3226 (base32
3227 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3228 (build-system python-build-system)
3229 (propagated-inputs
3230 `(("python-dateutil" ,python-dateutil)
3231 ("python-six" ,python-six)))
3232 (native-inputs
3233 `(("python-setuptools-scm" ,python-setuptools-scm)))
3234 ;; Test would require path.py, which would introduce a cyclic dependence.
3235 (arguments `(#:tests? #f))
3236 ;; Note: As of version 1.7 the documentation is not worth building.
3237 (home-page "https://github.com/jaraco/rst.linker")
3238 (synopsis "Sphinx plugin to add links and timestamps")
3239 (description "rst.linker allows to automatically replace text by a
3240 reStructuredText external reference or timestamps. It's primary purpose is to
3241 augment the changelog, but it can be used for other documents, too.")
3242 (license license:expat)))
3243
3244 (define-public python2-rst.linker
3245 (package-with-python2 python-rst.linker))
3246
3247 (define-public python-feedgenerator
3248 (package
3249 (name "python-feedgenerator")
3250 (version "1.9")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (pypi-uri "feedgenerator" version))
3255 (sha256
3256 (base32
3257 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3258 (modules '((guix build utils)))
3259 (snippet
3260 '(begin
3261 ;; Remove pre-compiled .pyc files from source.
3262 (for-each delete-file-recursively
3263 (find-files "." "__pycache__" #:directories? #t))
3264 (for-each delete-file (find-files "." "\\.pyc$"))
3265 #t))))
3266 (build-system python-build-system)
3267 (propagated-inputs
3268 `(("python-pytz" ,python-pytz)
3269 ("python-six" ,python-six)))
3270 (home-page "https://github.com/getpelican/feedgenerator")
3271 (synopsis
3272 "Standalone version of Django's Atom/RSS feed generator")
3273 (description
3274 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3275 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3276 (license license:bsd-3)))
3277
3278 (define-public python2-feedgenerator
3279 (package-with-python2 python-feedgenerator))
3280
3281 (define-public python-blinker
3282 (package
3283 (name "python-blinker")
3284 (version "1.4")
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (pypi-uri "blinker" version))
3289 (sha256
3290 (base32
3291 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3292 (build-system python-build-system)
3293 (home-page "http://pythonhosted.org/blinker/")
3294 (synopsis "Fast, simple object-to-object and broadcast signaling")
3295 (description
3296 "Blinker provides a fast dispatching system that allows any number of
3297 interested parties to subscribe to events, or \"signals\".")
3298 (license license:expat)))
3299
3300 (define-public python2-blinker
3301 (package-with-python2 python-blinker))
3302
3303 (define-public pelican
3304 (package
3305 (name "pelican")
3306 (version "3.6.3")
3307 (source
3308 (origin
3309 (method url-fetch)
3310 (uri (pypi-uri "pelican" version))
3311 (sha256
3312 (base32
3313 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3314 (build-system python-build-system)
3315 (propagated-inputs
3316 `(("python-feedgenerator" ,python-feedgenerator)
3317 ("python-jinja2" ,python-jinja2)
3318 ("python-pygments" ,python-pygments)
3319 ("python-docutils" ,python-docutils)
3320 ("python-pytz" ,python-pytz)
3321 ("python-blinker" ,python-blinker)
3322 ("python-unidecode" ,python-unidecode)
3323 ("python-six" ,python-six)
3324 ("python-dateutil" ,python-dateutil)))
3325 (home-page "http://getpelican.com/")
3326 (arguments
3327 `(;; XXX Requires a lot more packages to do unit tests :P
3328 #:tests? #f
3329 #:phases (modify-phases %standard-phases
3330 (add-before
3331 'install 'adjust-requires
3332 ;; Since feedgenerator is installed from git, it doesn't
3333 ;; conform to the version requirements.
3334 ;;
3335 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3336 ;; version requirement so setuptools doesn't get confused.
3337 (lambda _
3338 (substitute* "setup.py"
3339 (("['\"]feedgenerator.*?['\"]")
3340 "'feedgenerator'")))))))
3341 (synopsis "Python-based static site publishing system")
3342 (description
3343 "Pelican is a tool to generate a static blog from reStructuredText,
3344 Markdown input files, and more. Pelican uses Jinja2 for templating
3345 and is very extensible.")
3346 (license license:agpl3+)))
3347
3348 (define-public python-scikit-learn
3349 (package
3350 (name "python-scikit-learn")
3351 (version "0.18.1")
3352 (source
3353 (origin
3354 (method url-fetch)
3355 (uri (string-append
3356 "https://github.com/scikit-learn/scikit-learn/archive/"
3357 version ".tar.gz"))
3358 (file-name (string-append name "-" version ".tar.gz"))
3359 (sha256
3360 (base32
3361 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3362 (build-system python-build-system)
3363 (arguments
3364 `(#:phases
3365 (modify-phases %standard-phases
3366 (delete 'check)
3367 (add-after 'install 'check
3368 ;; Running tests from the source directory requires
3369 ;; an "inplace" build with paths relative to CWD.
3370 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3371 ;; Use the installed version instead.
3372 (lambda* (#:key inputs outputs #:allow-other-keys)
3373 (add-installed-pythonpath inputs outputs)
3374 ;; some tests require access to "$HOME"
3375 (setenv "HOME" "/tmp")
3376 ;; Step out of the source directory just to be sure.
3377 (chdir "..")
3378 (zero? (system* "nosetests" "-v" "sklearn")))))))
3379 (inputs
3380 `(("openblas" ,openblas)))
3381 (native-inputs
3382 `(("python-nose" ,python-nose)
3383 ("python-cython" ,python-cython)))
3384 (propagated-inputs
3385 `(("python-numpy" ,python-numpy)
3386 ("python-scipy" ,python-scipy)))
3387 (home-page "http://scikit-learn.org/")
3388 (synopsis "Machine Learning in Python")
3389 (description
3390 "Scikit-learn provides simple and efficient tools for data
3391 mining and data analysis.")
3392 (license license:bsd-3)))
3393
3394 (define-public python2-scikit-learn
3395 (package-with-python2 python-scikit-learn))
3396
3397 (define-public python-scikit-image
3398 (package
3399 (name "python-scikit-image")
3400 (version "0.11.3")
3401 (source
3402 (origin
3403 (method url-fetch)
3404 (uri (string-append
3405 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3406 version ".tar.gz"))
3407 (sha256
3408 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3409 (build-system python-build-system)
3410 (arguments
3411 ;; TODO: Some tests require running X11 server. Disable them?
3412 '(#:tests? #f))
3413 ;; See DEPENDS.txt for the list of build and run time requiremnts
3414 (propagated-inputs
3415 `(("python-matplotlib" ,python-matplotlib)
3416 ("python-networkx" ,python-networkx)
3417 ("python-scipy" ,python-scipy)
3418 ("python-pillow" ,python-pillow)))
3419 (native-inputs
3420 `(("python-numpy" ,python-numpy)
3421 ("python-cython" ,python-cython)
3422 ("python-six" ,python-six)))
3423 (home-page "http://scikit-image.org/")
3424 (synopsis "Image processing in Python")
3425 (description
3426 "Scikit-image is a collection of algorithms for image processing.")
3427 (license license:bsd-3)))
3428
3429 (define-public python2-scikit-image
3430 (package-with-python2 python-scikit-image))
3431
3432 (define-public python-redis
3433 (package
3434 (name "python-redis")
3435 (version "2.10.5")
3436 (source
3437 (origin
3438 (method url-fetch)
3439 (uri (pypi-uri "redis" version))
3440 (sha256
3441 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3442 (build-system python-build-system)
3443 ;; Tests require a running Redis server
3444 (arguments '(#:tests? #f))
3445 ;; As long as we are not running test, we do not need this input :-)
3446 ;;(native-inputs
3447 ;; `(("python-pytest" ,python-pytest)))
3448 (home-page "https://github.com/andymccurdy/redis-py")
3449 (synopsis "Redis Python client")
3450 (description
3451 "This package provides a Python interface to the Redis key-value store.")
3452 (license license:expat)))
3453
3454 (define-public python2-redis
3455 (package-with-python2 python-redis))
3456
3457 (define-public python-rq
3458 (package
3459 (name "python-rq")
3460 (version "0.7.1")
3461 (source
3462 (origin
3463 (method url-fetch)
3464 (uri (pypi-uri "rq" version))
3465 (sha256
3466 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3467 (build-system python-build-system)
3468 (propagated-inputs
3469 `(("python-click" ,python-click)
3470 ("python-redis" ,python-redis)))
3471 (home-page "http://python-rq.org/")
3472 (synopsis "Simple job queues for Python")
3473 (description
3474 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3475 processing them in the background with workers. It is backed by Redis and it
3476 is designed to have a low barrier to entry.")
3477 (license license:bsd-2)))
3478
3479 (define-public python2-rq
3480 (package-with-python2 python-rq))
3481
3482 (define-public python-cython
3483 (package
3484 (name "python-cython")
3485 (version "0.25.2")
3486 (source
3487 (origin
3488 (method url-fetch)
3489 (uri (pypi-uri "Cython" version))
3490 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3491 (sha256
3492 (base32
3493 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3494 (build-system python-build-system)
3495 ;; we need the full python package and not just the python-wrapper
3496 ;; because we need libpython3.3m.so
3497 (inputs
3498 `(("python" ,python)))
3499 (arguments
3500 `(#:phases
3501 (modify-phases %standard-phases
3502 (add-before 'check 'set-HOME
3503 ;; some tests require access to "$HOME/.cython"
3504 (lambda _ (setenv "HOME" "/tmp")))
3505 (replace 'check
3506 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3507 (home-page "http://cython.org/")
3508 (synopsis "C extensions for Python")
3509 (description "Cython is an optimising static compiler for both the Python
3510 programming language and the extended Cython programming language. It makes
3511 writing C extensions for Python as easy as Python itself.")
3512 (license license:asl2.0)
3513 (properties `((python2-variant . ,(delay python2-cython))))))
3514
3515 (define-public python2-cython
3516 (package (inherit (package-with-python2
3517 (strip-python2-variant python-cython)))
3518 (name "python2-cython")
3519 (inputs
3520 `(("python-2" ,python-2))))) ; this is not automatically changed
3521
3522 ;; The RPython toolchain currently does not support Python 3.
3523 (define-public python2-rpython
3524 (package
3525 (name "python2-rpython")
3526 (version "0.1.4")
3527 (source
3528 (origin
3529 (method url-fetch)
3530 (uri (pypi-uri "rpython" version))
3531 (sha256
3532 (base32
3533 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3534 (build-system python-build-system)
3535 (arguments `(#:python ,python-2))
3536 (native-inputs
3537 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3538 (home-page "https://rpython.readthedocs.org")
3539 (synopsis "Framework for implementing interpreters and virtual machines")
3540 (description "RPython is a translation and support framework for
3541 producing implementations of dynamic languages, emphasizing a clean separation
3542 between language specification and implementation aspects.")
3543 (license license:expat)))
3544
3545 (define-public python-numpy
3546 (package
3547 (name "python-numpy")
3548 (version "1.12.0")
3549 (source
3550 (origin
3551 (method url-fetch)
3552 (uri (string-append
3553 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3554 (file-name (string-append name "-" version ".tar.gz"))
3555 (sha256
3556 (base32
3557 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3558 (build-system python-build-system)
3559 (inputs
3560 `(("openblas" ,openblas)
3561 ("lapack" ,lapack)))
3562 (native-inputs
3563 `(("python-cython" ,python-cython)
3564 ("python-nose" ,python-nose)
3565 ("gfortran" ,gfortran)))
3566 (arguments
3567 `(#:phases
3568 (modify-phases %standard-phases
3569 (add-before 'build 'set-environment-variables
3570 (lambda* (#:key inputs #:allow-other-keys)
3571 (call-with-output-file "site.cfg"
3572 (lambda (port)
3573 (format port
3574 "[openblas]
3575 libraries = openblas
3576 library_dirs = ~a/lib
3577 include_dirs = ~a/include
3578
3579 # backslash-n to make emacs happy
3580 \n[lapack]
3581 lapack_libs = lapack
3582 library_dirs = ~a/lib
3583 include_dirs = ~a/include
3584 "
3585 (assoc-ref inputs "openblas")
3586 (assoc-ref inputs "openblas")
3587 (assoc-ref inputs "lapack")
3588 (assoc-ref inputs "lapack"))))
3589 ;; Use "gcc" executable, not "cc".
3590 (substitute* "numpy/distutils/system_info.py"
3591 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3592 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3593 #t))
3594 ;; Tests can only be run after the library has been installed and not
3595 ;; within the source directory.
3596 (delete 'check)
3597 (add-after 'install 'check
3598 (lambda* (#:key outputs inputs #:allow-other-keys)
3599 ;; Make installed package available for running the tests
3600 (add-installed-pythonpath inputs outputs)
3601 (with-directory-excursion "/tmp"
3602 (zero? (system* "python" "-c"
3603 "import numpy; numpy.test(verbose=2)"))))))))
3604 (home-page "http://www.numpy.org/")
3605 (synopsis "Fundamental package for scientific computing with Python")
3606 (description "NumPy is the fundamental package for scientific computing
3607 with Python. It contains among other things: a powerful N-dimensional array
3608 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3609 and Fortran code, useful linear algebra, Fourier transform, and random number
3610 capabilities.")
3611 (license license:bsd-3)))
3612
3613 (define-public python2-numpy
3614 (package-with-python2 python-numpy))
3615
3616 (define-public python-munch
3617 (package
3618 (name "python-munch")
3619 (version "2.0.4")
3620 (source
3621 (origin
3622 (method url-fetch)
3623 (uri (pypi-uri "munch" version))
3624 (sha256
3625 (base32
3626 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3627 (build-system python-build-system)
3628 (home-page "https://github.com/Infinidat/munch")
3629 (synopsis "Dot-accessible dictionary")
3630 (description "Munch is a dot-accessible dictionary similar to JavaScript
3631 objects.")
3632 (license license:expat)))
3633
3634 (define-public python2-munch
3635 (package-with-python2 python-munch))
3636
3637 (define-public python2-fastlmm
3638 (package
3639 (name "python2-fastlmm")
3640 (version "0.2.21")
3641 (source
3642 (origin
3643 (method url-fetch)
3644 (uri (pypi-uri "fastlmm" version ".zip"))
3645 (sha256
3646 (base32
3647 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3648 (build-system python-build-system)
3649 (arguments
3650 `(#:python ,python-2)) ; only Python 2.7 is supported
3651 (propagated-inputs
3652 `(("python2-numpy" ,python2-numpy)
3653 ("python2-scipy" ,python2-scipy)
3654 ("python2-matplotlib" ,python2-matplotlib)
3655 ("python2-pandas" ,python2-pandas)
3656 ("python2-scikit-learn" ,python2-scikit-learn)
3657 ("python2-pysnptools" ,python2-pysnptools)))
3658 (native-inputs
3659 `(("unzip" ,unzip)
3660 ("python2-cython" ,python2-cython)
3661 ("python2-mock" ,python2-mock)
3662 ("python2-nose" ,python2-nose)))
3663 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3664 (synopsis "Perform genome-wide association studies on large data sets")
3665 (description
3666 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3667 Models, is a program for performing both single-SNP and SNP-set genome-wide
3668 association studies (GWAS) on extremely large data sets.")
3669 (license license:asl2.0)))
3670
3671 (define-public python-numpy-documentation
3672 (package
3673 (name "python-numpy-documentation")
3674 (version (package-version python-numpy))
3675 (source (package-source python-numpy))
3676 (build-system python-build-system)
3677 (native-inputs
3678 `(("python-matplotlib" ,python-matplotlib)
3679 ("python-numpy" ,python-numpy)
3680 ("pkg-config" ,pkg-config)
3681 ("python-sphinx" ,python-sphinx)
3682 ("python-numpydoc" ,python-numpydoc)
3683 ("texlive" ,texlive)
3684 ("texinfo" ,texinfo)
3685 ("perl" ,perl)
3686 ("scipy-sphinx-theme"
3687 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3688 (method git-fetch)
3689 (uri (git-reference
3690 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3691 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3692 (sha256
3693 (base32
3694 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3695 ,@(package-native-inputs python-numpy)))
3696 (arguments
3697 `(#:tests? #f ; we're only generating the documentation
3698 #:phases
3699 (modify-phases %standard-phases
3700 (delete 'build)
3701 (replace 'install
3702 (lambda* (#:key inputs outputs #:allow-other-keys)
3703 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3704 (doc (string-append
3705 data "/doc/" ,name "-"
3706 ,(package-version python-numpy)))
3707 (info-reader (string-append data "/info"))
3708 (html (string-append doc "/html"))
3709 (scipy-sphinx-theme "scipy-sphinx-theme")
3710 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3711 (pyver ,(string-append "PYVER=")))
3712 (with-directory-excursion "doc"
3713 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3714 (mkdir-p html)
3715 (system* "make" "html" pyver)
3716 (system* "make" "latex" "PAPER=a4" pyver)
3717 (system* "make" "-C" "build/latex"
3718 "all-pdf" "PAPER=a4" pyver)
3719 ;; FIXME: Generation of the info file fails.
3720 ;; (system* "make" "info" pyver)
3721 ;; (mkdir-p info)
3722 ;; (copy-file "build/texinfo/numpy.info"
3723 ;; (string-append info "/numpy.info"))
3724 (for-each (lambda (file)
3725 (copy-file (string-append "build/latex" file)
3726 (string-append doc file)))
3727 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3728 (with-directory-excursion "build/html"
3729 (for-each (lambda (file)
3730 (let* ((dir (dirname file))
3731 (tgt-dir (string-append html "/" dir)))
3732 (unless (equal? "." dir)
3733 (mkdir-p tgt-dir))
3734 (install-file file html)))
3735 (find-files "." ".*")))))
3736 #t)))))
3737 (home-page (package-home-page python-numpy))
3738 (synopsis "Documentation for the python-numpy package")
3739 (description (package-description python-numpy))
3740 (license (package-license python-numpy))))
3741
3742 (define-public python2-numpy-documentation
3743 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3744 (package
3745 (inherit numpy-documentation)
3746 (native-inputs `(("python2-functools32" ,python2-functools32)
3747 ,@(package-native-inputs numpy-documentation))))))
3748
3749 (define-public python-pygit2
3750 (package
3751 (name "python-pygit2")
3752 (version "0.25.0")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (pypi-uri "pygit2" version))
3757 (sha256
3758 (base32
3759 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3760 (patches
3761 (search-patches "python-pygit2-disable-network-tests.patch"))))
3762 (build-system python-build-system)
3763 (propagated-inputs
3764 `(("python-six" ,python-six)
3765 ("python-cffi" ,python-cffi)
3766 ("libgit2" ,libgit2)
3767 ("python-tox" ,python-tox)))
3768 (home-page "https://github.com/libgit2/pygit2")
3769 (synopsis "Python bindings for libgit2")
3770 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3771 library, libgit2 implements Git plumbing.")
3772 ;; GPL2.0 only, with linking exception.
3773 (license license:gpl2)))
3774
3775 (define-public python2-pygit2
3776 (package-with-python2 python-pygit2))
3777
3778 (define-public python-pyparsing
3779 (package
3780 (name "python-pyparsing")
3781 (version "2.0.3")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3786 "/pyparsing-" version
3787 "/pyparsing-" version ".tar.gz"))
3788 (sha256
3789 (base32
3790 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3791 (build-system python-build-system)
3792 (outputs '("out" "doc"))
3793 (arguments
3794 `(#:tests? #f ; no test target
3795 #:modules ((guix build python-build-system)
3796 (guix build utils))
3797 #:phases
3798 (alist-cons-after
3799 'install 'install-doc
3800 (lambda* (#:key outputs #:allow-other-keys)
3801 (let* ((doc (string-append (assoc-ref outputs "doc")
3802 "/share/doc/" ,name "-" ,version))
3803 (html-doc (string-append doc "/html"))
3804 (examples (string-append doc "/examples")))
3805 (mkdir-p html-doc)
3806 (mkdir-p examples)
3807 (for-each
3808 (lambda (dir tgt)
3809 (map (lambda (file)
3810 (install-file file tgt))
3811 (find-files dir ".*")))
3812 (list "docs" "htmldoc" "examples")
3813 (list doc html-doc examples))))
3814 %standard-phases)))
3815 (home-page "http://pyparsing.wikispaces.com")
3816 (synopsis "Python parsing class library")
3817 (description
3818 "The pyparsing module is an alternative approach to creating and
3819 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3820 of regular expressions. The pyparsing module provides a library of classes
3821 that client code uses to construct the grammar directly in Python code.")
3822 (license license:expat)))
3823
3824 (define-public python2-pyparsing
3825 (package-with-python2 python-pyparsing))
3826
3827 (define-public python-numpydoc
3828 (package
3829 (name "python-numpydoc")
3830 (version "0.5")
3831 (source
3832 (origin
3833 (method url-fetch)
3834 (uri (string-append
3835 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3836 version ".tar.gz"))
3837 (sha256
3838 (base32
3839 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3840 (modules '((guix build utils)))
3841 (snippet
3842 '(begin
3843 ;; Drop a test requiring matplotlib, which we cannot add as an
3844 ;; input since it would create a circular dependency: Extend the
3845 ;; test for Python 3, where it is already dropped, to Python 2.
3846 (substitute* "numpydoc/tests/test_plot_directive.py"
3847 (("3") "2"))))))
3848 (build-system python-build-system)
3849 (propagated-inputs
3850 `(("python-sphinx" ,python-sphinx)))
3851 (native-inputs
3852 `(("python-nose" ,python-nose)))
3853 (home-page "https://pypi.python.org/pypi/numpydoc")
3854 (synopsis
3855 "Numpy's Sphinx extensions")
3856 (description
3857 "Sphinx extension to support docstrings in Numpy format.")
3858 (license license:bsd-2)))
3859
3860 (define-public python2-numpydoc
3861 (package-with-python2 python-numpydoc))
3862
3863 (define-public python-numexpr
3864 (package
3865 (name "python-numexpr")
3866 (version "2.6.1")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "numexpr" version))
3871 (sha256
3872 (base32
3873 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3874 (build-system python-build-system)
3875 (arguments `(#:tests? #f)) ; no tests included
3876 (propagated-inputs
3877 `(("python-numpy" ,python-numpy)))
3878 (home-page "https://github.com/pydata/numexpr")
3879 (synopsis "Fast numerical expression evaluator for NumPy")
3880 (description
3881 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3882 expressions that operate on arrays are accelerated and use less memory than
3883 doing the same calculation in Python. In addition, its multi-threaded
3884 capabilities can make use of all your cores, which may accelerate
3885 computations, most specially if they are not memory-bounded (e.g. those using
3886 transcendental functions).")
3887 (license license:expat)))
3888
3889 (define-public python2-numexpr
3890 (package-with-python2 python-numexpr))
3891
3892 (define-public python-cycler
3893 (package
3894 (name "python-cycler")
3895 (version "0.10.0")
3896 (source (origin
3897 (method url-fetch)
3898 (uri (pypi-uri "cycler" version))
3899 (sha256
3900 (base32
3901 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3902 (build-system python-build-system)
3903 (arguments
3904 ;; XXX: The current version requires 'coveralls' which we don't have.
3905 ;; Enable this for the next release which uses 'python-pytest'.
3906 '(#:tests? #f))
3907 (propagated-inputs
3908 `(("python-six" ,python-six)))
3909 (home-page "http://matplotlib.org/cycler/")
3910 (synopsis "Composable keyword argument iterator")
3911 (description
3912 "When using @code{matplotlib} and plotting more than one line, it is
3913 common to want to be able to want to be able to cycle over one or more artist
3914 styles; but the plotting logic can quickly become involved.
3915 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3916 @code{Cycler} class was developed.")
3917 (license license:bsd-3)))
3918
3919 (define-public python2-cycler
3920 (package-with-python2 python-cycler))
3921
3922 (define-public python-colorspacious
3923 (package
3924 (name "python-colorspacious")
3925 (version "1.1.0")
3926 (source
3927 (origin
3928 (method url-fetch)
3929 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3930 version ".tar.gz"))
3931 (file-name (string-append name "-" version))
3932 (sha256
3933 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3934 (build-system python-build-system)
3935 (propagated-inputs
3936 `(("python-numpy" ,python-numpy)))
3937 (native-inputs
3938 `(("python-nose" ,python-nose)))
3939 (arguments
3940 `(#:phases
3941 (modify-phases %standard-phases
3942 (replace 'check
3943 (lambda _
3944 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3945 (home-page "https://github.com/njsmith/colorspacious")
3946 (synopsis "Python library for colorspace conversions")
3947 (description "@code{colorspacious} is a Python library that lets you
3948 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3949 (license license:expat)))
3950
3951 (define-public python2-colorspacious
3952 (package-with-python2 python-colorspacious))
3953
3954 (define-public python-matplotlib
3955 (package
3956 (name "python-matplotlib")
3957 (version "2.0.0")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 (uri (string-append
3962 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3963 (file-name (string-append name "-" version ".tar.gz"))
3964 (sha256
3965 (base32
3966 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3967 (build-system python-build-system)
3968 (propagated-inputs ; the following packages are all needed at run time
3969 `(("python-cycler" ,python-cycler)
3970 ("python-pyparsing" ,python-pyparsing)
3971 ("python-pygobject" ,python-pygobject)
3972 ("gobject-introspection" ,gobject-introspection)
3973 ("python-tkinter" ,python "tk")
3974 ("python-dateutil" ,python-dateutil)
3975 ("python-numpy" ,python-numpy)
3976 ("python-pillow" ,python-pillow)
3977 ("python-pytz" ,python-pytz)
3978 ("python-six" ,python-six)
3979 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3980 ;; from 'gtk+') provides the required 'typelib' files used by
3981 ;; 'gobject-introspection'. The location of these files is set with the
3982 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3983 ;; is done automatically by a 'native-search-path' procedure. However,
3984 ;; at run-time the user must set this variable as follows:
3985 ;;
3986 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3987 ("gtk+" ,gtk+)
3988 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3989 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3990 ;; object. For this reason we need to import both libraries.
3991 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3992 ("python-pycairo" ,python-pycairo)
3993 ("python-cairocffi" ,python-cairocffi)))
3994 (inputs
3995 `(("libpng" ,libpng)
3996 ("imagemagick" ,imagemagick)
3997 ("freetype" ,freetype)
3998 ("cairo" ,cairo)
3999 ("glib" ,glib)
4000 ;; FIXME: Add backends when available.
4001 ;("python-wxpython" ,python-wxpython)
4002 ("python-pyqt" ,python-pyqt)
4003 ("tcl" ,tcl)
4004 ("tk" ,tk)))
4005 (native-inputs
4006 `(("pkg-config" ,pkg-config)
4007 ("python-nose" ,python-nose)
4008 ("python-mock" ,python-mock)))
4009 (arguments
4010 `(#:phases
4011 (modify-phases %standard-phases
4012 (add-before 'build 'configure-environment
4013 (lambda* (#:key outputs inputs #:allow-other-keys)
4014 (let ((cairo (assoc-ref inputs "cairo"))
4015 (gtk+ (assoc-ref inputs "gtk+")))
4016 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4017 ;; has not effect.
4018 (setenv "LD_LIBRARY_PATH"
4019 (string-append cairo "/lib:" gtk+ "/lib"))
4020 (setenv "HOME" (getcwd))
4021 (call-with-output-file "setup.cfg"
4022 (lambda (port)
4023 (format port "[directories]~%
4024 basedirlist = ~a,~a~%
4025 [rc_options]~%
4026 backend = TkAgg~%"
4027 (assoc-ref inputs "tcl")
4028 (assoc-ref inputs "tk")))))
4029 #t)))))
4030 (home-page "http://matplotlib.org")
4031 (synopsis "2D plotting library for Python")
4032 (description
4033 "Matplotlib is a Python 2D plotting library which produces publication
4034 quality figures in a variety of hardcopy formats and interactive environments
4035 across platforms. Matplotlib can be used in Python scripts, the python and
4036 ipython shell, web application servers, and six graphical user interface
4037 toolkits.")
4038 (license license:psfl)
4039 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4040
4041 (define-public python2-matplotlib
4042 (let ((matplotlib (package-with-python2
4043 (strip-python2-variant python-matplotlib))))
4044 (package (inherit matplotlib)
4045 ;; Make sure to use special packages for Python 2 instead
4046 ;; of those automatically rewritten by package-with-python2.
4047 (propagated-inputs
4048 `(("python2-pycairo" ,python2-pycairo)
4049 ("python2-functools32" ,python2-functools32)
4050 ("python2-pygobject-2" ,python2-pygobject-2)
4051 ("python2-subprocess32" ,python2-subprocess32)
4052 ("python2-tkinter" ,python-2 "tk")
4053 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4054 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4055
4056 (define-public python-matplotlib-documentation
4057 (package
4058 (name "python-matplotlib-documentation")
4059 (version (package-version python-matplotlib))
4060 (source (package-source python-matplotlib))
4061 (build-system python-build-system)
4062 (native-inputs
4063 `(("python-matplotlib" ,python-matplotlib)
4064 ("python-colorspacious" ,python-colorspacious)
4065 ("python-sphinx" ,python-sphinx)
4066 ("python-numpydoc" ,python-numpydoc)
4067 ("python-ipython" ,python-ipython)
4068 ("python-mock" ,python-mock)
4069 ("graphviz" ,graphviz)
4070 ("texlive" ,texlive)
4071 ("texinfo" ,texinfo)
4072 ,@(package-native-inputs python-matplotlib)))
4073 (arguments
4074 `(#:tests? #f ; we're only generating documentation
4075 #:phases
4076 (modify-phases %standard-phases
4077 (replace 'build
4078 (lambda _
4079 (chdir "doc")
4080 ;; Produce pdf in 'A4' format.
4081 (substitute* "conf.py"
4082 (("latex_paper_size = 'letter'") "")
4083 ;; latex_paper_size is deprecated -> set paper size using
4084 ;; latex_elements
4085 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4086 ;; insert at a point where latex_elements{} is defined:
4087 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4088 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4089 (replace 'install
4090 (lambda* (#:key inputs outputs #:allow-other-keys)
4091 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4092 (doc (string-append data "/doc/python-matplotlib-" ,version))
4093 (info (string-append data "/info"))
4094 (html (string-append doc "/html")))
4095 (mkdir-p html)
4096 (mkdir-p info)
4097 (copy-recursively "build/html" html)
4098 (symlink (string-append html "/_images")
4099 (string-append info "/matplotlib-figures"))
4100 (with-directory-excursion "build/texinfo"
4101 (substitute* "matplotlib.texi"
4102 (("@image\\{([^,]*)" all file)
4103 (string-append "@image{matplotlib-figures/" file)))
4104 (symlink (string-append html "/_images")
4105 "./matplotlib-figures")
4106 (system* "makeinfo" "--no-split"
4107 "-o" "matplotlib.info" "matplotlib.texi"))
4108 (copy-file "build/texinfo/matplotlib.info"
4109 (string-append info "/matplotlib.info"))
4110 (copy-file "build/latex/Matplotlib.pdf"
4111 (string-append doc "/Matplotlib.pdf")))
4112 #t)))))
4113 (home-page (package-home-page python-matplotlib))
4114 (synopsis "Documentation for the python-matplotlib package")
4115 (description (package-description python-matplotlib))
4116 (license (package-license python-matplotlib))))
4117
4118 (define-public python2-matplotlib-documentation
4119 (package-with-python2 python-matplotlib-documentation))
4120
4121 (define-public python2-pysnptools
4122 (package
4123 (name "python2-pysnptools")
4124 (version "0.3.9")
4125 (source
4126 (origin
4127 (method url-fetch)
4128 (uri (pypi-uri "pysnptools" version ".zip"))
4129 (sha256
4130 (base32
4131 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4132 (build-system python-build-system)
4133 (arguments
4134 `(#:python ,python-2)) ; only Python 2.7 is supported
4135 (propagated-inputs
4136 `(("python2-numpy" ,python2-numpy)
4137 ("python2-scipy" ,python2-scipy)
4138 ("python2-pandas" ,python2-pandas)))
4139 (native-inputs
4140 `(("python2-cython" ,python2-cython)))
4141 (native-inputs
4142 `(("unzip" ,unzip)))
4143 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4144 (synopsis "Library for reading and manipulating genetic data")
4145 (description
4146 "PySnpTools is a library for reading and manipulating genetic data. It
4147 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4148 those files. It can also efficiently manipulate ranges of integers using set
4149 operators such as union, intersection, and difference.")
4150 (license license:asl2.0)))
4151
4152 (define-public python-rpy2
4153 (package
4154 (name "python-rpy2")
4155 (version "2.7.6")
4156 (source
4157 (origin
4158 (method url-fetch)
4159 (uri (pypi-uri "rpy2" version))
4160 (sha256
4161 (base32
4162 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4163 (build-system python-build-system)
4164 (arguments
4165 '(#:phases
4166 (modify-phases %standard-phases
4167 (delete 'check)
4168 (add-after 'install 'check
4169 (lambda* (#:key outputs inputs #:allow-other-keys)
4170 ;; It's easier to run tests after install.
4171 ;; Make installed package available for running the tests
4172 (add-installed-pythonpath inputs outputs)
4173 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4174 (propagated-inputs
4175 `(("python-six" ,python-six)))
4176 (inputs
4177 `(("readline" ,readline)
4178 ("icu4c" ,icu4c)
4179 ("pcre" ,pcre)
4180 ("r-minimal" ,r-minimal)
4181 ("r-survival" ,r-survival)))
4182 (native-inputs
4183 `(("zlib" ,zlib)))
4184 (home-page "http://rpy.sourceforge.net/")
4185 (synopsis "Python interface to the R language")
4186 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4187 low-level interface to R from Python, a proposed high-level interface,
4188 including wrappers to graphical libraries, as well as R-like structures and
4189 functions.")
4190 (license license:gpl3+)))
4191
4192 (define-public python2-rpy2
4193 (let ((rpy2 (package-with-python2 python-rpy2)))
4194 (package (inherit rpy2)
4195 (propagated-inputs
4196 `(("python2-singledispatch" ,python2-singledispatch)
4197 ,@(package-propagated-inputs rpy2))))))
4198
4199 (define-public python-scipy
4200 (package
4201 (name "python-scipy")
4202 (version "0.18.1")
4203 (source
4204 (origin
4205 (method url-fetch)
4206 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4207 version ".tar.gz"))
4208 (file-name (string-append name "-" version ".tar.gz"))
4209 (sha256
4210 (base32
4211 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4212 (build-system python-build-system)
4213 (propagated-inputs
4214 `(("python-numpy" ,python-numpy)
4215 ("python-matplotlib" ,python-matplotlib)
4216 ("python-pyparsing" ,python-pyparsing)))
4217 (inputs
4218 `(("lapack" ,lapack)
4219 ("openblas" ,openblas)))
4220 (native-inputs
4221 `(("python-cython" ,python-cython)
4222 ("python-nose" ,python-nose)
4223 ("python-sphinx" ,python-sphinx)
4224 ("python-numpydoc" ,python-numpydoc)
4225 ("gfortran" ,gfortran)
4226 ("perl" ,perl)))
4227 (outputs '("out" "doc"))
4228 (arguments
4229 `(#:phases
4230 (modify-phases %standard-phases
4231 (add-before 'build 'configure-openblas
4232 (lambda* (#:key inputs #:allow-other-keys)
4233 (call-with-output-file "site.cfg"
4234 (lambda (port)
4235 (format port
4236 "[blas]
4237 libraries = openblas
4238 library_dirs = ~a/lib
4239 include_dirs = ~a/include
4240
4241 # backslash-n to make emacs happy
4242 \n[atlas]
4243 library_dirs = ~a/lib
4244 atlas_libs = openblas
4245 "
4246 (assoc-ref inputs "openblas")
4247 (assoc-ref inputs "openblas")
4248 (assoc-ref inputs "openblas"))))
4249 #t))
4250 (add-after 'install 'install-doc
4251 (lambda* (#:key inputs outputs #:allow-other-keys)
4252 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4253 (doc (string-append data "/doc/" ,name "-" ,version))
4254 (html (string-append doc "/html"))
4255 (pyver ,(string-append "PYVER=")))
4256 ;; Make installed package available for building the
4257 ;; documentation
4258 (add-installed-pythonpath inputs outputs)
4259 (with-directory-excursion "doc"
4260 ;; Fix generation of images for mathematical expressions.
4261 (substitute* (find-files "source" "conf\\.py")
4262 (("pngmath_use_preview = True")
4263 "pngmath_use_preview = False"))
4264 (mkdir-p html)
4265 (system* "make" "html" pyver)
4266 (with-directory-excursion "build/html"
4267 (for-each (lambda (file)
4268 (let* ((dir (dirname file))
4269 (tgt-dir (string-append html "/" dir)))
4270 (install-file file html)))
4271 (find-files "." ".*")))))
4272 #t))
4273 (add-after 'unpack 'fix-tests
4274 (lambda _
4275 (substitute* "scipy/integrate/tests/test_quadpack.py"
4276 (("libm.so") "libm.so.6"))
4277 #t))
4278 ;; Tests can only be run after the library has been installed and not
4279 ;; within the source directory.
4280 (delete 'check)
4281 (add-after 'install 'check
4282 (lambda* (#:key inputs outputs #:allow-other-keys)
4283 (add-installed-pythonpath inputs outputs)
4284 (with-directory-excursion "/tmp"
4285 (zero? (system* "python" "-c"
4286 "import scipy; scipy.test('full')")))
4287 #t)))))
4288 (home-page "http://www.scipy.org/")
4289 (synopsis "The Scipy library provides efficient numerical routines")
4290 (description "The SciPy library is one of the core packages that make up
4291 the SciPy stack. It provides many user-friendly and efficient numerical
4292 routines such as routines for numerical integration and optimization.")
4293 (properties `((python2-variant . ,(delay python2-scipy))))
4294 (license license:bsd-3)))
4295
4296 (define-public python2-scipy
4297 (package-with-python2
4298 (strip-python2-variant python-scipy)))
4299
4300 (define-public python-sockjs-tornado
4301 (package
4302 (name "python-sockjs-tornado")
4303 (version "1.0.3")
4304 (source
4305 (origin
4306 (method url-fetch)
4307 (uri (pypi-uri "sockjs-tornado" version))
4308 (sha256
4309 (base32
4310 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4311 (build-system python-build-system)
4312 (arguments
4313 `(;; There are no tests, and running the test phase requires missing
4314 ;; dependencies
4315 #:tests? #f))
4316 (propagated-inputs
4317 `(("python-tornado" ,python-tornado)))
4318 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4319 (synopsis
4320 "SockJS python server implementation on top of Tornado framework")
4321 (description
4322 "SockJS-tornado provides the server side counterpart to a SockJS client
4323 library, through the Tornado framework.
4324
4325 SockJS provides a low latency, full duplex, cross-domain communication channel
4326 between a web browser and web server.")
4327 (license license:expat)))
4328
4329 (define-public python2-sockjs-tornado
4330 (package-with-python2 python-sockjs-tornado))
4331
4332 (define-public python-socksipy-branch
4333 (package
4334 (name "python-socksipy-branch")
4335 (version "1.01")
4336 (source
4337 (origin
4338 (method url-fetch)
4339 (uri (pypi-uri "SocksiPy-branch" version))
4340 (sha256
4341 (base32
4342 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4343 (build-system python-build-system)
4344 (arguments
4345 `(#:tests? #f)) ; There are no tests
4346 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4347 (synopsis "Python SOCKS module")
4348 (description
4349 "SocksiPy - A Python SOCKS client module. It provides a
4350 socket-like interface that supports connections to any TCP
4351 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4352 The original version was developed by Dan Haim, this is a
4353 branch created by Mario Vilas to address some open issues,
4354 as the original project seems to have been abandoned circa 2007.")
4355 (license license:bsd-3)))
4356
4357 (define-public python2-socksipy-branch
4358 (package-with-python2 python-socksipy-branch))
4359
4360 (define-public python-sqlalchemy
4361 (package
4362 (name "python-sqlalchemy")
4363 (version "1.0.12")
4364 (source
4365 (origin
4366 (method url-fetch)
4367 (uri (string-append "https://pypi.python.org/packages/source/S/"
4368 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4369 (sha256
4370 (base32
4371 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4372 (build-system python-build-system)
4373 (native-inputs
4374 `(("python-cython" ,python-cython) ;for c extensions
4375 ("python-pytest" ,python-pytest)
4376 ("python-mock" ,python-mock))) ;for tests
4377 (arguments
4378 `(#:phases (alist-replace
4379 'check
4380 (lambda _ (zero? (system* "py.test")))
4381 %standard-phases)))
4382 (home-page "http://www.sqlalchemy.org")
4383 (synopsis "Database abstraction library")
4384 (description
4385 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4386 gives application developers the full power and flexibility of SQL. It
4387 provides a full suite of well known enterprise-level persistence patterns,
4388 designed for efficient and high-performing database access, adapted into a
4389 simple and Pythonic domain language.")
4390 (license license:x11)))
4391
4392 (define-public python2-sqlalchemy
4393 (package-with-python2 python-sqlalchemy))
4394
4395 (define-public python-pycodestyle
4396 (package
4397 (name "python-pycodestyle")
4398 (version "2.3.1")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (pypi-uri "pycodestyle" version))
4403 (sha256
4404 (base32
4405 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4406 (build-system python-build-system)
4407 (home-page "https://pycodestyle.readthedocs.io/")
4408 (synopsis "Python style guide checker")
4409 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4410 Python code against some of the style conventions in
4411 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4412 (license license:expat)))
4413
4414 (define-public python2-pycodestyle
4415 (package-with-python2 python-pycodestyle))
4416
4417 (define-public python-orderedmultidict
4418 (package
4419 (name "python-orderedmultidict")
4420 (version "0.7.11")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "orderedmultidict" version))
4425 (sha256
4426 (base32
4427 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4428 (build-system python-build-system)
4429 (arguments
4430 `(#:phases
4431 (modify-phases %standard-phases
4432 (add-after 'unpack 'fix-tests
4433 (lambda _
4434 ;; The package uses nosetest for running the tests.
4435 ;; Adding this initfile allows to run the test suite
4436 ;; without requiring nosetest.
4437 (zero? (system* "touch" "tests/__init__.py")))))))
4438 (propagated-inputs
4439 `(("python-six" ,python-six)))
4440 (native-inputs
4441 `(("python-pycodestyle" ,python-pycodestyle)))
4442 (home-page "https://github.com/gruns/orderedmultidict")
4443 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4444 (description "This package contains a library for ordered multivalue
4445 dictionaries. A multivalue dictionary is a dictionary that can store
4446 multiple values for the same key. An ordered multivalue dictionary is a
4447 multivalue dictionary that retains the order of insertions and deletions.")
4448 (license license:unlicense)))
4449
4450 (define-public python2-orderedmultidict
4451 (package-with-python2 python-orderedmultidict))
4452
4453 (define-public python-furl
4454 (package
4455 (name "python-furl")
4456 (version "0.5.6")
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (pypi-uri "furl" version))
4461 (sha256
4462 (base32
4463 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4464 (build-system python-build-system)
4465 (propagated-inputs
4466 `(("python-six" ,python-six)
4467 ("python-orderedmultidict" ,python-orderedmultidict)))
4468 (native-inputs
4469 `(("python-pycodestyle" ,python-pycodestyle)))
4470 (home-page "https://github.com/gruns/furl")
4471 (synopsis "URL manipulation in Python")
4472 (description "Furl provides an easy-to-use alternative to the
4473 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4474 (license license:unlicense)))
4475
4476 (define-public python2-furl
4477 (package-with-python2 python-furl))
4478
4479 (define-public python-flask-babel
4480 (package
4481 (name "python-flask-babel")
4482 (version "0.11.1")
4483 (source
4484 (origin
4485 (method url-fetch)
4486 (uri (pypi-uri "Flask-Babel" version))
4487 (sha256
4488 (base32
4489 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4490 (build-system python-build-system)
4491 (propagated-inputs
4492 `(("python-flask" ,python-flask)
4493 ("python-babel" ,python-babel)
4494 ("python-jinja2" ,python-jinja2)
4495 ("python-pytz" ,python-pytz)))
4496 (home-page "https://github.com/python-babel/flask-babel")
4497 (synopsis "Add i18n/l10n support to Flask applications")
4498 (description "This package implements internationalization and localization
4499 support for Flask. This is based on the Python babel module as well as pytz -
4500 both of which are installed automatically if you install this library.")
4501 (license license:bsd-3)))
4502
4503 (define-public python2-flask-babel
4504 (package-with-python2 python-flask-babel))
4505
4506 (define-public python-sqlalchemy-utils
4507 (package
4508 (name "python-sqlalchemy-utils")
4509 (version "0.32.13")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (pypi-uri "SQLAlchemy-Utils" version))
4514 (sha256
4515 (base32
4516 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4517 (build-system python-build-system)
4518 (arguments
4519 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4520 ;; #:phases
4521 ;; (modify-phases %standard-phases
4522 ;; (replace 'check
4523 ;; (lambda _
4524 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4525 (propagated-inputs
4526 `(("python-six" ,python-six)
4527 ("python-sqlalchemy" ,python-sqlalchemy)))
4528 (native-inputs
4529 `(("python-dateutil" ,python-dateutil)
4530 ("python-flexmock" ,python-flexmock)
4531 ("python-psycopg2" ,python-psycopg2)
4532 ("python-pytest" ,python-pytest)
4533 ("python-pytz" ,python-pytz)))
4534 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4535 (synopsis "Various utility functions for SQLAlchemy")
4536 (description
4537 "SQLAlchemy-utils provides various utility functions and custom data types
4538 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4539
4540 You might also want to install the following optional dependencies:
4541 @enumerate
4542 @item @code{python-passlib}
4543 @item @code{python-babel}
4544 @item @code{python-cryptography}
4545 @item @code{python-pytz}
4546 @item @code{python-psycopg2}
4547 @item @code{python-furl}
4548 @item @code{python-flask-babel}
4549 @end enumerate
4550 ")
4551 (license license:bsd-3)))
4552
4553 (define-public python2-sqlalchemy-utils
4554 (package-with-python2 python-sqlalchemy-utils))
4555
4556 (define-public python-alembic
4557 (package
4558 (name "python-alembic")
4559 (version "0.8.10")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (pypi-uri "alembic" version))
4564 (sha256
4565 (base32
4566 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4567 (build-system python-build-system)
4568 (native-inputs
4569 `(("python-mock" ,python-mock)
4570 ("python-pytest-cov" ,python-pytest-cov)))
4571 (propagated-inputs
4572 `(("python-sqlalchemy" ,python-sqlalchemy)
4573 ("python-mako" ,python-mako)
4574 ("python-editor" ,python-editor)))
4575 (home-page "http://bitbucket.org/zzzeek/alembic")
4576 (synopsis
4577 "Database migration tool for SQLAlchemy")
4578 (description
4579 "Alembic is a lightweight database migration tool for usage with the
4580 SQLAlchemy Database Toolkit for Python.")
4581 (license license:expat)))
4582
4583 (define-public python2-alembic
4584 (package-with-python2 python-alembic))
4585
4586 (define-public python-autopep8
4587 (package
4588 (name "python-autopep8")
4589 (version "1.2.4")
4590 (source
4591 (origin
4592 (method url-fetch)
4593 (uri (pypi-uri "autopep8" version))
4594 (sha256
4595 (base32
4596 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4597 (build-system python-build-system)
4598 (propagated-inputs
4599 `(("python-pep8" ,python-pep8)))
4600 (home-page "https://github.com/hhatto/autopep8")
4601 (synopsis "Format Python code according to the PEP 8 style guide")
4602 (description
4603 "@code{autopep8} automatically formats Python code to conform to
4604 the PEP 8 style guide. It uses the pycodestyle utility to determine
4605 what parts of the code needs to be formatted. @code{autopep8} is
4606 capable of fixing most of the formatting issues that can be reported
4607 by pycodestyle.")
4608 (license (license:non-copyleft
4609 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4610
4611 (define-public python2-autopep8
4612 (package-with-python2 python-autopep8))
4613
4614 (define-public python-distutils-extra
4615 (package
4616 (name "python-distutils-extra")
4617 (version "2.38")
4618 (source
4619 (origin
4620 (method url-fetch)
4621 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4622 version "/+download/python-distutils-extra-"
4623 version ".tar.gz"))
4624 (sha256
4625 (base32
4626 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4627 (build-system python-build-system)
4628 (home-page "https://launchpad.net/python-distutils-extra/")
4629 (synopsis "Enhancements to Python's distutils")
4630 (description
4631 "The python-distutils-extra module enables you to easily integrate
4632 gettext support, themed icons, and scrollkeeper-based documentation into
4633 Python's distutils.")
4634 (license license:gpl2)))
4635
4636 (define-public python2-distutils-extra
4637 (package-with-python2 python-distutils-extra))
4638
4639 (define-public python2-elib.intl
4640 (package
4641 (name "python2-elib.intl")
4642 (version "0.0.3")
4643 (source
4644 (origin
4645 ;; This project doesn't tag releases or publish tarballs, so we take
4646 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4647 (method git-fetch)
4648 (uri (git-reference
4649 (url "https://github.com/dieterv/elib.intl.git")
4650 (commit "d09997cfef")))
4651 (sha256
4652 (base32
4653 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4654 (build-system python-build-system)
4655 (arguments
4656 ;; incompatible with Python 3 (exception syntax)
4657 `(#:python ,python-2
4658 #:tests? #f))
4659 (home-page "https://github.com/dieterv/elib.intl")
4660 (synopsis "Enhanced internationalization for Python")
4661 (description
4662 "The elib.intl module provides enhanced internationalization (I18N)
4663 services for your Python modules and applications.")
4664 (license license:lgpl3+)))
4665
4666 (define-public python-pillow
4667 (package
4668 (name "python-pillow")
4669 (version "3.3.3")
4670 (source
4671 (origin
4672 (method url-fetch)
4673 (uri (pypi-uri "Pillow" version))
4674 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4675 (sha256
4676 (base32
4677 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4678 (build-system python-build-system)
4679 (native-inputs
4680 `(("python-nose" ,python-nose)))
4681 (inputs
4682 `(("freetype" ,freetype)
4683 ("lcms" ,lcms)
4684 ("zlib" ,zlib)
4685 ("libjpeg" ,libjpeg)
4686 ("openjpeg" ,openjpeg)
4687 ("libtiff" ,libtiff)
4688 ("libwebp" ,libwebp)))
4689 (arguments
4690 `(#:phases (modify-phases %standard-phases
4691 (add-after
4692 'install 'check-installed
4693 (lambda* (#:key outputs inputs #:allow-other-keys)
4694 (begin
4695 (setenv "HOME" (getcwd))
4696 ;; Make installed package available for running the
4697 ;; tests
4698 (add-installed-pythonpath inputs outputs)
4699 (and (zero? (system* "python" "selftest.py"
4700 "--installed"))
4701 (zero? (system* "python" "test-installed.py"))))))
4702 (delete 'check))))
4703 (home-page "https://pypi.python.org/pypi/Pillow")
4704 (synopsis "Fork of the Python Imaging Library")
4705 (description
4706 "The Python Imaging Library adds image processing capabilities to your
4707 Python interpreter. This library provides extensive file format support, an
4708 efficient internal representation, and fairly powerful image processing
4709 capabilities. The core image library is designed for fast access to data
4710 stored in a few basic pixel formats. It should provide a solid foundation for
4711 a general image processing tool.")
4712 (license (license:x11-style
4713 "http://www.pythonware.com/products/pil/license.htm"
4714 "The PIL Software License"))))
4715
4716 (define-public python2-pillow
4717 (package-with-python2 python-pillow))
4718
4719 (define-public python-pycparser
4720 (package
4721 (name "python-pycparser")
4722 (version "2.17")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (pypi-uri "pycparser" version))
4727 (sha256
4728 (base32
4729 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4730 (outputs '("out" "doc"))
4731 (build-system python-build-system)
4732 (native-inputs
4733 `(("pkg-config" ,pkg-config)))
4734 (arguments
4735 `(#:phases
4736 (modify-phases %standard-phases
4737 (replace 'check
4738 (lambda _
4739 (with-directory-excursion "tests"
4740 (zero? (system* "python" "all_tests.py")))))
4741 (add-after 'install 'install-doc
4742 (lambda* (#:key outputs #:allow-other-keys)
4743 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4744 (doc (string-append data "/doc/" ,name "-" ,version))
4745 (examples (string-append doc "/examples")))
4746 (mkdir-p examples)
4747 (for-each (lambda (file)
4748 (copy-file (string-append "." file)
4749 (string-append doc file)))
4750 '("/README.rst" "/CHANGES" "/LICENSE"))
4751 (copy-recursively "examples" examples)))))))
4752 (home-page "https://github.com/eliben/pycparser")
4753 (synopsis "C parser in Python")
4754 (description
4755 "Pycparser is a complete parser of the C language, written in pure Python
4756 using the PLY parsing library. It parses C code into an AST and can serve as
4757 a front-end for C compilers or analysis tools.")
4758 (license license:bsd-3)))
4759
4760 (define-public python2-pycparser
4761 (package-with-python2 python-pycparser))
4762
4763 (define-public python-cffi
4764 (package
4765 (name "python-cffi")
4766 (version "1.10.0")
4767 (source
4768 (origin
4769 (method url-fetch)
4770 (uri (pypi-uri "cffi" version))
4771 (sha256
4772 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
4773 (build-system python-build-system)
4774 (outputs '("out" "doc"))
4775 (inputs
4776 `(("libffi" ,libffi)))
4777 (propagated-inputs ; required at run-time
4778 `(("python-pycparser" ,python-pycparser)))
4779 (native-inputs
4780 `(("pkg-config" ,pkg-config)
4781 ("python-sphinx" ,python-sphinx)
4782 ("python-pytest" ,python-pytest)))
4783 (arguments
4784 `(#:modules ((ice-9 ftw)
4785 (srfi srfi-26)
4786 (guix build utils)
4787 (guix build python-build-system))
4788 #:phases
4789 (modify-phases %standard-phases
4790 (replace 'check
4791 (lambda _
4792 (setenv "PYTHONPATH"
4793 (string-append
4794 (getenv "PYTHONPATH")
4795 ":" (getcwd) "/build/"
4796 (car (scandir "build" (cut string-prefix? "lib." <>)))))
4797
4798 ;; XXX The "normal" approach of setting CC and friends does
4799 ;; not work here. Is this the correct way of doing things?
4800 (substitute* "testing/embedding/test_basic.py"
4801 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4802 (string-append "c = distutils.ccompiler.new_compiler();"
4803 "c.set_executables(compiler='gcc',"
4804 "compiler_so='gcc',linker_exe='gcc',"
4805 "linker_so='gcc -shared')")))
4806 (substitute* "testing/cffi0/test_ownlib.py"
4807 (("'cc testownlib") "'gcc testownlib"))
4808 (zero? (system* "py.test" "-v" "c/" "testing/"))))
4809 (add-after 'install 'install-doc
4810 (lambda* (#:key outputs #:allow-other-keys)
4811 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4812 (doc (string-append data "/doc/" ,name "-" ,version))
4813 (html (string-append doc "/html")))
4814 (with-directory-excursion "doc"
4815 (system* "make" "html")
4816 (mkdir-p html)
4817 (copy-recursively "build/html" html))
4818 (copy-file "LICENSE" (string-append doc "/LICENSE"))
4819 #t))))))
4820 (home-page "http://cffi.readthedocs.org")
4821 (synopsis "Foreign function interface for Python")
4822 (description
4823 "Foreign Function Interface for Python calling C code.")
4824 (license license:expat)))
4825
4826 (define-public python2-cffi
4827 (package-with-python2 python-cffi))
4828
4829 (define-public python-xcffib
4830 (package
4831 (name "python-xcffib")
4832 (version "0.5.1")
4833 (source
4834 (origin
4835 (method url-fetch)
4836 (uri (pypi-uri "xcffib" version))
4837 (sha256
4838 (base32
4839 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4840 (build-system python-build-system)
4841 (inputs
4842 `(("libxcb" ,libxcb)))
4843 (propagated-inputs
4844 `(("python-cffi" ,python-cffi) ; used at run time
4845 ("python-six" ,python-six)))
4846 (arguments
4847 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4848 #:tests? #f
4849 #:phases
4850 (modify-phases %standard-phases
4851 (add-after 'unpack 'fix-libxcb-path
4852 (lambda* (#:key inputs #:allow-other-keys)
4853 (let ((libxcb (assoc-ref inputs "libxcb")))
4854 (substitute* '("xcffib/__init__.py")
4855 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4856 #t)))
4857 (add-after 'install 'install-doc
4858 (lambda* (#:key outputs #:allow-other-keys)
4859 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4860 "/doc/" ,name "-" ,version)))
4861 (mkdir-p doc)
4862 (copy-file "README.md"
4863 (string-append doc "/README.md"))
4864 #t))))))
4865 (home-page "https://github.com/tych0/xcffib")
4866 (synopsis "XCB Python bindings")
4867 (description
4868 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4869 support for Python 3 and PyPy. It is based on cffi.")
4870 (license license:expat)))
4871
4872 (define-public python2-xcffib
4873 (package-with-python2 python-xcffib))
4874
4875 (define-public python-cairocffi
4876 (package
4877 (name "python-cairocffi")
4878 (version "0.8.0")
4879 (source
4880 (origin
4881 (method url-fetch)
4882 ;; The archive on pypi is missing the 'utils' directory!
4883 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4884 version ".tar.gz"))
4885 (file-name (string-append name "-" version ".tar.gz"))
4886 (sha256
4887 (base32
4888 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4889 (build-system python-build-system)
4890 (outputs '("out" "doc"))
4891 (inputs
4892 `(("gdk-pixbuf" ,gdk-pixbuf)
4893 ("cairo" ,cairo)))
4894 (native-inputs
4895 `(("pkg-config" ,pkg-config)
4896 ("python-sphinx" ,python-sphinx)
4897 ("python-docutils" ,python-docutils)))
4898 (propagated-inputs
4899 `(("python-xcffib" ,python-xcffib))) ; used at run time
4900 (arguments
4901 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4902 #:tests? #f
4903 #:phases
4904 (modify-phases %standard-phases
4905 (add-after 'install 'install-doc
4906 (lambda* (#:key inputs outputs #:allow-other-keys)
4907 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4908 (doc (string-append data "/doc/" ,name "-" ,version))
4909 (html (string-append doc "/html")))
4910 (setenv "LD_LIBRARY_PATH"
4911 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4912 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4913 (setenv "LANG" "en_US.UTF-8")
4914 (mkdir-p html)
4915 (for-each (lambda (file)
4916 (copy-file (string-append "." file)
4917 (string-append doc file)))
4918 '("/README.rst" "/CHANGES" "/LICENSE"))
4919 (system* "python" "setup.py" "build_sphinx")
4920 (copy-recursively "docs/_build/html" html)
4921 #t))))))
4922 (home-page "https://github.com/Kozea/cairocffi")
4923 (synopsis "Python bindings and object-oriented API for Cairo")
4924 (description
4925 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4926 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4927 graphics library with support for multiple backends including image buffers,
4928 PNG, PostScript, PDF, and SVG file output.")
4929 (license license:bsd-3)))
4930
4931 (define-public python2-cairocffi
4932 (package-with-python2 python-cairocffi))
4933
4934 (define-public python-decorator
4935 (package
4936 (name "python-decorator")
4937 (version "4.0.10")
4938 (source
4939 (origin
4940 (method url-fetch)
4941 (uri (pypi-uri "decorator" version))
4942 (sha256
4943 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4944 (build-system python-build-system)
4945 (arguments '(#:tests? #f)) ; no test target
4946 (home-page "https://pypi.python.org/pypi/decorator/")
4947 (synopsis "Python module to simplify usage of decorators")
4948 (description
4949 "The aim of the decorator module is to simplify the usage of decorators
4950 for the average programmer, and to popularize decorators usage giving examples
4951 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4952 etc. The core of this module is a decorator factory.")
4953 (license license:expat)))
4954
4955 (define-public python2-decorator
4956 (package-with-python2 python-decorator))
4957
4958 (define-public python-drmaa
4959 (package
4960 (name "python-drmaa")
4961 (version "0.7.7")
4962 (source
4963 (origin
4964 (method url-fetch)
4965 (uri (pypi-uri "drmaa" version))
4966 (sha256
4967 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4968 (build-system python-build-system)
4969 ;; The test suite requires libdrmaa which is provided by the cluster
4970 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4971 ;; should be set to the path of the libdrmaa library.
4972 (arguments '(#:tests? #f))
4973 (native-inputs
4974 `(("python-nose" ,python-nose)))
4975 (home-page "https://pypi.python.org/pypi/drmaa")
4976 (synopsis "Python bindings for the DRMAA library")
4977 (description
4978 "A Python package for Distributed Resource Management (DRM) job
4979 submission and control. This package is an implementation of the DRMAA 1.0
4980 Python language binding specification.")
4981 (license license:bsd-3)))
4982
4983 (define-public python2-drmaa
4984 (package-with-python2 python-drmaa))
4985
4986 (define-public python-gridmap
4987 (package
4988 (name "python-gridmap")
4989 (version "0.13.0")
4990 (source
4991 (origin
4992 (method url-fetch)
4993 (uri (string-append
4994 "https://github.com/pygridtools/gridmap/archive/v"
4995 version ".tar.gz"))
4996 (file-name (string-append name "-" version ".tar.gz"))
4997 (sha256
4998 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4999 (build-system python-build-system)
5000 (arguments
5001 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5002 (propagated-inputs
5003 `(("python-psutil" ,python-psutil)
5004 ("python-drmaa" ,python-drmaa)
5005 ("python-pyzmq" ,python-pyzmq)))
5006 (home-page "https://github.com/pygridtools/gridmap")
5007 (synopsis "Create jobs on a cluster directly from Python")
5008 (description
5009 "Gridmap is a Python package to allow you to easily create jobs on the
5010 cluster directly from Python. You can directly map Python functions onto the
5011 cluster without needing to write any wrapper code yourself.")
5012 (license license:gpl3+)))
5013
5014 (define-public python2-gridmap
5015 (package-with-python2 python-gridmap))
5016
5017 (define-public python-pexpect
5018 (package
5019 (name "python-pexpect")
5020 (version "4.2.1")
5021 (source
5022 (origin
5023 (method url-fetch)
5024 (uri (pypi-uri "pexpect" version))
5025 (sha256
5026 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5027 (build-system python-build-system)
5028 (arguments
5029 `(#:phases
5030 (modify-phases %standard-phases
5031 (add-before 'check 'prepare-tests
5032 (lambda _
5033 (substitute* (find-files "tests")
5034 (("/bin/ls") (which "ls"))
5035 (("/bin/echo") (which "echo"))
5036 (("/bin/which") (which "which"))
5037 ;; Many tests try to use the /bin directory which
5038 ;; is not present in the build environment.
5039 ;; Use one that's non-empty and unlikely to change.
5040 (("/bin'") "/dev'"))
5041 ;; XXX: Socket connection test gets "Connection reset by peer".
5042 ;; Why does it not work? Delete for now.
5043 (delete-file "tests/test_socket.py")
5044 #t))
5045 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5046 (native-inputs
5047 `(("python-nose" ,python-nose)
5048 ("python-pytest" ,python-pytest-3.0)
5049 ("man-db" ,man-db)
5050 ("which" ,which)))
5051 (propagated-inputs
5052 `(("python-ptyprocess" ,python-ptyprocess)))
5053 (home-page "http://pexpect.readthedocs.org/")
5054 (synopsis "Controlling interactive console applications")
5055 (description
5056 "Pexpect is a pure Python module for spawning child applications;
5057 controlling them; and responding to expected patterns in their output.
5058 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5059 child application and control it as if a human were typing commands.")
5060 (license license:isc)))
5061
5062 (define-public python2-pexpect
5063 (package-with-python2 python-pexpect))
5064
5065 (define-public python-setuptools-scm
5066 (package
5067 (name "python-setuptools-scm")
5068 (version "1.15.0")
5069 (source (origin
5070 (method url-fetch)
5071 (uri (pypi-uri "setuptools_scm" version))
5072 (sha256
5073 (base32
5074 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5075 (build-system python-build-system)
5076 (home-page "https://github.com/pypa/setuptools_scm/")
5077 (synopsis "Manage Python package versions in SCM metadata")
5078 (description
5079 "Setuptools_scm handles managing your Python package versions in
5080 @dfn{software configuration management} (SCM) metadata instead of declaring
5081 them as the version argument or in a SCM managed file.")
5082 (license license:expat)))
5083
5084 (define-public python2-setuptools-scm
5085 (package-with-python2 python-setuptools-scm))
5086
5087 (define-public python-pathpy
5088 (package
5089 (name "python-pathpy")
5090 (version "8.1.1")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (string-append "https://pypi.python.org/packages/source/p/"
5095 "path.py/path.py-" version ".tar.gz"))
5096 (sha256
5097 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5098 (outputs '("out" "doc"))
5099 (build-system python-build-system)
5100 (propagated-inputs
5101 `(("python-appdirs" ,python-appdirs)))
5102 (native-inputs
5103 `(("python-setuptools-scm" ,python-setuptools-scm)
5104 ("python-sphinx" ,python-sphinx)
5105 ("python-rst.linker" ,python-rst.linker)
5106 ("python-pytest" ,python-pytest)
5107 ("python-pytest-runner" ,python-pytest-runner)))
5108 (arguments
5109 `(#:phases
5110 (modify-phases %standard-phases
5111 (add-after 'build 'build-doc
5112 (lambda _
5113 (setenv "LANG" "en_US.UTF-8")
5114 (zero? (system* "python" "setup.py" "build_sphinx"))))
5115 (add-after 'install 'install-doc
5116 (lambda* (#:key outputs #:allow-other-keys)
5117 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5118 (doc (string-append data "/doc/" ,name "-" ,version))
5119 (html (string-append doc "/html")))
5120 (mkdir-p html)
5121 (for-each (lambda (file)
5122 (copy-file file (string-append doc "/" file)))
5123 '("README.rst" "CHANGES.rst"))
5124 (copy-recursively "build/sphinx/html" html)))))))
5125 (home-page "https://github.com/jaraco/path.py")
5126 (synopsis "Python module wrapper for built-in os.path")
5127 (description
5128 "@code{path.py} implements path objects as first-class entities, allowing
5129 common operations on files to be invoked on those path objects directly.")
5130 (license license:expat)))
5131
5132 (define-public python2-pathpy
5133 (package-with-python2 python-pathpy))
5134
5135 (define-public python-pickleshare
5136 (package
5137 (name "python-pickleshare")
5138 (version "0.5")
5139 (source
5140 (origin
5141 (method url-fetch)
5142 (uri (string-append "https://pypi.python.org/packages/source/p/"
5143 "pickleshare/pickleshare-" version ".tar.gz"))
5144 (sha256
5145 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5146 (build-system python-build-system)
5147 (propagated-inputs
5148 `(("python-pathpy" ,python-pathpy)))
5149 (home-page "https://github.com/vivainio/pickleshare")
5150 (synopsis "Tiny key value database with concurrency support")
5151 (description
5152 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5153 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5154 shelve, many processes can access the database simultaneously. Changing a
5155 value in database is immediately visible to other processes accessing the same
5156 database. Concurrency is possible because the values are stored in separate
5157 files. Hence the “database” is a directory where all files are governed by
5158 PickleShare.")
5159 (license license:expat)))
5160
5161 (define-public python2-pickleshare
5162 (package-with-python2 python-pickleshare))
5163
5164 (define-public python-simplegeneric
5165 (package
5166 (name "python-simplegeneric")
5167 (version "0.8.1")
5168 (source
5169 (origin
5170 (method url-fetch)
5171 (uri (string-append "https://pypi.python.org/packages/source/s/"
5172 "simplegeneric/simplegeneric-" version ".zip"))
5173 (sha256
5174 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5175 (build-system python-build-system)
5176 (native-inputs
5177 `(("unzip" ,unzip)))
5178 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5179 (synopsis "Python module for simple generic functions")
5180 (description
5181 "The simplegeneric module lets you define simple single-dispatch generic
5182 functions, akin to Python’s built-in generic functions like @code{len()},
5183 @code{iter()} and so on. However, instead of using specially-named methods,
5184 these generic functions use simple lookup tables, akin to those used by
5185 e.g. @code{pickle.dump()} and other generic functions found in the Python
5186 standard library.")
5187 (license license:zpl2.1)))
5188
5189 (define-public python2-simplegeneric
5190 (package-with-python2 python-simplegeneric))
5191
5192 (define-public python-ipython-genutils
5193 ;; TODO: This package is retired, check if can be removed, see description.
5194 (package
5195 (name "python-ipython-genutils")
5196 (version "0.1.0")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (string-append "https://pypi.python.org/packages/source/i/"
5201 "ipython_genutils/ipython_genutils-"
5202 version ".tar.gz"))
5203 (sha256
5204 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5205 (build-system python-build-system)
5206 (arguments `(#:tests? #f)) ; no tests
5207 (home-page "http://ipython.org")
5208 (synopsis "Vestigial utilities from IPython")
5209 (description
5210 "This package provides retired utilities from IPython. No packages
5211 outside IPython/Jupyter should depend on it.
5212
5213 This package shouldn't exist. It contains some common utilities shared by
5214 Jupyter and IPython projects during The Big Split. As soon as possible, those
5215 packages will remove their dependency on this, and this package will go
5216 away.")
5217 (license license:bsd-3)))
5218
5219 (define-public python2-ipython-genutils
5220 (package-with-python2 python-ipython-genutils))
5221
5222 (define-public python-traitlets
5223 (package
5224 (name "python-traitlets")
5225 (version "4.2.0")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "traitlets" version))
5230 (sha256
5231 (base32
5232 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5233 (build-system python-build-system)
5234 (arguments
5235 `(#:phases
5236 (modify-phases %standard-phases
5237 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5238 (propagated-inputs
5239 `(("python-ipython-genutils" ,python-ipython-genutils)
5240 ("python-decorator" ,python-decorator)))
5241 (native-inputs
5242 `(("python-mock" ,python-mock)
5243 ("python-nose" ,python-nose)))
5244 (home-page "http://ipython.org")
5245 (synopsis "Configuration system for Python applications")
5246 (description
5247 "Traitlets is a framework that lets Python classes have attributes with
5248 type checking, dynamically calculated default values, and ‘on change’
5249 callbacks. The package also includes a mechanism to use traitlets for
5250 configuration, loading values from files or from command line arguments. This
5251 is a distinct layer on top of traitlets, so you can use traitlets in your code
5252 without using the configuration machinery.")
5253 (license license:bsd-3)))
5254
5255 (define-public python2-traitlets
5256 (package-with-python2 python-traitlets))
5257
5258 (define-public python-jupyter-core
5259 (package
5260 (name "python-jupyter-core")
5261 (version "4.2.1")
5262 (source
5263 (origin
5264 (method url-fetch)
5265 (uri (string-append (pypi-uri "jupyter_core" version)))
5266 (sha256
5267 (base32
5268 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5269 (build-system python-build-system)
5270 ;; FIXME: not sure how to run the tests
5271 (arguments `(#:tests? #f))
5272 (propagated-inputs
5273 `(("python-traitlets" ,python-traitlets)))
5274 (home-page "http://jupyter.org/")
5275 (synopsis "Jupyter base package")
5276 (description
5277 "Jupyter core is the base package on which Jupyter projects rely.")
5278 (license license:bsd-3)))
5279
5280 (define-public python2-jupyter-core
5281 (package-with-python2 python-jupyter-core))
5282
5283 (define-public python-jupyter-client
5284 (package
5285 (name "python-jupyter-client")
5286 (version "4.4.0")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (pypi-uri "jupyter_client" version))
5291 (sha256
5292 (base32
5293 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5294 (build-system python-build-system)
5295 ;; Tests fail because of missing native python kernel which I assume is
5296 ;; provided by the ipython package, which we cannot use because it would
5297 ;; cause a dependency cycle.
5298 (arguments `(#:tests? #f))
5299 (propagated-inputs
5300 `(("python-pyzmq" ,python-pyzmq)
5301 ("python-traitlets" ,python-traitlets)
5302 ("python-jupyter-core" ,python-jupyter-core)))
5303 (home-page "http://jupyter.org/")
5304 (synopsis "Jupyter protocol implementation and client libraries")
5305 (description
5306 "The @code{jupyter_client} package contains the reference implementation
5307 of the Jupyter protocol. It also provides client and kernel management APIs
5308 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5309 installing @code{kernelspec}s for use with Jupyter frontends.")
5310 (license license:bsd-3)))
5311
5312 (define-public python2-jupyter-client
5313 (package-with-python2 python-jupyter-client))
5314
5315 (define-public python-ipykernel
5316 (package
5317 (name "python-ipykernel")
5318 (version "4.5.2")
5319 (source
5320 (origin
5321 (method url-fetch)
5322 (uri (pypi-uri "ipykernel" version))
5323 (sha256
5324 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5325 (build-system python-build-system)
5326 ;; The tests load a submodule of IPython. However, IPython itself depends
5327 ;; on ipykernel.
5328 (arguments `(#:tests? #f))
5329 (propagated-inputs
5330 ;; imported at runtime during connect
5331 `(("python-jupyter-client" ,python-jupyter-client)))
5332 (home-page "http://ipython.org")
5333 (synopsis "IPython Kernel for Jupyter")
5334 (description
5335 "This package provides the IPython kernel for Jupyter.")
5336 (license license:bsd-3)))
5337
5338 (define-public python2-ipykernel
5339 (package-with-python2 python-ipykernel))
5340
5341 (define-public python-testpath
5342 (package
5343 (name "python-testpath")
5344 (version "0.2")
5345 (source
5346 (origin
5347 (method url-fetch)
5348 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5349 version ".tar.gz"))
5350 (file-name (string-append name "-" version ".tar.gz"))
5351 (sha256
5352 (base32
5353 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5354 (build-system python-build-system)
5355 (arguments
5356 `(#:tests? #f ; this package does not even have a setup.py
5357 #:modules ((guix build python-build-system)
5358 (guix build utils)
5359 (srfi srfi-1))
5360 #:imported-modules (,@%python-build-system-modules
5361 (srfi srfi-1))
5362 #:phases
5363 (modify-phases %standard-phases
5364 (delete 'install)
5365 (replace 'build
5366 (lambda* (#:key inputs outputs #:allow-other-keys)
5367 (let* ((version (last
5368 (string-split (assoc-ref inputs "python") #\-)))
5369 (x.y (string-join (take (string-split version #\.) 2)
5370 "."))
5371 (dir (string-append
5372 (assoc-ref outputs "out")
5373 "/lib/python" x.y "/site-packages/testpath")))
5374 (mkdir-p dir)
5375 (copy-recursively "testpath" dir))
5376 #t)))))
5377 (home-page "https://github.com/takluyver/testpath")
5378 (synopsis "Test utilities for code working with files and commands")
5379 (description
5380 "Testpath is a collection of utilities for Python code working with files
5381 and commands. It contains functions to check things on the filesystem, and
5382 tools for mocking system commands and recording calls to those.")
5383 (license license:expat)))
5384
5385 (define-public python2-testpath
5386 (package-with-python2 python-testpath))
5387
5388 (define-public python-ipython
5389 (package
5390 (name "python-ipython")
5391 (version "5.2.2")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (pypi-uri "ipython" version ".tar.gz"))
5396 (sha256
5397 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5398 (build-system python-build-system)
5399 (outputs '("out" "doc"))
5400 (propagated-inputs
5401 `(("python-pyzmq" ,python-pyzmq)
5402 ("python-prompt-toolkit" ,python-prompt-toolkit)
5403 ("python-terminado" ,python-terminado)
5404 ("python-matplotlib" ,python-matplotlib)
5405 ("python-numpy" ,python-numpy)
5406 ("python-numpydoc" ,python-numpydoc)
5407 ("python-jinja2" ,python-jinja2)
5408 ("python-mistune" ,python-mistune)
5409 ("python-pexpect" ,python-pexpect)
5410 ("python-pickleshare" ,python-pickleshare)
5411 ("python-simplegeneric" ,python-simplegeneric)
5412 ("python-jsonschema" ,python-jsonschema)
5413 ("python-traitlets" ,python-traitlets)
5414 ("python-ipykernel" ,python-ipykernel)
5415 ("python-nbformat" ,python-nbformat)
5416 ("python-pygments" ,python-pygments)))
5417 (inputs
5418 `(("readline" ,readline)
5419 ("which" ,which)))
5420 (native-inputs
5421 `(("graphviz" ,graphviz)
5422 ("pkg-config" ,pkg-config)
5423 ("python-requests" ,python-requests) ;; for tests
5424 ("python-testpath" ,python-testpath)
5425 ("python-nose" ,python-nose)
5426 ("python-sphinx" ,python-sphinx)
5427 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5428 ("texlive" ,texlive)
5429 ("texinfo" ,texinfo)))
5430 (arguments
5431 `(#:phases
5432 (modify-phases %standard-phases
5433 (add-after
5434 'install 'install-doc
5435 (lambda* (#:key inputs outputs #:allow-other-keys)
5436 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5437 (doc (string-append data "/doc/" ,name "-" ,version))
5438 (html (string-append doc "/html"))
5439 (man1 (string-append data "/man/man1"))
5440 (info (string-append data "/info"))
5441 (examples (string-append doc "/examples"))
5442 (python-arg (string-append "PYTHON=" (which "python"))))
5443 (setenv "LANG" "en_US.utf8")
5444 ;; Make installed package available for running the tests
5445 (add-installed-pythonpath inputs outputs)
5446 (with-directory-excursion "docs"
5447 ;; FIXME: pdf fails to build
5448 ;;(system* "make" "pdf" "PAPER=a4")
5449 (system* "make" python-arg "html")
5450 (system* "make" python-arg "info"))
5451 (copy-recursively "docs/man" man1)
5452 (copy-recursively "examples" examples)
5453 (copy-recursively "docs/build/html" html)
5454 ;; (copy-file "docs/build/latex/ipython.pdf"
5455 ;; (string-append doc "/ipython.pdf"))
5456 (mkdir-p info)
5457 (copy-file "docs/build/texinfo/ipython.info"
5458 (string-append info "/ipython.info"))
5459 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5460 ;; Tests can only be run after the library has been installed and not
5461 ;; within the source directory.
5462 (delete 'check)
5463 (add-after
5464 'install 'check
5465 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5466 (if tests?
5467 (with-directory-excursion "/tmp"
5468 ;; Make installed package available for running the tests
5469 (add-installed-pythonpath inputs outputs)
5470 (setenv "HOME" "/tmp/") ;; required by a test
5471 (zero? (system* (string-append (assoc-ref outputs "out")
5472 "/bin/iptest"))))
5473 #t)))
5474 (add-before
5475 'install 'fix-tests
5476 (lambda* (#:key inputs #:allow-other-keys)
5477 (substitute* "./IPython/utils/_process_posix.py"
5478 (("/usr/bin/env', 'which") (which "which")))
5479 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5480 (("#!/usr/bin/env python")
5481 (string-append "#!" (which "python"))))
5482 ;; Disable 1 failing test
5483 (substitute* "./IPython/core/tests/test_magic.py"
5484 (("def test_dirops\\(\\):" all)
5485 (string-append "@dec.skipif(True)\n" all))))))))
5486 (home-page "http://ipython.org")
5487 (synopsis "IPython is a tool for interactive computing in Python")
5488 (description
5489 "IPython provides a rich architecture for interactive computing with:
5490 Powerful interactive shells, a browser-based notebook, support for interactive
5491 data visualization, embeddable interpreters and tools for parallel
5492 computing.")
5493 (license license:bsd-3)
5494 (properties `((python2-variant . ,(delay python2-ipython))))))
5495
5496 (define-public python2-ipython
5497 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5498 (package
5499 (inherit ipython)
5500 ;; FIXME: add pyreadline once available.
5501 (propagated-inputs
5502 `(("python2-backports-shutil-get-terminal-size"
5503 ,python2-backports-shutil-get-terminal-size)
5504 ("python2-pathlib2" ,python2-pathlib2)
5505 ,@(package-propagated-inputs ipython)))
5506 (native-inputs
5507 `(("python2-mock" ,python2-mock)
5508 ,@(package-native-inputs ipython))))))
5509
5510 (define-public python-isodate
5511 (package
5512 (name "python-isodate")
5513 (version "0.5.4")
5514 (source
5515 (origin
5516 (method url-fetch)
5517 (uri (pypi-uri "isodate" version))
5518 (sha256
5519 (base32
5520 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5521 (build-system python-build-system)
5522 (home-page
5523 "http://cheeseshop.python.org/pypi/isodate")
5524 (synopsis
5525 "Python date parser and formatter")
5526 (description
5527 "Python-isodate is a python module for parsing and formatting
5528 ISO 8601 dates, time and duration.")
5529 (license license:bsd-3)))
5530
5531 (define-public python2-isodate
5532 (package-with-python2 python-isodate))
5533
5534 (define-public python-html5lib
5535 (package
5536 (name "python-html5lib")
5537 (version "1.0b10")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (pypi-uri "html5lib" version))
5542 (sha256
5543 (base32
5544 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5545 (build-system python-build-system)
5546 (propagated-inputs
5547 `(("python-six" ,python-six)
5548 ("python-webencodings" ,python-webencodings)))
5549 (arguments
5550 `(#:test-target "check"))
5551 (home-page
5552 "https://github.com/html5lib/html5lib-python")
5553 (synopsis
5554 "Python HTML parser based on the WHATWG HTML specifcation")
5555 (description
5556 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5557 and written in Python.")
5558 (license license:expat)))
5559
5560 (define-public python2-html5lib
5561 (package-with-python2 python-html5lib))
5562
5563 ;; Needed for python-bleach, a dependency of python-notebook
5564 (define-public python-html5lib-0.9
5565 (package
5566 (inherit python-html5lib)
5567 (version "0.999")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (pypi-uri "html5lib" version))
5572 (sha256
5573 (base32
5574 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5575
5576 (define-public python2-html5lib-0.9
5577 (package-with-python2 python-html5lib-0.9))
5578
5579 (define-public python-webencodings
5580 (package
5581 (name "python-webencodings")
5582 (version "0.5")
5583 (source (origin
5584 (method url-fetch)
5585 (uri (pypi-uri "webencodings" version))
5586 (sha256
5587 (base32
5588 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5589 (build-system python-build-system)
5590 (arguments
5591 '(#:phases
5592 (modify-phases %standard-phases
5593 (replace 'check
5594 (lambda _
5595 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5596 (native-inputs
5597 `(("python-pytest" ,python-pytest)))
5598 (home-page "https://github.com/SimonSapin/python-webencodings")
5599 (synopsis "Character encoding aliases for legacy web content")
5600 (description
5601 "In order to be compatible with legacy web content when interpreting
5602 something like @code{Content-Type: text/html; charset=latin1}, tools need
5603 to use a particular set of aliases for encoding labels as well as some
5604 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5605 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5606 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5607 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5608 defines all such details so that implementations do not have to
5609 reverse-engineer each other.
5610
5611 This module implements the Encoding standard and has encoding labels and
5612 BOM detection, but the actual implementation for encoders and decoders
5613 is Python’s.")
5614 (license license:bsd-3)))
5615
5616 (define-public python2-webencodings
5617 (package-with-python2 python-webencodings))
5618
5619 (define-public python-urwid
5620 (package
5621 (name "python-urwid")
5622 (version "1.3.1")
5623 (source
5624 (origin
5625 (method url-fetch)
5626 (uri (pypi-uri "urwid" version))
5627 (sha256
5628 (base32
5629 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5630 (build-system python-build-system)
5631 (arguments
5632 `(#:phases
5633 (modify-phases %standard-phases
5634 ;; Disable failing test. Bug filed upstream:
5635 ;; https://github.com/wardi/urwid/issues/164
5636 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5637 (add-after 'unpack 'disable-failing-test
5638 (lambda _
5639 (substitute* "urwid/tests/test_event_loops.py"
5640 (("test_remove_watch_file")
5641 "disable_remove_watch_file")))))))
5642 (home-page "http://urwid.org")
5643 (synopsis "Console user interface library for Python")
5644 (description
5645 "Urwid is a curses-based UI/widget library for Python. It includes many
5646 features useful for text console applications.")
5647 (license license:lgpl2.1+)))
5648
5649 (define-public python2-urwid
5650 (let ((python2-urwid (package-with-python2 python-urwid)))
5651 (package
5652 (inherit python2-urwid)
5653 (arguments
5654 (append
5655 '(#:phases
5656 (modify-phases %standard-phases
5657 ;; Disable the vterm tests because of non-deterministic failures
5658 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5659 (add-after 'unpack 'delete-test_vterm.py
5660 (delete-file "urwid/tests/test_vterm.py"))))
5661 (package-arguments python-urwid))))))
5662
5663 (define-public python-openid
5664 (package
5665 (name "python-openid")
5666 (version "3.0.10")
5667 (source
5668 (origin
5669 (method url-fetch)
5670 (uri (pypi-uri "python3-openid" version))
5671 (sha256
5672 (base32
5673 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5674 (build-system python-build-system)
5675 (arguments
5676 `(#:phases
5677 (modify-phases %standard-phases
5678 (replace 'check
5679 (lambda _
5680 (zero? (system* "./admin/runtests")))))))
5681 (properties `((python2-variant . ,(delay python2-openid))))
5682 (propagated-inputs
5683 `(("python-defusedxml" ,python-defusedxml)))
5684 (native-inputs
5685 `(("python-psycopg2" ,python-psycopg2)
5686 ("python-django" ,python-django)))
5687 (home-page "https://github.com/necaris/python3-openid")
5688 (synopsis "OpenID support for servers and consumers")
5689 (description "This library provides OpenID authentication for Python, both
5690 for clients and servers.")
5691 (license license:asl2.0)))
5692
5693 (define-public python2-openid
5694 (package
5695 (name "python2-openid")
5696 (version "2.2.5")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (pypi-uri "python-openid" version))
5701 (sha256
5702 (base32
5703 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5704 (build-system python-build-system)
5705 (arguments
5706 ;; Python 3 support is in `python3-openid`, a separate package.
5707 `(#:python ,python-2))
5708 (home-page "https://github.com/openid/python-openid")
5709 (synopsis "OpenID support for servers and consumers")
5710 (description "This library provides OpenID authentication for Python, both
5711 for clients and servers.")
5712 (license license:asl2.0)))
5713
5714 (define-public python-urwidtrees
5715 (package
5716 (name "python-urwidtrees")
5717 (version "1.0.2")
5718 (source
5719 (origin
5720 (method url-fetch)
5721 ;; package author intends on distributing via github rather than pypi:
5722 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5723 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5724 version ".tar.gz"))
5725 (file-name (string-append name "-" version ".tar.gz"))
5726 (sha256
5727 (base32
5728 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5729 (build-system python-build-system)
5730 (arguments
5731 '(#:tests? #f)) ; no tests
5732 (propagated-inputs `(("python-urwid" ,python-urwid)))
5733 (home-page "https://github.com/pazz/urwidtrees")
5734 (synopsis "Tree widgets for urwid")
5735 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5736 toolkit. Use it to build trees of widgets.")
5737 (license license:gpl3+)))
5738
5739 (define-public python2-urwidtrees
5740 (package-with-python2 python-urwidtrees))
5741
5742 (define-public python-dbus
5743 (package
5744 (name "python-dbus")
5745 (version "1.2.0")
5746 (source
5747 (origin
5748 (method url-fetch)
5749 (uri (string-append
5750 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5751 version ".tar.gz"))
5752 (sha256
5753 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5754 (build-system gnu-build-system)
5755 (arguments
5756 '(#:phases
5757 (modify-phases %standard-phases
5758 (add-before
5759 'check 'pre-check
5760 (lambda _
5761 ;; XXX: For the missing '/etc/machine-id'.
5762 (substitute* "test/run-test.sh"
5763 (("DBUS_FATAL_WARNINGS=1")
5764 "DBUS_FATAL_WARNINGS=0"))
5765 #t)))))
5766 (native-inputs
5767 `(("pkg-config" ,pkg-config)))
5768 (inputs
5769 `(("python" ,python)
5770 ("dbus-glib" ,dbus-glib)))
5771 (synopsis "Python bindings for D-bus")
5772 (description "python-dbus provides bindings for libdbus, the reference
5773 implementation of D-Bus.")
5774 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5775 (license license:expat)))
5776
5777 (define-public python2-dbus
5778 (package (inherit python-dbus)
5779 (name "python2-dbus")
5780 (inputs `(("python" ,python-2)
5781 ,@(alist-delete "python"
5782 (package-inputs python-dbus)
5783 equal?)))
5784 ;; FIXME: on Python 2, the test_utf8 fails with:
5785 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5786 (arguments `(#:tests? #f))))
5787
5788 (define-public python-apsw
5789 (package
5790 (name "python-apsw")
5791 (version "3.9.2-r1")
5792 (source
5793 (origin
5794 (method url-fetch)
5795 (uri (pypi-uri "apsw" version))
5796 (sha256
5797 (base32
5798 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5799 (build-system python-build-system)
5800 (inputs
5801 `(("sqlite" ,sqlite)))
5802 (arguments
5803 `(#:phases
5804 (modify-phases %standard-phases
5805 (delete 'check)
5806 (add-after 'install 'check
5807 (lambda* (#:key inputs outputs #:allow-other-keys)
5808 (add-installed-pythonpath inputs outputs)
5809 (zero? (system* "python" "setup.py" "test")))))))
5810 (home-page "https://github.com/rogerbinns/apsw/")
5811 (synopsis "Another Python SQLite Wrapper")
5812 (description "APSW is a Python wrapper for the SQLite
5813 embedded relational database engine. In contrast to other wrappers such as
5814 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5815 translate the complete SQLite API into Python.")
5816 (license license:zlib)))
5817
5818 (define-public python2-apsw
5819 (package-with-python2 python-apsw))
5820
5821 (define-public python-lxml
5822 (package
5823 (name "python-lxml")
5824 (version "3.6.0")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (pypi-uri "lxml" version))
5829 (sha256
5830 (base32
5831 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5832 (build-system python-build-system)
5833 (inputs
5834 `(("libxml2" ,libxml2)
5835 ("libxslt" ,libxslt)))
5836 (home-page "http://lxml.de/")
5837 (synopsis
5838 "Python XML processing library")
5839 (description
5840 "The lxml XML toolkit is a Pythonic binding for the C libraries
5841 libxml2 and libxslt.")
5842 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5843
5844 (define-public python2-lxml
5845 (package-with-python2 python-lxml))
5846
5847 ;; beautifulsoup4 has a totally different namespace than 3.x,
5848 ;; and pypi seems to put it under its own name, so I guess we should too
5849 (define-public python-beautifulsoup4
5850 (package
5851 (name "python-beautifulsoup4")
5852 (version "4.5.3")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "beautifulsoup4" version))
5857 (sha256
5858 (base32
5859 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5860 (build-system python-build-system)
5861 (arguments
5862 `(#:phases
5863 (modify-phases %standard-phases
5864 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5865 ;; must use this conversion script when building with Python 3. The
5866 ;; conversion script also runs the tests.
5867 ;; For more information, see the file 'convert-py3k' in the source
5868 ;; distribution.
5869 (replace 'check
5870 (lambda _ (zero? (system* "./convert-py3k")))))))
5871 (home-page
5872 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5873 (synopsis
5874 "Python screen-scraping library")
5875 (description
5876 "Beautiful Soup is a Python library designed for rapidly setting up
5877 screen-scraping projects. It offers Pythonic idioms for navigating,
5878 searching, and modifying a parse tree, providing a toolkit for
5879 dissecting a document and extracting what you need. It automatically
5880 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5881 (license license:expat)
5882 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5883
5884 (define-public python2-beautifulsoup4
5885 (package
5886 (inherit (package-with-python2
5887 (strip-python2-variant python-beautifulsoup4)))
5888 (arguments `(#:python ,python-2))))
5889
5890 (define-public python-cssutils
5891 (package
5892 (name "python-cssutils")
5893 (version "1.0.1")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "cssutils" version))
5898 (sha256
5899 (base32
5900 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5901 (build-system python-build-system)
5902 (native-inputs
5903 `(("unzip" ,unzip))) ; for unpacking the source
5904 (arguments
5905 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5906 (home-page "http://cthedot.de/cssutils/")
5907 (synopsis
5908 "CSS Cascading Style Sheets library for Python")
5909 (description
5910 "Cssutils is a Python package for parsing and building CSS
5911 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5912 options.")
5913 (license license:lgpl3+)))
5914
5915 (define-public python2-cssutils
5916 (package-with-python2 python-cssutils))
5917
5918 (define-public python-cssselect
5919 (package
5920 (name "python-cssselect")
5921 (version "0.9.2")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "cssselect" version))
5926 (sha256
5927 (base32
5928 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5929 (build-system python-build-system)
5930 (arguments
5931 ;; tests fail with message
5932 ;; AttributeError: 'module' object has no attribute 'tests'
5933 `(#:tests? #f))
5934 (home-page
5935 "https://pythonhosted.org/cssselect/")
5936 (synopsis
5937 "CSS3 selector parser and translator to XPath 1.0")
5938 (description
5939 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5940 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5941 another XPath engine to find the matching elements in an XML or HTML document.")
5942 (license license:bsd-3)))
5943
5944 (define-public python2-cssselect
5945 (package-with-python2 python-cssselect))
5946
5947 (define-public python-openid-cla
5948 (package
5949 (name "python-openid-cla")
5950 (version "1.2")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "python-openid-cla" version))
5955 (sha256
5956 (base32
5957 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5958 (build-system python-build-system)
5959 (arguments '(#:tests? #f)) ; No tests.
5960 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5961 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5962 (description "@code{openid-cla} is an implementation of the OpenID
5963 contributor license agreement extension for python-openid.")
5964 (license license:bsd-3)))
5965
5966 (define-public python2-openid-cla
5967 (package-with-python2 python-openid-cla))
5968
5969 (define-public python-openid-teams
5970 (package
5971 (name "python-openid-teams")
5972 (version "1.1")
5973 (source
5974 (origin
5975 (method url-fetch)
5976 (uri (pypi-uri "python-openid-teams" version))
5977 (sha256
5978 (base32
5979 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5980 (build-system python-build-system)
5981 (arguments '(#:tests? #f)) ; No tests.
5982 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5983 (synopsis "Implementation of the OpenID teams extension for python-openid")
5984 (description
5985 "@code{openid-teams} is an implementation of the OpenID
5986 teams extension for python-openid.")
5987 (license license:bsd-3)))
5988
5989 (define-public python2-openid-teams
5990 (package-with-python2 python-openid-teams))
5991
5992 (define-public python-netifaces
5993 (package
5994 (name "python-netifaces")
5995 (version "0.10.4")
5996 (source
5997 (origin
5998 (method url-fetch)
5999 (uri (string-append
6000 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6001 version
6002 ".tar.gz"))
6003 (sha256
6004 (base32
6005 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6006 (build-system python-build-system)
6007 (home-page
6008 "https://bitbucket.org/al45tair/netifaces")
6009 (synopsis
6010 "Python module for portable network interface information")
6011 (description
6012 "Netifaces is a Python module providing information on network
6013 interfaces in an easy and portable manner.")
6014 (license license:expat)))
6015
6016 (define-public python2-netifaces
6017 (package-with-python2 python-netifaces))
6018
6019 (define-public python-networkx
6020 (package
6021 (name "python-networkx")
6022 (version "1.11")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (pypi-uri "networkx" version))
6027 (sha256
6028 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6029 (build-system python-build-system)
6030 ;; python-decorator is needed at runtime
6031 (propagated-inputs
6032 `(("python-decorator" ,python-decorator)))
6033 (native-inputs
6034 `(("python-nose" ,python-nose)))
6035 (home-page "http://networkx.github.io/")
6036 (synopsis "Python module for creating and manipulating graphs and networks")
6037 (description
6038 "NetworkX is a Python package for the creation, manipulation, and study
6039 of the structure, dynamics, and functions of complex networks.")
6040 (license license:bsd-3)))
6041
6042 (define-public python2-networkx
6043 (package-with-python2 python-networkx))
6044
6045 (define-public snakemake
6046 (package
6047 (name "snakemake")
6048 (version "3.11.2")
6049 (source
6050 (origin
6051 (method url-fetch)
6052 (uri (pypi-uri "snakemake" version))
6053 (sha256
6054 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
6055 (build-system python-build-system)
6056 (arguments
6057 ;; TODO: Package missing test dependencies.
6058 '(#:tests? #f
6059 #:phases
6060 (modify-phases %standard-phases
6061 ;; For cluster execution Snakemake will call Python. Since there is
6062 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6063 ;; this by calling the snakemake wrapper instead.
6064 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6065 (lambda* (#:key outputs #:allow-other-keys)
6066 (substitute* "snakemake/executors.py"
6067 (("\\{sys.executable\\} -m snakemake")
6068 (string-append (assoc-ref outputs "out")
6069 "/bin/snakemake")))
6070 #t)))))
6071 (propagated-inputs
6072 `(("python-wrapt" ,python-wrapt)
6073 ("python-requests" ,python-requests)))
6074 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6075 (synopsis "Python-based execution environment for make-like workflows")
6076 (description
6077 "Snakemake aims to reduce the complexity of creating workflows by
6078 providing a clean and modern domain specific specification language (DSL) in
6079 Python style, together with a fast and comfortable execution environment.")
6080 (license license:expat)))
6081
6082 (define-public python-seaborn
6083 (package
6084 (name "python-seaborn")
6085 (version "0.7.1")
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "seaborn" version))
6090 (sha256
6091 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6092 (build-system python-build-system)
6093 (arguments
6094 '(#:tests? #f)) ; Tests requires a running X11 server.
6095 (propagated-inputs
6096 `(("python-pandas" ,python-pandas)
6097 ("python-matplotlib" ,python-matplotlib)
6098 ("python-scipy" ,python-scipy)))
6099 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6100 (synopsis "Statistical data visualization")
6101 (description
6102 "Seaborn is a library for making attractive and informative statistical
6103 graphics in Python. It is built on top of matplotlib and tightly integrated
6104 with the PyData stack, including support for numpy and pandas data structures
6105 and statistical routines from scipy and statsmodels.")
6106 (license license:bsd-3)
6107 (properties `((python2-variant . ,(delay python2-seaborn))))))
6108
6109 (define-public python2-seaborn
6110 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6111 (package
6112 (inherit base)
6113 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6114 ,@(package-propagated-inputs base))))))
6115
6116 (define-public python-mpmath
6117 (package
6118 (name "python-mpmath")
6119 (version "0.19")
6120 (source (origin
6121 (method url-fetch)
6122 (uri (string-append "http://mpmath.org/files/mpmath-"
6123 version ".tar.gz"))
6124 (sha256
6125 (base32
6126 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6127 (build-system python-build-system)
6128 (arguments
6129 '(#:phases
6130 (modify-phases %standard-phases
6131 (replace 'check
6132 (lambda _
6133 (zero?
6134 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6135 (home-page "http://mpmath.org")
6136 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6137 (description
6138 "@code{mpmath} can be used as an arbitrary-precision substitute for
6139 Python's float/complex types and math/cmath modules, but also does much
6140 more advanced mathematics.")
6141 (license license:bsd-3)))
6142
6143 (define-public python2-mpmath
6144 (package-with-python2 python-mpmath))
6145
6146 (define-public python-sympy
6147 (package
6148 (name "python-sympy")
6149 (version "1.0")
6150 (source
6151 (origin
6152 (method url-fetch)
6153 (uri (string-append
6154 "https://github.com/sympy/sympy/releases/download/sympy-"
6155 version "/sympy-" version ".tar.gz"))
6156 (sha256
6157 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6158 (build-system python-build-system)
6159 (propagated-inputs
6160 `(("python-mpmath" ,python-mpmath)))
6161 (home-page "http://www.sympy.org/")
6162 (synopsis "Python library for symbolic mathematics")
6163 (description
6164 "SymPy is a Python library for symbolic mathematics. It aims to become a
6165 full-featured computer algebra system (CAS) while keeping the code as simple
6166 as possible in order to be comprehensible and easily extensible.")
6167 (license license:bsd-3)))
6168
6169 (define-public python2-sympy
6170 (package-with-python2 python-sympy))
6171
6172 (define-public python-q
6173 (package
6174 (name "python-q")
6175 (version "2.6")
6176 (source
6177 (origin
6178 (method url-fetch)
6179 (uri (pypi-uri "q" version))
6180 (sha256
6181 (base32
6182 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6183 (build-system python-build-system)
6184 (home-page "https://github.com/zestyping/q")
6185 (synopsis "Quick-and-dirty debugging output for tired programmers")
6186 (description
6187 "q is a Python module for \"print\" style of debugging Python code. It
6188 provides convenient short API for print out of values, tracebacks, and
6189 falling into the Python interpreter.")
6190 (license license:asl2.0)))
6191
6192 (define-public python2-q
6193 (package-with-python2 python-q))
6194
6195 (define-public python-testlib
6196 (package
6197 (name "python-testlib")
6198 (version "0.6.5")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (string-append
6203 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6204 version ".zip"))
6205 (sha256
6206 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6207 (build-system python-build-system)
6208 (native-inputs
6209 `(("unzip" ,unzip))) ; for unpacking the source
6210 (synopsis "Python micro test suite harness")
6211 (description "A micro unittest suite harness for Python.")
6212 (home-page "https://github.com/trentm/testlib")
6213 (license license:expat)))
6214
6215 (define-public python2-testlib
6216 (package-with-python2 python-testlib))
6217
6218 (define-public python2-xlib
6219 (package
6220 (name "python2-xlib")
6221 (version "0.14")
6222 (source (origin
6223 (method url-fetch)
6224 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6225 "/" version "/"
6226 "python-xlib-" version ".tar.gz"))
6227 (sha256
6228 (base32
6229 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6230 (build-system python-build-system)
6231 (arguments
6232 `(#:python ,python-2 ;Python 2 only
6233 #:tests? #f)) ;no tests
6234 (home-page "http://python-xlib.sourceforge.net/")
6235 (synopsis "Python X11 client library")
6236 (description
6237 "The Python X Library is intended to be a fully functional X client
6238 library for Python programs. It is useful to implement low-level X clients.
6239 It is written entirely in Python.")
6240 (license license:gpl2+)))
6241
6242 (define-public python-singledispatch
6243 (package
6244 (name "python-singledispatch")
6245 (version "3.4.0.3")
6246 (source
6247 (origin
6248 (method url-fetch)
6249 (uri (pypi-uri "singledispatch" version))
6250 (sha256
6251 (base32
6252 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6253 (build-system python-build-system)
6254 (native-inputs
6255 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6256 (home-page
6257 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6258 (synopsis "Backport of singledispatch feature from Python 3.4")
6259 (description
6260 "This library brings functools.singledispatch from Python 3.4 to Python
6261 2.6-3.3.")
6262 (license license:expat)))
6263
6264 (define-public python2-singledispatch
6265 (package-with-python2 python-singledispatch))
6266
6267 (define-public python-tornado
6268 (package
6269 (name "python-tornado")
6270 (version "4.5.1")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "tornado" version))
6275 (sha256
6276 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6277 (build-system python-build-system)
6278 (arguments
6279 '(;; FIXME: Two tests error out with:
6280 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6281 ;; #:phases
6282 ;; (modify-phases %standard-phases
6283 ;; (replace 'check
6284 ;; (lambda _
6285 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6286 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6287 ;; (zero? (system* "python" "-m" "tornado.test")))))
6288 #:tests? #f))
6289 (native-inputs
6290 `(("python-certifi" ,python-certifi)))
6291 (propagated-inputs
6292 `(("python-backports-abc" ,python-backports-abc)))
6293 (home-page "http://www.tornadoweb.org/")
6294 (synopsis "Python web framework and asynchronous networking library")
6295 (description
6296 "Tornado is a Python web framework and asynchronous networking library,
6297 originally developed at FriendFeed. By using non-blocking network I/O,
6298 Tornado can scale to tens of thousands of open connections, making it ideal
6299 for long polling, WebSockets, and other applications that require a long-lived
6300 connection to each user.")
6301 (license license:asl2.0)
6302 (properties `((python2-variant . ,(delay python2-tornado))))))
6303
6304 (define-public python2-tornado
6305 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6306 (package (inherit tornado)
6307 (propagated-inputs
6308 `(("python2-backport-ssl-match-hostname"
6309 ,python2-backport-ssl-match-hostname)
6310 ("python2-singledispatch" ,python2-singledispatch)
6311 ,@(package-propagated-inputs tornado))))))
6312
6313 ;; the python- version can be removed with python-3.5
6314 (define-public python-backports-abc
6315 (package
6316 (name "python-backports-abc")
6317 (version "0.5")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "backports_abc" version))
6322 (sha256
6323 (base32
6324 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6325 (build-system python-build-system)
6326 (home-page "https://github.com/cython/backports_abc")
6327 (synopsis "Backport of additions to the 'collections.abc' module")
6328 (description
6329 "Python-backports-abc provides a backport of additions to the
6330 'collections.abc' module in Python-3.5.")
6331 (license license:psfl)))
6332
6333 (define-public python2-backports-abc
6334 (package-with-python2 python-backports-abc))
6335
6336 (define-public python2-backports-shutil-get-terminal-size
6337 (package
6338 (name "python2-backports-shutil-get-terminal-size")
6339 (version "1.0.0")
6340 (source
6341 (origin
6342 (method url-fetch)
6343 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6344 (sha256
6345 (base32
6346 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6347 (build-system python-build-system)
6348 (arguments
6349 `(#:python ,python-2
6350 #:phases
6351 (modify-phases %standard-phases
6352 (replace 'check
6353 (lambda _
6354 (zero? (system* "py.test" "-v")))))))
6355 (native-inputs
6356 `(("python2-pytest" ,python2-pytest)))
6357 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6358 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6359 (description
6360 "This package provides a backport of the @code{get_terminal_size
6361 function} from Python 3.3's @code{shutil}.
6362 Unlike the original version it is written in pure Python rather than C,
6363 so it might be a tiny bit slower.")
6364 (license license:expat)))
6365
6366 (define-public python-waf
6367 (package
6368 (name "python-waf")
6369 (version "1.9.8")
6370 (source (origin
6371 (method url-fetch)
6372 (uri (string-append "https://waf.io/"
6373 "waf-" version ".tar.bz2"))
6374 (sha256
6375 (base32
6376 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6377 (build-system python-build-system)
6378 (arguments
6379 '(#:phases
6380 (modify-phases %standard-phases
6381 (replace 'build
6382 (lambda _
6383 (zero? (system* "python" "waf-light" "configure" "build"))))
6384 (replace 'check
6385 (lambda _
6386 (zero? (system* "python" "waf" "--version"))))
6387 (replace 'install
6388 (lambda _
6389 (copy-file "waf" %output))))))
6390 (home-page "https://waf.io/")
6391 (synopsis "Python-based build system")
6392 (description
6393 "Waf is a Python-based framework for configuring, compiling and installing
6394 applications.")
6395 (license license:bsd-3)))
6396
6397 (define-public python2-waf
6398 (package-with-python2 python-waf))
6399
6400 (define-public python-pyzmq
6401 (package
6402 (name "python-pyzmq")
6403 (version "15.1.0")
6404 (source
6405 (origin
6406 (method url-fetch)
6407 (uri (pypi-uri "pyzmq" version))
6408 (sha256
6409 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6410 (build-system python-build-system)
6411 (arguments
6412 `(#:configure-flags
6413 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6414 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6415 ;; --inplace' for 'python setup.py test' to work.
6416 #:tests? #f))
6417 (inputs
6418 `(("zeromq" ,zeromq)))
6419 (native-inputs
6420 `(("pkg-config" ,pkg-config)
6421 ("python-nose" ,python-nose)))
6422 (home-page "https://github.com/zeromq/pyzmq")
6423 (synopsis "Python bindings for 0MQ")
6424 (description
6425 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6426 (license license:bsd-4)))
6427
6428 (define-public python2-pyzmq
6429 (package-with-python2 python-pyzmq))
6430
6431 (define-public python-pep8
6432 (package
6433 (name "python-pep8")
6434 (version "1.7.0")
6435 (source
6436 (origin
6437 (method url-fetch)
6438 (uri (pypi-uri "pep8" version))
6439 (sha256
6440 (base32
6441 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6442 (build-system python-build-system)
6443 (home-page "http://pep8.readthedocs.org/")
6444 (synopsis "Python style guide checker")
6445 (description
6446 "This tools checks Python code against some of the style conventions in
6447 PEP 8.")
6448 (license license:expat)))
6449
6450 (define-public python2-pep8
6451 (package-with-python2 python-pep8))
6452
6453 (define-public python-pyflakes
6454 (package
6455 (name "python-pyflakes")
6456 (version "1.0.0")
6457 (source
6458 (origin
6459 (method url-fetch)
6460 (uri (pypi-uri "pyflakes" version))
6461 (sha256
6462 (base32
6463 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6464 (build-system python-build-system)
6465 (home-page
6466 "https://github.com/pyflakes/pyflakes")
6467 (synopsis "Passive checker of Python programs")
6468 (description
6469 "Pyflakes statically checks Python source code for common errors.")
6470 (license license:expat)))
6471
6472 (define-public python2-pyflakes
6473 (package-with-python2 python-pyflakes))
6474
6475 (define-public python-mccabe
6476 (package
6477 (name "python-mccabe")
6478 (version "0.4.0")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "mccabe" version))
6483 (sha256
6484 (base32
6485 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6486 (build-system python-build-system)
6487 (native-inputs
6488 `(("python-pytest" ,python-pytest)
6489 ("python-pytest-runner" ,python-pytest-runner)))
6490 (home-page "https://github.com/flintwork/mccabe")
6491 (synopsis "McCabe checker, plugin for flake8")
6492 (description
6493 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6494 complexity of Python source code.")
6495 (license license:expat)))
6496
6497 (define-public python2-mccabe
6498 (package-with-python2 python-mccabe))
6499
6500 (define-public python-mccabe-0.2.1
6501 (package (inherit python-mccabe)
6502 (version "0.2.1")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "mccabe" version))
6507 (sha256
6508 (base32
6509 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6510
6511 (define-public python2-mccabe-0.2.1
6512 (package-with-python2 python-mccabe-0.2.1))
6513
6514 ;; Flake8 2.4.1 requires an older version of pep8.
6515 ;; This should be removed ASAP.
6516 (define-public python-pep8-1.5.7
6517 (package (inherit python-pep8)
6518 (version "1.5.7")
6519 (source
6520 (origin
6521 (method url-fetch)
6522 (uri (string-append
6523 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6524 version
6525 ".tar.gz"))
6526 (sha256
6527 (base32
6528 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6529 (arguments
6530 ;; XXX Tests not compatible with Python 3.5.
6531 '(#:tests? #f))))
6532
6533 (define-public python2-pep8-1.5.7
6534 (package-with-python2 python-pep8-1.5.7))
6535
6536 ;; Flake8 2.4.1 requires an older version of pyflakes.
6537 ;; This should be removed ASAP.
6538 (define-public python-pyflakes-0.8.1
6539 (package (inherit python-pyflakes)
6540 (version "0.8.1")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (string-append
6545 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6546 version
6547 ".tar.gz"))
6548 (sha256
6549 (base32
6550 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6551 (arguments
6552 ;; XXX Tests not compatible with Python 3.5.
6553 '(#:tests? #f))))
6554
6555 (define-public python2-pyflakes-0.8.1
6556 (package-with-python2 python-pyflakes-0.8.1))
6557
6558 (define-public python-flake8
6559 (package
6560 (name "python-flake8")
6561 (version "2.5.4")
6562 (source
6563 (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "flake8" version))
6566 (sha256
6567 (base32
6568 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6569 (modules '((guix build utils)))
6570 (snippet
6571 '(begin
6572 ;; Remove pre-compiled .pyc files from source.
6573 (for-each delete-file-recursively
6574 (find-files "." "__pycache__" #:directories? #t))
6575 (for-each delete-file (find-files "." "\\.pyc$"))
6576 #t))))
6577 (build-system python-build-system)
6578 (propagated-inputs
6579 `(("python-pep8" ,python-pep8)
6580 ("python-pyflakes" ,python-pyflakes)
6581 ("python-mccabe" ,python-mccabe)))
6582 (native-inputs
6583 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6584 ("python-nose" ,python-nose)))
6585 (home-page "https://gitlab.com/pycqa/flake8")
6586 (synopsis
6587 "The modular source code checker: pep8, pyflakes and co")
6588 (description
6589 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6590 (license license:expat)))
6591
6592 (define-public python2-flake8
6593 (package-with-python2 python-flake8))
6594
6595 (define-public python-flake8-polyfill
6596 (package
6597 (name "python-flake8-polyfill")
6598 (version "1.0.1")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "flake8-polyfill" version))
6603 (sha256
6604 (base32
6605 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6606 (build-system python-build-system)
6607 (arguments
6608 '(#:phases
6609 (modify-phases %standard-phases
6610 (replace 'check
6611 (lambda _
6612 (setenv "PYTHONPATH"
6613 (string-append (getcwd) "/build/lib:"
6614 (getenv "PYTHONPATH")))
6615 (zero? (system* "py.test" "-v")))))))
6616 (native-inputs
6617 `(("python-flake8" ,python-flake8)
6618 ("python-mock" ,python-mock)
6619 ("python-pycodestyle" ,python-pycodestyle)
6620 ("python-pytest" ,python-pytest)))
6621 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6622 (synopsis "Polyfill package for Flake8 plugins")
6623 (description
6624 "This package that provides some compatibility helpers for Flake8
6625 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6626 (license license:expat)))
6627
6628 (define-public python2-flake8-polyfill
6629 (package-with-python2 python-flake8-polyfill))
6630
6631 (define-public python-mistune
6632 (package
6633 (name "python-mistune")
6634 (version "0.7.3")
6635 (source
6636 (origin
6637 (method url-fetch)
6638 (uri (pypi-uri "mistune" version))
6639 (sha256
6640 (base32
6641 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6642 (build-system python-build-system)
6643 (native-inputs
6644 `(("python-nose" ,python-nose)
6645 ("python-cython" ,python-cython)))
6646 (home-page "https://github.com/lepture/mistune")
6647 (synopsis "Markdown parser in pure Python")
6648 (description "This package provides a fast markdown parser in pure
6649 Python.")
6650 (license license:bsd-3)))
6651
6652 (define-public python2-mistune
6653 (package-with-python2 python-mistune))
6654
6655 (define-public python-markdown
6656 (package
6657 (name "python-markdown")
6658 (version "2.6.8")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (pypi-uri "Markdown" version))
6663 (sha256
6664 (base32
6665 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6666 (build-system python-build-system)
6667 (arguments
6668 `(#:phases
6669 (modify-phases %standard-phases
6670 (replace 'check
6671 (lambda _
6672 (zero? (system* "python" "run-tests.py")))))))
6673 (native-inputs
6674 `(("python-nose" ,python-nose)
6675 ("python-pyyaml" ,python-pyyaml)))
6676 (home-page "https://pythonhosted.org/Markdown/")
6677 (synopsis "Python implementation of Markdown")
6678 (description
6679 "This package provides a Python implementation of John Gruber's
6680 Markdown. The library features international input, various Markdown
6681 extensions, and several HTML output formats. A command line wrapper
6682 markdown_py is also provided to convert Markdown files to HTML.")
6683 (license license:bsd-3)))
6684
6685 (define-public python2-markdown
6686 (package-with-python2 python-markdown))
6687
6688 (define-public python-ptyprocess
6689 (package
6690 (name "python-ptyprocess")
6691 (version "0.5.1")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (string-append
6696 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6697 version ".tar.gz"))
6698 (sha256
6699 (base32
6700 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6701 (build-system python-build-system)
6702 (native-inputs
6703 `(("python-nose" ,python-nose)))
6704 (arguments
6705 `(#:phases
6706 (modify-phases %standard-phases
6707 (replace 'check
6708 (lambda _
6709 (zero? (system* "nosetests")))))))
6710 (home-page "https://github.com/pexpect/ptyprocess")
6711 (synopsis "Run a subprocess in a pseudo terminal")
6712 (description
6713 "This package provides a Python library used to launch a subprocess in a
6714 pseudo terminal (pty), and interact with both the process and its pty.")
6715 (license license:isc)))
6716
6717 (define-public python2-ptyprocess
6718 (package-with-python2 python-ptyprocess))
6719
6720 (define-public python-cram
6721 (package
6722 (name "python-cram")
6723 (version "0.7")
6724 (home-page "https://bitheap.org/cram/")
6725 (source (origin
6726 (method url-fetch)
6727 (uri (list (string-append home-page "cram-"
6728 version ".tar.gz")
6729 (pypi-uri "cram" version)))
6730 (sha256
6731 (base32
6732 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6733 (arguments
6734 '(#:phases
6735 (modify-phases %standard-phases
6736 (add-after 'unpack 'patch-source
6737 (lambda _
6738 (substitute* (find-files "cram" ".*\\.py$")
6739 ;; Replace default shell path.
6740 (("/bin/sh") (which "sh")))
6741 (substitute* (find-files "tests" ".*\\.t$")
6742 (("md5") "md5sum")
6743 (("/bin/bash") (which "bash"))
6744 (("/bin/sh") (which "sh")))
6745 (substitute* "cram/_test.py"
6746 ;; This hack works around a bug triggered by substituting
6747 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6748 ;; "cram -h", which breaks the output at 80 characters. This
6749 ;; causes the line showing the default shell to break into two
6750 ;; lines, but the test expects a single line...
6751 (("env\\['COLUMNS'\\] = '80'")
6752 "env['COLUMNS'] = '160'"))
6753 #t))
6754 (delete 'check)
6755 (add-after 'install 'check
6756 ;; The test phase uses the built library and executable.
6757 ;; It's easier to run it after install since the build
6758 ;; directory contains version-specific PATH.
6759 (lambda* (#:key inputs outputs #:allow-other-keys)
6760 (add-installed-pythonpath inputs outputs)
6761 (setenv "PATH" (string-append (getenv "PATH") ":"
6762 (assoc-ref outputs "out") "/bin"))
6763 (zero? (system* "make" "test")))))))
6764 (build-system python-build-system)
6765 (native-inputs
6766 `(("python-coverage" ,python-coverage)
6767 ("which" ,which)))
6768 (synopsis "Simple testing framework for command line applications")
6769 (description
6770 "Cram is a functional testing framework for command line applications.
6771 Cram tests look like snippets of interactive shell sessions. Cram runs each
6772 command and compares the command output in the test with the command’s actual
6773 output.")
6774 (license license:gpl2+)))
6775
6776 (define-public python2-cram
6777 (package-with-python2 python-cram))
6778
6779 (define-public python-terminado
6780 (package
6781 (name "python-terminado")
6782 (version "0.6")
6783 (source
6784 (origin
6785 (method url-fetch)
6786 (uri (pypi-uri "terminado" version))
6787 (sha256
6788 (base32
6789 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6790 (build-system python-build-system)
6791 (propagated-inputs
6792 `(("python-tornado" ,python-tornado)
6793 ("python-ptyprocess" ,python-ptyprocess)))
6794 (native-inputs
6795 `(("python-nose" ,python-nose)))
6796 (arguments
6797 `(#:phases
6798 (modify-phases %standard-phases
6799 (replace 'check
6800 (lambda _
6801 (zero? (system* "nosetests")))))))
6802 (home-page "https://github.com/takluyver/terminado")
6803 (synopsis "Terminals served to term.js using Tornado websockets")
6804 (description "This package provides a Tornado websocket backend for the
6805 term.js Javascript terminal emulator library.")
6806 (license license:bsd-2)
6807 (properties `((python2-variant . ,(delay python2-terminado))))))
6808
6809 (define-public python2-terminado
6810 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6811 (package (inherit terminado)
6812 (propagated-inputs
6813 `(("python2-backport-ssl-match-hostname"
6814 ,python2-backport-ssl-match-hostname)
6815 ,@(package-propagated-inputs terminado))))))
6816
6817 (define-public python-straight-plugin
6818 (package
6819 (name "python-straight-plugin")
6820 (version "1.4.1")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "straight.plugin" version))
6825 (sha256
6826 (base32
6827 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6828 (build-system python-build-system)
6829 (home-page "https://github.com/ironfroggy/straight.plugin")
6830 (synopsis "Simple namespaced plugin facility")
6831 (description "Straight Plugin provides a type of plugin you can create from
6832 almost any existing Python modules, and an easy way for outside developers to
6833 add functionality and customization to your projects with their own plugins.")
6834 (license license:expat)))
6835
6836 (define-public python2-straight-plugin
6837 (package-with-python2 python-straight-plugin))
6838
6839 (define-public python-fonttools
6840 (package
6841 (name "python-fonttools")
6842 (version "2.5")
6843 (source (origin
6844 (method url-fetch)
6845 (uri (string-append
6846 "https://pypi.python.org/packages/source/F/FontTools/"
6847 "fonttools-" version ".tar.gz"))
6848 (sha256
6849 (base32
6850 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6851 (build-system python-build-system)
6852 (arguments
6853 '(#:test-target "check"
6854 #:phases
6855 (modify-phases %standard-phases
6856 (add-after 'unpack 'patch-setuppy
6857 ;; Remove the undocumented "extra_path" argument, which adds an
6858 ;; intervening directories between site-packages and the package
6859 ;; directory.
6860 (lambda _
6861 (substitute* "setup.py"
6862 (("^[ \t]*extra_path *= *'FontTools',") ""))
6863 #t)))))
6864 (home-page "https://github.com/behdad/fonttools")
6865 (synopsis "Tools to manipulate font files")
6866 (description
6867 "FontTools/TTX is a library to manipulate font files from Python. It
6868 supports reading and writing of TrueType/OpenType fonts, reading and writing
6869 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6870 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6871 from an XML-based format.")
6872 (license (license:non-copyleft
6873 "file://LICENSE.txt"
6874 "See LICENSE.txt in the distribution."))))
6875
6876 (define-public python2-fonttools
6877 (package-with-python2 python-fonttools))
6878
6879 (define-public python-ly
6880 (package
6881 (name "python-ly")
6882 (version "0.9.4")
6883 (source
6884 (origin
6885 (method url-fetch)
6886 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6887 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6888 "/python-ly-" version ".tar.gz"))
6889 (sha256
6890 (base32
6891 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6892 (build-system python-build-system)
6893 (arguments
6894 ;; FIXME: Some tests need network access.
6895 '(#:tests? #f))
6896 (synopsis "Tool and library for manipulating LilyPond files")
6897 (description "This package provides a Python library to parse, manipulate
6898 or create documents in LilyPond format. A command line program ly is also
6899 provided that can be used to do various manipulations with LilyPond files.")
6900 (home-page "https://pypi.python.org/pypi/python-ly")
6901 (license license:gpl2+)))
6902
6903 (define-public python-appdirs
6904 (package
6905 (name "python-appdirs")
6906 (version "1.4.3")
6907 (source
6908 (origin
6909 (method url-fetch)
6910 (uri (pypi-uri "appdirs" version))
6911 (sha256
6912 (base32
6913 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6914 (build-system python-build-system)
6915 (home-page "https://github.com/ActiveState/appdirs")
6916 (synopsis
6917 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6918 (description
6919 "This module provides a portable way of finding out where user data
6920 should be stored on various operating systems.")
6921 (license license:expat)))
6922
6923 (define-public python2-appdirs
6924 (package-with-python2 python-appdirs))
6925
6926 (define-public python-llfuse
6927 (package
6928 (name "python-llfuse")
6929 (version "1.2")
6930 (source (origin
6931 (method url-fetch)
6932 (uri (string-append
6933 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6934 "llfuse-" version ".tar.bz2"))
6935 (sha256
6936 (base32
6937 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
6938 (build-system python-build-system)
6939 (inputs
6940 `(("fuse" ,fuse)
6941 ("attr" ,attr)))
6942 (native-inputs
6943 `(("pkg-config" ,pkg-config)))
6944 (synopsis "Python bindings for FUSE")
6945 (description
6946 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6947 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6948 (license license:lgpl2.0+)
6949 (properties `((python2-variant . ,(delay python2-llfuse))))))
6950
6951 (define-public python2-llfuse
6952 (package (inherit (package-with-python2
6953 (strip-python2-variant python-llfuse)))
6954 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6955
6956 ;; For attic-0.16
6957 (define-public python-llfuse-0.41
6958 (package (inherit python-llfuse)
6959 (version "0.41.1")
6960 (source (origin
6961 (method url-fetch)
6962 (uri (string-append
6963 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6964 "llfuse-" version ".tar.bz2"))
6965 (sha256
6966 (base32
6967 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6968 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6969 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6970 (license (list license:expat license:lgpl2.0+))))
6971
6972 (define-public python-msgpack
6973 (package
6974 (name "python-msgpack")
6975 (version "0.4.8")
6976 (source (origin
6977 (method url-fetch)
6978 (uri (pypi-uri "msgpack-python" version))
6979 (sha256
6980 (base32
6981 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6982 (build-system python-build-system)
6983 (synopsis "MessagePack (de)serializer")
6984 (description "MessagePack is a fast, compact binary serialization format,
6985 suitable for similar data to JSON. This package provides CPython bindings for
6986 reading and writing MessagePack data.")
6987 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6988 (license license:asl2.0)))
6989
6990 (define-public python2-msgpack
6991 (package-with-python2 python-msgpack))
6992
6993 (define-public python-netaddr
6994 (package
6995 (name "python-netaddr")
6996 (version "0.7.18")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (string-append
7001 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7002 version
7003 ".tar.gz"))
7004 (sha256
7005 (base32
7006 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7007 (build-system python-build-system)
7008 (arguments `(#:tests? #f)) ;; No tests.
7009 (home-page "https://github.com/drkjam/netaddr/")
7010 (synopsis "Pythonic manipulation of network addresses")
7011 (description
7012 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7013 and MAC network addresses.")
7014 (license license:bsd-3)))
7015
7016 (define-public python2-netaddr
7017 (package-with-python2 python-netaddr))
7018
7019 (define-public python-wrapt
7020 (package
7021 (name "python-wrapt")
7022 (version "1.10.8")
7023 (source
7024 (origin
7025 (method url-fetch)
7026 (uri (pypi-uri "wrapt" version))
7027 (sha256
7028 (base32
7029 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7030 (build-system python-build-system)
7031 (arguments
7032 ;; Tests are not included in the tarball, they are only available in the
7033 ;; git repository.
7034 `(#:tests? #f))
7035 (home-page "https://github.com/GrahamDumpleton/wrapt")
7036 (synopsis "Module for decorators, wrappers and monkey patching")
7037 (description
7038 "The aim of the wrapt module is to provide a transparent object proxy for
7039 Python, which can be used as the basis for the construction of function
7040 wrappers and decorator functions.")
7041 (license license:bsd-2)))
7042
7043 (define-public python2-wrapt
7044 (package-with-python2 python-wrapt))
7045
7046 (define-public python-iso8601
7047 (package
7048 (name "python-iso8601")
7049 (version "0.1.11")
7050 (source
7051 (origin
7052 (method url-fetch)
7053 (uri (pypi-uri "iso8601" version))
7054 (sha256
7055 (base32
7056 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7057 (build-system python-build-system)
7058 (native-inputs
7059 `(("python-pytest" ,python-pytest)))
7060 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7061 (synopsis "Module to parse ISO 8601 dates")
7062 (description
7063 "This module parses the most common forms of ISO 8601 date strings (e.g.
7064 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7065 (license license:expat)))
7066
7067 (define-public python2-iso8601
7068 (package-with-python2 python-iso8601))
7069
7070 (define-public python-monotonic
7071 (package
7072 (name "python-monotonic")
7073 (version "0.3")
7074 (source
7075 (origin
7076 (method url-fetch)
7077 (uri (string-append
7078 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7079 version
7080 ".tar.gz"))
7081 (sha256
7082 (base32
7083 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7084 (build-system python-build-system)
7085 (home-page "https://github.com/atdt/monotonic")
7086 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7087 (description
7088 "This module provides a monotonic() function which returns the value (in
7089 fractional seconds) of a clock which never goes backwards.")
7090 (license license:asl2.0)))
7091
7092 (define-public python2-monotonic
7093 (package-with-python2 python-monotonic))
7094
7095 (define-public python-webob
7096 (package
7097 (name "python-webob")
7098 (version "1.5.1")
7099 (source
7100 (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "WebOb" version))
7103 (sha256
7104 (base32
7105 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7106 (build-system python-build-system)
7107 (native-inputs
7108 `(("python-nose" ,python-nose)))
7109 (home-page "http://webob.org/")
7110 (synopsis "WSGI request and response object")
7111 (description
7112 "WebOb provides wrappers around the WSGI request environment, and an
7113 object to help create WSGI responses.")
7114 (license license:expat)))
7115
7116 (define-public python2-webob
7117 (package-with-python2 python-webob))
7118
7119 (define-public python-xlrd
7120 (package
7121 (name "python-xlrd")
7122 (version "1.0.0")
7123 (source (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "xlrd" version))
7126 (sha256
7127 (base32
7128 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7129 (build-system python-build-system)
7130 (arguments
7131 `(#:phases
7132 (modify-phases %standard-phases
7133 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7134 ;; run tests instead for now.
7135 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7136 (native-inputs `(("python-nose" ,python-nose)))
7137 (home-page "http://www.python-excel.org/")
7138 (synopsis "Library for extracting data from Excel files")
7139 (description "This packages provides a library to extract data from
7140 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7141 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7142 Unicode-aware. It is not intended as an end-user tool.")
7143 (license license:bsd-3)))
7144
7145 (define-public python2-xlrd
7146 (package-with-python2 python-xlrd))
7147
7148 (define-public python-prettytable
7149 (package
7150 (name "python-prettytable")
7151 (version "0.7.2")
7152 (source
7153 (origin
7154 (method url-fetch)
7155 (uri (string-append
7156 "https://pypi.python.org/packages/source/P/PrettyTable/"
7157 "prettytable-" version ".tar.bz2"))
7158 (sha256
7159 (base32
7160 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7161 (build-system python-build-system)
7162 (home-page "http://code.google.com/p/prettytable/")
7163 (synopsis "Display tabular data in an ASCII table format")
7164 (description
7165 "A library designed to represent tabular data in visually appealing ASCII
7166 tables. PrettyTable allows for selection of which columns are to be printed,
7167 independent alignment of columns (left or right justified or centred) and
7168 printing of sub-tables by specifying a row range.")
7169 (license license:bsd-3)))
7170
7171 (define-public python2-prettytable
7172 (package-with-python2 python-prettytable))
7173
7174 (define-public python-tables
7175 (package
7176 (name "python-tables")
7177 (version "3.2.2")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "tables" version))
7182 (sha256
7183 (base32
7184 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7185 (modules '((guix build utils)))
7186 (snippet
7187 '(begin
7188 ;; Remove pre-compiled .pyc files from source.
7189 (for-each delete-file-recursively
7190 (find-files "." "__pycache__" #:directories? #t))
7191 (for-each delete-file (find-files "." "\\.pyc$"))
7192 #t))))
7193 (build-system python-build-system)
7194 (arguments
7195 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7196 ;; or "check", so we must override the build and check phases.
7197 #:phases
7198 (modify-phases %standard-phases
7199 (add-after 'unpack 'use-gcc
7200 (lambda _
7201 (substitute* "setup.py"
7202 (("compiler = new_compiler\\(\\)" line)
7203 (string-append line
7204 "\ncompiler.set_executables(compiler='gcc',"
7205 "compiler_so='gcc',"
7206 "linker_exe='gcc',"
7207 "linker_so='gcc -shared')")))
7208 #t))
7209 (replace 'build
7210 (lambda* (#:key inputs #:allow-other-keys)
7211 (zero? (system* "python" "setup.py" "build"
7212 (string-append "--hdf5="
7213 (assoc-ref inputs "hdf5"))))))
7214 (replace 'check
7215 (lambda* (#:key inputs #:allow-other-keys)
7216 (zero? (system* "python" "setup.py" "check"
7217 (string-append "--hdf5="
7218 (assoc-ref inputs "hdf5")))))))))
7219 (propagated-inputs
7220 `(("python-numexpr" ,python-numexpr)
7221 ("python-numpy" ,python-numpy)))
7222 (native-inputs
7223 `(("python-cython" ,python-cython)
7224 ("pkg-config" ,pkg-config)))
7225 (inputs
7226 `(("hdf5" ,hdf5)
7227 ("bzip2" ,bzip2)
7228 ("zlib" ,zlib)))
7229 (home-page "http://www.pytables.org/")
7230 (synopsis "Hierarchical datasets for Python")
7231 (description "PyTables is a package for managing hierarchical datasets and
7232 designed to efficiently cope with extremely large amounts of data.")
7233 (license license:bsd-3)))
7234
7235 (define-public python2-tables
7236 (package-with-python2 python-tables))
7237
7238 (define-public python-pyasn1
7239 (package
7240 (name "python-pyasn1")
7241 (version "0.2.3")
7242 (source
7243 (origin
7244 (method url-fetch)
7245 (uri (pypi-uri "pyasn1" version))
7246 (sha256
7247 (base32
7248 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7249 (build-system python-build-system)
7250 (home-page "http://pyasn1.sourceforge.net/")
7251 (synopsis "ASN.1 types and codecs")
7252 (description
7253 "This is an implementation of ASN.1 types and codecs in Python. It is
7254 suitable for a wide range of protocols based on the ASN.1 specification.")
7255 (license license:bsd-2)))
7256
7257 (define-public python2-pyasn1
7258 (package-with-python2 python-pyasn1))
7259
7260 (define-public python-pyasn1-modules
7261 (package
7262 (name "python-pyasn1-modules")
7263 (version "0.0.8")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "pyasn1-modules" version))
7268 (sha256
7269 (base32
7270 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7271 (build-system python-build-system)
7272 (propagated-inputs
7273 `(("python-pyasn1" ,python-pyasn1)))
7274 (home-page "https://sourceforge.net/projects/pyasn1/")
7275 (synopsis "ASN.1 codec implementations")
7276 (description
7277 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7278 implementations of ASN.1-based codecs and protocols.")
7279 (license license:bsd-3)))
7280
7281 (define-public python2-pyasn1-modules
7282 (package-with-python2 python-pyasn1-modules))
7283
7284 (define-public python-ipaddress
7285 (package
7286 (name "python-ipaddress")
7287 (version "1.0.18")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "ipaddress" version))
7291 (sha256
7292 (base32
7293 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7294 (build-system python-build-system)
7295 (home-page "https://github.com/phihag/ipaddress")
7296 (synopsis "IP address manipulation library")
7297 (description
7298 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7299 in Python. This library is used to create, poke at, and manipulate IPv4 and
7300 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7301 module to older versions of Python.")
7302 (license license:psfl)))
7303
7304 (define-public python2-ipaddress
7305 (package-with-python2 python-ipaddress))
7306
7307 (define-public python2-ipaddr
7308 (package
7309 (name "python2-ipaddr")
7310 (version "2.1.11")
7311 (source
7312 (origin
7313 (method url-fetch)
7314 (uri (pypi-uri "ipaddr" version))
7315 (sha256
7316 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7317 (build-system python-build-system)
7318 (arguments
7319 `(#:python ,python-2 ;version 2 only
7320 #:phases
7321 (modify-phases %standard-phases
7322 (replace 'check
7323 (lambda* _
7324 (zero? (system* "python" "ipaddr_test.py")))))))
7325 (home-page "https://github.com/google/ipaddr-py")
7326 (synopsis "IP address manipulation library")
7327 (description
7328 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7329 IPv6 addresses and networks.
7330
7331 For new implementations you may prefer to use the standard module
7332 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7333 versions of Python.")
7334 (license license:asl2.0)))
7335
7336 (define-public python-idna
7337 (package
7338 (name "python-idna")
7339 (version "2.5")
7340 (source
7341 (origin
7342 (method url-fetch)
7343 (uri (pypi-uri "idna" version))
7344 (sha256
7345 (base32
7346 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7347 (build-system python-build-system)
7348 (home-page "https://github.com/kjd/idna")
7349 (synopsis "Internationalized domain names in applications")
7350 (description
7351 "This is a library to support the Internationalised Domain Names in
7352 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7353 protocol is often referred to as “IDNA2008” and can produce different results
7354 from the earlier standard from 2003. The library is also intended to act as a
7355 suitable drop-in replacement for the “encodings.idna” module that comes with
7356 the Python standard library but currently only supports the older 2003
7357 specification.")
7358 (license license:bsd-4)))
7359
7360 (define-public python2-idna
7361 (package-with-python2 python-idna))
7362
7363 (define-public python-pretend
7364 (package
7365 (name "python-pretend")
7366 (version "1.0.8")
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (string-append "https://pypi.python.org/packages/source/p/"
7371 "pretend/pretend-" version ".tar.gz"))
7372 (sha256
7373 (base32
7374 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7375 (build-system python-build-system)
7376 (home-page "https://github.com/alex/pretend")
7377 (synopsis "Library for stubbing in Python")
7378 (description
7379 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7380 technique for writing tests. You may hear the term mixed up with mocks,
7381 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7382 responses, rather than doing any computation.")
7383 (license license:bsd-3)))
7384
7385 (define-public python2-pretend
7386 (package-with-python2 python-pretend))
7387
7388 (define-public python-cryptography-vectors
7389 (package
7390 (name "python-cryptography-vectors")
7391 (version "1.9")
7392 (source
7393 (origin
7394 (method url-fetch)
7395 (uri (pypi-uri "cryptography_vectors" version))
7396 (sha256
7397 (base32
7398 "1wvq1p1viam1diz9x6d61x1bsy6cninv7cjgd35x9ffig9r6gxxv"))))
7399 (build-system python-build-system)
7400 (home-page "https://github.com/pyca/cryptography")
7401 (synopsis "Test vectors for the cryptography package")
7402 (description
7403 "This package contains test vectors for the cryptography package.")
7404 ;; Distributed under either BSD-3 or ASL2.0
7405 (license (list license:bsd-3 license:asl2.0))))
7406
7407 (define-public python2-cryptography-vectors
7408 (package-with-python2 python-cryptography-vectors))
7409
7410 (define-public python-cryptography
7411 (package
7412 (name "python-cryptography")
7413 (version "1.9")
7414 (source
7415 (origin
7416 (method url-fetch)
7417 (uri (pypi-uri "cryptography" version))
7418 (sha256
7419 (base32
7420 "10j8r1s29f4h59kp3mla14g588rm7qpn90nrczijk03i49q3662m"))))
7421 (build-system python-build-system)
7422 (inputs
7423 `(("openssl" ,openssl)))
7424 (propagated-inputs
7425 `(("python-asn1crypto" ,python-asn1crypto)
7426 ("python-cffi" ,python-cffi)
7427 ("python-six" ,python-six)
7428 ("python-idna" ,python-idna)
7429 ("python-iso8601" ,python-iso8601)))
7430 (native-inputs
7431 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7432 ("python-hypothesis" ,python-hypothesis)
7433 ("python-pretend" ,python-pretend)
7434 ("python-pytz" ,python-pytz)
7435 ("python-pytest" ,python-pytest-3.0)))
7436 (home-page "https://github.com/pyca/cryptography")
7437 (synopsis "Cryptographic recipes and primitives for Python")
7438 (description
7439 "cryptography is a package which provides cryptographic recipes and
7440 primitives to Python developers. It aims to be the “cryptographic standard
7441 library” for Python. The package includes both high level recipes, and low
7442 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7443 message digests and key derivation functions.")
7444 ;; Distributed under either BSD-3 or ASL2.0
7445 (license (list license:bsd-3 license:asl2.0))
7446 (properties `((python2-variant . ,(delay python2-cryptography))))))
7447
7448 (define-public python2-cryptography
7449 (let ((crypto (package-with-python2
7450 (strip-python2-variant python-cryptography))))
7451 (package (inherit crypto)
7452 (propagated-inputs
7453 `(("python2-ipaddress" ,python2-ipaddress)
7454 ("python2-backport-ssl-match-hostname"
7455 ,python2-backport-ssl-match-hostname)
7456 ("python2-enum34" ,python2-enum34)
7457 ,@(package-propagated-inputs crypto))))))
7458
7459 (define-public python-pyopenssl
7460 (package
7461 (name "python-pyopenssl")
7462 (version "17.1.0")
7463 (source
7464 (origin
7465 (method url-fetch)
7466 (uri (pypi-uri "pyOpenSSL" version))
7467 (sha256
7468 (base32
7469 "0qwmqhfsq84ydir9dz273ypmlcvs7v71m1jns0sd4k0h6lfsa82s"))))
7470 (build-system python-build-system)
7471 (arguments
7472 '(#:phases
7473 (modify-phases %standard-phases
7474 (delete 'check)
7475 (add-after 'install 'check
7476 (lambda* (#:key inputs outputs #:allow-other-keys)
7477 (add-installed-pythonpath inputs outputs)
7478 (zero? (system* "py.test" "-v" "-k"
7479 (string-append
7480 ;; This test tries to look up certificates from
7481 ;; the compiled-in default path in OpenSSL, which
7482 ;; does not exist in the build environment.
7483 "not test_fallback_default_verify_paths "
7484 ;; This test attempts to make a connection to
7485 ;; an external web service.
7486 "and not test_set_default_verify_paths"))))))))
7487 (propagated-inputs
7488 `(("python-cryptography" ,python-cryptography)
7489 ("python-six" ,python-six)))
7490 (inputs
7491 `(("openssl" ,openssl)))
7492 (native-inputs
7493 `(("python-pretend" ,python-pretend)
7494 ("python-pytest" ,python-pytest-3.0)))
7495 (home-page "https://github.com/pyca/pyopenssl")
7496 (synopsis "Python wrapper module around the OpenSSL library")
7497 (description
7498 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7499 library.")
7500 (license license:asl2.0)))
7501
7502 (define-public python2-pyopenssl
7503 (package-with-python2 python-pyopenssl))
7504
7505 (define-public python-pip
7506 (package
7507 (name "python-pip")
7508 (version "9.0.1")
7509 (source
7510 (origin
7511 (method url-fetch)
7512 (uri (pypi-uri "pip" version))
7513 (sha256
7514 (base32
7515 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7516 (build-system python-build-system)
7517 (arguments
7518 '(#:tests? #f)) ; there are no tests in the pypi archive.
7519 (home-page "https://pip.pypa.io/")
7520 (synopsis "Package manager for Python software")
7521 (description
7522 "Pip is a package manager for Python software, that finds packages on the
7523 Python Package Index (PyPI).")
7524 (license license:expat)))
7525
7526 (define-public python2-pip
7527 (package-with-python2 python-pip))
7528
7529 (define-public python-tlsh
7530 (package
7531 (name "python-tlsh")
7532 (version "3.4.4")
7533 (home-page "https://github.com/trendmicro/tlsh")
7534 (source (origin
7535 (method url-fetch)
7536 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7537 version ".tar.gz"))
7538 (sha256
7539 (base32
7540 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7541 (file-name (string-append name "-" version ".tar.gz"))))
7542 (build-system cmake-build-system)
7543 (arguments
7544 '(#:out-of-source? #f
7545 #:phases (modify-phases %standard-phases
7546 (replace
7547 'install
7548 (lambda* (#:key outputs #:allow-other-keys)
7549 ;; Build and install the Python bindings. The underlying
7550 ;; C++ library is apparently not meant to be installed.
7551 (let ((out (assoc-ref outputs "out")))
7552 (with-directory-excursion "py_ext"
7553 (and (system* "python" "setup.py" "build")
7554 (system* "python" "setup.py" "install"
7555 (string-append "--prefix=" out))))))))))
7556 (inputs `(("python" ,python-wrapper))) ;for the bindings
7557 (synopsis "Fuzzy matching library for Python")
7558 (description
7559 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7560 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7561 value which can be used for similarity comparisons. Similar objects have
7562 similar hash values, which allows for the detection of similar objects by
7563 comparing their hash values. The byte stream should have a sufficient amount
7564 of complexity; for example, a byte stream of identical bytes will not generate
7565 a hash value.")
7566 (license license:asl2.0)))
7567
7568 (define-public python2-tlsh
7569 (package
7570 (inherit python-tlsh)
7571 (name "python2-tlsh")
7572 (inputs `(("python" ,python-2)))))
7573
7574 (define-public python-termcolor
7575 (package
7576 (name "python-termcolor")
7577 (version "1.1.0")
7578 (source
7579 (origin
7580 (method url-fetch)
7581 (uri (pypi-uri "termcolor" version))
7582 (sha256
7583 (base32
7584 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7585 (build-system python-build-system)
7586 (arguments
7587 ;; There are no tests.
7588 `(#:tests? #f))
7589 (home-page "http://pypi.python.org/pypi/termcolor")
7590 (synopsis "ANSII Color formatting for terminal output")
7591 (description
7592 "This package provides ANSII Color formatting for output in terminals.")
7593 (license license:expat)))
7594
7595 (define-public python2-termcolor
7596 (package-with-python2 python-termcolor))
7597
7598 (define-public python-libarchive-c
7599 (package
7600 (name "python-libarchive-c")
7601 (version "2.2")
7602 (source (origin
7603 (method url-fetch)
7604 (uri (pypi-uri "libarchive-c" version))
7605 (sha256
7606 (base32
7607 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7608 (build-system python-build-system)
7609 (arguments
7610 '(#:phases (modify-phases %standard-phases
7611 (add-before
7612 'build 'reference-libarchive
7613 (lambda* (#:key inputs #:allow-other-keys)
7614 ;; Retain the absolute file name of libarchive.so.
7615 (let ((libarchive (assoc-ref inputs "libarchive")))
7616 (substitute* "libarchive/ffi.py"
7617 (("find_library\\('archive'\\)")
7618 (string-append "'" libarchive
7619 "/lib/libarchive.so'")))))))))
7620 (inputs
7621 `(("libarchive" ,libarchive)))
7622 (home-page "https://github.com/Changaco/python-libarchive-c")
7623 (synopsis "Python interface to libarchive")
7624 (description
7625 "This package provides Python bindings to libarchive, a C library to
7626 access possibly compressed archives in many different formats. It uses
7627 Python's @code{ctypes} foreign function interface (FFI).")
7628 (license license:lgpl2.0+)))
7629
7630 (define-public python2-libarchive-c
7631 (package-with-python2 python-libarchive-c))
7632
7633 (define-public python-file
7634 (package
7635 (inherit file)
7636 (name "python-file")
7637 (source (origin
7638 (inherit (package-source file))
7639 ;; This patch should not be applied to python2-file.
7640 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7641 (build-system python-build-system)
7642 (arguments
7643 '(#:tests? #f ;no tests
7644 #:configure-flags '("--single-version-externally-managed" "--root=/")
7645 #:phases (modify-phases %standard-phases
7646 (add-before 'build 'change-directory
7647 (lambda _
7648 (chdir "python")
7649 #t))
7650 (add-before 'build 'set-library-file-name
7651 (lambda* (#:key inputs #:allow-other-keys)
7652 (let ((file (assoc-ref inputs "file")))
7653 (substitute* "magic.py"
7654 (("find_library\\('magic'\\)")
7655 (string-append "'" file "/lib/libmagic.so'")))
7656 #t))))))
7657 (inputs `(("file" ,file)))
7658 (self-native-input? #f)
7659 (synopsis "Python bindings to the libmagic file type guesser. Note that
7660 this module and the python-magic module both provide a \"magic.py\" file;
7661 these two modules, which are different and were developed separately, both
7662 serve the same purpose: provide Python bindings for libmagic.")))
7663
7664 (define-public python2-file
7665 (package-with-python2 python-file))
7666
7667 (define-public python-debian
7668 (package
7669 (name "python-debian")
7670 (version "0.1.28")
7671 (source
7672 (origin
7673 (method url-fetch)
7674 (uri (pypi-uri name version))
7675 (sha256
7676 (base32
7677 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7678 (build-system python-build-system)
7679 (propagated-inputs
7680 `(("python-six" ,python-six)))
7681 (home-page "http://packages.debian.org/sid/python-debian")
7682 (synopsis "Debian package related modules")
7683 (description
7684 ;; XXX: Use @enumerate instead of @itemize to work around
7685 ;; <http://bugs.gnu.org/21772>.
7686 "This package provides Python modules that abstract many formats of
7687 Debian-related files, such as:
7688
7689 @enumerate
7690 @item Debtags information;
7691 @item @file{debian/changelog} files;
7692 @item packages files, pdiffs;
7693 @item control files of single or multiple RFC822-style paragraphs---e.g.
7694 @file{debian/control}, @file{.changes}, @file{.dsc};
7695 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7696 contained files and meta-information.
7697 @end enumerate\n")
7698
7699 ;; Modules are either GPLv2+ or GPLv3+.
7700 (license license:gpl3+)))
7701
7702 (define-public python2-debian
7703 (package-with-python2 python-debian))
7704
7705 (define-public python-nbformat
7706 (package
7707 (name "python-nbformat")
7708 (version "4.1.0")
7709 (source
7710 (origin
7711 (method url-fetch)
7712 (uri (pypi-uri "nbformat" version))
7713 (sha256
7714 (base32
7715 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7716 (build-system python-build-system)
7717 (arguments `(#:tests? #f)) ; no test target
7718 (propagated-inputs
7719 `(("python-ipython-genutils" ,python-ipython-genutils)
7720 ("python-jsonschema" ,python-jsonschema)
7721 ("python-jupyter-core" ,python-jupyter-core)
7722 ("python-traitlets" ,python-traitlets)))
7723 (home-page "http://jupyter.org")
7724 (synopsis "Jupyter Notebook format")
7725 (description "This package provides the reference implementation of the
7726 Jupyter Notebook format and Python APIs for working with notebooks.")
7727 (license license:bsd-3)))
7728
7729 (define-public python2-nbformat
7730 (package-with-python2 python-nbformat))
7731
7732 (define-public python-bleach
7733 (package
7734 (name "python-bleach")
7735 (version "1.4.3")
7736 (source
7737 (origin
7738 (method url-fetch)
7739 (uri (pypi-uri "bleach" version))
7740 (sha256
7741 (base32
7742 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7743 (build-system python-build-system)
7744 (propagated-inputs
7745 `(("python-html5lib" ,python-html5lib-0.9)
7746 ("python-six" ,python-six)))
7747 (native-inputs
7748 `(("python-nose" ,python-nose)))
7749 (home-page "https://github.com/jsocol/bleach")
7750 (synopsis "Whitelist-based HTML-sanitizing tool")
7751 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7752 (license license:asl2.0)))
7753
7754 (define-public python2-bleach
7755 (package-with-python2 python-bleach))
7756
7757 (define-public python-entrypoints
7758 (package
7759 (name "python-entrypoints")
7760 (version "0.2.2")
7761 (source
7762 (origin
7763 (method url-fetch)
7764 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7765 version ".tar.gz"))
7766 (file-name (string-append name "-" version ".tar.gz"))
7767 (sha256
7768 (base32
7769 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7770 (build-system python-build-system)
7771 ;; The package does not come with a setup.py file, so we have to generate
7772 ;; one ourselves.
7773 (arguments
7774 `(#:tests? #f
7775 #:phases
7776 (modify-phases %standard-phases
7777 (add-after 'unpack 'create-setup.py
7778 (lambda _
7779 (call-with-output-file "setup.py"
7780 (lambda (port)
7781 (format port "\
7782 from setuptools import setup
7783 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7784 " ,version))))))))
7785 (home-page "https://github.com/takluyver/entrypoints")
7786 (synopsis "Discover and load entry points from installed Python packages")
7787 (description "Entry points are a way for Python packages to advertise
7788 objects with some common interface. The most common examples are
7789 @code{console_scripts} entry points, which define shell commands by
7790 identifying a Python function to run. The @code{entrypoints} module contains
7791 functions to find and load entry points.")
7792 (license license:expat)))
7793
7794 (define-public python2-entrypoints
7795 (package-with-python2 python-entrypoints))
7796
7797 (define-public python-nbconvert
7798 (package
7799 (name "python-nbconvert")
7800 (version "5.0.0b1")
7801 (source
7802 (origin
7803 (method url-fetch)
7804 (uri (pypi-uri "nbconvert" version))
7805 (sha256
7806 (base32
7807 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7808 (build-system python-build-system)
7809 (arguments
7810 `(;; The "bdist_egg" target is disabled by default, causing the installation
7811 ;; to fail.
7812 #:configure-flags (list "bdist_egg")
7813 ;; FIXME: 5 failures, 40 errors.
7814 #:tests? #f))
7815 ;; #:phases
7816 ;; (modify-phases %standard-phases
7817 ;; (replace 'check
7818 ;; (lambda _
7819 ;; (zero? (system* "py.test" "-v")))))
7820 (native-inputs
7821 `(("python-pytest" ,python-pytest)))
7822 (propagated-inputs
7823 `(("python-bleach" ,python-bleach)
7824 ("python-entrypoints" ,python-entrypoints)
7825 ("python-jinja2" ,python-jinja2)
7826 ("python-jupyter-core" ,python-jupyter-core)
7827 ("python-mistune" ,python-mistune)
7828 ("python-nbformat" ,python-nbformat)
7829 ("python-pygments" ,python-pygments)
7830 ("python-traitlets" ,python-traitlets)))
7831 (home-page "http://jupyter.org")
7832 (synopsis "Converting Jupyter Notebooks")
7833 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7834 notebooks to various other formats via Jinja templates. It allows you to
7835 convert an @code{.ipynb} notebook file into various static formats including:
7836
7837 @enumerate
7838 @item HTML
7839 @item LaTeX
7840 @item PDF
7841 @item Reveal JS
7842 @item Markdown (md)
7843 @item ReStructured Text (rst)
7844 @item executable script
7845 @end enumerate\n")
7846 (license license:bsd-3)))
7847
7848 (define-public python2-nbconvert
7849 (package-with-python2 python-nbconvert))
7850
7851 (define-public python-notebook
7852 (package
7853 (name "python-notebook")
7854 (version "4.2.3")
7855 (source (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "notebook" version))
7858 (sha256
7859 (base32
7860 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7861 (build-system python-build-system)
7862 (arguments
7863 `(#:phases
7864 (modify-phases %standard-phases
7865 (replace 'check
7866 (lambda _
7867 ;; HOME must be set for tests
7868 (setenv "HOME" "/tmp")
7869 (zero? (system* "nosetests")))))))
7870 (propagated-inputs
7871 `(("python-jupyter-core" ,python-jupyter-core)
7872 ("python-nbformat" ,python-nbformat)
7873 ("python-nbconvert" ,python-nbconvert)
7874 ("python-ipython" ,python-ipython)))
7875 (native-inputs
7876 `(("python-nose" ,python-nose)
7877 ("python-sphinx" ,python-sphinx)
7878 ("python-requests" ,python-requests)))
7879 (home-page "http://jupyter.org/")
7880 (synopsis "Web-based notebook environment for interactive computing")
7881 (description
7882 "The Jupyter HTML notebook is a web-based notebook environment for
7883 interactive computing.")
7884 (properties `((python2-variant . ,(delay python2-notebook))))
7885 (license license:bsd-3)))
7886
7887 (define-public python2-notebook
7888 (let ((base (package-with-python2
7889 (strip-python2-variant python-notebook))))
7890 (package (inherit base)
7891 (native-inputs
7892 `(("python2-mock" ,python2-mock)
7893 ,@(package-native-inputs base)))
7894 (arguments
7895 (substitute-keyword-arguments (package-arguments base)
7896 ((#:phases phases)
7897 `(modify-phases ,phases
7898 (add-before 'check 'disable-test-case
7899 ;; The test requires network access to localhost. Curiously it
7900 ;; fails with Python 2 only. Simply make the test-case return
7901 ;; immediately.
7902 (lambda _
7903 (substitute*
7904 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7905 (("formats = self.nbconvert_api") "return #")))))))))))
7906
7907 (define-public python-widgetsnbextension
7908 (package
7909 (name "python-widgetsnbextension")
7910 (version "1.2.6")
7911 (source
7912 (origin
7913 (method url-fetch)
7914 (uri (pypi-uri "widgetsnbextension" version))
7915 (sha256
7916 (base32
7917 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7918 (build-system python-build-system)
7919 (propagated-inputs
7920 `(("python-notebook" ,python-notebook)))
7921 (native-inputs
7922 `(("python-certifi" ,python-certifi)
7923 ("python-nose" ,python-nose)))
7924 (home-page "http://ipython.org")
7925 (synopsis "IPython HTML widgets for Jupyter")
7926 (description "This package provides interactive HTML widgets for Jupyter
7927 notebooks.")
7928 (license license:bsd-3)))
7929
7930 (define-public python2-widgetsnbextension
7931 (package-with-python2 python-widgetsnbextension))
7932
7933 (define-public python-ipywidgets
7934 (package
7935 (name "python-ipywidgets")
7936 (version "5.2.2")
7937 (source
7938 (origin
7939 (method url-fetch)
7940 (uri (pypi-uri "ipywidgets" version))
7941 (sha256
7942 (base32
7943 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
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-ipython" ,python-ipython)
7950 ("python-traitlets" ,python-traitlets)
7951 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7952 (home-page "http://ipython.org")
7953 (synopsis "IPython HTML widgets for Jupyter")
7954 (description "Ipywidgets are interactive HTML widgets for Jupyter
7955 notebooks and the IPython kernel. Notebooks come alive when interactive
7956 widgets are used. Users gain control of their data and can visualize changes
7957 in the data.")
7958 (license license:bsd-3)))
7959
7960 (define-public python2-ipywidgets
7961 (package-with-python2 python-ipywidgets))
7962
7963 (define-public python-jupyter-console
7964 (package
7965 (name "python-jupyter-console")
7966 (version "5.0.0")
7967 (source
7968 (origin
7969 (method url-fetch)
7970 (uri (pypi-uri "jupyter_console" version))
7971 (sha256
7972 (base32
7973 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7974 (build-system python-build-system)
7975 ;; FIXME: it's not clear how to run the tests.
7976 (arguments `(#:tests? #f))
7977 (propagated-inputs
7978 `(("python-ipykernel" ,python-ipykernel)
7979 ("python-ipython" ,python-ipython)
7980 ("python-jupyter-client" ,python-jupyter-client)
7981 ("python-prompt-toolkit" ,python-prompt-toolkit)
7982 ("python-pygments" ,python-pygments)))
7983 (home-page "https://jupyter.org")
7984 (synopsis "Jupyter terminal console")
7985 (description "This package provides a terminal-based console frontend for
7986 Jupyter kernels. It also allows for console-based interaction with non-Python
7987 Jupyter kernels such as IJulia and IRKernel.")
7988 (license license:bsd-3)))
7989
7990 (define-public python2-jupyter-console
7991 (package-with-python2 python-jupyter-console))
7992
7993 (define-public jupyter
7994 (package
7995 (name "jupyter")
7996 (version "1.0.0")
7997 (source
7998 (origin
7999 (method url-fetch)
8000 (uri (pypi-uri "jupyter" version))
8001 (sha256
8002 (base32
8003 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8004 (build-system python-build-system)
8005 ;; FIXME: it's not clear how to run the tests.
8006 (arguments `(#:tests? #f))
8007 (propagated-inputs
8008 `(("python-ipykernel" ,python-ipykernel)
8009 ("python-ipywidgets" ,python-ipywidgets)
8010 ("python-jupyter-console" ,python-jupyter-console)
8011 ("python-nbconvert" ,python-nbconvert)
8012 ("python-notebook" ,python-notebook)))
8013 (home-page "http://jupyter.org")
8014 (synopsis "Web application for interactive documents")
8015 (description
8016 "The Jupyter Notebook is a web application that allows you to create and
8017 share documents that contain live code, equations, visualizations and
8018 explanatory text. Uses include: data cleaning and transformation, numerical
8019 simulation, statistical modeling, machine learning and much more.")
8020 (license license:bsd-3)))
8021
8022 (define-public python-chardet
8023 (package
8024 (name "python-chardet")
8025 (version "2.3.0")
8026 (source
8027 (origin
8028 (method url-fetch)
8029 (uri (string-append
8030 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8031 version
8032 ".tar.gz"))
8033 (sha256
8034 (base32
8035 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8036 (build-system python-build-system)
8037 (home-page "https://github.com/chardet/chardet")
8038 (synopsis "Universal encoding detector for Python 2 and 3")
8039 (description
8040 "This package provides @code{chardet}, a Python module that can
8041 automatically detect a wide range of file encodings.")
8042 (license license:lgpl2.1+)))
8043
8044 (define-public python2-chardet
8045 (package-with-python2 python-chardet))
8046
8047 (define-public python-docopt
8048 (package
8049 (name "python-docopt")
8050 (version "0.6.2")
8051 (source
8052 (origin
8053 (method url-fetch)
8054 ;; The release on PyPI does not include tests.
8055 (uri (string-append
8056 "https://github.com/docopt/docopt/archive/"
8057 version ".tar.gz"))
8058 (file-name (string-append name "-" version ".tar.gz"))
8059 (sha256
8060 (base32
8061 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8062 (build-system python-build-system)
8063 (native-inputs
8064 `(("python-pytest" ,python-pytest)))
8065 (arguments
8066 `(#:phases (alist-replace
8067 'check
8068 (lambda _ (zero? (system* "py.test")))
8069 %standard-phases)))
8070 (home-page "http://docopt.org")
8071 (synopsis "Command-line interface description language for Python")
8072 (description "This library allows the user to define a command-line
8073 interface from a program's help message rather than specifying it
8074 programatically with command-line parsers like @code{getopt} and
8075 @code{argparse}.")
8076 (license license:expat)))
8077
8078 (define-public python2-docopt
8079 (package-with-python2 python-docopt))
8080
8081 (define-public python-zope-event
8082 (package
8083 (name "python-zope-event")
8084 (version "4.1.0")
8085 (source
8086 (origin
8087 (method url-fetch)
8088 (uri (string-append "https://pypi.python.org/packages/source/z"
8089 "/zope.event/zope.event-" version ".tar.gz"))
8090 (sha256
8091 (base32
8092 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8093 (build-system python-build-system)
8094 (home-page "http://pypi.python.org/pypi/zope.event")
8095 (synopsis "Event publishing system for Python")
8096 (description "Zope.event provides an event publishing API, intended for
8097 use by applications which are unaware of any subscribers to their events. It
8098 is a simple event-dispatching system on which more sophisticated event
8099 dispatching systems can be built.")
8100 (license license:zpl2.1)))
8101
8102 (define-public python2-zope-event
8103 (package-with-python2 python-zope-event))
8104
8105 (define-public python-zope-interface
8106 (package
8107 (name "python-zope-interface")
8108 (version "4.1.3")
8109 (source
8110 (origin
8111 (method url-fetch)
8112 (uri (string-append "https://pypi.python.org/packages/source/z"
8113 "/zope.interface/zope.interface-" version ".tar.gz"))
8114 (sha256
8115 (base32
8116 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8117 (build-system python-build-system)
8118 (native-inputs
8119 `(("python-zope-event" ,python-zope-event)))
8120 (home-page "https://github.com/zopefoundation/zope.interface")
8121 (synopsis "Python implementation of the \"design by contract\"
8122 methodology")
8123 (description "Zope.interface provides an implementation of \"object
8124 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8125 conforming to a given API or contract.")
8126 (license license:zpl2.1)))
8127
8128 (define-public python2-zope-interface
8129 (package-with-python2 python-zope-interface))
8130
8131 (define-public python-zope-exceptions
8132 (package
8133 (name "python-zope-exceptions")
8134 (version "4.0.8")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (string-append "https://pypi.python.org/packages/source/z"
8139 "/zope.exceptions/zope.exceptions-"
8140 version ".tar.gz"))
8141 (sha256
8142 (base32
8143 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8144 (build-system python-build-system)
8145 (arguments
8146 '(#:tests? #f)) ; circular dependency with zope.testrunner
8147 (propagated-inputs
8148 `(("python-zope-interface" ,python-zope-interface)))
8149 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8150 (synopsis "Zope exceptions")
8151 (description "Zope.exceptions provides general-purpose exception types
8152 that have uses outside of the Zope framework.")
8153 (license license:zpl2.1)))
8154
8155 (define-public python2-zope-exceptions
8156 (package-with-python2 python-zope-exceptions))
8157
8158 (define-public python-zope-testing
8159 (package
8160 (name "python-zope-testing")
8161 (version "4.5.0")
8162 (source
8163 (origin
8164 (method url-fetch)
8165 (uri (string-append "https://pypi.python.org/packages/source/z"
8166 "/zope.testing/zope.testing-" version ".tar.gz"))
8167 (sha256
8168 (base32
8169 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8170 (modules '((guix build utils)))
8171 (snippet
8172 '(begin
8173 ;; Remove pre-compiled .pyc files backup files from source.
8174 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8175 #t))))
8176 (build-system python-build-system)
8177 (native-inputs
8178 `(("python-zope-exceptions" ,python-zope-exceptions)))
8179 (propagated-inputs
8180 `(("python-zope-interface" ,python-zope-interface)))
8181 (home-page "http://pypi.python.org/pypi/zope.testing")
8182 (synopsis "Zope testing helpers")
8183 (description "Zope.testing provides a number of testing utilities for HTML
8184 forms, HTTP servers, regular expressions, and more.")
8185 (license license:zpl2.1)))
8186
8187 (define-public python2-zope-testing
8188 (package-with-python2 python-zope-testing))
8189
8190 (define-public python-zope-testrunner
8191 (package
8192 (name "python-zope-testrunner")
8193 (version "4.4.9")
8194 (source
8195 (origin
8196 (method url-fetch)
8197 (uri (string-append "https://pypi.python.org/packages/source/z"
8198 "/zope.testrunner/zope.testrunner-"
8199 version ".zip"))
8200 (sha256
8201 (base32
8202 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8203 (build-system python-build-system)
8204 (arguments
8205 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8206 (native-inputs
8207 `(("python-six" ,python-six)
8208 ;("python-zope-interface" ,python-zope-interface)
8209 ("python-zope-exceptions" ,python-zope-exceptions)
8210 ("python-zope-testing" ,python-zope-testing)
8211 ("unzip" ,unzip)))
8212 (propagated-inputs
8213 `(("python-zope-interface" ,python-zope-interface)))
8214 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8215 (synopsis "Zope testrunner script")
8216 (description "Zope.testrunner provides a script for running Python
8217 tests.")
8218 (license license:zpl2.1)))
8219
8220 (define-public python2-zope-testrunner
8221 (let ((base (package-with-python2 python-zope-testrunner)))
8222 (package
8223 (inherit base)
8224 (native-inputs
8225 (append (package-native-inputs base)
8226 `(("python2-subunit" ,python2-subunit)
8227 ("python2-mimeparse" ,python2-mimeparse)))))))
8228
8229 (define-public python-zope-i18nmessageid
8230 (package
8231 (name "python-zope-i18nmessageid")
8232 (version "4.0.3")
8233 (source
8234 (origin
8235 (method url-fetch)
8236 (uri (string-append
8237 "https://pypi.python.org/packages/source/z"
8238 "/zope.i18nmessageid/zope.i18nmessageid-"
8239 version ".tar.gz"))
8240 (sha256
8241 (base32
8242 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8243 (build-system python-build-system)
8244 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8245 (synopsis "Message identifiers for internationalization")
8246 (description "Zope.i18nmessageid provides facilities for declaring
8247 internationalized messages within program source text.")
8248 (license license:zpl2.1)))
8249
8250 (define-public python2-zope-i18nmessageid
8251 (package-with-python2 python-zope-i18nmessageid))
8252
8253 (define-public python-zope-schema
8254 (package
8255 (name "python-zope-schema")
8256 (version "4.4.2")
8257 (source
8258 (origin
8259 (method url-fetch)
8260 (uri (string-append "https://pypi.python.org/packages/source/z"
8261 "/zope.schema/zope.schema-" version ".tar.gz"))
8262 (sha256
8263 (base32
8264 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8265 (build-system python-build-system)
8266 (arguments
8267 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8268 (propagated-inputs
8269 `(("python-zope-event" ,python-zope-event)
8270 ("python-zope-exceptions", python-zope-exceptions)
8271 ("python-zope-interface" ,python-zope-interface)))
8272 (native-inputs
8273 `(("python-zope-testing" ,python-zope-testing)
8274 ("python-coverage" ,python-coverage)
8275 ("python-nose" ,python-nose)))
8276 (home-page "http://pypi.python.org/pypi/zope.schema")
8277 (synopsis "Zope data schemas")
8278 (description "Zope.scheme provides extensions to zope.interface for
8279 defining data schemas.")
8280 (license license:zpl2.1)))
8281
8282 (define-public python2-zope-schema
8283 (package-with-python2 python-zope-schema))
8284
8285 (define-public python-zope-configuration
8286 (package
8287 (name "python-zope-configuration")
8288 (version "4.0.3")
8289 (source (origin
8290 (method url-fetch)
8291 (uri (string-append "https://pypi.python.org/packages/source/z"
8292 "/zope.configuration/zope.configuration-"
8293 version ".tar.gz"))
8294 (sha256
8295 (base32
8296 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8297 (build-system python-build-system)
8298 (arguments
8299 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8300 (propagated-inputs
8301 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8302 ("python-zope-schema" ,python-zope-schema)))
8303 (home-page "http://pypi.python.org/pypi/zope.configuration")
8304 (synopsis "Zope Configuration Markup Language")
8305 (description "Zope.configuration implements ZCML, the Zope Configuration
8306 Markup Language.")
8307 (license license:zpl2.1)))
8308
8309 (define-public python2-zope-configuration
8310 (package-with-python2 python-zope-configuration))
8311
8312 (define-public python-zope-proxy
8313 (package
8314 (name "python-zope-proxy")
8315 (version "4.1.6")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (string-append "https://pypi.python.org/packages/source/z"
8320 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8321 (sha256
8322 (base32
8323 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8324 (build-system python-build-system)
8325 (arguments
8326 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8327 (propagated-inputs
8328 `(("python-zope-interface" ,python-zope-interface)))
8329 (home-page "http://pypi.python.org/pypi/zope.proxy")
8330 (synopsis "Generic, transparent proxies")
8331 (description "Zope.proxy provides generic, transparent proxies for Python.
8332 Proxies are special objects which serve as mostly-transparent wrappers around
8333 another object, intervening in the apparent behavior of the wrapped object
8334 only when necessary to apply the policy (e.g., access checking, location
8335 brokering, etc.) for which the proxy is responsible.")
8336 (license license:zpl2.1)))
8337
8338 (define-public python2-zope-proxy
8339 (package-with-python2 python-zope-proxy))
8340
8341 (define-public python-zope-location
8342 (package
8343 (name "python-zope-location")
8344 (version "4.0.3")
8345 (source
8346 (origin
8347 (method url-fetch)
8348 (uri (string-append "https://pypi.python.org/packages/source/z"
8349 "/zope.location/zope.location-" version ".tar.gz"))
8350 (sha256
8351 (base32
8352 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8353 (build-system python-build-system)
8354 (arguments
8355 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8356 (propagated-inputs
8357 `(("python-zope-proxy" ,python-zope-proxy)
8358 ("python-zope-schema" ,python-zope-schema)))
8359 (home-page "http://pypi.python.org/pypi/zope.location/")
8360 (synopsis "Zope location library")
8361 (description "Zope.location implements the concept of \"locations\" in
8362 Zope3, which are are special objects that have a structural location.")
8363 (license license:zpl2.1)))
8364
8365 (define-public python2-zope-location
8366 (package-with-python2 python-zope-location))
8367
8368 (define-public python-zope-security
8369 (package
8370 (name "python-zope-security")
8371 (version "4.0.3")
8372 (source
8373 (origin
8374 (method url-fetch)
8375 (uri (string-append "https://pypi.python.org/packages/source/z"
8376 "/zope.security/zope.security-" version ".tar.gz"))
8377 (sha256
8378 (base32
8379 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8380 (build-system python-build-system)
8381 (arguments
8382 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8383 (propagated-inputs
8384 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8385 ("python-zope-proxy" ,python-zope-proxy)
8386 ("python-zope-schema" ,python-zope-schema)))
8387 (native-inputs
8388 `(("python-six" ,python-six)
8389 ("python-zope-component" ,python-zope-component)
8390 ("python-zope-configuration" ,python-zope-configuration)
8391 ("python-zope-location" ,python-zope-location)
8392 ("python-zope-testrunner" ,python-zope-testrunner)
8393 ("python-zope-testing" ,python-zope-testing)))
8394 (home-page "http://pypi.python.org/pypi/zope.security")
8395 (synopsis "Zope security framework")
8396 (description "Zope.security provides a generic mechanism to implement
8397 security policies on Python objects.")
8398 (license license:zpl2.1)))
8399
8400 (define-public python2-zope-security
8401 (let ((zope-security (package-with-python2 python-zope-security)))
8402 (package (inherit zope-security)
8403 (propagated-inputs
8404 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8405 ,@(alist-delete
8406 "python-zope-testrunner"
8407 (package-propagated-inputs zope-security)))))))
8408
8409 (define-public python-zope-component
8410 (package
8411 (name "python-zope-component")
8412 (version "4.3.0")
8413 (source
8414 (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "zope.component" version))
8417 (sha256
8418 (base32
8419 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8420 (build-system python-build-system)
8421 (arguments
8422 ;; Skip tests due to circular dependency with python-zope-security.
8423 '(#:tests? #f))
8424 (native-inputs
8425 `(("python-zope-testing" ,python-zope-testing)))
8426 (propagated-inputs
8427 `(("python-zope-event" ,python-zope-event)
8428 ("python-zope-interface" ,python-zope-interface)
8429 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8430 ("python-zope-configuration" ,python-zope-configuration)))
8431 (home-page "https://github.com/zopefoundation/zope.component")
8432 (synopsis "Zope Component Architecture")
8433 (description "Zope.component represents the core of the Zope Component
8434 Architecture. Together with the zope.interface package, it provides
8435 facilities for defining, registering and looking up components.")
8436 (license license:zpl2.1)))
8437
8438 (define-public python2-zope-component
8439 (package-with-python2 python-zope-component))
8440
8441 (define-public python-pythondialog
8442 (package
8443 (name "python-pythondialog")
8444 (version "3.4.0")
8445 (source
8446 (origin
8447 (method url-fetch)
8448 (uri (pypi-uri "pythondialog" version))
8449 (sha256
8450 (base32
8451 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8452 (build-system python-build-system)
8453 (arguments
8454 `(#:phases
8455 (modify-phases %standard-phases
8456 (add-after 'unpack 'patch-path
8457 (lambda* (#:key inputs #:allow-other-keys)
8458 (let* ((dialog (assoc-ref inputs "dialog")))
8459 ;; Since this library really wants to grovel the search path, we
8460 ;; must hardcode dialog's store path into it.
8461 (substitute* "dialog.py"
8462 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8463 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8464 #t))))
8465 #:tests? #f)) ; no test suite
8466 (propagated-inputs
8467 `(("dialog" ,dialog)))
8468 (home-page "http://pythondialog.sourceforge.net/")
8469 (synopsis "Python interface to the UNIX dialog utility")
8470 (description "A Python wrapper for the dialog utility. Its purpose is to
8471 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8472 This allows one to make simple text-mode user interfaces on Unix-like systems")
8473 (license license:lgpl2.1)
8474 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8475
8476 (define-public python2-pythondialog
8477 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8478 (package
8479 (inherit base)
8480 (version (package-version python-pythondialog))
8481 (source (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "python2-pythondialog" version))
8484 (sha256
8485 (base32
8486 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8487
8488 (define-public python-pyrfc3339
8489 (package
8490 (name "python-pyrfc3339")
8491 (version "1.0")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "pyRFC3339" version))
8496 (sha256
8497 (base32
8498 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8499 (build-system python-build-system)
8500 (propagated-inputs
8501 `(("python-pytz" ,python-pytz)))
8502 (native-inputs
8503 `(("python-nose" ,python-nose)))
8504 (home-page "https://github.com/kurtraschke/pyRFC3339")
8505 (synopsis "Python timestamp library")
8506 (description "Python library for generating and parsing RFC 3339-compliant
8507 timestamps.")
8508 (license license:expat)))
8509
8510 (define-public python2-pyrfc3339
8511 (package-with-python2 python-pyrfc3339))
8512
8513 (define-public python-werkzeug
8514 (package
8515 (name "python-werkzeug")
8516 (version "0.11.15")
8517 (source
8518 (origin
8519 (method url-fetch)
8520 (uri (pypi-uri "Werkzeug" version))
8521 (sha256
8522 (base32
8523 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8524 (build-system python-build-system)
8525 (native-inputs
8526 `(("python-pytest" ,python-pytest)))
8527 (home-page "http://werkzeug.pocoo.org/")
8528 (synopsis "Utilities for WSGI applications")
8529 (description "One of the most advanced WSGI utility modules. It includes a
8530 powerful debugger, full-featured request and response objects, HTTP utilities to
8531 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8532 uploads, a powerful URL routing system and a bunch of community-contributed
8533 addon modules.")
8534 (license license:x11)))
8535
8536 (define-public python2-werkzeug
8537 (package-with-python2 python-werkzeug))
8538
8539 (define-public python-configobj
8540 (package
8541 (name "python-configobj")
8542 (version "5.0.6")
8543 (source (origin
8544 (method url-fetch)
8545 (uri (string-append
8546 "https://pypi.python.org/packages/source/c/configobj/"
8547 "configobj-" version ".tar.gz"))
8548 (sha256
8549 (base32
8550 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8551 ;; Patch setup.py so it looks for python-setuptools, which is
8552 ;; required to parse the keyword 'install_requires' in setup.py.
8553 (patches (search-patches "python-configobj-setuptools.patch"))))
8554 (build-system python-build-system)
8555 (propagated-inputs
8556 `(("python-six" ,python-six)))
8557 (synopsis "Config file reading, writing and validation")
8558 (description "ConfigObj is a simple but powerful config file reader and
8559 writer: an ini file round tripper. Its main feature is that it is very easy to
8560 use, with a straightforward programmer’s interface and a simple syntax for
8561 config files.")
8562 (home-page "https://github.com/DiffSK/configobj")
8563 (license license:bsd-3)))
8564
8565 (define-public python2-configobj
8566 (package-with-python2 python-configobj))
8567
8568 (define-public python-configargparse
8569 (package
8570 (name "python-configargparse")
8571 (version "0.10.0")
8572 (source (origin
8573 (method url-fetch)
8574 (uri (string-append
8575 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8576 "ConfigArgParse-" version ".tar.gz"))
8577 (sha256
8578 (base32
8579 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8580 (build-system python-build-system)
8581 (arguments
8582 ;; FIXME: Bug in test suite filed upstream:
8583 ;; https://github.com/bw2/ConfigArgParse/issues/32
8584 '(#:tests? #f))
8585 (synopsis "Replacement for argparse")
8586 (description "A drop-in replacement for argparse that allows options to also
8587 be set via config files and/or environment variables.")
8588 (home-page "https://github.com/bw2/ConfigArgParse")
8589 (license license:expat)))
8590
8591 (define-public python2-configargparse
8592 (package-with-python2 python-configargparse))
8593
8594 (define-public python-ndg-httpsclient
8595 (package
8596 (name "python-ndg-httpsclient")
8597 (version "0.4.2")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "ndg_httpsclient" version))
8601 (sha256
8602 (base32
8603 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8604 (build-system python-build-system)
8605 (arguments
8606 '(;; The tests appear to require networking.
8607 #:tests? #f))
8608 (propagated-inputs
8609 `(("python-pyopenssl" ,python-pyopenssl)))
8610 (synopsis "HTTPS support for Python's httplib and urllib2")
8611 (description "This is a HTTPS client implementation for httplib and urllib2
8612 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8613 over the default provided with Python and importantly enables full verification
8614 of the SSL peer.")
8615 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8616 (license license:bsd-3)))
8617
8618 ;; python2-openssl requires special care, so package-with-python2 is
8619 ;; insufficient.
8620 (define-public python2-ndg-httpsclient
8621 (package (inherit python-ndg-httpsclient)
8622 (name "python2-ndg-httpsclient")
8623 (arguments `(#:python ,python-2))
8624 (propagated-inputs
8625 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8626
8627 (define-public python-contextlib2
8628 (package
8629 (name "python-contextlib2")
8630 (version "0.4.0")
8631 (source
8632 (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "contextlib2" version))
8635 (sha256
8636 (base32
8637 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8638 (build-system python-build-system)
8639 (arguments
8640 `(#:phases
8641 (modify-phases %standard-phases
8642 (replace 'check
8643 (lambda _ (zero?
8644 (system*
8645 "python" "test_contextlib2.py" "-v")))))))
8646 (home-page "http://contextlib2.readthedocs.org/")
8647 (synopsis "Tools for decorators and context managers")
8648 (description "This module is primarily a backport of the Python
8649 3.2 contextlib to earlier Python versions. Like contextlib, it
8650 provides utilities for common tasks involving decorators and context
8651 managers. It also contains additional features that are not part of
8652 the standard library.")
8653 (license license:psfl)))
8654
8655 (define-public python2-contextlib2
8656 (package-with-python2 python-contextlib2))
8657
8658 (define-public python-texttable
8659 (package
8660 (name "python-texttable")
8661 (version "0.8.7")
8662 (source
8663 (origin
8664 (method url-fetch)
8665 (uri (pypi-uri "texttable" version))
8666 (sha256
8667 (base32
8668 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8669 (build-system python-build-system)
8670 (arguments '(#:tests? #f)) ; no tests
8671 (home-page "https://github.com/foutaise/texttable/")
8672 (synopsis "Python module for creating simple ASCII tables")
8673 (description "Texttable is a Python module for creating simple ASCII
8674 tables.")
8675 (license license:lgpl2.1+)))
8676
8677 (define-public python2-texttable
8678 (package-with-python2 python-texttable))
8679
8680 (define-public python-websocket-client
8681 (package
8682 (name "python-websocket-client")
8683 (version "0.37.0")
8684 (source
8685 (origin
8686 (method url-fetch)
8687 (uri (pypi-uri "websocket_client" version))
8688 (sha256
8689 (base32
8690 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8691 (build-system python-build-system)
8692 (propagated-inputs
8693 `(("python-six" ,python-six)))
8694 (home-page "https://github.com/liris/websocket-client")
8695 (synopsis "WebSocket client for Python")
8696 (description "The Websocket-client module provides the low level APIs for
8697 WebSocket usage in Python programs.")
8698 (license license:lgpl2.1+)))
8699
8700 (define-public python2-websocket-client
8701 (package-with-python2 python-websocket-client))
8702
8703 (define-public python-atomicwrites
8704 (package
8705 (name "python-atomicwrites")
8706 (version "1.1.5")
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "atomicwrites" version))
8710 (sha256
8711 (base32
8712 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8713 (build-system python-build-system)
8714 (synopsis "Atomic file writes in Python")
8715 (description "Library for atomic file writes using platform dependent tools
8716 for atomic file system operations.")
8717 (home-page "https://github.com/untitaker/python-atomicwrites")
8718 (license license:expat)))
8719
8720 (define-public python2-atomicwrites
8721 (package-with-python2 python-atomicwrites))
8722
8723 (define-public python-requests-toolbelt
8724 (package
8725 (name "python-requests-toolbelt")
8726 (version "0.6.2")
8727 (source (origin
8728 (method url-fetch)
8729 (uri (string-append
8730 "https://pypi.python.org/packages/"
8731 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8732 "requests-toolbelt-" version ".tar.gz"))
8733 (sha256
8734 (base32
8735 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8736 (build-system python-build-system)
8737 (native-inputs
8738 `(("python-betamax" ,python-betamax)
8739 ("python-mock" ,python-mock)
8740 ("python-pytest" ,python-pytest)))
8741 (propagated-inputs
8742 `(("python-requests" ,python-requests)))
8743 (synopsis "Extensions to python-requests")
8744 (description "This is a toolbelt of useful classes and functions to be used
8745 with python-requests.")
8746 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8747 (license license:asl2.0)))
8748
8749 (define-public python-click-threading
8750 (package
8751 (name "python-click-threading")
8752 (version "0.2.0")
8753 (source (origin
8754 (method url-fetch)
8755 (uri (string-append
8756 "https://pypi.python.org/packages/"
8757 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8758 "click-threading-" version ".tar.gz"))
8759 (sha256
8760 (base32
8761 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8762 (build-system python-build-system)
8763 (propagated-inputs
8764 `(("python-click" ,python-click)))
8765 (synopsis "Utilities for multithreading in Click")
8766 (description "This package provides utilities for multithreading in Click
8767 applications.")
8768 (home-page "https://github.com/click-contrib/click-threading")
8769 (license license:expat)))
8770
8771 (define-public python-click-log
8772 (package
8773 (name "python-click-log")
8774 (version "0.1.8")
8775 (source (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "click-log" version))
8778 (sha256
8779 (base32
8780 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8781 (build-system python-build-system)
8782 (propagated-inputs
8783 `(("python-click" ,python-click)))
8784 (synopsis "Logging for click applications")
8785 (description "This package provides a Python library for logging Click
8786 applications.")
8787 (home-page "https://github.com/click-contrib/click-log")
8788 (license license:expat)))
8789
8790 (define-public python-apipkg
8791 (package
8792 (name "python-apipkg")
8793 (version "1.4")
8794 (source (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "apipkg" version))
8797 (sha256
8798 (base32
8799 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8800 (build-system python-build-system)
8801 (native-inputs
8802 `(("python-pytest" ,python-pytest)))
8803 (synopsis "Namespace control and lazy-import mechanism")
8804 (description "With apipkg you can control the exported namespace of a Python
8805 package and greatly reduce the number of imports for your users. It is a small
8806 pure Python module that works on virtually all Python versions.")
8807 (home-page "https://bitbucket.org/hpk42/apipkg")
8808 (license license:expat)))
8809
8810 (define-public python2-apipkg
8811 (package-with-python2 python-apipkg))
8812
8813 (define-public python-execnet
8814 (package
8815 (name "python-execnet")
8816 (version "1.4.1")
8817 (source (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "execnet" version))
8820 (sha256
8821 (base32
8822 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8823 (build-system python-build-system)
8824 (arguments
8825 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8826 ;; The two test failures are caused by the lack of an `ssh` executable.
8827 ;; The test suite can be run with pytest after the 'install' phase.
8828 #:tests? #f))
8829 (native-inputs
8830 `(("python-pytest" ,python-pytest)
8831 ("python-setuptools-scm" ,python-setuptools-scm)))
8832 (propagated-inputs
8833 `(("python-apipkg" ,python-apipkg)))
8834 (synopsis "Rapid multi-Python deployment")
8835 (description "Execnet provides a share-nothing model with
8836 channel-send/receive communication for distributing execution across many
8837 Python interpreters across version, platform and network barriers. It has a
8838 minimal and fast API targeting the following uses:
8839 @enumerate
8840 @item distribute tasks to (many) local or remote CPUs
8841 @item write and deploy hybrid multi-process applications
8842 @item write scripts to administer multiple environments
8843 @end enumerate")
8844 (home-page "http://codespeak.net/execnet/")
8845 (license license:expat)))
8846
8847 (define-public python2-execnet
8848 (package-with-python2 python-execnet))
8849
8850 (define-public python-trollius-redis
8851 (package
8852 (name "python-trollius-redis")
8853 (version "0.1.4")
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "trollius_redis" version))
8858 (sha256
8859 (base32
8860 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8861 (build-system python-build-system)
8862 ;; TODO: Tests require packaging 'hiredis'.
8863 (arguments '(#:tests? #f))
8864 (home-page "https://github.com/benjolitz/trollius-redis")
8865 (synopsis "Port of asyncio-redis to trollius")
8866 (description "@code{trollius-redis} is a Redis client for Python
8867 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8868 Redis protocol.")
8869 (license license:bsd-2)))
8870
8871 (define-public python2-trollius-redis
8872 (package-with-python2 python-trollius-redis))
8873
8874 ;;; The software provided by this package was integrated into pytest 2.8.
8875 (define-public python-pytest-cache
8876 (package
8877 (name "python-pytest-cache")
8878 (version "1.0")
8879 (source (origin
8880 (method url-fetch)
8881 (uri (pypi-uri "pytest-cache" version))
8882 (sha256
8883 (base32
8884 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8885 (build-system python-build-system)
8886 (propagated-inputs
8887 `(("python-apipkg" ,python-apipkg)
8888 ("python-execnet" ,python-execnet)
8889 ("python-py" ,python-py)
8890 ("python-pytest" ,python-pytest)))
8891 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8892 (description "The pytest-cache plugin provides tools to rerun failures from
8893 the last py.test invocation.")
8894 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8895 (license license:expat)))
8896
8897 (define-public python2-pytest-cache
8898 (package-with-python2 python-pytest-cache))
8899
8900 (define-public python-pytest-localserver
8901 (package
8902 (name "python-pytest-localserver")
8903 (version "0.3.5")
8904 (source (origin
8905 (method url-fetch)
8906 (uri (pypi-uri "pytest-localserver" version))
8907 (sha256
8908 (base32
8909 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8910 (build-system python-build-system)
8911 (arguments
8912 `(#:phases (modify-phases %standard-phases
8913 (replace 'check
8914 (lambda _
8915 (zero? (system* "py.test" "--genscript=runtests.py"))
8916 (zero? (system* "py.test")))))))
8917 (native-inputs
8918 `(("python-pytest" ,python-pytest)
8919 ("python-requests" ,python-requests)
8920 ("python-six" ,python-six)))
8921 (propagated-inputs
8922 `(("python-werkzeug" ,python-werkzeug)))
8923 (synopsis "Py.test plugin to test server connections locally")
8924 (description "Pytest-localserver is a plugin for the pytest testing
8925 framework which enables you to test server connections locally.")
8926 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8927 (license license:expat)))
8928
8929 (define-public python-wsgi-intercept
8930 (package
8931 (name "python-wsgi-intercept")
8932 (version "1.2.2")
8933 (source (origin
8934 (method url-fetch)
8935 (uri (string-append
8936 "https://pypi.python.org/packages/"
8937 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8938 "wsgi_intercept-" version ".tar.gz"))
8939 (sha256
8940 (base32
8941 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8942 (build-system python-build-system)
8943 (propagated-inputs
8944 `(("python-six" ,python-six)))
8945 (native-inputs
8946 `(("python-pytest" ,python-pytest)
8947 ("python-httplib2" ,python-httplib2)
8948 ("python-requests" ,python-requests)
8949 ("python-urllib3" ,python-urllib3)))
8950 (synopsis "Puts a WSGI application in place of a real URI for testing")
8951 (description "Wsgi_intercept installs a WSGI application in place of a real
8952 URI for testing. Testing a WSGI application normally involves starting a
8953 server at a local host and port, then pointing your test code to that address.
8954 Instead, this library lets you intercept calls to any specific host/port
8955 combination and redirect them into a WSGI application importable by your test
8956 program. Thus, you can avoid spawning multiple processes or threads to test
8957 your Web app.")
8958 (home-page "https://github.com/cdent/wsgi-intercept")
8959 (license license:expat)))
8960
8961 (define-public python-pytest-xprocess
8962 (package
8963 (name "python-pytest-xprocess")
8964 (version "0.9.1")
8965 (source (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "pytest-xprocess" version))
8968 (sha256
8969 (base32
8970 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8971 (build-system python-build-system)
8972 (propagated-inputs
8973 `(("python-pytest" ,python-pytest)
8974 ("python-pytest-cache" ,python-pytest-cache)
8975 ("python-psutil" ,python-psutil)))
8976 (synopsis "Pytest plugin to manage external processes across test runs")
8977 (description "Pytest-xprocess is an experimental py.test plugin for managing
8978 processes across test runs.")
8979 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8980 (license license:expat)))
8981
8982 (define-public python-icalendar
8983 (package
8984 (name "python-icalendar")
8985 (version "3.11.4")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "icalendar" version))
8989 (sha256
8990 (base32
8991 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
8992 (build-system python-build-system)
8993 (propagated-inputs
8994 `(("python-dateutil" ,python-dateutil)
8995 ("python-pytz" ,python-pytz)))
8996 (synopsis "Python library for parsing iCalendar files")
8997 (description "The icalendar package is a parser/generator of iCalendar
8998 files for use with Python.")
8999 (home-page "https://github.com/collective/icalendar")
9000 (license license:bsd-2)))
9001
9002 (define-public python-sphinxcontrib-newsfeed
9003 (package
9004 (name "python-sphinxcontrib-newsfeed")
9005 (version "0.1.4")
9006 (source (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9009 (sha256
9010 (base32
9011 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9012 (arguments '(#:tests? #f)) ; No tests.
9013 (build-system python-build-system)
9014 (propagated-inputs
9015 `(("python-sphinx" ,python-sphinx)))
9016 (synopsis "News Feed extension for Sphinx")
9017 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9018 Blog, News or Announcements section to a Sphinx website.")
9019 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9020 (license license:bsd-2)))
9021
9022 (define-public python-args
9023 (package
9024 (name "python-args")
9025 (version "0.1.0")
9026 (source (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "args" version))
9029 (sha256
9030 (base32
9031 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9032 (build-system python-build-system)
9033 (home-page "https://github.com/kennethreitz/args")
9034 (synopsis "Command-line argument parser")
9035 (description
9036 "This library provides a Python module to parse command-line arguments.")
9037 (license license:bsd-3)))
9038
9039 (define-public python2-args
9040 (package-with-python2 python-args))
9041
9042 (define-public python-clint
9043 (package
9044 (name "python-clint")
9045 (version "0.5.1")
9046 (source (origin
9047 (method url-fetch)
9048 (uri (pypi-uri "clint" version))
9049 (sha256
9050 (base32
9051 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9052 (build-system python-build-system)
9053 (arguments
9054 '(#:phases
9055 (modify-phases %standard-phases
9056 (replace 'check
9057 (lambda _
9058 (zero? (system* "py.test" "-v")))))))
9059 (native-inputs
9060 `(("python-pytest" ,python-pytest)))
9061 (propagated-inputs
9062 `(("python-args" ,python-args)))
9063 (home-page "https://github.com/kennethreitz/clint")
9064 (synopsis "Command-line interface tools")
9065 (description
9066 "Clint is a Python module filled with a set of tools for developing
9067 command-line applications, including tools for colored and indented
9068 output, progress bar display, and pipes.")
9069 (license license:isc)))
9070
9071 (define-public python2-clint
9072 (package-with-python2 python-clint))
9073
9074 (define-public python-astor
9075 (package
9076 (name "python-astor")
9077 (version "0.5")
9078 (source (origin
9079 (method url-fetch)
9080 (uri (pypi-uri "astor" version))
9081 (sha256
9082 (base32
9083 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9084 (build-system python-build-system)
9085 (home-page "https://github.com/berkerpeksag/astor")
9086 (synopsis "Read and write Python ASTs")
9087 (description
9088 "Astor is designed to allow easy manipulation of Python source via the
9089 Abstract Syntax Tree.")
9090 (license license:bsd-3)))
9091
9092 (define-public python2-astor
9093 (package-with-python2 python-astor))
9094
9095 (define-public python-rply
9096 (package
9097 (name "python-rply")
9098 (version "0.7.4")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "rply" version))
9102 (sha256
9103 (base32
9104 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9105 (build-system python-build-system)
9106 (propagated-inputs
9107 `(("python-appdirs" ,python-appdirs)))
9108 (home-page "https://github.com/alex/rply")
9109 (synopsis "Parser generator for Python")
9110 (description
9111 "This package provides a pure Python based parser generator, that also
9112 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9113 with a new public API, and RPython support.")
9114 (license license:bsd-3)))
9115
9116 (define-public python2-rply
9117 (package-with-python2 python-rply))
9118
9119 (define-public python-hy
9120 (package
9121 (name "python-hy")
9122 (version "0.11.1")
9123 (source (origin
9124 (method url-fetch)
9125 (uri (pypi-uri "hy" version))
9126 (sha256
9127 (base32
9128 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9129 (build-system python-build-system)
9130 (arguments
9131 '(#:phases
9132 (modify-phases %standard-phases
9133 (replace 'check
9134 (lambda _
9135 ;; Tests require write access to HOME.
9136 (setenv "HOME" "/tmp")
9137 (zero? (system* "nosetests")))))))
9138 (native-inputs
9139 `(("python-coverage" ,python-coverage)
9140 ("python-nose" ,python-nose)))
9141 (propagated-inputs
9142 `(("python-astor" ,python-astor)
9143 ("python-clint" ,python-clint)
9144 ("python-rply" ,python-rply)))
9145 (home-page "http://hylang.org/")
9146 (synopsis "Lisp frontend to Python")
9147 (description
9148 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9149 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9150 Python at your fingertips, in Lisp form.")
9151 (license license:expat)))
9152
9153 (define-public python2-hy
9154 (package-with-python2 python-hy))
9155
9156 (define-public python-rauth
9157 (package
9158 (name "python-rauth")
9159 (version "0.7.3")
9160 (source
9161 (origin
9162 (method url-fetch)
9163 (uri (pypi-uri "rauth" version))
9164 (sha256
9165 (base32
9166 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9167 (build-system python-build-system)
9168 (arguments
9169 `(#:test-target "check"))
9170 (propagated-inputs
9171 `(("python-requests" ,python-requests)))
9172 (home-page "https://github.com/litl/rauth")
9173 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9174 (description
9175 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9176 provides service wrappers for convenient connection initialization and
9177 authenticated session objects providing things like keep-alive.")
9178 (license license:expat)
9179 (properties `((python2-variant . ,(delay python2-rauth))))))
9180
9181 (define-public python2-rauth
9182 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9183 (package
9184 (inherit base)
9185 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9186 ,@(package-native-inputs base))))))
9187
9188 (define-public python2-functools32
9189 (package
9190 (name "python2-functools32")
9191 (version "3.2.3-2")
9192 (source
9193 (origin
9194 (method url-fetch)
9195 (uri (pypi-uri "functools32" version))
9196 (sha256
9197 (base32
9198 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9199 (build-system python-build-system)
9200 (arguments
9201 `(#:python ,python-2
9202 #:tests? #f)) ; no test target
9203 (home-page "https://github.com/MiCHiLU/python-functools32")
9204 (synopsis
9205 "Backport of the functools module from Python 3.2.3")
9206 (description
9207 "This package is a backport of the @code{functools} module from Python
9208 3.2.3 for use with older versions of Python and PyPy.")
9209 (license license:expat)))
9210
9211 (define-public python2-subprocess32
9212 (package
9213 (name "python2-subprocess32")
9214 (version "3.2.7")
9215 (source (origin
9216 (method url-fetch)
9217 (uri (pypi-uri "subprocess32" version))
9218 (sha256
9219 (base32
9220 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9221 (patches
9222 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9223 (build-system python-build-system)
9224 (arguments
9225 `(#:python ,python-2
9226 #:phases
9227 (modify-phases %standard-phases
9228 (add-after 'unpack 'patch-/bin/sh
9229 (lambda _
9230 (substitute* '("subprocess32.py"
9231 "test_subprocess32.py")
9232 (("/bin/sh") (which "sh")))
9233 #t))
9234 (delete 'check)
9235 (add-after 'install 'check
9236 (lambda* (#:key inputs outputs #:allow-other-keys)
9237 ;; For some reason this package fails to import
9238 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9239 ;; directory. Running tests after install is easier.
9240 (add-installed-pythonpath inputs outputs)
9241 (zero? (system* "python" "test_subprocess32.py")))))))
9242 (home-page "https://github.com/google/python-subprocess32")
9243 (synopsis "Backport of the subprocess module from Python 3.2")
9244 (description
9245 "This is a backport of the @code{subprocess} standard library module
9246 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9247 new features. On POSIX systems it is guaranteed to be reliable when used
9248 in threaded applications. It includes timeout support from Python 3.3 but
9249 otherwise matches 3.2’s API.")
9250 (license license:psfl)))
9251
9252 (define-public python2-futures
9253 (package
9254 (name "python2-futures")
9255 (version "3.0.5")
9256 (source
9257 (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "futures" version))
9260 (sha256
9261 (base32
9262 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9263 (build-system python-build-system)
9264 (arguments `(#:python ,python-2))
9265 (home-page "https://github.com/agronholm/pythonfutures")
9266 (synopsis
9267 "Backport of the concurrent.futures package from Python 3.2")
9268 (description
9269 "The concurrent.futures module provides a high-level interface for
9270 asynchronously executing callables. This package backports the
9271 concurrent.futures package from Python 3.2")
9272 (license license:bsd-3)))
9273
9274 (define-public python-promise
9275 (package
9276 (name "python-promise")
9277 (version "0.4.2")
9278 (source
9279 (origin
9280 (method url-fetch)
9281 (uri (pypi-uri "promise" version))
9282 (sha256
9283 (base32
9284 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9285 (build-system python-build-system)
9286 ;; Tests wants python-futures, which is a python2 only program, and
9287 ;; can't be found by python-promise at test time.
9288 (arguments `(#:tests? #f))
9289 (home-page "https://github.com/syrusakbary/promise")
9290 (synopsis "Promises/A+ implementation for Python")
9291 (description
9292 "Promises/A+ implementation for Python")
9293 (properties `((python2-variant . ,(delay python2-promise))))
9294 (license license:expat)))
9295
9296 (define-public python2-promise
9297 (let ((promise (package-with-python2
9298 (strip-python2-variant python-promise))))
9299 (package (inherit promise)
9300 (arguments (substitute-keyword-arguments (package-arguments promise)
9301 ((#:tests? _) #t)))
9302 (native-inputs
9303 `(("python2-futures" ,python2-futures)
9304 ("python2-pytest" ,python2-pytest)
9305 ,@(package-native-inputs promise))))))
9306
9307 (define-public python-urllib3
9308 (package
9309 (name "python-urllib3")
9310 (version "1.18.1")
9311 (source
9312 (origin
9313 (method url-fetch)
9314 (uri (pypi-uri "urllib3" version))
9315 (sha256
9316 (base32
9317 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9318 (build-system python-build-system)
9319 (arguments `(#:tests? #f))
9320 (native-inputs
9321 `(;; some packages for tests
9322 ("python-nose" ,python-nose)
9323 ("python-mock" ,python-mock)
9324 ("python-tornado" ,python-tornado)))
9325 (propagated-inputs
9326 `(;; extra packages for https security
9327 ("python-certifi" ,python-certifi)
9328 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9329 ("python-pyasn1" ,python-pyasn1)
9330 ("python-pyopenssl" ,python-pyopenssl)))
9331 (home-page "https://urllib3.readthedocs.org/")
9332 (synopsis "HTTP library with thread-safe connection pooling")
9333 (description
9334 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9335 can reuse the same socket connection for multiple requests, it can POST files,
9336 supports url redirection and retries, and also gzip and deflate decoding.")
9337 (license license:expat)))
9338
9339 (define-public python2-urllib3
9340 (package-with-python2 python-urllib3))
9341
9342 (define-public python-colorama
9343 (package
9344 (name "python-colorama")
9345 (version "0.3.7")
9346 (source
9347 (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "colorama" version))
9350 (sha256
9351 (base32
9352 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9353 (build-system python-build-system)
9354 (synopsis "Colored terminal text rendering for Python")
9355 (description "Colorama is a Python library for rendering colored terminal
9356 text.")
9357 (home-page "https://pypi.python.org/pypi/colorama")
9358 (license license:bsd-3)))
9359
9360 (define-public python2-colorama
9361 (package-with-python2 python-colorama))
9362
9363 (define-public python-rsa
9364 (package
9365 (name "python-rsa")
9366 (version "3.4.2")
9367 (source
9368 (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "rsa" version))
9371 (sha256
9372 (base32
9373 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9374 (build-system python-build-system)
9375 (propagated-inputs
9376 `(("python-pyasn1" ,python-pyasn1)))
9377 (synopsis "Pure-Python RSA implementation")
9378 (description "Python-RSA is a pure-Python RSA implementation. It supports
9379 encryption and decryption, signing and verifying signatures, and key
9380 generation according to PKCS#1 version 1.5. It can be used as a Python
9381 library as well as on the command line.")
9382 (home-page "http://stuvel.eu/rsa")
9383 (license license:asl2.0)))
9384
9385 (define-public python2-rsa
9386 (package-with-python2 python-rsa))
9387
9388 (define-public python-pluggy
9389 (package
9390 (name "python-pluggy")
9391 (version "0.3.1")
9392 (source
9393 (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "pluggy" version))
9396 (sha256
9397 (base32
9398 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9399 (build-system python-build-system)
9400 (synopsis "Plugin and hook calling mechanism for Python")
9401 (description "Pluggy is an extraction of the plugin manager as used by
9402 Pytest but stripped of Pytest specific details.")
9403 (home-page "https://pypi.python.org/pypi/pluggy")
9404 (license license:expat)))
9405
9406 (define-public python2-pluggy
9407 (package-with-python2 python-pluggy))
9408
9409 (define-public python-tox
9410 (package
9411 (name "python-tox")
9412 (version "2.3.1")
9413 (source
9414 (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "tox" version))
9417 (sha256
9418 (base32
9419 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9420 (build-system python-build-system)
9421 (arguments
9422 ;; FIXME: Tests require pytest-timeout, which itself requires
9423 ;; pytest>=2.8.0 for installation.
9424 '(#:tests? #f))
9425 (propagated-inputs
9426 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9427 ("python-py" ,python-py)
9428 ("python-virtualenv" ,python-virtualenv)))
9429 (native-inputs
9430 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9431 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9432 (home-page "http://tox.testrun.org/")
9433 (synopsis "Virtualenv-based automation of test activities")
9434 (description "Tox is a generic virtualenv management and test command line
9435 tool. It can be used to check that a package installs correctly with
9436 different Python versions and interpreters, or run tests in each type of
9437 supported environment, or act as a frontend to continuous integration
9438 servers.")
9439 (license license:expat)))
9440
9441 (define-public python2-tox
9442 (package-with-python2 python-tox))
9443
9444 (define-public python-jmespath
9445 (package
9446 (name "python-jmespath")
9447 (version "0.9.0")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "jmespath" version))
9452 (sha256
9453 (base32
9454 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9455 (build-system python-build-system)
9456 (native-inputs
9457 `(("python-nose" ,python-nose)))
9458 (synopsis "JSON Matching Expressions")
9459 (description "JMESPath (pronounced “james path”) is a Python library that
9460 allows one to declaratively specify how to extract elements from a JSON
9461 document.")
9462 (home-page "https://github.com/jmespath/jmespath.py")
9463 (license license:expat)))
9464
9465 (define-public python2-jmespath
9466 (package-with-python2 python-jmespath))
9467
9468 (define-public python-botocore
9469 (package
9470 (name "python-botocore")
9471 (version "1.5.26")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "botocore" version))
9476 (sha256
9477 (base32
9478 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9479 (build-system python-build-system)
9480 (arguments
9481 ;; FIXME: Many tests are failing.
9482 '(#:tests? #f))
9483 (propagated-inputs
9484 `(("python-dateutil" ,python-dateutil)
9485 ("python-docutils" ,python-docutils)
9486 ("python-jmespath" ,python-jmespath)))
9487 (native-inputs
9488 `(("python-mock" ,python-mock)
9489 ("python-nose" ,python-nose)
9490 ("behave" ,behave)
9491 ("python-tox" ,python-tox)
9492 ("python-wheel" ,python-wheel)))
9493 (home-page "https://github.com/boto/botocore")
9494 (synopsis "Low-level interface to AWS")
9495 (description "Botocore is a Python library that provides a low-level
9496 interface to the Amazon Web Services (AWS) API.")
9497 (license license:asl2.0)))
9498
9499 (define-public python2-botocore
9500 (package-with-python2 python-botocore))
9501
9502 (define-public awscli
9503 (package
9504 (name "awscli")
9505 (version "1.11.63")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri name version))
9510 (sha256
9511 (base32
9512 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9513 (build-system python-build-system)
9514 (propagated-inputs
9515 `(("python-colorama" ,python-colorama)
9516 ("python-botocore" ,python-botocore)
9517 ("python-s3transfer" ,python-s3transfer)
9518 ("python-docutils" ,python-docutils)
9519 ("python-pyyaml" ,python-pyyaml)
9520 ("python-rsa" ,python-rsa)))
9521 (arguments
9522 ;; FIXME: The 'pypi' release does not contain tests.
9523 '(#:tests? #f))
9524 (home-page "https://aws.amazon.com/cli/")
9525 (synopsis "Command line client for AWS")
9526 (description "AWS CLI provides a unified command line interface to the
9527 Amazon Web Services (AWS) API.")
9528 (license license:asl2.0)))
9529
9530 (define-public python-hypothesis
9531 (package
9532 (name "python-hypothesis")
9533 (version "3.1.0")
9534 (source (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "hypothesis" version))
9537 (sha256
9538 (base32
9539 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9540 (build-system python-build-system)
9541 (native-inputs
9542 `(("python-flake8" ,python-flake8)
9543 ("python-pytest" ,python-pytest)))
9544 (synopsis "Library for property based testing")
9545 (description "Hypothesis is a library for testing your Python code against a
9546 much larger range of examples than you would ever want to write by hand. It’s
9547 based on the Haskell library, Quickcheck, and is designed to integrate
9548 seamlessly into your existing Python unit testing work flow.")
9549 (home-page "https://github.com/DRMacIver/hypothesis")
9550 (license license:mpl2.0)
9551 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9552
9553 (define-public python2-hypothesis
9554 (let ((hypothesis (package-with-python2
9555 (strip-python2-variant python-hypothesis))))
9556 (package (inherit hypothesis)
9557 (native-inputs
9558 `(("python2-enum34" ,python2-enum34)
9559 ,@(package-native-inputs hypothesis))))))
9560
9561 (define-public python-pytest-subtesthack
9562 (package
9563 (name "python-pytest-subtesthack")
9564 (version "0.1.1")
9565 (source (origin
9566 (method url-fetch)
9567 (uri (pypi-uri "pytest-subtesthack" version))
9568 (sha256
9569 (base32
9570 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9571 (build-system python-build-system)
9572 (propagated-inputs
9573 `(("python-pytest" ,python-pytest)))
9574 (synopsis "Set-up and tear-down fixtures for unit tests")
9575 (description "This plugin allows you to set up and tear down fixtures within
9576 unit test functions that use @code{py.test}. This is useful for using
9577 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9578 function multiple times, without setting up or tearing down fixture state as is
9579 normally the case.")
9580 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9581 (license license:unlicense)))
9582
9583 (define-public python2-pytest-subtesthack
9584 (package-with-python2 python-pytest-subtesthack))
9585
9586 (define-public python-xdo
9587 (package
9588 (name "python-xdo")
9589 (version "0.3")
9590 (source (origin
9591 (method url-fetch)
9592 (uri (string-append
9593 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9594 "python-xdo_" version ".orig.tar.gz"))
9595 (sha256
9596 (base32
9597 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9598 (build-system python-build-system)
9599 (arguments
9600 '(#:phases
9601 (modify-phases %standard-phases
9602 (add-before 'install 'patch-libxdo-path
9603 ;; Hardcode the path of dynamically loaded libxdo library.
9604 (lambda* (#:key inputs #:allow-other-keys)
9605 (let ((libxdo (string-append
9606 (assoc-ref inputs "xdotool")
9607 "/lib/libxdo.so")))
9608 (substitute* "xdo/_xdo.py"
9609 (("find_library\\(\"xdo\"\\)")
9610 (simple-format #f "\"~a\"" libxdo)))
9611 #t))))
9612 #:tests? #f)) ; no tests provided
9613 (propagated-inputs
9614 `(("python-six" ,python-six)))
9615 (inputs
9616 `(("xdotool" ,xdotool)
9617 ("libX11" ,libx11)))
9618 (home-page "https://tracker.debian.org/pkg/python-xdo")
9619 (synopsis "Python library for simulating X11 keyboard/mouse input")
9620 (description "Provides bindings to libxdo for manipulating X11 via simulated
9621 input. (Note that this is mostly a legacy library; you may wish to look at
9622 python-xdo for newer bindings.)")
9623 (license license:bsd-3)))
9624
9625 (define-public python2-xdo
9626 (package-with-python2 python-xdo))
9627
9628 (define-public python-wtforms
9629 (package
9630 (name "python-wtforms")
9631 (version "2.1")
9632 (source
9633 (origin
9634 (method url-fetch)
9635 (uri (pypi-uri "WTForms" version ".zip"))
9636 (sha256
9637 (base32
9638 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9639 (build-system python-build-system)
9640 (arguments
9641 '(#:phases
9642 (modify-phases %standard-phases
9643 (add-after 'unpack 'remove-django-test
9644 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9645 (lambda _
9646 (substitute*
9647 "tests/runtests.py"
9648 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9649 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9650 #t)))))
9651 (native-inputs
9652 `(("unzip" ,unzip)))
9653 (home-page "http://wtforms.simplecodes.com/")
9654 (synopsis
9655 "Form validation and rendering library for Python web development")
9656 (description
9657 "WTForms is a flexible forms validation and rendering library
9658 for Python web development. It is very similar to the web form API
9659 available in Django, but is a standalone package.")
9660 (license license:bsd-3)))
9661
9662 (define-public python2-wtforms
9663 (package-with-python2 python-wtforms))
9664
9665 (define-public python-mako
9666 (package
9667 (name "python-mako")
9668 (version "1.0.6")
9669 (source
9670 (origin
9671 (method url-fetch)
9672 (uri (pypi-uri "Mako" version))
9673 (sha256
9674 (base32
9675 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9676 (build-system python-build-system)
9677 (propagated-inputs
9678 `(("python-markupsafe" ,python-markupsafe)))
9679 (native-inputs
9680 `(("python-mock" ,python-mock)
9681 ("python-nose" ,python-nose)
9682 ("python-pytest" ,python-pytest)))
9683 (home-page "http://www.makotemplates.org/")
9684 (synopsis "Templating language for Python")
9685 (description "Mako is a templating language for Python that compiles
9686 templates into Python modules.")
9687 (license license:expat)))
9688
9689 (define-public python2-mako
9690 (package-with-python2 python-mako))
9691
9692 (define-public python-waitress
9693 (package
9694 (name "python-waitress")
9695 (version "0.8.10")
9696 (source
9697 (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "waitress" version))
9700 (sha256
9701 (base32
9702 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9703 (build-system python-build-system)
9704 (home-page "https://github.com/Pylons/waitress")
9705 (synopsis "Waitress WSGI server")
9706 (description "Waitress is meant to be a production-quality pure-Python WSGI
9707 server with very acceptable performance.")
9708 (license license:zpl2.1)))
9709
9710 (define-public python2-waitress
9711 (package-with-python2 python-waitress))
9712
9713 (define-public python-wsgiproxy2
9714 (package
9715 (name "python-wsgiproxy2")
9716 (version "0.4.2")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9721 (sha256
9722 (base32
9723 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9724 (build-system python-build-system)
9725 (arguments
9726 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9727 ;; support Python 3:
9728 ;; https://github.com/benoitc/restkit/issues/140
9729 #:tests? #f))
9730 (native-inputs
9731 `(("unzip" ,unzip)
9732 ("python-nose" ,python-nose)
9733 ("python-coverage" ,python-coverage)))
9734 (propagated-inputs
9735 `(("python-six" ,python-six)
9736 ("python-webob" ,python-webob)))
9737 (home-page
9738 "https://github.com/gawel/WSGIProxy2/")
9739 (synopsis "WSGI Proxy with various http client backends")
9740 (description "WSGI turns HTTP requests into WSGI function calls.
9741 WSGIProxy turns WSGI function calls into HTTP requests.
9742 It also includes code to sign requests and pass private data,
9743 and to spawn subprocesses to handle requests.")
9744 (license license:expat)))
9745
9746 (define-public python2-wsgiproxy2
9747 (package-with-python2 python-wsgiproxy2))
9748
9749 (define-public python-pastedeploy
9750 (package
9751 (name "python-pastedeploy")
9752 (version "1.5.2")
9753 (source
9754 (origin
9755 (method url-fetch)
9756 (uri (pypi-uri "PasteDeploy" version))
9757 (sha256
9758 (base32
9759 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9760 (build-system python-build-system)
9761 (native-inputs
9762 `(("python-nose" ,python-nose)))
9763 (home-page "http://pythonpaste.org/deploy/")
9764 (synopsis
9765 "Load, configure, and compose WSGI applications and servers")
9766 (description
9767 "This tool provides code to load WSGI applications and servers from URIs;
9768 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9769 Script provides commands to serve applications based on this configuration
9770 file.")
9771 (license license:expat)))
9772
9773 (define-public python2-pastedeploy
9774 (package-with-python2 python-pastedeploy))
9775
9776 (define-public python-paste
9777 (package
9778 (name "python-paste")
9779 (version "2.0.3")
9780 (source
9781 (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "Paste" version))
9784 (sha256
9785 (base32
9786 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9787 (patches (search-patches "python-paste-remove-website-test.patch"
9788 "python-paste-remove-timing-test.patch"))))
9789 (build-system python-build-system)
9790 (native-inputs
9791 `(("python-nose" ,python-nose)))
9792 (propagated-inputs
9793 `(("python-six" ,python-six)))
9794 (home-page "http://pythonpaste.org")
9795 (synopsis
9796 "Python web development tools, focusing on WSGI")
9797 (description
9798 "Paste provides a variety of web development tools and middleware which
9799 can be nested together to build web applications. Paste's design closely
9800 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9801 (license license:expat)))
9802
9803 (define-public python2-paste
9804 (package-with-python2 python-paste))
9805
9806 (define-public python-pastescript
9807 (package
9808 (name "python-pastescript")
9809 (version "2.0.2")
9810 (source
9811 (origin
9812 (method url-fetch)
9813 (uri (pypi-uri "PasteScript" version))
9814 (sha256
9815 (base32
9816 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9817 (build-system python-build-system)
9818 (native-inputs
9819 `(("python-nose" ,python-nose)))
9820 (propagated-inputs
9821 `(("python-paste" ,python-paste)
9822 ("python-pastedeploy" ,python-pastedeploy)))
9823 (home-page "http://pythonpaste.org/script/")
9824 (arguments
9825 '(;; Unfortunately, this requires the latest unittest2,
9826 ;; but that requires traceback2 which requires linecache2 which requires
9827 ;; unittest2. So we're skipping tests for now.
9828 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9829 ;; so in theory we could get around this situation somehow.)
9830 #:tests? #f))
9831 (synopsis
9832 "Pluggable command line tool for serving web applications and more")
9833 (description
9834 "PasteScript is a plugin-friendly command line tool which provides a
9835 variety of features, from launching web applications to bootstrapping project
9836 layouts.")
9837 (license license:expat)))
9838
9839 (define-public python2-pastescript
9840 (package-with-python2 python-pastescript))
9841
9842 (define-public python-pyquery
9843 (package
9844 (name "python-pyquery")
9845 (version "1.2.17")
9846 (source
9847 (origin
9848 (method url-fetch)
9849 (uri (pypi-uri "pyquery" version))
9850 (sha256
9851 (base32
9852 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9853 (build-system python-build-system)
9854 (native-inputs
9855 `(("python-webob" ,python-webob)
9856 ("python-webtest" ,python-webtest)))
9857 (propagated-inputs
9858 `(("python-lxml" ,python-lxml)
9859 ("python-cssselect" ,python-cssselect)))
9860 (home-page "https://github.com/gawel/pyquery")
9861 (synopsis "Make jQuery-like queries on xml documents")
9862 (description "pyquery allows you to make jQuery queries on xml documents.
9863 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9864 fast xml and html manipulation.")
9865 (license license:bsd-3)))
9866
9867 (define-public python2-pyquery
9868 (package-with-python2 python-pyquery))
9869
9870 (define-public python-webtest
9871 (package
9872 (name "python-webtest")
9873 (version "2.0.20")
9874 (source
9875 (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "WebTest" version))
9878 (sha256
9879 (base32
9880 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9881 (build-system python-build-system)
9882 (arguments
9883 `(;; Unfortunately we have to disable tests!
9884 ;; This release of WebTest is pinned to python-nose < 1.3,
9885 ;; but older versions of python-nose are plagued with the following
9886 ;; bug(s), which rears its ugly head during test execution:
9887 ;; https://github.com/nose-devs/nose/issues/759
9888 ;; https://github.com/nose-devs/nose/pull/811
9889 #:tests? #f))
9890 ;; Commented out code is no good, but in this case, once tests
9891 ;; are ready to be enabled again, we should put the following
9892 ;; in place:
9893 ;; (native-inputs
9894 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9895 ;; ; but see above comment
9896 ;; ("python-coverage" ,python-coverage)
9897 ;; ("python-mock" ,python-mock)
9898 ;; ("python-pastedeploy" ,python-pastedeploy)
9899 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9900 ;; ("python-pyquery" ,python-pyquery)))
9901 (propagated-inputs
9902 `(("python-waitress" ,python-waitress)
9903 ("python-webob" ,python-webob)
9904 ("python-six" ,python-six)
9905 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9906 (home-page "http://webtest.pythonpaste.org/")
9907 (synopsis "Helper to test WSGI applications")
9908 (description "Webtest allows you to test your Python web applications
9909 without starting an HTTP server. It supports anything that supports the
9910 minimum of WSGI.")
9911 (license license:expat)))
9912
9913 (define-public python2-webtest
9914 (package-with-python2 python-webtest))
9915
9916 (define-public python-anyjson
9917 (package
9918 (name "python-anyjson")
9919 (version "0.3.3")
9920 (source
9921 (origin
9922 (method url-fetch)
9923 (uri (pypi-uri "anyjson" version))
9924 (sha256
9925 (base32
9926 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9927 (build-system python-build-system)
9928 (arguments
9929 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9930 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9931 ;; whatever) so this transformation needs to be done before the tests
9932 ;; can be run. Maybe we could add a build step to transform beforehand
9933 ;; but it could be annoying/difficult.
9934 ;; We can enable tests for the Python 2 version, though, and do below.
9935 #:tests? #f))
9936 (home-page "http://bitbucket.org/runeh/anyjson/")
9937 (synopsis
9938 "Wraps best available JSON implementation in a common interface")
9939 (description
9940 "Anyjson loads whichever is the fastest JSON module installed
9941 and provides a uniform API regardless of which JSON implementation is used.")
9942 (license license:bsd-3)
9943 (properties `((python2-variant . ,(delay python2-anyjson))))))
9944
9945 (define-public python2-anyjson
9946 (let ((anyjson (package-with-python2
9947 (strip-python2-variant python-anyjson))))
9948 (package
9949 (inherit anyjson)
9950 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9951 #:tests? #t
9952 ,@(package-arguments anyjson)))
9953 (native-inputs `(("python2-nose" ,python2-nose))))))
9954
9955 (define-public python-amqp
9956 (package
9957 (name "python-amqp")
9958 (version "1.4.9")
9959 (source
9960 (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "amqp" version))
9963 (sha256
9964 (base32
9965 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9966 (build-system python-build-system)
9967 (native-inputs
9968 `(("python-nose" ,python-nose)
9969 ("python-mock" ,python-mock)))
9970 (home-page "https://github.com/celery/py-amqp")
9971 (synopsis
9972 "Low-level AMQP client for Python (fork of amqplib)")
9973 (description
9974 "This is a fork of amqplib which was originally written by Barry Pederson.
9975 It is maintained by the Celery project, and used by kombu as a pure python
9976 alternative when librabbitmq is not available.")
9977 (license license:lgpl2.1+)
9978 (properties `((python2-variant . ,(delay python2-amqp))))))
9979
9980 (define-public python2-amqp
9981 (let ((amqp (package-with-python2
9982 (strip-python2-variant python-amqp))))
9983 (package
9984 (inherit amqp)
9985 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9986 ;; unmaintained. Weirdly, does not do this on the python 3
9987 ;; version?
9988 #:tests? #f
9989 ,@(package-arguments amqp))))))
9990
9991 (define-public python-kombu
9992 (package
9993 (name "python-kombu")
9994 (version "3.0.37")
9995 (source
9996 (origin
9997 (method url-fetch)
9998 (uri (pypi-uri "kombu" version))
9999 (sha256
10000 (base32
10001 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10002 (build-system python-build-system)
10003 (native-inputs
10004 `(("python-mock" ,python-mock)
10005 ("python-nose" ,python-nose)))
10006 (propagated-inputs
10007 `(("python-anyjson" ,python-anyjson)
10008 ("python-amqp" ,python-amqp)
10009 ("python-redis" ,python-redis)))
10010 (home-page "http://kombu.readthedocs.org")
10011 (synopsis "Message passing library for Python")
10012 (description "The aim of Kombu is to make messaging in Python as easy as
10013 possible by providing an idiomatic high-level interface for the AMQ protocol,
10014 and also provide proven and tested solutions to common messaging problems.
10015 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10016 message orientation, queuing, routing, reliability and security, for which the
10017 RabbitMQ messaging server is the most popular implementation.")
10018 (license license:bsd-3)
10019 (properties `((python2-variant . ,(delay python2-kombu))))))
10020
10021 (define-public python2-kombu
10022 (let ((kombu (package-with-python2
10023 (strip-python2-variant python-kombu))))
10024 (package
10025 (inherit kombu)
10026 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10027 ;; It works fine on the python3 variant.
10028 #:tests? #f
10029 ,@(package-arguments kombu)))
10030 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10031 ,@(package-native-inputs kombu))))))
10032
10033 (define-public python-billiard
10034 (package
10035 (name "python-billiard")
10036 (version "3.3.0.23")
10037 (source
10038 (origin
10039 (method url-fetch)
10040 (uri (pypi-uri "billiard" version))
10041 (sha256
10042 (base32
10043 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10044 (build-system python-build-system)
10045 (native-inputs
10046 `(("python-nose" ,python-nose)))
10047 (home-page "https://github.com/celery/billiard")
10048 (synopsis
10049 "Python multiprocessing fork with improvements and bugfixes")
10050 (description
10051 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10052 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10053 pyprocessing package. This standalone variant is intended to be compatible with
10054 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10055 (license license:bsd-3)
10056 (properties `((python2-variant . ,(delay python2-billiard))))))
10057
10058 (define-public python2-billiard
10059 (let ((billiard (package-with-python2
10060 (strip-python2-variant python-billiard))))
10061 (package
10062 (inherit billiard)
10063 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10064 ("python2-mock" ,python2-mock)
10065 ,@(package-native-inputs billiard))))))
10066
10067 (define-public python-celery
10068 (package
10069 (name "python-celery")
10070 (version "3.1.24")
10071 (source
10072 (origin
10073 (method url-fetch)
10074 (uri (pypi-uri "celery" version))
10075 (sha256
10076 (base32
10077 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10078 (build-system python-build-system)
10079 (arguments
10080 `(#:phases
10081 (modify-phases %standard-phases
10082 ;; These tests break with Python 3.5:
10083 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10084 (replace 'check
10085 (lambda _
10086 (zero?
10087 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10088 (native-inputs
10089 `(("python-nose" ,python-nose)))
10090 (propagated-inputs
10091 `(("python-pytz" ,python-pytz)
10092 ("python-billiard" ,python-billiard)
10093 ("python-kombu" ,python-kombu)))
10094 (home-page "http://celeryproject.org")
10095 (synopsis "Distributed Task Queue")
10096 (description "Celery is an asynchronous task queue/job queue based on
10097 distributed message passing. It is focused on real-time operation, but
10098 supports scheduling as well. The execution units, called tasks, are executed
10099 concurrently on a single or more worker servers using multiprocessing,
10100 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10101 synchronously (wait until ready).")
10102 (license license:bsd-3)
10103 (properties `((python2-variant . ,(delay python2-celery))))))
10104
10105 (define-public python2-celery
10106 (let ((celery (package-with-python2
10107 (strip-python2-variant python-celery))))
10108 (package
10109 (inherit celery)
10110 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10111 ("python2-mock" ,python2-mock)
10112 ,@(package-native-inputs celery))))))
10113
10114 (define-public python-translitcodec
10115 (package
10116 (name "python-translitcodec")
10117 (version "0.4.0")
10118 (source
10119 (origin
10120 (method url-fetch)
10121 (uri (pypi-uri "translitcodec" version))
10122 (sha256
10123 (base32
10124 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10125 (build-system python-build-system)
10126 (arguments
10127 `(#:tests? #f)) ; no tests provided
10128 (home-page
10129 "https://github.com/claudep/translitcodec")
10130 (synopsis
10131 "Unicode to 8-bit charset transliteration codec")
10132 (description
10133 "This package contains codecs for transliterating ISO 10646 texts into
10134 best-effort representations using smaller coded character sets (ASCII,
10135 ISO 8859, etc.).")
10136 (license license:expat)))
10137
10138 (define-public python2-translitcodec
10139 (package-with-python2 python-translitcodec))
10140
10141 (define-public python-editor
10142 (package
10143 (name "python-editor")
10144 (version "0.5")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "python-editor" version))
10149 (sha256
10150 (base32
10151 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10152 (build-system python-build-system)
10153 (home-page
10154 "https://github.com/fmoo/python-editor")
10155 (synopsis
10156 "Programmatically open an editor, capture the result")
10157 (description
10158 "python-editor is a library that provides the editor module for
10159 programmatically interfacing with your system's $EDITOR.")
10160 (license license:asl2.0)))
10161
10162 (define-public python2-editor
10163 (package-with-python2 python-editor))
10164
10165 (define-public python-sphinxcontrib-programoutput
10166 (package
10167 (name "python-sphinxcontrib-programoutput")
10168 (version "0.10")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10172 (sha256
10173 (base32
10174 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10175 (build-system python-build-system)
10176 (arguments
10177 ;; FIXME: Many tests are failing and the upstream is gone.
10178 '(#:tests? #f))
10179 (propagated-inputs
10180 `(("python-sphinx" ,python-sphinx)))
10181 (synopsis "Sphinx extension to include program output")
10182 (description "A Sphinx extension to literally insert the output of arbitrary
10183 commands into documents, helping you to keep your command examples up to date.")
10184 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10185 (license license:bsd-2)))
10186
10187 (define-public python2-sphinxcontrib-programoutput
10188 (package-with-python2 python-sphinxcontrib-programoutput))
10189
10190 (define-public python-sphinx-repoze-autointerface
10191 (package
10192 (name "python-sphinx-repoze-autointerface")
10193 (version "0.8")
10194 (source (origin
10195 (method url-fetch)
10196 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10197 (sha256
10198 (base32
10199 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10200 (build-system python-build-system)
10201 (arguments '(#:tests? #f)) ; No tests.
10202 (propagated-inputs
10203 `(("python-sphinx" ,python-sphinx)
10204 ("python-zope-interface" ,python-zope-interface)))
10205 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10206 (description "This package defines an extension for the Sphinx documentation
10207 system. The extension allows generation of API documentation by
10208 introspection of @code{zope.interface} instances in code.")
10209 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10210 (license license:repoze)))
10211
10212 (define-public python2-sphinx-repoze-autointerface
10213 (package-with-python2 python-sphinx-repoze-autointerface))
10214
10215 (define-public python-psycopg2
10216 (package
10217 (name "python-psycopg2")
10218 (version "2.6.2")
10219 (source
10220 (origin
10221 (method url-fetch)
10222 (uri (pypi-uri "psycopg2" version))
10223 (sha256
10224 (base32
10225 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10226 (build-system python-build-system)
10227 (arguments
10228 ;; Tests would require a postgresql database "psycopg2_test"
10229 ;; and a running postgresql database management service.
10230 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10231 (inputs
10232 `(("postgresql" ,postgresql))) ; libpq
10233 (home-page "http://initd.org/psycopg/")
10234 (synopsis "Python PostgreSQL adapter")
10235 (description
10236 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10237 (license license:lgpl3+)))
10238
10239 (define-public python2-psycopg2
10240 (package-with-python2 python-psycopg2))
10241
10242 (define-public python-vobject
10243 (package
10244 (name "python-vobject")
10245 (version "0.9.5")
10246 (source (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "vobject" version))
10249 (sha256
10250 (base32
10251 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10252 (build-system python-build-system)
10253 (arguments
10254 '(;; The test suite relies on some non-portable Windows interfaces.
10255 #:tests? #f))
10256 (propagated-inputs
10257 `(("python-dateutil" ,python-dateutil)
10258 ("python-pyicu" ,python-pyicu)))
10259 (synopsis "Parse and generate vCard and vCalendar files")
10260 (description "Vobject is intended to be a full featured Python package for
10261 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10262 are supported and well tested. vCard 3.0 files are supported, and all data
10263 should be imported, but only a few components are understood in a sophisticated
10264 way.")
10265 (home-page "http://eventable.github.io/vobject/")
10266 (license license:asl2.0)))
10267
10268 (define-public python2-vobject
10269 (package-with-python2 python-vobject))
10270
10271 (define-public python-munkres
10272 (package
10273 (name "python-munkres")
10274 (version "1.0.8")
10275 (source (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "munkres" version))
10278 (sha256
10279 (base32
10280 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10281 (build-system python-build-system)
10282 (arguments
10283 '(#:tests? #f)) ; no test suite
10284 (home-page "http://software.clapper.org/munkres/")
10285 (synopsis "Implementation of the Munkres algorithm")
10286 (description "The Munkres module provides an implementation of the Munkres
10287 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10288 useful for solving the Assignment Problem.")
10289 (license license:bsd-3)))
10290
10291 (define-public python2-munkres
10292 (package-with-python2 python-munkres))
10293
10294 (define-public python-flask
10295 (package
10296 (name "python-flask")
10297 (version "0.11.1")
10298 (source (origin
10299 (method url-fetch)
10300 (uri (pypi-uri "Flask" version))
10301 (sha256
10302 (base32
10303 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10304 (build-system python-build-system)
10305 (propagated-inputs
10306 `(("python-itsdangerous" ,python-itsdangerous)
10307 ("python-jinja2" ,python-jinja2)
10308 ("python-click" ,python-click)
10309 ("python-werkzeug" ,python-werkzeug)))
10310 (home-page "https://github.com/mitsuhiko/flask/")
10311 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10312 (description "Flask is a micro web framework based on the Werkzeug toolkit
10313 and Jinja2 template engine. It is called a micro framework because it does not
10314 presume or force a developer to use a particular tool or library.")
10315 (license license:bsd-3)))
10316
10317 (define-public python2-flask
10318 (package-with-python2 python-flask))
10319
10320 (define-public python-flask-wtf
10321 (package
10322 (name "python-flask-wtf")
10323 (version "0.13.1")
10324 (source
10325 (origin
10326 (method url-fetch)
10327 (uri (pypi-uri "Flask-WTF" version))
10328 (sha256
10329 (base32
10330 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10331 (build-system python-build-system)
10332 (arguments
10333 '(#:phases
10334 (modify-phases %standard-phases
10335 (add-before 'check 'drop-failing-test
10336 (lambda _
10337 ;; FIXME: This file tries resolving an external server, which
10338 ;; fails. Try to patch out the offending section instead of
10339 ;; deleting the whole thing.
10340 (delete-file "tests/test_recaptcha.py")
10341 #t)))))
10342 (propagated-inputs
10343 `(("python-flask-babel" ,python-flask-babel)
10344 ("python-babel" ,python-babel)
10345 ("python-wtforms" ,python-wtforms)))
10346 (native-inputs
10347 `(("python-nose" ,python-nose)))
10348 (home-page "https://github.com/lepture/flask-wtf")
10349 (synopsis "Simple integration of Flask and WTForms")
10350 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10351 upload, and reCAPTCHA.")
10352 (license license:bsd-3)))
10353
10354 (define-public python2-flask-wtf
10355 (package-with-python2 python-flask-wtf))
10356
10357 (define-public python-flask-multistatic
10358 (package
10359 (name "python-flask-multistatic")
10360 (version "1.0")
10361 (source
10362 (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "flask-multistatic" version))
10365 (sha256
10366 (base32
10367 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10368 (build-system python-build-system)
10369 (propagated-inputs
10370 `(("python-flask" ,python-flask)))
10371 (home-page "https://pagure.io/flask-multistatic")
10372 (synopsis "Flask plugin to allow overriding static files")
10373 (description "@code{flask-multistatic} is a flask plugin that adds support
10374 for overriding static files.")
10375 (license license:gpl3+)))
10376
10377 (define-public python2-flask-multistatic
10378 (package-with-python2 python-flask-multistatic))
10379
10380 (define-public python-cookies
10381 (package
10382 (name "python-cookies")
10383 (version "2.2.1")
10384 (source (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "cookies" version))
10387 (sha256
10388 (base32
10389 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10390 (build-system python-build-system)
10391 (arguments
10392 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10393 #:tests? #f))
10394 (native-inputs
10395 `(("python-pytest" ,python2-pytest)))
10396 (synopsis "HTTP cookie parser and renderer")
10397 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10398 Python.")
10399 (home-page "https://gitlab.com/sashahart/cookies")
10400 (license license:expat)))
10401
10402 (define-public python2-cookies
10403 (package-with-python2 python-cookies))
10404
10405 (define-public python-responses
10406 (package
10407 (name "python-responses")
10408 (version "0.5.1")
10409 (source (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "responses" version))
10412 (sha256
10413 (base32
10414 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10415 (build-system python-build-system)
10416 (arguments
10417 `(;; Test suite is not distributed:
10418 ;; https://github.com/getsentry/responses/issues/38
10419 #:tests? #f))
10420 (native-inputs
10421 `(("python-mock" ,python-mock)))
10422 (propagated-inputs
10423 `(("python-requests" ,python-requests)
10424 ("python-cookies" ,python-cookies)
10425 ("python-six" ,python-six)))
10426 (home-page "https://github.com/getsentry/responses")
10427 (synopsis "Utility for mocking out the `requests` Python library")
10428 (description "A utility library for mocking out the `requests` Python
10429 library.")
10430 (license license:asl2.0)))
10431
10432 (define-public python2-responses
10433 (package-with-python2 python-responses))
10434
10435 (define-public python-whoosh
10436 (package
10437 (name "python-whoosh")
10438 (version "2.7.4")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "Whoosh" version))
10443 (sha256
10444 (base32
10445 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10446 (build-system python-build-system)
10447 (native-inputs
10448 `(("python-pytest" ,python-pytest)))
10449 (home-page "http://bitbucket.org/mchaput/whoosh")
10450 (synopsis "Full text indexing, search, and spell checking library")
10451 (description
10452 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10453 checking library.")
10454 (license license:bsd-2)))
10455
10456 (define-public python2-whoosh
10457 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10458 (package (inherit whoosh)
10459 (propagated-inputs
10460 `(("python2-backport-ssl-match-hostname"
10461 ,python2-backport-ssl-match-hostname)
10462 ,@(package-propagated-inputs whoosh))))))
10463
10464 (define-public python-pathlib
10465 (package
10466 (name "python-pathlib")
10467 (version "1.0.1")
10468 (source (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "pathlib" version))
10471 (sha256
10472 (base32
10473 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10474 (build-system python-build-system)
10475 ;; The tests depend on the internal "test" module, which does not provide
10476 ;; a stable interface.
10477 (arguments `(#:tests? #f))
10478 (home-page "https://pathlib.readthedocs.org/")
10479 (synopsis "Object-oriented file system paths")
10480 (description "Pathlib offers a set of classes to handle file system paths.
10481 It offers the following advantages over using string objects:
10482
10483 @enumerate
10484 @item No more cumbersome use of os and os.path functions. Everything can
10485 be done easily through operators, attribute accesses, and method calls.
10486 @item Embodies the semantics of different path types. For example,
10487 comparing Windows paths ignores casing.
10488 @item Well-defined semantics, eliminating any inconsistencies or
10489 ambiguities (forward vs. backward slashes, etc.).
10490 @end enumerate
10491
10492 Note: In Python 3.4, pathlib is now part of the standard library. For other
10493 Python versions please consider python-pathlib2 instead, which tracks the
10494 standard library module. This module (python-pathlib) isn't maintained
10495 anymore.")
10496 (license license:expat)))
10497
10498 (define-public python2-pathlib
10499 (package-with-python2 python-pathlib))
10500
10501 (define-public python2-pathlib2
10502 (package
10503 (name "python2-pathlib2")
10504 (version "2.1.0")
10505 (source (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "pathlib2" version))
10508 (sha256
10509 (base32
10510 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10511 (build-system python-build-system)
10512 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10513 ;; version is 3.4 which already includes this package as part of the
10514 ;; standard library.
10515 (arguments
10516 `(#:python ,python-2))
10517 (native-inputs
10518 `(("python2-six" ,python2-six)))
10519 (home-page "http://pypi.python.org/pypi/pathlib2/")
10520 (synopsis "Object-oriented file system paths - backport of standard
10521 pathlib module")
10522 (description "The goal of pathlib2 is to provide a backport of standard
10523 pathlib module which tracks the standard library module, so all the newest
10524 features of the standard pathlib can be used also on older Python versions.
10525
10526 Pathlib offers a set of classes to handle file system paths. It offers the
10527 following advantages over using string objects:
10528
10529 @enumerate
10530 @item No more cumbersome use of os and os.path functions. Everything can
10531 be done easily through operators, attribute accesses, and method calls.
10532 @item Embodies the semantics of different path types. For example,
10533 comparing Windows paths ignores casing.
10534 @item Well-defined semantics, eliminating any inconsistencies or
10535 ambiguities (forward vs. backward slashes, etc.).
10536 @end enumerate")
10537 (license license:expat)))
10538
10539 (define-public python-jellyfish
10540 (package
10541 (name "python-jellyfish")
10542 (version "0.5.6")
10543 (source (origin
10544 (method url-fetch)
10545 (uri (pypi-uri "jellyfish" version))
10546 (sha256
10547 (base32
10548 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10549 (build-system python-build-system)
10550 (native-inputs
10551 `(("python-pytest" ,python-pytest)))
10552 (home-page "https://github.com/jamesturk/jellyfish")
10553 (synopsis "Approximate and phonetic matching of strings")
10554 (description "Jellyfish uses a variety of string comparison and phonetic
10555 encoding algorithms to do fuzzy string matching.")
10556 (license license:bsd-2)
10557 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10558
10559 (define-public python2-jellyfish
10560 (let ((jellyfish (package-with-python2
10561 (strip-python2-variant python-jellyfish))))
10562 (package (inherit jellyfish)
10563 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10564 ,@(package-native-inputs jellyfish))))))
10565
10566 (define-public python2-unicodecsv
10567 (package
10568 (name "python2-unicodecsv")
10569 (version "0.14.1")
10570 (source (origin
10571 (method url-fetch)
10572 ;; The test suite is not included in the PyPi release.
10573 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10574 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10575 "archive/" version ".tar.gz"))
10576 (file-name (string-append name "-" version ".tar.gz"))
10577 (sha256
10578 (base32
10579 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10580 (build-system python-build-system)
10581 (arguments
10582 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10583 #:python ,python-2))
10584 (native-inputs
10585 `(("python2-unittest2" ,python2-unittest2)))
10586 (home-page "https://github.com/jdunck/python-unicodecsv")
10587 (synopsis "Unicode CSV module for Python 2")
10588 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10589 module, adding support for Unicode strings.")
10590 (license license:bsd-2)))
10591
10592 (define-public python-rarfile
10593 (package
10594 (name "python-rarfile")
10595 (version "2.8")
10596 (source (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "rarfile" version))
10599 (sha256
10600 (base32
10601 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10602 (build-system python-build-system)
10603 (arguments
10604 '(#:phases
10605 (modify-phases %standard-phases
10606 (replace 'check
10607 ;; Many tests fail, but the installation proceeds.
10608 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10609 (native-inputs
10610 `(("which" ,which))) ; required for tests
10611 (propagated-inputs
10612 `(("libarchive" ,libarchive)))
10613 (home-page "https://github.com/markokr/rarfile")
10614 (synopsis "RAR archive reader for Python")
10615 (description "This is Python module for RAR archive reading. The interface
10616 is made as zipfile like as possible.")
10617 (license license:isc)))
10618
10619 (define-public python2-rarfile
10620 (package-with-python2 python-rarfile))
10621
10622 (define-public python-magic
10623 (package
10624 (name "python-magic")
10625 (version "0.4.3")
10626 (source
10627 (origin
10628 (method url-fetch)
10629 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10630 version ".tar.gz"))
10631 (sha256
10632 (base32
10633 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10634 (file-name (string-append name "-" version "-checkout"))))
10635 (build-system python-build-system)
10636 (arguments
10637 ;; The tests are unreliable, so don't run them. The tests fail
10638 ;; under Python3 because they were written for Python2 and
10639 ;; contain import statements that do not work in Python3. One of
10640 ;; the tests fails under Python2 because its assertions are
10641 ;; overly stringent; it relies on comparing output strings which
10642 ;; are brittle and can change depending on the version of
10643 ;; libmagic being used and the system on which the test is
10644 ;; running. In my case, under GuixSD 0.10.0, only one test
10645 ;; failed, and it seems to have failed only because the version
10646 ;; of libmagic that is packaged in Guix outputs a slightly
10647 ;; different (but not wrong) string than the one that the test
10648 ;; expected.
10649 '(#:tests? #f
10650 #:phases (modify-phases %standard-phases
10651 ;; Replace a specific method call with a hard-coded
10652 ;; path to the necessary libmagic.so file in the
10653 ;; store. If we don't do this, then the method call
10654 ;; will fail to find the libmagic.so file, which in
10655 ;; turn will cause any application using
10656 ;; python-magic to fail.
10657 (add-before 'build 'hard-code-path-to-libmagic
10658 (lambda* (#:key inputs #:allow-other-keys)
10659 (let ((file (assoc-ref inputs "file")))
10660 (substitute* "magic.py"
10661 (("ctypes.util.find_library\\('magic'\\)")
10662 (string-append "'" file "/lib/libmagic.so'")))
10663 #t)))
10664 (add-before 'install 'disable-egg-compression
10665 (lambda _
10666 (let ((port (open-file "setup.cfg" "a")))
10667 (display "\n[easy_install]\nzip_ok = 0\n"
10668 port)
10669 (close-port port)
10670 #t))))))
10671 (inputs
10672 ;; python-magic needs to be able to find libmagic.so.
10673 `(("file" ,file)))
10674 (home-page "https://github.com/ahupp/python-magic")
10675 (synopsis "File type identification using libmagic")
10676 (description
10677 "This module uses ctypes to access the libmagic file type
10678 identification library. It makes use of the local magic database and
10679 supports both textual and MIME-type output. Note that this module and
10680 the python-file module both provide a \"magic.py\" file; these two
10681 modules, which are different and were developed separately, both serve
10682 the same purpose: to provide Python bindings for libmagic.")
10683 (license license:expat)))
10684
10685 (define-public python2-magic
10686 (package-with-python2 python-magic))
10687
10688 (define-public python2-s3cmd
10689 (package
10690 (name "python2-s3cmd")
10691 (version "1.6.1")
10692 (source
10693 (origin
10694 (method url-fetch)
10695 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10696 "s3cmd-" version ".tar.gz"))
10697 (sha256
10698 (base32
10699 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10700 (build-system python-build-system)
10701 (arguments
10702 ;; s3cmd is written for python2 only and contains no tests.
10703 `(#:python ,python-2
10704 #:tests? #f))
10705 (propagated-inputs
10706 `(("python2-dateutil" ,python2-dateutil)
10707 ;; The python-file package also provides a magic.py module.
10708 ;; This is an unfortunate state of affairs; however, s3cmd
10709 ;; fails to install if it cannot find specifically the
10710 ;; python-magic package. Thus we include it, instead of using
10711 ;; python-file. Ironically, s3cmd sometimes works better
10712 ;; without libmagic bindings at all:
10713 ;; https://github.com/s3tools/s3cmd/issues/198
10714 ("python2-magic" ,python2-magic)))
10715 (home-page "http://s3tools.org/s3cmd")
10716 (synopsis "Command line tool for S3-compatible storage services")
10717 (description
10718 "S3cmd is a command line tool for uploading, retrieving and managing data
10719 in storage services that are compatible with the Amazon Simple Storage
10720 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10721 GnuPG encryption, and more. It also supports management of Amazon's
10722 CloudFront content delivery network.")
10723 (license license:gpl2+)))
10724
10725 (define-public python-pkgconfig
10726 (package
10727 (name "python-pkgconfig")
10728 (version "1.1.0")
10729 (source
10730 (origin
10731 (method url-fetch)
10732 (uri (pypi-uri "pkgconfig" version))
10733 (sha256
10734 (base32
10735 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10736 (build-system python-build-system)
10737 (native-inputs
10738 `(("python-nose" ,python-nose)))
10739 (inputs
10740 `(("pkg-config" ,pkg-config)))
10741 (arguments
10742 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10743 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10744 #:tests? #f
10745 ;; Hard-code the path to pkg-config.
10746 #:phases
10747 (modify-phases %standard-phases
10748 (add-before
10749 'build 'patch
10750 (lambda _
10751 (substitute* "pkgconfig/pkgconfig.py"
10752 (("cmd = 'pkg-config")
10753 (string-append "cmd = '" (which "pkg-config"))))
10754 #t)))))
10755 (home-page "https://github.com/matze/pkgconfig")
10756 (synopsis "Python interface for pkg-config")
10757 (description "This module provides a Python interface to pkg-config. It
10758 can be used to find all pkg-config packages, check if a package exists,
10759 check if a package meets certain version requirements, query CFLAGS and
10760 LDFLAGS and parse the output to build extensions with setup.py.")
10761 (license license:expat)))
10762
10763 (define-public python2-pkgconfig
10764 (package-with-python2 python-pkgconfig))
10765
10766 (define-public python-bz2file
10767 (package
10768 (name "python-bz2file")
10769 (version "0.98")
10770 (source
10771 (origin
10772 (method url-fetch)
10773 (uri (pypi-uri "bz2file" version))
10774 (sha256
10775 (base32
10776 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10777 (build-system python-build-system)
10778 (arguments
10779 `(#:tests? #f)) ; Tests use deprecated python modules.
10780 (home-page "https://github.com/nvawda/bz2file")
10781 (synopsis "Read and write bzip2-compressed files")
10782 (description
10783 "Bz2file is a Python library for reading and writing bzip2-compressed
10784 files. It contains a drop-in replacement for the I/O interface in the
10785 standard library's @code{bz2} module, including features from the latest
10786 development version of CPython that are not available in older releases.")
10787 (license license:asl2.0)
10788 (properties `((python2-variant . ,(delay python2-bz2file))))))
10789
10790 (define-public python2-bz2file
10791 (let ((base (package-with-python2
10792 (strip-python2-variant python-bz2file))))
10793 (package
10794 (inherit base)
10795 (arguments
10796 `(#:python ,python-2
10797 #:phases
10798 (modify-phases %standard-phases
10799 ;; 'python setup.py test' does not work as of 0.98.
10800 ;; There is only the one test file, so we run it directly.
10801 (replace 'check
10802 (lambda _ (zero? (system* "python"
10803 "test_bz2file.py"))))))))))
10804
10805 (define-public python-future
10806 (package
10807 (name "python-future")
10808 (version "0.16.0")
10809 (source
10810 (origin
10811 (method url-fetch)
10812 (uri (pypi-uri "future" version))
10813 (sha256
10814 (base32
10815 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10816 (build-system python-build-system)
10817 ;; Many tests connect to the network or are otherwise flawed.
10818 ;; https://github.com/PythonCharmers/python-future/issues/210
10819 (arguments
10820 `(#:tests? #f))
10821 (home-page "http://python-future.org")
10822 (synopsis "Single-source support for Python 3 and 2")
10823 (description
10824 "@code{python-future} is the missing compatibility layer between Python 2 and
10825 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10826 to support both Python 2 and Python 3 with minimal overhead.")
10827 (license license:expat)))
10828
10829 (define-public python2-future
10830 (package-with-python2 python-future))
10831
10832 (define-public python-cysignals
10833 (package
10834 (name "python-cysignals")
10835 (version "1.1.0")
10836 (source
10837 (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10840 (sha256
10841 (base32
10842 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10843 (build-system python-build-system)
10844 (native-inputs
10845 `(("python-cython" ,python-cython)
10846 ("python-sphinx" ,python-sphinx)))
10847 (inputs
10848 `(("pari-gp" ,pari-gp)))
10849 (arguments
10850 `(#:modules ((guix build python-build-system)
10851 ((guix build gnu-build-system) #:prefix gnu:)
10852 (guix build utils))
10853 ;; FIXME: Tests are executed after installation and currently fail
10854 ;; when not installing into standard locations; the author is working
10855 ;; on a fix.
10856 #:tests? #f
10857 #:phases
10858 (modify-phases %standard-phases
10859 (add-before
10860 'build 'configure
10861 (assoc-ref gnu:%standard-phases 'configure)))))
10862 (home-page
10863 "https://github.com/sagemath/cysignals")
10864 (synopsis
10865 "Handling of interrupts and signals for Cython")
10866 (description
10867 "The cysignals package provides mechanisms to handle interrupts (and
10868 other signals and errors) in Cython code, using two related approaches,
10869 for mixed Cython/Python code or external C libraries and pure Cython code,
10870 respectively.")
10871 (license license:lgpl3+)))
10872
10873 (define-public python2-cysignals
10874 (package-with-python2 python-cysignals))
10875
10876 (define-public python2-shedskin
10877 (package
10878 (name "python2-shedskin")
10879 (version "0.9.4")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (string-append "https://github.com/shedskin/shedskin/"
10884 "releases/download/v" version
10885 "/shedskin-" version ".tgz"))
10886 (sha256
10887 (base32
10888 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10889 (build-system python-build-system)
10890 (arguments
10891 `(#:python ,python-2
10892 #:phases (modify-phases %standard-phases
10893 (add-after 'unpack 'fix-resulting-include-libs
10894 (lambda* (#:key inputs #:allow-other-keys)
10895 (let ((libgc (assoc-ref inputs "libgc"))
10896 (pcre (assoc-ref inputs "pcre")))
10897 (substitute* "shedskin/makefile.py"
10898 (("variable == 'CCFLAGS':[ ]*")
10899 (string-append "variable == 'CCFLAGS':\n"
10900 " line += ' -I " pcre "/include"
10901 " -I " libgc "/include'"))
10902 (("variable == 'LFLAGS':[ ]*")
10903 (string-append "variable == 'LFLAGS':\n"
10904 " line += ' -L" pcre "/lib"
10905 " -L " libgc "/lib'")))
10906 #t))))))
10907 (inputs `(("pcre" ,pcre)
10908 ("libgc" ,libgc)))
10909 (home-page "https://shedskin.github.io/")
10910 (synopsis "Experimental Python-2 to C++ Compiler")
10911 (description (string-append "This is an experimental compiler for a subset of
10912 Python. It generates C++ code and a Makefile."))
10913 (license (list license:gpl3 license:bsd-3 license:expat))))
10914
10915 (define-public python2-rope
10916 (package
10917 (name "python2-rope")
10918 (version "0.10.3")
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "rope" version))
10923 (sha256
10924 (base32
10925 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10926 (arguments
10927 ;; Rope is currently python-2 only.
10928 ;; https://github.com/python-rope/rope/issues/57
10929 `(#:python ,python-2))
10930 (build-system python-build-system)
10931 (native-inputs
10932 `(("python2-unittest2" ,python2-unittest2)))
10933 (home-page "https://github.com/python-rope/rope")
10934 (synopsis "Refactoring library for Python")
10935 (description "Rope is a refactoring library for Python. It facilitates
10936 the renaming, moving and extracting of attributes, functions, modules, fields
10937 and parameters in Python 2 source code. These refactorings can also be applied
10938 to occurrences in strings and comments.")
10939 (license license:gpl2)))
10940
10941 (define-public python-py3status
10942 (package
10943 (name "python-py3status")
10944 (version "3.1")
10945 (source
10946 (origin
10947 (method url-fetch)
10948 (uri (pypi-uri "py3status" version))
10949 (sha256
10950 (base32
10951 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10952 (build-system python-build-system)
10953 (arguments
10954 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10955 (home-page "https://github.com/ultrabug/py3status")
10956 (synopsis "Extensible i3status wrapper written in Python")
10957 (description "py3status is an i3status wrapper which extends i3status
10958 functionality in a modular way, allowing you to extend your panel with your
10959 own code, responding to click events and updating clock every second.")
10960 (license license:bsd-3)))
10961
10962 (define-public python-tblib
10963 (package
10964 (name "python-tblib")
10965 (version "1.3.0")
10966 (source (origin
10967 (method url-fetch)
10968 (uri (pypi-uri "tblib" version))
10969 (sha256 (base32
10970 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10971 (build-system python-build-system)
10972 (arguments
10973 `(#:phases
10974 (modify-phases %standard-phases
10975 (replace 'check
10976 (lambda _
10977 ;; Upstream runs tests after installation and the package itself
10978 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10979 ;; found.
10980 (setenv "PYTHONPATH"
10981 (string-append (getcwd) "/build/lib:"
10982 (getenv "PYTHONPATH")))
10983 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10984 (native-inputs
10985 `(("python-pytest" ,python-pytest)
10986 ("python-six" ,python-six)))
10987 (home-page "https://github.com/ionelmc/python-tblib")
10988 (synopsis "Traceback serialization library")
10989 (description
10990 "Traceback serialization allows you to:
10991
10992 @enumerate
10993 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10994 different processes. This allows better error handling when running code over
10995 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10996
10997 @item Parse traceback strings and raise with the parsed tracebacks.
10998 @end enumerate\n")
10999 (license license:bsd-3)))
11000
11001 (define-public python2-tblib
11002 (package-with-python2 python-tblib))
11003
11004 (define-public python-sqlparse
11005 (package
11006 (name "python-sqlparse")
11007 (version "0.1.19")
11008 (source (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "sqlparse" version))
11011 (sha256
11012 (base32
11013 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11014 (build-system python-build-system)
11015 (arguments
11016 `(#:phases
11017 (modify-phases %standard-phases
11018 (replace 'check
11019 (lambda* _
11020 ;; setup.py-integrated 2to3 only affects the build files, but
11021 ;; py.test is using the source files. So we need to convert them
11022 ;; manually.
11023 (when (zero? (system* "python3"))
11024 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11025 (zero? (system* "py.test")))))))
11026 (native-inputs
11027 `(("python-pytest" ,python-pytest)))
11028 (home-page "https://github.com/andialbrecht/sqlparse")
11029 (synopsis "Non-validating SQL parser")
11030 (description "Sqlparse is a non-validating SQL parser for Python. It
11031 provides support for parsing, splitting and formatting SQL statements.")
11032 (license license:bsd-3)))
11033
11034 (define-public python2-sqlparse
11035 (package-with-python2 python-sqlparse))
11036
11037 (define-public python-greenlet
11038 (package
11039 (name "python-greenlet")
11040 (version "0.4.11")
11041 (source (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "greenlet" version))
11044 (sha256
11045 (base32
11046 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11047 (build-system python-build-system)
11048 (home-page "https://greenlet.readthedocs.io/")
11049 (synopsis "Lightweight in-process concurrent programming")
11050 (description
11051 "Greenlet package is a spin-off of Stackless, a version of CPython
11052 that supports micro-threads called \"tasklets\". Tasklets run
11053 pseudo-concurrently (typically in a single or a few OS-level threads) and
11054 are synchronized with data exchanges on \"channels\".")
11055 (license (list license:psfl license:expat))))
11056
11057 (define-public python2-greenlet
11058 (package-with-python2 python-greenlet))
11059
11060 (define-public python-gevent
11061 (package
11062 (name "python-gevent")
11063 (version "1.1.1")
11064 (source (origin
11065 (method url-fetch)
11066 (uri (pypi-uri "gevent" version))
11067 (sha256
11068 (base32
11069 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11070 (modules '((guix build utils)))
11071 (snippet
11072 '(begin
11073 ;; unbunding libev and c-ares
11074 (for-each delete-file-recursively '("libev" "c-ares"))
11075 ;; fixing testsuite
11076 (call-with-output-file "greentest/__init__.py" noop)
11077 (substitute* "greentest/testrunner.py"
11078 (("import util") "from . import util")
11079 (("from util import log") "from .util import log"))))))
11080 (build-system python-build-system)
11081 (propagated-inputs
11082 `(("python-greenlet" ,python-greenlet)))
11083 (native-inputs
11084 `(("python-six" ,python-six)))
11085 (inputs
11086 `(("c-ares" ,c-ares)
11087 ("libev" ,libev)))
11088 (home-page "http://www.gevent.org/")
11089 (synopsis "Coroutine-based network library")
11090 (description
11091 "gevent is a coroutine-based Python networking library that uses greenlet
11092 to provide a high-level synchronous API on top of the libev event loop.")
11093 (license license:expat)))
11094
11095 (define-public python2-gevent
11096 (package-with-python2 python-gevent))
11097
11098 (define-public python-geventhttpclient
11099 (package
11100 (name "python-geventhttpclient")
11101 (version "1.3.1")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "geventhttpclient" version))
11105 (sha256
11106 (base32
11107 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11108 (modules '((guix build utils)))
11109 (snippet
11110 '(begin
11111 ;; Delete pre-compiled files.
11112 (for-each delete-file (find-files "src/geventhttpclient"
11113 ".*\\.pyc"))
11114 #t))))
11115 (build-system python-build-system)
11116 (arguments
11117 '(#:phases
11118 (modify-phases %standard-phases
11119 (add-after 'unpack 'delete-network-tests
11120 (lambda _
11121 (delete-file "src/geventhttpclient/tests/test_client.py")
11122 #t))
11123 (delete 'check)
11124 (add-after 'install 'check
11125 (lambda* (#:key inputs outputs #:allow-other-keys)
11126 (add-installed-pythonpath inputs outputs)
11127 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11128 (native-inputs
11129 `(("python-pytest" ,python-pytest)))
11130 (propagated-inputs
11131 `(("python-certifi" ,python-certifi)
11132 ("python-gevent" ,python-gevent)
11133 ("python-six" ,python-six)))
11134 (home-page "https://github.com/gwik/geventhttpclient")
11135 (synopsis "HTTP client library for gevent")
11136 (description "@code{python-geventhttpclient} is a high performance,
11137 concurrent HTTP client library for python using @code{gevent}.")
11138 (license license:expat)))
11139
11140 (define-public python2-geventhttpclient
11141 (package-with-python2 python-geventhttpclient))
11142
11143 (define-public python-fastimport
11144 (package
11145 (name "python-fastimport")
11146 (version "0.9.6")
11147 (source
11148 (origin
11149 (method url-fetch)
11150 (uri (pypi-uri "fastimport" version))
11151 (sha256
11152 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11153 (build-system python-build-system)
11154 (home-page "https://github.com/jelmer/python-fastimport")
11155 (synopsis "VCS fastimport parser and generator in Python")
11156 (description "This package provides a parser for and generator of the Git
11157 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11158 format.")
11159 (license license:gpl2+)))
11160
11161 (define-public python2-fastimport
11162 (package-with-python2 python-fastimport))
11163
11164 (define-public python-twisted
11165 (package
11166 (name "python-twisted")
11167 (version "16.2.0")
11168 (source (origin
11169 (method url-fetch)
11170 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11171 (sha256
11172 (base32
11173 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11174 (build-system python-build-system)
11175 (arguments
11176 '(#:tests? #f)) ; FIXME: Some tests are failing.
11177 ;; #:phases
11178 ;; (modify-phases %standard-phases
11179 ;; (replace 'check
11180 ;; (lambda _
11181 ;; (zero? (system* "./bin/trial" "twisted")))))
11182 (propagated-inputs
11183 `(("python-zope-interface" ,python-zope-interface)))
11184 (home-page "https://twistedmatrix.com/")
11185 (synopsis "Asynchronous networking framework written in Python")
11186 (description
11187 "Twisted is an extensible framework for Python programming, with special
11188 focus on event-based network programming and multiprotocol integration.")
11189 (license license:expat)))
11190
11191 (define-public python2-twisted
11192 (package-with-python2 python-twisted))
11193
11194 (define-public python-pika
11195 (package
11196 (name "python-pika")
11197 (version "0.10.0")
11198 (source
11199 (origin
11200 (method url-fetch)
11201 (uri (pypi-uri "pika" version))
11202 (sha256
11203 (base32
11204 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11205 (build-system python-build-system)
11206 (native-inputs
11207 `(("python-pyev" ,python-pyev)
11208 ("python-tornado" ,python-tornado)
11209 ("python-twisted" ,python-twisted)))
11210 (home-page "https://pika.readthedocs.org")
11211 (synopsis "Pure Python AMQP Client Library")
11212 (description
11213 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11214 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11215 network support library.")
11216 (license license:bsd-3)))
11217
11218 (define-public python2-pika
11219 (package-with-python2 python-pika))
11220
11221 (define-public python-ply
11222 (package
11223 (name "python-ply")
11224 (version "3.9")
11225 (source
11226 (origin
11227 (method url-fetch)
11228 (uri (pypi-uri "ply" version))
11229 (sha256
11230 (base32
11231 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11232 (build-system python-build-system)
11233 (home-page "http://www.dabeaz.com/ply/")
11234 (synopsis "Python Lex & Yacc")
11235 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11236 It uses LR parsing and does extensive error checking.")
11237 (license license:bsd-3)))
11238
11239 (define-public python2-ply
11240 (package-with-python2 python-ply))
11241
11242 (define-public python-tabulate
11243 (package
11244 (name "python-tabulate")
11245 (version "0.7.7")
11246 (source (origin
11247 (method url-fetch)
11248 (uri (pypi-uri "tabulate" version))
11249 (sha256
11250 (base32
11251 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11252 (build-system python-build-system)
11253 (arguments
11254 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11255 ;; and the latest release is not tagged in the upstream repository.
11256 '(#:tests? #f))
11257 (home-page "https://bitbucket.org/astanin/python-tabulate")
11258 (synopsis "Pretty-print tabular data")
11259 (description
11260 "Tabulate is a library and command-line utility to pretty-print tabular
11261 data in Python.")
11262 (license license:expat)))
11263
11264 (define-public python2-tabulate
11265 (package-with-python2 python-tabulate))
11266
11267 (define-public python-kazoo
11268 (package
11269 (name "python-kazoo")
11270 (version "2.2.1")
11271 (source
11272 (origin
11273 (method url-fetch)
11274 (uri (pypi-uri "kazoo" version))
11275 (sha256
11276 (base32
11277 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11278 (build-system python-build-system)
11279 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11280 (propagated-inputs
11281 `(("python-six" ,python-six)))
11282 (home-page "https://kazoo.readthedocs.org")
11283 (synopsis "High-level Zookeeper client library")
11284 (description
11285 "Kazoo is a Python client library for the Apache Zookeeper distributed
11286 application service. It is designed to be easy to use and to avoid common
11287 programming errors.")
11288 (license license:asl2.0)))
11289
11290 (define-public python2-kazoo
11291 (package-with-python2 python-kazoo))
11292
11293 (define-public python-pykafka
11294 (package
11295 (name "python-pykafka")
11296 (version "2.4.0")
11297 (source (origin
11298 (method url-fetch)
11299 (uri (string-append
11300 "https://pypi.python.org/packages/8b/3e/"
11301 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11302 "pykafka-" version ".tar.gz"))
11303 (sha256
11304 (base32
11305 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11306 (build-system python-build-system)
11307 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11308 (propagated-inputs
11309 `(("python-gevent" ,python-gevent)
11310 ("python-kazoo" ,python-kazoo)
11311 ("python-tabulate" ,python-tabulate)))
11312 (inputs
11313 `(("librdkafka" ,librdkafka)))
11314 (home-page "https://pykafka.readthedocs.io/")
11315 (synopsis "Apache Kafka client for Python")
11316 (description
11317 "PyKafka is a client for the Apache Kafka distributed messaging system.
11318 It includes Python implementations of Kafka producers and consumers, which
11319 are optionally backed by a C extension built on librdkafka.")
11320 (license license:asl2.0)))
11321
11322 (define-public python2-pykafka
11323 (package-with-python2 python-pykafka))
11324
11325 (define-public python-wcwidth
11326 (package
11327 (name "python-wcwidth")
11328 (version "0.1.7")
11329 (source
11330 (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "wcwidth" version))
11333 (sha256
11334 (base32
11335 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11336 (build-system python-build-system)
11337 (home-page "https://github.com/jquast/wcwidth")
11338 (synopsis "Measure number of terminal column cells of wide-character codes")
11339 (description "Wcwidth measures the number of terminal column cells of
11340 wide-character codes. It is useful for those implementing a terminal emulator,
11341 or programs that carefully produce output to be interpreted by one. It is a
11342 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11343 specified in POSIX.1-2001 and POSIX.1-2008.")
11344 (license license:expat)))
11345
11346 (define-public python2-wcwidth
11347 (package-with-python2 python-wcwidth))
11348
11349 (define-public python2-jsonrpclib
11350 (package
11351 (name "python2-jsonrpclib")
11352 (version "0.1.7")
11353 (source (origin
11354 (method url-fetch)
11355 (uri (string-append
11356 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11357 "jsonrpclib-" version ".tar.gz"))
11358 (sha256
11359 (base32
11360 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11361 (build-system python-build-system)
11362 (arguments
11363 `(#:tests? #f
11364 #:python ,python-2))
11365 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11366 (synopsis "Implementation of JSON-RPC specification for Python")
11367 (description
11368 "This library is an implementation of the JSON-RPC specification.
11369 It supports both the original 1.0 specification, as well as the
11370 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11371 etc.")
11372 (license license:asl2.0)))
11373
11374 (define-public python-chai
11375 (package
11376 (name "python-chai")
11377 (version "1.1.1")
11378 (source (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "chai" version))
11381 (sha256
11382 (base32
11383 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11384 (build-system python-build-system)
11385 (home-page "https://github.com/agoragames/chai")
11386 (synopsis "Mocking framework for Python")
11387 (description
11388 "Chai provides an api for mocking, stubbing and spying your python
11389 objects, patterned after the Mocha library for Ruby.")
11390 (license license:bsd-3)))
11391
11392 (define-public python2-chai
11393 (package-with-python2 python-chai))
11394
11395 (define-public python-arrow
11396 (package
11397 (name "python-arrow")
11398 (version "0.8.0")
11399 (source (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "arrow" version))
11402 (sha256
11403 (base32
11404 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11405 (build-system python-build-system)
11406 (native-inputs
11407 `(;; For testing
11408 ("python-chai" ,python-chai)
11409 ("python-simplejson" ,python-simplejson)))
11410 (propagated-inputs
11411 `(("python-dateutil" ,python-dateutil)))
11412 (home-page "https://github.com/crsmithdev/arrow/")
11413 (synopsis "Dates and times for Python")
11414 (description
11415 "Arrow is a Python library to creating, manipulating, formatting and
11416 converting dates, times, and timestamps. It implements and updates the
11417 datetime type.")
11418 (license license:asl2.0)))
11419
11420 (define-public python2-arrow
11421 (package-with-python2 python-arrow))
11422
11423 (define-public python-inflection
11424 (package
11425 (name "python-inflection")
11426 (version "0.3.1")
11427 (source
11428 (origin (method url-fetch)
11429 (uri (pypi-uri "inflection" version))
11430 (sha256
11431 (base32
11432 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11433 (build-system python-build-system)
11434 (native-inputs
11435 `(("python-pytest" ,python-pytest)))
11436 (home-page "https://github.com/jpvanhal/inflection")
11437 (synopsis "Python string transformation library")
11438 (description
11439 "Inflection is a string transformation library. It singularizes
11440 and pluralizes English words, and transforms strings from CamelCase to
11441 underscored string.")
11442 (license license:expat)))
11443
11444 (define-public python2-inflection
11445 (package-with-python2 python-inflection))
11446
11447 (define-public python-pylev
11448 (package
11449 (name "python-pylev")
11450 (version "1.3.0")
11451 (source (origin
11452 (method url-fetch)
11453 (uri (pypi-uri "pylev" version))
11454 (sha256
11455 (base32
11456 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11457 (build-system python-build-system)
11458 (home-page "https://github.com/toastdriven/pylev")
11459 (synopsis "Levenshtein distance implementation in Python")
11460 (description "Pure Python Levenshtein implementation, based off the
11461 Wikipedia code samples at
11462 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11463 (license license:bsd-3)))
11464
11465 (define-public python2-pylev
11466 (package-with-python2 python-pylev))
11467
11468 (define-public python-cleo
11469 (package
11470 (name "python-cleo")
11471 (version "0.4.1")
11472 (source (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "cleo" version))
11475 (sha256
11476 (base32
11477 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11478 (build-system python-build-system)
11479 (native-inputs
11480 `(;; For testing
11481 ("python-mock" ,python-mock)
11482 ("python-pytest" ,python-pytest)))
11483 (propagated-inputs
11484 `(("python-psutil" ,python-psutil)
11485 ("python-pylev" ,python-pylev)))
11486 (home-page "https://github.com/sdispater/cleo")
11487 (synopsis "Command-line arguments library for Python")
11488 (description
11489 "Cleo allows you to create command-line commands with signature in
11490 docstring and colored output.")
11491 (license license:expat)))
11492
11493 (define-public python2-cleo
11494 (package-with-python2 python-cleo))
11495
11496 (define-public python-lazy-object-proxy
11497 (package
11498 (name "python-lazy-object-proxy")
11499 (version "1.2.2")
11500 (source (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "lazy-object-proxy" version))
11503 (sha256
11504 (base32
11505 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11506 (build-system python-build-system)
11507 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11508 (synopsis "Lazy object proxy for python")
11509 (description
11510 "Lazy object proxy is an object that wraps a callable but defers the call
11511 until the object is actually required, and caches the result of said call.")
11512 (license license:bsd-2)))
11513
11514 (define-public python2-lazy-object-proxy
11515 (package-with-python2 python-lazy-object-proxy))
11516
11517 (define-public python-dnspython
11518 (package
11519 (name "python-dnspython")
11520 (version "1.15.0")
11521 (source (origin
11522 (method url-fetch)
11523 (uri (string-append "http://www.dnspython.org/kits/"
11524 version "/dnspython-" version ".tar.gz"))
11525 (sha256
11526 (base32
11527 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11528 (build-system python-build-system)
11529 (arguments '(#:tests? #f)) ; XXX: requires internet access
11530 (home-page "http://www.dnspython.org")
11531 (synopsis "DNS toolkit for Python")
11532 (description
11533 "dnspython is a DNS toolkit for Python. It supports almost all record
11534 types. It can be used for queries, zone transfers, and dynamic updates.
11535 It supports TSIG authenticated messages and EDNS0.")
11536 (license license:expat)))
11537
11538 (define-public python2-dnspython
11539 (package-with-python2 python-dnspython))
11540
11541 (define-public python-email-validator
11542 (package
11543 (name "python-email-validator")
11544 (version "1.0.2")
11545 (source
11546 (origin (method url-fetch)
11547 (uri (pypi-uri "email_validator" version))
11548 (sha256
11549 (base32
11550 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11551 (build-system python-build-system)
11552 (arguments
11553 '(#:phases
11554 (modify-phases %standard-phases
11555 (add-before 'build 'use-dnspython
11556 (lambda _
11557 (substitute* "setup.py"
11558 (("dnspython3") "dnspython"))
11559 #t)))))
11560 (propagated-inputs
11561 `(("python-dnspython" ,python-dnspython)
11562 ("python-idna" ,python-idna)))
11563 (home-page "https://github.com/JoshData/python-email-validator")
11564 (synopsis "Email address validation library for Python")
11565 (description
11566 "This library validates email address syntax and deliverability.")
11567 (license license:cc0)))
11568
11569 (define-public python2-email-validator
11570 (package-with-python2 python-email-validator))
11571
11572 (define-public python-ukpostcodeparser
11573 (package
11574 (name "python-ukpostcodeparser")
11575 (version "1.0.3")
11576 (source (origin
11577 (method url-fetch)
11578 (uri (pypi-uri "UkPostcodeParser" version))
11579 (sha256
11580 (base32
11581 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11582 (build-system python-build-system)
11583 (home-page "https://github.com/hamstah/ukpostcodeparser")
11584 (synopsis "UK Postcode parser for Python")
11585 (description
11586 "This library provides the @code{parse_uk_postcode} function for
11587 parsing UK postcodes.")
11588 (license license:expat)))
11589
11590 (define-public python2-ukpostcodeparser
11591 (package-with-python2 python-ukpostcodeparser))
11592
11593 (define-public python-faker
11594 (package
11595 (name "python-faker")
11596 (version "0.7.9")
11597 (source (origin
11598 (method url-fetch)
11599 (uri (pypi-uri "Faker" version))
11600 (sha256
11601 (base32
11602 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11603 (patches
11604 (search-patches "python-faker-fix-build-32bit.patch"))
11605 (modules '((guix build utils)))
11606 (snippet
11607 '(begin
11608 (for-each delete-file (find-files "." "\\.pyc$"))
11609 #t))))
11610 (build-system python-build-system)
11611 (arguments
11612 '(#:phases
11613 (modify-phases %standard-phases
11614 (replace 'check
11615 (lambda _
11616 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11617 (native-inputs
11618 `(;; For testing
11619 ("python-email-validator" ,python-email-validator)
11620 ("python-mock" ,python-mock)
11621 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11622 (propagated-inputs
11623 `(("python-dateutil" ,python-dateutil)
11624 ("python-six" ,python-six)))
11625 (home-page "https://github.com/joke2k/faker")
11626 (synopsis "Python package that generates fake data")
11627 (description
11628 "Faker is a Python package that generates fake data such as names,
11629 addresses, and phone numbers.")
11630 (license license:expat)
11631 (properties `((python2-variant . ,(delay python2-faker))))))
11632
11633 (define-public python2-faker
11634 (let ((base (package-with-python2 (strip-python2-variant
11635 python-faker))))
11636 (package
11637 (inherit base)
11638 (propagated-inputs
11639 `(("python2-ipaddress" ,python2-ipaddress)
11640 ,@(package-propagated-inputs base))))))
11641
11642 (define-public python-fake-factory
11643 (package
11644 (name "python-fake-factory")
11645 (version "0.7.2")
11646 (source (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "fake-factory" version))
11649 (sha256
11650 (base32
11651 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11652 (patches
11653 (search-patches
11654 "python-fake-factory-fix-build-32bit.patch"))))
11655 (build-system python-build-system)
11656 (arguments
11657 '(#:phases
11658 (modify-phases %standard-phases
11659 (replace 'check
11660 (lambda _
11661 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11662 (native-inputs
11663 `(;; For testing
11664 ("python-email-validator" ,python-email-validator)
11665 ("python-mock" ,python-mock)
11666 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11667 (propagated-inputs
11668 `(("python-dateutil" ,python-dateutil)
11669 ("python-six" ,python-six)))
11670 (home-page "https://github.com/joke2k/faker")
11671 (synopsis "Python package that generates fake data")
11672 (description
11673 "Faker is a Python package that generates fake data such as names,
11674 addresses, and phone numbers.")
11675 (license license:expat)
11676 (properties `((python2-variant . ,(delay python2-fake-factory))
11677 (superseded . ,python-faker)))))
11678
11679 (define-public python2-fake-factory
11680 (let ((base (package-with-python2 (strip-python2-variant
11681 python-fake-factory))))
11682 (package
11683 (inherit base)
11684 (properties `((superseded . ,python2-faker)))
11685 (propagated-inputs
11686 `(("python2-ipaddress" ,python2-ipaddress)
11687 ,@(package-propagated-inputs base))))))
11688
11689 (define-public python-pyaml
11690 (package
11691 (name "python-pyaml")
11692 (version "15.8.2")
11693 (source (origin
11694 (method url-fetch)
11695 (uri (pypi-uri "pyaml" version))
11696 (sha256
11697 (base32
11698 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11699 (build-system python-build-system)
11700 (native-inputs
11701 `(("python-unidecode" ,python-unidecode)))
11702 (propagated-inputs
11703 `(("python-pyyaml" ,python-pyyaml)))
11704 (home-page "https://github.com/mk-fg/pretty-yaml")
11705 (synopsis "YAML pretty-print library for Python")
11706 (description
11707 "pyaml is a PyYAML based python module to produce pretty and readable
11708 YAML-serialized data.")
11709 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11710
11711 (define-public python2-pyaml
11712 (package-with-python2 python-pyaml))
11713
11714 (define-public python-flexmock
11715 (package
11716 (name "python-flexmock")
11717 (version "0.10.2")
11718 (source (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "flexmock" version))
11721 (sha256
11722 (base32
11723 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11724 (build-system python-build-system)
11725 (home-page "https://flexmock.readthedocs.org")
11726 (synopsis "Testing library for Python")
11727 (description
11728 "flexmock is a testing library for Python that makes it easy to create
11729 mocks, stubs and fakes.")
11730 (license license:bsd-3)))
11731
11732 (define-public python2-flexmock
11733 (package-with-python2 python-flexmock))
11734
11735 (define-public python-orator
11736 (package
11737 (name "python-orator")
11738 (version "0.8.2")
11739 (source (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "orator" version))
11742 (sha256
11743 (base32
11744 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11745 (build-system python-build-system)
11746 (arguments '(#:tests? #f)) ; no tests
11747 (propagated-inputs
11748 `(("python-arrow" ,python-arrow)
11749 ("python-blinker" ,python-blinker)
11750 ("python-cleo" ,python-cleo)
11751 ("python-faker" ,python-faker)
11752 ("python-inflection" ,python-inflection)
11753 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11754 ("python-pyaml" ,python-pyaml)
11755 ("python-simplejson" ,python-simplejson)
11756 ("python-wrapt" ,python-wrapt)))
11757 (home-page "https://orator-orm.com/")
11758 (synopsis "ActiveRecord ORM for Python")
11759 (description
11760 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11761 implementation for Python.")
11762 (license license:expat)
11763 (properties `((python2-variant . ,(delay python2-orator))))))
11764
11765 (define-public python2-orator
11766 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11767 (package
11768 (inherit base)
11769 (propagated-inputs
11770 `(("python2-ipaddress" ,python2-ipaddress)
11771 ,@(package-propagated-inputs base))))))
11772
11773 (define-public python-prompt-toolkit
11774 (package
11775 (name "python-prompt-toolkit")
11776 (version "1.0.9")
11777 (source
11778 (origin
11779 (method url-fetch)
11780 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11781 (sha256
11782 (base32
11783 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11784 (build-system python-build-system)
11785 (arguments
11786 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11787 (propagated-inputs
11788 `(("python-wcwidth" ,python-wcwidth)
11789 ("python-six" ,python-six)
11790 ("python-pygments" ,python-pygments)))
11791 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11792 (synopsis "Library for building command line interfaces in Python")
11793 (description
11794 "Prompt-Toolkit is a library for building interactive command line
11795 interfaces in Python. It's like GNU Readline but it also features syntax
11796 highlighting while typing, out-of-the-box multi-line input editing, advanced
11797 code completion, incremental search, support for Chinese double-width
11798 characters, mouse support, and auto suggestions.")
11799 (license license:bsd-3)))
11800
11801 (define-public python2-prompt-toolkit
11802 (package-with-python2 python-prompt-toolkit))
11803
11804 (define-public python-jedi
11805 (package
11806 (name "python-jedi")
11807 (version "0.9.0")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "jedi" version))
11812 (sha256
11813 (base32
11814 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11815 (build-system python-build-system)
11816 (arguments
11817 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11818 '(#:tests? #f))
11819 (native-inputs
11820 `(("python-pytest" ,python-pytest)))
11821 (home-page "https://github.com/davidhalter/jedi")
11822 (synopsis
11823 "Autocompletion for Python that can be used for text editors")
11824 (description
11825 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11826 (license license:expat)))
11827
11828 (define-public python2-jedi
11829 (package-with-python2 python-jedi))
11830
11831 (define-public ptpython
11832 (package
11833 (name "ptpython")
11834 (version "0.34")
11835 (source (origin
11836 (method url-fetch)
11837 (uri (pypi-uri "ptpython" version))
11838 (sha256
11839 (base32
11840 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11841 (build-system python-build-system)
11842 (arguments
11843 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11844 (propagated-inputs
11845 `(("python-docopt" ,python-docopt)
11846 ("python-jedi" ,python-jedi)
11847 ("python-prompt-toolkit" ,python-prompt-toolkit)
11848 ("python-pygments" ,python-pygments)))
11849 (home-page "https://github.com/jonathanslenders/ptpython")
11850 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11851 (description
11852 "ptpython is a Python read-eval-print loop with IDE-like features.
11853 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11854 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11855 etc.")
11856 (license license:bsd-3)
11857 (properties `((python2-variant . ,(delay ptpython-2))))))
11858
11859 (define-public ptpython-2
11860 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11861 (package
11862 (inherit base)
11863 (name "ptpython2"))))
11864
11865 (define-public python-requests-oauthlib
11866 (package
11867 (name "python-requests-oauthlib")
11868 (version "0.6.2")
11869 (source
11870 (origin
11871 (method url-fetch)
11872 (uri (pypi-uri "requests-oauthlib" version))
11873 (sha256
11874 (base32
11875 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11876 (build-system python-build-system)
11877 (arguments
11878 `(#:phases
11879 (modify-phases %standard-phases
11880 ;; removes tests that require network access
11881 (add-before 'check 'pre-check
11882 (lambda _
11883 (delete-file "tests/test_core.py")
11884 #t)))))
11885 (native-inputs
11886 `(("python-requests-mock" ,python-requests-mock)
11887 ("python-mock" ,python-mock)))
11888 (propagated-inputs
11889 `(("python-oauthlib" ,python-oauthlib)
11890 ("python-requests" ,python-requests)))
11891 (home-page
11892 "https://github.com/requests/requests-oauthlib")
11893 (synopsis
11894 "OAuthlib authentication support for Requests")
11895 (description
11896 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11897 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11898 (license license:isc)))
11899
11900 (define-public python2-requests-oauthlib
11901 (package-with-python2 python-requests-oauthlib))
11902
11903 (define-public python-stem
11904 (package
11905 (name "python-stem")
11906 (version "1.5.4")
11907 (source
11908 (origin
11909 (method url-fetch)
11910 (uri (pypi-uri "stem" version))
11911 (sha256
11912 (base32
11913 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11914 (build-system python-build-system)
11915 (arguments
11916 `(#:phases
11917 (modify-phases %standard-phases
11918 (replace 'check
11919 (lambda _
11920 (zero? (system* "./run_tests.py" "--unit")))))))
11921 (native-inputs
11922 `(("python-mock" ,python-mock)
11923 ("python-pep8" ,python-pep8)
11924 ("python-pyflakes" ,python-pyflakes)))
11925 (home-page "https://stem.torproject.org/")
11926 (synopsis
11927 "Python controller library that allows applications to interact with Tor")
11928 (description
11929 "Stem is a Python controller library for Tor. With it you can use Tor's
11930 control protocol to script against the Tor process and read descriptor data
11931 relays publish about themselves.")
11932 (license license:lgpl3)))
11933
11934 (define-public python2-stem
11935 (package-with-python2 python-stem))
11936
11937 (define-public python-pyserial
11938 (package
11939 (name "python-pyserial")
11940 (version "3.1.1")
11941 (source
11942 (origin
11943 (method url-fetch)
11944 (uri (pypi-uri "pyserial" version))
11945 (sha256
11946 (base32
11947 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11948 (build-system python-build-system)
11949 (arguments
11950 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11951 ;; #:phases
11952 ;; (modify-phases %standard-phases
11953 ;; (replace 'check
11954 ;; (lambda _
11955 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11956 (home-page
11957 "https://github.com/pyserial/pyserial")
11958 (synopsis "Python Serial Port Bindings")
11959 (description "@code{pyserial} provide serial port bindings for Python. It
11960 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11961 and/or Xon/Xoff. The port is accessed in RAW mode.")
11962 (license license:bsd-3)))
11963
11964 (define-public python2-pyserial
11965 (package-with-python2 python-pyserial))
11966
11967 (define-public python-kivy
11968 (package
11969 (name "python-kivy")
11970 (version "1.9.1")
11971 (source
11972 (origin
11973 (method url-fetch)
11974 (uri (pypi-uri "kivy" version))
11975 (file-name (string-append name "-" version ".tar.gz"))
11976 (sha256
11977 (base32
11978 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11979 (build-system python-build-system)
11980 (arguments
11981 `(#:tests? #f ; Tests require many optional packages
11982 #:phases
11983 (modify-phases %standard-phases
11984 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11985 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11986 (lambda* (#:key inputs #:allow-other-keys)
11987 (setenv "KIVY_SDL2_PATH"
11988 (string-append (assoc-ref inputs "sdl-union")
11989 "/include/SDL2"))
11990 #t)))))
11991 (native-inputs
11992 `(("pkg-config" ,pkg-config)
11993 ("python-cython" ,python-cython)))
11994 (inputs
11995 `(("gstreamer" ,gstreamer)
11996 ("mesa" ,mesa)
11997 ("sdl-union"
11998 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11999 (home-page "http://kivy.org")
12000 (synopsis
12001 "Multitouch application framework")
12002 (description
12003 "A software library for rapid development of
12004 hardware-accelerated multitouch applications.")
12005 (license license:expat)))
12006
12007 (define-public python2-kivy
12008 (package-with-python2 python-kivy))
12009
12010 (define-public python-kivy-next
12011 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12012 (revision "1"))
12013 (package (inherit python-kivy)
12014 (name "python-kivy-next")
12015 (version (string-append "1.9.1-" revision "."
12016 (string-take commit 7)))
12017 (source
12018 (origin
12019 (method git-fetch)
12020 (uri (git-reference
12021 (url "https://github.com/kivy/kivy")
12022 (commit commit)))
12023 (file-name (string-append name "-" version "-checkout"))
12024 (sha256
12025 (base32
12026 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12027
12028 (define-public python2-kivy-next
12029 (package-with-python2 python-kivy-next))
12030
12031 (define-public python-binaryornot
12032 (package
12033 (name "python-binaryornot")
12034 (version "0.4.0")
12035 (source (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "binaryornot" version))
12038 (sha256
12039 (base32
12040 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12041 (build-system python-build-system)
12042 (propagated-inputs
12043 `(("python-chardet" ,python-chardet)
12044 ("python-hypothesis" ,python-hypothesis)))
12045 (home-page "https://github.com/audreyr/binaryornot")
12046 (synopsis "Package to check if a file is binary or text")
12047 (description "Ultra-lightweight pure Python package to check if a file is
12048 binary or text.")
12049 (license license:bsd-3)
12050 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12051
12052 (define-public python2-binaryornot
12053 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12054 (package (inherit base)
12055 (propagated-inputs
12056 `(("python2-enum34" ,python2-enum34)
12057 ,@(package-propagated-inputs base))))))
12058
12059 (define-public python-nltk
12060 (package
12061 (name "python-nltk")
12062 (version "3.2.1")
12063 (source (origin
12064 (method url-fetch)
12065 (uri (pypi-uri "nltk" version))
12066 (sha256
12067 (base32
12068 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12069 (build-system python-build-system)
12070 (arguments
12071 '(;; The tests require some extra resources to be downloaded.
12072 ;; TODO Try packaging these resources.
12073 #:tests? #f))
12074 (home-page "http://nltk.org/")
12075 (synopsis "Natural Language Toolkit")
12076 (description "It provides interfaces to over 50 corpora and lexical
12077 resources such as WordNet, along with a suite of text processing libraries
12078 for classification, tokenization, stemming, tagging, parsing, and semantic
12079 reasoning, wrappers for natural language processing libraries.")
12080 (license license:asl2.0)))
12081
12082 (define-public python2-nltk
12083 (package-with-python2 python-nltk))
12084
12085 (define-public python-pymongo
12086 (package
12087 (name "python-pymongo")
12088 (version "3.3.0")
12089 (source (origin
12090 (method url-fetch)
12091 (uri (pypi-uri "pymongo" version))
12092 (sha256
12093 (base32
12094 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12095 (build-system python-build-system)
12096 (propagated-inputs
12097 `(("python-certifi" ,python-certifi)))
12098 (home-page "https://github.com/mongodb/mongo-python-driver")
12099 (synopsis "Python driver for MongoDB")
12100 (description "Python driver for MongoDB.")
12101 (license license:asl2.0)))
12102
12103 (define-public python2-pymongo
12104 (package-with-python2 python-pymongo))
12105
12106 (define-public python-sh
12107 (package
12108 (name "python-sh")
12109 (version "1.11")
12110 (source (origin
12111 (method url-fetch)
12112 (uri (pypi-uri "sh" version))
12113 (sha256
12114 (base32
12115 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12116 (build-system python-build-system)
12117 (arguments
12118 `(#:tests? #f)) ; no tests
12119 (home-page "https://github.com/amoffat/sh")
12120 (synopsis "Python subprocess interface")
12121 (description "Abstracts process invocation by providing a function
12122 interface for programs.")
12123 (license license:expat)))
12124
12125 (define-public python2-sh
12126 (package-with-python2 python-sh))
12127
12128 (define-public python-consul
12129 (package
12130 (name "python-consul")
12131 (version "0.6.1")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "python-consul" version))
12136 (sha256
12137 (base32
12138 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12139 (build-system python-build-system)
12140 (native-inputs
12141 `(("python-pytest" ,python-pytest)))
12142 (propagated-inputs
12143 `(("python-requests" ,python-requests)
12144 ("python-six" ,python-six)))
12145 (home-page "https://github.com/cablehead/python-consul")
12146 (synopsis "Python client for Consul")
12147 (description
12148 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12149 discovery, monitoring and configuration.")
12150 (license license:expat)))
12151
12152 (define-public python2-consul
12153 (package-with-python2 python-consul))
12154
12155 (define-public python-schematics
12156 (package
12157 (name "python-schematics")
12158 (version "1.1.1")
12159 (source
12160 (origin
12161 (method url-fetch)
12162 (uri (string-append
12163 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12164 (file-name (string-append name "-" version ".tar.gz"))
12165 (sha256
12166 (base32
12167 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12168 (build-system python-build-system)
12169 (propagated-inputs
12170 `(("python-six" ,python-six)))
12171 (arguments
12172 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12173 ; version requirements (eg python-coveralls)
12174 (home-page "https://github.com/schematics/schematics")
12175 (synopsis "Python Data Structures for Humans")
12176 (description "Python Data Structures for Humans.")
12177 (license license:bsd-3)))
12178
12179 (define-public python2-schematics
12180 (package-with-python2 python-schematics))
12181
12182 (define-public python-publicsuffix
12183 (package
12184 (name "python-publicsuffix")
12185 (version "1.1.0")
12186 (source (origin
12187 (method url-fetch)
12188 (uri (pypi-uri "publicsuffix" version))
12189 (sha256
12190 (base32
12191 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12192 (build-system python-build-system)
12193 (arguments
12194 `(#:tests? #f)) ; tests use the internet
12195 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12196 (synopsis "Get suffix for a domain name")
12197 (description "Get a public suffix for a domain name using the Public Suffix
12198 List.")
12199 (license license:expat)))
12200
12201 (define-public python2-publicsuffix
12202 (package-with-python2 python-publicsuffix))
12203
12204 (define-public python-publicsuffix2
12205 (package
12206 (name "python-publicsuffix2")
12207 (version "2.20160818")
12208 (source
12209 (origin
12210 (method url-fetch)
12211 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12212 (sha256
12213 (base32
12214 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12215 (build-system python-build-system)
12216 (arguments
12217 '(#:tests? #f)) ; The test suite requires network access.
12218 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12219 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12220 (description "Get a public suffix for a domain name using the Public Suffix
12221 List. Forked from and using the same API as the publicsuffix package.")
12222 (license (list license:expat license:mpl2.0))))
12223
12224 (define-public python2-publicsuffix2
12225 (package-with-python2 python-publicsuffix2))
12226
12227 (define-public python-url
12228 (package
12229 (name "python-url")
12230 (version "0.2.0")
12231 (source (origin
12232 (method url-fetch)
12233 (uri (pypi-uri "url" version))
12234 (sha256
12235 (base32
12236 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12237 (build-system python-build-system)
12238 (propagated-inputs
12239 `(("python-publicsuffix" ,python-publicsuffix)))
12240 (native-inputs
12241 `(("python-coverage" ,python-coverage)
12242 ("python-nose" ,python-nose)))
12243 (arguments
12244 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12245 (home-page "https://github.com/seomoz/url-py")
12246 (synopsis "URL Parsing")
12247 (description "Library for parsing urls.")
12248 (license license:expat)
12249 (properties `((python2-variant . ,(delay python2-url))))))
12250
12251 (define-public python2-url
12252 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12253 (package (inherit base)
12254 (propagated-inputs
12255 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12256
12257 (define-public python-freezegun
12258 (package
12259 (name "python-freezegun")
12260 (version "0.3.8")
12261 (source
12262 (origin
12263 (method url-fetch)
12264 (uri (pypi-uri "freezegun" version))
12265 (sha256
12266 (base32
12267 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12268 (build-system python-build-system)
12269 (native-inputs
12270 `(("python-mock" ,python-mock)
12271 ("python-nose" ,python-nose)
12272 ("python-coverage" ,python-coverage)))
12273 (propagated-inputs
12274 `(("python-six" ,python-six)
12275 ("python-dateutil" ,python-dateutil)))
12276 (arguments
12277 `(#:phases (modify-phases %standard-phases
12278 ;; The tests are normally executed via `make test`, but the PyPi
12279 ;; package does not include the Makefile.
12280 (replace 'check
12281 (lambda _
12282 (zero? (system* "nosetests" "./tests/")))))))
12283 (home-page "https://github.com/spulec/freezegun")
12284 (synopsis "Test utility for mocking the datetime module")
12285 (description
12286 "FreezeGun is a library that allows your python tests to travel through
12287 time by mocking the datetime module.")
12288 (license license:asl2.0)))
12289
12290 (define-public python2-freezegun
12291 (package-with-python2 python-freezegun))
12292
12293
12294 (define-public python-odfpy
12295 (package
12296 (name "python-odfpy")
12297 (version "1.3.3")
12298 (source (origin
12299 (method url-fetch)
12300 (uri (pypi-uri "odfpy" version))
12301 (sha256
12302 (base32
12303 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12304 (arguments
12305 `(#:modules ((srfi srfi-1)
12306 (guix build python-build-system)
12307 (guix build utils))
12308 #:phases
12309 (modify-phases %standard-phases
12310 (replace 'check
12311 ;; The test runner invokes python2 and python3 for test*.py.
12312 ;; To avoid having both in inputs, we replicate it here.
12313 (lambda _
12314 (every (lambda (test-file)
12315 (zero? (system* "python" test-file)))
12316 (find-files "tests" "^test.*\\.py$")))))))
12317 (build-system python-build-system)
12318 (home-page "https://github.com/eea/odfpy")
12319 (synopsis "Python API and tools to manipulate OpenDocument files")
12320 (description "Collection of libraries and utility programs written in
12321 Python to manipulate OpenDocument 1.2 files.")
12322 (license
12323 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12324 ;; number of files with other licenses.
12325 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12326
12327 (define-public python2-odfpy
12328 (package-with-python2 python-odfpy))
12329
12330 (define-public python-cachecontrol
12331 (package
12332 (name "python-cachecontrol")
12333 (version "0.11.6")
12334 (source
12335 (origin
12336 (method url-fetch)
12337 ;; Pypi does not have tests.
12338 (uri (string-append
12339 "https://github.com/ionrock/cachecontrol/archive/v"
12340 version ".tar.gz"))
12341 (file-name (string-append name "-" version ".tar.gz"))
12342 (sha256
12343 (base32
12344 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12345 (build-system python-build-system)
12346 (arguments
12347 `(#:phases
12348 (modify-phases %standard-phases
12349 (replace 'check
12350 (lambda _
12351 ;; Drop test that requires internet access.
12352 (delete-file "tests/test_regressions.py")
12353 (setenv "PYTHONPATH"
12354 (string-append (getcwd) "/build/lib:"
12355 (getenv "PYTHONPATH")))
12356 (zero? (system* "py.test" "-vv")))))))
12357 (native-inputs
12358 `(("python-pytest" ,python-pytest)
12359 ("python-redis" ,python-redis)
12360 ("python-webtest" ,python-webtest)
12361 ("python-mock" ,python-mock)))
12362 (propagated-inputs
12363 `(("python-requests" ,python-requests)
12364 ("python-lockfile" ,python-lockfile)))
12365 (home-page "https://github.com/ionrock/cachecontrol")
12366 (synopsis "The httplib2 caching algorithms for use with requests")
12367 (description "CacheControl is a port of the caching algorithms in
12368 @code{httplib2} for use with @code{requests} session objects.")
12369 (license license:asl2.0)))
12370
12371 (define-public python2-cachecontrol
12372 (package-with-python2 python-cachecontrol))
12373
12374 (define-public python-lit
12375 (package
12376 (name "python-lit")
12377 (version "0.5.0")
12378 (source
12379 (origin
12380 (method url-fetch)
12381 (uri (pypi-uri "lit" version))
12382 (sha256
12383 (base32
12384 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12385 (build-system python-build-system)
12386 (home-page "http://llvm.org/")
12387 (synopsis "LLVM Software Testing Tool")
12388 (description "@code{lit} is a portable tool for executing LLVM and Clang
12389 style test suites, summarizing their results, and providing indication of
12390 failures.")
12391 (license license:ncsa)))
12392
12393 (define-public python2-lit
12394 (package-with-python2 python-lit))
12395
12396 (define-public python-pytest-pep8
12397 (package
12398 (name "python-pytest-pep8")
12399 (version "1.0.6")
12400 (source (origin
12401 (method url-fetch)
12402 (uri (pypi-uri "pytest-pep8" version))
12403 (sha256
12404 (base32
12405 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12406 (build-system python-build-system)
12407 (arguments
12408 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12409 (native-inputs
12410 `(("python-pytest" ,python-pytest)))
12411 (propagated-inputs
12412 `(("python-pep8" ,python-pep8)))
12413 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12414 (synopsis "Py.test plugin to check PEP8 requirements")
12415 (description "Pytest plugin for checking PEP8 compliance.")
12416 (license license:expat)))
12417
12418 (define-public python2-pytest-pep8
12419 (package-with-python2 python-pytest-pep8))
12420
12421 (define-public python-pytest-flakes
12422 (package
12423 (name "python-pytest-flakes")
12424 (version "1.0.1")
12425 (source (origin
12426 (method url-fetch)
12427 (uri (pypi-uri "pytest-flakes" version))
12428 (sha256
12429 (base32
12430 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12431 (build-system python-build-system)
12432 (arguments
12433 `(#:phases
12434 (modify-phases %standard-phases
12435 (delete 'check)
12436 (add-after 'install 'check
12437 (lambda* (#:key outputs inputs #:allow-other-keys)
12438 ;; It's easier to run tests after install.
12439 ;; Make installed package available for running the tests
12440 (add-installed-pythonpath inputs outputs)
12441 (zero? (system* "py.test" "-vv")))))))
12442 (native-inputs
12443 `(("python-coverage" ,python-coverage)
12444 ("python-pytest" ,python-pytest)
12445 ("python-pytest-cache" ,python-pytest-cache)
12446 ("python-pytest-pep8" ,python-pytest-pep8)))
12447 (propagated-inputs
12448 `(("python-pyflakes" ,python-pyflakes)))
12449 (home-page "https://github.com/fschulze/pytest-flakes")
12450 (synopsis "Py.test plugin to check source code with pyflakes")
12451 (description "Pytest plugin for checking Python source code with pyflakes.")
12452 (license license:expat)))
12453
12454 (define-public python2-pytest-flakes
12455 (package-with-python2 python-pytest-flakes))
12456
12457 (define-public python-natsort
12458 (package
12459 (name "python-natsort")
12460 (version "5.0.2")
12461 (source (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "natsort" version))
12464 (sha256
12465 (base32
12466 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12467 (build-system python-build-system)
12468 (arguments
12469 `(#:phases
12470 (modify-phases %standard-phases
12471 (add-before 'check 'set-cachedir
12472 ;; Tests require write access to $HOME by default
12473 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12474 (native-inputs
12475 `(("python-hypothesis" ,python-hypothesis)
12476 ("python-pytest-cache" ,python-pytest-cache)
12477 ("python-pytest-cov" ,python-pytest-cov)
12478 ("python-pytest-flakes" ,python-pytest-flakes)
12479 ("python-pytest-pep8" ,python-pytest-pep8)))
12480 (propagated-inputs ; TODO: Add python-fastnumbers.
12481 `(("python-pyicu" ,python-pyicu)))
12482 (home-page "https://github.com/SethMMorton/natsort")
12483 (synopsis "Natural sorting for python and shell")
12484 (description
12485 "Natsort lets you apply natural sorting on lists instead of
12486 lexicographical. If you use the built-in @code{sorted} method in python
12487 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12488 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12489 function @code{natsorted} that identifies numbers and sorts them separately
12490 from strings. It can also sort version numbers, real numbers, mixed types
12491 and more, and comes with a shell command @command{natsort} that exposes this
12492 functionality in the command line.")
12493 (license license:expat)
12494 (properties `((python2-variant . ,(delay python2-natsort))))))
12495
12496 (define-public python2-natsort
12497 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12498 (package (inherit base)
12499 (native-inputs
12500 `(("python2-pathlib" ,python2-pathlib)
12501 ("python2-mock" ,python2-mock)
12502 ("python2-enum34" ,python2-enum34)
12503 ,@(package-native-inputs base))))))
12504
12505 (define-public python-glances
12506 (package
12507 (name "python-glances")
12508 (version "2.7.1")
12509 (source
12510 (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "Glances" version))
12513 (sha256
12514 (base32
12515 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12516 (build-system python-build-system)
12517 (propagated-inputs
12518 `(("python-psutil" ,python-psutil)))
12519 (home-page
12520 "https://github.com/nicolargo/glances")
12521 (synopsis
12522 "A cross-platform curses-based monitoring tool")
12523 (description
12524 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12525 Glances uses the PsUtil library to get information from your system. It monitors
12526 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12527 (license license:lgpl3+)))
12528
12529 (define-public python2-glances
12530 (package-with-python2 python-glances))
12531
12532 (define-public python-graphql-core
12533 (package
12534 (name "python-graphql-core")
12535 (version "0.5.3")
12536 (source
12537 (origin
12538 (method url-fetch)
12539 (uri (pypi-uri "graphql-core" version))
12540 (sha256
12541 (base32
12542 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12543 (build-system python-build-system)
12544 (arguments
12545 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12546 #:phases
12547 (modify-phases %standard-phases
12548 (add-after 'unpack 'patch-hardcoded-version
12549 (lambda _ (substitute*
12550 "setup.py"
12551 (("'gevent==1.1rc1'") "'gevent'"))
12552 #t)))))
12553 (native-inputs
12554 `(("python-gevent" ,python-gevent)
12555 ("python-mock" ,python-mock)
12556 ("python-pytest-mock" ,python-pytest-mock)))
12557 (propagated-inputs
12558 `(("python-promise" ,python-promise)
12559 ("python-six" ,python-six)))
12560 (home-page "https://github.com/graphql-python/graphql-core")
12561 (synopsis "GraphQL implementation for Python")
12562 (description
12563 "GraphQL implementation for Python. GraphQL is a data query language and
12564 runtime designed and used to request and deliver data to mobile and web apps.
12565 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12566 to Python.")
12567 (license license:expat)))
12568
12569 (define-public python2-graphql-core
12570 (package-with-python2 python-graphql-core))
12571
12572 (define-public python-graphql-relay
12573 (package
12574 (name "python-graphql-relay")
12575 (version "0.4.5")
12576 (source
12577 (origin
12578 (method url-fetch)
12579 (uri (pypi-uri "graphql-relay" version))
12580 (sha256
12581 (base32
12582 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12583 (build-system python-build-system)
12584 (native-inputs
12585 `(("python-pytest" ,python-pytest)))
12586 (propagated-inputs
12587 `(("python-graphql-core" ,python-graphql-core)
12588 ("python-promise" ,python-promise)
12589 ("python-six" ,python-six)))
12590 (home-page "https://github.com/graphql-python/graphql-relay-py")
12591 (synopsis "Relay implementation for Python")
12592 (description
12593 "This is a library to allow the easy creation of Relay-compliant servers
12594 using the GraphQL Python reference implementation of a GraphQL server. It
12595 should be noted that the code is a exact port of the original
12596 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12597 from Facebook.")
12598 (license license:expat)))
12599
12600 (define-public python2-graphql-relay
12601 (package-with-python2 python-graphql-relay))
12602
12603 (define-public python-graphene
12604 (package
12605 (name "python-graphene")
12606 (version "0.10.2")
12607 (source
12608 (origin
12609 (method url-fetch)
12610 (uri (pypi-uri "graphene" version))
12611 (sha256
12612 (base32
12613 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12614 (build-system python-build-system)
12615 (native-inputs
12616 `(("python-django-filter" ,python-django-filter)
12617 ("python-mock" ,python-mock)
12618 ("python-psycopg2" ,python-psycopg2)
12619 ("python-pytest-django" ,python-pytest-django)
12620 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12621 (propagated-inputs
12622 `(("python-graphql-core" ,python-graphql-core)
12623 ("python-graphql-relay" ,python-graphql-relay)
12624 ("python-iso8601" ,python-iso8601)
12625 ("python-promise" ,python-promise)
12626 ("python-six" ,python-six)))
12627 (home-page "http://graphene-python.org/")
12628 (synopsis "GraphQL Framework for Python")
12629 (description
12630 "Graphene is a Python library for building GraphQL schemas/types.
12631 A GraphQL schema describes your data model, and provides a GraphQL server
12632 with an associated set of resolve methods that know how to fetch data.")
12633 (properties `((python2-variant . ,(delay python2-graphene))))
12634 (license license:expat)))
12635
12636 (define-public python2-graphene
12637 (let ((base (package-with-python2
12638 (strip-python2-variant python-graphene))))
12639 (package (inherit base)
12640 (native-inputs
12641 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12642 ,@(package-native-inputs base))))))
12643
12644 (define-public python-nautilus
12645 (package
12646 (name "python-nautilus")
12647 (version "0.4.9")
12648 (source
12649 (origin
12650 (method url-fetch)
12651 (uri (pypi-uri "nautilus" version))
12652 (sha256
12653 (base32
12654 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12655 (build-system python-build-system)
12656 (arguments `(#:tests? #f)) ; fails to import test modules
12657 (propagated-inputs
12658 `(("python-bcrypt" ,python-bcrypt)
12659 ("python-click" ,python-click)
12660 ("python-consul" ,python-consul)
12661 ("python-graphene" ,python-graphene)
12662 ("python-jinja2" ,python-jinja2)
12663 ("python-peewee" ,python-peewee)
12664 ("python-pika" ,python-pika)
12665 ("python-tornado" ,python-tornado)
12666 ("python-wtforms" ,python-wtforms)))
12667 (native-inputs
12668 `(("python-nose2" ,python-nose2)))
12669 (home-page "https://github.com/AlecAivazis/nautilus")
12670 (synopsis "Library for creating microservice applications")
12671 (description
12672 "Nautilus is a framework for flux based microservices that looks to
12673 provide extendible implementations of common aspects of a cloud so that you can
12674 focus on building massively scalable web applications.")
12675 (license license:expat)))
12676
12677 (define-public python-snowballstemmer
12678 (package
12679 (name "python-snowballstemmer")
12680 (version "1.2.1")
12681 (source (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "snowballstemmer" version))
12684 (sha256
12685 (base32
12686 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12687 (build-system python-build-system)
12688 (arguments
12689 `(;; No tests exist
12690 #:tests? #f))
12691 (home-page "https://github.com/shibukawa/snowball_py")
12692 (synopsis "Snowball stemming library collection for Python")
12693 (description "This package provides 16 word stemmer algorithms generated
12694 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12695 English stemmer.")
12696 (license license:bsd-3)))
12697
12698 (define-public python2-snowballstemmer
12699 (package-with-python2 python-snowballstemmer))
12700
12701 (define-public python-sphinx-cloud-sptheme
12702 (package
12703 (name "python-sphinx-cloud-sptheme")
12704 (version "1.8.0")
12705 (source (origin
12706 (method url-fetch)
12707 (uri (pypi-uri "cloud_sptheme" version))
12708 (sha256
12709 (base32
12710 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12711 (build-system python-build-system)
12712 ;; FIXME: The 'pypi' release archive does not contain tests.
12713 (arguments '(#:tests? #f))
12714 (native-inputs
12715 `(("python-sphinx" ,python-sphinx)))
12716 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12717 (synopsis "'Cloud' theme for Sphinx documenter")
12718 (description "This package contains the \"Cloud\" theme for Sphinx and some
12719 related extensions.")
12720 (license license:bsd-3)))
12721
12722 (define-public python2-sphinx-cloud-sptheme
12723 (package-with-python2 python-sphinx-cloud-sptheme))
12724
12725 (define-public python-sphinx-alabaster-theme
12726 (package
12727 (name "python-sphinx-alabaster-theme")
12728 (version "0.7.9")
12729 (source (origin
12730 (method url-fetch)
12731 (uri (pypi-uri "alabaster" version))
12732 (sha256
12733 (base32
12734 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12735 (build-system python-build-system)
12736 (propagated-inputs
12737 `(("python-pygments" ,python-pygments)))
12738 (home-page "https://alabaster.readthedocs.io/")
12739 (synopsis "Configurable sidebar-enabled Sphinx theme")
12740 (description "Alabaster is a visually (c)lean, responsive, configurable
12741 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12742 (license license:bsd-3)))
12743
12744 (define-public python2-sphinx-alabaster-theme
12745 (package-with-python2 python-sphinx-alabaster-theme))
12746
12747 (define-public python-betamax
12748 (package
12749 (name "python-betamax")
12750 (version "0.8.0")
12751 (source
12752 (origin
12753 (method url-fetch)
12754 (uri (pypi-uri "betamax" version))
12755 (sha256
12756 (base32
12757 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12758 (build-system python-build-system)
12759 (arguments
12760 '(;; Many tests fail because they require networking.
12761 #:tests? #f))
12762 (propagated-inputs
12763 `(("python-requests" ,python-requests)))
12764 (home-page "https://github.com/sigmavirus24/betamax")
12765 (synopsis "Record HTTP interactions with python-requests")
12766 (description "Betamax will record your test suite's HTTP interactions and
12767 replay them during future tests. It is designed to work with python-requests.")
12768 (license license:expat)))
12769
12770 (define-public python2-betamax
12771 (package-with-python2 python-betamax))
12772
12773 (define-public python-s3transfer
12774 (package
12775 (name "python-s3transfer")
12776 (version "0.1.10")
12777 (source (origin
12778 (method url-fetch)
12779 (uri (pypi-uri "s3transfer" version))
12780 (sha256
12781 (base32
12782 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12783 (build-system python-build-system)
12784 (arguments
12785 `(#:phases
12786 (modify-phases %standard-phases
12787 (replace 'check
12788 (lambda _
12789 ;; 7 of the 'integration' tests require network access or login
12790 ;; credentials.
12791 (zero? (system* "nosetests" "--exclude=integration")))))))
12792 (native-inputs
12793 `(("python-docutils" ,python-docutils)
12794 ("python-mock" ,python-mock)
12795 ("python-nose" ,python-nose)))
12796 (propagated-inputs
12797 `(("python-botocore" ,python-botocore)))
12798 (synopsis "Amazon S3 Transfer Manager")
12799 (description "S3transfer is a Python library for managing Amazon S3
12800 transfers.")
12801 (home-page "https://github.com/boto/s3transfer")
12802 (license license:asl2.0)
12803 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12804
12805 (define-public python2-s3transfer
12806 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12807 (package
12808 (inherit base)
12809 (native-inputs
12810 `(("python2-futures" ,python2-futures)
12811 ,@(package-native-inputs base))))))
12812
12813 (define-public python-setproctitle
12814 (package
12815 (name "python-setproctitle")
12816 (version "1.1.10")
12817 (source
12818 (origin
12819 (method url-fetch)
12820 (uri (pypi-uri "setproctitle" version))
12821 (sha256
12822 (base32
12823 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12824 (build-system python-build-system)
12825 (arguments
12826 '(#:phases
12827 (modify-phases %standard-phases
12828 (add-before 'check 'patch-Makefile
12829 ;; Stricly this is only required for the python2 variant.
12830 ;; But adding a phase in an inherited package seems to be
12831 ;; cumbersum. So we patch even for python3.
12832 (lambda _
12833 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12834 (when nose
12835 (substitute* "Makefile"
12836 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12837 (string-append nose "/bin/nosetests "))))
12838 #t)))
12839 (replace 'check
12840 (lambda _
12841 (setenv "PYTHON" (or (which "python3") (which "python")))
12842 (setenv "PYCONFIG" (or (which "python3-config")
12843 (which "python-config")))
12844 (setenv "CC" "gcc")
12845 ;; No need to extend PYTHONPATH to find the built package, since
12846 ;; the Makefile will build anyway
12847 (zero? (system* "make" "check")))))))
12848 (native-inputs
12849 `(("procps" ,procps))) ; required for tests
12850 (home-page
12851 "https://github.com/dvarrazzo/py-setproctitle")
12852 (synopsis
12853 "Setproctitle implementation for Python to customize the process title")
12854 (description "The library allows a process to change its title (as displayed
12855 by system tools such as ps and top).
12856
12857 Changing the title is mostly useful in multi-process systems, for
12858 example when a master process is forked: changing the children's title
12859 allows to identify the task each process is busy with. The technique
12860 is used by PostgreSQL and the OpenSSH Server for example.")
12861 (license license:bsd-3)
12862 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12863
12864 (define-public python2-setproctitle
12865 (let ((base (package-with-python2
12866 (strip-python2-variant python-setproctitle))))
12867 (package
12868 (inherit base)
12869 (native-inputs `(("python2-nose" ,python2-nose)
12870 ,@(package-native-inputs base))))))
12871
12872 (define-public python-validictory
12873 (package
12874 (name "python-validictory")
12875 (version "1.0.1")
12876 (source
12877 (origin
12878 (method url-fetch)
12879 (uri (pypi-uri "validictory" version))
12880 (sha256
12881 (base32
12882 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12883 (build-system python-build-system)
12884 (arguments
12885 '(#:phases
12886 (modify-phases %standard-phases
12887 (add-after 'unpack 'bootstrap
12888 ;; Move the tests out of the package directory to avoid
12889 ;; packaging them.
12890 (lambda* _
12891 (rename-file "validictory/tests" "tests")
12892 (delete-file "tests/__init__.py")))
12893 (replace 'check
12894 (lambda _
12895 ;; Extend PYTHONPATH so the built package will be found.
12896 (setenv "PYTHONPATH"
12897 (string-append (getcwd) "/build/lib:"
12898 (getenv "PYTHONPATH")))
12899 (zero? (system* "py.test" "-vv" )))))))
12900 (native-inputs
12901 `(("python-pytest" ,python-pytest)))
12902 (home-page
12903 "https://github.com/jamesturk/validictory")
12904 (synopsis "General purpose Python data validator")
12905 (description "It allows validation of arbitrary Python data structures.
12906
12907 The schema format is based on the JSON Schema
12908 proposal (http://json-schema.org), so combined with json the library is also
12909 useful as a validator for JSON data.")
12910 (license license:expat)))
12911
12912 (define-public python2-validictory
12913 (package-with-python2 python-validictory))
12914
12915 (define-public python-aniso8601
12916 (package
12917 (name "python-aniso8601")
12918 (version "1.1.0")
12919 (source
12920 (origin
12921 (method url-fetch)
12922 (uri (pypi-uri "aniso8601" version))
12923 (sha256
12924 (base32
12925 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12926 (build-system python-build-system)
12927 (propagated-inputs
12928 `(("python-dateutil" ,python-dateutil)))
12929 (home-page
12930 "https://bitbucket.org/nielsenb/aniso8601")
12931 (synopsis
12932 "Python library for parsing ISO 8601 strings")
12933 (description
12934 "This package contains a library for parsing ISO 8601 datetime strings.")
12935 (license license:bsd-3)))
12936
12937 (define-public python-flask-restful
12938 (package
12939 (name "python-flask-restful")
12940 (version "0.3.5")
12941 (source
12942 (origin
12943 (method url-fetch)
12944 (uri (pypi-uri "Flask-RESTful" version))
12945 (sha256
12946 (base32
12947 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12948 (build-system python-build-system)
12949 (propagated-inputs
12950 `(("python-aniso8601" ,python-aniso8601)
12951 ("python-flask" ,python-flask)
12952 ("python-pycrypto" ,python-pycrypto)
12953 ("python-pytz" ,python-pytz)))
12954 (native-inputs
12955 `(;; Optional dependency of Flask. Tests need it.
12956 ("python-blinker" ,python-blinker)
12957 ("python-mock" ,python-mock) ; For tests
12958 ("python-nose" ,python-nose) ; For tests
12959 ("python-sphinx" ,python-sphinx)))
12960 (home-page
12961 "https://www.github.com/flask-restful/flask-restful/")
12962 (synopsis
12963 "Flask module for creating REST APIs")
12964 (description
12965 "This package contains a Flask module for creating REST APIs.")
12966 (license license:bsd-3)))
12967
12968 (define-public python-flask-basicauth
12969 (package
12970 (name "python-flask-basicauth")
12971 (version "0.2.0")
12972 (source
12973 (origin
12974 (method url-fetch)
12975 (uri (pypi-uri "Flask-BasicAuth" version))
12976 (sha256
12977 (base32
12978 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12979 (build-system python-build-system)
12980 (propagated-inputs
12981 `(("python-flask" ,python-flask)))
12982 (home-page
12983 "https://github.com/jpvanhal/flask-basicauth")
12984 (synopsis
12985 "HTTP basic access authentication for Flask")
12986 (description
12987 "This package provides HTTP basic access authentication for Flask.")
12988 (license license:bsd-3)))
12989
12990 (define-public python-flask-sqlalchemy
12991 (package
12992 (name "python-flask-sqlalchemy")
12993 (version "2.1")
12994 (source
12995 (origin
12996 (method url-fetch)
12997 (uri (pypi-uri "Flask-SQLAlchemy" version))
12998 (sha256
12999 (base32
13000 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13001 (build-system python-build-system)
13002 (propagated-inputs
13003 `(("python-flask" ,python-flask)
13004 ("python-sqlalchemy" ,python-sqlalchemy)))
13005 (home-page
13006 "https://github.com/mitsuhiko/flask-sqlalchemy")
13007 (synopsis
13008 "Module adding SQLAlchemy support to your Flask application")
13009 (description
13010 "This package adds SQLAlchemy support to your Flask application.")
13011 (license license:bsd-3)))
13012
13013 (define-public python-pyev
13014 (package
13015 (name "python-pyev")
13016 (version "0.9.0")
13017 (source
13018 (origin
13019 (method url-fetch)
13020 (uri (pypi-uri "pyev" version))
13021 (sha256
13022 (base32
13023 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13024 (build-system python-build-system)
13025 (arguments
13026 `(#:tests? #f ; no test suite
13027 #:phases
13028 (modify-phases %standard-phases
13029 (add-after 'unpack 'patch
13030 (lambda* (#:key inputs #:allow-other-keys)
13031 (let ((libev (string-append (assoc-ref inputs "libev")
13032 "/lib/libev.so.4")))
13033 (substitute* "setup.py"
13034 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13035 (string-append "libev_dll_name = \"" libev "\"")))))))))
13036 (inputs
13037 `(("libev" ,libev)))
13038 (home-page "http://pythonhosted.org/pyev/")
13039 (synopsis "Python libev interface")
13040 (description "Pyev provides a Python interface to libev.")
13041 (license license:gpl3)))
13042
13043 (define-public python2-pyev
13044 (package-with-python2 python-pyev))
13045
13046 (define-public python-imagesize
13047 (package
13048 (name "python-imagesize")
13049 (version "0.7.1")
13050 (source
13051 (origin
13052 (method url-fetch)
13053 (uri (pypi-uri "imagesize" version))
13054 (sha256
13055 (base32
13056 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13057 (build-system python-build-system)
13058 (arguments
13059 '(;; Test files are not distributed on PyPi:
13060 ;; https://github.com/shibukawa/imagesize_py/issues/7
13061 #:tests? #f))
13062 (home-page "https://github.com/shibukawa/imagesize_py")
13063 (synopsis "Gets image size of files in variaous formats in Python")
13064 (description
13065 "This package allows determination of image size from
13066 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13067 (license license:expat)))
13068
13069 (define-public python2-imagesize
13070 (package-with-python2 python-imagesize))
13071
13072 (define-public python-axolotl-curve25519
13073 (package
13074 (name "python-axolotl-curve25519")
13075 (version "0.1")
13076 (source
13077 (origin
13078 (method git-fetch)
13079 (uri (git-reference
13080 (url "git://github.com/tgalal/python-axolotl-curve25519")
13081 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13082 (file-name (string-append name "-" version "-checkout"))
13083 (sha256
13084 (base32
13085 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13086 (build-system python-build-system)
13087 (arguments
13088 `(;; Prevent creation of the egg. This works around
13089 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13090 #:configure-flags '("--root=/")))
13091 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13092 (synopsis "Python wrapper for curve25519 library")
13093 (description "This is a python wrapper for the curve25519 library
13094 with ed25519 signatures. The C code was pulled from
13095 libaxolotl-android. At the moment this wrapper is meant for use by
13096 python-axolotl.")
13097 (license (list license:gpl3 ; Most files
13098 license:bsd-3)))) ; curve/curve25519-donna.c
13099
13100 (define-public python2-axolotl-curve25519
13101 (package-with-python2 python-axolotl-curve25519))
13102
13103 (define-public python-axolotl
13104 (package
13105 (name "python-axolotl")
13106 (version "0.1.35")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (string-append
13111 "https://github.com/tgalal/python-axolotl/archive/"
13112 version ".tar.gz"))
13113 (file-name (string-append name "-" version ".tar.gz"))
13114 (sha256
13115 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13116 (build-system python-build-system)
13117 (arguments
13118 `(#:phases
13119 (modify-phases %standard-phases
13120 ;; Don't install tests
13121 (add-before 'install 'remove-tests
13122 (lambda _
13123 (for-each delete-file-recursively
13124 '("axolotl/tests" "build/lib/axolotl/tests"))
13125 #t)))))
13126 (propagated-inputs
13127 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13128 ("python-dateutil" ,python-dateutil)
13129 ("python-protobuf" ,python-protobuf)
13130 ("python-pycrypto" ,python-pycrypto)))
13131 (home-page "https://github.com/tgalal/python-axolotl")
13132 (synopsis "Python port of libaxolotl-android")
13133 (description "This is a python port of libaxolotl-android. This
13134 is a ratcheting forward secrecy protocol that works in synchronous and
13135 asynchronous messaging environments.")
13136 (license license:gpl3)))
13137
13138 (define-public python2-axolotl
13139 (package-with-python2 python-axolotl))
13140
13141 (define-public python-termstyle
13142 (package
13143 (name "python-termstyle")
13144 (version "0.1.11")
13145 (source
13146 (origin
13147 (method url-fetch)
13148 (uri (pypi-uri "termstyle" version))
13149 (sha256
13150 (base32
13151 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13152 (build-system python-build-system)
13153 (arguments
13154 '(#:phases
13155 (modify-phases %standard-phases
13156 (replace 'check
13157 (lambda _
13158 (zero? (system* "python" "test3.py")))))))
13159 (home-page "https://github.com/gfxmonk/termstyle")
13160 (synopsis "Console text coloring for Python")
13161 (description "This package provides console text coloring for Python.")
13162 (license license:bsd-3)))
13163
13164 (define-public python-rednose
13165 (package
13166 (name "python-rednose")
13167 (version "1.2.1")
13168 (source
13169 (origin
13170 (method url-fetch)
13171 (uri (pypi-uri "rednose" version))
13172 (sha256
13173 (base32
13174 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13175 (build-system python-build-system)
13176 (arguments
13177 `(#:phases
13178 (modify-phases %standard-phases
13179 (add-after 'unpack 'fix-deps
13180 (lambda _
13181 ;; See <https://github.com/JBKahn/rednose/issues/12>
13182 (substitute* "setup.py"
13183 (("python-termstyle") "termstyle"))
13184 #t)))))
13185 (propagated-inputs
13186 `(("python-colorama" ,python-colorama)
13187 ("python-termstyle" ,python-termstyle)))
13188 (native-inputs
13189 `(("python-six" ,python-six)
13190 ("python-nose" ,python-nose)))
13191 (home-page "https://github.com/JBKahn/rednose")
13192 (synopsis "Colored output for Python nosetests")
13193 (description "This package provides colored output for the
13194 @command{nosetests} command of the Python Nose unit test framework.")
13195 (license license:bsd-3)))
13196
13197 (define-public python2-rednose
13198 (package-with-python2 python-rednose))
13199
13200 (define-public python-flask-restplus
13201 (package
13202 (name "python-flask-restplus")
13203 (version "0.9.2")
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (pypi-uri "flask-restplus" version))
13208 (sha256
13209 (base32
13210 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13211 (build-system python-build-system)
13212 (arguments
13213 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13214 ;; #:phases
13215 ;; (modify-phases %standard-phases
13216 ;; (replace 'check
13217 ;; (lambda _
13218 ;; (zero? (system* "nosetests")))))))
13219 (propagated-inputs
13220 `(("python-aniso8601" ,python-aniso8601)
13221 ("python-flask" ,python-flask)
13222 ("python-jsonschema" ,python-jsonschema)
13223 ("python-pytz" ,python-pytz)
13224 ("python-six" ,python-six)))
13225 (native-inputs
13226 `(("python-tzlocal" ,python-tzlocal)
13227 ("python-blinker" ,python-blinker)
13228 ("python-nose" ,python-nose)
13229 ("python-rednose" ,python-rednose)))
13230 (home-page "https://github.com/noirbizarre/flask-restplus")
13231 (synopsis "Framework for documented API development with Flask")
13232 (description "This package provides a framework for API development with
13233 the Flask web framework in Python. It is similar to package
13234 @code{python-flask-restful} but supports the @code{python-swagger}
13235 documentation builder.")
13236 (license license:expat)))
13237
13238 (define-public python-sadisplay
13239 (package
13240 (name "python-sadisplay")
13241 (version "0.4.6")
13242 (source
13243 (origin
13244 (method url-fetch)
13245 (uri (pypi-uri "sadisplay" version))
13246 (sha256
13247 (base32
13248 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13249 (build-system python-build-system)
13250 (propagated-inputs
13251 `(("python-sqlalchemy" ,python-sqlalchemy)))
13252 (native-inputs
13253 `(("python-nose" ,python-nose)))
13254 (home-page "https://bitbucket.org/estin/sadisplay")
13255 (synopsis "SQLAlchemy schema displayer")
13256 (description "This package provides a program to build Entity
13257 Relationship diagrams from a SQLAlchemy model (or directly from the
13258 database).")
13259 (license license:bsd-3)))
13260
13261 (define-public python2-sadisplay
13262 (package-with-python2 python-sadisplay))
13263
13264 (define-public python-flask-restful-swagger
13265 (package
13266 (name "python-flask-restful-swagger")
13267 (version "0.19")
13268 (source
13269 (origin
13270 (method url-fetch)
13271 (uri (pypi-uri "flask-restful-swagger" version))
13272 (sha256
13273 (base32
13274 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13275 (build-system python-build-system)
13276 (propagated-inputs
13277 `(("python-flask-restful" ,python-flask-restful)))
13278 (home-page "https://github.com/rantav/flask-restful-swagger")
13279 (synopsis "Extract Swagger specs from Flask-Restful projects")
13280 (description "This package lets you extract Swagger API documentation
13281 specs from your Flask-Restful projects.")
13282 (license license:expat)))
13283
13284 (define-public python2-flask-restful-swagger
13285 (package-with-python2 python-flask-restful-swagger))
13286
13287 (define-public python-argcomplete
13288 (package
13289 (name "python-argcomplete")
13290 (version "1.7.0")
13291 (source
13292 (origin
13293 (method url-fetch)
13294 (uri (pypi-uri "argcomplete" version))
13295 (sha256
13296 (base32
13297 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13298 (build-system python-build-system)
13299 (native-inputs
13300 `(("python-pexpect" ,python-pexpect)
13301 ("tcsh" ,tcsh)))
13302 (home-page "https://github.com/kislyuk/argcomplete")
13303 (synopsis "Shell tab completion for Python argparse")
13304 (description "argcomplete provides extensible command line tab completion
13305 of arguments and options for Python scripts using @code{argparse}. It's
13306 particularly useful for programs with many options or sub-parsers that can
13307 dynamically suggest completions; for example, when browsing resources over the
13308 network.")
13309 (license license:asl2.0)))
13310
13311 (define-public python2-argcomplete
13312 (package-with-python2 python-argcomplete))
13313
13314 (define-public python-xopen
13315 (package
13316 (name "python-xopen")
13317 (version "0.1.1")
13318 (source
13319 (origin
13320 (method url-fetch)
13321 (uri (pypi-uri "xopen" version))
13322 (sha256
13323 (base32
13324 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13325 (file-name (string-append name "-" version ".tar.gz"))))
13326 (build-system python-build-system)
13327 (home-page "https://github.com/marcelm/xopen/")
13328 (synopsis "Open compressed files transparently")
13329 (description "This module provides an @code{xopen} function that works like
13330 Python's built-in @code{open} function, but can also deal with compressed files.
13331 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13332 recognized by their file extensions. The focus is on being as efficient as
13333 possible on all supported Python versions.")
13334 (license license:expat)))
13335
13336 (define-public python2-xopen
13337 (package-with-python2 python-xopen))
13338
13339 (define-public python2-cheetah
13340 (package
13341 (name "python2-cheetah")
13342 (version "2.4.4")
13343 (source
13344 (origin
13345 (method url-fetch)
13346 (uri (pypi-uri "Cheetah" version))
13347 (sha256
13348 (base32
13349 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13350 (build-system python-build-system)
13351 (arguments
13352 `(#:python ,python-2))
13353 (propagated-inputs
13354 `(("python2-markdown" ,python2-markdown)))
13355 (home-page "https://pythonhosted.org/Cheetah/")
13356 (synopsis "Template engine")
13357 (description "Cheetah is a text-based template engine and Python code
13358 generator.
13359
13360 Cheetah can be used as a standalone templating utility or referenced as
13361 a library from other Python applications. It has many potential uses,
13362 but web developers looking for a viable alternative to ASP, JSP, PHP and
13363 PSP are expected to be its principle user group.
13364
13365 Features:
13366 @enumerate
13367 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13368 text-based format.
13369 @item Cleanly separates content, graphic design, and program code.
13370 @item Blends the power and flexibility of Python with a simple template language
13371 that non-programmers can understand.
13372 @item Gives template writers full access to any Python data structure, module,
13373 function, object, or method in their templates.
13374 @item Makes code reuse easy by providing an object-orientated interface to
13375 templates that is accessible from Python code or other Cheetah templates.
13376 One template can subclass another and selectively reimplement sections of it.
13377 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13378 improve the performance of a dynamic website.
13379 @item Compiles templates into optimized, yet readable, Python code.
13380 @end enumerate")
13381 (license (license:x11-style "file://LICENSE"))))
13382
13383 (define-public python-dulwich
13384 (package
13385 (name "python-dulwich")
13386 (version "0.16.3")
13387 (source
13388 (origin
13389 (method url-fetch)
13390 (uri (list (string-append "https://www.dulwich.io/releases/"
13391 "dulwich-" version ".tar.gz")
13392 (pypi-uri "dulwich" version)))
13393 (sha256
13394 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13395 (build-system python-build-system)
13396 (arguments
13397 `(#:phases
13398 (modify-phases %standard-phases
13399 (add-before 'check 'fix-tests
13400 (lambda* (#:key inputs #:allow-other-keys)
13401 ;; The tests use Popen with a custom environment which doesn't
13402 ;; include PATH.
13403 (substitute* "dulwich/tests/compat/utils.py"
13404 (("'git'") (string-append "'"
13405 (which "git")
13406 "'")))
13407 (substitute* '("dulwich/tests/test_repository.py"
13408 "dulwich/tests/test_hooks.py")
13409 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13410 (setenv "TEST_RUNNER" "unittest")
13411 (setenv "PYTHONHASHSEED" "random")
13412 #t)))))
13413 (propagated-inputs
13414 `(("python-fastimport" ,python-fastimport)))
13415 (native-inputs
13416 `(("python-mock" ,python-mock)
13417 ("python-geventhttpclient" ,python-geventhttpclient)
13418 ("git" ,git)))
13419 (home-page "https://www.dulwich.io/")
13420 (synopsis "Git implementation in Python")
13421 (description "Dulwich is an implementation of the Git file formats and
13422 protocols written in pure Python.")
13423 ;; Can be used with either license.
13424 (license (list license:asl2.0 license:gpl2+))))
13425
13426 (define-public python2-dulwich
13427 (package-with-python2 python-dulwich))
13428
13429 (define-public python-pbkdf2
13430 (package
13431 (name "python-pbkdf2")
13432 (version "1.3")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (pypi-uri "pbkdf2" version))
13437 (sha256
13438 (base32
13439 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13440 (build-system python-build-system)
13441 (arguments
13442 '(#:phases
13443 (modify-phases %standard-phases
13444 (replace 'check
13445 (lambda _
13446 (setenv "PYTHONPATH"
13447 (string-append (getcwd) "/build/lib:"
13448 (getenv "PYTHONPATH")))
13449 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13450 (propagated-inputs
13451 `(("python-pycrypto" ,python-pycrypto))) ; optional
13452 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13453 (synopsis "Password-based key derivation")
13454 (description "This module implements the password-based key derivation
13455 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13456
13457 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13458 is part of the RSA Public Key Cryptography Standards series. The provided
13459 implementation takes a password or a passphrase and a salt value (and
13460 optionally a iteration count, a digest module, and a MAC module) and provides
13461 a file-like object from which an arbitrarly-sized key can be read.")
13462 (license license:expat)))
13463
13464 (define-public python2-pbkdf2
13465 (package-with-python2 python-pbkdf2))
13466
13467 (define-public python-qrcode
13468 (package
13469 (name "python-qrcode")
13470 (version "5.3")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "qrcode" version))
13475 (sha256
13476 (base32
13477 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13478 (build-system python-build-system)
13479 (arguments
13480 ;; FIXME: Tests require packaging 'pymaging'.
13481 '(#:tests? #f))
13482 (propagated-inputs
13483 `(("python-lxml" ,python-lxml) ; for SVG output
13484 ("python-pillow" ,python-pillow) ; for PNG output
13485 ("python-six" ,python-six)))
13486 (home-page "https://github.com/lincolnloop/python-qrcode")
13487 (synopsis "QR Code image generator")
13488 (description "This package provides a pure Python QR Code generator
13489 module. It uses the Python Imaging Library (PIL) to allow for the generation
13490 of QR Codes.
13491
13492 In addition this package provides a command line tool to generate QR codes and
13493 either write these QR codes to a file or do the output as ascii art at the
13494 console.")
13495 (license license:bsd-3)))
13496
13497 (define-public python2-qrcode
13498 (package-with-python2 python-qrcode))
13499
13500 ;; SlowAES isn't compatible with Python 3.
13501 (define-public python2-slowaes
13502 (package
13503 (name "python2-slowaes")
13504 (version "0.1a1")
13505 (source
13506 (origin
13507 (method url-fetch)
13508 (uri (pypi-uri "slowaes" version))
13509 (sha256
13510 (base32
13511 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13512 (build-system python-build-system)
13513 (arguments `(#:python ,python-2))
13514 (home-page "http://code.google.com/p/slowaes/")
13515 (synopsis "Implementation of AES in Python")
13516 (description "This package contains an implementation of AES in Python.
13517 This implementation is slow (hence the project name) but still useful when
13518 faster ones are not available.")
13519 (license license:asl2.0)))
13520
13521 (define-public python-rst2ansi
13522 (package
13523 (name "python-rst2ansi")
13524 (version "0.1.5")
13525 (source
13526 (origin
13527 (method url-fetch)
13528 (uri (pypi-uri "rst2ansi" version))
13529 (sha256
13530 (base32
13531 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13532 (build-system python-build-system)
13533 (propagated-inputs
13534 `(("python-docutils" ,python-docutils)))
13535 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13536 (synopsis "Convert RST to ANSI-decorated console output")
13537 (description
13538 "Python module dedicated to rendering RST (reStructuredText) documents
13539 to ansi-escaped strings suitable for display in a terminal.")
13540 (license license:expat)))
13541
13542 (define-public python-ansi2html
13543 (package
13544 (name "python-ansi2html")
13545 (version "1.2.0")
13546 (source
13547 (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "ansi2html" version))
13550 (sha256
13551 (base32
13552 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13553 (build-system python-build-system)
13554 (native-inputs
13555 `(("python-mock" ,python-mock)
13556 ("python-nose" ,python-nose)))
13557 (propagated-inputs
13558 `(("python-six" ,python-six)))
13559 (home-page "http://github.com/ralphbean/ansi2html")
13560 (synopsis "Convert ANSI-decorated console output to HTML")
13561 (description
13562 "@command{ansi2html} is a Python library and command line utility for
13563 convering text with ANSI color codes to HTML or LaTeX.")
13564 (license license:gpl3+)))
13565
13566 (define-public python2-ansi2html
13567 (package-with-python2 python-ansi2html))
13568
13569 (define-public python-ddt
13570 (package
13571 (name "python-ddt")
13572 (version "1.1.1")
13573 (source
13574 (origin
13575 (method url-fetch)
13576 (uri (pypi-uri "ddt" version))
13577 (sha256
13578 (base32
13579 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13580 (build-system python-build-system)
13581 (native-inputs
13582 `(("python-mock" ,python-mock)
13583 ("python-nose" ,python-nose)))
13584 (propagated-inputs
13585 `(("python-six" ,python-six)
13586 ("python-pyyaml" ,python-pyyaml)))
13587 (home-page "https://github.com/txels/ddt")
13588 (synopsis "Data-Driven Tests")
13589 (description
13590 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13591 it with different test data, and make it appear as multiple test cases.")
13592 (license license:expat)))
13593
13594 (define-public python2-ddt
13595 (package-with-python2 python-ddt))
13596
13597 (define-public python-pycosat
13598 (package
13599 (name "python-pycosat")
13600 (version "0.6.1")
13601 (source
13602 (origin
13603 (method url-fetch)
13604 (uri (pypi-uri "pycosat" version))
13605 (sha256
13606 (base32
13607 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13608 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13609 (build-system python-build-system)
13610 (home-page "https://github.com/ContinuumIO/pycosat")
13611 (synopsis "Bindings to picosat (a SAT solver)")
13612 (description
13613 "This package provides efficient Python bindings to @code{picosat} on
13614 the C level. When importing pycosat, the @code{picosat} solver becomes part
13615 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13616 Problem} (SAT) solver.")
13617 (license license:expat)))
13618
13619 (define-public python2-pycosat
13620 (package-with-python2 python-pycosat))
13621
13622 (define-public python2-ruamel.ordereddict
13623 (package
13624 (name "python2-ruamel.ordereddict")
13625 (version "0.4.9")
13626 (source
13627 (origin
13628 (method url-fetch)
13629 (uri (pypi-uri "ruamel.ordereddict" version))
13630 (sha256
13631 (base32
13632 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13633 (build-system python-build-system)
13634 (arguments
13635 `(#:python ,python-2
13636 #:phases
13637 (modify-phases %standard-phases
13638 (delete 'check)
13639 (add-after 'install 'check
13640 (lambda* (#:key inputs outputs #:allow-other-keys)
13641 (add-installed-pythonpath inputs outputs)
13642 (zero? (system* "python" "test/testordereddict.py")))))))
13643 (home-page "https://bitbucket.org/ruamel/ordereddict")
13644 (synopsis "Version of dict that keeps keys in insertion order")
13645 (description
13646 "This is an implementation of an ordered dictionary with @dfn{Key
13647 Insertion Order} (KIO: updates of values do not affect the position of the
13648 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13649 removed and put at the back). The standard library module @code{OrderedDict},
13650 implemented later, implements a subset of @code{ordereddict} functionality.
13651 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13652 Order} (KSO, no sorting function can be specified, but a transform can be
13653 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13654 (license license:expat)))
13655
13656 (define-public python-pypeg2
13657 (package
13658 (name "python-pypeg2")
13659 (version "2.15.2")
13660 (source
13661 (origin
13662 (method url-fetch)
13663 (uri (pypi-uri "pyPEG2" version))
13664 (sha256
13665 (base32
13666 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13667 (build-system python-build-system)
13668 (propagated-inputs `(("python-lxml" ,python-lxml)))
13669 (arguments
13670 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13671 '(#:tests? #f))
13672 (home-page "https://fdik.org/pyPEG/")
13673 (synopsis "Parsering Expression Grammars in Python")
13674 (description "PyPEG is an intrinsic parser interpreter framework for
13675 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13676 parse many formal languages.")
13677 (license license:gpl2)))
13678
13679 (define-public python2-cliapp
13680 (package
13681 (name "python2-cliapp")
13682 (version "1.20160724")
13683 (source
13684 (origin
13685 (method url-fetch)
13686 (uri (string-append
13687 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13688 version ".tar.gz"))
13689 (sha256
13690 (base32
13691 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13692 (build-system python-build-system)
13693 (arguments
13694 `(#:python ,python-2))
13695 (propagated-inputs
13696 `(("python2-pyaml" ,python2-pyaml)))
13697 (home-page "https://liw.fi/cliapp/")
13698 (synopsis "Python framework for command line programs")
13699 (description "@code{python2-cliapp} is a python framework for
13700 command line programs. It contains the typical stuff such programs
13701 need to do, such as parsing the command line for options, and
13702 iterating over input files.")
13703 (license license:gpl2+)))
13704
13705 (define-public python2-ttystatus
13706 (package
13707 (name "python2-ttystatus")
13708 (version "0.32")
13709 (source
13710 (origin
13711 (method url-fetch)
13712 (uri (string-append
13713 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13714 version ".tar.gz"))
13715 (sha256
13716 (base32
13717 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13718 (build-system python-build-system)
13719 (arguments
13720 `(#:python ,python-2))
13721 (home-page "https://liw.fi/ttystatus/")
13722 (synopsis "Python library for showing progress reporting and
13723 status updates on terminals")
13724 (description "@code{python2-ttystatus} is a python library for
13725 showing progress reporting and status updates on terminals, for
13726 command line programs. Output is automatically adapted to the width
13727 of the terminal: truncated if it does not fit, and resized if the
13728 terminal size changes.")
13729 (license license:gpl3+)))
13730
13731 (define-public python2-tracing
13732 (package
13733 (name "python2-tracing")
13734 (version "0.10")
13735 (source
13736 (origin
13737 (method url-fetch)
13738 (uri (string-append
13739 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13740 version ".tar.gz"))
13741 (sha256
13742 (base32
13743 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13744 (build-system python-build-system)
13745 (arguments
13746 `(#:python ,python-2))
13747 (home-page "https://liw.fi/tracing/")
13748 (synopsis "Python debug logging helper")
13749 (description "@code{python2-tracing} is a python library for
13750 logging debug messages. It provides a way to turn debugging messages
13751 on and off, based on the filename they occur in. It is much faster
13752 than using @code{logging.Filter} to accomplish the same thing, which
13753 matters when code is run in production mode. The actual logging still
13754 happens using the @code{logging} library.")
13755 (license license:gpl3+)))
13756
13757 (define-public python2-larch
13758 (package
13759 (name "python2-larch")
13760 (version "1.20151025")
13761 (source
13762 (origin
13763 (method url-fetch)
13764 (uri (string-append
13765 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13766 version ".tar.gz"))
13767 (sha256
13768 (base32
13769 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13770 (build-system python-build-system)
13771 (arguments
13772 `(#:python ,python-2))
13773 (propagated-inputs
13774 `(("python2-tracing" ,python2-tracing)))
13775 (home-page "https://liw.fi/larch/")
13776 (synopsis "Python copy-on-write B-tree library")
13777 (description "@code{python2-larch} is an implementation of
13778 particular kind of B-tree, based on research by Ohad Rodeh. See
13779 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13780 on the data structure.
13781
13782 The distinctive feature of this B-tree is that a node is never
13783 (conceptually) modified. Instead, all updates are done by
13784 copy-on-write. This makes it easy to clone a tree, and modify only the
13785 clone, while other processes access the original tree.")
13786 (license license:gpl3+)))
13787
13788 (define-public python-htmlmin
13789 (package
13790 (name "python-htmlmin")
13791 (version "0.1.10")
13792 (source
13793 (origin
13794 (method url-fetch)
13795 (uri (pypi-uri "htmlmin" version))
13796 (sha256
13797 (base32
13798 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13799 (arguments
13800 `(#:tests? #f)) ;htmlmin has no tests
13801 (build-system python-build-system)
13802 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13803 (synopsis "HTML minifier")
13804 (description "@code{htmlmin} is an HTML minifier that just works.
13805 It comes with safe defaults and easily configurable options.")
13806 (license license:bsd-3)))
13807
13808 (define-public python2-htmlmin
13809 (package-with-python2 python-htmlmin))
13810
13811 (define-public python-flask-htmlmin
13812 (package
13813 (name "python-flask-htmlmin")
13814 (version "1.2")
13815 (source
13816 (origin
13817 (method url-fetch)
13818 (uri (pypi-uri "Flask-HTMLmin" version))
13819 (sha256
13820 (base32
13821 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13822 (propagated-inputs
13823 `(("python-flask" ,python-flask)
13824 ("python-htmlmin" ,python-htmlmin)))
13825 (build-system python-build-system)
13826 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13827 (synopsis "HTML response minifier for Flask")
13828 (description
13829 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13830 (license license:bsd-3)))
13831
13832 (define-public python2-flask-htmlmin
13833 (package-with-python2 python-flask-htmlmin))
13834
13835 (define-public python-flask-login
13836 (package
13837 (name "python-flask-login")
13838 (version "0.4.0")
13839 (source
13840 (origin
13841 (method url-fetch)
13842 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13843 version ".tar.gz"))
13844 (file-name (string-append name "-" version ".tar.gz"))
13845 (sha256
13846 (base32
13847 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13848 (arguments
13849 ;; Tests fail PEP8 compliance. See:
13850 ;; https://github.com/maxcountryman/flask-login/issues/340
13851 `(#:tests? #f))
13852 (build-system python-build-system)
13853 (home-page "https://github.com/maxcountryman/flask-login")
13854 (synopsis "User session management for Flask")
13855 (description
13856 "@code{Flask-Login} provides user session management for Flask. It
13857 handles the common tasks of logging in, logging out, and remembering your
13858 users' sessions over extended periods of time.")
13859 (license license:expat)))
13860
13861 (define-public python2-flask-login
13862 (package-with-python2 python-flask-login))
13863
13864 (define-public python-astroid
13865 (package
13866 (name "python-astroid")
13867 (version "1.5.3")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (string-append
13872 "https://github.com/PyCQA/astroid/archive/astroid-"
13873 version ".tar.gz"))
13874 (sha256
13875 (base32
13876 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
13877 (build-system python-build-system)
13878 (propagated-inputs
13879 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13880 ("python-six" ,python-six)
13881 ("python-wrapt" ,python-wrapt)))
13882 (arguments
13883 `(#:phases
13884 (modify-phases %standard-phases
13885 (replace 'check
13886 (lambda _
13887 (zero? (system* "python" "-m" "unittest" "discover"
13888 "-p" "unittest*.py")))))))
13889 (home-page "https://github.com/PyCQA/astroid")
13890 (synopsis "Common base representation of python source code for pylint and
13891 other projects")
13892 (description "@code{python-astroid} provides a common base representation
13893 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13894
13895 It provides a compatible representation which comes from the _ast module. It
13896 rebuilds the tree generated by the builtin _ast module by recursively walking
13897 down the AST and building an extended ast. The new node classes have
13898 additional methods and attributes for different usages. They include some
13899 support for static inference and local name scopes. Furthermore, astroid
13900 builds partial trees by inspecting living objects.")
13901 (license license:lgpl2.1+)
13902 (properties `((python2-variant . ,(delay python2-astroid))))))
13903
13904 (define-public python2-astroid
13905 (let ((base (package-with-python2
13906 (strip-python2-variant python-astroid))))
13907 (package (inherit base)
13908 (propagated-inputs
13909 `(("python2-backports-functools-lru-cache"
13910 ,python2-backports-functools-lru-cache)
13911 ("python2-enum34" ,python2-enum34)
13912 ("python2-singledispatch" ,python2-singledispatch)
13913 ,@(package-propagated-inputs base))))))
13914
13915 (define-public python-isort
13916 (package
13917 (name "python-isort")
13918 (version "4.2.5")
13919 (source
13920 (origin
13921 (method url-fetch)
13922 (uri (string-append
13923 "https://github.com/timothycrosley/isort/archive/"
13924 version ".tar.gz"))
13925 (file-name (string-append name "-" version ".tar.gz"))
13926 (sha256
13927 (base32
13928 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13929 (build-system python-build-system)
13930 (native-inputs
13931 `(("python-mock" ,python-mock)
13932 ("python-pytest" ,python-pytest)))
13933 (home-page "https://github.com/timothycrosley/isort")
13934 (synopsis "Python utility/library to sort python imports")
13935 (description "@code{python-isort} is a python utility/library to sort
13936 imports alphabetically, and automatically separated into sections. It
13937 provides a command line utility, a python library and plugins for various
13938 editors.")
13939 (license license:expat)))
13940
13941 (define-public python2-isort
13942 (package-with-python2 python-isort))
13943
13944 (define-public python2-backports-functools-lru-cache
13945 (package
13946 (name "python2-backports-functools-lru-cache")
13947 (version "1.3")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 ;; only the pypi tarballs contain the necessary metadata
13952 (uri (pypi-uri "backports.functools_lru_cache" version))
13953 (sha256
13954 (base32
13955 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13956 (build-system python-build-system)
13957 (native-inputs
13958 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13959 (arguments
13960 `(#:python ,python-2))
13961 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13962 (synopsis "Backport of functools.lru_cache from Python 3.3")
13963 (description "@code{python2-backports-functools-lru-cache} is a backport
13964 of @code{functools.lru_cache} from python 3.3.")
13965 (license license:expat)))
13966
13967 (define-public python-configparser
13968 (package
13969 (name "python-configparser")
13970 (version "3.5.0")
13971 (source
13972 (origin
13973 (method url-fetch)
13974 (uri (string-append
13975 "https://bitbucket.org/ambv/configparser/get/"
13976 version ".tar.bz2"))
13977 (file-name (string-append name "-" version ".tar.gz"))
13978 (sha256
13979 (base32
13980 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13981 (build-system python-build-system)
13982 (home-page "http://docs.python.org/py3k/library/configparser.html")
13983 (synopsis "Backport of configparser from python 3.5")
13984 (description "@code{python-configparser} is a backport of
13985 @code{configparser} from Python 3.5 so that it can be used directly
13986 in other versions.")
13987 (license license:expat)))
13988
13989 (define-public python2-configparser
13990 (package-with-python2 python-configparser))
13991
13992 (define-public python2-coverage-test-runner
13993 (package
13994 (name "python2-coverage-test-runner")
13995 (version "1.11")
13996 (source
13997 (origin
13998 (method url-fetch)
13999 (uri (string-append
14000 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14001 "coverage-test-runner/snapshot/coverage-test-runner-"
14002 version ".tar.gz"))
14003 (sha256
14004 (base32
14005 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14006 (build-system python-build-system)
14007 (arguments
14008 `(#:python ,python-2
14009 #:phases
14010 (modify-phases %standard-phases
14011 (replace 'check
14012 (lambda _
14013 (zero? (system* "./testrun")))))))
14014 (propagated-inputs
14015 `(("python2-coverage" ,python2-coverage)))
14016 (home-page "https://liw.fi/coverage-test-runner/")
14017 (synopsis "Python module for running unit tests")
14018 (description "@code{CoverageTestRunner} is a python module for running
14019 unit tests and failing them if the unit test module does not exercise all
14020 statements in the module it tests.")
14021 (license license:gpl3+)))
14022
14023 (define-public python-pylint
14024 (package
14025 (name "python-pylint")
14026 (version "1.7.2")
14027 (source
14028 (origin
14029 (method url-fetch)
14030 (uri (string-append
14031 "https://github.com/PyCQA/pylint/archive/pylint-"
14032 version ".tar.gz"))
14033 (sha256
14034 (base32
14035 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14036 (build-system python-build-system)
14037 (native-inputs
14038 `(("python-pytest" ,python-pytest)
14039 ("python-pytest-runner" ,python-pytest-runner)
14040 ("python-tox" ,python-tox)))
14041 (propagated-inputs
14042 `(("python-astroid" ,python-astroid)
14043 ("python-isort" ,python-isort)
14044 ("python-mccabe" ,python-mccabe)
14045 ("python-six" ,python-six)))
14046 (arguments
14047 `(#:phases
14048 (modify-phases %standard-phases
14049 (replace 'check
14050 (lambda _
14051 ;; Somehow, tests for python2-pylint
14052 ;; fail if run from the build directory
14053 (let ((work "/tmp/work"))
14054 (mkdir-p work)
14055 (setenv "PYTHONPATH"
14056 (string-append (getenv "PYTHONPATH") ":" work))
14057 (copy-recursively "." work)
14058 (with-directory-excursion "/tmp"
14059 (zero? (system* "python" "-m" "unittest" "discover"
14060 "-s" (string-append work "/pylint/test")
14061 "-p" "*test_*.py")))))))))
14062 (home-page "https://github.com/PyCQA/pylint")
14063 (synopsis "Python source code analyzer which looks for coding standard
14064 errors")
14065 (description "Pylint is a Python source code analyzer which looks
14066 for programming errors, helps enforcing a coding standard and sniffs
14067 for some code smells (as defined in Martin Fowler's Refactoring book).
14068
14069 Pylint has many rules enabled by default, way too much to silence them
14070 all on a minimally sized program. It's highly configurable and handle
14071 pragmas to control it from within your code. Additionally, it is
14072 possible to write plugins to add your own checks.")
14073 (license license:gpl2+)))
14074
14075 (define-public python2-pylint
14076 (let ((pylint (package-with-python2 python-pylint)))
14077 (package (inherit pylint)
14078 (propagated-inputs
14079 `(("python2-backports-functools-lru-cache"
14080 ,python2-backports-functools-lru-cache)
14081 ("python2-configparser" ,python2-configparser)
14082 ,@(package-propagated-inputs pylint))))))
14083
14084 (define-public python-paramunittest
14085 (package
14086 (name "python-paramunittest")
14087 (version "0.2")
14088 (source
14089 (origin
14090 (method url-fetch)
14091 (uri (pypi-uri "ParamUnittest" version))
14092 (sha256
14093 (base32
14094 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14095 (build-system python-build-system)
14096 (home-page
14097 "https://github.com/rik0/ParamUnittest")
14098 (synopsis
14099 "Simple extension to have parametrized unit tests")
14100 (description
14101 "This package allows to create parametrized unit-tests that work with the standard
14102 unittest package. A parametrized test case is automatically converted to multiple test
14103 cases. Since they are TestCase subclasses, they work with other test suites that
14104 recognize TestCases.")
14105 (license license:bsd-2)))
14106
14107 (define-public python2-python-paramunittest
14108 (package-with-python2 python-paramunittest))
14109
14110 (define-public python-mando
14111 (package
14112 (name "python-mando")
14113 (version "0.5")
14114 (source
14115 (origin
14116 (method url-fetch)
14117 (uri (pypi-uri "mando" version))
14118 (sha256
14119 (base32
14120 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14121 (build-system python-build-system)
14122 (propagated-inputs
14123 `(("python-rst2ansi" ,python-rst2ansi)))
14124 (native-inputs
14125 `(("python-sphinx" ,python-sphinx-1.5.3)
14126 ("python-paramunittest" ,python-paramunittest)))
14127 (home-page "https://mando.readthedocs.org/")
14128 (synopsis
14129 "Wrapper around argparse, allowing creation of complete CLI applications")
14130 (description
14131 "This package is a wrapper around argparse, allowing you to write complete CLI
14132 applications in seconds while maintaining all the flexibility.")
14133 (license license:expat)))
14134
14135 (define-public python2-mando
14136 (package-with-python2 python-mando))
14137
14138 (define-public python-mando-0.3.1
14139 ;; python-radon (version 1.5.0) has a requirement
14140 ;; for mando<0.4,>=0.3
14141 (package
14142 (inherit python-mando)
14143 (name "python-mando")
14144 (version "0.3.1")
14145 (source
14146 (origin
14147 (method url-fetch)
14148 (uri (string-append "https://github.com/rubik/mando/archive/v"
14149 version
14150 ".tar.gz"))
14151 (sha256
14152 (base32
14153 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14154
14155 (define-public python-fudge
14156 (package
14157 (name "python-fudge")
14158 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14159 ;; package, which is currently the only use of this package.
14160 (version "0.9.6")
14161 (source
14162 (origin
14163 (method url-fetch)
14164 (uri (pypi-uri "fudge" version))
14165 (sha256
14166 (base32
14167 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14168 (build-system python-build-system)
14169 (arguments
14170 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14171 (home-page "https://github.com/fudge-py/fudge")
14172 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14173 (description
14174 "Fudge is a Python module for using fake objects (mocks and stubs) to
14175 test real ones.
14176
14177 In readable Python code, you declare the methods available on your fake object
14178 and how they should be called. Then you inject that into your application and
14179 start testing. This declarative approach means you don’t have to record and
14180 playback actions and you don’t have to inspect your fakes after running code.
14181 If the fake object was used incorrectly then you’ll see an informative
14182 exception message with a traceback that points to the culprit.")
14183 (license license:expat)))
14184
14185 (define-public python2-fudge
14186 (package-with-python2 python-fudge))
14187
14188 (define-public python-oauth2client
14189 (package
14190 (name "python-oauth2client")
14191 (version "4.0.0")
14192 (source
14193 (origin
14194 (method url-fetch)
14195 (uri (pypi-uri "oauth2client" version))
14196 (sha256
14197 (base32
14198 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14199 (build-system python-build-system)
14200 (arguments
14201 `(#:tests? #f))
14202 (propagated-inputs
14203 `(("python-httplib2" ,python-httplib2)
14204 ("python-pyasn1" ,python-pyasn1)
14205 ("python-pyasn1-modules" ,python-pyasn1-modules)
14206 ("python-rsa" ,python-rsa)
14207 ("python-six" ,python-six)))
14208 (home-page "http://github.com/google/oauth2client/")
14209 (synopsis "OAuth 2.0 client library")
14210 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14211 library for Python")
14212 (license license:asl2.0)))
14213
14214 (define-public python-flask-oidc
14215 (package
14216 (name "python-flask-oidc")
14217 (version "1.1.1")
14218 (source
14219 (origin
14220 (method url-fetch)
14221 (uri (pypi-uri "flask-oidc" version))
14222 (sha256
14223 (base32
14224 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14225 (build-system python-build-system)
14226 (propagated-inputs
14227 `(("python-flask" ,python-flask)
14228 ("python-itsdangerous" ,python-itsdangerous)
14229 ("python-oauth2client" ,python-oauth2client)
14230 ("python-six" ,python-six)))
14231 (native-inputs
14232 `(("python-nose" ,python-nose)
14233 ("python-mock" ,python-mock)))
14234 (home-page "https://github.com/puiterwijk/flask-oidc")
14235 (synopsis "OpenID Connect extension for Flask")
14236 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14237 for Flask.")
14238 (license license:bsd-2)))
14239
14240 (define-public python-mwclient
14241 (package
14242 (name "python-mwclient")
14243 (version "0.8.4")
14244 (source
14245 (origin
14246 (method url-fetch)
14247 ;; The PyPI version wouldn't contain tests.
14248 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14249 "v" version ".tar.gz"))
14250 (sha256
14251 (base32
14252 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14253 (build-system python-build-system)
14254 (propagated-inputs
14255 `(("python-requests" ,python-requests)
14256 ("python-requests-oauthlib"
14257 ,python-requests-oauthlib)
14258 ("python-six" ,python-six)))
14259 (native-inputs
14260 `(("python-mock" ,python-mock)
14261 ("python-pytest" ,python-pytest)
14262 ("python-pytest-pep8" ,python-pytest-pep8)
14263 ("python-pytest-cache" ,python-pytest-cache)
14264 ("python-pytest-cov" ,python-pytest-cov)
14265 ("python-responses" ,python-responses)))
14266 (home-page "https://github.com/btongminh/mwclient")
14267 (synopsis "MediaWiki API client")
14268 (description "This package provides a MediaWiki API client.")
14269 (license license:expat)))
14270
14271 (define-public python2-mwclient
14272 (package-with-python2 python-mwclient))
14273
14274 (define-public python-pytest-warnings
14275 (package
14276 (name "python-pytest-warnings")
14277 (version "0.2.0")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "pytest-warnings" version))
14282 (sha256
14283 (base32
14284 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14285 (build-system python-build-system)
14286 (propagated-inputs
14287 `(("pytest" ,python-pytest-3.0)))
14288 (home-page "https://github.com/fschulze/pytest-warnings")
14289 (synopsis "Pytest plugin to list Python warnings in pytest report")
14290 (description
14291 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14292 pytest report.")
14293 (license license:expat)))
14294
14295 (define-public python2-pytest-warnings
14296 (package-with-python2 python-pytest-warnings))
14297
14298 (define-public python-pytest-catchlog
14299 (package
14300 (name "python-pytest-catchlog")
14301 (version "1.2.2")
14302 (source
14303 (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14306 (sha256
14307 (base32
14308 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14309 (build-system python-build-system)
14310 (native-inputs
14311 `(("unzip" ,unzip)))
14312 (propagated-inputs
14313 `(("pytest" ,python-pytest-3.0)))
14314 (home-page "https://github.com/eisensheng/pytest-catchlog")
14315 (synopsis "Pytest plugin to catch log messages")
14316 (description
14317 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14318 a fork of pytest-capturelog.")
14319 (license license:expat)))
14320
14321 (define-public python2-pytest-catchlog
14322 (package-with-python2 python-pytest-catchlog))
14323
14324 (define-public python-utils
14325 (package
14326 (name "python-utils")
14327 (version "2.1.0")
14328 (source (origin
14329 (method url-fetch)
14330 (uri (pypi-uri "python-utils" version))
14331 (sha256
14332 (base32
14333 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14334 (build-system python-build-system)
14335 (native-inputs
14336 `(("pytest-runner" ,python-pytest-runner)
14337 ("pytest" ,python-pytest)
14338 ("six" ,python-six)))
14339 (home-page "https://github.com/WoLpH/python-utils")
14340 (synopsis "Convenient utilities not included with the standard Python install")
14341 (description
14342 "Python Utils is a collection of small Python functions and classes which
14343 make common patterns shorter and easier.")
14344 (license license:bsd-2)))
14345
14346 (define-public python2-utils
14347 (package-with-python2 python-utils))
14348
14349 (define-public python-webassets
14350 (package
14351 (name "python-webassets")
14352 (version "0.12.1")
14353 (source
14354 (origin
14355 (method url-fetch)
14356 (uri (pypi-uri "webassets" version))
14357 (sha256
14358 (base32
14359 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14360 (build-system python-build-system)
14361 (native-inputs
14362 `(("python-jinja2" ,python-jinja2)
14363 ("python-mock" ,python-mock)
14364 ("python-nose" ,python-nose)
14365 ("python-pytest" ,python-pytest)))
14366 (home-page "https://github.com/miracle2k/webassets")
14367 (synopsis "Media asset management")
14368 (description "Merges, minifies and compresses Javascript and CSS files,
14369 supporting a variety of different filters, including YUI, jsmin, jspacker or
14370 CSS tidy. Also supports URL rewriting in CSS files.")
14371 (license license:bsd-2)))
14372
14373 (define-public python-sphinx-me
14374 (package
14375 (name "python-sphinx-me")
14376 (version "0.3")
14377 (source
14378 (origin
14379 (method url-fetch)
14380 (uri (pypi-uri "sphinx-me" version))
14381 (sha256
14382 (base32
14383 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14384 (build-system python-build-system)
14385 (home-page "https://github.com/stephenmcd/sphinx-me")
14386 (synopsis "Create a Sphinx documentation shell")
14387 (description
14388 "Create a Sphinx documentation shell for your project and include the
14389 README file as the documentation index. It handles extracting the required
14390 meta data such as the project name, author and version from your project for
14391 use in your Sphinx docs.")
14392 (license license:bsd-2)))
14393
14394 (define-public python2-sphinx-me
14395 (package-with-python2 python-sphinx-me))
14396
14397 (define-public python-cssmin
14398 (package
14399 (name "python-cssmin")
14400 (version "0.2.0")
14401 (source
14402 (origin
14403 (method url-fetch)
14404 (uri (pypi-uri "cssmin" version))
14405 (sha256
14406 (base32
14407 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14408 (build-system python-build-system)
14409 (home-page "https://github.com/zacharyvoase/cssmin")
14410 (synopsis "Python port of the YUI CSS Compressor")
14411 (description "Python port of the YUI CSS Compressor.")
14412 (license (list license:expat license:bsd-3))))
14413
14414 (define-public python2-cssmin
14415 (package-with-python2 python-cssmin))
14416
14417 (define-public python-diff-match-patch
14418 (package
14419 (name "python-diff-match-patch")
14420 (version "20121119")
14421 (source
14422 (origin
14423 (method url-fetch)
14424 (uri (pypi-uri "diff-match-patch" version))
14425 (sha256
14426 (base32
14427 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14428 (build-system python-build-system)
14429 (home-page "https://code.google.com/p/google-diff-match-patch")
14430 (synopsis "Synchronize plain text")
14431 (description "Diff Match and Patch libraries offer robust algorithms to
14432 perform the operations required for synchronizing plain text.")
14433 (license license:asl2.0)))
14434
14435 (define-public python2-diff-match-patch
14436 (package-with-python2 python-diff-match-patch))
14437
14438 (define-public python-dirsync
14439 (package
14440 (name "python-dirsync")
14441 (version "2.2.2")
14442 (source
14443 (origin
14444 (method url-fetch)
14445 (uri (pypi-uri "dirsync" version ".zip"))
14446 (sha256
14447 (base32
14448 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14449 (build-system python-build-system)
14450 (native-inputs
14451 `(("unzip" ,unzip)))
14452 (propagated-inputs
14453 `(("six" ,python-six)))
14454 (home-page "https://bitbucket.org/tkhyn/dirsync")
14455 (synopsis "Advanced directory tree synchronisation tool")
14456 (description "Advanced directory tree synchronisation tool.")
14457 (license license:expat)))
14458
14459 (define-public python2-dirsync
14460 (package-with-python2 python-dirsync))
14461
14462 (define-public python-nosexcover
14463 (package
14464 (name "python-nosexcover")
14465 (version "1.0.11")
14466 (source (origin
14467 (method url-fetch)
14468 (uri (pypi-uri "nosexcover" version))
14469 (sha256
14470 (base32
14471 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14472 (build-system python-build-system)
14473 (propagated-inputs
14474 `(("python-coverage" ,python-coverage)
14475 ("python-nose" ,python-nose)))
14476 (home-page "http://github.com/cmheisel/nose-xcover")
14477 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14478 (description "Nose-xcover is a companion to the built-in
14479 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14480 to a file named coverage.xml.
14481
14482 It will honor all the options you pass to the Nose coverage plugin,
14483 especially -cover-package.")
14484 (license license:expat)))
14485
14486 (define-public python2-nosexcover
14487 (package-with-python2 python-nosexcover))
14488
14489 (define-public python-elasticsearch
14490 (package
14491 (name "python-elasticsearch")
14492 (version "1.0.0")
14493 (source
14494 (origin
14495 (method url-fetch)
14496 (uri (pypi-uri "elasticsearch" version))
14497 (sha256
14498 (base32
14499 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14500 (build-system python-build-system)
14501 (native-inputs
14502 `(("python-mock" ,python-mock)
14503 ("python-nosexcover" ,python-nosexcover)
14504 ("python-pyaml" ,python-pyaml)
14505 ("python-requests" ,python-requests)))
14506 (propagated-inputs
14507 `(("urllib3" ,python-urllib3)))
14508 (arguments
14509 ;; tests require the test_elasticsearch module but it is not distributed.
14510 `(#:tests? #f))
14511 (home-page "https://github.com/elastic/elasticsearch-py")
14512 (synopsis "Low-level client for Elasticsearch")
14513 (description "Official low-level client for Elasticsearch. Its goal is to
14514 provide common ground for all Elasticsearch-related code in Python; because of
14515 this it tries to be opinion-free and very extendable.")
14516 (license license:expat)))
14517
14518 (define-public python2-elasticsearch
14519 (package-with-python2 python-elasticsearch))
14520
14521 (define-public python-levenshtein
14522 (package
14523 (name "python-levenshtein")
14524 (version "0.12.0")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "python-Levenshtein" version))
14529 (sha256
14530 (base32
14531 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14532 (build-system python-build-system)
14533 (home-page "https://github.com/ztane/python-Levenshtein")
14534 (synopsis "Fast computation of Levenshtein distance and string similarity")
14535 (description
14536 "The Levenshtein Python C extension module contains functions for fast computation of
14537 @enumerate
14538 @item Levenshtein (edit) distance, and edit operations
14539 @item string similarity
14540 @item approximate median strings, and generally string averaging
14541 @item string sequence and set similarity
14542 @end enumerate
14543 It supports both normal and Unicode strings.")
14544 (license license:gpl2+)))
14545
14546 (define-public python2-levenshtein
14547 (package-with-python2 python-levenshtein))
14548
14549 (define-public python-scandir
14550 (package
14551 (name "python-scandir")
14552 (version "1.4")
14553 (source
14554 (origin
14555 (method url-fetch)
14556 (uri (pypi-uri "scandir" version))
14557 (sha256
14558 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14559 (build-system python-build-system)
14560 (home-page "https://github.com/benhoyt/scandir")
14561 (synopsis "Directory iteration function")
14562 (description
14563 "Directory iteration function like os.listdir(), except that instead of
14564 returning a list of bare filenames, it yields DirEntry objects that include
14565 file type and stat information along with the name. Using scandir() increases
14566 the speed of os.walk() by 2-20 times (depending on the platform and file
14567 system) by avoiding unnecessary calls to os.stat() in most cases.")
14568 (license license:bsd-3)))
14569
14570 (define-public python2-scandir
14571 (package-with-python2 python-scandir))
14572
14573 (define-public python2-stemming
14574 (package
14575 (name "python2-stemming")
14576 (version "1.0.1")
14577 (source
14578 (origin
14579 (method url-fetch)
14580 (uri (pypi-uri "stemming" version))
14581 (sha256
14582 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14583 (build-system python-build-system)
14584 (arguments
14585 `(#:python ,python-2))
14586 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14587 (synopsis "Python implementations of various stemming algorithms")
14588 (description
14589 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14590 stemming algorithms for English. These implementations are straightforward and
14591 efficient, unlike some Python versions of the same algorithms available on the
14592 Web. This package is an extraction of the stemming code included in the Whoosh
14593 search engine.")
14594 (license license:public-domain)))
14595
14596 (define-public python-factory-boy
14597 (package
14598 (name "python-factory-boy")
14599 (version "2.8.1")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "factory_boy" version))
14604 (sha256
14605 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14606 (build-system python-build-system)
14607 (arguments
14608 ;; Tests are not included in the tarball.
14609 `(#:tests? #f))
14610 (propagated-inputs
14611 `(("faker" ,python-faker)))
14612 (home-page "https://github.com/benhoyt/scandir")
14613 (synopsis "Versatile test fixtures replacement")
14614 (description
14615 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14616
14617 As a fixtures replacement tool, it aims to replace static, hard to maintain
14618 fixtures with easy-to-use factories for complex object.
14619
14620 Instead of building an exhaustive test setup with every possible combination
14621 of corner cases, factory_boy allows you to use objects customized for the
14622 current test, while only declaring the test-specific fields")
14623 (license license:expat)))
14624
14625 (define-public python2-factory-boy
14626 (package-with-python2 python-factory-boy))
14627
14628 (define-public python-translate-toolkit
14629 (package
14630 (name "python-translate-toolkit")
14631 (version "2.1.0")
14632 (source
14633 (origin
14634 (method url-fetch)
14635 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14636 (sha256
14637 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14638 (build-system python-build-system)
14639 (native-inputs
14640 `(("python-pytest" ,python-pytest)
14641 ("python-sphinx" ,python-sphinx)))
14642 (propagated-inputs
14643 `(("python-babel" ,python-babel)
14644 ("python-beautifulsoup4" ,python-beautifulsoup4)
14645 ("python-chardet" ,python-chardet)
14646 ("python-diff-match-patch" ,python-diff-match-patch)
14647 ("python-levenshtein" ,python-levenshtein)
14648 ("python-lxml" ,python-lxml)
14649 ("python-six" ,python-six)
14650 ("python-vobject" ,python-vobject)
14651 ("python-pyyaml" ,python-pyyaml)))
14652 (arguments
14653 ;; TODO: tests are not run, because they end with
14654 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14655 ;; 'parse_funcs'
14656 ;; during test setup.
14657 `(#:tests? #f))
14658 (home-page "http://toolkit.translatehouse.org")
14659 (synopsis "Tools and API for translation and localization engineering")
14660 (description
14661 "Tools and API for translation and localization engineering. It contains
14662 several utilities, as well as an API for building localization tools.")
14663 (license license:gpl2+)))
14664
14665 (define-public python2-translate-toolkit
14666 (package-with-python2 python-translate-toolkit))
14667
14668 (define-public python-mysqlclient
14669 (package
14670 (name "python-mysqlclient")
14671 (version "1.3.10")
14672 (source
14673 (origin
14674 (method url-fetch)
14675 (uri (pypi-uri "mysqlclient" version))
14676 (sha256
14677 (base32
14678 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14679 (build-system python-build-system)
14680 (native-inputs
14681 `(("mariadb" ,mariadb)
14682 ("nose" ,python-nose)
14683 ("mock" ,python-mock)
14684 ("py.test" ,python-pytest)))
14685 (inputs
14686 `(("mysql" ,mysql)
14687 ("libz" ,zlib)
14688 ("openssl" ,openssl)))
14689 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14690 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14691 (description "MySQLdb is an interface to the popular MySQL database server
14692 for Python. The design goals are:
14693 @enumerate
14694 @item Compliance with Python database API version 2.0 [PEP-0249],
14695 @item Thread-safety,
14696 @item Thread-friendliness (threads will not block each other).
14697 @end enumerate")
14698 (license license:gpl2)))
14699
14700 (define-public python2-mysqlclient
14701 (package-with-python2 python-mysqlclient))
14702
14703 (define-public python-hiredis
14704 (package
14705 (name "python-hiredis")
14706 (version "0.2.0")
14707 (source
14708 (origin
14709 (method url-fetch)
14710 (uri (pypi-uri "hiredis" version))
14711 (sha256
14712 (base32
14713 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14714 (build-system python-build-system)
14715 (arguments
14716 ;; no tests
14717 `(#:tests? #f))
14718 (home-page "https://github.com/redis/hiredis-py")
14719 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14720 (description "Python-hiredis is a python extension that wraps protocol
14721 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14722 (license license:bsd-3)))
14723
14724 (define-public python2-hiredis
14725 (package-with-python2 python-hiredis))
14726
14727 (define-public python-fakeredis
14728 (package
14729 (name "python-fakeredis")
14730 (version "0.8.2")
14731 (source
14732 (origin
14733 (method url-fetch)
14734 (uri (pypi-uri "fakeredis" version))
14735 (sha256
14736 (base32
14737 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14738 (build-system python-build-system)
14739 (arguments
14740 ;; no tests
14741 `(#:tests? #f))
14742 (home-page "https://github.com/jamesls/fakeredis")
14743 (synopsis "Fake implementation of redis API for testing purposes")
14744 (description "Fakeredis is a pure python implementation of the redis-py
14745 python client that simulates talking to a redis server. This was created for a
14746 single purpose: to write unittests. Setting up redis is not hard, but many time
14747 you want to write unittests that do not talk to an external server (such as
14748 redis). This module now allows tests to simply use this module as a reasonable
14749 substitute for redis.")
14750 (license license:bsd-3)))
14751
14752 (define-public python2-fakeredis
14753 (package-with-python2 python-fakeredis))
14754
14755 (define-public python-behave-web-api
14756 (package
14757 (name "python-behave-web-api")
14758 (version "1.0.6")
14759 (source
14760 (origin
14761 (method url-fetch)
14762 (uri (pypi-uri "behave-web-api" version))
14763 (sha256
14764 (base32
14765 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14766 (build-system python-build-system)
14767 (arguments
14768 `(#:phases
14769 (modify-phases %standard-phases
14770 (add-after 'unpack 'fix-dependencies
14771 (lambda _
14772 (substitute* "setup.py"
14773 (("'wheel'") "") ; We don't use it.
14774 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14775 (propagated-inputs
14776 `(("behave" ,behave)
14777 ("python-requests" ,python-requests)))
14778 (home-page "https://github.com/jefersondaniel/behave-web-api")
14779 (synopsis "Provides testing for JSON APIs with Behave for Python")
14780 (description "This package provides testing utility modules for testing
14781 JSON APIs with Behave.")
14782 (license license:expat)))
14783
14784 (define-public python2-behave-web-api
14785 (package-with-python2 python-behave-web-api))
14786
14787 (define-public python-flask-script
14788 (package
14789 (name "python-flask-script")
14790 (version "2.0.5")
14791 (source
14792 (origin
14793 (method url-fetch)
14794 (uri (pypi-uri "Flask-Script" version))
14795 (sha256
14796 (base32
14797 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14798 (build-system python-build-system)
14799 (propagated-inputs
14800 `(("python-flask" ,python-flask)
14801 ("python-argcomplete" ,python-argcomplete)
14802 ("python-werkzeug" ,python-werkzeug)))
14803 (native-inputs
14804 `(("python-pytest" ,python-pytest)))
14805 (home-page
14806 "http://github.com/smurfix/flask-script")
14807 (synopsis "Scripting support for Flask")
14808 (description "The Flask-Script extension provides support for writing
14809 external scripts in Flask. This includes running a development server,
14810 a customised Python shell, scripts to set up your database, cronjobs,
14811 and other command-line tasks that belong outside the web application
14812 itself.")
14813 (license license:bsd-3)))
14814
14815 (define-public python2-flask-script
14816 (package-with-python2 python-flask-script))
14817
14818 (define-public python-flask-migrate
14819 (package
14820 (name "python-flask-migrate")
14821 (version "2.0.3")
14822 (source
14823 (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "Flask-Migrate" version))
14826 (sha256
14827 (base32
14828 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14829 (build-system python-build-system)
14830 (propagated-inputs
14831 `(("python-flask" ,python-flask)
14832 ("python-alembic" ,python-alembic)
14833 ("python-sqlalchemy" ,python-sqlalchemy)
14834 ("python-flask-script" ,python-flask-script)
14835 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14836 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14837 (synopsis "SQLAlchemy database migrations for Flask programs using
14838 Alembic")
14839 (description "This package contains SQLAlchemy database migration tools
14840 for Flask programs that are using @code{python-alembic}.")
14841 (license license:expat)))
14842
14843 (define-public python2-flask-migrate
14844 (package-with-python2 python-flask-migrate))
14845
14846 (define-public python-packaging
14847 (package
14848 (name "python-packaging")
14849 (version "16.8")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "packaging" version))
14854 (sha256
14855 (base32
14856 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14857 (build-system python-build-system)
14858 (native-inputs
14859 `(("python-pretend" ,python-pretend)
14860 ("python-pytest" ,python-pytest)))
14861 (propagated-inputs
14862 `(("python-pyparsing" ,python-pyparsing)
14863 ("python-six" ,python-six)))
14864 (home-page "https://github.com/pypa/packaging")
14865 (synopsis "Core utilities for Python packages")
14866 (description "Packaging is a Python module for dealing with Python packages.
14867 It offers an interface for working with package versions, names, and dependency
14868 information.")
14869 ;; From 'LICENSE': This software is made available under the terms of
14870 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14871 ;; Contributions to this software is made under the terms of *both* these
14872 ;; licenses.
14873 (license (list license:asl2.0 license:bsd-2))))
14874
14875 (define-public python2-packaging
14876 (package-with-python2 python-packaging))
14877
14878 (define-public python-sql
14879 (package
14880 (name "python-sql")
14881 (version "0.9")
14882 (source
14883 (origin
14884 (method url-fetch)
14885 (uri (pypi-uri "python-sql" version))
14886 (sha256
14887 (base32
14888 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14889 (build-system python-build-system)
14890 (home-page "https://python-sql.tryton.org/")
14891 (synopsis "Library to write SQL queries in a pythonic way")
14892 (description "@code{python-sql} is a library to write SQL queries, that
14893 transforms idiomatic python function calls to well-formed SQL queries.")
14894 (license license:bsd-3)))
14895
14896 (define-public python2-sql
14897 (package-with-python2 python-sql))
14898
14899 (define-public python-genshi
14900 (package
14901 (name "python-genshi")
14902 (version "0.7")
14903 (source
14904 (origin
14905 (method url-fetch)
14906 (uri (string-append
14907 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14908 version ".tar.gz"))
14909 (patches
14910 (search-patches
14911 ;; The first 4 patches are in the master branch upstream.
14912 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14913 ;; The last 2 are NOT in any branch.
14914 ;; They were sent as attachments to a ticket opened at
14915 ;; https://genshi.edgewall.org/ticket/602#no1
14916 "python-genshi-stripping-of-unsafe-script-tags.patch"
14917 "python-genshi-disable-speedups-on-python-3.3.patch"
14918 "python-genshi-isstring-helper.patch"
14919 "python-genshi-add-support-for-python-3.4-AST.patch"
14920 "python-genshi-fix-tests-on-python-3.5.patch"
14921 "python-genshi-buildable-on-python-2.7.patch"))
14922 (sha256
14923 (base32
14924 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14925 (build-system python-build-system)
14926 (home-page "https://genshi.edgewall.org/")
14927 (synopsis "Toolkit for generation of output for the web")
14928 (description "Genshi is a Python library that provides an integrated set
14929 of components for parsing, generating, and processing HTML, XML or other
14930 textual content for output generation on the web.")
14931 (license license:bsd-3)))
14932
14933 ;; The linter here claims that patch file names should start with the package
14934 ;; name. But, in this case the patches are inherited from python-genshi with
14935 ;; the "python-genshi-" prefix instead of "python2-genshi-".
14936 (define-public python2-genshi
14937 (package-with-python2 python-genshi))
14938
14939 (define-public python-relatorio
14940 (package
14941 (name "python-relatorio")
14942 (version "0.6.4")
14943 (source
14944 (origin
14945 (method url-fetch)
14946 (uri (pypi-uri "relatorio" version))
14947 (sha256
14948 (base32
14949 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
14950 (build-system python-build-system)
14951 (propagated-inputs
14952 `(("python-lxml" ,python-lxml)
14953 ("python-genshi" ,python-genshi)))
14954 (home-page "https://relatorio.tryton.org/")
14955 (synopsis "Templating library able to output ODT and PDF files")
14956 (description "Relatorio is a templating library which provides a way to
14957 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14958 for more filetypes can be easily added by creating plugins for them.")
14959 (license license:gpl3+)))
14960
14961 (define-public python2-relatorio
14962 (package-with-python2 python-relatorio))
14963
14964 (define-public python-radon
14965 (package
14966 (name "python-radon")
14967 (version "1.5.0")
14968 (source
14969 (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "radon" version))
14972 (sha256
14973 (base32
14974 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
14975 (build-system python-build-system)
14976 (propagated-inputs
14977 `(("python-colorama" ,python-colorama)
14978 ("python-flake8-polyfill" ,python-flake8-polyfill)
14979 ("python-mando" ,python-mando-0.3.1)))
14980 (native-inputs
14981 `(("python-flake8" ,python-flake8)
14982 ("python-tox" ,python-tox)
14983 ("python-pytest" ,python-pytest)
14984 ("python-paramunittest" ,python-paramunittest)))
14985 (home-page "https://radon.readthedocs.org/")
14986 (synopsis "Code Metrics in Python")
14987 (description "Radon is a Python tool which computes various code metrics.
14988 Supported metrics are:
14989 @itemize @bullet
14990 @item raw metrics: SLOC, comment lines, blank lines, &c.
14991 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14992 @item Halstead metrics (all of them)
14993 @item the Maintainability Index (a Visual Studio metric)
14994 @end itemize")
14995 (license license:expat)))
14996
14997 (define-public python2-radon
14998 (package-with-python2 python-radon))
14999
15000 (define-public python-sure
15001 (package
15002 (name "python-sure")
15003 (version "1.4.6")
15004 (source
15005 (origin
15006 (method url-fetch)
15007 (uri (pypi-uri "sure" version))
15008 (sha256
15009 (base32
15010 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15011 (build-system python-build-system)
15012 (propagated-inputs
15013 `(("python-mock" ,python-mock)
15014 ("python-six" ,python-six)))
15015 (native-inputs
15016 `(("python-nose" ,python-nose)))
15017 (home-page "https://github.com/gabrielfalcao/sure")
15018 (synopsis "Automated testing library in python for python")
15019 (description
15020 "Sure is a python library that leverages a DSL for writing assertions.
15021 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15022 (license license:gpl3+)))
15023
15024 (define-public python2-sure
15025 (package-with-python2 python-sure))
15026
15027 (define-public python2-couleur
15028 ;; This package does not seem to support python3 at all, hence,
15029 ;; only the python2 variant definition is provided.
15030 (package
15031 (name "python2-couleur")
15032 (version "0.6.2")
15033 (source
15034 (origin
15035 (method url-fetch)
15036 (uri (pypi-uri "couleur" version))
15037 (sha256
15038 (base32
15039 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15040 (build-system python-build-system)
15041 (arguments
15042 `(#:python ,python-2))
15043 (home-page "https://github.com/gabrielfalcao/couleur")
15044 (synopsis
15045 "ANSI terminal tool for python, colored shell and other handy fancy features")
15046 (description
15047 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15048 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15049 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15050 ;; https://github.com/gabrielfalcao/couleur/issues/11
15051 (license license:lgpl3+)))
15052
15053 (define-public python-misaka
15054 (package
15055 (name "python-misaka")
15056 (version "2.1.0")
15057 (source
15058 (origin
15059 (method url-fetch)
15060 (uri (pypi-uri "misaka" version))
15061 (sha256
15062 (base32
15063 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15064 (build-system python-build-system)
15065 (arguments
15066 `(;; Line 37 of setup.py calls self.run_command('develop')
15067 ;; in the 'check' phase. This command seems to be trying
15068 ;; to write to
15069 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15070 ;; for which it does not have the permission to write.
15071 #:tests? #f))
15072 (propagated-inputs
15073 `(("python-cffi" ,python-cffi)))
15074 (home-page "https://github.com/FSX/misaka")
15075 (synopsis "Python binding for Hoedown")
15076 (description
15077 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15078 library written in C. It features a fast HTML renderer and functionality to make custom
15079 renderers (e.g. man pages or LaTeX).")
15080 (license license:expat)))
15081
15082 (define-public python2-misaka
15083 (package-with-python2 python-misaka))
15084
15085 (define-public python2-steadymark
15086 ;; This is forced into being a python2 only variant
15087 ;; due to its dependence on couleur that has no support
15088 ;; for python3
15089 (package
15090 (name "python2-steadymark")
15091 (version "0.7.3")
15092 (source
15093 (origin
15094 (method url-fetch)
15095 (uri (pypi-uri "steadymark" version))
15096 (sha256
15097 (base32
15098 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15099 (build-system python-build-system)
15100 (native-inputs
15101 `(("python-couleur" ,python2-couleur)
15102 ("python-sure" ,python2-sure)
15103 ("python-misaka" ,python2-misaka)))
15104 (arguments
15105 `(#:python ,python-2
15106 #:phases
15107 (modify-phases %standard-phases
15108 (add-before 'build 'patch-setup-py
15109 (lambda _
15110 ;; Update requirements from dependency==version
15111 ;; to dependency>=version
15112 (substitute* "setup.py"
15113 (("==") ">="))
15114 #t)))))
15115 (home-page "https://github.com/gabrielfalcao/steadymark")
15116 (synopsis "Markdown-based test runner for python")
15117 (description
15118 "@code{Steadymark} allows documentation to be written in github-flavoured
15119 markdown. The documentation may contain snippets of code surrounded by python
15120 code blocks and @code{Steadymark} will find these snippets and run them, making
15121 sure that there are no old malfunctional examples in the documentation examples.")
15122 (license license:expat)))
15123
15124 (define-public python-nose-randomly
15125 (package
15126 (name "python-nose-randomly")
15127 (version "1.2.5")
15128 (source
15129 (origin
15130 (method url-fetch)
15131 (uri (pypi-uri "nose-randomly" version))
15132 (sha256
15133 (base32
15134 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15135 (build-system python-build-system)
15136 (native-inputs
15137 `(("python-nose" ,python-nose)
15138 ("python-numpy" ,python-numpy)))
15139 (home-page "https://github.com/adamchainz/nose-randomly")
15140 (synopsis
15141 "Nose plugin to randomly order tests and control random.seed")
15142 (description
15143 "This is a @code{Nose} plugin to randomly order tests which can be quite
15144 powerful in discovering hidden flaws in the tests themselves, while helping to
15145 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15146 by resetting it to a repeatable number for each test, enabling the tests to
15147 create data based on random numbers and yet remain repeatable.")
15148 (license license:bsd-3)))
15149
15150 (define-public python2-nose-randomly
15151 (package-with-python2 python-nose-randomly))
15152
15153 (define-public python-jsonpointer
15154 (package
15155 (name "python-jsonpointer")
15156 (version "1.10")
15157 (source
15158 (origin
15159 (method url-fetch)
15160 (uri (pypi-uri "jsonpointer" version))
15161 (sha256
15162 (base32
15163 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15164 (build-system python-build-system)
15165 (home-page "https://github.com/stefankoegl/python-json-pointer")
15166 (synopsis "Identify specific nodes in a JSON document")
15167 (description "@code{jsonpointer} allows you to access specific nodes
15168 by path in a JSON document (see RFC 6901).")
15169 (license license:bsd-3)))
15170
15171 (define-public python2-jsonpointer
15172 (package-with-python2 python-jsonpointer))
15173
15174 (define-public python-rfc3987
15175 (package
15176 (name "python-rfc3987")
15177 (version "1.3.7")
15178 (source
15179 (origin
15180 (method url-fetch)
15181 (uri (pypi-uri "rfc3987" version))
15182 (sha256
15183 (base32
15184 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15185 (build-system python-build-system)
15186 (home-page "http://pypi.python.org/pypi/rfc3987")
15187 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15188 (description "@code{rfc3987} provides routines for parsing and
15189 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15190 (license license:gpl3+)))
15191
15192 (define-public python2-rfc3987
15193 (package-with-python2 python-rfc3987))
15194
15195 (define-public python-validate-email
15196 (package
15197 (name "python-validate-email")
15198 (version "1.3")
15199 (source
15200 (origin
15201 (method url-fetch)
15202 (uri (pypi-uri "validate_email" version))
15203 (sha256
15204 (base32
15205 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15206 (build-system python-build-system)
15207 (home-page "http://github.com/syrusakbary/validate_email")
15208 (synopsis "Verifies if an email address is valid and really exists")
15209 (description "@code{validate_email} can be used to verify if an email
15210 address is valid and really exists.")
15211 (license license:lgpl3+)))
15212
15213 (define-public python2-validate-email
15214 (package-with-python2 python-validate-email))
15215
15216 (define-public python-flex
15217 (package
15218 (name "python-flex")
15219 (version "6.10.0")
15220 (source
15221 (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "flex" version))
15224 (sha256
15225 (base32
15226 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15227 (build-system python-build-system)
15228 (propagated-inputs
15229 `(("python-click" ,python-click)
15230 ("python-iso8601" ,python-iso8601)
15231 ("python-jsonpointer" ,python-jsonpointer)
15232 ("python-pyyaml" ,python-pyyaml)
15233 ("python-requests" ,python-requests)
15234 ("python-rfc3987" ,python-rfc3987)
15235 ("python-six" ,python-six)
15236 ("python-validate-email" ,python-validate-email)))
15237 (home-page "https://github.com/pipermerriam/flex")
15238 (synopsis "Validates Swagger schemata")
15239 (description "@code{flex} can be used to validate Swagger schemata.")
15240 (license license:bsd-3)))
15241
15242 (define-public python2-flex
15243 (package-with-python2 python-flex))
15244
15245 (define-public python-marshmallow
15246 (package
15247 (name "python-marshmallow")
15248 (version "3.0.0b2")
15249 (source
15250 (origin
15251 (method url-fetch)
15252 (uri (pypi-uri "marshmallow" version))
15253 (sha256
15254 (base32
15255 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15256 (build-system python-build-system)
15257 (propagated-inputs
15258 `(("python-dateutil" ,python-dateutil)
15259 ("python-simplejson" ,python-simplejson)))
15260 (native-inputs
15261 `(("python-pytest-3.0" ,python-pytest-3.0)
15262 ("python-pytz" ,python-pytz)))
15263 (home-page "https://github.com/marshmallow-code/marshmallow")
15264 (synopsis "Convert complex datatypes to and from native
15265 Python datatypes.")
15266 (description "@code{marshmallow} provides a library for converting
15267 complex datatypes to and from native Python datatypes.")
15268 (license license:expat)))
15269
15270 (define-public python2-marshmallow
15271 (package-with-python2 python-marshmallow))
15272
15273 (define-public python-bottle
15274 (package
15275 (name "python-bottle")
15276 (version "0.12.13")
15277 (source
15278 (origin
15279 (method url-fetch)
15280 (uri (pypi-uri "bottle" version))
15281 (sha256
15282 (base32
15283 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15284 (build-system python-build-system)
15285 (home-page "http://bottlepy.org/")
15286 (synopsis "WSGI framework for small web-applications.")
15287 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15288 (license license:expat)))
15289
15290 (define-public python2-bottle
15291 (package-with-python2 python-bottle))
15292
15293 (define-public python-apispec
15294 (package
15295 (name "python-apispec")
15296 (version "0.22.0")
15297 (source
15298 (origin
15299 (method url-fetch)
15300 (uri (pypi-uri "apispec" version))
15301 (sha256
15302 (base32
15303 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15304 (build-system python-build-system)
15305 (propagated-inputs
15306 `(("python-pyyaml" ,python-pyyaml)))
15307 (native-inputs
15308 `(("python-pytest-3.0" ,python-pytest-3.0)
15309 ("python-flask" ,python-flask)
15310 ("python-marshmallow" ,python-marshmallow)
15311 ("python-tornado" ,python-tornado)
15312 ("python-bottle" ,python-bottle)
15313 ("python-mock" ,python-mock)))
15314 (home-page "https://github.com/marshmallow-code/apispec")
15315 (synopsis "Swagger 2.0 API specification generator")
15316 (description "@code{python-apispec} is a pluggable API specification
15317 generator. Currently supports the OpenAPI specification (f.k.a.
15318 Swagger 2.0).")
15319 (license license:expat)))
15320
15321 (define-public python2-apispec
15322 (package-with-python2 python-apispec))
15323
15324 (define-public python-flasgger
15325 (package
15326 (name "python-flasgger")
15327 (version "0.6.3")
15328 (source
15329 (origin
15330 (method url-fetch)
15331 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15332 version ".tar.gz"))
15333 (file-name (string-append name "-" version ".tar.gz"))
15334 (sha256
15335 (base32
15336 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15337 (build-system python-build-system)
15338 (arguments
15339 `(#:phases
15340 (modify-phases %standard-phases
15341 (replace 'check
15342 (lambda* (#:key inputs outputs #:allow-other-keys)
15343 (substitute* "Makefile"
15344 (("flake8 flasgger --ignore=F403")
15345 "flake8 flasgger --ignore=E731,F403"))
15346 (setenv "PYTHONPATH" (string-append (getcwd)
15347 ":"
15348 (getenv "PYTHONPATH")))
15349 (zero? (system* "py.test")))))))
15350 (propagated-inputs
15351 `(("python-flask" ,python-flask)
15352 ("python-pyyaml" ,python-pyyaml)
15353 ("python-jsonschema" ,python-jsonschema)
15354 ("python-mistune" ,python-mistune)
15355 ("python-six" ,python-six)))
15356 (native-inputs
15357 `(("python-decorator" ,python-decorator)
15358 ("python-flake8" ,python-flake8)
15359 ("python-flask-restful" ,python-flask-restful)
15360 ("python-flex" ,python-flex)
15361 ("python-pytest-3.0" ,python-pytest-3.0)
15362 ("python-pytest-cov" ,python-pytest-cov)
15363 ("python-marshmallow" ,python-marshmallow)
15364 ("python-apispec" ,python-apispec)))
15365 (home-page "https://github.com/rochacbruno/flasgger/")
15366 (synopsis "Extract Swagger specs from your Flask project")
15367 (description "@code{python-flasgger} allows extracting Swagger specs
15368 from your Flask project. It is a fork of Flask-Swagger.")
15369 (license license:expat)))
15370
15371 (define-public python2-flasgger
15372 (package-with-python2 python-flasgger))
15373
15374 (define-public python-swagger-spec-validator
15375 (package
15376 (name "python-swagger-spec-validator")
15377 (version "2.1.0")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "swagger-spec-validator" version))
15382 (sha256
15383 (base32
15384 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15385 (build-system python-build-system)
15386 (propagated-inputs
15387 `(("python-jsonschema" ,python-jsonschema)
15388 ("python-six" ,python-six)))
15389 (home-page
15390 "http://github.com/Yelp/swagger_spec_validator")
15391 (synopsis "Validation of Swagger specifications")
15392 (description "@code{swagger_spec_validator} provides a library for
15393 validating Swagger API specifications.")
15394 (license license:asl2.0)))
15395
15396 (define-public python2-swagger-spec-validator
15397 (package-with-python2 python-swagger-spec-validator))
15398
15399 (define-public python-apache-libcloud
15400 (package
15401 (name "python-apache-libcloud")
15402 (version "2.0.0")
15403 (source
15404 (origin
15405 (method url-fetch)
15406 (uri (pypi-uri "apache-libcloud" version))
15407 (sha256
15408 (base32
15409 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15410 (build-system python-build-system)
15411 (arguments
15412 `(#:phases
15413 (modify-phases %standard-phases
15414 (add-after 'unpack 'patch-ssh
15415 (lambda* (#:key inputs #:allow-other-keys)
15416 (substitute* "libcloud/compute/ssh.py"
15417 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15418 "/bin/ssh" "'")))
15419 #t))
15420 (add-after 'unpack 'patch-tests
15421 (lambda _
15422 (substitute* "./libcloud/test/test_file_fixtures.py"
15423 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15424 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15425 return (httplib.OK,
15426 \"1234abcd\",
15427 {\"test\": \"value\"},
15428 httplib.responses[httplib.OK])
15429 def _ascii"))
15430 (substitute* "libcloud/test/compute/test_ssh_client.py"
15431 (("class ShellOutSSHClientTests")
15432 "@unittest.skip(\"Guix container doesn't have ssh service\")
15433 class ShellOutSSHClientTests")
15434 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15435 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15436 (("'.xF0', '.x90', '.x8D', '.x88'")
15437 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15438 #t)))))
15439 (inputs
15440 `(("openssh" ,openssh)))
15441 (propagated-inputs
15442 `(("python-paramiko" ,python-paramiko)
15443 ("python-requests" ,python-requests)))
15444 (native-inputs
15445 `(("python-lockfile" ,python-lockfile)
15446 ("python-mock" ,python-mock)
15447 ("python-requests-mock" ,python-requests-mock)))
15448 (home-page "https://libcloud.apache.org/")
15449 (synopsis "Unified Cloud API")
15450 (description "@code{libcloud} is a Python library for interacting with
15451 many of the popular cloud service providers using a unified API.")
15452 (license license:asl2.0)))
15453
15454 (define-public python2-apache-libcloud
15455 (package-with-python2 python-apache-libcloud))
15456
15457 (define-public python-smmap2
15458 (package
15459 (name "python-smmap2")
15460 (version "2.0.3")
15461 (source
15462 (origin
15463 (method url-fetch)
15464 (uri (pypi-uri "smmap2" version))
15465 (sha256
15466 (base32
15467 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15468 (build-system python-build-system)
15469 (native-inputs
15470 `(("python-nosexcover" ,python-nosexcover)))
15471 (home-page "https://github.com/Byron/smmap")
15472 (synopsis "Python sliding window memory map manager")
15473 (description "@code{smmap2} is a pure Python implementation of a sliding
15474 window memory map manager.")
15475 (license license:bsd-3)))
15476
15477 (define-public python2-smmap2
15478 (package-with-python2 python-smmap2))
15479
15480 (define-public python-regex
15481 (package
15482 (name "python-regex")
15483 (version "2017.06.07")
15484 (source (origin
15485 (method url-fetch)
15486 (uri (pypi-uri "regex" version))
15487 (sha256
15488 (base32
15489 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15490 (build-system python-build-system)
15491 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15492 (synopsis "Alternative regular expression module")
15493 (description "This regular expression implementation is backwards-
15494 compatible with the standard @code{re} module, but offers additional
15495 functionality like full case-folding for case-insensitive matches in Unicode.")
15496 (license license:psfl)))
15497
15498 (define-public python2-regex
15499 (package-with-python2 python-regex))
15500
15501 (define-public python2-pyopengl
15502 (package
15503 (name "python2-pyopengl")
15504 (version "3.1.0")
15505 (source
15506 (origin
15507 (method url-fetch)
15508 (uri (pypi-uri "PyOpenGL" version))
15509 (sha256
15510 (base32
15511 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15512 (arguments
15513 `(#:python ,python-2))
15514 (build-system python-build-system)
15515 (home-page "http://pyopengl.sourceforge.net")
15516 (synopsis "Standard OpenGL bindings for Python")
15517 (description
15518 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15519 related APIs. The binding is created using the standard @code{ctypes}
15520 library.")
15521 (license license:bsd-3)))
15522
15523 (define-public python-rencode
15524 (package
15525 (name "python-rencode")
15526 (version "1.0.3")
15527 (source
15528 (origin
15529 (method url-fetch)
15530 (uri (pypi-uri "rencode" version))
15531 (sha256
15532 (base32
15533 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15534 (build-system python-build-system)
15535 (native-inputs `(("pkg-config" ,pkg-config)
15536 ("python-cython", python-cython)))
15537 (home-page "https://github.com/aresch/rencode")
15538 (synopsis "Serialization of heterogeneous data structures")
15539 (description
15540 "The @code{rencode} module is a data structure serialization library,
15541 similar to @code{bencode} from the BitTorrent project. For complex,
15542 heterogeneous data structures with many small elements, r-encoding stake up
15543 significantly less space than b-encodings. This version of rencode is a
15544 complete rewrite in Cython to attempt to increase the performance over the
15545 pure Python module.")
15546 (license license:bsd-3)))
15547
15548 (define-public python2-rencode
15549 (package-with-python2 python-rencode))