gnu: Add python2-aniso8601.
[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, 2017 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 <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;;
48 ;;; This file is part of GNU Guix.
49 ;;;
50 ;;; GNU Guix is free software; you can redistribute it and/or modify it
51 ;;; under the terms of the GNU General Public License as published by
52 ;;; the Free Software Foundation; either version 3 of the License, or (at
53 ;;; your option) any later version.
54 ;;;
55 ;;; GNU Guix is distributed in the hope that it will be useful, but
56 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 ;;; GNU General Public License for more details.
59 ;;;
60 ;;; You should have received a copy of the GNU General Public License
61 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
63 (define-module (gnu packages python)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (gnu packages)
66 #:use-module (gnu packages algebra)
67 #:use-module (gnu packages adns)
68 #:use-module (gnu packages attr)
69 #:use-module (gnu packages backup)
70 #:use-module (gnu packages bash)
71 #:use-module (gnu packages check)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages crypto)
74 #:use-module (gnu packages databases)
75 #:use-module (gnu packages django)
76 #:use-module (gnu packages file)
77 #:use-module (gnu packages fontutils)
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages ghostscript)
80 #:use-module (gnu packages gl)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages graphviz)
83 #:use-module (gnu packages graphics)
84 #:use-module (gnu packages gstreamer)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages icu4c)
87 #:use-module (gnu packages image)
88 #:use-module (gnu packages imagemagick)
89 #:use-module (gnu packages libevent)
90 #:use-module (gnu packages libffi)
91 #:use-module (gnu packages linux)
92 #:use-module (gnu packages man)
93 #:use-module (gnu packages maths)
94 #:use-module (gnu packages multiprecision)
95 #:use-module (gnu packages networking)
96 #:use-module (gnu packages ncurses)
97 #:use-module (gnu packages openstack)
98 #:use-module (gnu packages password-utils)
99 #:use-module (gnu packages pcre)
100 #:use-module (gnu packages perl)
101 #:use-module (gnu packages pkg-config)
102 #:use-module (gnu packages protobuf)
103 #:use-module (gnu packages qt)
104 #:use-module (gnu packages readline)
105 #:use-module (gnu packages sdl)
106 #:use-module (gnu packages search)
107 #:use-module (gnu packages shells)
108 #:use-module (gnu packages ssh)
109 #:use-module (gnu packages statistics)
110 #:use-module (gnu packages tex)
111 #:use-module (gnu packages texinfo)
112 #:use-module (gnu packages tls)
113 #:use-module (gnu packages version-control)
114 #:use-module (gnu packages video)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages base)
117 #:use-module (gnu packages xml)
118 #:use-module (gnu packages xorg)
119 #:use-module (gnu packages xdisorg)
120 #:use-module (gnu packages tcl)
121 #:use-module (gnu packages bdw-gc)
122 #:use-module (guix packages)
123 #:use-module (guix download)
124 #:use-module (guix git-download)
125 #:use-module (guix utils)
126 #:use-module (guix build-system gnu)
127 #:use-module (guix build-system cmake)
128 #:use-module (guix build-system python)
129 #:use-module (guix build-system trivial)
130 #:use-module (srfi srfi-1))
131
132 (define-public python-2.7
133 (package
134 (name "python")
135 (version "2.7.13")
136 (source
137 (origin
138 (method url-fetch)
139 (uri (string-append "https://www.python.org/ftp/python/"
140 version "/Python-" version ".tar.xz"))
141 (sha256
142 (base32
143 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
144 (patches (search-patches "python-2.7-search-paths.patch"
145 "python-2-deterministic-build-info.patch"
146 "python-2.7-site-prefixes.patch"
147 "python-2.7-source-date-epoch.patch"
148 "python-2.7-getentropy-on-old-kernels.patch"))
149 (modules '((guix build utils)))
150 ;; suboptimal to delete failing tests here, but if we delete them in the
151 ;; arguments then we need to make sure to strip out that phase when it
152 ;; gets inherited by python and python-minimal.
153 (snippet
154 '(begin
155 (for-each delete-file
156 '("Lib/test/test_compileall.py"
157 "Lib/test/test_ctypes.py" ; fails on mips64el
158 "Lib/test/test_distutils.py"
159 "Lib/test/test_import.py"
160 "Lib/test/test_shutil.py"
161 "Lib/test/test_socket.py"
162 "Lib/test/test_subprocess.py"))
163 #t))))
164 (outputs '("out"
165 "tk")) ;tkinter; adds 50 MiB to the closure
166 (build-system gnu-build-system)
167 (arguments
168 `(;; 356 tests OK.
169 ;; 6 tests failed:
170 ;; test_compileall test_distutils test_import test_shutil test_socket
171 ;; test_subprocess
172 ;; 39 tests skipped:
173 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
174 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
175 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
176 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
177 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
178 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
179 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
180 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
181 ;; test_winreg test_winsound test_zipfile64
182 ;; 4 skips unexpected on linux2:
183 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
184 #:test-target "test"
185 #:configure-flags
186 (list "--enable-shared" ;allow embedding
187 "--with-system-ffi" ;build ctypes
188 "--with-ensurepip=install" ;install pip and setuptools
189 "--enable-unicode=ucs4"
190 (string-append "LDFLAGS=-Wl,-rpath="
191 (assoc-ref %outputs "out") "/lib"))
192
193 #:modules ((ice-9 ftw) (ice-9 match)
194 (guix build utils) (guix build gnu-build-system))
195 #:phases
196 (modify-phases %standard-phases
197 (add-before
198 'configure 'patch-lib-shells
199 (lambda _
200 ;; Filter for existing files, since some may not exist in all
201 ;; versions of python that are built with this recipe.
202 (substitute* (filter file-exists?
203 '("Lib/subprocess.py"
204 "Lib/popen2.py"
205 "Lib/distutils/tests/test_spawn.py"
206 "Lib/test/test_subprocess.py"))
207 (("/bin/sh") (which "sh")))
208
209 ;; Use zero as the timestamp in .pyc files so that builds are
210 ;; deterministic. TODO: Remove it when this variable is set in
211 ;; gnu-build-system.scm.
212 (setenv "SOURCE_DATE_EPOCH" "1")
213 #t))
214 (add-before 'configure 'do-not-record-configure-flags
215 (lambda* (#:key configure-flags #:allow-other-keys)
216 ;; Remove configure flags from the installed '_sysconfigdata.py'
217 ;; and 'Makefile' so we don't end up keeping references to the
218 ;; build tools.
219 ;;
220 ;; Preserve at least '--with-system-ffi' since otherwise the
221 ;; thing tries to build libffi, fails, and we end up with a
222 ;; Python that lacks ctypes.
223 (substitute* "configure"
224 (("^CONFIG_ARGS=.*$")
225 (format #f "CONFIG_ARGS='~a'\n"
226 (if (member "--with-system-ffi" configure-flags)
227 "--with-system-ffi"
228 ""))))
229 #t))
230 (add-before
231 'check 'pre-check
232 (lambda _
233 ;; 'Lib/test/test_site.py' needs a valid $HOME
234 (setenv "HOME" (getcwd))
235 #t))
236 (add-after
237 'unpack 'set-source-file-times-to-1980
238 ;; XXX One of the tests uses a ZIP library to pack up some of the
239 ;; source tree, and fails with "ZIP does not support timestamps
240 ;; before 1980". Work around this by setting the file times in the
241 ;; source tree to sometime in early 1980.
242 (lambda _
243 (let ((circa-1980 (* 10 366 24 60 60)))
244 (ftw "." (lambda (file stat flag)
245 (utime file circa-1980 circa-1980)
246 #t))
247 #t)))
248 (add-after 'install 'remove-tests
249 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
250 ;; because these files are used by some libraries out there.
251 (lambda* (#:key outputs #:allow-other-keys)
252 (let ((out (assoc-ref outputs "out")))
253 (match (scandir (string-append out "/lib")
254 (lambda (name)
255 (string-prefix? "python" name)))
256 ((pythonX.Y)
257 (let ((testdir (string-append out "/lib/" pythonX.Y
258 "/test")))
259 (with-directory-excursion testdir
260 (for-each delete-file-recursively
261 (scandir testdir
262 (match-lambda
263 ((or "." "..") #f)
264 (file
265 (not
266 (string-prefix? "test_support."
267 file))))))
268 (call-with-output-file "__init__.py" (const #t))
269 #t)))))))
270 (add-before 'strip 'make-libraries-writable
271 (lambda* (#:key outputs #:allow-other-keys)
272 ;; Make .so files writable so they can be stripped.
273 (let ((out (assoc-ref outputs "out")))
274 (for-each (lambda (file)
275 (chmod file #o755))
276 (find-files (string-append out "/lib")
277 "\\.so"))
278 #t)))
279 (add-after 'install 'move-tk-inter
280 (lambda* (#:key outputs #:allow-other-keys)
281 ;; When Tkinter support is built move it to a separate output so
282 ;; that the main output doesn't contain a reference to Tcl/Tk.
283 (let ((out (assoc-ref outputs "out"))
284 (tk (assoc-ref outputs "tk")))
285 (when tk
286 (match (find-files out "tkinter.*\\.so")
287 ((tkinter.so)
288 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
289 ;; want it under TK/lib/pythonX.Y/site-packages.
290 (let* ((len (string-length out))
291 (target (string-append
292 tk "/"
293 (string-drop
294 (dirname (dirname tkinter.so))
295 len)
296 "/site-packages")))
297 (install-file tkinter.so target)
298 (delete-file tkinter.so)))))
299 #t))))))
300 (inputs
301 `(("bzip2" ,bzip2)
302 ("gdbm" ,gdbm)
303 ("libffi" ,libffi) ; for ctypes
304 ("sqlite" ,sqlite) ; for sqlite extension
305 ("openssl" ,openssl)
306 ("readline" ,readline)
307 ("zlib" ,zlib)
308 ("tcl" ,tcl)
309 ("tk" ,tk))) ; for tkinter
310 (native-inputs
311 `(("pkg-config" ,pkg-config)))
312 (native-search-paths
313 (list (search-path-specification
314 (variable "PYTHONPATH")
315 (files '("lib/python2.7/site-packages")))))
316 (home-page "https://www.python.org")
317 (synopsis "High-level, dynamically-typed programming language")
318 (description
319 "Python is a remarkably powerful dynamic programming language that
320 is used in a wide variety of application domains. Some of its key
321 distinguishing features include: clear, readable syntax; strong
322 introspection capabilities; intuitive object orientation; natural
323 expression of procedural code; full modularity, supporting hierarchical
324 packages; exception-based error handling; and very high level dynamic
325 data types.")
326 (license license:psfl)))
327
328 ;; Current 2.x version.
329 (define-public python-2 python-2.7)
330
331 (define-public python-3.5
332 (package (inherit python-2)
333 (version "3.5.3")
334 (source (origin
335 (method url-fetch)
336 (uri (string-append "https://www.python.org/ftp/python/"
337 version "/Python-" version ".tar.xz"))
338 (patches (search-patches
339 "python-fix-tests.patch"
340 "python-3.5-fix-tests.patch"
341 "python-3.5-getentropy-on-old-kernels.patch"
342 "python-3-deterministic-build-info.patch"
343 "python-3-search-paths.patch"))
344 (patch-flags '("-p0"))
345 (sha256
346 (base32
347 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
348 (snippet
349 '(begin
350 (for-each delete-file
351 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
352 "Lib/test/test_fcntl.py"))
353 #t))))
354 (arguments (substitute-keyword-arguments (package-arguments python-2)
355 ((#:tests? _) #t)))
356 (native-search-paths
357 (list (search-path-specification
358 (variable "PYTHONPATH")
359 (files (list (string-append "lib/python"
360 (version-major+minor version)
361 "/site-packages"))))))))
362
363 ;; Current 3.x version.
364 (define-public python-3 python-3.5)
365
366 ;; Current major version.
367 (define-public python python-3)
368
369 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
370 ;; Python (Tk -> libxcb -> Python.)
371
372 (define-public python2-minimal
373 (package (inherit python-2)
374 (name "python-minimal")
375 (outputs '("out"))
376
377 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
378 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
379 ;; libffi.
380 (inputs `(("libffi" ,libffi)
381 ("zlib" ,zlib)))))
382
383 (define-public python-minimal
384 (package (inherit python)
385 (name "python-minimal")
386 (outputs '("out"))
387
388 ;; Build fails due to missing ctypes without libffi.
389 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
390 ;; zlib is required by 'zipimport', used by pip.
391 (inputs `(("libffi" ,libffi)
392 ("openssl" ,openssl)
393 ("zlib" ,zlib)))))
394
395 (define* (wrap-python3 python
396 #:optional
397 (name (string-append (package-name python) "-wrapper")))
398 (package (inherit python)
399 (name name)
400 (source #f)
401 (build-system trivial-build-system)
402 (outputs '("out"))
403 (inputs `(("bash" ,bash)))
404 (propagated-inputs `(("python" ,python)))
405 (arguments
406 `(#:modules ((guix build utils))
407 #:builder
408 (begin
409 (use-modules (guix build utils))
410 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
411 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
412 (mkdir-p bin)
413 (for-each
414 (lambda (old new)
415 (symlink (string-append python old)
416 (string-append bin "/" new)))
417 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
418 `("python" ,"pydoc" ,"idle" ,"pip"))
419 ;; python-config outputs search paths based upon its location,
420 ;; use a bash wrapper to avoid changing its outputs.
421 (let ((bash (string-append (assoc-ref %build-inputs "bash")
422 "/bin/bash"))
423 (old (string-append python "python3-config"))
424 (new (string-append bin "/python-config")))
425 (with-output-to-file new
426 (lambda ()
427 (format #t "#!~a~%" bash)
428 (format #t "exec \"~a\" \"$@\"~%" old)
429 (chmod new #o755)
430 #t)))))))
431 (synopsis "Wrapper for the Python 3 commands")
432 (description
433 "This package provides wrappers for the commands of Python@tie{}3.x such
434 that they can be invoked under their usual name---e.g., @command{python}
435 instead of @command{python3}.")))
436
437 (define-public python-wrapper (wrap-python3 python))
438 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
439
440 (define-public python-psutil
441 (package
442 (name "python-psutil")
443 (version "4.3.0")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "psutil" version))
448 (sha256
449 (base32
450 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
451 (build-system python-build-system)
452 (arguments
453 ;; FIXME: some tests does not return and times out.
454 '(#:tests? #f))
455 (home-page "https://www.github.com/giampaolo/psutil")
456 (synopsis "Library for retrieving information on running processes")
457 (description
458 "psutil (Python system and process utilities) is a library for retrieving
459 information on running processes and system utilization (CPU, memory, disks,
460 network) in Python. It is useful mainly for system monitoring, profiling and
461 limiting process resources and management of running processes. It implements
462 many functionalities offered by command line tools such as: ps, top, lsof,
463 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
464 pidof, tty, taskset, pmap.")
465 (license license:bsd-3)))
466
467 (define-public python2-psutil
468 (package-with-python2 python-psutil))
469
470 (define-public python-passlib
471 (package
472 (name "python-passlib")
473 (version "1.7.1")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (pypi-uri "passlib" version))
478 (sha256
479 (base32
480 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
481 (build-system python-build-system)
482 (native-inputs
483 `(("python-nose" ,python-nose)))
484 (propagated-inputs
485 `(("python-py-bcrypt" ,python-py-bcrypt)))
486 (arguments
487 `(#:phases
488 (alist-cons-before
489 'check 'set-PYTHON_EGG_CACHE
490 ;; some tests require access to "$HOME/.cython"
491 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
492 %standard-phases)))
493 (home-page "https://bitbucket.org/ecollins/passlib")
494 (synopsis
495 "Comprehensive password hashing framework")
496 (description
497 "Passlib is a password hashing library for Python 2 & 3, which provides
498 cross-platform implementations of over 30 password hashing algorithms, as well
499 as a framework for managing existing password hashes. It's designed to be
500 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
501 to providing full-strength password hashing for multi-user application.")
502 (license license:bsd-3)))
503
504 (define-public python2-passlib
505 (package-with-python2 python-passlib))
506
507 (define-public python-py-bcrypt
508 (package
509 (name "python-py-bcrypt")
510 (version "0.4")
511 (source
512 (origin
513 (method url-fetch)
514 (uri (string-append
515 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
516 version
517 ".tar.gz"))
518 (sha256
519 (base32
520 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
521 (build-system python-build-system)
522 (home-page "https://code.google.com/p/py-bcrypt")
523 (synopsis
524 "Bcrypt password hashing and key derivation")
525 (description
526 "A python wrapper of OpenBSD's Blowfish password hashing code. This
527 system hashes passwords using a version of Bruce Schneier's Blowfish block
528 cipher with modifications designed to raise the cost of off-line password
529 cracking and frustrate fast hardware implementation. The computation cost of
530 the algorithm is parametised, so it can be increased as computers get faster.
531 The intent is to make a compromise of a password database less likely to
532 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
533 John the Ripper).")
534 ;; "sha2.c" is under BSD-3;
535 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
536 ;; the rest is under ISC.
537 (license (list license:isc license:bsd-3 license:bsd-4))))
538
539 (define-public python2-py-bcrypt
540 (package-with-python2 python-py-bcrypt))
541
542
543 (define-public python-paramiko
544 (package
545 (name "python-paramiko")
546 (version "2.1.2")
547 (source
548 (origin
549 (method url-fetch)
550 (uri (pypi-uri "paramiko" version))
551 (sha256
552 (base32
553 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
554 (build-system python-build-system)
555 (arguments
556 '(#:phases
557 (modify-phases %standard-phases
558 (replace 'check
559 (lambda _
560 (zero? (system* "python" "test.py")))))))
561 (propagated-inputs
562 `(("python-pyasn1" ,python-pyasn1)
563 ("python-cryptography" ,python-cryptography)))
564 (home-page "http://www.paramiko.org/")
565 (synopsis "SSHv2 protocol library")
566 (description "Paramiko is a python implementation of the SSHv2 protocol,
567 providing both client and server functionality. While it leverages a Python C
568 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
569 Python interface around SSH networking concepts.")
570 (license license:lgpl2.1+)))
571
572 (define-public python2-paramiko
573 (package-with-python2 python-paramiko))
574
575
576 (define-public python-httplib2
577 (package
578 (name "python-httplib2")
579 (version "0.9.2")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (pypi-uri "httplib2" version))
584 (sha256
585 (base32
586 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
587 (build-system python-build-system)
588 (home-page "https://github.com/jcgregorio/httplib2")
589 (synopsis "Comprehensive HTTP client library")
590 (description
591 "A comprehensive HTTP client library supporting many features left out of
592 other HTTP libraries.")
593 (license license:expat)))
594
595 (define-public python2-httplib2
596 (package-with-python2 python-httplib2))
597
598 (define-public python-ecdsa
599 (package
600 (name "python-ecdsa")
601 (version "0.13")
602 (source
603 (origin
604 (method url-fetch)
605 (uri (string-append
606 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
607 version
608 ".tar.gz"))
609 (sha256
610 (base32
611 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
612 (build-system python-build-system)
613 (inputs
614 `(("openssl" ,openssl)))
615 (home-page
616 "https://github.com/warner/python-ecdsa")
617 (synopsis
618 "ECDSA cryptographic signature library (pure python)")
619 (description
620 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
621 Curve Digital Signature Algorithm), implemented purely in Python. With this
622 library, you can quickly create keypairs (signing key and verifying key), sign
623 messages, and verify the signatures. The keys and signatures are very short,
624 making them easy to handle and incorporate into other protocols.")
625 (license license:expat)))
626
627 (define-public python2-ecdsa
628 (package-with-python2 python-ecdsa))
629
630 (define-public python-ccm
631 (package
632 (name "python-ccm")
633 (version "2.1.6")
634 (source
635 (origin
636 (method url-fetch)
637 (uri (pypi-uri "ccm" version))
638 (sha256
639 (base32
640 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
641 (build-system python-build-system)
642 (propagated-inputs
643 `(("python-pyyaml" ,python-pyyaml)
644 ;; Not listed in setup.py, but used in ccmlib/node.py for full
645 ;; functionality
646 ("python-psutil" ,python-psutil)
647 ("python-six" ,python-six)))
648 (home-page "https://github.com/pcmanus/ccm")
649 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
650 localhost")
651 (description "Cassandra Cluster Manager is a development tool for testing
652 local Cassandra clusters. It creates, launches and removes Cassandra clusters
653 on localhost.")
654 (license license:asl2.0)))
655
656 (define-public python2-ccm
657 (package-with-python2 python-ccm))
658
659 (define-public python-pytz
660 (package
661 (name "python-pytz")
662 (version "2017.2")
663 (source
664 (origin
665 (method url-fetch)
666 (uri (pypi-uri "pytz" version ".zip"))
667 (sha256
668 (base32
669 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
670 (build-system python-build-system)
671 (native-inputs
672 `(("unzip" ,unzip)))
673 (home-page "http://pythonhosted.org/pytz")
674 (synopsis "Python timezone library")
675 (description "This library brings the Olson tz database into Python. It
676 allows accurate and cross platform timezone calculations using Python 2.4 or
677 higher. It also solves the issue of ambiguous times at the end of daylight
678 saving time. Almost all of the Olson timezones are supported.")
679 (license license:expat)))
680
681 (define-public python2-pytz
682 (package-with-python2 python-pytz))
683
684 (define-public python-clyent
685 (package
686 (name "python-clyent")
687 (version "1.2.1")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (pypi-uri "clyent" version))
692 (sha256
693 (base32
694 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
695 (build-system python-build-system)
696 (native-inputs
697 `(("python-mock" ,python-mock)))
698 (home-page "https://github.com/binstar/clyent")
699 (synopsis "Command line client library")
700 (description "Clyent is a Python command line utiliy library. It is used
701 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
702 (license license:bsd-3)))
703
704 (define-public python2-clyent
705 (package-with-python2 python-clyent))
706
707 (define-public python-babel
708 (package
709 (name "python-babel")
710 (version "2.3.4")
711 (source
712 (origin
713 (method url-fetch)
714 (uri (pypi-uri "Babel" version))
715 (sha256
716 (base32
717 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
718 (build-system python-build-system)
719 (propagated-inputs
720 `(("python-pytz" ,python-pytz)))
721 (arguments `(#:tests? #f)) ; no test target
722 (home-page "http://babel.pocoo.org/")
723 (synopsis
724 "Tools for internationalizing Python applications")
725 (description
726 "Babel is composed of two major parts:
727 - tools to build and work with gettext message catalogs
728 - a Python interface to the CLDR (Common Locale Data Repository), providing
729 access to various locale display names, localized number and date formatting,
730 etc. ")
731 (license license:bsd-3)))
732
733 (define-public python2-babel
734 (package-with-python2 python-babel))
735
736 (define-public python2-backport-ssl-match-hostname
737 (package
738 (name "python2-backport-ssl-match-hostname")
739 (version "3.5.0.1")
740 (source
741 (origin
742 (method url-fetch)
743 (uri (string-append
744 "https://pypi.python.org/packages/source/b/"
745 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
746 version ".tar.gz"))
747 (sha256
748 (base32
749 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
750 (build-system python-build-system)
751 (arguments
752 `(#:python ,python-2
753 #:tests? #f)) ; no test target
754 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
755 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
756 (description
757 "This backport brings the ssl.match_hostname() function to users of
758 earlier versions of Python. The function checks the hostname in the
759 certificate returned by the server to which a connection has been established,
760 and verifies that it matches the intended target hostname.")
761 (license license:psfl)))
762
763 (define-public python-hdf4
764 (package
765 (name "python-hdf4")
766 (version "0.9")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (pypi-uri name version))
771 (sha256
772 (base32
773 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
774 (build-system python-build-system)
775 (native-inputs `(("nose" ,python-nose)))
776 (propagated-inputs `(("numpy" ,python-numpy)))
777 (inputs
778 `(("hdf4" ,hdf4)
779 ("libjpeg" ,libjpeg)
780 ("zlib" ,zlib)))
781 (arguments
782 `(#:phases
783 (modify-phases %standard-phases
784 (replace 'check
785 (lambda _
786 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
787 ;; on to import numpy. Somehow this works on their CI system.
788 ;; Let's just manage PYTHONPATH here instead.
789 (substitute* "runexamples.sh"
790 (("export PYTHONPATH=.*") ""))
791 (setenv "PYTHONPATH"
792 (string-append (getcwd) ":"
793 (getenv "PYTHONPATH")))
794 (and (zero? (system* "./runexamples.sh"))
795 (zero? (system* "nosetests" "-v"))))))))
796 (home-page "https://github.com/fhs/python-hdf4")
797 (synopsis "Python interface to the NCSA HDF4 library")
798 (description
799 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
800 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
801 NetCDF files can also be read and modified. Python-HDF4 is a fork of
802 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
803 (license license:expat)))
804
805 (define-public python2-hdf4
806 (package-with-python2 python-hdf4))
807
808 (define-public python-h5py
809 (package
810 (name "python-h5py")
811 (version "2.7.0")
812 (source
813 (origin
814 (method url-fetch)
815 (uri (pypi-uri "h5py" version))
816 (sha256
817 (base32
818 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
819 (build-system python-build-system)
820 (arguments
821 `(#:tests? #f ; no test target
822 #:phases
823 (modify-phases %standard-phases
824 (add-after 'unpack 'fix-hdf5-paths
825 (lambda* (#:key inputs #:allow-other-keys)
826 (let ((prefix (assoc-ref inputs "hdf5")))
827 (substitute* "setup_build.py"
828 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
829 (string-append "['" prefix "/lib" "']"))
830 (("'/opt/local/include', '/usr/local/include'")
831 (string-append "'" prefix "/include" "'")))
832 (substitute* "setup_configure.py"
833 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
834 (string-append "['" prefix "/lib" "']")))
835 #t))))))
836 (propagated-inputs
837 `(("python-six" ,python-six)
838 ("python-numpy" ,python-numpy)))
839 (inputs
840 `(("hdf5" ,hdf5)))
841 (native-inputs
842 `(("python-cython" ,python-cython)
843 ("python-pkgconfig" ,python-pkgconfig)))
844 (home-page "http://www.h5py.org/")
845 (synopsis "Read and write HDF5 files from Python")
846 (description
847 "The h5py package provides both a high- and low-level interface to the
848 HDF5 library from Python. The low-level interface is intended to be a
849 complete wrapping of the HDF5 API, while the high-level component supports
850 access to HDF5 files, datasets and groups using established Python and NumPy
851 concepts.")
852 (license license:bsd-3)))
853
854 (define-public python2-h5py
855 (package-with-python2 python-h5py))
856
857 (define-public python-netcdf4
858 (package
859 (name "python-netcdf4")
860 (version "1.2.9")
861 (source
862 (origin
863 (method url-fetch)
864 (uri (pypi-uri "netCDF4" version))
865 (sha256
866 (base32
867 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
868 (build-system python-build-system)
869 (native-inputs
870 `(("python-cython" ,python-cython)))
871 (propagated-inputs
872 `(("python-numpy" ,python-numpy)))
873 (inputs
874 `(("netcdf" ,netcdf)
875 ("hdf4" ,hdf4)
876 ("hdf5" ,hdf5)))
877 (arguments
878 '(#:phases
879 (modify-phases %standard-phases
880 (replace 'check
881 (lambda _
882 (setenv "NO_NET" "1") ; disable opendap tests
883 (with-directory-excursion "test"
884 (setenv "PYTHONPATH" ; find and add the library we just built
885 (string-append
886 (car (find-files "../build" "lib.*"
887 #:directories? #:t
888 #:fail-on-error? #:t))
889 ":" (getenv "PYTHONPATH")))
890 (zero? (system* "python" "run_all.py"))))))))
891 (home-page
892 "https://github.com/Unidata/netcdf4-python")
893 (synopsis "Python/numpy interface to the netCDF library")
894 (description "Netcdf4-python is a Python interface to the netCDF C
895 library. netCDF version 4 has many features not found in earlier
896 versions of the library and is implemented on top of HDF5. This module
897 can read and write files in both the new netCDF 4 and the old netCDF 3
898 format, and can create files that are readable by HDF5 clients. The
899 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
900 to users of that module.")
901 ;; The software is mainly ISC, but includes some files covered
902 ;; by the Expat license.
903 (license (list license:isc license:expat))))
904
905 (define-public python2-netcdf4
906 (package-with-python2 python-netcdf4))
907
908 (define-public python-lockfile
909 (package
910 (name "python-lockfile")
911 (version "0.12.2")
912 (source
913 (origin
914 (method url-fetch)
915 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
916 "lockfile-" version ".tar.gz"))
917 (sha256
918 (base32
919 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
920 (build-system python-build-system)
921 (arguments '(#:test-target "check"))
922 (native-inputs
923 `(("python-pbr" ,python-pbr)))
924 (home-page "https://launchpad.net/pylockfile")
925 (synopsis "Platform-independent file locking module")
926 (description
927 "The lockfile package exports a LockFile class which provides a simple
928 API for locking files.")
929 (license license:expat)))
930
931 (define-public python2-lockfile
932 (package-with-python2 python-lockfile))
933
934 (define-public python-mock
935 (package
936 (name "python-mock")
937 (version "1.0.1")
938 (source
939 (origin
940 (method url-fetch)
941 (uri (pypi-uri "mock" version))
942 (sha256
943 (base32
944 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
945 (build-system python-build-system)
946 (arguments '(#:test-target "check"))
947 (home-page "https://github.com/testing-cabal/mock")
948 (synopsis "Python mocking and patching library for testing")
949 (description
950 "Mock is a library for testing in Python. It allows you to replace parts
951 of your system under test with mock objects and make assertions about how they
952 have been used.")
953 (license license:expat)))
954
955 (define-public python2-mock
956 (package-with-python2 python-mock))
957
958 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
959 ;;; of python-mock. However, a large number of packages fail to build with
960 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
961 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
962 (define-public python-mock-2
963 (package
964 (inherit python-mock)
965 (version "2.0.0")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "mock" version))
970 (sha256
971 (base32
972 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
973 (propagated-inputs
974 `(("python-pbr" ,python-pbr-minimal)
975 ,@(package-propagated-inputs python-mock)))))
976
977 (define-public python-setuptools
978 (package
979 (name "python-setuptools")
980 (version "31.0.0")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (pypi-uri "setuptools" version))
985 (sha256
986 (base32
987 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
988 (modules '((guix build utils)))
989 (snippet
990 '(begin
991 ;; Remove included binaries which are used to build self-extracting
992 ;; installers for Windows.
993 ;; TODO: Find some way to build them ourself so we can include them.
994 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
995 #t))))
996 (build-system python-build-system)
997 ;; FIXME: Tests require pytest, which itself relies on setuptools.
998 ;; One could bootstrap with an internal untested setuptools.
999 (arguments
1000 `(#:tests? #f))
1001 (home-page "https://pypi.python.org/pypi/setuptools")
1002 (synopsis
1003 "Library designed to facilitate packaging Python projects")
1004 (description
1005 "Setuptools is a fully-featured, stable library designed to facilitate
1006 packaging Python projects, where packaging includes:
1007 Python package and module definitions,
1008 distribution package metadata,
1009 test hooks,
1010 project installation,
1011 platform-specific details,
1012 Python 3 support.")
1013 ;; TODO: setuptools now bundles the following libraries:
1014 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1015 (license (list license:psfl ; setuptools itself
1016 license:expat ; six, appdirs, pyparsing
1017 license:asl2.0 ; packaging is dual ASL2/BSD-2
1018 license:bsd-2))))
1019
1020 (define-public python2-setuptools
1021 (package-with-python2 python-setuptools))
1022
1023 (define-public python-uniseg
1024 (package
1025 (name "python-uniseg")
1026 (version "0.7.1")
1027 (source
1028 (origin
1029 (method url-fetch)
1030 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1031 "get/rel-" version ".tar.gz"))
1032 (file-name (string-append name "-" version ".tar.gz"))
1033 (sha256
1034 (base32
1035 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1036 (build-system python-build-system)
1037 (arguments
1038 '(#:tests? #f)) ; The test suite requires network access.
1039 (home-page
1040 "https://bitbucket.org/emptypage/uniseg-python")
1041 (synopsis
1042 "Python library to determine Unicode text segmentations")
1043 (description
1044 "Uniseg is a Python package used to determine Unicode text segmentations.
1045 Supported segmentations include:
1046 @enumerate
1047 @item @dfn{Code point} (any value in the Unicode codespace)
1048 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1049 multiple Unicode code points, e.g. \"G\" + acute-accent)
1050 @item Word break
1051 @item Sentence break
1052 @item Line break
1053 @end enumerate")
1054 (license license:expat)))
1055
1056 (define-public python2-uniseg
1057 (package-with-python2 python-uniseg))
1058
1059 ;;; Pycrypto is abandoned upstream:
1060 ;;;
1061 ;;; https://github.com/dlitz/pycrypto/issues/173
1062 ;;;
1063 ;;; TODO Remove this package from GNU Guix.
1064 (define-public python-pycrypto
1065 (package
1066 (name "python-pycrypto")
1067 (version "2.6.1")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "pycrypto" version))
1072 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1073 (sha256
1074 (base32
1075 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1076 (build-system python-build-system)
1077 (inputs
1078 `(("python" ,python)
1079 ("gmp" ,gmp)))
1080 (arguments
1081 `(#:phases
1082 (alist-cons-before
1083 'build 'set-build-env
1084 ;; pycrypto runs an autoconf configure script behind the scenes
1085 (lambda _
1086 (setenv "CONFIG_SHELL" (which "bash")))
1087 %standard-phases)))
1088 (home-page "http://www.pycrypto.org/")
1089 (synopsis "Cryptographic modules for Python")
1090 (description
1091 "Pycrypto is a collection of both secure hash functions (such as SHA256
1092 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1093 etc.). The package is structured to make adding new modules easy.")
1094 (license license:public-domain)))
1095
1096 (define-public python2-pycrypto
1097 (let ((pycrypto (package-with-python2 python-pycrypto)))
1098 (package (inherit pycrypto)
1099 (inputs
1100 `(("python" ,python-2)
1101 ,@(alist-delete
1102 "python"
1103 (package-inputs pycrypto)))))))
1104
1105 (define-public python-eventlet
1106 (package
1107 (name "python-eventlet")
1108 (version "0.20.1")
1109 (source
1110 (origin
1111 (method url-fetch)
1112 (uri (pypi-uri "eventlet" version))
1113 (sha256
1114 (base32
1115 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1116 (build-system python-build-system)
1117 (propagated-inputs
1118 `(("python-greenlet" ,python-greenlet)))
1119 (arguments
1120 ;; TODO: Requires unpackaged 'enum-compat'.
1121 '(#:tests? #f))
1122 (home-page "http://eventlet.net")
1123 (synopsis "Concurrent networking library for Python")
1124 (description
1125 "Eventlet is a concurrent networking library for Python that
1126 allows you to change how you run your code, not how you write it.
1127 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1128 Coroutines ensure that the developer uses a blocking style of programming
1129 that is similar to threading, but provide the benefits of non-blocking I/O.
1130 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1131 from the Python interpreter, or as a small part of a larger application.")
1132 (license license:expat)))
1133
1134 (define-public python2-eventlet
1135 (let ((base (package-with-python2
1136 (strip-python2-variant python-eventlet))))
1137 (package (inherit base)
1138 (propagated-inputs
1139 `(("python2-enum34" ,python2-enum34)
1140 ,@(package-propagated-inputs base))))))
1141
1142 (define-public python-keyring
1143 (package
1144 (name "python-keyring")
1145 (version "8.7")
1146 (source
1147 (origin
1148 (method url-fetch)
1149 (uri (pypi-uri "keyring" version))
1150 (sha256
1151 (base32
1152 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1153 (build-system python-build-system)
1154 (native-inputs
1155 `(("python-setuptools-scm" ,python-setuptools-scm)))
1156 (propagated-inputs
1157 `(("python-pycrypto" ,python-pycrypto)))
1158 (arguments
1159 `(#:tests? #f)) ;TODO: tests require pytest
1160 (home-page "https://github.com/jaraco/keyring")
1161 (synopsis "Store and access your passwords safely")
1162 (description
1163 "The Python keyring lib provides a easy way to access the system keyring
1164 service from python. It can be used in any application that needs safe
1165 password storage.")
1166 ;; "MIT" and PSF dual license
1167 (license license:x11)))
1168
1169 (define-public python2-keyring
1170 (package-with-python2 python-keyring))
1171
1172 (define-public python-six
1173 (package
1174 (name "python-six")
1175 (version "1.10.0")
1176 (source
1177 (origin
1178 (method url-fetch)
1179 (uri (pypi-uri "six" version))
1180 (sha256
1181 (base32
1182 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1183 (build-system python-build-system)
1184 (native-inputs
1185 `(("python-py" ,python-py)
1186 ("python-pytest" ,python-pytest)))
1187 (home-page "http://pypi.python.org/pypi/six/")
1188 (synopsis "Python 2 and 3 compatibility utilities")
1189 (description
1190 "Six is a Python 2 and 3 compatibility library. It provides utility
1191 functions for smoothing over the differences between the Python versions with
1192 the goal of writing Python code that is compatible on both Python versions.
1193 Six supports every Python version since 2.5. It is contained in only one
1194 Python file, so it can be easily copied into your project.")
1195 (license license:x11)))
1196
1197 (define-public python2-six
1198 (package-with-python2 python-six))
1199
1200 (define-public python-dateutil
1201 (package
1202 (name "python-dateutil")
1203 (version "2.6.0")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (pypi-uri "python-dateutil" version))
1208 (sha256
1209 (base32
1210 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1211 (build-system python-build-system)
1212 (propagated-inputs
1213 `(("python-six" ,python-six)))
1214 (home-page "https://dateutil.readthedocs.io/en/stable/")
1215 (synopsis "Extensions to the standard datetime module")
1216 (description
1217 "The dateutil module provides powerful extensions to the standard
1218 datetime module, available in Python 2.3+.")
1219 (license license:bsd-3)))
1220
1221 (define-public python2-dateutil
1222 (package-with-python2 python-dateutil))
1223
1224 (define-public python-parsedatetime
1225 (package
1226 (name "python-parsedatetime")
1227 (version "2.4")
1228 (source
1229 (origin
1230 (method url-fetch)
1231 (uri (pypi-uri "parsedatetime" version))
1232 (sha256
1233 (base32
1234 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1235 (build-system python-build-system)
1236 (native-inputs
1237 `(("python-nose" ,python-nose)
1238 ("python-pyicu" ,python-pyicu)
1239 ("python-pytest" ,python-pytest)
1240 ("python-pytest-runner" ,python-pytest-runner)))
1241 (propagated-inputs
1242 `(("python-future" ,python-future)))
1243 (home-page "https://github.com/bear/parsedatetime/")
1244 (synopsis
1245 "Parse human-readable date/time text")
1246 (description
1247 "Parse human-readable date/time text.")
1248 (license license:asl2.0)))
1249
1250 (define-public python2-parsedatetime
1251 (package-with-python2 python-parsedatetime))
1252
1253 (define-public python-schedule
1254 (package
1255 (name "python-schedule")
1256 (version "0.4.3")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "schedule" version))
1261 (sha256
1262 (base32
1263 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1264 (build-system python-build-system)
1265 (native-inputs
1266 `(("python-pytest" ,python-pytest)
1267 ("python-mock" ,python-mock)))
1268 (home-page "https://github.com/dbader/schedule")
1269 (synopsis "Schedule periodic function calls in Python")
1270 (description
1271 "Schedule is an in-process scheduler for periodic jobs that uses the
1272 builder pattern for configuration. Schedule lets you run Python functions (or
1273 any other callable) periodically at pre-determined intervals using a simple,
1274 human-friendly syntax.")
1275 (license license:expat)))
1276
1277 (define-public python2-schedule
1278 (package-with-python2 python-schedule))
1279
1280 (define-public python-pandas
1281 (package
1282 (name "python-pandas")
1283 (version "0.19.2")
1284 (source
1285 (origin
1286 (method url-fetch)
1287 (uri (pypi-uri "pandas" version))
1288 (sha256
1289 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1290 (patches
1291 (search-patches "python-pandas-skip-failing-tests.patch"))))
1292 (build-system python-build-system)
1293 (propagated-inputs
1294 `(("python-numpy" ,python-numpy)
1295 ("python-pytz" ,python-pytz)
1296 ("python-dateutil" ,python-dateutil)))
1297 (native-inputs
1298 `(("python-nose" ,python-nose)
1299 ("python-cython" ,python-cython)))
1300 (home-page "http://pandas.pydata.org")
1301 (synopsis "Data structures for data analysis, time series, and statistics")
1302 (description
1303 "Pandas is a Python package providing fast, flexible, and expressive data
1304 structures designed to make working with structured (tabular,
1305 multidimensional, potentially heterogeneous) and time series data both easy
1306 and intuitive. It aims to be the fundamental high-level building block for
1307 doing practical, real world data analysis in Python.")
1308 (license license:bsd-3)))
1309
1310 (define-public python2-pandas
1311 (package-with-python2 python-pandas))
1312
1313 (define-public python-tzlocal
1314 (package
1315 (name "python-tzlocal")
1316 (version "1.2.2")
1317 (source
1318 (origin
1319 (method url-fetch)
1320 (uri (pypi-uri "tzlocal" version))
1321 (sha256
1322 (base32
1323 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1324 (build-system python-build-system)
1325 (propagated-inputs
1326 `(("python-pytz" ,python-pytz)))
1327 (home-page "https://github.com/regebro/tzlocal")
1328 (synopsis
1329 "Local timezone information for Python")
1330 (description
1331 "Tzlocal returns a tzinfo object with the local timezone information.
1332 This module attempts to fix a glaring hole in pytz, that there is no way to
1333 get the local timezone information, unless you know the zoneinfo name, and
1334 under several distributions that's hard or impossible to figure out.")
1335 (license license:cc0)))
1336
1337 (define-public python2-pysqlite
1338 (package
1339 (name "python2-pysqlite")
1340 (version "2.8.3")
1341 (source
1342 (origin
1343 (method url-fetch)
1344 (uri (pypi-uri "pysqlite" version))
1345 (sha256
1346 (base32
1347 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1348 (build-system python-build-system)
1349 (inputs
1350 `(("sqlite" ,sqlite)))
1351 (arguments
1352 `(#:python ,python-2 ; incompatible with Python 3
1353 #:tests? #f)) ; no test target
1354 (home-page "https://github.com/ghaering/pysqlite")
1355 (synopsis "SQLite bindings for Python")
1356 (description
1357 "Pysqlite provides SQLite bindings for Python that comply to the
1358 Database API 2.0T.")
1359 (license license:zlib)))
1360
1361
1362 (define-public python2-mechanize
1363 (package
1364 (name "python2-mechanize")
1365 (version "0.2.5")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1370 version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1374 (build-system python-build-system)
1375 (arguments
1376 `(#:python ,python-2 ; apparently incompatible with Python 3
1377 #:tests? #f))
1378 ;; test fails with message
1379 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1380 ;; (python-3.3.2) or
1381 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1382 ;; (python-2.7.5).
1383 ;; The source code is from March 2011 and probably not up-to-date
1384 ;; with respect to python unit tests.
1385 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1386 (synopsis
1387 "Stateful programmatic web browsing in Python")
1388 (description
1389 "Mechanize implements stateful programmatic web browsing in Python,
1390 after Andy Lester’s Perl module WWW::Mechanize.")
1391 (license (license:non-copyleft
1392 "file://COPYING"
1393 "See COPYING in the distribution."))))
1394
1395
1396 (define-public python-simplejson
1397 (package
1398 (name "python-simplejson")
1399 (version "3.10.0")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "simplejson" version))
1404 (sha256
1405 (base32
1406 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1407 (build-system python-build-system)
1408 (home-page "http://simplejson.readthedocs.org/en/latest/")
1409 (synopsis
1410 "Json library for Python")
1411 (description
1412 "JSON (JavaScript Object Notation) is a subset of JavaScript
1413 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1414 format.
1415
1416 Simplejson exposes an API familiar to users of the standard library marshal
1417 and pickle modules. It is the externally maintained version of the json
1418 library contained in Python 2.6, but maintains compatibility with Python 2.5
1419 and (currently) has significant performance advantages, even without using
1420 the optional C extension for speedups. Simplejson is also supported on
1421 Python 3.3+.")
1422 (license license:x11)))
1423
1424 (define-public python2-simplejson
1425 (package-with-python2 python-simplejson))
1426
1427
1428 (define-public python-pyicu
1429 (package
1430 (name "python-pyicu")
1431 (version "1.9.5")
1432 (source
1433 (origin
1434 (method url-fetch)
1435 (uri (pypi-uri "PyICU" version))
1436 (sha256
1437 (base32
1438 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1439 (build-system python-build-system)
1440 (arguments
1441 '(#:phases
1442 (modify-phases %standard-phases
1443 (add-before 'check 'delete-failing-test
1444 (lambda _
1445 ;; XXX: These tests require locales that are unavailable
1446 ;; in the build environment.
1447 (delete-file "test/test_DateTimeParserGenerator.py")
1448 #t)))))
1449 (inputs
1450 `(("icu4c" ,icu4c)))
1451 (home-page "http://pyicu.osafoundation.org/")
1452 (synopsis "Python extension wrapping the ICU C++ API")
1453 (description
1454 "PyICU is a python extension wrapping the ICU C++ API.")
1455 (license license:x11)))
1456
1457 (define-public python2-pyicu
1458 (package-with-python2 python-pyicu))
1459
1460 (define-public python2-dogtail
1461 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1462 ;; spaces in indentation" with Python 3.
1463 (package
1464 (name "python2-dogtail")
1465 (version "0.9.9")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (pypi-uri "dogtail" version))
1469 (sha256
1470 (base32
1471 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1472 (build-system python-build-system)
1473 (arguments `(#:python ,python-2
1474 #:tests? #f)) ; invalid command "test"
1475 ;; Currently no offical homepage.
1476 (home-page "https://pypi.python.org/pypi/dogtail/")
1477 (synopsis "GUI test tool and automation framework written in Python")
1478 (description
1479 "Dogtail is a GUI test tool and automation framework written in Python.
1480 It uses Accessibility (a11y) technologies to communicate with desktop
1481 applications. dogtail scripts are written in Python and executed like any
1482 other Python program.")
1483 (license license:gpl2+)))
1484
1485 (define-public python2-empy
1486 (package
1487 (name "python2-empy")
1488 (version "3.3")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1492 version ".tar.gz"))
1493 (sha256
1494 (base32
1495 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1496 (build-system python-build-system)
1497 (arguments
1498 `(#:python ,python-2
1499 #:phases (alist-replace
1500 'check
1501 (lambda _
1502 (zero? (system* "./test.sh")))
1503 %standard-phases)))
1504 (home-page "http://www.alcyone.com/software/empy/")
1505 (synopsis "Templating system for Python")
1506 (description
1507 "EmPy is a system for embedding Python expressions and statements in
1508 template text; it takes an EmPy source file, processes it, and produces
1509 output. This is accomplished via expansions, which are special signals to the
1510 EmPy system and are set off by a special prefix (by default the at sign, @@).
1511 EmPy can expand arbitrary Python expressions and statements in this way, as
1512 well as a variety of special forms. Textual data not explicitly delimited in
1513 this way is sent unaffected to the output, allowing Python to be used in
1514 effect as a markup language. Also supported are callbacks via hooks,
1515 recording and playback via diversions, and dynamic, chainable filters. The
1516 system is highly configurable via command line options and embedded
1517 commands.")
1518 (license license:lgpl2.1+)))
1519
1520 (define-public python2-element-tree
1521 (package
1522 (name "python2-element-tree")
1523 (version "1.2.6")
1524 (source (origin
1525 (method url-fetch)
1526 (uri (string-append
1527 "http://effbot.org/media/downloads/elementtree-"
1528 version "-20050316.tar.gz"))
1529 (sha256
1530 (base32
1531 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1532 (build-system python-build-system)
1533 (arguments
1534 `(#:python ,python-2 ; seems to be part of Python 3
1535 #:tests? #f)) ; no 'test' sub-command
1536 (synopsis "Toolkit for XML processing in Python")
1537 (description
1538 "ElementTree is a Python library supporting lightweight XML processing.")
1539 (home-page "http://effbot.org/zone/element-index.htm")
1540 (license (license:x11-style
1541 "http://docs.python.org/2/license.html"
1542 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1543
1544 (define-public python2-pybugz
1545 (package
1546 (name "python2-pybugz")
1547 (version "0.6.11")
1548 (source (origin
1549 (method url-fetch)
1550 (uri (string-append
1551 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1552 version ".tar.gz"))
1553 (sha256
1554 (base32
1555 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1556 (patches (search-patches "pybugz-stty.patch"
1557 "pybugz-encode-error.patch"))))
1558 (build-system python-build-system)
1559 (arguments
1560 `(#:python ,python-2 ; SyntaxError with Python 3
1561 #:tests? #f)) ; no 'test' sub-command
1562 (propagated-inputs
1563 `(("element-tree" ,python2-element-tree)))
1564 (synopsis "Python and command-line interface to Bugzilla")
1565 (description
1566 "PyBugz is a Python library and command-line tool to query the Bugzilla
1567 bug tracking system. It is meant as an aid to speed up interaction with the
1568 bug tracker.")
1569 (home-page "http://www.liquidx.net/pybugz/")
1570 (license license:gpl2)))
1571
1572 (define-public python-enum34
1573 (package
1574 (name "python-enum34")
1575 (version "1.1.6")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "enum34" version))
1580 (sha256
1581 (base32
1582 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1583 (build-system python-build-system)
1584 (home-page "https://pypi.python.org/pypi/enum34")
1585 (synopsis "Backported Python 3.4 Enum")
1586 (description
1587 "Enum34 is the new Python stdlib enum module available in Python 3.4
1588 backported for previous versions of Python from 2.4 to 3.3.")
1589 (license license:bsd-3)))
1590
1591 (define-public python2-enum34
1592 (package-with-python2 python-enum34))
1593
1594 (define-public python-parse-type
1595 (package
1596 (name "python-parse-type")
1597 (version "0.3.4")
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (string-append "https://pypi.python.org/packages/source/p/"
1602 "parse_type/parse_type-" version ".tar.gz"))
1603 (sha256
1604 (base32
1605 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1606 (build-system python-build-system)
1607 (arguments
1608 `(#:phases
1609 (modify-phases %standard-phases
1610 (add-after 'unpack 'patch-tests
1611 (lambda _
1612 (substitute* "tests/test_parse_type_parse.py"
1613 ;; Newer Python versions don't have the problem this test tests.
1614 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1615 ""))
1616 #t)))))
1617 (propagated-inputs
1618 `(("python-six" ,python-six)
1619 ("python-parse" ,python-parse)))
1620 (native-inputs
1621 `(("python-pytest" ,python-pytest)
1622 ("python-pytest-runner" ,python-pytest-runner)))
1623 (home-page "https://github.com/jenisys/parse_type")
1624 (synopsis "Extended parse module")
1625 (description
1626 "Parse_type extends the python parse module.")
1627 (properties
1628 `((python2-variant . ,(delay python2-parse-type))))
1629 (license license:bsd-3)))
1630
1631 (define-public python2-parse-type
1632 (let ((base (package-with-python2
1633 (strip-python2-variant python-parse-type))))
1634 (package (inherit base)
1635 (propagated-inputs
1636 `(("python2-enum34" ,python2-enum34)
1637 ,@(package-propagated-inputs base))))))
1638
1639 (define-public python-parse
1640 (package
1641 (name "python-parse")
1642 (version "1.6.6")
1643 (source
1644 (origin
1645 (method url-fetch)
1646 (uri (pypi-uri "parse" version))
1647 (sha256
1648 (base32
1649 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1650 (patches (search-patches "python-parse-too-many-fields.patch"))))
1651 (build-system python-build-system)
1652 (arguments
1653 `(#:phases
1654 (modify-phases %standard-phases
1655 (replace 'check
1656 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1657 (home-page "https://github.com/r1chardj0n3s/parse")
1658 (synopsis "Parse strings")
1659 (description
1660 "Parse strings using a specification based on the Python format()
1661 syntax.")
1662 (license license:x11)))
1663
1664 (define-public python-polib
1665 (package
1666 (name "python-polib")
1667 (version "1.0.8")
1668 (source (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "polib" version))
1671 (sha256
1672 (base32
1673 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1674 (build-system python-build-system)
1675 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1676 (synopsis "Manipulate, create and modify gettext files")
1677 (description "Polib can manipulate any gettext format (po, pot and mo)
1678 files. It can be used to create po files from scratch or to modify
1679 existing ones.")
1680 (license license:expat)))
1681
1682 (define-public python2-polib
1683 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1684 (package
1685 (inherit base)
1686 (arguments `(,@(package-arguments base)
1687 ;; Tests don't work with python2.
1688 #:tests? #f)))))
1689
1690 (define-public scons
1691 (package
1692 (name "scons")
1693 (version "2.5.1")
1694 (source (origin
1695 (method url-fetch)
1696 (uri (string-append "mirror://sourceforge/scons/scons/" version
1697 "/scons-" version ".tar.gz"))
1698 (sha256
1699 (base32
1700 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1701 (build-system python-build-system)
1702 (arguments
1703 ;; With Python 3.x, fails to build with a syntax error.
1704 `(#:python ,python-2
1705 #:use-setuptools? #f ; still relies on distutils
1706 #:tests? #f)) ; no 'python setup.py test' command
1707 (home-page "http://scons.org/")
1708 (synopsis "Software construction tool written in Python")
1709 (description
1710 "SCons is a software construction tool. Think of SCons as an improved,
1711 cross-platform substitute for the classic Make utility with integrated
1712 functionality similar to autoconf/automake and compiler caches such as ccache.
1713 In short, SCons is an easier, more reliable and faster way to build
1714 software.")
1715 (license license:x11)))
1716
1717 (define-public python-extras
1718 (package
1719 (name "python-extras")
1720 (version "0.0.3")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (string-append
1725 "https://pypi.python.org/packages/source/e/extras/extras-"
1726 version ".tar.gz"))
1727 (sha256
1728 (base32
1729 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1730 (build-system python-build-system)
1731 (arguments
1732 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1733 '(#:tests? #f))
1734 (home-page "https://github.com/testing-cabal/extras")
1735 (synopsis "Useful extensions to the Python standard library")
1736 (description
1737 "Extras is a set of extensions to the Python standard library.")
1738 (license license:expat)))
1739
1740 (define-public python2-extras
1741 (package-with-python2 python-extras))
1742
1743 (define-public python-mimeparse
1744 (package
1745 (name "python-mimeparse")
1746 (version "0.1.4")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (string-append
1751 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1752 version ".tar.gz"))
1753 (sha256
1754 (base32
1755 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1756 (build-system python-build-system)
1757 (arguments
1758 '(#:tests? #f)) ; no setup.py test command
1759 (home-page
1760 "https://github.com/dbtsai/python-mimeparse")
1761 (synopsis "Python library for parsing MIME types")
1762 (description
1763 "Mimeparse provides basic functions for parsing MIME type names and
1764 matching them against a list of media-ranges.")
1765 (license license:expat)))
1766
1767 (define-public python2-mimeparse
1768 (package-with-python2 python-mimeparse))
1769
1770 (define-public python-nose
1771 (package
1772 (name "python-nose")
1773 (version "1.3.7")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "nose" version))
1778 (sha256
1779 (base32
1780 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1781 (build-system python-build-system)
1782 (arguments
1783 '(#:tests? #f)) ; FIXME: test suite fails
1784 (home-page "http://readthedocs.org/docs/nose/")
1785 (synopsis "Python testing library")
1786 (description
1787 "Nose extends the unittest library to make testing easier.")
1788 (license license:lgpl2.0+)))
1789
1790 (define-public python2-nose
1791 (package-with-python2 python-nose))
1792
1793 (define-public python-nose2
1794 (package
1795 (name "python-nose2")
1796 (version "0.6.5")
1797 (source
1798 (origin
1799 (method url-fetch)
1800 (uri (pypi-uri "nose2" version))
1801 (sha256
1802 (base32
1803 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1804 (build-system python-build-system)
1805 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1806 (propagated-inputs
1807 `(("python-cov-core" ,python-cov-core)
1808 ("python-pytest-cov" ,python-pytest-cov)
1809 ("python-six" ,python-six)))
1810 (home-page "https://github.com/nose-devs/nose2")
1811 (synopsis "Next generation of nicer testing for Python")
1812 (description
1813 "Nose2 is the next generation of nicer testing for Python, based on the
1814 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1815 better plugin api, being easier for users to configure, and simplifying internal
1816 interfaces and processes.")
1817 (license license:bsd-2)))
1818
1819 (define-public python2-nose2
1820 (package-with-python2 python-nose2))
1821
1822 (define-public python-unittest2
1823 (package
1824 (name "python-unittest2")
1825 (version "0.5.1")
1826 (source
1827 (origin
1828 (method url-fetch)
1829 (uri (string-append
1830 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1831 version ".tar.gz"))
1832 (sha256
1833 (base32
1834 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1835 (build-system python-build-system)
1836 (home-page "http://pypi.python.org/pypi/unittest2")
1837 (synopsis "Python unit testing library")
1838 (description
1839 "Unittest2 is a replacement for the unittest module in the Python
1840 standard library.")
1841 (license license:psfl)))
1842
1843 (define-public python2-unittest2
1844 (package (inherit python-unittest2)
1845 (name "python2-unittest2")
1846 (version "0.5.1")
1847 (source
1848 (origin
1849 (method url-fetch)
1850 (uri (string-append
1851 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1852 version ".tar.gz"))
1853 (sha256
1854 (base32
1855 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1856 (arguments
1857 `(#:python ,python-2
1858 #:tests? #f)))) ; no setup.py test command
1859
1860 (define-public python-pafy
1861 (package
1862 (name "python-pafy")
1863 (version "0.5.3.1")
1864 (source
1865 (origin
1866 (method url-fetch)
1867 (uri (pypi-uri "pafy" version))
1868 (sha256
1869 (base32
1870 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1871 (build-system python-build-system)
1872 (arguments
1873 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1874 (propagated-inputs
1875 ;; Youtube-dl is a python package which is imported in the file
1876 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1877 `(("youtube-dl" ,youtube-dl)))
1878 (home-page "https://np1.github.io/pafy/")
1879 (synopsis "Retrieve YouTube content and metadata")
1880 (description
1881 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1882 (license license:lgpl3+)))
1883
1884 (define-public python-py
1885 (package
1886 (name "python-py")
1887 (version "1.4.32")
1888 (source
1889 (origin
1890 (method url-fetch)
1891 (uri (pypi-uri "py" version))
1892 (sha256
1893 (base32
1894 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1895 (build-system python-build-system)
1896 (arguments
1897 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1898 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1899 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1900 ;; Is this module globally installed?"
1901 '(#:tests? #f))
1902 (home-page "http://pylib.readthedocs.org/")
1903 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1904 (description
1905 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1906 code introspection, and logging.")
1907 (license license:expat)))
1908
1909 (define-public python2-py
1910 (package-with-python2 python-py))
1911
1912 (define-public python-pytest
1913 (package
1914 (name "python-pytest")
1915 (version "2.7.3")
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (string-append
1920 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1921 version ".tar.gz"))
1922 (sha256
1923 (base32
1924 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1925 (modules '((guix build utils)))
1926 (snippet
1927 ;; One of the tests involves the /usr directory, so it fails.
1928 '(substitute* "testing/test_argcomplete.py"
1929 (("def test_remove_dir_prefix\\(self\\):")
1930 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1931 (build-system python-build-system)
1932 (propagated-inputs
1933 `(("python-py" ,python-py)))
1934 (native-inputs
1935 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
1936 ("bash" ,bash)
1937 ("python-nose" ,python-nose)
1938 ("python-mock" ,python-mock)))
1939 (home-page "http://pytest.org")
1940 (synopsis "Python testing library")
1941 (description
1942 "Pytest is a testing tool that provides auto-discovery of test modules
1943 and functions, detailed info on failing assert statements, modular fixtures,
1944 and many external plugins.")
1945 (license license:expat)))
1946
1947 (define-public python2-pytest
1948 (package-with-python2 python-pytest))
1949
1950 ;; Some packages require a newer pytest.
1951 (define-public python-pytest-3.0
1952 (package
1953 (inherit python-pytest)
1954 (name "python-pytest")
1955 (version "3.0.7")
1956 (source (origin
1957 (method url-fetch)
1958 (uri (pypi-uri "pytest" version))
1959 (sha256
1960 (base32
1961 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1962 (arguments
1963 `(#:phases
1964 (modify-phases %standard-phases
1965 (add-before 'check 'disable-invalid-test
1966 (lambda _
1967 (substitute* "testing/test_argcomplete.py"
1968 (("def test_remove_dir_prefix" line)
1969 (string-append "@pytest.mark.skip"
1970 "(reason=\"Assumes that /usr exists.\")\n "
1971 line)))
1972 #t)))))
1973 (native-inputs
1974 `(("python-hypothesis" ,python-hypothesis)
1975 ,@(package-native-inputs python-pytest)))
1976 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1977
1978 (define-public python2-pytest-3.0
1979 (let ((base (package-with-python2
1980 (strip-python2-variant python-pytest-3.0))))
1981 (package (inherit base)
1982 (native-inputs
1983 `(("python2-enum34" ,python2-enum34)
1984 ,@(package-native-inputs base))))))
1985
1986 (define-public python-pytest-cov
1987 (package
1988 (name "python-pytest-cov")
1989 (version "2.4.0")
1990 (source
1991 (origin
1992 (method url-fetch)
1993 (uri (pypi-uri "pytest-cov" version))
1994 (sha256
1995 (base32
1996 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1997 (build-system python-build-system)
1998 (arguments
1999 `(#:phases
2000 (modify-phases %standard-phases
2001 (replace 'check
2002 (lambda _
2003 ;; options taken from tox.ini
2004 ;; TODO: make "--restructuredtext" tests pass. They currently fail
2005 ;; with "Duplicate implicit target name"
2006 (zero? (system* "python" "./setup.py" "check"
2007 "--strict" "--metadata")))))))
2008 (propagated-inputs
2009 `(("python-coverage" ,python-coverage)
2010 ("python-pytest" ,python-pytest)))
2011 (home-page "https://github.com/pytest-dev/pytest-cov")
2012 (synopsis "Pytest plugin for measuring coverage")
2013 (description
2014 "Pytest-cov produces coverage reports. It supports centralised testing and
2015 distributed testing in both @code{load} and @code{each} modes. It also
2016 supports coverage of subprocesses.")
2017 (license license:expat)))
2018
2019 (define-public python2-pytest-cov
2020 (package-with-python2 python-pytest-cov))
2021
2022 (define-public python-pytest-runner
2023 (package
2024 (name "python-pytest-runner")
2025 (version "2.11.1")
2026 (source
2027 (origin
2028 (method url-fetch)
2029 (uri (pypi-uri "pytest-runner" version))
2030 (sha256
2031 (base32
2032 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2033 (build-system python-build-system)
2034 (arguments
2035 `(#:phases
2036 (modify-phases %standard-phases
2037 ;; The fancy way of setting the version with setuptools_scm does not
2038 ;; seem to work here.
2039 (add-after 'unpack 'set-version
2040 (lambda _
2041 (substitute* "docs/conf.py"
2042 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2043 (string-append "version = \"" ,version "\"")))
2044 #t)))))
2045 (native-inputs
2046 `(("python-pytest" ,python-pytest)
2047 ("python-setuptools-scm" ,python-setuptools-scm)))
2048 (home-page "https://github.com/pytest-dev/pytest-runner")
2049 (synopsis "Invoke py.test as a distutils command")
2050 (description
2051 "This package provides a @command{pytest-runner} command that
2052 @file{setup.py} files can use to run tests.")
2053 (license license:expat)))
2054
2055 (define-public python2-pytest-runner
2056 (package-with-python2 python-pytest-runner))
2057
2058 (define-public python-pytest-mock
2059 (package
2060 (name "python-pytest-mock")
2061 (version "1.2")
2062 (source
2063 (origin
2064 (method url-fetch)
2065 (uri (pypi-uri "pytest-mock" version ".zip"))
2066 (sha256
2067 (base32
2068 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2069 (build-system python-build-system)
2070 (native-inputs
2071 `(("unzip" ,unzip)))
2072 (propagated-inputs
2073 `(("python-pytest" ,python-pytest)))
2074 (home-page "https://github.com/pytest-dev/pytest-mock/")
2075 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2076 (description
2077 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2078 around the patching API provided by the @code{mock} package, but with the
2079 benefit of not having to worry about undoing patches at the end of a test.
2080 The mocker fixture has the same API as @code{mock.patch}, supporting the
2081 same arguments.")
2082 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2083 (license license:expat)))
2084
2085 (define-public python2-pytest-mock
2086 (let ((base (package-with-python2
2087 (strip-python2-variant python-pytest-mock))))
2088 (package (inherit base)
2089 (propagated-inputs
2090 `(("python2-mock" ,python2-mock)
2091 ,@(package-propagated-inputs base))))))
2092
2093 (define-public python-pytest-xdist
2094 (package
2095 (name "python-pytest-xdist")
2096 (version "1.14")
2097 (source
2098 (origin
2099 (method url-fetch)
2100 (uri (pypi-uri "pytest-xdist" version ".zip"))
2101 (sha256
2102 (base32
2103 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2104 (modules '((guix build utils)))
2105 (snippet
2106 '(begin
2107 ;; Remove pre-compiled .pyc files from source.
2108 (for-each delete-file-recursively
2109 (find-files "." "__pycache__" #:directories? #t))
2110 (for-each delete-file (find-files "." "\\.pyc$"))
2111 #t))))
2112 (build-system python-build-system)
2113 (arguments
2114 '(#:tests? #f)) ;FIXME: Some tests are failing.
2115 ;; #:phases
2116 ;; (modify-phases %standard-phases
2117 ;; (delete 'check)
2118 ;; (add-after 'install 'check
2119 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2120 ;; (add-installed-pythonpath inputs outputs)
2121 ;; (zero? (system* "py.test" "-v")))))
2122 (native-inputs
2123 `(("unzip" ,unzip)
2124 ("python-setuptools-scm" ,python-setuptools-scm)))
2125 (propagated-inputs
2126 `(("python-execnet" ,python-execnet)
2127 ("python-pytest" ,python-pytest)
2128 ("python-py" ,python-py)))
2129 (home-page
2130 "https://github.com/pytest-dev/pytest-xdist")
2131 (synopsis
2132 "Plugin for py.test with distributed testing and loop-on-failing modes")
2133 (description
2134 "The pytest-xdist plugin extends py.test with some unique test execution
2135 modes: parallelization, running tests in boxed subprocesses, the ability
2136 to run tests repeatedly when failed, and the ability to run tests on multiple
2137 Python interpreters or platforms. It uses rsync to copy the existing
2138 program code to a remote location, executes there, and then syncs the
2139 result back.")
2140 (license license:expat)))
2141
2142 (define-public python2-pytest-xdist
2143 (package-with-python2 python-pytest-xdist))
2144
2145 (define-public python-scripttest
2146 (package
2147 (name "python-scripttest")
2148 (version "1.3")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (string-append
2153 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2154 version ".tar.gz"))
2155 (sha256
2156 (base32
2157 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2158 (build-system python-build-system)
2159 (native-inputs
2160 `(("python-pytest" ,python-pytest)))
2161 (home-page "http://pythonpaste.org/scripttest/")
2162 (synopsis "Python library to test command-line scripts")
2163 (description "Scripttest is a Python helper library for testing
2164 interactive command-line applications. With it you can run a script in a
2165 subprocess and see the output as well as any file modifications.")
2166 (license license:expat)))
2167
2168 (define-public python2-scripttest
2169 (package-with-python2 python-scripttest))
2170
2171 (define-public python-testtools
2172 (package
2173 (name "python-testtools")
2174 (version "1.4.0")
2175 (source
2176 (origin
2177 (method url-fetch)
2178 (uri (pypi-uri "testtools" version))
2179 (sha256
2180 (base32
2181 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2182 (build-system python-build-system)
2183 (arguments
2184 `(#:phases
2185 (modify-phases %standard-phases
2186 (add-after 'unpack 'fix-module-imports
2187 (lambda _
2188 (substitute* "setup.py"
2189 (("'unittest2>=0.8.0',") ""))
2190 (substitute* '("testtools/testcase.py"
2191 "testtools/testsuite.py"
2192 "testtools/run.py"
2193 "testtools/tests/test_run.py"
2194 "testtools/tests/test_testsuite.py"
2195 "testtools/tests/test_deferredruntest.py")
2196 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2197 (("import unittest2 as unittest") "import unittest")
2198 (("import unittest2") "import unittest as unittest2")
2199 (("from unittest2 import") "from unittest import"))
2200 (substitute* "testtools/tests/test_testresult.py"
2201 ;; NUL in source code is not allowed (raises ValueError).
2202 (("\\x00\\x04") "\\x04"))
2203 #t)))))
2204 (propagated-inputs
2205 `(("python-mimeparse" ,python-mimeparse)
2206 ("python-extras" ,python-extras)))
2207 (home-page "https://github.com/testing-cabal/testtools")
2208 (synopsis
2209 "Extensions to the Python standard library unit testing framework")
2210 (description
2211 "Testtools extends the Python standard library unit testing framework to
2212 provide matchers, more debugging information, and cross-Python
2213 compatibility.")
2214 (license license:psfl)))
2215
2216 (define-public python2-testtools
2217 (package-with-python2 python-testtools))
2218
2219 (define-public python-testscenarios
2220 (package
2221 (name "python-testscenarios")
2222 (version "0.4")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (string-append
2227 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2228 version ".tar.gz"))
2229 (sha256
2230 (base32
2231 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2232 (build-system python-build-system)
2233 (propagated-inputs
2234 `(("python-testtools" ,python-testtools)))
2235 (home-page "https://launchpad.net/testscenarios")
2236 (synopsis "Pyunit extension for dependency injection")
2237 (description
2238 "Testscenarios provides clean dependency injection for Python unittest
2239 style tests.")
2240 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2241
2242 (define-public python2-testscenarios
2243 (package-with-python2 python-testscenarios))
2244
2245 (define-public python-testresources
2246 (package
2247 (name "python-testresources")
2248 (version "0.2.7")
2249 (source
2250 (origin
2251 (method url-fetch)
2252 (uri (string-append
2253 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2254 version ".tar.gz"))
2255 (sha256
2256 (base32
2257 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2258 (build-system python-build-system)
2259 (home-page "https://launchpad.net/testresources")
2260 (synopsis
2261 "Pyunit extension for managing test resources")
2262 (description
2263 "Testresources is an extension to Python's unittest to allow declarative
2264 use of resources by test cases.")
2265 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2266
2267 (define-public python2-testresources
2268 (package-with-python2 python-testresources))
2269
2270 (define-public python-subunit
2271 (package
2272 (name "python-subunit")
2273 (version "0.0.21")
2274 (source
2275 (origin
2276 (method url-fetch)
2277 (uri (string-append
2278 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2279 version ".tar.gz"))
2280 (sha256
2281 (base32
2282 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2283 (build-system python-build-system)
2284 (propagated-inputs
2285 `(("python-extras" ,python-extras)
2286 ("python-mimeparse" ,python-mimeparse)))
2287 (native-inputs
2288 `(("python-testscenarios" ,python-testscenarios)))
2289 (home-page "http://launchpad.net/subunit")
2290 (synopsis "Python implementation of the subunit protocol")
2291 (description
2292 "Python-subunit is a Python implementation of the subunit test streaming
2293 protocol.")
2294 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2295
2296 (define-public python2-subunit
2297 (package-with-python2 python-subunit))
2298
2299 ;; Recent versions of python-fixtures and python-testrepository need
2300 ;; python-pbr for packaging, which itself needs these two packages for
2301 ;; testing.
2302 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2303 ;; same source, just without any test dependencies and with tests disabled.
2304 ;; python-pbr-minmal is then used to package python-fixtures and
2305 ;; python-testrepository.
2306 ;; Strictly speaking we currently could remove the test-requirements from the
2307 ;; normal python-pbr package (and save this package) since test are disabled
2308 ;; there anyway. But this may change in future.
2309 (define python-pbr-minimal
2310 (package
2311 (name "python-pbr-minimal")
2312 (version "3.0.1")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "pbr" version))
2317 (sha256
2318 (base32
2319 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2320 (build-system python-build-system)
2321 (arguments
2322 `(#:tests? #f))
2323 (home-page "http://docs.openstack.org/developer/pbr/")
2324 (synopsis "Minimal build of python-pbr used for bootstrapping")
2325 (description
2326 "Used only for bootstrapping python2-pbr, you should not need this.")
2327 (license license:asl2.0)))
2328
2329 (define python2-pbr-minimal
2330 (package-with-python2 python-pbr-minimal))
2331
2332 (define-public python-pbr
2333 (package
2334 (inherit python-pbr-minimal)
2335 (name "python-pbr")
2336 (arguments
2337 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2338 (propagated-inputs
2339 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2340 (native-inputs
2341 `(("python-fixtures" ,python-fixtures)
2342 ;; discover, coverage, hacking, subunit
2343 ("python-mock" ,python-mock)
2344 ("python-six" ,python-six)
2345 ("python-sphinx" ,python-sphinx)
2346 ("python-testrepository" ,python-testrepository)
2347 ("python-testresources" ,python-testresources)
2348 ("python-testscenarios" ,python-testscenarios)
2349 ("python-testtools" ,python-testtools)
2350 ("python-virtualenv" ,python-virtualenv)))
2351 (synopsis "Enhance the default behavior of Python’s setuptools")
2352 (description
2353 "Python Build Reasonableness (PBR) is a library that injects some useful
2354 and sensible default behaviors into your setuptools run. It will set
2355 versions, process requirements files and generate AUTHORS and ChangeLog file
2356 from git information.
2357 ")))
2358
2359 (define-public python2-pbr
2360 (package-with-python2 python-pbr))
2361
2362 (define-public python-fixtures
2363 (package
2364 (name "python-fixtures")
2365 (version "1.4.0")
2366 (source
2367 (origin
2368 (method url-fetch)
2369 (uri (pypi-uri "fixtures" version))
2370 (sha256
2371 (base32
2372 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2373 (build-system python-build-system)
2374 (arguments
2375 '(#:phases
2376 (modify-phases %standard-phases
2377 (replace 'check
2378 (lambda _
2379 (zero? (system* "python" "-m" "testtools.run"
2380 "fixtures.test_suite")))))))
2381 (propagated-inputs
2382 `(("python-six" ,python-six)))
2383 (native-inputs
2384 `(("python-mock" ,python-mock)
2385 ("python-pbr-minimal" ,python-pbr-minimal)
2386 ("python-testtools" ,python-testtools)))
2387 (home-page "https://launchpad.net/python-fixtures")
2388 (synopsis "Python test fixture library")
2389 (description
2390 "Fixtures provides a way to create reusable state, useful when writing
2391 Python tests.")
2392 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2393
2394 (define-public python2-fixtures
2395 (package-with-python2 python-fixtures))
2396
2397 (define-public python-testrepository
2398 (package
2399 (name "python-testrepository")
2400 (version "0.0.20")
2401 (source
2402 (origin
2403 (method url-fetch)
2404 (uri (string-append
2405 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2406 version ".tar.gz"))
2407 (sha256
2408 (base32
2409 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2410 (build-system python-build-system)
2411 (arguments
2412 ;; FIXME: Many tests are failing.
2413 '(#:tests? #f))
2414 (propagated-inputs
2415 `(("python-fixtures" ,python-fixtures)
2416 ("python-subunit" ,python-subunit)
2417 ("python-testtools" ,python-testtools)))
2418 (native-inputs
2419 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2420 ("python-mimeparse" ,python-mimeparse)))
2421 (home-page "https://launchpad.net/testrepository")
2422 (synopsis "Database for Python test results")
2423 (description "Testrepository provides a database of test results which can
2424 be used as part of a developer's workflow to check things such as what tests
2425 have failed since the last commit or what tests are currently failing.")
2426 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2427
2428 (define-public python2-testrepository
2429 (package-with-python2 python-testrepository))
2430
2431 (define-public python-coverage
2432 (package
2433 (name "python-coverage")
2434 (version "4.1")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "coverage" version))
2439 (sha256
2440 (base32
2441 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2442 (build-system python-build-system)
2443 (arguments
2444 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2445 '(#:tests? #f))
2446 (home-page "http://nedbatchelder.com/code/coverage")
2447 (synopsis "Code coverage measurement for Python")
2448 (description
2449 "Coverage measures code coverage, typically during test execution. It
2450 uses the code analysis tools and tracing hooks provided in the Python standard
2451 library to determine which lines are executable, and which have been
2452 executed.")
2453 (license license:bsd-3)))
2454
2455 (define-public python2-coverage
2456 (package-with-python2 python-coverage))
2457
2458 (define-public python-cov-core
2459 (package
2460 (name "python-cov-core")
2461 (version "1.15.0")
2462 (source
2463 (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "cov-core" version))
2466 (sha256
2467 (base32
2468 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2469 (build-system python-build-system)
2470 (propagated-inputs
2471 `(("python-coverage" ,python-coverage)))
2472 (home-page "https://github.com/schlamar/cov-core")
2473 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2474 (description
2475 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2476 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2477 testing frameworks.")
2478 (license license:expat)))
2479
2480 (define-public python2-cov-core
2481 (package-with-python2 python-cov-core))
2482
2483 (define-public python-discover
2484 (package
2485 (name "python-discover")
2486 (version "0.4.0")
2487 (source
2488 (origin
2489 (method url-fetch)
2490 (uri (string-append
2491 "https://pypi.python.org/packages/source/d/discover/discover-"
2492 version ".tar.gz"))
2493 (sha256
2494 (base32
2495 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2496 (build-system python-build-system)
2497 (home-page "http://pypi.python.org/pypi/discover/")
2498 (synopsis
2499 "Python test discovery for unittest")
2500 (description
2501 "Discover provides test discovery for unittest, a feature that has been
2502 backported from Python 2.7 for Python 2.4+.")
2503 (license license:bsd-3)))
2504
2505 (define-public python2-discover
2506 (package-with-python2 python-discover))
2507
2508 (define-public behave
2509 (package
2510 (name "behave")
2511 (version "1.2.5")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (pypi-uri "behave" version ".tar.bz2"))
2515 (sha256
2516 (base32
2517 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2518 (build-system python-build-system)
2519 (propagated-inputs
2520 `(("python-six" ,python-six)
2521 ("python-parse" ,python-parse)
2522 ("python-parse-type" ,python-parse-type)))
2523 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2524 ;PyHamcrest>=1.8
2525 (home-page "https://github.com/behave/behave")
2526 (synopsis "Python behavior-driven development")
2527 (description
2528 "Behave is a tool for behavior-driven development in python.
2529 Behavior-driven development (or BDD) is an agile software development
2530 technique that encourages collaboration between developers, QA and
2531 non-technical or business participants in a software project. Behave uses
2532 tests written in a natural language style, backed up by Python code.")
2533 (license license:x11)))
2534
2535 (define-public python-exif-read
2536 (package
2537 (name "python-exif-read")
2538 (version "2.1.2")
2539 (source (origin
2540 (method url-fetch)
2541 (uri (pypi-uri "ExifRead" version))
2542 (sha256
2543 (base32
2544 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2545 (build-system python-build-system)
2546 (arguments `(#:tests? #f)) ; no tests
2547 (home-page "https://github.com/ianare/exif-py")
2548 (synopsis "Python library to extract EXIF data from image files")
2549 (description
2550 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2551 files.")
2552 (license license:bsd-3)))
2553
2554 (define-public python2-exif-read
2555 (package-with-python2 python-exif-read))
2556
2557 (define-public python-pyld
2558 (package
2559 (name "python-pyld")
2560 (version "0.7.1")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (pypi-uri "PyLD" version))
2564 (sha256
2565 (base32
2566 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2567 (build-system python-build-system)
2568 (arguments `(#:tests? #f)) ; no tests
2569 (home-page "https://github.com/digitalbazaar/pyld")
2570 (synopsis "Python implementation of the JSON-LD specification")
2571 (description
2572 "PyLD is an implementation of the JSON-LD specification.")
2573 (license license:bsd-3)))
2574
2575 (define-public python2-pyld
2576 (package-with-python2 python-pyld))
2577
2578 (define-public python-certifi
2579 (package
2580 (name "python-certifi")
2581 (version "2017.1.23")
2582 (source (origin
2583 (method url-fetch)
2584 (uri (pypi-uri "certifi" version))
2585 (sha256
2586 (base32
2587 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2588 (build-system python-build-system)
2589 (home-page "https://certifi.io/")
2590 (synopsis "Python CA certificate bundle")
2591 (description
2592 "Certifi is a Python library that contains a CA certificate bundle, which
2593 is used by the Requests library to verify HTTPS requests.")
2594 (license license:asl2.0)))
2595
2596 (define-public python2-certifi
2597 (package-with-python2 python-certifi))
2598
2599 (define-public python-click
2600 (package
2601 (name "python-click")
2602 (version "6.7")
2603 (source
2604 (origin
2605 (method url-fetch)
2606 (uri (pypi-uri "click" version))
2607 (sha256
2608 (base32
2609 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2610 (build-system python-build-system)
2611 (arguments
2612 `(#:phases
2613 (modify-phases %standard-phases
2614 (add-after 'unpack 'fix-paths
2615 (lambda* (#:key inputs #:allow-other-keys)
2616 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2617 "cross-libc" "libc"))))
2618 (substitute* "click/_unicodefun.py"
2619 (("'locale'")
2620 (string-append "'" glibc "/bin/locale'"))))
2621 #t))
2622 (replace 'check
2623 (lambda _
2624 (zero? (system* "make" "test")))))))
2625 (native-inputs
2626 `(("python-pytest" ,python-pytest)))
2627 (home-page "http://click.pocoo.org")
2628 (synopsis "Command line library for Python")
2629 (description
2630 "Click is a Python package for creating command line interfaces in a
2631 composable way with as little code as necessary. Its name stands for
2632 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2633 with sensible defaults out of the box.")
2634 (license license:bsd-3)))
2635
2636 (define-public python2-click
2637 (package-with-python2 python-click))
2638
2639 (define-public python-wheel
2640 (package
2641 (name "python-wheel")
2642 (version "0.30.0a0")
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "wheel" version))
2647 (sha256
2648 (base32
2649 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2650 (build-system python-build-system)
2651 (native-inputs
2652 `(("python-jsonschema" ,python-jsonschema)
2653 ("python-pytest-cov" ,python-pytest-cov)))
2654 (home-page "https://bitbucket.org/pypa/wheel/")
2655 (synopsis "Format for built Python packages")
2656 (description
2657 "A wheel is a ZIP-format archive with a specially formatted filename and
2658 the @code{.whl} extension. It is designed to contain all the files for a PEP
2659 376 compatible install in a way that is very close to the on-disk format. Many
2660 packages will be properly installed with only the @code{Unpack} step and the
2661 unpacked archive preserves enough information to @code{Spread} (copy data and
2662 scripts to their final locations) at any later time. Wheel files can be
2663 installed with a newer @code{pip} or with wheel's own command line utility.")
2664 (license license:expat)
2665 (properties `((python2-variant . ,(delay python2-wheel))))))
2666
2667 (define-public python2-wheel
2668 (let ((wheel (package-with-python2
2669 (strip-python2-variant python-wheel))))
2670 (package (inherit wheel)
2671 (native-inputs `(("python2-functools32" ,python2-functools32)
2672 ,@(package-native-inputs wheel))))))
2673
2674
2675 (define-public python-requests
2676 (package
2677 (name "python-requests")
2678 (version "2.13.0")
2679 (source (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "requests" version))
2682 (sha256
2683 (base32
2684 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2685 ;; TODO: unbundle urllib3 and chardet.
2686 (build-system python-build-system)
2687 (arguments
2688 ;; FIXME: Some tests require network access.
2689 '(#:tests? #f))
2690 (home-page "http://python-requests.org/")
2691 (synopsis "Python HTTP library")
2692 (description
2693 "Requests is a Python HTTP client library. It aims to be easier to use
2694 than Python’s urllib2 library.")
2695 (license license:asl2.0)))
2696
2697 ;; Some software requires an older version of Requests, notably Docker
2698 ;; Compose.
2699 (define-public python-requests-2.7
2700 (package (inherit python-requests)
2701 (version "2.7.0")
2702 (source (origin
2703 (method url-fetch)
2704 (uri (pypi-uri "requests" version))
2705 (sha256
2706 (base32
2707 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2708
2709 (define-public python2-requests
2710 (package-with-python2 python-requests))
2711
2712 (define-public python-vcversioner
2713 (package
2714 (name "python-vcversioner")
2715 (version "2.16.0.0")
2716 (source
2717 (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "vcversioner" version))
2720 (sha256
2721 (base32
2722 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2723 (build-system python-build-system)
2724 (synopsis "Python library for version number discovery")
2725 (description "Vcversioner is a Python library that inspects tagging
2726 information in a variety of version control systems in order to discover
2727 version numbers.")
2728 (home-page "https://github.com/habnabit/vcversioner")
2729 (license license:isc)))
2730
2731 (define-public python2-vcversioner
2732 (package-with-python2 python-vcversioner))
2733
2734 (define-public python-jsonschema
2735 (package
2736 (name "python-jsonschema")
2737 (version "2.5.1")
2738 (source (origin
2739 (method url-fetch)
2740 (uri
2741 (string-append
2742 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2743 version ".tar.gz"))
2744 (sha256
2745 (base32
2746 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2747 (build-system python-build-system)
2748 (arguments
2749 '(#:phases
2750 (modify-phases %standard-phases
2751 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2752 (native-inputs
2753 `(("python-nose" ,python-nose)
2754 ("python-vcversioner" ,python-vcversioner)))
2755 (home-page "https://github.com/Julian/jsonschema")
2756 (synopsis "Implementation of JSON Schema for Python")
2757 (description
2758 "Jsonschema is an implementation of JSON Schema for Python.")
2759 (license license:expat)
2760 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2761
2762 (define-public python2-jsonschema
2763 (let ((jsonschema (package-with-python2
2764 (strip-python2-variant python-jsonschema))))
2765 (package (inherit jsonschema)
2766 (native-inputs
2767 `(("python2-mock" ,python2-mock)
2768 ,@(package-native-inputs jsonschema)))
2769 (propagated-inputs
2770 `(("python2-functools32" ,python2-functools32))))))
2771
2772 (define-public python-schema
2773 (package
2774 (name "python-schema")
2775 (version "0.6.6")
2776 (source
2777 (origin
2778 (method url-fetch)
2779 (uri (pypi-uri "schema" version))
2780 (sha256
2781 (base32
2782 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2783 (build-system python-build-system)
2784 (native-inputs
2785 `(("python-pytest" ,python-pytest)))
2786 (home-page "https://github.com/keleshev/schema")
2787 (synopsis "Simple data validation library")
2788 (description
2789 "@code{python-schema} is a library for validating Python data
2790 structures, such as those obtained from config-files, forms, external
2791 services or command-line parsing, converted from JSON/YAML (or
2792 something else) to Python data-types.")
2793 (license license:psfl)))
2794
2795 (define-public python2-schema
2796 (package-with-python2 python-schema))
2797
2798 (define-public python-schema-0.5
2799 (package (inherit python-schema)
2800 (version "0.5.0")
2801 (source
2802 (origin
2803 (method url-fetch)
2804 (uri (pypi-uri "schema" version))
2805 (sha256
2806 (base32
2807 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2808
2809 (define-public python2-schema-0.5
2810 (package-with-python2 python-schema-0.5))
2811
2812 (define-public python-kitchen
2813 (package
2814 (name "python-kitchen")
2815 (version "1.2.4")
2816 (source
2817 (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "kitchen" version))
2820 (sha256
2821 (base32
2822 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2823 (build-system python-build-system)
2824 (propagated-inputs
2825 `(("python-chardet" ,python-chardet)))
2826 (home-page "https://github.com/fedora-infra/kitchen")
2827 (synopsis "Python API for snippets")
2828 (description "@code{kitchen} module provides a python API for all sorts of
2829 little useful snippets of code that everybody ends up writing for their projects
2830 but never seem big enough to build an independent release. Use kitchen and stop
2831 cutting and pasting that code over and over.")
2832 (license (list license:lgpl2.1+
2833 ;; subprocess.py, test_subprocess.py,
2834 ;; kitchen/pycompat25/defaultdict.py:
2835 license:psfl))))
2836
2837 (define-public python2-kitchen
2838 (package-with-python2 python-kitchen))
2839
2840 (define-public python-unidecode
2841 (package
2842 (name "python-unidecode")
2843 (version "0.04.21")
2844 (source (origin
2845 (method url-fetch)
2846 (uri (pypi-uri "Unidecode" version))
2847 (sha256
2848 (base32
2849 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2850 (build-system python-build-system)
2851 (home-page "https://pypi.python.org/pypi/Unidecode")
2852 (synopsis "ASCII transliterations of Unicode text")
2853 (description
2854 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2855 useful when integrating with legacy code that doesn't support Unicode, or for
2856 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2857 machine identifiers from human-readable Unicode strings that should still be
2858 somewhat intelligible.")
2859 (license license:gpl2+)))
2860
2861 (define-public python2-unidecode
2862 (package-with-python2 python-unidecode))
2863
2864 (define-public python-pyjwt
2865 (package
2866 (name "python-pyjwt")
2867 (version "1.5.3")
2868 (source
2869 (origin
2870 (method url-fetch)
2871 (uri (pypi-uri "PyJWT" version))
2872 (sha256
2873 (base32
2874 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2875 (modules '((guix build utils)))
2876 (snippet
2877 '(begin
2878 (for-each delete-file-recursively
2879 (find-files "." "\\.pyc$"))
2880 #t))))
2881 (build-system python-build-system)
2882 (native-inputs
2883 `(("python-pytest" ,python-pytest-3.0)
2884 ("python-pytest-cov" ,python-pytest-cov)
2885 ("python-pytest-runner" ,python-pytest-runner)))
2886 (home-page "https://github.com/progrium/pyjwt")
2887 (synopsis "JSON Web Token implementation in Python")
2888 (description
2889 "PyJWT is a JSON Web Token implementation written in Python.")
2890 (license license:expat)))
2891
2892 (define-public python2-pyjwt
2893 (package-with-python2 python-pyjwt))
2894
2895 (define-public python-pykka
2896 (package
2897 (name "python-pykka")
2898 (version "1.2.1")
2899 (source
2900 (origin
2901 (method url-fetch)
2902 (uri (pypi-uri "Pykka" version))
2903 (sha256
2904 (base32
2905 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2906 (build-system python-build-system)
2907 (native-inputs
2908 `(("python-mock" ,python-mock)
2909 ("python-nose" ,python-nose)
2910 ("python-gevent" ,python-gevent)
2911 ("python-eventlet" ,python-eventlet)))
2912 (home-page "https://www.pykka.org/")
2913 (synopsis "Pykka is a Python implementation of the actor model")
2914 (description
2915 "Pykka is a Python implementation of the actor model.
2916 The actor model introduces some simple rules to control the sharing
2917 of state and cooperation between execution units, which makes it
2918 easier to build concurrent applications.")
2919 (license license:asl2.0)))
2920
2921 (define-public python2-pykka
2922 (package-with-python2 python-pykka))
2923
2924 (define-public python-oauthlib
2925 (package
2926 (name "python-oauthlib")
2927 (version "1.0.3")
2928 (source (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "oauthlib" version))
2931 (sha256
2932 (base32
2933 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2934 (build-system python-build-system)
2935 (native-inputs
2936 `(("python-nose" ,python-nose)
2937 ("python-mock" ,python-mock)
2938 ("python-cryptography" ,python-cryptography)
2939 ("python-pyjwt" ,python-pyjwt)
2940 ("python-blinker" ,python-blinker)))
2941 (home-page "https://github.com/idan/oauthlib")
2942 (synopsis "OAuth implementation for Python")
2943 (description
2944 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2945 OAuth request-signing logic.")
2946 (license license:bsd-3)
2947 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2948
2949 (define-public python2-oauthlib
2950 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2951 (package
2952 (inherit base)
2953 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2954 ,@(package-native-inputs base))))))
2955
2956 (define-public python-itsdangerous
2957 (package
2958 (name "python-itsdangerous")
2959 (version "0.24")
2960 (source
2961 (origin
2962 (method url-fetch)
2963 (uri (string-append
2964 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2965 version ".tar.gz"))
2966 (sha256
2967 (base32
2968 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2969 (build-system python-build-system)
2970 (home-page "https://github.com/mitsuhiko/itsdangerous")
2971 (synopsis "Python library for passing data to/from untrusted environments")
2972 (description
2973 "Itsdangerous provides various helpers to pass trusted data to untrusted
2974 environments and back.")
2975 (license license:bsd-3)))
2976
2977 (define-public python2-itsdangerous
2978 (package-with-python2 python-itsdangerous))
2979
2980 (define-public python-pyyaml
2981 (package
2982 (name "python-pyyaml")
2983 (version "3.12")
2984 (source
2985 (origin
2986 (method url-fetch)
2987 (uri (pypi-uri "PyYAML" version))
2988 (sha256
2989 (base32
2990 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2991 (build-system python-build-system)
2992 (inputs
2993 `(("libyaml" ,libyaml)))
2994 (home-page "http://pyyaml.org/wiki/PyYAML")
2995 (synopsis "YAML parser and emitter for Python")
2996 (description
2997 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2998 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2999 API, and sensible error messages. PyYAML supports standard YAML tags and
3000 provides Python-specific tags that allow to represent an arbitrary Python
3001 object.")
3002 (license license:expat)))
3003
3004 (define-public python2-pyyaml
3005 (package-with-python2 python-pyyaml))
3006
3007 (define-public python-virtualenv
3008 (package
3009 (name "python-virtualenv")
3010 (version "15.0.3")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "virtualenv" version))
3015 (sha256
3016 (base32
3017 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
3018 (build-system python-build-system)
3019 (arguments
3020 `(#:phases
3021 (modify-phases %standard-phases
3022 (replace 'check
3023 (lambda _
3024 ;; Disable failing test. See upstream bug report
3025 ;; https://github.com/pypa/virtualenv/issues/957
3026 (substitute* "tests/test_virtualenv.py"
3027 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
3028 (zero? (system* "py.test")))))))
3029 (native-inputs
3030 `(("python-mock" ,python-mock)
3031 ("python-pytest" ,python-pytest)))
3032 (home-page "https://virtualenv.pypa.io/")
3033 (synopsis "Virtual Python environment builder")
3034 (description
3035 "Virtualenv is a tool to create isolated Python environments.")
3036 (license license:expat)))
3037
3038 (define-public python2-virtualenv
3039 (package-with-python2 python-virtualenv))
3040
3041 (define-public python-markupsafe
3042 (package
3043 (name "python-markupsafe")
3044 (version "0.23")
3045 (source
3046 (origin
3047 (method url-fetch)
3048 (uri (string-append
3049 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3050 version ".tar.gz"))
3051 (sha256
3052 (base32
3053 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3054 (build-system python-build-system)
3055 (home-page "https://github.com/mitsuhiko/markupsafe")
3056 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3057 (description
3058 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3059 for Python.")
3060 (license license:bsd-3)))
3061
3062 (define-public python2-markupsafe
3063 (package-with-python2 python-markupsafe))
3064
3065 (define-public python-jinja2
3066 (package
3067 (name "python-jinja2")
3068 (version "2.9.6")
3069 (source
3070 (origin
3071 (method url-fetch)
3072 (uri (pypi-uri "Jinja2" version))
3073 (sha256
3074 (base32
3075 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
3076 (build-system python-build-system)
3077 (arguments
3078 `(#:phases
3079 (modify-phases %standard-phases
3080 ;; These files cannot be built with Python < 3.6. See
3081 ;; https://github.com/pallets/jinja/issues/655
3082 ;; FIXME: Remove this when the "python" package is upgraded.
3083 (add-after 'unpack 'delete-incompatible-files
3084 (lambda _
3085 (for-each delete-file
3086 '("jinja2/asyncsupport.py"
3087 "jinja2/asyncfilters.py"))
3088 #t)))))
3089 (propagated-inputs
3090 `(("python-markupsafe" ,python-markupsafe)))
3091 (home-page "http://jinja.pocoo.org/")
3092 (synopsis "Python template engine")
3093 (description
3094 "Jinja2 is a small but fast and easy to use stand-alone template engine
3095 written in pure Python.")
3096 (license license:bsd-3)))
3097
3098 (define-public python2-jinja2
3099 (package-with-python2 python-jinja2))
3100
3101 (define-public python-pystache
3102 (package
3103 (name "python-pystache")
3104 (version "0.5.4")
3105 (source (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "pystache" version))
3108 (sha256
3109 (base32
3110 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3111 (build-system python-build-system)
3112 (arguments
3113 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3114 (home-page "http://defunkt.io/pystache/")
3115 (synopsis "Python logic-less template engine")
3116 (description
3117 "Pystache is a Python implementation of the framework agnostic,
3118 logic-free templating system Mustache.")
3119 (license license:expat)
3120 (properties `((python2-variant . ,(delay python2-pystache))))))
3121
3122 (define-public python2-pystache
3123 (package (inherit (package-with-python2
3124 (strip-python2-variant python-pystache)))
3125 (arguments
3126 `(#:python ,python-2
3127 #:phases
3128 (modify-phases %standard-phases
3129 (replace 'check
3130 (lambda _
3131 (zero? (system* "python" "test_pystache.py")))))))))
3132
3133 (define-public python-joblib
3134 (package
3135 (name "python-joblib")
3136 (version "0.10.3")
3137 (source (origin
3138 (method url-fetch)
3139 (uri (pypi-uri "joblib" version))
3140 (sha256
3141 (base32
3142 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3143 (modules '((guix build utils)))
3144 (snippet
3145 '(begin
3146 ;; Remove pre-compiled .pyc files from source.
3147 (for-each delete-file-recursively
3148 (find-files "." "__pycache__" #:directories? #t))
3149 (for-each delete-file (find-files "." "\\.pyc$"))
3150 #t))))
3151 (build-system python-build-system)
3152 (arguments
3153 `(#:phases
3154 (modify-phases %standard-phases
3155 (add-before 'check 'disable-failing-tests
3156 (lambda _
3157 ;; This numpydoc tests fails for unknown reasons
3158 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3159 ;; This numpydoc test depends on matplotlib, which is not a
3160 ;; required input.
3161 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3162 ;; These tests fail to execute sys.executable
3163 (substitute* "joblib/test/test_parallel.py"
3164 (("import nose" line)
3165 (string-append "from nose.plugins.skip import SkipTest\n" line))
3166 (("def test_nested_parallel_warnings" line)
3167 (string-append "@SkipTest\n" line))
3168 (("def test_parallel_with_interactively_defined_functions" line)
3169 (string-append "@SkipTest\n" line)))
3170 #t)))))
3171 ;; Provide nose to enable tests command
3172 (native-inputs
3173 `(("python-nose" ,python-nose)
3174 ("python-sphinx" ,python-sphinx)
3175 ("python-docutils" ,python-docutils)
3176 ("python-numpydoc" ,python-numpydoc)))
3177 (home-page "http://pythonhosted.org/joblib/")
3178 (synopsis "Using Python functions as pipeline jobs")
3179 (description
3180 "Joblib is a set of tools to provide lightweight pipelining in Python.
3181 In particular, joblib offers: transparent disk-caching of the output values
3182 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3183 logging and tracing of the execution.")
3184 (license license:bsd-3)))
3185
3186 (define-public python2-joblib
3187 (package-with-python2 python-joblib))
3188
3189 (define-public python-docutils
3190 (package
3191 (name "python-docutils")
3192 (version "0.13.1")
3193 (source
3194 (origin
3195 (method url-fetch)
3196 (uri (pypi-uri "docutils" version))
3197 (sha256
3198 (base32
3199 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3200 (build-system python-build-system)
3201 (arguments
3202 '(#:tests? #f)) ; no setup.py test command
3203 (home-page "http://docutils.sourceforge.net/")
3204 (synopsis "Python Documentation Utilities")
3205 (description
3206 "Docutils is a modular system for processing documentation into useful
3207 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3208 reStructuredText.")
3209 ;; Most of the source code is public domain, but some source files are
3210 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3211 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3212
3213 (define-public python2-docutils
3214 (package-with-python2 python-docutils))
3215
3216 (define-public python-pygments
3217 (package
3218 (name "python-pygments")
3219 (version "2.2.0")
3220 (source
3221 (origin
3222 (method url-fetch)
3223 (uri (pypi-uri "Pygments" version))
3224 (sha256
3225 (base32
3226 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
3227 (build-system python-build-system)
3228 (arguments
3229 ;; FIXME: Tests require sphinx, which depends on this.
3230 '(#:tests? #f))
3231 (home-page "http://pygments.org/")
3232 (synopsis "Syntax highlighting")
3233 (description
3234 "Pygments is a syntax highlighting package written in Python.")
3235 (license license:bsd-2)))
3236
3237 (define-public python2-pygments
3238 (package-with-python2 python-pygments))
3239
3240 (define-public python-sphinxcontrib-websupport
3241 (package
3242 (name "python-sphinxcontrib-websupport")
3243 (version "1.0.1")
3244 (source (origin
3245 (method url-fetch)
3246 (uri (pypi-uri "sphinxcontrib-websupport" version))
3247 (sha256
3248 (base32
3249 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3250 (build-system python-build-system)
3251 (propagated-inputs
3252 `(("python-mock" ,python-mock)
3253 ("python-pytest" ,python-pytest)
3254 ("python-xapian-bindings" ,python-xapian-bindings)))
3255 ;; Needed for running the test suite
3256 (native-inputs
3257 `(("python-six" ,python-six)
3258 ("python-jinja2" ,python-jinja2)
3259 ("python-docutils" ,python-docutils)
3260 ("python-sphinx" ,python-sphinx)
3261 ("python-sqlalchemy" ,python-sqlalchemy)
3262 ("python-whoosh" ,python-whoosh)))
3263 (home-page "http://sphinx-doc.org/")
3264 (synopsis "Sphinx API for web applications")
3265 (description "This package provides a Python API to easily integrate
3266 Sphinx documentation into your web application. It provides tools to
3267 integrate Sphinx documents in web templates and to handle searches.")
3268 (license license:bsd-3)))
3269
3270 (define-public python-sphinx
3271 (package
3272 (name "python-sphinx")
3273 (version "1.5.1")
3274 (source
3275 (origin
3276 (method url-fetch)
3277 (uri (pypi-uri "Sphinx" version))
3278 (sha256
3279 (base32
3280 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3281 (build-system python-build-system)
3282 (arguments
3283 `(#:phases
3284 (modify-phases %standard-phases
3285 (replace 'check
3286 (lambda _
3287 ;; Requires Internet access.
3288 (delete-file "tests/test_build_linkcheck.py")
3289 (zero? (system* "make" "test")))))))
3290 (propagated-inputs
3291 `(("python-imagesize" ,python-imagesize)
3292 ("python-sphinx-alabaster-theme"
3293 ,python-sphinx-alabaster-theme)
3294 ("python-babel" ,python-babel)
3295 ("python-snowballstemmer" ,python-snowballstemmer)
3296 ("python-docutils" ,python-docutils)
3297 ("python-jinja2" ,python-jinja2)
3298 ("python-pygments" ,python-pygments)
3299 ("python-requests" ,python-requests)
3300 ("python-six" ,python-six)))
3301 (native-inputs
3302 `(("graphviz" ,graphviz)
3303 ("python-html5lib" ,python-html5lib)
3304 ("python-mock" ,python-mock)
3305 ("python-nose" ,python-nose)))
3306 (home-page "http://sphinx-doc.org/")
3307 (synopsis "Python documentation generator")
3308 (description "Sphinx is a tool that makes it easy to create documentation
3309 for Python projects or other documents consisting of multiple reStructuredText
3310 sources.")
3311 (license license:bsd-3)
3312 (properties `((python2-variant . ,(delay python2-sphinx))))))
3313
3314 (define-public python-sphinx-1.6
3315 (package (inherit python-sphinx)
3316 (name "python-sphinx")
3317 (version "1.6.3")
3318 (source (origin
3319 (method url-fetch)
3320 (uri (pypi-uri "Sphinx" version))
3321 (sha256
3322 (base32
3323 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3324 (arguments
3325 `(#:phases
3326 (modify-phases %standard-phases
3327 (replace 'check
3328 (lambda _
3329 ;; Requires Internet access.
3330 (delete-file "tests/test_build_linkcheck.py")
3331 (substitute* "tests/test_build_latex.py"
3332 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3333 "@pytest.mark.skip()"))
3334 (zero? (system* "make" "test")))))))
3335 (propagated-inputs
3336 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3337 ,@(package-propagated-inputs python-sphinx)))
3338 (native-inputs
3339 `(("python-pytest" ,python-pytest-3.0)
3340 ("imagemagick" ,imagemagick) ; for "convert"
3341 ,@(package-native-inputs python-sphinx)))
3342 (properties '())))
3343
3344 (define-public python-sphinx-1.5.3
3345 (package
3346 (inherit python-sphinx)
3347 (name "python-sphinx")
3348 (version "1.5.3")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (pypi-uri "Sphinx" version))
3353 (sha256
3354 (base32
3355 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3356 (native-inputs
3357 `(("python-pytest" ,python-pytest-3.0)
3358 ,@(package-native-inputs python-sphinx)))))
3359
3360 (define-public python2-sphinx
3361 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3362 (package
3363 (inherit base)
3364 (native-inputs `(("python2-mock" ,python2-mock)
3365 ("python2-enum34" ,python2-enum34)
3366 ,@(package-native-inputs base)))
3367 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3368 ,@(package-propagated-inputs base))))))
3369
3370 (define-public python-sphinx-rtd-theme
3371 (package
3372 (name "python-sphinx-rtd-theme")
3373 (version "0.2.4")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (pypi-uri "sphinx_rtd_theme" version))
3378 (sha256
3379 (base32
3380 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3381 (build-system python-build-system)
3382 (arguments '(#:tests? #f)) ; No tests.
3383 (propagated-inputs
3384 `(("python-sphinx" ,python-sphinx)))
3385 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3386 (synopsis "ReadTheDocs.org theme for Sphinx")
3387 (description "A theme for Sphinx used by ReadTheDocs.org.")
3388 (license license:expat)))
3389
3390 (define-public python2-sphinx-rtd-theme
3391 (package-with-python2 python-sphinx-rtd-theme))
3392
3393 (define-public python-guzzle-sphinx-theme
3394 (package
3395 (name "python-guzzle-sphinx-theme")
3396 (version "0.7.11")
3397 (source
3398 (origin
3399 (method url-fetch)
3400 (uri (pypi-uri "guzzle_sphinx_theme" version))
3401 (sha256
3402 (base32
3403 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
3404 (build-system python-build-system)
3405 (propagated-inputs
3406 `(("python-sphinx" ,python-sphinx)))
3407 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
3408 (synopsis "Sphinx theme used by Guzzle")
3409 (description "This package provides guzzle_sphinx_theme, a theme for the
3410 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
3411 and several other projects.")
3412 (license license:expat)))
3413
3414 (define-public python2-guzzle-sphinx-theme
3415 (package-with-python2 python-guzzle-sphinx-theme))
3416
3417 (define-public python-rst.linker
3418 (package
3419 (name "python-rst.linker")
3420 (version "1.7")
3421 (source
3422 (origin
3423 (method url-fetch)
3424 (uri (pypi-uri "rst.linker" version))
3425 (sha256
3426 (base32
3427 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3428 (build-system python-build-system)
3429 (propagated-inputs
3430 `(("python-dateutil" ,python-dateutil)
3431 ("python-six" ,python-six)))
3432 (native-inputs
3433 `(("python-setuptools-scm" ,python-setuptools-scm)))
3434 ;; Test would require path.py, which would introduce a cyclic dependence.
3435 (arguments `(#:tests? #f))
3436 ;; Note: As of version 1.7 the documentation is not worth building.
3437 (home-page "https://github.com/jaraco/rst.linker")
3438 (synopsis "Sphinx plugin to add links and timestamps")
3439 (description "rst.linker allows to automatically replace text by a
3440 reStructuredText external reference or timestamps. It's primary purpose is to
3441 augment the changelog, but it can be used for other documents, too.")
3442 (license license:expat)))
3443
3444 (define-public python2-rst.linker
3445 (package-with-python2 python-rst.linker))
3446
3447 (define-public python-feedgenerator
3448 (package
3449 (name "python-feedgenerator")
3450 (version "1.9")
3451 (source
3452 (origin
3453 (method url-fetch)
3454 (uri (pypi-uri "feedgenerator" version))
3455 (sha256
3456 (base32
3457 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3458 (modules '((guix build utils)))
3459 (snippet
3460 '(begin
3461 ;; Remove pre-compiled .pyc files from source.
3462 (for-each delete-file-recursively
3463 (find-files "." "__pycache__" #:directories? #t))
3464 (for-each delete-file (find-files "." "\\.pyc$"))
3465 #t))))
3466 (build-system python-build-system)
3467 (propagated-inputs
3468 `(("python-pytz" ,python-pytz)
3469 ("python-six" ,python-six)))
3470 (home-page "https://github.com/getpelican/feedgenerator")
3471 (synopsis
3472 "Standalone version of Django's Atom/RSS feed generator")
3473 (description
3474 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3475 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3476 (license license:bsd-3)))
3477
3478 (define-public python2-feedgenerator
3479 (package-with-python2 python-feedgenerator))
3480
3481 (define-public python-blinker
3482 (package
3483 (name "python-blinker")
3484 (version "1.4")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "blinker" version))
3489 (sha256
3490 (base32
3491 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3492 (build-system python-build-system)
3493 (home-page "http://pythonhosted.org/blinker/")
3494 (synopsis "Fast, simple object-to-object and broadcast signaling")
3495 (description
3496 "Blinker provides a fast dispatching system that allows any number of
3497 interested parties to subscribe to events, or \"signals\".")
3498 (license license:expat)))
3499
3500 (define-public python2-blinker
3501 (package-with-python2 python-blinker))
3502
3503 (define-public pelican
3504 (package
3505 (name "pelican")
3506 (version "3.6.3")
3507 (source
3508 (origin
3509 (method url-fetch)
3510 (uri (pypi-uri "pelican" version))
3511 (sha256
3512 (base32
3513 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3514 (build-system python-build-system)
3515 (propagated-inputs
3516 `(("python-feedgenerator" ,python-feedgenerator)
3517 ("python-jinja2" ,python-jinja2)
3518 ("python-pygments" ,python-pygments)
3519 ("python-docutils" ,python-docutils)
3520 ("python-pytz" ,python-pytz)
3521 ("python-blinker" ,python-blinker)
3522 ("python-unidecode" ,python-unidecode)
3523 ("python-six" ,python-six)
3524 ("python-dateutil" ,python-dateutil)))
3525 (home-page "http://getpelican.com/")
3526 (arguments
3527 `(;; XXX Requires a lot more packages to do unit tests :P
3528 #:tests? #f
3529 #:phases (modify-phases %standard-phases
3530 (add-before
3531 'install 'adjust-requires
3532 ;; Since feedgenerator is installed from git, it doesn't
3533 ;; conform to the version requirements.
3534 ;;
3535 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3536 ;; version requirement so setuptools doesn't get confused.
3537 (lambda _
3538 (substitute* "setup.py"
3539 (("['\"]feedgenerator.*?['\"]")
3540 "'feedgenerator'")))))))
3541 (synopsis "Python-based static site publishing system")
3542 (description
3543 "Pelican is a tool to generate a static blog from reStructuredText,
3544 Markdown input files, and more. Pelican uses Jinja2 for templating
3545 and is very extensible.")
3546 (license license:agpl3+)))
3547
3548 (define-public python-scikit-learn
3549 (package
3550 (name "python-scikit-learn")
3551 (version "0.19.0")
3552 (source
3553 (origin
3554 (method url-fetch)
3555 (uri (string-append
3556 "https://github.com/scikit-learn/scikit-learn/archive/"
3557 version ".tar.gz"))
3558 (file-name (string-append name "-" version ".tar.gz"))
3559 (sha256
3560 (base32
3561 "0g7q4ri75mj93wpa9bp83a3jmrf3dm5va9h7k4zkbcxr6bgqka15"))))
3562 (build-system python-build-system)
3563 (arguments
3564 `(#:phases
3565 (modify-phases %standard-phases
3566 (delete 'check)
3567 (add-after 'install 'check
3568 ;; Running tests from the source directory requires
3569 ;; an "inplace" build with paths relative to CWD.
3570 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3571 ;; Use the installed version instead.
3572 (lambda* (#:key inputs outputs #:allow-other-keys)
3573 (add-installed-pythonpath inputs outputs)
3574 ;; some tests require access to "$HOME"
3575 (setenv "HOME" "/tmp")
3576 ;; Step out of the source directory just to be sure.
3577 (chdir "..")
3578 (zero? (system* "nosetests" "-v" "sklearn")))))))
3579 (inputs
3580 `(("openblas" ,openblas)))
3581 (native-inputs
3582 `(("python-nose" ,python-nose)
3583 ("python-cython" ,python-cython)))
3584 (propagated-inputs
3585 `(("python-numpy" ,python-numpy)
3586 ("python-scipy" ,python-scipy)))
3587 (home-page "http://scikit-learn.org/")
3588 (synopsis "Machine Learning in Python")
3589 (description
3590 "Scikit-learn provides simple and efficient tools for data
3591 mining and data analysis.")
3592 (license license:bsd-3)))
3593
3594 (define-public python2-scikit-learn
3595 (package-with-python2 python-scikit-learn))
3596
3597 (define-public python-scikit-image
3598 (package
3599 (name "python-scikit-image")
3600 (version "0.11.3")
3601 (source
3602 (origin
3603 (method url-fetch)
3604 (uri (string-append
3605 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3606 version ".tar.gz"))
3607 (sha256
3608 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3609 (build-system python-build-system)
3610 (arguments
3611 ;; TODO: Some tests require running X11 server. Disable them?
3612 '(#:tests? #f))
3613 ;; See DEPENDS.txt for the list of build and run time requiremnts
3614 (propagated-inputs
3615 `(("python-matplotlib" ,python-matplotlib)
3616 ("python-networkx" ,python-networkx)
3617 ("python-scipy" ,python-scipy)
3618 ("python-pillow" ,python-pillow)))
3619 (native-inputs
3620 `(("python-numpy" ,python-numpy)
3621 ("python-cython" ,python-cython)
3622 ("python-six" ,python-six)))
3623 (home-page "http://scikit-image.org/")
3624 (synopsis "Image processing in Python")
3625 (description
3626 "Scikit-image is a collection of algorithms for image processing.")
3627 (license license:bsd-3)))
3628
3629 (define-public python2-scikit-image
3630 (package-with-python2 python-scikit-image))
3631
3632 (define-public python-redis
3633 (package
3634 (name "python-redis")
3635 (version "2.10.5")
3636 (source
3637 (origin
3638 (method url-fetch)
3639 (uri (pypi-uri "redis" version))
3640 (sha256
3641 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3642 (build-system python-build-system)
3643 ;; Tests require a running Redis server
3644 (arguments '(#:tests? #f))
3645 ;; As long as we are not running test, we do not need this input :-)
3646 ;;(native-inputs
3647 ;; `(("python-pytest" ,python-pytest)))
3648 (home-page "https://github.com/andymccurdy/redis-py")
3649 (synopsis "Redis Python client")
3650 (description
3651 "This package provides a Python interface to the Redis key-value store.")
3652 (license license:expat)))
3653
3654 (define-public python2-redis
3655 (package-with-python2 python-redis))
3656
3657 (define-public python-rq
3658 (package
3659 (name "python-rq")
3660 (version "0.7.1")
3661 (source
3662 (origin
3663 (method url-fetch)
3664 (uri (pypi-uri "rq" version))
3665 (sha256
3666 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3667 (build-system python-build-system)
3668 (propagated-inputs
3669 `(("python-click" ,python-click)
3670 ("python-redis" ,python-redis)))
3671 (home-page "http://python-rq.org/")
3672 (synopsis "Simple job queues for Python")
3673 (description
3674 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3675 processing them in the background with workers. It is backed by Redis and it
3676 is designed to have a low barrier to entry.")
3677 (license license:bsd-2)))
3678
3679 (define-public python2-rq
3680 (package-with-python2 python-rq))
3681
3682 (define-public python-cython
3683 (package
3684 (name "python-cython")
3685 (version "0.27")
3686 (source
3687 (origin
3688 (method url-fetch)
3689 (uri (pypi-uri "Cython" version))
3690 (sha256
3691 (base32
3692 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
3693 (build-system python-build-system)
3694 ;; we need the full python package and not just the python-wrapper
3695 ;; because we need libpython3.3m.so
3696 (inputs
3697 `(("python" ,python)))
3698 (arguments
3699 `(#:phases
3700 (modify-phases %standard-phases
3701 (add-before 'check 'set-HOME
3702 ;; some tests require access to "$HOME/.cython"
3703 (lambda _ (setenv "HOME" "/tmp") #t))
3704 (replace 'check
3705 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3706 (home-page "http://cython.org/")
3707 (synopsis "C extensions for Python")
3708 (description "Cython is an optimising static compiler for both the Python
3709 programming language and the extended Cython programming language. It makes
3710 writing C extensions for Python as easy as Python itself.")
3711 (license license:asl2.0)
3712 (properties `((python2-variant . ,(delay python2-cython))))))
3713
3714 (define-public python2-cython
3715 (package (inherit (package-with-python2
3716 (strip-python2-variant python-cython)))
3717 (name "python2-cython")
3718 (inputs
3719 `(("python-2" ,python-2))))) ; this is not automatically changed
3720
3721 ;; The RPython toolchain currently does not support Python 3.
3722 (define-public python2-rpython
3723 (package
3724 (name "python2-rpython")
3725 (version "0.1.4")
3726 (source
3727 (origin
3728 (method url-fetch)
3729 (uri (pypi-uri "rpython" version))
3730 (sha256
3731 (base32
3732 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3733 (build-system python-build-system)
3734 (arguments `(#:python ,python-2))
3735 (native-inputs
3736 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3737 (home-page "https://rpython.readthedocs.org")
3738 (synopsis "Framework for implementing interpreters and virtual machines")
3739 (description "RPython is a translation and support framework for
3740 producing implementations of dynamic languages, emphasizing a clean separation
3741 between language specification and implementation aspects.")
3742 (license license:expat)))
3743
3744 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3745 ;; python-scipy still build, as these three packages are often used together.
3746 (define-public python-numpy
3747 (package
3748 (name "python-numpy")
3749 (version "1.12.0")
3750 (source
3751 (origin
3752 (method url-fetch)
3753 (uri (string-append
3754 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3755 (file-name (string-append name "-" version ".tar.gz"))
3756 (sha256
3757 (base32
3758 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3759 (build-system python-build-system)
3760 (inputs
3761 `(("openblas" ,openblas)
3762 ("lapack" ,lapack)))
3763 (native-inputs
3764 `(("python-cython" ,python-cython)
3765 ("python-nose" ,python-nose)
3766 ("gfortran" ,gfortran)))
3767 (arguments
3768 `(#:phases
3769 (modify-phases %standard-phases
3770 (add-before 'build 'set-environment-variables
3771 (lambda* (#:key inputs #:allow-other-keys)
3772 (call-with-output-file "site.cfg"
3773 (lambda (port)
3774 (format port
3775 "[openblas]
3776 libraries = openblas
3777 library_dirs = ~a/lib
3778 include_dirs = ~a/include
3779
3780 # backslash-n to make emacs happy
3781 \n[lapack]
3782 lapack_libs = lapack
3783 library_dirs = ~a/lib
3784 include_dirs = ~a/include
3785 "
3786 (assoc-ref inputs "openblas")
3787 (assoc-ref inputs "openblas")
3788 (assoc-ref inputs "lapack")
3789 (assoc-ref inputs "lapack"))))
3790 ;; Make /gnu/store/...-bash-.../bin/sh the default shell, instead of
3791 ;; /bin/sh.
3792 (substitute* "numpy/distutils/exec_command.py"
3793 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3794 (string-append match-start (assoc-ref inputs "bash") match-end)))
3795 ;; Use "gcc" executable, not "cc".
3796 (substitute* "numpy/distutils/system_info.py"
3797 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3798 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3799 #t))
3800 ;; Tests can only be run after the library has been installed and not
3801 ;; within the source directory.
3802 (delete 'check)
3803 (add-after 'install 'check
3804 (lambda* (#:key outputs inputs #:allow-other-keys)
3805 ;; Make installed package available for running the tests
3806 (add-installed-pythonpath inputs outputs)
3807 (with-directory-excursion "/tmp"
3808 (zero? (system* "python" "-c"
3809 "import numpy; numpy.test(verbose=2)"))))))))
3810 (home-page "http://www.numpy.org/")
3811 (synopsis "Fundamental package for scientific computing with Python")
3812 (description "NumPy is the fundamental package for scientific computing
3813 with Python. It contains among other things: a powerful N-dimensional array
3814 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3815 and Fortran code, useful linear algebra, Fourier transform, and random number
3816 capabilities.")
3817 (license license:bsd-3)))
3818
3819 (define-public python2-numpy
3820 (package-with-python2 python-numpy))
3821
3822 (define-public python-numpy-next
3823 (package (inherit python-numpy)
3824 (name "python-numpy-next")
3825 (version "1.13.1")
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "numpy" version ".zip"))
3830 (sha256
3831 (base32
3832 "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
3833 (native-inputs
3834 `(("unzip" ,unzip)
3835 ("python-cython" ,python-cython)
3836 ("python-nose" ,python-nose)
3837 ("gfortran" ,gfortran)))))
3838
3839 (define-public python2-numpy-next
3840 (package-with-python2 python-numpy-next))
3841
3842 (define-public python-munch
3843 (package
3844 (name "python-munch")
3845 (version "2.0.4")
3846 (source
3847 (origin
3848 (method url-fetch)
3849 (uri (pypi-uri "munch" version))
3850 (sha256
3851 (base32
3852 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3853 (build-system python-build-system)
3854 (home-page "https://github.com/Infinidat/munch")
3855 (synopsis "Dot-accessible dictionary")
3856 (description "Munch is a dot-accessible dictionary similar to JavaScript
3857 objects.")
3858 (license license:expat)))
3859
3860 (define-public python2-munch
3861 (package-with-python2 python-munch))
3862
3863 (define-public python-colormath
3864 (package
3865 (name "python-colormath")
3866 (version "2.1.1")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "colormath" version))
3871 (sha256
3872 (base32
3873 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
3874 (build-system python-build-system)
3875 (propagated-inputs
3876 `(("python-networkx" ,python-networkx)
3877 ("python-numpy" ,python-numpy)))
3878 (home-page "https://github.com/gtaylor/python-colormath")
3879 (synopsis "Color math and conversion library")
3880 (description
3881 "This is a Python library for color math and conversions.")
3882 (license license:bsd-3)))
3883
3884 (define-public python2-colormath
3885 (package-with-python2 python-colormath))
3886
3887 (define-public python-spectra
3888 (package
3889 (name "python-spectra")
3890 (version "0.0.8")
3891 (source
3892 (origin
3893 (method url-fetch)
3894 (uri (pypi-uri "spectra" version))
3895 (sha256
3896 (base32
3897 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
3898 (build-system python-build-system)
3899 (arguments
3900 `(#:phases
3901 (modify-phases %standard-phases
3902 (replace 'check
3903 (lambda _
3904 (zero? (system* "nosetests" "-v")))))))
3905 (propagated-inputs
3906 `(("python-colormath" ,python-colormath)))
3907 (native-inputs
3908 `(("python-nose" ,python-nose)))
3909 (home-page "http://github.com/jsvine/spectra")
3910 (synopsis "Color scales and color conversion")
3911 (description
3912 "This package provides a Python library intended to make color math,
3913 color scales, and color space conversion easy. It has support for:
3914
3915 @enumerate
3916 @item Color scales
3917 @item Color ranges
3918 @item Color blending
3919 @item Brightening/darkening colors
3920 @item Saturating/desaturating colors
3921 @item Conversion to/from multiple color spaces.
3922 @end enumerate\n")
3923 (license license:expat)))
3924
3925 (define-public python2-spectra
3926 (package-with-python2 python-spectra))
3927
3928 (define-public python2-fastlmm
3929 (package
3930 (name "python2-fastlmm")
3931 (version "0.2.21")
3932 (source
3933 (origin
3934 (method url-fetch)
3935 (uri (pypi-uri "fastlmm" version ".zip"))
3936 (sha256
3937 (base32
3938 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3939 (build-system python-build-system)
3940 (arguments
3941 `(#:python ,python-2)) ; only Python 2.7 is supported
3942 (propagated-inputs
3943 `(("python2-numpy" ,python2-numpy)
3944 ("python2-scipy" ,python2-scipy)
3945 ("python2-matplotlib" ,python2-matplotlib)
3946 ("python2-pandas" ,python2-pandas)
3947 ("python2-scikit-learn" ,python2-scikit-learn)
3948 ("python2-pysnptools" ,python2-pysnptools)))
3949 (native-inputs
3950 `(("unzip" ,unzip)
3951 ("python2-cython" ,python2-cython)
3952 ("python2-mock" ,python2-mock)
3953 ("python2-nose" ,python2-nose)))
3954 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3955 (synopsis "Perform genome-wide association studies on large data sets")
3956 (description
3957 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3958 Models, is a program for performing both single-SNP and SNP-set genome-wide
3959 association studies (GWAS) on extremely large data sets.")
3960 (license license:asl2.0)))
3961
3962 (define-public python-numpy-documentation
3963 (package
3964 (name "python-numpy-documentation")
3965 (version (package-version python-numpy))
3966 (source (package-source python-numpy))
3967 (build-system python-build-system)
3968 (native-inputs
3969 `(("python-matplotlib" ,python-matplotlib)
3970 ("python-numpy" ,python-numpy)
3971 ("pkg-config" ,pkg-config)
3972 ("python-sphinx" ,python-sphinx)
3973 ("python-numpydoc" ,python-numpydoc)
3974 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3975 texlive-fonts-ec
3976 texlive-generic-ifxetex
3977 texlive-generic-pdftex
3978 texlive-latex-amsfonts
3979 texlive-latex-capt-of
3980 texlive-latex-cmap
3981 texlive-latex-environ
3982 texlive-latex-eqparbox
3983 texlive-latex-etoolbox
3984 texlive-latex-expdlist
3985 texlive-latex-fancyhdr
3986 texlive-latex-fancyvrb
3987 texlive-latex-fncychap
3988 texlive-latex-float
3989 texlive-latex-framed
3990 texlive-latex-geometry
3991 texlive-latex-graphics
3992 texlive-latex-hyperref
3993 texlive-latex-mdwtools
3994 texlive-latex-multirow
3995 texlive-latex-oberdiek
3996 texlive-latex-parskip
3997 texlive-latex-preview
3998 texlive-latex-tabulary
3999 texlive-latex-threeparttable
4000 texlive-latex-titlesec
4001 texlive-latex-trimspaces
4002 texlive-latex-ucs
4003 texlive-latex-upquote
4004 texlive-latex-url
4005 texlive-latex-varwidth
4006 texlive-latex-wrapfig)))
4007 ("texinfo" ,texinfo)
4008 ("perl" ,perl)
4009 ("scipy-sphinx-theme"
4010 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4011 (method git-fetch)
4012 (uri (git-reference
4013 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4014 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4015 (sha256
4016 (base32
4017 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4018 ,@(package-native-inputs python-numpy)))
4019 (arguments
4020 `(#:tests? #f ; we're only generating the documentation
4021 #:phases
4022 (modify-phases %standard-phases
4023 (delete 'build)
4024 (replace 'install
4025 (lambda* (#:key inputs outputs #:allow-other-keys)
4026 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4027 (doc (string-append
4028 data "/doc/" ,name "-"
4029 ,(package-version python-numpy)))
4030 (info-reader (string-append data "/info"))
4031 (html (string-append doc "/html"))
4032 (scipy-sphinx-theme "scipy-sphinx-theme")
4033 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4034 (pyver ,(string-append "PYVER=")))
4035
4036 ;; FIXME: this is needed to for texlive-union to generate
4037 ;; fonts, which are not found.
4038 (setenv "HOME" "/tmp")
4039
4040 (with-directory-excursion "doc"
4041 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4042 (mkdir-p html)
4043 (system* "make" "html" pyver)
4044 (system* "make" "latex" "PAPER=a4" pyver)
4045 (system* "make" "-C" "build/latex"
4046 "all-pdf" "PAPER=a4" pyver)
4047 ;; FIXME: Generation of the info file fails.
4048 ;; (system* "make" "info" pyver)
4049 ;; (mkdir-p info)
4050 ;; (copy-file "build/texinfo/numpy.info"
4051 ;; (string-append info "/numpy.info"))
4052 (for-each (lambda (file)
4053 (copy-file (string-append "build/latex" file)
4054 (string-append doc file)))
4055 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4056 (with-directory-excursion "build/html"
4057 (for-each (lambda (file)
4058 (let* ((dir (dirname file))
4059 (tgt-dir (string-append html "/" dir)))
4060 (unless (equal? "." dir)
4061 (mkdir-p tgt-dir))
4062 (install-file file html)))
4063 (find-files "." ".*")))))
4064 #t)))))
4065 (home-page (package-home-page python-numpy))
4066 (synopsis "Documentation for the python-numpy package")
4067 (description (package-description python-numpy))
4068 (license (package-license python-numpy))))
4069
4070 (define-public python2-numpy-documentation
4071 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4072 (package
4073 (inherit numpy-documentation)
4074 (native-inputs `(("python2-functools32" ,python2-functools32)
4075 ,@(package-native-inputs numpy-documentation))))))
4076
4077 (define-public python-pygit2
4078 (package
4079 (name "python-pygit2")
4080 (version "0.26.0")
4081 (source
4082 (origin
4083 (method url-fetch)
4084 (uri (pypi-uri "pygit2" version))
4085 (sha256
4086 (base32
4087 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
4088 (patches
4089 (search-patches "python-pygit2-disable-network-tests.patch"))))
4090 (build-system python-build-system)
4091 (propagated-inputs
4092 `(("python-six" ,python-six)
4093 ("python-cffi" ,python-cffi)
4094 ("libgit2" ,libgit2)
4095 ("python-tox" ,python-tox)))
4096 (home-page "https://github.com/libgit2/pygit2")
4097 (synopsis "Python bindings for libgit2")
4098 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4099 library, libgit2 implements Git plumbing.")
4100 ;; GPL2.0 only, with linking exception.
4101 (license license:gpl2)))
4102
4103 (define-public python2-pygit2
4104 (package-with-python2 python-pygit2))
4105
4106 (define-public python-pyparsing
4107 (package
4108 (name "python-pyparsing")
4109 (version "2.2.0")
4110 (source
4111 (origin
4112 (method url-fetch)
4113 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
4114 "/pyparsing-" version
4115 "/pyparsing-" version ".tar.gz"))
4116 (sha256
4117 (base32
4118 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
4119 (build-system python-build-system)
4120 (outputs '("out" "doc"))
4121 (arguments
4122 `(#:tests? #f ; no test target
4123 #:phases
4124 (modify-phases %standard-phases
4125 (add-after 'install 'install-doc
4126 (lambda* (#:key outputs #:allow-other-keys)
4127 (let* ((doc (string-append (assoc-ref outputs "doc")
4128 "/share/doc/" ,name "-" ,version))
4129 (html-doc (string-append doc "/html"))
4130 (examples (string-append doc "/examples")))
4131 (mkdir-p html-doc)
4132 (mkdir-p examples)
4133 (for-each
4134 (lambda (dir tgt)
4135 (map (lambda (file)
4136 (install-file file tgt))
4137 (find-files dir ".*")))
4138 (list "docs" "htmldoc" "examples")
4139 (list doc html-doc examples))
4140 #t))))))
4141 (home-page "http://pyparsing.wikispaces.com")
4142 (synopsis "Python parsing class library")
4143 (description
4144 "The pyparsing module is an alternative approach to creating and
4145 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4146 of regular expressions. The pyparsing module provides a library of classes
4147 that client code uses to construct the grammar directly in Python code.")
4148 (license license:expat)))
4149
4150 (define-public python2-pyparsing
4151 (package-with-python2 python-pyparsing))
4152
4153 (define-public python-numpydoc
4154 (package
4155 (name "python-numpydoc")
4156 (version "0.5")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 (uri (string-append
4161 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4162 version ".tar.gz"))
4163 (sha256
4164 (base32
4165 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4166 (modules '((guix build utils)))
4167 (snippet
4168 '(begin
4169 ;; Drop a test requiring matplotlib, which we cannot add as an
4170 ;; input since it would create a circular dependency: Extend the
4171 ;; test for Python 3, where it is already dropped, to Python 2.
4172 (substitute* "numpydoc/tests/test_plot_directive.py"
4173 (("3") "2"))))))
4174 (build-system python-build-system)
4175 (propagated-inputs
4176 `(("python-sphinx" ,python-sphinx)))
4177 (native-inputs
4178 `(("python-nose" ,python-nose)))
4179 (home-page "https://pypi.python.org/pypi/numpydoc")
4180 (synopsis
4181 "Numpy's Sphinx extensions")
4182 (description
4183 "Sphinx extension to support docstrings in Numpy format.")
4184 (license license:bsd-2)))
4185
4186 (define-public python2-numpydoc
4187 (package-with-python2 python-numpydoc))
4188
4189 (define-public python-numexpr
4190 (package
4191 (name "python-numexpr")
4192 (version "2.6.4")
4193 (source
4194 (origin
4195 (method url-fetch)
4196 (uri (pypi-uri "numexpr" version))
4197 (sha256
4198 (base32
4199 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
4200 (build-system python-build-system)
4201 (arguments `(#:tests? #f)) ; no tests included
4202 (propagated-inputs
4203 `(("python-numpy" ,python-numpy)))
4204 (home-page "https://github.com/pydata/numexpr")
4205 (synopsis "Fast numerical expression evaluator for NumPy")
4206 (description
4207 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4208 expressions that operate on arrays are accelerated and use less memory than
4209 doing the same calculation in Python. In addition, its multi-threaded
4210 capabilities can make use of all your cores, which may accelerate
4211 computations, most specially if they are not memory-bounded (e.g. those using
4212 transcendental functions).")
4213 (license license:expat)))
4214
4215 (define-public python2-numexpr
4216 (package-with-python2 python-numexpr))
4217
4218 (define-public python-cycler
4219 (package
4220 (name "python-cycler")
4221 (version "0.10.0")
4222 (source (origin
4223 (method url-fetch)
4224 (uri (pypi-uri "cycler" version))
4225 (sha256
4226 (base32
4227 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4228 (build-system python-build-system)
4229 (arguments
4230 ;; XXX: The current version requires 'coveralls' which we don't have.
4231 ;; Enable this for the next release which uses 'python-pytest'.
4232 '(#:tests? #f))
4233 (propagated-inputs
4234 `(("python-six" ,python-six)))
4235 (home-page "http://matplotlib.org/cycler/")
4236 (synopsis "Composable keyword argument iterator")
4237 (description
4238 "When using @code{matplotlib} and plotting more than one line, it is
4239 common to want to be able to want to be able to cycle over one or more artist
4240 styles; but the plotting logic can quickly become involved.
4241 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4242 @code{Cycler} class was developed.")
4243 (license license:bsd-3)))
4244
4245 (define-public python2-cycler
4246 (package-with-python2 python-cycler))
4247
4248 (define-public python-colorspacious
4249 (package
4250 (name "python-colorspacious")
4251 (version "1.1.0")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4256 version ".tar.gz"))
4257 (file-name (string-append name "-" version))
4258 (sha256
4259 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4260 (build-system python-build-system)
4261 (propagated-inputs
4262 `(("python-numpy" ,python-numpy)))
4263 (native-inputs
4264 `(("python-nose" ,python-nose)))
4265 (arguments
4266 `(#:phases
4267 (modify-phases %standard-phases
4268 (replace 'check
4269 (lambda _
4270 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4271 (home-page "https://github.com/njsmith/colorspacious")
4272 (synopsis "Python library for colorspace conversions")
4273 (description "@code{colorspacious} is a Python library that lets you
4274 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4275 (license license:expat)))
4276
4277 (define-public python2-colorspacious
4278 (package-with-python2 python-colorspacious))
4279
4280 (define-public python-matplotlib
4281 (package
4282 (name "python-matplotlib")
4283 (version "2.0.2")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "matplotlib" version))
4288 (sha256
4289 (base32
4290 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
4291 (build-system python-build-system)
4292 (propagated-inputs ; the following packages are all needed at run time
4293 `(("python-cycler" ,python-cycler)
4294 ("python-pyparsing" ,python-pyparsing)
4295 ("python-pygobject" ,python-pygobject)
4296 ("gobject-introspection" ,gobject-introspection)
4297 ("python-tkinter" ,python "tk")
4298 ("python-dateutil" ,python-dateutil)
4299 ("python-numpy" ,python-numpy)
4300 ("python-pillow" ,python-pillow)
4301 ("python-pytz" ,python-pytz)
4302 ("python-six" ,python-six)
4303 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4304 ;; from 'gtk+') provides the required 'typelib' files used by
4305 ;; 'gobject-introspection'. The location of these files is set with the
4306 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4307 ;; is done automatically by a 'native-search-path' procedure. However,
4308 ;; at run-time the user must set this variable as follows:
4309 ;;
4310 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4311 ("gtk+" ,gtk+)
4312 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4313 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4314 ;; object. For this reason we need to import both libraries.
4315 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4316 ("python-pycairo" ,python-pycairo)
4317 ("python-cairocffi" ,python-cairocffi)))
4318 (inputs
4319 `(("libpng" ,libpng)
4320 ("imagemagick" ,imagemagick)
4321 ("freetype" ,freetype)
4322 ("cairo" ,cairo)
4323 ("glib" ,glib)
4324 ;; FIXME: Add backends when available.
4325 ;("python-wxpython" ,python-wxpython)
4326 ("python-pyqt" ,python-pyqt)
4327 ("tcl" ,tcl)
4328 ("tk" ,tk)))
4329 (native-inputs
4330 `(("pkg-config" ,pkg-config)
4331 ("python-nose" ,python-nose)
4332 ("python-mock" ,python-mock)))
4333 (arguments
4334 `(#:phases
4335 (modify-phases %standard-phases
4336 (add-before 'build 'configure-environment
4337 (lambda* (#:key outputs inputs #:allow-other-keys)
4338 (let ((cairo (assoc-ref inputs "cairo"))
4339 (gtk+ (assoc-ref inputs "gtk+")))
4340 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4341 ;; has not effect.
4342 (setenv "LD_LIBRARY_PATH"
4343 (string-append cairo "/lib:" gtk+ "/lib"))
4344 (setenv "HOME" (getcwd))
4345 (call-with-output-file "setup.cfg"
4346 (lambda (port)
4347 (format port "[directories]~%
4348 basedirlist = ~a,~a~%
4349 [rc_options]~%
4350 backend = TkAgg~%"
4351 (assoc-ref inputs "tcl")
4352 (assoc-ref inputs "tk")))))
4353 #t)))))
4354 (home-page "http://matplotlib.org")
4355 (synopsis "2D plotting library for Python")
4356 (description
4357 "Matplotlib is a Python 2D plotting library which produces publication
4358 quality figures in a variety of hardcopy formats and interactive environments
4359 across platforms. Matplotlib can be used in Python scripts, the python and
4360 ipython shell, web application servers, and six graphical user interface
4361 toolkits.")
4362 (license license:psfl)
4363 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4364
4365 (define-public python2-matplotlib
4366 (let ((matplotlib (package-with-python2
4367 (strip-python2-variant python-matplotlib))))
4368 (package (inherit matplotlib)
4369 ;; Make sure to use special packages for Python 2 instead
4370 ;; of those automatically rewritten by package-with-python2.
4371 (propagated-inputs
4372 `(("python2-pycairo" ,python2-pycairo)
4373 ("python2-functools32" ,python2-functools32)
4374 ("python2-pygobject-2" ,python2-pygobject-2)
4375 ("python2-subprocess32" ,python2-subprocess32)
4376 ("python2-tkinter" ,python-2 "tk")
4377 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4378 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4379
4380 (define-public python-matplotlib-documentation
4381 (package
4382 (name "python-matplotlib-documentation")
4383 (version (package-version python-matplotlib))
4384 (source (package-source python-matplotlib))
4385 (build-system python-build-system)
4386 (native-inputs
4387 `(("python-matplotlib" ,python-matplotlib)
4388 ("python-colorspacious" ,python-colorspacious)
4389 ("python-sphinx" ,python-sphinx)
4390 ("python-numpydoc" ,python-numpydoc)
4391 ("python-ipython" ,python-ipython)
4392 ("python-mock" ,python-mock)
4393 ("graphviz" ,graphviz)
4394 ("texlive" ,texlive)
4395 ("texinfo" ,texinfo)
4396 ,@(package-native-inputs python-matplotlib)))
4397 (arguments
4398 `(#:tests? #f ; we're only generating documentation
4399 #:phases
4400 (modify-phases %standard-phases
4401 (replace 'build
4402 (lambda _
4403 (chdir "doc")
4404 ;; Produce pdf in 'A4' format.
4405 (substitute* "conf.py"
4406 (("latex_paper_size = 'letter'") "")
4407 ;; latex_paper_size is deprecated -> set paper size using
4408 ;; latex_elements
4409 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4410 ;; insert at a point where latex_elements{} is defined:
4411 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4412 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4413 (replace 'install
4414 (lambda* (#:key inputs outputs #:allow-other-keys)
4415 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4416 (doc (string-append data "/doc/python-matplotlib-" ,version))
4417 (info (string-append data "/info"))
4418 (html (string-append doc "/html")))
4419 (mkdir-p html)
4420 (mkdir-p info)
4421 (copy-recursively "build/html" html)
4422 (symlink (string-append html "/_images")
4423 (string-append info "/matplotlib-figures"))
4424 (with-directory-excursion "build/texinfo"
4425 (substitute* "matplotlib.texi"
4426 (("@image\\{([^,]*)" all file)
4427 (string-append "@image{matplotlib-figures/" file)))
4428 (symlink (string-append html "/_images")
4429 "./matplotlib-figures")
4430 (system* "makeinfo" "--no-split"
4431 "-o" "matplotlib.info" "matplotlib.texi"))
4432 (copy-file "build/texinfo/matplotlib.info"
4433 (string-append info "/matplotlib.info"))
4434 (copy-file "build/latex/Matplotlib.pdf"
4435 (string-append doc "/Matplotlib.pdf")))
4436 #t)))))
4437 (home-page (package-home-page python-matplotlib))
4438 (synopsis "Documentation for the python-matplotlib package")
4439 (description (package-description python-matplotlib))
4440 (license (package-license python-matplotlib))))
4441
4442 (define-public python2-matplotlib-documentation
4443 (package-with-python2 python-matplotlib-documentation))
4444
4445 (define-public python2-pysnptools
4446 (package
4447 (name "python2-pysnptools")
4448 (version "0.3.9")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (pypi-uri "pysnptools" version ".zip"))
4453 (sha256
4454 (base32
4455 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4456 (build-system python-build-system)
4457 (arguments
4458 `(#:python ,python-2)) ; only Python 2.7 is supported
4459 (propagated-inputs
4460 `(("python2-numpy" ,python2-numpy)
4461 ("python2-scipy" ,python2-scipy)
4462 ("python2-pandas" ,python2-pandas)))
4463 (native-inputs
4464 `(("python2-cython" ,python2-cython)))
4465 (native-inputs
4466 `(("unzip" ,unzip)))
4467 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4468 (synopsis "Library for reading and manipulating genetic data")
4469 (description
4470 "PySnpTools is a library for reading and manipulating genetic data. It
4471 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4472 those files. It can also efficiently manipulate ranges of integers using set
4473 operators such as union, intersection, and difference.")
4474 (license license:asl2.0)))
4475
4476 (define-public python-rpy2
4477 (package
4478 (name "python-rpy2")
4479 (version "2.9.0")
4480 (source
4481 (origin
4482 (method url-fetch)
4483 (uri (pypi-uri "rpy2" version))
4484 (sha256
4485 (base32
4486 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
4487 (build-system python-build-system)
4488 (arguments
4489 '(#:modules ((ice-9 ftw)
4490 (srfi srfi-1)
4491 (srfi srfi-26)
4492 (guix build utils)
4493 (guix build python-build-system))
4494 #:phases
4495 (modify-phases %standard-phases
4496 ;; Without this phase the test loader cannot find the directories, in
4497 ;; which it is supposed to look for test files.
4498 (add-after 'unpack 'fix-tests
4499 (lambda* (#:key outputs #:allow-other-keys)
4500 (substitute* "rpy/tests.py"
4501 (("loader.discover\\(")
4502 "loader.discover(rpy_root + '/' +"))
4503 #t))
4504 (replace 'check
4505 (lambda* (#:key outputs inputs #:allow-other-keys)
4506 (let ((cwd (getcwd)))
4507 (setenv "PYTHONPATH"
4508 (string-append cwd "/build/"
4509 (find (cut string-prefix? "lib" <>)
4510 (scandir (string-append cwd "/build")))
4511 ":"
4512 (getenv "PYTHONPATH"))))
4513 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4514 (propagated-inputs
4515 `(("python-six" ,python-six)
4516 ("python-jinja2" ,python-jinja2)
4517 ("python-pytz" ,python-pytz)))
4518 (inputs
4519 `(("readline" ,readline)
4520 ("icu4c" ,icu4c)
4521 ("pcre" ,pcre)
4522 ("r-minimal" ,r-minimal)
4523 ("r-survival" ,r-survival)
4524 ("r-ggplot2" ,r-ggplot2)
4525 ("r-rsqlite" ,r-rsqlite)
4526 ("r-dplyr" ,r-dplyr)
4527 ("r-dbplyr" ,r-dbplyr)
4528 ("python-numpy" ,python-numpy)))
4529 (native-inputs
4530 `(("zlib" ,zlib)))
4531 (home-page "http://rpy.sourceforge.net/")
4532 (synopsis "Python interface to the R language")
4533 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4534 low-level interface to R from Python, a proposed high-level interface,
4535 including wrappers to graphical libraries, as well as R-like structures and
4536 functions.")
4537 ;; Any of these licenses can be picked for the R interface. The whole
4538 ;; project is released under GPLv2+ according to the license declaration
4539 ;; in "setup.py".
4540 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
4541
4542 (define-public python-scipy
4543 (package
4544 (name "python-scipy")
4545 (version "0.19.1")
4546 (source
4547 (origin
4548 (method url-fetch)
4549 (uri (pypi-uri "scipy" version))
4550 (sha256
4551 (base32
4552 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
4553 (build-system python-build-system)
4554 (propagated-inputs
4555 `(("python-numpy" ,python-numpy)
4556 ("python-matplotlib" ,python-matplotlib)
4557 ("python-pyparsing" ,python-pyparsing)))
4558 (inputs
4559 `(("lapack" ,lapack)
4560 ("openblas" ,openblas)))
4561 (native-inputs
4562 `(("python-cython" ,python-cython)
4563 ("python-nose" ,python-nose)
4564 ("python-sphinx" ,python-sphinx)
4565 ("python-numpydoc" ,python-numpydoc)
4566 ("gfortran" ,gfortran)
4567 ("perl" ,perl)))
4568 (outputs '("out" "doc"))
4569 (arguments
4570 `(#:phases
4571 (modify-phases %standard-phases
4572 (add-before 'build 'configure-openblas
4573 (lambda* (#:key inputs #:allow-other-keys)
4574 (call-with-output-file "site.cfg"
4575 (lambda (port)
4576 (format port
4577 "[blas]
4578 libraries = openblas
4579 library_dirs = ~a/lib
4580 include_dirs = ~a/include
4581
4582 # backslash-n to make emacs happy
4583 \n[atlas]
4584 library_dirs = ~a/lib
4585 atlas_libs = openblas
4586 "
4587 (assoc-ref inputs "openblas")
4588 (assoc-ref inputs "openblas")
4589 (assoc-ref inputs "openblas"))))
4590 #t))
4591 (add-after 'install 'install-doc
4592 (lambda* (#:key inputs outputs #:allow-other-keys)
4593 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4594 (doc (string-append data "/doc/" ,name "-" ,version))
4595 (html (string-append doc "/html"))
4596 (pyver ,(string-append "PYVER=")))
4597 ;; Make installed package available for building the
4598 ;; documentation
4599 (add-installed-pythonpath inputs outputs)
4600 (with-directory-excursion "doc"
4601 ;; Fix generation of images for mathematical expressions.
4602 (substitute* (find-files "source" "conf\\.py")
4603 (("pngmath_use_preview = True")
4604 "pngmath_use_preview = False"))
4605 (mkdir-p html)
4606 (system* "make" "html" pyver)
4607 (with-directory-excursion "build/html"
4608 (for-each (lambda (file)
4609 (let* ((dir (dirname file))
4610 (tgt-dir (string-append html "/" dir)))
4611 (install-file file html)))
4612 (find-files "." ".*")))))
4613 #t))
4614 (add-after 'unpack 'fix-tests
4615 (lambda _
4616 (substitute* "scipy/integrate/tests/test_quadpack.py"
4617 (("libm.so") "libm.so.6"))
4618 #t))
4619 ;; Tests can only be run after the library has been installed and not
4620 ;; within the source directory.
4621 (delete 'check)
4622 (add-after 'install 'check
4623 (lambda* (#:key inputs outputs #:allow-other-keys)
4624 (add-installed-pythonpath inputs outputs)
4625 (with-directory-excursion "/tmp"
4626 (zero? (system* "python" "-c"
4627 "import scipy; scipy.test('full')")))
4628 #t)))))
4629 (home-page "http://www.scipy.org/")
4630 (synopsis "The Scipy library provides efficient numerical routines")
4631 (description "The SciPy library is one of the core packages that make up
4632 the SciPy stack. It provides many user-friendly and efficient numerical
4633 routines such as routines for numerical integration and optimization.")
4634 (properties `((python2-variant . ,(delay python2-scipy))))
4635 (license license:bsd-3)))
4636
4637 (define-public python2-scipy
4638 (package-with-python2
4639 (strip-python2-variant python-scipy)))
4640
4641 (define-public python-sockjs-tornado
4642 (package
4643 (name "python-sockjs-tornado")
4644 (version "1.0.3")
4645 (source
4646 (origin
4647 (method url-fetch)
4648 (uri (pypi-uri "sockjs-tornado" version))
4649 (sha256
4650 (base32
4651 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4652 (build-system python-build-system)
4653 (arguments
4654 `(;; There are no tests, and running the test phase requires missing
4655 ;; dependencies
4656 #:tests? #f))
4657 (propagated-inputs
4658 `(("python-tornado" ,python-tornado)))
4659 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4660 (synopsis
4661 "SockJS python server implementation on top of Tornado framework")
4662 (description
4663 "SockJS-tornado provides the server side counterpart to a SockJS client
4664 library, through the Tornado framework.
4665
4666 SockJS provides a low latency, full duplex, cross-domain communication channel
4667 between a web browser and web server.")
4668 (license license:expat)))
4669
4670 (define-public python2-sockjs-tornado
4671 (package-with-python2 python-sockjs-tornado))
4672
4673 (define-public python-socksipy-branch
4674 (package
4675 (name "python-socksipy-branch")
4676 (version "1.01")
4677 (source
4678 (origin
4679 (method url-fetch)
4680 (uri (pypi-uri "SocksiPy-branch" version))
4681 (sha256
4682 (base32
4683 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4684 (build-system python-build-system)
4685 (arguments
4686 `(#:tests? #f)) ; There are no tests
4687 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4688 (synopsis "Python SOCKS module")
4689 (description
4690 "SocksiPy - A Python SOCKS client module. It provides a
4691 socket-like interface that supports connections to any TCP
4692 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4693 The original version was developed by Dan Haim, this is a
4694 branch created by Mario Vilas to address some open issues,
4695 as the original project seems to have been abandoned circa 2007.")
4696 (license license:bsd-3)))
4697
4698 (define-public python2-socksipy-branch
4699 (package-with-python2 python-socksipy-branch))
4700
4701 (define-public python-sqlalchemy
4702 (package
4703 (name "python-sqlalchemy")
4704 (version "1.0.12")
4705 (source
4706 (origin
4707 (method url-fetch)
4708 (uri (string-append "https://pypi.python.org/packages/source/S/"
4709 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4710 (sha256
4711 (base32
4712 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4713 (build-system python-build-system)
4714 (native-inputs
4715 `(("python-cython" ,python-cython) ;for c extensions
4716 ("python-pytest" ,python-pytest)
4717 ("python-mock" ,python-mock))) ;for tests
4718 (arguments
4719 `(#:phases (alist-replace
4720 'check
4721 (lambda _ (zero? (system* "py.test")))
4722 %standard-phases)))
4723 (home-page "http://www.sqlalchemy.org")
4724 (synopsis "Database abstraction library")
4725 (description
4726 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4727 gives application developers the full power and flexibility of SQL. It
4728 provides a full suite of well known enterprise-level persistence patterns,
4729 designed for efficient and high-performing database access, adapted into a
4730 simple and Pythonic domain language.")
4731 (license license:x11)))
4732
4733 (define-public python2-sqlalchemy
4734 (package-with-python2 python-sqlalchemy))
4735
4736 (define-public python-pycodestyle
4737 (package
4738 (name "python-pycodestyle")
4739 (version "2.3.1")
4740 (source
4741 (origin
4742 (method url-fetch)
4743 (uri (pypi-uri "pycodestyle" version))
4744 (sha256
4745 (base32
4746 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4747 (build-system python-build-system)
4748 (home-page "https://pycodestyle.readthedocs.io/")
4749 (synopsis "Python style guide checker")
4750 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4751 Python code against some of the style conventions in
4752 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4753 (license license:expat)))
4754
4755 (define-public python2-pycodestyle
4756 (package-with-python2 python-pycodestyle))
4757
4758 (define-public python-orderedmultidict
4759 (package
4760 (name "python-orderedmultidict")
4761 (version "0.7.11")
4762 (source
4763 (origin
4764 (method url-fetch)
4765 (uri (pypi-uri "orderedmultidict" version))
4766 (sha256
4767 (base32
4768 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4769 (build-system python-build-system)
4770 (arguments
4771 `(#:phases
4772 (modify-phases %standard-phases
4773 (add-after 'unpack 'fix-tests
4774 (lambda _
4775 ;; The package uses nosetest for running the tests.
4776 ;; Adding this initfile allows to run the test suite
4777 ;; without requiring nosetest.
4778 (zero? (system* "touch" "tests/__init__.py")))))))
4779 (propagated-inputs
4780 `(("python-six" ,python-six)))
4781 (native-inputs
4782 `(("python-pycodestyle" ,python-pycodestyle)))
4783 (home-page "https://github.com/gruns/orderedmultidict")
4784 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4785 (description "This package contains a library for ordered multivalue
4786 dictionaries. A multivalue dictionary is a dictionary that can store
4787 multiple values for the same key. An ordered multivalue dictionary is a
4788 multivalue dictionary that retains the order of insertions and deletions.")
4789 (license license:unlicense)))
4790
4791 (define-public python2-orderedmultidict
4792 (package-with-python2 python-orderedmultidict))
4793
4794 (define-public python-furl
4795 (package
4796 (name "python-furl")
4797 (version "0.5.6")
4798 (source
4799 (origin
4800 (method url-fetch)
4801 (uri (pypi-uri "furl" version))
4802 (sha256
4803 (base32
4804 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4805 (build-system python-build-system)
4806 (propagated-inputs
4807 `(("python-six" ,python-six)
4808 ("python-orderedmultidict" ,python-orderedmultidict)))
4809 (native-inputs
4810 `(("python-pycodestyle" ,python-pycodestyle)))
4811 (home-page "https://github.com/gruns/furl")
4812 (synopsis "URL manipulation in Python")
4813 (description "Furl provides an easy-to-use alternative to the
4814 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4815 (license license:unlicense)))
4816
4817 (define-public python2-furl
4818 (package-with-python2 python-furl))
4819
4820 (define-public python-flaky
4821 (package
4822 (name "python-flaky")
4823 (version "3.4.0")
4824 (source (origin
4825 (method url-fetch)
4826 (uri (pypi-uri "flaky" version))
4827 (sha256
4828 (base32
4829 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4830 (build-system python-build-system)
4831 (arguments
4832 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4833 '(#:tests? #f))
4834 (home-page "https://github.com/box/flaky")
4835 (synopsis "Automatically rerun flaky tests")
4836 (description
4837 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4838 reruns flaky tests.
4839
4840 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4841 on components that aren't 100% reliable. With flaky, instead of removing
4842 those tests or marking them to @code{@@skip}, they can be automatically
4843 retried.")
4844 (license license:asl2.0)))
4845
4846 (define-public python2-flaky
4847 (package-with-python2 python-flaky))
4848
4849 (define-public python-flask-babel
4850 (package
4851 (name "python-flask-babel")
4852 (version "0.11.1")
4853 (source
4854 (origin
4855 (method url-fetch)
4856 (uri (pypi-uri "Flask-Babel" version))
4857 (sha256
4858 (base32
4859 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4860 (build-system python-build-system)
4861 (propagated-inputs
4862 `(("python-flask" ,python-flask)
4863 ("python-babel" ,python-babel)
4864 ("python-jinja2" ,python-jinja2)
4865 ("python-pytz" ,python-pytz)))
4866 (home-page "https://github.com/python-babel/flask-babel")
4867 (synopsis "Add i18n/l10n support to Flask applications")
4868 (description "This package implements internationalization and localization
4869 support for Flask. This is based on the Python babel module as well as pytz -
4870 both of which are installed automatically if you install this library.")
4871 (license license:bsd-3)))
4872
4873 (define-public python2-flask-babel
4874 (package-with-python2 python-flask-babel))
4875
4876 (define-public python-sqlalchemy-utils
4877 (package
4878 (name "python-sqlalchemy-utils")
4879 (version "0.32.13")
4880 (source
4881 (origin
4882 (method url-fetch)
4883 (uri (pypi-uri "SQLAlchemy-Utils" version))
4884 (sha256
4885 (base32
4886 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4887 (build-system python-build-system)
4888 (arguments
4889 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4890 ;; #:phases
4891 ;; (modify-phases %standard-phases
4892 ;; (replace 'check
4893 ;; (lambda _
4894 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4895 (propagated-inputs
4896 `(("python-six" ,python-six)
4897 ("python-sqlalchemy" ,python-sqlalchemy)))
4898 (native-inputs
4899 `(("python-dateutil" ,python-dateutil)
4900 ("python-flexmock" ,python-flexmock)
4901 ("python-psycopg2" ,python-psycopg2)
4902 ("python-pytest" ,python-pytest)
4903 ("python-pytz" ,python-pytz)))
4904 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4905 (synopsis "Various utility functions for SQLAlchemy")
4906 (description
4907 "SQLAlchemy-utils provides various utility functions and custom data types
4908 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4909
4910 You might also want to install the following optional dependencies:
4911 @enumerate
4912 @item @code{python-passlib}
4913 @item @code{python-babel}
4914 @item @code{python-cryptography}
4915 @item @code{python-pytz}
4916 @item @code{python-psycopg2}
4917 @item @code{python-furl}
4918 @item @code{python-flask-babel}
4919 @end enumerate
4920 ")
4921 (license license:bsd-3)))
4922
4923 (define-public python2-sqlalchemy-utils
4924 (package-with-python2 python-sqlalchemy-utils))
4925
4926 (define-public python-alembic
4927 (package
4928 (name "python-alembic")
4929 (version "0.9.5")
4930 (source
4931 (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "alembic" version))
4934 (sha256
4935 (base32
4936 "01gx2syqbaxh4hr9pf7pxhlb6p36qaf99140dy19lsx1paxb9p4b"))))
4937 (build-system python-build-system)
4938 (native-inputs
4939 `(("python-mock" ,python-mock)
4940 ("python-pytest-cov" ,python-pytest-cov)))
4941 (propagated-inputs
4942 `(("python-dateutil" ,python-dateutil)
4943 ("python-sqlalchemy" ,python-sqlalchemy)
4944 ("python-mako" ,python-mako)
4945 ("python-editor" ,python-editor)))
4946 (home-page "http://bitbucket.org/zzzeek/alembic")
4947 (synopsis
4948 "Database migration tool for SQLAlchemy")
4949 (description
4950 "Alembic is a lightweight database migration tool for usage with the
4951 SQLAlchemy Database Toolkit for Python.")
4952 (license license:expat)))
4953
4954 (define-public python2-alembic
4955 (package-with-python2 python-alembic))
4956
4957 (define-public python-autopep8
4958 (package
4959 (name "python-autopep8")
4960 (version "1.3.2")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "autopep8" version))
4965 (sha256
4966 (base32
4967 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
4968 (build-system python-build-system)
4969 (propagated-inputs
4970 `(("python-pycodestyle" ,python-pycodestyle)))
4971 (home-page "https://github.com/hhatto/autopep8")
4972 (synopsis "Format Python code according to the PEP 8 style guide")
4973 (description
4974 "@code{autopep8} automatically formats Python code to conform to
4975 the PEP 8 style guide. It uses the pycodestyle utility to determine
4976 what parts of the code needs to be formatted. @code{autopep8} is
4977 capable of fixing most of the formatting issues that can be reported
4978 by pycodestyle.")
4979 (license (license:non-copyleft
4980 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4981
4982 (define-public python2-autopep8
4983 (package-with-python2 python-autopep8))
4984
4985 (define-public python-distutils-extra
4986 (package
4987 (name "python-distutils-extra")
4988 (version "2.38")
4989 (source
4990 (origin
4991 (method url-fetch)
4992 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4993 version "/+download/python-distutils-extra-"
4994 version ".tar.gz"))
4995 (sha256
4996 (base32
4997 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4998 (build-system python-build-system)
4999 (home-page "https://launchpad.net/python-distutils-extra/")
5000 (synopsis "Enhancements to Python's distutils")
5001 (description
5002 "The python-distutils-extra module enables you to easily integrate
5003 gettext support, themed icons, and scrollkeeper-based documentation into
5004 Python's distutils.")
5005 (license license:gpl2)))
5006
5007 (define-public python2-distutils-extra
5008 (package-with-python2 python-distutils-extra))
5009
5010 (define-public python2-elib.intl
5011 (package
5012 (name "python2-elib.intl")
5013 (version "0.0.3")
5014 (source
5015 (origin
5016 ;; This project doesn't tag releases or publish tarballs, so we take
5017 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5018 (method git-fetch)
5019 (uri (git-reference
5020 (url "https://github.com/dieterv/elib.intl.git")
5021 (commit "d09997cfef")))
5022 (sha256
5023 (base32
5024 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5025 (build-system python-build-system)
5026 (arguments
5027 ;; incompatible with Python 3 (exception syntax)
5028 `(#:python ,python-2
5029 #:tests? #f))
5030 (home-page "https://github.com/dieterv/elib.intl")
5031 (synopsis "Enhanced internationalization for Python")
5032 (description
5033 "The elib.intl module provides enhanced internationalization (I18N)
5034 services for your Python modules and applications.")
5035 (license license:lgpl3+)))
5036
5037 (define-public python-pillow
5038 (package
5039 (name "python-pillow")
5040 (version "3.3.3")
5041 (source
5042 (origin
5043 (method url-fetch)
5044 (uri (pypi-uri "Pillow" version))
5045 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
5046 (sha256
5047 (base32
5048 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
5049 (build-system python-build-system)
5050 (native-inputs
5051 `(("python-nose" ,python-nose)))
5052 (inputs
5053 `(("freetype" ,freetype)
5054 ("lcms" ,lcms)
5055 ("zlib" ,zlib)
5056 ("libjpeg" ,libjpeg)
5057 ("openjpeg" ,openjpeg)
5058 ("libtiff" ,libtiff)
5059 ("libwebp" ,libwebp)))
5060 (arguments
5061 `(#:phases (modify-phases %standard-phases
5062 (add-after
5063 'install 'check-installed
5064 (lambda* (#:key outputs inputs #:allow-other-keys)
5065 (begin
5066 (setenv "HOME" (getcwd))
5067 ;; Make installed package available for running the
5068 ;; tests
5069 (add-installed-pythonpath inputs outputs)
5070 (and (zero? (system* "python" "selftest.py"
5071 "--installed"))
5072 (zero? (system* "python" "test-installed.py"))))))
5073 (delete 'check))))
5074 (home-page "https://pypi.python.org/pypi/Pillow")
5075 (synopsis "Fork of the Python Imaging Library")
5076 (description
5077 "The Python Imaging Library adds image processing capabilities to your
5078 Python interpreter. This library provides extensive file format support, an
5079 efficient internal representation, and fairly powerful image processing
5080 capabilities. The core image library is designed for fast access to data
5081 stored in a few basic pixel formats. It should provide a solid foundation for
5082 a general image processing tool.")
5083 (license (license:x11-style
5084 "http://www.pythonware.com/products/pil/license.htm"
5085 "The PIL Software License"))))
5086
5087 (define-public python2-pillow
5088 (package-with-python2 python-pillow))
5089
5090 (define-public python-pycparser
5091 (package
5092 (name "python-pycparser")
5093 (version "2.17")
5094 (source
5095 (origin
5096 (method url-fetch)
5097 (uri (pypi-uri "pycparser" version))
5098 (sha256
5099 (base32
5100 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
5101 (outputs '("out" "doc"))
5102 (build-system python-build-system)
5103 (native-inputs
5104 `(("pkg-config" ,pkg-config)))
5105 (arguments
5106 `(#:phases
5107 (modify-phases %standard-phases
5108 (replace 'check
5109 (lambda _
5110 (with-directory-excursion "tests"
5111 (zero? (system* "python" "all_tests.py")))))
5112 (add-after 'install 'install-doc
5113 (lambda* (#:key outputs #:allow-other-keys)
5114 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5115 (doc (string-append data "/doc/" ,name "-" ,version))
5116 (examples (string-append doc "/examples")))
5117 (mkdir-p examples)
5118 (for-each (lambda (file)
5119 (copy-file (string-append "." file)
5120 (string-append doc file)))
5121 '("/README.rst" "/CHANGES" "/LICENSE"))
5122 (copy-recursively "examples" examples)))))))
5123 (home-page "https://github.com/eliben/pycparser")
5124 (synopsis "C parser in Python")
5125 (description
5126 "Pycparser is a complete parser of the C language, written in pure Python
5127 using the PLY parsing library. It parses C code into an AST and can serve as
5128 a front-end for C compilers or analysis tools.")
5129 (license license:bsd-3)))
5130
5131 (define-public python2-pycparser
5132 (package-with-python2 python-pycparser))
5133
5134 (define-public python-cffi
5135 (package
5136 (name "python-cffi")
5137 (version "1.10.0")
5138 (source
5139 (origin
5140 (method url-fetch)
5141 (uri (pypi-uri "cffi" version))
5142 (sha256
5143 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
5144 (build-system python-build-system)
5145 (outputs '("out" "doc"))
5146 (inputs
5147 `(("libffi" ,libffi)))
5148 (propagated-inputs ; required at run-time
5149 `(("python-pycparser" ,python-pycparser)))
5150 (native-inputs
5151 `(("pkg-config" ,pkg-config)
5152 ("python-sphinx" ,python-sphinx)
5153 ("python-pytest" ,python-pytest)))
5154 (arguments
5155 `(#:modules ((ice-9 ftw)
5156 (srfi srfi-26)
5157 (guix build utils)
5158 (guix build python-build-system))
5159 #:phases
5160 (modify-phases %standard-phases
5161 (replace 'check
5162 (lambda _
5163 (setenv "PYTHONPATH"
5164 (string-append
5165 (getenv "PYTHONPATH")
5166 ":" (getcwd) "/build/"
5167 (car (scandir "build" (cut string-prefix? "lib." <>)))))
5168
5169 ;; XXX The "normal" approach of setting CC and friends does
5170 ;; not work here. Is this the correct way of doing things?
5171 (substitute* "testing/embedding/test_basic.py"
5172 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5173 (string-append "c = distutils.ccompiler.new_compiler();"
5174 "c.set_executables(compiler='gcc',"
5175 "compiler_so='gcc',linker_exe='gcc',"
5176 "linker_so='gcc -shared')")))
5177 (substitute* "testing/cffi0/test_ownlib.py"
5178 (("'cc testownlib") "'gcc testownlib"))
5179 (zero? (system* "py.test" "-v" "c/" "testing/"))))
5180 (add-after 'install 'install-doc
5181 (lambda* (#:key outputs #:allow-other-keys)
5182 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5183 (doc (string-append data "/doc/" ,name "-" ,version))
5184 (html (string-append doc "/html")))
5185 (with-directory-excursion "doc"
5186 (system* "make" "html")
5187 (mkdir-p html)
5188 (copy-recursively "build/html" html))
5189 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5190 #t))))))
5191 (home-page "http://cffi.readthedocs.org")
5192 (synopsis "Foreign function interface for Python")
5193 (description
5194 "Foreign Function Interface for Python calling C code.")
5195 (license license:expat)))
5196
5197 (define-public python2-cffi
5198 (package-with-python2 python-cffi))
5199
5200 (define-public python-xcffib
5201 (package
5202 (name "python-xcffib")
5203 (version "0.5.1")
5204 (source
5205 (origin
5206 (method url-fetch)
5207 (uri (pypi-uri "xcffib" version))
5208 (sha256
5209 (base32
5210 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5211 (build-system python-build-system)
5212 (inputs
5213 `(("libxcb" ,libxcb)))
5214 (propagated-inputs
5215 `(("python-cffi" ,python-cffi) ; used at run time
5216 ("python-six" ,python-six)))
5217 (arguments
5218 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5219 #:tests? #f
5220 #:phases
5221 (modify-phases %standard-phases
5222 (add-after 'unpack 'fix-libxcb-path
5223 (lambda* (#:key inputs #:allow-other-keys)
5224 (let ((libxcb (assoc-ref inputs "libxcb")))
5225 (substitute* '("xcffib/__init__.py")
5226 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5227 #t)))
5228 (add-after 'install 'install-doc
5229 (lambda* (#:key outputs #:allow-other-keys)
5230 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5231 "/doc/" ,name "-" ,version)))
5232 (mkdir-p doc)
5233 (copy-file "README.md"
5234 (string-append doc "/README.md"))
5235 #t))))))
5236 (home-page "https://github.com/tych0/xcffib")
5237 (synopsis "XCB Python bindings")
5238 (description
5239 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5240 support for Python 3 and PyPy. It is based on cffi.")
5241 (license license:expat)))
5242
5243 (define-public python2-xcffib
5244 (package-with-python2 python-xcffib))
5245
5246 (define-public python-cairocffi
5247 (package
5248 (name "python-cairocffi")
5249 (version "0.8.0")
5250 (source
5251 (origin
5252 (method url-fetch)
5253 ;; The archive on pypi is missing the 'utils' directory!
5254 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5255 version ".tar.gz"))
5256 (file-name (string-append name "-" version ".tar.gz"))
5257 (sha256
5258 (base32
5259 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5260 (build-system python-build-system)
5261 (outputs '("out" "doc"))
5262 (inputs
5263 `(("gdk-pixbuf" ,gdk-pixbuf)
5264 ("cairo" ,cairo)))
5265 (native-inputs
5266 `(("pkg-config" ,pkg-config)
5267 ("python-sphinx" ,python-sphinx)
5268 ("python-docutils" ,python-docutils)))
5269 (propagated-inputs
5270 `(("python-xcffib" ,python-xcffib))) ; used at run time
5271 (arguments
5272 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5273 #:tests? #f
5274 #:phases
5275 (modify-phases %standard-phases
5276 (add-after 'install 'install-doc
5277 (lambda* (#:key inputs outputs #:allow-other-keys)
5278 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5279 (doc (string-append data "/doc/" ,name "-" ,version))
5280 (html (string-append doc "/html")))
5281 (setenv "LD_LIBRARY_PATH"
5282 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5283 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5284 (setenv "LANG" "en_US.UTF-8")
5285 (mkdir-p html)
5286 (for-each (lambda (file)
5287 (copy-file (string-append "." file)
5288 (string-append doc file)))
5289 '("/README.rst" "/CHANGES" "/LICENSE"))
5290 (system* "python" "setup.py" "build_sphinx")
5291 (copy-recursively "docs/_build/html" html)
5292 #t))))))
5293 (home-page "https://github.com/Kozea/cairocffi")
5294 (synopsis "Python bindings and object-oriented API for Cairo")
5295 (description
5296 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5297 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5298 graphics library with support for multiple backends including image buffers,
5299 PNG, PostScript, PDF, and SVG file output.")
5300 (license license:bsd-3)))
5301
5302 (define-public python2-cairocffi
5303 (package-with-python2 python-cairocffi))
5304
5305 (define-public python-decorator
5306 (package
5307 (name "python-decorator")
5308 (version "4.0.10")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "decorator" version))
5313 (sha256
5314 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5315 (build-system python-build-system)
5316 (arguments '(#:tests? #f)) ; no test target
5317 (home-page "https://pypi.python.org/pypi/decorator/")
5318 (synopsis "Python module to simplify usage of decorators")
5319 (description
5320 "The aim of the decorator module is to simplify the usage of decorators
5321 for the average programmer, and to popularize decorators usage giving examples
5322 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5323 etc. The core of this module is a decorator factory.")
5324 (license license:expat)))
5325
5326 (define-public python2-decorator
5327 (package-with-python2 python-decorator))
5328
5329 (define-public python-drmaa
5330 (package
5331 (name "python-drmaa")
5332 (version "0.7.7")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "drmaa" version))
5337 (sha256
5338 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5339 (build-system python-build-system)
5340 ;; The test suite requires libdrmaa which is provided by the cluster
5341 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5342 ;; should be set to the path of the libdrmaa library.
5343 (arguments '(#:tests? #f))
5344 (native-inputs
5345 `(("python-nose" ,python-nose)))
5346 (home-page "https://pypi.python.org/pypi/drmaa")
5347 (synopsis "Python bindings for the DRMAA library")
5348 (description
5349 "A Python package for Distributed Resource Management (DRM) job
5350 submission and control. This package is an implementation of the DRMAA 1.0
5351 Python language binding specification.")
5352 (license license:bsd-3)))
5353
5354 (define-public python2-drmaa
5355 (package-with-python2 python-drmaa))
5356
5357 (define-public python-grako
5358 (package
5359 (name "python-grako")
5360 (version "3.99.9")
5361 (source
5362 (origin
5363 (method url-fetch)
5364 (uri
5365 (pypi-uri "grako" version ".zip"))
5366 (sha256
5367 (base32
5368 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5369 (build-system python-build-system)
5370 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5371 (native-inputs
5372 `(("unzip" ,unzip)
5373 ("python-pytest" ,python-pytest-3.0)
5374 ("python-pytest-runner" ,python-pytest-runner)))
5375 (home-page "https://bitbucket.org/neogeny/grako")
5376 (synopsis "EBNF parser generator")
5377 (description
5378 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5379 memoizing PEG/Packrat parser in Python.")
5380 (license license:bsd-3)))
5381
5382 (define-public python2-grako
5383 (package-with-python2 python-grako))
5384
5385 (define-public python-gridmap
5386 (package
5387 (name "python-gridmap")
5388 (version "0.13.0")
5389 (source
5390 (origin
5391 (method url-fetch)
5392 (uri (string-append
5393 "https://github.com/pygridtools/gridmap/archive/v"
5394 version ".tar.gz"))
5395 (file-name (string-append name "-" version ".tar.gz"))
5396 (sha256
5397 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5398 (build-system python-build-system)
5399 (arguments
5400 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5401 (propagated-inputs
5402 `(("python-psutil" ,python-psutil)
5403 ("python-drmaa" ,python-drmaa)
5404 ("python-pyzmq" ,python-pyzmq)))
5405 (home-page "https://github.com/pygridtools/gridmap")
5406 (synopsis "Create jobs on a cluster directly from Python")
5407 (description
5408 "Gridmap is a Python package to allow you to easily create jobs on the
5409 cluster directly from Python. You can directly map Python functions onto the
5410 cluster without needing to write any wrapper code yourself.")
5411 (license license:gpl3+)))
5412
5413 (define-public python2-gridmap
5414 (package-with-python2 python-gridmap))
5415
5416 (define-public python-honcho
5417 (package
5418 (name "python-honcho")
5419 (version "1.0.1")
5420 (source
5421 (origin
5422 (method url-fetch)
5423 (uri (string-append
5424 "https://github.com/nickstenning/honcho/archive/v"
5425 version ".tar.gz"))
5426 (file-name (string-append name "-" version ".tar.gz"))
5427 (sha256
5428 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
5429 (build-system python-build-system)
5430 (native-inputs
5431 `(("python-pytest" ,python-pytest-3.0)
5432 ("python-mock" ,python-mock)
5433 ("python-tox" ,python-tox)
5434 ("which" ,which))) ;for tests
5435 (propagated-inputs
5436 `(("python-jinja2" ,python-jinja2)))
5437 (arguments
5438 `(#:phases
5439 (modify-phases %standard-phases
5440 (delete 'check)
5441 (add-after 'install 'check
5442 (lambda* (#:key outputs inputs #:allow-other-keys)
5443 ;; fix honcho path in testsuite
5444 (substitute* "tests/conftest.py"
5445 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5446 "/bin/honcho" "'")))
5447 ;; It's easier to run tests after install.
5448 ;; Make installed package available for running the tests
5449 (add-installed-pythonpath inputs outputs)
5450 (zero? (system* "py.test" "-v")))))))
5451 (home-page "https://github.com/nickstenning/honcho")
5452 (synopsis "Manage Procfile-based applications")
5453 (description
5454 "A Procfile is a file which describes how to run an application
5455 consisting of serveral processes. honcho starts all listed processes.
5456 The output of all running processes is collected by honcho and
5457 displayed.")
5458 (license license:expat)))
5459
5460 (define-public python2-honcho
5461 (package-with-python2 python-honcho))
5462
5463 (define-public python-pexpect
5464 (package
5465 (name "python-pexpect")
5466 (version "4.2.1")
5467 (source
5468 (origin
5469 (method url-fetch)
5470 (uri (pypi-uri "pexpect" version))
5471 (sha256
5472 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5473 (build-system python-build-system)
5474 (arguments
5475 `(#:phases
5476 (modify-phases %standard-phases
5477 (add-before 'check 'prepare-tests
5478 (lambda _
5479 (substitute* (find-files "tests")
5480 (("/bin/ls") (which "ls"))
5481 (("/bin/echo") (which "echo"))
5482 (("/bin/which") (which "which"))
5483 ;; Many tests try to use the /bin directory which
5484 ;; is not present in the build environment.
5485 ;; Use one that's non-empty and unlikely to change.
5486 (("/bin'") "/dev'"))
5487 ;; XXX: Socket connection test gets "Connection reset by peer".
5488 ;; Why does it not work? Delete for now.
5489 (delete-file "tests/test_socket.py")
5490 #t))
5491 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5492 (native-inputs
5493 `(("python-nose" ,python-nose)
5494 ("python-pytest" ,python-pytest-3.0)
5495 ("man-db" ,man-db)
5496 ("which" ,which)
5497 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5498 (propagated-inputs
5499 `(("python-ptyprocess" ,python-ptyprocess)))
5500 (home-page "http://pexpect.readthedocs.org/")
5501 (synopsis "Controlling interactive console applications")
5502 (description
5503 "Pexpect is a pure Python module for spawning child applications;
5504 controlling them; and responding to expected patterns in their output.
5505 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5506 child application and control it as if a human were typing commands.")
5507 (license license:isc)))
5508
5509 (define-public python2-pexpect
5510 (package-with-python2 python-pexpect))
5511
5512 (define-public python-setuptools-scm
5513 (package
5514 (name "python-setuptools-scm")
5515 (version "1.15.0")
5516 (source (origin
5517 (method url-fetch)
5518 (uri (pypi-uri "setuptools_scm" version))
5519 (sha256
5520 (base32
5521 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5522 (build-system python-build-system)
5523 (home-page "https://github.com/pypa/setuptools_scm/")
5524 (synopsis "Manage Python package versions in SCM metadata")
5525 (description
5526 "Setuptools_scm handles managing your Python package versions in
5527 @dfn{software configuration management} (SCM) metadata instead of declaring
5528 them as the version argument or in a SCM managed file.")
5529 (license license:expat)))
5530
5531 (define-public python2-setuptools-scm
5532 (package-with-python2 python-setuptools-scm))
5533
5534 (define-public python-pathpy
5535 (package
5536 (name "python-pathpy")
5537 (version "8.1.1")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (string-append "https://pypi.python.org/packages/source/p/"
5542 "path.py/path.py-" version ".tar.gz"))
5543 (sha256
5544 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5545 (outputs '("out" "doc"))
5546 (build-system python-build-system)
5547 (propagated-inputs
5548 `(("python-appdirs" ,python-appdirs)))
5549 (native-inputs
5550 `(("python-setuptools-scm" ,python-setuptools-scm)
5551 ("python-sphinx" ,python-sphinx)
5552 ("python-rst.linker" ,python-rst.linker)
5553 ("python-pytest" ,python-pytest)
5554 ("python-pytest-runner" ,python-pytest-runner)))
5555 (arguments
5556 `(#:phases
5557 (modify-phases %standard-phases
5558 (add-after 'build 'build-doc
5559 (lambda _
5560 (setenv "LANG" "en_US.UTF-8")
5561 (zero? (system* "python" "setup.py" "build_sphinx"))))
5562 (add-after 'install 'install-doc
5563 (lambda* (#:key outputs #:allow-other-keys)
5564 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5565 (doc (string-append data "/doc/" ,name "-" ,version))
5566 (html (string-append doc "/html")))
5567 (mkdir-p html)
5568 (for-each (lambda (file)
5569 (copy-file file (string-append doc "/" file)))
5570 '("README.rst" "CHANGES.rst"))
5571 (copy-recursively "build/sphinx/html" html)))))))
5572 (home-page "https://github.com/jaraco/path.py")
5573 (synopsis "Python module wrapper for built-in os.path")
5574 (description
5575 "@code{path.py} implements path objects as first-class entities, allowing
5576 common operations on files to be invoked on those path objects directly.")
5577 (license license:expat)))
5578
5579 (define-public python2-pathpy
5580 (package-with-python2 python-pathpy))
5581
5582 (define-public python-pickleshare
5583 (package
5584 (name "python-pickleshare")
5585 (version "0.5")
5586 (source
5587 (origin
5588 (method url-fetch)
5589 (uri (string-append "https://pypi.python.org/packages/source/p/"
5590 "pickleshare/pickleshare-" version ".tar.gz"))
5591 (sha256
5592 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5593 (build-system python-build-system)
5594 (propagated-inputs
5595 `(("python-pathpy" ,python-pathpy)))
5596 (home-page "https://github.com/vivainio/pickleshare")
5597 (synopsis "Tiny key value database with concurrency support")
5598 (description
5599 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5600 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5601 shelve, many processes can access the database simultaneously. Changing a
5602 value in database is immediately visible to other processes accessing the same
5603 database. Concurrency is possible because the values are stored in separate
5604 files. Hence the “database” is a directory where all files are governed by
5605 PickleShare.")
5606 (license license:expat)))
5607
5608 (define-public python2-pickleshare
5609 (package-with-python2 python-pickleshare))
5610
5611 (define-public python-simplegeneric
5612 (package
5613 (name "python-simplegeneric")
5614 (version "0.8.1")
5615 (source
5616 (origin
5617 (method url-fetch)
5618 (uri (string-append "https://pypi.python.org/packages/source/s/"
5619 "simplegeneric/simplegeneric-" version ".zip"))
5620 (sha256
5621 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5622 (build-system python-build-system)
5623 (native-inputs
5624 `(("unzip" ,unzip)))
5625 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5626 (synopsis "Python module for simple generic functions")
5627 (description
5628 "The simplegeneric module lets you define simple single-dispatch generic
5629 functions, akin to Python’s built-in generic functions like @code{len()},
5630 @code{iter()} and so on. However, instead of using specially-named methods,
5631 these generic functions use simple lookup tables, akin to those used by
5632 e.g. @code{pickle.dump()} and other generic functions found in the Python
5633 standard library.")
5634 (license license:zpl2.1)))
5635
5636 (define-public python2-simplegeneric
5637 (package-with-python2 python-simplegeneric))
5638
5639 (define-public python-ipython-genutils
5640 ;; TODO: This package is retired, check if can be removed, see description.
5641 (package
5642 (name "python-ipython-genutils")
5643 (version "0.1.0")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (string-append "https://pypi.python.org/packages/source/i/"
5648 "ipython_genutils/ipython_genutils-"
5649 version ".tar.gz"))
5650 (sha256
5651 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5652 (build-system python-build-system)
5653 (arguments `(#:tests? #f)) ; no tests
5654 (home-page "http://ipython.org")
5655 (synopsis "Vestigial utilities from IPython")
5656 (description
5657 "This package provides retired utilities from IPython. No packages
5658 outside IPython/Jupyter should depend on it.
5659
5660 This package shouldn't exist. It contains some common utilities shared by
5661 Jupyter and IPython projects during The Big Split. As soon as possible, those
5662 packages will remove their dependency on this, and this package will go
5663 away.")
5664 (license license:bsd-3)))
5665
5666 (define-public python2-ipython-genutils
5667 (package-with-python2 python-ipython-genutils))
5668
5669 (define-public python-traitlets
5670 (package
5671 (name "python-traitlets")
5672 (version "4.2.0")
5673 (source
5674 (origin
5675 (method url-fetch)
5676 (uri (pypi-uri "traitlets" version))
5677 (sha256
5678 (base32
5679 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5680 (build-system python-build-system)
5681 (arguments
5682 `(#:phases
5683 (modify-phases %standard-phases
5684 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5685 (propagated-inputs
5686 `(("python-ipython-genutils" ,python-ipython-genutils)
5687 ("python-decorator" ,python-decorator)))
5688 (native-inputs
5689 `(("python-mock" ,python-mock)
5690 ("python-nose" ,python-nose)))
5691 (home-page "http://ipython.org")
5692 (synopsis "Configuration system for Python applications")
5693 (description
5694 "Traitlets is a framework that lets Python classes have attributes with
5695 type checking, dynamically calculated default values, and ‘on change’
5696 callbacks. The package also includes a mechanism to use traitlets for
5697 configuration, loading values from files or from command line arguments. This
5698 is a distinct layer on top of traitlets, so you can use traitlets in your code
5699 without using the configuration machinery.")
5700 (license license:bsd-3)))
5701
5702 (define-public python2-traitlets
5703 (package-with-python2 python-traitlets))
5704
5705 (define-public python-jupyter-core
5706 (package
5707 (name "python-jupyter-core")
5708 (version "4.2.1")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (string-append (pypi-uri "jupyter_core" version)))
5713 (sha256
5714 (base32
5715 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5716 (build-system python-build-system)
5717 ;; FIXME: not sure how to run the tests
5718 (arguments `(#:tests? #f))
5719 (propagated-inputs
5720 `(("python-traitlets" ,python-traitlets)))
5721 (home-page "http://jupyter.org/")
5722 (synopsis "Jupyter base package")
5723 (description
5724 "Jupyter core is the base package on which Jupyter projects rely.")
5725 (license license:bsd-3)))
5726
5727 (define-public python2-jupyter-core
5728 (package-with-python2 python-jupyter-core))
5729
5730 (define-public python-jupyter-client
5731 (package
5732 (name "python-jupyter-client")
5733 (version "4.4.0")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "jupyter_client" version))
5738 (sha256
5739 (base32
5740 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5741 (build-system python-build-system)
5742 ;; Tests fail because of missing native python kernel which I assume is
5743 ;; provided by the ipython package, which we cannot use because it would
5744 ;; cause a dependency cycle.
5745 (arguments `(#:tests? #f))
5746 (propagated-inputs
5747 `(("python-pyzmq" ,python-pyzmq)
5748 ("python-traitlets" ,python-traitlets)
5749 ("python-jupyter-core" ,python-jupyter-core)))
5750 (home-page "http://jupyter.org/")
5751 (synopsis "Jupyter protocol implementation and client libraries")
5752 (description
5753 "The @code{jupyter_client} package contains the reference implementation
5754 of the Jupyter protocol. It also provides client and kernel management APIs
5755 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5756 installing @code{kernelspec}s for use with Jupyter frontends.")
5757 (license license:bsd-3)))
5758
5759 (define-public python2-jupyter-client
5760 (package-with-python2 python-jupyter-client))
5761
5762 (define-public python-ipykernel
5763 (package
5764 (name "python-ipykernel")
5765 (version "4.5.2")
5766 (source
5767 (origin
5768 (method url-fetch)
5769 (uri (pypi-uri "ipykernel" version))
5770 (sha256
5771 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5772 (build-system python-build-system)
5773 ;; The tests load a submodule of IPython. However, IPython itself depends
5774 ;; on ipykernel.
5775 (arguments `(#:tests? #f))
5776 (propagated-inputs
5777 ;; imported at runtime during connect
5778 `(("python-jupyter-client" ,python-jupyter-client)))
5779 (home-page "http://ipython.org")
5780 (synopsis "IPython Kernel for Jupyter")
5781 (description
5782 "This package provides the IPython kernel for Jupyter.")
5783 (license license:bsd-3)))
5784
5785 (define-public python2-ipykernel
5786 (package-with-python2 python-ipykernel))
5787
5788 (define-public python-testpath
5789 (package
5790 (name "python-testpath")
5791 (version "0.2")
5792 (source
5793 (origin
5794 (method url-fetch)
5795 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5796 version ".tar.gz"))
5797 (file-name (string-append name "-" version ".tar.gz"))
5798 (sha256
5799 (base32
5800 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5801 (build-system python-build-system)
5802 (arguments
5803 `(#:tests? #f ; this package does not even have a setup.py
5804 #:modules ((guix build python-build-system)
5805 (guix build utils)
5806 (srfi srfi-1))
5807 #:imported-modules (,@%python-build-system-modules
5808 (srfi srfi-1))
5809 #:phases
5810 (modify-phases %standard-phases
5811 (delete 'install)
5812 (replace 'build
5813 (lambda* (#:key inputs outputs #:allow-other-keys)
5814 (let* ((version (last
5815 (string-split (assoc-ref inputs "python") #\-)))
5816 (x.y (string-join (take (string-split version #\.) 2)
5817 "."))
5818 (dir (string-append
5819 (assoc-ref outputs "out")
5820 "/lib/python" x.y "/site-packages/testpath")))
5821 (mkdir-p dir)
5822 (copy-recursively "testpath" dir))
5823 #t)))))
5824 (home-page "https://github.com/takluyver/testpath")
5825 (synopsis "Test utilities for code working with files and commands")
5826 (description
5827 "Testpath is a collection of utilities for Python code working with files
5828 and commands. It contains functions to check things on the filesystem, and
5829 tools for mocking system commands and recording calls to those.")
5830 (license license:expat)))
5831
5832 (define-public python2-testpath
5833 (package-with-python2 python-testpath))
5834
5835 (define-public python-ipython
5836 (package
5837 (name "python-ipython")
5838 (version "5.3.0")
5839 (source
5840 (origin
5841 (method url-fetch)
5842 (uri (pypi-uri "ipython" version ".tar.gz"))
5843 (sha256
5844 (base32 "079wyjir4a9qx6kvx096b1asm63djbidk65z3ykcbnlngmg62pmz"))))
5845 (build-system python-build-system)
5846 (outputs '("out" "doc"))
5847 (propagated-inputs
5848 `(("python-pyzmq" ,python-pyzmq)
5849 ("python-prompt-toolkit" ,python-prompt-toolkit)
5850 ("python-terminado" ,python-terminado)
5851 ("python-matplotlib" ,python-matplotlib)
5852 ("python-numpy" ,python-numpy)
5853 ("python-numpydoc" ,python-numpydoc)
5854 ("python-jinja2" ,python-jinja2)
5855 ("python-mistune" ,python-mistune)
5856 ("python-pexpect" ,python-pexpect)
5857 ("python-pickleshare" ,python-pickleshare)
5858 ("python-simplegeneric" ,python-simplegeneric)
5859 ("python-jsonschema" ,python-jsonschema)
5860 ("python-traitlets" ,python-traitlets)
5861 ("python-ipykernel" ,python-ipykernel)
5862 ("python-nbformat" ,python-nbformat)
5863 ("python-pygments" ,python-pygments)))
5864 (inputs
5865 `(("readline" ,readline)
5866 ("which" ,which)))
5867 (native-inputs
5868 `(("graphviz" ,graphviz)
5869 ("pkg-config" ,pkg-config)
5870 ("python-requests" ,python-requests) ;; for tests
5871 ("python-testpath" ,python-testpath)
5872 ("python-nose" ,python-nose)
5873 ("python-sphinx" ,python-sphinx)
5874 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5875 ;; FIXME: It's possible that a smaller union would work just as well.
5876 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5877 texlive-fonts-ec
5878 texlive-generic-ifxetex
5879 texlive-generic-pdftex
5880 texlive-latex-amsfonts
5881 texlive-latex-capt-of
5882 texlive-latex-cmap
5883 texlive-latex-environ
5884 texlive-latex-eqparbox
5885 texlive-latex-etoolbox
5886 texlive-latex-expdlist
5887 texlive-latex-fancyhdr
5888 texlive-latex-fancyvrb
5889 texlive-latex-fncychap
5890 texlive-latex-float
5891 texlive-latex-framed
5892 texlive-latex-geometry
5893 texlive-latex-graphics
5894 texlive-latex-hyperref
5895 texlive-latex-mdwtools
5896 texlive-latex-multirow
5897 texlive-latex-oberdiek
5898 texlive-latex-parskip
5899 texlive-latex-preview
5900 texlive-latex-tabulary
5901 texlive-latex-threeparttable
5902 texlive-latex-titlesec
5903 texlive-latex-trimspaces
5904 texlive-latex-ucs
5905 texlive-latex-upquote
5906 texlive-latex-url
5907 texlive-latex-varwidth
5908 texlive-latex-wrapfig)))
5909 ("texinfo" ,texinfo)))
5910 (arguments
5911 `(#:phases
5912 (modify-phases %standard-phases
5913 (add-after
5914 'install 'install-doc
5915 (lambda* (#:key inputs outputs #:allow-other-keys)
5916 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5917 (doc (string-append data "/doc/" ,name "-" ,version))
5918 (html (string-append doc "/html"))
5919 (man1 (string-append data "/man/man1"))
5920 (info (string-append data "/info"))
5921 (examples (string-append doc "/examples"))
5922 (python-arg (string-append "PYTHON=" (which "python"))))
5923 (setenv "LANG" "en_US.utf8")
5924 ;; Make installed package available for running the tests
5925 (add-installed-pythonpath inputs outputs)
5926 (with-directory-excursion "docs"
5927 ;; FIXME: pdf fails to build
5928 ;;(system* "make" "pdf" "PAPER=a4")
5929 (system* "make" python-arg "html")
5930 (system* "make" python-arg "info"))
5931 (copy-recursively "docs/man" man1)
5932 (copy-recursively "examples" examples)
5933 (copy-recursively "docs/build/html" html)
5934 ;; (copy-file "docs/build/latex/ipython.pdf"
5935 ;; (string-append doc "/ipython.pdf"))
5936 (mkdir-p info)
5937 (copy-file "docs/build/texinfo/ipython.info"
5938 (string-append info "/ipython.info"))
5939 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5940 ;; Tests can only be run after the library has been installed and not
5941 ;; within the source directory.
5942 (delete 'check)
5943 (add-after
5944 'install 'check
5945 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5946 (if tests?
5947 (with-directory-excursion "/tmp"
5948 ;; Make installed package available for running the tests
5949 (add-installed-pythonpath inputs outputs)
5950 (setenv "HOME" "/tmp/") ;; required by a test
5951 (zero? (system* (string-append (assoc-ref outputs "out")
5952 "/bin/iptest"))))
5953 #t)))
5954 (add-before
5955 'install 'fix-tests
5956 (lambda* (#:key inputs #:allow-other-keys)
5957 (substitute* "./IPython/utils/_process_posix.py"
5958 (("/usr/bin/env', 'which") (which "which")))
5959 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5960 (("#!/usr/bin/env python")
5961 (string-append "#!" (which "python"))))
5962 ;; Disable 1 failing test
5963 (substitute* "./IPython/core/tests/test_magic.py"
5964 (("def test_dirops\\(\\):" all)
5965 (string-append "@dec.skipif(True)\n" all))))))))
5966 (home-page "http://ipython.org")
5967 (synopsis "IPython is a tool for interactive computing in Python")
5968 (description
5969 "IPython provides a rich architecture for interactive computing with:
5970 Powerful interactive shells, a browser-based notebook, support for interactive
5971 data visualization, embeddable interpreters and tools for parallel
5972 computing.")
5973 (license license:bsd-3)
5974 (properties `((python2-variant . ,(delay python2-ipython))))))
5975
5976 (define-public python2-ipython
5977 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5978 (package
5979 (inherit ipython)
5980 ;; FIXME: add pyreadline once available.
5981 (propagated-inputs
5982 `(("python2-backports-shutil-get-terminal-size"
5983 ,python2-backports-shutil-get-terminal-size)
5984 ("python2-pathlib2" ,python2-pathlib2)
5985 ,@(package-propagated-inputs ipython)))
5986 (native-inputs
5987 `(("python2-mock" ,python2-mock)
5988 ,@(package-native-inputs ipython))))))
5989
5990 (define-public python-isodate
5991 (package
5992 (name "python-isodate")
5993 (version "0.5.4")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "isodate" version))
5998 (sha256
5999 (base32
6000 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
6001 (build-system python-build-system)
6002 (home-page
6003 "http://cheeseshop.python.org/pypi/isodate")
6004 (synopsis
6005 "Python date parser and formatter")
6006 (description
6007 "Python-isodate is a python module for parsing and formatting
6008 ISO 8601 dates, time and duration.")
6009 (license license:bsd-3)))
6010
6011 (define-public python2-isodate
6012 (package-with-python2 python-isodate))
6013
6014 (define-public python-html5lib
6015 (package
6016 (name "python-html5lib")
6017 (version "1.0b10")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "html5lib" version))
6022 (sha256
6023 (base32
6024 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
6025 (build-system python-build-system)
6026 (propagated-inputs
6027 `(("python-six" ,python-six)
6028 ("python-webencodings" ,python-webencodings)))
6029 (arguments
6030 `(#:test-target "check"))
6031 (home-page
6032 "https://github.com/html5lib/html5lib-python")
6033 (synopsis
6034 "Python HTML parser based on the WHATWG HTML specifcation")
6035 (description
6036 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
6037 and written in Python.")
6038 (license license:expat)))
6039
6040 (define-public python2-html5lib
6041 (package-with-python2 python-html5lib))
6042
6043 ;; Needed for python-bleach, a dependency of python-notebook
6044 (define-public python-html5lib-0.9
6045 (package
6046 (inherit python-html5lib)
6047 (version "0.999")
6048 (source
6049 (origin
6050 (method url-fetch)
6051 (uri (pypi-uri "html5lib" version))
6052 (sha256
6053 (base32
6054 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
6055
6056 (define-public python2-html5lib-0.9
6057 (package-with-python2 python-html5lib-0.9))
6058
6059 (define-public python-html5-parser
6060 (package
6061 (name "python-html5-parser")
6062 (version "0.4.4")
6063 (source (origin
6064 (method url-fetch)
6065 (uri (pypi-uri "html5-parser" version))
6066 (sha256
6067 (base32
6068 "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
6069 (build-system python-build-system)
6070 (native-inputs
6071 `(("pkg-config" ,pkg-config)))
6072 (inputs
6073 `(("libxml2" ,libxml2)))
6074 (propagated-inputs
6075 `(("python-lxml" ,python-lxml)
6076 ("python-beautifulsoup4" ,python-beautifulsoup4)))
6077 (home-page "https://html5-parser.readthedocs.io")
6078 (synopsis "Fast C-based HTML5 parsing for Python")
6079 (description "This package provides a fast implementation of the HTML5
6080 parsing spec for Python. Parsing is done in C using a variant of the gumbo
6081 parser. The gumbo parse tree is then transformed into an lxml tree, also in
6082 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
6083 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
6084 ;; indicate ASL2.0, including the LICENSE file for the whole project.
6085 (license (list license:asl2.0 license:gpl3))))
6086
6087 (define-public python2-html5-parser
6088 (package-with-python2 python-html5-parser))
6089
6090 (define-public python-webencodings
6091 (package
6092 (name "python-webencodings")
6093 (version "0.5")
6094 (source (origin
6095 (method url-fetch)
6096 (uri (pypi-uri "webencodings" version))
6097 (sha256
6098 (base32
6099 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
6100 (build-system python-build-system)
6101 (arguments
6102 '(#:phases
6103 (modify-phases %standard-phases
6104 (replace 'check
6105 (lambda _
6106 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
6107 (native-inputs
6108 `(("python-pytest" ,python-pytest)))
6109 (home-page "https://github.com/SimonSapin/python-webencodings")
6110 (synopsis "Character encoding aliases for legacy web content")
6111 (description
6112 "In order to be compatible with legacy web content when interpreting
6113 something like @code{Content-Type: text/html; charset=latin1}, tools need
6114 to use a particular set of aliases for encoding labels as well as some
6115 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
6116 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
6117 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
6118 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
6119 defines all such details so that implementations do not have to
6120 reverse-engineer each other.
6121
6122 This module implements the Encoding standard and has encoding labels and
6123 BOM detection, but the actual implementation for encoders and decoders
6124 is Python’s.")
6125 (license license:bsd-3)))
6126
6127 (define-public python2-webencodings
6128 (package-with-python2 python-webencodings))
6129
6130 (define-public python-urwid
6131 (package
6132 (name "python-urwid")
6133 (version "1.3.1")
6134 (source
6135 (origin
6136 (method url-fetch)
6137 (uri (pypi-uri "urwid" version))
6138 (sha256
6139 (base32
6140 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
6141 (build-system python-build-system)
6142 (arguments
6143 `(#:phases
6144 (modify-phases %standard-phases
6145 ;; Disable failing test. Bug filed upstream:
6146 ;; https://github.com/wardi/urwid/issues/164
6147 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
6148 (add-after 'unpack 'disable-failing-test
6149 (lambda _
6150 (substitute* "urwid/tests/test_event_loops.py"
6151 (("test_remove_watch_file")
6152 "disable_remove_watch_file")))))))
6153 (home-page "http://urwid.org")
6154 (synopsis "Console user interface library for Python")
6155 (description
6156 "Urwid is a curses-based UI/widget library for Python. It includes many
6157 features useful for text console applications.")
6158 (license license:lgpl2.1+)))
6159
6160 (define-public python2-urwid
6161 (let ((python2-urwid (package-with-python2 python-urwid)))
6162 (package
6163 (inherit python2-urwid)
6164 (arguments
6165 (append
6166 `(;; Explicitly using Python 2 is necessary due the argument list being
6167 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
6168 ;; package arguments, which by default assumes the use of Python 3.
6169 #:python ,python-2
6170 #:phases
6171 (modify-phases %standard-phases
6172 ;; Disable the vterm tests because of non-deterministic failures
6173 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
6174 (add-after 'unpack 'delete-test_vterm.py
6175 (delete-file "urwid/tests/test_vterm.py"))))
6176 (package-arguments python-urwid))))))
6177
6178 (define-public python-openid
6179 (package
6180 (name "python-openid")
6181 (version "3.0.10")
6182 (source
6183 (origin
6184 (method url-fetch)
6185 (uri (pypi-uri "python3-openid" version))
6186 (sha256
6187 (base32
6188 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
6189 (build-system python-build-system)
6190 (arguments
6191 `(#:phases
6192 (modify-phases %standard-phases
6193 (replace 'check
6194 (lambda _
6195 (zero? (system* "./admin/runtests")))))))
6196 (properties `((python2-variant . ,(delay python2-openid))))
6197 (propagated-inputs
6198 `(("python-defusedxml" ,python-defusedxml)))
6199 (native-inputs
6200 `(("python-psycopg2" ,python-psycopg2)
6201 ("python-django" ,python-django)))
6202 (home-page "https://github.com/necaris/python3-openid")
6203 (synopsis "OpenID support for servers and consumers")
6204 (description "This library provides OpenID authentication for Python, both
6205 for clients and servers.")
6206 (license license:asl2.0)))
6207
6208 (define-public python2-openid
6209 (package
6210 (name "python2-openid")
6211 (version "2.2.5")
6212 (source
6213 (origin
6214 (method url-fetch)
6215 (uri (pypi-uri "python-openid" version))
6216 (sha256
6217 (base32
6218 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
6219 (build-system python-build-system)
6220 (arguments
6221 ;; Python 3 support is in `python3-openid`, a separate package.
6222 `(#:python ,python-2))
6223 (home-page "https://github.com/openid/python-openid")
6224 (synopsis "OpenID support for servers and consumers")
6225 (description "This library provides OpenID authentication for Python, both
6226 for clients and servers.")
6227 (license license:asl2.0)))
6228
6229 (define-public python-urwidtrees
6230 (package
6231 (name "python-urwidtrees")
6232 (version "1.0.2")
6233 (source
6234 (origin
6235 (method url-fetch)
6236 ;; package author intends on distributing via github rather than pypi:
6237 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6238 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
6239 version ".tar.gz"))
6240 (file-name (string-append name "-" version ".tar.gz"))
6241 (sha256
6242 (base32
6243 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
6244 (build-system python-build-system)
6245 (arguments
6246 '(#:tests? #f)) ; no tests
6247 (propagated-inputs `(("python-urwid" ,python-urwid)))
6248 (home-page "https://github.com/pazz/urwidtrees")
6249 (synopsis "Tree widgets for urwid")
6250 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6251 toolkit. Use it to build trees of widgets.")
6252 (license license:gpl3+)))
6253
6254 (define-public python2-urwidtrees
6255 (package-with-python2 python-urwidtrees))
6256
6257 (define-public python-dbus
6258 (package
6259 (name "python-dbus")
6260 (version "1.2.0")
6261 (source
6262 (origin
6263 (method url-fetch)
6264 (uri (string-append
6265 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
6266 version ".tar.gz"))
6267 (sha256
6268 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6269 (build-system gnu-build-system)
6270 (arguments
6271 '(#:phases
6272 (modify-phases %standard-phases
6273 (add-before
6274 'check 'pre-check
6275 (lambda _
6276 ;; XXX: For the missing '/etc/machine-id'.
6277 (substitute* "test/run-test.sh"
6278 (("DBUS_FATAL_WARNINGS=1")
6279 "DBUS_FATAL_WARNINGS=0"))
6280 #t)))))
6281 (native-inputs
6282 `(("pkg-config" ,pkg-config)))
6283 (inputs
6284 `(("python" ,python)
6285 ("dbus-glib" ,dbus-glib)))
6286 (synopsis "Python bindings for D-bus")
6287 (description "python-dbus provides bindings for libdbus, the reference
6288 implementation of D-Bus.")
6289 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
6290 (license license:expat)))
6291
6292 (define-public python2-dbus
6293 (package (inherit python-dbus)
6294 (name "python2-dbus")
6295 (inputs `(("python" ,python-2)
6296 ,@(alist-delete "python"
6297 (package-inputs python-dbus)
6298 equal?)))
6299 ;; FIXME: on Python 2, the test_utf8 fails with:
6300 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6301 (arguments `(#:tests? #f))))
6302
6303 (define-public python-apsw
6304 (package
6305 (name "python-apsw")
6306 (version "3.9.2-r1")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "apsw" version))
6311 (sha256
6312 (base32
6313 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
6314 (build-system python-build-system)
6315 (inputs
6316 `(("sqlite" ,sqlite)))
6317 (arguments
6318 `(#:phases
6319 (modify-phases %standard-phases
6320 (replace 'build
6321 (lambda _
6322 (zero?
6323 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
6324 (add-after 'build 'build-test-helper
6325 (lambda _
6326 (zero?
6327 (system
6328 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
6329 "-I. -Isqlite3 src/testextension.c") ))))
6330 (delete 'check)
6331 (add-after 'install 'check
6332 (lambda* (#:key inputs outputs #:allow-other-keys)
6333 (add-installed-pythonpath inputs outputs)
6334 (zero? (system* "python" "setup.py" "test")))))))
6335 (home-page "https://github.com/rogerbinns/apsw/")
6336 (synopsis "Another Python SQLite Wrapper")
6337 (description "APSW is a Python wrapper for the SQLite
6338 embedded relational database engine. In contrast to other wrappers such as
6339 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6340 translate the complete SQLite API into Python.")
6341 (license license:zlib)))
6342
6343 (define-public python2-apsw
6344 (package-with-python2 python-apsw))
6345
6346 (define-public python-lxml
6347 (package
6348 (name "python-lxml")
6349 (version "3.8.0")
6350 (source
6351 (origin
6352 (method url-fetch)
6353 (uri (pypi-uri "lxml" version))
6354 (sha256
6355 (base32
6356 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
6357 (build-system python-build-system)
6358 (inputs
6359 `(("libxml2" ,libxml2)
6360 ("libxslt" ,libxslt)))
6361 (home-page "http://lxml.de/")
6362 (synopsis
6363 "Python XML processing library")
6364 (description
6365 "The lxml XML toolkit is a Pythonic binding for the C libraries
6366 libxml2 and libxslt.")
6367 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6368
6369 (define-public python2-lxml
6370 (package-with-python2 python-lxml))
6371
6372 ;; beautifulsoup4 has a totally different namespace than 3.x,
6373 ;; and pypi seems to put it under its own name, so I guess we should too
6374 (define-public python-beautifulsoup4
6375 (package
6376 (name "python-beautifulsoup4")
6377 (version "4.5.3")
6378 (source
6379 (origin
6380 (method url-fetch)
6381 (uri (pypi-uri "beautifulsoup4" version))
6382 (sha256
6383 (base32
6384 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6385 (build-system python-build-system)
6386 (arguments
6387 `(#:phases
6388 (modify-phases %standard-phases
6389 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6390 ;; must use this conversion script when building with Python 3. The
6391 ;; conversion script also runs the tests.
6392 ;; For more information, see the file 'convert-py3k' in the source
6393 ;; distribution.
6394 (replace 'check
6395 (lambda _ (zero? (system* "./convert-py3k")))))))
6396 (home-page
6397 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6398 (synopsis
6399 "Python screen-scraping library")
6400 (description
6401 "Beautiful Soup is a Python library designed for rapidly setting up
6402 screen-scraping projects. It offers Pythonic idioms for navigating,
6403 searching, and modifying a parse tree, providing a toolkit for
6404 dissecting a document and extracting what you need. It automatically
6405 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6406 (license license:expat)
6407 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6408
6409 (define-public python2-beautifulsoup4
6410 (package
6411 (inherit (package-with-python2
6412 (strip-python2-variant python-beautifulsoup4)))
6413 (arguments `(#:python ,python-2))))
6414
6415 (define-public python-cssutils
6416 (package
6417 (name "python-cssutils")
6418 (version "1.0.1")
6419 (source
6420 (origin
6421 (method url-fetch)
6422 (uri (pypi-uri "cssutils" version))
6423 (sha256
6424 (base32
6425 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6426 (build-system python-build-system)
6427 (native-inputs
6428 `(("unzip" ,unzip))) ; for unpacking the source
6429 (arguments
6430 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6431 (home-page "http://cthedot.de/cssutils/")
6432 (synopsis
6433 "CSS Cascading Style Sheets library for Python")
6434 (description
6435 "Cssutils is a Python package for parsing and building CSS
6436 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6437 options.")
6438 (license license:lgpl3+)))
6439
6440 (define-public python2-cssutils
6441 (package-with-python2 python-cssutils))
6442
6443 (define-public python-cssselect
6444 (package
6445 (name "python-cssselect")
6446 (version "0.9.2")
6447 (source
6448 (origin
6449 (method url-fetch)
6450 (uri (pypi-uri "cssselect" version))
6451 (sha256
6452 (base32
6453 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6454 (build-system python-build-system)
6455 (arguments
6456 ;; tests fail with message
6457 ;; AttributeError: 'module' object has no attribute 'tests'
6458 `(#:tests? #f))
6459 (home-page
6460 "https://pythonhosted.org/cssselect/")
6461 (synopsis
6462 "CSS3 selector parser and translator to XPath 1.0")
6463 (description
6464 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6465 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6466 another XPath engine to find the matching elements in an XML or HTML document.")
6467 (license license:bsd-3)))
6468
6469 (define-public python2-cssselect
6470 (package-with-python2 python-cssselect))
6471
6472 (define-public python-openid-cla
6473 (package
6474 (name "python-openid-cla")
6475 (version "1.2")
6476 (source
6477 (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "python-openid-cla" version))
6480 (sha256
6481 (base32
6482 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6483 (build-system python-build-system)
6484 (arguments '(#:tests? #f)) ; No tests.
6485 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6486 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6487 (description "@code{openid-cla} is an implementation of the OpenID
6488 contributor license agreement extension for python-openid.")
6489 (license license:bsd-3)))
6490
6491 (define-public python2-openid-cla
6492 (package-with-python2 python-openid-cla))
6493
6494 (define-public python-openid-teams
6495 (package
6496 (name "python-openid-teams")
6497 (version "1.1")
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (pypi-uri "python-openid-teams" version))
6502 (sha256
6503 (base32
6504 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6505 (build-system python-build-system)
6506 (arguments '(#:tests? #f)) ; No tests.
6507 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6508 (synopsis "Implementation of the OpenID teams extension for python-openid")
6509 (description
6510 "@code{openid-teams} is an implementation of the OpenID
6511 teams extension for python-openid.")
6512 (license license:bsd-3)))
6513
6514 (define-public python2-openid-teams
6515 (package-with-python2 python-openid-teams))
6516
6517 (define-public python-netifaces
6518 (package
6519 (name "python-netifaces")
6520 (version "0.10.4")
6521 (source
6522 (origin
6523 (method url-fetch)
6524 (uri (string-append
6525 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6526 version
6527 ".tar.gz"))
6528 (sha256
6529 (base32
6530 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6531 (build-system python-build-system)
6532 (home-page
6533 "https://bitbucket.org/al45tair/netifaces")
6534 (synopsis
6535 "Python module for portable network interface information")
6536 (description
6537 "Netifaces is a Python module providing information on network
6538 interfaces in an easy and portable manner.")
6539 (license license:expat)))
6540
6541 (define-public python2-netifaces
6542 (package-with-python2 python-netifaces))
6543
6544 (define-public python-networkx
6545 (package
6546 (name "python-networkx")
6547 (version "1.11")
6548 (source
6549 (origin
6550 (method url-fetch)
6551 (uri (pypi-uri "networkx" version))
6552 (sha256
6553 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6554 (build-system python-build-system)
6555 ;; python-decorator is needed at runtime
6556 (propagated-inputs
6557 `(("python-decorator" ,python-decorator)))
6558 (native-inputs
6559 `(("python-nose" ,python-nose)))
6560 (home-page "http://networkx.github.io/")
6561 (synopsis "Python module for creating and manipulating graphs and networks")
6562 (description
6563 "NetworkX is a Python package for the creation, manipulation, and study
6564 of the structure, dynamics, and functions of complex networks.")
6565 (license license:bsd-3)))
6566
6567 (define-public python2-networkx
6568 (package-with-python2 python-networkx))
6569
6570 (define-public snakemake
6571 (package
6572 (name "snakemake")
6573 (version "3.13.3")
6574 (source
6575 (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "snakemake" version))
6578 (sha256
6579 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
6580 (build-system python-build-system)
6581 (arguments
6582 ;; TODO: Package missing test dependencies.
6583 '(#:tests? #f
6584 #:phases
6585 (modify-phases %standard-phases
6586 ;; For cluster execution Snakemake will call Python. Since there is
6587 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6588 ;; this by calling the snakemake wrapper instead.
6589 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6590 (lambda* (#:key outputs #:allow-other-keys)
6591 (substitute* "snakemake/executors.py"
6592 (("\\{sys.executable\\} -m snakemake")
6593 (string-append (assoc-ref outputs "out")
6594 "/bin/snakemake")))
6595 #t)))))
6596 (propagated-inputs
6597 `(("python-wrapt" ,python-wrapt)
6598 ("python-requests" ,python-requests)))
6599 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6600 (synopsis "Python-based execution environment for make-like workflows")
6601 (description
6602 "Snakemake aims to reduce the complexity of creating workflows by
6603 providing a clean and modern domain specific specification language (DSL) in
6604 Python style, together with a fast and comfortable execution environment.")
6605 (license license:expat)))
6606
6607 (define-public python-seaborn
6608 (package
6609 (name "python-seaborn")
6610 (version "0.7.1")
6611 (source
6612 (origin
6613 (method url-fetch)
6614 (uri (pypi-uri "seaborn" version))
6615 (sha256
6616 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6617 (build-system python-build-system)
6618 (arguments
6619 '(#:tests? #f)) ; Tests requires a running X11 server.
6620 (propagated-inputs
6621 `(("python-pandas" ,python-pandas)
6622 ("python-matplotlib" ,python-matplotlib)
6623 ("python-scipy" ,python-scipy)))
6624 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6625 (synopsis "Statistical data visualization")
6626 (description
6627 "Seaborn is a library for making attractive and informative statistical
6628 graphics in Python. It is built on top of matplotlib and tightly integrated
6629 with the PyData stack, including support for numpy and pandas data structures
6630 and statistical routines from scipy and statsmodels.")
6631 (license license:bsd-3)
6632 (properties `((python2-variant . ,(delay python2-seaborn))))))
6633
6634 (define-public python2-seaborn
6635 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6636 (package
6637 (inherit base)
6638 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6639 ,@(package-propagated-inputs base))))))
6640
6641 (define-public python-mpmath
6642 (package
6643 (name "python-mpmath")
6644 (version "0.19")
6645 (source (origin
6646 (method url-fetch)
6647 (uri (string-append "http://mpmath.org/files/mpmath-"
6648 version ".tar.gz"))
6649 (sha256
6650 (base32
6651 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6652 (build-system python-build-system)
6653 (arguments
6654 '(#:phases
6655 (modify-phases %standard-phases
6656 (replace 'check
6657 (lambda _
6658 (zero?
6659 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6660 (home-page "http://mpmath.org")
6661 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6662 (description
6663 "@code{mpmath} can be used as an arbitrary-precision substitute for
6664 Python's float/complex types and math/cmath modules, but also does much
6665 more advanced mathematics.")
6666 (license license:bsd-3)))
6667
6668 (define-public python2-mpmath
6669 (package-with-python2 python-mpmath))
6670
6671 (define-public python-sympy
6672 (package
6673 (name "python-sympy")
6674 (version "1.0")
6675 (source
6676 (origin
6677 (method url-fetch)
6678 (uri (string-append
6679 "https://github.com/sympy/sympy/releases/download/sympy-"
6680 version "/sympy-" version ".tar.gz"))
6681 (sha256
6682 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6683 (build-system python-build-system)
6684 (propagated-inputs
6685 `(("python-mpmath" ,python-mpmath)))
6686 (home-page "http://www.sympy.org/")
6687 (synopsis "Python library for symbolic mathematics")
6688 (description
6689 "SymPy is a Python library for symbolic mathematics. It aims to become a
6690 full-featured computer algebra system (CAS) while keeping the code as simple
6691 as possible in order to be comprehensible and easily extensible.")
6692 (license license:bsd-3)))
6693
6694 (define-public python2-sympy
6695 (package-with-python2 python-sympy))
6696
6697 (define-public python-q
6698 (package
6699 (name "python-q")
6700 (version "2.6")
6701 (source
6702 (origin
6703 (method url-fetch)
6704 (uri (pypi-uri "q" version))
6705 (sha256
6706 (base32
6707 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6708 (build-system python-build-system)
6709 (home-page "https://github.com/zestyping/q")
6710 (synopsis "Quick-and-dirty debugging output for tired programmers")
6711 (description
6712 "q is a Python module for \"print\" style of debugging Python code. It
6713 provides convenient short API for print out of values, tracebacks, and
6714 falling into the Python interpreter.")
6715 (license license:asl2.0)))
6716
6717 (define-public python2-q
6718 (package-with-python2 python-q))
6719
6720 (define-public python-testlib
6721 (package
6722 (name "python-testlib")
6723 (version "0.6.5")
6724 (source
6725 (origin
6726 (method url-fetch)
6727 (uri (string-append
6728 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6729 version ".zip"))
6730 (sha256
6731 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6732 (build-system python-build-system)
6733 (native-inputs
6734 `(("unzip" ,unzip))) ; for unpacking the source
6735 (synopsis "Python micro test suite harness")
6736 (description "A micro unittest suite harness for Python.")
6737 (home-page "https://github.com/trentm/testlib")
6738 (license license:expat)))
6739
6740 (define-public python2-testlib
6741 (package-with-python2 python-testlib))
6742
6743 (define-public python2-xlib
6744 (package
6745 (name "python2-xlib")
6746 (version "0.14")
6747 (source (origin
6748 (method url-fetch)
6749 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6750 "/" version "/"
6751 "python-xlib-" version ".tar.gz"))
6752 (sha256
6753 (base32
6754 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6755 (build-system python-build-system)
6756 (arguments
6757 `(#:python ,python-2 ;Python 2 only
6758 #:tests? #f)) ;no tests
6759 (home-page "http://python-xlib.sourceforge.net/")
6760 (synopsis "Python X11 client library")
6761 (description
6762 "The Python X Library is intended to be a fully functional X client
6763 library for Python programs. It is useful to implement low-level X clients.
6764 It is written entirely in Python.")
6765 (license license:gpl2+)))
6766
6767 (define-public python-singledispatch
6768 (package
6769 (name "python-singledispatch")
6770 (version "3.4.0.3")
6771 (source
6772 (origin
6773 (method url-fetch)
6774 (uri (pypi-uri "singledispatch" version))
6775 (sha256
6776 (base32
6777 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6778 (build-system python-build-system)
6779 (native-inputs
6780 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6781 (home-page
6782 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6783 (synopsis "Backport of singledispatch feature from Python 3.4")
6784 (description
6785 "This library brings functools.singledispatch from Python 3.4 to Python
6786 2.6-3.3.")
6787 (license license:expat)))
6788
6789 (define-public python2-singledispatch
6790 (package-with-python2 python-singledispatch))
6791
6792 (define-public python-tornado
6793 (package
6794 (name "python-tornado")
6795 (version "4.5.1")
6796 (source
6797 (origin
6798 (method url-fetch)
6799 (uri (pypi-uri "tornado" version))
6800 (sha256
6801 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6802 (build-system python-build-system)
6803 (arguments
6804 '(;; FIXME: Two tests error out with:
6805 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6806 ;; #:phases
6807 ;; (modify-phases %standard-phases
6808 ;; (replace 'check
6809 ;; (lambda _
6810 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6811 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6812 ;; (zero? (system* "python" "-m" "tornado.test")))))
6813 #:tests? #f))
6814 (native-inputs
6815 `(("python-certifi" ,python-certifi)))
6816 (propagated-inputs
6817 `(("python-backports-abc" ,python-backports-abc)))
6818 (home-page "http://www.tornadoweb.org/")
6819 (synopsis "Python web framework and asynchronous networking library")
6820 (description
6821 "Tornado is a Python web framework and asynchronous networking library,
6822 originally developed at FriendFeed. By using non-blocking network I/O,
6823 Tornado can scale to tens of thousands of open connections, making it ideal
6824 for long polling, WebSockets, and other applications that require a long-lived
6825 connection to each user.")
6826 (license license:asl2.0)
6827 (properties `((python2-variant . ,(delay python2-tornado))))))
6828
6829 (define-public python2-tornado
6830 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6831 (package (inherit tornado)
6832 (propagated-inputs
6833 `(("python2-backport-ssl-match-hostname"
6834 ,python2-backport-ssl-match-hostname)
6835 ("python2-singledispatch" ,python2-singledispatch)
6836 ,@(package-propagated-inputs tornado))))))
6837
6838 (define-public python-tornado-http-auth
6839 (package
6840 (name "python-tornado-http-auth")
6841 (version "1.1.0")
6842 (source
6843 (origin
6844 (method url-fetch)
6845 (uri (pypi-uri "tornado-http-auth" version))
6846 (sha256
6847 (base32
6848 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6849 (build-system python-build-system)
6850 (propagated-inputs
6851 `(("python-tornado" ,python-tornado)))
6852 (home-page
6853 "https://github.com/gvalkov/tornado-http-auth")
6854 (synopsis
6855 "Digest and basic authentication module for Tornado")
6856 (description
6857 "Provides support for adding authentication to services using the Tornado
6858 web framework, either via the basic or digest authentication schemes.")
6859 (license license:asl2.0)))
6860
6861 ;; the python- version can be removed with python-3.5
6862 (define-public python-backports-abc
6863 (package
6864 (name "python-backports-abc")
6865 (version "0.5")
6866 (source
6867 (origin
6868 (method url-fetch)
6869 (uri (pypi-uri "backports_abc" version))
6870 (sha256
6871 (base32
6872 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6873 (build-system python-build-system)
6874 (home-page "https://github.com/cython/backports_abc")
6875 (synopsis "Backport of additions to the 'collections.abc' module")
6876 (description
6877 "Python-backports-abc provides a backport of additions to the
6878 'collections.abc' module in Python-3.5.")
6879 (license license:psfl)))
6880
6881 (define-public python2-backports-abc
6882 (package-with-python2 python-backports-abc))
6883
6884 (define-public python-backports-csv
6885 (package
6886 (name "python-backports-csv")
6887 (version "1.0.5")
6888 (source
6889 (origin
6890 (method url-fetch)
6891 (uri (pypi-uri "backports.csv" version))
6892 (sha256
6893 (base32
6894 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6895 (build-system python-build-system)
6896 (home-page "https://github.com/ryanhiebert/backports.csv")
6897 (synopsis "Backport of Python 3's csv module for Python 2")
6898 (description
6899 "Provides a backport of Python 3's @code{csv} module for parsing
6900 comma separated values. The API of the @code{csv} module in Python 2
6901 is drastically different from the @code{csv} module in Python 3.
6902 This is due, for the most part, to the difference between str in
6903 Python 2 and Python 3.")
6904 (license license:psfl)))
6905
6906 (define-public python2-backports-csv
6907 (package-with-python2 python-backports-csv))
6908
6909 (define-public python2-backports-shutil-get-terminal-size
6910 (package
6911 (name "python2-backports-shutil-get-terminal-size")
6912 (version "1.0.0")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6917 (sha256
6918 (base32
6919 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6920 (build-system python-build-system)
6921 (arguments
6922 `(#:python ,python-2
6923 #:phases
6924 (modify-phases %standard-phases
6925 (replace 'check
6926 (lambda _
6927 (zero? (system* "py.test" "-v")))))))
6928 (native-inputs
6929 `(("python2-pytest" ,python2-pytest)))
6930 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6931 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6932 (description
6933 "This package provides a backport of the @code{get_terminal_size
6934 function} from Python 3.3's @code{shutil}.
6935 Unlike the original version it is written in pure Python rather than C,
6936 so it might be a tiny bit slower.")
6937 (license license:expat)))
6938
6939 (define-public python-waf
6940 (package
6941 (name "python-waf")
6942 (version "1.9.8")
6943 (source (origin
6944 (method url-fetch)
6945 (uri (string-append "https://waf.io/"
6946 "waf-" version ".tar.bz2"))
6947 (sha256
6948 (base32
6949 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6950 (build-system python-build-system)
6951 (arguments
6952 '(#:phases
6953 (modify-phases %standard-phases
6954 (replace 'build
6955 (lambda _
6956 (zero? (system* "python" "waf-light" "configure" "build"))))
6957 (replace 'check
6958 (lambda _
6959 (zero? (system* "python" "waf" "--version"))))
6960 (replace 'install
6961 (lambda _
6962 (copy-file "waf" %output))))))
6963 (home-page "https://waf.io/")
6964 (synopsis "Python-based build system")
6965 (description
6966 "Waf is a Python-based framework for configuring, compiling and installing
6967 applications.")
6968 (license license:bsd-3)))
6969
6970 (define-public python2-waf
6971 (package-with-python2 python-waf))
6972
6973 (define-public python-pyzmq
6974 (package
6975 (name "python-pyzmq")
6976 (version "15.1.0")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "pyzmq" version))
6981 (sha256
6982 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6983 (build-system python-build-system)
6984 (arguments
6985 `(#:configure-flags
6986 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6987 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6988 ;; --inplace' for 'python setup.py test' to work.
6989 #:tests? #f))
6990 (inputs
6991 `(("zeromq" ,zeromq)))
6992 (native-inputs
6993 `(("pkg-config" ,pkg-config)
6994 ("python-nose" ,python-nose)))
6995 (home-page "https://github.com/zeromq/pyzmq")
6996 (synopsis "Python bindings for 0MQ")
6997 (description
6998 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6999 (license license:bsd-4)))
7000
7001 (define-public python2-pyzmq
7002 (package-with-python2 python-pyzmq))
7003
7004 (define-public python-pep8
7005 (package
7006 (name "python-pep8")
7007 (version "1.7.0")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 (uri (pypi-uri "pep8" version))
7012 (sha256
7013 (base32
7014 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
7015 (build-system python-build-system)
7016 (home-page "http://pep8.readthedocs.org/")
7017 (synopsis "Python style guide checker")
7018 (description
7019 "This tools checks Python code against some of the style conventions in
7020 PEP 8.")
7021 (license license:expat)))
7022
7023 (define-public python2-pep8
7024 (package-with-python2 python-pep8))
7025
7026 (define-public python-pyflakes
7027 (package
7028 (name "python-pyflakes")
7029 (version "1.0.0")
7030 (source
7031 (origin
7032 (method url-fetch)
7033 (uri (pypi-uri "pyflakes" version))
7034 (sha256
7035 (base32
7036 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
7037 (build-system python-build-system)
7038 (home-page
7039 "https://github.com/pyflakes/pyflakes")
7040 (synopsis "Passive checker of Python programs")
7041 (description
7042 "Pyflakes statically checks Python source code for common errors.")
7043 (license license:expat)))
7044
7045 (define-public python2-pyflakes
7046 (package-with-python2 python-pyflakes))
7047
7048 (define-public python-mccabe
7049 (package
7050 (name "python-mccabe")
7051 (version "0.4.0")
7052 (source
7053 (origin
7054 (method url-fetch)
7055 (uri (pypi-uri "mccabe" version))
7056 (sha256
7057 (base32
7058 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
7059 (build-system python-build-system)
7060 (native-inputs
7061 `(("python-pytest" ,python-pytest)
7062 ("python-pytest-runner" ,python-pytest-runner)))
7063 (home-page "https://github.com/flintwork/mccabe")
7064 (synopsis "McCabe checker, plugin for flake8")
7065 (description
7066 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7067 complexity of Python source code.")
7068 (license license:expat)))
7069
7070 (define-public python2-mccabe
7071 (package-with-python2 python-mccabe))
7072
7073 (define-public python-mccabe-0.2.1
7074 (package (inherit python-mccabe)
7075 (version "0.2.1")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "mccabe" version))
7080 (sha256
7081 (base32
7082 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7083
7084 (define-public python2-mccabe-0.2.1
7085 (package-with-python2 python-mccabe-0.2.1))
7086
7087 ;; Flake8 2.4.1 requires an older version of pep8.
7088 ;; This should be removed ASAP.
7089 (define-public python-pep8-1.5.7
7090 (package (inherit python-pep8)
7091 (version "1.5.7")
7092 (source
7093 (origin
7094 (method url-fetch)
7095 (uri (string-append
7096 "https://pypi.python.org/packages/source/p/pep8/pep8-"
7097 version
7098 ".tar.gz"))
7099 (sha256
7100 (base32
7101 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7102 (arguments
7103 ;; XXX Tests not compatible with Python 3.5.
7104 '(#:tests? #f))))
7105
7106 (define-public python2-pep8-1.5.7
7107 (package-with-python2 python-pep8-1.5.7))
7108
7109 ;; Flake8 2.4.1 requires an older version of pyflakes.
7110 ;; This should be removed ASAP.
7111 (define-public python-pyflakes-0.8.1
7112 (package (inherit python-pyflakes)
7113 (version "0.8.1")
7114 (source
7115 (origin
7116 (method url-fetch)
7117 (uri (string-append
7118 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
7119 version
7120 ".tar.gz"))
7121 (sha256
7122 (base32
7123 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7124 (arguments
7125 ;; XXX Tests not compatible with Python 3.5.
7126 '(#:tests? #f))))
7127
7128 (define-public python2-pyflakes-0.8.1
7129 (package-with-python2 python-pyflakes-0.8.1))
7130
7131 (define-public python-flake8
7132 (package
7133 (name "python-flake8")
7134 (version "2.5.4")
7135 (source
7136 (origin
7137 (method url-fetch)
7138 (uri (pypi-uri "flake8" version))
7139 (sha256
7140 (base32
7141 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
7142 (modules '((guix build utils)))
7143 (snippet
7144 '(begin
7145 ;; Remove pre-compiled .pyc files from source.
7146 (for-each delete-file-recursively
7147 (find-files "." "__pycache__" #:directories? #t))
7148 (for-each delete-file (find-files "." "\\.pyc$"))
7149 #t))))
7150 (build-system python-build-system)
7151 (propagated-inputs
7152 `(("python-pep8" ,python-pep8)
7153 ("python-pyflakes" ,python-pyflakes)
7154 ("python-mccabe" ,python-mccabe)))
7155 (native-inputs
7156 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
7157 ("python-nose" ,python-nose)))
7158 (home-page "https://gitlab.com/pycqa/flake8")
7159 (synopsis
7160 "The modular source code checker: pep8, pyflakes and co")
7161 (description
7162 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7163 (license license:expat)))
7164
7165 (define-public python2-flake8
7166 (package-with-python2 python-flake8))
7167
7168 (define-public python-flake8-polyfill
7169 (package
7170 (name "python-flake8-polyfill")
7171 (version "1.0.1")
7172 (source
7173 (origin
7174 (method url-fetch)
7175 (uri (pypi-uri "flake8-polyfill" version))
7176 (sha256
7177 (base32
7178 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
7179 (build-system python-build-system)
7180 (arguments
7181 '(#:phases
7182 (modify-phases %standard-phases
7183 (replace 'check
7184 (lambda _
7185 (setenv "PYTHONPATH"
7186 (string-append (getcwd) "/build/lib:"
7187 (getenv "PYTHONPATH")))
7188 (zero? (system* "py.test" "-v")))))))
7189 (native-inputs
7190 `(("python-flake8" ,python-flake8)
7191 ("python-mock" ,python-mock)
7192 ("python-pycodestyle" ,python-pycodestyle)
7193 ("python-pytest" ,python-pytest)))
7194 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7195 (synopsis "Polyfill package for Flake8 plugins")
7196 (description
7197 "This package that provides some compatibility helpers for Flake8
7198 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7199 (license license:expat)))
7200
7201 (define-public python2-flake8-polyfill
7202 (package-with-python2 python-flake8-polyfill))
7203
7204 (define-public python-mistune
7205 (package
7206 (name "python-mistune")
7207 (version "0.7.3")
7208 (source
7209 (origin
7210 (method url-fetch)
7211 (uri (pypi-uri "mistune" version))
7212 (sha256
7213 (base32
7214 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
7215 (build-system python-build-system)
7216 (native-inputs
7217 `(("python-nose" ,python-nose)
7218 ("python-cython" ,python-cython)))
7219 (home-page "https://github.com/lepture/mistune")
7220 (synopsis "Markdown parser in pure Python")
7221 (description "This package provides a fast markdown parser in pure
7222 Python.")
7223 (license license:bsd-3)))
7224
7225 (define-public python2-mistune
7226 (package-with-python2 python-mistune))
7227
7228 (define-public python-markdown
7229 (package
7230 (name "python-markdown")
7231 (version "2.6.8")
7232 (source
7233 (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "Markdown" version))
7236 (sha256
7237 (base32
7238 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
7239 (build-system python-build-system)
7240 (arguments
7241 `(#:phases
7242 (modify-phases %standard-phases
7243 (replace 'check
7244 (lambda _
7245 (zero? (system* "python" "run-tests.py")))))))
7246 (native-inputs
7247 `(("python-nose" ,python-nose)
7248 ("python-pyyaml" ,python-pyyaml)))
7249 (home-page "https://pythonhosted.org/Markdown/")
7250 (synopsis "Python implementation of Markdown")
7251 (description
7252 "This package provides a Python implementation of John Gruber's
7253 Markdown. The library features international input, various Markdown
7254 extensions, and several HTML output formats. A command line wrapper
7255 markdown_py is also provided to convert Markdown files to HTML.")
7256 (license license:bsd-3)))
7257
7258 (define-public python2-markdown
7259 (package-with-python2 python-markdown))
7260
7261 (define-public python-ptyprocess
7262 (package
7263 (name "python-ptyprocess")
7264 (version "0.5.1")
7265 (source
7266 (origin
7267 (method url-fetch)
7268 (uri (string-append
7269 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
7270 version ".tar.gz"))
7271 (sha256
7272 (base32
7273 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
7274 (build-system python-build-system)
7275 (native-inputs
7276 `(("python-nose" ,python-nose)))
7277 (arguments
7278 `(#:phases
7279 (modify-phases %standard-phases
7280 (replace 'check
7281 (lambda _
7282 (zero? (system* "nosetests")))))))
7283 (home-page "https://github.com/pexpect/ptyprocess")
7284 (synopsis "Run a subprocess in a pseudo terminal")
7285 (description
7286 "This package provides a Python library used to launch a subprocess in a
7287 pseudo terminal (pty), and interact with both the process and its pty.")
7288 (license license:isc)))
7289
7290 (define-public python2-ptyprocess
7291 (package-with-python2 python-ptyprocess))
7292
7293 (define-public python-cram
7294 (package
7295 (name "python-cram")
7296 (version "0.7")
7297 (home-page "https://bitheap.org/cram/")
7298 (source (origin
7299 (method url-fetch)
7300 (uri (list (string-append home-page "cram-"
7301 version ".tar.gz")
7302 (pypi-uri "cram" version)))
7303 (sha256
7304 (base32
7305 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7306 (arguments
7307 '(#:phases
7308 (modify-phases %standard-phases
7309 (add-after 'unpack 'patch-source
7310 (lambda _
7311 (substitute* (find-files "cram" ".*\\.py$")
7312 ;; Replace default shell path.
7313 (("/bin/sh") (which "sh")))
7314 (substitute* (find-files "tests" ".*\\.t$")
7315 (("md5") "md5sum")
7316 (("/bin/bash") (which "bash"))
7317 (("/bin/sh") (which "sh")))
7318 (substitute* "cram/_test.py"
7319 ;; This hack works around a bug triggered by substituting
7320 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7321 ;; "cram -h", which breaks the output at 80 characters. This
7322 ;; causes the line showing the default shell to break into two
7323 ;; lines, but the test expects a single line...
7324 (("env\\['COLUMNS'\\] = '80'")
7325 "env['COLUMNS'] = '160'"))
7326 #t))
7327 (delete 'check)
7328 (add-after 'install 'check
7329 ;; The test phase uses the built library and executable.
7330 ;; It's easier to run it after install since the build
7331 ;; directory contains version-specific PATH.
7332 (lambda* (#:key inputs outputs #:allow-other-keys)
7333 (add-installed-pythonpath inputs outputs)
7334 (setenv "PATH" (string-append (getenv "PATH") ":"
7335 (assoc-ref outputs "out") "/bin"))
7336 (zero? (system* "make" "test")))))))
7337 (build-system python-build-system)
7338 (native-inputs
7339 `(("python-coverage" ,python-coverage)
7340 ("which" ,which)))
7341 (synopsis "Simple testing framework for command line applications")
7342 (description
7343 "Cram is a functional testing framework for command line applications.
7344 Cram tests look like snippets of interactive shell sessions. Cram runs each
7345 command and compares the command output in the test with the command’s actual
7346 output.")
7347 (license license:gpl2+)))
7348
7349 (define-public python2-cram
7350 (package-with-python2 python-cram))
7351
7352 (define-public python-terminado
7353 (package
7354 (name "python-terminado")
7355 (version "0.6")
7356 (source
7357 (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "terminado" version))
7360 (sha256
7361 (base32
7362 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7363 (build-system python-build-system)
7364 (propagated-inputs
7365 `(("python-tornado" ,python-tornado)
7366 ("python-ptyprocess" ,python-ptyprocess)))
7367 (native-inputs
7368 `(("python-nose" ,python-nose)))
7369 (arguments
7370 `(#:phases
7371 (modify-phases %standard-phases
7372 (replace 'check
7373 (lambda _
7374 (zero? (system* "nosetests")))))))
7375 (home-page "https://github.com/takluyver/terminado")
7376 (synopsis "Terminals served to term.js using Tornado websockets")
7377 (description "This package provides a Tornado websocket backend for the
7378 term.js Javascript terminal emulator library.")
7379 (license license:bsd-2)
7380 (properties `((python2-variant . ,(delay python2-terminado))))))
7381
7382 (define-public python2-terminado
7383 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7384 (package (inherit terminado)
7385 (propagated-inputs
7386 `(("python2-backport-ssl-match-hostname"
7387 ,python2-backport-ssl-match-hostname)
7388 ,@(package-propagated-inputs terminado))))))
7389
7390 (define-public python-straight-plugin
7391 (package
7392 (name "python-straight-plugin")
7393 (version "1.4.1")
7394 (source
7395 (origin
7396 (method url-fetch)
7397 (uri (pypi-uri "straight.plugin" version))
7398 (sha256
7399 (base32
7400 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7401 (build-system python-build-system)
7402 (home-page "https://github.com/ironfroggy/straight.plugin")
7403 (synopsis "Simple namespaced plugin facility")
7404 (description "Straight Plugin provides a type of plugin you can create from
7405 almost any existing Python modules, and an easy way for outside developers to
7406 add functionality and customization to your projects with their own plugins.")
7407 (license license:expat)))
7408
7409 (define-public python2-straight-plugin
7410 (package-with-python2 python-straight-plugin))
7411
7412 (define-public python-fonttools
7413 (package
7414 (name "python-fonttools")
7415 (version "2.5")
7416 (source (origin
7417 (method url-fetch)
7418 (uri (string-append
7419 "https://pypi.python.org/packages/source/F/FontTools/"
7420 "fonttools-" version ".tar.gz"))
7421 (sha256
7422 (base32
7423 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7424 (build-system python-build-system)
7425 (arguments
7426 '(#:test-target "check"
7427 #:phases
7428 (modify-phases %standard-phases
7429 (add-after 'unpack 'patch-setuppy
7430 ;; Remove the undocumented "extra_path" argument, which adds an
7431 ;; intervening directories between site-packages and the package
7432 ;; directory.
7433 (lambda _
7434 (substitute* "setup.py"
7435 (("^[ \t]*extra_path *= *'FontTools',") ""))
7436 #t)))))
7437 (home-page "https://github.com/behdad/fonttools")
7438 (synopsis "Tools to manipulate font files")
7439 (description
7440 "FontTools/TTX is a library to manipulate font files from Python. It
7441 supports reading and writing of TrueType/OpenType fonts, reading and writing
7442 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7443 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7444 from an XML-based format.")
7445 (license (license:non-copyleft
7446 "file://LICENSE.txt"
7447 "See LICENSE.txt in the distribution."))))
7448
7449 (define-public python2-fonttools
7450 (package-with-python2 python-fonttools))
7451
7452 (define-public python-ly
7453 (package
7454 (name "python-ly")
7455 (version "0.9.4")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7460 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7461 "/python-ly-" version ".tar.gz"))
7462 (sha256
7463 (base32
7464 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7465 (build-system python-build-system)
7466 (arguments
7467 ;; FIXME: Some tests need network access.
7468 '(#:tests? #f))
7469 (synopsis "Tool and library for manipulating LilyPond files")
7470 (description "This package provides a Python library to parse, manipulate
7471 or create documents in LilyPond format. A command line program ly is also
7472 provided that can be used to do various manipulations with LilyPond files.")
7473 (home-page "https://pypi.python.org/pypi/python-ly")
7474 (license license:gpl2+)))
7475
7476 (define-public python-appdirs
7477 (package
7478 (name "python-appdirs")
7479 (version "1.4.3")
7480 (source
7481 (origin
7482 (method url-fetch)
7483 (uri (pypi-uri "appdirs" version))
7484 (sha256
7485 (base32
7486 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7487 (build-system python-build-system)
7488 (home-page "https://github.com/ActiveState/appdirs")
7489 (synopsis
7490 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7491 (description
7492 "This module provides a portable way of finding out where user data
7493 should be stored on various operating systems.")
7494 (license license:expat)))
7495
7496 (define-public python2-appdirs
7497 (package-with-python2 python-appdirs))
7498
7499 (define-public python-llfuse
7500 (package
7501 (name "python-llfuse")
7502 (version "1.2")
7503 (source (origin
7504 (method url-fetch)
7505 (uri (string-append
7506 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7507 "llfuse-" version ".tar.bz2"))
7508 (sha256
7509 (base32
7510 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7511 (build-system python-build-system)
7512 (inputs
7513 `(("fuse" ,fuse)
7514 ("attr" ,attr)))
7515 (native-inputs
7516 `(("pkg-config" ,pkg-config)))
7517 (synopsis "Python bindings for FUSE")
7518 (description
7519 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7520 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7521 (license license:lgpl2.0+)
7522 (properties `((python2-variant . ,(delay python2-llfuse))))))
7523
7524 (define-public python2-llfuse
7525 (package (inherit (package-with-python2
7526 (strip-python2-variant python-llfuse)))
7527 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7528
7529 ;; For attic-0.16
7530 (define-public python-llfuse-0.41
7531 (package (inherit python-llfuse)
7532 (version "0.41.1")
7533 (source (origin
7534 (method url-fetch)
7535 (uri (string-append
7536 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7537 "llfuse-" version ".tar.bz2"))
7538 (sha256
7539 (base32
7540 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7541 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7542 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7543 (license (list license:expat license:lgpl2.0+))))
7544
7545 (define-public python-msgpack
7546 (package
7547 (name "python-msgpack")
7548 (version "0.4.8")
7549 (source (origin
7550 (method url-fetch)
7551 (uri (pypi-uri "msgpack-python" version))
7552 (sha256
7553 (base32
7554 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7555 (build-system python-build-system)
7556 (synopsis "MessagePack (de)serializer")
7557 (description "MessagePack is a fast, compact binary serialization format,
7558 suitable for similar data to JSON. This package provides CPython bindings for
7559 reading and writing MessagePack data.")
7560 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7561 (license license:asl2.0)))
7562
7563 (define-public python2-msgpack
7564 (package-with-python2 python-msgpack))
7565
7566 (define-public python-netaddr
7567 (package
7568 (name "python-netaddr")
7569 (version "0.7.19")
7570 (source
7571 (origin
7572 (method url-fetch)
7573 (uri (string-append
7574 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7575 version
7576 ".tar.gz"))
7577 (sha256
7578 (base32
7579 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7580 (build-system python-build-system)
7581 (arguments `(#:tests? #f)) ;; No tests.
7582 (home-page "https://github.com/drkjam/netaddr/")
7583 (synopsis "Pythonic manipulation of network addresses")
7584 (description
7585 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7586 and MAC network addresses.")
7587 (license license:bsd-3)))
7588
7589 (define-public python2-netaddr
7590 (package-with-python2 python-netaddr))
7591
7592 (define-public python-wrapt
7593 (package
7594 (name "python-wrapt")
7595 (version "1.10.8")
7596 (source
7597 (origin
7598 (method url-fetch)
7599 (uri (pypi-uri "wrapt" version))
7600 (sha256
7601 (base32
7602 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7603 (build-system python-build-system)
7604 (arguments
7605 ;; Tests are not included in the tarball, they are only available in the
7606 ;; git repository.
7607 `(#:tests? #f))
7608 (home-page "https://github.com/GrahamDumpleton/wrapt")
7609 (synopsis "Module for decorators, wrappers and monkey patching")
7610 (description
7611 "The aim of the wrapt module is to provide a transparent object proxy for
7612 Python, which can be used as the basis for the construction of function
7613 wrappers and decorator functions.")
7614 (license license:bsd-2)))
7615
7616 (define-public python2-wrapt
7617 (package-with-python2 python-wrapt))
7618
7619 (define-public python-iso8601
7620 (package
7621 (name "python-iso8601")
7622 (version "0.1.11")
7623 (source
7624 (origin
7625 (method url-fetch)
7626 (uri (pypi-uri "iso8601" version))
7627 (sha256
7628 (base32
7629 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7630 (build-system python-build-system)
7631 (native-inputs
7632 `(("python-pytest" ,python-pytest)))
7633 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7634 (synopsis "Module to parse ISO 8601 dates")
7635 (description
7636 "This module parses the most common forms of ISO 8601 date strings (e.g.
7637 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7638 (license license:expat)))
7639
7640 (define-public python2-iso8601
7641 (package-with-python2 python-iso8601))
7642
7643 (define-public python-monotonic
7644 (package
7645 (name "python-monotonic")
7646 (version "0.3")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (string-append
7651 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7652 version
7653 ".tar.gz"))
7654 (sha256
7655 (base32
7656 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7657 (build-system python-build-system)
7658 (home-page "https://github.com/atdt/monotonic")
7659 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7660 (description
7661 "This module provides a monotonic() function which returns the value (in
7662 fractional seconds) of a clock which never goes backwards.")
7663 (license license:asl2.0)))
7664
7665 (define-public python2-monotonic
7666 (package-with-python2 python-monotonic))
7667
7668 (define-public python-webob
7669 (package
7670 (name "python-webob")
7671 (version "1.5.1")
7672 (source
7673 (origin
7674 (method url-fetch)
7675 (uri (pypi-uri "WebOb" version))
7676 (sha256
7677 (base32
7678 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7679 (build-system python-build-system)
7680 (native-inputs
7681 `(("python-nose" ,python-nose)))
7682 (home-page "http://webob.org/")
7683 (synopsis "WSGI request and response object")
7684 (description
7685 "WebOb provides wrappers around the WSGI request environment, and an
7686 object to help create WSGI responses.")
7687 (license license:expat)))
7688
7689 (define-public python2-webob
7690 (package-with-python2 python-webob))
7691
7692 (define-public python-xlrd
7693 (package
7694 (name "python-xlrd")
7695 (version "1.0.0")
7696 (source (origin
7697 (method url-fetch)
7698 (uri (pypi-uri "xlrd" version))
7699 (sha256
7700 (base32
7701 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7702 (build-system python-build-system)
7703 (arguments
7704 `(#:phases
7705 (modify-phases %standard-phases
7706 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7707 ;; run tests instead for now.
7708 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7709 (native-inputs `(("python-nose" ,python-nose)))
7710 (home-page "http://www.python-excel.org/")
7711 (synopsis "Library for extracting data from Excel files")
7712 (description "This packages provides a library to extract data from
7713 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7714 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7715 Unicode-aware. It is not intended as an end-user tool.")
7716 (license license:bsd-3)))
7717
7718 (define-public python2-xlrd
7719 (package-with-python2 python-xlrd))
7720
7721 (define-public python-prettytable
7722 (package
7723 (name "python-prettytable")
7724 (version "0.7.2")
7725 (source
7726 (origin
7727 (method url-fetch)
7728 (uri (string-append
7729 "https://pypi.python.org/packages/source/P/PrettyTable/"
7730 "prettytable-" version ".tar.bz2"))
7731 (sha256
7732 (base32
7733 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7734 (build-system python-build-system)
7735 (home-page "http://code.google.com/p/prettytable/")
7736 (synopsis "Display tabular data in an ASCII table format")
7737 (description
7738 "A library designed to represent tabular data in visually appealing ASCII
7739 tables. PrettyTable allows for selection of which columns are to be printed,
7740 independent alignment of columns (left or right justified or centred) and
7741 printing of sub-tables by specifying a row range.")
7742 (license license:bsd-3)))
7743
7744 (define-public python2-prettytable
7745 (package-with-python2 python-prettytable))
7746
7747 (define-public python-tables
7748 (package
7749 (name "python-tables")
7750 (version "3.2.2")
7751 (source
7752 (origin
7753 (method url-fetch)
7754 (uri (pypi-uri "tables" version))
7755 (sha256
7756 (base32
7757 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7758 (modules '((guix build utils)))
7759 (snippet
7760 '(begin
7761 ;; Remove pre-compiled .pyc files from source.
7762 (for-each delete-file-recursively
7763 (find-files "." "__pycache__" #:directories? #t))
7764 (for-each delete-file (find-files "." "\\.pyc$"))
7765 #t))))
7766 (build-system python-build-system)
7767 (arguments
7768 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7769 ;; or "check", so we must override the build and check phases.
7770 #:phases
7771 (modify-phases %standard-phases
7772 (add-after 'unpack 'use-gcc
7773 (lambda _
7774 (substitute* "setup.py"
7775 (("compiler = new_compiler\\(\\)" line)
7776 (string-append line
7777 "\ncompiler.set_executables(compiler='gcc',"
7778 "compiler_so='gcc',"
7779 "linker_exe='gcc',"
7780 "linker_so='gcc -shared')")))
7781 #t))
7782 (replace 'build
7783 (lambda* (#:key inputs #:allow-other-keys)
7784 (zero? (system* "python" "setup.py" "build"
7785 (string-append "--hdf5="
7786 (assoc-ref inputs "hdf5"))))))
7787 (replace 'check
7788 (lambda* (#:key inputs #:allow-other-keys)
7789 (zero? (system* "python" "setup.py" "check"
7790 (string-append "--hdf5="
7791 (assoc-ref inputs "hdf5")))))))))
7792 (propagated-inputs
7793 `(("python-numexpr" ,python-numexpr)
7794 ("python-numpy" ,python-numpy)))
7795 (native-inputs
7796 `(("python-cython" ,python-cython)
7797 ("pkg-config" ,pkg-config)))
7798 (inputs
7799 `(("hdf5" ,hdf5)
7800 ("bzip2" ,bzip2)
7801 ("zlib" ,zlib)))
7802 (home-page "http://www.pytables.org/")
7803 (synopsis "Hierarchical datasets for Python")
7804 (description "PyTables is a package for managing hierarchical datasets and
7805 designed to efficiently cope with extremely large amounts of data.")
7806 (license license:bsd-3)))
7807
7808 (define-public python2-tables
7809 (package-with-python2 python-tables))
7810
7811 (define-public python-pyasn1
7812 (package
7813 (name "python-pyasn1")
7814 (version "0.2.3")
7815 (source
7816 (origin
7817 (method url-fetch)
7818 (uri (pypi-uri "pyasn1" version))
7819 (sha256
7820 (base32
7821 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7822 (build-system python-build-system)
7823 (home-page "http://pyasn1.sourceforge.net/")
7824 (synopsis "ASN.1 types and codecs")
7825 (description
7826 "This is an implementation of ASN.1 types and codecs in Python. It is
7827 suitable for a wide range of protocols based on the ASN.1 specification.")
7828 (license license:bsd-2)))
7829
7830 (define-public python2-pyasn1
7831 (package-with-python2 python-pyasn1))
7832
7833 (define-public python-pyasn1-modules
7834 (package
7835 (name "python-pyasn1-modules")
7836 (version "0.0.8")
7837 (source
7838 (origin
7839 (method url-fetch)
7840 (uri (pypi-uri "pyasn1-modules" version))
7841 (sha256
7842 (base32
7843 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7844 (build-system python-build-system)
7845 (propagated-inputs
7846 `(("python-pyasn1" ,python-pyasn1)))
7847 (home-page "https://sourceforge.net/projects/pyasn1/")
7848 (synopsis "ASN.1 codec implementations")
7849 (description
7850 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7851 implementations of ASN.1-based codecs and protocols.")
7852 (license license:bsd-3)))
7853
7854 (define-public python2-pyasn1-modules
7855 (package-with-python2 python-pyasn1-modules))
7856
7857 (define-public python-ipaddress
7858 (package
7859 (name "python-ipaddress")
7860 (version "1.0.18")
7861 (source (origin
7862 (method url-fetch)
7863 (uri (pypi-uri "ipaddress" version))
7864 (sha256
7865 (base32
7866 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7867 (build-system python-build-system)
7868 (home-page "https://github.com/phihag/ipaddress")
7869 (synopsis "IP address manipulation library")
7870 (description
7871 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7872 in Python. This library is used to create, poke at, and manipulate IPv4 and
7873 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7874 module to older versions of Python.")
7875 (license license:psfl)))
7876
7877 (define-public python2-ipaddress
7878 (package-with-python2 python-ipaddress))
7879
7880 (define-public python2-ipaddr
7881 (package
7882 (name "python2-ipaddr")
7883 (version "2.1.11")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (pypi-uri "ipaddr" version))
7888 (sha256
7889 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7890 (build-system python-build-system)
7891 (arguments
7892 `(#:python ,python-2 ;version 2 only
7893 #:phases
7894 (modify-phases %standard-phases
7895 (replace 'check
7896 (lambda* _
7897 (zero? (system* "python" "ipaddr_test.py")))))))
7898 (home-page "https://github.com/google/ipaddr-py")
7899 (synopsis "IP address manipulation library")
7900 (description
7901 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7902 IPv6 addresses and networks.
7903
7904 For new implementations you may prefer to use the standard module
7905 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7906 versions of Python.")
7907 (license license:asl2.0)))
7908
7909 (define-public python-idna
7910 (package
7911 (name "python-idna")
7912 (version "2.5")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "idna" version))
7917 (sha256
7918 (base32
7919 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7920 (build-system python-build-system)
7921 (home-page "https://github.com/kjd/idna")
7922 (synopsis "Internationalized domain names in applications")
7923 (description
7924 "This is a library to support the Internationalised Domain Names in
7925 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7926 protocol is often referred to as “IDNA2008” and can produce different results
7927 from the earlier standard from 2003. The library is also intended to act as a
7928 suitable drop-in replacement for the “encodings.idna” module that comes with
7929 the Python standard library but currently only supports the older 2003
7930 specification.")
7931 (license license:bsd-4)))
7932
7933 (define-public python2-idna
7934 (package-with-python2 python-idna))
7935
7936 (define-public python-pretend
7937 (package
7938 (name "python-pretend")
7939 (version "1.0.8")
7940 (source
7941 (origin
7942 (method url-fetch)
7943 (uri (string-append "https://pypi.python.org/packages/source/p/"
7944 "pretend/pretend-" version ".tar.gz"))
7945 (sha256
7946 (base32
7947 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7948 (build-system python-build-system)
7949 (home-page "https://github.com/alex/pretend")
7950 (synopsis "Library for stubbing in Python")
7951 (description
7952 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7953 technique for writing tests. You may hear the term mixed up with mocks,
7954 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7955 responses, rather than doing any computation.")
7956 (license license:bsd-3)))
7957
7958 (define-public python2-pretend
7959 (package-with-python2 python-pretend))
7960
7961 (define-public python-cryptography-vectors
7962 (package
7963 (name "python-cryptography-vectors")
7964 (version "2.0.3")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "cryptography_vectors" version))
7969 (sha256
7970 (base32
7971 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
7972 (build-system python-build-system)
7973 (home-page "https://github.com/pyca/cryptography")
7974 (synopsis "Test vectors for the cryptography package")
7975 (description
7976 "This package contains test vectors for the cryptography package.")
7977 ;; Distributed under either BSD-3 or ASL2.0
7978 (license (list license:bsd-3 license:asl2.0))))
7979
7980 (define-public python2-cryptography-vectors
7981 (package-with-python2 python-cryptography-vectors))
7982
7983 (define-public python-cryptography
7984 (package
7985 (name "python-cryptography")
7986 (version "2.0.3")
7987 (source
7988 (origin
7989 (method url-fetch)
7990 (uri (pypi-uri "cryptography" version))
7991 (sha256
7992 (base32
7993 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
7994 (build-system python-build-system)
7995 (inputs
7996 `(("openssl" ,openssl)))
7997 (propagated-inputs
7998 `(("python-asn1crypto" ,python-asn1crypto)
7999 ("python-cffi" ,python-cffi)
8000 ("python-six" ,python-six)
8001 ("python-idna" ,python-idna)
8002 ("python-iso8601" ,python-iso8601)))
8003 (native-inputs
8004 `(("python-cryptography-vectors" ,python-cryptography-vectors)
8005 ("python-hypothesis" ,python-hypothesis)
8006 ("python-pretend" ,python-pretend)
8007 ("python-pytz" ,python-pytz)
8008 ("python-pytest" ,python-pytest-3.0)))
8009 (home-page "https://github.com/pyca/cryptography")
8010 (synopsis "Cryptographic recipes and primitives for Python")
8011 (description
8012 "cryptography is a package which provides cryptographic recipes and
8013 primitives to Python developers. It aims to be the “cryptographic standard
8014 library” for Python. The package includes both high level recipes, and low
8015 level interfaces to common cryptographic algorithms such as symmetric ciphers,
8016 message digests and key derivation functions.")
8017 ;; Distributed under either BSD-3 or ASL2.0
8018 (license (list license:bsd-3 license:asl2.0))
8019 (properties `((python2-variant . ,(delay python2-cryptography))))))
8020
8021 (define-public python2-cryptography
8022 (let ((crypto (package-with-python2
8023 (strip-python2-variant python-cryptography))))
8024 (package (inherit crypto)
8025 (propagated-inputs
8026 `(("python2-ipaddress" ,python2-ipaddress)
8027 ("python2-backport-ssl-match-hostname"
8028 ,python2-backport-ssl-match-hostname)
8029 ("python2-enum34" ,python2-enum34)
8030 ,@(package-propagated-inputs crypto))))))
8031
8032 (define-public python-pyopenssl
8033 (package
8034 (name "python-pyopenssl")
8035 (version "17.3.0")
8036 (source
8037 (origin
8038 (method url-fetch)
8039 (uri (pypi-uri "pyOpenSSL" version))
8040 (sha256
8041 (base32
8042 "0xkc1wfnpg6abzllivg3ylhc63npjdy1v81f4kc08bm8cj80nqr9"))))
8043 (build-system python-build-system)
8044 (arguments
8045 '(#:phases
8046 (modify-phases %standard-phases
8047 (delete 'check)
8048 (add-after 'install 'check
8049 (lambda* (#:key inputs outputs #:allow-other-keys)
8050 (add-installed-pythonpath inputs outputs)
8051 (zero? (system* "py.test" "-v" "-k"
8052 (string-append
8053 ;; This test tries to look up certificates from
8054 ;; the compiled-in default path in OpenSSL, which
8055 ;; does not exist in the build environment.
8056 "not test_fallback_default_verify_paths "
8057 ;; This test attempts to make a connection to
8058 ;; an external web service.
8059 "and not test_set_default_verify_paths"))))))))
8060 (propagated-inputs
8061 `(("python-cryptography" ,python-cryptography)
8062 ("python-six" ,python-six)))
8063 (inputs
8064 `(("openssl" ,openssl)))
8065 (native-inputs
8066 `(("python-flaky" ,python-flaky)
8067 ("python-pretend" ,python-pretend)
8068 ("python-pytest" ,python-pytest-3.0)))
8069 (home-page "https://github.com/pyca/pyopenssl")
8070 (synopsis "Python wrapper module around the OpenSSL library")
8071 (description
8072 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
8073 library.")
8074 (license license:asl2.0)))
8075
8076 (define-public python2-pyopenssl
8077 (package-with-python2 python-pyopenssl))
8078
8079 (define-public python-pip
8080 (package
8081 (name "python-pip")
8082 (version "9.0.1")
8083 (source
8084 (origin
8085 (method url-fetch)
8086 (uri (pypi-uri "pip" version))
8087 (sha256
8088 (base32
8089 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
8090 (build-system python-build-system)
8091 (arguments
8092 '(#:tests? #f)) ; there are no tests in the pypi archive.
8093 (home-page "https://pip.pypa.io/")
8094 (synopsis "Package manager for Python software")
8095 (description
8096 "Pip is a package manager for Python software, that finds packages on the
8097 Python Package Index (PyPI).")
8098 (license license:expat)))
8099
8100 (define-public python2-pip
8101 (package-with-python2 python-pip))
8102
8103 (define-public python-tlsh
8104 (package
8105 (name "python-tlsh")
8106 (version "3.4.4")
8107 (home-page "https://github.com/trendmicro/tlsh")
8108 (source (origin
8109 (method url-fetch)
8110 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
8111 version ".tar.gz"))
8112 (sha256
8113 (base32
8114 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
8115 (file-name (string-append name "-" version ".tar.gz"))))
8116 (build-system cmake-build-system)
8117 (arguments
8118 '(#:out-of-source? #f
8119 #:phases (modify-phases %standard-phases
8120 (replace
8121 'install
8122 (lambda* (#:key outputs #:allow-other-keys)
8123 ;; Build and install the Python bindings. The underlying
8124 ;; C++ library is apparently not meant to be installed.
8125 (let ((out (assoc-ref outputs "out")))
8126 (with-directory-excursion "py_ext"
8127 (and (system* "python" "setup.py" "build")
8128 (system* "python" "setup.py" "install"
8129 (string-append "--prefix=" out))))))))))
8130 (inputs `(("python" ,python-wrapper))) ;for the bindings
8131 (synopsis "Fuzzy matching library for Python")
8132 (description
8133 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8134 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8135 value which can be used for similarity comparisons. Similar objects have
8136 similar hash values, which allows for the detection of similar objects by
8137 comparing their hash values. The byte stream should have a sufficient amount
8138 of complexity; for example, a byte stream of identical bytes will not generate
8139 a hash value.")
8140 (license license:asl2.0)))
8141
8142 (define-public python2-tlsh
8143 (package
8144 (inherit python-tlsh)
8145 (name "python2-tlsh")
8146 (inputs `(("python" ,python-2)))))
8147
8148 (define-public python-termcolor
8149 (package
8150 (name "python-termcolor")
8151 (version "1.1.0")
8152 (source
8153 (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "termcolor" version))
8156 (sha256
8157 (base32
8158 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8159 (build-system python-build-system)
8160 (arguments
8161 ;; There are no tests.
8162 `(#:tests? #f))
8163 (home-page "http://pypi.python.org/pypi/termcolor")
8164 (synopsis "ANSII Color formatting for terminal output")
8165 (description
8166 "This package provides ANSII Color formatting for output in terminals.")
8167 (license license:expat)))
8168
8169 (define-public python2-termcolor
8170 (package-with-python2 python-termcolor))
8171
8172 (define-public python-libarchive-c
8173 (package
8174 (name "python-libarchive-c")
8175 (version "2.2")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "libarchive-c" version))
8179 (sha256
8180 (base32
8181 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
8182 (build-system python-build-system)
8183 (arguments
8184 '(#:phases (modify-phases %standard-phases
8185 (add-before
8186 'build 'reference-libarchive
8187 (lambda* (#:key inputs #:allow-other-keys)
8188 ;; Retain the absolute file name of libarchive.so.
8189 (let ((libarchive (assoc-ref inputs "libarchive")))
8190 (substitute* "libarchive/ffi.py"
8191 (("find_library\\('archive'\\)")
8192 (string-append "'" libarchive
8193 "/lib/libarchive.so'")))))))))
8194 (inputs
8195 `(("libarchive" ,libarchive)))
8196 (home-page "https://github.com/Changaco/python-libarchive-c")
8197 (synopsis "Python interface to libarchive")
8198 (description
8199 "This package provides Python bindings to libarchive, a C library to
8200 access possibly compressed archives in many different formats. It uses
8201 Python's @code{ctypes} foreign function interface (FFI).")
8202 (license license:lgpl2.0+)))
8203
8204 (define-public python2-libarchive-c
8205 (package-with-python2 python-libarchive-c))
8206
8207 (define-public python-file
8208 (package
8209 (inherit file)
8210 (name "python-file")
8211 (build-system python-build-system)
8212 (arguments
8213 '(#:tests? #f ;no tests
8214 #:configure-flags '("--single-version-externally-managed" "--root=/")
8215 #:phases (modify-phases %standard-phases
8216 (add-before 'build 'change-directory
8217 (lambda _
8218 (chdir "python")
8219 #t))
8220 (add-before 'build 'set-library-file-name
8221 (lambda* (#:key inputs #:allow-other-keys)
8222 (let ((file (assoc-ref inputs "file")))
8223 (substitute* "magic.py"
8224 (("find_library\\('magic'\\)")
8225 (string-append "'" file "/lib/libmagic.so'")))
8226 #t))))))
8227 (inputs `(("file" ,file)))
8228 (self-native-input? #f)
8229 (synopsis "Python bindings to the libmagic file type guesser. Note that
8230 this module and the python-magic module both provide a \"magic.py\" file;
8231 these two modules, which are different and were developed separately, both
8232 serve the same purpose: provide Python bindings for libmagic.")))
8233
8234 (define-public python2-file
8235 (package-with-python2 python-file))
8236
8237 (define-public python-debian
8238 (package
8239 (name "python-debian")
8240 (version "0.1.28")
8241 (source
8242 (origin
8243 (method url-fetch)
8244 (uri (pypi-uri name version))
8245 (sha256
8246 (base32
8247 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
8248 (build-system python-build-system)
8249 (propagated-inputs
8250 `(("python-six" ,python-six)))
8251 (home-page "http://packages.debian.org/sid/python-debian")
8252 (synopsis "Debian package related modules")
8253 (description
8254 ;; XXX: Use @enumerate instead of @itemize to work around
8255 ;; <http://bugs.gnu.org/21772>.
8256 "This package provides Python modules that abstract many formats of
8257 Debian-related files, such as:
8258
8259 @enumerate
8260 @item Debtags information;
8261 @item @file{debian/changelog} files;
8262 @item packages files, pdiffs;
8263 @item control files of single or multiple RFC822-style paragraphs---e.g.
8264 @file{debian/control}, @file{.changes}, @file{.dsc};
8265 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8266 contained files and meta-information.
8267 @end enumerate\n")
8268
8269 ;; Modules are either GPLv2+ or GPLv3+.
8270 (license license:gpl3+)))
8271
8272 (define-public python2-debian
8273 (package-with-python2 python-debian))
8274
8275 (define-public python-nbformat
8276 (package
8277 (name "python-nbformat")
8278 (version "4.3.0")
8279 (source
8280 (origin
8281 (method url-fetch)
8282 (uri (pypi-uri "nbformat" version))
8283 (sha256
8284 (base32
8285 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
8286 (build-system python-build-system)
8287 (arguments `(#:tests? #f)) ; no test target
8288 (propagated-inputs
8289 `(("python-ipython-genutils" ,python-ipython-genutils)
8290 ("python-jsonschema" ,python-jsonschema)
8291 ("python-jupyter-core" ,python-jupyter-core)
8292 ("python-traitlets" ,python-traitlets)))
8293 (home-page "http://jupyter.org")
8294 (synopsis "Jupyter Notebook format")
8295 (description "This package provides the reference implementation of the
8296 Jupyter Notebook format and Python APIs for working with notebooks.")
8297 (license license:bsd-3)))
8298
8299 (define-public python2-nbformat
8300 (package-with-python2 python-nbformat))
8301
8302 (define-public python-bleach
8303 (package
8304 (name "python-bleach")
8305 (version "1.4.3")
8306 (source
8307 (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "bleach" version))
8310 (sha256
8311 (base32
8312 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8313 (build-system python-build-system)
8314 (propagated-inputs
8315 `(("python-html5lib" ,python-html5lib-0.9)
8316 ("python-six" ,python-six)))
8317 (native-inputs
8318 `(("python-nose" ,python-nose)))
8319 (home-page "https://github.com/jsocol/bleach")
8320 (synopsis "Whitelist-based HTML-sanitizing tool")
8321 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8322 (license license:asl2.0)))
8323
8324 (define-public python2-bleach
8325 (package-with-python2 python-bleach))
8326
8327 (define-public python-entrypoints
8328 (package
8329 (name "python-entrypoints")
8330 (version "0.2.2")
8331 (source
8332 (origin
8333 (method url-fetch)
8334 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8335 version ".tar.gz"))
8336 (file-name (string-append name "-" version ".tar.gz"))
8337 (sha256
8338 (base32
8339 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8340 (build-system python-build-system)
8341 ;; The package does not come with a setup.py file, so we have to generate
8342 ;; one ourselves.
8343 (arguments
8344 `(#:tests? #f
8345 #:phases
8346 (modify-phases %standard-phases
8347 (add-after 'unpack 'create-setup.py
8348 (lambda _
8349 (call-with-output-file "setup.py"
8350 (lambda (port)
8351 (format port "\
8352 from setuptools import setup
8353 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8354 " ,version))))))))
8355 (home-page "https://github.com/takluyver/entrypoints")
8356 (synopsis "Discover and load entry points from installed Python packages")
8357 (description "Entry points are a way for Python packages to advertise
8358 objects with some common interface. The most common examples are
8359 @code{console_scripts} entry points, which define shell commands by
8360 identifying a Python function to run. The @code{entrypoints} module contains
8361 functions to find and load entry points.")
8362 (license license:expat)))
8363
8364 (define-public python2-entrypoints
8365 (package-with-python2 python-entrypoints))
8366
8367 (define-public python-nbconvert
8368 (package
8369 (name "python-nbconvert")
8370 (version "5.0.0b1")
8371 (source
8372 (origin
8373 (method url-fetch)
8374 (uri (pypi-uri "nbconvert" version))
8375 (sha256
8376 (base32
8377 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8378 (build-system python-build-system)
8379 (arguments
8380 `(;; The "bdist_egg" target is disabled by default, causing the installation
8381 ;; to fail.
8382 #:configure-flags (list "bdist_egg")
8383 ;; FIXME: 5 failures, 40 errors.
8384 #:tests? #f))
8385 ;; #:phases
8386 ;; (modify-phases %standard-phases
8387 ;; (replace 'check
8388 ;; (lambda _
8389 ;; (zero? (system* "py.test" "-v")))))
8390 (native-inputs
8391 `(("python-pytest" ,python-pytest)))
8392 (propagated-inputs
8393 `(("python-bleach" ,python-bleach)
8394 ("python-entrypoints" ,python-entrypoints)
8395 ("python-jinja2" ,python-jinja2)
8396 ("python-jupyter-core" ,python-jupyter-core)
8397 ("python-mistune" ,python-mistune)
8398 ("python-nbformat" ,python-nbformat)
8399 ("python-pygments" ,python-pygments)
8400 ("python-traitlets" ,python-traitlets)))
8401 (home-page "http://jupyter.org")
8402 (synopsis "Converting Jupyter Notebooks")
8403 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8404 notebooks to various other formats via Jinja templates. It allows you to
8405 convert an @code{.ipynb} notebook file into various static formats including:
8406
8407 @enumerate
8408 @item HTML
8409 @item LaTeX
8410 @item PDF
8411 @item Reveal JS
8412 @item Markdown (md)
8413 @item ReStructured Text (rst)
8414 @item executable script
8415 @end enumerate\n")
8416 (license license:bsd-3)))
8417
8418 (define-public python2-nbconvert
8419 (package-with-python2 python-nbconvert))
8420
8421 (define-public python-notebook
8422 (package
8423 (name "python-notebook")
8424 (version "4.2.3")
8425 (source (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "notebook" version))
8428 (sha256
8429 (base32
8430 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8431 (build-system python-build-system)
8432 (arguments
8433 `(#:phases
8434 (modify-phases %standard-phases
8435 (replace 'check
8436 (lambda _
8437 ;; HOME must be set for tests
8438 (setenv "HOME" "/tmp")
8439 (zero? (system* "nosetests")))))))
8440 (propagated-inputs
8441 `(("python-jupyter-core" ,python-jupyter-core)
8442 ("python-nbformat" ,python-nbformat)
8443 ("python-nbconvert" ,python-nbconvert)
8444 ("python-ipython" ,python-ipython)))
8445 (native-inputs
8446 `(("python-nose" ,python-nose)
8447 ("python-sphinx" ,python-sphinx)
8448 ("python-requests" ,python-requests)))
8449 (home-page "http://jupyter.org/")
8450 (synopsis "Web-based notebook environment for interactive computing")
8451 (description
8452 "The Jupyter HTML notebook is a web-based notebook environment for
8453 interactive computing.")
8454 (properties `((python2-variant . ,(delay python2-notebook))))
8455 (license license:bsd-3)))
8456
8457 (define-public python2-notebook
8458 (let ((base (package-with-python2
8459 (strip-python2-variant python-notebook))))
8460 (package (inherit base)
8461 (native-inputs
8462 `(("python2-mock" ,python2-mock)
8463 ,@(package-native-inputs base)))
8464 (arguments
8465 (substitute-keyword-arguments (package-arguments base)
8466 ((#:phases phases)
8467 `(modify-phases ,phases
8468 (add-before 'check 'disable-test-case
8469 ;; The test requires network access to localhost. Curiously it
8470 ;; fails with Python 2 only. Simply make the test-case return
8471 ;; immediately.
8472 (lambda _
8473 (substitute*
8474 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8475 (("formats = self.nbconvert_api") "return #")))))))))))
8476
8477 (define-public python-widgetsnbextension
8478 (package
8479 (name "python-widgetsnbextension")
8480 (version "1.2.6")
8481 (source
8482 (origin
8483 (method url-fetch)
8484 (uri (pypi-uri "widgetsnbextension" version))
8485 (sha256
8486 (base32
8487 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8488 (build-system python-build-system)
8489 (propagated-inputs
8490 `(("python-notebook" ,python-notebook)))
8491 (native-inputs
8492 `(("python-certifi" ,python-certifi)
8493 ("python-nose" ,python-nose)))
8494 (home-page "http://ipython.org")
8495 (synopsis "IPython HTML widgets for Jupyter")
8496 (description "This package provides interactive HTML widgets for Jupyter
8497 notebooks.")
8498 (license license:bsd-3)))
8499
8500 (define-public python2-widgetsnbextension
8501 (package-with-python2 python-widgetsnbextension))
8502
8503 (define-public python-ipywidgets
8504 (package
8505 (name "python-ipywidgets")
8506 (version "5.2.2")
8507 (source
8508 (origin
8509 (method url-fetch)
8510 (uri (pypi-uri "ipywidgets" version))
8511 (sha256
8512 (base32
8513 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8514 (build-system python-build-system)
8515 ;; FIXME: it's not clear how to run the tests.
8516 (arguments `(#:tests? #f))
8517 (propagated-inputs
8518 `(("python-ipykernel" ,python-ipykernel)
8519 ("python-ipython" ,python-ipython)
8520 ("python-traitlets" ,python-traitlets)
8521 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8522 (home-page "http://ipython.org")
8523 (synopsis "IPython HTML widgets for Jupyter")
8524 (description "Ipywidgets are interactive HTML widgets for Jupyter
8525 notebooks and the IPython kernel. Notebooks come alive when interactive
8526 widgets are used. Users gain control of their data and can visualize changes
8527 in the data.")
8528 (license license:bsd-3)))
8529
8530 (define-public python2-ipywidgets
8531 (package-with-python2 python-ipywidgets))
8532
8533 (define-public python-jupyter-console
8534 (package
8535 (name "python-jupyter-console")
8536 (version "5.0.0")
8537 (source
8538 (origin
8539 (method url-fetch)
8540 (uri (pypi-uri "jupyter_console" version))
8541 (sha256
8542 (base32
8543 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8544 (build-system python-build-system)
8545 ;; FIXME: it's not clear how to run the tests.
8546 (arguments `(#:tests? #f))
8547 (propagated-inputs
8548 `(("python-ipykernel" ,python-ipykernel)
8549 ("python-ipython" ,python-ipython)
8550 ("python-jupyter-client" ,python-jupyter-client)
8551 ("python-prompt-toolkit" ,python-prompt-toolkit)
8552 ("python-pygments" ,python-pygments)))
8553 (home-page "https://jupyter.org")
8554 (synopsis "Jupyter terminal console")
8555 (description "This package provides a terminal-based console frontend for
8556 Jupyter kernels. It also allows for console-based interaction with non-Python
8557 Jupyter kernels such as IJulia and IRKernel.")
8558 (license license:bsd-3)))
8559
8560 (define-public python2-jupyter-console
8561 (package-with-python2 python-jupyter-console))
8562
8563 (define-public jupyter
8564 (package
8565 (name "jupyter")
8566 (version "1.0.0")
8567 (source
8568 (origin
8569 (method url-fetch)
8570 (uri (pypi-uri "jupyter" version))
8571 (sha256
8572 (base32
8573 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8574 (build-system python-build-system)
8575 ;; FIXME: it's not clear how to run the tests.
8576 (arguments `(#:tests? #f))
8577 (propagated-inputs
8578 `(("python-ipykernel" ,python-ipykernel)
8579 ("python-ipywidgets" ,python-ipywidgets)
8580 ("python-jupyter-console" ,python-jupyter-console)
8581 ("python-nbconvert" ,python-nbconvert)
8582 ("python-notebook" ,python-notebook)))
8583 (home-page "http://jupyter.org")
8584 (synopsis "Web application for interactive documents")
8585 (description
8586 "The Jupyter Notebook is a web application that allows you to create and
8587 share documents that contain live code, equations, visualizations and
8588 explanatory text. Uses include: data cleaning and transformation, numerical
8589 simulation, statistical modeling, machine learning and much more.")
8590 (license license:bsd-3)))
8591
8592 (define-public python-chardet
8593 (package
8594 (name "python-chardet")
8595 (version "2.3.0")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (string-append
8600 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8601 version
8602 ".tar.gz"))
8603 (sha256
8604 (base32
8605 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8606 (build-system python-build-system)
8607 (home-page "https://github.com/chardet/chardet")
8608 (synopsis "Universal encoding detector for Python 2 and 3")
8609 (description
8610 "This package provides @code{chardet}, a Python module that can
8611 automatically detect a wide range of file encodings.")
8612 (license license:lgpl2.1+)))
8613
8614 (define-public python2-chardet
8615 (package-with-python2 python-chardet))
8616
8617 (define-public python-docopt
8618 (package
8619 (name "python-docopt")
8620 (version "0.6.2")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 ;; The release on PyPI does not include tests.
8625 (uri (string-append
8626 "https://github.com/docopt/docopt/archive/"
8627 version ".tar.gz"))
8628 (file-name (string-append name "-" version ".tar.gz"))
8629 (sha256
8630 (base32
8631 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8632 (build-system python-build-system)
8633 (native-inputs
8634 `(("python-pytest" ,python-pytest)))
8635 (arguments
8636 `(#:phases (alist-replace
8637 'check
8638 (lambda _ (zero? (system* "py.test")))
8639 %standard-phases)))
8640 (home-page "http://docopt.org")
8641 (synopsis "Command-line interface description language for Python")
8642 (description "This library allows the user to define a command-line
8643 interface from a program's help message rather than specifying it
8644 programatically with command-line parsers like @code{getopt} and
8645 @code{argparse}.")
8646 (license license:expat)))
8647
8648 (define-public python2-docopt
8649 (package-with-python2 python-docopt))
8650
8651 (define-public python-zope-event
8652 (package
8653 (name "python-zope-event")
8654 (version "4.1.0")
8655 (source
8656 (origin
8657 (method url-fetch)
8658 (uri (string-append "https://pypi.python.org/packages/source/z"
8659 "/zope.event/zope.event-" version ".tar.gz"))
8660 (sha256
8661 (base32
8662 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8663 (build-system python-build-system)
8664 (home-page "http://pypi.python.org/pypi/zope.event")
8665 (synopsis "Event publishing system for Python")
8666 (description "Zope.event provides an event publishing API, intended for
8667 use by applications which are unaware of any subscribers to their events. It
8668 is a simple event-dispatching system on which more sophisticated event
8669 dispatching systems can be built.")
8670 (license license:zpl2.1)))
8671
8672 (define-public python2-zope-event
8673 (package-with-python2 python-zope-event))
8674
8675 (define-public python-zope-interface
8676 (package
8677 (name "python-zope-interface")
8678 (version "4.1.3")
8679 (source
8680 (origin
8681 (method url-fetch)
8682 (uri (string-append "https://pypi.python.org/packages/source/z"
8683 "/zope.interface/zope.interface-" version ".tar.gz"))
8684 (sha256
8685 (base32
8686 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8687 (build-system python-build-system)
8688 (native-inputs
8689 `(("python-zope-event" ,python-zope-event)))
8690 (home-page "https://github.com/zopefoundation/zope.interface")
8691 (synopsis "Python implementation of the \"design by contract\"
8692 methodology")
8693 (description "Zope.interface provides an implementation of \"object
8694 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8695 conforming to a given API or contract.")
8696 (license license:zpl2.1)))
8697
8698 (define-public python2-zope-interface
8699 (package-with-python2 python-zope-interface))
8700
8701 (define-public python-zope-exceptions
8702 (package
8703 (name "python-zope-exceptions")
8704 (version "4.0.8")
8705 (source
8706 (origin
8707 (method url-fetch)
8708 (uri (string-append "https://pypi.python.org/packages/source/z"
8709 "/zope.exceptions/zope.exceptions-"
8710 version ".tar.gz"))
8711 (sha256
8712 (base32
8713 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8714 (build-system python-build-system)
8715 (arguments
8716 '(#:tests? #f)) ; circular dependency with zope.testrunner
8717 (propagated-inputs
8718 `(("python-zope-interface" ,python-zope-interface)))
8719 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8720 (synopsis "Zope exceptions")
8721 (description "Zope.exceptions provides general-purpose exception types
8722 that have uses outside of the Zope framework.")
8723 (license license:zpl2.1)))
8724
8725 (define-public python2-zope-exceptions
8726 (package-with-python2 python-zope-exceptions))
8727
8728 (define-public python-zope-testing
8729 (package
8730 (name "python-zope-testing")
8731 (version "4.5.0")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (string-append "https://pypi.python.org/packages/source/z"
8736 "/zope.testing/zope.testing-" version ".tar.gz"))
8737 (sha256
8738 (base32
8739 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8740 (modules '((guix build utils)))
8741 (snippet
8742 '(begin
8743 ;; Remove pre-compiled .pyc files backup files from source.
8744 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8745 #t))))
8746 (build-system python-build-system)
8747 (native-inputs
8748 `(("python-zope-exceptions" ,python-zope-exceptions)))
8749 (propagated-inputs
8750 `(("python-zope-interface" ,python-zope-interface)))
8751 (home-page "http://pypi.python.org/pypi/zope.testing")
8752 (synopsis "Zope testing helpers")
8753 (description "Zope.testing provides a number of testing utilities for HTML
8754 forms, HTTP servers, regular expressions, and more.")
8755 (license license:zpl2.1)))
8756
8757 (define-public python2-zope-testing
8758 (package-with-python2 python-zope-testing))
8759
8760 (define-public python-zope-testrunner
8761 (package
8762 (name "python-zope-testrunner")
8763 (version "4.4.9")
8764 (source
8765 (origin
8766 (method url-fetch)
8767 (uri (string-append "https://pypi.python.org/packages/source/z"
8768 "/zope.testrunner/zope.testrunner-"
8769 version ".zip"))
8770 (sha256
8771 (base32
8772 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8773 (build-system python-build-system)
8774 (arguments
8775 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8776 (native-inputs
8777 `(("python-six" ,python-six)
8778 ;("python-zope-interface" ,python-zope-interface)
8779 ("python-zope-exceptions" ,python-zope-exceptions)
8780 ("python-zope-testing" ,python-zope-testing)
8781 ("unzip" ,unzip)))
8782 (propagated-inputs
8783 `(("python-zope-interface" ,python-zope-interface)))
8784 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8785 (synopsis "Zope testrunner script")
8786 (description "Zope.testrunner provides a script for running Python
8787 tests.")
8788 (license license:zpl2.1)))
8789
8790 (define-public python2-zope-testrunner
8791 (let ((base (package-with-python2 python-zope-testrunner)))
8792 (package
8793 (inherit base)
8794 (native-inputs
8795 (append (package-native-inputs base)
8796 `(("python2-subunit" ,python2-subunit)
8797 ("python2-mimeparse" ,python2-mimeparse)))))))
8798
8799 (define-public python-zope-i18nmessageid
8800 (package
8801 (name "python-zope-i18nmessageid")
8802 (version "4.0.3")
8803 (source
8804 (origin
8805 (method url-fetch)
8806 (uri (string-append
8807 "https://pypi.python.org/packages/source/z"
8808 "/zope.i18nmessageid/zope.i18nmessageid-"
8809 version ".tar.gz"))
8810 (sha256
8811 (base32
8812 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8813 (build-system python-build-system)
8814 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8815 (synopsis "Message identifiers for internationalization")
8816 (description "Zope.i18nmessageid provides facilities for declaring
8817 internationalized messages within program source text.")
8818 (license license:zpl2.1)))
8819
8820 (define-public python2-zope-i18nmessageid
8821 (package-with-python2 python-zope-i18nmessageid))
8822
8823 (define-public python-zope-schema
8824 (package
8825 (name "python-zope-schema")
8826 (version "4.4.2")
8827 (source
8828 (origin
8829 (method url-fetch)
8830 (uri (string-append "https://pypi.python.org/packages/source/z"
8831 "/zope.schema/zope.schema-" version ".tar.gz"))
8832 (sha256
8833 (base32
8834 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8835 (build-system python-build-system)
8836 (arguments
8837 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8838 (propagated-inputs
8839 `(("python-zope-event" ,python-zope-event)
8840 ("python-zope-exceptions", python-zope-exceptions)
8841 ("python-zope-interface" ,python-zope-interface)))
8842 (native-inputs
8843 `(("python-zope-testing" ,python-zope-testing)
8844 ("python-coverage" ,python-coverage)
8845 ("python-nose" ,python-nose)))
8846 (home-page "http://pypi.python.org/pypi/zope.schema")
8847 (synopsis "Zope data schemas")
8848 (description "Zope.scheme provides extensions to zope.interface for
8849 defining data schemas.")
8850 (license license:zpl2.1)))
8851
8852 (define-public python2-zope-schema
8853 (package-with-python2 python-zope-schema))
8854
8855 (define-public python-zope-configuration
8856 (package
8857 (name "python-zope-configuration")
8858 (version "4.0.3")
8859 (source (origin
8860 (method url-fetch)
8861 (uri (string-append "https://pypi.python.org/packages/source/z"
8862 "/zope.configuration/zope.configuration-"
8863 version ".tar.gz"))
8864 (sha256
8865 (base32
8866 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8867 (build-system python-build-system)
8868 (arguments
8869 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8870 (propagated-inputs
8871 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8872 ("python-zope-schema" ,python-zope-schema)))
8873 (home-page "http://pypi.python.org/pypi/zope.configuration")
8874 (synopsis "Zope Configuration Markup Language")
8875 (description "Zope.configuration implements ZCML, the Zope Configuration
8876 Markup Language.")
8877 (license license:zpl2.1)))
8878
8879 (define-public python2-zope-configuration
8880 (package-with-python2 python-zope-configuration))
8881
8882 (define-public python-zope-proxy
8883 (package
8884 (name "python-zope-proxy")
8885 (version "4.1.6")
8886 (source
8887 (origin
8888 (method url-fetch)
8889 (uri (string-append "https://pypi.python.org/packages/source/z"
8890 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8891 (sha256
8892 (base32
8893 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8894 (build-system python-build-system)
8895 (arguments
8896 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8897 (propagated-inputs
8898 `(("python-zope-interface" ,python-zope-interface)))
8899 (home-page "http://pypi.python.org/pypi/zope.proxy")
8900 (synopsis "Generic, transparent proxies")
8901 (description "Zope.proxy provides generic, transparent proxies for Python.
8902 Proxies are special objects which serve as mostly-transparent wrappers around
8903 another object, intervening in the apparent behavior of the wrapped object
8904 only when necessary to apply the policy (e.g., access checking, location
8905 brokering, etc.) for which the proxy is responsible.")
8906 (license license:zpl2.1)))
8907
8908 (define-public python2-zope-proxy
8909 (package-with-python2 python-zope-proxy))
8910
8911 (define-public python-zope-location
8912 (package
8913 (name "python-zope-location")
8914 (version "4.0.3")
8915 (source
8916 (origin
8917 (method url-fetch)
8918 (uri (string-append "https://pypi.python.org/packages/source/z"
8919 "/zope.location/zope.location-" version ".tar.gz"))
8920 (sha256
8921 (base32
8922 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8923 (build-system python-build-system)
8924 (arguments
8925 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8926 (propagated-inputs
8927 `(("python-zope-proxy" ,python-zope-proxy)
8928 ("python-zope-schema" ,python-zope-schema)))
8929 (home-page "http://pypi.python.org/pypi/zope.location/")
8930 (synopsis "Zope location library")
8931 (description "Zope.location implements the concept of \"locations\" in
8932 Zope3, which are are special objects that have a structural location.")
8933 (license license:zpl2.1)))
8934
8935 (define-public python2-zope-location
8936 (package-with-python2 python-zope-location))
8937
8938 (define-public python-zope-security
8939 (package
8940 (name "python-zope-security")
8941 (version "4.0.3")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (string-append "https://pypi.python.org/packages/source/z"
8946 "/zope.security/zope.security-" version ".tar.gz"))
8947 (sha256
8948 (base32
8949 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8950 (build-system python-build-system)
8951 (arguments
8952 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8953 (propagated-inputs
8954 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8955 ("python-zope-proxy" ,python-zope-proxy)
8956 ("python-zope-schema" ,python-zope-schema)))
8957 (native-inputs
8958 `(("python-six" ,python-six)
8959 ("python-zope-component" ,python-zope-component)
8960 ("python-zope-configuration" ,python-zope-configuration)
8961 ("python-zope-location" ,python-zope-location)
8962 ("python-zope-testrunner" ,python-zope-testrunner)
8963 ("python-zope-testing" ,python-zope-testing)))
8964 (home-page "http://pypi.python.org/pypi/zope.security")
8965 (synopsis "Zope security framework")
8966 (description "Zope.security provides a generic mechanism to implement
8967 security policies on Python objects.")
8968 (license license:zpl2.1)))
8969
8970 (define-public python2-zope-security
8971 (let ((zope-security (package-with-python2 python-zope-security)))
8972 (package (inherit zope-security)
8973 (propagated-inputs
8974 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8975 ,@(alist-delete
8976 "python-zope-testrunner"
8977 (package-propagated-inputs zope-security)))))))
8978
8979 (define-public python-zope-component
8980 (package
8981 (name "python-zope-component")
8982 (version "4.3.0")
8983 (source
8984 (origin
8985 (method url-fetch)
8986 (uri (pypi-uri "zope.component" version))
8987 (sha256
8988 (base32
8989 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8990 (build-system python-build-system)
8991 (arguments
8992 ;; Skip tests due to circular dependency with python-zope-security.
8993 '(#:tests? #f))
8994 (native-inputs
8995 `(("python-zope-testing" ,python-zope-testing)))
8996 (propagated-inputs
8997 `(("python-zope-event" ,python-zope-event)
8998 ("python-zope-interface" ,python-zope-interface)
8999 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9000 ("python-zope-configuration" ,python-zope-configuration)))
9001 (home-page "https://github.com/zopefoundation/zope.component")
9002 (synopsis "Zope Component Architecture")
9003 (description "Zope.component represents the core of the Zope Component
9004 Architecture. Together with the zope.interface package, it provides
9005 facilities for defining, registering and looking up components.")
9006 (license license:zpl2.1)))
9007
9008 (define-public python2-zope-component
9009 (package-with-python2 python-zope-component))
9010
9011 (define-public python-pythondialog
9012 (package
9013 (name "python-pythondialog")
9014 (version "3.4.0")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "pythondialog" version))
9019 (sha256
9020 (base32
9021 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9022 (build-system python-build-system)
9023 (arguments
9024 `(#:phases
9025 (modify-phases %standard-phases
9026 (add-after 'unpack 'patch-path
9027 (lambda* (#:key inputs #:allow-other-keys)
9028 (let* ((dialog (assoc-ref inputs "dialog")))
9029 ;; Since this library really wants to grovel the search path, we
9030 ;; must hardcode dialog's store path into it.
9031 (substitute* "dialog.py"
9032 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9033 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9034 #t))))
9035 #:tests? #f)) ; no test suite
9036 (propagated-inputs
9037 `(("dialog" ,dialog)))
9038 (home-page "http://pythondialog.sourceforge.net/")
9039 (synopsis "Python interface to the UNIX dialog utility")
9040 (description "A Python wrapper for the dialog utility. Its purpose is to
9041 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9042 This allows one to make simple text-mode user interfaces on Unix-like systems")
9043 (license license:lgpl2.1)
9044 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9045
9046 (define-public python2-pythondialog
9047 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9048 (package
9049 (inherit base)
9050 (version (package-version python-pythondialog))
9051 (source (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "python2-pythondialog" version))
9054 (sha256
9055 (base32
9056 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9057
9058 (define-public python-pyrfc3339
9059 (package
9060 (name "python-pyrfc3339")
9061 (version "1.0")
9062 (source
9063 (origin
9064 (method url-fetch)
9065 (uri (pypi-uri "pyRFC3339" version))
9066 (sha256
9067 (base32
9068 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
9069 (build-system python-build-system)
9070 (propagated-inputs
9071 `(("python-pytz" ,python-pytz)))
9072 (native-inputs
9073 `(("python-nose" ,python-nose)))
9074 (home-page "https://github.com/kurtraschke/pyRFC3339")
9075 (synopsis "Python timestamp library")
9076 (description "Python library for generating and parsing RFC 3339-compliant
9077 timestamps.")
9078 (license license:expat)))
9079
9080 (define-public python2-pyrfc3339
9081 (package-with-python2 python-pyrfc3339))
9082
9083 (define-public python-werkzeug
9084 (package
9085 (name "python-werkzeug")
9086 (version "0.11.15")
9087 (source
9088 (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "Werkzeug" version))
9091 (sha256
9092 (base32
9093 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
9094 (build-system python-build-system)
9095 (native-inputs
9096 `(("python-pytest" ,python-pytest)))
9097 (home-page "http://werkzeug.pocoo.org/")
9098 (synopsis "Utilities for WSGI applications")
9099 (description "One of the most advanced WSGI utility modules. It includes a
9100 powerful debugger, full-featured request and response objects, HTTP utilities to
9101 handle entity tags, cache control headers, HTTP dates, cookie handling, file
9102 uploads, a powerful URL routing system and a bunch of community-contributed
9103 addon modules.")
9104 (license license:x11)))
9105
9106 (define-public python2-werkzeug
9107 (package-with-python2 python-werkzeug))
9108
9109 (define-public python-configobj
9110 (package
9111 (name "python-configobj")
9112 (version "5.0.6")
9113 (source (origin
9114 (method url-fetch)
9115 (uri (string-append
9116 "https://pypi.python.org/packages/source/c/configobj/"
9117 "configobj-" version ".tar.gz"))
9118 (sha256
9119 (base32
9120 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9121 ;; Patch setup.py so it looks for python-setuptools, which is
9122 ;; required to parse the keyword 'install_requires' in setup.py.
9123 (patches (search-patches "python-configobj-setuptools.patch"))))
9124 (build-system python-build-system)
9125 (propagated-inputs
9126 `(("python-six" ,python-six)))
9127 (synopsis "Config file reading, writing and validation")
9128 (description "ConfigObj is a simple but powerful config file reader and
9129 writer: an ini file round tripper. Its main feature is that it is very easy to
9130 use, with a straightforward programmer’s interface and a simple syntax for
9131 config files.")
9132 (home-page "https://github.com/DiffSK/configobj")
9133 (license license:bsd-3)))
9134
9135 (define-public python2-configobj
9136 (package-with-python2 python-configobj))
9137
9138 (define-public python-configargparse
9139 (package
9140 (name "python-configargparse")
9141 (version "0.10.0")
9142 (source (origin
9143 (method url-fetch)
9144 (uri (string-append
9145 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
9146 "ConfigArgParse-" version ".tar.gz"))
9147 (sha256
9148 (base32
9149 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
9150 (build-system python-build-system)
9151 (arguments
9152 ;; FIXME: Bug in test suite filed upstream:
9153 ;; https://github.com/bw2/ConfigArgParse/issues/32
9154 '(#:tests? #f))
9155 (synopsis "Replacement for argparse")
9156 (description "A drop-in replacement for argparse that allows options to also
9157 be set via config files and/or environment variables.")
9158 (home-page "https://github.com/bw2/ConfigArgParse")
9159 (license license:expat)))
9160
9161 (define-public python2-configargparse
9162 (package-with-python2 python-configargparse))
9163
9164 (define-public python-ndg-httpsclient
9165 (package
9166 (name "python-ndg-httpsclient")
9167 (version "0.4.2")
9168 (source (origin
9169 (method url-fetch)
9170 (uri (pypi-uri "ndg_httpsclient" version))
9171 (sha256
9172 (base32
9173 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
9174 (build-system python-build-system)
9175 (arguments
9176 '(;; The tests appear to require networking.
9177 #:tests? #f))
9178 (propagated-inputs
9179 `(("python-pyopenssl" ,python-pyopenssl)))
9180 (synopsis "HTTPS support for Python's httplib and urllib2")
9181 (description "This is a HTTPS client implementation for httplib and urllib2
9182 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
9183 over the default provided with Python and importantly enables full verification
9184 of the SSL peer.")
9185 (home-page "https://github.com/cedadev/ndg_httpsclient/")
9186 (license license:bsd-3)))
9187
9188 ;; python2-openssl requires special care, so package-with-python2 is
9189 ;; insufficient.
9190 (define-public python2-ndg-httpsclient
9191 (package (inherit python-ndg-httpsclient)
9192 (name "python2-ndg-httpsclient")
9193 (arguments `(#:python ,python-2))
9194 (propagated-inputs
9195 `(("python2-pyopenssl" ,python2-pyopenssl)))))
9196
9197 (define-public python-contextlib2
9198 (package
9199 (name "python-contextlib2")
9200 (version "0.4.0")
9201 (source
9202 (origin
9203 (method url-fetch)
9204 (uri (pypi-uri "contextlib2" version))
9205 (sha256
9206 (base32
9207 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
9208 (build-system python-build-system)
9209 (arguments
9210 `(#:phases
9211 (modify-phases %standard-phases
9212 (replace 'check
9213 (lambda _ (zero?
9214 (system*
9215 "python" "test_contextlib2.py" "-v")))))))
9216 (home-page "http://contextlib2.readthedocs.org/")
9217 (synopsis "Tools for decorators and context managers")
9218 (description "This module is primarily a backport of the Python
9219 3.2 contextlib to earlier Python versions. Like contextlib, it
9220 provides utilities for common tasks involving decorators and context
9221 managers. It also contains additional features that are not part of
9222 the standard library.")
9223 (license license:psfl)))
9224
9225 (define-public python2-contextlib2
9226 (package-with-python2 python-contextlib2))
9227
9228 (define-public python-texttable
9229 (package
9230 (name "python-texttable")
9231 (version "0.8.7")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "texttable" version))
9236 (sha256
9237 (base32
9238 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
9239 (build-system python-build-system)
9240 (arguments '(#:tests? #f)) ; no tests
9241 (home-page "https://github.com/foutaise/texttable/")
9242 (synopsis "Python module for creating simple ASCII tables")
9243 (description "Texttable is a Python module for creating simple ASCII
9244 tables.")
9245 (license license:lgpl2.1+)))
9246
9247 (define-public python2-texttable
9248 (package-with-python2 python-texttable))
9249
9250 (define-public python-websocket-client
9251 (package
9252 (name "python-websocket-client")
9253 (version "0.37.0")
9254 (source
9255 (origin
9256 (method url-fetch)
9257 (uri (pypi-uri "websocket_client" version))
9258 (sha256
9259 (base32
9260 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
9261 (build-system python-build-system)
9262 (propagated-inputs
9263 `(("python-six" ,python-six)))
9264 (home-page "https://github.com/liris/websocket-client")
9265 (synopsis "WebSocket client for Python")
9266 (description "The Websocket-client module provides the low level APIs for
9267 WebSocket usage in Python programs.")
9268 (license license:lgpl2.1+)))
9269
9270 (define-public python2-websocket-client
9271 (package-with-python2 python-websocket-client))
9272
9273 (define-public python-atomicwrites
9274 (package
9275 (name "python-atomicwrites")
9276 (version "1.1.5")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "atomicwrites" version))
9280 (sha256
9281 (base32
9282 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
9283 (build-system python-build-system)
9284 (synopsis "Atomic file writes in Python")
9285 (description "Library for atomic file writes using platform dependent tools
9286 for atomic file system operations.")
9287 (home-page "https://github.com/untitaker/python-atomicwrites")
9288 (license license:expat)))
9289
9290 (define-public python2-atomicwrites
9291 (package-with-python2 python-atomicwrites))
9292
9293 (define-public python-requests-toolbelt
9294 (package
9295 (name "python-requests-toolbelt")
9296 (version "0.8.0")
9297 (source (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "requests-toolbelt" version))
9300 (sha256
9301 (base32
9302 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
9303 (build-system python-build-system)
9304 (native-inputs
9305 `(("python-betamax" ,python-betamax)
9306 ("python-mock" ,python-mock)
9307 ("python-pytest" ,python-pytest)))
9308 (propagated-inputs
9309 `(("python-requests" ,python-requests)))
9310 (synopsis "Extensions to python-requests")
9311 (description "This is a toolbelt of useful classes and functions to be used
9312 with python-requests.")
9313 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
9314 (license license:asl2.0)))
9315
9316 (define-public python2-requests-toolbelt
9317 (package-with-python2 python-requests-toolbelt))
9318
9319 (define-public python-click-threading
9320 (package
9321 (name "python-click-threading")
9322 (version "0.4.3")
9323 (source (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "click-threading" version))
9326 (sha256
9327 (base32
9328 "0xs4bg2ws0zgyiplk312l049hi23c2zqf1g771rjhh5vr2msk4cg"))))
9329 (build-system python-build-system)
9330 (propagated-inputs
9331 `(("python-click" ,python-click)))
9332 (synopsis "Utilities for multithreading in Click")
9333 (description "This package provides utilities for multithreading in Click
9334 applications.")
9335 (home-page "https://github.com/click-contrib/click-threading")
9336 (license license:expat)))
9337
9338 (define-public python-click-log
9339 (package
9340 (name "python-click-log")
9341 (version "0.2.0")
9342 (source (origin
9343 (method url-fetch)
9344 (uri (pypi-uri "click-log" version))
9345 (sha256
9346 (base32
9347 "1bjrfxji1yv4fj0g78ri2yfgn2wbivn8g69fxfinxvxpmighhshp"))))
9348 (build-system python-build-system)
9349 (propagated-inputs
9350 `(("python-click" ,python-click)))
9351 (synopsis "Logging for click applications")
9352 (description "This package provides a Python library for logging Click
9353 applications.")
9354 (home-page "https://github.com/click-contrib/click-log")
9355 (license license:expat)))
9356
9357 (define-public python-apipkg
9358 (package
9359 (name "python-apipkg")
9360 (version "1.4")
9361 (source (origin
9362 (method url-fetch)
9363 (uri (pypi-uri "apipkg" version))
9364 (sha256
9365 (base32
9366 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9367 (build-system python-build-system)
9368 (native-inputs
9369 `(("python-pytest" ,python-pytest)))
9370 (synopsis "Namespace control and lazy-import mechanism")
9371 (description "With apipkg you can control the exported namespace of a Python
9372 package and greatly reduce the number of imports for your users. It is a small
9373 pure Python module that works on virtually all Python versions.")
9374 (home-page "https://bitbucket.org/hpk42/apipkg")
9375 (license license:expat)))
9376
9377 (define-public python2-apipkg
9378 (package-with-python2 python-apipkg))
9379
9380 (define-public python-execnet
9381 (package
9382 (name "python-execnet")
9383 (version "1.4.1")
9384 (source (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "execnet" version))
9387 (sha256
9388 (base32
9389 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9390 (build-system python-build-system)
9391 (arguments
9392 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9393 ;; The two test failures are caused by the lack of an `ssh` executable.
9394 ;; The test suite can be run with pytest after the 'install' phase.
9395 #:tests? #f))
9396 (native-inputs
9397 `(("python-pytest" ,python-pytest)
9398 ("python-setuptools-scm" ,python-setuptools-scm)))
9399 (propagated-inputs
9400 `(("python-apipkg" ,python-apipkg)))
9401 (synopsis "Rapid multi-Python deployment")
9402 (description "Execnet provides a share-nothing model with
9403 channel-send/receive communication for distributing execution across many
9404 Python interpreters across version, platform and network barriers. It has a
9405 minimal and fast API targeting the following uses:
9406 @enumerate
9407 @item distribute tasks to (many) local or remote CPUs
9408 @item write and deploy hybrid multi-process applications
9409 @item write scripts to administer multiple environments
9410 @end enumerate")
9411 (home-page "http://codespeak.net/execnet/")
9412 (license license:expat)))
9413
9414 (define-public python2-execnet
9415 (package-with-python2 python-execnet))
9416
9417 (define-public python-trollius-redis
9418 (package
9419 (name "python-trollius-redis")
9420 (version "0.1.4")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "trollius_redis" version))
9425 (sha256
9426 (base32
9427 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9428 (build-system python-build-system)
9429 ;; TODO: Tests require packaging 'hiredis'.
9430 (arguments '(#:tests? #f))
9431 (home-page "https://github.com/benjolitz/trollius-redis")
9432 (synopsis "Port of asyncio-redis to trollius")
9433 (description "@code{trollius-redis} is a Redis client for Python
9434 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9435 Redis protocol.")
9436 (license license:bsd-2)))
9437
9438 (define-public python2-trollius-redis
9439 (package-with-python2 python-trollius-redis))
9440
9441 ;;; The software provided by this package was integrated into pytest 2.8.
9442 (define-public python-pytest-cache
9443 (package
9444 (name "python-pytest-cache")
9445 (version "1.0")
9446 (source (origin
9447 (method url-fetch)
9448 (uri (pypi-uri "pytest-cache" version))
9449 (sha256
9450 (base32
9451 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9452 (build-system python-build-system)
9453 (propagated-inputs
9454 `(("python-apipkg" ,python-apipkg)
9455 ("python-execnet" ,python-execnet)
9456 ("python-py" ,python-py)
9457 ("python-pytest" ,python-pytest)))
9458 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9459 (description "The pytest-cache plugin provides tools to rerun failures from
9460 the last py.test invocation.")
9461 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9462 (license license:expat)))
9463
9464 (define-public python2-pytest-cache
9465 (package-with-python2 python-pytest-cache))
9466
9467 (define-public python-pytest-localserver
9468 (package
9469 (name "python-pytest-localserver")
9470 (version "0.3.5")
9471 (source (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "pytest-localserver" version))
9474 (sha256
9475 (base32
9476 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9477 (build-system python-build-system)
9478 (arguments
9479 `(#:phases (modify-phases %standard-phases
9480 (replace 'check
9481 (lambda _
9482 (zero? (system* "py.test" "--genscript=runtests.py"))
9483 (zero? (system* "py.test")))))))
9484 (native-inputs
9485 `(("python-pytest" ,python-pytest)
9486 ("python-requests" ,python-requests)
9487 ("python-six" ,python-six)))
9488 (propagated-inputs
9489 `(("python-werkzeug" ,python-werkzeug)))
9490 (synopsis "Py.test plugin to test server connections locally")
9491 (description "Pytest-localserver is a plugin for the pytest testing
9492 framework which enables you to test server connections locally.")
9493 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9494 (license license:expat)))
9495
9496 (define-public python-wsgi-intercept
9497 (package
9498 (name "python-wsgi-intercept")
9499 (version "1.2.2")
9500 (source (origin
9501 (method url-fetch)
9502 (uri (string-append
9503 "https://pypi.python.org/packages/"
9504 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9505 "wsgi_intercept-" version ".tar.gz"))
9506 (sha256
9507 (base32
9508 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9509 (build-system python-build-system)
9510 (propagated-inputs
9511 `(("python-six" ,python-six)))
9512 (native-inputs
9513 `(("python-pytest" ,python-pytest)
9514 ("python-httplib2" ,python-httplib2)
9515 ("python-requests" ,python-requests)
9516 ("python-urllib3" ,python-urllib3)))
9517 (synopsis "Puts a WSGI application in place of a real URI for testing")
9518 (description "Wsgi_intercept installs a WSGI application in place of a real
9519 URI for testing. Testing a WSGI application normally involves starting a
9520 server at a local host and port, then pointing your test code to that address.
9521 Instead, this library lets you intercept calls to any specific host/port
9522 combination and redirect them into a WSGI application importable by your test
9523 program. Thus, you can avoid spawning multiple processes or threads to test
9524 your Web app.")
9525 (home-page "https://github.com/cdent/wsgi-intercept")
9526 (license license:expat)))
9527
9528 (define-public python-pytest-xprocess
9529 (package
9530 (name "python-pytest-xprocess")
9531 (version "0.9.1")
9532 (source (origin
9533 (method url-fetch)
9534 (uri (pypi-uri "pytest-xprocess" version))
9535 (sha256
9536 (base32
9537 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9538 (build-system python-build-system)
9539 (propagated-inputs
9540 `(("python-pytest" ,python-pytest)
9541 ("python-pytest-cache" ,python-pytest-cache)
9542 ("python-psutil" ,python-psutil)))
9543 (synopsis "Pytest plugin to manage external processes across test runs")
9544 (description "Pytest-xprocess is an experimental py.test plugin for managing
9545 processes across test runs.")
9546 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9547 (license license:expat)))
9548
9549 (define-public python-icalendar
9550 (package
9551 (name "python-icalendar")
9552 (version "3.11.7")
9553 (source (origin
9554 (method url-fetch)
9555 (uri (pypi-uri "icalendar" version))
9556 (sha256
9557 (base32
9558 "0ahf1i98wjizhld2qd7v2vmvzsmdw08mmins82bf3fpbnp2sxbgc"))))
9559 (build-system python-build-system)
9560 (propagated-inputs
9561 `(("python-dateutil" ,python-dateutil)
9562 ("python-pytz" ,python-pytz)))
9563 (synopsis "Python library for parsing iCalendar files")
9564 (description "The icalendar package is a parser/generator of iCalendar
9565 files for use with Python.")
9566 (home-page "https://github.com/collective/icalendar")
9567 (license license:bsd-2)))
9568
9569 (define-public python-sphinxcontrib-newsfeed
9570 (package
9571 (name "python-sphinxcontrib-newsfeed")
9572 (version "0.1.4")
9573 (source (origin
9574 (method url-fetch)
9575 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9576 (sha256
9577 (base32
9578 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9579 (arguments '(#:tests? #f)) ; No tests.
9580 (build-system python-build-system)
9581 (propagated-inputs
9582 `(("python-sphinx" ,python-sphinx)))
9583 (synopsis "News Feed extension for Sphinx")
9584 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9585 Blog, News or Announcements section to a Sphinx website.")
9586 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9587 (license license:bsd-2)))
9588
9589 (define-public python-args
9590 (package
9591 (name "python-args")
9592 (version "0.1.0")
9593 (source (origin
9594 (method url-fetch)
9595 (uri (pypi-uri "args" version))
9596 (sha256
9597 (base32
9598 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9599 (build-system python-build-system)
9600 (home-page "https://github.com/kennethreitz/args")
9601 (synopsis "Command-line argument parser")
9602 (description
9603 "This library provides a Python module to parse command-line arguments.")
9604 (license license:bsd-3)))
9605
9606 (define-public python2-args
9607 (package-with-python2 python-args))
9608
9609 (define-public python-clint
9610 (package
9611 (name "python-clint")
9612 (version "0.5.1")
9613 (source (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "clint" version))
9616 (sha256
9617 (base32
9618 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9619 (build-system python-build-system)
9620 (arguments
9621 '(#:phases
9622 (modify-phases %standard-phases
9623 (replace 'check
9624 (lambda _
9625 (zero? (system* "py.test" "-v")))))))
9626 (native-inputs
9627 `(("python-pytest" ,python-pytest)))
9628 (propagated-inputs
9629 `(("python-args" ,python-args)))
9630 (home-page "https://github.com/kennethreitz/clint")
9631 (synopsis "Command-line interface tools")
9632 (description
9633 "Clint is a Python module filled with a set of tools for developing
9634 command-line applications, including tools for colored and indented
9635 output, progress bar display, and pipes.")
9636 (license license:isc)))
9637
9638 (define-public python2-clint
9639 (package-with-python2 python-clint))
9640
9641 (define-public python-astor
9642 (package
9643 (name "python-astor")
9644 (version "0.5")
9645 (source (origin
9646 (method url-fetch)
9647 (uri (pypi-uri "astor" version))
9648 (sha256
9649 (base32
9650 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9651 (build-system python-build-system)
9652 (home-page "https://github.com/berkerpeksag/astor")
9653 (synopsis "Read and write Python ASTs")
9654 (description
9655 "Astor is designed to allow easy manipulation of Python source via the
9656 Abstract Syntax Tree.")
9657 (license license:bsd-3)))
9658
9659 (define-public python2-astor
9660 (package-with-python2 python-astor))
9661
9662 (define-public python-rply
9663 (package
9664 (name "python-rply")
9665 (version "0.7.4")
9666 (source (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "rply" version))
9669 (sha256
9670 (base32
9671 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9672 (build-system python-build-system)
9673 (propagated-inputs
9674 `(("python-appdirs" ,python-appdirs)))
9675 (home-page "https://github.com/alex/rply")
9676 (synopsis "Parser generator for Python")
9677 (description
9678 "This package provides a pure Python based parser generator, that also
9679 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9680 with a new public API, and RPython support.")
9681 (license license:bsd-3)))
9682
9683 (define-public python2-rply
9684 (package-with-python2 python-rply))
9685
9686 (define-public python-hy
9687 (package
9688 (name "python-hy")
9689 (version "0.11.1")
9690 (source (origin
9691 (method url-fetch)
9692 (uri (pypi-uri "hy" version))
9693 (sha256
9694 (base32
9695 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9696 (build-system python-build-system)
9697 (arguments
9698 '(#:phases
9699 (modify-phases %standard-phases
9700 (replace 'check
9701 (lambda _
9702 ;; Tests require write access to HOME.
9703 (setenv "HOME" "/tmp")
9704 (zero? (system* "nosetests")))))))
9705 (native-inputs
9706 `(("python-coverage" ,python-coverage)
9707 ("python-nose" ,python-nose)))
9708 (propagated-inputs
9709 `(("python-astor" ,python-astor)
9710 ("python-clint" ,python-clint)
9711 ("python-rply" ,python-rply)))
9712 (home-page "http://hylang.org/")
9713 (synopsis "Lisp frontend to Python")
9714 (description
9715 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9716 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9717 Python at your fingertips, in Lisp form.")
9718 (license license:expat)))
9719
9720 (define-public python2-hy
9721 (package-with-python2 python-hy))
9722
9723 (define-public python-rauth
9724 (package
9725 (name "python-rauth")
9726 (version "0.7.3")
9727 (source
9728 (origin
9729 (method url-fetch)
9730 (uri (pypi-uri "rauth" version))
9731 (sha256
9732 (base32
9733 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9734 (build-system python-build-system)
9735 (arguments
9736 `(#:test-target "check"))
9737 (propagated-inputs
9738 `(("python-requests" ,python-requests)))
9739 (home-page "https://github.com/litl/rauth")
9740 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9741 (description
9742 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9743 provides service wrappers for convenient connection initialization and
9744 authenticated session objects providing things like keep-alive.")
9745 (license license:expat)
9746 (properties `((python2-variant . ,(delay python2-rauth))))))
9747
9748 (define-public python2-rauth
9749 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9750 (package
9751 (inherit base)
9752 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9753 ,@(package-native-inputs base))))))
9754
9755 (define-public python2-functools32
9756 (package
9757 (name "python2-functools32")
9758 (version "3.2.3-2")
9759 (source
9760 (origin
9761 (method url-fetch)
9762 (uri (pypi-uri "functools32" version))
9763 (sha256
9764 (base32
9765 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9766 (build-system python-build-system)
9767 (arguments
9768 `(#:python ,python-2
9769 #:tests? #f)) ; no test target
9770 (home-page "https://github.com/MiCHiLU/python-functools32")
9771 (synopsis
9772 "Backport of the functools module from Python 3.2.3")
9773 (description
9774 "This package is a backport of the @code{functools} module from Python
9775 3.2.3 for use with older versions of Python and PyPy.")
9776 (license license:expat)))
9777
9778 (define-public python2-subprocess32
9779 (package
9780 (name "python2-subprocess32")
9781 (version "3.2.7")
9782 (source (origin
9783 (method url-fetch)
9784 (uri (pypi-uri "subprocess32" version))
9785 (sha256
9786 (base32
9787 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9788 (patches
9789 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9790 (build-system python-build-system)
9791 (arguments
9792 `(#:python ,python-2
9793 #:phases
9794 (modify-phases %standard-phases
9795 (add-after 'unpack 'patch-/bin/sh
9796 (lambda _
9797 (substitute* '("subprocess32.py"
9798 "test_subprocess32.py")
9799 (("/bin/sh") (which "sh")))
9800 #t))
9801 (delete 'check)
9802 (add-after 'install 'check
9803 (lambda* (#:key inputs outputs #:allow-other-keys)
9804 ;; For some reason this package fails to import
9805 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9806 ;; directory. Running tests after install is easier.
9807 (add-installed-pythonpath inputs outputs)
9808 (zero? (system* "python" "test_subprocess32.py")))))))
9809 (home-page "https://github.com/google/python-subprocess32")
9810 (synopsis "Backport of the subprocess module from Python 3.2")
9811 (description
9812 "This is a backport of the @code{subprocess} standard library module
9813 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9814 new features. On POSIX systems it is guaranteed to be reliable when used
9815 in threaded applications. It includes timeout support from Python 3.3 but
9816 otherwise matches 3.2’s API.")
9817 (license license:psfl)))
9818
9819 (define-public python2-futures
9820 (package
9821 (name "python2-futures")
9822 (version "3.0.5")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri "futures" version))
9827 (sha256
9828 (base32
9829 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9830 (build-system python-build-system)
9831 (arguments `(#:python ,python-2))
9832 (home-page "https://github.com/agronholm/pythonfutures")
9833 (synopsis
9834 "Backport of the concurrent.futures package from Python 3.2")
9835 (description
9836 "The concurrent.futures module provides a high-level interface for
9837 asynchronously executing callables. This package backports the
9838 concurrent.futures package from Python 3.2")
9839 (license license:bsd-3)))
9840
9841 (define-public python-promise
9842 (package
9843 (name "python-promise")
9844 (version "0.4.2")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "promise" version))
9849 (sha256
9850 (base32
9851 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9852 (build-system python-build-system)
9853 ;; Tests wants python-futures, which is a python2 only program, and
9854 ;; can't be found by python-promise at test time.
9855 (arguments `(#:tests? #f))
9856 (home-page "https://github.com/syrusakbary/promise")
9857 (synopsis "Promises/A+ implementation for Python")
9858 (description
9859 "Promises/A+ implementation for Python")
9860 (properties `((python2-variant . ,(delay python2-promise))))
9861 (license license:expat)))
9862
9863 (define-public python2-promise
9864 (let ((promise (package-with-python2
9865 (strip-python2-variant python-promise))))
9866 (package (inherit promise)
9867 (arguments (substitute-keyword-arguments (package-arguments promise)
9868 ((#:tests? _) #t)))
9869 (native-inputs
9870 `(("python2-futures" ,python2-futures)
9871 ("python2-pytest" ,python2-pytest)
9872 ,@(package-native-inputs promise))))))
9873
9874 (define-public python-urllib3
9875 (package
9876 (name "python-urllib3")
9877 (version "1.18.1")
9878 (source
9879 (origin
9880 (method url-fetch)
9881 (uri (pypi-uri "urllib3" version))
9882 (sha256
9883 (base32
9884 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9885 (build-system python-build-system)
9886 (arguments `(#:tests? #f))
9887 (native-inputs
9888 `(;; some packages for tests
9889 ("python-nose" ,python-nose)
9890 ("python-mock" ,python-mock)
9891 ("python-tornado" ,python-tornado)))
9892 (propagated-inputs
9893 `(;; These 5 inputs are used to build urrlib3[secure]
9894 ("python-certifi" ,python-certifi)
9895 ("python-cryptography" ,python-cryptography) ;
9896 ("python-idna" ,python-idna)
9897 ("python-ipaddress" ,python-ipaddress)
9898 ("python-pyopenssl" ,python-pyopenssl)))
9899 (home-page "https://urllib3.readthedocs.org/")
9900 (synopsis "HTTP library with thread-safe connection pooling")
9901 (description
9902 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9903 can reuse the same socket connection for multiple requests, it can POST files,
9904 supports url redirection and retries, and also gzip and deflate decoding.")
9905 (license license:expat)))
9906
9907 (define-public python2-urllib3
9908 (package-with-python2 python-urllib3))
9909
9910 (define-public python-colorama
9911 (package
9912 (name "python-colorama")
9913 (version "0.3.7")
9914 (source
9915 (origin
9916 (method url-fetch)
9917 (uri (pypi-uri "colorama" version))
9918 (sha256
9919 (base32
9920 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9921 (build-system python-build-system)
9922 (synopsis "Colored terminal text rendering for Python")
9923 (description "Colorama is a Python library for rendering colored terminal
9924 text.")
9925 (home-page "https://pypi.python.org/pypi/colorama")
9926 (license license:bsd-3)))
9927
9928 (define-public python2-colorama
9929 (package-with-python2 python-colorama))
9930
9931 (define-public python-rsa
9932 (package
9933 (name "python-rsa")
9934 (version "3.4.2")
9935 (source
9936 (origin
9937 (method url-fetch)
9938 (uri (pypi-uri "rsa" version))
9939 (sha256
9940 (base32
9941 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9942 (build-system python-build-system)
9943 (propagated-inputs
9944 `(("python-pyasn1" ,python-pyasn1)))
9945 (synopsis "Pure-Python RSA implementation")
9946 (description "Python-RSA is a pure-Python RSA implementation. It supports
9947 encryption and decryption, signing and verifying signatures, and key
9948 generation according to PKCS#1 version 1.5. It can be used as a Python
9949 library as well as on the command line.")
9950 (home-page "http://stuvel.eu/rsa")
9951 (license license:asl2.0)))
9952
9953 (define-public python2-rsa
9954 (package-with-python2 python-rsa))
9955
9956 (define-public python-pluggy
9957 (package
9958 (name "python-pluggy")
9959 (version "0.3.1")
9960 (source
9961 (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "pluggy" version))
9964 (sha256
9965 (base32
9966 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9967 (build-system python-build-system)
9968 (synopsis "Plugin and hook calling mechanism for Python")
9969 (description "Pluggy is an extraction of the plugin manager as used by
9970 Pytest but stripped of Pytest specific details.")
9971 (home-page "https://pypi.python.org/pypi/pluggy")
9972 (license license:expat)))
9973
9974 (define-public python2-pluggy
9975 (package-with-python2 python-pluggy))
9976
9977 (define-public python-tox
9978 (package
9979 (name "python-tox")
9980 (version "2.8.1")
9981 (source
9982 (origin
9983 (method url-fetch)
9984 (uri (pypi-uri "tox" version))
9985 (sha256
9986 (base32
9987 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9988 (build-system python-build-system)
9989 (arguments
9990 ;; FIXME: Tests require pytest-timeout, which itself requires
9991 ;; pytest>=2.8.0 for installation.
9992 '(#:tests? #f))
9993 (propagated-inputs
9994 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9995 ("python-py" ,python-py)
9996 ("python-virtualenv" ,python-virtualenv)))
9997 (native-inputs
9998 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9999 ("python-pytest" ,python-pytest) ; >= 2.3.5
10000 ("python-setuptools-scm" ,python-setuptools-scm)))
10001 (home-page "http://tox.testrun.org/")
10002 (synopsis "Virtualenv-based automation of test activities")
10003 (description "Tox is a generic virtualenv management and test command line
10004 tool. It can be used to check that a package installs correctly with
10005 different Python versions and interpreters, or run tests in each type of
10006 supported environment, or act as a frontend to continuous integration
10007 servers.")
10008 (license license:expat)))
10009
10010 (define-public python2-tox
10011 (package-with-python2 python-tox))
10012
10013 (define-public python-jmespath
10014 (package
10015 (name "python-jmespath")
10016 (version "0.9.0")
10017 (source
10018 (origin
10019 (method url-fetch)
10020 (uri (pypi-uri "jmespath" version))
10021 (sha256
10022 (base32
10023 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
10024 (build-system python-build-system)
10025 (native-inputs
10026 `(("python-nose" ,python-nose)))
10027 (synopsis "JSON Matching Expressions")
10028 (description "JMESPath (pronounced “james path”) is a Python library that
10029 allows one to declaratively specify how to extract elements from a JSON
10030 document.")
10031 (home-page "https://github.com/jmespath/jmespath.py")
10032 (license license:expat)))
10033
10034 (define-public python2-jmespath
10035 (package-with-python2 python-jmespath))
10036
10037 (define-public python-botocore
10038 (package
10039 (name "python-botocore")
10040 (version "1.7.9")
10041 (source
10042 (origin
10043 (method url-fetch)
10044 (uri (pypi-uri "botocore" version))
10045 (sha256
10046 (base32
10047 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
10048 (build-system python-build-system)
10049 (arguments
10050 ;; FIXME: Many tests are failing.
10051 '(#:tests? #f))
10052 (propagated-inputs
10053 `(("python-dateutil" ,python-dateutil)
10054 ("python-docutils" ,python-docutils)
10055 ("python-jmespath" ,python-jmespath)))
10056 (native-inputs
10057 `(("python-mock" ,python-mock)
10058 ("python-nose" ,python-nose)
10059 ("behave" ,behave)
10060 ("python-tox" ,python-tox)
10061 ("python-wheel" ,python-wheel)))
10062 (home-page "https://github.com/boto/botocore")
10063 (synopsis "Low-level interface to AWS")
10064 (description "Botocore is a Python library that provides a low-level
10065 interface to the Amazon Web Services (AWS) API.")
10066 (license license:asl2.0)))
10067
10068 (define-public python2-botocore
10069 (package-with-python2 python-botocore))
10070
10071 (define-public awscli
10072 (package
10073 (name "awscli")
10074 (version "1.11.164")
10075 (source
10076 (origin
10077 (method url-fetch)
10078 (uri (pypi-uri name version))
10079 (sha256
10080 (base32
10081 "05r8cw7i7ff6barpmyxxk3i52gzb1xyxwj8isynmiyqlmk3c9r8w"))))
10082 (build-system python-build-system)
10083 (propagated-inputs
10084 `(("python-colorama" ,python-colorama)
10085 ("python-botocore" ,python-botocore)
10086 ("python-s3transfer" ,python-s3transfer)
10087 ("python-docutils" ,python-docutils)
10088 ("python-pyyaml" ,python-pyyaml)
10089 ("python-rsa" ,python-rsa)))
10090 (arguments
10091 ;; FIXME: The 'pypi' release does not contain tests.
10092 '(#:tests? #f))
10093 (home-page "https://aws.amazon.com/cli/")
10094 (synopsis "Command line client for AWS")
10095 (description "AWS CLI provides a unified command line interface to the
10096 Amazon Web Services (AWS) API.")
10097 (license license:asl2.0)))
10098
10099 (define-public python-hypothesis
10100 (package
10101 (name "python-hypothesis")
10102 (version "3.1.0")
10103 (source (origin
10104 (method url-fetch)
10105 (uri (pypi-uri "hypothesis" version))
10106 (sha256
10107 (base32
10108 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
10109 (build-system python-build-system)
10110 (native-inputs
10111 `(("python-flake8" ,python-flake8)
10112 ("python-pytest" ,python-pytest)))
10113 (synopsis "Library for property based testing")
10114 (description "Hypothesis is a library for testing your Python code against a
10115 much larger range of examples than you would ever want to write by hand. It’s
10116 based on the Haskell library, Quickcheck, and is designed to integrate
10117 seamlessly into your existing Python unit testing work flow.")
10118 (home-page "https://github.com/DRMacIver/hypothesis")
10119 (license license:mpl2.0)
10120 (properties `((python2-variant . ,(delay python2-hypothesis))))))
10121
10122 (define-public python2-hypothesis
10123 (let ((hypothesis (package-with-python2
10124 (strip-python2-variant python-hypothesis))))
10125 (package (inherit hypothesis)
10126 (native-inputs
10127 `(("python2-enum34" ,python2-enum34)
10128 ,@(package-native-inputs hypothesis))))))
10129
10130 (define-public python-pytest-subtesthack
10131 (package
10132 (name "python-pytest-subtesthack")
10133 (version "0.1.1")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "pytest-subtesthack" version))
10137 (sha256
10138 (base32
10139 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
10140 (build-system python-build-system)
10141 (propagated-inputs
10142 `(("python-pytest" ,python-pytest)))
10143 (synopsis "Set-up and tear-down fixtures for unit tests")
10144 (description "This plugin allows you to set up and tear down fixtures within
10145 unit test functions that use @code{py.test}. This is useful for using
10146 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
10147 function multiple times, without setting up or tearing down fixture state as is
10148 normally the case.")
10149 (home-page "https://github.com/untitaker/pytest-subtesthack/")
10150 (license license:unlicense)))
10151
10152 (define-public python2-pytest-subtesthack
10153 (package-with-python2 python-pytest-subtesthack))
10154
10155 (define-public python-xdo
10156 (package
10157 (name "python-xdo")
10158 (version "0.3")
10159 (source (origin
10160 (method url-fetch)
10161 (uri (string-append
10162 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10163 "python-xdo_" version ".orig.tar.gz"))
10164 (sha256
10165 (base32
10166 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10167 (build-system python-build-system)
10168 (arguments
10169 '(#:phases
10170 (modify-phases %standard-phases
10171 (add-before 'install 'patch-libxdo-path
10172 ;; Hardcode the path of dynamically loaded libxdo library.
10173 (lambda* (#:key inputs #:allow-other-keys)
10174 (let ((libxdo (string-append
10175 (assoc-ref inputs "xdotool")
10176 "/lib/libxdo.so")))
10177 (substitute* "xdo/_xdo.py"
10178 (("find_library\\(\"xdo\"\\)")
10179 (simple-format #f "\"~a\"" libxdo)))
10180 #t))))
10181 #:tests? #f)) ; no tests provided
10182 (propagated-inputs
10183 `(("python-six" ,python-six)))
10184 (inputs
10185 `(("xdotool" ,xdotool)
10186 ("libX11" ,libx11)))
10187 (home-page "https://tracker.debian.org/pkg/python-xdo")
10188 (synopsis "Python library for simulating X11 keyboard/mouse input")
10189 (description "Provides bindings to libxdo for manipulating X11 via simulated
10190 input. (Note that this is mostly a legacy library; you may wish to look at
10191 python-xdo for newer bindings.)")
10192 (license license:bsd-3)))
10193
10194 (define-public python2-xdo
10195 (package-with-python2 python-xdo))
10196
10197 (define-public python-wtforms
10198 (package
10199 (name "python-wtforms")
10200 (version "2.1")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "WTForms" version ".zip"))
10205 (sha256
10206 (base32
10207 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
10208 (build-system python-build-system)
10209 (arguments
10210 '(#:phases
10211 (modify-phases %standard-phases
10212 (add-after 'unpack 'remove-django-test
10213 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
10214 (lambda _
10215 (substitute*
10216 "tests/runtests.py"
10217 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
10218 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
10219 #t)))))
10220 (native-inputs
10221 `(("unzip" ,unzip)))
10222 (home-page "http://wtforms.simplecodes.com/")
10223 (synopsis
10224 "Form validation and rendering library for Python web development")
10225 (description
10226 "WTForms is a flexible forms validation and rendering library
10227 for Python web development. It is very similar to the web form API
10228 available in Django, but is a standalone package.")
10229 (license license:bsd-3)))
10230
10231 (define-public python2-wtforms
10232 (package-with-python2 python-wtforms))
10233
10234 (define-public python-mako
10235 (package
10236 (name "python-mako")
10237 (version "1.0.6")
10238 (source
10239 (origin
10240 (method url-fetch)
10241 (uri (pypi-uri "Mako" version))
10242 (sha256
10243 (base32
10244 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
10245 (build-system python-build-system)
10246 (propagated-inputs
10247 `(("python-markupsafe" ,python-markupsafe)))
10248 (native-inputs
10249 `(("python-mock" ,python-mock)
10250 ("python-nose" ,python-nose)
10251 ("python-pytest" ,python-pytest)))
10252 (home-page "http://www.makotemplates.org/")
10253 (synopsis "Templating language for Python")
10254 (description "Mako is a templating language for Python that compiles
10255 templates into Python modules.")
10256 (license license:expat)))
10257
10258 (define-public python2-mako
10259 (package-with-python2 python-mako))
10260
10261 (define-public python-waitress
10262 (package
10263 (name "python-waitress")
10264 (version "0.8.10")
10265 (source
10266 (origin
10267 (method url-fetch)
10268 (uri (pypi-uri "waitress" version))
10269 (sha256
10270 (base32
10271 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10272 (build-system python-build-system)
10273 (home-page "https://github.com/Pylons/waitress")
10274 (synopsis "Waitress WSGI server")
10275 (description "Waitress is meant to be a production-quality pure-Python WSGI
10276 server with very acceptable performance.")
10277 (license license:zpl2.1)))
10278
10279 (define-public python2-waitress
10280 (package-with-python2 python-waitress))
10281
10282 (define-public python-wsgiproxy2
10283 (package
10284 (name "python-wsgiproxy2")
10285 (version "0.4.2")
10286 (source
10287 (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10290 (sha256
10291 (base32
10292 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10293 (build-system python-build-system)
10294 (arguments
10295 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10296 ;; support Python 3:
10297 ;; https://github.com/benoitc/restkit/issues/140
10298 #:tests? #f))
10299 (native-inputs
10300 `(("unzip" ,unzip)
10301 ("python-nose" ,python-nose)
10302 ("python-coverage" ,python-coverage)))
10303 (propagated-inputs
10304 `(("python-six" ,python-six)
10305 ("python-webob" ,python-webob)))
10306 (home-page
10307 "https://github.com/gawel/WSGIProxy2/")
10308 (synopsis "WSGI Proxy with various http client backends")
10309 (description "WSGI turns HTTP requests into WSGI function calls.
10310 WSGIProxy turns WSGI function calls into HTTP requests.
10311 It also includes code to sign requests and pass private data,
10312 and to spawn subprocesses to handle requests.")
10313 (license license:expat)))
10314
10315 (define-public python2-wsgiproxy2
10316 (package-with-python2 python-wsgiproxy2))
10317
10318 (define-public python-pastedeploy
10319 (package
10320 (name "python-pastedeploy")
10321 (version "1.5.2")
10322 (source
10323 (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "PasteDeploy" version))
10326 (sha256
10327 (base32
10328 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10329 (build-system python-build-system)
10330 (native-inputs
10331 `(("python-nose" ,python-nose)))
10332 (home-page "http://pythonpaste.org/deploy/")
10333 (synopsis
10334 "Load, configure, and compose WSGI applications and servers")
10335 (description
10336 "This tool provides code to load WSGI applications and servers from URIs;
10337 these URIs can refer to Python Eggs for INI-style configuration files. Paste
10338 Script provides commands to serve applications based on this configuration
10339 file.")
10340 (license license:expat)))
10341
10342 (define-public python2-pastedeploy
10343 (package-with-python2 python-pastedeploy))
10344
10345 (define-public python-paste
10346 (package
10347 (name "python-paste")
10348 (version "2.0.3")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "Paste" version))
10353 (sha256
10354 (base32
10355 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10356 (patches (search-patches "python-paste-remove-website-test.patch"
10357 "python-paste-remove-timing-test.patch"))))
10358 (build-system python-build-system)
10359 (native-inputs
10360 `(("python-nose" ,python-nose)))
10361 (propagated-inputs
10362 `(("python-six" ,python-six)))
10363 (home-page "http://pythonpaste.org")
10364 (synopsis
10365 "Python web development tools, focusing on WSGI")
10366 (description
10367 "Paste provides a variety of web development tools and middleware which
10368 can be nested together to build web applications. Paste's design closely
10369 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10370 (license license:expat)))
10371
10372 (define-public python2-paste
10373 (package-with-python2 python-paste))
10374
10375 (define-public python-pastescript
10376 (package
10377 (name "python-pastescript")
10378 (version "2.0.2")
10379 (source
10380 (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "PasteScript" version))
10383 (sha256
10384 (base32
10385 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10386 (build-system python-build-system)
10387 (native-inputs
10388 `(("python-nose" ,python-nose)))
10389 (propagated-inputs
10390 `(("python-paste" ,python-paste)
10391 ("python-pastedeploy" ,python-pastedeploy)))
10392 (home-page "http://pythonpaste.org/script/")
10393 (arguments
10394 '(;; Unfortunately, this requires the latest unittest2,
10395 ;; but that requires traceback2 which requires linecache2 which requires
10396 ;; unittest2. So we're skipping tests for now.
10397 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10398 ;; so in theory we could get around this situation somehow.)
10399 #:tests? #f))
10400 (synopsis
10401 "Pluggable command line tool for serving web applications and more")
10402 (description
10403 "PasteScript is a plugin-friendly command line tool which provides a
10404 variety of features, from launching web applications to bootstrapping project
10405 layouts.")
10406 (license license:expat)))
10407
10408 (define-public python2-pastescript
10409 (package-with-python2 python-pastescript))
10410
10411 (define-public python-pyquery
10412 (package
10413 (name "python-pyquery")
10414 (version "1.2.17")
10415 (source
10416 (origin
10417 (method url-fetch)
10418 (uri (pypi-uri "pyquery" version))
10419 (sha256
10420 (base32
10421 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10422 (build-system python-build-system)
10423 (native-inputs
10424 `(("python-webob" ,python-webob)
10425 ("python-webtest" ,python-webtest)))
10426 (propagated-inputs
10427 `(("python-lxml" ,python-lxml)
10428 ("python-cssselect" ,python-cssselect)))
10429 (home-page "https://github.com/gawel/pyquery")
10430 (synopsis "Make jQuery-like queries on xml documents")
10431 (description "pyquery allows you to make jQuery queries on xml documents.
10432 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10433 fast xml and html manipulation.")
10434 (license license:bsd-3)))
10435
10436 (define-public python2-pyquery
10437 (package-with-python2 python-pyquery))
10438
10439 (define-public python-webtest
10440 (package
10441 (name "python-webtest")
10442 (version "2.0.20")
10443 (source
10444 (origin
10445 (method url-fetch)
10446 (uri (pypi-uri "WebTest" version))
10447 (sha256
10448 (base32
10449 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10450 (build-system python-build-system)
10451 (arguments
10452 `(;; Unfortunately we have to disable tests!
10453 ;; This release of WebTest is pinned to python-nose < 1.3,
10454 ;; but older versions of python-nose are plagued with the following
10455 ;; bug(s), which rears its ugly head during test execution:
10456 ;; https://github.com/nose-devs/nose/issues/759
10457 ;; https://github.com/nose-devs/nose/pull/811
10458 #:tests? #f))
10459 ;; Commented out code is no good, but in this case, once tests
10460 ;; are ready to be enabled again, we should put the following
10461 ;; in place:
10462 ;; (native-inputs
10463 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10464 ;; ; but see above comment
10465 ;; ("python-coverage" ,python-coverage)
10466 ;; ("python-mock" ,python-mock)
10467 ;; ("python-pastedeploy" ,python-pastedeploy)
10468 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10469 ;; ("python-pyquery" ,python-pyquery)))
10470 (propagated-inputs
10471 `(("python-waitress" ,python-waitress)
10472 ("python-webob" ,python-webob)
10473 ("python-six" ,python-six)
10474 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10475 (home-page "http://webtest.pythonpaste.org/")
10476 (synopsis "Helper to test WSGI applications")
10477 (description "Webtest allows you to test your Python web applications
10478 without starting an HTTP server. It supports anything that supports the
10479 minimum of WSGI.")
10480 (license license:expat)))
10481
10482 (define-public python2-webtest
10483 (package-with-python2 python-webtest))
10484
10485 (define-public python-anyjson
10486 (package
10487 (name "python-anyjson")
10488 (version "0.3.3")
10489 (source
10490 (origin
10491 (method url-fetch)
10492 (uri (pypi-uri "anyjson" version))
10493 (sha256
10494 (base32
10495 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10496 (build-system python-build-system)
10497 (arguments
10498 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10499 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10500 ;; whatever) so this transformation needs to be done before the tests
10501 ;; can be run. Maybe we could add a build step to transform beforehand
10502 ;; but it could be annoying/difficult.
10503 ;; We can enable tests for the Python 2 version, though, and do below.
10504 #:tests? #f))
10505 (home-page "http://bitbucket.org/runeh/anyjson/")
10506 (synopsis
10507 "Wraps best available JSON implementation in a common interface")
10508 (description
10509 "Anyjson loads whichever is the fastest JSON module installed
10510 and provides a uniform API regardless of which JSON implementation is used.")
10511 (license license:bsd-3)
10512 (properties `((python2-variant . ,(delay python2-anyjson))))))
10513
10514 (define-public python2-anyjson
10515 (let ((anyjson (package-with-python2
10516 (strip-python2-variant python-anyjson))))
10517 (package
10518 (inherit anyjson)
10519 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10520 #:tests? #t
10521 ,@(package-arguments anyjson)))
10522 (native-inputs `(("python2-nose" ,python2-nose))))))
10523
10524 (define-public python-amqp
10525 (package
10526 (name "python-amqp")
10527 (version "1.4.9")
10528 (source
10529 (origin
10530 (method url-fetch)
10531 (uri (pypi-uri "amqp" version))
10532 (sha256
10533 (base32
10534 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10535 (build-system python-build-system)
10536 (native-inputs
10537 `(("python-nose" ,python-nose)
10538 ("python-mock" ,python-mock)))
10539 (home-page "https://github.com/celery/py-amqp")
10540 (synopsis
10541 "Low-level AMQP client for Python (fork of amqplib)")
10542 (description
10543 "This is a fork of amqplib which was originally written by Barry Pederson.
10544 It is maintained by the Celery project, and used by kombu as a pure python
10545 alternative when librabbitmq is not available.")
10546 (license license:lgpl2.1+)
10547 (properties `((python2-variant . ,(delay python2-amqp))))))
10548
10549 (define-public python2-amqp
10550 (let ((amqp (package-with-python2
10551 (strip-python2-variant python-amqp))))
10552 (package
10553 (inherit amqp)
10554 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10555 ;; unmaintained. Weirdly, does not do this on the python 3
10556 ;; version?
10557 #:tests? #f
10558 ,@(package-arguments amqp))))))
10559
10560 (define-public python-kombu
10561 (package
10562 (name "python-kombu")
10563 (version "3.0.37")
10564 (source
10565 (origin
10566 (method url-fetch)
10567 (uri (pypi-uri "kombu" version))
10568 (sha256
10569 (base32
10570 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10571 (build-system python-build-system)
10572 (native-inputs
10573 `(("python-mock" ,python-mock)
10574 ("python-nose" ,python-nose)))
10575 (propagated-inputs
10576 `(("python-anyjson" ,python-anyjson)
10577 ("python-amqp" ,python-amqp)
10578 ("python-redis" ,python-redis)))
10579 (home-page "http://kombu.readthedocs.org")
10580 (synopsis "Message passing library for Python")
10581 (description "The aim of Kombu is to make messaging in Python as easy as
10582 possible by providing an idiomatic high-level interface for the AMQ protocol,
10583 and also provide proven and tested solutions to common messaging problems.
10584 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10585 message orientation, queuing, routing, reliability and security, for which the
10586 RabbitMQ messaging server is the most popular implementation.")
10587 (license license:bsd-3)
10588 (properties `((python2-variant . ,(delay python2-kombu))))))
10589
10590 (define-public python2-kombu
10591 (let ((kombu (package-with-python2
10592 (strip-python2-variant python-kombu))))
10593 (package
10594 (inherit kombu)
10595 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10596 ;; It works fine on the python3 variant.
10597 #:tests? #f
10598 ,@(package-arguments kombu)))
10599 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10600 ,@(package-native-inputs kombu))))))
10601
10602 (define-public python-billiard
10603 (package
10604 (name "python-billiard")
10605 (version "3.3.0.23")
10606 (source
10607 (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "billiard" version))
10610 (sha256
10611 (base32
10612 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10613 (build-system python-build-system)
10614 (native-inputs
10615 `(("python-nose" ,python-nose)))
10616 (home-page "https://github.com/celery/billiard")
10617 (synopsis
10618 "Python multiprocessing fork with improvements and bugfixes")
10619 (description
10620 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10621 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10622 pyprocessing package. This standalone variant is intended to be compatible with
10623 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10624 (license license:bsd-3)
10625 (properties `((python2-variant . ,(delay python2-billiard))))))
10626
10627 (define-public python2-billiard
10628 (let ((billiard (package-with-python2
10629 (strip-python2-variant python-billiard))))
10630 (package
10631 (inherit billiard)
10632 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10633 ("python2-mock" ,python2-mock)
10634 ,@(package-native-inputs billiard))))))
10635
10636 (define-public python-celery
10637 (package
10638 (name "python-celery")
10639 (version "3.1.24")
10640 (source
10641 (origin
10642 (method url-fetch)
10643 (uri (pypi-uri "celery" version))
10644 (sha256
10645 (base32
10646 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10647 (build-system python-build-system)
10648 (arguments
10649 `(#:phases
10650 (modify-phases %standard-phases
10651 ;; These tests break with Python 3.5:
10652 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10653 (replace 'check
10654 (lambda _
10655 (zero?
10656 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10657 (native-inputs
10658 `(("python-nose" ,python-nose)))
10659 (propagated-inputs
10660 `(("python-pytz" ,python-pytz)
10661 ("python-billiard" ,python-billiard)
10662 ("python-kombu" ,python-kombu)))
10663 (home-page "http://celeryproject.org")
10664 (synopsis "Distributed Task Queue")
10665 (description "Celery is an asynchronous task queue/job queue based on
10666 distributed message passing. It is focused on real-time operation, but
10667 supports scheduling as well. The execution units, called tasks, are executed
10668 concurrently on a single or more worker servers using multiprocessing,
10669 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10670 synchronously (wait until ready).")
10671 (license license:bsd-3)
10672 (properties `((python2-variant . ,(delay python2-celery))))))
10673
10674 (define-public python2-celery
10675 (let ((celery (package-with-python2
10676 (strip-python2-variant python-celery))))
10677 (package
10678 (inherit celery)
10679 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10680 ("python2-mock" ,python2-mock)
10681 ,@(package-native-inputs celery))))))
10682
10683 (define-public python-translitcodec
10684 (package
10685 (name "python-translitcodec")
10686 (version "0.4.0")
10687 (source
10688 (origin
10689 (method url-fetch)
10690 (uri (pypi-uri "translitcodec" version))
10691 (sha256
10692 (base32
10693 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10694 (build-system python-build-system)
10695 (arguments
10696 `(#:tests? #f)) ; no tests provided
10697 (home-page
10698 "https://github.com/claudep/translitcodec")
10699 (synopsis
10700 "Unicode to 8-bit charset transliteration codec")
10701 (description
10702 "This package contains codecs for transliterating ISO 10646 texts into
10703 best-effort representations using smaller coded character sets (ASCII,
10704 ISO 8859, etc.).")
10705 (license license:expat)))
10706
10707 (define-public python2-translitcodec
10708 (package-with-python2 python-translitcodec))
10709
10710 (define-public python-editor
10711 (package
10712 (name "python-editor")
10713 (version "0.5")
10714 (source
10715 (origin
10716 (method url-fetch)
10717 (uri (pypi-uri "python-editor" version))
10718 (sha256
10719 (base32
10720 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10721 (build-system python-build-system)
10722 (home-page
10723 "https://github.com/fmoo/python-editor")
10724 (synopsis
10725 "Programmatically open an editor, capture the result")
10726 (description
10727 "python-editor is a library that provides the editor module for
10728 programmatically interfacing with your system's $EDITOR.")
10729 (license license:asl2.0)))
10730
10731 (define-public python2-editor
10732 (package-with-python2 python-editor))
10733
10734 (define-public python-sphinxcontrib-programoutput
10735 (package
10736 (name "python-sphinxcontrib-programoutput")
10737 (version "0.10")
10738 (source (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10741 (sha256
10742 (base32
10743 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10744 (build-system python-build-system)
10745 (arguments
10746 ;; FIXME: Many tests are failing and the upstream is gone.
10747 '(#:tests? #f))
10748 (propagated-inputs
10749 `(("python-sphinx" ,python-sphinx)))
10750 (synopsis "Sphinx extension to include program output")
10751 (description "A Sphinx extension to literally insert the output of arbitrary
10752 commands into documents, helping you to keep your command examples up to date.")
10753 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10754 (license license:bsd-2)))
10755
10756 (define-public python2-sphinxcontrib-programoutput
10757 (package-with-python2 python-sphinxcontrib-programoutput))
10758
10759 (define-public python-sphinx-repoze-autointerface
10760 (package
10761 (name "python-sphinx-repoze-autointerface")
10762 (version "0.8")
10763 (source (origin
10764 (method url-fetch)
10765 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10766 (sha256
10767 (base32
10768 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10769 (build-system python-build-system)
10770 (arguments '(#:tests? #f)) ; No tests.
10771 (propagated-inputs
10772 `(("python-sphinx" ,python-sphinx)
10773 ("python-zope-interface" ,python-zope-interface)))
10774 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10775 (description "This package defines an extension for the Sphinx documentation
10776 system. The extension allows generation of API documentation by
10777 introspection of @code{zope.interface} instances in code.")
10778 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10779 (license license:repoze)))
10780
10781 (define-public python2-sphinx-repoze-autointerface
10782 (package-with-python2 python-sphinx-repoze-autointerface))
10783
10784 (define-public python-psycopg2
10785 (package
10786 (name "python-psycopg2")
10787 (version "2.6.2")
10788 (source
10789 (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "psycopg2" version))
10792 (sha256
10793 (base32
10794 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10795 (build-system python-build-system)
10796 (arguments
10797 ;; Tests would require a postgresql database "psycopg2_test"
10798 ;; and a running postgresql database management service.
10799 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10800 (inputs
10801 `(("postgresql" ,postgresql))) ; libpq
10802 (home-page "http://initd.org/psycopg/")
10803 (synopsis "Python PostgreSQL adapter")
10804 (description
10805 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10806 (license license:lgpl3+)))
10807
10808 (define-public python2-psycopg2
10809 (package-with-python2 python-psycopg2))
10810
10811 (define-public python-vobject
10812 (package
10813 (name "python-vobject")
10814 (version "0.9.5")
10815 (source (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "vobject" version))
10818 (sha256
10819 (base32
10820 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10821 (build-system python-build-system)
10822 (arguments
10823 '(;; The test suite relies on some non-portable Windows interfaces.
10824 #:tests? #f))
10825 (propagated-inputs
10826 `(("python-dateutil" ,python-dateutil)
10827 ("python-pyicu" ,python-pyicu)))
10828 (synopsis "Parse and generate vCard and vCalendar files")
10829 (description "Vobject is intended to be a full featured Python package for
10830 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10831 are supported and well tested. vCard 3.0 files are supported, and all data
10832 should be imported, but only a few components are understood in a sophisticated
10833 way.")
10834 (home-page "http://eventable.github.io/vobject/")
10835 (license license:asl2.0)))
10836
10837 (define-public python2-vobject
10838 (package-with-python2 python-vobject))
10839
10840 (define-public python-munkres
10841 (package
10842 (name "python-munkres")
10843 (version "1.0.8")
10844 (source (origin
10845 (method url-fetch)
10846 (uri (pypi-uri "munkres" version))
10847 (sha256
10848 (base32
10849 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10850 (build-system python-build-system)
10851 (arguments
10852 '(#:tests? #f)) ; no test suite
10853 (home-page "http://software.clapper.org/munkres/")
10854 (synopsis "Implementation of the Munkres algorithm")
10855 (description "The Munkres module provides an implementation of the Munkres
10856 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10857 useful for solving the Assignment Problem.")
10858 (license license:bsd-3)))
10859
10860 (define-public python2-munkres
10861 (package-with-python2 python-munkres))
10862
10863 (define-public python-flask
10864 (package
10865 (name "python-flask")
10866 (version "0.11.1")
10867 (source (origin
10868 (method url-fetch)
10869 (uri (pypi-uri "Flask" version))
10870 (sha256
10871 (base32
10872 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10873 (build-system python-build-system)
10874 (propagated-inputs
10875 `(("python-itsdangerous" ,python-itsdangerous)
10876 ("python-jinja2" ,python-jinja2)
10877 ("python-click" ,python-click)
10878 ("python-werkzeug" ,python-werkzeug)))
10879 (home-page "https://github.com/mitsuhiko/flask/")
10880 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10881 (description "Flask is a micro web framework based on the Werkzeug toolkit
10882 and Jinja2 template engine. It is called a micro framework because it does not
10883 presume or force a developer to use a particular tool or library.")
10884 (license license:bsd-3)))
10885
10886 (define-public python2-flask
10887 (package-with-python2 python-flask))
10888
10889 (define-public python-flask-wtf
10890 (package
10891 (name "python-flask-wtf")
10892 (version "0.13.1")
10893 (source
10894 (origin
10895 (method url-fetch)
10896 (uri (pypi-uri "Flask-WTF" version))
10897 (sha256
10898 (base32
10899 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10900 (build-system python-build-system)
10901 (arguments
10902 '(#:phases
10903 (modify-phases %standard-phases
10904 (add-before 'check 'drop-failing-test
10905 (lambda _
10906 ;; FIXME: This file tries resolving an external server, which
10907 ;; fails. Try to patch out the offending section instead of
10908 ;; deleting the whole thing.
10909 (delete-file "tests/test_recaptcha.py")
10910 #t)))))
10911 (propagated-inputs
10912 `(("python-flask-babel" ,python-flask-babel)
10913 ("python-babel" ,python-babel)
10914 ("python-wtforms" ,python-wtforms)))
10915 (native-inputs
10916 `(("python-nose" ,python-nose)))
10917 (home-page "https://github.com/lepture/flask-wtf")
10918 (synopsis "Simple integration of Flask and WTForms")
10919 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10920 upload, and reCAPTCHA.")
10921 (license license:bsd-3)))
10922
10923 (define-public python2-flask-wtf
10924 (package-with-python2 python-flask-wtf))
10925
10926 (define-public python-flask-multistatic
10927 (package
10928 (name "python-flask-multistatic")
10929 (version "1.0")
10930 (source
10931 (origin
10932 (method url-fetch)
10933 (uri (pypi-uri "flask-multistatic" version))
10934 (sha256
10935 (base32
10936 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10937 (build-system python-build-system)
10938 (propagated-inputs
10939 `(("python-flask" ,python-flask)))
10940 (home-page "https://pagure.io/flask-multistatic")
10941 (synopsis "Flask plugin to allow overriding static files")
10942 (description "@code{flask-multistatic} is a flask plugin that adds support
10943 for overriding static files.")
10944 (license license:gpl3+)))
10945
10946 (define-public python2-flask-multistatic
10947 (package-with-python2 python-flask-multistatic))
10948
10949 (define-public python-cookies
10950 (package
10951 (name "python-cookies")
10952 (version "2.2.1")
10953 (source (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "cookies" version))
10956 (sha256
10957 (base32
10958 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10959 (build-system python-build-system)
10960 (arguments
10961 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10962 #:tests? #f))
10963 (native-inputs
10964 `(("python-pytest" ,python2-pytest)))
10965 (synopsis "HTTP cookie parser and renderer")
10966 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10967 Python.")
10968 (home-page "https://gitlab.com/sashahart/cookies")
10969 (license license:expat)))
10970
10971 (define-public python2-cookies
10972 (package-with-python2 python-cookies))
10973
10974 (define-public python-responses
10975 (package
10976 (name "python-responses")
10977 (version "0.5.1")
10978 (source (origin
10979 (method url-fetch)
10980 (uri (pypi-uri "responses" version))
10981 (sha256
10982 (base32
10983 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10984 (build-system python-build-system)
10985 (arguments
10986 `(;; Test suite is not distributed:
10987 ;; https://github.com/getsentry/responses/issues/38
10988 #:tests? #f))
10989 (native-inputs
10990 `(("python-mock" ,python-mock)))
10991 (propagated-inputs
10992 `(("python-requests" ,python-requests)
10993 ("python-cookies" ,python-cookies)
10994 ("python-six" ,python-six)))
10995 (home-page "https://github.com/getsentry/responses")
10996 (synopsis "Utility for mocking out the `requests` Python library")
10997 (description "A utility library for mocking out the `requests` Python
10998 library.")
10999 (license license:asl2.0)))
11000
11001 (define-public python2-responses
11002 (package-with-python2 python-responses))
11003
11004 (define-public python-whoosh
11005 (package
11006 (name "python-whoosh")
11007 (version "2.7.4")
11008 (source
11009 (origin
11010 (method url-fetch)
11011 (uri (pypi-uri "Whoosh" version))
11012 (sha256
11013 (base32
11014 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11015 (build-system python-build-system)
11016 (native-inputs
11017 `(("python-pytest" ,python-pytest)))
11018 (home-page "http://bitbucket.org/mchaput/whoosh")
11019 (synopsis "Full text indexing, search, and spell checking library")
11020 (description
11021 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11022 checking library.")
11023 (license license:bsd-2)))
11024
11025 (define-public python2-whoosh
11026 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11027 (package (inherit whoosh)
11028 (propagated-inputs
11029 `(("python2-backport-ssl-match-hostname"
11030 ,python2-backport-ssl-match-hostname)
11031 ,@(package-propagated-inputs whoosh))))))
11032
11033 (define-public python-pathlib
11034 (package
11035 (name "python-pathlib")
11036 (version "1.0.1")
11037 (source (origin
11038 (method url-fetch)
11039 (uri (pypi-uri "pathlib" version))
11040 (sha256
11041 (base32
11042 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11043 (build-system python-build-system)
11044 ;; The tests depend on the internal "test" module, which does not provide
11045 ;; a stable interface.
11046 (arguments `(#:tests? #f))
11047 (home-page "https://pathlib.readthedocs.org/")
11048 (synopsis "Object-oriented file system paths")
11049 (description "Pathlib offers a set of classes to handle file system paths.
11050 It offers the following advantages over using string objects:
11051
11052 @enumerate
11053 @item No more cumbersome use of os and os.path functions. Everything can
11054 be done easily through operators, attribute accesses, and method calls.
11055 @item Embodies the semantics of different path types. For example,
11056 comparing Windows paths ignores casing.
11057 @item Well-defined semantics, eliminating any inconsistencies or
11058 ambiguities (forward vs. backward slashes, etc.).
11059 @end enumerate
11060
11061 Note: In Python 3.4, pathlib is now part of the standard library. For other
11062 Python versions please consider python-pathlib2 instead, which tracks the
11063 standard library module. This module (python-pathlib) isn't maintained
11064 anymore.")
11065 (license license:expat)))
11066
11067 (define-public python2-pathlib
11068 (package-with-python2 python-pathlib))
11069
11070 (define-public python2-pathlib2
11071 (package
11072 (name "python2-pathlib2")
11073 (version "2.1.0")
11074 (source (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "pathlib2" version))
11077 (sha256
11078 (base32
11079 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
11080 (build-system python-build-system)
11081 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11082 ;; version is 3.4 which already includes this package as part of the
11083 ;; standard library.
11084 (arguments
11085 `(#:python ,python-2))
11086 (native-inputs
11087 `(("python2-six" ,python2-six)))
11088 (home-page "http://pypi.python.org/pypi/pathlib2/")
11089 (synopsis "Object-oriented file system paths - backport of standard
11090 pathlib module")
11091 (description "The goal of pathlib2 is to provide a backport of standard
11092 pathlib module which tracks the standard library module, so all the newest
11093 features of the standard pathlib can be used also on older Python versions.
11094
11095 Pathlib offers a set of classes to handle file system paths. It offers the
11096 following advantages over using string objects:
11097
11098 @enumerate
11099 @item No more cumbersome use of os and os.path functions. Everything can
11100 be done easily through operators, attribute accesses, and method calls.
11101 @item Embodies the semantics of different path types. For example,
11102 comparing Windows paths ignores casing.
11103 @item Well-defined semantics, eliminating any inconsistencies or
11104 ambiguities (forward vs. backward slashes, etc.).
11105 @end enumerate")
11106 (license license:expat)))
11107
11108 (define-public python-jellyfish
11109 (package
11110 (name "python-jellyfish")
11111 (version "0.5.6")
11112 (source (origin
11113 (method url-fetch)
11114 (uri (pypi-uri "jellyfish" version))
11115 (sha256
11116 (base32
11117 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11118 (build-system python-build-system)
11119 (native-inputs
11120 `(("python-pytest" ,python-pytest)))
11121 (home-page "https://github.com/jamesturk/jellyfish")
11122 (synopsis "Approximate and phonetic matching of strings")
11123 (description "Jellyfish uses a variety of string comparison and phonetic
11124 encoding algorithms to do fuzzy string matching.")
11125 (license license:bsd-2)
11126 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11127
11128 (define-public python2-jellyfish
11129 (let ((jellyfish (package-with-python2
11130 (strip-python2-variant python-jellyfish))))
11131 (package (inherit jellyfish)
11132 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11133 ,@(package-native-inputs jellyfish))))))
11134
11135 (define-public python2-unicodecsv
11136 (package
11137 (name "python2-unicodecsv")
11138 (version "0.14.1")
11139 (source (origin
11140 (method url-fetch)
11141 ;; The test suite is not included in the PyPi release.
11142 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11143 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
11144 "archive/" version ".tar.gz"))
11145 (file-name (string-append name "-" version ".tar.gz"))
11146 (sha256
11147 (base32
11148 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
11149 (build-system python-build-system)
11150 (arguments
11151 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11152 #:python ,python-2))
11153 (native-inputs
11154 `(("python2-unittest2" ,python2-unittest2)))
11155 (home-page "https://github.com/jdunck/python-unicodecsv")
11156 (synopsis "Unicode CSV module for Python 2")
11157 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11158 module, adding support for Unicode strings.")
11159 (license license:bsd-2)))
11160
11161 (define-public python-rarfile
11162 (package
11163 (name "python-rarfile")
11164 (version "2.8")
11165 (source (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "rarfile" version))
11168 (sha256
11169 (base32
11170 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11171 (build-system python-build-system)
11172 (arguments
11173 '(#:phases
11174 (modify-phases %standard-phases
11175 (replace 'check
11176 ;; Many tests fail, but the installation proceeds.
11177 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
11178 (native-inputs
11179 `(("which" ,which))) ; required for tests
11180 (propagated-inputs
11181 `(("libarchive" ,libarchive)))
11182 (home-page "https://github.com/markokr/rarfile")
11183 (synopsis "RAR archive reader for Python")
11184 (description "This is Python module for RAR archive reading. The interface
11185 is made as zipfile like as possible.")
11186 (license license:isc)))
11187
11188 (define-public python2-rarfile
11189 (package-with-python2 python-rarfile))
11190
11191 (define-public python-magic
11192 (package
11193 (name "python-magic")
11194 (version "0.4.3")
11195 (source
11196 (origin
11197 (method url-fetch)
11198 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
11199 version ".tar.gz"))
11200 (sha256
11201 (base32
11202 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
11203 (file-name (string-append name "-" version "-checkout"))))
11204 (build-system python-build-system)
11205 (arguments
11206 ;; The tests are unreliable, so don't run them. The tests fail
11207 ;; under Python3 because they were written for Python2 and
11208 ;; contain import statements that do not work in Python3. One of
11209 ;; the tests fails under Python2 because its assertions are
11210 ;; overly stringent; it relies on comparing output strings which
11211 ;; are brittle and can change depending on the version of
11212 ;; libmagic being used and the system on which the test is
11213 ;; running. In my case, under GuixSD 0.10.0, only one test
11214 ;; failed, and it seems to have failed only because the version
11215 ;; of libmagic that is packaged in Guix outputs a slightly
11216 ;; different (but not wrong) string than the one that the test
11217 ;; expected.
11218 '(#:tests? #f
11219 #:phases (modify-phases %standard-phases
11220 ;; Replace a specific method call with a hard-coded
11221 ;; path to the necessary libmagic.so file in the
11222 ;; store. If we don't do this, then the method call
11223 ;; will fail to find the libmagic.so file, which in
11224 ;; turn will cause any application using
11225 ;; python-magic to fail.
11226 (add-before 'build 'hard-code-path-to-libmagic
11227 (lambda* (#:key inputs #:allow-other-keys)
11228 (let ((file (assoc-ref inputs "file")))
11229 (substitute* "magic.py"
11230 (("ctypes.util.find_library\\('magic'\\)")
11231 (string-append "'" file "/lib/libmagic.so'")))
11232 #t)))
11233 (add-before 'install 'disable-egg-compression
11234 (lambda _
11235 (let ((port (open-file "setup.cfg" "a")))
11236 (display "\n[easy_install]\nzip_ok = 0\n"
11237 port)
11238 (close-port port)
11239 #t))))))
11240 (inputs
11241 ;; python-magic needs to be able to find libmagic.so.
11242 `(("file" ,file)))
11243 (home-page "https://github.com/ahupp/python-magic")
11244 (synopsis "File type identification using libmagic")
11245 (description
11246 "This module uses ctypes to access the libmagic file type
11247 identification library. It makes use of the local magic database and
11248 supports both textual and MIME-type output. Note that this module and
11249 the python-file module both provide a \"magic.py\" file; these two
11250 modules, which are different and were developed separately, both serve
11251 the same purpose: to provide Python bindings for libmagic.")
11252 (license license:expat)))
11253
11254 (define-public python2-magic
11255 (package-with-python2 python-magic))
11256
11257 (define-public python2-s3cmd
11258 (package
11259 (name "python2-s3cmd")
11260 (version "1.6.1")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11265 "s3cmd-" version ".tar.gz"))
11266 (sha256
11267 (base32
11268 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11269 (build-system python-build-system)
11270 (arguments
11271 ;; s3cmd is written for python2 only and contains no tests.
11272 `(#:python ,python-2
11273 #:tests? #f))
11274 (propagated-inputs
11275 `(("python2-dateutil" ,python2-dateutil)
11276 ;; The python-file package also provides a magic.py module.
11277 ;; This is an unfortunate state of affairs; however, s3cmd
11278 ;; fails to install if it cannot find specifically the
11279 ;; python-magic package. Thus we include it, instead of using
11280 ;; python-file. Ironically, s3cmd sometimes works better
11281 ;; without libmagic bindings at all:
11282 ;; https://github.com/s3tools/s3cmd/issues/198
11283 ("python2-magic" ,python2-magic)))
11284 (home-page "http://s3tools.org/s3cmd")
11285 (synopsis "Command line tool for S3-compatible storage services")
11286 (description
11287 "S3cmd is a command line tool for uploading, retrieving and managing data
11288 in storage services that are compatible with the Amazon Simple Storage
11289 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11290 GnuPG encryption, and more. It also supports management of Amazon's
11291 CloudFront content delivery network.")
11292 (license license:gpl2+)))
11293
11294 (define-public python-pkgconfig
11295 (package
11296 (name "python-pkgconfig")
11297 (version "1.1.0")
11298 (source
11299 (origin
11300 (method url-fetch)
11301 (uri (pypi-uri "pkgconfig" version))
11302 (sha256
11303 (base32
11304 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11305 (build-system python-build-system)
11306 (native-inputs
11307 `(("python-nose" ,python-nose)))
11308 (inputs
11309 `(("pkg-config" ,pkg-config)))
11310 (arguments
11311 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11312 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11313 #:tests? #f
11314 ;; Hard-code the path to pkg-config.
11315 #:phases
11316 (modify-phases %standard-phases
11317 (add-before
11318 'build 'patch
11319 (lambda _
11320 (substitute* "pkgconfig/pkgconfig.py"
11321 (("cmd = 'pkg-config")
11322 (string-append "cmd = '" (which "pkg-config"))))
11323 #t)))))
11324 (home-page "https://github.com/matze/pkgconfig")
11325 (synopsis "Python interface for pkg-config")
11326 (description "This module provides a Python interface to pkg-config. It
11327 can be used to find all pkg-config packages, check if a package exists,
11328 check if a package meets certain version requirements, query CFLAGS and
11329 LDFLAGS and parse the output to build extensions with setup.py.")
11330 (license license:expat)))
11331
11332 (define-public python2-pkgconfig
11333 (package-with-python2 python-pkgconfig))
11334
11335 (define-public python-bz2file
11336 (package
11337 (name "python-bz2file")
11338 (version "0.98")
11339 (source
11340 (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "bz2file" version))
11343 (sha256
11344 (base32
11345 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11346 (build-system python-build-system)
11347 (arguments
11348 `(#:tests? #f)) ; Tests use deprecated python modules.
11349 (home-page "https://github.com/nvawda/bz2file")
11350 (synopsis "Read and write bzip2-compressed files")
11351 (description
11352 "Bz2file is a Python library for reading and writing bzip2-compressed
11353 files. It contains a drop-in replacement for the I/O interface in the
11354 standard library's @code{bz2} module, including features from the latest
11355 development version of CPython that are not available in older releases.")
11356 (license license:asl2.0)
11357 (properties `((python2-variant . ,(delay python2-bz2file))))))
11358
11359 (define-public python2-bz2file
11360 (let ((base (package-with-python2
11361 (strip-python2-variant python-bz2file))))
11362 (package
11363 (inherit base)
11364 (arguments
11365 `(#:python ,python-2
11366 #:phases
11367 (modify-phases %standard-phases
11368 ;; 'python setup.py test' does not work as of 0.98.
11369 ;; There is only the one test file, so we run it directly.
11370 (replace 'check
11371 (lambda _ (zero? (system* "python"
11372 "test_bz2file.py"))))))))))
11373
11374 (define-public python-future
11375 (package
11376 (name "python-future")
11377 (version "0.16.0")
11378 (source
11379 (origin
11380 (method url-fetch)
11381 (uri (pypi-uri "future" version))
11382 (sha256
11383 (base32
11384 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11385 (build-system python-build-system)
11386 ;; Many tests connect to the network or are otherwise flawed.
11387 ;; https://github.com/PythonCharmers/python-future/issues/210
11388 (arguments
11389 `(#:tests? #f))
11390 (home-page "http://python-future.org")
11391 (synopsis "Single-source support for Python 3 and 2")
11392 (description
11393 "@code{python-future} is the missing compatibility layer between Python 2 and
11394 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11395 to support both Python 2 and Python 3 with minimal overhead.")
11396 (license license:expat)))
11397
11398 (define-public python2-future
11399 (package-with-python2 python-future))
11400
11401 (define-public python-cysignals
11402 (package
11403 (name "python-cysignals")
11404 (version "1.1.0")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11409 (sha256
11410 (base32
11411 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11412 (build-system python-build-system)
11413 (native-inputs
11414 `(("python-cython" ,python-cython)
11415 ("python-sphinx" ,python-sphinx)))
11416 (inputs
11417 `(("pari-gp" ,pari-gp)))
11418 (arguments
11419 `(#:modules ((guix build python-build-system)
11420 ((guix build gnu-build-system) #:prefix gnu:)
11421 (guix build utils))
11422 ;; FIXME: Tests are executed after installation and currently fail
11423 ;; when not installing into standard locations; the author is working
11424 ;; on a fix.
11425 #:tests? #f
11426 #:phases
11427 (modify-phases %standard-phases
11428 (add-before
11429 'build 'configure
11430 (assoc-ref gnu:%standard-phases 'configure)))))
11431 (home-page
11432 "https://github.com/sagemath/cysignals")
11433 (synopsis
11434 "Handling of interrupts and signals for Cython")
11435 (description
11436 "The cysignals package provides mechanisms to handle interrupts (and
11437 other signals and errors) in Cython code, using two related approaches,
11438 for mixed Cython/Python code or external C libraries and pure Cython code,
11439 respectively.")
11440 (license license:lgpl3+)))
11441
11442 (define-public python2-cysignals
11443 (package-with-python2 python-cysignals))
11444
11445 (define-public python2-shedskin
11446 (package
11447 (name "python2-shedskin")
11448 (version "0.9.4")
11449 (source
11450 (origin
11451 (method url-fetch)
11452 (uri (string-append "https://github.com/shedskin/shedskin/"
11453 "releases/download/v" version
11454 "/shedskin-" version ".tgz"))
11455 (sha256
11456 (base32
11457 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11458 (build-system python-build-system)
11459 (arguments
11460 `(#:python ,python-2
11461 #:phases (modify-phases %standard-phases
11462 (add-after 'unpack 'fix-resulting-include-libs
11463 (lambda* (#:key inputs #:allow-other-keys)
11464 (let ((libgc (assoc-ref inputs "libgc"))
11465 (pcre (assoc-ref inputs "pcre")))
11466 (substitute* "shedskin/makefile.py"
11467 (("variable == 'CCFLAGS':[ ]*")
11468 (string-append "variable == 'CCFLAGS':\n"
11469 " line += ' -I " pcre "/include"
11470 " -I " libgc "/include'"))
11471 (("variable == 'LFLAGS':[ ]*")
11472 (string-append "variable == 'LFLAGS':\n"
11473 " line += ' -L" pcre "/lib"
11474 " -L " libgc "/lib'")))
11475 #t))))))
11476 (inputs `(("pcre" ,pcre)
11477 ("libgc" ,libgc)))
11478 (home-page "https://shedskin.github.io/")
11479 (synopsis "Experimental Python-2 to C++ Compiler")
11480 (description (string-append "This is an experimental compiler for a subset of
11481 Python. It generates C++ code and a Makefile."))
11482 (license (list license:gpl3 license:bsd-3 license:expat))))
11483
11484 (define-public python2-rope
11485 (package
11486 (name "python2-rope")
11487 (version "0.10.3")
11488 (source
11489 (origin
11490 (method url-fetch)
11491 (uri (pypi-uri "rope" version))
11492 (sha256
11493 (base32
11494 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11495 (arguments
11496 ;; Rope is currently python-2 only.
11497 ;; https://github.com/python-rope/rope/issues/57
11498 `(#:python ,python-2))
11499 (build-system python-build-system)
11500 (native-inputs
11501 `(("python2-unittest2" ,python2-unittest2)))
11502 (home-page "https://github.com/python-rope/rope")
11503 (synopsis "Refactoring library for Python")
11504 (description "Rope is a refactoring library for Python. It facilitates
11505 the renaming, moving and extracting of attributes, functions, modules, fields
11506 and parameters in Python 2 source code. These refactorings can also be applied
11507 to occurrences in strings and comments.")
11508 (license license:gpl2)))
11509
11510 (define-public python-py3status
11511 (package
11512 (name "python-py3status")
11513 (version "3.1")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "py3status" version))
11518 (sha256
11519 (base32
11520 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11521 (build-system python-build-system)
11522 (inputs
11523 `(("file" ,file)))
11524 (arguments
11525 '(#:phases
11526 (modify-phases %standard-phases
11527 ;; 'file' is used for detection of configuration file encoding
11528 ;; let's make link the dependency to particular input
11529 (add-before 'build 'patch-file-path
11530 (lambda* (#:key inputs #:allow-other-keys)
11531 (let ((file-path (assoc-ref inputs "file")))
11532 (substitute* "py3status/parse_config.py"
11533 (("check_output\\(\\['file'")
11534 (string-append "check_output(['" file-path "/bin/file'")))
11535 #t))))
11536 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11537 (home-page "https://github.com/ultrabug/py3status")
11538 (synopsis "Extensible i3status wrapper written in Python")
11539 (description "py3status is an i3status wrapper which extends i3status
11540 functionality in a modular way, allowing you to extend your panel with your
11541 own code, responding to click events and updating clock every second.")
11542 (license license:bsd-3)))
11543
11544 (define-public python-tblib
11545 (package
11546 (name "python-tblib")
11547 (version "1.3.0")
11548 (source (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "tblib" version))
11551 (sha256 (base32
11552 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11553 (build-system python-build-system)
11554 (arguments
11555 `(#:phases
11556 (modify-phases %standard-phases
11557 (replace 'check
11558 (lambda _
11559 ;; Upstream runs tests after installation and the package itself
11560 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11561 ;; found.
11562 (setenv "PYTHONPATH"
11563 (string-append (getcwd) "/build/lib:"
11564 (getenv "PYTHONPATH")))
11565 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11566 (native-inputs
11567 `(("python-pytest" ,python-pytest)
11568 ("python-six" ,python-six)))
11569 (home-page "https://github.com/ionelmc/python-tblib")
11570 (synopsis "Traceback serialization library")
11571 (description
11572 "Traceback serialization allows you to:
11573
11574 @enumerate
11575 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11576 different processes. This allows better error handling when running code over
11577 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11578
11579 @item Parse traceback strings and raise with the parsed tracebacks.
11580 @end enumerate\n")
11581 (license license:bsd-3)))
11582
11583 (define-public python2-tblib
11584 (package-with-python2 python-tblib))
11585
11586 (define-public python-sqlparse
11587 (package
11588 (name "python-sqlparse")
11589 (version "0.1.19")
11590 (source (origin
11591 (method url-fetch)
11592 (uri (pypi-uri "sqlparse" version))
11593 (sha256
11594 (base32
11595 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11596 (build-system python-build-system)
11597 (arguments
11598 `(#:phases
11599 (modify-phases %standard-phases
11600 (replace 'check
11601 (lambda* _
11602 ;; setup.py-integrated 2to3 only affects the build files, but
11603 ;; py.test is using the source files. So we need to convert them
11604 ;; manually.
11605 (when (zero? (system* "python3"))
11606 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11607 (zero? (system* "py.test")))))))
11608 (native-inputs
11609 `(("python-pytest" ,python-pytest)))
11610 (home-page "https://github.com/andialbrecht/sqlparse")
11611 (synopsis "Non-validating SQL parser")
11612 (description "Sqlparse is a non-validating SQL parser for Python. It
11613 provides support for parsing, splitting and formatting SQL statements.")
11614 (license license:bsd-3)))
11615
11616 (define-public python2-sqlparse
11617 (package-with-python2 python-sqlparse))
11618
11619 (define-public python-greenlet
11620 (package
11621 (name "python-greenlet")
11622 (version "0.4.11")
11623 (source (origin
11624 (method url-fetch)
11625 (uri (pypi-uri "greenlet" version))
11626 (sha256
11627 (base32
11628 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11629 (build-system python-build-system)
11630 (home-page "https://greenlet.readthedocs.io/")
11631 (synopsis "Lightweight in-process concurrent programming")
11632 (description
11633 "Greenlet package is a spin-off of Stackless, a version of CPython
11634 that supports micro-threads called \"tasklets\". Tasklets run
11635 pseudo-concurrently (typically in a single or a few OS-level threads) and
11636 are synchronized with data exchanges on \"channels\".")
11637 (license (list license:psfl license:expat))))
11638
11639 (define-public python2-greenlet
11640 (package-with-python2 python-greenlet))
11641
11642 (define-public python-gevent
11643 (package
11644 (name "python-gevent")
11645 (version "1.1.1")
11646 (source (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "gevent" version))
11649 (sha256
11650 (base32
11651 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11652 (modules '((guix build utils)))
11653 (snippet
11654 '(begin
11655 ;; unbunding libev and c-ares
11656 (for-each delete-file-recursively '("libev" "c-ares"))
11657 ;; fixing testsuite
11658 (call-with-output-file "greentest/__init__.py" noop)
11659 (substitute* "greentest/testrunner.py"
11660 (("import util") "from . import util")
11661 (("from util import log") "from .util import log"))))))
11662 (build-system python-build-system)
11663 (propagated-inputs
11664 `(("python-greenlet" ,python-greenlet)))
11665 (native-inputs
11666 `(("python-six" ,python-six)))
11667 (inputs
11668 `(("c-ares" ,c-ares)
11669 ("libev" ,libev)))
11670 (home-page "http://www.gevent.org/")
11671 (synopsis "Coroutine-based network library")
11672 (description
11673 "gevent is a coroutine-based Python networking library that uses greenlet
11674 to provide a high-level synchronous API on top of the libev event loop.")
11675 (license license:expat)))
11676
11677 (define-public python2-gevent
11678 (package-with-python2 python-gevent))
11679
11680 (define-public python-geventhttpclient
11681 (package
11682 (name "python-geventhttpclient")
11683 (version "1.3.1")
11684 (source (origin
11685 (method url-fetch)
11686 (uri (pypi-uri "geventhttpclient" version))
11687 (sha256
11688 (base32
11689 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11690 (modules '((guix build utils)))
11691 (snippet
11692 '(begin
11693 ;; Delete pre-compiled files.
11694 (for-each delete-file (find-files "src/geventhttpclient"
11695 ".*\\.pyc"))
11696 #t))))
11697 (build-system python-build-system)
11698 (arguments
11699 '(#:phases
11700 (modify-phases %standard-phases
11701 (add-after 'unpack 'delete-network-tests
11702 (lambda _
11703 (delete-file "src/geventhttpclient/tests/test_client.py")
11704 #t))
11705 (delete 'check)
11706 (add-after 'install 'check
11707 (lambda* (#:key inputs outputs #:allow-other-keys)
11708 (add-installed-pythonpath inputs outputs)
11709 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11710 (native-inputs
11711 `(("python-pytest" ,python-pytest)))
11712 (propagated-inputs
11713 `(("python-certifi" ,python-certifi)
11714 ("python-gevent" ,python-gevent)
11715 ("python-six" ,python-six)))
11716 (home-page "https://github.com/gwik/geventhttpclient")
11717 (synopsis "HTTP client library for gevent")
11718 (description "@code{python-geventhttpclient} is a high performance,
11719 concurrent HTTP client library for python using @code{gevent}.")
11720 (license license:expat)))
11721
11722 (define-public python2-geventhttpclient
11723 (package-with-python2 python-geventhttpclient))
11724
11725 (define-public python-fastimport
11726 (package
11727 (name "python-fastimport")
11728 (version "0.9.6")
11729 (source
11730 (origin
11731 (method url-fetch)
11732 (uri (pypi-uri "fastimport" version))
11733 (sha256
11734 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11735 (build-system python-build-system)
11736 (home-page "https://github.com/jelmer/python-fastimport")
11737 (synopsis "VCS fastimport parser and generator in Python")
11738 (description "This package provides a parser for and generator of the Git
11739 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11740 format.")
11741 (license license:gpl2+)))
11742
11743 (define-public python2-fastimport
11744 (package-with-python2 python-fastimport))
11745
11746 (define-public python-twisted
11747 (package
11748 (name "python-twisted")
11749 (version "16.2.0")
11750 (source (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11753 (sha256
11754 (base32
11755 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11756 (build-system python-build-system)
11757 (arguments
11758 '(#:tests? #f)) ; FIXME: Some tests are failing.
11759 ;; #:phases
11760 ;; (modify-phases %standard-phases
11761 ;; (replace 'check
11762 ;; (lambda _
11763 ;; (zero? (system* "./bin/trial" "twisted")))))
11764 (propagated-inputs
11765 `(("python-zope-interface" ,python-zope-interface)))
11766 (home-page "https://twistedmatrix.com/")
11767 (synopsis "Asynchronous networking framework written in Python")
11768 (description
11769 "Twisted is an extensible framework for Python programming, with special
11770 focus on event-based network programming and multiprotocol integration.")
11771 (license license:expat)))
11772
11773 (define-public python2-twisted
11774 (package-with-python2 python-twisted))
11775
11776 (define-public python-pika
11777 (package
11778 (name "python-pika")
11779 (version "0.10.0")
11780 (source
11781 (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "pika" version))
11784 (sha256
11785 (base32
11786 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11787 (build-system python-build-system)
11788 (native-inputs
11789 `(("python-pyev" ,python-pyev)
11790 ("python-tornado" ,python-tornado)
11791 ("python-twisted" ,python-twisted)))
11792 (home-page "https://pika.readthedocs.org")
11793 (synopsis "Pure Python AMQP Client Library")
11794 (description
11795 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11796 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11797 network support library.")
11798 (license license:bsd-3)))
11799
11800 (define-public python2-pika
11801 (package-with-python2 python-pika))
11802
11803 (define-public python-ply
11804 (package
11805 (name "python-ply")
11806 (version "3.9")
11807 (source
11808 (origin
11809 (method url-fetch)
11810 (uri (pypi-uri "ply" version))
11811 (sha256
11812 (base32
11813 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11814 (build-system python-build-system)
11815 (home-page "http://www.dabeaz.com/ply/")
11816 (synopsis "Python Lex & Yacc")
11817 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11818 It uses LR parsing and does extensive error checking.")
11819 (license license:bsd-3)))
11820
11821 (define-public python2-ply
11822 (package-with-python2 python-ply))
11823
11824 (define-public python-tabulate
11825 (package
11826 (name "python-tabulate")
11827 (version "0.7.7")
11828 (source (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "tabulate" version))
11831 (sha256
11832 (base32
11833 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11834 (build-system python-build-system)
11835 (arguments
11836 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11837 ;; and the latest release is not tagged in the upstream repository.
11838 '(#:tests? #f))
11839 (home-page "https://bitbucket.org/astanin/python-tabulate")
11840 (synopsis "Pretty-print tabular data")
11841 (description
11842 "Tabulate is a library and command-line utility to pretty-print tabular
11843 data in Python.")
11844 (license license:expat)))
11845
11846 (define-public python2-tabulate
11847 (package-with-python2 python-tabulate))
11848
11849 (define-public python-kazoo
11850 (package
11851 (name "python-kazoo")
11852 (version "2.2.1")
11853 (source
11854 (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "kazoo" version))
11857 (sha256
11858 (base32
11859 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11860 (build-system python-build-system)
11861 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11862 (propagated-inputs
11863 `(("python-six" ,python-six)))
11864 (home-page "https://kazoo.readthedocs.org")
11865 (synopsis "High-level Zookeeper client library")
11866 (description
11867 "Kazoo is a Python client library for the Apache Zookeeper distributed
11868 application service. It is designed to be easy to use and to avoid common
11869 programming errors.")
11870 (license license:asl2.0)))
11871
11872 (define-public python2-kazoo
11873 (package-with-python2 python-kazoo))
11874
11875 (define-public python-pykafka
11876 (package
11877 (name "python-pykafka")
11878 (version "2.4.0")
11879 (source (origin
11880 (method url-fetch)
11881 (uri (string-append
11882 "https://pypi.python.org/packages/8b/3e/"
11883 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11884 "pykafka-" version ".tar.gz"))
11885 (sha256
11886 (base32
11887 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11888 (build-system python-build-system)
11889 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11890 (propagated-inputs
11891 `(("python-gevent" ,python-gevent)
11892 ("python-kazoo" ,python-kazoo)
11893 ("python-tabulate" ,python-tabulate)))
11894 (inputs
11895 `(("librdkafka" ,librdkafka)))
11896 (home-page "https://pykafka.readthedocs.io/")
11897 (synopsis "Apache Kafka client for Python")
11898 (description
11899 "PyKafka is a client for the Apache Kafka distributed messaging system.
11900 It includes Python implementations of Kafka producers and consumers, which
11901 are optionally backed by a C extension built on librdkafka.")
11902 (license license:asl2.0)))
11903
11904 (define-public python2-pykafka
11905 (package-with-python2 python-pykafka))
11906
11907 (define-public python-wcwidth
11908 (package
11909 (name "python-wcwidth")
11910 (version "0.1.7")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "wcwidth" version))
11915 (sha256
11916 (base32
11917 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11918 (build-system python-build-system)
11919 (home-page "https://github.com/jquast/wcwidth")
11920 (synopsis "Measure number of terminal column cells of wide-character codes")
11921 (description "Wcwidth measures the number of terminal column cells of
11922 wide-character codes. It is useful for those implementing a terminal emulator,
11923 or programs that carefully produce output to be interpreted by one. It is a
11924 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11925 specified in POSIX.1-2001 and POSIX.1-2008.")
11926 (license license:expat)))
11927
11928 (define-public python2-wcwidth
11929 (package-with-python2 python-wcwidth))
11930
11931 (define-public python2-jsonrpclib
11932 (package
11933 (name "python2-jsonrpclib")
11934 (version "0.1.7")
11935 (source (origin
11936 (method url-fetch)
11937 (uri (string-append
11938 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11939 "jsonrpclib-" version ".tar.gz"))
11940 (sha256
11941 (base32
11942 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11943 (build-system python-build-system)
11944 (arguments
11945 `(#:tests? #f
11946 #:python ,python-2))
11947 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11948 (synopsis "Implementation of JSON-RPC specification for Python")
11949 (description
11950 "This library is an implementation of the JSON-RPC specification.
11951 It supports both the original 1.0 specification, as well as the
11952 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11953 etc.")
11954 (license license:asl2.0)))
11955
11956 (define-public python-chai
11957 (package
11958 (name "python-chai")
11959 (version "1.1.1")
11960 (source (origin
11961 (method url-fetch)
11962 (uri (pypi-uri "chai" version))
11963 (sha256
11964 (base32
11965 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11966 (build-system python-build-system)
11967 (home-page "https://github.com/agoragames/chai")
11968 (synopsis "Mocking framework for Python")
11969 (description
11970 "Chai provides an api for mocking, stubbing and spying your python
11971 objects, patterned after the Mocha library for Ruby.")
11972 (license license:bsd-3)))
11973
11974 (define-public python2-chai
11975 (package-with-python2 python-chai))
11976
11977 (define-public python-arrow
11978 (package
11979 (name "python-arrow")
11980 (version "0.10.0")
11981 (source (origin
11982 (method url-fetch)
11983 (uri (pypi-uri "arrow" version))
11984 (sha256
11985 (base32
11986 "08n7q2l69hlainds1byd4lxhwrq7zsw7s640zkqc3bs5jkq0cnc0"))))
11987 (build-system python-build-system)
11988 (native-inputs
11989 `(;; For testing
11990 ("python-chai" ,python-chai)
11991 ("python-simplejson" ,python-simplejson)))
11992 (propagated-inputs
11993 `(("python-dateutil" ,python-dateutil)))
11994 (home-page "https://github.com/crsmithdev/arrow/")
11995 (synopsis "Dates and times for Python")
11996 (description
11997 "Arrow is a Python library to creating, manipulating, formatting and
11998 converting dates, times, and timestamps. It implements and updates the
11999 datetime type.")
12000 (license license:asl2.0)))
12001
12002 (define-public python2-arrow
12003 (package-with-python2 python-arrow))
12004
12005 (define-public python-inflection
12006 (package
12007 (name "python-inflection")
12008 (version "0.3.1")
12009 (source
12010 (origin (method url-fetch)
12011 (uri (pypi-uri "inflection" version))
12012 (sha256
12013 (base32
12014 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12015 (build-system python-build-system)
12016 (native-inputs
12017 `(("python-pytest" ,python-pytest)))
12018 (home-page "https://github.com/jpvanhal/inflection")
12019 (synopsis "Python string transformation library")
12020 (description
12021 "Inflection is a string transformation library. It singularizes
12022 and pluralizes English words, and transforms strings from CamelCase to
12023 underscored string.")
12024 (license license:expat)))
12025
12026 (define-public python2-inflection
12027 (package-with-python2 python-inflection))
12028
12029 (define-public python-pylev
12030 (package
12031 (name "python-pylev")
12032 (version "1.3.0")
12033 (source (origin
12034 (method url-fetch)
12035 (uri (pypi-uri "pylev" version))
12036 (sha256
12037 (base32
12038 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12039 (build-system python-build-system)
12040 (home-page "https://github.com/toastdriven/pylev")
12041 (synopsis "Levenshtein distance implementation in Python")
12042 (description "Pure Python Levenshtein implementation, based off the
12043 Wikipedia code samples at
12044 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12045 (license license:bsd-3)))
12046
12047 (define-public python2-pylev
12048 (package-with-python2 python-pylev))
12049
12050 (define-public python-cleo
12051 (package
12052 (name "python-cleo")
12053 (version "0.6.1")
12054 (source (origin
12055 (method url-fetch)
12056 (uri (pypi-uri "cleo" version))
12057 (sha256
12058 (base32
12059 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
12060 (build-system python-build-system)
12061 (native-inputs
12062 `(;; For testing
12063 ("python-mock" ,python-mock)
12064 ("python-pytest-mock" ,python-pytest-mock)
12065 ("python-pytest" ,python-pytest)))
12066 (propagated-inputs
12067 `(("python-backpack" ,python-backpack)
12068 ("python-pastel" ,python-pastel)
12069 ("python-pylev" ,python-pylev)))
12070 (home-page "https://github.com/sdispater/cleo")
12071 (synopsis "Command-line arguments library for Python")
12072 (description
12073 "Cleo allows you to create command-line commands with signature in
12074 docstring and colored output.")
12075 (license license:expat)))
12076
12077 (define-public python2-cleo
12078 (package-with-python2 python-cleo))
12079
12080 (define-public python-lazy-object-proxy
12081 (package
12082 (name "python-lazy-object-proxy")
12083 (version "1.2.2")
12084 (source (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "lazy-object-proxy" version))
12087 (sha256
12088 (base32
12089 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
12090 (build-system python-build-system)
12091 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12092 (synopsis "Lazy object proxy for python")
12093 (description
12094 "Lazy object proxy is an object that wraps a callable but defers the call
12095 until the object is actually required, and caches the result of said call.")
12096 (license license:bsd-2)))
12097
12098 (define-public python2-lazy-object-proxy
12099 (package-with-python2 python-lazy-object-proxy))
12100
12101 (define-public python-dnspython
12102 (package
12103 (name "python-dnspython")
12104 (version "1.15.0")
12105 (source (origin
12106 (method url-fetch)
12107 (uri (string-append "http://www.dnspython.org/kits/"
12108 version "/dnspython-" version ".tar.gz"))
12109 (sha256
12110 (base32
12111 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
12112 (build-system python-build-system)
12113 (arguments '(#:tests? #f)) ; XXX: requires internet access
12114 (home-page "http://www.dnspython.org")
12115 (synopsis "DNS toolkit for Python")
12116 (description
12117 "dnspython is a DNS toolkit for Python. It supports almost all record
12118 types. It can be used for queries, zone transfers, and dynamic updates.
12119 It supports TSIG authenticated messages and EDNS0.")
12120 (license license:expat)))
12121
12122 (define-public python2-dnspython
12123 (package-with-python2 python-dnspython))
12124
12125 (define-public python-email-validator
12126 (package
12127 (name "python-email-validator")
12128 (version "1.0.2")
12129 (source
12130 (origin (method url-fetch)
12131 (uri (pypi-uri "email_validator" version))
12132 (sha256
12133 (base32
12134 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
12135 (build-system python-build-system)
12136 (arguments
12137 '(#:phases
12138 (modify-phases %standard-phases
12139 (add-before 'build 'use-dnspython
12140 (lambda _
12141 (substitute* "setup.py"
12142 (("dnspython3") "dnspython"))
12143 #t)))))
12144 (propagated-inputs
12145 `(("python-dnspython" ,python-dnspython)
12146 ("python-idna" ,python-idna)))
12147 (home-page "https://github.com/JoshData/python-email-validator")
12148 (synopsis "Email address validation library for Python")
12149 (description
12150 "This library validates email address syntax and deliverability.")
12151 (license license:cc0)))
12152
12153 (define-public python2-email-validator
12154 (package-with-python2 python-email-validator))
12155
12156 (define-public python-ukpostcodeparser
12157 (package
12158 (name "python-ukpostcodeparser")
12159 (version "1.0.3")
12160 (source (origin
12161 (method url-fetch)
12162 (uri (pypi-uri "UkPostcodeParser" version))
12163 (sha256
12164 (base32
12165 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12166 (build-system python-build-system)
12167 (home-page "https://github.com/hamstah/ukpostcodeparser")
12168 (synopsis "UK Postcode parser for Python")
12169 (description
12170 "This library provides the @code{parse_uk_postcode} function for
12171 parsing UK postcodes.")
12172 (license license:expat)))
12173
12174 (define-public python2-ukpostcodeparser
12175 (package-with-python2 python-ukpostcodeparser))
12176
12177 (define-public python-faker
12178 (package
12179 (name "python-faker")
12180 (version "0.7.9")
12181 (source (origin
12182 (method url-fetch)
12183 (uri (pypi-uri "Faker" version))
12184 (sha256
12185 (base32
12186 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
12187 (patches
12188 (search-patches "python-faker-fix-build-32bit.patch"))
12189 (modules '((guix build utils)))
12190 (snippet
12191 '(begin
12192 (for-each delete-file (find-files "." "\\.pyc$"))
12193 #t))))
12194 (build-system python-build-system)
12195 (arguments
12196 '(#:phases
12197 (modify-phases %standard-phases
12198 (replace 'check
12199 (lambda _
12200 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
12201 (native-inputs
12202 `(;; For testing
12203 ("python-email-validator" ,python-email-validator)
12204 ("python-mock" ,python-mock)
12205 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
12206 (propagated-inputs
12207 `(("python-dateutil" ,python-dateutil)
12208 ("python-six" ,python-six)))
12209 (home-page "https://github.com/joke2k/faker")
12210 (synopsis "Python package that generates fake data")
12211 (description
12212 "Faker is a Python package that generates fake data such as names,
12213 addresses, and phone numbers.")
12214 (license license:expat)
12215 (properties `((python2-variant . ,(delay python2-faker))))))
12216
12217 (define-public python2-faker
12218 (let ((base (package-with-python2 (strip-python2-variant
12219 python-faker))))
12220 (package
12221 (inherit base)
12222 (propagated-inputs
12223 `(("python2-ipaddress" ,python2-ipaddress)
12224 ,@(package-propagated-inputs base))))))
12225
12226 (define-public python-pyaml
12227 (package
12228 (name "python-pyaml")
12229 (version "17.7.2")
12230 (source (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "pyaml" version))
12233 (sha256
12234 (base32
12235 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
12236 (build-system python-build-system)
12237 (native-inputs
12238 `(("python-unidecode" ,python-unidecode)))
12239 (propagated-inputs
12240 `(("python-pyyaml" ,python-pyyaml)))
12241 (home-page "https://github.com/mk-fg/pretty-yaml")
12242 (synopsis "YAML pretty-print library for Python")
12243 (description
12244 "pyaml is a PyYAML based python module to produce pretty and readable
12245 YAML-serialized data.")
12246 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
12247
12248 (define-public python2-pyaml
12249 (package-with-python2 python-pyaml))
12250
12251 (define-public python-backpack
12252 (package
12253 (name "python-backpack")
12254 (version "0.1")
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "backpack" version))
12259 (sha256
12260 (base32
12261 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12262 (build-system python-build-system)
12263 (native-inputs
12264 `(("python-pytest" ,python-pytest)
12265 ("python-nose" ,python-nose)))
12266 (propagated-inputs
12267 `(("python-simplejson" ,python-simplejson)))
12268 (home-page "https://github.com/sdispater/backpack")
12269 (synopsis "Utilities for working with Python collections")
12270 (description "Backpack provides some useful utilities for working with
12271 collections of data.")
12272 (license license:expat)))
12273
12274 (define-public python2-backpack
12275 (package-with-python2 python-backpack))
12276
12277 (define-public python-flexmock
12278 (package
12279 (name "python-flexmock")
12280 (version "0.10.2")
12281 (source (origin
12282 (method url-fetch)
12283 (uri (pypi-uri "flexmock" version))
12284 (sha256
12285 (base32
12286 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
12287 (build-system python-build-system)
12288 (home-page "https://flexmock.readthedocs.org")
12289 (synopsis "Testing library for Python")
12290 (description
12291 "flexmock is a testing library for Python that makes it easy to create
12292 mocks, stubs and fakes.")
12293 (license license:bsd-3)))
12294
12295 (define-public python2-flexmock
12296 (package-with-python2 python-flexmock))
12297
12298 (define-public python-prompt-toolkit
12299 (package
12300 (name "python-prompt-toolkit")
12301 (version "1.0.9")
12302 (source
12303 (origin
12304 (method url-fetch)
12305 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12306 (sha256
12307 (base32
12308 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12309 (build-system python-build-system)
12310 (arguments
12311 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12312 (propagated-inputs
12313 `(("python-wcwidth" ,python-wcwidth)
12314 ("python-six" ,python-six)
12315 ("python-pygments" ,python-pygments)))
12316 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12317 (synopsis "Library for building command line interfaces in Python")
12318 (description
12319 "Prompt-Toolkit is a library for building interactive command line
12320 interfaces in Python. It's like GNU Readline but it also features syntax
12321 highlighting while typing, out-of-the-box multi-line input editing, advanced
12322 code completion, incremental search, support for Chinese double-width
12323 characters, mouse support, and auto suggestions.")
12324 (license license:bsd-3)))
12325
12326 (define-public python2-prompt-toolkit
12327 (package-with-python2 python-prompt-toolkit))
12328
12329 (define-public python-jedi
12330 (package
12331 (name "python-jedi")
12332 (version "0.9.0")
12333 (source
12334 (origin
12335 (method url-fetch)
12336 (uri (pypi-uri "jedi" version))
12337 (sha256
12338 (base32
12339 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12340 (build-system python-build-system)
12341 (arguments
12342 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12343 '(#:tests? #f))
12344 (native-inputs
12345 `(("python-pytest" ,python-pytest)))
12346 (home-page "https://github.com/davidhalter/jedi")
12347 (synopsis
12348 "Autocompletion for Python that can be used for text editors")
12349 (description
12350 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12351 (license license:expat)))
12352
12353 (define-public python2-jedi
12354 (package-with-python2 python-jedi))
12355
12356 (define-public ptpython
12357 (package
12358 (name "ptpython")
12359 (version "0.34")
12360 (source (origin
12361 (method url-fetch)
12362 (uri (pypi-uri "ptpython" version))
12363 (sha256
12364 (base32
12365 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12366 (build-system python-build-system)
12367 (arguments
12368 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12369 (propagated-inputs
12370 `(("python-docopt" ,python-docopt)
12371 ("python-jedi" ,python-jedi)
12372 ("python-prompt-toolkit" ,python-prompt-toolkit)
12373 ("python-pygments" ,python-pygments)))
12374 (home-page "https://github.com/jonathanslenders/ptpython")
12375 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12376 (description
12377 "ptpython is a Python read-eval-print loop with IDE-like features.
12378 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12379 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12380 etc.")
12381 (license license:bsd-3)
12382 (properties `((python2-variant . ,(delay ptpython-2))))))
12383
12384 (define-public ptpython-2
12385 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12386 (package
12387 (inherit base)
12388 (name "ptpython2"))))
12389
12390 (define-public python-requests-oauthlib
12391 (package
12392 (name "python-requests-oauthlib")
12393 (version "0.6.2")
12394 (source
12395 (origin
12396 (method url-fetch)
12397 (uri (pypi-uri "requests-oauthlib" version))
12398 (sha256
12399 (base32
12400 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12401 (build-system python-build-system)
12402 (arguments
12403 `(#:phases
12404 (modify-phases %standard-phases
12405 ;; removes tests that require network access
12406 (add-before 'check 'pre-check
12407 (lambda _
12408 (delete-file "tests/test_core.py")
12409 #t)))))
12410 (native-inputs
12411 `(("python-requests-mock" ,python-requests-mock)
12412 ("python-mock" ,python-mock)))
12413 (propagated-inputs
12414 `(("python-oauthlib" ,python-oauthlib)
12415 ("python-requests" ,python-requests)))
12416 (home-page
12417 "https://github.com/requests/requests-oauthlib")
12418 (synopsis
12419 "OAuthlib authentication support for Requests")
12420 (description
12421 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12422 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12423 (license license:isc)))
12424
12425 (define-public python2-requests-oauthlib
12426 (package-with-python2 python-requests-oauthlib))
12427
12428 (define-public python-stem
12429 (package
12430 (name "python-stem")
12431 (version "1.5.4")
12432 (source
12433 (origin
12434 (method url-fetch)
12435 (uri (pypi-uri "stem" version))
12436 (sha256
12437 (base32
12438 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12439 (build-system python-build-system)
12440 (arguments
12441 `(#:phases
12442 (modify-phases %standard-phases
12443 (replace 'check
12444 (lambda _
12445 (zero? (system* "./run_tests.py" "--unit")))))))
12446 (native-inputs
12447 `(("python-mock" ,python-mock)
12448 ("python-pep8" ,python-pep8)
12449 ("python-pyflakes" ,python-pyflakes)))
12450 (home-page "https://stem.torproject.org/")
12451 (synopsis
12452 "Python controller library that allows applications to interact with Tor")
12453 (description
12454 "Stem is a Python controller library for Tor. With it you can use Tor's
12455 control protocol to script against the Tor process and read descriptor data
12456 relays publish about themselves.")
12457 (license license:lgpl3)))
12458
12459 (define-public python2-stem
12460 (package-with-python2 python-stem))
12461
12462 (define-public python-pyserial
12463 (package
12464 (name "python-pyserial")
12465 (version "3.1.1")
12466 (source
12467 (origin
12468 (method url-fetch)
12469 (uri (pypi-uri "pyserial" version))
12470 (sha256
12471 (base32
12472 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12473 (build-system python-build-system)
12474 (arguments
12475 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12476 ;; #:phases
12477 ;; (modify-phases %standard-phases
12478 ;; (replace 'check
12479 ;; (lambda _
12480 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12481 (home-page
12482 "https://github.com/pyserial/pyserial")
12483 (synopsis "Python Serial Port Bindings")
12484 (description "@code{pyserial} provide serial port bindings for Python. It
12485 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12486 and/or Xon/Xoff. The port is accessed in RAW mode.")
12487 (license license:bsd-3)))
12488
12489 (define-public python2-pyserial
12490 (package-with-python2 python-pyserial))
12491
12492 (define-public python-kivy
12493 (package
12494 (name "python-kivy")
12495 (version "1.9.1")
12496 (source
12497 (origin
12498 (method url-fetch)
12499 (uri (pypi-uri "kivy" version))
12500 (file-name (string-append name "-" version ".tar.gz"))
12501 (sha256
12502 (base32
12503 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12504 (build-system python-build-system)
12505 (arguments
12506 `(#:tests? #f ; Tests require many optional packages
12507 #:phases
12508 (modify-phases %standard-phases
12509 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12510 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12511 (lambda* (#:key inputs #:allow-other-keys)
12512 (setenv "KIVY_SDL2_PATH"
12513 (string-append (assoc-ref inputs "sdl-union")
12514 "/include/SDL2"))
12515 #t)))))
12516 (native-inputs
12517 `(("pkg-config" ,pkg-config)
12518 ("python-cython" ,python-cython)))
12519 (inputs
12520 `(("gstreamer" ,gstreamer)
12521 ("mesa" ,mesa)
12522 ("sdl-union"
12523 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12524 (home-page "http://kivy.org")
12525 (synopsis
12526 "Multitouch application framework")
12527 (description
12528 "A software library for rapid development of
12529 hardware-accelerated multitouch applications.")
12530 (license license:expat)))
12531
12532 (define-public python2-kivy
12533 (package-with-python2 python-kivy))
12534
12535 (define-public python-kivy-next
12536 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12537 (revision "1"))
12538 (package (inherit python-kivy)
12539 (name "python-kivy-next")
12540 (version (string-append "1.9.1-" revision "."
12541 (string-take commit 7)))
12542 (source
12543 (origin
12544 (method git-fetch)
12545 (uri (git-reference
12546 (url "https://github.com/kivy/kivy")
12547 (commit commit)))
12548 (file-name (string-append name "-" version "-checkout"))
12549 (sha256
12550 (base32
12551 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12552
12553 (define-public python2-kivy-next
12554 (package-with-python2 python-kivy-next))
12555
12556 (define-public python-binaryornot
12557 (package
12558 (name "python-binaryornot")
12559 (version "0.4.0")
12560 (source (origin
12561 (method url-fetch)
12562 (uri (pypi-uri "binaryornot" version))
12563 (sha256
12564 (base32
12565 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12566 (build-system python-build-system)
12567 (propagated-inputs
12568 `(("python-chardet" ,python-chardet)
12569 ("python-hypothesis" ,python-hypothesis)))
12570 (home-page "https://github.com/audreyr/binaryornot")
12571 (synopsis "Package to check if a file is binary or text")
12572 (description "Ultra-lightweight pure Python package to check if a file is
12573 binary or text.")
12574 (license license:bsd-3)
12575 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12576
12577 (define-public python2-binaryornot
12578 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12579 (package (inherit base)
12580 (propagated-inputs
12581 `(("python2-enum34" ,python2-enum34)
12582 ,@(package-propagated-inputs base))))))
12583
12584 (define-public python-nltk
12585 (package
12586 (name "python-nltk")
12587 (version "3.2.1")
12588 (source (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "nltk" version))
12591 (sha256
12592 (base32
12593 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12594 (build-system python-build-system)
12595 (arguments
12596 '(;; The tests require some extra resources to be downloaded.
12597 ;; TODO Try packaging these resources.
12598 #:tests? #f))
12599 (home-page "http://nltk.org/")
12600 (synopsis "Natural Language Toolkit")
12601 (description "It provides interfaces to over 50 corpora and lexical
12602 resources such as WordNet, along with a suite of text processing libraries
12603 for classification, tokenization, stemming, tagging, parsing, and semantic
12604 reasoning, wrappers for natural language processing libraries.")
12605 (license license:asl2.0)))
12606
12607 (define-public python2-nltk
12608 (package-with-python2 python-nltk))
12609
12610 (define-public python-pymongo
12611 (package
12612 (name "python-pymongo")
12613 (version "3.3.0")
12614 (source (origin
12615 (method url-fetch)
12616 (uri (pypi-uri "pymongo" version))
12617 (sha256
12618 (base32
12619 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12620 (build-system python-build-system)
12621 (propagated-inputs
12622 `(("python-certifi" ,python-certifi)))
12623 (home-page "https://github.com/mongodb/mongo-python-driver")
12624 (synopsis "Python driver for MongoDB")
12625 (description "Python driver for MongoDB.")
12626 (license license:asl2.0)))
12627
12628 (define-public python2-pymongo
12629 (package-with-python2 python-pymongo))
12630
12631 (define-public python-sh
12632 (package
12633 (name "python-sh")
12634 (version "1.11")
12635 (source (origin
12636 (method url-fetch)
12637 (uri (pypi-uri "sh" version))
12638 (sha256
12639 (base32
12640 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12641 (build-system python-build-system)
12642 (arguments
12643 `(#:tests? #f)) ; no tests
12644 (home-page "https://github.com/amoffat/sh")
12645 (synopsis "Python subprocess interface")
12646 (description "Abstracts process invocation by providing a function
12647 interface for programs.")
12648 (license license:expat)))
12649
12650 (define-public python2-sh
12651 (package-with-python2 python-sh))
12652
12653 (define-public python-consul
12654 (package
12655 (name "python-consul")
12656 (version "0.6.1")
12657 (source
12658 (origin
12659 (method url-fetch)
12660 (uri (pypi-uri "python-consul" version))
12661 (sha256
12662 (base32
12663 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12664 (build-system python-build-system)
12665 (native-inputs
12666 `(("python-pytest" ,python-pytest)))
12667 (propagated-inputs
12668 `(("python-requests" ,python-requests)
12669 ("python-six" ,python-six)))
12670 (home-page "https://github.com/cablehead/python-consul")
12671 (synopsis "Python client for Consul")
12672 (description
12673 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12674 discovery, monitoring and configuration.")
12675 (license license:expat)))
12676
12677 (define-public python2-consul
12678 (package-with-python2 python-consul))
12679
12680 (define-public python-schematics
12681 (package
12682 (name "python-schematics")
12683 (version "1.1.1")
12684 (source
12685 (origin
12686 (method url-fetch)
12687 (uri (string-append
12688 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12689 (file-name (string-append name "-" version ".tar.gz"))
12690 (sha256
12691 (base32
12692 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12693 (build-system python-build-system)
12694 (propagated-inputs
12695 `(("python-six" ,python-six)))
12696 (arguments
12697 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12698 ; version requirements (eg python-coveralls)
12699 (home-page "https://github.com/schematics/schematics")
12700 (synopsis "Python Data Structures for Humans")
12701 (description "Python Data Structures for Humans.")
12702 (license license:bsd-3)))
12703
12704 (define-public python2-schematics
12705 (package-with-python2 python-schematics))
12706
12707 (define-public python-publicsuffix
12708 (package
12709 (name "python-publicsuffix")
12710 (version "1.1.0")
12711 (source (origin
12712 (method url-fetch)
12713 (uri (pypi-uri "publicsuffix" version))
12714 (sha256
12715 (base32
12716 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12717 (build-system python-build-system)
12718 (arguments
12719 `(#:tests? #f)) ; tests use the internet
12720 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12721 (synopsis "Get suffix for a domain name")
12722 (description "Get a public suffix for a domain name using the Public Suffix
12723 List.")
12724 (license license:expat)))
12725
12726 (define-public python2-publicsuffix
12727 (package-with-python2 python-publicsuffix))
12728
12729 (define-public python-publicsuffix2
12730 (package
12731 (name "python-publicsuffix2")
12732 (version "2.20160818")
12733 (source
12734 (origin
12735 (method url-fetch)
12736 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12737 (sha256
12738 (base32
12739 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12740 (build-system python-build-system)
12741 (arguments
12742 '(#:tests? #f)) ; The test suite requires network access.
12743 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12744 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12745 (description "Get a public suffix for a domain name using the Public Suffix
12746 List. Forked from and using the same API as the publicsuffix package.")
12747 (license (list license:expat license:mpl2.0))))
12748
12749 (define-public python2-publicsuffix2
12750 (package-with-python2 python-publicsuffix2))
12751
12752 (define-public python-url
12753 (package
12754 (name "python-url")
12755 (version "0.2.0")
12756 (source (origin
12757 (method url-fetch)
12758 (uri (pypi-uri "url" version))
12759 (sha256
12760 (base32
12761 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12762 (build-system python-build-system)
12763 (propagated-inputs
12764 `(("python-publicsuffix" ,python-publicsuffix)))
12765 (native-inputs
12766 `(("python-coverage" ,python-coverage)
12767 ("python-nose" ,python-nose)))
12768 (arguments
12769 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12770 (home-page "https://github.com/seomoz/url-py")
12771 (synopsis "URL Parsing")
12772 (description "Library for parsing urls.")
12773 (license license:expat)
12774 (properties `((python2-variant . ,(delay python2-url))))))
12775
12776 (define-public python2-url
12777 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12778 (package (inherit base)
12779 (propagated-inputs
12780 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12781
12782 (define-public python-freezegun
12783 (package
12784 (name "python-freezegun")
12785 (version "0.3.8")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (pypi-uri "freezegun" version))
12790 (sha256
12791 (base32
12792 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12793 (build-system python-build-system)
12794 (native-inputs
12795 `(("python-mock" ,python-mock)
12796 ("python-nose" ,python-nose)
12797 ("python-coverage" ,python-coverage)))
12798 (propagated-inputs
12799 `(("python-six" ,python-six)
12800 ("python-dateutil" ,python-dateutil)))
12801 (arguments
12802 `(#:phases (modify-phases %standard-phases
12803 ;; The tests are normally executed via `make test`, but the PyPi
12804 ;; package does not include the Makefile.
12805 (replace 'check
12806 (lambda _
12807 (zero? (system* "nosetests" "./tests/")))))))
12808 (home-page "https://github.com/spulec/freezegun")
12809 (synopsis "Test utility for mocking the datetime module")
12810 (description
12811 "FreezeGun is a library that allows your python tests to travel through
12812 time by mocking the datetime module.")
12813 (license license:asl2.0)))
12814
12815 (define-public python2-freezegun
12816 (package-with-python2 python-freezegun))
12817
12818
12819 (define-public python-odfpy
12820 (package
12821 (name "python-odfpy")
12822 (version "1.3.3")
12823 (source (origin
12824 (method url-fetch)
12825 (uri (pypi-uri "odfpy" version))
12826 (sha256
12827 (base32
12828 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12829 (arguments
12830 `(#:modules ((srfi srfi-1)
12831 (guix build python-build-system)
12832 (guix build utils))
12833 #:phases
12834 (modify-phases %standard-phases
12835 (replace 'check
12836 ;; The test runner invokes python2 and python3 for test*.py.
12837 ;; To avoid having both in inputs, we replicate it here.
12838 (lambda _
12839 (every (lambda (test-file)
12840 (zero? (system* "python" test-file)))
12841 (find-files "tests" "^test.*\\.py$")))))))
12842 (build-system python-build-system)
12843 (home-page "https://github.com/eea/odfpy")
12844 (synopsis "Python API and tools to manipulate OpenDocument files")
12845 (description "Collection of libraries and utility programs written in
12846 Python to manipulate OpenDocument 1.2 files.")
12847 (license
12848 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12849 ;; number of files with other licenses.
12850 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12851
12852 (define-public python2-odfpy
12853 (package-with-python2 python-odfpy))
12854
12855 (define-public python-cachecontrol
12856 (package
12857 (name "python-cachecontrol")
12858 (version "0.11.6")
12859 (source
12860 (origin
12861 (method url-fetch)
12862 ;; Pypi does not have tests.
12863 (uri (string-append
12864 "https://github.com/ionrock/cachecontrol/archive/v"
12865 version ".tar.gz"))
12866 (file-name (string-append name "-" version ".tar.gz"))
12867 (sha256
12868 (base32
12869 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12870 (build-system python-build-system)
12871 (arguments
12872 `(#:phases
12873 (modify-phases %standard-phases
12874 (replace 'check
12875 (lambda _
12876 ;; Drop test that requires internet access.
12877 (delete-file "tests/test_regressions.py")
12878 (setenv "PYTHONPATH"
12879 (string-append (getcwd) "/build/lib:"
12880 (getenv "PYTHONPATH")))
12881 (zero? (system* "py.test" "-vv")))))))
12882 (native-inputs
12883 `(("python-pytest" ,python-pytest)
12884 ("python-redis" ,python-redis)
12885 ("python-webtest" ,python-webtest)
12886 ("python-mock" ,python-mock)))
12887 (propagated-inputs
12888 `(("python-requests" ,python-requests)
12889 ("python-lockfile" ,python-lockfile)))
12890 (home-page "https://github.com/ionrock/cachecontrol")
12891 (synopsis "The httplib2 caching algorithms for use with requests")
12892 (description "CacheControl is a port of the caching algorithms in
12893 @code{httplib2} for use with @code{requests} session objects.")
12894 (license license:asl2.0)))
12895
12896 (define-public python2-cachecontrol
12897 (package-with-python2 python-cachecontrol))
12898
12899 (define-public python-lit
12900 (package
12901 (name "python-lit")
12902 (version "0.5.0")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "lit" version))
12907 (sha256
12908 (base32
12909 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12910 (build-system python-build-system)
12911 (home-page "http://llvm.org/")
12912 (synopsis "LLVM Software Testing Tool")
12913 (description "@code{lit} is a portable tool for executing LLVM and Clang
12914 style test suites, summarizing their results, and providing indication of
12915 failures.")
12916 (license license:ncsa)))
12917
12918 (define-public python2-lit
12919 (package-with-python2 python-lit))
12920
12921 (define-public python-pytest-pep8
12922 (package
12923 (name "python-pytest-pep8")
12924 (version "1.0.6")
12925 (source (origin
12926 (method url-fetch)
12927 (uri (pypi-uri "pytest-pep8" version))
12928 (sha256
12929 (base32
12930 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12931 (build-system python-build-system)
12932 (arguments
12933 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12934 (native-inputs
12935 `(("python-pytest" ,python-pytest)))
12936 (propagated-inputs
12937 `(("python-pep8" ,python-pep8)))
12938 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12939 (synopsis "Py.test plugin to check PEP8 requirements")
12940 (description "Pytest plugin for checking PEP8 compliance.")
12941 (license license:expat)))
12942
12943 (define-public python2-pytest-pep8
12944 (package-with-python2 python-pytest-pep8))
12945
12946 (define-public python-pytest-flakes
12947 (package
12948 (name "python-pytest-flakes")
12949 (version "1.0.1")
12950 (source (origin
12951 (method url-fetch)
12952 (uri (pypi-uri "pytest-flakes" version))
12953 (sha256
12954 (base32
12955 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12956 (build-system python-build-system)
12957 (arguments
12958 `(#:phases
12959 (modify-phases %standard-phases
12960 (delete 'check)
12961 (add-after 'install 'check
12962 (lambda* (#:key outputs inputs #:allow-other-keys)
12963 ;; It's easier to run tests after install.
12964 ;; Make installed package available for running the tests
12965 (add-installed-pythonpath inputs outputs)
12966 (zero? (system* "py.test" "-vv")))))))
12967 (native-inputs
12968 `(("python-coverage" ,python-coverage)
12969 ("python-pytest" ,python-pytest)
12970 ("python-pytest-cache" ,python-pytest-cache)
12971 ("python-pytest-pep8" ,python-pytest-pep8)))
12972 (propagated-inputs
12973 `(("python-pyflakes" ,python-pyflakes)))
12974 (home-page "https://github.com/fschulze/pytest-flakes")
12975 (synopsis "Py.test plugin to check source code with pyflakes")
12976 (description "Pytest plugin for checking Python source code with pyflakes.")
12977 (license license:expat)))
12978
12979 (define-public python2-pytest-flakes
12980 (package-with-python2 python-pytest-flakes))
12981
12982 (define-public python-natsort
12983 (package
12984 (name "python-natsort")
12985 (version "5.0.2")
12986 (source (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "natsort" version))
12989 (sha256
12990 (base32
12991 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12992 (build-system python-build-system)
12993 (arguments
12994 `(#:phases
12995 (modify-phases %standard-phases
12996 (add-before 'check 'set-cachedir
12997 ;; Tests require write access to $HOME by default
12998 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12999 (native-inputs
13000 `(("python-hypothesis" ,python-hypothesis)
13001 ("python-pytest-cache" ,python-pytest-cache)
13002 ("python-pytest-cov" ,python-pytest-cov)
13003 ("python-pytest-flakes" ,python-pytest-flakes)
13004 ("python-pytest-pep8" ,python-pytest-pep8)))
13005 (propagated-inputs ; TODO: Add python-fastnumbers.
13006 `(("python-pyicu" ,python-pyicu)))
13007 (home-page "https://github.com/SethMMorton/natsort")
13008 (synopsis "Natural sorting for python and shell")
13009 (description
13010 "Natsort lets you apply natural sorting on lists instead of
13011 lexicographical. If you use the built-in @code{sorted} method in python
13012 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
13013 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
13014 function @code{natsorted} that identifies numbers and sorts them separately
13015 from strings. It can also sort version numbers, real numbers, mixed types
13016 and more, and comes with a shell command @command{natsort} that exposes this
13017 functionality in the command line.")
13018 (license license:expat)
13019 (properties `((python2-variant . ,(delay python2-natsort))))))
13020
13021 (define-public python2-natsort
13022 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13023 (package (inherit base)
13024 (native-inputs
13025 `(("python2-pathlib" ,python2-pathlib)
13026 ("python2-mock" ,python2-mock)
13027 ("python2-enum34" ,python2-enum34)
13028 ,@(package-native-inputs base))))))
13029
13030 (define-public python-glances
13031 (package
13032 (name "python-glances")
13033 (version "2.7.1")
13034 (source
13035 (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "Glances" version))
13038 (sha256
13039 (base32
13040 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
13041 (build-system python-build-system)
13042 (propagated-inputs
13043 `(("python-psutil" ,python-psutil)))
13044 (home-page
13045 "https://github.com/nicolargo/glances")
13046 (synopsis
13047 "A cross-platform curses-based monitoring tool")
13048 (description
13049 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13050 Glances uses the PsUtil library to get information from your system. It monitors
13051 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13052 (license license:lgpl3+)))
13053
13054 (define-public python2-glances
13055 (package-with-python2 python-glances))
13056
13057 (define-public python-graphql-core
13058 (package
13059 (name "python-graphql-core")
13060 (version "0.5.3")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "graphql-core" version))
13065 (sha256
13066 (base32
13067 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13068 (build-system python-build-system)
13069 (arguments
13070 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13071 #:phases
13072 (modify-phases %standard-phases
13073 (add-after 'unpack 'patch-hardcoded-version
13074 (lambda _ (substitute*
13075 "setup.py"
13076 (("'gevent==1.1rc1'") "'gevent'"))
13077 #t)))))
13078 (native-inputs
13079 `(("python-gevent" ,python-gevent)
13080 ("python-mock" ,python-mock)
13081 ("python-pytest-mock" ,python-pytest-mock)))
13082 (propagated-inputs
13083 `(("python-promise" ,python-promise)
13084 ("python-six" ,python-six)))
13085 (home-page "https://github.com/graphql-python/graphql-core")
13086 (synopsis "GraphQL implementation for Python")
13087 (description
13088 "GraphQL implementation for Python. GraphQL is a data query language and
13089 runtime designed and used to request and deliver data to mobile and web apps.
13090 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13091 to Python.")
13092 (license license:expat)))
13093
13094 (define-public python2-graphql-core
13095 (package-with-python2 python-graphql-core))
13096
13097 (define-public python-graphql-relay
13098 (package
13099 (name "python-graphql-relay")
13100 (version "0.4.5")
13101 (source
13102 (origin
13103 (method url-fetch)
13104 (uri (pypi-uri "graphql-relay" version))
13105 (sha256
13106 (base32
13107 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13108 (build-system python-build-system)
13109 (native-inputs
13110 `(("python-pytest" ,python-pytest)))
13111 (propagated-inputs
13112 `(("python-graphql-core" ,python-graphql-core)
13113 ("python-promise" ,python-promise)
13114 ("python-six" ,python-six)))
13115 (home-page "https://github.com/graphql-python/graphql-relay-py")
13116 (synopsis "Relay implementation for Python")
13117 (description
13118 "This is a library to allow the easy creation of Relay-compliant servers
13119 using the GraphQL Python reference implementation of a GraphQL server. It
13120 should be noted that the code is a exact port of the original
13121 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13122 from Facebook.")
13123 (license license:expat)))
13124
13125 (define-public python2-graphql-relay
13126 (package-with-python2 python-graphql-relay))
13127
13128 (define-public python-graphene
13129 (package
13130 (name "python-graphene")
13131 (version "0.10.2")
13132 (source
13133 (origin
13134 (method url-fetch)
13135 (uri (pypi-uri "graphene" version))
13136 (sha256
13137 (base32
13138 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13139 (build-system python-build-system)
13140 (native-inputs
13141 `(("python-django-filter" ,python-django-filter)
13142 ("python-mock" ,python-mock)
13143 ("python-psycopg2" ,python-psycopg2)
13144 ("python-pytest-django" ,python-pytest-django)
13145 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
13146 (propagated-inputs
13147 `(("python-graphql-core" ,python-graphql-core)
13148 ("python-graphql-relay" ,python-graphql-relay)
13149 ("python-iso8601" ,python-iso8601)
13150 ("python-promise" ,python-promise)
13151 ("python-six" ,python-six)))
13152 (home-page "http://graphene-python.org/")
13153 (synopsis "GraphQL Framework for Python")
13154 (description
13155 "Graphene is a Python library for building GraphQL schemas/types.
13156 A GraphQL schema describes your data model, and provides a GraphQL server
13157 with an associated set of resolve methods that know how to fetch data.")
13158 (properties `((python2-variant . ,(delay python2-graphene))))
13159 (license license:expat)))
13160
13161 (define-public python2-graphene
13162 (let ((base (package-with-python2
13163 (strip-python2-variant python-graphene))))
13164 (package (inherit base)
13165 (native-inputs
13166 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13167 ,@(package-native-inputs base))))))
13168
13169 (define-public python-nautilus
13170 (package
13171 (name "python-nautilus")
13172 (version "0.4.9")
13173 (source
13174 (origin
13175 (method url-fetch)
13176 (uri (pypi-uri "nautilus" version))
13177 (sha256
13178 (base32
13179 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13180 (build-system python-build-system)
13181 (arguments `(#:tests? #f)) ; fails to import test modules
13182 (propagated-inputs
13183 `(("python-bcrypt" ,python-bcrypt)
13184 ("python-click" ,python-click)
13185 ("python-consul" ,python-consul)
13186 ("python-graphene" ,python-graphene)
13187 ("python-jinja2" ,python-jinja2)
13188 ("python-peewee" ,python-peewee)
13189 ("python-pika" ,python-pika)
13190 ("python-tornado" ,python-tornado)
13191 ("python-wtforms" ,python-wtforms)))
13192 (native-inputs
13193 `(("python-nose2" ,python-nose2)))
13194 (home-page "https://github.com/AlecAivazis/nautilus")
13195 (synopsis "Library for creating microservice applications")
13196 (description
13197 "Nautilus is a framework for flux based microservices that looks to
13198 provide extendible implementations of common aspects of a cloud so that you can
13199 focus on building massively scalable web applications.")
13200 (license license:expat)))
13201
13202 (define-public python-snowballstemmer
13203 (package
13204 (name "python-snowballstemmer")
13205 (version "1.2.1")
13206 (source (origin
13207 (method url-fetch)
13208 (uri (pypi-uri "snowballstemmer" version))
13209 (sha256
13210 (base32
13211 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
13212 (build-system python-build-system)
13213 (arguments
13214 `(;; No tests exist
13215 #:tests? #f))
13216 (home-page "https://github.com/shibukawa/snowball_py")
13217 (synopsis "Snowball stemming library collection for Python")
13218 (description "This package provides 16 word stemmer algorithms generated
13219 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13220 English stemmer.")
13221 (license license:bsd-3)))
13222
13223 (define-public python2-snowballstemmer
13224 (package-with-python2 python-snowballstemmer))
13225
13226 (define-public python-sphinx-cloud-sptheme
13227 (package
13228 (name "python-sphinx-cloud-sptheme")
13229 (version "1.8.0")
13230 (source (origin
13231 (method url-fetch)
13232 (uri (pypi-uri "cloud_sptheme" version))
13233 (sha256
13234 (base32
13235 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
13236 (build-system python-build-system)
13237 ;; FIXME: The 'pypi' release archive does not contain tests.
13238 (arguments '(#:tests? #f))
13239 (native-inputs
13240 `(("python-sphinx" ,python-sphinx)))
13241 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
13242 (synopsis "'Cloud' theme for Sphinx documenter")
13243 (description "This package contains the \"Cloud\" theme for Sphinx and some
13244 related extensions.")
13245 (license license:bsd-3)))
13246
13247 (define-public python2-sphinx-cloud-sptheme
13248 (package-with-python2 python-sphinx-cloud-sptheme))
13249
13250 (define-public python-sphinx-alabaster-theme
13251 (package
13252 (name "python-sphinx-alabaster-theme")
13253 (version "0.7.9")
13254 (source (origin
13255 (method url-fetch)
13256 (uri (pypi-uri "alabaster" version))
13257 (sha256
13258 (base32
13259 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
13260 (build-system python-build-system)
13261 (propagated-inputs
13262 `(("python-pygments" ,python-pygments)))
13263 (home-page "https://alabaster.readthedocs.io/")
13264 (synopsis "Configurable sidebar-enabled Sphinx theme")
13265 (description "Alabaster is a visually (c)lean, responsive, configurable
13266 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
13267 (license license:bsd-3)))
13268
13269 (define-public python2-sphinx-alabaster-theme
13270 (package-with-python2 python-sphinx-alabaster-theme))
13271
13272 (define-public python-betamax
13273 (package
13274 (name "python-betamax")
13275 (version "0.8.0")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "betamax" version))
13280 (sha256
13281 (base32
13282 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13283 (build-system python-build-system)
13284 (arguments
13285 '(;; Many tests fail because they require networking.
13286 #:tests? #f))
13287 (propagated-inputs
13288 `(("python-requests" ,python-requests)))
13289 (home-page "https://github.com/sigmavirus24/betamax")
13290 (synopsis "Record HTTP interactions with python-requests")
13291 (description "Betamax will record your test suite's HTTP interactions and
13292 replay them during future tests. It is designed to work with python-requests.")
13293 (license license:expat)))
13294
13295 (define-public python2-betamax
13296 (package-with-python2 python-betamax))
13297
13298 (define-public python-betamax-matchers
13299 (package
13300 (name "python-betamax-matchers")
13301 (version "0.4.0")
13302 (source
13303 (origin
13304 (method url-fetch)
13305 (uri (pypi-uri "betamax-matchers" version))
13306 (sha256
13307 (base32
13308 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
13309 (build-system python-build-system)
13310 (propagated-inputs
13311 `(("python-betamax" ,python-betamax)
13312 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13313 (home-page "https://github.com/sigmavirus24/betamax_matchers")
13314 (synopsis "VCR imitation for python-requests")
13315 (description "@code{betamax-matchers} provides a set of Matchers for
13316 Betamax.")
13317 (license license:asl2.0)))
13318
13319 (define-public python2-betamax-matchers
13320 (package-with-python2 python-betamax-matchers))
13321
13322 (define-public python-s3transfer
13323 (package
13324 (name "python-s3transfer")
13325 (version "0.1.11")
13326 (source (origin
13327 (method url-fetch)
13328 (uri (pypi-uri "s3transfer" version))
13329 (sha256
13330 (base32
13331 "0yfrfnf404cxzn3iswibqjxklsl0b1lwgqiml6pwiqj79a7zbwbn"))))
13332 (build-system python-build-system)
13333 (arguments
13334 `(#:phases
13335 (modify-phases %standard-phases
13336 (replace 'check
13337 (lambda _
13338 ;; 7 of the 'integration' tests require network access or login
13339 ;; credentials.
13340 (zero? (system* "nosetests" "--exclude=integration")))))))
13341 (native-inputs
13342 `(("python-docutils" ,python-docutils)
13343 ("python-mock" ,python-mock)
13344 ("python-nose" ,python-nose)))
13345 (propagated-inputs
13346 `(("python-botocore" ,python-botocore)))
13347 (synopsis "Amazon S3 Transfer Manager")
13348 (description "S3transfer is a Python library for managing Amazon S3
13349 transfers.")
13350 (home-page "https://github.com/boto/s3transfer")
13351 (license license:asl2.0)
13352 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13353
13354 (define-public python2-s3transfer
13355 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13356 (package
13357 (inherit base)
13358 (native-inputs
13359 `(("python2-futures" ,python2-futures)
13360 ,@(package-native-inputs base))))))
13361
13362 (define-public python-setproctitle
13363 (package
13364 (name "python-setproctitle")
13365 (version "1.1.10")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "setproctitle" version))
13370 (sha256
13371 (base32
13372 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13373 (build-system python-build-system)
13374 (arguments
13375 '(#:phases
13376 (modify-phases %standard-phases
13377 (add-before 'check 'patch-Makefile
13378 ;; Stricly this is only required for the python2 variant.
13379 ;; But adding a phase in an inherited package seems to be
13380 ;; cumbersum. So we patch even for python3.
13381 (lambda _
13382 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13383 (when nose
13384 (substitute* "Makefile"
13385 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13386 (string-append nose "/bin/nosetests "))))
13387 #t)))
13388 (replace 'check
13389 (lambda _
13390 (setenv "PYTHON" (or (which "python3") (which "python")))
13391 (setenv "PYCONFIG" (or (which "python3-config")
13392 (which "python-config")))
13393 (setenv "CC" "gcc")
13394 ;; No need to extend PYTHONPATH to find the built package, since
13395 ;; the Makefile will build anyway
13396 (zero? (system* "make" "check")))))))
13397 (native-inputs
13398 `(("procps" ,procps))) ; required for tests
13399 (home-page
13400 "https://github.com/dvarrazzo/py-setproctitle")
13401 (synopsis
13402 "Setproctitle implementation for Python to customize the process title")
13403 (description "The library allows a process to change its title (as displayed
13404 by system tools such as ps and top).
13405
13406 Changing the title is mostly useful in multi-process systems, for
13407 example when a master process is forked: changing the children's title
13408 allows to identify the task each process is busy with. The technique
13409 is used by PostgreSQL and the OpenSSH Server for example.")
13410 (license license:bsd-3)
13411 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13412
13413 (define-public python2-setproctitle
13414 (let ((base (package-with-python2
13415 (strip-python2-variant python-setproctitle))))
13416 (package
13417 (inherit base)
13418 (native-inputs `(("python2-nose" ,python2-nose)
13419 ,@(package-native-inputs base))))))
13420
13421 (define-public python-validictory
13422 (package
13423 (name "python-validictory")
13424 (version "1.0.1")
13425 (source
13426 (origin
13427 (method url-fetch)
13428 (uri (pypi-uri "validictory" version))
13429 (sha256
13430 (base32
13431 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13432 (build-system python-build-system)
13433 (arguments
13434 '(#:phases
13435 (modify-phases %standard-phases
13436 (add-after 'unpack 'bootstrap
13437 ;; Move the tests out of the package directory to avoid
13438 ;; packaging them.
13439 (lambda* _
13440 (rename-file "validictory/tests" "tests")
13441 (delete-file "tests/__init__.py")))
13442 (replace 'check
13443 (lambda _
13444 ;; Extend PYTHONPATH so the built package will be found.
13445 (setenv "PYTHONPATH"
13446 (string-append (getcwd) "/build/lib:"
13447 (getenv "PYTHONPATH")))
13448 (zero? (system* "py.test" "-vv" )))))))
13449 (native-inputs
13450 `(("python-pytest" ,python-pytest)))
13451 (home-page
13452 "https://github.com/jamesturk/validictory")
13453 (synopsis "General purpose Python data validator")
13454 (description "It allows validation of arbitrary Python data structures.
13455
13456 The schema format is based on the JSON Schema
13457 proposal (http://json-schema.org), so combined with json the library is also
13458 useful as a validator for JSON data.")
13459 (license license:expat)))
13460
13461 (define-public python2-validictory
13462 (package-with-python2 python-validictory))
13463
13464 (define-public python-aniso8601
13465 (package
13466 (name "python-aniso8601")
13467 (version "1.3.0")
13468 (source
13469 (origin
13470 (method url-fetch)
13471 (uri (pypi-uri "aniso8601" version))
13472 (sha256
13473 (base32
13474 "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
13475 (build-system python-build-system)
13476 (propagated-inputs
13477 `(("python-dateutil" ,python-dateutil)))
13478 (home-page
13479 "https://bitbucket.org/nielsenb/aniso8601")
13480 (synopsis
13481 "Python library for parsing ISO 8601 strings")
13482 (description
13483 "This package contains a library for parsing ISO 8601 datetime strings.")
13484 (license license:bsd-3)))
13485
13486 (define-public python2-aniso8601
13487 (package-with-python2 python-aniso8601))
13488
13489 (define-public python-flask-restful
13490 (package
13491 (name "python-flask-restful")
13492 (version "0.3.5")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "Flask-RESTful" version))
13497 (sha256
13498 (base32
13499 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13500 (build-system python-build-system)
13501 (propagated-inputs
13502 `(("python-aniso8601" ,python-aniso8601)
13503 ("python-flask" ,python-flask)
13504 ("python-pycrypto" ,python-pycrypto)
13505 ("python-pytz" ,python-pytz)))
13506 (native-inputs
13507 `(;; Optional dependency of Flask. Tests need it.
13508 ("python-blinker" ,python-blinker)
13509 ("python-mock" ,python-mock) ; For tests
13510 ("python-nose" ,python-nose) ; For tests
13511 ("python-sphinx" ,python-sphinx)))
13512 (home-page
13513 "https://www.github.com/flask-restful/flask-restful/")
13514 (synopsis
13515 "Flask module for creating REST APIs")
13516 (description
13517 "This package contains a Flask module for creating REST APIs.")
13518 (license license:bsd-3)))
13519
13520 (define-public python-flask-basicauth
13521 (package
13522 (name "python-flask-basicauth")
13523 (version "0.2.0")
13524 (source
13525 (origin
13526 (method url-fetch)
13527 (uri (pypi-uri "Flask-BasicAuth" version))
13528 (sha256
13529 (base32
13530 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13531 (build-system python-build-system)
13532 (propagated-inputs
13533 `(("python-flask" ,python-flask)))
13534 (home-page
13535 "https://github.com/jpvanhal/flask-basicauth")
13536 (synopsis
13537 "HTTP basic access authentication for Flask")
13538 (description
13539 "This package provides HTTP basic access authentication for Flask.")
13540 (license license:bsd-3)))
13541
13542 (define-public python-flask-sqlalchemy
13543 (package
13544 (name "python-flask-sqlalchemy")
13545 (version "2.1")
13546 (source
13547 (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "Flask-SQLAlchemy" version))
13550 (sha256
13551 (base32
13552 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13553 (build-system python-build-system)
13554 (propagated-inputs
13555 `(("python-flask" ,python-flask)
13556 ("python-sqlalchemy" ,python-sqlalchemy)))
13557 (home-page
13558 "https://github.com/mitsuhiko/flask-sqlalchemy")
13559 (synopsis
13560 "Module adding SQLAlchemy support to your Flask application")
13561 (description
13562 "This package adds SQLAlchemy support to your Flask application.")
13563 (license license:bsd-3)))
13564
13565 (define-public python-pyev
13566 (package
13567 (name "python-pyev")
13568 (version "0.9.0")
13569 (source
13570 (origin
13571 (method url-fetch)
13572 (uri (pypi-uri "pyev" version))
13573 (sha256
13574 (base32
13575 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13576 (build-system python-build-system)
13577 (arguments
13578 `(#:tests? #f ; no test suite
13579 #:phases
13580 (modify-phases %standard-phases
13581 (add-after 'unpack 'patch
13582 (lambda* (#:key inputs #:allow-other-keys)
13583 (let ((libev (string-append (assoc-ref inputs "libev")
13584 "/lib/libev.so.4")))
13585 (substitute* "setup.py"
13586 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13587 (string-append "libev_dll_name = \"" libev "\"")))))))))
13588 (inputs
13589 `(("libev" ,libev)))
13590 (home-page "http://pythonhosted.org/pyev/")
13591 (synopsis "Python libev interface")
13592 (description "Pyev provides a Python interface to libev.")
13593 (license license:gpl3)))
13594
13595 (define-public python2-pyev
13596 (package-with-python2 python-pyev))
13597
13598 (define-public python-imagesize
13599 (package
13600 (name "python-imagesize")
13601 (version "0.7.1")
13602 (source
13603 (origin
13604 (method url-fetch)
13605 (uri (pypi-uri "imagesize" version))
13606 (sha256
13607 (base32
13608 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13609 (build-system python-build-system)
13610 (arguments
13611 '(;; Test files are not distributed on PyPi:
13612 ;; https://github.com/shibukawa/imagesize_py/issues/7
13613 #:tests? #f))
13614 (home-page "https://github.com/shibukawa/imagesize_py")
13615 (synopsis "Gets image size of files in variaous formats in Python")
13616 (description
13617 "This package allows determination of image size from
13618 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13619 (license license:expat)))
13620
13621 (define-public python2-imagesize
13622 (package-with-python2 python-imagesize))
13623
13624 (define-public python-axolotl-curve25519
13625 (package
13626 (name "python-axolotl-curve25519")
13627 (version "0.1")
13628 (source
13629 (origin
13630 (method git-fetch)
13631 (uri (git-reference
13632 (url "https://github.com/tgalal/python-axolotl-curve25519")
13633 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13634 (file-name (string-append name "-" version "-checkout"))
13635 (sha256
13636 (base32
13637 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13638 (build-system python-build-system)
13639 (arguments
13640 `(;; Prevent creation of the egg. This works around
13641 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13642 #:configure-flags '("--root=/")))
13643 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13644 (synopsis "Python wrapper for curve25519 library")
13645 (description "This is a python wrapper for the curve25519 library
13646 with ed25519 signatures. The C code was pulled from
13647 libaxolotl-android. At the moment this wrapper is meant for use by
13648 python-axolotl.")
13649 (license (list license:gpl3 ; Most files
13650 license:bsd-3)))) ; curve/curve25519-donna.c
13651
13652 (define-public python2-axolotl-curve25519
13653 (package-with-python2 python-axolotl-curve25519))
13654
13655 (define-public python-axolotl
13656 (package
13657 (name "python-axolotl")
13658 (version "0.1.35")
13659 (source
13660 (origin
13661 (method url-fetch)
13662 (uri (string-append
13663 "https://github.com/tgalal/python-axolotl/archive/"
13664 version ".tar.gz"))
13665 (file-name (string-append name "-" version ".tar.gz"))
13666 (sha256
13667 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13668 (build-system python-build-system)
13669 (arguments
13670 `(#:phases
13671 (modify-phases %standard-phases
13672 ;; Don't install tests
13673 (add-before 'install 'remove-tests
13674 (lambda _
13675 (for-each delete-file-recursively
13676 '("axolotl/tests" "build/lib/axolotl/tests"))
13677 #t)))))
13678 (propagated-inputs
13679 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13680 ("python-dateutil" ,python-dateutil)
13681 ("python-protobuf" ,python-protobuf)
13682 ("python-pycrypto" ,python-pycrypto)))
13683 (home-page "https://github.com/tgalal/python-axolotl")
13684 (synopsis "Python port of libaxolotl-android")
13685 (description "This is a python port of libaxolotl-android. This
13686 is a ratcheting forward secrecy protocol that works in synchronous and
13687 asynchronous messaging environments.")
13688 (license license:gpl3)))
13689
13690 (define-public python2-axolotl
13691 (package-with-python2 python-axolotl))
13692
13693 (define-public python-termstyle
13694 (package
13695 (name "python-termstyle")
13696 (version "0.1.11")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "termstyle" version))
13701 (sha256
13702 (base32
13703 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13704 (build-system python-build-system)
13705 (arguments
13706 '(#:phases
13707 (modify-phases %standard-phases
13708 (replace 'check
13709 (lambda _
13710 (zero? (system* "python" "test3.py")))))))
13711 (home-page "https://github.com/gfxmonk/termstyle")
13712 (synopsis "Console text coloring for Python")
13713 (description "This package provides console text coloring for Python.")
13714 (license license:bsd-3)))
13715
13716 (define-public python-rednose
13717 (package
13718 (name "python-rednose")
13719 (version "1.2.1")
13720 (source
13721 (origin
13722 (method url-fetch)
13723 (uri (pypi-uri "rednose" version))
13724 (sha256
13725 (base32
13726 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13727 (build-system python-build-system)
13728 (arguments
13729 `(#:phases
13730 (modify-phases %standard-phases
13731 (add-after 'unpack 'fix-deps
13732 (lambda _
13733 ;; See <https://github.com/JBKahn/rednose/issues/12>
13734 (substitute* "setup.py"
13735 (("python-termstyle") "termstyle"))
13736 #t)))))
13737 (propagated-inputs
13738 `(("python-colorama" ,python-colorama)
13739 ("python-termstyle" ,python-termstyle)))
13740 (native-inputs
13741 `(("python-six" ,python-six)
13742 ("python-nose" ,python-nose)))
13743 (home-page "https://github.com/JBKahn/rednose")
13744 (synopsis "Colored output for Python nosetests")
13745 (description "This package provides colored output for the
13746 @command{nosetests} command of the Python Nose unit test framework.")
13747 (license license:bsd-3)))
13748
13749 (define-public python2-rednose
13750 (package-with-python2 python-rednose))
13751
13752 (define-public python-flask-restplus
13753 (package
13754 (name "python-flask-restplus")
13755 (version "0.9.2")
13756 (source
13757 (origin
13758 (method url-fetch)
13759 (uri (pypi-uri "flask-restplus" version))
13760 (sha256
13761 (base32
13762 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13763 (build-system python-build-system)
13764 (arguments
13765 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13766 ;; #:phases
13767 ;; (modify-phases %standard-phases
13768 ;; (replace 'check
13769 ;; (lambda _
13770 ;; (zero? (system* "nosetests")))))))
13771 (propagated-inputs
13772 `(("python-aniso8601" ,python-aniso8601)
13773 ("python-flask" ,python-flask)
13774 ("python-jsonschema" ,python-jsonschema)
13775 ("python-pytz" ,python-pytz)
13776 ("python-six" ,python-six)))
13777 (native-inputs
13778 `(("python-tzlocal" ,python-tzlocal)
13779 ("python-blinker" ,python-blinker)
13780 ("python-nose" ,python-nose)
13781 ("python-rednose" ,python-rednose)))
13782 (home-page "https://github.com/noirbizarre/flask-restplus")
13783 (synopsis "Framework for documented API development with Flask")
13784 (description "This package provides a framework for API development with
13785 the Flask web framework in Python. It is similar to package
13786 @code{python-flask-restful} but supports the @code{python-swagger}
13787 documentation builder.")
13788 (license license:expat)))
13789
13790 (define-public python-sadisplay
13791 (package
13792 (name "python-sadisplay")
13793 (version "0.4.6")
13794 (source
13795 (origin
13796 (method url-fetch)
13797 (uri (pypi-uri "sadisplay" version))
13798 (sha256
13799 (base32
13800 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13801 (build-system python-build-system)
13802 (propagated-inputs
13803 `(("python-sqlalchemy" ,python-sqlalchemy)))
13804 (native-inputs
13805 `(("python-nose" ,python-nose)))
13806 (home-page "https://bitbucket.org/estin/sadisplay")
13807 (synopsis "SQLAlchemy schema displayer")
13808 (description "This package provides a program to build Entity
13809 Relationship diagrams from a SQLAlchemy model (or directly from the
13810 database).")
13811 (license license:bsd-3)))
13812
13813 (define-public python2-sadisplay
13814 (package-with-python2 python-sadisplay))
13815
13816 (define-public python-flask-restful-swagger
13817 (package
13818 (name "python-flask-restful-swagger")
13819 (version "0.19")
13820 (source
13821 (origin
13822 (method url-fetch)
13823 (uri (pypi-uri "flask-restful-swagger" version))
13824 (sha256
13825 (base32
13826 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13827 (build-system python-build-system)
13828 (propagated-inputs
13829 `(("python-flask-restful" ,python-flask-restful)))
13830 (home-page "https://github.com/rantav/flask-restful-swagger")
13831 (synopsis "Extract Swagger specs from Flask-Restful projects")
13832 (description "This package lets you extract Swagger API documentation
13833 specs from your Flask-Restful projects.")
13834 (license license:expat)))
13835
13836 (define-public python2-flask-restful-swagger
13837 (package-with-python2 python-flask-restful-swagger))
13838
13839 (define-public python-argcomplete
13840 (package
13841 (name "python-argcomplete")
13842 (version "1.7.0")
13843 (source
13844 (origin
13845 (method url-fetch)
13846 (uri (pypi-uri "argcomplete" version))
13847 (sha256
13848 (base32
13849 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13850 (build-system python-build-system)
13851 (native-inputs
13852 `(("python-pexpect" ,python-pexpect)
13853 ("tcsh" ,tcsh)
13854 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13855 (home-page "https://github.com/kislyuk/argcomplete")
13856 (synopsis "Shell tab completion for Python argparse")
13857 (description "argcomplete provides extensible command line tab completion
13858 of arguments and options for Python scripts using @code{argparse}. It's
13859 particularly useful for programs with many options or sub-parsers that can
13860 dynamically suggest completions; for example, when browsing resources over the
13861 network.")
13862 (license license:asl2.0)))
13863
13864 (define-public python2-argcomplete
13865 (package-with-python2 python-argcomplete))
13866
13867 (define-public python-xopen
13868 (package
13869 (name "python-xopen")
13870 (version "0.1.1")
13871 (source
13872 (origin
13873 (method url-fetch)
13874 (uri (pypi-uri "xopen" version))
13875 (sha256
13876 (base32
13877 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13878 (file-name (string-append name "-" version ".tar.gz"))))
13879 (build-system python-build-system)
13880 (home-page "https://github.com/marcelm/xopen/")
13881 (synopsis "Open compressed files transparently")
13882 (description "This module provides an @code{xopen} function that works like
13883 Python's built-in @code{open} function, but can also deal with compressed files.
13884 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13885 recognized by their file extensions. The focus is on being as efficient as
13886 possible on all supported Python versions.")
13887 (license license:expat)))
13888
13889 (define-public python2-xopen
13890 (package-with-python2 python-xopen))
13891
13892 (define-public python2-cheetah
13893 (package
13894 (name "python2-cheetah")
13895 (version "2.4.4")
13896 (source
13897 (origin
13898 (method url-fetch)
13899 (uri (pypi-uri "Cheetah" version))
13900 (sha256
13901 (base32
13902 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13903 (build-system python-build-system)
13904 (arguments
13905 `(#:python ,python-2))
13906 (propagated-inputs
13907 `(("python2-markdown" ,python2-markdown)))
13908 (home-page "https://pythonhosted.org/Cheetah/")
13909 (synopsis "Template engine")
13910 (description "Cheetah is a text-based template engine and Python code
13911 generator.
13912
13913 Cheetah can be used as a standalone templating utility or referenced as
13914 a library from other Python applications. It has many potential uses,
13915 but web developers looking for a viable alternative to ASP, JSP, PHP and
13916 PSP are expected to be its principle user group.
13917
13918 Features:
13919 @enumerate
13920 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13921 text-based format.
13922 @item Cleanly separates content, graphic design, and program code.
13923 @item Blends the power and flexibility of Python with a simple template language
13924 that non-programmers can understand.
13925 @item Gives template writers full access to any Python data structure, module,
13926 function, object, or method in their templates.
13927 @item Makes code reuse easy by providing an object-orientated interface to
13928 templates that is accessible from Python code or other Cheetah templates.
13929 One template can subclass another and selectively reimplement sections of it.
13930 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13931 improve the performance of a dynamic website.
13932 @item Compiles templates into optimized, yet readable, Python code.
13933 @end enumerate")
13934 (license (license:x11-style "file://LICENSE"))))
13935
13936 (define-public python-dulwich
13937 (package
13938 (name "python-dulwich")
13939 (version "0.16.3")
13940 (source
13941 (origin
13942 (method url-fetch)
13943 (uri (list (string-append "https://www.dulwich.io/releases/"
13944 "dulwich-" version ".tar.gz")
13945 (pypi-uri "dulwich" version)))
13946 (sha256
13947 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13948 (build-system python-build-system)
13949 (arguments
13950 `(#:phases
13951 (modify-phases %standard-phases
13952 (add-before 'check 'fix-tests
13953 (lambda* (#:key inputs #:allow-other-keys)
13954 ;; The tests use Popen with a custom environment which doesn't
13955 ;; include PATH.
13956 (substitute* "dulwich/tests/compat/utils.py"
13957 (("'git'") (string-append "'"
13958 (which "git")
13959 "'")))
13960 (substitute* '("dulwich/tests/test_repository.py"
13961 "dulwich/tests/test_hooks.py")
13962 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13963 (setenv "TEST_RUNNER" "unittest")
13964 (setenv "PYTHONHASHSEED" "random")
13965 #t)))))
13966 (propagated-inputs
13967 `(("python-fastimport" ,python-fastimport)))
13968 (native-inputs
13969 `(("python-mock" ,python-mock)
13970 ("python-geventhttpclient" ,python-geventhttpclient)
13971 ("git" ,git)))
13972 (home-page "https://www.dulwich.io/")
13973 (synopsis "Git implementation in Python")
13974 (description "Dulwich is an implementation of the Git file formats and
13975 protocols written in pure Python.")
13976 ;; Can be used with either license.
13977 (license (list license:asl2.0 license:gpl2+))))
13978
13979 (define-public python2-dulwich
13980 (package-with-python2 python-dulwich))
13981
13982 (define-public python-pbkdf2
13983 (package
13984 (name "python-pbkdf2")
13985 (version "1.3")
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (pypi-uri "pbkdf2" version))
13990 (sha256
13991 (base32
13992 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13993 (build-system python-build-system)
13994 (arguments
13995 '(#:phases
13996 (modify-phases %standard-phases
13997 (replace 'check
13998 (lambda _
13999 (setenv "PYTHONPATH"
14000 (string-append (getcwd) "/build/lib:"
14001 (getenv "PYTHONPATH")))
14002 (zero? (system* "python" "test/test_pbkdf2.py")))))))
14003 (propagated-inputs
14004 `(("python-pycrypto" ,python-pycrypto))) ; optional
14005 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
14006 (synopsis "Password-based key derivation")
14007 (description "This module implements the password-based key derivation
14008 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14009
14010 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14011 is part of the RSA Public Key Cryptography Standards series. The provided
14012 implementation takes a password or a passphrase and a salt value (and
14013 optionally a iteration count, a digest module, and a MAC module) and provides
14014 a file-like object from which an arbitrarly-sized key can be read.")
14015 (license license:expat)))
14016
14017 (define-public python2-pbkdf2
14018 (package-with-python2 python-pbkdf2))
14019
14020 (define-public python-qrcode
14021 (package
14022 (name "python-qrcode")
14023 (version "5.3")
14024 (source
14025 (origin
14026 (method url-fetch)
14027 (uri (pypi-uri "qrcode" version))
14028 (sha256
14029 (base32
14030 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
14031 (build-system python-build-system)
14032 (arguments
14033 ;; FIXME: Tests require packaging 'pymaging'.
14034 '(#:tests? #f))
14035 (propagated-inputs
14036 `(("python-lxml" ,python-lxml) ; for SVG output
14037 ("python-pillow" ,python-pillow) ; for PNG output
14038 ("python-six" ,python-six)))
14039 (home-page "https://github.com/lincolnloop/python-qrcode")
14040 (synopsis "QR Code image generator")
14041 (description "This package provides a pure Python QR Code generator
14042 module. It uses the Python Imaging Library (PIL) to allow for the generation
14043 of QR Codes.
14044
14045 In addition this package provides a command line tool to generate QR codes and
14046 either write these QR codes to a file or do the output as ascii art at the
14047 console.")
14048 (license license:bsd-3)))
14049
14050 (define-public python2-qrcode
14051 (package-with-python2 python-qrcode))
14052
14053 ;; SlowAES isn't compatible with Python 3.
14054 (define-public python2-slowaes
14055 (package
14056 (name "python2-slowaes")
14057 (version "0.1a1")
14058 (source
14059 (origin
14060 (method url-fetch)
14061 (uri (pypi-uri "slowaes" version))
14062 (sha256
14063 (base32
14064 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
14065 (build-system python-build-system)
14066 (arguments `(#:python ,python-2))
14067 (home-page "http://code.google.com/p/slowaes/")
14068 (synopsis "Implementation of AES in Python")
14069 (description "This package contains an implementation of AES in Python.
14070 This implementation is slow (hence the project name) but still useful when
14071 faster ones are not available.")
14072 (license license:asl2.0)))
14073
14074 (define-public python-rst2ansi
14075 (package
14076 (name "python-rst2ansi")
14077 (version "0.1.5")
14078 (source
14079 (origin
14080 (method url-fetch)
14081 (uri (pypi-uri "rst2ansi" version))
14082 (sha256
14083 (base32
14084 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14085 (build-system python-build-system)
14086 (propagated-inputs
14087 `(("python-docutils" ,python-docutils)))
14088 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14089 (synopsis "Convert RST to ANSI-decorated console output")
14090 (description
14091 "Python module dedicated to rendering RST (reStructuredText) documents
14092 to ansi-escaped strings suitable for display in a terminal.")
14093 (license license:expat)))
14094
14095 (define-public python-ansi2html
14096 (package
14097 (name "python-ansi2html")
14098 (version "1.2.0")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (pypi-uri "ansi2html" version))
14103 (sha256
14104 (base32
14105 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14106 (build-system python-build-system)
14107 (native-inputs
14108 `(("python-mock" ,python-mock)
14109 ("python-nose" ,python-nose)))
14110 (propagated-inputs
14111 `(("python-six" ,python-six)))
14112 (home-page "http://github.com/ralphbean/ansi2html")
14113 (synopsis "Convert ANSI-decorated console output to HTML")
14114 (description
14115 "@command{ansi2html} is a Python library and command line utility for
14116 convering text with ANSI color codes to HTML or LaTeX.")
14117 (license license:gpl3+)))
14118
14119 (define-public python2-ansi2html
14120 (package-with-python2 python-ansi2html))
14121
14122 (define-public python-ddt
14123 (package
14124 (name "python-ddt")
14125 (version "1.1.1")
14126 (source
14127 (origin
14128 (method url-fetch)
14129 (uri (pypi-uri "ddt" version))
14130 (sha256
14131 (base32
14132 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
14133 (build-system python-build-system)
14134 (native-inputs
14135 `(("python-mock" ,python-mock)
14136 ("python-nose" ,python-nose)))
14137 (propagated-inputs
14138 `(("python-six" ,python-six)
14139 ("python-pyyaml" ,python-pyyaml)))
14140 (home-page "https://github.com/txels/ddt")
14141 (synopsis "Data-Driven Tests")
14142 (description
14143 "DDT (Data-Driven Tests) allows you to multiply one test case by running
14144 it with different test data, and make it appear as multiple test cases.")
14145 (license license:expat)))
14146
14147 (define-public python2-ddt
14148 (package-with-python2 python-ddt))
14149
14150 (define-public python-pycosat
14151 (package
14152 (name "python-pycosat")
14153 (version "0.6.1")
14154 (source
14155 (origin
14156 (method url-fetch)
14157 (uri (pypi-uri "pycosat" version))
14158 (sha256
14159 (base32
14160 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
14161 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14162 (build-system python-build-system)
14163 (home-page "https://github.com/ContinuumIO/pycosat")
14164 (synopsis "Bindings to picosat (a SAT solver)")
14165 (description
14166 "This package provides efficient Python bindings to @code{picosat} on
14167 the C level. When importing pycosat, the @code{picosat} solver becomes part
14168 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14169 Problem} (SAT) solver.")
14170 (license license:expat)))
14171
14172 (define-public python2-pycosat
14173 (package-with-python2 python-pycosat))
14174
14175 (define-public python2-ruamel.ordereddict
14176 (package
14177 (name "python2-ruamel.ordereddict")
14178 (version "0.4.9")
14179 (source
14180 (origin
14181 (method url-fetch)
14182 (uri (pypi-uri "ruamel.ordereddict" version))
14183 (sha256
14184 (base32
14185 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14186 (build-system python-build-system)
14187 (arguments
14188 `(#:python ,python-2
14189 #:phases
14190 (modify-phases %standard-phases
14191 (delete 'check)
14192 (add-after 'install 'check
14193 (lambda* (#:key inputs outputs #:allow-other-keys)
14194 (add-installed-pythonpath inputs outputs)
14195 (zero? (system* "python" "test/testordereddict.py")))))))
14196 (home-page "https://bitbucket.org/ruamel/ordereddict")
14197 (synopsis "Version of dict that keeps keys in insertion order")
14198 (description
14199 "This is an implementation of an ordered dictionary with @dfn{Key
14200 Insertion Order} (KIO: updates of values do not affect the position of the
14201 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14202 removed and put at the back). The standard library module @code{OrderedDict},
14203 implemented later, implements a subset of @code{ordereddict} functionality.
14204 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14205 Order} (KSO, no sorting function can be specified, but a transform can be
14206 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14207 (license license:expat)))
14208
14209 (define-public python-pypeg2
14210 (package
14211 (name "python-pypeg2")
14212 (version "2.15.2")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (pypi-uri "pyPEG2" version))
14217 (sha256
14218 (base32
14219 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14220 (build-system python-build-system)
14221 (propagated-inputs `(("python-lxml" ,python-lxml)))
14222 (arguments
14223 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14224 '(#:tests? #f))
14225 (home-page "https://fdik.org/pyPEG/")
14226 (synopsis "Parsering Expression Grammars in Python")
14227 (description "PyPEG is an intrinsic parser interpreter framework for
14228 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14229 parse many formal languages.")
14230 (license license:gpl2)))
14231
14232 (define-public python2-cliapp
14233 (package
14234 (name "python2-cliapp")
14235 (version "1.20170823")
14236 (source
14237 (origin
14238 (method url-fetch)
14239 (uri (string-append
14240 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14241 version ".tar.gz"))
14242 (sha256
14243 (base32
14244 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
14245 (build-system python-build-system)
14246 (arguments
14247 `(#:python ,python-2
14248 #:phases
14249 (modify-phases %standard-phases
14250 ;; check phase needs to be run before the build phase. If not,
14251 ;; coverage-test-runner looks for tests for the built source files,
14252 ;; and fails.
14253 (delete 'check)
14254 (add-before 'build 'check
14255 (lambda _
14256 ;; Disable python3 tests
14257 (substitute* "check"
14258 (("python3") "# python3"))
14259 (zero? (system* "./check")))))))
14260 (native-inputs
14261 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14262 ("python2-pep8" ,python2-pep8)))
14263 (propagated-inputs
14264 `(("python2-pyaml" ,python2-pyaml)))
14265 (home-page "https://liw.fi/cliapp/")
14266 (synopsis "Python framework for command line programs")
14267 (description "@code{python2-cliapp} is a python framework for
14268 command line programs. It contains the typical stuff such programs
14269 need to do, such as parsing the command line for options, and
14270 iterating over input files.")
14271 (license license:gpl2+)))
14272
14273 (define-public python2-ttystatus
14274 (package
14275 (name "python2-ttystatus")
14276 (version "0.35")
14277 (source
14278 (origin
14279 (method url-fetch)
14280 (uri (string-append
14281 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14282 version ".tar.gz"))
14283 (sha256
14284 (base32
14285 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
14286 (build-system python-build-system)
14287 (native-inputs
14288 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14289 ("python2-pep8" ,python2-pep8)))
14290 (arguments
14291 `(#:python ,python-2
14292 #:phases
14293 (modify-phases %standard-phases
14294 ;; check phase needs to be run before the build phase. If not,
14295 ;; coverage-test-runner looks for tests for the built source files,
14296 ;; and fails.
14297 (delete 'check)
14298 (add-before 'build 'check
14299 (lambda _
14300 (zero? (system* "make" "check")))))))
14301 (home-page "https://liw.fi/ttystatus/")
14302 (synopsis "Python library for showing progress reporting and
14303 status updates on terminals")
14304 (description "@code{python2-ttystatus} is a python library for
14305 showing progress reporting and status updates on terminals, for
14306 command line programs. Output is automatically adapted to the width
14307 of the terminal: truncated if it does not fit, and resized if the
14308 terminal size changes.")
14309 (license license:gpl3+)))
14310
14311 (define-public python2-tracing
14312 (package
14313 (name "python2-tracing")
14314 (version "0.10")
14315 (source
14316 (origin
14317 (method url-fetch)
14318 (uri (string-append
14319 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14320 version ".tar.gz"))
14321 (sha256
14322 (base32
14323 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14324 (build-system python-build-system)
14325 (arguments
14326 `(#:python ,python-2))
14327 (home-page "https://liw.fi/tracing/")
14328 (synopsis "Python debug logging helper")
14329 (description "@code{python2-tracing} is a python library for
14330 logging debug messages. It provides a way to turn debugging messages
14331 on and off, based on the filename they occur in. It is much faster
14332 than using @code{logging.Filter} to accomplish the same thing, which
14333 matters when code is run in production mode. The actual logging still
14334 happens using the @code{logging} library.")
14335 (license license:gpl3+)))
14336
14337 (define-public python2-larch
14338 (package
14339 (name "python2-larch")
14340 (version "1.20151025")
14341 (source
14342 (origin
14343 (method url-fetch)
14344 (uri (string-append
14345 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14346 version ".tar.gz"))
14347 (patches (search-patches
14348 "python2-larch-coverage-4.0a6-compatibility.patch"))
14349 (sha256
14350 (base32
14351 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14352 (build-system python-build-system)
14353 (arguments
14354 `(#:python ,python-2
14355 #:phases
14356 (modify-phases %standard-phases
14357 ;; check phase needs to be run before the build phase. If not,
14358 ;; coverage-test-runner looks for tests for the built source files,
14359 ;; and fails.
14360 (delete 'check)
14361 (add-before 'build 'check
14362 (lambda _
14363 (zero? (system* "make" "check")))))))
14364 (native-inputs
14365 `(("cmdtest" ,cmdtest)
14366 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14367 (propagated-inputs
14368 `(("python2-tracing" ,python2-tracing)))
14369 (home-page "https://liw.fi/larch/")
14370 (synopsis "Python copy-on-write B-tree library")
14371 (description "@code{python2-larch} is an implementation of
14372 particular kind of B-tree, based on research by Ohad Rodeh. See
14373 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14374 on the data structure.
14375
14376 The distinctive feature of this B-tree is that a node is never
14377 (conceptually) modified. Instead, all updates are done by
14378 copy-on-write. This makes it easy to clone a tree, and modify only the
14379 clone, while other processes access the original tree.")
14380 (license license:gpl3+)))
14381
14382 (define-public python-htmlmin
14383 (package
14384 (name "python-htmlmin")
14385 (version "0.1.10")
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "htmlmin" version))
14390 (sha256
14391 (base32
14392 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14393 (arguments
14394 `(#:tests? #f)) ;htmlmin has no tests
14395 (build-system python-build-system)
14396 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14397 (synopsis "HTML minifier")
14398 (description "@code{htmlmin} is an HTML minifier that just works.
14399 It comes with safe defaults and easily configurable options.")
14400 (license license:bsd-3)))
14401
14402 (define-public python2-htmlmin
14403 (package-with-python2 python-htmlmin))
14404
14405 (define-public python-flask-htmlmin
14406 (package
14407 (name "python-flask-htmlmin")
14408 (version "1.2")
14409 (source
14410 (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "Flask-HTMLmin" version))
14413 (sha256
14414 (base32
14415 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14416 (propagated-inputs
14417 `(("python-flask" ,python-flask)
14418 ("python-htmlmin" ,python-htmlmin)))
14419 (build-system python-build-system)
14420 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14421 (synopsis "HTML response minifier for Flask")
14422 (description
14423 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14424 (license license:bsd-3)))
14425
14426 (define-public python2-flask-htmlmin
14427 (package-with-python2 python-flask-htmlmin))
14428
14429 (define-public python-flask-login
14430 (package
14431 (name "python-flask-login")
14432 (version "0.4.0")
14433 (source
14434 (origin
14435 (method url-fetch)
14436 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14437 version ".tar.gz"))
14438 (file-name (string-append name "-" version ".tar.gz"))
14439 (sha256
14440 (base32
14441 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14442 (arguments
14443 ;; Tests fail PEP8 compliance. See:
14444 ;; https://github.com/maxcountryman/flask-login/issues/340
14445 `(#:tests? #f))
14446 (build-system python-build-system)
14447 (home-page "https://github.com/maxcountryman/flask-login")
14448 (synopsis "User session management for Flask")
14449 (description
14450 "@code{Flask-Login} provides user session management for Flask. It
14451 handles the common tasks of logging in, logging out, and remembering your
14452 users' sessions over extended periods of time.")
14453 (license license:expat)))
14454
14455 (define-public python2-flask-login
14456 (package-with-python2 python-flask-login))
14457
14458 (define-public python-astroid
14459 (package
14460 (name "python-astroid")
14461 (version "1.5.3")
14462 (source
14463 (origin
14464 (method url-fetch)
14465 (uri (string-append
14466 "https://github.com/PyCQA/astroid/archive/astroid-"
14467 version ".tar.gz"))
14468 (sha256
14469 (base32
14470 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14471 (build-system python-build-system)
14472 (propagated-inputs
14473 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14474 ("python-six" ,python-six)
14475 ("python-wrapt" ,python-wrapt)))
14476 (arguments
14477 `(#:phases
14478 (modify-phases %standard-phases
14479 (replace 'check
14480 (lambda _
14481 (zero? (system* "python" "-m" "unittest" "discover"
14482 "-p" "unittest*.py")))))))
14483 (home-page "https://github.com/PyCQA/astroid")
14484 (synopsis "Common base representation of python source code for pylint and
14485 other projects")
14486 (description "@code{python-astroid} provides a common base representation
14487 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14488
14489 It provides a compatible representation which comes from the _ast module. It
14490 rebuilds the tree generated by the builtin _ast module by recursively walking
14491 down the AST and building an extended ast. The new node classes have
14492 additional methods and attributes for different usages. They include some
14493 support for static inference and local name scopes. Furthermore, astroid
14494 builds partial trees by inspecting living objects.")
14495 (license license:lgpl2.1+)
14496 (properties `((python2-variant . ,(delay python2-astroid))))))
14497
14498 (define-public python2-astroid
14499 (let ((base (package-with-python2
14500 (strip-python2-variant python-astroid))))
14501 (package (inherit base)
14502 (propagated-inputs
14503 `(("python2-backports-functools-lru-cache"
14504 ,python2-backports-functools-lru-cache)
14505 ("python2-enum34" ,python2-enum34)
14506 ("python2-singledispatch" ,python2-singledispatch)
14507 ,@(package-propagated-inputs base))))))
14508
14509 (define-public python-isort
14510 (package
14511 (name "python-isort")
14512 (version "4.2.5")
14513 (source
14514 (origin
14515 (method url-fetch)
14516 (uri (string-append
14517 "https://github.com/timothycrosley/isort/archive/"
14518 version ".tar.gz"))
14519 (file-name (string-append name "-" version ".tar.gz"))
14520 (sha256
14521 (base32
14522 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14523 (build-system python-build-system)
14524 (native-inputs
14525 `(("python-mock" ,python-mock)
14526 ("python-pytest" ,python-pytest)))
14527 (home-page "https://github.com/timothycrosley/isort")
14528 (synopsis "Python utility/library to sort python imports")
14529 (description "@code{python-isort} is a python utility/library to sort
14530 imports alphabetically, and automatically separated into sections. It
14531 provides a command line utility, a python library and plugins for various
14532 editors.")
14533 (license license:expat)))
14534
14535 (define-public python2-isort
14536 (package-with-python2 python-isort))
14537
14538 (define-public python2-backports-functools-lru-cache
14539 (package
14540 (name "python2-backports-functools-lru-cache")
14541 (version "1.3")
14542 (source
14543 (origin
14544 (method url-fetch)
14545 ;; only the pypi tarballs contain the necessary metadata
14546 (uri (pypi-uri "backports.functools_lru_cache" version))
14547 (sha256
14548 (base32
14549 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14550 (build-system python-build-system)
14551 (native-inputs
14552 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14553 (arguments
14554 `(#:python ,python-2))
14555 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14556 (synopsis "Backport of functools.lru_cache from Python 3.3")
14557 (description "@code{python2-backports-functools-lru-cache} is a backport
14558 of @code{functools.lru_cache} from python 3.3.")
14559 (license license:expat)))
14560
14561 (define-public python-configparser
14562 (package
14563 (name "python-configparser")
14564 (version "3.5.0")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (string-append
14569 "https://bitbucket.org/ambv/configparser/get/"
14570 version ".tar.bz2"))
14571 (file-name (string-append name "-" version ".tar.gz"))
14572 (sha256
14573 (base32
14574 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14575 (build-system python-build-system)
14576 (home-page "http://docs.python.org/py3k/library/configparser.html")
14577 (synopsis "Backport of configparser from python 3.5")
14578 (description "@code{python-configparser} is a backport of
14579 @code{configparser} from Python 3.5 so that it can be used directly
14580 in other versions.")
14581 (license license:expat)))
14582
14583 (define-public python2-configparser
14584 (package-with-python2 python-configparser))
14585
14586 (define-public python2-coverage-test-runner
14587 (package
14588 (name "python2-coverage-test-runner")
14589 (version "1.11")
14590 (source
14591 (origin
14592 (method url-fetch)
14593 (uri (string-append
14594 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14595 "coverage-test-runner/snapshot/coverage-test-runner-"
14596 version ".tar.gz"))
14597 (sha256
14598 (base32
14599 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14600 (build-system python-build-system)
14601 (arguments
14602 `(#:python ,python-2
14603 #:phases
14604 (modify-phases %standard-phases
14605 (replace 'check
14606 (lambda _
14607 (zero? (system* "./testrun")))))))
14608 (propagated-inputs
14609 `(("python2-coverage" ,python2-coverage)))
14610 (home-page "https://liw.fi/coverage-test-runner/")
14611 (synopsis "Python module for running unit tests")
14612 (description "@code{CoverageTestRunner} is a python module for running
14613 unit tests and failing them if the unit test module does not exercise all
14614 statements in the module it tests.")
14615 (license license:gpl3+)))
14616
14617 (define-public python-pylint
14618 (package
14619 (name "python-pylint")
14620 (version "1.7.2")
14621 (source
14622 (origin
14623 (method url-fetch)
14624 (uri (string-append
14625 "https://github.com/PyCQA/pylint/archive/pylint-"
14626 version ".tar.gz"))
14627 (sha256
14628 (base32
14629 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14630 (build-system python-build-system)
14631 (native-inputs
14632 `(("python-pytest" ,python-pytest)
14633 ("python-pytest-runner" ,python-pytest-runner)
14634 ("python-tox" ,python-tox)))
14635 (propagated-inputs
14636 `(("python-astroid" ,python-astroid)
14637 ("python-isort" ,python-isort)
14638 ("python-mccabe" ,python-mccabe)
14639 ("python-six" ,python-six)))
14640 (arguments
14641 `(#:phases
14642 (modify-phases %standard-phases
14643 (replace 'check
14644 (lambda _
14645 ;; Somehow, tests for python2-pylint
14646 ;; fail if run from the build directory
14647 (let ((work "/tmp/work"))
14648 (mkdir-p work)
14649 (setenv "PYTHONPATH"
14650 (string-append (getenv "PYTHONPATH") ":" work))
14651 (copy-recursively "." work)
14652 (with-directory-excursion "/tmp"
14653 (zero? (system* "python" "-m" "unittest" "discover"
14654 "-s" (string-append work "/pylint/test")
14655 "-p" "*test_*.py")))))))))
14656 (home-page "https://github.com/PyCQA/pylint")
14657 (synopsis "Python source code analyzer which looks for coding standard
14658 errors")
14659 (description "Pylint is a Python source code analyzer which looks
14660 for programming errors, helps enforcing a coding standard and sniffs
14661 for some code smells (as defined in Martin Fowler's Refactoring book).
14662
14663 Pylint has many rules enabled by default, way too much to silence them
14664 all on a minimally sized program. It's highly configurable and handle
14665 pragmas to control it from within your code. Additionally, it is
14666 possible to write plugins to add your own checks.")
14667 (properties `((python2-variant . ,(delay python2-pylint))))
14668 (license license:gpl2+)))
14669
14670 (define-public python2-pylint
14671 (let ((pylint (package-with-python2
14672 (strip-python2-variant python-pylint))))
14673 (package (inherit pylint)
14674 (propagated-inputs
14675 `(("python2-backports-functools-lru-cache"
14676 ,python2-backports-functools-lru-cache)
14677 ("python2-configparser" ,python2-configparser)
14678 ,@(package-propagated-inputs pylint))))))
14679
14680 (define-public python-paramunittest
14681 (package
14682 (name "python-paramunittest")
14683 (version "0.2")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "ParamUnittest" version))
14688 (sha256
14689 (base32
14690 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14691 (build-system python-build-system)
14692 (home-page
14693 "https://github.com/rik0/ParamUnittest")
14694 (synopsis
14695 "Simple extension to have parametrized unit tests")
14696 (description
14697 "This package allows to create parametrized unit-tests that work with the standard
14698 unittest package. A parametrized test case is automatically converted to multiple test
14699 cases. Since they are TestCase subclasses, they work with other test suites that
14700 recognize TestCases.")
14701 (license license:bsd-2)))
14702
14703 (define-public python2-python-paramunittest
14704 (package-with-python2 python-paramunittest))
14705
14706 (define-public python-mando
14707 (package
14708 (name "python-mando")
14709 (version "0.5")
14710 (source
14711 (origin
14712 (method url-fetch)
14713 (uri (pypi-uri "mando" version))
14714 (sha256
14715 (base32
14716 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14717 (build-system python-build-system)
14718 (propagated-inputs
14719 `(("python-rst2ansi" ,python-rst2ansi)))
14720 (native-inputs
14721 `(("python-sphinx" ,python-sphinx-1.5.3)
14722 ("python-paramunittest" ,python-paramunittest)))
14723 (home-page "https://mando.readthedocs.org/")
14724 (synopsis
14725 "Wrapper around argparse, allowing creation of complete CLI applications")
14726 (description
14727 "This package is a wrapper around argparse, allowing you to write complete CLI
14728 applications in seconds while maintaining all the flexibility.")
14729 (license license:expat)))
14730
14731 (define-public python2-mando
14732 (package-with-python2 python-mando))
14733
14734 (define-public python-mando-0.3.1
14735 ;; python-radon (version 1.5.0) has a requirement
14736 ;; for mando<0.4,>=0.3
14737 (package
14738 (inherit python-mando)
14739 (name "python-mando")
14740 (version "0.3.1")
14741 (source
14742 (origin
14743 (method url-fetch)
14744 (uri (string-append "https://github.com/rubik/mando/archive/v"
14745 version
14746 ".tar.gz"))
14747 (sha256
14748 (base32
14749 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14750
14751 (define-public python-fudge
14752 (package
14753 (name "python-fudge")
14754 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14755 ;; package, which is currently the only use of this package.
14756 (version "0.9.6")
14757 (source
14758 (origin
14759 (method url-fetch)
14760 (uri (pypi-uri "fudge" version))
14761 (sha256
14762 (base32
14763 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14764 (build-system python-build-system)
14765 (arguments
14766 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14767 (home-page "https://github.com/fudge-py/fudge")
14768 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14769 (description
14770 "Fudge is a Python module for using fake objects (mocks and stubs) to
14771 test real ones.
14772
14773 In readable Python code, you declare the methods available on your fake object
14774 and how they should be called. Then you inject that into your application and
14775 start testing. This declarative approach means you don’t have to record and
14776 playback actions and you don’t have to inspect your fakes after running code.
14777 If the fake object was used incorrectly then you’ll see an informative
14778 exception message with a traceback that points to the culprit.")
14779 (license license:expat)))
14780
14781 (define-public python2-fudge
14782 (package-with-python2 python-fudge))
14783
14784 (define-public python-oauth2client
14785 (package
14786 (name "python-oauth2client")
14787 (version "4.0.0")
14788 (source
14789 (origin
14790 (method url-fetch)
14791 (uri (pypi-uri "oauth2client" version))
14792 (sha256
14793 (base32
14794 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14795 (build-system python-build-system)
14796 (arguments
14797 `(#:tests? #f))
14798 (propagated-inputs
14799 `(("python-httplib2" ,python-httplib2)
14800 ("python-pyasn1" ,python-pyasn1)
14801 ("python-pyasn1-modules" ,python-pyasn1-modules)
14802 ("python-rsa" ,python-rsa)
14803 ("python-six" ,python-six)))
14804 (home-page "http://github.com/google/oauth2client/")
14805 (synopsis "OAuth 2.0 client library")
14806 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14807 library for Python")
14808 (license license:asl2.0)))
14809
14810 (define-public python-flask-oidc
14811 (package
14812 (name "python-flask-oidc")
14813 (version "1.1.1")
14814 (source
14815 (origin
14816 (method url-fetch)
14817 (uri (pypi-uri "flask-oidc" version))
14818 (sha256
14819 (base32
14820 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14821 (build-system python-build-system)
14822 (propagated-inputs
14823 `(("python-flask" ,python-flask)
14824 ("python-itsdangerous" ,python-itsdangerous)
14825 ("python-oauth2client" ,python-oauth2client)
14826 ("python-six" ,python-six)))
14827 (native-inputs
14828 `(("python-nose" ,python-nose)
14829 ("python-mock" ,python-mock)))
14830 (home-page "https://github.com/puiterwijk/flask-oidc")
14831 (synopsis "OpenID Connect extension for Flask")
14832 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14833 for Flask.")
14834 (license license:bsd-2)))
14835
14836 (define-public python-mwclient
14837 (package
14838 (name "python-mwclient")
14839 (version "0.8.4")
14840 (source
14841 (origin
14842 (method url-fetch)
14843 ;; The PyPI version wouldn't contain tests.
14844 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14845 "v" version ".tar.gz"))
14846 (sha256
14847 (base32
14848 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14849 (build-system python-build-system)
14850 (propagated-inputs
14851 `(("python-requests" ,python-requests)
14852 ("python-requests-oauthlib"
14853 ,python-requests-oauthlib)
14854 ("python-six" ,python-six)))
14855 (native-inputs
14856 `(("python-mock" ,python-mock)
14857 ("python-pytest" ,python-pytest)
14858 ("python-pytest-pep8" ,python-pytest-pep8)
14859 ("python-pytest-cache" ,python-pytest-cache)
14860 ("python-pytest-cov" ,python-pytest-cov)
14861 ("python-responses" ,python-responses)))
14862 (home-page "https://github.com/btongminh/mwclient")
14863 (synopsis "MediaWiki API client")
14864 (description "This package provides a MediaWiki API client.")
14865 (license license:expat)))
14866
14867 (define-public python2-mwclient
14868 (package-with-python2 python-mwclient))
14869
14870 (define-public python-pytest-warnings
14871 (package
14872 (name "python-pytest-warnings")
14873 (version "0.2.0")
14874 (source
14875 (origin
14876 (method url-fetch)
14877 (uri (pypi-uri "pytest-warnings" version))
14878 (sha256
14879 (base32
14880 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14881 (build-system python-build-system)
14882 (propagated-inputs
14883 `(("pytest" ,python-pytest-3.0)))
14884 (home-page "https://github.com/fschulze/pytest-warnings")
14885 (synopsis "Pytest plugin to list Python warnings in pytest report")
14886 (description
14887 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14888 pytest report.")
14889 (license license:expat)))
14890
14891 (define-public python2-pytest-warnings
14892 (package-with-python2 python-pytest-warnings))
14893
14894 (define-public python-pytest-capturelog
14895 (package
14896 (name "python-pytest-capturelog")
14897 (version "0.7")
14898 (source
14899 (origin
14900 (method url-fetch)
14901 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14902 (sha256
14903 (base32
14904 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14905 (build-system python-build-system)
14906 (propagated-inputs
14907 `(("pytest" ,python-pytest-3.0)))
14908 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14909 (synopsis "Pytest plugin to catch log messages")
14910 (description
14911 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14912 (license license:expat)))
14913
14914 (define-public python2-pytest-capturelog
14915 (package-with-python2 python-pytest-capturelog))
14916
14917 (define-public python-pytest-catchlog
14918 (package
14919 (name "python-pytest-catchlog")
14920 (version "1.2.2")
14921 (source
14922 (origin
14923 (method url-fetch)
14924 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14925 (sha256
14926 (base32
14927 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14928 (build-system python-build-system)
14929 (native-inputs
14930 `(("unzip" ,unzip)))
14931 (propagated-inputs
14932 `(("pytest" ,python-pytest-3.0)))
14933 (home-page "https://github.com/eisensheng/pytest-catchlog")
14934 (synopsis "Pytest plugin to catch log messages")
14935 (description
14936 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14937 a fork of pytest-capturelog.")
14938 (license license:expat)))
14939
14940 (define-public python2-pytest-catchlog
14941 (package-with-python2 python-pytest-catchlog))
14942
14943 (define-public python-utils
14944 (package
14945 (name "python-utils")
14946 (version "2.1.0")
14947 (source (origin
14948 (method url-fetch)
14949 (uri (pypi-uri "python-utils" version))
14950 (sha256
14951 (base32
14952 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14953 (build-system python-build-system)
14954 (native-inputs
14955 `(("pytest-runner" ,python-pytest-runner)
14956 ("pytest" ,python-pytest)
14957 ("six" ,python-six)))
14958 (home-page "https://github.com/WoLpH/python-utils")
14959 (synopsis "Convenient utilities not included with the standard Python install")
14960 (description
14961 "Python Utils is a collection of small Python functions and classes which
14962 make common patterns shorter and easier.")
14963 (license license:bsd-2)))
14964
14965 (define-public python2-utils
14966 (package-with-python2 python-utils))
14967
14968 (define-public python-webassets
14969 (package
14970 (name "python-webassets")
14971 (version "0.12.1")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "webassets" version))
14976 (sha256
14977 (base32
14978 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14979 (build-system python-build-system)
14980 (native-inputs
14981 `(("python-jinja2" ,python-jinja2)
14982 ("python-mock" ,python-mock)
14983 ("python-nose" ,python-nose)
14984 ("python-pytest" ,python-pytest)))
14985 (home-page "https://github.com/miracle2k/webassets")
14986 (synopsis "Media asset management")
14987 (description "Merges, minifies and compresses Javascript and CSS files,
14988 supporting a variety of different filters, including YUI, jsmin, jspacker or
14989 CSS tidy. Also supports URL rewriting in CSS files.")
14990 (license license:bsd-2)))
14991
14992 (define-public python-sphinx-me
14993 (package
14994 (name "python-sphinx-me")
14995 (version "0.3")
14996 (source
14997 (origin
14998 (method url-fetch)
14999 (uri (pypi-uri "sphinx-me" version))
15000 (sha256
15001 (base32
15002 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
15003 (build-system python-build-system)
15004 (home-page "https://github.com/stephenmcd/sphinx-me")
15005 (synopsis "Create a Sphinx documentation shell")
15006 (description
15007 "Create a Sphinx documentation shell for your project and include the
15008 README file as the documentation index. It handles extracting the required
15009 meta data such as the project name, author and version from your project for
15010 use in your Sphinx docs.")
15011 (license license:bsd-2)))
15012
15013 (define-public python2-sphinx-me
15014 (package-with-python2 python-sphinx-me))
15015
15016 (define-public python-cssmin
15017 (package
15018 (name "python-cssmin")
15019 (version "0.2.0")
15020 (source
15021 (origin
15022 (method url-fetch)
15023 (uri (pypi-uri "cssmin" version))
15024 (sha256
15025 (base32
15026 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
15027 (build-system python-build-system)
15028 (home-page "https://github.com/zacharyvoase/cssmin")
15029 (synopsis "Python port of the YUI CSS Compressor")
15030 (description "Python port of the YUI CSS Compressor.")
15031 (license (list license:expat license:bsd-3))))
15032
15033 (define-public python2-cssmin
15034 (package-with-python2 python-cssmin))
15035
15036 (define-public python-diff-match-patch
15037 (package
15038 (name "python-diff-match-patch")
15039 (version "20121119")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (pypi-uri "diff-match-patch" version))
15044 (sha256
15045 (base32
15046 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15047 (build-system python-build-system)
15048 (home-page "https://code.google.com/p/google-diff-match-patch")
15049 (synopsis "Synchronize plain text")
15050 (description "Diff Match and Patch libraries offer robust algorithms to
15051 perform the operations required for synchronizing plain text.")
15052 (license license:asl2.0)))
15053
15054 (define-public python2-diff-match-patch
15055 (package-with-python2 python-diff-match-patch))
15056
15057 (define-public python-dirsync
15058 (package
15059 (name "python-dirsync")
15060 (version "2.2.2")
15061 (source
15062 (origin
15063 (method url-fetch)
15064 (uri (pypi-uri "dirsync" version ".zip"))
15065 (sha256
15066 (base32
15067 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
15068 (build-system python-build-system)
15069 (native-inputs
15070 `(("unzip" ,unzip)))
15071 (propagated-inputs
15072 `(("six" ,python-six)))
15073 (home-page "https://bitbucket.org/tkhyn/dirsync")
15074 (synopsis "Advanced directory tree synchronisation tool")
15075 (description "Advanced directory tree synchronisation tool.")
15076 (license license:expat)))
15077
15078 (define-public python2-dirsync
15079 (package-with-python2 python-dirsync))
15080
15081 (define-public python-nosexcover
15082 (package
15083 (name "python-nosexcover")
15084 (version "1.0.11")
15085 (source (origin
15086 (method url-fetch)
15087 (uri (pypi-uri "nosexcover" version))
15088 (sha256
15089 (base32
15090 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
15091 (build-system python-build-system)
15092 (propagated-inputs
15093 `(("python-coverage" ,python-coverage)
15094 ("python-nose" ,python-nose)))
15095 (home-page "http://github.com/cmheisel/nose-xcover")
15096 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
15097 (description "Nose-xcover is a companion to the built-in
15098 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
15099 to a file named coverage.xml.
15100
15101 It will honor all the options you pass to the Nose coverage plugin,
15102 especially -cover-package.")
15103 (license license:expat)))
15104
15105 (define-public python2-nosexcover
15106 (package-with-python2 python-nosexcover))
15107
15108 (define-public python-elasticsearch
15109 (package
15110 (name "python-elasticsearch")
15111 (version "1.0.0")
15112 (source
15113 (origin
15114 (method url-fetch)
15115 (uri (pypi-uri "elasticsearch" version))
15116 (sha256
15117 (base32
15118 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
15119 (build-system python-build-system)
15120 (native-inputs
15121 `(("python-mock" ,python-mock)
15122 ("python-nosexcover" ,python-nosexcover)
15123 ("python-pyaml" ,python-pyaml)
15124 ("python-requests" ,python-requests)))
15125 (propagated-inputs
15126 `(("urllib3" ,python-urllib3)))
15127 (arguments
15128 ;; tests require the test_elasticsearch module but it is not distributed.
15129 `(#:tests? #f))
15130 (home-page "https://github.com/elastic/elasticsearch-py")
15131 (synopsis "Low-level client for Elasticsearch")
15132 (description "Official low-level client for Elasticsearch. Its goal is to
15133 provide common ground for all Elasticsearch-related code in Python; because of
15134 this it tries to be opinion-free and very extendable.")
15135 (license license:expat)))
15136
15137 (define-public python2-elasticsearch
15138 (package-with-python2 python-elasticsearch))
15139
15140 (define-public python-levenshtein
15141 (package
15142 (name "python-levenshtein")
15143 (version "0.12.0")
15144 (source
15145 (origin
15146 (method url-fetch)
15147 (uri (pypi-uri "python-Levenshtein" version))
15148 (sha256
15149 (base32
15150 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15151 (build-system python-build-system)
15152 (home-page "https://github.com/ztane/python-Levenshtein")
15153 (synopsis "Fast computation of Levenshtein distance and string similarity")
15154 (description
15155 "The Levenshtein Python C extension module contains functions for fast computation of
15156 @enumerate
15157 @item Levenshtein (edit) distance, and edit operations
15158 @item string similarity
15159 @item approximate median strings, and generally string averaging
15160 @item string sequence and set similarity
15161 @end enumerate
15162 It supports both normal and Unicode strings.")
15163 (license license:gpl2+)))
15164
15165 (define-public python2-levenshtein
15166 (package-with-python2 python-levenshtein))
15167
15168 (define-public python-scandir
15169 (package
15170 (name "python-scandir")
15171 (version "1.4")
15172 (source
15173 (origin
15174 (method url-fetch)
15175 (uri (pypi-uri "scandir" version))
15176 (sha256
15177 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
15178 (build-system python-build-system)
15179 (home-page "https://github.com/benhoyt/scandir")
15180 (synopsis "Directory iteration function")
15181 (description
15182 "Directory iteration function like os.listdir(), except that instead of
15183 returning a list of bare filenames, it yields DirEntry objects that include
15184 file type and stat information along with the name. Using scandir() increases
15185 the speed of os.walk() by 2-20 times (depending on the platform and file
15186 system) by avoiding unnecessary calls to os.stat() in most cases.")
15187 (license license:bsd-3)))
15188
15189 (define-public python2-scandir
15190 (package-with-python2 python-scandir))
15191
15192 (define-public python2-stemming
15193 (package
15194 (name "python2-stemming")
15195 (version "1.0.1")
15196 (source
15197 (origin
15198 (method url-fetch)
15199 (uri (pypi-uri "stemming" version))
15200 (sha256
15201 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15202 (build-system python-build-system)
15203 (arguments
15204 `(#:python ,python-2))
15205 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15206 (synopsis "Python implementations of various stemming algorithms")
15207 (description
15208 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15209 stemming algorithms for English. These implementations are straightforward and
15210 efficient, unlike some Python versions of the same algorithms available on the
15211 Web. This package is an extraction of the stemming code included in the Whoosh
15212 search engine.")
15213 (license license:public-domain)))
15214
15215 (define-public python-factory-boy
15216 (package
15217 (name "python-factory-boy")
15218 (version "2.8.1")
15219 (source
15220 (origin
15221 (method url-fetch)
15222 (uri (pypi-uri "factory_boy" version))
15223 (sha256
15224 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15225 (build-system python-build-system)
15226 (arguments
15227 ;; Tests are not included in the tarball.
15228 `(#:tests? #f))
15229 (propagated-inputs
15230 `(("faker" ,python-faker)))
15231 (home-page "https://github.com/benhoyt/scandir")
15232 (synopsis "Versatile test fixtures replacement")
15233 (description
15234 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15235
15236 As a fixtures replacement tool, it aims to replace static, hard to maintain
15237 fixtures with easy-to-use factories for complex object.
15238
15239 Instead of building an exhaustive test setup with every possible combination
15240 of corner cases, factory_boy allows you to use objects customized for the
15241 current test, while only declaring the test-specific fields")
15242 (license license:expat)))
15243
15244 (define-public python2-factory-boy
15245 (package-with-python2 python-factory-boy))
15246
15247 (define-public python-translate-toolkit
15248 (package
15249 (name "python-translate-toolkit")
15250 (version "2.1.0")
15251 (source
15252 (origin
15253 (method url-fetch)
15254 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15255 (sha256
15256 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15257 (build-system python-build-system)
15258 (native-inputs
15259 `(("python-pytest" ,python-pytest)
15260 ("python-sphinx" ,python-sphinx)))
15261 (propagated-inputs
15262 `(("python-babel" ,python-babel)
15263 ("python-beautifulsoup4" ,python-beautifulsoup4)
15264 ("python-chardet" ,python-chardet)
15265 ("python-diff-match-patch" ,python-diff-match-patch)
15266 ("python-levenshtein" ,python-levenshtein)
15267 ("python-lxml" ,python-lxml)
15268 ("python-six" ,python-six)
15269 ("python-vobject" ,python-vobject)
15270 ("python-pyyaml" ,python-pyyaml)))
15271 (arguments
15272 ;; TODO: tests are not run, because they end with
15273 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15274 ;; 'parse_funcs'
15275 ;; during test setup.
15276 `(#:tests? #f))
15277 (home-page "http://toolkit.translatehouse.org")
15278 (synopsis "Tools and API for translation and localization engineering")
15279 (description
15280 "Tools and API for translation and localization engineering. It contains
15281 several utilities, as well as an API for building localization tools.")
15282 (license license:gpl2+)))
15283
15284 (define-public python2-translate-toolkit
15285 (package-with-python2 python-translate-toolkit))
15286
15287 (define-public python-mysqlclient
15288 (package
15289 (name "python-mysqlclient")
15290 (version "1.3.10")
15291 (source
15292 (origin
15293 (method url-fetch)
15294 (uri (pypi-uri "mysqlclient" version))
15295 (sha256
15296 (base32
15297 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
15298 (build-system python-build-system)
15299 (native-inputs
15300 `(("mariadb" ,mariadb)
15301 ("nose" ,python-nose)
15302 ("mock" ,python-mock)
15303 ("py.test" ,python-pytest)))
15304 (inputs
15305 `(("mysql" ,mysql)
15306 ("libz" ,zlib)
15307 ("openssl" ,openssl)))
15308 (home-page "https://github.com/PyMySQL/mysqlclient-python")
15309 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
15310 (description "MySQLdb is an interface to the popular MySQL database server
15311 for Python. The design goals are:
15312 @enumerate
15313 @item Compliance with Python database API version 2.0 [PEP-0249],
15314 @item Thread-safety,
15315 @item Thread-friendliness (threads will not block each other).
15316 @end enumerate")
15317 (license license:gpl2)))
15318
15319 (define-public python2-mysqlclient
15320 (package-with-python2 python-mysqlclient))
15321
15322 (define-public python-hiredis
15323 (package
15324 (name "python-hiredis")
15325 (version "0.2.0")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "hiredis" version))
15330 (sha256
15331 (base32
15332 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
15333 (build-system python-build-system)
15334 (arguments
15335 ;; no tests
15336 `(#:tests? #f))
15337 (home-page "https://github.com/redis/hiredis-py")
15338 (synopsis "Python extension that wraps protocol parsing code in hiredis")
15339 (description "Python-hiredis is a python extension that wraps protocol
15340 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
15341 (license license:bsd-3)))
15342
15343 (define-public python2-hiredis
15344 (package-with-python2 python-hiredis))
15345
15346 (define-public python-fakeredis
15347 (package
15348 (name "python-fakeredis")
15349 (version "0.8.2")
15350 (source
15351 (origin
15352 (method url-fetch)
15353 (uri (pypi-uri "fakeredis" version))
15354 (sha256
15355 (base32
15356 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15357 (build-system python-build-system)
15358 (arguments
15359 ;; no tests
15360 `(#:tests? #f))
15361 (home-page "https://github.com/jamesls/fakeredis")
15362 (synopsis "Fake implementation of redis API for testing purposes")
15363 (description "Fakeredis is a pure python implementation of the redis-py
15364 python client that simulates talking to a redis server. This was created for a
15365 single purpose: to write unittests. Setting up redis is not hard, but many time
15366 you want to write unittests that do not talk to an external server (such as
15367 redis). This module now allows tests to simply use this module as a reasonable
15368 substitute for redis.")
15369 (license license:bsd-3)))
15370
15371 (define-public python2-fakeredis
15372 (package-with-python2 python-fakeredis))
15373
15374 (define-public python-behave-web-api
15375 (package
15376 (name "python-behave-web-api")
15377 (version "1.0.6")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "behave-web-api" version))
15382 (sha256
15383 (base32
15384 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15385 (build-system python-build-system)
15386 (arguments
15387 `(#:phases
15388 (modify-phases %standard-phases
15389 (add-after 'unpack 'fix-dependencies
15390 (lambda _
15391 (substitute* "setup.py"
15392 (("'wheel'") "") ; We don't use it.
15393 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15394 (propagated-inputs
15395 `(("behave" ,behave)
15396 ("python-requests" ,python-requests)))
15397 (home-page "https://github.com/jefersondaniel/behave-web-api")
15398 (synopsis "Provides testing for JSON APIs with Behave for Python")
15399 (description "This package provides testing utility modules for testing
15400 JSON APIs with Behave.")
15401 (license license:expat)))
15402
15403 (define-public python2-behave-web-api
15404 (package-with-python2 python-behave-web-api))
15405
15406 (define-public python-flask-script
15407 (package
15408 (name "python-flask-script")
15409 (version "2.0.5")
15410 (source
15411 (origin
15412 (method url-fetch)
15413 (uri (pypi-uri "Flask-Script" version))
15414 (sha256
15415 (base32
15416 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15417 (build-system python-build-system)
15418 (propagated-inputs
15419 `(("python-flask" ,python-flask)
15420 ("python-argcomplete" ,python-argcomplete)
15421 ("python-werkzeug" ,python-werkzeug)))
15422 (native-inputs
15423 `(("python-pytest" ,python-pytest)))
15424 (home-page
15425 "http://github.com/smurfix/flask-script")
15426 (synopsis "Scripting support for Flask")
15427 (description "The Flask-Script extension provides support for writing
15428 external scripts in Flask. This includes running a development server,
15429 a customised Python shell, scripts to set up your database, cronjobs,
15430 and other command-line tasks that belong outside the web application
15431 itself.")
15432 (license license:bsd-3)))
15433
15434 (define-public python2-flask-script
15435 (package-with-python2 python-flask-script))
15436
15437 (define-public python-flask-migrate
15438 (package
15439 (name "python-flask-migrate")
15440 (version "2.0.3")
15441 (source
15442 (origin
15443 (method url-fetch)
15444 (uri (pypi-uri "Flask-Migrate" version))
15445 (sha256
15446 (base32
15447 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15448 (build-system python-build-system)
15449 (propagated-inputs
15450 `(("python-flask" ,python-flask)
15451 ("python-alembic" ,python-alembic)
15452 ("python-sqlalchemy" ,python-sqlalchemy)
15453 ("python-flask-script" ,python-flask-script)
15454 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15455 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15456 (synopsis "SQLAlchemy database migrations for Flask programs using
15457 Alembic")
15458 (description "This package contains SQLAlchemy database migration tools
15459 for Flask programs that are using @code{python-alembic}.")
15460 (license license:expat)))
15461
15462 (define-public python2-flask-migrate
15463 (package-with-python2 python-flask-migrate))
15464
15465 (define-public python-packaging
15466 (package
15467 (name "python-packaging")
15468 (version "16.8")
15469 (source
15470 (origin
15471 (method url-fetch)
15472 (uri (pypi-uri "packaging" version))
15473 (sha256
15474 (base32
15475 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15476 (build-system python-build-system)
15477 (native-inputs
15478 `(("python-pretend" ,python-pretend)
15479 ("python-pytest" ,python-pytest)))
15480 (propagated-inputs
15481 `(("python-pyparsing" ,python-pyparsing)
15482 ("python-six" ,python-six)))
15483 (home-page "https://github.com/pypa/packaging")
15484 (synopsis "Core utilities for Python packages")
15485 (description "Packaging is a Python module for dealing with Python packages.
15486 It offers an interface for working with package versions, names, and dependency
15487 information.")
15488 ;; From 'LICENSE': This software is made available under the terms of
15489 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15490 ;; Contributions to this software is made under the terms of *both* these
15491 ;; licenses.
15492 (license (list license:asl2.0 license:bsd-2))))
15493
15494 (define-public python2-packaging
15495 (package-with-python2 python-packaging))
15496
15497 (define-public python-sql
15498 (package
15499 (name "python-sql")
15500 (version "0.9")
15501 (source
15502 (origin
15503 (method url-fetch)
15504 (uri (pypi-uri "python-sql" version))
15505 (sha256
15506 (base32
15507 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15508 (build-system python-build-system)
15509 (home-page "https://python-sql.tryton.org/")
15510 (synopsis "Library to write SQL queries in a pythonic way")
15511 (description "@code{python-sql} is a library to write SQL queries, that
15512 transforms idiomatic python function calls to well-formed SQL queries.")
15513 (license license:bsd-3)))
15514
15515 (define-public python2-sql
15516 (package-with-python2 python-sql))
15517
15518 (define-public python-genshi
15519 (package
15520 (name "python-genshi")
15521 (version "0.7")
15522 (source
15523 (origin
15524 (method url-fetch)
15525 (uri (string-append
15526 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15527 version ".tar.gz"))
15528 (patches
15529 (search-patches
15530 ;; The first 4 patches are in the master branch upstream.
15531 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15532 ;; The last 2 are NOT in any branch.
15533 ;; They were sent as attachments to a ticket opened at
15534 ;; https://genshi.edgewall.org/ticket/602#no1
15535 "python-genshi-stripping-of-unsafe-script-tags.patch"
15536 "python-genshi-disable-speedups-on-python-3.3.patch"
15537 "python-genshi-isstring-helper.patch"
15538 "python-genshi-add-support-for-python-3.4-AST.patch"
15539 "python-genshi-fix-tests-on-python-3.5.patch"
15540 "python-genshi-buildable-on-python-2.7.patch"))
15541 (sha256
15542 (base32
15543 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15544 (build-system python-build-system)
15545 (home-page "https://genshi.edgewall.org/")
15546 (synopsis "Toolkit for generation of output for the web")
15547 (description "Genshi is a Python library that provides an integrated set
15548 of components for parsing, generating, and processing HTML, XML or other
15549 textual content for output generation on the web.")
15550 (license license:bsd-3)))
15551
15552 ;; The linter here claims that patch file names should start with the package
15553 ;; name. But, in this case the patches are inherited from python-genshi with
15554 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15555 (define-public python2-genshi
15556 (package-with-python2 python-genshi))
15557
15558 (define-public python-relatorio
15559 (package
15560 (name "python-relatorio")
15561 (version "0.6.4")
15562 (source
15563 (origin
15564 (method url-fetch)
15565 (uri (pypi-uri "relatorio" version))
15566 (sha256
15567 (base32
15568 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15569 (build-system python-build-system)
15570 (propagated-inputs
15571 `(("python-lxml" ,python-lxml)
15572 ("python-genshi" ,python-genshi)))
15573 (home-page "https://relatorio.tryton.org/")
15574 (synopsis "Templating library able to output ODT and PDF files")
15575 (description "Relatorio is a templating library which provides a way to
15576 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15577 for more filetypes can be easily added by creating plugins for them.")
15578 (license license:gpl3+)))
15579
15580 (define-public python2-relatorio
15581 (package-with-python2 python-relatorio))
15582
15583 (define-public python-radon
15584 (package
15585 (name "python-radon")
15586 (version "1.5.0")
15587 (source
15588 (origin
15589 (method url-fetch)
15590 (uri (pypi-uri "radon" version))
15591 (sha256
15592 (base32
15593 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15594 (build-system python-build-system)
15595 (propagated-inputs
15596 `(("python-colorama" ,python-colorama)
15597 ("python-flake8-polyfill" ,python-flake8-polyfill)
15598 ("python-mando" ,python-mando-0.3.1)))
15599 (native-inputs
15600 `(("python-flake8" ,python-flake8)
15601 ("python-tox" ,python-tox)
15602 ("python-pytest" ,python-pytest)
15603 ("python-paramunittest" ,python-paramunittest)))
15604 (home-page "https://radon.readthedocs.org/")
15605 (synopsis "Code Metrics in Python")
15606 (description "Radon is a Python tool which computes various code metrics.
15607 Supported metrics are:
15608 @itemize @bullet
15609 @item raw metrics: SLOC, comment lines, blank lines, &c.
15610 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15611 @item Halstead metrics (all of them)
15612 @item the Maintainability Index (a Visual Studio metric)
15613 @end itemize")
15614 (license license:expat)))
15615
15616 (define-public python2-radon
15617 (package-with-python2 python-radon))
15618
15619 (define-public python-sure
15620 (package
15621 (name "python-sure")
15622 (version "1.4.6")
15623 (source
15624 (origin
15625 (method url-fetch)
15626 (uri (pypi-uri "sure" version))
15627 (sha256
15628 (base32
15629 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15630 (build-system python-build-system)
15631 (propagated-inputs
15632 `(("python-mock" ,python-mock)
15633 ("python-six" ,python-six)))
15634 (native-inputs
15635 `(("python-nose" ,python-nose)))
15636 (home-page "https://github.com/gabrielfalcao/sure")
15637 (synopsis "Automated testing library in python for python")
15638 (description
15639 "Sure is a python library that leverages a DSL for writing assertions.
15640 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15641 (license license:gpl3+)))
15642
15643 (define-public python2-sure
15644 (package-with-python2 python-sure))
15645
15646 (define-public python2-couleur
15647 ;; This package does not seem to support python3 at all, hence,
15648 ;; only the python2 variant definition is provided.
15649 (package
15650 (name "python2-couleur")
15651 (version "0.6.2")
15652 (source
15653 (origin
15654 (method url-fetch)
15655 (uri (pypi-uri "couleur" version))
15656 (sha256
15657 (base32
15658 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15659 (build-system python-build-system)
15660 (arguments
15661 `(#:python ,python-2))
15662 (home-page "https://github.com/gabrielfalcao/couleur")
15663 (synopsis
15664 "ANSI terminal tool for python, colored shell and other handy fancy features")
15665 (description
15666 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15667 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15668 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15669 ;; https://github.com/gabrielfalcao/couleur/issues/11
15670 (license license:lgpl3+)))
15671
15672 (define-public python-misaka
15673 (package
15674 (name "python-misaka")
15675 (version "2.1.0")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "misaka" version))
15680 (sha256
15681 (base32
15682 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15683 (build-system python-build-system)
15684 (arguments
15685 `(;; Line 37 of setup.py calls self.run_command('develop')
15686 ;; in the 'check' phase. This command seems to be trying
15687 ;; to write to
15688 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15689 ;; for which it does not have the permission to write.
15690 #:tests? #f))
15691 (propagated-inputs
15692 `(("python-cffi" ,python-cffi)))
15693 (home-page "https://github.com/FSX/misaka")
15694 (synopsis "Python binding for Hoedown")
15695 (description
15696 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15697 library written in C. It features a fast HTML renderer and functionality to make custom
15698 renderers (e.g. man pages or LaTeX).")
15699 (license license:expat)))
15700
15701 (define-public python2-misaka
15702 (package-with-python2 python-misaka))
15703
15704 (define-public python2-steadymark
15705 ;; This is forced into being a python2 only variant
15706 ;; due to its dependence on couleur that has no support
15707 ;; for python3
15708 (package
15709 (name "python2-steadymark")
15710 (version "0.7.3")
15711 (source
15712 (origin
15713 (method url-fetch)
15714 (uri (pypi-uri "steadymark" version))
15715 (sha256
15716 (base32
15717 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15718 (build-system python-build-system)
15719 (native-inputs
15720 `(("python-couleur" ,python2-couleur)
15721 ("python-sure" ,python2-sure)
15722 ("python-misaka" ,python2-misaka)))
15723 (arguments
15724 `(#:python ,python-2
15725 #:phases
15726 (modify-phases %standard-phases
15727 (add-before 'build 'patch-setup-py
15728 (lambda _
15729 ;; Update requirements from dependency==version
15730 ;; to dependency>=version
15731 (substitute* "setup.py"
15732 (("==") ">="))
15733 #t)))))
15734 (home-page "https://github.com/gabrielfalcao/steadymark")
15735 (synopsis "Markdown-based test runner for python")
15736 (description
15737 "@code{Steadymark} allows documentation to be written in github-flavoured
15738 markdown. The documentation may contain snippets of code surrounded by python
15739 code blocks and @code{Steadymark} will find these snippets and run them, making
15740 sure that there are no old malfunctional examples in the documentation examples.")
15741 (license license:expat)))
15742
15743 (define-public python-nose-randomly
15744 (package
15745 (name "python-nose-randomly")
15746 (version "1.2.5")
15747 (source
15748 (origin
15749 (method url-fetch)
15750 (uri (pypi-uri "nose-randomly" version))
15751 (sha256
15752 (base32
15753 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15754 (build-system python-build-system)
15755 (native-inputs
15756 `(("python-nose" ,python-nose)
15757 ("python-numpy" ,python-numpy)))
15758 (home-page "https://github.com/adamchainz/nose-randomly")
15759 (synopsis
15760 "Nose plugin to randomly order tests and control random.seed")
15761 (description
15762 "This is a @code{Nose} plugin to randomly order tests which can be quite
15763 powerful in discovering hidden flaws in the tests themselves, while helping to
15764 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15765 by resetting it to a repeatable number for each test, enabling the tests to
15766 create data based on random numbers and yet remain repeatable.")
15767 (license license:bsd-3)))
15768
15769 (define-public python2-nose-randomly
15770 (package-with-python2 python-nose-randomly))
15771
15772 (define-public python-jsonpointer
15773 (package
15774 (name "python-jsonpointer")
15775 (version "1.10")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "jsonpointer" version))
15780 (sha256
15781 (base32
15782 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15783 (build-system python-build-system)
15784 (home-page "https://github.com/stefankoegl/python-json-pointer")
15785 (synopsis "Identify specific nodes in a JSON document")
15786 (description "@code{jsonpointer} allows you to access specific nodes
15787 by path in a JSON document (see RFC 6901).")
15788 (license license:bsd-3)))
15789
15790 (define-public python2-jsonpointer
15791 (package-with-python2 python-jsonpointer))
15792
15793 (define-public python-jsonpatch
15794 (package
15795 (name "python-jsonpatch")
15796 (version "1.16")
15797 (source
15798 (origin
15799 (method url-fetch)
15800 ;; pypi version lacks tests.js
15801 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15802 "archive/v" version ".tar.gz"))
15803 (file-name (string-append name "-" version ".tar.gz"))
15804 (sha256
15805 (base32
15806 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15807 (build-system python-build-system)
15808 (native-inputs
15809 `(("python-jsonpointer" ,python-jsonpointer)))
15810 (home-page "https://github.com/stefankoegl/python-json-patch")
15811 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15812 (description "@code{jsonpatch} is a library and program that allows
15813 applying JSON Patches according to RFC 6902.")
15814 (license license:bsd-3)))
15815
15816 (define-public python2-jsonpatch
15817 (package-with-python2 python-jsonpatch))
15818
15819 (define-public python-jsonpatch-0.4
15820 (package (inherit python-jsonpatch)
15821 (name "python-jsonpatch")
15822 (version "0.4")
15823 (source
15824 (origin
15825 (method url-fetch)
15826 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15827 "archive/v" version ".tar.gz"))
15828 (file-name (string-append name "-" version ".tar.gz"))
15829 (sha256
15830 (base32
15831 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15832
15833 (define-public python2-jsonpatch-0.4
15834 (package-with-python2 python-jsonpatch-0.4))
15835
15836 (define-public python-rfc3987
15837 (package
15838 (name "python-rfc3987")
15839 (version "1.3.7")
15840 (source
15841 (origin
15842 (method url-fetch)
15843 (uri (pypi-uri "rfc3987" version))
15844 (sha256
15845 (base32
15846 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15847 (build-system python-build-system)
15848 (home-page "http://pypi.python.org/pypi/rfc3987")
15849 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15850 (description "@code{rfc3987} provides routines for parsing and
15851 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15852 (license license:gpl3+)))
15853
15854 (define-public python2-rfc3987
15855 (package-with-python2 python-rfc3987))
15856
15857 (define-public python-validate-email
15858 (package
15859 (name "python-validate-email")
15860 (version "1.3")
15861 (source
15862 (origin
15863 (method url-fetch)
15864 (uri (pypi-uri "validate_email" version))
15865 (sha256
15866 (base32
15867 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15868 (build-system python-build-system)
15869 (home-page "http://github.com/syrusakbary/validate_email")
15870 (synopsis "Verifies if an email address is valid and really exists")
15871 (description "@code{validate_email} can be used to verify if an email
15872 address is valid and really exists.")
15873 (license license:lgpl3+)))
15874
15875 (define-public python2-validate-email
15876 (package-with-python2 python-validate-email))
15877
15878 (define-public python-flex
15879 (package
15880 (name "python-flex")
15881 (version "6.10.0")
15882 (source
15883 (origin
15884 (method url-fetch)
15885 (uri (pypi-uri "flex" version))
15886 (sha256
15887 (base32
15888 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15889 (build-system python-build-system)
15890 (propagated-inputs
15891 `(("python-click" ,python-click)
15892 ("python-iso8601" ,python-iso8601)
15893 ("python-jsonpointer" ,python-jsonpointer)
15894 ("python-pyyaml" ,python-pyyaml)
15895 ("python-requests" ,python-requests)
15896 ("python-rfc3987" ,python-rfc3987)
15897 ("python-six" ,python-six)
15898 ("python-validate-email" ,python-validate-email)))
15899 (home-page "https://github.com/pipermerriam/flex")
15900 (synopsis "Validates Swagger schemata")
15901 (description "@code{flex} can be used to validate Swagger schemata.")
15902 (license license:bsd-3)))
15903
15904 (define-public python2-flex
15905 (package-with-python2 python-flex))
15906
15907 (define-public python-marshmallow
15908 (package
15909 (name "python-marshmallow")
15910 (version "3.0.0b3")
15911 (source
15912 (origin
15913 (method url-fetch)
15914 (uri (pypi-uri "marshmallow" version))
15915 (sha256
15916 (base32
15917 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
15918 (build-system python-build-system)
15919 (propagated-inputs
15920 `(("python-dateutil" ,python-dateutil)
15921 ("python-simplejson" ,python-simplejson)))
15922 (native-inputs
15923 `(("python-pytest-3.0" ,python-pytest-3.0)
15924 ("python-pytz" ,python-pytz)))
15925 (home-page "https://github.com/marshmallow-code/marshmallow")
15926 (synopsis "Convert complex datatypes to and from native
15927 Python datatypes.")
15928 (description "@code{marshmallow} provides a library for converting
15929 complex datatypes to and from native Python datatypes.")
15930 (license license:expat)))
15931
15932 (define-public python2-marshmallow
15933 (package-with-python2 python-marshmallow))
15934
15935 (define-public python-bottle
15936 (package
15937 (name "python-bottle")
15938 (version "0.12.13")
15939 (source
15940 (origin
15941 (method url-fetch)
15942 (uri (pypi-uri "bottle" version))
15943 (sha256
15944 (base32
15945 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15946 (build-system python-build-system)
15947 (home-page "http://bottlepy.org/")
15948 (synopsis "WSGI framework for small web-applications.")
15949 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15950 (license license:expat)))
15951
15952 (define-public python2-bottle
15953 (package-with-python2 python-bottle))
15954
15955 (define-public python-apispec
15956 (package
15957 (name "python-apispec")
15958 (version "0.25.3")
15959 (source
15960 (origin
15961 (method url-fetch)
15962 (uri (pypi-uri "apispec" version))
15963 (sha256
15964 (base32
15965 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
15966 (build-system python-build-system)
15967 (propagated-inputs
15968 `(("python-pyyaml" ,python-pyyaml)))
15969 (native-inputs
15970 `(("python-pytest-3.0" ,python-pytest-3.0)
15971 ("python-flask" ,python-flask)
15972 ("python-marshmallow" ,python-marshmallow)
15973 ("python-tornado" ,python-tornado)
15974 ("python-bottle" ,python-bottle)
15975 ("python-mock" ,python-mock)))
15976 (home-page "https://github.com/marshmallow-code/apispec")
15977 (synopsis "Swagger 2.0 API specification generator")
15978 (description "@code{python-apispec} is a pluggable API specification
15979 generator. Currently supports the OpenAPI specification (f.k.a.
15980 Swagger 2.0).")
15981 (license license:expat)))
15982
15983 (define-public python2-apispec
15984 (package-with-python2 python-apispec))
15985
15986 (define-public python-flasgger
15987 (package
15988 (name "python-flasgger")
15989 (version "0.6.3")
15990 (source
15991 (origin
15992 (method url-fetch)
15993 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15994 version ".tar.gz"))
15995 (file-name (string-append name "-" version ".tar.gz"))
15996 (sha256
15997 (base32
15998 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15999 (build-system python-build-system)
16000 (arguments
16001 `(#:phases
16002 (modify-phases %standard-phases
16003 (replace 'check
16004 (lambda* (#:key inputs outputs #:allow-other-keys)
16005 (substitute* "Makefile"
16006 (("flake8 flasgger --ignore=F403")
16007 "flake8 flasgger --ignore=E731,F403"))
16008 (setenv "PYTHONPATH" (string-append (getcwd)
16009 ":"
16010 (getenv "PYTHONPATH")))
16011 (zero? (system* "py.test")))))))
16012 (propagated-inputs
16013 `(("python-flask" ,python-flask)
16014 ("python-pyyaml" ,python-pyyaml)
16015 ("python-jsonschema" ,python-jsonschema)
16016 ("python-mistune" ,python-mistune)
16017 ("python-six" ,python-six)))
16018 (native-inputs
16019 `(("python-decorator" ,python-decorator)
16020 ("python-flake8" ,python-flake8)
16021 ("python-flask-restful" ,python-flask-restful)
16022 ("python-flex" ,python-flex)
16023 ("python-pytest-3.0" ,python-pytest-3.0)
16024 ("python-pytest-cov" ,python-pytest-cov)
16025 ("python-marshmallow" ,python-marshmallow)
16026 ("python-apispec" ,python-apispec)))
16027 (home-page "https://github.com/rochacbruno/flasgger/")
16028 (synopsis "Extract Swagger specs from your Flask project")
16029 (description "@code{python-flasgger} allows extracting Swagger specs
16030 from your Flask project. It is a fork of Flask-Swagger.")
16031 (license license:expat)))
16032
16033 (define-public python2-flasgger
16034 (package-with-python2 python-flasgger))
16035
16036 (define-public python-swagger-spec-validator
16037 (package
16038 (name "python-swagger-spec-validator")
16039 (version "2.1.0")
16040 (source
16041 (origin
16042 (method url-fetch)
16043 (uri (pypi-uri "swagger-spec-validator" version))
16044 (sha256
16045 (base32
16046 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
16047 (build-system python-build-system)
16048 (propagated-inputs
16049 `(("python-jsonschema" ,python-jsonschema)
16050 ("python-six" ,python-six)))
16051 (home-page
16052 "http://github.com/Yelp/swagger_spec_validator")
16053 (synopsis "Validation of Swagger specifications")
16054 (description "@code{swagger_spec_validator} provides a library for
16055 validating Swagger API specifications.")
16056 (license license:asl2.0)))
16057
16058 (define-public python2-swagger-spec-validator
16059 (package-with-python2 python-swagger-spec-validator))
16060
16061 (define-public python-apache-libcloud
16062 (package
16063 (name "python-apache-libcloud")
16064 (version "2.0.0")
16065 (source
16066 (origin
16067 (method url-fetch)
16068 (uri (pypi-uri "apache-libcloud" version))
16069 (sha256
16070 (base32
16071 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
16072 (build-system python-build-system)
16073 (arguments
16074 `(#:phases
16075 (modify-phases %standard-phases
16076 (add-after 'unpack 'patch-ssh
16077 (lambda* (#:key inputs #:allow-other-keys)
16078 (substitute* "libcloud/compute/ssh.py"
16079 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16080 "/bin/ssh" "'")))
16081 #t))
16082 (add-after 'unpack 'patch-tests
16083 (lambda _
16084 (substitute* "./libcloud/test/test_file_fixtures.py"
16085 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
16086 (("def _ascii") "def _raw_data(self, method, url, body, headers):
16087 return (httplib.OK,
16088 \"1234abcd\",
16089 {\"test\": \"value\"},
16090 httplib.responses[httplib.OK])
16091 def _ascii"))
16092 (substitute* "libcloud/test/compute/test_ssh_client.py"
16093 (("class ShellOutSSHClientTests")
16094 "@unittest.skip(\"Guix container doesn't have ssh service\")
16095 class ShellOutSSHClientTests")
16096 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16097 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16098 (("'.xF0', '.x90', '.x8D', '.x88'")
16099 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16100 #t)))))
16101 (inputs
16102 `(("openssh" ,openssh)))
16103 (propagated-inputs
16104 `(("python-paramiko" ,python-paramiko)
16105 ("python-requests" ,python-requests)))
16106 (native-inputs
16107 `(("python-lockfile" ,python-lockfile)
16108 ("python-mock" ,python-mock)
16109 ("python-requests-mock" ,python-requests-mock)))
16110 (home-page "https://libcloud.apache.org/")
16111 (synopsis "Unified Cloud API")
16112 (description "@code{libcloud} is a Python library for interacting with
16113 many of the popular cloud service providers using a unified API.")
16114 (license license:asl2.0)))
16115
16116 (define-public python2-apache-libcloud
16117 (package-with-python2 python-apache-libcloud))
16118
16119 (define-public python-smmap2
16120 (package
16121 (name "python-smmap2")
16122 (version "2.0.3")
16123 (source
16124 (origin
16125 (method url-fetch)
16126 (uri (pypi-uri "smmap2" version))
16127 (sha256
16128 (base32
16129 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
16130 (build-system python-build-system)
16131 (native-inputs
16132 `(("python-nosexcover" ,python-nosexcover)))
16133 (home-page "https://github.com/Byron/smmap")
16134 (synopsis "Python sliding window memory map manager")
16135 (description "@code{smmap2} is a pure Python implementation of a sliding
16136 window memory map manager.")
16137 (license license:bsd-3)))
16138
16139 (define-public python2-smmap2
16140 (package-with-python2 python-smmap2))
16141
16142 (define-public python-regex
16143 (package
16144 (name "python-regex")
16145 (version "2017.06.07")
16146 (source (origin
16147 (method url-fetch)
16148 (uri (pypi-uri "regex" version))
16149 (sha256
16150 (base32
16151 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
16152 (build-system python-build-system)
16153 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16154 (synopsis "Alternative regular expression module")
16155 (description "This regular expression implementation is backwards-
16156 compatible with the standard @code{re} module, but offers additional
16157 functionality like full case-folding for case-insensitive matches in Unicode.")
16158 (license license:psfl)))
16159
16160 (define-public python2-regex
16161 (package-with-python2 python-regex))
16162
16163 (define-public python2-pyopengl
16164 (package
16165 (name "python2-pyopengl")
16166 (version "3.1.0")
16167 (source
16168 (origin
16169 (method url-fetch)
16170 (uri (pypi-uri "PyOpenGL" version))
16171 (sha256
16172 (base32
16173 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
16174 (arguments
16175 `(#:python ,python-2))
16176 (build-system python-build-system)
16177 (home-page "http://pyopengl.sourceforge.net")
16178 (synopsis "Standard OpenGL bindings for Python")
16179 (description
16180 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16181 related APIs. The binding is created using the standard @code{ctypes}
16182 library.")
16183 (license license:bsd-3)))
16184
16185 (define-public python-rencode
16186 (package
16187 (name "python-rencode")
16188 (version "1.0.3")
16189 (source
16190 (origin
16191 (method url-fetch)
16192 (uri (pypi-uri "rencode" version))
16193 (sha256
16194 (base32
16195 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
16196 (build-system python-build-system)
16197 (native-inputs `(("pkg-config" ,pkg-config)
16198 ("python-cython", python-cython)))
16199 (home-page "https://github.com/aresch/rencode")
16200 (synopsis "Serialization of heterogeneous data structures")
16201 (description
16202 "The @code{rencode} module is a data structure serialization library,
16203 similar to @code{bencode} from the BitTorrent project. For complex,
16204 heterogeneous data structures with many small elements, r-encoding stake up
16205 significantly less space than b-encodings. This version of rencode is a
16206 complete rewrite in Cython to attempt to increase the performance over the
16207 pure Python module.")
16208 (license license:bsd-3)))
16209
16210 (define-public python2-rencode
16211 (package-with-python2 python-rencode))
16212
16213 (define-public python-xenon
16214 (package
16215 (name "python-xenon")
16216 (version "0.5.1")
16217 (source
16218 (origin
16219 (method url-fetch)
16220 (uri (pypi-uri "xenon" version))
16221 (sha256
16222 (base32
16223 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
16224 (build-system python-build-system)
16225 (native-inputs
16226 `(("python-pyyaml" ,python-pyyaml)
16227 ("python-radon" ,python-radon)
16228 ("python-requests" ,python-requests)
16229 ("python-flake8" ,python-flake8)
16230 ("python-tox" ,python-tox)))
16231 (arguments
16232 `(#:phases
16233 (modify-phases %standard-phases
16234 (add-before 'build 'patch-test-requirements
16235 (lambda* (#:key inputs #:allow-other-keys)
16236 ;; Update requirements from dependency==version to
16237 ;; dependency>=version.
16238 (substitute* "requirements.txt"
16239 (("==") ">=")
16240 ((",<1.5.0") ""))
16241 ;; Remove httpretty dependency for tests.
16242 (substitute* "setup.py"
16243 (("httpretty") ""))
16244 #t)))))
16245 (home-page "https://xenon.readthedocs.org/")
16246 (synopsis "Monitor code metrics for Python on your CI server")
16247 (description
16248 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16249 Ideally, @code{xenon} is run every time code is committed. Through command
16250 line options, various thresholds can be set for the complexity of code. It
16251 will fail (i.e. it will exit with a non-zero exit code) when any of these
16252 requirements is not met.")
16253 (license license:expat)))
16254
16255 (define-public python2-xenon
16256 (package-with-python2 python-xenon))
16257
16258 (define-public python-flask-principal
16259 (package
16260 (name "python-flask-principal")
16261 (version "0.4.0")
16262 (source
16263 (origin
16264 (method url-fetch)
16265 (uri (pypi-uri "Flask-Principal" version))
16266 (sha256
16267 (base32
16268 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
16269 (build-system python-build-system)
16270 (propagated-inputs
16271 `(("python-blinker" ,python-blinker)))
16272 (native-inputs
16273 `(("python-flask" ,python-flask)
16274 ("python-nose" ,python-nose)))
16275 (home-page "http://packages.python.org/Flask-Principal/")
16276 (synopsis "Identity management for Flask")
16277 (description "@code{flask_principal} is a identity management library for
16278 Flask. It supports managing both authentication and authorization data in a
16279 thread-local variable.")
16280 (license license:expat)))
16281
16282 (define-public python2-flask-principal
16283 (package-with-python2 python-flask-principal))
16284
16285 (define-public python-flask-httpauth
16286 (package
16287 (name "python-flask-httpauth")
16288 (version "3.2.3")
16289 (source
16290 (origin
16291 (method url-fetch)
16292 (uri (pypi-uri "Flask-HTTPAuth" version))
16293 (sha256
16294 (base32
16295 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
16296 (build-system python-build-system)
16297 (native-inputs
16298 `(("python-flask" ,python-flask)))
16299 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
16300 (synopsis "Basic and Digest HTTP authentication for Flask routes")
16301 (description "@code{flask_httpauth} provides Basic and Digest HTTP
16302 authentication for Flask routes.")
16303 (license license:expat)))
16304
16305 (define-public python2-flask-httpauth
16306 (package-with-python2 python-flask-httpauth))
16307
16308 (define-public python-pysocks
16309 (package
16310 (name "python-pysocks")
16311 (version "1.6.7")
16312 (source
16313 (origin
16314 (method url-fetch)
16315 (uri (pypi-uri "PySocks" version))
16316 (sha256
16317 (base32
16318 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
16319 (build-system python-build-system)
16320 (arguments `(#:tests? #f))
16321 (home-page "https://github.com/Anorov/PySocks")
16322 (synopsis "SOCKS client module")
16323 (description "@code{pysocks} is an updated and semi-actively maintained
16324 version of @code{SocksiPy} with bug fixes and extra features.")
16325 (license license:bsd-3)))
16326
16327 (define-public python2-pysocks
16328 (package-with-python2 python-pysocks))
16329
16330 (define-public python-pyaes
16331 (package
16332 (name "python-pyaes")
16333 (version "1.6.0")
16334 (source
16335 (origin
16336 (method url-fetch)
16337 (uri (pypi-uri "pyaes" version))
16338 (sha256
16339 (base32
16340 "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"))))
16341 (build-system python-build-system)
16342 (home-page "https://github.com/ricmoo/pyaes")
16343 (synopsis "Implementation of AES in Python")
16344 (description "This package contains a pure-Python implementation of the
16345 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
16346 ECB and OFB).")
16347 (license license:expat)))
16348
16349 (define-public python2-pyaes
16350 (package-with-python2 python-pyaes))
16351
16352 (define-public python-uritemplate
16353 (package
16354 (name "python-uritemplate")
16355 (version "3.0.0")
16356 (source
16357 (origin
16358 (method url-fetch)
16359 (uri (pypi-uri "uritemplate" version))
16360 (sha256
16361 (base32
16362 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
16363 (build-system python-build-system)
16364 (home-page "https://uritemplate.readthedocs.org")
16365 (synopsis "Library to deal with URI Templates")
16366 (description "@code{uritemplate} provides Python library to deal with URI
16367 Templates.")
16368 (license license:bsd-2)))
16369
16370 (define-public python2-uritemplate
16371 (package-with-python2 python-uritemplate))
16372
16373 (define-public python-pydiff
16374 (package
16375 (name "python-pydiff")
16376 (version "0.2")
16377 (source
16378 (origin
16379 (method url-fetch)
16380 (uri (pypi-uri "pydiff" version))
16381 (sha256
16382 (base32
16383 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16384 (build-system python-build-system)
16385 (home-page "https://github.com/myint/pydiff")
16386 (synopsis "Library to diff two Python files at the bytecode level")
16387 (description
16388 "@code{pydiff} makes it easy to look for actual code changes while
16389 ignoring formatting changes.")
16390 (license license:expat)))
16391
16392 (define-public python2-pydiff
16393 (package-with-python2 python-pydiff))
16394
16395 (define-public python-nose-timer
16396 (package
16397 (name "python-nose-timer")
16398 (version "0.7.0")
16399 (source
16400 (origin
16401 (method url-fetch)
16402 (uri (pypi-uri "nose-timer" version))
16403 (patches
16404 (search-patches
16405 ;; This patch will not be needed in the next version.
16406 ;; It is taken from the master branch.
16407 "python-nose-timer-drop-ordereddict.patch"))
16408 (sha256
16409 (base32
16410 "1s32ymsnby8lz2qk55ifj9zi50dqcg6swnj5cz2rmwxg2jsslsxp"))))
16411 (build-system python-build-system)
16412 (propagated-inputs
16413 `(("python-nose" ,python-nose)
16414 ("python-termcolor" ,python-termcolor)))
16415 (home-page "https://github.com/mahmoudimus/nose-timer")
16416 (synopsis "Timer plugin for nosetests")
16417 (description "Shows how much time was needed to run individual tests.")
16418 (license license:expat)))
16419
16420 (define-public python2-nose-timer
16421 (package-with-python2 python-nose-timer))
16422
16423 (define-public python-tqdm
16424 (package
16425 (name "python-tqdm")
16426 (version "4.15.0")
16427 (source
16428 (origin
16429 (method url-fetch)
16430 (uri (pypi-uri "tqdm" version))
16431 (sha256
16432 (base32
16433 "0lwrmby8qz23gvqwkpivfrv4q8nfh90cz9ml6slwvwmcxxsdrhbf"))))
16434 (build-system python-build-system)
16435 (native-inputs
16436 `(("python-flake8" ,python-flake8)
16437 ("python-nose" ,python-nose)
16438 ("python-nose-timer" ,python-nose-timer)
16439 ("python-coverage" ,python-coverage)
16440 ("python-virtualenv" ,python-virtualenv)))
16441 (home-page "https://github.com/tqdm/tqdm")
16442 (synopsis "Fast, extensible progress meter")
16443 (description
16444 "Make loops show a progress bar on the console by just wrapping any
16445 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16446 design and layout.")
16447 (license (list license:mpl2.0 license:expat))))
16448
16449 (define-public python2-tqdm
16450 (package-with-python2 python-tqdm))
16451
16452 (define-public python-pkginfo
16453 (package
16454 (name "python-pkginfo")
16455 (version "1.4.1")
16456 (source
16457 (origin
16458 (method url-fetch)
16459 (uri (pypi-uri "pkginfo" version))
16460 (sha256
16461 (base32
16462 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
16463 (build-system python-build-system)
16464 (arguments
16465 ;; The tests are broken upstream.
16466 '(#:tests? #f))
16467 (home-page
16468 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16469 (synopsis
16470 "Query metadatdata from sdists, bdists, and installed packages")
16471 (description
16472 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16473 source distriubtion (an sdist) or a binary distribution (e.g., created by
16474 running bdist_egg). It can also query the EGG-INFO directory of an installed
16475 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16476 created by running @code{python setup.py develop}).")
16477 (license license:expat)))
16478
16479 (define-public python2-pkginfo
16480 (package-with-python2 python-pkginfo))
16481
16482 (define-public python-twine
16483 (package
16484 (name "python-twine")
16485 (version "1.9.1")
16486 (source
16487 (origin
16488 (method url-fetch)
16489 (uri (pypi-uri "twine" version))
16490 (sha256
16491 (base32
16492 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
16493 (build-system python-build-system)
16494 (propagated-inputs
16495 `(("python-tqdm" ,python-tqdm)
16496 ("python-pkginfo", python-pkginfo)
16497 ("python-requests" ,python-requests)
16498 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16499 (home-page "https://github.com/pypa/twine")
16500 (synopsis "Collection of utilities for interacting with PyPI")
16501 (description
16502 "@code{twine} currently supports registering projects and uploading
16503 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16504 their files and supports any packaging format (including wheels).")
16505 (license license:asl2.0)))
16506
16507 (define-public python2-twine
16508 (package-with-python2 python-twine))