gnu: Add python-jupyter-console as input to python-ipython.
[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, 2017 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 (modify-phases %standard-phases
489 (add-before 'check 'set-PYTHON_EGG_CACHE
490 ;; some tests require access to "$HOME/.cython"
491 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
492 (home-page "https://bitbucket.org/ecollins/passlib")
493 (synopsis
494 "Comprehensive password hashing framework")
495 (description
496 "Passlib is a password hashing library for Python 2 & 3, which provides
497 cross-platform implementations of over 30 password hashing algorithms, as well
498 as a framework for managing existing password hashes. It's designed to be
499 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
500 to providing full-strength password hashing for multi-user application.")
501 (license license:bsd-3)))
502
503 (define-public python2-passlib
504 (package-with-python2 python-passlib))
505
506 (define-public python-py-bcrypt
507 (package
508 (name "python-py-bcrypt")
509 (version "0.4")
510 (source
511 (origin
512 (method url-fetch)
513 (uri (string-append
514 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
515 version
516 ".tar.gz"))
517 (sha256
518 (base32
519 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
520 (build-system python-build-system)
521 (home-page "https://code.google.com/p/py-bcrypt")
522 (synopsis
523 "Bcrypt password hashing and key derivation")
524 (description
525 "A python wrapper of OpenBSD's Blowfish password hashing code. This
526 system hashes passwords using a version of Bruce Schneier's Blowfish block
527 cipher with modifications designed to raise the cost of off-line password
528 cracking and frustrate fast hardware implementation. The computation cost of
529 the algorithm is parametised, so it can be increased as computers get faster.
530 The intent is to make a compromise of a password database less likely to
531 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
532 John the Ripper).")
533 ;; "sha2.c" is under BSD-3;
534 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
535 ;; the rest is under ISC.
536 (license (list license:isc license:bsd-3 license:bsd-4))))
537
538 (define-public python2-py-bcrypt
539 (package-with-python2 python-py-bcrypt))
540
541
542 (define-public python-paramiko
543 (package
544 (name "python-paramiko")
545 (version "2.1.2")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (pypi-uri "paramiko" version))
550 (sha256
551 (base32
552 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
553 (build-system python-build-system)
554 (arguments
555 '(#:phases
556 (modify-phases %standard-phases
557 (replace 'check
558 (lambda _
559 (zero? (system* "python" "test.py")))))))
560 (propagated-inputs
561 `(("python-pyasn1" ,python-pyasn1)
562 ("python-cryptography" ,python-cryptography)))
563 (home-page "http://www.paramiko.org/")
564 (synopsis "SSHv2 protocol library")
565 (description "Paramiko is a python implementation of the SSHv2 protocol,
566 providing both client and server functionality. While it leverages a Python C
567 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
568 Python interface around SSH networking concepts.")
569 (license license:lgpl2.1+)))
570
571 (define-public python2-paramiko
572 (package-with-python2 python-paramiko))
573
574
575 (define-public python-httplib2
576 (package
577 (name "python-httplib2")
578 (version "0.9.2")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "httplib2" version))
583 (sha256
584 (base32
585 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
586 (build-system python-build-system)
587 (home-page "https://github.com/jcgregorio/httplib2")
588 (synopsis "Comprehensive HTTP client library")
589 (description
590 "A comprehensive HTTP client library supporting many features left out of
591 other HTTP libraries.")
592 (license license:expat)))
593
594 (define-public python2-httplib2
595 (package-with-python2 python-httplib2))
596
597 (define-public python-ecdsa
598 (package
599 (name "python-ecdsa")
600 (version "0.13")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (string-append
605 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
606 version
607 ".tar.gz"))
608 (sha256
609 (base32
610 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
611 (build-system python-build-system)
612 (inputs
613 `(("openssl" ,openssl)))
614 (home-page
615 "https://github.com/warner/python-ecdsa")
616 (synopsis
617 "ECDSA cryptographic signature library (pure python)")
618 (description
619 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
620 Curve Digital Signature Algorithm), implemented purely in Python. With this
621 library, you can quickly create keypairs (signing key and verifying key), sign
622 messages, and verify the signatures. The keys and signatures are very short,
623 making them easy to handle and incorporate into other protocols.")
624 (license license:expat)))
625
626 (define-public python2-ecdsa
627 (package-with-python2 python-ecdsa))
628
629 (define-public python-ccm
630 (package
631 (name "python-ccm")
632 (version "2.1.6")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (pypi-uri "ccm" version))
637 (sha256
638 (base32
639 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
640 (build-system python-build-system)
641 (propagated-inputs
642 `(("python-pyyaml" ,python-pyyaml)
643 ;; Not listed in setup.py, but used in ccmlib/node.py for full
644 ;; functionality
645 ("python-psutil" ,python-psutil)
646 ("python-six" ,python-six)))
647 (home-page "https://github.com/pcmanus/ccm")
648 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
649 localhost")
650 (description "Cassandra Cluster Manager is a development tool for testing
651 local Cassandra clusters. It creates, launches and removes Cassandra clusters
652 on localhost.")
653 (license license:asl2.0)))
654
655 (define-public python2-ccm
656 (package-with-python2 python-ccm))
657
658 (define-public python-pytz
659 (package
660 (name "python-pytz")
661 (version "2017.2")
662 (source
663 (origin
664 (method url-fetch)
665 (uri (pypi-uri "pytz" version ".zip"))
666 (sha256
667 (base32
668 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
669 (build-system python-build-system)
670 (native-inputs
671 `(("unzip" ,unzip)))
672 (home-page "http://pythonhosted.org/pytz")
673 (synopsis "Python timezone library")
674 (description "This library brings the Olson tz database into Python. It
675 allows accurate and cross platform timezone calculations using Python 2.4 or
676 higher. It also solves the issue of ambiguous times at the end of daylight
677 saving time. Almost all of the Olson timezones are supported.")
678 (license license:expat)))
679
680 (define-public python2-pytz
681 (package-with-python2 python-pytz))
682
683 (define-public python-clyent
684 (package
685 (name "python-clyent")
686 (version "1.2.1")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (pypi-uri "clyent" version))
691 (sha256
692 (base32
693 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
694 (build-system python-build-system)
695 (native-inputs
696 `(("python-mock" ,python-mock)))
697 (home-page "https://github.com/binstar/clyent")
698 (synopsis "Command line client library")
699 (description "Clyent is a Python command line utiliy library. It is used
700 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
701 (license license:bsd-3)))
702
703 (define-public python2-clyent
704 (package-with-python2 python-clyent))
705
706 (define-public python-babel
707 (package
708 (name "python-babel")
709 (version "2.3.4")
710 (source
711 (origin
712 (method url-fetch)
713 (uri (pypi-uri "Babel" version))
714 (sha256
715 (base32
716 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
717 (build-system python-build-system)
718 (propagated-inputs
719 `(("python-pytz" ,python-pytz)))
720 (arguments `(#:tests? #f)) ; no test target
721 (home-page "http://babel.pocoo.org/")
722 (synopsis
723 "Tools for internationalizing Python applications")
724 (description
725 "Babel is composed of two major parts:
726 - tools to build and work with gettext message catalogs
727 - a Python interface to the CLDR (Common Locale Data Repository), providing
728 access to various locale display names, localized number and date formatting,
729 etc. ")
730 (license license:bsd-3)))
731
732 (define-public python2-babel
733 (package-with-python2 python-babel))
734
735 (define-public python2-backport-ssl-match-hostname
736 (package
737 (name "python2-backport-ssl-match-hostname")
738 (version "3.5.0.1")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append
743 "https://pypi.python.org/packages/source/b/"
744 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
745 version ".tar.gz"))
746 (sha256
747 (base32
748 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
749 (build-system python-build-system)
750 (arguments
751 `(#:python ,python-2
752 #:tests? #f)) ; no test target
753 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
754 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
755 (description
756 "This backport brings the ssl.match_hostname() function to users of
757 earlier versions of Python. The function checks the hostname in the
758 certificate returned by the server to which a connection has been established,
759 and verifies that it matches the intended target hostname.")
760 (license license:psfl)))
761
762 (define-public python-hdf4
763 (package
764 (name "python-hdf4")
765 (version "0.9")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (pypi-uri name version))
770 (sha256
771 (base32
772 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
773 (build-system python-build-system)
774 (native-inputs `(("nose" ,python-nose)))
775 (propagated-inputs `(("numpy" ,python-numpy)))
776 (inputs
777 `(("hdf4" ,hdf4)
778 ("libjpeg" ,libjpeg)
779 ("zlib" ,zlib)))
780 (arguments
781 `(#:phases
782 (modify-phases %standard-phases
783 (replace 'check
784 (lambda _
785 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
786 ;; on to import numpy. Somehow this works on their CI system.
787 ;; Let's just manage PYTHONPATH here instead.
788 (substitute* "runexamples.sh"
789 (("export PYTHONPATH=.*") ""))
790 (setenv "PYTHONPATH"
791 (string-append (getcwd) ":"
792 (getenv "PYTHONPATH")))
793 (and (zero? (system* "./runexamples.sh"))
794 (zero? (system* "nosetests" "-v"))))))))
795 (home-page "https://github.com/fhs/python-hdf4")
796 (synopsis "Python interface to the NCSA HDF4 library")
797 (description
798 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
799 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
800 NetCDF files can also be read and modified. Python-HDF4 is a fork of
801 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
802 (license license:expat)))
803
804 (define-public python2-hdf4
805 (package-with-python2 python-hdf4))
806
807 (define-public python-h5py
808 (package
809 (name "python-h5py")
810 (version "2.7.0")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (pypi-uri "h5py" version))
815 (sha256
816 (base32
817 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
818 (build-system python-build-system)
819 (arguments
820 `(#:tests? #f ; no test target
821 #:phases
822 (modify-phases %standard-phases
823 (add-after 'unpack 'fix-hdf5-paths
824 (lambda* (#:key inputs #:allow-other-keys)
825 (let ((prefix (assoc-ref inputs "hdf5")))
826 (substitute* "setup_build.py"
827 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
828 (string-append "['" prefix "/lib" "']"))
829 (("'/opt/local/include', '/usr/local/include'")
830 (string-append "'" prefix "/include" "'")))
831 (substitute* "setup_configure.py"
832 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
833 (string-append "['" prefix "/lib" "']")))
834 #t))))))
835 (propagated-inputs
836 `(("python-six" ,python-six)
837 ("python-numpy" ,python-numpy)))
838 (inputs
839 `(("hdf5" ,hdf5)))
840 (native-inputs
841 `(("python-cython" ,python-cython)
842 ("python-pkgconfig" ,python-pkgconfig)))
843 (home-page "http://www.h5py.org/")
844 (synopsis "Read and write HDF5 files from Python")
845 (description
846 "The h5py package provides both a high- and low-level interface to the
847 HDF5 library from Python. The low-level interface is intended to be a
848 complete wrapping of the HDF5 API, while the high-level component supports
849 access to HDF5 files, datasets and groups using established Python and NumPy
850 concepts.")
851 (license license:bsd-3)))
852
853 (define-public python2-h5py
854 (package-with-python2 python-h5py))
855
856 (define-public python-netcdf4
857 (package
858 (name "python-netcdf4")
859 (version "1.2.9")
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "netCDF4" version))
864 (sha256
865 (base32
866 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
867 (build-system python-build-system)
868 (native-inputs
869 `(("python-cython" ,python-cython)))
870 (propagated-inputs
871 `(("python-numpy" ,python-numpy)))
872 (inputs
873 `(("netcdf" ,netcdf)
874 ("hdf4" ,hdf4)
875 ("hdf5" ,hdf5)))
876 (arguments
877 '(#:phases
878 (modify-phases %standard-phases
879 (replace 'check
880 (lambda _
881 (setenv "NO_NET" "1") ; disable opendap tests
882 (with-directory-excursion "test"
883 (setenv "PYTHONPATH" ; find and add the library we just built
884 (string-append
885 (car (find-files "../build" "lib.*"
886 #:directories? #:t
887 #:fail-on-error? #:t))
888 ":" (getenv "PYTHONPATH")))
889 (zero? (system* "python" "run_all.py"))))))))
890 (home-page
891 "https://github.com/Unidata/netcdf4-python")
892 (synopsis "Python/numpy interface to the netCDF library")
893 (description "Netcdf4-python is a Python interface to the netCDF C
894 library. netCDF version 4 has many features not found in earlier
895 versions of the library and is implemented on top of HDF5. This module
896 can read and write files in both the new netCDF 4 and the old netCDF 3
897 format, and can create files that are readable by HDF5 clients. The
898 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
899 to users of that module.")
900 ;; The software is mainly ISC, but includes some files covered
901 ;; by the Expat license.
902 (license (list license:isc license:expat))))
903
904 (define-public python2-netcdf4
905 (package-with-python2 python-netcdf4))
906
907 (define-public python-lockfile
908 (package
909 (name "python-lockfile")
910 (version "0.12.2")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
915 "lockfile-" version ".tar.gz"))
916 (sha256
917 (base32
918 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
919 (build-system python-build-system)
920 (arguments '(#:test-target "check"))
921 (native-inputs
922 `(("python-pbr" ,python-pbr)))
923 (home-page "https://launchpad.net/pylockfile")
924 (synopsis "Platform-independent file locking module")
925 (description
926 "The lockfile package exports a LockFile class which provides a simple
927 API for locking files.")
928 (license license:expat)))
929
930 (define-public python2-lockfile
931 (package-with-python2 python-lockfile))
932
933 (define-public python-mock
934 (package
935 (name "python-mock")
936 (version "1.0.1")
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "mock" version))
941 (sha256
942 (base32
943 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
944 (build-system python-build-system)
945 (arguments '(#:test-target "check"))
946 (home-page "https://github.com/testing-cabal/mock")
947 (synopsis "Python mocking and patching library for testing")
948 (description
949 "Mock is a library for testing in Python. It allows you to replace parts
950 of your system under test with mock objects and make assertions about how they
951 have been used.")
952 (license license:expat)))
953
954 (define-public python2-mock
955 (package-with-python2 python-mock))
956
957 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
958 ;;; of python-mock. However, a large number of packages fail to build with
959 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
960 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
961 (define-public python-mock-2
962 (package
963 (inherit python-mock)
964 (version "2.0.0")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "mock" version))
969 (sha256
970 (base32
971 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
972 (propagated-inputs
973 `(("python-pbr" ,python-pbr-minimal)
974 ,@(package-propagated-inputs python-mock)))))
975
976 (define-public python-setuptools
977 (package
978 (name "python-setuptools")
979 (version "31.0.0")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (pypi-uri "setuptools" version))
984 (sha256
985 (base32
986 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
987 (modules '((guix build utils)))
988 (snippet
989 '(begin
990 ;; Remove included binaries which are used to build self-extracting
991 ;; installers for Windows.
992 ;; TODO: Find some way to build them ourself so we can include them.
993 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
994 #t))))
995 (build-system python-build-system)
996 ;; FIXME: Tests require pytest, which itself relies on setuptools.
997 ;; One could bootstrap with an internal untested setuptools.
998 (arguments
999 `(#:tests? #f))
1000 (home-page "https://pypi.python.org/pypi/setuptools")
1001 (synopsis
1002 "Library designed to facilitate packaging Python projects")
1003 (description
1004 "Setuptools is a fully-featured, stable library designed to facilitate
1005 packaging Python projects, where packaging includes:
1006 Python package and module definitions,
1007 distribution package metadata,
1008 test hooks,
1009 project installation,
1010 platform-specific details,
1011 Python 3 support.")
1012 ;; TODO: setuptools now bundles the following libraries:
1013 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1014 (license (list license:psfl ; setuptools itself
1015 license:expat ; six, appdirs, pyparsing
1016 license:asl2.0 ; packaging is dual ASL2/BSD-2
1017 license:bsd-2))))
1018
1019 (define-public python2-setuptools
1020 (package-with-python2 python-setuptools))
1021
1022 (define-public python-uniseg
1023 (package
1024 (name "python-uniseg")
1025 (version "0.7.1")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1030 "get/rel-" version ".tar.gz"))
1031 (file-name (string-append name "-" version ".tar.gz"))
1032 (sha256
1033 (base32
1034 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1035 (build-system python-build-system)
1036 (arguments
1037 '(#:tests? #f)) ; The test suite requires network access.
1038 (home-page
1039 "https://bitbucket.org/emptypage/uniseg-python")
1040 (synopsis
1041 "Python library to determine Unicode text segmentations")
1042 (description
1043 "Uniseg is a Python package used to determine Unicode text segmentations.
1044 Supported segmentations include:
1045 @enumerate
1046 @item @dfn{Code point} (any value in the Unicode codespace)
1047 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1048 multiple Unicode code points, e.g. \"G\" + acute-accent)
1049 @item Word break
1050 @item Sentence break
1051 @item Line break
1052 @end enumerate")
1053 (license license:expat)))
1054
1055 (define-public python2-uniseg
1056 (package-with-python2 python-uniseg))
1057
1058 ;;; Pycrypto is abandoned upstream:
1059 ;;;
1060 ;;; https://github.com/dlitz/pycrypto/issues/173
1061 ;;;
1062 ;;; TODO Remove this package from GNU Guix.
1063 (define-public python-pycrypto
1064 (package
1065 (name "python-pycrypto")
1066 (version "2.6.1")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "pycrypto" version))
1071 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1072 (sha256
1073 (base32
1074 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1075 (build-system python-build-system)
1076 (inputs
1077 `(("python" ,python)
1078 ("gmp" ,gmp)))
1079 (arguments
1080 `(#:phases
1081 (modify-phases %standard-phases
1082 (add-before 'build 'set-build-env
1083 ;; pycrypto runs an autoconf configure script behind the scenes
1084 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
1085 (home-page "http://www.pycrypto.org/")
1086 (synopsis "Cryptographic modules for Python")
1087 (description
1088 "Pycrypto is a collection of both secure hash functions (such as SHA256
1089 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1090 etc.). The package is structured to make adding new modules easy.")
1091 (license license:public-domain)))
1092
1093 (define-public python2-pycrypto
1094 (let ((pycrypto (package-with-python2 python-pycrypto)))
1095 (package (inherit pycrypto)
1096 (inputs
1097 `(("python" ,python-2)
1098 ,@(alist-delete
1099 "python"
1100 (package-inputs pycrypto)))))))
1101
1102 (define-public python-eventlet
1103 (package
1104 (name "python-eventlet")
1105 (version "0.20.1")
1106 (source
1107 (origin
1108 (method url-fetch)
1109 (uri (pypi-uri "eventlet" version))
1110 (sha256
1111 (base32
1112 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1113 (build-system python-build-system)
1114 (propagated-inputs
1115 `(("python-greenlet" ,python-greenlet)))
1116 (arguments
1117 ;; TODO: Requires unpackaged 'enum-compat'.
1118 '(#:tests? #f))
1119 (home-page "http://eventlet.net")
1120 (synopsis "Concurrent networking library for Python")
1121 (description
1122 "Eventlet is a concurrent networking library for Python that
1123 allows you to change how you run your code, not how you write it.
1124 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1125 Coroutines ensure that the developer uses a blocking style of programming
1126 that is similar to threading, but provide the benefits of non-blocking I/O.
1127 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1128 from the Python interpreter, or as a small part of a larger application.")
1129 (license license:expat)))
1130
1131 (define-public python2-eventlet
1132 (let ((base (package-with-python2
1133 (strip-python2-variant python-eventlet))))
1134 (package (inherit base)
1135 (propagated-inputs
1136 `(("python2-enum34" ,python2-enum34)
1137 ,@(package-propagated-inputs base))))))
1138
1139 (define-public python-keyring
1140 (package
1141 (name "python-keyring")
1142 (version "8.7")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (pypi-uri "keyring" version))
1147 (sha256
1148 (base32
1149 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1150 (build-system python-build-system)
1151 (native-inputs
1152 `(("python-setuptools-scm" ,python-setuptools-scm)))
1153 (propagated-inputs
1154 `(("python-pycrypto" ,python-pycrypto)))
1155 (arguments
1156 `(#:tests? #f)) ;TODO: tests require pytest
1157 (home-page "https://github.com/jaraco/keyring")
1158 (synopsis "Store and access your passwords safely")
1159 (description
1160 "The Python keyring lib provides a easy way to access the system keyring
1161 service from python. It can be used in any application that needs safe
1162 password storage.")
1163 ;; "MIT" and PSF dual license
1164 (license license:x11)))
1165
1166 (define-public python2-keyring
1167 (package-with-python2 python-keyring))
1168
1169 (define-public python-six
1170 (package
1171 (name "python-six")
1172 (version "1.10.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "six" version))
1177 (sha256
1178 (base32
1179 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1180 (build-system python-build-system)
1181 (native-inputs
1182 `(("python-py" ,python-py)
1183 ("python-pytest" ,python-pytest)))
1184 (home-page "http://pypi.python.org/pypi/six/")
1185 (synopsis "Python 2 and 3 compatibility utilities")
1186 (description
1187 "Six is a Python 2 and 3 compatibility library. It provides utility
1188 functions for smoothing over the differences between the Python versions with
1189 the goal of writing Python code that is compatible on both Python versions.
1190 Six supports every Python version since 2.5. It is contained in only one
1191 Python file, so it can be easily copied into your project.")
1192 (license license:x11)))
1193
1194 (define-public python2-six
1195 (package-with-python2 python-six))
1196
1197 (define-public python-dateutil
1198 (package
1199 (name "python-dateutil")
1200 (version "2.6.0")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "python-dateutil" version))
1205 (sha256
1206 (base32
1207 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1208 (build-system python-build-system)
1209 (propagated-inputs
1210 `(("python-six" ,python-six)))
1211 (home-page "https://dateutil.readthedocs.io/en/stable/")
1212 (synopsis "Extensions to the standard datetime module")
1213 (description
1214 "The dateutil module provides powerful extensions to the standard
1215 datetime module, available in Python 2.3+.")
1216 (license license:bsd-3)))
1217
1218 (define-public python2-dateutil
1219 (package-with-python2 python-dateutil))
1220
1221 (define-public python-parsedatetime
1222 (package
1223 (name "python-parsedatetime")
1224 (version "2.4")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "parsedatetime" version))
1229 (sha256
1230 (base32
1231 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1232 (build-system python-build-system)
1233 (native-inputs
1234 `(("python-nose" ,python-nose)
1235 ("python-pyicu" ,python-pyicu)
1236 ("python-pytest" ,python-pytest)
1237 ("python-pytest-runner" ,python-pytest-runner)))
1238 (propagated-inputs
1239 `(("python-future" ,python-future)))
1240 (home-page "https://github.com/bear/parsedatetime/")
1241 (synopsis
1242 "Parse human-readable date/time text")
1243 (description
1244 "Parse human-readable date/time text.")
1245 (license license:asl2.0)))
1246
1247 (define-public python2-parsedatetime
1248 (package-with-python2 python-parsedatetime))
1249
1250 (define-public python-schedule
1251 (package
1252 (name "python-schedule")
1253 (version "0.4.3")
1254 (source
1255 (origin
1256 (method url-fetch)
1257 (uri (pypi-uri "schedule" version))
1258 (sha256
1259 (base32
1260 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1261 (build-system python-build-system)
1262 (native-inputs
1263 `(("python-pytest" ,python-pytest)
1264 ("python-mock" ,python-mock)))
1265 (home-page "https://github.com/dbader/schedule")
1266 (synopsis "Schedule periodic function calls in Python")
1267 (description
1268 "Schedule is an in-process scheduler for periodic jobs that uses the
1269 builder pattern for configuration. Schedule lets you run Python functions (or
1270 any other callable) periodically at pre-determined intervals using a simple,
1271 human-friendly syntax.")
1272 (license license:expat)))
1273
1274 (define-public python2-schedule
1275 (package-with-python2 python-schedule))
1276
1277 (define-public python-pandas
1278 (package
1279 (name "python-pandas")
1280 (version "0.19.2")
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (pypi-uri "pandas" version))
1285 (sha256
1286 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1287 (patches
1288 (search-patches "python-pandas-skip-failing-tests.patch"))))
1289 (build-system python-build-system)
1290 (propagated-inputs
1291 `(("python-numpy" ,python-numpy)
1292 ("python-pytz" ,python-pytz)
1293 ("python-dateutil" ,python-dateutil)))
1294 (native-inputs
1295 `(("python-nose" ,python-nose)
1296 ("python-cython" ,python-cython)))
1297 (home-page "http://pandas.pydata.org")
1298 (synopsis "Data structures for data analysis, time series, and statistics")
1299 (description
1300 "Pandas is a Python package providing fast, flexible, and expressive data
1301 structures designed to make working with structured (tabular,
1302 multidimensional, potentially heterogeneous) and time series data both easy
1303 and intuitive. It aims to be the fundamental high-level building block for
1304 doing practical, real world data analysis in Python.")
1305 (license license:bsd-3)))
1306
1307 (define-public python2-pandas
1308 (package-with-python2 python-pandas))
1309
1310 (define-public python-tzlocal
1311 (package
1312 (name "python-tzlocal")
1313 (version "1.2.2")
1314 (source
1315 (origin
1316 (method url-fetch)
1317 (uri (pypi-uri "tzlocal" version))
1318 (sha256
1319 (base32
1320 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1321 (build-system python-build-system)
1322 (propagated-inputs
1323 `(("python-pytz" ,python-pytz)))
1324 (home-page "https://github.com/regebro/tzlocal")
1325 (synopsis
1326 "Local timezone information for Python")
1327 (description
1328 "Tzlocal returns a tzinfo object with the local timezone information.
1329 This module attempts to fix a glaring hole in pytz, that there is no way to
1330 get the local timezone information, unless you know the zoneinfo name, and
1331 under several distributions that's hard or impossible to figure out.")
1332 (license license:cc0)))
1333
1334 (define-public python2-pysqlite
1335 (package
1336 (name "python2-pysqlite")
1337 (version "2.8.3")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (pypi-uri "pysqlite" version))
1342 (sha256
1343 (base32
1344 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1345 (build-system python-build-system)
1346 (inputs
1347 `(("sqlite" ,sqlite)))
1348 (arguments
1349 `(#:python ,python-2 ; incompatible with Python 3
1350 #:tests? #f)) ; no test target
1351 (home-page "https://github.com/ghaering/pysqlite")
1352 (synopsis "SQLite bindings for Python")
1353 (description
1354 "Pysqlite provides SQLite bindings for Python that comply to the
1355 Database API 2.0T.")
1356 (license license:zlib)))
1357
1358
1359 (define-public python2-mechanize
1360 (package
1361 (name "python2-mechanize")
1362 (version "0.2.5")
1363 (source
1364 (origin
1365 (method url-fetch)
1366 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1367 version ".tar.gz"))
1368 (sha256
1369 (base32
1370 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1371 (build-system python-build-system)
1372 (arguments
1373 `(#:python ,python-2 ; apparently incompatible with Python 3
1374 #:tests? #f))
1375 ;; test fails with message
1376 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1377 ;; (python-3.3.2) or
1378 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1379 ;; (python-2.7.5).
1380 ;; The source code is from March 2011 and probably not up-to-date
1381 ;; with respect to python unit tests.
1382 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1383 (synopsis
1384 "Stateful programmatic web browsing in Python")
1385 (description
1386 "Mechanize implements stateful programmatic web browsing in Python,
1387 after Andy Lester’s Perl module WWW::Mechanize.")
1388 (license (license:non-copyleft
1389 "file://COPYING"
1390 "See COPYING in the distribution."))))
1391
1392
1393 (define-public python-simplejson
1394 (package
1395 (name "python-simplejson")
1396 (version "3.10.0")
1397 (source
1398 (origin
1399 (method url-fetch)
1400 (uri (pypi-uri "simplejson" version))
1401 (sha256
1402 (base32
1403 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1404 (build-system python-build-system)
1405 (home-page "http://simplejson.readthedocs.org/en/latest/")
1406 (synopsis
1407 "Json library for Python")
1408 (description
1409 "JSON (JavaScript Object Notation) is a subset of JavaScript
1410 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1411 format.
1412
1413 Simplejson exposes an API familiar to users of the standard library marshal
1414 and pickle modules. It is the externally maintained version of the json
1415 library contained in Python 2.6, but maintains compatibility with Python 2.5
1416 and (currently) has significant performance advantages, even without using
1417 the optional C extension for speedups. Simplejson is also supported on
1418 Python 3.3+.")
1419 (license license:x11)))
1420
1421 (define-public python2-simplejson
1422 (package-with-python2 python-simplejson))
1423
1424
1425 (define-public python-pyicu
1426 (package
1427 (name "python-pyicu")
1428 (version "1.9.5")
1429 (source
1430 (origin
1431 (method url-fetch)
1432 (uri (pypi-uri "PyICU" version))
1433 (sha256
1434 (base32
1435 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1436 (build-system python-build-system)
1437 (arguments
1438 '(#:phases
1439 (modify-phases %standard-phases
1440 (add-before 'check 'delete-failing-test
1441 (lambda _
1442 ;; XXX: These tests require locales that are unavailable
1443 ;; in the build environment.
1444 (delete-file "test/test_DateTimeParserGenerator.py")
1445 #t)))))
1446 (inputs
1447 `(("icu4c" ,icu4c)))
1448 (home-page "http://pyicu.osafoundation.org/")
1449 (synopsis "Python extension wrapping the ICU C++ API")
1450 (description
1451 "PyICU is a python extension wrapping the ICU C++ API.")
1452 (license license:x11)))
1453
1454 (define-public python2-pyicu
1455 (package-with-python2 python-pyicu))
1456
1457 (define-public python2-dogtail
1458 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1459 ;; spaces in indentation" with Python 3.
1460 (package
1461 (name "python2-dogtail")
1462 (version "0.9.9")
1463 (source (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "dogtail" version))
1466 (sha256
1467 (base32
1468 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1469 (build-system python-build-system)
1470 (arguments `(#:python ,python-2
1471 #:tests? #f)) ; invalid command "test"
1472 ;; Currently no offical homepage.
1473 (home-page "https://pypi.python.org/pypi/dogtail/")
1474 (synopsis "GUI test tool and automation framework written in Python")
1475 (description
1476 "Dogtail is a GUI test tool and automation framework written in Python.
1477 It uses Accessibility (a11y) technologies to communicate with desktop
1478 applications. dogtail scripts are written in Python and executed like any
1479 other Python program.")
1480 (license license:gpl2+)))
1481
1482 (define-public python2-empy
1483 (package
1484 (name "python2-empy")
1485 (version "3.3")
1486 (source (origin
1487 (method url-fetch)
1488 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1489 version ".tar.gz"))
1490 (sha256
1491 (base32
1492 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1493 (build-system python-build-system)
1494 (arguments
1495 `(#:python ,python-2
1496 #:phases
1497 (modify-phases %standard-phases
1498 (replace 'check
1499 (lambda _
1500 (zero? (system* "./test.sh")))))))
1501 (home-page "http://www.alcyone.com/software/empy/")
1502 (synopsis "Templating system for Python")
1503 (description
1504 "EmPy is a system for embedding Python expressions and statements in
1505 template text; it takes an EmPy source file, processes it, and produces
1506 output. This is accomplished via expansions, which are special signals to the
1507 EmPy system and are set off by a special prefix (by default the at sign, @@).
1508 EmPy can expand arbitrary Python expressions and statements in this way, as
1509 well as a variety of special forms. Textual data not explicitly delimited in
1510 this way is sent unaffected to the output, allowing Python to be used in
1511 effect as a markup language. Also supported are callbacks via hooks,
1512 recording and playback via diversions, and dynamic, chainable filters. The
1513 system is highly configurable via command line options and embedded
1514 commands.")
1515 (license license:lgpl2.1+)))
1516
1517 (define-public python2-element-tree
1518 (package
1519 (name "python2-element-tree")
1520 (version "1.2.6")
1521 (source (origin
1522 (method url-fetch)
1523 (uri (string-append
1524 "http://effbot.org/media/downloads/elementtree-"
1525 version "-20050316.tar.gz"))
1526 (sha256
1527 (base32
1528 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1529 (build-system python-build-system)
1530 (arguments
1531 `(#:python ,python-2 ; seems to be part of Python 3
1532 #:tests? #f)) ; no 'test' sub-command
1533 (synopsis "Toolkit for XML processing in Python")
1534 (description
1535 "ElementTree is a Python library supporting lightweight XML processing.")
1536 (home-page "http://effbot.org/zone/element-index.htm")
1537 (license (license:x11-style
1538 "http://docs.python.org/2/license.html"
1539 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1540
1541 (define-public python2-pybugz
1542 (package
1543 (name "python2-pybugz")
1544 (version "0.6.11")
1545 (source (origin
1546 (method url-fetch)
1547 (uri (string-append
1548 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1549 version ".tar.gz"))
1550 (sha256
1551 (base32
1552 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1553 (patches (search-patches "pybugz-stty.patch"
1554 "pybugz-encode-error.patch"))))
1555 (build-system python-build-system)
1556 (arguments
1557 `(#:python ,python-2 ; SyntaxError with Python 3
1558 #:tests? #f)) ; no 'test' sub-command
1559 (propagated-inputs
1560 `(("element-tree" ,python2-element-tree)))
1561 (synopsis "Python and command-line interface to Bugzilla")
1562 (description
1563 "PyBugz is a Python library and command-line tool to query the Bugzilla
1564 bug tracking system. It is meant as an aid to speed up interaction with the
1565 bug tracker.")
1566 (home-page "http://www.liquidx.net/pybugz/")
1567 (license license:gpl2)))
1568
1569 (define-public python-enum34
1570 (package
1571 (name "python-enum34")
1572 (version "1.1.6")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (pypi-uri "enum34" version))
1577 (sha256
1578 (base32
1579 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1580 (build-system python-build-system)
1581 (home-page "https://pypi.python.org/pypi/enum34")
1582 (synopsis "Backported Python 3.4 Enum")
1583 (description
1584 "Enum34 is the new Python stdlib enum module available in Python 3.4
1585 backported for previous versions of Python from 2.4 to 3.3.")
1586 (license license:bsd-3)))
1587
1588 (define-public python2-enum34
1589 (package-with-python2 python-enum34))
1590
1591 (define-public python-parse-type
1592 (package
1593 (name "python-parse-type")
1594 (version "0.3.4")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (string-append "https://pypi.python.org/packages/source/p/"
1599 "parse_type/parse_type-" version ".tar.gz"))
1600 (sha256
1601 (base32
1602 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1603 (build-system python-build-system)
1604 (arguments
1605 `(#:phases
1606 (modify-phases %standard-phases
1607 (add-after 'unpack 'patch-tests
1608 (lambda _
1609 (substitute* "tests/test_parse_type_parse.py"
1610 ;; Newer Python versions don't have the problem this test tests.
1611 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1612 ""))
1613 #t)))))
1614 (propagated-inputs
1615 `(("python-six" ,python-six)
1616 ("python-parse" ,python-parse)))
1617 (native-inputs
1618 `(("python-pytest" ,python-pytest)
1619 ("python-pytest-runner" ,python-pytest-runner)))
1620 (home-page "https://github.com/jenisys/parse_type")
1621 (synopsis "Extended parse module")
1622 (description
1623 "Parse_type extends the python parse module.")
1624 (properties
1625 `((python2-variant . ,(delay python2-parse-type))))
1626 (license license:bsd-3)))
1627
1628 (define-public python2-parse-type
1629 (let ((base (package-with-python2
1630 (strip-python2-variant python-parse-type))))
1631 (package (inherit base)
1632 (propagated-inputs
1633 `(("python2-enum34" ,python2-enum34)
1634 ,@(package-propagated-inputs base))))))
1635
1636 (define-public python-parse
1637 (package
1638 (name "python-parse")
1639 (version "1.6.6")
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (pypi-uri "parse" version))
1644 (sha256
1645 (base32
1646 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1647 (patches (search-patches "python-parse-too-many-fields.patch"))))
1648 (build-system python-build-system)
1649 (arguments
1650 `(#:phases
1651 (modify-phases %standard-phases
1652 (replace 'check
1653 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1654 (home-page "https://github.com/r1chardj0n3s/parse")
1655 (synopsis "Parse strings")
1656 (description
1657 "Parse strings using a specification based on the Python format()
1658 syntax.")
1659 (license license:x11)))
1660
1661 (define-public python-polib
1662 (package
1663 (name "python-polib")
1664 (version "1.0.8")
1665 (source (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "polib" version))
1668 (sha256
1669 (base32
1670 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1671 (build-system python-build-system)
1672 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1673 (synopsis "Manipulate, create and modify gettext files")
1674 (description "Polib can manipulate any gettext format (po, pot and mo)
1675 files. It can be used to create po files from scratch or to modify
1676 existing ones.")
1677 (license license:expat)))
1678
1679 (define-public python2-polib
1680 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1681 (package
1682 (inherit base)
1683 (arguments `(,@(package-arguments base)
1684 ;; Tests don't work with python2.
1685 #:tests? #f)))))
1686
1687 (define-public scons
1688 (package
1689 (name "scons")
1690 (version "2.5.1")
1691 (source (origin
1692 (method url-fetch)
1693 (uri (string-append "mirror://sourceforge/scons/scons/" version
1694 "/scons-" version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1698 (build-system python-build-system)
1699 (arguments
1700 ;; With Python 3.x, fails to build with a syntax error.
1701 `(#:python ,python-2
1702 #:use-setuptools? #f ; still relies on distutils
1703 #:tests? #f)) ; no 'python setup.py test' command
1704 (home-page "http://scons.org/")
1705 (synopsis "Software construction tool written in Python")
1706 (description
1707 "SCons is a software construction tool. Think of SCons as an improved,
1708 cross-platform substitute for the classic Make utility with integrated
1709 functionality similar to autoconf/automake and compiler caches such as ccache.
1710 In short, SCons is an easier, more reliable and faster way to build
1711 software.")
1712 (license license:x11)))
1713
1714 (define-public python-extras
1715 (package
1716 (name "python-extras")
1717 (version "0.0.3")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (string-append
1722 "https://pypi.python.org/packages/source/e/extras/extras-"
1723 version ".tar.gz"))
1724 (sha256
1725 (base32
1726 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1727 (build-system python-build-system)
1728 (arguments
1729 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1730 '(#:tests? #f))
1731 (home-page "https://github.com/testing-cabal/extras")
1732 (synopsis "Useful extensions to the Python standard library")
1733 (description
1734 "Extras is a set of extensions to the Python standard library.")
1735 (license license:expat)))
1736
1737 (define-public python2-extras
1738 (package-with-python2 python-extras))
1739
1740 (define-public python-mimeparse
1741 (package
1742 (name "python-mimeparse")
1743 (version "0.1.4")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (string-append
1748 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1749 version ".tar.gz"))
1750 (sha256
1751 (base32
1752 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1753 (build-system python-build-system)
1754 (arguments
1755 '(#:tests? #f)) ; no setup.py test command
1756 (home-page
1757 "https://github.com/dbtsai/python-mimeparse")
1758 (synopsis "Python library for parsing MIME types")
1759 (description
1760 "Mimeparse provides basic functions for parsing MIME type names and
1761 matching them against a list of media-ranges.")
1762 (license license:expat)))
1763
1764 (define-public python2-mimeparse
1765 (package-with-python2 python-mimeparse))
1766
1767 (define-public python-nose
1768 (package
1769 (name "python-nose")
1770 (version "1.3.7")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "nose" version))
1775 (sha256
1776 (base32
1777 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1778 (build-system python-build-system)
1779 (arguments
1780 '(#:tests? #f)) ; FIXME: test suite fails
1781 (home-page "http://readthedocs.org/docs/nose/")
1782 (synopsis "Python testing library")
1783 (description
1784 "Nose extends the unittest library to make testing easier.")
1785 (license license:lgpl2.0+)))
1786
1787 (define-public python2-nose
1788 (package-with-python2 python-nose))
1789
1790 (define-public python-nose2
1791 (package
1792 (name "python-nose2")
1793 (version "0.6.5")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (pypi-uri "nose2" version))
1798 (sha256
1799 (base32
1800 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1801 (build-system python-build-system)
1802 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1803 (propagated-inputs
1804 `(("python-cov-core" ,python-cov-core)
1805 ("python-pytest-cov" ,python-pytest-cov)
1806 ("python-six" ,python-six)))
1807 (home-page "https://github.com/nose-devs/nose2")
1808 (synopsis "Next generation of nicer testing for Python")
1809 (description
1810 "Nose2 is the next generation of nicer testing for Python, based on the
1811 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1812 better plugin api, being easier for users to configure, and simplifying internal
1813 interfaces and processes.")
1814 (license license:bsd-2)))
1815
1816 (define-public python2-nose2
1817 (package-with-python2 python-nose2))
1818
1819 (define-public python-unittest2
1820 (package
1821 (name "python-unittest2")
1822 (version "0.5.1")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (string-append
1827 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1828 version ".tar.gz"))
1829 (sha256
1830 (base32
1831 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1832 (build-system python-build-system)
1833 (home-page "http://pypi.python.org/pypi/unittest2")
1834 (synopsis "Python unit testing library")
1835 (description
1836 "Unittest2 is a replacement for the unittest module in the Python
1837 standard library.")
1838 (license license:psfl)))
1839
1840 (define-public python2-unittest2
1841 (package (inherit python-unittest2)
1842 (name "python2-unittest2")
1843 (version "1.1.0")
1844 (source
1845 (origin
1846 (method url-fetch)
1847 (uri (string-append
1848 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1849 version ".tar.gz"))
1850 (sha256
1851 (base32
1852 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))
1853 (patches
1854 (search-patches "python2-unittest2-remove-argparse.patch"))))
1855 (propagated-inputs
1856 `(("python2-six" ,python2-six)
1857 ("python2-traceback2" ,python2-traceback2)))
1858 (arguments
1859 `(#:python ,python-2
1860 #:tests? #f)))) ; no setup.py test command
1861
1862 (define-public python-pafy
1863 (package
1864 (name "python-pafy")
1865 (version "0.5.3.1")
1866 (source
1867 (origin
1868 (method url-fetch)
1869 (uri (pypi-uri "pafy" version))
1870 (sha256
1871 (base32
1872 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1873 (build-system python-build-system)
1874 (arguments
1875 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1876 (propagated-inputs
1877 ;; Youtube-dl is a python package which is imported in the file
1878 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1879 `(("youtube-dl" ,youtube-dl)))
1880 (home-page "https://np1.github.io/pafy/")
1881 (synopsis "Retrieve YouTube content and metadata")
1882 (description
1883 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1884 (license license:lgpl3+)))
1885
1886 (define-public python-py
1887 (package
1888 (name "python-py")
1889 (version "1.4.32")
1890 (source
1891 (origin
1892 (method url-fetch)
1893 (uri (pypi-uri "py" version))
1894 (sha256
1895 (base32
1896 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1897 (build-system python-build-system)
1898 (arguments
1899 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1900 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1901 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1902 ;; Is this module globally installed?"
1903 '(#:tests? #f))
1904 (home-page "http://pylib.readthedocs.org/")
1905 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1906 (description
1907 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1908 code introspection, and logging.")
1909 (license license:expat)))
1910
1911 (define-public python2-py
1912 (package-with-python2 python-py))
1913
1914 (define-public python-pytest
1915 (package
1916 (name "python-pytest")
1917 (version "2.7.3")
1918 (source
1919 (origin
1920 (method url-fetch)
1921 (uri (string-append
1922 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1923 version ".tar.gz"))
1924 (sha256
1925 (base32
1926 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1927 (modules '((guix build utils)))
1928 (snippet
1929 ;; One of the tests involves the /usr directory, so it fails.
1930 '(substitute* "testing/test_argcomplete.py"
1931 (("def test_remove_dir_prefix\\(self\\):")
1932 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1933 (build-system python-build-system)
1934 (propagated-inputs
1935 `(("python-py" ,python-py)))
1936 (native-inputs
1937 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
1938 ("bash" ,bash)
1939 ("python-nose" ,python-nose)
1940 ("python-mock" ,python-mock)))
1941 (home-page "http://pytest.org")
1942 (synopsis "Python testing library")
1943 (description
1944 "Pytest is a testing tool that provides auto-discovery of test modules
1945 and functions, detailed info on failing assert statements, modular fixtures,
1946 and many external plugins.")
1947 (license license:expat)))
1948
1949 (define-public python2-pytest
1950 (package-with-python2 python-pytest))
1951
1952 ;; Some packages require a newer pytest.
1953 (define-public python-pytest-3.0
1954 (package
1955 (inherit python-pytest)
1956 (name "python-pytest")
1957 (version "3.0.7")
1958 (source (origin
1959 (method url-fetch)
1960 (uri (pypi-uri "pytest" version))
1961 (sha256
1962 (base32
1963 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1964 (arguments
1965 `(#:phases
1966 (modify-phases %standard-phases
1967 (add-before 'check 'disable-invalid-test
1968 (lambda _
1969 (substitute* "testing/test_argcomplete.py"
1970 (("def test_remove_dir_prefix" line)
1971 (string-append "@pytest.mark.skip"
1972 "(reason=\"Assumes that /usr exists.\")\n "
1973 line)))
1974 #t)))))
1975 (native-inputs
1976 `(("python-hypothesis" ,python-hypothesis)
1977 ,@(package-native-inputs python-pytest)))
1978 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1979
1980 (define-public python2-pytest-3.0
1981 (let ((base (package-with-python2
1982 (strip-python2-variant python-pytest-3.0))))
1983 (package (inherit base)
1984 (native-inputs
1985 `(("python2-enum34" ,python2-enum34)
1986 ,@(package-native-inputs base))))))
1987
1988 (define-public python-pytest-cov
1989 (package
1990 (name "python-pytest-cov")
1991 (version "2.4.0")
1992 (source
1993 (origin
1994 (method url-fetch)
1995 (uri (pypi-uri "pytest-cov" version))
1996 (sha256
1997 (base32
1998 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1999 (build-system python-build-system)
2000 (arguments
2001 `(#:phases
2002 (modify-phases %standard-phases
2003 (replace 'check
2004 (lambda _
2005 ;; options taken from tox.ini
2006 ;; TODO: make "--restructuredtext" tests pass. They currently fail
2007 ;; with "Duplicate implicit target name"
2008 (zero? (system* "python" "./setup.py" "check"
2009 "--strict" "--metadata")))))))
2010 (propagated-inputs
2011 `(("python-coverage" ,python-coverage)
2012 ("python-pytest" ,python-pytest)))
2013 (home-page "https://github.com/pytest-dev/pytest-cov")
2014 (synopsis "Pytest plugin for measuring coverage")
2015 (description
2016 "Pytest-cov produces coverage reports. It supports centralised testing and
2017 distributed testing in both @code{load} and @code{each} modes. It also
2018 supports coverage of subprocesses.")
2019 (license license:expat)))
2020
2021 (define-public python2-pytest-cov
2022 (package-with-python2 python-pytest-cov))
2023
2024 (define-public python-pytest-runner
2025 (package
2026 (name "python-pytest-runner")
2027 (version "2.11.1")
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "pytest-runner" version))
2032 (sha256
2033 (base32
2034 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2035 (build-system python-build-system)
2036 (arguments
2037 `(#:phases
2038 (modify-phases %standard-phases
2039 ;; The fancy way of setting the version with setuptools_scm does not
2040 ;; seem to work here.
2041 (add-after 'unpack 'set-version
2042 (lambda _
2043 (substitute* "docs/conf.py"
2044 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2045 (string-append "version = \"" ,version "\"")))
2046 #t)))))
2047 (native-inputs
2048 `(("python-pytest" ,python-pytest)
2049 ("python-setuptools-scm" ,python-setuptools-scm)))
2050 (home-page "https://github.com/pytest-dev/pytest-runner")
2051 (synopsis "Invoke py.test as a distutils command")
2052 (description
2053 "This package provides a @command{pytest-runner} command that
2054 @file{setup.py} files can use to run tests.")
2055 (license license:expat)))
2056
2057 (define-public python2-pytest-runner
2058 (package-with-python2 python-pytest-runner))
2059
2060 (define-public python-pytest-mock
2061 (package
2062 (name "python-pytest-mock")
2063 (version "1.2")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "pytest-mock" version ".zip"))
2068 (sha256
2069 (base32
2070 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2071 (build-system python-build-system)
2072 (native-inputs
2073 `(("unzip" ,unzip)))
2074 (propagated-inputs
2075 `(("python-pytest" ,python-pytest)))
2076 (home-page "https://github.com/pytest-dev/pytest-mock/")
2077 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2078 (description
2079 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2080 around the patching API provided by the @code{mock} package, but with the
2081 benefit of not having to worry about undoing patches at the end of a test.
2082 The mocker fixture has the same API as @code{mock.patch}, supporting the
2083 same arguments.")
2084 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2085 (license license:expat)))
2086
2087 (define-public python2-pytest-mock
2088 (let ((base (package-with-python2
2089 (strip-python2-variant python-pytest-mock))))
2090 (package (inherit base)
2091 (propagated-inputs
2092 `(("python2-mock" ,python2-mock)
2093 ,@(package-propagated-inputs base))))))
2094
2095 (define-public python-pytest-xdist
2096 (package
2097 (name "python-pytest-xdist")
2098 (version "1.14")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (pypi-uri "pytest-xdist" version ".zip"))
2103 (sha256
2104 (base32
2105 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2106 (modules '((guix build utils)))
2107 (snippet
2108 '(begin
2109 ;; Remove pre-compiled .pyc files from source.
2110 (for-each delete-file-recursively
2111 (find-files "." "__pycache__" #:directories? #t))
2112 (for-each delete-file (find-files "." "\\.pyc$"))
2113 #t))))
2114 (build-system python-build-system)
2115 (arguments
2116 '(#:tests? #f)) ;FIXME: Some tests are failing.
2117 ;; #:phases
2118 ;; (modify-phases %standard-phases
2119 ;; (delete 'check)
2120 ;; (add-after 'install 'check
2121 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2122 ;; (add-installed-pythonpath inputs outputs)
2123 ;; (zero? (system* "py.test" "-v")))))
2124 (native-inputs
2125 `(("unzip" ,unzip)
2126 ("python-setuptools-scm" ,python-setuptools-scm)))
2127 (propagated-inputs
2128 `(("python-execnet" ,python-execnet)
2129 ("python-pytest" ,python-pytest)
2130 ("python-py" ,python-py)))
2131 (home-page
2132 "https://github.com/pytest-dev/pytest-xdist")
2133 (synopsis
2134 "Plugin for py.test with distributed testing and loop-on-failing modes")
2135 (description
2136 "The pytest-xdist plugin extends py.test with some unique test execution
2137 modes: parallelization, running tests in boxed subprocesses, the ability
2138 to run tests repeatedly when failed, and the ability to run tests on multiple
2139 Python interpreters or platforms. It uses rsync to copy the existing
2140 program code to a remote location, executes there, and then syncs the
2141 result back.")
2142 (license license:expat)))
2143
2144 (define-public python2-pytest-xdist
2145 (package-with-python2 python-pytest-xdist))
2146
2147 (define-public python-scripttest
2148 (package
2149 (name "python-scripttest")
2150 (version "1.3")
2151 (source
2152 (origin
2153 (method url-fetch)
2154 (uri (string-append
2155 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2156 version ".tar.gz"))
2157 (sha256
2158 (base32
2159 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2160 (build-system python-build-system)
2161 (native-inputs
2162 `(("python-pytest" ,python-pytest)))
2163 (home-page "http://pythonpaste.org/scripttest/")
2164 (synopsis "Python library to test command-line scripts")
2165 (description "Scripttest is a Python helper library for testing
2166 interactive command-line applications. With it you can run a script in a
2167 subprocess and see the output as well as any file modifications.")
2168 (license license:expat)))
2169
2170 (define-public python2-scripttest
2171 (package-with-python2 python-scripttest))
2172
2173 (define-public python-testtools
2174 (package
2175 (name "python-testtools")
2176 (version "1.4.0")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "testtools" version))
2181 (sha256
2182 (base32
2183 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2184 (build-system python-build-system)
2185 (arguments
2186 `(#:phases
2187 (modify-phases %standard-phases
2188 (add-after 'unpack 'fix-module-imports
2189 (lambda _
2190 (substitute* "setup.py"
2191 (("'unittest2>=0.8.0',") ""))
2192 (substitute* '("testtools/testcase.py"
2193 "testtools/testsuite.py"
2194 "testtools/run.py"
2195 "testtools/tests/test_run.py"
2196 "testtools/tests/test_testsuite.py"
2197 "testtools/tests/test_deferredruntest.py")
2198 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2199 (("import unittest2 as unittest") "import unittest")
2200 (("import unittest2") "import unittest as unittest2")
2201 (("from unittest2 import") "from unittest import"))
2202 (substitute* "testtools/tests/test_testresult.py"
2203 ;; NUL in source code is not allowed (raises ValueError).
2204 (("\\x00\\x04") "\\x04"))
2205 #t)))))
2206 (propagated-inputs
2207 `(("python-mimeparse" ,python-mimeparse)
2208 ("python-extras" ,python-extras)))
2209 (home-page "https://github.com/testing-cabal/testtools")
2210 (synopsis
2211 "Extensions to the Python standard library unit testing framework")
2212 (description
2213 "Testtools extends the Python standard library unit testing framework to
2214 provide matchers, more debugging information, and cross-Python
2215 compatibility.")
2216 (license license:psfl)))
2217
2218 (define-public python2-testtools
2219 (package-with-python2 python-testtools))
2220
2221 (define-public python-testscenarios
2222 (package
2223 (name "python-testscenarios")
2224 (version "0.4")
2225 (source
2226 (origin
2227 (method url-fetch)
2228 (uri (string-append
2229 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2230 version ".tar.gz"))
2231 (sha256
2232 (base32
2233 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2234 (build-system python-build-system)
2235 (propagated-inputs
2236 `(("python-testtools" ,python-testtools)))
2237 (home-page "https://launchpad.net/testscenarios")
2238 (synopsis "Pyunit extension for dependency injection")
2239 (description
2240 "Testscenarios provides clean dependency injection for Python unittest
2241 style tests.")
2242 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2243
2244 (define-public python2-testscenarios
2245 (package-with-python2 python-testscenarios))
2246
2247 (define-public python-testresources
2248 (package
2249 (name "python-testresources")
2250 (version "0.2.7")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (string-append
2255 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2256 version ".tar.gz"))
2257 (sha256
2258 (base32
2259 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2260 (build-system python-build-system)
2261 (home-page "https://launchpad.net/testresources")
2262 (synopsis
2263 "Pyunit extension for managing test resources")
2264 (description
2265 "Testresources is an extension to Python's unittest to allow declarative
2266 use of resources by test cases.")
2267 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2268
2269 (define-public python2-testresources
2270 (package-with-python2 python-testresources))
2271
2272 (define-public python-subunit
2273 (package
2274 (name "python-subunit")
2275 (version "0.0.21")
2276 (source
2277 (origin
2278 (method url-fetch)
2279 (uri (string-append
2280 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2281 version ".tar.gz"))
2282 (sha256
2283 (base32
2284 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2285 (build-system python-build-system)
2286 (propagated-inputs
2287 `(("python-extras" ,python-extras)
2288 ("python-mimeparse" ,python-mimeparse)))
2289 (native-inputs
2290 `(("python-testscenarios" ,python-testscenarios)))
2291 (home-page "http://launchpad.net/subunit")
2292 (synopsis "Python implementation of the subunit protocol")
2293 (description
2294 "Python-subunit is a Python implementation of the subunit test streaming
2295 protocol.")
2296 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2297
2298 (define-public python2-subunit
2299 (package-with-python2 python-subunit))
2300
2301 ;; Recent versions of python-fixtures and python-testrepository need
2302 ;; python-pbr for packaging, which itself needs these two packages for
2303 ;; testing.
2304 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2305 ;; same source, just without any test dependencies and with tests disabled.
2306 ;; python-pbr-minmal is then used to package python-fixtures and
2307 ;; python-testrepository.
2308 ;; Strictly speaking we currently could remove the test-requirements from the
2309 ;; normal python-pbr package (and save this package) since test are disabled
2310 ;; there anyway. But this may change in future.
2311 (define python-pbr-minimal
2312 (package
2313 (name "python-pbr-minimal")
2314 (version "3.0.1")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "pbr" version))
2319 (sha256
2320 (base32
2321 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2322 (build-system python-build-system)
2323 (arguments
2324 `(#:tests? #f))
2325 (home-page "http://docs.openstack.org/developer/pbr/")
2326 (synopsis "Minimal build of python-pbr used for bootstrapping")
2327 (description
2328 "Used only for bootstrapping python2-pbr, you should not need this.")
2329 (license license:asl2.0)))
2330
2331 (define python2-pbr-minimal
2332 (package-with-python2 python-pbr-minimal))
2333
2334 (define-public python-pbr
2335 (package
2336 (inherit python-pbr-minimal)
2337 (name "python-pbr")
2338 (arguments
2339 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2340 (propagated-inputs
2341 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2342 (native-inputs
2343 `(("python-fixtures" ,python-fixtures)
2344 ;; discover, coverage, hacking, subunit
2345 ("python-mock" ,python-mock)
2346 ("python-six" ,python-six)
2347 ("python-sphinx" ,python-sphinx)
2348 ("python-testrepository" ,python-testrepository)
2349 ("python-testresources" ,python-testresources)
2350 ("python-testscenarios" ,python-testscenarios)
2351 ("python-testtools" ,python-testtools)
2352 ("python-virtualenv" ,python-virtualenv)))
2353 (synopsis "Enhance the default behavior of Python’s setuptools")
2354 (description
2355 "Python Build Reasonableness (PBR) is a library that injects some useful
2356 and sensible default behaviors into your setuptools run. It will set
2357 versions, process requirements files and generate AUTHORS and ChangeLog file
2358 from git information.
2359 ")))
2360
2361 (define-public python2-pbr
2362 (package-with-python2 python-pbr))
2363
2364 (define-public python-fixtures
2365 (package
2366 (name "python-fixtures")
2367 (version "1.4.0")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (pypi-uri "fixtures" version))
2372 (sha256
2373 (base32
2374 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2375 (build-system python-build-system)
2376 (arguments
2377 '(#:phases
2378 (modify-phases %standard-phases
2379 (replace 'check
2380 (lambda _
2381 (zero? (system* "python" "-m" "testtools.run"
2382 "fixtures.test_suite")))))))
2383 (propagated-inputs
2384 `(("python-six" ,python-six)))
2385 (native-inputs
2386 `(("python-mock" ,python-mock)
2387 ("python-pbr-minimal" ,python-pbr-minimal)
2388 ("python-testtools" ,python-testtools)))
2389 (home-page "https://launchpad.net/python-fixtures")
2390 (synopsis "Python test fixture library")
2391 (description
2392 "Fixtures provides a way to create reusable state, useful when writing
2393 Python tests.")
2394 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2395
2396 (define-public python2-fixtures
2397 (package-with-python2 python-fixtures))
2398
2399 (define-public python-testrepository
2400 (package
2401 (name "python-testrepository")
2402 (version "0.0.20")
2403 (source
2404 (origin
2405 (method url-fetch)
2406 (uri (string-append
2407 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2408 version ".tar.gz"))
2409 (sha256
2410 (base32
2411 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2412 (build-system python-build-system)
2413 (arguments
2414 ;; FIXME: Many tests are failing.
2415 '(#:tests? #f))
2416 (propagated-inputs
2417 `(("python-fixtures" ,python-fixtures)
2418 ("python-subunit" ,python-subunit)
2419 ("python-testtools" ,python-testtools)))
2420 (native-inputs
2421 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2422 ("python-mimeparse" ,python-mimeparse)))
2423 (home-page "https://launchpad.net/testrepository")
2424 (synopsis "Database for Python test results")
2425 (description "Testrepository provides a database of test results which can
2426 be used as part of a developer's workflow to check things such as what tests
2427 have failed since the last commit or what tests are currently failing.")
2428 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2429
2430 (define-public python2-testrepository
2431 (package-with-python2 python-testrepository))
2432
2433 (define-public python-coverage
2434 (package
2435 (name "python-coverage")
2436 (version "4.1")
2437 (source
2438 (origin
2439 (method url-fetch)
2440 (uri (pypi-uri "coverage" version))
2441 (sha256
2442 (base32
2443 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2444 (build-system python-build-system)
2445 (arguments
2446 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2447 '(#:tests? #f))
2448 (home-page "http://nedbatchelder.com/code/coverage")
2449 (synopsis "Code coverage measurement for Python")
2450 (description
2451 "Coverage measures code coverage, typically during test execution. It
2452 uses the code analysis tools and tracing hooks provided in the Python standard
2453 library to determine which lines are executable, and which have been
2454 executed.")
2455 (license license:bsd-3)))
2456
2457 (define-public python2-coverage
2458 (package-with-python2 python-coverage))
2459
2460 (define-public python-cov-core
2461 (package
2462 (name "python-cov-core")
2463 (version "1.15.0")
2464 (source
2465 (origin
2466 (method url-fetch)
2467 (uri (pypi-uri "cov-core" version))
2468 (sha256
2469 (base32
2470 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2471 (build-system python-build-system)
2472 (propagated-inputs
2473 `(("python-coverage" ,python-coverage)))
2474 (home-page "https://github.com/schlamar/cov-core")
2475 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2476 (description
2477 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2478 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2479 testing frameworks.")
2480 (license license:expat)))
2481
2482 (define-public python2-cov-core
2483 (package-with-python2 python-cov-core))
2484
2485 (define-public python-discover
2486 (package
2487 (name "python-discover")
2488 (version "0.4.0")
2489 (source
2490 (origin
2491 (method url-fetch)
2492 (uri (string-append
2493 "https://pypi.python.org/packages/source/d/discover/discover-"
2494 version ".tar.gz"))
2495 (sha256
2496 (base32
2497 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2498 (build-system python-build-system)
2499 (home-page "http://pypi.python.org/pypi/discover/")
2500 (synopsis
2501 "Python test discovery for unittest")
2502 (description
2503 "Discover provides test discovery for unittest, a feature that has been
2504 backported from Python 2.7 for Python 2.4+.")
2505 (license license:bsd-3)))
2506
2507 (define-public python2-discover
2508 (package-with-python2 python-discover))
2509
2510 (define-public behave
2511 (package
2512 (name "behave")
2513 (version "1.2.5")
2514 (source (origin
2515 (method url-fetch)
2516 (uri (pypi-uri "behave" version ".tar.bz2"))
2517 (sha256
2518 (base32
2519 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2520 (build-system python-build-system)
2521 (propagated-inputs
2522 `(("python-six" ,python-six)
2523 ("python-parse" ,python-parse)
2524 ("python-parse-type" ,python-parse-type)))
2525 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2526 ;PyHamcrest>=1.8
2527 (home-page "https://github.com/behave/behave")
2528 (synopsis "Python behavior-driven development")
2529 (description
2530 "Behave is a tool for behavior-driven development in python.
2531 Behavior-driven development (or BDD) is an agile software development
2532 technique that encourages collaboration between developers, QA and
2533 non-technical or business participants in a software project. Behave uses
2534 tests written in a natural language style, backed up by Python code.")
2535 (license license:x11)))
2536
2537 (define-public python-exif-read
2538 (package
2539 (name "python-exif-read")
2540 (version "2.1.2")
2541 (source (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "ExifRead" version))
2544 (sha256
2545 (base32
2546 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2547 (build-system python-build-system)
2548 (arguments `(#:tests? #f)) ; no tests
2549 (home-page "https://github.com/ianare/exif-py")
2550 (synopsis "Python library to extract EXIF data from image files")
2551 (description
2552 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2553 files.")
2554 (license license:bsd-3)))
2555
2556 (define-public python2-exif-read
2557 (package-with-python2 python-exif-read))
2558
2559 (define-public python-pyld
2560 (package
2561 (name "python-pyld")
2562 (version "0.7.1")
2563 (source (origin
2564 (method url-fetch)
2565 (uri (pypi-uri "PyLD" version))
2566 (sha256
2567 (base32
2568 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2569 (build-system python-build-system)
2570 (arguments `(#:tests? #f)) ; no tests
2571 (home-page "https://github.com/digitalbazaar/pyld")
2572 (synopsis "Python implementation of the JSON-LD specification")
2573 (description
2574 "PyLD is an implementation of the JSON-LD specification.")
2575 (license license:bsd-3)))
2576
2577 (define-public python2-pyld
2578 (package-with-python2 python-pyld))
2579
2580 (define-public python-certifi
2581 (package
2582 (name "python-certifi")
2583 (version "2017.1.23")
2584 (source (origin
2585 (method url-fetch)
2586 (uri (pypi-uri "certifi" version))
2587 (sha256
2588 (base32
2589 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2590 (build-system python-build-system)
2591 (home-page "https://certifi.io/")
2592 (synopsis "Python CA certificate bundle")
2593 (description
2594 "Certifi is a Python library that contains a CA certificate bundle, which
2595 is used by the Requests library to verify HTTPS requests.")
2596 (license license:asl2.0)))
2597
2598 (define-public python2-certifi
2599 (package-with-python2 python-certifi))
2600
2601 (define-public python-click
2602 (package
2603 (name "python-click")
2604 (version "6.7")
2605 (source
2606 (origin
2607 (method url-fetch)
2608 (uri (pypi-uri "click" version))
2609 (sha256
2610 (base32
2611 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2612 (build-system python-build-system)
2613 (arguments
2614 `(#:phases
2615 (modify-phases %standard-phases
2616 (add-after 'unpack 'fix-paths
2617 (lambda* (#:key inputs #:allow-other-keys)
2618 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2619 "cross-libc" "libc"))))
2620 (substitute* "click/_unicodefun.py"
2621 (("'locale'")
2622 (string-append "'" glibc "/bin/locale'"))))
2623 #t))
2624 (replace 'check
2625 (lambda _
2626 (zero? (system* "make" "test")))))))
2627 (native-inputs
2628 `(("python-pytest" ,python-pytest)))
2629 (home-page "http://click.pocoo.org")
2630 (synopsis "Command line library for Python")
2631 (description
2632 "Click is a Python package for creating command line interfaces in a
2633 composable way with as little code as necessary. Its name stands for
2634 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2635 with sensible defaults out of the box.")
2636 (license license:bsd-3)))
2637
2638 (define-public python2-click
2639 (package-with-python2 python-click))
2640
2641 (define-public python-wheel
2642 (package
2643 (name "python-wheel")
2644 (version "0.30.0a0")
2645 (source
2646 (origin
2647 (method url-fetch)
2648 (uri (pypi-uri "wheel" version))
2649 (sha256
2650 (base32
2651 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2652 (build-system python-build-system)
2653 (native-inputs
2654 `(("python-jsonschema" ,python-jsonschema)
2655 ("python-pytest-cov" ,python-pytest-cov)))
2656 (home-page "https://bitbucket.org/pypa/wheel/")
2657 (synopsis "Format for built Python packages")
2658 (description
2659 "A wheel is a ZIP-format archive with a specially formatted filename and
2660 the @code{.whl} extension. It is designed to contain all the files for a PEP
2661 376 compatible install in a way that is very close to the on-disk format. Many
2662 packages will be properly installed with only the @code{Unpack} step and the
2663 unpacked archive preserves enough information to @code{Spread} (copy data and
2664 scripts to their final locations) at any later time. Wheel files can be
2665 installed with a newer @code{pip} or with wheel's own command line utility.")
2666 (license license:expat)
2667 (properties `((python2-variant . ,(delay python2-wheel))))))
2668
2669 (define-public python2-wheel
2670 (let ((wheel (package-with-python2
2671 (strip-python2-variant python-wheel))))
2672 (package (inherit wheel)
2673 (native-inputs `(("python2-functools32" ,python2-functools32)
2674 ,@(package-native-inputs wheel))))))
2675
2676
2677 (define-public python-requests
2678 (package
2679 (name "python-requests")
2680 (version "2.13.0")
2681 (source (origin
2682 (method url-fetch)
2683 (uri (pypi-uri "requests" version))
2684 (sha256
2685 (base32
2686 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2687 ;; TODO: unbundle urllib3 and chardet.
2688 (build-system python-build-system)
2689 (arguments
2690 ;; FIXME: Some tests require network access.
2691 '(#:tests? #f))
2692 (home-page "http://python-requests.org/")
2693 (synopsis "Python HTTP library")
2694 (description
2695 "Requests is a Python HTTP client library. It aims to be easier to use
2696 than Python’s urllib2 library.")
2697 (license license:asl2.0)))
2698
2699 ;; Some software requires an older version of Requests, notably Docker
2700 ;; Compose.
2701 (define-public python-requests-2.7
2702 (package (inherit python-requests)
2703 (version "2.7.0")
2704 (source (origin
2705 (method url-fetch)
2706 (uri (pypi-uri "requests" version))
2707 (sha256
2708 (base32
2709 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2710
2711 (define-public python2-requests
2712 (package-with-python2 python-requests))
2713
2714 (define-public python-vcversioner
2715 (package
2716 (name "python-vcversioner")
2717 (version "2.16.0.0")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "vcversioner" version))
2722 (sha256
2723 (base32
2724 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2725 (build-system python-build-system)
2726 (synopsis "Python library for version number discovery")
2727 (description "Vcversioner is a Python library that inspects tagging
2728 information in a variety of version control systems in order to discover
2729 version numbers.")
2730 (home-page "https://github.com/habnabit/vcversioner")
2731 (license license:isc)))
2732
2733 (define-public python2-vcversioner
2734 (package-with-python2 python-vcversioner))
2735
2736 (define-public python-jsonschema
2737 (package
2738 (name "python-jsonschema")
2739 (version "2.5.1")
2740 (source (origin
2741 (method url-fetch)
2742 (uri
2743 (string-append
2744 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2745 version ".tar.gz"))
2746 (sha256
2747 (base32
2748 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2749 (build-system python-build-system)
2750 (arguments
2751 '(#:phases
2752 (modify-phases %standard-phases
2753 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2754 (native-inputs
2755 `(("python-nose" ,python-nose)
2756 ("python-vcversioner" ,python-vcversioner)))
2757 (home-page "https://github.com/Julian/jsonschema")
2758 (synopsis "Implementation of JSON Schema for Python")
2759 (description
2760 "Jsonschema is an implementation of JSON Schema for Python.")
2761 (license license:expat)
2762 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2763
2764 (define-public python2-jsonschema
2765 (let ((jsonschema (package-with-python2
2766 (strip-python2-variant python-jsonschema))))
2767 (package (inherit jsonschema)
2768 (native-inputs
2769 `(("python2-mock" ,python2-mock)
2770 ,@(package-native-inputs jsonschema)))
2771 (propagated-inputs
2772 `(("python2-functools32" ,python2-functools32))))))
2773
2774 (define-public python-schema
2775 (package
2776 (name "python-schema")
2777 (version "0.6.6")
2778 (source
2779 (origin
2780 (method url-fetch)
2781 (uri (pypi-uri "schema" version))
2782 (sha256
2783 (base32
2784 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2785 (build-system python-build-system)
2786 (native-inputs
2787 `(("python-pytest" ,python-pytest)))
2788 (home-page "https://github.com/keleshev/schema")
2789 (synopsis "Simple data validation library")
2790 (description
2791 "@code{python-schema} is a library for validating Python data
2792 structures, such as those obtained from config-files, forms, external
2793 services or command-line parsing, converted from JSON/YAML (or
2794 something else) to Python data-types.")
2795 (license license:psfl)))
2796
2797 (define-public python2-schema
2798 (package-with-python2 python-schema))
2799
2800 (define-public python-schema-0.5
2801 (package (inherit python-schema)
2802 (version "0.5.0")
2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "schema" version))
2807 (sha256
2808 (base32
2809 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2810
2811 (define-public python2-schema-0.5
2812 (package-with-python2 python-schema-0.5))
2813
2814 (define-public python-kitchen
2815 (package
2816 (name "python-kitchen")
2817 (version "1.2.4")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (pypi-uri "kitchen" version))
2822 (sha256
2823 (base32
2824 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2825 (build-system python-build-system)
2826 (propagated-inputs
2827 `(("python-chardet" ,python-chardet)))
2828 (home-page "https://github.com/fedora-infra/kitchen")
2829 (synopsis "Python API for snippets")
2830 (description "@code{kitchen} module provides a python API for all sorts of
2831 little useful snippets of code that everybody ends up writing for their projects
2832 but never seem big enough to build an independent release. Use kitchen and stop
2833 cutting and pasting that code over and over.")
2834 (license (list license:lgpl2.1+
2835 ;; subprocess.py, test_subprocess.py,
2836 ;; kitchen/pycompat25/defaultdict.py:
2837 license:psfl))))
2838
2839 (define-public python2-kitchen
2840 (package-with-python2 python-kitchen))
2841
2842 (define-public python-unidecode
2843 (package
2844 (name "python-unidecode")
2845 (version "0.04.21")
2846 (source (origin
2847 (method url-fetch)
2848 (uri (pypi-uri "Unidecode" version))
2849 (sha256
2850 (base32
2851 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2852 (build-system python-build-system)
2853 (home-page "https://pypi.python.org/pypi/Unidecode")
2854 (synopsis "ASCII transliterations of Unicode text")
2855 (description
2856 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2857 useful when integrating with legacy code that doesn't support Unicode, or for
2858 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2859 machine identifiers from human-readable Unicode strings that should still be
2860 somewhat intelligible.")
2861 (license license:gpl2+)))
2862
2863 (define-public python2-unidecode
2864 (package-with-python2 python-unidecode))
2865
2866 (define-public python-pyjwt
2867 (package
2868 (name "python-pyjwt")
2869 (version "1.5.3")
2870 (source
2871 (origin
2872 (method url-fetch)
2873 (uri (pypi-uri "PyJWT" version))
2874 (sha256
2875 (base32
2876 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2877 (modules '((guix build utils)))
2878 (snippet
2879 '(begin
2880 (for-each delete-file-recursively
2881 (find-files "." "\\.pyc$"))
2882 #t))))
2883 (build-system python-build-system)
2884 (native-inputs
2885 `(("python-pytest" ,python-pytest-3.0)
2886 ("python-pytest-cov" ,python-pytest-cov)
2887 ("python-pytest-runner" ,python-pytest-runner)))
2888 (home-page "https://github.com/progrium/pyjwt")
2889 (synopsis "JSON Web Token implementation in Python")
2890 (description
2891 "PyJWT is a JSON Web Token implementation written in Python.")
2892 (license license:expat)))
2893
2894 (define-public python2-pyjwt
2895 (package-with-python2 python-pyjwt))
2896
2897 (define-public python-pykka
2898 (package
2899 (name "python-pykka")
2900 (version "1.2.1")
2901 (source
2902 (origin
2903 (method url-fetch)
2904 (uri (pypi-uri "Pykka" version))
2905 (sha256
2906 (base32
2907 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2908 (build-system python-build-system)
2909 (native-inputs
2910 `(("python-mock" ,python-mock)
2911 ("python-nose" ,python-nose)
2912 ("python-gevent" ,python-gevent)
2913 ("python-eventlet" ,python-eventlet)))
2914 (home-page "https://www.pykka.org/")
2915 (synopsis "Pykka is a Python implementation of the actor model")
2916 (description
2917 "Pykka is a Python implementation of the actor model.
2918 The actor model introduces some simple rules to control the sharing
2919 of state and cooperation between execution units, which makes it
2920 easier to build concurrent applications.")
2921 (license license:asl2.0)))
2922
2923 (define-public python2-pykka
2924 (package-with-python2 python-pykka))
2925
2926 (define-public python-oauthlib
2927 (package
2928 (name "python-oauthlib")
2929 (version "1.0.3")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "oauthlib" version))
2933 (sha256
2934 (base32
2935 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2936 (build-system python-build-system)
2937 (native-inputs
2938 `(("python-nose" ,python-nose)
2939 ("python-mock" ,python-mock)
2940 ("python-cryptography" ,python-cryptography)
2941 ("python-pyjwt" ,python-pyjwt)
2942 ("python-blinker" ,python-blinker)))
2943 (home-page "https://github.com/idan/oauthlib")
2944 (synopsis "OAuth implementation for Python")
2945 (description
2946 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2947 OAuth request-signing logic.")
2948 (license license:bsd-3)
2949 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2950
2951 (define-public python2-oauthlib
2952 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2953 (package
2954 (inherit base)
2955 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2956 ,@(package-native-inputs base))))))
2957
2958 (define-public python-itsdangerous
2959 (package
2960 (name "python-itsdangerous")
2961 (version "0.24")
2962 (source
2963 (origin
2964 (method url-fetch)
2965 (uri (string-append
2966 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2967 version ".tar.gz"))
2968 (sha256
2969 (base32
2970 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2971 (build-system python-build-system)
2972 (home-page "https://github.com/mitsuhiko/itsdangerous")
2973 (synopsis "Python library for passing data to/from untrusted environments")
2974 (description
2975 "Itsdangerous provides various helpers to pass trusted data to untrusted
2976 environments and back.")
2977 (license license:bsd-3)))
2978
2979 (define-public python2-itsdangerous
2980 (package-with-python2 python-itsdangerous))
2981
2982 (define-public python-pyyaml
2983 (package
2984 (name "python-pyyaml")
2985 (version "3.12")
2986 (source
2987 (origin
2988 (method url-fetch)
2989 (uri (pypi-uri "PyYAML" version))
2990 (sha256
2991 (base32
2992 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2993 (build-system python-build-system)
2994 (inputs
2995 `(("libyaml" ,libyaml)))
2996 (home-page "http://pyyaml.org/wiki/PyYAML")
2997 (synopsis "YAML parser and emitter for Python")
2998 (description
2999 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3000 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3001 API, and sensible error messages. PyYAML supports standard YAML tags and
3002 provides Python-specific tags that allow to represent an arbitrary Python
3003 object.")
3004 (license license:expat)))
3005
3006 (define-public python2-pyyaml
3007 (package-with-python2 python-pyyaml))
3008
3009 (define-public python-virtualenv
3010 (package
3011 (name "python-virtualenv")
3012 (version "15.0.3")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (pypi-uri "virtualenv" version))
3017 (sha256
3018 (base32
3019 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
3020 (build-system python-build-system)
3021 (arguments
3022 `(#:phases
3023 (modify-phases %standard-phases
3024 (replace 'check
3025 (lambda _
3026 ;; Disable failing test. See upstream bug report
3027 ;; https://github.com/pypa/virtualenv/issues/957
3028 (substitute* "tests/test_virtualenv.py"
3029 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
3030 (zero? (system* "py.test")))))))
3031 (native-inputs
3032 `(("python-mock" ,python-mock)
3033 ("python-pytest" ,python-pytest)))
3034 (home-page "https://virtualenv.pypa.io/")
3035 (synopsis "Virtual Python environment builder")
3036 (description
3037 "Virtualenv is a tool to create isolated Python environments.")
3038 (license license:expat)))
3039
3040 (define-public python2-virtualenv
3041 (package-with-python2 python-virtualenv))
3042
3043 (define-public python-markupsafe
3044 (package
3045 (name "python-markupsafe")
3046 (version "0.23")
3047 (source
3048 (origin
3049 (method url-fetch)
3050 (uri (string-append
3051 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3052 version ".tar.gz"))
3053 (sha256
3054 (base32
3055 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3056 (build-system python-build-system)
3057 (home-page "https://github.com/mitsuhiko/markupsafe")
3058 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3059 (description
3060 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3061 for Python.")
3062 (license license:bsd-3)))
3063
3064 (define-public python2-markupsafe
3065 (package-with-python2 python-markupsafe))
3066
3067 (define-public python-jinja2
3068 (package
3069 (name "python-jinja2")
3070 (version "2.9.6")
3071 (source
3072 (origin
3073 (method url-fetch)
3074 (uri (pypi-uri "Jinja2" version))
3075 (sha256
3076 (base32
3077 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
3078 (build-system python-build-system)
3079 (arguments
3080 `(#:phases
3081 (modify-phases %standard-phases
3082 ;; These files cannot be built with Python < 3.6. See
3083 ;; https://github.com/pallets/jinja/issues/655
3084 ;; FIXME: Remove this when the "python" package is upgraded.
3085 (add-after 'unpack 'delete-incompatible-files
3086 (lambda _
3087 (for-each delete-file
3088 '("jinja2/asyncsupport.py"
3089 "jinja2/asyncfilters.py"))
3090 #t)))))
3091 (propagated-inputs
3092 `(("python-markupsafe" ,python-markupsafe)))
3093 (home-page "http://jinja.pocoo.org/")
3094 (synopsis "Python template engine")
3095 (description
3096 "Jinja2 is a small but fast and easy to use stand-alone template engine
3097 written in pure Python.")
3098 (license license:bsd-3)))
3099
3100 (define-public python2-jinja2
3101 (package-with-python2 python-jinja2))
3102
3103 (define-public python-pystache
3104 (package
3105 (name "python-pystache")
3106 (version "0.5.4")
3107 (source (origin
3108 (method url-fetch)
3109 (uri (pypi-uri "pystache" version))
3110 (sha256
3111 (base32
3112 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3113 (build-system python-build-system)
3114 (arguments
3115 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3116 (home-page "http://defunkt.io/pystache/")
3117 (synopsis "Python logic-less template engine")
3118 (description
3119 "Pystache is a Python implementation of the framework agnostic,
3120 logic-free templating system Mustache.")
3121 (license license:expat)
3122 (properties `((python2-variant . ,(delay python2-pystache))))))
3123
3124 (define-public python2-pystache
3125 (package (inherit (package-with-python2
3126 (strip-python2-variant python-pystache)))
3127 (arguments
3128 `(#:python ,python-2
3129 #:phases
3130 (modify-phases %standard-phases
3131 (replace 'check
3132 (lambda _
3133 (zero? (system* "python" "test_pystache.py")))))))))
3134
3135 (define-public python-joblib
3136 (package
3137 (name "python-joblib")
3138 (version "0.10.3")
3139 (source (origin
3140 (method url-fetch)
3141 (uri (pypi-uri "joblib" version))
3142 (sha256
3143 (base32
3144 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3145 (modules '((guix build utils)))
3146 (snippet
3147 '(begin
3148 ;; Remove pre-compiled .pyc files from source.
3149 (for-each delete-file-recursively
3150 (find-files "." "__pycache__" #:directories? #t))
3151 (for-each delete-file (find-files "." "\\.pyc$"))
3152 #t))))
3153 (build-system python-build-system)
3154 (arguments
3155 `(#:phases
3156 (modify-phases %standard-phases
3157 (add-before 'check 'disable-failing-tests
3158 (lambda _
3159 ;; This numpydoc tests fails for unknown reasons
3160 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3161 ;; This numpydoc test depends on matplotlib, which is not a
3162 ;; required input.
3163 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3164 ;; These tests fail to execute sys.executable
3165 (substitute* "joblib/test/test_parallel.py"
3166 (("import nose" line)
3167 (string-append "from nose.plugins.skip import SkipTest\n" line))
3168 (("def test_nested_parallel_warnings" line)
3169 (string-append "@SkipTest\n" line))
3170 (("def test_parallel_with_interactively_defined_functions" line)
3171 (string-append "@SkipTest\n" line)))
3172 #t)))))
3173 ;; Provide nose to enable tests command
3174 (native-inputs
3175 `(("python-nose" ,python-nose)
3176 ("python-sphinx" ,python-sphinx)
3177 ("python-docutils" ,python-docutils)
3178 ("python-numpydoc" ,python-numpydoc)))
3179 (home-page "http://pythonhosted.org/joblib/")
3180 (synopsis "Using Python functions as pipeline jobs")
3181 (description
3182 "Joblib is a set of tools to provide lightweight pipelining in Python.
3183 In particular, joblib offers: transparent disk-caching of the output values
3184 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3185 logging and tracing of the execution.")
3186 (license license:bsd-3)))
3187
3188 (define-public python2-joblib
3189 (package-with-python2 python-joblib))
3190
3191 (define-public python-docutils
3192 (package
3193 (name "python-docutils")
3194 (version "0.13.1")
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "docutils" version))
3199 (sha256
3200 (base32
3201 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3202 (build-system python-build-system)
3203 (arguments
3204 '(#:tests? #f)) ; no setup.py test command
3205 (home-page "http://docutils.sourceforge.net/")
3206 (synopsis "Python Documentation Utilities")
3207 (description
3208 "Docutils is a modular system for processing documentation into useful
3209 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3210 reStructuredText.")
3211 ;; Most of the source code is public domain, but some source files are
3212 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3213 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3214
3215 (define-public python2-docutils
3216 (package-with-python2 python-docutils))
3217
3218 (define-public python-pygments
3219 (package
3220 (name "python-pygments")
3221 (version "2.2.0")
3222 (source
3223 (origin
3224 (method url-fetch)
3225 (uri (pypi-uri "Pygments" version))
3226 (sha256
3227 (base32
3228 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
3229 (build-system python-build-system)
3230 (arguments
3231 ;; FIXME: Tests require sphinx, which depends on this.
3232 '(#:tests? #f))
3233 (home-page "http://pygments.org/")
3234 (synopsis "Syntax highlighting")
3235 (description
3236 "Pygments is a syntax highlighting package written in Python.")
3237 (license license:bsd-2)))
3238
3239 (define-public python2-pygments
3240 (package-with-python2 python-pygments))
3241
3242 (define-public python-sphinxcontrib-websupport
3243 (package
3244 (name "python-sphinxcontrib-websupport")
3245 (version "1.0.1")
3246 (source (origin
3247 (method url-fetch)
3248 (uri (pypi-uri "sphinxcontrib-websupport" version))
3249 (sha256
3250 (base32
3251 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3252 (build-system python-build-system)
3253 (propagated-inputs
3254 `(("python-mock" ,python-mock)
3255 ("python-pytest" ,python-pytest)
3256 ("python-xapian-bindings" ,python-xapian-bindings)))
3257 ;; Needed for running the test suite
3258 (native-inputs
3259 `(("python-six" ,python-six)
3260 ("python-jinja2" ,python-jinja2)
3261 ("python-docutils" ,python-docutils)
3262 ("python-sphinx" ,python-sphinx)
3263 ("python-sqlalchemy" ,python-sqlalchemy)
3264 ("python-whoosh" ,python-whoosh)))
3265 (home-page "http://sphinx-doc.org/")
3266 (synopsis "Sphinx API for web applications")
3267 (description "This package provides a Python API to easily integrate
3268 Sphinx documentation into your web application. It provides tools to
3269 integrate Sphinx documents in web templates and to handle searches.")
3270 (license license:bsd-3)))
3271
3272 (define-public python-sphinx
3273 (package
3274 (name "python-sphinx")
3275 (version "1.5.1")
3276 (source
3277 (origin
3278 (method url-fetch)
3279 (uri (pypi-uri "Sphinx" version))
3280 (sha256
3281 (base32
3282 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3283 (build-system python-build-system)
3284 (arguments
3285 `(#:phases
3286 (modify-phases %standard-phases
3287 (replace 'check
3288 (lambda _
3289 ;; Requires Internet access.
3290 (delete-file "tests/test_build_linkcheck.py")
3291 (zero? (system* "make" "test")))))))
3292 (propagated-inputs
3293 `(("python-imagesize" ,python-imagesize)
3294 ("python-sphinx-alabaster-theme"
3295 ,python-sphinx-alabaster-theme)
3296 ("python-babel" ,python-babel)
3297 ("python-snowballstemmer" ,python-snowballstemmer)
3298 ("python-docutils" ,python-docutils)
3299 ("python-jinja2" ,python-jinja2)
3300 ("python-pygments" ,python-pygments)
3301 ("python-requests" ,python-requests)
3302 ("python-six" ,python-six)))
3303 (native-inputs
3304 `(("graphviz" ,graphviz)
3305 ("python-html5lib" ,python-html5lib)
3306 ("python-mock" ,python-mock)
3307 ("python-nose" ,python-nose)))
3308 (home-page "http://sphinx-doc.org/")
3309 (synopsis "Python documentation generator")
3310 (description "Sphinx is a tool that makes it easy to create documentation
3311 for Python projects or other documents consisting of multiple reStructuredText
3312 sources.")
3313 (license license:bsd-3)
3314 (properties `((python2-variant . ,(delay python2-sphinx))))))
3315
3316 (define-public python-sphinx-1.6
3317 (package (inherit python-sphinx)
3318 (name "python-sphinx")
3319 (version "1.6.3")
3320 (source (origin
3321 (method url-fetch)
3322 (uri (pypi-uri "Sphinx" version))
3323 (sha256
3324 (base32
3325 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3326 (arguments
3327 `(#:phases
3328 (modify-phases %standard-phases
3329 (replace 'check
3330 (lambda _
3331 ;; Requires Internet access.
3332 (delete-file "tests/test_build_linkcheck.py")
3333 (substitute* "tests/test_build_latex.py"
3334 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3335 "@pytest.mark.skip()"))
3336 (zero? (system* "make" "test")))))))
3337 (propagated-inputs
3338 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3339 ,@(package-propagated-inputs python-sphinx)))
3340 (native-inputs
3341 `(("python-pytest" ,python-pytest-3.0)
3342 ("imagemagick" ,imagemagick) ; for "convert"
3343 ,@(package-native-inputs python-sphinx)))
3344 (properties '())))
3345
3346 (define-public python-sphinx-1.5.3
3347 (package
3348 (inherit python-sphinx)
3349 (name "python-sphinx")
3350 (version "1.5.3")
3351 (source
3352 (origin
3353 (method url-fetch)
3354 (uri (pypi-uri "Sphinx" version))
3355 (sha256
3356 (base32
3357 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3358 (native-inputs
3359 `(("python-pytest" ,python-pytest-3.0)
3360 ,@(package-native-inputs python-sphinx)))))
3361
3362 (define-public python2-sphinx
3363 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3364 (package
3365 (inherit base)
3366 (native-inputs `(("python2-mock" ,python2-mock)
3367 ("python2-enum34" ,python2-enum34)
3368 ,@(package-native-inputs base)))
3369 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3370 ,@(package-propagated-inputs base))))))
3371
3372 (define-public python-sphinx-rtd-theme
3373 (package
3374 (name "python-sphinx-rtd-theme")
3375 (version "0.2.4")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (pypi-uri "sphinx_rtd_theme" version))
3380 (sha256
3381 (base32
3382 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3383 (build-system python-build-system)
3384 (arguments '(#:tests? #f)) ; No tests.
3385 (propagated-inputs
3386 `(("python-sphinx" ,python-sphinx)))
3387 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3388 (synopsis "ReadTheDocs.org theme for Sphinx")
3389 (description "A theme for Sphinx used by ReadTheDocs.org.")
3390 (license license:expat)))
3391
3392 (define-public python2-sphinx-rtd-theme
3393 (package-with-python2 python-sphinx-rtd-theme))
3394
3395 (define-public python-guzzle-sphinx-theme
3396 (package
3397 (name "python-guzzle-sphinx-theme")
3398 (version "0.7.11")
3399 (source
3400 (origin
3401 (method url-fetch)
3402 (uri (pypi-uri "guzzle_sphinx_theme" version))
3403 (sha256
3404 (base32
3405 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
3406 (build-system python-build-system)
3407 (propagated-inputs
3408 `(("python-sphinx" ,python-sphinx)))
3409 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
3410 (synopsis "Sphinx theme used by Guzzle")
3411 (description "This package provides guzzle_sphinx_theme, a theme for the
3412 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
3413 and several other projects.")
3414 (license license:expat)))
3415
3416 (define-public python2-guzzle-sphinx-theme
3417 (package-with-python2 python-guzzle-sphinx-theme))
3418
3419 (define-public python-rst.linker
3420 (package
3421 (name "python-rst.linker")
3422 (version "1.7")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (pypi-uri "rst.linker" version))
3427 (sha256
3428 (base32
3429 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3430 (build-system python-build-system)
3431 (propagated-inputs
3432 `(("python-dateutil" ,python-dateutil)
3433 ("python-six" ,python-six)))
3434 (native-inputs
3435 `(("python-setuptools-scm" ,python-setuptools-scm)))
3436 ;; Test would require path.py, which would introduce a cyclic dependence.
3437 (arguments `(#:tests? #f))
3438 ;; Note: As of version 1.7 the documentation is not worth building.
3439 (home-page "https://github.com/jaraco/rst.linker")
3440 (synopsis "Sphinx plugin to add links and timestamps")
3441 (description "rst.linker allows to automatically replace text by a
3442 reStructuredText external reference or timestamps. It's primary purpose is to
3443 augment the changelog, but it can be used for other documents, too.")
3444 (license license:expat)))
3445
3446 (define-public python2-rst.linker
3447 (package-with-python2 python-rst.linker))
3448
3449 (define-public python-feedgenerator
3450 (package
3451 (name "python-feedgenerator")
3452 (version "1.9")
3453 (source
3454 (origin
3455 (method url-fetch)
3456 (uri (pypi-uri "feedgenerator" version))
3457 (sha256
3458 (base32
3459 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3460 (modules '((guix build utils)))
3461 (snippet
3462 '(begin
3463 ;; Remove pre-compiled .pyc files from source.
3464 (for-each delete-file-recursively
3465 (find-files "." "__pycache__" #:directories? #t))
3466 (for-each delete-file (find-files "." "\\.pyc$"))
3467 #t))))
3468 (build-system python-build-system)
3469 (propagated-inputs
3470 `(("python-pytz" ,python-pytz)
3471 ("python-six" ,python-six)))
3472 (home-page "https://github.com/getpelican/feedgenerator")
3473 (synopsis
3474 "Standalone version of Django's Atom/RSS feed generator")
3475 (description
3476 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3477 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3478 (license license:bsd-3)))
3479
3480 (define-public python2-feedgenerator
3481 (package-with-python2 python-feedgenerator))
3482
3483 (define-public python-blinker
3484 (package
3485 (name "python-blinker")
3486 (version "1.4")
3487 (source
3488 (origin
3489 (method url-fetch)
3490 (uri (pypi-uri "blinker" version))
3491 (sha256
3492 (base32
3493 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3494 (build-system python-build-system)
3495 (home-page "http://pythonhosted.org/blinker/")
3496 (synopsis "Fast, simple object-to-object and broadcast signaling")
3497 (description
3498 "Blinker provides a fast dispatching system that allows any number of
3499 interested parties to subscribe to events, or \"signals\".")
3500 (license license:expat)))
3501
3502 (define-public python2-blinker
3503 (package-with-python2 python-blinker))
3504
3505 (define-public pelican
3506 (package
3507 (name "pelican")
3508 (version "3.6.3")
3509 (source
3510 (origin
3511 (method url-fetch)
3512 (uri (pypi-uri "pelican" version))
3513 (sha256
3514 (base32
3515 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3516 (build-system python-build-system)
3517 (propagated-inputs
3518 `(("python-feedgenerator" ,python-feedgenerator)
3519 ("python-jinja2" ,python-jinja2)
3520 ("python-pygments" ,python-pygments)
3521 ("python-docutils" ,python-docutils)
3522 ("python-pytz" ,python-pytz)
3523 ("python-blinker" ,python-blinker)
3524 ("python-unidecode" ,python-unidecode)
3525 ("python-six" ,python-six)
3526 ("python-dateutil" ,python-dateutil)))
3527 (home-page "http://getpelican.com/")
3528 (arguments
3529 `(;; XXX Requires a lot more packages to do unit tests :P
3530 #:tests? #f
3531 #:phases (modify-phases %standard-phases
3532 (add-before
3533 'install 'adjust-requires
3534 ;; Since feedgenerator is installed from git, it doesn't
3535 ;; conform to the version requirements.
3536 ;;
3537 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3538 ;; version requirement so setuptools doesn't get confused.
3539 (lambda _
3540 (substitute* "setup.py"
3541 (("['\"]feedgenerator.*?['\"]")
3542 "'feedgenerator'")))))))
3543 (synopsis "Python-based static site publishing system")
3544 (description
3545 "Pelican is a tool to generate a static blog from reStructuredText,
3546 Markdown input files, and more. Pelican uses Jinja2 for templating
3547 and is very extensible.")
3548 (license license:agpl3+)))
3549
3550 (define-public python-scikit-learn
3551 (package
3552 (name "python-scikit-learn")
3553 (version "0.19.0")
3554 (source
3555 (origin
3556 (method url-fetch)
3557 (uri (string-append
3558 "https://github.com/scikit-learn/scikit-learn/archive/"
3559 version ".tar.gz"))
3560 (file-name (string-append name "-" version ".tar.gz"))
3561 (sha256
3562 (base32
3563 "0g7q4ri75mj93wpa9bp83a3jmrf3dm5va9h7k4zkbcxr6bgqka15"))))
3564 (build-system python-build-system)
3565 (arguments
3566 `(#:phases
3567 (modify-phases %standard-phases
3568 (delete 'check)
3569 (add-after 'install 'check
3570 ;; Running tests from the source directory requires
3571 ;; an "inplace" build with paths relative to CWD.
3572 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3573 ;; Use the installed version instead.
3574 (lambda* (#:key inputs outputs #:allow-other-keys)
3575 (add-installed-pythonpath inputs outputs)
3576 ;; some tests require access to "$HOME"
3577 (setenv "HOME" "/tmp")
3578 ;; Step out of the source directory just to be sure.
3579 (chdir "..")
3580 (zero? (system* "nosetests" "-v" "sklearn")))))))
3581 (inputs
3582 `(("openblas" ,openblas)))
3583 (native-inputs
3584 `(("python-nose" ,python-nose)
3585 ("python-cython" ,python-cython)))
3586 (propagated-inputs
3587 `(("python-numpy" ,python-numpy)
3588 ("python-scipy" ,python-scipy)))
3589 (home-page "http://scikit-learn.org/")
3590 (synopsis "Machine Learning in Python")
3591 (description
3592 "Scikit-learn provides simple and efficient tools for data
3593 mining and data analysis.")
3594 (license license:bsd-3)))
3595
3596 (define-public python2-scikit-learn
3597 (package-with-python2 python-scikit-learn))
3598
3599 (define-public python-scikit-image
3600 (package
3601 (name "python-scikit-image")
3602 (version "0.11.3")
3603 (source
3604 (origin
3605 (method url-fetch)
3606 (uri (string-append
3607 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3608 version ".tar.gz"))
3609 (sha256
3610 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3611 (build-system python-build-system)
3612 (arguments
3613 ;; TODO: Some tests require running X11 server. Disable them?
3614 '(#:tests? #f))
3615 ;; See DEPENDS.txt for the list of build and run time requiremnts
3616 (propagated-inputs
3617 `(("python-matplotlib" ,python-matplotlib)
3618 ("python-networkx" ,python-networkx)
3619 ("python-scipy" ,python-scipy)
3620 ("python-pillow" ,python-pillow)))
3621 (native-inputs
3622 `(("python-numpy" ,python-numpy)
3623 ("python-cython" ,python-cython)
3624 ("python-six" ,python-six)))
3625 (home-page "http://scikit-image.org/")
3626 (synopsis "Image processing in Python")
3627 (description
3628 "Scikit-image is a collection of algorithms for image processing.")
3629 (license license:bsd-3)))
3630
3631 (define-public python2-scikit-image
3632 (package-with-python2 python-scikit-image))
3633
3634 (define-public python-redis
3635 (package
3636 (name "python-redis")
3637 (version "2.10.5")
3638 (source
3639 (origin
3640 (method url-fetch)
3641 (uri (pypi-uri "redis" version))
3642 (sha256
3643 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3644 (build-system python-build-system)
3645 ;; Tests require a running Redis server
3646 (arguments '(#:tests? #f))
3647 ;; As long as we are not running test, we do not need this input :-)
3648 ;;(native-inputs
3649 ;; `(("python-pytest" ,python-pytest)))
3650 (home-page "https://github.com/andymccurdy/redis-py")
3651 (synopsis "Redis Python client")
3652 (description
3653 "This package provides a Python interface to the Redis key-value store.")
3654 (license license:expat)))
3655
3656 (define-public python2-redis
3657 (package-with-python2 python-redis))
3658
3659 (define-public python-rq
3660 (package
3661 (name "python-rq")
3662 (version "0.7.1")
3663 (source
3664 (origin
3665 (method url-fetch)
3666 (uri (pypi-uri "rq" version))
3667 (sha256
3668 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3669 (build-system python-build-system)
3670 (propagated-inputs
3671 `(("python-click" ,python-click)
3672 ("python-redis" ,python-redis)))
3673 (home-page "http://python-rq.org/")
3674 (synopsis "Simple job queues for Python")
3675 (description
3676 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3677 processing them in the background with workers. It is backed by Redis and it
3678 is designed to have a low barrier to entry.")
3679 (license license:bsd-2)))
3680
3681 (define-public python2-rq
3682 (package-with-python2 python-rq))
3683
3684 (define-public python-cython
3685 (package
3686 (name "python-cython")
3687 (version "0.27")
3688 (source
3689 (origin
3690 (method url-fetch)
3691 (uri (pypi-uri "Cython" version))
3692 (sha256
3693 (base32
3694 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
3695 (build-system python-build-system)
3696 ;; we need the full python package and not just the python-wrapper
3697 ;; because we need libpython3.3m.so
3698 (inputs
3699 `(("python" ,python)))
3700 (arguments
3701 `(#:phases
3702 (modify-phases %standard-phases
3703 (add-before 'check 'set-HOME
3704 ;; some tests require access to "$HOME/.cython"
3705 (lambda _ (setenv "HOME" "/tmp") #t))
3706 (replace 'check
3707 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3708 (home-page "http://cython.org/")
3709 (synopsis "C extensions for Python")
3710 (description "Cython is an optimising static compiler for both the Python
3711 programming language and the extended Cython programming language. It makes
3712 writing C extensions for Python as easy as Python itself.")
3713 (license license:asl2.0)
3714 (properties `((python2-variant . ,(delay python2-cython))))))
3715
3716 (define-public python2-cython
3717 (package (inherit (package-with-python2
3718 (strip-python2-variant python-cython)))
3719 (name "python2-cython")
3720 (inputs
3721 `(("python-2" ,python-2))))) ; this is not automatically changed
3722
3723 ;; The RPython toolchain currently does not support Python 3.
3724 (define-public python2-rpython
3725 (package
3726 (name "python2-rpython")
3727 (version "0.1.4")
3728 (source
3729 (origin
3730 (method url-fetch)
3731 (uri (pypi-uri "rpython" version))
3732 (sha256
3733 (base32
3734 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3735 (build-system python-build-system)
3736 (arguments `(#:python ,python-2))
3737 (native-inputs
3738 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3739 (home-page "https://rpython.readthedocs.org")
3740 (synopsis "Framework for implementing interpreters and virtual machines")
3741 (description "RPython is a translation and support framework for
3742 producing implementations of dynamic languages, emphasizing a clean separation
3743 between language specification and implementation aspects.")
3744 (license license:expat)))
3745
3746 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3747 ;; python-scipy still build, as these three packages are often used together.
3748 (define-public python-numpy
3749 (package
3750 (name "python-numpy")
3751 (version "1.12.0")
3752 (source
3753 (origin
3754 (method url-fetch)
3755 (uri (string-append
3756 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3757 (file-name (string-append name "-" version ".tar.gz"))
3758 (sha256
3759 (base32
3760 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3761 (build-system python-build-system)
3762 (inputs
3763 `(("openblas" ,openblas)
3764 ("lapack" ,lapack)))
3765 (native-inputs
3766 `(("python-cython" ,python-cython)
3767 ("python-nose" ,python-nose)
3768 ("gfortran" ,gfortran)))
3769 (arguments
3770 `(#:phases
3771 (modify-phases %standard-phases
3772 (add-before 'build 'set-environment-variables
3773 (lambda* (#:key inputs #:allow-other-keys)
3774 (call-with-output-file "site.cfg"
3775 (lambda (port)
3776 (format port
3777 "[openblas]
3778 libraries = openblas
3779 library_dirs = ~a/lib
3780 include_dirs = ~a/include
3781
3782 # backslash-n to make emacs happy
3783 \n[lapack]
3784 lapack_libs = lapack
3785 library_dirs = ~a/lib
3786 include_dirs = ~a/include
3787 "
3788 (assoc-ref inputs "openblas")
3789 (assoc-ref inputs "openblas")
3790 (assoc-ref inputs "lapack")
3791 (assoc-ref inputs "lapack"))))
3792 ;; Make /gnu/store/...-bash-.../bin/sh the default shell, instead of
3793 ;; /bin/sh.
3794 (substitute* "numpy/distutils/exec_command.py"
3795 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3796 (string-append match-start (assoc-ref inputs "bash") match-end)))
3797 ;; Use "gcc" executable, not "cc".
3798 (substitute* "numpy/distutils/system_info.py"
3799 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3800 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3801 #t))
3802 ;; Tests can only be run after the library has been installed and not
3803 ;; within the source directory.
3804 (delete 'check)
3805 (add-after 'install 'check
3806 (lambda* (#:key outputs inputs #:allow-other-keys)
3807 ;; Make installed package available for running the tests
3808 (add-installed-pythonpath inputs outputs)
3809 (with-directory-excursion "/tmp"
3810 (zero? (system* "python" "-c"
3811 "import numpy; numpy.test(verbose=2)"))))))))
3812 (home-page "http://www.numpy.org/")
3813 (synopsis "Fundamental package for scientific computing with Python")
3814 (description "NumPy is the fundamental package for scientific computing
3815 with Python. It contains among other things: a powerful N-dimensional array
3816 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3817 and Fortran code, useful linear algebra, Fourier transform, and random number
3818 capabilities.")
3819 (license license:bsd-3)))
3820
3821 (define-public python2-numpy
3822 (package-with-python2 python-numpy))
3823
3824 (define-public python-numpy-next
3825 (package (inherit python-numpy)
3826 (name "python-numpy-next")
3827 (version "1.13.1")
3828 (source
3829 (origin
3830 (method url-fetch)
3831 (uri (pypi-uri "numpy" version ".zip"))
3832 (sha256
3833 (base32
3834 "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
3835 (native-inputs
3836 `(("unzip" ,unzip)
3837 ("python-cython" ,python-cython)
3838 ("python-nose" ,python-nose)
3839 ("gfortran" ,gfortran)))))
3840
3841 (define-public python2-numpy-next
3842 (package-with-python2 python-numpy-next))
3843
3844 (define-public python-munch
3845 (package
3846 (name "python-munch")
3847 (version "2.0.4")
3848 (source
3849 (origin
3850 (method url-fetch)
3851 (uri (pypi-uri "munch" version))
3852 (sha256
3853 (base32
3854 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3855 (build-system python-build-system)
3856 (home-page "https://github.com/Infinidat/munch")
3857 (synopsis "Dot-accessible dictionary")
3858 (description "Munch is a dot-accessible dictionary similar to JavaScript
3859 objects.")
3860 (license license:expat)))
3861
3862 (define-public python2-munch
3863 (package-with-python2 python-munch))
3864
3865 (define-public python-colormath
3866 (package
3867 (name "python-colormath")
3868 (version "2.1.1")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (pypi-uri "colormath" version))
3873 (sha256
3874 (base32
3875 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
3876 (build-system python-build-system)
3877 (propagated-inputs
3878 `(("python-networkx" ,python-networkx)
3879 ("python-numpy" ,python-numpy)))
3880 (home-page "https://github.com/gtaylor/python-colormath")
3881 (synopsis "Color math and conversion library")
3882 (description
3883 "This is a Python library for color math and conversions.")
3884 (license license:bsd-3)))
3885
3886 (define-public python2-colormath
3887 (package-with-python2 python-colormath))
3888
3889 (define-public python-spectra
3890 (package
3891 (name "python-spectra")
3892 (version "0.0.8")
3893 (source
3894 (origin
3895 (method url-fetch)
3896 (uri (pypi-uri "spectra" version))
3897 (sha256
3898 (base32
3899 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
3900 (build-system python-build-system)
3901 (arguments
3902 `(#:phases
3903 (modify-phases %standard-phases
3904 (replace 'check
3905 (lambda _
3906 (zero? (system* "nosetests" "-v")))))))
3907 (propagated-inputs
3908 `(("python-colormath" ,python-colormath)))
3909 (native-inputs
3910 `(("python-nose" ,python-nose)))
3911 (home-page "http://github.com/jsvine/spectra")
3912 (synopsis "Color scales and color conversion")
3913 (description
3914 "This package provides a Python library intended to make color math,
3915 color scales, and color space conversion easy. It has support for:
3916
3917 @enumerate
3918 @item Color scales
3919 @item Color ranges
3920 @item Color blending
3921 @item Brightening/darkening colors
3922 @item Saturating/desaturating colors
3923 @item Conversion to/from multiple color spaces.
3924 @end enumerate\n")
3925 (license license:expat)))
3926
3927 (define-public python2-spectra
3928 (package-with-python2 python-spectra))
3929
3930 (define-public python2-fastlmm
3931 (package
3932 (name "python2-fastlmm")
3933 (version "0.2.21")
3934 (source
3935 (origin
3936 (method url-fetch)
3937 (uri (pypi-uri "fastlmm" version ".zip"))
3938 (sha256
3939 (base32
3940 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3941 (build-system python-build-system)
3942 (arguments
3943 `(#:python ,python-2)) ; only Python 2.7 is supported
3944 (propagated-inputs
3945 `(("python2-numpy" ,python2-numpy)
3946 ("python2-scipy" ,python2-scipy)
3947 ("python2-matplotlib" ,python2-matplotlib)
3948 ("python2-pandas" ,python2-pandas)
3949 ("python2-scikit-learn" ,python2-scikit-learn)
3950 ("python2-pysnptools" ,python2-pysnptools)))
3951 (native-inputs
3952 `(("unzip" ,unzip)
3953 ("python2-cython" ,python2-cython)
3954 ("python2-mock" ,python2-mock)
3955 ("python2-nose" ,python2-nose)))
3956 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3957 (synopsis "Perform genome-wide association studies on large data sets")
3958 (description
3959 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3960 Models, is a program for performing both single-SNP and SNP-set genome-wide
3961 association studies (GWAS) on extremely large data sets.")
3962 (license license:asl2.0)))
3963
3964 (define-public python-numpy-documentation
3965 (package
3966 (name "python-numpy-documentation")
3967 (version (package-version python-numpy))
3968 (source (package-source python-numpy))
3969 (build-system python-build-system)
3970 (native-inputs
3971 `(("python-matplotlib" ,python-matplotlib)
3972 ("python-numpy" ,python-numpy)
3973 ("pkg-config" ,pkg-config)
3974 ("python-sphinx" ,python-sphinx)
3975 ("python-numpydoc" ,python-numpydoc)
3976 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3977 texlive-fonts-ec
3978 texlive-generic-ifxetex
3979 texlive-generic-pdftex
3980 texlive-latex-amsfonts
3981 texlive-latex-capt-of
3982 texlive-latex-cmap
3983 texlive-latex-environ
3984 texlive-latex-eqparbox
3985 texlive-latex-etoolbox
3986 texlive-latex-expdlist
3987 texlive-latex-fancyhdr
3988 texlive-latex-fancyvrb
3989 texlive-latex-fncychap
3990 texlive-latex-float
3991 texlive-latex-framed
3992 texlive-latex-geometry
3993 texlive-latex-graphics
3994 texlive-latex-hyperref
3995 texlive-latex-mdwtools
3996 texlive-latex-multirow
3997 texlive-latex-oberdiek
3998 texlive-latex-parskip
3999 texlive-latex-preview
4000 texlive-latex-tabulary
4001 texlive-latex-threeparttable
4002 texlive-latex-titlesec
4003 texlive-latex-trimspaces
4004 texlive-latex-ucs
4005 texlive-latex-upquote
4006 texlive-latex-url
4007 texlive-latex-varwidth
4008 texlive-latex-wrapfig)))
4009 ("texinfo" ,texinfo)
4010 ("perl" ,perl)
4011 ("scipy-sphinx-theme"
4012 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4013 (method git-fetch)
4014 (uri (git-reference
4015 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4016 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4017 (sha256
4018 (base32
4019 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4020 ,@(package-native-inputs python-numpy)))
4021 (arguments
4022 `(#:tests? #f ; we're only generating the documentation
4023 #:phases
4024 (modify-phases %standard-phases
4025 (delete 'build)
4026 (replace 'install
4027 (lambda* (#:key inputs outputs #:allow-other-keys)
4028 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4029 (doc (string-append
4030 data "/doc/" ,name "-"
4031 ,(package-version python-numpy)))
4032 (info-reader (string-append data "/info"))
4033 (html (string-append doc "/html"))
4034 (scipy-sphinx-theme "scipy-sphinx-theme")
4035 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4036 (pyver ,(string-append "PYVER=")))
4037
4038 ;; FIXME: this is needed to for texlive-union to generate
4039 ;; fonts, which are not found.
4040 (setenv "HOME" "/tmp")
4041
4042 (with-directory-excursion "doc"
4043 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4044 (mkdir-p html)
4045 (system* "make" "html" pyver)
4046 (system* "make" "latex" "PAPER=a4" pyver)
4047 (system* "make" "-C" "build/latex"
4048 "all-pdf" "PAPER=a4" pyver)
4049 ;; FIXME: Generation of the info file fails.
4050 ;; (system* "make" "info" pyver)
4051 ;; (mkdir-p info)
4052 ;; (copy-file "build/texinfo/numpy.info"
4053 ;; (string-append info "/numpy.info"))
4054 (for-each (lambda (file)
4055 (copy-file (string-append "build/latex" file)
4056 (string-append doc file)))
4057 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4058 (with-directory-excursion "build/html"
4059 (for-each (lambda (file)
4060 (let* ((dir (dirname file))
4061 (tgt-dir (string-append html "/" dir)))
4062 (unless (equal? "." dir)
4063 (mkdir-p tgt-dir))
4064 (install-file file html)))
4065 (find-files "." ".*")))))
4066 #t)))))
4067 (home-page (package-home-page python-numpy))
4068 (synopsis "Documentation for the python-numpy package")
4069 (description (package-description python-numpy))
4070 (license (package-license python-numpy))))
4071
4072 (define-public python2-numpy-documentation
4073 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4074 (package
4075 (inherit numpy-documentation)
4076 (native-inputs `(("python2-functools32" ,python2-functools32)
4077 ,@(package-native-inputs numpy-documentation))))))
4078
4079 (define-public python-pygit2
4080 (package
4081 (name "python-pygit2")
4082 (version "0.26.0")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (pypi-uri "pygit2" version))
4087 (sha256
4088 (base32
4089 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
4090 (patches
4091 (search-patches "python-pygit2-disable-network-tests.patch"))))
4092 (build-system python-build-system)
4093 (propagated-inputs
4094 `(("python-six" ,python-six)
4095 ("python-cffi" ,python-cffi)
4096 ("libgit2" ,libgit2)
4097 ("python-tox" ,python-tox)))
4098 (home-page "https://github.com/libgit2/pygit2")
4099 (synopsis "Python bindings for libgit2")
4100 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4101 library, libgit2 implements Git plumbing.")
4102 ;; GPL2.0 only, with linking exception.
4103 (license license:gpl2)))
4104
4105 (define-public python2-pygit2
4106 (package-with-python2 python-pygit2))
4107
4108 (define-public python-pyparsing
4109 (package
4110 (name "python-pyparsing")
4111 (version "2.2.0")
4112 (source
4113 (origin
4114 (method url-fetch)
4115 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
4116 "/pyparsing-" version
4117 "/pyparsing-" version ".tar.gz"))
4118 (sha256
4119 (base32
4120 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
4121 (build-system python-build-system)
4122 (outputs '("out" "doc"))
4123 (arguments
4124 `(#:tests? #f ; no test target
4125 #:phases
4126 (modify-phases %standard-phases
4127 (add-after 'install 'install-doc
4128 (lambda* (#:key outputs #:allow-other-keys)
4129 (let* ((doc (string-append (assoc-ref outputs "doc")
4130 "/share/doc/" ,name "-" ,version))
4131 (html-doc (string-append doc "/html"))
4132 (examples (string-append doc "/examples")))
4133 (mkdir-p html-doc)
4134 (mkdir-p examples)
4135 (for-each
4136 (lambda (dir tgt)
4137 (map (lambda (file)
4138 (install-file file tgt))
4139 (find-files dir ".*")))
4140 (list "docs" "htmldoc" "examples")
4141 (list doc html-doc examples))
4142 #t))))))
4143 (home-page "http://pyparsing.wikispaces.com")
4144 (synopsis "Python parsing class library")
4145 (description
4146 "The pyparsing module is an alternative approach to creating and
4147 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4148 of regular expressions. The pyparsing module provides a library of classes
4149 that client code uses to construct the grammar directly in Python code.")
4150 (license license:expat)))
4151
4152 (define-public python2-pyparsing
4153 (package-with-python2 python-pyparsing))
4154
4155 (define-public python-numpydoc
4156 (package
4157 (name "python-numpydoc")
4158 (version "0.5")
4159 (source
4160 (origin
4161 (method url-fetch)
4162 (uri (string-append
4163 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4164 version ".tar.gz"))
4165 (sha256
4166 (base32
4167 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4168 (modules '((guix build utils)))
4169 (snippet
4170 '(begin
4171 ;; Drop a test requiring matplotlib, which we cannot add as an
4172 ;; input since it would create a circular dependency: Extend the
4173 ;; test for Python 3, where it is already dropped, to Python 2.
4174 (substitute* "numpydoc/tests/test_plot_directive.py"
4175 (("3") "2"))))))
4176 (build-system python-build-system)
4177 (propagated-inputs
4178 `(("python-sphinx" ,python-sphinx)))
4179 (native-inputs
4180 `(("python-nose" ,python-nose)))
4181 (home-page "https://pypi.python.org/pypi/numpydoc")
4182 (synopsis
4183 "Numpy's Sphinx extensions")
4184 (description
4185 "Sphinx extension to support docstrings in Numpy format.")
4186 (license license:bsd-2)))
4187
4188 (define-public python2-numpydoc
4189 (package-with-python2 python-numpydoc))
4190
4191 (define-public python-numexpr
4192 (package
4193 (name "python-numexpr")
4194 (version "2.6.4")
4195 (source
4196 (origin
4197 (method url-fetch)
4198 (uri (pypi-uri "numexpr" version))
4199 (sha256
4200 (base32
4201 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
4202 (build-system python-build-system)
4203 (arguments `(#:tests? #f)) ; no tests included
4204 (propagated-inputs
4205 `(("python-numpy" ,python-numpy)))
4206 (home-page "https://github.com/pydata/numexpr")
4207 (synopsis "Fast numerical expression evaluator for NumPy")
4208 (description
4209 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4210 expressions that operate on arrays are accelerated and use less memory than
4211 doing the same calculation in Python. In addition, its multi-threaded
4212 capabilities can make use of all your cores, which may accelerate
4213 computations, most specially if they are not memory-bounded (e.g. those using
4214 transcendental functions).")
4215 (license license:expat)))
4216
4217 (define-public python2-numexpr
4218 (package-with-python2 python-numexpr))
4219
4220 (define-public python-cycler
4221 (package
4222 (name "python-cycler")
4223 (version "0.10.0")
4224 (source (origin
4225 (method url-fetch)
4226 (uri (pypi-uri "cycler" version))
4227 (sha256
4228 (base32
4229 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4230 (build-system python-build-system)
4231 (arguments
4232 ;; XXX: The current version requires 'coveralls' which we don't have.
4233 ;; Enable this for the next release which uses 'python-pytest'.
4234 '(#:tests? #f))
4235 (propagated-inputs
4236 `(("python-six" ,python-six)))
4237 (home-page "http://matplotlib.org/cycler/")
4238 (synopsis "Composable keyword argument iterator")
4239 (description
4240 "When using @code{matplotlib} and plotting more than one line, it is
4241 common to want to be able to want to be able to cycle over one or more artist
4242 styles; but the plotting logic can quickly become involved.
4243 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4244 @code{Cycler} class was developed.")
4245 (license license:bsd-3)))
4246
4247 (define-public python2-cycler
4248 (package-with-python2 python-cycler))
4249
4250 (define-public python-colorspacious
4251 (package
4252 (name "python-colorspacious")
4253 (version "1.1.0")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4258 version ".tar.gz"))
4259 (file-name (string-append name "-" version))
4260 (sha256
4261 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4262 (build-system python-build-system)
4263 (propagated-inputs
4264 `(("python-numpy" ,python-numpy)))
4265 (native-inputs
4266 `(("python-nose" ,python-nose)))
4267 (arguments
4268 `(#:phases
4269 (modify-phases %standard-phases
4270 (replace 'check
4271 (lambda _
4272 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4273 (home-page "https://github.com/njsmith/colorspacious")
4274 (synopsis "Python library for colorspace conversions")
4275 (description "@code{colorspacious} is a Python library that lets you
4276 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4277 (license license:expat)))
4278
4279 (define-public python2-colorspacious
4280 (package-with-python2 python-colorspacious))
4281
4282 (define-public python-matplotlib
4283 (package
4284 (name "python-matplotlib")
4285 (version "2.0.2")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (pypi-uri "matplotlib" version))
4290 (sha256
4291 (base32
4292 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
4293 (build-system python-build-system)
4294 (propagated-inputs ; the following packages are all needed at run time
4295 `(("python-cycler" ,python-cycler)
4296 ("python-pyparsing" ,python-pyparsing)
4297 ("python-pygobject" ,python-pygobject)
4298 ("gobject-introspection" ,gobject-introspection)
4299 ("python-tkinter" ,python "tk")
4300 ("python-dateutil" ,python-dateutil)
4301 ("python-numpy" ,python-numpy)
4302 ("python-pillow" ,python-pillow)
4303 ("python-pytz" ,python-pytz)
4304 ("python-six" ,python-six)
4305 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4306 ;; from 'gtk+') provides the required 'typelib' files used by
4307 ;; 'gobject-introspection'. The location of these files is set with the
4308 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4309 ;; is done automatically by a 'native-search-path' procedure. However,
4310 ;; at run-time the user must set this variable as follows:
4311 ;;
4312 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4313 ("gtk+" ,gtk+)
4314 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4315 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4316 ;; object. For this reason we need to import both libraries.
4317 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4318 ("python-pycairo" ,python-pycairo)
4319 ("python-cairocffi" ,python-cairocffi)))
4320 (inputs
4321 `(("libpng" ,libpng)
4322 ("imagemagick" ,imagemagick)
4323 ("freetype" ,freetype)
4324 ("cairo" ,cairo)
4325 ("glib" ,glib)
4326 ;; FIXME: Add backends when available.
4327 ;("python-wxpython" ,python-wxpython)
4328 ("python-pyqt" ,python-pyqt)
4329 ("tcl" ,tcl)
4330 ("tk" ,tk)))
4331 (native-inputs
4332 `(("pkg-config" ,pkg-config)
4333 ("python-nose" ,python-nose)
4334 ("python-mock" ,python-mock)))
4335 (arguments
4336 `(#:phases
4337 (modify-phases %standard-phases
4338 (add-before 'build 'configure-environment
4339 (lambda* (#:key outputs inputs #:allow-other-keys)
4340 (let ((cairo (assoc-ref inputs "cairo"))
4341 (gtk+ (assoc-ref inputs "gtk+")))
4342 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4343 ;; has not effect.
4344 (setenv "LD_LIBRARY_PATH"
4345 (string-append cairo "/lib:" gtk+ "/lib"))
4346 (setenv "HOME" (getcwd))
4347 (call-with-output-file "setup.cfg"
4348 (lambda (port)
4349 (format port "[directories]~%
4350 basedirlist = ~a,~a~%
4351 [rc_options]~%
4352 backend = TkAgg~%"
4353 (assoc-ref inputs "tcl")
4354 (assoc-ref inputs "tk")))))
4355 #t)))))
4356 (home-page "http://matplotlib.org")
4357 (synopsis "2D plotting library for Python")
4358 (description
4359 "Matplotlib is a Python 2D plotting library which produces publication
4360 quality figures in a variety of hardcopy formats and interactive environments
4361 across platforms. Matplotlib can be used in Python scripts, the python and
4362 ipython shell, web application servers, and six graphical user interface
4363 toolkits.")
4364 (license license:psfl)
4365 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4366
4367 (define-public python2-matplotlib
4368 (let ((matplotlib (package-with-python2
4369 (strip-python2-variant python-matplotlib))))
4370 (package (inherit matplotlib)
4371 ;; Make sure to use special packages for Python 2 instead
4372 ;; of those automatically rewritten by package-with-python2.
4373 (propagated-inputs
4374 `(("python2-pycairo" ,python2-pycairo)
4375 ("python2-functools32" ,python2-functools32)
4376 ("python2-pygobject-2" ,python2-pygobject-2)
4377 ("python2-subprocess32" ,python2-subprocess32)
4378 ("python2-tkinter" ,python-2 "tk")
4379 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4380 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4381
4382 (define-public python-matplotlib-documentation
4383 (package
4384 (name "python-matplotlib-documentation")
4385 (version (package-version python-matplotlib))
4386 (source (package-source python-matplotlib))
4387 (build-system python-build-system)
4388 (native-inputs
4389 `(("python-matplotlib" ,python-matplotlib)
4390 ("python-colorspacious" ,python-colorspacious)
4391 ("python-sphinx" ,python-sphinx)
4392 ("python-numpydoc" ,python-numpydoc)
4393 ("python-ipython" ,python-ipython)
4394 ("python-mock" ,python-mock)
4395 ("graphviz" ,graphviz)
4396 ("texlive" ,texlive)
4397 ("texinfo" ,texinfo)
4398 ,@(package-native-inputs python-matplotlib)))
4399 (arguments
4400 `(#:tests? #f ; we're only generating documentation
4401 #:phases
4402 (modify-phases %standard-phases
4403 (replace 'build
4404 (lambda _
4405 (chdir "doc")
4406 ;; Produce pdf in 'A4' format.
4407 (substitute* "conf.py"
4408 (("latex_paper_size = 'letter'") "")
4409 ;; latex_paper_size is deprecated -> set paper size using
4410 ;; latex_elements
4411 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4412 ;; insert at a point where latex_elements{} is defined:
4413 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4414 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4415 (replace 'install
4416 (lambda* (#:key inputs outputs #:allow-other-keys)
4417 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4418 (doc (string-append data "/doc/python-matplotlib-" ,version))
4419 (info (string-append data "/info"))
4420 (html (string-append doc "/html")))
4421 (mkdir-p html)
4422 (mkdir-p info)
4423 (copy-recursively "build/html" html)
4424 (symlink (string-append html "/_images")
4425 (string-append info "/matplotlib-figures"))
4426 (with-directory-excursion "build/texinfo"
4427 (substitute* "matplotlib.texi"
4428 (("@image\\{([^,]*)" all file)
4429 (string-append "@image{matplotlib-figures/" file)))
4430 (symlink (string-append html "/_images")
4431 "./matplotlib-figures")
4432 (system* "makeinfo" "--no-split"
4433 "-o" "matplotlib.info" "matplotlib.texi"))
4434 (copy-file "build/texinfo/matplotlib.info"
4435 (string-append info "/matplotlib.info"))
4436 (copy-file "build/latex/Matplotlib.pdf"
4437 (string-append doc "/Matplotlib.pdf")))
4438 #t)))))
4439 (home-page (package-home-page python-matplotlib))
4440 (synopsis "Documentation for the python-matplotlib package")
4441 (description (package-description python-matplotlib))
4442 (license (package-license python-matplotlib))))
4443
4444 (define-public python2-matplotlib-documentation
4445 (package-with-python2 python-matplotlib-documentation))
4446
4447 (define-public python2-pysnptools
4448 (package
4449 (name "python2-pysnptools")
4450 (version "0.3.9")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (pypi-uri "pysnptools" version ".zip"))
4455 (sha256
4456 (base32
4457 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4458 (build-system python-build-system)
4459 (arguments
4460 `(#:python ,python-2)) ; only Python 2.7 is supported
4461 (propagated-inputs
4462 `(("python2-numpy" ,python2-numpy)
4463 ("python2-scipy" ,python2-scipy)
4464 ("python2-pandas" ,python2-pandas)))
4465 (native-inputs
4466 `(("python2-cython" ,python2-cython)))
4467 (native-inputs
4468 `(("unzip" ,unzip)))
4469 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4470 (synopsis "Library for reading and manipulating genetic data")
4471 (description
4472 "PySnpTools is a library for reading and manipulating genetic data. It
4473 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4474 those files. It can also efficiently manipulate ranges of integers using set
4475 operators such as union, intersection, and difference.")
4476 (license license:asl2.0)))
4477
4478 (define-public python-rpy2
4479 (package
4480 (name "python-rpy2")
4481 (version "2.9.0")
4482 (source
4483 (origin
4484 (method url-fetch)
4485 (uri (pypi-uri "rpy2" version))
4486 (sha256
4487 (base32
4488 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
4489 (build-system python-build-system)
4490 (arguments
4491 '(#:modules ((ice-9 ftw)
4492 (srfi srfi-1)
4493 (srfi srfi-26)
4494 (guix build utils)
4495 (guix build python-build-system))
4496 #:phases
4497 (modify-phases %standard-phases
4498 ;; Without this phase the test loader cannot find the directories, in
4499 ;; which it is supposed to look for test files.
4500 (add-after 'unpack 'fix-tests
4501 (lambda* (#:key outputs #:allow-other-keys)
4502 (substitute* "rpy/tests.py"
4503 (("loader.discover\\(")
4504 "loader.discover(rpy_root + '/' +"))
4505 #t))
4506 (replace 'check
4507 (lambda* (#:key outputs inputs #:allow-other-keys)
4508 (let ((cwd (getcwd)))
4509 (setenv "PYTHONPATH"
4510 (string-append cwd "/build/"
4511 (find (cut string-prefix? "lib" <>)
4512 (scandir (string-append cwd "/build")))
4513 ":"
4514 (getenv "PYTHONPATH"))))
4515 ;; FIXME: Even when all tests pass, the check phase will fail.
4516 (system* "python" "-m" "rpy2.tests" "-v"))))))
4517 (propagated-inputs
4518 `(("python-six" ,python-six)
4519 ("python-jinja2" ,python-jinja2)
4520 ("python-pytz" ,python-pytz)))
4521 (inputs
4522 `(("readline" ,readline)
4523 ("icu4c" ,icu4c)
4524 ("pcre" ,pcre)
4525 ("r-minimal" ,r-minimal)
4526 ("r-survival" ,r-survival)
4527 ("r-ggplot2" ,r-ggplot2)
4528 ("r-rsqlite" ,r-rsqlite)
4529 ("r-dplyr" ,r-dplyr)
4530 ("r-dbplyr" ,r-dbplyr)
4531 ("python-numpy" ,python-numpy)))
4532 (native-inputs
4533 `(("zlib" ,zlib)))
4534 (home-page "http://rpy.sourceforge.net/")
4535 (synopsis "Python interface to the R language")
4536 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4537 low-level interface to R from Python, a proposed high-level interface,
4538 including wrappers to graphical libraries, as well as R-like structures and
4539 functions.")
4540 ;; Any of these licenses can be picked for the R interface. The whole
4541 ;; project is released under GPLv2+ according to the license declaration
4542 ;; in "setup.py".
4543 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
4544
4545 (define-public python-scipy
4546 (package
4547 (name "python-scipy")
4548 (version "0.19.1")
4549 (source
4550 (origin
4551 (method url-fetch)
4552 (uri (pypi-uri "scipy" version))
4553 (sha256
4554 (base32
4555 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
4556 (build-system python-build-system)
4557 (propagated-inputs
4558 `(("python-numpy" ,python-numpy)
4559 ("python-matplotlib" ,python-matplotlib)
4560 ("python-pyparsing" ,python-pyparsing)))
4561 (inputs
4562 `(("lapack" ,lapack)
4563 ("openblas" ,openblas)))
4564 (native-inputs
4565 `(("python-cython" ,python-cython)
4566 ("python-nose" ,python-nose)
4567 ("python-sphinx" ,python-sphinx)
4568 ("python-numpydoc" ,python-numpydoc)
4569 ("gfortran" ,gfortran)
4570 ("perl" ,perl)))
4571 (outputs '("out" "doc"))
4572 (arguments
4573 `(#:phases
4574 (modify-phases %standard-phases
4575 (add-before 'build 'configure-openblas
4576 (lambda* (#:key inputs #:allow-other-keys)
4577 (call-with-output-file "site.cfg"
4578 (lambda (port)
4579 (format port
4580 "[blas]
4581 libraries = openblas
4582 library_dirs = ~a/lib
4583 include_dirs = ~a/include
4584
4585 # backslash-n to make emacs happy
4586 \n[atlas]
4587 library_dirs = ~a/lib
4588 atlas_libs = openblas
4589 "
4590 (assoc-ref inputs "openblas")
4591 (assoc-ref inputs "openblas")
4592 (assoc-ref inputs "openblas"))))
4593 #t))
4594 (add-after 'install 'install-doc
4595 (lambda* (#:key inputs outputs #:allow-other-keys)
4596 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4597 (doc (string-append data "/doc/" ,name "-" ,version))
4598 (html (string-append doc "/html"))
4599 (pyver ,(string-append "PYVER=")))
4600 ;; Make installed package available for building the
4601 ;; documentation
4602 (add-installed-pythonpath inputs outputs)
4603 (with-directory-excursion "doc"
4604 ;; Fix generation of images for mathematical expressions.
4605 (substitute* (find-files "source" "conf\\.py")
4606 (("pngmath_use_preview = True")
4607 "pngmath_use_preview = False"))
4608 (mkdir-p html)
4609 (system* "make" "html" pyver)
4610 (with-directory-excursion "build/html"
4611 (for-each (lambda (file)
4612 (let* ((dir (dirname file))
4613 (tgt-dir (string-append html "/" dir)))
4614 (install-file file html)))
4615 (find-files "." ".*")))))
4616 #t))
4617 (add-after 'unpack 'fix-tests
4618 (lambda _
4619 (substitute* "scipy/integrate/tests/test_quadpack.py"
4620 (("libm.so") "libm.so.6"))
4621 #t))
4622 ;; Tests can only be run after the library has been installed and not
4623 ;; within the source directory.
4624 (delete 'check)
4625 (add-after 'install 'check
4626 (lambda* (#:key inputs outputs #:allow-other-keys)
4627 (add-installed-pythonpath inputs outputs)
4628 (with-directory-excursion "/tmp"
4629 (zero? (system* "python" "-c"
4630 "import scipy; scipy.test('full')")))
4631 #t)))))
4632 (home-page "http://www.scipy.org/")
4633 (synopsis "The Scipy library provides efficient numerical routines")
4634 (description "The SciPy library is one of the core packages that make up
4635 the SciPy stack. It provides many user-friendly and efficient numerical
4636 routines such as routines for numerical integration and optimization.")
4637 (properties `((python2-variant . ,(delay python2-scipy))))
4638 (license license:bsd-3)))
4639
4640 (define-public python2-scipy
4641 (package-with-python2
4642 (strip-python2-variant python-scipy)))
4643
4644 (define-public python-sockjs-tornado
4645 (package
4646 (name "python-sockjs-tornado")
4647 (version "1.0.3")
4648 (source
4649 (origin
4650 (method url-fetch)
4651 (uri (pypi-uri "sockjs-tornado" version))
4652 (sha256
4653 (base32
4654 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4655 (build-system python-build-system)
4656 (arguments
4657 `(;; There are no tests, and running the test phase requires missing
4658 ;; dependencies
4659 #:tests? #f))
4660 (propagated-inputs
4661 `(("python-tornado" ,python-tornado)))
4662 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4663 (synopsis
4664 "SockJS python server implementation on top of Tornado framework")
4665 (description
4666 "SockJS-tornado provides the server side counterpart to a SockJS client
4667 library, through the Tornado framework.
4668
4669 SockJS provides a low latency, full duplex, cross-domain communication channel
4670 between a web browser and web server.")
4671 (license license:expat)))
4672
4673 (define-public python2-sockjs-tornado
4674 (package-with-python2 python-sockjs-tornado))
4675
4676 (define-public python-socksipy-branch
4677 (package
4678 (name "python-socksipy-branch")
4679 (version "1.01")
4680 (source
4681 (origin
4682 (method url-fetch)
4683 (uri (pypi-uri "SocksiPy-branch" version))
4684 (sha256
4685 (base32
4686 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4687 (build-system python-build-system)
4688 (arguments
4689 `(#:tests? #f)) ; There are no tests
4690 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4691 (synopsis "Python SOCKS module")
4692 (description
4693 "SocksiPy - A Python SOCKS client module. It provides a
4694 socket-like interface that supports connections to any TCP
4695 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4696 The original version was developed by Dan Haim, this is a
4697 branch created by Mario Vilas to address some open issues,
4698 as the original project seems to have been abandoned circa 2007.")
4699 (license license:bsd-3)))
4700
4701 (define-public python2-socksipy-branch
4702 (package-with-python2 python-socksipy-branch))
4703
4704 (define-public python-sqlalchemy
4705 (package
4706 (name "python-sqlalchemy")
4707 (version "1.0.12")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 (uri (string-append "https://pypi.python.org/packages/source/S/"
4712 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4713 (sha256
4714 (base32
4715 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4716 (build-system python-build-system)
4717 (native-inputs
4718 `(("python-cython" ,python-cython) ;for c extensions
4719 ("python-pytest" ,python-pytest)
4720 ("python-mock" ,python-mock))) ;for tests
4721 (arguments
4722 `(#:phases
4723 (modify-phases %standard-phases
4724 (replace 'check
4725 (lambda _ (zero? (system* "py.test")))))))
4726 (home-page "http://www.sqlalchemy.org")
4727 (synopsis "Database abstraction library")
4728 (description
4729 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4730 gives application developers the full power and flexibility of SQL. It
4731 provides a full suite of well known enterprise-level persistence patterns,
4732 designed for efficient and high-performing database access, adapted into a
4733 simple and Pythonic domain language.")
4734 (license license:x11)))
4735
4736 (define-public python2-sqlalchemy
4737 (package-with-python2 python-sqlalchemy))
4738
4739 (define-public python-pycodestyle
4740 (package
4741 (name "python-pycodestyle")
4742 (version "2.3.1")
4743 (source
4744 (origin
4745 (method url-fetch)
4746 (uri (pypi-uri "pycodestyle" version))
4747 (sha256
4748 (base32
4749 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4750 (build-system python-build-system)
4751 (home-page "https://pycodestyle.readthedocs.io/")
4752 (synopsis "Python style guide checker")
4753 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4754 Python code against some of the style conventions in
4755 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4756 (license license:expat)))
4757
4758 (define-public python2-pycodestyle
4759 (package-with-python2 python-pycodestyle))
4760
4761 (define-public python-orderedmultidict
4762 (package
4763 (name "python-orderedmultidict")
4764 (version "0.7.11")
4765 (source
4766 (origin
4767 (method url-fetch)
4768 (uri (pypi-uri "orderedmultidict" version))
4769 (sha256
4770 (base32
4771 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4772 (build-system python-build-system)
4773 (arguments
4774 `(#:phases
4775 (modify-phases %standard-phases
4776 (add-after 'unpack 'fix-tests
4777 (lambda _
4778 ;; The package uses nosetest for running the tests.
4779 ;; Adding this initfile allows to run the test suite
4780 ;; without requiring nosetest.
4781 (zero? (system* "touch" "tests/__init__.py")))))))
4782 (propagated-inputs
4783 `(("python-six" ,python-six)))
4784 (native-inputs
4785 `(("python-pycodestyle" ,python-pycodestyle)))
4786 (home-page "https://github.com/gruns/orderedmultidict")
4787 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4788 (description "This package contains a library for ordered multivalue
4789 dictionaries. A multivalue dictionary is a dictionary that can store
4790 multiple values for the same key. An ordered multivalue dictionary is a
4791 multivalue dictionary that retains the order of insertions and deletions.")
4792 (license license:unlicense)))
4793
4794 (define-public python2-orderedmultidict
4795 (package-with-python2 python-orderedmultidict))
4796
4797 (define-public python-furl
4798 (package
4799 (name "python-furl")
4800 (version "0.5.6")
4801 (source
4802 (origin
4803 (method url-fetch)
4804 (uri (pypi-uri "furl" version))
4805 (sha256
4806 (base32
4807 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4808 (build-system python-build-system)
4809 (propagated-inputs
4810 `(("python-six" ,python-six)
4811 ("python-orderedmultidict" ,python-orderedmultidict)))
4812 (native-inputs
4813 `(("python-pycodestyle" ,python-pycodestyle)))
4814 (home-page "https://github.com/gruns/furl")
4815 (synopsis "URL manipulation in Python")
4816 (description "Furl provides an easy-to-use alternative to the
4817 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4818 (license license:unlicense)))
4819
4820 (define-public python2-furl
4821 (package-with-python2 python-furl))
4822
4823 (define-public python-flaky
4824 (package
4825 (name "python-flaky")
4826 (version "3.4.0")
4827 (source (origin
4828 (method url-fetch)
4829 (uri (pypi-uri "flaky" version))
4830 (sha256
4831 (base32
4832 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4833 (build-system python-build-system)
4834 (arguments
4835 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4836 '(#:tests? #f))
4837 (home-page "https://github.com/box/flaky")
4838 (synopsis "Automatically rerun flaky tests")
4839 (description
4840 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4841 reruns flaky tests.
4842
4843 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4844 on components that aren't 100% reliable. With flaky, instead of removing
4845 those tests or marking them to @code{@@skip}, they can be automatically
4846 retried.")
4847 (license license:asl2.0)))
4848
4849 (define-public python2-flaky
4850 (package-with-python2 python-flaky))
4851
4852 (define-public python-flask-babel
4853 (package
4854 (name "python-flask-babel")
4855 (version "0.11.1")
4856 (source
4857 (origin
4858 (method url-fetch)
4859 (uri (pypi-uri "Flask-Babel" version))
4860 (sha256
4861 (base32
4862 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4863 (build-system python-build-system)
4864 (propagated-inputs
4865 `(("python-flask" ,python-flask)
4866 ("python-babel" ,python-babel)
4867 ("python-jinja2" ,python-jinja2)
4868 ("python-pytz" ,python-pytz)))
4869 (home-page "https://github.com/python-babel/flask-babel")
4870 (synopsis "Add i18n/l10n support to Flask applications")
4871 (description "This package implements internationalization and localization
4872 support for Flask. This is based on the Python babel module as well as pytz -
4873 both of which are installed automatically if you install this library.")
4874 (license license:bsd-3)))
4875
4876 (define-public python2-flask-babel
4877 (package-with-python2 python-flask-babel))
4878
4879 (define-public python-sqlalchemy-utils
4880 (package
4881 (name "python-sqlalchemy-utils")
4882 (version "0.32.13")
4883 (source
4884 (origin
4885 (method url-fetch)
4886 (uri (pypi-uri "SQLAlchemy-Utils" version))
4887 (sha256
4888 (base32
4889 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4890 (build-system python-build-system)
4891 (arguments
4892 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4893 ;; #:phases
4894 ;; (modify-phases %standard-phases
4895 ;; (replace 'check
4896 ;; (lambda _
4897 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4898 (propagated-inputs
4899 `(("python-six" ,python-six)
4900 ("python-sqlalchemy" ,python-sqlalchemy)))
4901 (native-inputs
4902 `(("python-dateutil" ,python-dateutil)
4903 ("python-flexmock" ,python-flexmock)
4904 ("python-psycopg2" ,python-psycopg2)
4905 ("python-pytest" ,python-pytest)
4906 ("python-pytz" ,python-pytz)))
4907 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4908 (synopsis "Various utility functions for SQLAlchemy")
4909 (description
4910 "SQLAlchemy-utils provides various utility functions and custom data types
4911 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4912
4913 You might also want to install the following optional dependencies:
4914 @enumerate
4915 @item @code{python-passlib}
4916 @item @code{python-babel}
4917 @item @code{python-cryptography}
4918 @item @code{python-pytz}
4919 @item @code{python-psycopg2}
4920 @item @code{python-furl}
4921 @item @code{python-flask-babel}
4922 @end enumerate
4923 ")
4924 (license license:bsd-3)))
4925
4926 (define-public python2-sqlalchemy-utils
4927 (package-with-python2 python-sqlalchemy-utils))
4928
4929 (define-public python-alembic
4930 (package
4931 (name "python-alembic")
4932 (version "0.9.5")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "alembic" version))
4937 (sha256
4938 (base32
4939 "01gx2syqbaxh4hr9pf7pxhlb6p36qaf99140dy19lsx1paxb9p4b"))))
4940 (build-system python-build-system)
4941 (native-inputs
4942 `(("python-mock" ,python-mock)
4943 ("python-pytest-cov" ,python-pytest-cov)))
4944 (propagated-inputs
4945 `(("python-dateutil" ,python-dateutil)
4946 ("python-sqlalchemy" ,python-sqlalchemy)
4947 ("python-mako" ,python-mako)
4948 ("python-editor" ,python-editor)))
4949 (home-page "http://bitbucket.org/zzzeek/alembic")
4950 (synopsis
4951 "Database migration tool for SQLAlchemy")
4952 (description
4953 "Alembic is a lightweight database migration tool for usage with the
4954 SQLAlchemy Database Toolkit for Python.")
4955 (license license:expat)))
4956
4957 (define-public python2-alembic
4958 (package-with-python2 python-alembic))
4959
4960 (define-public python-autopep8
4961 (package
4962 (name "python-autopep8")
4963 (version "1.3.2")
4964 (source
4965 (origin
4966 (method url-fetch)
4967 (uri (pypi-uri "autopep8" version))
4968 (sha256
4969 (base32
4970 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
4971 (build-system python-build-system)
4972 (propagated-inputs
4973 `(("python-pycodestyle" ,python-pycodestyle)))
4974 (home-page "https://github.com/hhatto/autopep8")
4975 (synopsis "Format Python code according to the PEP 8 style guide")
4976 (description
4977 "@code{autopep8} automatically formats Python code to conform to
4978 the PEP 8 style guide. It uses the pycodestyle utility to determine
4979 what parts of the code needs to be formatted. @code{autopep8} is
4980 capable of fixing most of the formatting issues that can be reported
4981 by pycodestyle.")
4982 (license (license:non-copyleft
4983 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4984
4985 (define-public python2-autopep8
4986 (package-with-python2 python-autopep8))
4987
4988 (define-public python-distutils-extra
4989 (package
4990 (name "python-distutils-extra")
4991 (version "2.38")
4992 (source
4993 (origin
4994 (method url-fetch)
4995 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4996 version "/+download/python-distutils-extra-"
4997 version ".tar.gz"))
4998 (sha256
4999 (base32
5000 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5001 (build-system python-build-system)
5002 (home-page "https://launchpad.net/python-distutils-extra/")
5003 (synopsis "Enhancements to Python's distutils")
5004 (description
5005 "The python-distutils-extra module enables you to easily integrate
5006 gettext support, themed icons, and scrollkeeper-based documentation into
5007 Python's distutils.")
5008 (license license:gpl2)))
5009
5010 (define-public python2-distutils-extra
5011 (package-with-python2 python-distutils-extra))
5012
5013 (define-public python2-elib.intl
5014 (package
5015 (name "python2-elib.intl")
5016 (version "0.0.3")
5017 (source
5018 (origin
5019 ;; This project doesn't tag releases or publish tarballs, so we take
5020 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5021 (method git-fetch)
5022 (uri (git-reference
5023 (url "https://github.com/dieterv/elib.intl.git")
5024 (commit "d09997cfef")))
5025 (sha256
5026 (base32
5027 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5028 (build-system python-build-system)
5029 (arguments
5030 ;; incompatible with Python 3 (exception syntax)
5031 `(#:python ,python-2
5032 #:tests? #f))
5033 (home-page "https://github.com/dieterv/elib.intl")
5034 (synopsis "Enhanced internationalization for Python")
5035 (description
5036 "The elib.intl module provides enhanced internationalization (I18N)
5037 services for your Python modules and applications.")
5038 (license license:lgpl3+)))
5039
5040 (define-public python-pillow
5041 (package
5042 (name "python-pillow")
5043 (version "3.3.3")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "Pillow" version))
5048 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
5049 (sha256
5050 (base32
5051 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
5052 (build-system python-build-system)
5053 (native-inputs
5054 `(("python-nose" ,python-nose)))
5055 (inputs
5056 `(("freetype" ,freetype)
5057 ("lcms" ,lcms)
5058 ("zlib" ,zlib)
5059 ("libjpeg" ,libjpeg)
5060 ("openjpeg" ,openjpeg)
5061 ("libtiff" ,libtiff)
5062 ("libwebp" ,libwebp)))
5063 (arguments
5064 `(#:phases (modify-phases %standard-phases
5065 (add-after
5066 'install 'check-installed
5067 (lambda* (#:key outputs inputs #:allow-other-keys)
5068 (begin
5069 (setenv "HOME" (getcwd))
5070 ;; Make installed package available for running the
5071 ;; tests
5072 (add-installed-pythonpath inputs outputs)
5073 (and (zero? (system* "python" "selftest.py"
5074 "--installed"))
5075 (zero? (system* "python" "test-installed.py"))))))
5076 (delete 'check))))
5077 (home-page "https://pypi.python.org/pypi/Pillow")
5078 (synopsis "Fork of the Python Imaging Library")
5079 (description
5080 "The Python Imaging Library adds image processing capabilities to your
5081 Python interpreter. This library provides extensive file format support, an
5082 efficient internal representation, and fairly powerful image processing
5083 capabilities. The core image library is designed for fast access to data
5084 stored in a few basic pixel formats. It should provide a solid foundation for
5085 a general image processing tool.")
5086 (license (license:x11-style
5087 "http://www.pythonware.com/products/pil/license.htm"
5088 "The PIL Software License"))))
5089
5090 (define-public python2-pillow
5091 (package-with-python2 python-pillow))
5092
5093 (define-public python-pycparser
5094 (package
5095 (name "python-pycparser")
5096 (version "2.17")
5097 (source
5098 (origin
5099 (method url-fetch)
5100 (uri (pypi-uri "pycparser" version))
5101 (sha256
5102 (base32
5103 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
5104 (outputs '("out" "doc"))
5105 (build-system python-build-system)
5106 (native-inputs
5107 `(("pkg-config" ,pkg-config)))
5108 (arguments
5109 `(#:phases
5110 (modify-phases %standard-phases
5111 (replace 'check
5112 (lambda _
5113 (with-directory-excursion "tests"
5114 (zero? (system* "python" "all_tests.py")))))
5115 (add-after 'install 'install-doc
5116 (lambda* (#:key outputs #:allow-other-keys)
5117 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5118 (doc (string-append data "/doc/" ,name "-" ,version))
5119 (examples (string-append doc "/examples")))
5120 (mkdir-p examples)
5121 (for-each (lambda (file)
5122 (copy-file (string-append "." file)
5123 (string-append doc file)))
5124 '("/README.rst" "/CHANGES" "/LICENSE"))
5125 (copy-recursively "examples" examples)))))))
5126 (home-page "https://github.com/eliben/pycparser")
5127 (synopsis "C parser in Python")
5128 (description
5129 "Pycparser is a complete parser of the C language, written in pure Python
5130 using the PLY parsing library. It parses C code into an AST and can serve as
5131 a front-end for C compilers or analysis tools.")
5132 (license license:bsd-3)))
5133
5134 (define-public python2-pycparser
5135 (package-with-python2 python-pycparser))
5136
5137 (define-public python-cffi
5138 (package
5139 (name "python-cffi")
5140 (version "1.10.0")
5141 (source
5142 (origin
5143 (method url-fetch)
5144 (uri (pypi-uri "cffi" version))
5145 (sha256
5146 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
5147 (build-system python-build-system)
5148 (outputs '("out" "doc"))
5149 (inputs
5150 `(("libffi" ,libffi)))
5151 (propagated-inputs ; required at run-time
5152 `(("python-pycparser" ,python-pycparser)))
5153 (native-inputs
5154 `(("pkg-config" ,pkg-config)
5155 ("python-sphinx" ,python-sphinx)
5156 ("python-pytest" ,python-pytest)))
5157 (arguments
5158 `(#:modules ((ice-9 ftw)
5159 (srfi srfi-26)
5160 (guix build utils)
5161 (guix build python-build-system))
5162 #:phases
5163 (modify-phases %standard-phases
5164 (replace 'check
5165 (lambda _
5166 (setenv "PYTHONPATH"
5167 (string-append
5168 (getenv "PYTHONPATH")
5169 ":" (getcwd) "/build/"
5170 (car (scandir "build" (cut string-prefix? "lib." <>)))))
5171
5172 ;; XXX The "normal" approach of setting CC and friends does
5173 ;; not work here. Is this the correct way of doing things?
5174 (substitute* "testing/embedding/test_basic.py"
5175 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5176 (string-append "c = distutils.ccompiler.new_compiler();"
5177 "c.set_executables(compiler='gcc',"
5178 "compiler_so='gcc',linker_exe='gcc',"
5179 "linker_so='gcc -shared')")))
5180 (substitute* "testing/cffi0/test_ownlib.py"
5181 (("'cc testownlib") "'gcc testownlib"))
5182 (zero? (system* "py.test" "-v" "c/" "testing/"))))
5183 (add-after 'install 'install-doc
5184 (lambda* (#:key outputs #:allow-other-keys)
5185 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5186 (doc (string-append data "/doc/" ,name "-" ,version))
5187 (html (string-append doc "/html")))
5188 (with-directory-excursion "doc"
5189 (system* "make" "html")
5190 (mkdir-p html)
5191 (copy-recursively "build/html" html))
5192 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5193 #t))))))
5194 (home-page "http://cffi.readthedocs.org")
5195 (synopsis "Foreign function interface for Python")
5196 (description
5197 "Foreign Function Interface for Python calling C code.")
5198 (license license:expat)))
5199
5200 (define-public python2-cffi
5201 (package-with-python2 python-cffi))
5202
5203 (define-public python-xcffib
5204 (package
5205 (name "python-xcffib")
5206 (version "0.5.1")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "xcffib" version))
5211 (sha256
5212 (base32
5213 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5214 (build-system python-build-system)
5215 (inputs
5216 `(("libxcb" ,libxcb)))
5217 (propagated-inputs
5218 `(("python-cffi" ,python-cffi) ; used at run time
5219 ("python-six" ,python-six)))
5220 (arguments
5221 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5222 #:tests? #f
5223 #:phases
5224 (modify-phases %standard-phases
5225 (add-after 'unpack 'fix-libxcb-path
5226 (lambda* (#:key inputs #:allow-other-keys)
5227 (let ((libxcb (assoc-ref inputs "libxcb")))
5228 (substitute* '("xcffib/__init__.py")
5229 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5230 #t)))
5231 (add-after 'install 'install-doc
5232 (lambda* (#:key outputs #:allow-other-keys)
5233 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5234 "/doc/" ,name "-" ,version)))
5235 (mkdir-p doc)
5236 (copy-file "README.md"
5237 (string-append doc "/README.md"))
5238 #t))))))
5239 (home-page "https://github.com/tych0/xcffib")
5240 (synopsis "XCB Python bindings")
5241 (description
5242 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5243 support for Python 3 and PyPy. It is based on cffi.")
5244 (license license:expat)))
5245
5246 (define-public python2-xcffib
5247 (package-with-python2 python-xcffib))
5248
5249 (define-public python-cairocffi
5250 (package
5251 (name "python-cairocffi")
5252 (version "0.8.0")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 ;; The archive on pypi is missing the 'utils' directory!
5257 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5258 version ".tar.gz"))
5259 (file-name (string-append name "-" version ".tar.gz"))
5260 (sha256
5261 (base32
5262 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5263 (build-system python-build-system)
5264 (outputs '("out" "doc"))
5265 (inputs
5266 `(("gdk-pixbuf" ,gdk-pixbuf)
5267 ("cairo" ,cairo)))
5268 (native-inputs
5269 `(("pkg-config" ,pkg-config)
5270 ("python-sphinx" ,python-sphinx)
5271 ("python-docutils" ,python-docutils)))
5272 (propagated-inputs
5273 `(("python-xcffib" ,python-xcffib))) ; used at run time
5274 (arguments
5275 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5276 #:tests? #f
5277 #:phases
5278 (modify-phases %standard-phases
5279 (add-after 'install 'install-doc
5280 (lambda* (#:key inputs outputs #:allow-other-keys)
5281 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5282 (doc (string-append data "/doc/" ,name "-" ,version))
5283 (html (string-append doc "/html")))
5284 (setenv "LD_LIBRARY_PATH"
5285 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5286 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5287 (setenv "LANG" "en_US.UTF-8")
5288 (mkdir-p html)
5289 (for-each (lambda (file)
5290 (copy-file (string-append "." file)
5291 (string-append doc file)))
5292 '("/README.rst" "/CHANGES" "/LICENSE"))
5293 (system* "python" "setup.py" "build_sphinx")
5294 (copy-recursively "docs/_build/html" html)
5295 #t))))))
5296 (home-page "https://github.com/Kozea/cairocffi")
5297 (synopsis "Python bindings and object-oriented API for Cairo")
5298 (description
5299 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5300 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5301 graphics library with support for multiple backends including image buffers,
5302 PNG, PostScript, PDF, and SVG file output.")
5303 (license license:bsd-3)))
5304
5305 (define-public python2-cairocffi
5306 (package-with-python2 python-cairocffi))
5307
5308 (define-public python-decorator
5309 (package
5310 (name "python-decorator")
5311 (version "4.0.10")
5312 (source
5313 (origin
5314 (method url-fetch)
5315 (uri (pypi-uri "decorator" version))
5316 (sha256
5317 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5318 (build-system python-build-system)
5319 (arguments '(#:tests? #f)) ; no test target
5320 (home-page "https://pypi.python.org/pypi/decorator/")
5321 (synopsis "Python module to simplify usage of decorators")
5322 (description
5323 "The aim of the decorator module is to simplify the usage of decorators
5324 for the average programmer, and to popularize decorators usage giving examples
5325 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5326 etc. The core of this module is a decorator factory.")
5327 (license license:expat)))
5328
5329 (define-public python2-decorator
5330 (package-with-python2 python-decorator))
5331
5332 (define-public python-drmaa
5333 (package
5334 (name "python-drmaa")
5335 (version "0.7.7")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "drmaa" version))
5340 (sha256
5341 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5342 (build-system python-build-system)
5343 ;; The test suite requires libdrmaa which is provided by the cluster
5344 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5345 ;; should be set to the path of the libdrmaa library.
5346 (arguments '(#:tests? #f))
5347 (native-inputs
5348 `(("python-nose" ,python-nose)))
5349 (home-page "https://pypi.python.org/pypi/drmaa")
5350 (synopsis "Python bindings for the DRMAA library")
5351 (description
5352 "A Python package for Distributed Resource Management (DRM) job
5353 submission and control. This package is an implementation of the DRMAA 1.0
5354 Python language binding specification.")
5355 (license license:bsd-3)))
5356
5357 (define-public python2-drmaa
5358 (package-with-python2 python-drmaa))
5359
5360 (define-public python-grako
5361 (package
5362 (name "python-grako")
5363 (version "3.99.9")
5364 (source
5365 (origin
5366 (method url-fetch)
5367 (uri
5368 (pypi-uri "grako" version ".zip"))
5369 (sha256
5370 (base32
5371 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5372 (build-system python-build-system)
5373 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5374 (native-inputs
5375 `(("unzip" ,unzip)
5376 ("python-pytest" ,python-pytest-3.0)
5377 ("python-pytest-runner" ,python-pytest-runner)))
5378 (home-page "https://bitbucket.org/neogeny/grako")
5379 (synopsis "EBNF parser generator")
5380 (description
5381 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5382 memoizing PEG/Packrat parser in Python.")
5383 (license license:bsd-3)))
5384
5385 (define-public python2-grako
5386 (package-with-python2 python-grako))
5387
5388 (define-public python-gridmap
5389 (package
5390 (name "python-gridmap")
5391 (version "0.13.0")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (string-append
5396 "https://github.com/pygridtools/gridmap/archive/v"
5397 version ".tar.gz"))
5398 (file-name (string-append name "-" version ".tar.gz"))
5399 (sha256
5400 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5401 (build-system python-build-system)
5402 (arguments
5403 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5404 (propagated-inputs
5405 `(("python-psutil" ,python-psutil)
5406 ("python-drmaa" ,python-drmaa)
5407 ("python-pyzmq" ,python-pyzmq)))
5408 (home-page "https://github.com/pygridtools/gridmap")
5409 (synopsis "Create jobs on a cluster directly from Python")
5410 (description
5411 "Gridmap is a Python package to allow you to easily create jobs on the
5412 cluster directly from Python. You can directly map Python functions onto the
5413 cluster without needing to write any wrapper code yourself.")
5414 (license license:gpl3+)))
5415
5416 (define-public python2-gridmap
5417 (package-with-python2 python-gridmap))
5418
5419 (define-public python-honcho
5420 (package
5421 (name "python-honcho")
5422 (version "1.0.1")
5423 (source
5424 (origin
5425 (method url-fetch)
5426 (uri (string-append
5427 "https://github.com/nickstenning/honcho/archive/v"
5428 version ".tar.gz"))
5429 (file-name (string-append name "-" version ".tar.gz"))
5430 (sha256
5431 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
5432 (build-system python-build-system)
5433 (native-inputs
5434 `(("python-pytest" ,python-pytest-3.0)
5435 ("python-mock" ,python-mock)
5436 ("python-tox" ,python-tox)
5437 ("which" ,which))) ;for tests
5438 (propagated-inputs
5439 `(("python-jinja2" ,python-jinja2)))
5440 (arguments
5441 `(#:phases
5442 (modify-phases %standard-phases
5443 (delete 'check)
5444 (add-after 'install 'check
5445 (lambda* (#:key outputs inputs #:allow-other-keys)
5446 ;; fix honcho path in testsuite
5447 (substitute* "tests/conftest.py"
5448 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5449 "/bin/honcho" "'")))
5450 ;; It's easier to run tests after install.
5451 ;; Make installed package available for running the tests
5452 (add-installed-pythonpath inputs outputs)
5453 (zero? (system* "py.test" "-v")))))))
5454 (home-page "https://github.com/nickstenning/honcho")
5455 (synopsis "Manage Procfile-based applications")
5456 (description
5457 "A Procfile is a file which describes how to run an application
5458 consisting of serveral processes. honcho starts all listed processes.
5459 The output of all running processes is collected by honcho and
5460 displayed.")
5461 (license license:expat)))
5462
5463 (define-public python2-honcho
5464 (package-with-python2 python-honcho))
5465
5466 (define-public python-pexpect
5467 (package
5468 (name "python-pexpect")
5469 (version "4.2.1")
5470 (source
5471 (origin
5472 (method url-fetch)
5473 (uri (pypi-uri "pexpect" version))
5474 (sha256
5475 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5476 (build-system python-build-system)
5477 (arguments
5478 `(#:phases
5479 (modify-phases %standard-phases
5480 (add-before 'check 'prepare-tests
5481 (lambda _
5482 (substitute* (find-files "tests")
5483 (("/bin/ls") (which "ls"))
5484 (("/bin/echo") (which "echo"))
5485 (("/bin/which") (which "which"))
5486 ;; Many tests try to use the /bin directory which
5487 ;; is not present in the build environment.
5488 ;; Use one that's non-empty and unlikely to change.
5489 (("/bin'") "/dev'"))
5490 ;; XXX: Socket connection test gets "Connection reset by peer".
5491 ;; Why does it not work? Delete for now.
5492 (delete-file "tests/test_socket.py")
5493 #t))
5494 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5495 (native-inputs
5496 `(("python-nose" ,python-nose)
5497 ("python-pytest" ,python-pytest-3.0)
5498 ("man-db" ,man-db)
5499 ("which" ,which)
5500 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5501 (propagated-inputs
5502 `(("python-ptyprocess" ,python-ptyprocess)))
5503 (home-page "http://pexpect.readthedocs.org/")
5504 (synopsis "Controlling interactive console applications")
5505 (description
5506 "Pexpect is a pure Python module for spawning child applications;
5507 controlling them; and responding to expected patterns in their output.
5508 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5509 child application and control it as if a human were typing commands.")
5510 (license license:isc)))
5511
5512 (define-public python2-pexpect
5513 (package-with-python2 python-pexpect))
5514
5515 (define-public python-setuptools-scm
5516 (package
5517 (name "python-setuptools-scm")
5518 (version "1.15.0")
5519 (source (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "setuptools_scm" version))
5522 (sha256
5523 (base32
5524 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5525 (build-system python-build-system)
5526 (home-page "https://github.com/pypa/setuptools_scm/")
5527 (synopsis "Manage Python package versions in SCM metadata")
5528 (description
5529 "Setuptools_scm handles managing your Python package versions in
5530 @dfn{software configuration management} (SCM) metadata instead of declaring
5531 them as the version argument or in a SCM managed file.")
5532 (license license:expat)))
5533
5534 (define-public python2-setuptools-scm
5535 (package-with-python2 python-setuptools-scm))
5536
5537 (define-public python-pathpy
5538 (package
5539 (name "python-pathpy")
5540 (version "8.1.1")
5541 (source
5542 (origin
5543 (method url-fetch)
5544 (uri (string-append "https://pypi.python.org/packages/source/p/"
5545 "path.py/path.py-" version ".tar.gz"))
5546 (sha256
5547 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5548 (outputs '("out" "doc"))
5549 (build-system python-build-system)
5550 (propagated-inputs
5551 `(("python-appdirs" ,python-appdirs)))
5552 (native-inputs
5553 `(("python-setuptools-scm" ,python-setuptools-scm)
5554 ("python-sphinx" ,python-sphinx)
5555 ("python-rst.linker" ,python-rst.linker)
5556 ("python-pytest" ,python-pytest)
5557 ("python-pytest-runner" ,python-pytest-runner)))
5558 (arguments
5559 `(#:phases
5560 (modify-phases %standard-phases
5561 (add-after 'build 'build-doc
5562 (lambda _
5563 (setenv "LANG" "en_US.UTF-8")
5564 (zero? (system* "python" "setup.py" "build_sphinx"))))
5565 (add-after 'install 'install-doc
5566 (lambda* (#:key outputs #:allow-other-keys)
5567 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5568 (doc (string-append data "/doc/" ,name "-" ,version))
5569 (html (string-append doc "/html")))
5570 (mkdir-p html)
5571 (for-each (lambda (file)
5572 (copy-file file (string-append doc "/" file)))
5573 '("README.rst" "CHANGES.rst"))
5574 (copy-recursively "build/sphinx/html" html)))))))
5575 (home-page "https://github.com/jaraco/path.py")
5576 (synopsis "Python module wrapper for built-in os.path")
5577 (description
5578 "@code{path.py} implements path objects as first-class entities, allowing
5579 common operations on files to be invoked on those path objects directly.")
5580 (license license:expat)))
5581
5582 (define-public python2-pathpy
5583 (package-with-python2 python-pathpy))
5584
5585 (define-public python-pickleshare
5586 (package
5587 (name "python-pickleshare")
5588 (version "0.5")
5589 (source
5590 (origin
5591 (method url-fetch)
5592 (uri (string-append "https://pypi.python.org/packages/source/p/"
5593 "pickleshare/pickleshare-" version ".tar.gz"))
5594 (sha256
5595 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5596 (build-system python-build-system)
5597 (propagated-inputs
5598 `(("python-pathpy" ,python-pathpy)))
5599 (home-page "https://github.com/vivainio/pickleshare")
5600 (synopsis "Tiny key value database with concurrency support")
5601 (description
5602 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5603 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5604 shelve, many processes can access the database simultaneously. Changing a
5605 value in database is immediately visible to other processes accessing the same
5606 database. Concurrency is possible because the values are stored in separate
5607 files. Hence the “database” is a directory where all files are governed by
5608 PickleShare.")
5609 (license license:expat)))
5610
5611 (define-public python2-pickleshare
5612 (package-with-python2 python-pickleshare))
5613
5614 (define-public python-simplegeneric
5615 (package
5616 (name "python-simplegeneric")
5617 (version "0.8.1")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 (uri (string-append "https://pypi.python.org/packages/source/s/"
5622 "simplegeneric/simplegeneric-" version ".zip"))
5623 (sha256
5624 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5625 (build-system python-build-system)
5626 (native-inputs
5627 `(("unzip" ,unzip)))
5628 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5629 (synopsis "Python module for simple generic functions")
5630 (description
5631 "The simplegeneric module lets you define simple single-dispatch generic
5632 functions, akin to Python’s built-in generic functions like @code{len()},
5633 @code{iter()} and so on. However, instead of using specially-named methods,
5634 these generic functions use simple lookup tables, akin to those used by
5635 e.g. @code{pickle.dump()} and other generic functions found in the Python
5636 standard library.")
5637 (license license:zpl2.1)))
5638
5639 (define-public python2-simplegeneric
5640 (package-with-python2 python-simplegeneric))
5641
5642 (define-public python-ipython-genutils
5643 ;; TODO: This package is retired, check if can be removed, see description.
5644 (package
5645 (name "python-ipython-genutils")
5646 (version "0.1.0")
5647 (source
5648 (origin
5649 (method url-fetch)
5650 (uri (string-append "https://pypi.python.org/packages/source/i/"
5651 "ipython_genutils/ipython_genutils-"
5652 version ".tar.gz"))
5653 (sha256
5654 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5655 (build-system python-build-system)
5656 (arguments `(#:tests? #f)) ; no tests
5657 (home-page "http://ipython.org")
5658 (synopsis "Vestigial utilities from IPython")
5659 (description
5660 "This package provides retired utilities from IPython. No packages
5661 outside IPython/Jupyter should depend on it.
5662
5663 This package shouldn't exist. It contains some common utilities shared by
5664 Jupyter and IPython projects during The Big Split. As soon as possible, those
5665 packages will remove their dependency on this, and this package will go
5666 away.")
5667 (license license:bsd-3)))
5668
5669 (define-public python2-ipython-genutils
5670 (package-with-python2 python-ipython-genutils))
5671
5672 (define-public python-traitlets
5673 (package
5674 (name "python-traitlets")
5675 (version "4.2.0")
5676 (source
5677 (origin
5678 (method url-fetch)
5679 (uri (pypi-uri "traitlets" version))
5680 (sha256
5681 (base32
5682 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5683 (build-system python-build-system)
5684 (arguments
5685 `(#:phases
5686 (modify-phases %standard-phases
5687 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5688 (propagated-inputs
5689 `(("python-ipython-genutils" ,python-ipython-genutils)
5690 ("python-decorator" ,python-decorator)))
5691 (native-inputs
5692 `(("python-mock" ,python-mock)
5693 ("python-nose" ,python-nose)))
5694 (home-page "http://ipython.org")
5695 (synopsis "Configuration system for Python applications")
5696 (description
5697 "Traitlets is a framework that lets Python classes have attributes with
5698 type checking, dynamically calculated default values, and ‘on change’
5699 callbacks. The package also includes a mechanism to use traitlets for
5700 configuration, loading values from files or from command line arguments. This
5701 is a distinct layer on top of traitlets, so you can use traitlets in your code
5702 without using the configuration machinery.")
5703 (license license:bsd-3)))
5704
5705 (define-public python2-traitlets
5706 (package-with-python2 python-traitlets))
5707
5708 (define-public python-jupyter-core
5709 (package
5710 (name "python-jupyter-core")
5711 (version "4.2.1")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (string-append (pypi-uri "jupyter_core" version)))
5716 (sha256
5717 (base32
5718 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5719 (build-system python-build-system)
5720 ;; FIXME: not sure how to run the tests
5721 (arguments `(#:tests? #f))
5722 (propagated-inputs
5723 `(("python-traitlets" ,python-traitlets)))
5724 (home-page "http://jupyter.org/")
5725 (synopsis "Jupyter base package")
5726 (description
5727 "Jupyter core is the base package on which Jupyter projects rely.")
5728 (license license:bsd-3)))
5729
5730 (define-public python2-jupyter-core
5731 (package-with-python2 python-jupyter-core))
5732
5733 (define-public python-jupyter-client
5734 (package
5735 (name "python-jupyter-client")
5736 (version "4.4.0")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "jupyter_client" version))
5741 (sha256
5742 (base32
5743 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5744 (build-system python-build-system)
5745 ;; Tests fail because of missing native python kernel which I assume is
5746 ;; provided by the ipython package, which we cannot use because it would
5747 ;; cause a dependency cycle.
5748 (arguments `(#:tests? #f))
5749 (propagated-inputs
5750 `(("python-pyzmq" ,python-pyzmq)
5751 ("python-traitlets" ,python-traitlets)
5752 ("python-jupyter-core" ,python-jupyter-core)))
5753 (home-page "http://jupyter.org/")
5754 (synopsis "Jupyter protocol implementation and client libraries")
5755 (description
5756 "The @code{jupyter_client} package contains the reference implementation
5757 of the Jupyter protocol. It also provides client and kernel management APIs
5758 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5759 installing @code{kernelspec}s for use with Jupyter frontends.")
5760 (license license:bsd-3)))
5761
5762 (define-public python2-jupyter-client
5763 (package-with-python2 python-jupyter-client))
5764
5765 (define-public python-ipykernel
5766 (package
5767 (name "python-ipykernel")
5768 (version "4.5.2")
5769 (source
5770 (origin
5771 (method url-fetch)
5772 (uri (pypi-uri "ipykernel" version))
5773 (sha256
5774 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5775 (build-system python-build-system)
5776 ;; The tests load a submodule of IPython. However, IPython itself depends
5777 ;; on ipykernel.
5778 (arguments `(#:tests? #f))
5779 (propagated-inputs
5780 ;; imported at runtime during connect
5781 `(("python-jupyter-client" ,python-jupyter-client)))
5782 (home-page "http://ipython.org")
5783 (synopsis "IPython Kernel for Jupyter")
5784 (description
5785 "This package provides the IPython kernel for Jupyter.")
5786 (license license:bsd-3)))
5787
5788 (define-public python2-ipykernel
5789 (package-with-python2 python-ipykernel))
5790
5791 (define-public python-testpath
5792 (package
5793 (name "python-testpath")
5794 (version "0.2")
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5799 version ".tar.gz"))
5800 (file-name (string-append name "-" version ".tar.gz"))
5801 (sha256
5802 (base32
5803 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5804 (build-system python-build-system)
5805 (arguments
5806 `(#:tests? #f ; this package does not even have a setup.py
5807 #:modules ((guix build python-build-system)
5808 (guix build utils)
5809 (srfi srfi-1))
5810 #:imported-modules (,@%python-build-system-modules
5811 (srfi srfi-1))
5812 #:phases
5813 (modify-phases %standard-phases
5814 (delete 'install)
5815 (replace 'build
5816 (lambda* (#:key inputs outputs #:allow-other-keys)
5817 (let* ((version (last
5818 (string-split (assoc-ref inputs "python") #\-)))
5819 (x.y (string-join (take (string-split version #\.) 2)
5820 "."))
5821 (dir (string-append
5822 (assoc-ref outputs "out")
5823 "/lib/python" x.y "/site-packages/testpath")))
5824 (mkdir-p dir)
5825 (copy-recursively "testpath" dir))
5826 #t)))))
5827 (home-page "https://github.com/takluyver/testpath")
5828 (synopsis "Test utilities for code working with files and commands")
5829 (description
5830 "Testpath is a collection of utilities for Python code working with files
5831 and commands. It contains functions to check things on the filesystem, and
5832 tools for mocking system commands and recording calls to those.")
5833 (license license:expat)))
5834
5835 (define-public python2-testpath
5836 (package-with-python2 python-testpath))
5837
5838 (define-public python-ipython
5839 (package
5840 (name "python-ipython")
5841 (version "5.3.0")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (pypi-uri "ipython" version ".tar.gz"))
5846 (sha256
5847 (base32 "079wyjir4a9qx6kvx096b1asm63djbidk65z3ykcbnlngmg62pmz"))))
5848 (build-system python-build-system)
5849 (outputs '("out" "doc"))
5850 (propagated-inputs
5851 `(("python-pyzmq" ,python-pyzmq)
5852 ("python-prompt-toolkit" ,python-prompt-toolkit)
5853 ("python-terminado" ,python-terminado)
5854 ("python-matplotlib" ,python-matplotlib)
5855 ("python-numpy" ,python-numpy)
5856 ("python-numpydoc" ,python-numpydoc)
5857 ("python-jinja2" ,python-jinja2)
5858 ("python-jupyter-console"
5859 ;; The python-ipython and python-jupyter-console require each
5860 ;; other. To get the functionality in both packages working, strip
5861 ;; down the python-jupyter-console package when using it as an input
5862 ;; to python-ipython.
5863 ,python-jupyter-console-minimal)
5864 ("python-mistune" ,python-mistune)
5865 ("python-pexpect" ,python-pexpect)
5866 ("python-pickleshare" ,python-pickleshare)
5867 ("python-simplegeneric" ,python-simplegeneric)
5868 ("python-jsonschema" ,python-jsonschema)
5869 ("python-traitlets" ,python-traitlets)
5870 ("python-ipykernel" ,python-ipykernel)
5871 ("python-nbformat" ,python-nbformat)
5872 ("python-pygments" ,python-pygments)))
5873 (inputs
5874 `(("readline" ,readline)
5875 ("which" ,which)))
5876 (native-inputs
5877 `(("graphviz" ,graphviz)
5878 ("pkg-config" ,pkg-config)
5879 ("python-requests" ,python-requests) ;; for tests
5880 ("python-testpath" ,python-testpath)
5881 ("python-nose" ,python-nose)
5882 ("python-sphinx" ,python-sphinx)
5883 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5884 ;; FIXME: It's possible that a smaller union would work just as well.
5885 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5886 texlive-fonts-ec
5887 texlive-generic-ifxetex
5888 texlive-generic-pdftex
5889 texlive-latex-amsfonts
5890 texlive-latex-capt-of
5891 texlive-latex-cmap
5892 texlive-latex-environ
5893 texlive-latex-eqparbox
5894 texlive-latex-etoolbox
5895 texlive-latex-expdlist
5896 texlive-latex-fancyhdr
5897 texlive-latex-fancyvrb
5898 texlive-latex-fncychap
5899 texlive-latex-float
5900 texlive-latex-framed
5901 texlive-latex-geometry
5902 texlive-latex-graphics
5903 texlive-latex-hyperref
5904 texlive-latex-mdwtools
5905 texlive-latex-multirow
5906 texlive-latex-oberdiek
5907 texlive-latex-parskip
5908 texlive-latex-preview
5909 texlive-latex-tabulary
5910 texlive-latex-threeparttable
5911 texlive-latex-titlesec
5912 texlive-latex-trimspaces
5913 texlive-latex-ucs
5914 texlive-latex-upquote
5915 texlive-latex-url
5916 texlive-latex-varwidth
5917 texlive-latex-wrapfig)))
5918 ("texinfo" ,texinfo)))
5919 (arguments
5920 `(#:phases
5921 (modify-phases %standard-phases
5922 (add-after
5923 'install 'install-doc
5924 (lambda* (#:key inputs outputs #:allow-other-keys)
5925 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5926 (doc (string-append data "/doc/" ,name "-" ,version))
5927 (html (string-append doc "/html"))
5928 (man1 (string-append data "/man/man1"))
5929 (info (string-append data "/info"))
5930 (examples (string-append doc "/examples"))
5931 (python-arg (string-append "PYTHON=" (which "python"))))
5932 (setenv "LANG" "en_US.utf8")
5933 ;; Make installed package available for running the tests
5934 (add-installed-pythonpath inputs outputs)
5935 (with-directory-excursion "docs"
5936 ;; FIXME: pdf fails to build
5937 ;;(system* "make" "pdf" "PAPER=a4")
5938 (system* "make" python-arg "html")
5939 (system* "make" python-arg "info"))
5940 (copy-recursively "docs/man" man1)
5941 (copy-recursively "examples" examples)
5942 (copy-recursively "docs/build/html" html)
5943 ;; (copy-file "docs/build/latex/ipython.pdf"
5944 ;; (string-append doc "/ipython.pdf"))
5945 (mkdir-p info)
5946 (copy-file "docs/build/texinfo/ipython.info"
5947 (string-append info "/ipython.info"))
5948 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5949 ;; Tests can only be run after the library has been installed and not
5950 ;; within the source directory.
5951 (delete 'check)
5952 (add-after
5953 'install 'check
5954 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5955 (if tests?
5956 (with-directory-excursion "/tmp"
5957 ;; Make installed package available for running the tests
5958 (add-installed-pythonpath inputs outputs)
5959 (setenv "HOME" "/tmp/") ;; required by a test
5960 (zero? (system* (string-append (assoc-ref outputs "out")
5961 "/bin/iptest"))))
5962 #t)))
5963 (add-before
5964 'install 'fix-tests
5965 (lambda* (#:key inputs #:allow-other-keys)
5966 (substitute* "./IPython/utils/_process_posix.py"
5967 (("/usr/bin/env', 'which") (which "which")))
5968 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5969 (("#!/usr/bin/env python")
5970 (string-append "#!" (which "python"))))
5971 ;; Disable 1 failing test
5972 (substitute* "./IPython/core/tests/test_magic.py"
5973 (("def test_dirops\\(\\):" all)
5974 (string-append "@dec.skipif(True)\n" all))))))))
5975 (home-page "http://ipython.org")
5976 (synopsis "IPython is a tool for interactive computing in Python")
5977 (description
5978 "IPython provides a rich architecture for interactive computing with:
5979 Powerful interactive shells, a browser-based notebook, support for interactive
5980 data visualization, embeddable interpreters and tools for parallel
5981 computing.")
5982 (license license:bsd-3)
5983 (properties `((python2-variant . ,(delay python2-ipython))))))
5984
5985 (define-public python2-ipython
5986 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5987 (package
5988 (inherit ipython)
5989 ;; FIXME: add pyreadline once available.
5990 (propagated-inputs
5991 `(("python2-backports-shutil-get-terminal-size"
5992 ,python2-backports-shutil-get-terminal-size)
5993 ("python2-pathlib2" ,python2-pathlib2)
5994 ,@(package-propagated-inputs ipython)))
5995 (native-inputs
5996 `(("python2-mock" ,python2-mock)
5997 ,@(package-native-inputs ipython))))))
5998
5999 (define-public python-isodate
6000 (package
6001 (name "python-isodate")
6002 (version "0.5.4")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (pypi-uri "isodate" version))
6007 (sha256
6008 (base32
6009 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
6010 (build-system python-build-system)
6011 (home-page
6012 "http://cheeseshop.python.org/pypi/isodate")
6013 (synopsis
6014 "Python date parser and formatter")
6015 (description
6016 "Python-isodate is a python module for parsing and formatting
6017 ISO 8601 dates, time and duration.")
6018 (license license:bsd-3)))
6019
6020 (define-public python2-isodate
6021 (package-with-python2 python-isodate))
6022
6023 (define-public python-html5lib
6024 (package
6025 (name "python-html5lib")
6026 (version "1.0b10")
6027 (source
6028 (origin
6029 (method url-fetch)
6030 (uri (pypi-uri "html5lib" version))
6031 (sha256
6032 (base32
6033 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
6034 (build-system python-build-system)
6035 (propagated-inputs
6036 `(("python-six" ,python-six)
6037 ("python-webencodings" ,python-webencodings)))
6038 (arguments
6039 `(#:test-target "check"))
6040 (home-page
6041 "https://github.com/html5lib/html5lib-python")
6042 (synopsis
6043 "Python HTML parser based on the WHATWG HTML specifcation")
6044 (description
6045 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
6046 and written in Python.")
6047 (license license:expat)))
6048
6049 (define-public python2-html5lib
6050 (package-with-python2 python-html5lib))
6051
6052 ;; Needed for python-bleach, a dependency of python-notebook
6053 (define-public python-html5lib-0.9
6054 (package
6055 (inherit python-html5lib)
6056 (version "0.999")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "html5lib" version))
6061 (sha256
6062 (base32
6063 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
6064
6065 (define-public python2-html5lib-0.9
6066 (package-with-python2 python-html5lib-0.9))
6067
6068 (define-public python-html5-parser
6069 (package
6070 (name "python-html5-parser")
6071 (version "0.4.4")
6072 (source (origin
6073 (method url-fetch)
6074 (uri (pypi-uri "html5-parser" version))
6075 (sha256
6076 (base32
6077 "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
6078 (build-system python-build-system)
6079 (native-inputs
6080 `(("pkg-config" ,pkg-config)))
6081 (inputs
6082 `(("libxml2" ,libxml2)))
6083 (propagated-inputs
6084 `(("python-lxml" ,python-lxml)
6085 ("python-beautifulsoup4" ,python-beautifulsoup4)))
6086 (home-page "https://html5-parser.readthedocs.io")
6087 (synopsis "Fast C-based HTML5 parsing for Python")
6088 (description "This package provides a fast implementation of the HTML5
6089 parsing spec for Python. Parsing is done in C using a variant of the gumbo
6090 parser. The gumbo parse tree is then transformed into an lxml tree, also in
6091 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
6092 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
6093 ;; indicate ASL2.0, including the LICENSE file for the whole project.
6094 (license (list license:asl2.0 license:gpl3))))
6095
6096 (define-public python2-html5-parser
6097 (package-with-python2 python-html5-parser))
6098
6099 (define-public python-webencodings
6100 (package
6101 (name "python-webencodings")
6102 (version "0.5")
6103 (source (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "webencodings" version))
6106 (sha256
6107 (base32
6108 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
6109 (build-system python-build-system)
6110 (arguments
6111 '(#:phases
6112 (modify-phases %standard-phases
6113 (replace 'check
6114 (lambda _
6115 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
6116 (native-inputs
6117 `(("python-pytest" ,python-pytest)))
6118 (home-page "https://github.com/SimonSapin/python-webencodings")
6119 (synopsis "Character encoding aliases for legacy web content")
6120 (description
6121 "In order to be compatible with legacy web content when interpreting
6122 something like @code{Content-Type: text/html; charset=latin1}, tools need
6123 to use a particular set of aliases for encoding labels as well as some
6124 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
6125 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
6126 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
6127 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
6128 defines all such details so that implementations do not have to
6129 reverse-engineer each other.
6130
6131 This module implements the Encoding standard and has encoding labels and
6132 BOM detection, but the actual implementation for encoders and decoders
6133 is Python’s.")
6134 (license license:bsd-3)))
6135
6136 (define-public python2-webencodings
6137 (package-with-python2 python-webencodings))
6138
6139 (define-public python-urwid
6140 (package
6141 (name "python-urwid")
6142 (version "1.3.1")
6143 (source
6144 (origin
6145 (method url-fetch)
6146 (uri (pypi-uri "urwid" version))
6147 (sha256
6148 (base32
6149 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
6150 (build-system python-build-system)
6151 (arguments
6152 `(#:phases
6153 (modify-phases %standard-phases
6154 ;; Disable failing test. Bug filed upstream:
6155 ;; https://github.com/wardi/urwid/issues/164
6156 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
6157 (add-after 'unpack 'disable-failing-test
6158 (lambda _
6159 (substitute* "urwid/tests/test_event_loops.py"
6160 (("test_remove_watch_file")
6161 "disable_remove_watch_file")))))))
6162 (home-page "http://urwid.org")
6163 (synopsis "Console user interface library for Python")
6164 (description
6165 "Urwid is a curses-based UI/widget library for Python. It includes many
6166 features useful for text console applications.")
6167 (license license:lgpl2.1+)))
6168
6169 (define-public python2-urwid
6170 (let ((python2-urwid (package-with-python2 python-urwid)))
6171 (package
6172 (inherit python2-urwid)
6173 (arguments
6174 (append
6175 `(;; Explicitly using Python 2 is necessary due the argument list being
6176 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
6177 ;; package arguments, which by default assumes the use of Python 3.
6178 #:python ,python-2
6179 #:phases
6180 (modify-phases %standard-phases
6181 ;; Disable the vterm tests because of non-deterministic failures
6182 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
6183 (add-after 'unpack 'delete-test_vterm.py
6184 (delete-file "urwid/tests/test_vterm.py"))))
6185 (package-arguments python-urwid))))))
6186
6187 (define-public python-openid
6188 (package
6189 (name "python-openid")
6190 (version "3.0.10")
6191 (source
6192 (origin
6193 (method url-fetch)
6194 (uri (pypi-uri "python3-openid" version))
6195 (sha256
6196 (base32
6197 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
6198 (build-system python-build-system)
6199 (arguments
6200 `(#:phases
6201 (modify-phases %standard-phases
6202 (replace 'check
6203 (lambda _
6204 (zero? (system* "./admin/runtests")))))))
6205 (properties `((python2-variant . ,(delay python2-openid))))
6206 (propagated-inputs
6207 `(("python-defusedxml" ,python-defusedxml)))
6208 (native-inputs
6209 `(("python-psycopg2" ,python-psycopg2)
6210 ("python-django" ,python-django)))
6211 (home-page "https://github.com/necaris/python3-openid")
6212 (synopsis "OpenID support for servers and consumers")
6213 (description "This library provides OpenID authentication for Python, both
6214 for clients and servers.")
6215 (license license:asl2.0)))
6216
6217 (define-public python2-openid
6218 (package
6219 (name "python2-openid")
6220 (version "2.2.5")
6221 (source
6222 (origin
6223 (method url-fetch)
6224 (uri (pypi-uri "python-openid" version))
6225 (sha256
6226 (base32
6227 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
6228 (build-system python-build-system)
6229 (arguments
6230 ;; Python 3 support is in `python3-openid`, a separate package.
6231 `(#:python ,python-2))
6232 (home-page "https://github.com/openid/python-openid")
6233 (synopsis "OpenID support for servers and consumers")
6234 (description "This library provides OpenID authentication for Python, both
6235 for clients and servers.")
6236 (license license:asl2.0)))
6237
6238 (define-public python-urwidtrees
6239 (package
6240 (name "python-urwidtrees")
6241 (version "1.0.2")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 ;; package author intends on distributing via github rather than pypi:
6246 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6247 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
6248 version ".tar.gz"))
6249 (file-name (string-append name "-" version ".tar.gz"))
6250 (sha256
6251 (base32
6252 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
6253 (build-system python-build-system)
6254 (arguments
6255 '(#:tests? #f)) ; no tests
6256 (propagated-inputs `(("python-urwid" ,python-urwid)))
6257 (home-page "https://github.com/pazz/urwidtrees")
6258 (synopsis "Tree widgets for urwid")
6259 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6260 toolkit. Use it to build trees of widgets.")
6261 (license license:gpl3+)))
6262
6263 (define-public python2-urwidtrees
6264 (package-with-python2 python-urwidtrees))
6265
6266 (define-public python-dbus
6267 (package
6268 (name "python-dbus")
6269 (version "1.2.0")
6270 (source
6271 (origin
6272 (method url-fetch)
6273 (uri (string-append
6274 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
6275 version ".tar.gz"))
6276 (sha256
6277 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6278 (build-system gnu-build-system)
6279 (arguments
6280 '(#:phases
6281 (modify-phases %standard-phases
6282 (add-before
6283 'check 'pre-check
6284 (lambda _
6285 ;; XXX: For the missing '/etc/machine-id'.
6286 (substitute* "test/run-test.sh"
6287 (("DBUS_FATAL_WARNINGS=1")
6288 "DBUS_FATAL_WARNINGS=0"))
6289 #t)))))
6290 (native-inputs
6291 `(("pkg-config" ,pkg-config)))
6292 (inputs
6293 `(("python" ,python)
6294 ("dbus-glib" ,dbus-glib)))
6295 (synopsis "Python bindings for D-bus")
6296 (description "python-dbus provides bindings for libdbus, the reference
6297 implementation of D-Bus.")
6298 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
6299 (license license:expat)))
6300
6301 (define-public python2-dbus
6302 (package (inherit python-dbus)
6303 (name "python2-dbus")
6304 (inputs `(("python" ,python-2)
6305 ,@(alist-delete "python"
6306 (package-inputs python-dbus)
6307 equal?)))
6308 ;; FIXME: on Python 2, the test_utf8 fails with:
6309 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6310 (arguments `(#:tests? #f))))
6311
6312 (define-public python-apsw
6313 (package
6314 (name "python-apsw")
6315 (version "3.9.2-r1")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "apsw" version))
6320 (sha256
6321 (base32
6322 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
6323 (build-system python-build-system)
6324 (inputs
6325 `(("sqlite" ,sqlite)))
6326 (arguments
6327 `(#:phases
6328 (modify-phases %standard-phases
6329 (replace 'build
6330 (lambda _
6331 (zero?
6332 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
6333 (add-after 'build 'build-test-helper
6334 (lambda _
6335 (zero?
6336 (system
6337 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
6338 "-I. -Isqlite3 src/testextension.c") ))))
6339 (delete 'check)
6340 (add-after 'install 'check
6341 (lambda* (#:key inputs outputs #:allow-other-keys)
6342 (add-installed-pythonpath inputs outputs)
6343 (zero? (system* "python" "setup.py" "test")))))))
6344 (home-page "https://github.com/rogerbinns/apsw/")
6345 (synopsis "Another Python SQLite Wrapper")
6346 (description "APSW is a Python wrapper for the SQLite
6347 embedded relational database engine. In contrast to other wrappers such as
6348 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6349 translate the complete SQLite API into Python.")
6350 (license license:zlib)))
6351
6352 (define-public python2-apsw
6353 (package-with-python2 python-apsw))
6354
6355 (define-public python-lxml
6356 (package
6357 (name "python-lxml")
6358 (version "3.8.0")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "lxml" version))
6363 (sha256
6364 (base32
6365 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
6366 (build-system python-build-system)
6367 (inputs
6368 `(("libxml2" ,libxml2)
6369 ("libxslt" ,libxslt)))
6370 (home-page "http://lxml.de/")
6371 (synopsis
6372 "Python XML processing library")
6373 (description
6374 "The lxml XML toolkit is a Pythonic binding for the C libraries
6375 libxml2 and libxslt.")
6376 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6377
6378 (define-public python2-lxml
6379 (package-with-python2 python-lxml))
6380
6381 ;; beautifulsoup4 has a totally different namespace than 3.x,
6382 ;; and pypi seems to put it under its own name, so I guess we should too
6383 (define-public python-beautifulsoup4
6384 (package
6385 (name "python-beautifulsoup4")
6386 (version "4.5.3")
6387 (source
6388 (origin
6389 (method url-fetch)
6390 (uri (pypi-uri "beautifulsoup4" version))
6391 (sha256
6392 (base32
6393 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6394 (build-system python-build-system)
6395 (arguments
6396 `(#:phases
6397 (modify-phases %standard-phases
6398 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6399 ;; must use this conversion script when building with Python 3. The
6400 ;; conversion script also runs the tests.
6401 ;; For more information, see the file 'convert-py3k' in the source
6402 ;; distribution.
6403 (replace 'check
6404 (lambda _ (zero? (system* "./convert-py3k")))))))
6405 (home-page
6406 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6407 (synopsis
6408 "Python screen-scraping library")
6409 (description
6410 "Beautiful Soup is a Python library designed for rapidly setting up
6411 screen-scraping projects. It offers Pythonic idioms for navigating,
6412 searching, and modifying a parse tree, providing a toolkit for
6413 dissecting a document and extracting what you need. It automatically
6414 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6415 (license license:expat)
6416 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6417
6418 (define-public python2-beautifulsoup4
6419 (package
6420 (inherit (package-with-python2
6421 (strip-python2-variant python-beautifulsoup4)))
6422 (arguments `(#:python ,python-2))))
6423
6424 (define-public python-cssutils
6425 (package
6426 (name "python-cssutils")
6427 (version "1.0.1")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "cssutils" version))
6432 (sha256
6433 (base32
6434 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6435 (build-system python-build-system)
6436 (native-inputs
6437 `(("unzip" ,unzip))) ; for unpacking the source
6438 (arguments
6439 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6440 (home-page "http://cthedot.de/cssutils/")
6441 (synopsis
6442 "CSS Cascading Style Sheets library for Python")
6443 (description
6444 "Cssutils is a Python package for parsing and building CSS
6445 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6446 options.")
6447 (license license:lgpl3+)))
6448
6449 (define-public python2-cssutils
6450 (package-with-python2 python-cssutils))
6451
6452 (define-public python-cssselect
6453 (package
6454 (name "python-cssselect")
6455 (version "0.9.2")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "cssselect" version))
6460 (sha256
6461 (base32
6462 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6463 (build-system python-build-system)
6464 (arguments
6465 ;; tests fail with message
6466 ;; AttributeError: 'module' object has no attribute 'tests'
6467 `(#:tests? #f))
6468 (home-page
6469 "https://pythonhosted.org/cssselect/")
6470 (synopsis
6471 "CSS3 selector parser and translator to XPath 1.0")
6472 (description
6473 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6474 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6475 another XPath engine to find the matching elements in an XML or HTML document.")
6476 (license license:bsd-3)))
6477
6478 (define-public python2-cssselect
6479 (package-with-python2 python-cssselect))
6480
6481 (define-public python-openid-cla
6482 (package
6483 (name "python-openid-cla")
6484 (version "1.2")
6485 (source
6486 (origin
6487 (method url-fetch)
6488 (uri (pypi-uri "python-openid-cla" version))
6489 (sha256
6490 (base32
6491 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6492 (build-system python-build-system)
6493 (arguments '(#:tests? #f)) ; No tests.
6494 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6495 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6496 (description "@code{openid-cla} is an implementation of the OpenID
6497 contributor license agreement extension for python-openid.")
6498 (license license:bsd-3)))
6499
6500 (define-public python2-openid-cla
6501 (package-with-python2 python-openid-cla))
6502
6503 (define-public python-openid-teams
6504 (package
6505 (name "python-openid-teams")
6506 (version "1.1")
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "python-openid-teams" version))
6511 (sha256
6512 (base32
6513 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6514 (build-system python-build-system)
6515 (arguments '(#:tests? #f)) ; No tests.
6516 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6517 (synopsis "Implementation of the OpenID teams extension for python-openid")
6518 (description
6519 "@code{openid-teams} is an implementation of the OpenID
6520 teams extension for python-openid.")
6521 (license license:bsd-3)))
6522
6523 (define-public python2-openid-teams
6524 (package-with-python2 python-openid-teams))
6525
6526 (define-public python-netifaces
6527 (package
6528 (name "python-netifaces")
6529 (version "0.10.4")
6530 (source
6531 (origin
6532 (method url-fetch)
6533 (uri (string-append
6534 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6535 version
6536 ".tar.gz"))
6537 (sha256
6538 (base32
6539 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6540 (build-system python-build-system)
6541 (home-page
6542 "https://bitbucket.org/al45tair/netifaces")
6543 (synopsis
6544 "Python module for portable network interface information")
6545 (description
6546 "Netifaces is a Python module providing information on network
6547 interfaces in an easy and portable manner.")
6548 (license license:expat)))
6549
6550 (define-public python2-netifaces
6551 (package-with-python2 python-netifaces))
6552
6553 (define-public python-networkx
6554 (package
6555 (name "python-networkx")
6556 (version "1.11")
6557 (source
6558 (origin
6559 (method url-fetch)
6560 (uri (pypi-uri "networkx" version))
6561 (sha256
6562 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6563 (build-system python-build-system)
6564 ;; python-decorator is needed at runtime
6565 (propagated-inputs
6566 `(("python-decorator" ,python-decorator)))
6567 (native-inputs
6568 `(("python-nose" ,python-nose)))
6569 (home-page "http://networkx.github.io/")
6570 (synopsis "Python module for creating and manipulating graphs and networks")
6571 (description
6572 "NetworkX is a Python package for the creation, manipulation, and study
6573 of the structure, dynamics, and functions of complex networks.")
6574 (license license:bsd-3)))
6575
6576 (define-public python2-networkx
6577 (package-with-python2 python-networkx))
6578
6579 (define-public snakemake
6580 (package
6581 (name "snakemake")
6582 (version "3.13.3")
6583 (source
6584 (origin
6585 (method url-fetch)
6586 (uri (pypi-uri "snakemake" version))
6587 (sha256
6588 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
6589 (build-system python-build-system)
6590 (arguments
6591 ;; TODO: Package missing test dependencies.
6592 '(#:tests? #f
6593 #:phases
6594 (modify-phases %standard-phases
6595 ;; For cluster execution Snakemake will call Python. Since there is
6596 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6597 ;; this by calling the snakemake wrapper instead.
6598 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6599 (lambda* (#:key outputs #:allow-other-keys)
6600 (substitute* "snakemake/executors.py"
6601 (("\\{sys.executable\\} -m snakemake")
6602 (string-append (assoc-ref outputs "out")
6603 "/bin/snakemake")))
6604 #t)))))
6605 (propagated-inputs
6606 `(("python-wrapt" ,python-wrapt)
6607 ("python-requests" ,python-requests)))
6608 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6609 (synopsis "Python-based execution environment for make-like workflows")
6610 (description
6611 "Snakemake aims to reduce the complexity of creating workflows by
6612 providing a clean and modern domain specific specification language (DSL) in
6613 Python style, together with a fast and comfortable execution environment.")
6614 (license license:expat)))
6615
6616 (define-public python-seaborn
6617 (package
6618 (name "python-seaborn")
6619 (version "0.7.1")
6620 (source
6621 (origin
6622 (method url-fetch)
6623 (uri (pypi-uri "seaborn" version))
6624 (sha256
6625 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6626 (build-system python-build-system)
6627 (arguments
6628 '(#:tests? #f)) ; Tests requires a running X11 server.
6629 (propagated-inputs
6630 `(("python-pandas" ,python-pandas)
6631 ("python-matplotlib" ,python-matplotlib)
6632 ("python-scipy" ,python-scipy)))
6633 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6634 (synopsis "Statistical data visualization")
6635 (description
6636 "Seaborn is a library for making attractive and informative statistical
6637 graphics in Python. It is built on top of matplotlib and tightly integrated
6638 with the PyData stack, including support for numpy and pandas data structures
6639 and statistical routines from scipy and statsmodels.")
6640 (license license:bsd-3)
6641 (properties `((python2-variant . ,(delay python2-seaborn))))))
6642
6643 (define-public python2-seaborn
6644 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6645 (package
6646 (inherit base)
6647 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6648 ,@(package-propagated-inputs base))))))
6649
6650 (define-public python-mpmath
6651 (package
6652 (name "python-mpmath")
6653 (version "0.19")
6654 (source (origin
6655 (method url-fetch)
6656 (uri (string-append "http://mpmath.org/files/mpmath-"
6657 version ".tar.gz"))
6658 (sha256
6659 (base32
6660 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6661 (build-system python-build-system)
6662 (arguments
6663 '(#:phases
6664 (modify-phases %standard-phases
6665 (replace 'check
6666 (lambda _
6667 (zero?
6668 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6669 (home-page "http://mpmath.org")
6670 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6671 (description
6672 "@code{mpmath} can be used as an arbitrary-precision substitute for
6673 Python's float/complex types and math/cmath modules, but also does much
6674 more advanced mathematics.")
6675 (license license:bsd-3)))
6676
6677 (define-public python2-mpmath
6678 (package-with-python2 python-mpmath))
6679
6680 (define-public python-sympy
6681 (package
6682 (name "python-sympy")
6683 (version "1.0")
6684 (source
6685 (origin
6686 (method url-fetch)
6687 (uri (string-append
6688 "https://github.com/sympy/sympy/releases/download/sympy-"
6689 version "/sympy-" version ".tar.gz"))
6690 (sha256
6691 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6692 (build-system python-build-system)
6693 (propagated-inputs
6694 `(("python-mpmath" ,python-mpmath)))
6695 (home-page "http://www.sympy.org/")
6696 (synopsis "Python library for symbolic mathematics")
6697 (description
6698 "SymPy is a Python library for symbolic mathematics. It aims to become a
6699 full-featured computer algebra system (CAS) while keeping the code as simple
6700 as possible in order to be comprehensible and easily extensible.")
6701 (license license:bsd-3)))
6702
6703 (define-public python2-sympy
6704 (package-with-python2 python-sympy))
6705
6706 (define-public python-q
6707 (package
6708 (name "python-q")
6709 (version "2.6")
6710 (source
6711 (origin
6712 (method url-fetch)
6713 (uri (pypi-uri "q" version))
6714 (sha256
6715 (base32
6716 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6717 (build-system python-build-system)
6718 (home-page "https://github.com/zestyping/q")
6719 (synopsis "Quick-and-dirty debugging output for tired programmers")
6720 (description
6721 "q is a Python module for \"print\" style of debugging Python code. It
6722 provides convenient short API for print out of values, tracebacks, and
6723 falling into the Python interpreter.")
6724 (license license:asl2.0)))
6725
6726 (define-public python2-q
6727 (package-with-python2 python-q))
6728
6729 (define-public python-testlib
6730 (package
6731 (name "python-testlib")
6732 (version "0.6.5")
6733 (source
6734 (origin
6735 (method url-fetch)
6736 (uri (string-append
6737 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6738 version ".zip"))
6739 (sha256
6740 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6741 (build-system python-build-system)
6742 (native-inputs
6743 `(("unzip" ,unzip))) ; for unpacking the source
6744 (synopsis "Python micro test suite harness")
6745 (description "A micro unittest suite harness for Python.")
6746 (home-page "https://github.com/trentm/testlib")
6747 (license license:expat)))
6748
6749 (define-public python2-testlib
6750 (package-with-python2 python-testlib))
6751
6752 (define-public python2-xlib
6753 (package
6754 (name "python2-xlib")
6755 (version "0.14")
6756 (source (origin
6757 (method url-fetch)
6758 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6759 "/" version "/"
6760 "python-xlib-" version ".tar.gz"))
6761 (sha256
6762 (base32
6763 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6764 (build-system python-build-system)
6765 (arguments
6766 `(#:python ,python-2 ;Python 2 only
6767 #:tests? #f)) ;no tests
6768 (home-page "http://python-xlib.sourceforge.net/")
6769 (synopsis "Python X11 client library")
6770 (description
6771 "The Python X Library is intended to be a fully functional X client
6772 library for Python programs. It is useful to implement low-level X clients.
6773 It is written entirely in Python.")
6774 (license license:gpl2+)))
6775
6776 (define-public python-singledispatch
6777 (package
6778 (name "python-singledispatch")
6779 (version "3.4.0.3")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (pypi-uri "singledispatch" version))
6784 (sha256
6785 (base32
6786 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6787 (build-system python-build-system)
6788 (native-inputs
6789 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6790 (home-page
6791 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6792 (synopsis "Backport of singledispatch feature from Python 3.4")
6793 (description
6794 "This library brings functools.singledispatch from Python 3.4 to Python
6795 2.6-3.3.")
6796 (license license:expat)))
6797
6798 (define-public python2-singledispatch
6799 (package-with-python2 python-singledispatch))
6800
6801 (define-public python-tornado
6802 (package
6803 (name "python-tornado")
6804 (version "4.5.1")
6805 (source
6806 (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "tornado" version))
6809 (sha256
6810 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6811 (build-system python-build-system)
6812 (arguments
6813 '(;; FIXME: Two tests error out with:
6814 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6815 ;; #:phases
6816 ;; (modify-phases %standard-phases
6817 ;; (replace 'check
6818 ;; (lambda _
6819 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6820 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6821 ;; (zero? (system* "python" "-m" "tornado.test")))))
6822 #:tests? #f))
6823 (native-inputs
6824 `(("python-certifi" ,python-certifi)))
6825 (propagated-inputs
6826 `(("python-backports-abc" ,python-backports-abc)))
6827 (home-page "http://www.tornadoweb.org/")
6828 (synopsis "Python web framework and asynchronous networking library")
6829 (description
6830 "Tornado is a Python web framework and asynchronous networking library,
6831 originally developed at FriendFeed. By using non-blocking network I/O,
6832 Tornado can scale to tens of thousands of open connections, making it ideal
6833 for long polling, WebSockets, and other applications that require a long-lived
6834 connection to each user.")
6835 (license license:asl2.0)
6836 (properties `((python2-variant . ,(delay python2-tornado))))))
6837
6838 (define-public python2-tornado
6839 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6840 (package (inherit tornado)
6841 (propagated-inputs
6842 `(("python2-backport-ssl-match-hostname"
6843 ,python2-backport-ssl-match-hostname)
6844 ("python2-singledispatch" ,python2-singledispatch)
6845 ,@(package-propagated-inputs tornado))))))
6846
6847 (define-public python-tornado-http-auth
6848 (package
6849 (name "python-tornado-http-auth")
6850 (version "1.1.0")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (pypi-uri "tornado-http-auth" version))
6855 (sha256
6856 (base32
6857 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6858 (build-system python-build-system)
6859 (propagated-inputs
6860 `(("python-tornado" ,python-tornado)))
6861 (home-page
6862 "https://github.com/gvalkov/tornado-http-auth")
6863 (synopsis
6864 "Digest and basic authentication module for Tornado")
6865 (description
6866 "Provides support for adding authentication to services using the Tornado
6867 web framework, either via the basic or digest authentication schemes.")
6868 (license license:asl2.0)))
6869
6870 ;; the python- version can be removed with python-3.5
6871 (define-public python-backports-abc
6872 (package
6873 (name "python-backports-abc")
6874 (version "0.5")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "backports_abc" version))
6879 (sha256
6880 (base32
6881 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6882 (build-system python-build-system)
6883 (home-page "https://github.com/cython/backports_abc")
6884 (synopsis "Backport of additions to the 'collections.abc' module")
6885 (description
6886 "Python-backports-abc provides a backport of additions to the
6887 'collections.abc' module in Python-3.5.")
6888 (license license:psfl)))
6889
6890 (define-public python2-backports-abc
6891 (package-with-python2 python-backports-abc))
6892
6893 (define-public python-backports-csv
6894 (package
6895 (name "python-backports-csv")
6896 (version "1.0.5")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri "backports.csv" version))
6901 (sha256
6902 (base32
6903 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6904 (build-system python-build-system)
6905 (home-page "https://github.com/ryanhiebert/backports.csv")
6906 (synopsis "Backport of Python 3's csv module for Python 2")
6907 (description
6908 "Provides a backport of Python 3's @code{csv} module for parsing
6909 comma separated values. The API of the @code{csv} module in Python 2
6910 is drastically different from the @code{csv} module in Python 3.
6911 This is due, for the most part, to the difference between str in
6912 Python 2 and Python 3.")
6913 (license license:psfl)))
6914
6915 (define-public python2-backports-csv
6916 (package-with-python2 python-backports-csv))
6917
6918 (define-public python2-backports-shutil-get-terminal-size
6919 (package
6920 (name "python2-backports-shutil-get-terminal-size")
6921 (version "1.0.0")
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6926 (sha256
6927 (base32
6928 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6929 (build-system python-build-system)
6930 (arguments
6931 `(#:python ,python-2
6932 #:phases
6933 (modify-phases %standard-phases
6934 (replace 'check
6935 (lambda _
6936 (zero? (system* "py.test" "-v")))))))
6937 (native-inputs
6938 `(("python2-pytest" ,python2-pytest)))
6939 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6940 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6941 (description
6942 "This package provides a backport of the @code{get_terminal_size
6943 function} from Python 3.3's @code{shutil}.
6944 Unlike the original version it is written in pure Python rather than C,
6945 so it might be a tiny bit slower.")
6946 (license license:expat)))
6947
6948 (define-public python-waf
6949 (package
6950 (name "python-waf")
6951 (version "1.9.8")
6952 (source (origin
6953 (method url-fetch)
6954 (uri (string-append "https://waf.io/"
6955 "waf-" version ".tar.bz2"))
6956 (sha256
6957 (base32
6958 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6959 (build-system python-build-system)
6960 (arguments
6961 '(#:phases
6962 (modify-phases %standard-phases
6963 (replace 'build
6964 (lambda _
6965 (zero? (system* "python" "waf-light" "configure" "build"))))
6966 (replace 'check
6967 (lambda _
6968 (zero? (system* "python" "waf" "--version"))))
6969 (replace 'install
6970 (lambda _
6971 (copy-file "waf" %output))))))
6972 (home-page "https://waf.io/")
6973 (synopsis "Python-based build system")
6974 (description
6975 "Waf is a Python-based framework for configuring, compiling and installing
6976 applications.")
6977 (license license:bsd-3)))
6978
6979 (define-public python2-waf
6980 (package-with-python2 python-waf))
6981
6982 (define-public python-pyzmq
6983 (package
6984 (name "python-pyzmq")
6985 (version "15.1.0")
6986 (source
6987 (origin
6988 (method url-fetch)
6989 (uri (pypi-uri "pyzmq" version))
6990 (sha256
6991 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6992 (build-system python-build-system)
6993 (arguments
6994 `(#:configure-flags
6995 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6996 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6997 ;; --inplace' for 'python setup.py test' to work.
6998 #:tests? #f))
6999 (inputs
7000 `(("zeromq" ,zeromq)))
7001 (native-inputs
7002 `(("pkg-config" ,pkg-config)
7003 ("python-nose" ,python-nose)))
7004 (home-page "https://github.com/zeromq/pyzmq")
7005 (synopsis "Python bindings for 0MQ")
7006 (description
7007 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7008 (license license:bsd-4)))
7009
7010 (define-public python2-pyzmq
7011 (package-with-python2 python-pyzmq))
7012
7013 (define-public python-pep8
7014 (package
7015 (name "python-pep8")
7016 (version "1.7.0")
7017 (source
7018 (origin
7019 (method url-fetch)
7020 (uri (pypi-uri "pep8" version))
7021 (sha256
7022 (base32
7023 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
7024 (build-system python-build-system)
7025 (home-page "http://pep8.readthedocs.org/")
7026 (synopsis "Python style guide checker")
7027 (description
7028 "This tools checks Python code against some of the style conventions in
7029 PEP 8.")
7030 (license license:expat)))
7031
7032 (define-public python2-pep8
7033 (package-with-python2 python-pep8))
7034
7035 (define-public python-pyflakes
7036 (package
7037 (name "python-pyflakes")
7038 (version "1.0.0")
7039 (source
7040 (origin
7041 (method url-fetch)
7042 (uri (pypi-uri "pyflakes" version))
7043 (sha256
7044 (base32
7045 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
7046 (build-system python-build-system)
7047 (home-page
7048 "https://github.com/pyflakes/pyflakes")
7049 (synopsis "Passive checker of Python programs")
7050 (description
7051 "Pyflakes statically checks Python source code for common errors.")
7052 (license license:expat)))
7053
7054 (define-public python2-pyflakes
7055 (package-with-python2 python-pyflakes))
7056
7057 (define-public python-mccabe
7058 (package
7059 (name "python-mccabe")
7060 (version "0.4.0")
7061 (source
7062 (origin
7063 (method url-fetch)
7064 (uri (pypi-uri "mccabe" version))
7065 (sha256
7066 (base32
7067 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
7068 (build-system python-build-system)
7069 (native-inputs
7070 `(("python-pytest" ,python-pytest)
7071 ("python-pytest-runner" ,python-pytest-runner)))
7072 (home-page "https://github.com/flintwork/mccabe")
7073 (synopsis "McCabe checker, plugin for flake8")
7074 (description
7075 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7076 complexity of Python source code.")
7077 (license license:expat)))
7078
7079 (define-public python2-mccabe
7080 (package-with-python2 python-mccabe))
7081
7082 (define-public python-mccabe-0.2.1
7083 (package (inherit python-mccabe)
7084 (version "0.2.1")
7085 (source
7086 (origin
7087 (method url-fetch)
7088 (uri (pypi-uri "mccabe" version))
7089 (sha256
7090 (base32
7091 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7092
7093 (define-public python2-mccabe-0.2.1
7094 (package-with-python2 python-mccabe-0.2.1))
7095
7096 ;; Flake8 2.4.1 requires an older version of pep8.
7097 ;; This should be removed ASAP.
7098 (define-public python-pep8-1.5.7
7099 (package (inherit python-pep8)
7100 (version "1.5.7")
7101 (source
7102 (origin
7103 (method url-fetch)
7104 (uri (string-append
7105 "https://pypi.python.org/packages/source/p/pep8/pep8-"
7106 version
7107 ".tar.gz"))
7108 (sha256
7109 (base32
7110 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7111 (arguments
7112 ;; XXX Tests not compatible with Python 3.5.
7113 '(#:tests? #f))))
7114
7115 (define-public python2-pep8-1.5.7
7116 (package-with-python2 python-pep8-1.5.7))
7117
7118 ;; Flake8 2.4.1 requires an older version of pyflakes.
7119 ;; This should be removed ASAP.
7120 (define-public python-pyflakes-0.8.1
7121 (package (inherit python-pyflakes)
7122 (version "0.8.1")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (string-append
7127 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
7128 version
7129 ".tar.gz"))
7130 (sha256
7131 (base32
7132 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7133 (arguments
7134 ;; XXX Tests not compatible with Python 3.5.
7135 '(#:tests? #f))))
7136
7137 (define-public python2-pyflakes-0.8.1
7138 (package-with-python2 python-pyflakes-0.8.1))
7139
7140 (define-public python-flake8
7141 (package
7142 (name "python-flake8")
7143 (version "2.5.4")
7144 (source
7145 (origin
7146 (method url-fetch)
7147 (uri (pypi-uri "flake8" version))
7148 (sha256
7149 (base32
7150 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
7151 (modules '((guix build utils)))
7152 (snippet
7153 '(begin
7154 ;; Remove pre-compiled .pyc files from source.
7155 (for-each delete-file-recursively
7156 (find-files "." "__pycache__" #:directories? #t))
7157 (for-each delete-file (find-files "." "\\.pyc$"))
7158 #t))))
7159 (build-system python-build-system)
7160 (propagated-inputs
7161 `(("python-pep8" ,python-pep8)
7162 ("python-pyflakes" ,python-pyflakes)
7163 ("python-mccabe" ,python-mccabe)))
7164 (native-inputs
7165 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
7166 ("python-nose" ,python-nose)))
7167 (home-page "https://gitlab.com/pycqa/flake8")
7168 (synopsis
7169 "The modular source code checker: pep8, pyflakes and co")
7170 (description
7171 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7172 (license license:expat)))
7173
7174 (define-public python2-flake8
7175 (package-with-python2 python-flake8))
7176
7177 (define-public python-flake8-polyfill
7178 (package
7179 (name "python-flake8-polyfill")
7180 (version "1.0.1")
7181 (source
7182 (origin
7183 (method url-fetch)
7184 (uri (pypi-uri "flake8-polyfill" version))
7185 (sha256
7186 (base32
7187 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
7188 (build-system python-build-system)
7189 (arguments
7190 '(#:phases
7191 (modify-phases %standard-phases
7192 (replace 'check
7193 (lambda _
7194 (setenv "PYTHONPATH"
7195 (string-append (getcwd) "/build/lib:"
7196 (getenv "PYTHONPATH")))
7197 (zero? (system* "py.test" "-v")))))))
7198 (native-inputs
7199 `(("python-flake8" ,python-flake8)
7200 ("python-mock" ,python-mock)
7201 ("python-pycodestyle" ,python-pycodestyle)
7202 ("python-pytest" ,python-pytest)))
7203 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7204 (synopsis "Polyfill package for Flake8 plugins")
7205 (description
7206 "This package that provides some compatibility helpers for Flake8
7207 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7208 (license license:expat)))
7209
7210 (define-public python2-flake8-polyfill
7211 (package-with-python2 python-flake8-polyfill))
7212
7213 (define-public python-mistune
7214 (package
7215 (name "python-mistune")
7216 (version "0.7.3")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (pypi-uri "mistune" version))
7221 (sha256
7222 (base32
7223 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
7224 (build-system python-build-system)
7225 (native-inputs
7226 `(("python-nose" ,python-nose)
7227 ("python-cython" ,python-cython)))
7228 (home-page "https://github.com/lepture/mistune")
7229 (synopsis "Markdown parser in pure Python")
7230 (description "This package provides a fast markdown parser in pure
7231 Python.")
7232 (license license:bsd-3)))
7233
7234 (define-public python2-mistune
7235 (package-with-python2 python-mistune))
7236
7237 (define-public python-markdown
7238 (package
7239 (name "python-markdown")
7240 (version "2.6.8")
7241 (source
7242 (origin
7243 (method url-fetch)
7244 (uri (pypi-uri "Markdown" version))
7245 (sha256
7246 (base32
7247 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
7248 (build-system python-build-system)
7249 (arguments
7250 `(#:phases
7251 (modify-phases %standard-phases
7252 (replace 'check
7253 (lambda _
7254 (zero? (system* "python" "run-tests.py")))))))
7255 (native-inputs
7256 `(("python-nose" ,python-nose)
7257 ("python-pyyaml" ,python-pyyaml)))
7258 (home-page "https://pythonhosted.org/Markdown/")
7259 (synopsis "Python implementation of Markdown")
7260 (description
7261 "This package provides a Python implementation of John Gruber's
7262 Markdown. The library features international input, various Markdown
7263 extensions, and several HTML output formats. A command line wrapper
7264 markdown_py is also provided to convert Markdown files to HTML.")
7265 (license license:bsd-3)))
7266
7267 (define-public python2-markdown
7268 (package-with-python2 python-markdown))
7269
7270 (define-public python-ptyprocess
7271 (package
7272 (name "python-ptyprocess")
7273 (version "0.5.1")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (string-append
7278 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
7279 version ".tar.gz"))
7280 (sha256
7281 (base32
7282 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
7283 (build-system python-build-system)
7284 (native-inputs
7285 `(("python-nose" ,python-nose)))
7286 (arguments
7287 `(#:phases
7288 (modify-phases %standard-phases
7289 (replace 'check
7290 (lambda _
7291 (zero? (system* "nosetests")))))))
7292 (home-page "https://github.com/pexpect/ptyprocess")
7293 (synopsis "Run a subprocess in a pseudo terminal")
7294 (description
7295 "This package provides a Python library used to launch a subprocess in a
7296 pseudo terminal (pty), and interact with both the process and its pty.")
7297 (license license:isc)))
7298
7299 (define-public python2-ptyprocess
7300 (package-with-python2 python-ptyprocess))
7301
7302 (define-public python-cram
7303 (package
7304 (name "python-cram")
7305 (version "0.7")
7306 (home-page "https://bitheap.org/cram/")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (list (string-append home-page "cram-"
7310 version ".tar.gz")
7311 (pypi-uri "cram" version)))
7312 (sha256
7313 (base32
7314 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7315 (arguments
7316 '(#:phases
7317 (modify-phases %standard-phases
7318 (add-after 'unpack 'patch-source
7319 (lambda _
7320 (substitute* (find-files "cram" ".*\\.py$")
7321 ;; Replace default shell path.
7322 (("/bin/sh") (which "sh")))
7323 (substitute* (find-files "tests" ".*\\.t$")
7324 (("md5") "md5sum")
7325 (("/bin/bash") (which "bash"))
7326 (("/bin/sh") (which "sh")))
7327 (substitute* "cram/_test.py"
7328 ;; This hack works around a bug triggered by substituting
7329 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7330 ;; "cram -h", which breaks the output at 80 characters. This
7331 ;; causes the line showing the default shell to break into two
7332 ;; lines, but the test expects a single line...
7333 (("env\\['COLUMNS'\\] = '80'")
7334 "env['COLUMNS'] = '160'"))
7335 #t))
7336 (delete 'check)
7337 (add-after 'install 'check
7338 ;; The test phase uses the built library and executable.
7339 ;; It's easier to run it after install since the build
7340 ;; directory contains version-specific PATH.
7341 (lambda* (#:key inputs outputs #:allow-other-keys)
7342 (add-installed-pythonpath inputs outputs)
7343 (setenv "PATH" (string-append (getenv "PATH") ":"
7344 (assoc-ref outputs "out") "/bin"))
7345 (zero? (system* "make" "test")))))))
7346 (build-system python-build-system)
7347 (native-inputs
7348 `(("python-coverage" ,python-coverage)
7349 ("which" ,which)))
7350 (synopsis "Simple testing framework for command line applications")
7351 (description
7352 "Cram is a functional testing framework for command line applications.
7353 Cram tests look like snippets of interactive shell sessions. Cram runs each
7354 command and compares the command output in the test with the command’s actual
7355 output.")
7356 (license license:gpl2+)))
7357
7358 (define-public python2-cram
7359 (package-with-python2 python-cram))
7360
7361 (define-public python-terminado
7362 (package
7363 (name "python-terminado")
7364 (version "0.6")
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "terminado" version))
7369 (sha256
7370 (base32
7371 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7372 (build-system python-build-system)
7373 (propagated-inputs
7374 `(("python-tornado" ,python-tornado)
7375 ("python-ptyprocess" ,python-ptyprocess)))
7376 (native-inputs
7377 `(("python-nose" ,python-nose)))
7378 (arguments
7379 `(#:phases
7380 (modify-phases %standard-phases
7381 (replace 'check
7382 (lambda _
7383 (zero? (system* "nosetests")))))))
7384 (home-page "https://github.com/takluyver/terminado")
7385 (synopsis "Terminals served to term.js using Tornado websockets")
7386 (description "This package provides a Tornado websocket backend for the
7387 term.js Javascript terminal emulator library.")
7388 (license license:bsd-2)
7389 (properties `((python2-variant . ,(delay python2-terminado))))))
7390
7391 (define-public python2-terminado
7392 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7393 (package (inherit terminado)
7394 (propagated-inputs
7395 `(("python2-backport-ssl-match-hostname"
7396 ,python2-backport-ssl-match-hostname)
7397 ,@(package-propagated-inputs terminado))))))
7398
7399 (define-public python-straight-plugin
7400 (package
7401 (name "python-straight-plugin")
7402 (version "1.4.1")
7403 (source
7404 (origin
7405 (method url-fetch)
7406 (uri (pypi-uri "straight.plugin" version))
7407 (sha256
7408 (base32
7409 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7410 (build-system python-build-system)
7411 (home-page "https://github.com/ironfroggy/straight.plugin")
7412 (synopsis "Simple namespaced plugin facility")
7413 (description "Straight Plugin provides a type of plugin you can create from
7414 almost any existing Python modules, and an easy way for outside developers to
7415 add functionality and customization to your projects with their own plugins.")
7416 (license license:expat)))
7417
7418 (define-public python2-straight-plugin
7419 (package-with-python2 python-straight-plugin))
7420
7421 (define-public python-fonttools
7422 (package
7423 (name "python-fonttools")
7424 (version "2.5")
7425 (source (origin
7426 (method url-fetch)
7427 (uri (string-append
7428 "https://pypi.python.org/packages/source/F/FontTools/"
7429 "fonttools-" version ".tar.gz"))
7430 (sha256
7431 (base32
7432 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7433 (build-system python-build-system)
7434 (arguments
7435 '(#:test-target "check"
7436 #:phases
7437 (modify-phases %standard-phases
7438 (add-after 'unpack 'patch-setuppy
7439 ;; Remove the undocumented "extra_path" argument, which adds an
7440 ;; intervening directories between site-packages and the package
7441 ;; directory.
7442 (lambda _
7443 (substitute* "setup.py"
7444 (("^[ \t]*extra_path *= *'FontTools',") ""))
7445 #t)))))
7446 (home-page "https://github.com/behdad/fonttools")
7447 (synopsis "Tools to manipulate font files")
7448 (description
7449 "FontTools/TTX is a library to manipulate font files from Python. It
7450 supports reading and writing of TrueType/OpenType fonts, reading and writing
7451 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7452 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7453 from an XML-based format.")
7454 (license (license:non-copyleft
7455 "file://LICENSE.txt"
7456 "See LICENSE.txt in the distribution."))))
7457
7458 (define-public python2-fonttools
7459 (package-with-python2 python-fonttools))
7460
7461 (define-public python-ly
7462 (package
7463 (name "python-ly")
7464 (version "0.9.4")
7465 (source
7466 (origin
7467 (method url-fetch)
7468 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7469 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7470 "/python-ly-" version ".tar.gz"))
7471 (sha256
7472 (base32
7473 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7474 (build-system python-build-system)
7475 (arguments
7476 ;; FIXME: Some tests need network access.
7477 '(#:tests? #f))
7478 (synopsis "Tool and library for manipulating LilyPond files")
7479 (description "This package provides a Python library to parse, manipulate
7480 or create documents in LilyPond format. A command line program ly is also
7481 provided that can be used to do various manipulations with LilyPond files.")
7482 (home-page "https://pypi.python.org/pypi/python-ly")
7483 (license license:gpl2+)))
7484
7485 (define-public python-appdirs
7486 (package
7487 (name "python-appdirs")
7488 (version "1.4.3")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "appdirs" version))
7493 (sha256
7494 (base32
7495 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7496 (build-system python-build-system)
7497 (home-page "https://github.com/ActiveState/appdirs")
7498 (synopsis
7499 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7500 (description
7501 "This module provides a portable way of finding out where user data
7502 should be stored on various operating systems.")
7503 (license license:expat)))
7504
7505 (define-public python2-appdirs
7506 (package-with-python2 python-appdirs))
7507
7508 (define-public python-llfuse
7509 (package
7510 (name "python-llfuse")
7511 (version "1.2")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (string-append
7515 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7516 "llfuse-" version ".tar.bz2"))
7517 (sha256
7518 (base32
7519 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7520 (build-system python-build-system)
7521 (inputs
7522 `(("fuse" ,fuse)
7523 ("attr" ,attr)))
7524 (native-inputs
7525 `(("pkg-config" ,pkg-config)))
7526 (synopsis "Python bindings for FUSE")
7527 (description
7528 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7529 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7530 (license license:lgpl2.0+)
7531 (properties `((python2-variant . ,(delay python2-llfuse))))))
7532
7533 (define-public python2-llfuse
7534 (package (inherit (package-with-python2
7535 (strip-python2-variant python-llfuse)))
7536 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7537
7538 ;; For attic-0.16
7539 (define-public python-llfuse-0.41
7540 (package (inherit python-llfuse)
7541 (version "0.41.1")
7542 (source (origin
7543 (method url-fetch)
7544 (uri (string-append
7545 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7546 "llfuse-" version ".tar.bz2"))
7547 (sha256
7548 (base32
7549 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7550 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7551 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7552 (license (list license:expat license:lgpl2.0+))))
7553
7554 (define-public python-msgpack
7555 (package
7556 (name "python-msgpack")
7557 (version "0.4.8")
7558 (source (origin
7559 (method url-fetch)
7560 (uri (pypi-uri "msgpack-python" version))
7561 (sha256
7562 (base32
7563 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7564 (build-system python-build-system)
7565 (synopsis "MessagePack (de)serializer")
7566 (description "MessagePack is a fast, compact binary serialization format,
7567 suitable for similar data to JSON. This package provides CPython bindings for
7568 reading and writing MessagePack data.")
7569 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7570 (license license:asl2.0)))
7571
7572 (define-public python2-msgpack
7573 (package-with-python2 python-msgpack))
7574
7575 (define-public python-netaddr
7576 (package
7577 (name "python-netaddr")
7578 (version "0.7.19")
7579 (source
7580 (origin
7581 (method url-fetch)
7582 (uri (pypi-uri "netaddr" version))
7583 (sha256
7584 (base32
7585 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7586 (build-system python-build-system)
7587 (arguments `(#:tests? #f)) ;; No tests.
7588 (home-page "https://github.com/drkjam/netaddr/")
7589 (synopsis "Pythonic manipulation of network addresses")
7590 (description
7591 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7592 and MAC network addresses.")
7593 (license license:bsd-3)))
7594
7595 (define-public python2-netaddr
7596 (package-with-python2 python-netaddr))
7597
7598 (define-public python-wrapt
7599 (package
7600 (name "python-wrapt")
7601 (version "1.10.8")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (pypi-uri "wrapt" version))
7606 (sha256
7607 (base32
7608 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7609 (build-system python-build-system)
7610 (arguments
7611 ;; Tests are not included in the tarball, they are only available in the
7612 ;; git repository.
7613 `(#:tests? #f))
7614 (home-page "https://github.com/GrahamDumpleton/wrapt")
7615 (synopsis "Module for decorators, wrappers and monkey patching")
7616 (description
7617 "The aim of the wrapt module is to provide a transparent object proxy for
7618 Python, which can be used as the basis for the construction of function
7619 wrappers and decorator functions.")
7620 (license license:bsd-2)))
7621
7622 (define-public python2-wrapt
7623 (package-with-python2 python-wrapt))
7624
7625 (define-public python-iso8601
7626 (package
7627 (name "python-iso8601")
7628 (version "0.1.11")
7629 (source
7630 (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "iso8601" version))
7633 (sha256
7634 (base32
7635 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7636 (build-system python-build-system)
7637 (native-inputs
7638 `(("python-pytest" ,python-pytest)))
7639 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7640 (synopsis "Module to parse ISO 8601 dates")
7641 (description
7642 "This module parses the most common forms of ISO 8601 date strings (e.g.
7643 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7644 (license license:expat)))
7645
7646 (define-public python2-iso8601
7647 (package-with-python2 python-iso8601))
7648
7649 (define-public python-monotonic
7650 (package
7651 (name "python-monotonic")
7652 (version "0.3")
7653 (source
7654 (origin
7655 (method url-fetch)
7656 (uri (string-append
7657 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7658 version
7659 ".tar.gz"))
7660 (sha256
7661 (base32
7662 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7663 (build-system python-build-system)
7664 (home-page "https://github.com/atdt/monotonic")
7665 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7666 (description
7667 "This module provides a monotonic() function which returns the value (in
7668 fractional seconds) of a clock which never goes backwards.")
7669 (license license:asl2.0)))
7670
7671 (define-public python2-monotonic
7672 (package-with-python2 python-monotonic))
7673
7674 (define-public python-webob
7675 (package
7676 (name "python-webob")
7677 (version "1.5.1")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "WebOb" version))
7682 (sha256
7683 (base32
7684 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7685 (build-system python-build-system)
7686 (native-inputs
7687 `(("python-nose" ,python-nose)))
7688 (home-page "http://webob.org/")
7689 (synopsis "WSGI request and response object")
7690 (description
7691 "WebOb provides wrappers around the WSGI request environment, and an
7692 object to help create WSGI responses.")
7693 (license license:expat)))
7694
7695 (define-public python2-webob
7696 (package-with-python2 python-webob))
7697
7698 (define-public python-xlrd
7699 (package
7700 (name "python-xlrd")
7701 (version "1.0.0")
7702 (source (origin
7703 (method url-fetch)
7704 (uri (pypi-uri "xlrd" version))
7705 (sha256
7706 (base32
7707 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7708 (build-system python-build-system)
7709 (arguments
7710 `(#:phases
7711 (modify-phases %standard-phases
7712 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7713 ;; run tests instead for now.
7714 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7715 (native-inputs `(("python-nose" ,python-nose)))
7716 (home-page "http://www.python-excel.org/")
7717 (synopsis "Library for extracting data from Excel files")
7718 (description "This packages provides a library to extract data from
7719 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7720 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7721 Unicode-aware. It is not intended as an end-user tool.")
7722 (license license:bsd-3)))
7723
7724 (define-public python2-xlrd
7725 (package-with-python2 python-xlrd))
7726
7727 (define-public python-prettytable
7728 (package
7729 (name "python-prettytable")
7730 (version "0.7.2")
7731 (source
7732 (origin
7733 (method url-fetch)
7734 (uri (string-append
7735 "https://pypi.python.org/packages/source/P/PrettyTable/"
7736 "prettytable-" version ".tar.bz2"))
7737 (sha256
7738 (base32
7739 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7740 (build-system python-build-system)
7741 (home-page "http://code.google.com/p/prettytable/")
7742 (synopsis "Display tabular data in an ASCII table format")
7743 (description
7744 "A library designed to represent tabular data in visually appealing ASCII
7745 tables. PrettyTable allows for selection of which columns are to be printed,
7746 independent alignment of columns (left or right justified or centred) and
7747 printing of sub-tables by specifying a row range.")
7748 (license license:bsd-3)))
7749
7750 (define-public python2-prettytable
7751 (package-with-python2 python-prettytable))
7752
7753 (define-public python-tables
7754 (package
7755 (name "python-tables")
7756 (version "3.2.2")
7757 (source
7758 (origin
7759 (method url-fetch)
7760 (uri (pypi-uri "tables" version))
7761 (sha256
7762 (base32
7763 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7764 (modules '((guix build utils)))
7765 (snippet
7766 '(begin
7767 ;; Remove pre-compiled .pyc files from source.
7768 (for-each delete-file-recursively
7769 (find-files "." "__pycache__" #:directories? #t))
7770 (for-each delete-file (find-files "." "\\.pyc$"))
7771 #t))))
7772 (build-system python-build-system)
7773 (arguments
7774 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7775 ;; or "check", so we must override the build and check phases.
7776 #:phases
7777 (modify-phases %standard-phases
7778 (add-after 'unpack 'use-gcc
7779 (lambda _
7780 (substitute* "setup.py"
7781 (("compiler = new_compiler\\(\\)" line)
7782 (string-append line
7783 "\ncompiler.set_executables(compiler='gcc',"
7784 "compiler_so='gcc',"
7785 "linker_exe='gcc',"
7786 "linker_so='gcc -shared')")))
7787 #t))
7788 (replace 'build
7789 (lambda* (#:key inputs #:allow-other-keys)
7790 (zero? (system* "python" "setup.py" "build"
7791 (string-append "--hdf5="
7792 (assoc-ref inputs "hdf5"))))))
7793 (replace 'check
7794 (lambda* (#:key inputs #:allow-other-keys)
7795 (zero? (system* "python" "setup.py" "check"
7796 (string-append "--hdf5="
7797 (assoc-ref inputs "hdf5")))))))))
7798 (propagated-inputs
7799 `(("python-numexpr" ,python-numexpr)
7800 ("python-numpy" ,python-numpy)))
7801 (native-inputs
7802 `(("python-cython" ,python-cython)
7803 ("pkg-config" ,pkg-config)))
7804 (inputs
7805 `(("hdf5" ,hdf5)
7806 ("bzip2" ,bzip2)
7807 ("zlib" ,zlib)))
7808 (home-page "http://www.pytables.org/")
7809 (synopsis "Hierarchical datasets for Python")
7810 (description "PyTables is a package for managing hierarchical datasets and
7811 designed to efficiently cope with extremely large amounts of data.")
7812 (license license:bsd-3)))
7813
7814 (define-public python2-tables
7815 (package-with-python2 python-tables))
7816
7817 (define-public python-pyasn1
7818 (package
7819 (name "python-pyasn1")
7820 (version "0.2.3")
7821 (source
7822 (origin
7823 (method url-fetch)
7824 (uri (pypi-uri "pyasn1" version))
7825 (sha256
7826 (base32
7827 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7828 (build-system python-build-system)
7829 (home-page "http://pyasn1.sourceforge.net/")
7830 (synopsis "ASN.1 types and codecs")
7831 (description
7832 "This is an implementation of ASN.1 types and codecs in Python. It is
7833 suitable for a wide range of protocols based on the ASN.1 specification.")
7834 (license license:bsd-2)))
7835
7836 (define-public python2-pyasn1
7837 (package-with-python2 python-pyasn1))
7838
7839 (define-public python-pyasn1-modules
7840 (package
7841 (name "python-pyasn1-modules")
7842 (version "0.0.8")
7843 (source
7844 (origin
7845 (method url-fetch)
7846 (uri (pypi-uri "pyasn1-modules" version))
7847 (sha256
7848 (base32
7849 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7850 (build-system python-build-system)
7851 (propagated-inputs
7852 `(("python-pyasn1" ,python-pyasn1)))
7853 (home-page "https://sourceforge.net/projects/pyasn1/")
7854 (synopsis "ASN.1 codec implementations")
7855 (description
7856 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7857 implementations of ASN.1-based codecs and protocols.")
7858 (license license:bsd-3)))
7859
7860 (define-public python2-pyasn1-modules
7861 (package-with-python2 python-pyasn1-modules))
7862
7863 (define-public python-ipaddress
7864 (package
7865 (name "python-ipaddress")
7866 (version "1.0.18")
7867 (source (origin
7868 (method url-fetch)
7869 (uri (pypi-uri "ipaddress" version))
7870 (sha256
7871 (base32
7872 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7873 (build-system python-build-system)
7874 (home-page "https://github.com/phihag/ipaddress")
7875 (synopsis "IP address manipulation library")
7876 (description
7877 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7878 in Python. This library is used to create, poke at, and manipulate IPv4 and
7879 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7880 module to older versions of Python.")
7881 (license license:psfl)))
7882
7883 (define-public python2-ipaddress
7884 (package-with-python2 python-ipaddress))
7885
7886 (define-public python2-ipaddr
7887 (package
7888 (name "python2-ipaddr")
7889 (version "2.1.11")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "ipaddr" version))
7894 (sha256
7895 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7896 (build-system python-build-system)
7897 (arguments
7898 `(#:python ,python-2 ;version 2 only
7899 #:phases
7900 (modify-phases %standard-phases
7901 (replace 'check
7902 (lambda* _
7903 (zero? (system* "python" "ipaddr_test.py")))))))
7904 (home-page "https://github.com/google/ipaddr-py")
7905 (synopsis "IP address manipulation library")
7906 (description
7907 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7908 IPv6 addresses and networks.
7909
7910 For new implementations you may prefer to use the standard module
7911 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7912 versions of Python.")
7913 (license license:asl2.0)))
7914
7915 (define-public python-idna
7916 (package
7917 (name "python-idna")
7918 (version "2.5")
7919 (source
7920 (origin
7921 (method url-fetch)
7922 (uri (pypi-uri "idna" version))
7923 (sha256
7924 (base32
7925 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7926 (build-system python-build-system)
7927 (home-page "https://github.com/kjd/idna")
7928 (synopsis "Internationalized domain names in applications")
7929 (description
7930 "This is a library to support the Internationalised Domain Names in
7931 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7932 protocol is often referred to as “IDNA2008” and can produce different results
7933 from the earlier standard from 2003. The library is also intended to act as a
7934 suitable drop-in replacement for the “encodings.idna” module that comes with
7935 the Python standard library but currently only supports the older 2003
7936 specification.")
7937 (license license:bsd-4)))
7938
7939 (define-public python2-idna
7940 (package-with-python2 python-idna))
7941
7942 (define-public python-pretend
7943 (package
7944 (name "python-pretend")
7945 (version "1.0.8")
7946 (source
7947 (origin
7948 (method url-fetch)
7949 (uri (string-append "https://pypi.python.org/packages/source/p/"
7950 "pretend/pretend-" version ".tar.gz"))
7951 (sha256
7952 (base32
7953 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7954 (build-system python-build-system)
7955 (home-page "https://github.com/alex/pretend")
7956 (synopsis "Library for stubbing in Python")
7957 (description
7958 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7959 technique for writing tests. You may hear the term mixed up with mocks,
7960 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7961 responses, rather than doing any computation.")
7962 (license license:bsd-3)))
7963
7964 (define-public python2-pretend
7965 (package-with-python2 python-pretend))
7966
7967 (define-public python-cryptography-vectors
7968 (package
7969 (name "python-cryptography-vectors")
7970 (version "2.0.3")
7971 (source
7972 (origin
7973 (method url-fetch)
7974 (uri (pypi-uri "cryptography_vectors" version))
7975 (sha256
7976 (base32
7977 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
7978 (build-system python-build-system)
7979 (home-page "https://github.com/pyca/cryptography")
7980 (synopsis "Test vectors for the cryptography package")
7981 (description
7982 "This package contains test vectors for the cryptography package.")
7983 ;; Distributed under either BSD-3 or ASL2.0
7984 (license (list license:bsd-3 license:asl2.0))))
7985
7986 (define-public python2-cryptography-vectors
7987 (package-with-python2 python-cryptography-vectors))
7988
7989 (define-public python-cryptography
7990 (package
7991 (name "python-cryptography")
7992 (version "2.0.3")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "cryptography" version))
7997 (sha256
7998 (base32
7999 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
8000 (build-system python-build-system)
8001 (inputs
8002 `(("openssl" ,openssl)))
8003 (propagated-inputs
8004 `(("python-asn1crypto" ,python-asn1crypto)
8005 ("python-cffi" ,python-cffi)
8006 ("python-six" ,python-six)
8007 ("python-idna" ,python-idna)
8008 ("python-iso8601" ,python-iso8601)))
8009 (native-inputs
8010 `(("python-cryptography-vectors" ,python-cryptography-vectors)
8011 ("python-hypothesis" ,python-hypothesis)
8012 ("python-pretend" ,python-pretend)
8013 ("python-pytz" ,python-pytz)
8014 ("python-pytest" ,python-pytest-3.0)))
8015 (home-page "https://github.com/pyca/cryptography")
8016 (synopsis "Cryptographic recipes and primitives for Python")
8017 (description
8018 "cryptography is a package which provides cryptographic recipes and
8019 primitives to Python developers. It aims to be the “cryptographic standard
8020 library” for Python. The package includes both high level recipes, and low
8021 level interfaces to common cryptographic algorithms such as symmetric ciphers,
8022 message digests and key derivation functions.")
8023 ;; Distributed under either BSD-3 or ASL2.0
8024 (license (list license:bsd-3 license:asl2.0))
8025 (properties `((python2-variant . ,(delay python2-cryptography))))))
8026
8027 (define-public python2-cryptography
8028 (let ((crypto (package-with-python2
8029 (strip-python2-variant python-cryptography))))
8030 (package (inherit crypto)
8031 (propagated-inputs
8032 `(("python2-ipaddress" ,python2-ipaddress)
8033 ("python2-backport-ssl-match-hostname"
8034 ,python2-backport-ssl-match-hostname)
8035 ("python2-enum34" ,python2-enum34)
8036 ,@(package-propagated-inputs crypto))))))
8037
8038 (define-public python-pyopenssl
8039 (package
8040 (name "python-pyopenssl")
8041 (version "17.3.0")
8042 (source
8043 (origin
8044 (method url-fetch)
8045 (uri (pypi-uri "pyOpenSSL" version))
8046 (sha256
8047 (base32
8048 "0xkc1wfnpg6abzllivg3ylhc63npjdy1v81f4kc08bm8cj80nqr9"))))
8049 (build-system python-build-system)
8050 (arguments
8051 '(#:phases
8052 (modify-phases %standard-phases
8053 (delete 'check)
8054 (add-after 'install 'check
8055 (lambda* (#:key inputs outputs #:allow-other-keys)
8056 (add-installed-pythonpath inputs outputs)
8057 (zero? (system* "py.test" "-v" "-k"
8058 (string-append
8059 ;; This test tries to look up certificates from
8060 ;; the compiled-in default path in OpenSSL, which
8061 ;; does not exist in the build environment.
8062 "not test_fallback_default_verify_paths "
8063 ;; This test attempts to make a connection to
8064 ;; an external web service.
8065 "and not test_set_default_verify_paths"))))))))
8066 (propagated-inputs
8067 `(("python-cryptography" ,python-cryptography)
8068 ("python-six" ,python-six)))
8069 (inputs
8070 `(("openssl" ,openssl)))
8071 (native-inputs
8072 `(("python-flaky" ,python-flaky)
8073 ("python-pretend" ,python-pretend)
8074 ("python-pytest" ,python-pytest-3.0)))
8075 (home-page "https://github.com/pyca/pyopenssl")
8076 (synopsis "Python wrapper module around the OpenSSL library")
8077 (description
8078 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
8079 library.")
8080 (license license:asl2.0)))
8081
8082 (define-public python2-pyopenssl
8083 (package-with-python2 python-pyopenssl))
8084
8085 (define-public python-pip
8086 (package
8087 (name "python-pip")
8088 (version "9.0.1")
8089 (source
8090 (origin
8091 (method url-fetch)
8092 (uri (pypi-uri "pip" version))
8093 (sha256
8094 (base32
8095 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
8096 (build-system python-build-system)
8097 (arguments
8098 '(#:tests? #f)) ; there are no tests in the pypi archive.
8099 (home-page "https://pip.pypa.io/")
8100 (synopsis "Package manager for Python software")
8101 (description
8102 "Pip is a package manager for Python software, that finds packages on the
8103 Python Package Index (PyPI).")
8104 (license license:expat)))
8105
8106 (define-public python2-pip
8107 (package-with-python2 python-pip))
8108
8109 (define-public python-tlsh
8110 (package
8111 (name "python-tlsh")
8112 (version "3.4.4")
8113 (home-page "https://github.com/trendmicro/tlsh")
8114 (source (origin
8115 (method url-fetch)
8116 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
8117 version ".tar.gz"))
8118 (sha256
8119 (base32
8120 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
8121 (file-name (string-append name "-" version ".tar.gz"))))
8122 (build-system cmake-build-system)
8123 (arguments
8124 '(#:out-of-source? #f
8125 #:phases (modify-phases %standard-phases
8126 (replace
8127 'install
8128 (lambda* (#:key outputs #:allow-other-keys)
8129 ;; Build and install the Python bindings. The underlying
8130 ;; C++ library is apparently not meant to be installed.
8131 (let ((out (assoc-ref outputs "out")))
8132 (with-directory-excursion "py_ext"
8133 (and (system* "python" "setup.py" "build")
8134 (system* "python" "setup.py" "install"
8135 (string-append "--prefix=" out))))))))))
8136 (inputs `(("python" ,python-wrapper))) ;for the bindings
8137 (synopsis "Fuzzy matching library for Python")
8138 (description
8139 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8140 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8141 value which can be used for similarity comparisons. Similar objects have
8142 similar hash values, which allows for the detection of similar objects by
8143 comparing their hash values. The byte stream should have a sufficient amount
8144 of complexity; for example, a byte stream of identical bytes will not generate
8145 a hash value.")
8146 (license license:asl2.0)))
8147
8148 (define-public python2-tlsh
8149 (package
8150 (inherit python-tlsh)
8151 (name "python2-tlsh")
8152 (inputs `(("python" ,python-2)))))
8153
8154 (define-public python-termcolor
8155 (package
8156 (name "python-termcolor")
8157 (version "1.1.0")
8158 (source
8159 (origin
8160 (method url-fetch)
8161 (uri (pypi-uri "termcolor" version))
8162 (sha256
8163 (base32
8164 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8165 (build-system python-build-system)
8166 (arguments
8167 ;; There are no tests.
8168 `(#:tests? #f))
8169 (home-page "http://pypi.python.org/pypi/termcolor")
8170 (synopsis "ANSII Color formatting for terminal output")
8171 (description
8172 "This package provides ANSII Color formatting for output in terminals.")
8173 (license license:expat)))
8174
8175 (define-public python2-termcolor
8176 (package-with-python2 python-termcolor))
8177
8178 (define-public python-libarchive-c
8179 (package
8180 (name "python-libarchive-c")
8181 (version "2.2")
8182 (source (origin
8183 (method url-fetch)
8184 (uri (pypi-uri "libarchive-c" version))
8185 (sha256
8186 (base32
8187 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
8188 (build-system python-build-system)
8189 (arguments
8190 '(#:phases (modify-phases %standard-phases
8191 (add-before
8192 'build 'reference-libarchive
8193 (lambda* (#:key inputs #:allow-other-keys)
8194 ;; Retain the absolute file name of libarchive.so.
8195 (let ((libarchive (assoc-ref inputs "libarchive")))
8196 (substitute* "libarchive/ffi.py"
8197 (("find_library\\('archive'\\)")
8198 (string-append "'" libarchive
8199 "/lib/libarchive.so'")))))))))
8200 (inputs
8201 `(("libarchive" ,libarchive)))
8202 (home-page "https://github.com/Changaco/python-libarchive-c")
8203 (synopsis "Python interface to libarchive")
8204 (description
8205 "This package provides Python bindings to libarchive, a C library to
8206 access possibly compressed archives in many different formats. It uses
8207 Python's @code{ctypes} foreign function interface (FFI).")
8208 (license license:lgpl2.0+)))
8209
8210 (define-public python2-libarchive-c
8211 (package-with-python2 python-libarchive-c))
8212
8213 (define-public python-file
8214 (package
8215 (inherit file)
8216 (name "python-file")
8217 (build-system python-build-system)
8218 (arguments
8219 '(#:tests? #f ;no tests
8220 #:configure-flags '("--single-version-externally-managed" "--root=/")
8221 #:phases (modify-phases %standard-phases
8222 (add-before 'build 'change-directory
8223 (lambda _
8224 (chdir "python")
8225 #t))
8226 (add-before 'build 'set-library-file-name
8227 (lambda* (#:key inputs #:allow-other-keys)
8228 (let ((file (assoc-ref inputs "file")))
8229 (substitute* "magic.py"
8230 (("find_library\\('magic'\\)")
8231 (string-append "'" file "/lib/libmagic.so'")))
8232 #t))))))
8233 (inputs `(("file" ,file)))
8234 (self-native-input? #f)
8235 (synopsis "Python bindings to the libmagic file type guesser. Note that
8236 this module and the python-magic module both provide a \"magic.py\" file;
8237 these two modules, which are different and were developed separately, both
8238 serve the same purpose: provide Python bindings for libmagic.")))
8239
8240 (define-public python2-file
8241 (package-with-python2 python-file))
8242
8243 (define-public python-debian
8244 (package
8245 (name "python-debian")
8246 (version "0.1.28")
8247 (source
8248 (origin
8249 (method url-fetch)
8250 (uri (pypi-uri name version))
8251 (sha256
8252 (base32
8253 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
8254 (build-system python-build-system)
8255 (propagated-inputs
8256 `(("python-six" ,python-six)))
8257 (home-page "http://packages.debian.org/sid/python-debian")
8258 (synopsis "Debian package related modules")
8259 (description
8260 ;; XXX: Use @enumerate instead of @itemize to work around
8261 ;; <http://bugs.gnu.org/21772>.
8262 "This package provides Python modules that abstract many formats of
8263 Debian-related files, such as:
8264
8265 @enumerate
8266 @item Debtags information;
8267 @item @file{debian/changelog} files;
8268 @item packages files, pdiffs;
8269 @item control files of single or multiple RFC822-style paragraphs---e.g.
8270 @file{debian/control}, @file{.changes}, @file{.dsc};
8271 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8272 contained files and meta-information.
8273 @end enumerate\n")
8274
8275 ;; Modules are either GPLv2+ or GPLv3+.
8276 (license license:gpl3+)))
8277
8278 (define-public python2-debian
8279 (package-with-python2 python-debian))
8280
8281 (define-public python-nbformat
8282 (package
8283 (name "python-nbformat")
8284 (version "4.3.0")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "nbformat" version))
8289 (sha256
8290 (base32
8291 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
8292 (build-system python-build-system)
8293 (arguments `(#:tests? #f)) ; no test target
8294 (propagated-inputs
8295 `(("python-ipython-genutils" ,python-ipython-genutils)
8296 ("python-jsonschema" ,python-jsonschema)
8297 ("python-jupyter-core" ,python-jupyter-core)
8298 ("python-traitlets" ,python-traitlets)))
8299 (home-page "http://jupyter.org")
8300 (synopsis "Jupyter Notebook format")
8301 (description "This package provides the reference implementation of the
8302 Jupyter Notebook format and Python APIs for working with notebooks.")
8303 (license license:bsd-3)))
8304
8305 (define-public python2-nbformat
8306 (package-with-python2 python-nbformat))
8307
8308 (define-public python-bleach
8309 (package
8310 (name "python-bleach")
8311 (version "1.4.3")
8312 (source
8313 (origin
8314 (method url-fetch)
8315 (uri (pypi-uri "bleach" version))
8316 (sha256
8317 (base32
8318 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8319 (build-system python-build-system)
8320 (propagated-inputs
8321 `(("python-html5lib" ,python-html5lib-0.9)
8322 ("python-six" ,python-six)))
8323 (native-inputs
8324 `(("python-nose" ,python-nose)))
8325 (home-page "https://github.com/jsocol/bleach")
8326 (synopsis "Whitelist-based HTML-sanitizing tool")
8327 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8328 (license license:asl2.0)))
8329
8330 (define-public python2-bleach
8331 (package-with-python2 python-bleach))
8332
8333 (define-public python-entrypoints
8334 (package
8335 (name "python-entrypoints")
8336 (version "0.2.2")
8337 (source
8338 (origin
8339 (method url-fetch)
8340 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8341 version ".tar.gz"))
8342 (file-name (string-append name "-" version ".tar.gz"))
8343 (sha256
8344 (base32
8345 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8346 (build-system python-build-system)
8347 ;; The package does not come with a setup.py file, so we have to generate
8348 ;; one ourselves.
8349 (arguments
8350 `(#:tests? #f
8351 #:phases
8352 (modify-phases %standard-phases
8353 (add-after 'unpack 'create-setup.py
8354 (lambda _
8355 (call-with-output-file "setup.py"
8356 (lambda (port)
8357 (format port "\
8358 from setuptools import setup
8359 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8360 " ,version))))))))
8361 (home-page "https://github.com/takluyver/entrypoints")
8362 (synopsis "Discover and load entry points from installed Python packages")
8363 (description "Entry points are a way for Python packages to advertise
8364 objects with some common interface. The most common examples are
8365 @code{console_scripts} entry points, which define shell commands by
8366 identifying a Python function to run. The @code{entrypoints} module contains
8367 functions to find and load entry points.")
8368 (license license:expat)))
8369
8370 (define-public python2-entrypoints
8371 (package-with-python2 python-entrypoints))
8372
8373 (define-public python-nbconvert
8374 (package
8375 (name "python-nbconvert")
8376 (version "5.0.0b1")
8377 (source
8378 (origin
8379 (method url-fetch)
8380 (uri (pypi-uri "nbconvert" version))
8381 (sha256
8382 (base32
8383 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8384 (build-system python-build-system)
8385 (arguments
8386 `(;; The "bdist_egg" target is disabled by default, causing the installation
8387 ;; to fail.
8388 #:configure-flags (list "bdist_egg")
8389 ;; FIXME: 5 failures, 40 errors.
8390 #:tests? #f))
8391 ;; #:phases
8392 ;; (modify-phases %standard-phases
8393 ;; (replace 'check
8394 ;; (lambda _
8395 ;; (zero? (system* "py.test" "-v")))))
8396 (native-inputs
8397 `(("python-pytest" ,python-pytest)))
8398 (propagated-inputs
8399 `(("python-bleach" ,python-bleach)
8400 ("python-entrypoints" ,python-entrypoints)
8401 ("python-jinja2" ,python-jinja2)
8402 ("python-jupyter-core" ,python-jupyter-core)
8403 ("python-mistune" ,python-mistune)
8404 ("python-nbformat" ,python-nbformat)
8405 ("python-pygments" ,python-pygments)
8406 ("python-traitlets" ,python-traitlets)))
8407 (home-page "http://jupyter.org")
8408 (synopsis "Converting Jupyter Notebooks")
8409 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8410 notebooks to various other formats via Jinja templates. It allows you to
8411 convert an @code{.ipynb} notebook file into various static formats including:
8412
8413 @enumerate
8414 @item HTML
8415 @item LaTeX
8416 @item PDF
8417 @item Reveal JS
8418 @item Markdown (md)
8419 @item ReStructured Text (rst)
8420 @item executable script
8421 @end enumerate\n")
8422 (license license:bsd-3)))
8423
8424 (define-public python2-nbconvert
8425 (package-with-python2 python-nbconvert))
8426
8427 (define-public python-notebook
8428 (package
8429 (name "python-notebook")
8430 (version "4.2.3")
8431 (source (origin
8432 (method url-fetch)
8433 (uri (pypi-uri "notebook" version))
8434 (sha256
8435 (base32
8436 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8437 (build-system python-build-system)
8438 (arguments
8439 `(#:phases
8440 (modify-phases %standard-phases
8441 (replace 'check
8442 (lambda _
8443 ;; HOME must be set for tests
8444 (setenv "HOME" "/tmp")
8445 (zero? (system* "nosetests")))))))
8446 (propagated-inputs
8447 `(("python-jupyter-core" ,python-jupyter-core)
8448 ("python-nbformat" ,python-nbformat)
8449 ("python-nbconvert" ,python-nbconvert)
8450 ("python-ipython" ,python-ipython)))
8451 (native-inputs
8452 `(("python-nose" ,python-nose)
8453 ("python-sphinx" ,python-sphinx)
8454 ("python-requests" ,python-requests)))
8455 (home-page "http://jupyter.org/")
8456 (synopsis "Web-based notebook environment for interactive computing")
8457 (description
8458 "The Jupyter HTML notebook is a web-based notebook environment for
8459 interactive computing.")
8460 (properties `((python2-variant . ,(delay python2-notebook))))
8461 (license license:bsd-3)))
8462
8463 (define-public python2-notebook
8464 (let ((base (package-with-python2
8465 (strip-python2-variant python-notebook))))
8466 (package (inherit base)
8467 (native-inputs
8468 `(("python2-mock" ,python2-mock)
8469 ,@(package-native-inputs base)))
8470 (arguments
8471 (substitute-keyword-arguments (package-arguments base)
8472 ((#:phases phases)
8473 `(modify-phases ,phases
8474 (add-before 'check 'disable-test-case
8475 ;; The test requires network access to localhost. Curiously it
8476 ;; fails with Python 2 only. Simply make the test-case return
8477 ;; immediately.
8478 (lambda _
8479 (substitute*
8480 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8481 (("formats = self.nbconvert_api") "return #")))))))))))
8482
8483 (define-public python-widgetsnbextension
8484 (package
8485 (name "python-widgetsnbextension")
8486 (version "1.2.6")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "widgetsnbextension" version))
8491 (sha256
8492 (base32
8493 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8494 (build-system python-build-system)
8495 (propagated-inputs
8496 `(("python-notebook" ,python-notebook)))
8497 (native-inputs
8498 `(("python-certifi" ,python-certifi)
8499 ("python-nose" ,python-nose)))
8500 (home-page "http://ipython.org")
8501 (synopsis "IPython HTML widgets for Jupyter")
8502 (description "This package provides interactive HTML widgets for Jupyter
8503 notebooks.")
8504 (license license:bsd-3)))
8505
8506 (define-public python2-widgetsnbextension
8507 (package-with-python2 python-widgetsnbextension))
8508
8509 (define-public python-ipywidgets
8510 (package
8511 (name "python-ipywidgets")
8512 (version "5.2.2")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "ipywidgets" version))
8517 (sha256
8518 (base32
8519 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8520 (build-system python-build-system)
8521 ;; FIXME: it's not clear how to run the tests.
8522 (arguments `(#:tests? #f))
8523 (propagated-inputs
8524 `(("python-ipykernel" ,python-ipykernel)
8525 ("python-ipython" ,python-ipython)
8526 ("python-traitlets" ,python-traitlets)
8527 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8528 (home-page "http://ipython.org")
8529 (synopsis "IPython HTML widgets for Jupyter")
8530 (description "Ipywidgets are interactive HTML widgets for Jupyter
8531 notebooks and the IPython kernel. Notebooks come alive when interactive
8532 widgets are used. Users gain control of their data and can visualize changes
8533 in the data.")
8534 (license license:bsd-3)))
8535
8536 (define-public python2-ipywidgets
8537 (package-with-python2 python-ipywidgets))
8538
8539 (define-public python-jupyter-console
8540 (package
8541 (name "python-jupyter-console")
8542 (version "5.0.0")
8543 (source
8544 (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "jupyter_console" version))
8547 (sha256
8548 (base32
8549 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8550 (build-system python-build-system)
8551 ;; FIXME: it's not clear how to run the tests.
8552 (arguments `(#:tests? #f))
8553 (propagated-inputs
8554 `(("python-ipykernel" ,python-ipykernel)
8555 ("python-ipython" ,python-ipython)
8556 ("python-jupyter-client" ,python-jupyter-client)
8557 ("python-prompt-toolkit" ,python-prompt-toolkit)
8558 ("python-pygments" ,python-pygments)))
8559 (home-page "https://jupyter.org")
8560 (synopsis "Jupyter terminal console")
8561 (description "This package provides a terminal-based console frontend for
8562 Jupyter kernels. It also allows for console-based interaction with non-Python
8563 Jupyter kernels such as IJulia and IRKernel.")
8564 (license license:bsd-3)))
8565
8566 (define-public python2-jupyter-console
8567 (package-with-python2 python-jupyter-console))
8568
8569 ;; The python-ipython and python-jupyter-console require each other. To get
8570 ;; the functionality in both packages working, strip down the
8571 ;; python-jupyter-console package when using it as an input to python-ipython.
8572 (define python-jupyter-console-minimal
8573 (package
8574 (inherit python-jupyter-console)
8575 (arguments
8576 (substitute-keyword-arguments
8577 (package-arguments python-jupyter-console)
8578 ((#:phases phases)
8579 `(modify-phases ,phases
8580 (add-after 'install 'delete-bin
8581 (lambda* (#:key outputs #:allow-other-keys)
8582 ;; Delete the bin files, to avoid conflicts in profiles
8583 ;; where python-ipython and python-jupyter-console are
8584 ;; both present.
8585 (delete-file-recursively
8586 (string-append
8587 (assoc-ref outputs "out") "/bin"))))))))
8588 ;; Remove the python-ipython propagated input, to avoid the cycle
8589 (propagated-inputs
8590 (alist-delete
8591 "python-ipython"
8592 (package-propagated-inputs python-jupyter-console)))))
8593
8594 (define-public jupyter
8595 (package
8596 (name "jupyter")
8597 (version "1.0.0")
8598 (source
8599 (origin
8600 (method url-fetch)
8601 (uri (pypi-uri "jupyter" version))
8602 (sha256
8603 (base32
8604 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8605 (build-system python-build-system)
8606 ;; FIXME: it's not clear how to run the tests.
8607 (arguments `(#:tests? #f))
8608 (propagated-inputs
8609 `(("python-ipykernel" ,python-ipykernel)
8610 ("python-ipywidgets" ,python-ipywidgets)
8611 ("python-jupyter-console" ,python-jupyter-console)
8612 ("python-nbconvert" ,python-nbconvert)
8613 ("python-notebook" ,python-notebook)))
8614 (home-page "http://jupyter.org")
8615 (synopsis "Web application for interactive documents")
8616 (description
8617 "The Jupyter Notebook is a web application that allows you to create and
8618 share documents that contain live code, equations, visualizations and
8619 explanatory text. Uses include: data cleaning and transformation, numerical
8620 simulation, statistical modeling, machine learning and much more.")
8621 (license license:bsd-3)))
8622
8623 (define-public python-chardet
8624 (package
8625 (name "python-chardet")
8626 (version "2.3.0")
8627 (source
8628 (origin
8629 (method url-fetch)
8630 (uri (string-append
8631 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8632 version
8633 ".tar.gz"))
8634 (sha256
8635 (base32
8636 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8637 (build-system python-build-system)
8638 (home-page "https://github.com/chardet/chardet")
8639 (synopsis "Universal encoding detector for Python 2 and 3")
8640 (description
8641 "This package provides @code{chardet}, a Python module that can
8642 automatically detect a wide range of file encodings.")
8643 (license license:lgpl2.1+)))
8644
8645 (define-public python2-chardet
8646 (package-with-python2 python-chardet))
8647
8648 (define-public python-docopt
8649 (package
8650 (name "python-docopt")
8651 (version "0.6.2")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 ;; The release on PyPI does not include tests.
8656 (uri (string-append
8657 "https://github.com/docopt/docopt/archive/"
8658 version ".tar.gz"))
8659 (file-name (string-append name "-" version ".tar.gz"))
8660 (sha256
8661 (base32
8662 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8663 (build-system python-build-system)
8664 (native-inputs
8665 `(("python-pytest" ,python-pytest)))
8666 (arguments
8667 `(#:phases
8668 (modify-phases %standard-phases
8669 (replace 'check
8670 (lambda _ (zero? (system* "py.test")))))))
8671 (home-page "http://docopt.org")
8672 (synopsis "Command-line interface description language for Python")
8673 (description "This library allows the user to define a command-line
8674 interface from a program's help message rather than specifying it
8675 programatically with command-line parsers like @code{getopt} and
8676 @code{argparse}.")
8677 (license license:expat)))
8678
8679 (define-public python2-docopt
8680 (package-with-python2 python-docopt))
8681
8682 (define-public python-zope-event
8683 (package
8684 (name "python-zope-event")
8685 (version "4.1.0")
8686 (source
8687 (origin
8688 (method url-fetch)
8689 (uri (string-append "https://pypi.python.org/packages/source/z"
8690 "/zope.event/zope.event-" version ".tar.gz"))
8691 (sha256
8692 (base32
8693 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8694 (build-system python-build-system)
8695 (home-page "http://pypi.python.org/pypi/zope.event")
8696 (synopsis "Event publishing system for Python")
8697 (description "Zope.event provides an event publishing API, intended for
8698 use by applications which are unaware of any subscribers to their events. It
8699 is a simple event-dispatching system on which more sophisticated event
8700 dispatching systems can be built.")
8701 (license license:zpl2.1)))
8702
8703 (define-public python2-zope-event
8704 (package-with-python2 python-zope-event))
8705
8706 (define-public python-zope-interface
8707 (package
8708 (name "python-zope-interface")
8709 (version "4.1.3")
8710 (source
8711 (origin
8712 (method url-fetch)
8713 (uri (string-append "https://pypi.python.org/packages/source/z"
8714 "/zope.interface/zope.interface-" version ".tar.gz"))
8715 (sha256
8716 (base32
8717 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8718 (build-system python-build-system)
8719 (native-inputs
8720 `(("python-zope-event" ,python-zope-event)))
8721 (home-page "https://github.com/zopefoundation/zope.interface")
8722 (synopsis "Python implementation of the \"design by contract\"
8723 methodology")
8724 (description "Zope.interface provides an implementation of \"object
8725 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8726 conforming to a given API or contract.")
8727 (license license:zpl2.1)))
8728
8729 (define-public python2-zope-interface
8730 (package-with-python2 python-zope-interface))
8731
8732 (define-public python-zope-exceptions
8733 (package
8734 (name "python-zope-exceptions")
8735 (version "4.0.8")
8736 (source
8737 (origin
8738 (method url-fetch)
8739 (uri (string-append "https://pypi.python.org/packages/source/z"
8740 "/zope.exceptions/zope.exceptions-"
8741 version ".tar.gz"))
8742 (sha256
8743 (base32
8744 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8745 (build-system python-build-system)
8746 (arguments
8747 '(#:tests? #f)) ; circular dependency with zope.testrunner
8748 (propagated-inputs
8749 `(("python-zope-interface" ,python-zope-interface)))
8750 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8751 (synopsis "Zope exceptions")
8752 (description "Zope.exceptions provides general-purpose exception types
8753 that have uses outside of the Zope framework.")
8754 (license license:zpl2.1)))
8755
8756 (define-public python2-zope-exceptions
8757 (package-with-python2 python-zope-exceptions))
8758
8759 (define-public python-zope-testing
8760 (package
8761 (name "python-zope-testing")
8762 (version "4.5.0")
8763 (source
8764 (origin
8765 (method url-fetch)
8766 (uri (string-append "https://pypi.python.org/packages/source/z"
8767 "/zope.testing/zope.testing-" version ".tar.gz"))
8768 (sha256
8769 (base32
8770 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8771 (modules '((guix build utils)))
8772 (snippet
8773 '(begin
8774 ;; Remove pre-compiled .pyc files backup files from source.
8775 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8776 #t))))
8777 (build-system python-build-system)
8778 (native-inputs
8779 `(("python-zope-exceptions" ,python-zope-exceptions)))
8780 (propagated-inputs
8781 `(("python-zope-interface" ,python-zope-interface)))
8782 (home-page "http://pypi.python.org/pypi/zope.testing")
8783 (synopsis "Zope testing helpers")
8784 (description "Zope.testing provides a number of testing utilities for HTML
8785 forms, HTTP servers, regular expressions, and more.")
8786 (license license:zpl2.1)))
8787
8788 (define-public python2-zope-testing
8789 (package-with-python2 python-zope-testing))
8790
8791 (define-public python-zope-testrunner
8792 (package
8793 (name "python-zope-testrunner")
8794 (version "4.4.9")
8795 (source
8796 (origin
8797 (method url-fetch)
8798 (uri (string-append "https://pypi.python.org/packages/source/z"
8799 "/zope.testrunner/zope.testrunner-"
8800 version ".zip"))
8801 (sha256
8802 (base32
8803 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8804 (build-system python-build-system)
8805 (arguments
8806 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8807 (native-inputs
8808 `(("python-six" ,python-six)
8809 ;("python-zope-interface" ,python-zope-interface)
8810 ("python-zope-exceptions" ,python-zope-exceptions)
8811 ("python-zope-testing" ,python-zope-testing)
8812 ("unzip" ,unzip)))
8813 (propagated-inputs
8814 `(("python-zope-interface" ,python-zope-interface)))
8815 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8816 (synopsis "Zope testrunner script")
8817 (description "Zope.testrunner provides a script for running Python
8818 tests.")
8819 (license license:zpl2.1)))
8820
8821 (define-public python2-zope-testrunner
8822 (let ((base (package-with-python2 python-zope-testrunner)))
8823 (package
8824 (inherit base)
8825 (native-inputs
8826 (append (package-native-inputs base)
8827 `(("python2-subunit" ,python2-subunit)
8828 ("python2-mimeparse" ,python2-mimeparse)))))))
8829
8830 (define-public python-zope-i18nmessageid
8831 (package
8832 (name "python-zope-i18nmessageid")
8833 (version "4.0.3")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (string-append
8838 "https://pypi.python.org/packages/source/z"
8839 "/zope.i18nmessageid/zope.i18nmessageid-"
8840 version ".tar.gz"))
8841 (sha256
8842 (base32
8843 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8844 (build-system python-build-system)
8845 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8846 (synopsis "Message identifiers for internationalization")
8847 (description "Zope.i18nmessageid provides facilities for declaring
8848 internationalized messages within program source text.")
8849 (license license:zpl2.1)))
8850
8851 (define-public python2-zope-i18nmessageid
8852 (package-with-python2 python-zope-i18nmessageid))
8853
8854 (define-public python-zope-schema
8855 (package
8856 (name "python-zope-schema")
8857 (version "4.4.2")
8858 (source
8859 (origin
8860 (method url-fetch)
8861 (uri (string-append "https://pypi.python.org/packages/source/z"
8862 "/zope.schema/zope.schema-" version ".tar.gz"))
8863 (sha256
8864 (base32
8865 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8866 (build-system python-build-system)
8867 (arguments
8868 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8869 (propagated-inputs
8870 `(("python-zope-event" ,python-zope-event)
8871 ("python-zope-exceptions", python-zope-exceptions)
8872 ("python-zope-interface" ,python-zope-interface)))
8873 (native-inputs
8874 `(("python-zope-testing" ,python-zope-testing)
8875 ("python-coverage" ,python-coverage)
8876 ("python-nose" ,python-nose)))
8877 (home-page "http://pypi.python.org/pypi/zope.schema")
8878 (synopsis "Zope data schemas")
8879 (description "Zope.scheme provides extensions to zope.interface for
8880 defining data schemas.")
8881 (license license:zpl2.1)))
8882
8883 (define-public python2-zope-schema
8884 (package-with-python2 python-zope-schema))
8885
8886 (define-public python-zope-configuration
8887 (package
8888 (name "python-zope-configuration")
8889 (version "4.0.3")
8890 (source (origin
8891 (method url-fetch)
8892 (uri (string-append "https://pypi.python.org/packages/source/z"
8893 "/zope.configuration/zope.configuration-"
8894 version ".tar.gz"))
8895 (sha256
8896 (base32
8897 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8898 (build-system python-build-system)
8899 (arguments
8900 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8901 (propagated-inputs
8902 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8903 ("python-zope-schema" ,python-zope-schema)))
8904 (home-page "http://pypi.python.org/pypi/zope.configuration")
8905 (synopsis "Zope Configuration Markup Language")
8906 (description "Zope.configuration implements ZCML, the Zope Configuration
8907 Markup Language.")
8908 (license license:zpl2.1)))
8909
8910 (define-public python2-zope-configuration
8911 (package-with-python2 python-zope-configuration))
8912
8913 (define-public python-zope-proxy
8914 (package
8915 (name "python-zope-proxy")
8916 (version "4.1.6")
8917 (source
8918 (origin
8919 (method url-fetch)
8920 (uri (string-append "https://pypi.python.org/packages/source/z"
8921 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8922 (sha256
8923 (base32
8924 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8925 (build-system python-build-system)
8926 (arguments
8927 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8928 (propagated-inputs
8929 `(("python-zope-interface" ,python-zope-interface)))
8930 (home-page "http://pypi.python.org/pypi/zope.proxy")
8931 (synopsis "Generic, transparent proxies")
8932 (description "Zope.proxy provides generic, transparent proxies for Python.
8933 Proxies are special objects which serve as mostly-transparent wrappers around
8934 another object, intervening in the apparent behavior of the wrapped object
8935 only when necessary to apply the policy (e.g., access checking, location
8936 brokering, etc.) for which the proxy is responsible.")
8937 (license license:zpl2.1)))
8938
8939 (define-public python2-zope-proxy
8940 (package-with-python2 python-zope-proxy))
8941
8942 (define-public python-zope-location
8943 (package
8944 (name "python-zope-location")
8945 (version "4.0.3")
8946 (source
8947 (origin
8948 (method url-fetch)
8949 (uri (string-append "https://pypi.python.org/packages/source/z"
8950 "/zope.location/zope.location-" version ".tar.gz"))
8951 (sha256
8952 (base32
8953 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8954 (build-system python-build-system)
8955 (arguments
8956 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8957 (propagated-inputs
8958 `(("python-zope-proxy" ,python-zope-proxy)
8959 ("python-zope-schema" ,python-zope-schema)))
8960 (home-page "http://pypi.python.org/pypi/zope.location/")
8961 (synopsis "Zope location library")
8962 (description "Zope.location implements the concept of \"locations\" in
8963 Zope3, which are are special objects that have a structural location.")
8964 (license license:zpl2.1)))
8965
8966 (define-public python2-zope-location
8967 (package-with-python2 python-zope-location))
8968
8969 (define-public python-zope-security
8970 (package
8971 (name "python-zope-security")
8972 (version "4.0.3")
8973 (source
8974 (origin
8975 (method url-fetch)
8976 (uri (string-append "https://pypi.python.org/packages/source/z"
8977 "/zope.security/zope.security-" version ".tar.gz"))
8978 (sha256
8979 (base32
8980 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8981 (build-system python-build-system)
8982 (arguments
8983 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8984 (propagated-inputs
8985 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8986 ("python-zope-proxy" ,python-zope-proxy)
8987 ("python-zope-schema" ,python-zope-schema)))
8988 (native-inputs
8989 `(("python-six" ,python-six)
8990 ("python-zope-component" ,python-zope-component)
8991 ("python-zope-configuration" ,python-zope-configuration)
8992 ("python-zope-location" ,python-zope-location)
8993 ("python-zope-testrunner" ,python-zope-testrunner)
8994 ("python-zope-testing" ,python-zope-testing)))
8995 (home-page "http://pypi.python.org/pypi/zope.security")
8996 (synopsis "Zope security framework")
8997 (description "Zope.security provides a generic mechanism to implement
8998 security policies on Python objects.")
8999 (license license:zpl2.1)))
9000
9001 (define-public python2-zope-security
9002 (let ((zope-security (package-with-python2 python-zope-security)))
9003 (package (inherit zope-security)
9004 (propagated-inputs
9005 `(("python2-zope-testrunner" ,python2-zope-testrunner)
9006 ,@(alist-delete
9007 "python-zope-testrunner"
9008 (package-propagated-inputs zope-security)))))))
9009
9010 (define-public python-zope-component
9011 (package
9012 (name "python-zope-component")
9013 (version "4.3.0")
9014 (source
9015 (origin
9016 (method url-fetch)
9017 (uri (pypi-uri "zope.component" version))
9018 (sha256
9019 (base32
9020 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
9021 (build-system python-build-system)
9022 (arguments
9023 ;; Skip tests due to circular dependency with python-zope-security.
9024 '(#:tests? #f))
9025 (native-inputs
9026 `(("python-zope-testing" ,python-zope-testing)))
9027 (propagated-inputs
9028 `(("python-zope-event" ,python-zope-event)
9029 ("python-zope-interface" ,python-zope-interface)
9030 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9031 ("python-zope-configuration" ,python-zope-configuration)))
9032 (home-page "https://github.com/zopefoundation/zope.component")
9033 (synopsis "Zope Component Architecture")
9034 (description "Zope.component represents the core of the Zope Component
9035 Architecture. Together with the zope.interface package, it provides
9036 facilities for defining, registering and looking up components.")
9037 (license license:zpl2.1)))
9038
9039 (define-public python2-zope-component
9040 (package-with-python2 python-zope-component))
9041
9042 (define-public python-pythondialog
9043 (package
9044 (name "python-pythondialog")
9045 (version "3.4.0")
9046 (source
9047 (origin
9048 (method url-fetch)
9049 (uri (pypi-uri "pythondialog" version))
9050 (sha256
9051 (base32
9052 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9053 (build-system python-build-system)
9054 (arguments
9055 `(#:phases
9056 (modify-phases %standard-phases
9057 (add-after 'unpack 'patch-path
9058 (lambda* (#:key inputs #:allow-other-keys)
9059 (let* ((dialog (assoc-ref inputs "dialog")))
9060 ;; Since this library really wants to grovel the search path, we
9061 ;; must hardcode dialog's store path into it.
9062 (substitute* "dialog.py"
9063 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9064 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9065 #t))))
9066 #:tests? #f)) ; no test suite
9067 (propagated-inputs
9068 `(("dialog" ,dialog)))
9069 (home-page "http://pythondialog.sourceforge.net/")
9070 (synopsis "Python interface to the UNIX dialog utility")
9071 (description "A Python wrapper for the dialog utility. Its purpose is to
9072 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9073 This allows one to make simple text-mode user interfaces on Unix-like systems")
9074 (license license:lgpl2.1)
9075 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9076
9077 (define-public python2-pythondialog
9078 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9079 (package
9080 (inherit base)
9081 (version (package-version python-pythondialog))
9082 (source (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "python2-pythondialog" version))
9085 (sha256
9086 (base32
9087 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9088
9089 (define-public python-pyrfc3339
9090 (package
9091 (name "python-pyrfc3339")
9092 (version "1.0")
9093 (source
9094 (origin
9095 (method url-fetch)
9096 (uri (pypi-uri "pyRFC3339" version))
9097 (sha256
9098 (base32
9099 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
9100 (build-system python-build-system)
9101 (propagated-inputs
9102 `(("python-pytz" ,python-pytz)))
9103 (native-inputs
9104 `(("python-nose" ,python-nose)))
9105 (home-page "https://github.com/kurtraschke/pyRFC3339")
9106 (synopsis "Python timestamp library")
9107 (description "Python library for generating and parsing RFC 3339-compliant
9108 timestamps.")
9109 (license license:expat)))
9110
9111 (define-public python2-pyrfc3339
9112 (package-with-python2 python-pyrfc3339))
9113
9114 (define-public python-werkzeug
9115 (package
9116 (name "python-werkzeug")
9117 (version "0.11.15")
9118 (source
9119 (origin
9120 (method url-fetch)
9121 (uri (pypi-uri "Werkzeug" version))
9122 (sha256
9123 (base32
9124 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
9125 (build-system python-build-system)
9126 (native-inputs
9127 `(("python-pytest" ,python-pytest)))
9128 (home-page "http://werkzeug.pocoo.org/")
9129 (synopsis "Utilities for WSGI applications")
9130 (description "One of the most advanced WSGI utility modules. It includes a
9131 powerful debugger, full-featured request and response objects, HTTP utilities to
9132 handle entity tags, cache control headers, HTTP dates, cookie handling, file
9133 uploads, a powerful URL routing system and a bunch of community-contributed
9134 addon modules.")
9135 (license license:x11)))
9136
9137 (define-public python2-werkzeug
9138 (package-with-python2 python-werkzeug))
9139
9140 (define-public python-configobj
9141 (package
9142 (name "python-configobj")
9143 (version "5.0.6")
9144 (source (origin
9145 (method url-fetch)
9146 (uri (string-append
9147 "https://pypi.python.org/packages/source/c/configobj/"
9148 "configobj-" version ".tar.gz"))
9149 (sha256
9150 (base32
9151 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9152 ;; Patch setup.py so it looks for python-setuptools, which is
9153 ;; required to parse the keyword 'install_requires' in setup.py.
9154 (patches (search-patches "python-configobj-setuptools.patch"))))
9155 (build-system python-build-system)
9156 (propagated-inputs
9157 `(("python-six" ,python-six)))
9158 (synopsis "Config file reading, writing and validation")
9159 (description "ConfigObj is a simple but powerful config file reader and
9160 writer: an ini file round tripper. Its main feature is that it is very easy to
9161 use, with a straightforward programmer’s interface and a simple syntax for
9162 config files.")
9163 (home-page "https://github.com/DiffSK/configobj")
9164 (license license:bsd-3)))
9165
9166 (define-public python2-configobj
9167 (package-with-python2 python-configobj))
9168
9169 (define-public python-configargparse
9170 (package
9171 (name "python-configargparse")
9172 (version "0.10.0")
9173 (source (origin
9174 (method url-fetch)
9175 (uri (string-append
9176 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
9177 "ConfigArgParse-" version ".tar.gz"))
9178 (sha256
9179 (base32
9180 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
9181 (build-system python-build-system)
9182 (arguments
9183 ;; FIXME: Bug in test suite filed upstream:
9184 ;; https://github.com/bw2/ConfigArgParse/issues/32
9185 '(#:tests? #f))
9186 (synopsis "Replacement for argparse")
9187 (description "A drop-in replacement for argparse that allows options to also
9188 be set via config files and/or environment variables.")
9189 (home-page "https://github.com/bw2/ConfigArgParse")
9190 (license license:expat)))
9191
9192 (define-public python2-configargparse
9193 (package-with-python2 python-configargparse))
9194
9195 (define-public python-ndg-httpsclient
9196 (package
9197 (name "python-ndg-httpsclient")
9198 (version "0.4.2")
9199 (source (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "ndg_httpsclient" version))
9202 (sha256
9203 (base32
9204 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
9205 (build-system python-build-system)
9206 (arguments
9207 '(;; The tests appear to require networking.
9208 #:tests? #f))
9209 (propagated-inputs
9210 `(("python-pyopenssl" ,python-pyopenssl)))
9211 (synopsis "HTTPS support for Python's httplib and urllib2")
9212 (description "This is a HTTPS client implementation for httplib and urllib2
9213 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
9214 over the default provided with Python and importantly enables full verification
9215 of the SSL peer.")
9216 (home-page "https://github.com/cedadev/ndg_httpsclient/")
9217 (license license:bsd-3)))
9218
9219 ;; python2-openssl requires special care, so package-with-python2 is
9220 ;; insufficient.
9221 (define-public python2-ndg-httpsclient
9222 (package (inherit python-ndg-httpsclient)
9223 (name "python2-ndg-httpsclient")
9224 (arguments `(#:python ,python-2))
9225 (propagated-inputs
9226 `(("python2-pyopenssl" ,python2-pyopenssl)))))
9227
9228 (define-public python-contextlib2
9229 (package
9230 (name "python-contextlib2")
9231 (version "0.4.0")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "contextlib2" version))
9236 (sha256
9237 (base32
9238 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
9239 (build-system python-build-system)
9240 (arguments
9241 `(#:phases
9242 (modify-phases %standard-phases
9243 (replace 'check
9244 (lambda _ (zero?
9245 (system*
9246 "python" "test_contextlib2.py" "-v")))))))
9247 (home-page "http://contextlib2.readthedocs.org/")
9248 (synopsis "Tools for decorators and context managers")
9249 (description "This module is primarily a backport of the Python
9250 3.2 contextlib to earlier Python versions. Like contextlib, it
9251 provides utilities for common tasks involving decorators and context
9252 managers. It also contains additional features that are not part of
9253 the standard library.")
9254 (license license:psfl)))
9255
9256 (define-public python2-contextlib2
9257 (package-with-python2 python-contextlib2))
9258
9259 (define-public python-texttable
9260 (package
9261 (name "python-texttable")
9262 (version "0.8.7")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "texttable" version))
9267 (sha256
9268 (base32
9269 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
9270 (build-system python-build-system)
9271 (arguments '(#:tests? #f)) ; no tests
9272 (home-page "https://github.com/foutaise/texttable/")
9273 (synopsis "Python module for creating simple ASCII tables")
9274 (description "Texttable is a Python module for creating simple ASCII
9275 tables.")
9276 (license license:lgpl2.1+)))
9277
9278 (define-public python2-texttable
9279 (package-with-python2 python-texttable))
9280
9281 (define-public python-websocket-client
9282 (package
9283 (name "python-websocket-client")
9284 (version "0.37.0")
9285 (source
9286 (origin
9287 (method url-fetch)
9288 (uri (pypi-uri "websocket_client" version))
9289 (sha256
9290 (base32
9291 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
9292 (build-system python-build-system)
9293 (propagated-inputs
9294 `(("python-six" ,python-six)))
9295 (home-page "https://github.com/liris/websocket-client")
9296 (synopsis "WebSocket client for Python")
9297 (description "The Websocket-client module provides the low level APIs for
9298 WebSocket usage in Python programs.")
9299 (license license:lgpl2.1+)))
9300
9301 (define-public python2-websocket-client
9302 (package-with-python2 python-websocket-client))
9303
9304 (define-public python-atomicwrites
9305 (package
9306 (name "python-atomicwrites")
9307 (version "1.1.5")
9308 (source (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "atomicwrites" version))
9311 (sha256
9312 (base32
9313 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
9314 (build-system python-build-system)
9315 (synopsis "Atomic file writes in Python")
9316 (description "Library for atomic file writes using platform dependent tools
9317 for atomic file system operations.")
9318 (home-page "https://github.com/untitaker/python-atomicwrites")
9319 (license license:expat)))
9320
9321 (define-public python2-atomicwrites
9322 (package-with-python2 python-atomicwrites))
9323
9324 (define-public python-requests-toolbelt
9325 (package
9326 (name "python-requests-toolbelt")
9327 (version "0.8.0")
9328 (source (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "requests-toolbelt" version))
9331 (sha256
9332 (base32
9333 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
9334 (build-system python-build-system)
9335 (native-inputs
9336 `(("python-betamax" ,python-betamax)
9337 ("python-mock" ,python-mock)
9338 ("python-pytest" ,python-pytest)))
9339 (propagated-inputs
9340 `(("python-requests" ,python-requests)))
9341 (synopsis "Extensions to python-requests")
9342 (description "This is a toolbelt of useful classes and functions to be used
9343 with python-requests.")
9344 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
9345 (license license:asl2.0)))
9346
9347 (define-public python2-requests-toolbelt
9348 (package-with-python2 python-requests-toolbelt))
9349
9350 (define-public python-click-threading
9351 (package
9352 (name "python-click-threading")
9353 (version "0.4.3")
9354 (source (origin
9355 (method url-fetch)
9356 (uri (pypi-uri "click-threading" version))
9357 (sha256
9358 (base32
9359 "0xs4bg2ws0zgyiplk312l049hi23c2zqf1g771rjhh5vr2msk4cg"))))
9360 (build-system python-build-system)
9361 (propagated-inputs
9362 `(("python-click" ,python-click)))
9363 (synopsis "Utilities for multithreading in Click")
9364 (description "This package provides utilities for multithreading in Click
9365 applications.")
9366 (home-page "https://github.com/click-contrib/click-threading")
9367 (license license:expat)))
9368
9369 (define-public python-click-log
9370 (package
9371 (name "python-click-log")
9372 (version "0.2.0")
9373 (source (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "click-log" version))
9376 (sha256
9377 (base32
9378 "1bjrfxji1yv4fj0g78ri2yfgn2wbivn8g69fxfinxvxpmighhshp"))))
9379 (build-system python-build-system)
9380 (propagated-inputs
9381 `(("python-click" ,python-click)))
9382 (synopsis "Logging for click applications")
9383 (description "This package provides a Python library for logging Click
9384 applications.")
9385 (home-page "https://github.com/click-contrib/click-log")
9386 (license license:expat)))
9387
9388 (define-public python-apipkg
9389 (package
9390 (name "python-apipkg")
9391 (version "1.4")
9392 (source (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "apipkg" version))
9395 (sha256
9396 (base32
9397 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9398 (build-system python-build-system)
9399 (native-inputs
9400 `(("python-pytest" ,python-pytest)))
9401 (synopsis "Namespace control and lazy-import mechanism")
9402 (description "With apipkg you can control the exported namespace of a Python
9403 package and greatly reduce the number of imports for your users. It is a small
9404 pure Python module that works on virtually all Python versions.")
9405 (home-page "https://bitbucket.org/hpk42/apipkg")
9406 (license license:expat)))
9407
9408 (define-public python2-apipkg
9409 (package-with-python2 python-apipkg))
9410
9411 (define-public python-execnet
9412 (package
9413 (name "python-execnet")
9414 (version "1.4.1")
9415 (source (origin
9416 (method url-fetch)
9417 (uri (pypi-uri "execnet" version))
9418 (sha256
9419 (base32
9420 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9421 (build-system python-build-system)
9422 (arguments
9423 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9424 ;; The two test failures are caused by the lack of an `ssh` executable.
9425 ;; The test suite can be run with pytest after the 'install' phase.
9426 #:tests? #f))
9427 (native-inputs
9428 `(("python-pytest" ,python-pytest)
9429 ("python-setuptools-scm" ,python-setuptools-scm)))
9430 (propagated-inputs
9431 `(("python-apipkg" ,python-apipkg)))
9432 (synopsis "Rapid multi-Python deployment")
9433 (description "Execnet provides a share-nothing model with
9434 channel-send/receive communication for distributing execution across many
9435 Python interpreters across version, platform and network barriers. It has a
9436 minimal and fast API targeting the following uses:
9437 @enumerate
9438 @item distribute tasks to (many) local or remote CPUs
9439 @item write and deploy hybrid multi-process applications
9440 @item write scripts to administer multiple environments
9441 @end enumerate")
9442 (home-page "http://codespeak.net/execnet/")
9443 (license license:expat)))
9444
9445 (define-public python2-execnet
9446 (package-with-python2 python-execnet))
9447
9448 (define-public python-trollius-redis
9449 (package
9450 (name "python-trollius-redis")
9451 (version "0.1.4")
9452 (source
9453 (origin
9454 (method url-fetch)
9455 (uri (pypi-uri "trollius_redis" version))
9456 (sha256
9457 (base32
9458 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9459 (build-system python-build-system)
9460 ;; TODO: Tests require packaging 'hiredis'.
9461 (arguments '(#:tests? #f))
9462 (home-page "https://github.com/benjolitz/trollius-redis")
9463 (synopsis "Port of asyncio-redis to trollius")
9464 (description "@code{trollius-redis} is a Redis client for Python
9465 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9466 Redis protocol.")
9467 (license license:bsd-2)))
9468
9469 (define-public python2-trollius-redis
9470 (package-with-python2 python-trollius-redis))
9471
9472 ;;; The software provided by this package was integrated into pytest 2.8.
9473 (define-public python-pytest-cache
9474 (package
9475 (name "python-pytest-cache")
9476 (version "1.0")
9477 (source (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "pytest-cache" version))
9480 (sha256
9481 (base32
9482 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9483 (build-system python-build-system)
9484 (propagated-inputs
9485 `(("python-apipkg" ,python-apipkg)
9486 ("python-execnet" ,python-execnet)
9487 ("python-py" ,python-py)
9488 ("python-pytest" ,python-pytest)))
9489 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9490 (description "The pytest-cache plugin provides tools to rerun failures from
9491 the last py.test invocation.")
9492 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9493 (license license:expat)))
9494
9495 (define-public python2-pytest-cache
9496 (package-with-python2 python-pytest-cache))
9497
9498 (define-public python-pytest-localserver
9499 (package
9500 (name "python-pytest-localserver")
9501 (version "0.3.5")
9502 (source (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "pytest-localserver" version))
9505 (sha256
9506 (base32
9507 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9508 (build-system python-build-system)
9509 (arguments
9510 `(#:phases (modify-phases %standard-phases
9511 (replace 'check
9512 (lambda _
9513 (zero? (system* "py.test" "--genscript=runtests.py"))
9514 (zero? (system* "py.test")))))))
9515 (native-inputs
9516 `(("python-pytest" ,python-pytest)
9517 ("python-requests" ,python-requests)
9518 ("python-six" ,python-six)))
9519 (propagated-inputs
9520 `(("python-werkzeug" ,python-werkzeug)))
9521 (synopsis "Py.test plugin to test server connections locally")
9522 (description "Pytest-localserver is a plugin for the pytest testing
9523 framework which enables you to test server connections locally.")
9524 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9525 (license license:expat)))
9526
9527 (define-public python-wsgi-intercept
9528 (package
9529 (name "python-wsgi-intercept")
9530 (version "1.2.2")
9531 (source (origin
9532 (method url-fetch)
9533 (uri (string-append
9534 "https://pypi.python.org/packages/"
9535 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9536 "wsgi_intercept-" version ".tar.gz"))
9537 (sha256
9538 (base32
9539 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9540 (build-system python-build-system)
9541 (propagated-inputs
9542 `(("python-six" ,python-six)))
9543 (native-inputs
9544 `(("python-pytest" ,python-pytest)
9545 ("python-httplib2" ,python-httplib2)
9546 ("python-requests" ,python-requests)
9547 ("python-urllib3" ,python-urllib3)))
9548 (synopsis "Puts a WSGI application in place of a real URI for testing")
9549 (description "Wsgi_intercept installs a WSGI application in place of a real
9550 URI for testing. Testing a WSGI application normally involves starting a
9551 server at a local host and port, then pointing your test code to that address.
9552 Instead, this library lets you intercept calls to any specific host/port
9553 combination and redirect them into a WSGI application importable by your test
9554 program. Thus, you can avoid spawning multiple processes or threads to test
9555 your Web app.")
9556 (home-page "https://github.com/cdent/wsgi-intercept")
9557 (license license:expat)))
9558
9559 (define-public python-pytest-xprocess
9560 (package
9561 (name "python-pytest-xprocess")
9562 (version "0.9.1")
9563 (source (origin
9564 (method url-fetch)
9565 (uri (pypi-uri "pytest-xprocess" version))
9566 (sha256
9567 (base32
9568 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9569 (build-system python-build-system)
9570 (propagated-inputs
9571 `(("python-pytest" ,python-pytest)
9572 ("python-pytest-cache" ,python-pytest-cache)
9573 ("python-psutil" ,python-psutil)))
9574 (synopsis "Pytest plugin to manage external processes across test runs")
9575 (description "Pytest-xprocess is an experimental py.test plugin for managing
9576 processes across test runs.")
9577 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9578 (license license:expat)))
9579
9580 (define-public python-icalendar
9581 (package
9582 (name "python-icalendar")
9583 (version "3.11.7")
9584 (source (origin
9585 (method url-fetch)
9586 (uri (pypi-uri "icalendar" version))
9587 (sha256
9588 (base32
9589 "0ahf1i98wjizhld2qd7v2vmvzsmdw08mmins82bf3fpbnp2sxbgc"))))
9590 (build-system python-build-system)
9591 (propagated-inputs
9592 `(("python-dateutil" ,python-dateutil)
9593 ("python-pytz" ,python-pytz)))
9594 (synopsis "Python library for parsing iCalendar files")
9595 (description "The icalendar package is a parser/generator of iCalendar
9596 files for use with Python.")
9597 (home-page "https://github.com/collective/icalendar")
9598 (license license:bsd-2)))
9599
9600 (define-public python-sphinxcontrib-newsfeed
9601 (package
9602 (name "python-sphinxcontrib-newsfeed")
9603 (version "0.1.4")
9604 (source (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9607 (sha256
9608 (base32
9609 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9610 (arguments '(#:tests? #f)) ; No tests.
9611 (build-system python-build-system)
9612 (propagated-inputs
9613 `(("python-sphinx" ,python-sphinx)))
9614 (synopsis "News Feed extension for Sphinx")
9615 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9616 Blog, News or Announcements section to a Sphinx website.")
9617 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9618 (license license:bsd-2)))
9619
9620 (define-public python-args
9621 (package
9622 (name "python-args")
9623 (version "0.1.0")
9624 (source (origin
9625 (method url-fetch)
9626 (uri (pypi-uri "args" version))
9627 (sha256
9628 (base32
9629 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9630 (build-system python-build-system)
9631 (home-page "https://github.com/kennethreitz/args")
9632 (synopsis "Command-line argument parser")
9633 (description
9634 "This library provides a Python module to parse command-line arguments.")
9635 (license license:bsd-3)))
9636
9637 (define-public python2-args
9638 (package-with-python2 python-args))
9639
9640 (define-public python-clint
9641 (package
9642 (name "python-clint")
9643 (version "0.5.1")
9644 (source (origin
9645 (method url-fetch)
9646 (uri (pypi-uri "clint" version))
9647 (sha256
9648 (base32
9649 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9650 (build-system python-build-system)
9651 (arguments
9652 '(#:phases
9653 (modify-phases %standard-phases
9654 (replace 'check
9655 (lambda _
9656 (zero? (system* "py.test" "-v")))))))
9657 (native-inputs
9658 `(("python-pytest" ,python-pytest)))
9659 (propagated-inputs
9660 `(("python-args" ,python-args)))
9661 (home-page "https://github.com/kennethreitz/clint")
9662 (synopsis "Command-line interface tools")
9663 (description
9664 "Clint is a Python module filled with a set of tools for developing
9665 command-line applications, including tools for colored and indented
9666 output, progress bar display, and pipes.")
9667 (license license:isc)))
9668
9669 (define-public python2-clint
9670 (package-with-python2 python-clint))
9671
9672 (define-public python-astor
9673 (package
9674 (name "python-astor")
9675 (version "0.5")
9676 (source (origin
9677 (method url-fetch)
9678 (uri (pypi-uri "astor" version))
9679 (sha256
9680 (base32
9681 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9682 (build-system python-build-system)
9683 (home-page "https://github.com/berkerpeksag/astor")
9684 (synopsis "Read and write Python ASTs")
9685 (description
9686 "Astor is designed to allow easy manipulation of Python source via the
9687 Abstract Syntax Tree.")
9688 (license license:bsd-3)))
9689
9690 (define-public python2-astor
9691 (package-with-python2 python-astor))
9692
9693 (define-public python-rply
9694 (package
9695 (name "python-rply")
9696 (version "0.7.4")
9697 (source (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "rply" version))
9700 (sha256
9701 (base32
9702 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9703 (build-system python-build-system)
9704 (propagated-inputs
9705 `(("python-appdirs" ,python-appdirs)))
9706 (home-page "https://github.com/alex/rply")
9707 (synopsis "Parser generator for Python")
9708 (description
9709 "This package provides a pure Python based parser generator, that also
9710 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9711 with a new public API, and RPython support.")
9712 (license license:bsd-3)))
9713
9714 (define-public python2-rply
9715 (package-with-python2 python-rply))
9716
9717 (define-public python-hy
9718 (package
9719 (name "python-hy")
9720 (version "0.11.1")
9721 (source (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "hy" version))
9724 (sha256
9725 (base32
9726 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9727 (build-system python-build-system)
9728 (arguments
9729 '(#:phases
9730 (modify-phases %standard-phases
9731 (replace 'check
9732 (lambda _
9733 ;; Tests require write access to HOME.
9734 (setenv "HOME" "/tmp")
9735 (zero? (system* "nosetests")))))))
9736 (native-inputs
9737 `(("python-coverage" ,python-coverage)
9738 ("python-nose" ,python-nose)))
9739 (propagated-inputs
9740 `(("python-astor" ,python-astor)
9741 ("python-clint" ,python-clint)
9742 ("python-rply" ,python-rply)))
9743 (home-page "http://hylang.org/")
9744 (synopsis "Lisp frontend to Python")
9745 (description
9746 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9747 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9748 Python at your fingertips, in Lisp form.")
9749 (license license:expat)))
9750
9751 (define-public python2-hy
9752 (package-with-python2 python-hy))
9753
9754 (define-public python-rauth
9755 (package
9756 (name "python-rauth")
9757 (version "0.7.3")
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "rauth" version))
9762 (sha256
9763 (base32
9764 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9765 (build-system python-build-system)
9766 (arguments
9767 `(#:test-target "check"))
9768 (propagated-inputs
9769 `(("python-requests" ,python-requests)))
9770 (home-page "https://github.com/litl/rauth")
9771 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9772 (description
9773 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9774 provides service wrappers for convenient connection initialization and
9775 authenticated session objects providing things like keep-alive.")
9776 (license license:expat)
9777 (properties `((python2-variant . ,(delay python2-rauth))))))
9778
9779 (define-public python2-rauth
9780 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9781 (package
9782 (inherit base)
9783 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9784 ,@(package-native-inputs base))))))
9785
9786 (define-public python2-functools32
9787 (package
9788 (name "python2-functools32")
9789 (version "3.2.3-2")
9790 (source
9791 (origin
9792 (method url-fetch)
9793 (uri (pypi-uri "functools32" version))
9794 (sha256
9795 (base32
9796 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9797 (build-system python-build-system)
9798 (arguments
9799 `(#:python ,python-2
9800 #:tests? #f)) ; no test target
9801 (home-page "https://github.com/MiCHiLU/python-functools32")
9802 (synopsis
9803 "Backport of the functools module from Python 3.2.3")
9804 (description
9805 "This package is a backport of the @code{functools} module from Python
9806 3.2.3 for use with older versions of Python and PyPy.")
9807 (license license:expat)))
9808
9809 (define-public python2-subprocess32
9810 (package
9811 (name "python2-subprocess32")
9812 (version "3.2.7")
9813 (source (origin
9814 (method url-fetch)
9815 (uri (pypi-uri "subprocess32" version))
9816 (sha256
9817 (base32
9818 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9819 (patches
9820 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9821 (build-system python-build-system)
9822 (arguments
9823 `(#:python ,python-2
9824 #:phases
9825 (modify-phases %standard-phases
9826 (add-after 'unpack 'patch-/bin/sh
9827 (lambda _
9828 (substitute* '("subprocess32.py"
9829 "test_subprocess32.py")
9830 (("/bin/sh") (which "sh")))
9831 #t))
9832 (delete 'check)
9833 (add-after 'install 'check
9834 (lambda* (#:key inputs outputs #:allow-other-keys)
9835 ;; For some reason this package fails to import
9836 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9837 ;; directory. Running tests after install is easier.
9838 (add-installed-pythonpath inputs outputs)
9839 (zero? (system* "python" "test_subprocess32.py")))))))
9840 (home-page "https://github.com/google/python-subprocess32")
9841 (synopsis "Backport of the subprocess module from Python 3.2")
9842 (description
9843 "This is a backport of the @code{subprocess} standard library module
9844 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9845 new features. On POSIX systems it is guaranteed to be reliable when used
9846 in threaded applications. It includes timeout support from Python 3.3 but
9847 otherwise matches 3.2’s API.")
9848 (license license:psfl)))
9849
9850 (define-public python2-futures
9851 (package
9852 (name "python2-futures")
9853 (version "3.0.5")
9854 (source
9855 (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "futures" version))
9858 (sha256
9859 (base32
9860 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9861 (build-system python-build-system)
9862 (arguments `(#:python ,python-2))
9863 (home-page "https://github.com/agronholm/pythonfutures")
9864 (synopsis
9865 "Backport of the concurrent.futures package from Python 3.2")
9866 (description
9867 "The concurrent.futures module provides a high-level interface for
9868 asynchronously executing callables. This package backports the
9869 concurrent.futures package from Python 3.2")
9870 (license license:bsd-3)))
9871
9872 (define-public python-promise
9873 (package
9874 (name "python-promise")
9875 (version "0.4.2")
9876 (source
9877 (origin
9878 (method url-fetch)
9879 (uri (pypi-uri "promise" version))
9880 (sha256
9881 (base32
9882 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9883 (build-system python-build-system)
9884 ;; Tests wants python-futures, which is a python2 only program, and
9885 ;; can't be found by python-promise at test time.
9886 (arguments `(#:tests? #f))
9887 (home-page "https://github.com/syrusakbary/promise")
9888 (synopsis "Promises/A+ implementation for Python")
9889 (description
9890 "Promises/A+ implementation for Python")
9891 (properties `((python2-variant . ,(delay python2-promise))))
9892 (license license:expat)))
9893
9894 (define-public python2-promise
9895 (let ((promise (package-with-python2
9896 (strip-python2-variant python-promise))))
9897 (package (inherit promise)
9898 (arguments (substitute-keyword-arguments (package-arguments promise)
9899 ((#:tests? _) #t)))
9900 (native-inputs
9901 `(("python2-futures" ,python2-futures)
9902 ("python2-pytest" ,python2-pytest)
9903 ,@(package-native-inputs promise))))))
9904
9905 (define-public python-urllib3
9906 (package
9907 (name "python-urllib3")
9908 (version "1.18.1")
9909 (source
9910 (origin
9911 (method url-fetch)
9912 (uri (pypi-uri "urllib3" version))
9913 (sha256
9914 (base32
9915 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9916 (build-system python-build-system)
9917 (arguments `(#:tests? #f))
9918 (native-inputs
9919 `(;; some packages for tests
9920 ("python-nose" ,python-nose)
9921 ("python-mock" ,python-mock)
9922 ("python-tornado" ,python-tornado)))
9923 (propagated-inputs
9924 `(;; These 5 inputs are used to build urrlib3[secure]
9925 ("python-certifi" ,python-certifi)
9926 ("python-cryptography" ,python-cryptography) ;
9927 ("python-idna" ,python-idna)
9928 ("python-ipaddress" ,python-ipaddress)
9929 ("python-pyopenssl" ,python-pyopenssl)))
9930 (home-page "https://urllib3.readthedocs.org/")
9931 (synopsis "HTTP library with thread-safe connection pooling")
9932 (description
9933 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9934 can reuse the same socket connection for multiple requests, it can POST files,
9935 supports url redirection and retries, and also gzip and deflate decoding.")
9936 (license license:expat)))
9937
9938 (define-public python2-urllib3
9939 (package-with-python2 python-urllib3))
9940
9941 (define-public python-colorama
9942 (package
9943 (name "python-colorama")
9944 (version "0.3.7")
9945 (source
9946 (origin
9947 (method url-fetch)
9948 (uri (pypi-uri "colorama" version))
9949 (sha256
9950 (base32
9951 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9952 (build-system python-build-system)
9953 (synopsis "Colored terminal text rendering for Python")
9954 (description "Colorama is a Python library for rendering colored terminal
9955 text.")
9956 (home-page "https://pypi.python.org/pypi/colorama")
9957 (license license:bsd-3)))
9958
9959 (define-public python2-colorama
9960 (package-with-python2 python-colorama))
9961
9962 (define-public python-rsa
9963 (package
9964 (name "python-rsa")
9965 (version "3.4.2")
9966 (source
9967 (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "rsa" version))
9970 (sha256
9971 (base32
9972 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9973 (build-system python-build-system)
9974 (propagated-inputs
9975 `(("python-pyasn1" ,python-pyasn1)))
9976 (synopsis "Pure-Python RSA implementation")
9977 (description "Python-RSA is a pure-Python RSA implementation. It supports
9978 encryption and decryption, signing and verifying signatures, and key
9979 generation according to PKCS#1 version 1.5. It can be used as a Python
9980 library as well as on the command line.")
9981 (home-page "http://stuvel.eu/rsa")
9982 (license license:asl2.0)))
9983
9984 (define-public python2-rsa
9985 (package-with-python2 python-rsa))
9986
9987 (define-public python-pluggy
9988 (package
9989 (name "python-pluggy")
9990 (version "0.3.1")
9991 (source
9992 (origin
9993 (method url-fetch)
9994 (uri (pypi-uri "pluggy" version))
9995 (sha256
9996 (base32
9997 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9998 (build-system python-build-system)
9999 (synopsis "Plugin and hook calling mechanism for Python")
10000 (description "Pluggy is an extraction of the plugin manager as used by
10001 Pytest but stripped of Pytest specific details.")
10002 (home-page "https://pypi.python.org/pypi/pluggy")
10003 (license license:expat)))
10004
10005 (define-public python2-pluggy
10006 (package-with-python2 python-pluggy))
10007
10008 (define-public python-tox
10009 (package
10010 (name "python-tox")
10011 (version "2.8.1")
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "tox" version))
10016 (sha256
10017 (base32
10018 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10019 (build-system python-build-system)
10020 (arguments
10021 ;; FIXME: Tests require pytest-timeout, which itself requires
10022 ;; pytest>=2.8.0 for installation.
10023 '(#:tests? #f))
10024 (propagated-inputs
10025 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10026 ("python-py" ,python-py)
10027 ("python-virtualenv" ,python-virtualenv)))
10028 (native-inputs
10029 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10030 ("python-pytest" ,python-pytest) ; >= 2.3.5
10031 ("python-setuptools-scm" ,python-setuptools-scm)))
10032 (home-page "http://tox.testrun.org/")
10033 (synopsis "Virtualenv-based automation of test activities")
10034 (description "Tox is a generic virtualenv management and test command line
10035 tool. It can be used to check that a package installs correctly with
10036 different Python versions and interpreters, or run tests in each type of
10037 supported environment, or act as a frontend to continuous integration
10038 servers.")
10039 (license license:expat)))
10040
10041 (define-public python2-tox
10042 (package-with-python2 python-tox))
10043
10044 (define-public python-jmespath
10045 (package
10046 (name "python-jmespath")
10047 (version "0.9.0")
10048 (source
10049 (origin
10050 (method url-fetch)
10051 (uri (pypi-uri "jmespath" version))
10052 (sha256
10053 (base32
10054 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
10055 (build-system python-build-system)
10056 (native-inputs
10057 `(("python-nose" ,python-nose)))
10058 (synopsis "JSON Matching Expressions")
10059 (description "JMESPath (pronounced “james path”) is a Python library that
10060 allows one to declaratively specify how to extract elements from a JSON
10061 document.")
10062 (home-page "https://github.com/jmespath/jmespath.py")
10063 (license license:expat)))
10064
10065 (define-public python2-jmespath
10066 (package-with-python2 python-jmespath))
10067
10068 (define-public python-botocore
10069 (package
10070 (name "python-botocore")
10071 (version "1.7.9")
10072 (source
10073 (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "botocore" version))
10076 (sha256
10077 (base32
10078 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
10079 (build-system python-build-system)
10080 (arguments
10081 ;; FIXME: Many tests are failing.
10082 '(#:tests? #f))
10083 (propagated-inputs
10084 `(("python-dateutil" ,python-dateutil)
10085 ("python-docutils" ,python-docutils)
10086 ("python-jmespath" ,python-jmespath)))
10087 (native-inputs
10088 `(("python-mock" ,python-mock)
10089 ("python-nose" ,python-nose)
10090 ("behave" ,behave)
10091 ("python-tox" ,python-tox)
10092 ("python-wheel" ,python-wheel)))
10093 (home-page "https://github.com/boto/botocore")
10094 (synopsis "Low-level interface to AWS")
10095 (description "Botocore is a Python library that provides a low-level
10096 interface to the Amazon Web Services (AWS) API.")
10097 (license license:asl2.0)))
10098
10099 (define-public python2-botocore
10100 (package-with-python2 python-botocore))
10101
10102 (define-public awscli
10103 (package
10104 (name "awscli")
10105 (version "1.11.164")
10106 (source
10107 (origin
10108 (method url-fetch)
10109 (uri (pypi-uri name version))
10110 (sha256
10111 (base32
10112 "05r8cw7i7ff6barpmyxxk3i52gzb1xyxwj8isynmiyqlmk3c9r8w"))))
10113 (build-system python-build-system)
10114 (propagated-inputs
10115 `(("python-colorama" ,python-colorama)
10116 ("python-botocore" ,python-botocore)
10117 ("python-s3transfer" ,python-s3transfer)
10118 ("python-docutils" ,python-docutils)
10119 ("python-pyyaml" ,python-pyyaml)
10120 ("python-rsa" ,python-rsa)))
10121 (arguments
10122 ;; FIXME: The 'pypi' release does not contain tests.
10123 '(#:tests? #f))
10124 (home-page "https://aws.amazon.com/cli/")
10125 (synopsis "Command line client for AWS")
10126 (description "AWS CLI provides a unified command line interface to the
10127 Amazon Web Services (AWS) API.")
10128 (license license:asl2.0)))
10129
10130 (define-public python-hypothesis
10131 (package
10132 (name "python-hypothesis")
10133 (version "3.1.0")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "hypothesis" version))
10137 (sha256
10138 (base32
10139 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
10140 (build-system python-build-system)
10141 (native-inputs
10142 `(("python-flake8" ,python-flake8)
10143 ("python-pytest" ,python-pytest)))
10144 (synopsis "Library for property based testing")
10145 (description "Hypothesis is a library for testing your Python code against a
10146 much larger range of examples than you would ever want to write by hand. It’s
10147 based on the Haskell library, Quickcheck, and is designed to integrate
10148 seamlessly into your existing Python unit testing work flow.")
10149 (home-page "https://github.com/DRMacIver/hypothesis")
10150 (license license:mpl2.0)
10151 (properties `((python2-variant . ,(delay python2-hypothesis))))))
10152
10153 (define-public python2-hypothesis
10154 (let ((hypothesis (package-with-python2
10155 (strip-python2-variant python-hypothesis))))
10156 (package (inherit hypothesis)
10157 (native-inputs
10158 `(("python2-enum34" ,python2-enum34)
10159 ,@(package-native-inputs hypothesis))))))
10160
10161 (define-public python-pytest-subtesthack
10162 (package
10163 (name "python-pytest-subtesthack")
10164 (version "0.1.1")
10165 (source (origin
10166 (method url-fetch)
10167 (uri (pypi-uri "pytest-subtesthack" version))
10168 (sha256
10169 (base32
10170 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
10171 (build-system python-build-system)
10172 (propagated-inputs
10173 `(("python-pytest" ,python-pytest)))
10174 (synopsis "Set-up and tear-down fixtures for unit tests")
10175 (description "This plugin allows you to set up and tear down fixtures within
10176 unit test functions that use @code{py.test}. This is useful for using
10177 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
10178 function multiple times, without setting up or tearing down fixture state as is
10179 normally the case.")
10180 (home-page "https://github.com/untitaker/pytest-subtesthack/")
10181 (license license:unlicense)))
10182
10183 (define-public python2-pytest-subtesthack
10184 (package-with-python2 python-pytest-subtesthack))
10185
10186 (define-public python-xdo
10187 (package
10188 (name "python-xdo")
10189 (version "0.3")
10190 (source (origin
10191 (method url-fetch)
10192 (uri (string-append
10193 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10194 "python-xdo_" version ".orig.tar.gz"))
10195 (sha256
10196 (base32
10197 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10198 (build-system python-build-system)
10199 (arguments
10200 '(#:phases
10201 (modify-phases %standard-phases
10202 (add-before 'install 'patch-libxdo-path
10203 ;; Hardcode the path of dynamically loaded libxdo library.
10204 (lambda* (#:key inputs #:allow-other-keys)
10205 (let ((libxdo (string-append
10206 (assoc-ref inputs "xdotool")
10207 "/lib/libxdo.so")))
10208 (substitute* "xdo/_xdo.py"
10209 (("find_library\\(\"xdo\"\\)")
10210 (simple-format #f "\"~a\"" libxdo)))
10211 #t))))
10212 #:tests? #f)) ; no tests provided
10213 (propagated-inputs
10214 `(("python-six" ,python-six)))
10215 (inputs
10216 `(("xdotool" ,xdotool)
10217 ("libX11" ,libx11)))
10218 (home-page "https://tracker.debian.org/pkg/python-xdo")
10219 (synopsis "Python library for simulating X11 keyboard/mouse input")
10220 (description "Provides bindings to libxdo for manipulating X11 via simulated
10221 input. (Note that this is mostly a legacy library; you may wish to look at
10222 python-xdo for newer bindings.)")
10223 (license license:bsd-3)))
10224
10225 (define-public python2-xdo
10226 (package-with-python2 python-xdo))
10227
10228 (define-public python-wtforms
10229 (package
10230 (name "python-wtforms")
10231 (version "2.1")
10232 (source
10233 (origin
10234 (method url-fetch)
10235 (uri (pypi-uri "WTForms" version ".zip"))
10236 (sha256
10237 (base32
10238 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
10239 (build-system python-build-system)
10240 (arguments
10241 '(#:phases
10242 (modify-phases %standard-phases
10243 (add-after 'unpack 'remove-django-test
10244 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
10245 (lambda _
10246 (substitute*
10247 "tests/runtests.py"
10248 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
10249 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
10250 #t)))))
10251 (native-inputs
10252 `(("unzip" ,unzip)))
10253 (home-page "http://wtforms.simplecodes.com/")
10254 (synopsis
10255 "Form validation and rendering library for Python web development")
10256 (description
10257 "WTForms is a flexible forms validation and rendering library
10258 for Python web development. It is very similar to the web form API
10259 available in Django, but is a standalone package.")
10260 (license license:bsd-3)))
10261
10262 (define-public python2-wtforms
10263 (package-with-python2 python-wtforms))
10264
10265 (define-public python-mako
10266 (package
10267 (name "python-mako")
10268 (version "1.0.6")
10269 (source
10270 (origin
10271 (method url-fetch)
10272 (uri (pypi-uri "Mako" version))
10273 (sha256
10274 (base32
10275 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
10276 (build-system python-build-system)
10277 (propagated-inputs
10278 `(("python-markupsafe" ,python-markupsafe)))
10279 (native-inputs
10280 `(("python-mock" ,python-mock)
10281 ("python-nose" ,python-nose)
10282 ("python-pytest" ,python-pytest)))
10283 (home-page "http://www.makotemplates.org/")
10284 (synopsis "Templating language for Python")
10285 (description "Mako is a templating language for Python that compiles
10286 templates into Python modules.")
10287 (license license:expat)))
10288
10289 (define-public python2-mako
10290 (package-with-python2 python-mako))
10291
10292 (define-public python-waitress
10293 (package
10294 (name "python-waitress")
10295 (version "0.8.10")
10296 (source
10297 (origin
10298 (method url-fetch)
10299 (uri (pypi-uri "waitress" version))
10300 (sha256
10301 (base32
10302 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10303 (build-system python-build-system)
10304 (home-page "https://github.com/Pylons/waitress")
10305 (synopsis "Waitress WSGI server")
10306 (description "Waitress is meant to be a production-quality pure-Python WSGI
10307 server with very acceptable performance.")
10308 (license license:zpl2.1)))
10309
10310 (define-public python2-waitress
10311 (package-with-python2 python-waitress))
10312
10313 (define-public python-wsgiproxy2
10314 (package
10315 (name "python-wsgiproxy2")
10316 (version "0.4.2")
10317 (source
10318 (origin
10319 (method url-fetch)
10320 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10321 (sha256
10322 (base32
10323 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10324 (build-system python-build-system)
10325 (arguments
10326 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10327 ;; support Python 3:
10328 ;; https://github.com/benoitc/restkit/issues/140
10329 #:tests? #f))
10330 (native-inputs
10331 `(("unzip" ,unzip)
10332 ("python-nose" ,python-nose)
10333 ("python-coverage" ,python-coverage)))
10334 (propagated-inputs
10335 `(("python-six" ,python-six)
10336 ("python-webob" ,python-webob)))
10337 (home-page
10338 "https://github.com/gawel/WSGIProxy2/")
10339 (synopsis "WSGI Proxy with various http client backends")
10340 (description "WSGI turns HTTP requests into WSGI function calls.
10341 WSGIProxy turns WSGI function calls into HTTP requests.
10342 It also includes code to sign requests and pass private data,
10343 and to spawn subprocesses to handle requests.")
10344 (license license:expat)))
10345
10346 (define-public python2-wsgiproxy2
10347 (package-with-python2 python-wsgiproxy2))
10348
10349 (define-public python-pastedeploy
10350 (package
10351 (name "python-pastedeploy")
10352 (version "1.5.2")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "PasteDeploy" version))
10357 (sha256
10358 (base32
10359 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10360 (build-system python-build-system)
10361 (native-inputs
10362 `(("python-nose" ,python-nose)))
10363 (home-page "http://pythonpaste.org/deploy/")
10364 (synopsis
10365 "Load, configure, and compose WSGI applications and servers")
10366 (description
10367 "This tool provides code to load WSGI applications and servers from URIs;
10368 these URIs can refer to Python Eggs for INI-style configuration files. Paste
10369 Script provides commands to serve applications based on this configuration
10370 file.")
10371 (license license:expat)))
10372
10373 (define-public python2-pastedeploy
10374 (package-with-python2 python-pastedeploy))
10375
10376 (define-public python-paste
10377 (package
10378 (name "python-paste")
10379 (version "2.0.3")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "Paste" version))
10384 (sha256
10385 (base32
10386 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10387 (patches (search-patches "python-paste-remove-website-test.patch"
10388 "python-paste-remove-timing-test.patch"))))
10389 (build-system python-build-system)
10390 (native-inputs
10391 `(("python-nose" ,python-nose)))
10392 (propagated-inputs
10393 `(("python-six" ,python-six)))
10394 (home-page "http://pythonpaste.org")
10395 (synopsis
10396 "Python web development tools, focusing on WSGI")
10397 (description
10398 "Paste provides a variety of web development tools and middleware which
10399 can be nested together to build web applications. Paste's design closely
10400 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10401 (license license:expat)))
10402
10403 (define-public python2-paste
10404 (package-with-python2 python-paste))
10405
10406 (define-public python-pastescript
10407 (package
10408 (name "python-pastescript")
10409 (version "2.0.2")
10410 (source
10411 (origin
10412 (method url-fetch)
10413 (uri (pypi-uri "PasteScript" version))
10414 (sha256
10415 (base32
10416 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10417 (build-system python-build-system)
10418 (native-inputs
10419 `(("python-nose" ,python-nose)))
10420 (propagated-inputs
10421 `(("python-paste" ,python-paste)
10422 ("python-pastedeploy" ,python-pastedeploy)))
10423 (home-page "http://pythonpaste.org/script/")
10424 (arguments
10425 '(;; Unfortunately, this requires the latest unittest2,
10426 ;; but that requires traceback2 which requires linecache2 which requires
10427 ;; unittest2. So we're skipping tests for now.
10428 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10429 ;; so in theory we could get around this situation somehow.)
10430 #:tests? #f))
10431 (synopsis
10432 "Pluggable command line tool for serving web applications and more")
10433 (description
10434 "PasteScript is a plugin-friendly command line tool which provides a
10435 variety of features, from launching web applications to bootstrapping project
10436 layouts.")
10437 (license license:expat)))
10438
10439 (define-public python2-pastescript
10440 (package-with-python2 python-pastescript))
10441
10442 (define-public python-pyquery
10443 (package
10444 (name "python-pyquery")
10445 (version "1.2.17")
10446 (source
10447 (origin
10448 (method url-fetch)
10449 (uri (pypi-uri "pyquery" version))
10450 (sha256
10451 (base32
10452 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10453 (build-system python-build-system)
10454 (native-inputs
10455 `(("python-webob" ,python-webob)
10456 ("python-webtest" ,python-webtest)))
10457 (propagated-inputs
10458 `(("python-lxml" ,python-lxml)
10459 ("python-cssselect" ,python-cssselect)))
10460 (home-page "https://github.com/gawel/pyquery")
10461 (synopsis "Make jQuery-like queries on xml documents")
10462 (description "pyquery allows you to make jQuery queries on xml documents.
10463 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10464 fast xml and html manipulation.")
10465 (license license:bsd-3)))
10466
10467 (define-public python2-pyquery
10468 (package-with-python2 python-pyquery))
10469
10470 (define-public python-webtest
10471 (package
10472 (name "python-webtest")
10473 (version "2.0.20")
10474 (source
10475 (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "WebTest" version))
10478 (sha256
10479 (base32
10480 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10481 (build-system python-build-system)
10482 (arguments
10483 `(;; Unfortunately we have to disable tests!
10484 ;; This release of WebTest is pinned to python-nose < 1.3,
10485 ;; but older versions of python-nose are plagued with the following
10486 ;; bug(s), which rears its ugly head during test execution:
10487 ;; https://github.com/nose-devs/nose/issues/759
10488 ;; https://github.com/nose-devs/nose/pull/811
10489 #:tests? #f))
10490 ;; Commented out code is no good, but in this case, once tests
10491 ;; are ready to be enabled again, we should put the following
10492 ;; in place:
10493 ;; (native-inputs
10494 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10495 ;; ; but see above comment
10496 ;; ("python-coverage" ,python-coverage)
10497 ;; ("python-mock" ,python-mock)
10498 ;; ("python-pastedeploy" ,python-pastedeploy)
10499 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10500 ;; ("python-pyquery" ,python-pyquery)))
10501 (propagated-inputs
10502 `(("python-waitress" ,python-waitress)
10503 ("python-webob" ,python-webob)
10504 ("python-six" ,python-six)
10505 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10506 (home-page "http://webtest.pythonpaste.org/")
10507 (synopsis "Helper to test WSGI applications")
10508 (description "Webtest allows you to test your Python web applications
10509 without starting an HTTP server. It supports anything that supports the
10510 minimum of WSGI.")
10511 (license license:expat)))
10512
10513 (define-public python2-webtest
10514 (package-with-python2 python-webtest))
10515
10516 (define-public python-anyjson
10517 (package
10518 (name "python-anyjson")
10519 (version "0.3.3")
10520 (source
10521 (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "anyjson" version))
10524 (sha256
10525 (base32
10526 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10527 (build-system python-build-system)
10528 (arguments
10529 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10530 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10531 ;; whatever) so this transformation needs to be done before the tests
10532 ;; can be run. Maybe we could add a build step to transform beforehand
10533 ;; but it could be annoying/difficult.
10534 ;; We can enable tests for the Python 2 version, though, and do below.
10535 #:tests? #f))
10536 (home-page "http://bitbucket.org/runeh/anyjson/")
10537 (synopsis
10538 "Wraps best available JSON implementation in a common interface")
10539 (description
10540 "Anyjson loads whichever is the fastest JSON module installed
10541 and provides a uniform API regardless of which JSON implementation is used.")
10542 (license license:bsd-3)
10543 (properties `((python2-variant . ,(delay python2-anyjson))))))
10544
10545 (define-public python2-anyjson
10546 (let ((anyjson (package-with-python2
10547 (strip-python2-variant python-anyjson))))
10548 (package
10549 (inherit anyjson)
10550 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10551 #:tests? #t
10552 ,@(package-arguments anyjson)))
10553 (native-inputs `(("python2-nose" ,python2-nose))))))
10554
10555 (define-public python-amqp
10556 (package
10557 (name "python-amqp")
10558 (version "1.4.9")
10559 (source
10560 (origin
10561 (method url-fetch)
10562 (uri (pypi-uri "amqp" version))
10563 (sha256
10564 (base32
10565 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10566 (build-system python-build-system)
10567 (native-inputs
10568 `(("python-nose" ,python-nose)
10569 ("python-mock" ,python-mock)))
10570 (home-page "https://github.com/celery/py-amqp")
10571 (synopsis
10572 "Low-level AMQP client for Python (fork of amqplib)")
10573 (description
10574 "This is a fork of amqplib which was originally written by Barry Pederson.
10575 It is maintained by the Celery project, and used by kombu as a pure python
10576 alternative when librabbitmq is not available.")
10577 (license license:lgpl2.1+)
10578 (properties `((python2-variant . ,(delay python2-amqp))))))
10579
10580 (define-public python2-amqp
10581 (let ((amqp (package-with-python2
10582 (strip-python2-variant python-amqp))))
10583 (package
10584 (inherit amqp)
10585 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10586 ;; unmaintained. Weirdly, does not do this on the python 3
10587 ;; version?
10588 #:tests? #f
10589 ,@(package-arguments amqp))))))
10590
10591 (define-public python-kombu
10592 (package
10593 (name "python-kombu")
10594 (version "3.0.37")
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "kombu" version))
10599 (sha256
10600 (base32
10601 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10602 (build-system python-build-system)
10603 (native-inputs
10604 `(("python-mock" ,python-mock)
10605 ("python-nose" ,python-nose)))
10606 (propagated-inputs
10607 `(("python-anyjson" ,python-anyjson)
10608 ("python-amqp" ,python-amqp)
10609 ("python-redis" ,python-redis)))
10610 (home-page "http://kombu.readthedocs.org")
10611 (synopsis "Message passing library for Python")
10612 (description "The aim of Kombu is to make messaging in Python as easy as
10613 possible by providing an idiomatic high-level interface for the AMQ protocol,
10614 and also provide proven and tested solutions to common messaging problems.
10615 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10616 message orientation, queuing, routing, reliability and security, for which the
10617 RabbitMQ messaging server is the most popular implementation.")
10618 (license license:bsd-3)
10619 (properties `((python2-variant . ,(delay python2-kombu))))))
10620
10621 (define-public python2-kombu
10622 (let ((kombu (package-with-python2
10623 (strip-python2-variant python-kombu))))
10624 (package
10625 (inherit kombu)
10626 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10627 ;; It works fine on the python3 variant.
10628 #:tests? #f
10629 ,@(package-arguments kombu)))
10630 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10631 ,@(package-native-inputs kombu))))))
10632
10633 (define-public python-billiard
10634 (package
10635 (name "python-billiard")
10636 (version "3.3.0.23")
10637 (source
10638 (origin
10639 (method url-fetch)
10640 (uri (pypi-uri "billiard" version))
10641 (sha256
10642 (base32
10643 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10644 (build-system python-build-system)
10645 (native-inputs
10646 `(("python-nose" ,python-nose)))
10647 (home-page "https://github.com/celery/billiard")
10648 (synopsis
10649 "Python multiprocessing fork with improvements and bugfixes")
10650 (description
10651 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10652 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10653 pyprocessing package. This standalone variant is intended to be compatible with
10654 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10655 (license license:bsd-3)
10656 (properties `((python2-variant . ,(delay python2-billiard))))))
10657
10658 (define-public python2-billiard
10659 (let ((billiard (package-with-python2
10660 (strip-python2-variant python-billiard))))
10661 (package
10662 (inherit billiard)
10663 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10664 ("python2-mock" ,python2-mock)
10665 ,@(package-native-inputs billiard))))))
10666
10667 (define-public python-celery
10668 (package
10669 (name "python-celery")
10670 (version "3.1.24")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "celery" version))
10675 (sha256
10676 (base32
10677 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10678 (build-system python-build-system)
10679 (arguments
10680 `(#:phases
10681 (modify-phases %standard-phases
10682 ;; These tests break with Python 3.5:
10683 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10684 (replace 'check
10685 (lambda _
10686 (zero?
10687 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10688 (native-inputs
10689 `(("python-nose" ,python-nose)))
10690 (propagated-inputs
10691 `(("python-pytz" ,python-pytz)
10692 ("python-billiard" ,python-billiard)
10693 ("python-kombu" ,python-kombu)))
10694 (home-page "http://celeryproject.org")
10695 (synopsis "Distributed Task Queue")
10696 (description "Celery is an asynchronous task queue/job queue based on
10697 distributed message passing. It is focused on real-time operation, but
10698 supports scheduling as well. The execution units, called tasks, are executed
10699 concurrently on a single or more worker servers using multiprocessing,
10700 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10701 synchronously (wait until ready).")
10702 (license license:bsd-3)
10703 (properties `((python2-variant . ,(delay python2-celery))))))
10704
10705 (define-public python2-celery
10706 (let ((celery (package-with-python2
10707 (strip-python2-variant python-celery))))
10708 (package
10709 (inherit celery)
10710 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10711 ("python2-mock" ,python2-mock)
10712 ,@(package-native-inputs celery))))))
10713
10714 (define-public python-translitcodec
10715 (package
10716 (name "python-translitcodec")
10717 (version "0.4.0")
10718 (source
10719 (origin
10720 (method url-fetch)
10721 (uri (pypi-uri "translitcodec" version))
10722 (sha256
10723 (base32
10724 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10725 (build-system python-build-system)
10726 (arguments
10727 `(#:tests? #f)) ; no tests provided
10728 (home-page
10729 "https://github.com/claudep/translitcodec")
10730 (synopsis
10731 "Unicode to 8-bit charset transliteration codec")
10732 (description
10733 "This package contains codecs for transliterating ISO 10646 texts into
10734 best-effort representations using smaller coded character sets (ASCII,
10735 ISO 8859, etc.).")
10736 (license license:expat)))
10737
10738 (define-public python2-translitcodec
10739 (package-with-python2 python-translitcodec))
10740
10741 (define-public python-editor
10742 (package
10743 (name "python-editor")
10744 (version "0.5")
10745 (source
10746 (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "python-editor" version))
10749 (sha256
10750 (base32
10751 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10752 (build-system python-build-system)
10753 (home-page
10754 "https://github.com/fmoo/python-editor")
10755 (synopsis
10756 "Programmatically open an editor, capture the result")
10757 (description
10758 "python-editor is a library that provides the editor module for
10759 programmatically interfacing with your system's $EDITOR.")
10760 (license license:asl2.0)))
10761
10762 (define-public python2-editor
10763 (package-with-python2 python-editor))
10764
10765 (define-public python-sphinxcontrib-programoutput
10766 (package
10767 (name "python-sphinxcontrib-programoutput")
10768 (version "0.10")
10769 (source (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10772 (sha256
10773 (base32
10774 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10775 (build-system python-build-system)
10776 (arguments
10777 ;; FIXME: Many tests are failing and the upstream is gone.
10778 '(#:tests? #f))
10779 (propagated-inputs
10780 `(("python-sphinx" ,python-sphinx)))
10781 (synopsis "Sphinx extension to include program output")
10782 (description "A Sphinx extension to literally insert the output of arbitrary
10783 commands into documents, helping you to keep your command examples up to date.")
10784 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10785 (license license:bsd-2)))
10786
10787 (define-public python2-sphinxcontrib-programoutput
10788 (package-with-python2 python-sphinxcontrib-programoutput))
10789
10790 (define-public python-sphinx-repoze-autointerface
10791 (package
10792 (name "python-sphinx-repoze-autointerface")
10793 (version "0.8")
10794 (source (origin
10795 (method url-fetch)
10796 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10797 (sha256
10798 (base32
10799 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10800 (build-system python-build-system)
10801 (arguments '(#:tests? #f)) ; No tests.
10802 (propagated-inputs
10803 `(("python-sphinx" ,python-sphinx)
10804 ("python-zope-interface" ,python-zope-interface)))
10805 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10806 (description "This package defines an extension for the Sphinx documentation
10807 system. The extension allows generation of API documentation by
10808 introspection of @code{zope.interface} instances in code.")
10809 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10810 (license license:repoze)))
10811
10812 (define-public python2-sphinx-repoze-autointerface
10813 (package-with-python2 python-sphinx-repoze-autointerface))
10814
10815 (define-public python-psycopg2
10816 (package
10817 (name "python-psycopg2")
10818 (version "2.6.2")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "psycopg2" version))
10823 (sha256
10824 (base32
10825 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10826 (build-system python-build-system)
10827 (arguments
10828 ;; Tests would require a postgresql database "psycopg2_test"
10829 ;; and a running postgresql database management service.
10830 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10831 (inputs
10832 `(("postgresql" ,postgresql))) ; libpq
10833 (home-page "http://initd.org/psycopg/")
10834 (synopsis "Python PostgreSQL adapter")
10835 (description
10836 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10837 (license license:lgpl3+)))
10838
10839 (define-public python2-psycopg2
10840 (package-with-python2 python-psycopg2))
10841
10842 (define-public python-vobject
10843 (package
10844 (name "python-vobject")
10845 (version "0.9.5")
10846 (source (origin
10847 (method url-fetch)
10848 (uri (pypi-uri "vobject" version))
10849 (sha256
10850 (base32
10851 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10852 (build-system python-build-system)
10853 (arguments
10854 '(;; The test suite relies on some non-portable Windows interfaces.
10855 #:tests? #f))
10856 (propagated-inputs
10857 `(("python-dateutil" ,python-dateutil)
10858 ("python-pyicu" ,python-pyicu)))
10859 (synopsis "Parse and generate vCard and vCalendar files")
10860 (description "Vobject is intended to be a full featured Python package for
10861 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10862 are supported and well tested. vCard 3.0 files are supported, and all data
10863 should be imported, but only a few components are understood in a sophisticated
10864 way.")
10865 (home-page "http://eventable.github.io/vobject/")
10866 (license license:asl2.0)))
10867
10868 (define-public python2-vobject
10869 (package-with-python2 python-vobject))
10870
10871 (define-public python-munkres
10872 (package
10873 (name "python-munkres")
10874 (version "1.0.8")
10875 (source (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "munkres" version))
10878 (sha256
10879 (base32
10880 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10881 (build-system python-build-system)
10882 (arguments
10883 '(#:tests? #f)) ; no test suite
10884 (home-page "http://software.clapper.org/munkres/")
10885 (synopsis "Implementation of the Munkres algorithm")
10886 (description "The Munkres module provides an implementation of the Munkres
10887 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10888 useful for solving the Assignment Problem.")
10889 (license license:bsd-3)))
10890
10891 (define-public python2-munkres
10892 (package-with-python2 python-munkres))
10893
10894 (define-public python-flask
10895 (package
10896 (name "python-flask")
10897 (version "0.11.1")
10898 (source (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "Flask" version))
10901 (sha256
10902 (base32
10903 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10904 (build-system python-build-system)
10905 (propagated-inputs
10906 `(("python-itsdangerous" ,python-itsdangerous)
10907 ("python-jinja2" ,python-jinja2)
10908 ("python-click" ,python-click)
10909 ("python-werkzeug" ,python-werkzeug)))
10910 (home-page "https://github.com/mitsuhiko/flask/")
10911 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10912 (description "Flask is a micro web framework based on the Werkzeug toolkit
10913 and Jinja2 template engine. It is called a micro framework because it does not
10914 presume or force a developer to use a particular tool or library.")
10915 (license license:bsd-3)))
10916
10917 (define-public python2-flask
10918 (package-with-python2 python-flask))
10919
10920 (define-public python-flask-wtf
10921 (package
10922 (name "python-flask-wtf")
10923 (version "0.13.1")
10924 (source
10925 (origin
10926 (method url-fetch)
10927 (uri (pypi-uri "Flask-WTF" version))
10928 (sha256
10929 (base32
10930 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10931 (build-system python-build-system)
10932 (arguments
10933 '(#:phases
10934 (modify-phases %standard-phases
10935 (add-before 'check 'drop-failing-test
10936 (lambda _
10937 ;; FIXME: This file tries resolving an external server, which
10938 ;; fails. Try to patch out the offending section instead of
10939 ;; deleting the whole thing.
10940 (delete-file "tests/test_recaptcha.py")
10941 #t)))))
10942 (propagated-inputs
10943 `(("python-flask-babel" ,python-flask-babel)
10944 ("python-babel" ,python-babel)
10945 ("python-wtforms" ,python-wtforms)))
10946 (native-inputs
10947 `(("python-nose" ,python-nose)))
10948 (home-page "https://github.com/lepture/flask-wtf")
10949 (synopsis "Simple integration of Flask and WTForms")
10950 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10951 upload, and reCAPTCHA.")
10952 (license license:bsd-3)))
10953
10954 (define-public python2-flask-wtf
10955 (package-with-python2 python-flask-wtf))
10956
10957 (define-public python-flask-multistatic
10958 (package
10959 (name "python-flask-multistatic")
10960 (version "1.0")
10961 (source
10962 (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "flask-multistatic" version))
10965 (sha256
10966 (base32
10967 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10968 (build-system python-build-system)
10969 (propagated-inputs
10970 `(("python-flask" ,python-flask)))
10971 (home-page "https://pagure.io/flask-multistatic")
10972 (synopsis "Flask plugin to allow overriding static files")
10973 (description "@code{flask-multistatic} is a flask plugin that adds support
10974 for overriding static files.")
10975 (license license:gpl3+)))
10976
10977 (define-public python2-flask-multistatic
10978 (package-with-python2 python-flask-multistatic))
10979
10980 (define-public python-cookies
10981 (package
10982 (name "python-cookies")
10983 (version "2.2.1")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "cookies" version))
10987 (sha256
10988 (base32
10989 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10990 (build-system python-build-system)
10991 (arguments
10992 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10993 #:tests? #f))
10994 (native-inputs
10995 `(("python-pytest" ,python2-pytest)))
10996 (synopsis "HTTP cookie parser and renderer")
10997 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10998 Python.")
10999 (home-page "https://gitlab.com/sashahart/cookies")
11000 (license license:expat)))
11001
11002 (define-public python2-cookies
11003 (package-with-python2 python-cookies))
11004
11005 (define-public python-responses
11006 (package
11007 (name "python-responses")
11008 (version "0.5.1")
11009 (source (origin
11010 (method url-fetch)
11011 (uri (pypi-uri "responses" version))
11012 (sha256
11013 (base32
11014 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
11015 (build-system python-build-system)
11016 (arguments
11017 `(;; Test suite is not distributed:
11018 ;; https://github.com/getsentry/responses/issues/38
11019 #:tests? #f))
11020 (native-inputs
11021 `(("python-mock" ,python-mock)))
11022 (propagated-inputs
11023 `(("python-requests" ,python-requests)
11024 ("python-cookies" ,python-cookies)
11025 ("python-six" ,python-six)))
11026 (home-page "https://github.com/getsentry/responses")
11027 (synopsis "Utility for mocking out the `requests` Python library")
11028 (description "A utility library for mocking out the `requests` Python
11029 library.")
11030 (license license:asl2.0)))
11031
11032 (define-public python2-responses
11033 (package-with-python2 python-responses))
11034
11035 (define-public python-whoosh
11036 (package
11037 (name "python-whoosh")
11038 (version "2.7.4")
11039 (source
11040 (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "Whoosh" version))
11043 (sha256
11044 (base32
11045 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11046 (build-system python-build-system)
11047 (native-inputs
11048 `(("python-pytest" ,python-pytest)))
11049 (home-page "http://bitbucket.org/mchaput/whoosh")
11050 (synopsis "Full text indexing, search, and spell checking library")
11051 (description
11052 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11053 checking library.")
11054 (license license:bsd-2)))
11055
11056 (define-public python2-whoosh
11057 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11058 (package (inherit whoosh)
11059 (propagated-inputs
11060 `(("python2-backport-ssl-match-hostname"
11061 ,python2-backport-ssl-match-hostname)
11062 ,@(package-propagated-inputs whoosh))))))
11063
11064 (define-public python-pathlib
11065 (package
11066 (name "python-pathlib")
11067 (version "1.0.1")
11068 (source (origin
11069 (method url-fetch)
11070 (uri (pypi-uri "pathlib" version))
11071 (sha256
11072 (base32
11073 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11074 (build-system python-build-system)
11075 ;; The tests depend on the internal "test" module, which does not provide
11076 ;; a stable interface.
11077 (arguments `(#:tests? #f))
11078 (home-page "https://pathlib.readthedocs.org/")
11079 (synopsis "Object-oriented file system paths")
11080 (description "Pathlib offers a set of classes to handle file system paths.
11081 It offers the following advantages over using string objects:
11082
11083 @enumerate
11084 @item No more cumbersome use of os and os.path functions. Everything can
11085 be done easily through operators, attribute accesses, and method calls.
11086 @item Embodies the semantics of different path types. For example,
11087 comparing Windows paths ignores casing.
11088 @item Well-defined semantics, eliminating any inconsistencies or
11089 ambiguities (forward vs. backward slashes, etc.).
11090 @end enumerate
11091
11092 Note: In Python 3.4, pathlib is now part of the standard library. For other
11093 Python versions please consider python-pathlib2 instead, which tracks the
11094 standard library module. This module (python-pathlib) isn't maintained
11095 anymore.")
11096 (license license:expat)))
11097
11098 (define-public python2-pathlib
11099 (package-with-python2 python-pathlib))
11100
11101 (define-public python2-pathlib2
11102 (package
11103 (name "python2-pathlib2")
11104 (version "2.1.0")
11105 (source (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "pathlib2" version))
11108 (sha256
11109 (base32
11110 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
11111 (build-system python-build-system)
11112 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11113 ;; version is 3.4 which already includes this package as part of the
11114 ;; standard library.
11115 (arguments
11116 `(#:python ,python-2))
11117 (native-inputs
11118 `(("python2-six" ,python2-six)))
11119 (home-page "http://pypi.python.org/pypi/pathlib2/")
11120 (synopsis "Object-oriented file system paths - backport of standard
11121 pathlib module")
11122 (description "The goal of pathlib2 is to provide a backport of standard
11123 pathlib module which tracks the standard library module, so all the newest
11124 features of the standard pathlib can be used also on older Python versions.
11125
11126 Pathlib offers a set of classes to handle file system paths. It offers the
11127 following advantages over using string objects:
11128
11129 @enumerate
11130 @item No more cumbersome use of os and os.path functions. Everything can
11131 be done easily through operators, attribute accesses, and method calls.
11132 @item Embodies the semantics of different path types. For example,
11133 comparing Windows paths ignores casing.
11134 @item Well-defined semantics, eliminating any inconsistencies or
11135 ambiguities (forward vs. backward slashes, etc.).
11136 @end enumerate")
11137 (license license:expat)))
11138
11139 (define-public python-jellyfish
11140 (package
11141 (name "python-jellyfish")
11142 (version "0.5.6")
11143 (source (origin
11144 (method url-fetch)
11145 (uri (pypi-uri "jellyfish" version))
11146 (sha256
11147 (base32
11148 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11149 (build-system python-build-system)
11150 (native-inputs
11151 `(("python-pytest" ,python-pytest)))
11152 (home-page "https://github.com/jamesturk/jellyfish")
11153 (synopsis "Approximate and phonetic matching of strings")
11154 (description "Jellyfish uses a variety of string comparison and phonetic
11155 encoding algorithms to do fuzzy string matching.")
11156 (license license:bsd-2)
11157 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11158
11159 (define-public python2-jellyfish
11160 (let ((jellyfish (package-with-python2
11161 (strip-python2-variant python-jellyfish))))
11162 (package (inherit jellyfish)
11163 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11164 ,@(package-native-inputs jellyfish))))))
11165
11166 (define-public python2-unicodecsv
11167 (package
11168 (name "python2-unicodecsv")
11169 (version "0.14.1")
11170 (source (origin
11171 (method url-fetch)
11172 ;; The test suite is not included in the PyPi release.
11173 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11174 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
11175 "archive/" version ".tar.gz"))
11176 (file-name (string-append name "-" version ".tar.gz"))
11177 (sha256
11178 (base32
11179 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
11180 (build-system python-build-system)
11181 (arguments
11182 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11183 #:python ,python-2))
11184 (native-inputs
11185 `(("python2-unittest2" ,python2-unittest2)))
11186 (home-page "https://github.com/jdunck/python-unicodecsv")
11187 (synopsis "Unicode CSV module for Python 2")
11188 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11189 module, adding support for Unicode strings.")
11190 (license license:bsd-2)))
11191
11192 (define-public python-rarfile
11193 (package
11194 (name "python-rarfile")
11195 (version "2.8")
11196 (source (origin
11197 (method url-fetch)
11198 (uri (pypi-uri "rarfile" version))
11199 (sha256
11200 (base32
11201 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11202 (build-system python-build-system)
11203 (arguments
11204 '(#:phases
11205 (modify-phases %standard-phases
11206 (replace 'check
11207 ;; Many tests fail, but the installation proceeds.
11208 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
11209 (native-inputs
11210 `(("which" ,which))) ; required for tests
11211 (propagated-inputs
11212 `(("libarchive" ,libarchive)))
11213 (home-page "https://github.com/markokr/rarfile")
11214 (synopsis "RAR archive reader for Python")
11215 (description "This is Python module for RAR archive reading. The interface
11216 is made as zipfile like as possible.")
11217 (license license:isc)))
11218
11219 (define-public python2-rarfile
11220 (package-with-python2 python-rarfile))
11221
11222 (define-public python-magic
11223 (package
11224 (name "python-magic")
11225 (version "0.4.3")
11226 (source
11227 (origin
11228 (method url-fetch)
11229 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
11230 version ".tar.gz"))
11231 (sha256
11232 (base32
11233 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
11234 (file-name (string-append name "-" version "-checkout"))))
11235 (build-system python-build-system)
11236 (arguments
11237 ;; The tests are unreliable, so don't run them. The tests fail
11238 ;; under Python3 because they were written for Python2 and
11239 ;; contain import statements that do not work in Python3. One of
11240 ;; the tests fails under Python2 because its assertions are
11241 ;; overly stringent; it relies on comparing output strings which
11242 ;; are brittle and can change depending on the version of
11243 ;; libmagic being used and the system on which the test is
11244 ;; running. In my case, under GuixSD 0.10.0, only one test
11245 ;; failed, and it seems to have failed only because the version
11246 ;; of libmagic that is packaged in Guix outputs a slightly
11247 ;; different (but not wrong) string than the one that the test
11248 ;; expected.
11249 '(#:tests? #f
11250 #:phases (modify-phases %standard-phases
11251 ;; Replace a specific method call with a hard-coded
11252 ;; path to the necessary libmagic.so file in the
11253 ;; store. If we don't do this, then the method call
11254 ;; will fail to find the libmagic.so file, which in
11255 ;; turn will cause any application using
11256 ;; python-magic to fail.
11257 (add-before 'build 'hard-code-path-to-libmagic
11258 (lambda* (#:key inputs #:allow-other-keys)
11259 (let ((file (assoc-ref inputs "file")))
11260 (substitute* "magic.py"
11261 (("ctypes.util.find_library\\('magic'\\)")
11262 (string-append "'" file "/lib/libmagic.so'")))
11263 #t)))
11264 (add-before 'install 'disable-egg-compression
11265 (lambda _
11266 (let ((port (open-file "setup.cfg" "a")))
11267 (display "\n[easy_install]\nzip_ok = 0\n"
11268 port)
11269 (close-port port)
11270 #t))))))
11271 (inputs
11272 ;; python-magic needs to be able to find libmagic.so.
11273 `(("file" ,file)))
11274 (home-page "https://github.com/ahupp/python-magic")
11275 (synopsis "File type identification using libmagic")
11276 (description
11277 "This module uses ctypes to access the libmagic file type
11278 identification library. It makes use of the local magic database and
11279 supports both textual and MIME-type output. Note that this module and
11280 the python-file module both provide a \"magic.py\" file; these two
11281 modules, which are different and were developed separately, both serve
11282 the same purpose: to provide Python bindings for libmagic.")
11283 (license license:expat)))
11284
11285 (define-public python2-magic
11286 (package-with-python2 python-magic))
11287
11288 (define-public python2-s3cmd
11289 (package
11290 (name "python2-s3cmd")
11291 (version "1.6.1")
11292 (source
11293 (origin
11294 (method url-fetch)
11295 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11296 "s3cmd-" version ".tar.gz"))
11297 (sha256
11298 (base32
11299 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11300 (build-system python-build-system)
11301 (arguments
11302 ;; s3cmd is written for python2 only and contains no tests.
11303 `(#:python ,python-2
11304 #:tests? #f))
11305 (propagated-inputs
11306 `(("python2-dateutil" ,python2-dateutil)
11307 ;; The python-file package also provides a magic.py module.
11308 ;; This is an unfortunate state of affairs; however, s3cmd
11309 ;; fails to install if it cannot find specifically the
11310 ;; python-magic package. Thus we include it, instead of using
11311 ;; python-file. Ironically, s3cmd sometimes works better
11312 ;; without libmagic bindings at all:
11313 ;; https://github.com/s3tools/s3cmd/issues/198
11314 ("python2-magic" ,python2-magic)))
11315 (home-page "http://s3tools.org/s3cmd")
11316 (synopsis "Command line tool for S3-compatible storage services")
11317 (description
11318 "S3cmd is a command line tool for uploading, retrieving and managing data
11319 in storage services that are compatible with the Amazon Simple Storage
11320 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11321 GnuPG encryption, and more. It also supports management of Amazon's
11322 CloudFront content delivery network.")
11323 (license license:gpl2+)))
11324
11325 (define-public python-pkgconfig
11326 (package
11327 (name "python-pkgconfig")
11328 (version "1.1.0")
11329 (source
11330 (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "pkgconfig" version))
11333 (sha256
11334 (base32
11335 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11336 (build-system python-build-system)
11337 (native-inputs
11338 `(("python-nose" ,python-nose)))
11339 (inputs
11340 `(("pkg-config" ,pkg-config)))
11341 (arguments
11342 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11343 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11344 #:tests? #f
11345 ;; Hard-code the path to pkg-config.
11346 #:phases
11347 (modify-phases %standard-phases
11348 (add-before
11349 'build 'patch
11350 (lambda _
11351 (substitute* "pkgconfig/pkgconfig.py"
11352 (("cmd = 'pkg-config")
11353 (string-append "cmd = '" (which "pkg-config"))))
11354 #t)))))
11355 (home-page "https://github.com/matze/pkgconfig")
11356 (synopsis "Python interface for pkg-config")
11357 (description "This module provides a Python interface to pkg-config. It
11358 can be used to find all pkg-config packages, check if a package exists,
11359 check if a package meets certain version requirements, query CFLAGS and
11360 LDFLAGS and parse the output to build extensions with setup.py.")
11361 (license license:expat)))
11362
11363 (define-public python2-pkgconfig
11364 (package-with-python2 python-pkgconfig))
11365
11366 (define-public python-bz2file
11367 (package
11368 (name "python-bz2file")
11369 (version "0.98")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "bz2file" version))
11374 (sha256
11375 (base32
11376 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:tests? #f)) ; Tests use deprecated python modules.
11380 (home-page "https://github.com/nvawda/bz2file")
11381 (synopsis "Read and write bzip2-compressed files")
11382 (description
11383 "Bz2file is a Python library for reading and writing bzip2-compressed
11384 files. It contains a drop-in replacement for the I/O interface in the
11385 standard library's @code{bz2} module, including features from the latest
11386 development version of CPython that are not available in older releases.")
11387 (license license:asl2.0)
11388 (properties `((python2-variant . ,(delay python2-bz2file))))))
11389
11390 (define-public python2-bz2file
11391 (let ((base (package-with-python2
11392 (strip-python2-variant python-bz2file))))
11393 (package
11394 (inherit base)
11395 (arguments
11396 `(#:python ,python-2
11397 #:phases
11398 (modify-phases %standard-phases
11399 ;; 'python setup.py test' does not work as of 0.98.
11400 ;; There is only the one test file, so we run it directly.
11401 (replace 'check
11402 (lambda _ (zero? (system* "python"
11403 "test_bz2file.py"))))))))))
11404
11405 (define-public python-future
11406 (package
11407 (name "python-future")
11408 (version "0.16.0")
11409 (source
11410 (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "future" version))
11413 (sha256
11414 (base32
11415 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11416 (build-system python-build-system)
11417 ;; Many tests connect to the network or are otherwise flawed.
11418 ;; https://github.com/PythonCharmers/python-future/issues/210
11419 (arguments
11420 `(#:tests? #f))
11421 (home-page "http://python-future.org")
11422 (synopsis "Single-source support for Python 3 and 2")
11423 (description
11424 "@code{python-future} is the missing compatibility layer between Python 2 and
11425 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11426 to support both Python 2 and Python 3 with minimal overhead.")
11427 (license license:expat)))
11428
11429 (define-public python2-future
11430 (package-with-python2 python-future))
11431
11432 (define-public python-cysignals
11433 (package
11434 (name "python-cysignals")
11435 (version "1.1.0")
11436 (source
11437 (origin
11438 (method url-fetch)
11439 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11440 (sha256
11441 (base32
11442 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11443 (build-system python-build-system)
11444 (native-inputs
11445 `(("python-cython" ,python-cython)
11446 ("python-sphinx" ,python-sphinx)))
11447 (inputs
11448 `(("pari-gp" ,pari-gp)))
11449 (arguments
11450 `(#:modules ((guix build python-build-system)
11451 ((guix build gnu-build-system) #:prefix gnu:)
11452 (guix build utils))
11453 ;; FIXME: Tests are executed after installation and currently fail
11454 ;; when not installing into standard locations; the author is working
11455 ;; on a fix.
11456 #:tests? #f
11457 #:phases
11458 (modify-phases %standard-phases
11459 (add-before
11460 'build 'configure
11461 (assoc-ref gnu:%standard-phases 'configure)))))
11462 (home-page
11463 "https://github.com/sagemath/cysignals")
11464 (synopsis
11465 "Handling of interrupts and signals for Cython")
11466 (description
11467 "The cysignals package provides mechanisms to handle interrupts (and
11468 other signals and errors) in Cython code, using two related approaches,
11469 for mixed Cython/Python code or external C libraries and pure Cython code,
11470 respectively.")
11471 (license license:lgpl3+)))
11472
11473 (define-public python2-cysignals
11474 (package-with-python2 python-cysignals))
11475
11476 (define-public python2-shedskin
11477 (package
11478 (name "python2-shedskin")
11479 (version "0.9.4")
11480 (source
11481 (origin
11482 (method url-fetch)
11483 (uri (string-append "https://github.com/shedskin/shedskin/"
11484 "releases/download/v" version
11485 "/shedskin-" version ".tgz"))
11486 (sha256
11487 (base32
11488 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11489 (build-system python-build-system)
11490 (arguments
11491 `(#:python ,python-2
11492 #:phases (modify-phases %standard-phases
11493 (add-after 'unpack 'fix-resulting-include-libs
11494 (lambda* (#:key inputs #:allow-other-keys)
11495 (let ((libgc (assoc-ref inputs "libgc"))
11496 (pcre (assoc-ref inputs "pcre")))
11497 (substitute* "shedskin/makefile.py"
11498 (("variable == 'CCFLAGS':[ ]*")
11499 (string-append "variable == 'CCFLAGS':\n"
11500 " line += ' -I " pcre "/include"
11501 " -I " libgc "/include'"))
11502 (("variable == 'LFLAGS':[ ]*")
11503 (string-append "variable == 'LFLAGS':\n"
11504 " line += ' -L" pcre "/lib"
11505 " -L " libgc "/lib'")))
11506 #t))))))
11507 (inputs `(("pcre" ,pcre)
11508 ("libgc" ,libgc)))
11509 (home-page "https://shedskin.github.io/")
11510 (synopsis "Experimental Python-2 to C++ Compiler")
11511 (description (string-append "This is an experimental compiler for a subset of
11512 Python. It generates C++ code and a Makefile."))
11513 (license (list license:gpl3 license:bsd-3 license:expat))))
11514
11515 (define-public python2-rope
11516 (package
11517 (name "python2-rope")
11518 (version "0.10.3")
11519 (source
11520 (origin
11521 (method url-fetch)
11522 (uri (pypi-uri "rope" version))
11523 (sha256
11524 (base32
11525 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11526 (arguments
11527 ;; Rope is currently python-2 only.
11528 ;; https://github.com/python-rope/rope/issues/57
11529 `(#:python ,python-2))
11530 (build-system python-build-system)
11531 (native-inputs
11532 `(("python2-unittest2" ,python2-unittest2)))
11533 (home-page "https://github.com/python-rope/rope")
11534 (synopsis "Refactoring library for Python")
11535 (description "Rope is a refactoring library for Python. It facilitates
11536 the renaming, moving and extracting of attributes, functions, modules, fields
11537 and parameters in Python 2 source code. These refactorings can also be applied
11538 to occurrences in strings and comments.")
11539 (license license:gpl2)))
11540
11541 (define-public python-py3status
11542 (package
11543 (name "python-py3status")
11544 (version "3.1")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "py3status" version))
11549 (sha256
11550 (base32
11551 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11552 (build-system python-build-system)
11553 (inputs
11554 `(("file" ,file)))
11555 (arguments
11556 '(#:phases
11557 (modify-phases %standard-phases
11558 ;; 'file' is used for detection of configuration file encoding
11559 ;; let's make link the dependency to particular input
11560 (add-before 'build 'patch-file-path
11561 (lambda* (#:key inputs #:allow-other-keys)
11562 (let ((file-path (assoc-ref inputs "file")))
11563 (substitute* "py3status/parse_config.py"
11564 (("check_output\\(\\['file'")
11565 (string-append "check_output(['" file-path "/bin/file'")))
11566 #t))))
11567 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11568 (home-page "https://github.com/ultrabug/py3status")
11569 (synopsis "Extensible i3status wrapper written in Python")
11570 (description "py3status is an i3status wrapper which extends i3status
11571 functionality in a modular way, allowing you to extend your panel with your
11572 own code, responding to click events and updating clock every second.")
11573 (license license:bsd-3)))
11574
11575 (define-public python-tblib
11576 (package
11577 (name "python-tblib")
11578 (version "1.3.0")
11579 (source (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "tblib" version))
11582 (sha256 (base32
11583 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11584 (build-system python-build-system)
11585 (arguments
11586 `(#:phases
11587 (modify-phases %standard-phases
11588 (replace 'check
11589 (lambda _
11590 ;; Upstream runs tests after installation and the package itself
11591 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11592 ;; found.
11593 (setenv "PYTHONPATH"
11594 (string-append (getcwd) "/build/lib:"
11595 (getenv "PYTHONPATH")))
11596 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11597 (native-inputs
11598 `(("python-pytest" ,python-pytest)
11599 ("python-six" ,python-six)))
11600 (home-page "https://github.com/ionelmc/python-tblib")
11601 (synopsis "Traceback serialization library")
11602 (description
11603 "Traceback serialization allows you to:
11604
11605 @enumerate
11606 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11607 different processes. This allows better error handling when running code over
11608 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11609
11610 @item Parse traceback strings and raise with the parsed tracebacks.
11611 @end enumerate\n")
11612 (license license:bsd-3)))
11613
11614 (define-public python2-tblib
11615 (package-with-python2 python-tblib))
11616
11617 (define-public python-sqlparse
11618 (package
11619 (name "python-sqlparse")
11620 (version "0.1.19")
11621 (source (origin
11622 (method url-fetch)
11623 (uri (pypi-uri "sqlparse" version))
11624 (sha256
11625 (base32
11626 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11627 (build-system python-build-system)
11628 (arguments
11629 `(#:phases
11630 (modify-phases %standard-phases
11631 (replace 'check
11632 (lambda* _
11633 ;; setup.py-integrated 2to3 only affects the build files, but
11634 ;; py.test is using the source files. So we need to convert them
11635 ;; manually.
11636 (when (zero? (system* "python3"))
11637 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11638 (zero? (system* "py.test")))))))
11639 (native-inputs
11640 `(("python-pytest" ,python-pytest)))
11641 (home-page "https://github.com/andialbrecht/sqlparse")
11642 (synopsis "Non-validating SQL parser")
11643 (description "Sqlparse is a non-validating SQL parser for Python. It
11644 provides support for parsing, splitting and formatting SQL statements.")
11645 (license license:bsd-3)))
11646
11647 (define-public python2-sqlparse
11648 (package-with-python2 python-sqlparse))
11649
11650 (define-public python-greenlet
11651 (package
11652 (name "python-greenlet")
11653 (version "0.4.11")
11654 (source (origin
11655 (method url-fetch)
11656 (uri (pypi-uri "greenlet" version))
11657 (sha256
11658 (base32
11659 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11660 (build-system python-build-system)
11661 (home-page "https://greenlet.readthedocs.io/")
11662 (synopsis "Lightweight in-process concurrent programming")
11663 (description
11664 "Greenlet package is a spin-off of Stackless, a version of CPython
11665 that supports micro-threads called \"tasklets\". Tasklets run
11666 pseudo-concurrently (typically in a single or a few OS-level threads) and
11667 are synchronized with data exchanges on \"channels\".")
11668 (license (list license:psfl license:expat))))
11669
11670 (define-public python2-greenlet
11671 (package-with-python2 python-greenlet))
11672
11673 (define-public python-gevent
11674 (package
11675 (name "python-gevent")
11676 (version "1.1.1")
11677 (source (origin
11678 (method url-fetch)
11679 (uri (pypi-uri "gevent" version))
11680 (sha256
11681 (base32
11682 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11683 (modules '((guix build utils)))
11684 (snippet
11685 '(begin
11686 ;; unbunding libev and c-ares
11687 (for-each delete-file-recursively '("libev" "c-ares"))
11688 ;; fixing testsuite
11689 (call-with-output-file "greentest/__init__.py" noop)
11690 (substitute* "greentest/testrunner.py"
11691 (("import util") "from . import util")
11692 (("from util import log") "from .util import log"))))))
11693 (build-system python-build-system)
11694 (propagated-inputs
11695 `(("python-greenlet" ,python-greenlet)))
11696 (native-inputs
11697 `(("python-six" ,python-six)))
11698 (inputs
11699 `(("c-ares" ,c-ares)
11700 ("libev" ,libev)))
11701 (home-page "http://www.gevent.org/")
11702 (synopsis "Coroutine-based network library")
11703 (description
11704 "gevent is a coroutine-based Python networking library that uses greenlet
11705 to provide a high-level synchronous API on top of the libev event loop.")
11706 (license license:expat)))
11707
11708 (define-public python2-gevent
11709 (package-with-python2 python-gevent))
11710
11711 (define-public python-geventhttpclient
11712 (package
11713 (name "python-geventhttpclient")
11714 (version "1.3.1")
11715 (source (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "geventhttpclient" version))
11718 (sha256
11719 (base32
11720 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11721 (modules '((guix build utils)))
11722 (snippet
11723 '(begin
11724 ;; Delete pre-compiled files.
11725 (for-each delete-file (find-files "src/geventhttpclient"
11726 ".*\\.pyc"))
11727 #t))))
11728 (build-system python-build-system)
11729 (arguments
11730 '(#:phases
11731 (modify-phases %standard-phases
11732 (add-after 'unpack 'delete-network-tests
11733 (lambda _
11734 (delete-file "src/geventhttpclient/tests/test_client.py")
11735 #t))
11736 (delete 'check)
11737 (add-after 'install 'check
11738 (lambda* (#:key inputs outputs #:allow-other-keys)
11739 (add-installed-pythonpath inputs outputs)
11740 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11741 (native-inputs
11742 `(("python-pytest" ,python-pytest)))
11743 (propagated-inputs
11744 `(("python-certifi" ,python-certifi)
11745 ("python-gevent" ,python-gevent)
11746 ("python-six" ,python-six)))
11747 (home-page "https://github.com/gwik/geventhttpclient")
11748 (synopsis "HTTP client library for gevent")
11749 (description "@code{python-geventhttpclient} is a high performance,
11750 concurrent HTTP client library for python using @code{gevent}.")
11751 (license license:expat)))
11752
11753 (define-public python2-geventhttpclient
11754 (package-with-python2 python-geventhttpclient))
11755
11756 (define-public python-fastimport
11757 (package
11758 (name "python-fastimport")
11759 (version "0.9.6")
11760 (source
11761 (origin
11762 (method url-fetch)
11763 (uri (pypi-uri "fastimport" version))
11764 (sha256
11765 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11766 (build-system python-build-system)
11767 (home-page "https://github.com/jelmer/python-fastimport")
11768 (synopsis "VCS fastimport parser and generator in Python")
11769 (description "This package provides a parser for and generator of the Git
11770 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11771 format.")
11772 (license license:gpl2+)))
11773
11774 (define-public python2-fastimport
11775 (package-with-python2 python-fastimport))
11776
11777 (define-public python-twisted
11778 (package
11779 (name "python-twisted")
11780 (version "17.1.0")
11781 (source (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11784 (sha256
11785 (base32
11786 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
11787 (build-system python-build-system)
11788 (arguments
11789 '(#:tests? #f)) ; FIXME: Some tests are failing.
11790 ;; #:phases
11791 ;; (modify-phases %standard-phases
11792 ;; (replace 'check
11793 ;; (lambda _
11794 ;; (zero? (system* "./bin/trial" "twisted")))))
11795 (propagated-inputs
11796 `(("python-zope-interface" ,python-zope-interface)
11797 ("python-incremental" ,python-incremental)
11798 ("python-constantly" ,python-constantly)
11799 ("python-automat" ,python-automat)))
11800 (home-page "https://twistedmatrix.com/")
11801 (synopsis "Asynchronous networking framework written in Python")
11802 (description
11803 "Twisted is an extensible framework for Python programming, with special
11804 focus on event-based network programming and multiprotocol integration.")
11805 (license license:expat)))
11806
11807 (define-public python2-twisted
11808 (package-with-python2 python-twisted))
11809
11810 (define-public python-pika
11811 (package
11812 (name "python-pika")
11813 (version "0.10.0")
11814 (source
11815 (origin
11816 (method url-fetch)
11817 (uri (pypi-uri "pika" version))
11818 (sha256
11819 (base32
11820 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11821 (build-system python-build-system)
11822 (native-inputs
11823 `(("python-pyev" ,python-pyev)
11824 ("python-tornado" ,python-tornado)
11825 ("python-twisted" ,python-twisted)))
11826 (home-page "https://pika.readthedocs.org")
11827 (synopsis "Pure Python AMQP Client Library")
11828 (description
11829 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11830 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11831 network support library.")
11832 (license license:bsd-3)))
11833
11834 (define-public python2-pika
11835 (package-with-python2 python-pika))
11836
11837 (define-public python-ply
11838 (package
11839 (name "python-ply")
11840 (version "3.9")
11841 (source
11842 (origin
11843 (method url-fetch)
11844 (uri (pypi-uri "ply" version))
11845 (sha256
11846 (base32
11847 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11848 (build-system python-build-system)
11849 (home-page "http://www.dabeaz.com/ply/")
11850 (synopsis "Python Lex & Yacc")
11851 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11852 It uses LR parsing and does extensive error checking.")
11853 (license license:bsd-3)))
11854
11855 (define-public python2-ply
11856 (package-with-python2 python-ply))
11857
11858 (define-public python-tabulate
11859 (package
11860 (name "python-tabulate")
11861 (version "0.7.7")
11862 (source (origin
11863 (method url-fetch)
11864 (uri (pypi-uri "tabulate" version))
11865 (sha256
11866 (base32
11867 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11868 (build-system python-build-system)
11869 (arguments
11870 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11871 ;; and the latest release is not tagged in the upstream repository.
11872 '(#:tests? #f))
11873 (home-page "https://bitbucket.org/astanin/python-tabulate")
11874 (synopsis "Pretty-print tabular data")
11875 (description
11876 "Tabulate is a library and command-line utility to pretty-print tabular
11877 data in Python.")
11878 (license license:expat)))
11879
11880 (define-public python2-tabulate
11881 (package-with-python2 python-tabulate))
11882
11883 (define-public python-kazoo
11884 (package
11885 (name "python-kazoo")
11886 (version "2.2.1")
11887 (source
11888 (origin
11889 (method url-fetch)
11890 (uri (pypi-uri "kazoo" version))
11891 (sha256
11892 (base32
11893 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11894 (build-system python-build-system)
11895 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11896 (propagated-inputs
11897 `(("python-six" ,python-six)))
11898 (home-page "https://kazoo.readthedocs.org")
11899 (synopsis "High-level Zookeeper client library")
11900 (description
11901 "Kazoo is a Python client library for the Apache Zookeeper distributed
11902 application service. It is designed to be easy to use and to avoid common
11903 programming errors.")
11904 (license license:asl2.0)))
11905
11906 (define-public python2-kazoo
11907 (package-with-python2 python-kazoo))
11908
11909 (define-public python-pykafka
11910 (package
11911 (name "python-pykafka")
11912 (version "2.4.0")
11913 (source (origin
11914 (method url-fetch)
11915 (uri (string-append
11916 "https://pypi.python.org/packages/8b/3e/"
11917 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11918 "pykafka-" version ".tar.gz"))
11919 (sha256
11920 (base32
11921 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11922 (build-system python-build-system)
11923 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11924 (propagated-inputs
11925 `(("python-gevent" ,python-gevent)
11926 ("python-kazoo" ,python-kazoo)
11927 ("python-tabulate" ,python-tabulate)))
11928 (inputs
11929 `(("librdkafka" ,librdkafka)))
11930 (home-page "https://pykafka.readthedocs.io/")
11931 (synopsis "Apache Kafka client for Python")
11932 (description
11933 "PyKafka is a client for the Apache Kafka distributed messaging system.
11934 It includes Python implementations of Kafka producers and consumers, which
11935 are optionally backed by a C extension built on librdkafka.")
11936 (license license:asl2.0)))
11937
11938 (define-public python2-pykafka
11939 (package-with-python2 python-pykafka))
11940
11941 (define-public python-wcwidth
11942 (package
11943 (name "python-wcwidth")
11944 (version "0.1.7")
11945 (source
11946 (origin
11947 (method url-fetch)
11948 (uri (pypi-uri "wcwidth" version))
11949 (sha256
11950 (base32
11951 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11952 (build-system python-build-system)
11953 (home-page "https://github.com/jquast/wcwidth")
11954 (synopsis "Measure number of terminal column cells of wide-character codes")
11955 (description "Wcwidth measures the number of terminal column cells of
11956 wide-character codes. It is useful for those implementing a terminal emulator,
11957 or programs that carefully produce output to be interpreted by one. It is a
11958 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11959 specified in POSIX.1-2001 and POSIX.1-2008.")
11960 (license license:expat)))
11961
11962 (define-public python2-wcwidth
11963 (package-with-python2 python-wcwidth))
11964
11965 (define-public python2-jsonrpclib
11966 (package
11967 (name "python2-jsonrpclib")
11968 (version "0.1.7")
11969 (source (origin
11970 (method url-fetch)
11971 (uri (string-append
11972 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11973 "jsonrpclib-" version ".tar.gz"))
11974 (sha256
11975 (base32
11976 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11977 (build-system python-build-system)
11978 (arguments
11979 `(#:tests? #f
11980 #:python ,python-2))
11981 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11982 (synopsis "Implementation of JSON-RPC specification for Python")
11983 (description
11984 "This library is an implementation of the JSON-RPC specification.
11985 It supports both the original 1.0 specification, as well as the
11986 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11987 etc.")
11988 (license license:asl2.0)))
11989
11990 (define-public python-chai
11991 (package
11992 (name "python-chai")
11993 (version "1.1.1")
11994 (source (origin
11995 (method url-fetch)
11996 (uri (pypi-uri "chai" version))
11997 (sha256
11998 (base32
11999 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
12000 (build-system python-build-system)
12001 (home-page "https://github.com/agoragames/chai")
12002 (synopsis "Mocking framework for Python")
12003 (description
12004 "Chai provides an api for mocking, stubbing and spying your python
12005 objects, patterned after the Mocha library for Ruby.")
12006 (license license:bsd-3)))
12007
12008 (define-public python2-chai
12009 (package-with-python2 python-chai))
12010
12011 (define-public python-arrow
12012 (package
12013 (name "python-arrow")
12014 (version "0.10.0")
12015 (source (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "arrow" version))
12018 (sha256
12019 (base32
12020 "08n7q2l69hlainds1byd4lxhwrq7zsw7s640zkqc3bs5jkq0cnc0"))))
12021 (build-system python-build-system)
12022 (native-inputs
12023 `(;; For testing
12024 ("python-chai" ,python-chai)
12025 ("python-simplejson" ,python-simplejson)))
12026 (propagated-inputs
12027 `(("python-dateutil" ,python-dateutil)))
12028 (home-page "https://github.com/crsmithdev/arrow/")
12029 (synopsis "Dates and times for Python")
12030 (description
12031 "Arrow is a Python library to creating, manipulating, formatting and
12032 converting dates, times, and timestamps. It implements and updates the
12033 datetime type.")
12034 (license license:asl2.0)))
12035
12036 (define-public python2-arrow
12037 (package-with-python2 python-arrow))
12038
12039 (define-public python-inflection
12040 (package
12041 (name "python-inflection")
12042 (version "0.3.1")
12043 (source
12044 (origin (method url-fetch)
12045 (uri (pypi-uri "inflection" version))
12046 (sha256
12047 (base32
12048 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12049 (build-system python-build-system)
12050 (native-inputs
12051 `(("python-pytest" ,python-pytest)))
12052 (home-page "https://github.com/jpvanhal/inflection")
12053 (synopsis "Python string transformation library")
12054 (description
12055 "Inflection is a string transformation library. It singularizes
12056 and pluralizes English words, and transforms strings from CamelCase to
12057 underscored string.")
12058 (license license:expat)))
12059
12060 (define-public python2-inflection
12061 (package-with-python2 python-inflection))
12062
12063 (define-public python-pylev
12064 (package
12065 (name "python-pylev")
12066 (version "1.3.0")
12067 (source (origin
12068 (method url-fetch)
12069 (uri (pypi-uri "pylev" version))
12070 (sha256
12071 (base32
12072 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12073 (build-system python-build-system)
12074 (home-page "https://github.com/toastdriven/pylev")
12075 (synopsis "Levenshtein distance implementation in Python")
12076 (description "Pure Python Levenshtein implementation, based off the
12077 Wikipedia code samples at
12078 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12079 (license license:bsd-3)))
12080
12081 (define-public python2-pylev
12082 (package-with-python2 python-pylev))
12083
12084 (define-public python-cleo
12085 (package
12086 (name "python-cleo")
12087 (version "0.6.1")
12088 (source (origin
12089 (method url-fetch)
12090 (uri (pypi-uri "cleo" version))
12091 (sha256
12092 (base32
12093 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
12094 (build-system python-build-system)
12095 (native-inputs
12096 `(;; For testing
12097 ("python-mock" ,python-mock)
12098 ("python-pytest-mock" ,python-pytest-mock)
12099 ("python-pytest" ,python-pytest)))
12100 (propagated-inputs
12101 `(("python-backpack" ,python-backpack)
12102 ("python-pastel" ,python-pastel)
12103 ("python-pylev" ,python-pylev)))
12104 (home-page "https://github.com/sdispater/cleo")
12105 (synopsis "Command-line arguments library for Python")
12106 (description
12107 "Cleo allows you to create command-line commands with signature in
12108 docstring and colored output.")
12109 (license license:expat)))
12110
12111 (define-public python2-cleo
12112 (package-with-python2 python-cleo))
12113
12114 (define-public python-lazy-object-proxy
12115 (package
12116 (name "python-lazy-object-proxy")
12117 (version "1.2.2")
12118 (source (origin
12119 (method url-fetch)
12120 (uri (pypi-uri "lazy-object-proxy" version))
12121 (sha256
12122 (base32
12123 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
12124 (build-system python-build-system)
12125 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12126 (synopsis "Lazy object proxy for python")
12127 (description
12128 "Lazy object proxy is an object that wraps a callable but defers the call
12129 until the object is actually required, and caches the result of said call.")
12130 (license license:bsd-2)))
12131
12132 (define-public python2-lazy-object-proxy
12133 (package-with-python2 python-lazy-object-proxy))
12134
12135 (define-public python-dnspython
12136 (package
12137 (name "python-dnspython")
12138 (version "1.15.0")
12139 (source (origin
12140 (method url-fetch)
12141 (uri (string-append "http://www.dnspython.org/kits/"
12142 version "/dnspython-" version ".tar.gz"))
12143 (sha256
12144 (base32
12145 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
12146 (build-system python-build-system)
12147 (arguments '(#:tests? #f)) ; XXX: requires internet access
12148 (home-page "http://www.dnspython.org")
12149 (synopsis "DNS toolkit for Python")
12150 (description
12151 "dnspython is a DNS toolkit for Python. It supports almost all record
12152 types. It can be used for queries, zone transfers, and dynamic updates.
12153 It supports TSIG authenticated messages and EDNS0.")
12154 (license license:expat)))
12155
12156 (define-public python2-dnspython
12157 (package-with-python2 python-dnspython))
12158
12159 (define-public python-email-validator
12160 (package
12161 (name "python-email-validator")
12162 (version "1.0.2")
12163 (source
12164 (origin (method url-fetch)
12165 (uri (pypi-uri "email_validator" version))
12166 (sha256
12167 (base32
12168 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
12169 (build-system python-build-system)
12170 (arguments
12171 '(#:phases
12172 (modify-phases %standard-phases
12173 (add-before 'build 'use-dnspython
12174 (lambda _
12175 (substitute* "setup.py"
12176 (("dnspython3") "dnspython"))
12177 #t)))))
12178 (propagated-inputs
12179 `(("python-dnspython" ,python-dnspython)
12180 ("python-idna" ,python-idna)))
12181 (home-page "https://github.com/JoshData/python-email-validator")
12182 (synopsis "Email address validation library for Python")
12183 (description
12184 "This library validates email address syntax and deliverability.")
12185 (license license:cc0)))
12186
12187 (define-public python2-email-validator
12188 (package-with-python2 python-email-validator))
12189
12190 (define-public python-ukpostcodeparser
12191 (package
12192 (name "python-ukpostcodeparser")
12193 (version "1.0.3")
12194 (source (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "UkPostcodeParser" version))
12197 (sha256
12198 (base32
12199 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12200 (build-system python-build-system)
12201 (home-page "https://github.com/hamstah/ukpostcodeparser")
12202 (synopsis "UK Postcode parser for Python")
12203 (description
12204 "This library provides the @code{parse_uk_postcode} function for
12205 parsing UK postcodes.")
12206 (license license:expat)))
12207
12208 (define-public python2-ukpostcodeparser
12209 (package-with-python2 python-ukpostcodeparser))
12210
12211 (define-public python-faker
12212 (package
12213 (name "python-faker")
12214 (version "0.7.9")
12215 (source (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "Faker" version))
12218 (sha256
12219 (base32
12220 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
12221 (patches
12222 (search-patches "python-faker-fix-build-32bit.patch"))
12223 (modules '((guix build utils)))
12224 (snippet
12225 '(begin
12226 (for-each delete-file (find-files "." "\\.pyc$"))
12227 #t))))
12228 (build-system python-build-system)
12229 (arguments
12230 '(#:phases
12231 (modify-phases %standard-phases
12232 (replace 'check
12233 (lambda _
12234 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
12235 (native-inputs
12236 `(;; For testing
12237 ("python-email-validator" ,python-email-validator)
12238 ("python-mock" ,python-mock)
12239 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
12240 (propagated-inputs
12241 `(("python-dateutil" ,python-dateutil)
12242 ("python-six" ,python-six)))
12243 (home-page "https://github.com/joke2k/faker")
12244 (synopsis "Python package that generates fake data")
12245 (description
12246 "Faker is a Python package that generates fake data such as names,
12247 addresses, and phone numbers.")
12248 (license license:expat)
12249 (properties `((python2-variant . ,(delay python2-faker))))))
12250
12251 (define-public python2-faker
12252 (let ((base (package-with-python2 (strip-python2-variant
12253 python-faker))))
12254 (package
12255 (inherit base)
12256 (propagated-inputs
12257 `(("python2-ipaddress" ,python2-ipaddress)
12258 ,@(package-propagated-inputs base))))))
12259
12260 (define-public python-pyaml
12261 (package
12262 (name "python-pyaml")
12263 (version "17.7.2")
12264 (source (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "pyaml" version))
12267 (sha256
12268 (base32
12269 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
12270 (build-system python-build-system)
12271 (native-inputs
12272 `(("python-unidecode" ,python-unidecode)))
12273 (propagated-inputs
12274 `(("python-pyyaml" ,python-pyyaml)))
12275 (home-page "https://github.com/mk-fg/pretty-yaml")
12276 (synopsis "YAML pretty-print library for Python")
12277 (description
12278 "pyaml is a PyYAML based python module to produce pretty and readable
12279 YAML-serialized data.")
12280 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
12281
12282 (define-public python2-pyaml
12283 (package-with-python2 python-pyaml))
12284
12285 (define-public python-backpack
12286 (package
12287 (name "python-backpack")
12288 (version "0.1")
12289 (source
12290 (origin
12291 (method url-fetch)
12292 (uri (pypi-uri "backpack" version))
12293 (sha256
12294 (base32
12295 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12296 (build-system python-build-system)
12297 (native-inputs
12298 `(("python-pytest" ,python-pytest)
12299 ("python-nose" ,python-nose)))
12300 (propagated-inputs
12301 `(("python-simplejson" ,python-simplejson)))
12302 (home-page "https://github.com/sdispater/backpack")
12303 (synopsis "Utilities for working with Python collections")
12304 (description "Backpack provides some useful utilities for working with
12305 collections of data.")
12306 (license license:expat)))
12307
12308 (define-public python2-backpack
12309 (package-with-python2 python-backpack))
12310
12311 (define-public python-flexmock
12312 (package
12313 (name "python-flexmock")
12314 (version "0.10.2")
12315 (source (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "flexmock" version))
12318 (sha256
12319 (base32
12320 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
12321 (build-system python-build-system)
12322 (home-page "https://flexmock.readthedocs.org")
12323 (synopsis "Testing library for Python")
12324 (description
12325 "flexmock is a testing library for Python that makes it easy to create
12326 mocks, stubs and fakes.")
12327 (license license:bsd-3)))
12328
12329 (define-public python2-flexmock
12330 (package-with-python2 python-flexmock))
12331
12332 (define-public python-prompt-toolkit
12333 (package
12334 (name "python-prompt-toolkit")
12335 (version "1.0.9")
12336 (source
12337 (origin
12338 (method url-fetch)
12339 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12340 (sha256
12341 (base32
12342 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12343 (build-system python-build-system)
12344 (arguments
12345 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12346 (propagated-inputs
12347 `(("python-wcwidth" ,python-wcwidth)
12348 ("python-six" ,python-six)
12349 ("python-pygments" ,python-pygments)))
12350 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12351 (synopsis "Library for building command line interfaces in Python")
12352 (description
12353 "Prompt-Toolkit is a library for building interactive command line
12354 interfaces in Python. It's like GNU Readline but it also features syntax
12355 highlighting while typing, out-of-the-box multi-line input editing, advanced
12356 code completion, incremental search, support for Chinese double-width
12357 characters, mouse support, and auto suggestions.")
12358 (license license:bsd-3)))
12359
12360 (define-public python2-prompt-toolkit
12361 (package-with-python2 python-prompt-toolkit))
12362
12363 (define-public python-jedi
12364 (package
12365 (name "python-jedi")
12366 (version "0.9.0")
12367 (source
12368 (origin
12369 (method url-fetch)
12370 (uri (pypi-uri "jedi" version))
12371 (sha256
12372 (base32
12373 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12374 (build-system python-build-system)
12375 (arguments
12376 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12377 '(#:tests? #f))
12378 (native-inputs
12379 `(("python-pytest" ,python-pytest)))
12380 (home-page "https://github.com/davidhalter/jedi")
12381 (synopsis
12382 "Autocompletion for Python that can be used for text editors")
12383 (description
12384 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12385 (license license:expat)))
12386
12387 (define-public python2-jedi
12388 (package-with-python2 python-jedi))
12389
12390 (define-public ptpython
12391 (package
12392 (name "ptpython")
12393 (version "0.34")
12394 (source (origin
12395 (method url-fetch)
12396 (uri (pypi-uri "ptpython" version))
12397 (sha256
12398 (base32
12399 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12400 (build-system python-build-system)
12401 (arguments
12402 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12403 (propagated-inputs
12404 `(("python-docopt" ,python-docopt)
12405 ("python-jedi" ,python-jedi)
12406 ("python-prompt-toolkit" ,python-prompt-toolkit)
12407 ("python-pygments" ,python-pygments)))
12408 (home-page "https://github.com/jonathanslenders/ptpython")
12409 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12410 (description
12411 "ptpython is a Python read-eval-print loop with IDE-like features.
12412 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12413 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12414 etc.")
12415 (license license:bsd-3)
12416 (properties `((python2-variant . ,(delay ptpython-2))))))
12417
12418 (define-public ptpython-2
12419 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12420 (package
12421 (inherit base)
12422 (name "ptpython2"))))
12423
12424 (define-public python-requests-oauthlib
12425 (package
12426 (name "python-requests-oauthlib")
12427 (version "0.6.2")
12428 (source
12429 (origin
12430 (method url-fetch)
12431 (uri (pypi-uri "requests-oauthlib" version))
12432 (sha256
12433 (base32
12434 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12435 (build-system python-build-system)
12436 (arguments
12437 `(#:phases
12438 (modify-phases %standard-phases
12439 ;; removes tests that require network access
12440 (add-before 'check 'pre-check
12441 (lambda _
12442 (delete-file "tests/test_core.py")
12443 #t)))))
12444 (native-inputs
12445 `(("python-requests-mock" ,python-requests-mock)
12446 ("python-mock" ,python-mock)))
12447 (propagated-inputs
12448 `(("python-oauthlib" ,python-oauthlib)
12449 ("python-requests" ,python-requests)))
12450 (home-page
12451 "https://github.com/requests/requests-oauthlib")
12452 (synopsis
12453 "OAuthlib authentication support for Requests")
12454 (description
12455 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12456 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12457 (license license:isc)))
12458
12459 (define-public python2-requests-oauthlib
12460 (package-with-python2 python-requests-oauthlib))
12461
12462 (define-public python-stem
12463 (package
12464 (name "python-stem")
12465 (version "1.5.4")
12466 (source
12467 (origin
12468 (method url-fetch)
12469 (uri (pypi-uri "stem" version))
12470 (sha256
12471 (base32
12472 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12473 (build-system python-build-system)
12474 (arguments
12475 `(#:phases
12476 (modify-phases %standard-phases
12477 (replace 'check
12478 (lambda _
12479 (zero? (system* "./run_tests.py" "--unit")))))))
12480 (native-inputs
12481 `(("python-mock" ,python-mock)
12482 ("python-pep8" ,python-pep8)
12483 ("python-pyflakes" ,python-pyflakes)))
12484 (home-page "https://stem.torproject.org/")
12485 (synopsis
12486 "Python controller library that allows applications to interact with Tor")
12487 (description
12488 "Stem is a Python controller library for Tor. With it you can use Tor's
12489 control protocol to script against the Tor process and read descriptor data
12490 relays publish about themselves.")
12491 (license license:lgpl3)))
12492
12493 (define-public python2-stem
12494 (package-with-python2 python-stem))
12495
12496 (define-public python-pyserial
12497 (package
12498 (name "python-pyserial")
12499 (version "3.1.1")
12500 (source
12501 (origin
12502 (method url-fetch)
12503 (uri (pypi-uri "pyserial" version))
12504 (sha256
12505 (base32
12506 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12507 (build-system python-build-system)
12508 (arguments
12509 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12510 ;; #:phases
12511 ;; (modify-phases %standard-phases
12512 ;; (replace 'check
12513 ;; (lambda _
12514 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12515 (home-page
12516 "https://github.com/pyserial/pyserial")
12517 (synopsis "Python Serial Port Bindings")
12518 (description "@code{pyserial} provide serial port bindings for Python. It
12519 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12520 and/or Xon/Xoff. The port is accessed in RAW mode.")
12521 (license license:bsd-3)))
12522
12523 (define-public python2-pyserial
12524 (package-with-python2 python-pyserial))
12525
12526 (define-public python-kivy
12527 (package
12528 (name "python-kivy")
12529 (version "1.9.1")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (pypi-uri "kivy" version))
12534 (file-name (string-append name "-" version ".tar.gz"))
12535 (sha256
12536 (base32
12537 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12538 (build-system python-build-system)
12539 (arguments
12540 `(#:tests? #f ; Tests require many optional packages
12541 #:phases
12542 (modify-phases %standard-phases
12543 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12544 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12545 (lambda* (#:key inputs #:allow-other-keys)
12546 (setenv "KIVY_SDL2_PATH"
12547 (string-append (assoc-ref inputs "sdl-union")
12548 "/include/SDL2"))
12549 #t)))))
12550 (native-inputs
12551 `(("pkg-config" ,pkg-config)
12552 ("python-cython" ,python-cython)))
12553 (inputs
12554 `(("gstreamer" ,gstreamer)
12555 ("mesa" ,mesa)
12556 ("sdl-union"
12557 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12558 (home-page "http://kivy.org")
12559 (synopsis
12560 "Multitouch application framework")
12561 (description
12562 "A software library for rapid development of
12563 hardware-accelerated multitouch applications.")
12564 (license license:expat)))
12565
12566 (define-public python2-kivy
12567 (package-with-python2 python-kivy))
12568
12569 (define-public python-kivy-next
12570 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12571 (revision "1"))
12572 (package (inherit python-kivy)
12573 (name "python-kivy-next")
12574 (version (string-append "1.9.1-" revision "."
12575 (string-take commit 7)))
12576 (source
12577 (origin
12578 (method git-fetch)
12579 (uri (git-reference
12580 (url "https://github.com/kivy/kivy")
12581 (commit commit)))
12582 (file-name (string-append name "-" version "-checkout"))
12583 (sha256
12584 (base32
12585 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12586
12587 (define-public python2-kivy-next
12588 (package-with-python2 python-kivy-next))
12589
12590 (define-public python-binaryornot
12591 (package
12592 (name "python-binaryornot")
12593 (version "0.4.0")
12594 (source (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "binaryornot" version))
12597 (sha256
12598 (base32
12599 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12600 (build-system python-build-system)
12601 (propagated-inputs
12602 `(("python-chardet" ,python-chardet)
12603 ("python-hypothesis" ,python-hypothesis)))
12604 (home-page "https://github.com/audreyr/binaryornot")
12605 (synopsis "Package to check if a file is binary or text")
12606 (description "Ultra-lightweight pure Python package to check if a file is
12607 binary or text.")
12608 (license license:bsd-3)
12609 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12610
12611 (define-public python2-binaryornot
12612 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12613 (package (inherit base)
12614 (propagated-inputs
12615 `(("python2-enum34" ,python2-enum34)
12616 ,@(package-propagated-inputs base))))))
12617
12618 (define-public python-nltk
12619 (package
12620 (name "python-nltk")
12621 (version "3.2.1")
12622 (source (origin
12623 (method url-fetch)
12624 (uri (pypi-uri "nltk" version))
12625 (sha256
12626 (base32
12627 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12628 (build-system python-build-system)
12629 (arguments
12630 '(;; The tests require some extra resources to be downloaded.
12631 ;; TODO Try packaging these resources.
12632 #:tests? #f))
12633 (home-page "http://nltk.org/")
12634 (synopsis "Natural Language Toolkit")
12635 (description "It provides interfaces to over 50 corpora and lexical
12636 resources such as WordNet, along with a suite of text processing libraries
12637 for classification, tokenization, stemming, tagging, parsing, and semantic
12638 reasoning, wrappers for natural language processing libraries.")
12639 (license license:asl2.0)))
12640
12641 (define-public python2-nltk
12642 (package-with-python2 python-nltk))
12643
12644 (define-public python-pymongo
12645 (package
12646 (name "python-pymongo")
12647 (version "3.3.0")
12648 (source (origin
12649 (method url-fetch)
12650 (uri (pypi-uri "pymongo" version))
12651 (sha256
12652 (base32
12653 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12654 (build-system python-build-system)
12655 (propagated-inputs
12656 `(("python-certifi" ,python-certifi)))
12657 (home-page "https://github.com/mongodb/mongo-python-driver")
12658 (synopsis "Python driver for MongoDB")
12659 (description "Python driver for MongoDB.")
12660 (license license:asl2.0)))
12661
12662 (define-public python2-pymongo
12663 (package-with-python2 python-pymongo))
12664
12665 (define-public python-sh
12666 (package
12667 (name "python-sh")
12668 (version "1.11")
12669 (source (origin
12670 (method url-fetch)
12671 (uri (pypi-uri "sh" version))
12672 (sha256
12673 (base32
12674 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12675 (build-system python-build-system)
12676 (arguments
12677 `(#:tests? #f)) ; no tests
12678 (home-page "https://github.com/amoffat/sh")
12679 (synopsis "Python subprocess interface")
12680 (description "Abstracts process invocation by providing a function
12681 interface for programs.")
12682 (license license:expat)))
12683
12684 (define-public python2-sh
12685 (package-with-python2 python-sh))
12686
12687 (define-public python-consul
12688 (package
12689 (name "python-consul")
12690 (version "0.6.1")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "python-consul" version))
12695 (sha256
12696 (base32
12697 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12698 (build-system python-build-system)
12699 (native-inputs
12700 `(("python-pytest" ,python-pytest)))
12701 (propagated-inputs
12702 `(("python-requests" ,python-requests)
12703 ("python-six" ,python-six)))
12704 (home-page "https://github.com/cablehead/python-consul")
12705 (synopsis "Python client for Consul")
12706 (description
12707 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12708 discovery, monitoring and configuration.")
12709 (license license:expat)))
12710
12711 (define-public python2-consul
12712 (package-with-python2 python-consul))
12713
12714 (define-public python-schematics
12715 (package
12716 (name "python-schematics")
12717 (version "1.1.1")
12718 (source
12719 (origin
12720 (method url-fetch)
12721 (uri (string-append
12722 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12723 (file-name (string-append name "-" version ".tar.gz"))
12724 (sha256
12725 (base32
12726 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12727 (build-system python-build-system)
12728 (propagated-inputs
12729 `(("python-six" ,python-six)))
12730 (arguments
12731 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12732 ; version requirements (eg python-coveralls)
12733 (home-page "https://github.com/schematics/schematics")
12734 (synopsis "Python Data Structures for Humans")
12735 (description "Python Data Structures for Humans.")
12736 (license license:bsd-3)))
12737
12738 (define-public python2-schematics
12739 (package-with-python2 python-schematics))
12740
12741 (define-public python-publicsuffix
12742 (package
12743 (name "python-publicsuffix")
12744 (version "1.1.0")
12745 (source (origin
12746 (method url-fetch)
12747 (uri (pypi-uri "publicsuffix" version))
12748 (sha256
12749 (base32
12750 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12751 (build-system python-build-system)
12752 (arguments
12753 `(#:tests? #f)) ; tests use the internet
12754 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12755 (synopsis "Get suffix for a domain name")
12756 (description "Get a public suffix for a domain name using the Public Suffix
12757 List.")
12758 (license license:expat)))
12759
12760 (define-public python2-publicsuffix
12761 (package-with-python2 python-publicsuffix))
12762
12763 (define-public python-publicsuffix2
12764 (package
12765 (name "python-publicsuffix2")
12766 (version "2.20160818")
12767 (source
12768 (origin
12769 (method url-fetch)
12770 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12771 (sha256
12772 (base32
12773 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12774 (build-system python-build-system)
12775 (arguments
12776 '(#:tests? #f)) ; The test suite requires network access.
12777 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12778 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12779 (description "Get a public suffix for a domain name using the Public Suffix
12780 List. Forked from and using the same API as the publicsuffix package.")
12781 (license (list license:expat license:mpl2.0))))
12782
12783 (define-public python2-publicsuffix2
12784 (package-with-python2 python-publicsuffix2))
12785
12786 (define-public python-url
12787 (package
12788 (name "python-url")
12789 (version "0.2.0")
12790 (source (origin
12791 (method url-fetch)
12792 (uri (pypi-uri "url" version))
12793 (sha256
12794 (base32
12795 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12796 (build-system python-build-system)
12797 (propagated-inputs
12798 `(("python-publicsuffix" ,python-publicsuffix)))
12799 (native-inputs
12800 `(("python-coverage" ,python-coverage)
12801 ("python-nose" ,python-nose)))
12802 (arguments
12803 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12804 (home-page "https://github.com/seomoz/url-py")
12805 (synopsis "URL Parsing")
12806 (description "Library for parsing urls.")
12807 (license license:expat)
12808 (properties `((python2-variant . ,(delay python2-url))))))
12809
12810 (define-public python2-url
12811 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12812 (package (inherit base)
12813 (propagated-inputs
12814 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12815
12816 (define-public python-freezegun
12817 (package
12818 (name "python-freezegun")
12819 (version "0.3.8")
12820 (source
12821 (origin
12822 (method url-fetch)
12823 (uri (pypi-uri "freezegun" version))
12824 (sha256
12825 (base32
12826 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12827 (build-system python-build-system)
12828 (native-inputs
12829 `(("python-mock" ,python-mock)
12830 ("python-nose" ,python-nose)
12831 ("python-coverage" ,python-coverage)))
12832 (propagated-inputs
12833 `(("python-six" ,python-six)
12834 ("python-dateutil" ,python-dateutil)))
12835 (arguments
12836 `(#:phases (modify-phases %standard-phases
12837 ;; The tests are normally executed via `make test`, but the PyPi
12838 ;; package does not include the Makefile.
12839 (replace 'check
12840 (lambda _
12841 (zero? (system* "nosetests" "./tests/")))))))
12842 (home-page "https://github.com/spulec/freezegun")
12843 (synopsis "Test utility for mocking the datetime module")
12844 (description
12845 "FreezeGun is a library that allows your python tests to travel through
12846 time by mocking the datetime module.")
12847 (license license:asl2.0)))
12848
12849 (define-public python2-freezegun
12850 (package-with-python2 python-freezegun))
12851
12852
12853 (define-public python-odfpy
12854 (package
12855 (name "python-odfpy")
12856 (version "1.3.3")
12857 (source (origin
12858 (method url-fetch)
12859 (uri (pypi-uri "odfpy" version))
12860 (sha256
12861 (base32
12862 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12863 (arguments
12864 `(#:modules ((srfi srfi-1)
12865 (guix build python-build-system)
12866 (guix build utils))
12867 #:phases
12868 (modify-phases %standard-phases
12869 (replace 'check
12870 ;; The test runner invokes python2 and python3 for test*.py.
12871 ;; To avoid having both in inputs, we replicate it here.
12872 (lambda _
12873 (every (lambda (test-file)
12874 (zero? (system* "python" test-file)))
12875 (find-files "tests" "^test.*\\.py$")))))))
12876 (build-system python-build-system)
12877 (home-page "https://github.com/eea/odfpy")
12878 (synopsis "Python API and tools to manipulate OpenDocument files")
12879 (description "Collection of libraries and utility programs written in
12880 Python to manipulate OpenDocument 1.2 files.")
12881 (license
12882 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12883 ;; number of files with other licenses.
12884 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12885
12886 (define-public python2-odfpy
12887 (package-with-python2 python-odfpy))
12888
12889 (define-public python-cachecontrol
12890 (package
12891 (name "python-cachecontrol")
12892 (version "0.11.6")
12893 (source
12894 (origin
12895 (method url-fetch)
12896 ;; Pypi does not have tests.
12897 (uri (string-append
12898 "https://github.com/ionrock/cachecontrol/archive/v"
12899 version ".tar.gz"))
12900 (file-name (string-append name "-" version ".tar.gz"))
12901 (sha256
12902 (base32
12903 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12904 (build-system python-build-system)
12905 (arguments
12906 `(#:phases
12907 (modify-phases %standard-phases
12908 (replace 'check
12909 (lambda _
12910 ;; Drop test that requires internet access.
12911 (delete-file "tests/test_regressions.py")
12912 (setenv "PYTHONPATH"
12913 (string-append (getcwd) "/build/lib:"
12914 (getenv "PYTHONPATH")))
12915 (zero? (system* "py.test" "-vv")))))))
12916 (native-inputs
12917 `(("python-pytest" ,python-pytest)
12918 ("python-redis" ,python-redis)
12919 ("python-webtest" ,python-webtest)
12920 ("python-mock" ,python-mock)))
12921 (propagated-inputs
12922 `(("python-requests" ,python-requests)
12923 ("python-lockfile" ,python-lockfile)))
12924 (home-page "https://github.com/ionrock/cachecontrol")
12925 (synopsis "The httplib2 caching algorithms for use with requests")
12926 (description "CacheControl is a port of the caching algorithms in
12927 @code{httplib2} for use with @code{requests} session objects.")
12928 (license license:asl2.0)))
12929
12930 (define-public python2-cachecontrol
12931 (package-with-python2 python-cachecontrol))
12932
12933 (define-public python-lit
12934 (package
12935 (name "python-lit")
12936 (version "0.5.0")
12937 (source
12938 (origin
12939 (method url-fetch)
12940 (uri (pypi-uri "lit" version))
12941 (sha256
12942 (base32
12943 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12944 (build-system python-build-system)
12945 (home-page "http://llvm.org/")
12946 (synopsis "LLVM Software Testing Tool")
12947 (description "@code{lit} is a portable tool for executing LLVM and Clang
12948 style test suites, summarizing their results, and providing indication of
12949 failures.")
12950 (license license:ncsa)))
12951
12952 (define-public python2-lit
12953 (package-with-python2 python-lit))
12954
12955 (define-public python-pytest-pep8
12956 (package
12957 (name "python-pytest-pep8")
12958 (version "1.0.6")
12959 (source (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "pytest-pep8" version))
12962 (sha256
12963 (base32
12964 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12965 (build-system python-build-system)
12966 (arguments
12967 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12968 (native-inputs
12969 `(("python-pytest" ,python-pytest)))
12970 (propagated-inputs
12971 `(("python-pep8" ,python-pep8)))
12972 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12973 (synopsis "Py.test plugin to check PEP8 requirements")
12974 (description "Pytest plugin for checking PEP8 compliance.")
12975 (license license:expat)))
12976
12977 (define-public python2-pytest-pep8
12978 (package-with-python2 python-pytest-pep8))
12979
12980 (define-public python-pytest-flakes
12981 (package
12982 (name "python-pytest-flakes")
12983 (version "1.0.1")
12984 (source (origin
12985 (method url-fetch)
12986 (uri (pypi-uri "pytest-flakes" version))
12987 (sha256
12988 (base32
12989 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12990 (build-system python-build-system)
12991 (arguments
12992 `(#:phases
12993 (modify-phases %standard-phases
12994 (delete 'check)
12995 (add-after 'install 'check
12996 (lambda* (#:key outputs inputs #:allow-other-keys)
12997 ;; It's easier to run tests after install.
12998 ;; Make installed package available for running the tests
12999 (add-installed-pythonpath inputs outputs)
13000 (zero? (system* "py.test" "-vv")))))))
13001 (native-inputs
13002 `(("python-coverage" ,python-coverage)
13003 ("python-pytest" ,python-pytest)
13004 ("python-pytest-cache" ,python-pytest-cache)
13005 ("python-pytest-pep8" ,python-pytest-pep8)))
13006 (propagated-inputs
13007 `(("python-pyflakes" ,python-pyflakes)))
13008 (home-page "https://github.com/fschulze/pytest-flakes")
13009 (synopsis "Py.test plugin to check source code with pyflakes")
13010 (description "Pytest plugin for checking Python source code with pyflakes.")
13011 (license license:expat)))
13012
13013 (define-public python2-pytest-flakes
13014 (package-with-python2 python-pytest-flakes))
13015
13016 (define-public python-natsort
13017 (package
13018 (name "python-natsort")
13019 (version "5.0.2")
13020 (source (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "natsort" version))
13023 (sha256
13024 (base32
13025 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
13026 (build-system python-build-system)
13027 (arguments
13028 `(#:phases
13029 (modify-phases %standard-phases
13030 (add-before 'check 'set-cachedir
13031 ;; Tests require write access to $HOME by default
13032 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
13033 (native-inputs
13034 `(("python-hypothesis" ,python-hypothesis)
13035 ("python-pytest-cache" ,python-pytest-cache)
13036 ("python-pytest-cov" ,python-pytest-cov)
13037 ("python-pytest-flakes" ,python-pytest-flakes)
13038 ("python-pytest-pep8" ,python-pytest-pep8)))
13039 (propagated-inputs ; TODO: Add python-fastnumbers.
13040 `(("python-pyicu" ,python-pyicu)))
13041 (home-page "https://github.com/SethMMorton/natsort")
13042 (synopsis "Natural sorting for python and shell")
13043 (description
13044 "Natsort lets you apply natural sorting on lists instead of
13045 lexicographical. If you use the built-in @code{sorted} method in python
13046 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
13047 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
13048 function @code{natsorted} that identifies numbers and sorts them separately
13049 from strings. It can also sort version numbers, real numbers, mixed types
13050 and more, and comes with a shell command @command{natsort} that exposes this
13051 functionality in the command line.")
13052 (license license:expat)
13053 (properties `((python2-variant . ,(delay python2-natsort))))))
13054
13055 (define-public python2-natsort
13056 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13057 (package (inherit base)
13058 (native-inputs
13059 `(("python2-pathlib" ,python2-pathlib)
13060 ("python2-mock" ,python2-mock)
13061 ("python2-enum34" ,python2-enum34)
13062 ,@(package-native-inputs base))))))
13063
13064 (define-public python-glances
13065 (package
13066 (name "python-glances")
13067 (version "2.7.1")
13068 (source
13069 (origin
13070 (method url-fetch)
13071 (uri (pypi-uri "Glances" version))
13072 (sha256
13073 (base32
13074 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
13075 (build-system python-build-system)
13076 (propagated-inputs
13077 `(("python-psutil" ,python-psutil)))
13078 (home-page
13079 "https://github.com/nicolargo/glances")
13080 (synopsis
13081 "A cross-platform curses-based monitoring tool")
13082 (description
13083 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13084 Glances uses the PsUtil library to get information from your system. It monitors
13085 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13086 (license license:lgpl3+)))
13087
13088 (define-public python2-glances
13089 (package-with-python2 python-glances))
13090
13091 (define-public python-graphql-core
13092 (package
13093 (name "python-graphql-core")
13094 (version "0.5.3")
13095 (source
13096 (origin
13097 (method url-fetch)
13098 (uri (pypi-uri "graphql-core" version))
13099 (sha256
13100 (base32
13101 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13102 (build-system python-build-system)
13103 (arguments
13104 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13105 #:phases
13106 (modify-phases %standard-phases
13107 (add-after 'unpack 'patch-hardcoded-version
13108 (lambda _ (substitute*
13109 "setup.py"
13110 (("'gevent==1.1rc1'") "'gevent'"))
13111 #t)))))
13112 (native-inputs
13113 `(("python-gevent" ,python-gevent)
13114 ("python-mock" ,python-mock)
13115 ("python-pytest-mock" ,python-pytest-mock)))
13116 (propagated-inputs
13117 `(("python-promise" ,python-promise)
13118 ("python-six" ,python-six)))
13119 (home-page "https://github.com/graphql-python/graphql-core")
13120 (synopsis "GraphQL implementation for Python")
13121 (description
13122 "GraphQL implementation for Python. GraphQL is a data query language and
13123 runtime designed and used to request and deliver data to mobile and web apps.
13124 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13125 to Python.")
13126 (license license:expat)))
13127
13128 (define-public python2-graphql-core
13129 (package-with-python2 python-graphql-core))
13130
13131 (define-public python-graphql-relay
13132 (package
13133 (name "python-graphql-relay")
13134 (version "0.4.5")
13135 (source
13136 (origin
13137 (method url-fetch)
13138 (uri (pypi-uri "graphql-relay" version))
13139 (sha256
13140 (base32
13141 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13142 (build-system python-build-system)
13143 (native-inputs
13144 `(("python-pytest" ,python-pytest)))
13145 (propagated-inputs
13146 `(("python-graphql-core" ,python-graphql-core)
13147 ("python-promise" ,python-promise)
13148 ("python-six" ,python-six)))
13149 (home-page "https://github.com/graphql-python/graphql-relay-py")
13150 (synopsis "Relay implementation for Python")
13151 (description
13152 "This is a library to allow the easy creation of Relay-compliant servers
13153 using the GraphQL Python reference implementation of a GraphQL server. It
13154 should be noted that the code is a exact port of the original
13155 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13156 from Facebook.")
13157 (license license:expat)))
13158
13159 (define-public python2-graphql-relay
13160 (package-with-python2 python-graphql-relay))
13161
13162 (define-public python-graphene
13163 (package
13164 (name "python-graphene")
13165 (version "0.10.2")
13166 (source
13167 (origin
13168 (method url-fetch)
13169 (uri (pypi-uri "graphene" version))
13170 (sha256
13171 (base32
13172 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13173 (build-system python-build-system)
13174 (native-inputs
13175 `(("python-django-filter" ,python-django-filter)
13176 ("python-mock" ,python-mock)
13177 ("python-psycopg2" ,python-psycopg2)
13178 ("python-pytest-django" ,python-pytest-django)
13179 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
13180 (propagated-inputs
13181 `(("python-graphql-core" ,python-graphql-core)
13182 ("python-graphql-relay" ,python-graphql-relay)
13183 ("python-iso8601" ,python-iso8601)
13184 ("python-promise" ,python-promise)
13185 ("python-six" ,python-six)))
13186 (home-page "http://graphene-python.org/")
13187 (synopsis "GraphQL Framework for Python")
13188 (description
13189 "Graphene is a Python library for building GraphQL schemas/types.
13190 A GraphQL schema describes your data model, and provides a GraphQL server
13191 with an associated set of resolve methods that know how to fetch data.")
13192 (properties `((python2-variant . ,(delay python2-graphene))))
13193 (license license:expat)))
13194
13195 (define-public python2-graphene
13196 (let ((base (package-with-python2
13197 (strip-python2-variant python-graphene))))
13198 (package (inherit base)
13199 (native-inputs
13200 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13201 ,@(package-native-inputs base))))))
13202
13203 (define-public python-nautilus
13204 (package
13205 (name "python-nautilus")
13206 (version "0.4.9")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "nautilus" version))
13211 (sha256
13212 (base32
13213 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13214 (build-system python-build-system)
13215 (arguments `(#:tests? #f)) ; fails to import test modules
13216 (propagated-inputs
13217 `(("python-bcrypt" ,python-bcrypt)
13218 ("python-click" ,python-click)
13219 ("python-consul" ,python-consul)
13220 ("python-graphene" ,python-graphene)
13221 ("python-jinja2" ,python-jinja2)
13222 ("python-peewee" ,python-peewee)
13223 ("python-pika" ,python-pika)
13224 ("python-tornado" ,python-tornado)
13225 ("python-wtforms" ,python-wtforms)))
13226 (native-inputs
13227 `(("python-nose2" ,python-nose2)))
13228 (home-page "https://github.com/AlecAivazis/nautilus")
13229 (synopsis "Library for creating microservice applications")
13230 (description
13231 "Nautilus is a framework for flux based microservices that looks to
13232 provide extendible implementations of common aspects of a cloud so that you can
13233 focus on building massively scalable web applications.")
13234 (license license:expat)))
13235
13236 (define-public python-snowballstemmer
13237 (package
13238 (name "python-snowballstemmer")
13239 (version "1.2.1")
13240 (source (origin
13241 (method url-fetch)
13242 (uri (pypi-uri "snowballstemmer" version))
13243 (sha256
13244 (base32
13245 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
13246 (build-system python-build-system)
13247 (arguments
13248 `(;; No tests exist
13249 #:tests? #f))
13250 (home-page "https://github.com/shibukawa/snowball_py")
13251 (synopsis "Snowball stemming library collection for Python")
13252 (description "This package provides 16 word stemmer algorithms generated
13253 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13254 English stemmer.")
13255 (license license:bsd-3)))
13256
13257 (define-public python2-snowballstemmer
13258 (package-with-python2 python-snowballstemmer))
13259
13260 (define-public python-sphinx-cloud-sptheme
13261 (package
13262 (name "python-sphinx-cloud-sptheme")
13263 (version "1.8.0")
13264 (source (origin
13265 (method url-fetch)
13266 (uri (pypi-uri "cloud_sptheme" version))
13267 (sha256
13268 (base32
13269 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
13270 (build-system python-build-system)
13271 ;; FIXME: The 'pypi' release archive does not contain tests.
13272 (arguments '(#:tests? #f))
13273 (native-inputs
13274 `(("python-sphinx" ,python-sphinx)))
13275 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
13276 (synopsis "'Cloud' theme for Sphinx documenter")
13277 (description "This package contains the \"Cloud\" theme for Sphinx and some
13278 related extensions.")
13279 (license license:bsd-3)))
13280
13281 (define-public python2-sphinx-cloud-sptheme
13282 (package-with-python2 python-sphinx-cloud-sptheme))
13283
13284 (define-public python-sphinx-alabaster-theme
13285 (package
13286 (name "python-sphinx-alabaster-theme")
13287 (version "0.7.9")
13288 (source (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "alabaster" version))
13291 (sha256
13292 (base32
13293 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
13294 (build-system python-build-system)
13295 (propagated-inputs
13296 `(("python-pygments" ,python-pygments)))
13297 (home-page "https://alabaster.readthedocs.io/")
13298 (synopsis "Configurable sidebar-enabled Sphinx theme")
13299 (description "Alabaster is a visually (c)lean, responsive, configurable
13300 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
13301 (license license:bsd-3)))
13302
13303 (define-public python2-sphinx-alabaster-theme
13304 (package-with-python2 python-sphinx-alabaster-theme))
13305
13306 (define-public python-betamax
13307 (package
13308 (name "python-betamax")
13309 (version "0.8.0")
13310 (source
13311 (origin
13312 (method url-fetch)
13313 (uri (pypi-uri "betamax" version))
13314 (sha256
13315 (base32
13316 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13317 (build-system python-build-system)
13318 (arguments
13319 '(;; Many tests fail because they require networking.
13320 #:tests? #f))
13321 (propagated-inputs
13322 `(("python-requests" ,python-requests)))
13323 (home-page "https://github.com/sigmavirus24/betamax")
13324 (synopsis "Record HTTP interactions with python-requests")
13325 (description "Betamax will record your test suite's HTTP interactions and
13326 replay them during future tests. It is designed to work with python-requests.")
13327 (license license:expat)))
13328
13329 (define-public python2-betamax
13330 (package-with-python2 python-betamax))
13331
13332 (define-public python-betamax-matchers
13333 (package
13334 (name "python-betamax-matchers")
13335 (version "0.4.0")
13336 (source
13337 (origin
13338 (method url-fetch)
13339 (uri (pypi-uri "betamax-matchers" version))
13340 (sha256
13341 (base32
13342 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
13343 (build-system python-build-system)
13344 (propagated-inputs
13345 `(("python-betamax" ,python-betamax)
13346 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13347 (home-page "https://github.com/sigmavirus24/betamax_matchers")
13348 (synopsis "VCR imitation for python-requests")
13349 (description "@code{betamax-matchers} provides a set of Matchers for
13350 Betamax.")
13351 (license license:asl2.0)))
13352
13353 (define-public python2-betamax-matchers
13354 (package-with-python2 python-betamax-matchers))
13355
13356 (define-public python-s3transfer
13357 (package
13358 (name "python-s3transfer")
13359 (version "0.1.11")
13360 (source (origin
13361 (method url-fetch)
13362 (uri (pypi-uri "s3transfer" version))
13363 (sha256
13364 (base32
13365 "0yfrfnf404cxzn3iswibqjxklsl0b1lwgqiml6pwiqj79a7zbwbn"))))
13366 (build-system python-build-system)
13367 (arguments
13368 `(#:phases
13369 (modify-phases %standard-phases
13370 (replace 'check
13371 (lambda _
13372 ;; 7 of the 'integration' tests require network access or login
13373 ;; credentials.
13374 (zero? (system* "nosetests" "--exclude=integration")))))))
13375 (native-inputs
13376 `(("python-docutils" ,python-docutils)
13377 ("python-mock" ,python-mock)
13378 ("python-nose" ,python-nose)))
13379 (propagated-inputs
13380 `(("python-botocore" ,python-botocore)))
13381 (synopsis "Amazon S3 Transfer Manager")
13382 (description "S3transfer is a Python library for managing Amazon S3
13383 transfers.")
13384 (home-page "https://github.com/boto/s3transfer")
13385 (license license:asl2.0)
13386 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13387
13388 (define-public python2-s3transfer
13389 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13390 (package
13391 (inherit base)
13392 (native-inputs
13393 `(("python2-futures" ,python2-futures)
13394 ,@(package-native-inputs base))))))
13395
13396 (define-public python-setproctitle
13397 (package
13398 (name "python-setproctitle")
13399 (version "1.1.10")
13400 (source
13401 (origin
13402 (method url-fetch)
13403 (uri (pypi-uri "setproctitle" version))
13404 (sha256
13405 (base32
13406 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13407 (build-system python-build-system)
13408 (arguments
13409 '(#:phases
13410 (modify-phases %standard-phases
13411 (add-before 'check 'patch-Makefile
13412 ;; Stricly this is only required for the python2 variant.
13413 ;; But adding a phase in an inherited package seems to be
13414 ;; cumbersum. So we patch even for python3.
13415 (lambda _
13416 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13417 (when nose
13418 (substitute* "Makefile"
13419 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13420 (string-append nose "/bin/nosetests "))))
13421 #t)))
13422 (replace 'check
13423 (lambda _
13424 (setenv "PYTHON" (or (which "python3") (which "python")))
13425 (setenv "PYCONFIG" (or (which "python3-config")
13426 (which "python-config")))
13427 (setenv "CC" "gcc")
13428 ;; No need to extend PYTHONPATH to find the built package, since
13429 ;; the Makefile will build anyway
13430 (zero? (system* "make" "check")))))))
13431 (native-inputs
13432 `(("procps" ,procps))) ; required for tests
13433 (home-page
13434 "https://github.com/dvarrazzo/py-setproctitle")
13435 (synopsis
13436 "Setproctitle implementation for Python to customize the process title")
13437 (description "The library allows a process to change its title (as displayed
13438 by system tools such as ps and top).
13439
13440 Changing the title is mostly useful in multi-process systems, for
13441 example when a master process is forked: changing the children's title
13442 allows to identify the task each process is busy with. The technique
13443 is used by PostgreSQL and the OpenSSH Server for example.")
13444 (license license:bsd-3)
13445 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13446
13447 (define-public python2-setproctitle
13448 (let ((base (package-with-python2
13449 (strip-python2-variant python-setproctitle))))
13450 (package
13451 (inherit base)
13452 (native-inputs `(("python2-nose" ,python2-nose)
13453 ,@(package-native-inputs base))))))
13454
13455 (define-public python-validictory
13456 (package
13457 (name "python-validictory")
13458 (version "1.0.1")
13459 (source
13460 (origin
13461 (method url-fetch)
13462 (uri (pypi-uri "validictory" version))
13463 (sha256
13464 (base32
13465 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13466 (build-system python-build-system)
13467 (arguments
13468 '(#:phases
13469 (modify-phases %standard-phases
13470 (add-after 'unpack 'bootstrap
13471 ;; Move the tests out of the package directory to avoid
13472 ;; packaging them.
13473 (lambda* _
13474 (rename-file "validictory/tests" "tests")
13475 (delete-file "tests/__init__.py")))
13476 (replace 'check
13477 (lambda _
13478 ;; Extend PYTHONPATH so the built package will be found.
13479 (setenv "PYTHONPATH"
13480 (string-append (getcwd) "/build/lib:"
13481 (getenv "PYTHONPATH")))
13482 (zero? (system* "py.test" "-vv" )))))))
13483 (native-inputs
13484 `(("python-pytest" ,python-pytest)))
13485 (home-page
13486 "https://github.com/jamesturk/validictory")
13487 (synopsis "General purpose Python data validator")
13488 (description "It allows validation of arbitrary Python data structures.
13489
13490 The schema format is based on the JSON Schema
13491 proposal (http://json-schema.org), so combined with json the library is also
13492 useful as a validator for JSON data.")
13493 (license license:expat)))
13494
13495 (define-public python2-validictory
13496 (package-with-python2 python-validictory))
13497
13498 (define-public python-aniso8601
13499 (package
13500 (name "python-aniso8601")
13501 (version "1.3.0")
13502 (source
13503 (origin
13504 (method url-fetch)
13505 (uri (pypi-uri "aniso8601" version))
13506 (sha256
13507 (base32
13508 "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
13509 (build-system python-build-system)
13510 (propagated-inputs
13511 `(("python-dateutil" ,python-dateutil)))
13512 (home-page
13513 "https://bitbucket.org/nielsenb/aniso8601")
13514 (synopsis
13515 "Python library for parsing ISO 8601 strings")
13516 (description
13517 "This package contains a library for parsing ISO 8601 datetime strings.")
13518 (license license:bsd-3)))
13519
13520 (define-public python2-aniso8601
13521 (package-with-python2 python-aniso8601))
13522
13523 (define-public python-flask-restful
13524 (package
13525 (name "python-flask-restful")
13526 (version "0.3.5")
13527 (source
13528 (origin
13529 (method url-fetch)
13530 (uri (pypi-uri "Flask-RESTful" version))
13531 (sha256
13532 (base32
13533 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13534 (build-system python-build-system)
13535 (propagated-inputs
13536 `(("python-aniso8601" ,python-aniso8601)
13537 ("python-flask" ,python-flask)
13538 ("python-pycrypto" ,python-pycrypto)
13539 ("python-pytz" ,python-pytz)))
13540 (native-inputs
13541 `(;; Optional dependency of Flask. Tests need it.
13542 ("python-blinker" ,python-blinker)
13543 ("python-mock" ,python-mock) ; For tests
13544 ("python-nose" ,python-nose) ; For tests
13545 ("python-sphinx" ,python-sphinx)))
13546 (home-page
13547 "https://www.github.com/flask-restful/flask-restful/")
13548 (synopsis
13549 "Flask module for creating REST APIs")
13550 (description
13551 "This package contains a Flask module for creating REST APIs.")
13552 (license license:bsd-3)))
13553
13554 (define-public python-flask-basicauth
13555 (package
13556 (name "python-flask-basicauth")
13557 (version "0.2.0")
13558 (source
13559 (origin
13560 (method url-fetch)
13561 (uri (pypi-uri "Flask-BasicAuth" version))
13562 (sha256
13563 (base32
13564 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13565 (build-system python-build-system)
13566 (propagated-inputs
13567 `(("python-flask" ,python-flask)))
13568 (home-page
13569 "https://github.com/jpvanhal/flask-basicauth")
13570 (synopsis
13571 "HTTP basic access authentication for Flask")
13572 (description
13573 "This package provides HTTP basic access authentication for Flask.")
13574 (license license:bsd-3)))
13575
13576 (define-public python-flask-sqlalchemy
13577 (package
13578 (name "python-flask-sqlalchemy")
13579 (version "2.1")
13580 (source
13581 (origin
13582 (method url-fetch)
13583 (uri (pypi-uri "Flask-SQLAlchemy" version))
13584 (sha256
13585 (base32
13586 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13587 (build-system python-build-system)
13588 (propagated-inputs
13589 `(("python-flask" ,python-flask)
13590 ("python-sqlalchemy" ,python-sqlalchemy)))
13591 (home-page
13592 "https://github.com/mitsuhiko/flask-sqlalchemy")
13593 (synopsis
13594 "Module adding SQLAlchemy support to your Flask application")
13595 (description
13596 "This package adds SQLAlchemy support to your Flask application.")
13597 (license license:bsd-3)))
13598
13599 (define-public python-pyev
13600 (package
13601 (name "python-pyev")
13602 (version "0.9.0")
13603 (source
13604 (origin
13605 (method url-fetch)
13606 (uri (pypi-uri "pyev" version))
13607 (sha256
13608 (base32
13609 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13610 (build-system python-build-system)
13611 (arguments
13612 `(#:tests? #f ; no test suite
13613 #:phases
13614 (modify-phases %standard-phases
13615 (add-after 'unpack 'patch
13616 (lambda* (#:key inputs #:allow-other-keys)
13617 (let ((libev (string-append (assoc-ref inputs "libev")
13618 "/lib/libev.so.4")))
13619 (substitute* "setup.py"
13620 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13621 (string-append "libev_dll_name = \"" libev "\"")))))))))
13622 (inputs
13623 `(("libev" ,libev)))
13624 (home-page "http://pythonhosted.org/pyev/")
13625 (synopsis "Python libev interface")
13626 (description "Pyev provides a Python interface to libev.")
13627 (license license:gpl3)))
13628
13629 (define-public python2-pyev
13630 (package-with-python2 python-pyev))
13631
13632 (define-public python-imagesize
13633 (package
13634 (name "python-imagesize")
13635 (version "0.7.1")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "imagesize" version))
13640 (sha256
13641 (base32
13642 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13643 (build-system python-build-system)
13644 (arguments
13645 '(;; Test files are not distributed on PyPi:
13646 ;; https://github.com/shibukawa/imagesize_py/issues/7
13647 #:tests? #f))
13648 (home-page "https://github.com/shibukawa/imagesize_py")
13649 (synopsis "Gets image size of files in variaous formats in Python")
13650 (description
13651 "This package allows determination of image size from
13652 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13653 (license license:expat)))
13654
13655 (define-public python2-imagesize
13656 (package-with-python2 python-imagesize))
13657
13658 (define-public python-axolotl-curve25519
13659 (package
13660 (name "python-axolotl-curve25519")
13661 (version "0.1")
13662 (source
13663 (origin
13664 (method git-fetch)
13665 (uri (git-reference
13666 (url "https://github.com/tgalal/python-axolotl-curve25519")
13667 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13668 (file-name (string-append name "-" version "-checkout"))
13669 (sha256
13670 (base32
13671 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13672 (build-system python-build-system)
13673 (arguments
13674 `(;; Prevent creation of the egg. This works around
13675 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13676 #:configure-flags '("--root=/")))
13677 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13678 (synopsis "Python wrapper for curve25519 library")
13679 (description "This is a python wrapper for the curve25519 library
13680 with ed25519 signatures. The C code was pulled from
13681 libaxolotl-android. At the moment this wrapper is meant for use by
13682 python-axolotl.")
13683 (license (list license:gpl3 ; Most files
13684 license:bsd-3)))) ; curve/curve25519-donna.c
13685
13686 (define-public python2-axolotl-curve25519
13687 (package-with-python2 python-axolotl-curve25519))
13688
13689 (define-public python-axolotl
13690 (package
13691 (name "python-axolotl")
13692 (version "0.1.35")
13693 (source
13694 (origin
13695 (method url-fetch)
13696 (uri (string-append
13697 "https://github.com/tgalal/python-axolotl/archive/"
13698 version ".tar.gz"))
13699 (file-name (string-append name "-" version ".tar.gz"))
13700 (sha256
13701 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13702 (build-system python-build-system)
13703 (arguments
13704 `(#:phases
13705 (modify-phases %standard-phases
13706 ;; Don't install tests
13707 (add-before 'install 'remove-tests
13708 (lambda _
13709 (for-each delete-file-recursively
13710 '("axolotl/tests" "build/lib/axolotl/tests"))
13711 #t)))))
13712 (propagated-inputs
13713 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13714 ("python-dateutil" ,python-dateutil)
13715 ("python-protobuf" ,python-protobuf)
13716 ("python-pycrypto" ,python-pycrypto)))
13717 (home-page "https://github.com/tgalal/python-axolotl")
13718 (synopsis "Python port of libaxolotl-android")
13719 (description "This is a python port of libaxolotl-android. This
13720 is a ratcheting forward secrecy protocol that works in synchronous and
13721 asynchronous messaging environments.")
13722 (license license:gpl3)))
13723
13724 (define-public python2-axolotl
13725 (package-with-python2 python-axolotl))
13726
13727 (define-public python-termstyle
13728 (package
13729 (name "python-termstyle")
13730 (version "0.1.11")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "termstyle" version))
13735 (sha256
13736 (base32
13737 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13738 (build-system python-build-system)
13739 (arguments
13740 '(#:phases
13741 (modify-phases %standard-phases
13742 (replace 'check
13743 (lambda _
13744 (zero? (system* "python" "test3.py")))))))
13745 (home-page "https://github.com/gfxmonk/termstyle")
13746 (synopsis "Console text coloring for Python")
13747 (description "This package provides console text coloring for Python.")
13748 (license license:bsd-3)))
13749
13750 (define-public python-rednose
13751 (package
13752 (name "python-rednose")
13753 (version "1.2.1")
13754 (source
13755 (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "rednose" version))
13758 (sha256
13759 (base32
13760 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13761 (build-system python-build-system)
13762 (arguments
13763 `(#:phases
13764 (modify-phases %standard-phases
13765 (add-after 'unpack 'fix-deps
13766 (lambda _
13767 ;; See <https://github.com/JBKahn/rednose/issues/12>
13768 (substitute* "setup.py"
13769 (("python-termstyle") "termstyle"))
13770 #t)))))
13771 (propagated-inputs
13772 `(("python-colorama" ,python-colorama)
13773 ("python-termstyle" ,python-termstyle)))
13774 (native-inputs
13775 `(("python-six" ,python-six)
13776 ("python-nose" ,python-nose)))
13777 (home-page "https://github.com/JBKahn/rednose")
13778 (synopsis "Colored output for Python nosetests")
13779 (description "This package provides colored output for the
13780 @command{nosetests} command of the Python Nose unit test framework.")
13781 (license license:bsd-3)))
13782
13783 (define-public python2-rednose
13784 (package-with-python2 python-rednose))
13785
13786 (define-public python-flask-restplus
13787 (package
13788 (name "python-flask-restplus")
13789 (version "0.9.2")
13790 (source
13791 (origin
13792 (method url-fetch)
13793 (uri (pypi-uri "flask-restplus" version))
13794 (sha256
13795 (base32
13796 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13797 (build-system python-build-system)
13798 (arguments
13799 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13800 ;; #:phases
13801 ;; (modify-phases %standard-phases
13802 ;; (replace 'check
13803 ;; (lambda _
13804 ;; (zero? (system* "nosetests")))))))
13805 (propagated-inputs
13806 `(("python-aniso8601" ,python-aniso8601)
13807 ("python-flask" ,python-flask)
13808 ("python-jsonschema" ,python-jsonschema)
13809 ("python-pytz" ,python-pytz)
13810 ("python-six" ,python-six)))
13811 (native-inputs
13812 `(("python-tzlocal" ,python-tzlocal)
13813 ("python-blinker" ,python-blinker)
13814 ("python-nose" ,python-nose)
13815 ("python-rednose" ,python-rednose)))
13816 (home-page "https://github.com/noirbizarre/flask-restplus")
13817 (synopsis "Framework for documented API development with Flask")
13818 (description "This package provides a framework for API development with
13819 the Flask web framework in Python. It is similar to package
13820 @code{python-flask-restful} but supports the @code{python-swagger}
13821 documentation builder.")
13822 (license license:expat)))
13823
13824 (define-public python-sadisplay
13825 (package
13826 (name "python-sadisplay")
13827 (version "0.4.6")
13828 (source
13829 (origin
13830 (method url-fetch)
13831 (uri (pypi-uri "sadisplay" version))
13832 (sha256
13833 (base32
13834 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13835 (build-system python-build-system)
13836 (propagated-inputs
13837 `(("python-sqlalchemy" ,python-sqlalchemy)))
13838 (native-inputs
13839 `(("python-nose" ,python-nose)))
13840 (home-page "https://bitbucket.org/estin/sadisplay")
13841 (synopsis "SQLAlchemy schema displayer")
13842 (description "This package provides a program to build Entity
13843 Relationship diagrams from a SQLAlchemy model (or directly from the
13844 database).")
13845 (license license:bsd-3)))
13846
13847 (define-public python2-sadisplay
13848 (package-with-python2 python-sadisplay))
13849
13850 (define-public python-flask-restful-swagger
13851 (package
13852 (name "python-flask-restful-swagger")
13853 (version "0.19")
13854 (source
13855 (origin
13856 (method url-fetch)
13857 (uri (pypi-uri "flask-restful-swagger" version))
13858 (sha256
13859 (base32
13860 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13861 (build-system python-build-system)
13862 (propagated-inputs
13863 `(("python-flask-restful" ,python-flask-restful)))
13864 (home-page "https://github.com/rantav/flask-restful-swagger")
13865 (synopsis "Extract Swagger specs from Flask-Restful projects")
13866 (description "This package lets you extract Swagger API documentation
13867 specs from your Flask-Restful projects.")
13868 (license license:expat)))
13869
13870 (define-public python2-flask-restful-swagger
13871 (package-with-python2 python-flask-restful-swagger))
13872
13873 (define-public python-argcomplete
13874 (package
13875 (name "python-argcomplete")
13876 (version "1.7.0")
13877 (source
13878 (origin
13879 (method url-fetch)
13880 (uri (pypi-uri "argcomplete" version))
13881 (sha256
13882 (base32
13883 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13884 (build-system python-build-system)
13885 (native-inputs
13886 `(("python-pexpect" ,python-pexpect)
13887 ("tcsh" ,tcsh)
13888 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13889 (home-page "https://github.com/kislyuk/argcomplete")
13890 (synopsis "Shell tab completion for Python argparse")
13891 (description "argcomplete provides extensible command line tab completion
13892 of arguments and options for Python scripts using @code{argparse}. It's
13893 particularly useful for programs with many options or sub-parsers that can
13894 dynamically suggest completions; for example, when browsing resources over the
13895 network.")
13896 (license license:asl2.0)))
13897
13898 (define-public python2-argcomplete
13899 (package-with-python2 python-argcomplete))
13900
13901 (define-public python-xopen
13902 (package
13903 (name "python-xopen")
13904 (version "0.1.1")
13905 (source
13906 (origin
13907 (method url-fetch)
13908 (uri (pypi-uri "xopen" version))
13909 (sha256
13910 (base32
13911 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13912 (file-name (string-append name "-" version ".tar.gz"))))
13913 (build-system python-build-system)
13914 (home-page "https://github.com/marcelm/xopen/")
13915 (synopsis "Open compressed files transparently")
13916 (description "This module provides an @code{xopen} function that works like
13917 Python's built-in @code{open} function, but can also deal with compressed files.
13918 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13919 recognized by their file extensions. The focus is on being as efficient as
13920 possible on all supported Python versions.")
13921 (license license:expat)))
13922
13923 (define-public python2-xopen
13924 (package-with-python2 python-xopen))
13925
13926 (define-public python2-cheetah
13927 (package
13928 (name "python2-cheetah")
13929 (version "2.4.4")
13930 (source
13931 (origin
13932 (method url-fetch)
13933 (uri (pypi-uri "Cheetah" version))
13934 (sha256
13935 (base32
13936 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13937 (build-system python-build-system)
13938 (arguments
13939 `(#:python ,python-2))
13940 (propagated-inputs
13941 `(("python2-markdown" ,python2-markdown)))
13942 (home-page "https://pythonhosted.org/Cheetah/")
13943 (synopsis "Template engine")
13944 (description "Cheetah is a text-based template engine and Python code
13945 generator.
13946
13947 Cheetah can be used as a standalone templating utility or referenced as
13948 a library from other Python applications. It has many potential uses,
13949 but web developers looking for a viable alternative to ASP, JSP, PHP and
13950 PSP are expected to be its principle user group.
13951
13952 Features:
13953 @enumerate
13954 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13955 text-based format.
13956 @item Cleanly separates content, graphic design, and program code.
13957 @item Blends the power and flexibility of Python with a simple template language
13958 that non-programmers can understand.
13959 @item Gives template writers full access to any Python data structure, module,
13960 function, object, or method in their templates.
13961 @item Makes code reuse easy by providing an object-orientated interface to
13962 templates that is accessible from Python code or other Cheetah templates.
13963 One template can subclass another and selectively reimplement sections of it.
13964 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13965 improve the performance of a dynamic website.
13966 @item Compiles templates into optimized, yet readable, Python code.
13967 @end enumerate")
13968 (license (license:x11-style "file://LICENSE"))))
13969
13970 (define-public python-dulwich
13971 (package
13972 (name "python-dulwich")
13973 (version "0.16.3")
13974 (source
13975 (origin
13976 (method url-fetch)
13977 (uri (list (string-append "https://www.dulwich.io/releases/"
13978 "dulwich-" version ".tar.gz")
13979 (pypi-uri "dulwich" version)))
13980 (sha256
13981 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13982 (build-system python-build-system)
13983 (arguments
13984 `(#:phases
13985 (modify-phases %standard-phases
13986 (add-before 'check 'fix-tests
13987 (lambda* (#:key inputs #:allow-other-keys)
13988 ;; The tests use Popen with a custom environment which doesn't
13989 ;; include PATH.
13990 (substitute* "dulwich/tests/compat/utils.py"
13991 (("'git'") (string-append "'"
13992 (which "git")
13993 "'")))
13994 (substitute* '("dulwich/tests/test_repository.py"
13995 "dulwich/tests/test_hooks.py")
13996 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13997 (setenv "TEST_RUNNER" "unittest")
13998 (setenv "PYTHONHASHSEED" "random")
13999 #t)))))
14000 (propagated-inputs
14001 `(("python-fastimport" ,python-fastimport)))
14002 (native-inputs
14003 `(("python-mock" ,python-mock)
14004 ("python-geventhttpclient" ,python-geventhttpclient)
14005 ("git" ,git)))
14006 (home-page "https://www.dulwich.io/")
14007 (synopsis "Git implementation in Python")
14008 (description "Dulwich is an implementation of the Git file formats and
14009 protocols written in pure Python.")
14010 ;; Can be used with either license.
14011 (license (list license:asl2.0 license:gpl2+))))
14012
14013 (define-public python2-dulwich
14014 (package-with-python2 python-dulwich))
14015
14016 (define-public python-pbkdf2
14017 (package
14018 (name "python-pbkdf2")
14019 (version "1.3")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (pypi-uri "pbkdf2" version))
14024 (sha256
14025 (base32
14026 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14027 (build-system python-build-system)
14028 (arguments
14029 '(#:phases
14030 (modify-phases %standard-phases
14031 (replace 'check
14032 (lambda _
14033 (setenv "PYTHONPATH"
14034 (string-append (getcwd) "/build/lib:"
14035 (getenv "PYTHONPATH")))
14036 (zero? (system* "python" "test/test_pbkdf2.py")))))))
14037 (propagated-inputs
14038 `(("python-pycrypto" ,python-pycrypto))) ; optional
14039 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
14040 (synopsis "Password-based key derivation")
14041 (description "This module implements the password-based key derivation
14042 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14043
14044 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14045 is part of the RSA Public Key Cryptography Standards series. The provided
14046 implementation takes a password or a passphrase and a salt value (and
14047 optionally a iteration count, a digest module, and a MAC module) and provides
14048 a file-like object from which an arbitrarly-sized key can be read.")
14049 (license license:expat)))
14050
14051 (define-public python2-pbkdf2
14052 (package-with-python2 python-pbkdf2))
14053
14054 (define-public python-qrcode
14055 (package
14056 (name "python-qrcode")
14057 (version "5.3")
14058 (source
14059 (origin
14060 (method url-fetch)
14061 (uri (pypi-uri "qrcode" version))
14062 (sha256
14063 (base32
14064 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
14065 (build-system python-build-system)
14066 (arguments
14067 ;; FIXME: Tests require packaging 'pymaging'.
14068 '(#:tests? #f))
14069 (propagated-inputs
14070 `(("python-lxml" ,python-lxml) ; for SVG output
14071 ("python-pillow" ,python-pillow) ; for PNG output
14072 ("python-six" ,python-six)))
14073 (home-page "https://github.com/lincolnloop/python-qrcode")
14074 (synopsis "QR Code image generator")
14075 (description "This package provides a pure Python QR Code generator
14076 module. It uses the Python Imaging Library (PIL) to allow for the generation
14077 of QR Codes.
14078
14079 In addition this package provides a command line tool to generate QR codes and
14080 either write these QR codes to a file or do the output as ascii art at the
14081 console.")
14082 (license license:bsd-3)))
14083
14084 (define-public python2-qrcode
14085 (package-with-python2 python-qrcode))
14086
14087 ;; SlowAES isn't compatible with Python 3.
14088 (define-public python2-slowaes
14089 (package
14090 (name "python2-slowaes")
14091 (version "0.1a1")
14092 (source
14093 (origin
14094 (method url-fetch)
14095 (uri (pypi-uri "slowaes" version))
14096 (sha256
14097 (base32
14098 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
14099 (build-system python-build-system)
14100 (arguments `(#:python ,python-2))
14101 (home-page "http://code.google.com/p/slowaes/")
14102 (synopsis "Implementation of AES in Python")
14103 (description "This package contains an implementation of AES in Python.
14104 This implementation is slow (hence the project name) but still useful when
14105 faster ones are not available.")
14106 (license license:asl2.0)))
14107
14108 (define-public python-rst2ansi
14109 (package
14110 (name "python-rst2ansi")
14111 (version "0.1.5")
14112 (source
14113 (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "rst2ansi" version))
14116 (sha256
14117 (base32
14118 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14119 (build-system python-build-system)
14120 (propagated-inputs
14121 `(("python-docutils" ,python-docutils)))
14122 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14123 (synopsis "Convert RST to ANSI-decorated console output")
14124 (description
14125 "Python module dedicated to rendering RST (reStructuredText) documents
14126 to ansi-escaped strings suitable for display in a terminal.")
14127 (license license:expat)))
14128
14129 (define-public python-ansi2html
14130 (package
14131 (name "python-ansi2html")
14132 (version "1.2.0")
14133 (source
14134 (origin
14135 (method url-fetch)
14136 (uri (pypi-uri "ansi2html" version))
14137 (sha256
14138 (base32
14139 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14140 (build-system python-build-system)
14141 (native-inputs
14142 `(("python-mock" ,python-mock)
14143 ("python-nose" ,python-nose)))
14144 (propagated-inputs
14145 `(("python-six" ,python-six)))
14146 (home-page "http://github.com/ralphbean/ansi2html")
14147 (synopsis "Convert ANSI-decorated console output to HTML")
14148 (description
14149 "@command{ansi2html} is a Python library and command line utility for
14150 convering text with ANSI color codes to HTML or LaTeX.")
14151 (license license:gpl3+)))
14152
14153 (define-public python2-ansi2html
14154 (package-with-python2 python-ansi2html))
14155
14156 (define-public python-ddt
14157 (package
14158 (name "python-ddt")
14159 (version "1.1.1")
14160 (source
14161 (origin
14162 (method url-fetch)
14163 (uri (pypi-uri "ddt" version))
14164 (sha256
14165 (base32
14166 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
14167 (build-system python-build-system)
14168 (native-inputs
14169 `(("python-mock" ,python-mock)
14170 ("python-nose" ,python-nose)))
14171 (propagated-inputs
14172 `(("python-six" ,python-six)
14173 ("python-pyyaml" ,python-pyyaml)))
14174 (home-page "https://github.com/txels/ddt")
14175 (synopsis "Data-Driven Tests")
14176 (description
14177 "DDT (Data-Driven Tests) allows you to multiply one test case by running
14178 it with different test data, and make it appear as multiple test cases.")
14179 (license license:expat)))
14180
14181 (define-public python2-ddt
14182 (package-with-python2 python-ddt))
14183
14184 (define-public python-pycosat
14185 (package
14186 (name "python-pycosat")
14187 (version "0.6.1")
14188 (source
14189 (origin
14190 (method url-fetch)
14191 (uri (pypi-uri "pycosat" version))
14192 (sha256
14193 (base32
14194 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
14195 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14196 (build-system python-build-system)
14197 (home-page "https://github.com/ContinuumIO/pycosat")
14198 (synopsis "Bindings to picosat (a SAT solver)")
14199 (description
14200 "This package provides efficient Python bindings to @code{picosat} on
14201 the C level. When importing pycosat, the @code{picosat} solver becomes part
14202 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14203 Problem} (SAT) solver.")
14204 (license license:expat)))
14205
14206 (define-public python2-pycosat
14207 (package-with-python2 python-pycosat))
14208
14209 (define-public python2-ruamel.ordereddict
14210 (package
14211 (name "python2-ruamel.ordereddict")
14212 (version "0.4.9")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (pypi-uri "ruamel.ordereddict" version))
14217 (sha256
14218 (base32
14219 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14220 (build-system python-build-system)
14221 (arguments
14222 `(#:python ,python-2
14223 #:phases
14224 (modify-phases %standard-phases
14225 (delete 'check)
14226 (add-after 'install 'check
14227 (lambda* (#:key inputs outputs #:allow-other-keys)
14228 (add-installed-pythonpath inputs outputs)
14229 (zero? (system* "python" "test/testordereddict.py")))))))
14230 (home-page "https://bitbucket.org/ruamel/ordereddict")
14231 (synopsis "Version of dict that keeps keys in insertion order")
14232 (description
14233 "This is an implementation of an ordered dictionary with @dfn{Key
14234 Insertion Order} (KIO: updates of values do not affect the position of the
14235 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14236 removed and put at the back). The standard library module @code{OrderedDict},
14237 implemented later, implements a subset of @code{ordereddict} functionality.
14238 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14239 Order} (KSO, no sorting function can be specified, but a transform can be
14240 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14241 (license license:expat)))
14242
14243 (define-public python-pypeg2
14244 (package
14245 (name "python-pypeg2")
14246 (version "2.15.2")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "pyPEG2" version))
14251 (sha256
14252 (base32
14253 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14254 (build-system python-build-system)
14255 (propagated-inputs `(("python-lxml" ,python-lxml)))
14256 (arguments
14257 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14258 '(#:tests? #f))
14259 (home-page "https://fdik.org/pyPEG/")
14260 (synopsis "Parsering Expression Grammars in Python")
14261 (description "PyPEG is an intrinsic parser interpreter framework for
14262 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14263 parse many formal languages.")
14264 (license license:gpl2)))
14265
14266 (define-public python-incremental
14267 (package
14268 (name "python-incremental")
14269 (version "17.5.0")
14270 (source
14271 (origin
14272 (method url-fetch)
14273 (uri (pypi-uri "incremental" version))
14274 (sha256
14275 (base32
14276 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14277 (build-system python-build-system)
14278 (home-page "https://github.com/hawkowl/incremental")
14279 (synopsis "Library for versioning Python projects")
14280 (description "Incremental is a small library that versions your Python
14281 projects.")
14282 (license license:expat)))
14283
14284 (define-public python2-incremental
14285 (package-with-python2 python-incremental))
14286
14287 (define-public python-automat
14288 (package
14289 (name "python-automat")
14290 (version "0.6.0")
14291 (source (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "Automat" version))
14294 (sha256
14295 (base32
14296 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
14297 (build-system python-build-system)
14298 ;; We disable the tests because they require python-twisted, while
14299 ;; python-twisted depends on python-automat. Twisted is optional, but the
14300 ;; tests fail if it is not available. Also see
14301 ;; <https://github.com/glyph/automat/issues/71>.
14302 (arguments '(#:tests? #f))
14303 (native-inputs
14304 `(("python-m2r" ,python-m2r)
14305 ("python-setuptools-scm" ,python-setuptools-scm)
14306 ("python-graphviz" ,python-graphviz)))
14307 (propagated-inputs
14308 `(("python-six" ,python-six)
14309 ("python-attrs" ,python-attrs)))
14310 (home-page "https://github.com/glyph/Automat")
14311 (synopsis "Self-service finite-state machines")
14312 (description "Automat is a library for concise, idiomatic Python
14313 expression of finite-state automata (particularly deterministic finite-state
14314 transducers).")
14315 (license license:expat)))
14316
14317 (define-public python2-automat
14318 (package-with-python2 python-automat))
14319
14320 (define-public python-m2r
14321 (package
14322 (name "python-m2r")
14323 (version "0.1.12")
14324 (source (origin
14325 (method url-fetch)
14326 (uri (pypi-uri "m2r" version))
14327 (sha256
14328 (base32
14329 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
14330 (build-system python-build-system)
14331 (propagated-inputs
14332 `(("python-docutils" ,python-docutils)
14333 ("python-mistune" ,python-mistune)))
14334 (native-inputs
14335 `(("python-pygments" ,python-pygments)
14336 ("python-mock" ,python-mock)))
14337 (home-page "https://github.com/miyakogi/m2r")
14338 (synopsis "Markdown to reStructuredText converter")
14339 (description "M2R converts a markdown file including reST markups to valid
14340 reST format.")
14341 (license license:expat)))
14342
14343 (define-public python2-m2r
14344 (package-with-python2 python-m2r))
14345
14346 (define-public python-constantly
14347 (package
14348 (name "python-constantly")
14349 (version "15.1.0")
14350 (source (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "constantly" version))
14353 (sha256
14354 (base32
14355 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14356 (build-system python-build-system)
14357 (home-page "https://github.com/twisted/constantly")
14358 (synopsis "Symbolic constants in Python")
14359 (description "Constantly is a Python library that provides symbolic
14360 constant support. It includes collections and constants with text, numeric,
14361 and bit flag values.")
14362 (license license:expat)))
14363
14364 (define-public python2-constantly
14365 (package-with-python2 python-constantly))
14366
14367 (define-public python-attrs
14368 (package
14369 (name "python-attrs")
14370 (version "17.2.0")
14371 (source (origin
14372 (method url-fetch)
14373 (uri (pypi-uri "attrs" version))
14374 (sha256
14375 (base32
14376 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
14377 (build-system python-build-system)
14378 (native-inputs
14379 `(("python-pytest" ,python-pytest)
14380 ("python-hypothesis" ,python-hypothesis)
14381 ("python-zope-interface" ,python-zope-interface)
14382 ("python-six" ,python-six)))
14383 (home-page "https://github.com/python-attrs/attrs/")
14384 (synopsis "Attributes without boilerplate")
14385 (description "@code{attrs} is a Python package with class decorators that
14386 ease the chores of implementing the most common attribute-related object
14387 protocols.")
14388 (license license:expat)))
14389
14390 (define-public python2-attrs
14391 (package-with-python2 python-attrs))
14392
14393 (define-public python2-cliapp
14394 (package
14395 (name "python2-cliapp")
14396 (version "1.20170823")
14397 (source
14398 (origin
14399 (method url-fetch)
14400 (uri (string-append
14401 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14402 version ".tar.gz"))
14403 (sha256
14404 (base32
14405 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
14406 (build-system python-build-system)
14407 (arguments
14408 `(#:python ,python-2
14409 #:phases
14410 (modify-phases %standard-phases
14411 ;; check phase needs to be run before the build phase. If not,
14412 ;; coverage-test-runner looks for tests for the built source files,
14413 ;; and fails.
14414 (delete 'check)
14415 (add-before 'build 'check
14416 (lambda _
14417 ;; Disable python3 tests
14418 (substitute* "check"
14419 (("python3") "# python3"))
14420 (zero? (system* "./check")))))))
14421 (native-inputs
14422 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14423 ("python2-pep8" ,python2-pep8)))
14424 (propagated-inputs
14425 `(("python2-pyaml" ,python2-pyaml)))
14426 (home-page "https://liw.fi/cliapp/")
14427 (synopsis "Python framework for command line programs")
14428 (description "@code{python2-cliapp} is a python framework for
14429 command line programs. It contains the typical stuff such programs
14430 need to do, such as parsing the command line for options, and
14431 iterating over input files.")
14432 (license license:gpl2+)))
14433
14434 (define-public python2-ttystatus
14435 (package
14436 (name "python2-ttystatus")
14437 (version "0.35")
14438 (source
14439 (origin
14440 (method url-fetch)
14441 (uri (string-append
14442 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14443 version ".tar.gz"))
14444 (sha256
14445 (base32
14446 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
14447 (build-system python-build-system)
14448 (native-inputs
14449 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14450 ("python2-pep8" ,python2-pep8)))
14451 (arguments
14452 `(#:python ,python-2
14453 #:phases
14454 (modify-phases %standard-phases
14455 ;; check phase needs to be run before the build phase. If not,
14456 ;; coverage-test-runner looks for tests for the built source files,
14457 ;; and fails.
14458 (delete 'check)
14459 (add-before 'build 'check
14460 (lambda _
14461 (zero? (system* "make" "check")))))))
14462 (home-page "https://liw.fi/ttystatus/")
14463 (synopsis "Python library for showing progress reporting and
14464 status updates on terminals")
14465 (description "@code{python2-ttystatus} is a python library for
14466 showing progress reporting and status updates on terminals, for
14467 command line programs. Output is automatically adapted to the width
14468 of the terminal: truncated if it does not fit, and resized if the
14469 terminal size changes.")
14470 (license license:gpl3+)))
14471
14472 (define-public python2-tracing
14473 (package
14474 (name "python2-tracing")
14475 (version "0.10")
14476 (source
14477 (origin
14478 (method url-fetch)
14479 (uri (string-append
14480 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14481 version ".tar.gz"))
14482 (sha256
14483 (base32
14484 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14485 (build-system python-build-system)
14486 (arguments
14487 `(#:python ,python-2))
14488 (home-page "https://liw.fi/tracing/")
14489 (synopsis "Python debug logging helper")
14490 (description "@code{python2-tracing} is a python library for
14491 logging debug messages. It provides a way to turn debugging messages
14492 on and off, based on the filename they occur in. It is much faster
14493 than using @code{logging.Filter} to accomplish the same thing, which
14494 matters when code is run in production mode. The actual logging still
14495 happens using the @code{logging} library.")
14496 (license license:gpl3+)))
14497
14498 (define-public python2-larch
14499 (package
14500 (name "python2-larch")
14501 (version "1.20151025")
14502 (source
14503 (origin
14504 (method url-fetch)
14505 (uri (string-append
14506 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14507 version ".tar.gz"))
14508 (patches (search-patches
14509 "python2-larch-coverage-4.0a6-compatibility.patch"))
14510 (sha256
14511 (base32
14512 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14513 (build-system python-build-system)
14514 (arguments
14515 `(#:python ,python-2
14516 #:phases
14517 (modify-phases %standard-phases
14518 ;; check phase needs to be run before the build phase. If not,
14519 ;; coverage-test-runner looks for tests for the built source files,
14520 ;; and fails.
14521 (delete 'check)
14522 (add-before 'build 'check
14523 (lambda _
14524 (zero? (system* "make" "check")))))))
14525 (native-inputs
14526 `(("cmdtest" ,cmdtest)
14527 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14528 (propagated-inputs
14529 `(("python2-tracing" ,python2-tracing)))
14530 (home-page "https://liw.fi/larch/")
14531 (synopsis "Python copy-on-write B-tree library")
14532 (description "@code{python2-larch} is an implementation of
14533 particular kind of B-tree, based on research by Ohad Rodeh. See
14534 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14535 on the data structure.
14536
14537 The distinctive feature of this B-tree is that a node is never
14538 (conceptually) modified. Instead, all updates are done by
14539 copy-on-write. This makes it easy to clone a tree, and modify only the
14540 clone, while other processes access the original tree.")
14541 (license license:gpl3+)))
14542
14543 (define-public python-htmlmin
14544 (package
14545 (name "python-htmlmin")
14546 (version "0.1.10")
14547 (source
14548 (origin
14549 (method url-fetch)
14550 (uri (pypi-uri "htmlmin" version))
14551 (sha256
14552 (base32
14553 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14554 (arguments
14555 `(#:tests? #f)) ;htmlmin has no tests
14556 (build-system python-build-system)
14557 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14558 (synopsis "HTML minifier")
14559 (description "@code{htmlmin} is an HTML minifier that just works.
14560 It comes with safe defaults and easily configurable options.")
14561 (license license:bsd-3)))
14562
14563 (define-public python2-htmlmin
14564 (package-with-python2 python-htmlmin))
14565
14566 (define-public python-flask-htmlmin
14567 (package
14568 (name "python-flask-htmlmin")
14569 (version "1.2")
14570 (source
14571 (origin
14572 (method url-fetch)
14573 (uri (pypi-uri "Flask-HTMLmin" version))
14574 (sha256
14575 (base32
14576 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14577 (propagated-inputs
14578 `(("python-flask" ,python-flask)
14579 ("python-htmlmin" ,python-htmlmin)))
14580 (build-system python-build-system)
14581 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14582 (synopsis "HTML response minifier for Flask")
14583 (description
14584 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14585 (license license:bsd-3)))
14586
14587 (define-public python2-flask-htmlmin
14588 (package-with-python2 python-flask-htmlmin))
14589
14590 (define-public python-flask-login
14591 (package
14592 (name "python-flask-login")
14593 (version "0.4.0")
14594 (source
14595 (origin
14596 (method url-fetch)
14597 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14598 version ".tar.gz"))
14599 (file-name (string-append name "-" version ".tar.gz"))
14600 (sha256
14601 (base32
14602 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14603 (arguments
14604 ;; Tests fail PEP8 compliance. See:
14605 ;; https://github.com/maxcountryman/flask-login/issues/340
14606 `(#:tests? #f))
14607 (build-system python-build-system)
14608 (home-page "https://github.com/maxcountryman/flask-login")
14609 (synopsis "User session management for Flask")
14610 (description
14611 "@code{Flask-Login} provides user session management for Flask. It
14612 handles the common tasks of logging in, logging out, and remembering your
14613 users' sessions over extended periods of time.")
14614 (license license:expat)))
14615
14616 (define-public python2-flask-login
14617 (package-with-python2 python-flask-login))
14618
14619 (define-public python-astroid
14620 (package
14621 (name "python-astroid")
14622 (version "1.5.3")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (string-append
14627 "https://github.com/PyCQA/astroid/archive/astroid-"
14628 version ".tar.gz"))
14629 (sha256
14630 (base32
14631 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14632 (build-system python-build-system)
14633 (propagated-inputs
14634 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14635 ("python-six" ,python-six)
14636 ("python-wrapt" ,python-wrapt)))
14637 (arguments
14638 `(#:phases
14639 (modify-phases %standard-phases
14640 (replace 'check
14641 (lambda _
14642 (zero? (system* "python" "-m" "unittest" "discover"
14643 "-p" "unittest*.py")))))))
14644 (home-page "https://github.com/PyCQA/astroid")
14645 (synopsis "Common base representation of python source code for pylint and
14646 other projects")
14647 (description "@code{python-astroid} provides a common base representation
14648 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14649
14650 It provides a compatible representation which comes from the _ast module. It
14651 rebuilds the tree generated by the builtin _ast module by recursively walking
14652 down the AST and building an extended ast. The new node classes have
14653 additional methods and attributes for different usages. They include some
14654 support for static inference and local name scopes. Furthermore, astroid
14655 builds partial trees by inspecting living objects.")
14656 (license license:lgpl2.1+)
14657 (properties `((python2-variant . ,(delay python2-astroid))))))
14658
14659 (define-public python2-astroid
14660 (let ((base (package-with-python2
14661 (strip-python2-variant python-astroid))))
14662 (package (inherit base)
14663 (propagated-inputs
14664 `(("python2-backports-functools-lru-cache"
14665 ,python2-backports-functools-lru-cache)
14666 ("python2-enum34" ,python2-enum34)
14667 ("python2-singledispatch" ,python2-singledispatch)
14668 ,@(package-propagated-inputs base))))))
14669
14670 (define-public python-isort
14671 (package
14672 (name "python-isort")
14673 (version "4.2.5")
14674 (source
14675 (origin
14676 (method url-fetch)
14677 (uri (string-append
14678 "https://github.com/timothycrosley/isort/archive/"
14679 version ".tar.gz"))
14680 (file-name (string-append name "-" version ".tar.gz"))
14681 (sha256
14682 (base32
14683 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14684 (build-system python-build-system)
14685 (native-inputs
14686 `(("python-mock" ,python-mock)
14687 ("python-pytest" ,python-pytest)))
14688 (home-page "https://github.com/timothycrosley/isort")
14689 (synopsis "Python utility/library to sort python imports")
14690 (description "@code{python-isort} is a python utility/library to sort
14691 imports alphabetically, and automatically separated into sections. It
14692 provides a command line utility, a python library and plugins for various
14693 editors.")
14694 (license license:expat)))
14695
14696 (define-public python2-isort
14697 (package-with-python2 python-isort))
14698
14699 (define-public python2-backports-functools-lru-cache
14700 (package
14701 (name "python2-backports-functools-lru-cache")
14702 (version "1.3")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 ;; only the pypi tarballs contain the necessary metadata
14707 (uri (pypi-uri "backports.functools_lru_cache" version))
14708 (sha256
14709 (base32
14710 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14711 (build-system python-build-system)
14712 (native-inputs
14713 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14714 (arguments
14715 `(#:python ,python-2))
14716 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14717 (synopsis "Backport of functools.lru_cache from Python 3.3")
14718 (description "@code{python2-backports-functools-lru-cache} is a backport
14719 of @code{functools.lru_cache} from python 3.3.")
14720 (license license:expat)))
14721
14722 (define-public python-configparser
14723 (package
14724 (name "python-configparser")
14725 (version "3.5.0")
14726 (source
14727 (origin
14728 (method url-fetch)
14729 (uri (string-append
14730 "https://bitbucket.org/ambv/configparser/get/"
14731 version ".tar.bz2"))
14732 (file-name (string-append name "-" version ".tar.gz"))
14733 (sha256
14734 (base32
14735 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14736 (build-system python-build-system)
14737 (home-page "http://docs.python.org/py3k/library/configparser.html")
14738 (synopsis "Backport of configparser from python 3.5")
14739 (description "@code{python-configparser} is a backport of
14740 @code{configparser} from Python 3.5 so that it can be used directly
14741 in other versions.")
14742 (license license:expat)))
14743
14744 (define-public python2-configparser
14745 (package-with-python2 python-configparser))
14746
14747 (define-public python2-coverage-test-runner
14748 (package
14749 (name "python2-coverage-test-runner")
14750 (version "1.11")
14751 (source
14752 (origin
14753 (method url-fetch)
14754 (uri (string-append
14755 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14756 "coverage-test-runner/snapshot/coverage-test-runner-"
14757 version ".tar.gz"))
14758 (sha256
14759 (base32
14760 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14761 (build-system python-build-system)
14762 (arguments
14763 `(#:python ,python-2
14764 #:phases
14765 (modify-phases %standard-phases
14766 (replace 'check
14767 (lambda _
14768 (zero? (system* "./testrun")))))))
14769 (propagated-inputs
14770 `(("python2-coverage" ,python2-coverage)))
14771 (home-page "https://liw.fi/coverage-test-runner/")
14772 (synopsis "Python module for running unit tests")
14773 (description "@code{CoverageTestRunner} is a python module for running
14774 unit tests and failing them if the unit test module does not exercise all
14775 statements in the module it tests.")
14776 (license license:gpl3+)))
14777
14778 (define-public python-pylint
14779 (package
14780 (name "python-pylint")
14781 (version "1.7.2")
14782 (source
14783 (origin
14784 (method url-fetch)
14785 (uri (string-append
14786 "https://github.com/PyCQA/pylint/archive/pylint-"
14787 version ".tar.gz"))
14788 (sha256
14789 (base32
14790 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14791 (build-system python-build-system)
14792 (native-inputs
14793 `(("python-pytest" ,python-pytest)
14794 ("python-pytest-runner" ,python-pytest-runner)
14795 ("python-tox" ,python-tox)))
14796 (propagated-inputs
14797 `(("python-astroid" ,python-astroid)
14798 ("python-isort" ,python-isort)
14799 ("python-mccabe" ,python-mccabe)
14800 ("python-six" ,python-six)))
14801 (arguments
14802 `(#:phases
14803 (modify-phases %standard-phases
14804 (replace 'check
14805 (lambda _
14806 ;; Somehow, tests for python2-pylint
14807 ;; fail if run from the build directory
14808 (let ((work "/tmp/work"))
14809 (mkdir-p work)
14810 (setenv "PYTHONPATH"
14811 (string-append (getenv "PYTHONPATH") ":" work))
14812 (copy-recursively "." work)
14813 (with-directory-excursion "/tmp"
14814 (zero? (system* "python" "-m" "unittest" "discover"
14815 "-s" (string-append work "/pylint/test")
14816 "-p" "*test_*.py")))))))))
14817 (home-page "https://github.com/PyCQA/pylint")
14818 (synopsis "Python source code analyzer which looks for coding standard
14819 errors")
14820 (description "Pylint is a Python source code analyzer which looks
14821 for programming errors, helps enforcing a coding standard and sniffs
14822 for some code smells (as defined in Martin Fowler's Refactoring book).
14823
14824 Pylint has many rules enabled by default, way too much to silence them
14825 all on a minimally sized program. It's highly configurable and handle
14826 pragmas to control it from within your code. Additionally, it is
14827 possible to write plugins to add your own checks.")
14828 (properties `((python2-variant . ,(delay python2-pylint))))
14829 (license license:gpl2+)))
14830
14831 (define-public python2-pylint
14832 (let ((pylint (package-with-python2
14833 (strip-python2-variant python-pylint))))
14834 (package (inherit pylint)
14835 (propagated-inputs
14836 `(("python2-backports-functools-lru-cache"
14837 ,python2-backports-functools-lru-cache)
14838 ("python2-configparser" ,python2-configparser)
14839 ,@(package-propagated-inputs pylint))))))
14840
14841 (define-public python-paramunittest
14842 (package
14843 (name "python-paramunittest")
14844 (version "0.2")
14845 (source
14846 (origin
14847 (method url-fetch)
14848 (uri (pypi-uri "ParamUnittest" version))
14849 (sha256
14850 (base32
14851 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14852 (build-system python-build-system)
14853 (home-page
14854 "https://github.com/rik0/ParamUnittest")
14855 (synopsis
14856 "Simple extension to have parametrized unit tests")
14857 (description
14858 "This package allows to create parametrized unit-tests that work with the standard
14859 unittest package. A parametrized test case is automatically converted to multiple test
14860 cases. Since they are TestCase subclasses, they work with other test suites that
14861 recognize TestCases.")
14862 (license license:bsd-2)))
14863
14864 (define-public python2-python-paramunittest
14865 (package-with-python2 python-paramunittest))
14866
14867 (define-public python-mando
14868 (package
14869 (name "python-mando")
14870 (version "0.5")
14871 (source
14872 (origin
14873 (method url-fetch)
14874 (uri (pypi-uri "mando" version))
14875 (sha256
14876 (base32
14877 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14878 (build-system python-build-system)
14879 (propagated-inputs
14880 `(("python-rst2ansi" ,python-rst2ansi)))
14881 (native-inputs
14882 `(("python-sphinx" ,python-sphinx-1.5.3)
14883 ("python-paramunittest" ,python-paramunittest)))
14884 (home-page "https://mando.readthedocs.org/")
14885 (synopsis
14886 "Wrapper around argparse, allowing creation of complete CLI applications")
14887 (description
14888 "This package is a wrapper around argparse, allowing you to write complete CLI
14889 applications in seconds while maintaining all the flexibility.")
14890 (license license:expat)))
14891
14892 (define-public python2-mando
14893 (package-with-python2 python-mando))
14894
14895 (define-public python-mando-0.3.1
14896 ;; python-radon (version 1.5.0) has a requirement
14897 ;; for mando<0.4,>=0.3
14898 (package
14899 (inherit python-mando)
14900 (name "python-mando")
14901 (version "0.3.1")
14902 (source
14903 (origin
14904 (method url-fetch)
14905 (uri (string-append "https://github.com/rubik/mando/archive/v"
14906 version
14907 ".tar.gz"))
14908 (sha256
14909 (base32
14910 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14911
14912 (define-public python-fudge
14913 (package
14914 (name "python-fudge")
14915 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14916 ;; package, which is currently the only use of this package.
14917 (version "0.9.6")
14918 (source
14919 (origin
14920 (method url-fetch)
14921 (uri (pypi-uri "fudge" version))
14922 (sha256
14923 (base32
14924 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14925 (build-system python-build-system)
14926 (arguments
14927 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14928 (home-page "https://github.com/fudge-py/fudge")
14929 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14930 (description
14931 "Fudge is a Python module for using fake objects (mocks and stubs) to
14932 test real ones.
14933
14934 In readable Python code, you declare the methods available on your fake object
14935 and how they should be called. Then you inject that into your application and
14936 start testing. This declarative approach means you don’t have to record and
14937 playback actions and you don’t have to inspect your fakes after running code.
14938 If the fake object was used incorrectly then you’ll see an informative
14939 exception message with a traceback that points to the culprit.")
14940 (license license:expat)))
14941
14942 (define-public python2-fudge
14943 (package-with-python2 python-fudge))
14944
14945 (define-public python-oauth2client
14946 (package
14947 (name "python-oauth2client")
14948 (version "4.0.0")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "oauth2client" version))
14953 (sha256
14954 (base32
14955 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14956 (build-system python-build-system)
14957 (arguments
14958 `(#:tests? #f))
14959 (propagated-inputs
14960 `(("python-httplib2" ,python-httplib2)
14961 ("python-pyasn1" ,python-pyasn1)
14962 ("python-pyasn1-modules" ,python-pyasn1-modules)
14963 ("python-rsa" ,python-rsa)
14964 ("python-six" ,python-six)))
14965 (home-page "http://github.com/google/oauth2client/")
14966 (synopsis "OAuth 2.0 client library")
14967 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14968 library for Python")
14969 (license license:asl2.0)))
14970
14971 (define-public python-flask-oidc
14972 (package
14973 (name "python-flask-oidc")
14974 (version "1.1.1")
14975 (source
14976 (origin
14977 (method url-fetch)
14978 (uri (pypi-uri "flask-oidc" version))
14979 (sha256
14980 (base32
14981 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14982 (build-system python-build-system)
14983 (propagated-inputs
14984 `(("python-flask" ,python-flask)
14985 ("python-itsdangerous" ,python-itsdangerous)
14986 ("python-oauth2client" ,python-oauth2client)
14987 ("python-six" ,python-six)))
14988 (native-inputs
14989 `(("python-nose" ,python-nose)
14990 ("python-mock" ,python-mock)))
14991 (home-page "https://github.com/puiterwijk/flask-oidc")
14992 (synopsis "OpenID Connect extension for Flask")
14993 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14994 for Flask.")
14995 (license license:bsd-2)))
14996
14997 (define-public python-mwclient
14998 (package
14999 (name "python-mwclient")
15000 (version "0.8.4")
15001 (source
15002 (origin
15003 (method url-fetch)
15004 ;; The PyPI version wouldn't contain tests.
15005 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
15006 "v" version ".tar.gz"))
15007 (sha256
15008 (base32
15009 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
15010 (build-system python-build-system)
15011 (propagated-inputs
15012 `(("python-requests" ,python-requests)
15013 ("python-requests-oauthlib"
15014 ,python-requests-oauthlib)
15015 ("python-six" ,python-six)))
15016 (native-inputs
15017 `(("python-mock" ,python-mock)
15018 ("python-pytest" ,python-pytest)
15019 ("python-pytest-pep8" ,python-pytest-pep8)
15020 ("python-pytest-cache" ,python-pytest-cache)
15021 ("python-pytest-cov" ,python-pytest-cov)
15022 ("python-responses" ,python-responses)))
15023 (home-page "https://github.com/btongminh/mwclient")
15024 (synopsis "MediaWiki API client")
15025 (description "This package provides a MediaWiki API client.")
15026 (license license:expat)))
15027
15028 (define-public python2-mwclient
15029 (package-with-python2 python-mwclient))
15030
15031 (define-public python-pytest-warnings
15032 (package
15033 (name "python-pytest-warnings")
15034 (version "0.2.0")
15035 (source
15036 (origin
15037 (method url-fetch)
15038 (uri (pypi-uri "pytest-warnings" version))
15039 (sha256
15040 (base32
15041 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
15042 (build-system python-build-system)
15043 (propagated-inputs
15044 `(("pytest" ,python-pytest-3.0)))
15045 (home-page "https://github.com/fschulze/pytest-warnings")
15046 (synopsis "Pytest plugin to list Python warnings in pytest report")
15047 (description
15048 "Python-pytest-warnings is a pytest plugin to list Python warnings in
15049 pytest report.")
15050 (license license:expat)))
15051
15052 (define-public python2-pytest-warnings
15053 (package-with-python2 python-pytest-warnings))
15054
15055 (define-public python-pytest-capturelog
15056 (package
15057 (name "python-pytest-capturelog")
15058 (version "0.7")
15059 (source
15060 (origin
15061 (method url-fetch)
15062 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
15063 (sha256
15064 (base32
15065 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
15066 (build-system python-build-system)
15067 (propagated-inputs
15068 `(("pytest" ,python-pytest-3.0)))
15069 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
15070 (synopsis "Pytest plugin to catch log messages")
15071 (description
15072 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
15073 (license license:expat)))
15074
15075 (define-public python2-pytest-capturelog
15076 (package-with-python2 python-pytest-capturelog))
15077
15078 (define-public python-pytest-catchlog
15079 (package
15080 (name "python-pytest-catchlog")
15081 (version "1.2.2")
15082 (source
15083 (origin
15084 (method url-fetch)
15085 (uri (pypi-uri "pytest-catchlog" version ".zip"))
15086 (sha256
15087 (base32
15088 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
15089 (build-system python-build-system)
15090 (native-inputs
15091 `(("unzip" ,unzip)))
15092 (propagated-inputs
15093 `(("pytest" ,python-pytest-3.0)))
15094 (home-page "https://github.com/eisensheng/pytest-catchlog")
15095 (synopsis "Pytest plugin to catch log messages")
15096 (description
15097 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
15098 a fork of pytest-capturelog.")
15099 (license license:expat)))
15100
15101 (define-public python2-pytest-catchlog
15102 (package-with-python2 python-pytest-catchlog))
15103
15104 (define-public python-utils
15105 (package
15106 (name "python-utils")
15107 (version "2.1.0")
15108 (source (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "python-utils" version))
15111 (sha256
15112 (base32
15113 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
15114 (build-system python-build-system)
15115 (native-inputs
15116 `(("pytest-runner" ,python-pytest-runner)
15117 ("pytest" ,python-pytest)
15118 ("six" ,python-six)))
15119 (home-page "https://github.com/WoLpH/python-utils")
15120 (synopsis "Convenient utilities not included with the standard Python install")
15121 (description
15122 "Python Utils is a collection of small Python functions and classes which
15123 make common patterns shorter and easier.")
15124 (license license:bsd-2)))
15125
15126 (define-public python2-utils
15127 (package-with-python2 python-utils))
15128
15129 (define-public python-webassets
15130 (package
15131 (name "python-webassets")
15132 (version "0.12.1")
15133 (source
15134 (origin
15135 (method url-fetch)
15136 (uri (pypi-uri "webassets" version))
15137 (sha256
15138 (base32
15139 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
15140 (build-system python-build-system)
15141 (native-inputs
15142 `(("python-jinja2" ,python-jinja2)
15143 ("python-mock" ,python-mock)
15144 ("python-nose" ,python-nose)
15145 ("python-pytest" ,python-pytest)))
15146 (home-page "https://github.com/miracle2k/webassets")
15147 (synopsis "Media asset management")
15148 (description "Merges, minifies and compresses Javascript and CSS files,
15149 supporting a variety of different filters, including YUI, jsmin, jspacker or
15150 CSS tidy. Also supports URL rewriting in CSS files.")
15151 (license license:bsd-2)))
15152
15153 (define-public python-sphinx-me
15154 (package
15155 (name "python-sphinx-me")
15156 (version "0.3")
15157 (source
15158 (origin
15159 (method url-fetch)
15160 (uri (pypi-uri "sphinx-me" version))
15161 (sha256
15162 (base32
15163 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
15164 (build-system python-build-system)
15165 (home-page "https://github.com/stephenmcd/sphinx-me")
15166 (synopsis "Create a Sphinx documentation shell")
15167 (description
15168 "Create a Sphinx documentation shell for your project and include the
15169 README file as the documentation index. It handles extracting the required
15170 meta data such as the project name, author and version from your project for
15171 use in your Sphinx docs.")
15172 (license license:bsd-2)))
15173
15174 (define-public python2-sphinx-me
15175 (package-with-python2 python-sphinx-me))
15176
15177 (define-public python-cssmin
15178 (package
15179 (name "python-cssmin")
15180 (version "0.2.0")
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "cssmin" version))
15185 (sha256
15186 (base32
15187 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
15188 (build-system python-build-system)
15189 (home-page "https://github.com/zacharyvoase/cssmin")
15190 (synopsis "Python port of the YUI CSS Compressor")
15191 (description "Python port of the YUI CSS Compressor.")
15192 (license (list license:expat license:bsd-3))))
15193
15194 (define-public python2-cssmin
15195 (package-with-python2 python-cssmin))
15196
15197 (define-public python-diff-match-patch
15198 (package
15199 (name "python-diff-match-patch")
15200 (version "20121119")
15201 (source
15202 (origin
15203 (method url-fetch)
15204 (uri (pypi-uri "diff-match-patch" version))
15205 (sha256
15206 (base32
15207 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15208 (build-system python-build-system)
15209 (home-page "https://code.google.com/p/google-diff-match-patch")
15210 (synopsis "Synchronize plain text")
15211 (description "Diff Match and Patch libraries offer robust algorithms to
15212 perform the operations required for synchronizing plain text.")
15213 (license license:asl2.0)))
15214
15215 (define-public python2-diff-match-patch
15216 (package-with-python2 python-diff-match-patch))
15217
15218 (define-public python-dirsync
15219 (package
15220 (name "python-dirsync")
15221 (version "2.2.2")
15222 (source
15223 (origin
15224 (method url-fetch)
15225 (uri (pypi-uri "dirsync" version ".zip"))
15226 (sha256
15227 (base32
15228 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
15229 (build-system python-build-system)
15230 (native-inputs
15231 `(("unzip" ,unzip)))
15232 (propagated-inputs
15233 `(("six" ,python-six)))
15234 (home-page "https://bitbucket.org/tkhyn/dirsync")
15235 (synopsis "Advanced directory tree synchronisation tool")
15236 (description "Advanced directory tree synchronisation tool.")
15237 (license license:expat)))
15238
15239 (define-public python2-dirsync
15240 (package-with-python2 python-dirsync))
15241
15242 (define-public python-nosexcover
15243 (package
15244 (name "python-nosexcover")
15245 (version "1.0.11")
15246 (source (origin
15247 (method url-fetch)
15248 (uri (pypi-uri "nosexcover" version))
15249 (sha256
15250 (base32
15251 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
15252 (build-system python-build-system)
15253 (propagated-inputs
15254 `(("python-coverage" ,python-coverage)
15255 ("python-nose" ,python-nose)))
15256 (home-page "http://github.com/cmheisel/nose-xcover")
15257 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
15258 (description "Nose-xcover is a companion to the built-in
15259 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
15260 to a file named coverage.xml.
15261
15262 It will honor all the options you pass to the Nose coverage plugin,
15263 especially -cover-package.")
15264 (license license:expat)))
15265
15266 (define-public python2-nosexcover
15267 (package-with-python2 python-nosexcover))
15268
15269 (define-public python-elasticsearch
15270 (package
15271 (name "python-elasticsearch")
15272 (version "1.0.0")
15273 (source
15274 (origin
15275 (method url-fetch)
15276 (uri (pypi-uri "elasticsearch" version))
15277 (sha256
15278 (base32
15279 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
15280 (build-system python-build-system)
15281 (native-inputs
15282 `(("python-mock" ,python-mock)
15283 ("python-nosexcover" ,python-nosexcover)
15284 ("python-pyaml" ,python-pyaml)
15285 ("python-requests" ,python-requests)))
15286 (propagated-inputs
15287 `(("urllib3" ,python-urllib3)))
15288 (arguments
15289 ;; tests require the test_elasticsearch module but it is not distributed.
15290 `(#:tests? #f))
15291 (home-page "https://github.com/elastic/elasticsearch-py")
15292 (synopsis "Low-level client for Elasticsearch")
15293 (description "Official low-level client for Elasticsearch. Its goal is to
15294 provide common ground for all Elasticsearch-related code in Python; because of
15295 this it tries to be opinion-free and very extendable.")
15296 (license license:expat)))
15297
15298 (define-public python2-elasticsearch
15299 (package-with-python2 python-elasticsearch))
15300
15301 (define-public python-levenshtein
15302 (package
15303 (name "python-levenshtein")
15304 (version "0.12.0")
15305 (source
15306 (origin
15307 (method url-fetch)
15308 (uri (pypi-uri "python-Levenshtein" version))
15309 (sha256
15310 (base32
15311 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15312 (build-system python-build-system)
15313 (home-page "https://github.com/ztane/python-Levenshtein")
15314 (synopsis "Fast computation of Levenshtein distance and string similarity")
15315 (description
15316 "The Levenshtein Python C extension module contains functions for fast computation of
15317 @enumerate
15318 @item Levenshtein (edit) distance, and edit operations
15319 @item string similarity
15320 @item approximate median strings, and generally string averaging
15321 @item string sequence and set similarity
15322 @end enumerate
15323 It supports both normal and Unicode strings.")
15324 (license license:gpl2+)))
15325
15326 (define-public python2-levenshtein
15327 (package-with-python2 python-levenshtein))
15328
15329 (define-public python-scandir
15330 (package
15331 (name "python-scandir")
15332 (version "1.4")
15333 (source
15334 (origin
15335 (method url-fetch)
15336 (uri (pypi-uri "scandir" version))
15337 (sha256
15338 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
15339 (build-system python-build-system)
15340 (home-page "https://github.com/benhoyt/scandir")
15341 (synopsis "Directory iteration function")
15342 (description
15343 "Directory iteration function like os.listdir(), except that instead of
15344 returning a list of bare filenames, it yields DirEntry objects that include
15345 file type and stat information along with the name. Using scandir() increases
15346 the speed of os.walk() by 2-20 times (depending on the platform and file
15347 system) by avoiding unnecessary calls to os.stat() in most cases.")
15348 (license license:bsd-3)))
15349
15350 (define-public python2-scandir
15351 (package-with-python2 python-scandir))
15352
15353 (define-public python2-stemming
15354 (package
15355 (name "python2-stemming")
15356 (version "1.0.1")
15357 (source
15358 (origin
15359 (method url-fetch)
15360 (uri (pypi-uri "stemming" version))
15361 (sha256
15362 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15363 (build-system python-build-system)
15364 (arguments
15365 `(#:python ,python-2))
15366 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15367 (synopsis "Python implementations of various stemming algorithms")
15368 (description
15369 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15370 stemming algorithms for English. These implementations are straightforward and
15371 efficient, unlike some Python versions of the same algorithms available on the
15372 Web. This package is an extraction of the stemming code included in the Whoosh
15373 search engine.")
15374 (license license:public-domain)))
15375
15376 (define-public python-factory-boy
15377 (package
15378 (name "python-factory-boy")
15379 (version "2.8.1")
15380 (source
15381 (origin
15382 (method url-fetch)
15383 (uri (pypi-uri "factory_boy" version))
15384 (sha256
15385 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15386 (build-system python-build-system)
15387 (arguments
15388 ;; Tests are not included in the tarball.
15389 `(#:tests? #f))
15390 (propagated-inputs
15391 `(("faker" ,python-faker)))
15392 (home-page "https://github.com/benhoyt/scandir")
15393 (synopsis "Versatile test fixtures replacement")
15394 (description
15395 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15396
15397 As a fixtures replacement tool, it aims to replace static, hard to maintain
15398 fixtures with easy-to-use factories for complex object.
15399
15400 Instead of building an exhaustive test setup with every possible combination
15401 of corner cases, factory_boy allows you to use objects customized for the
15402 current test, while only declaring the test-specific fields")
15403 (license license:expat)))
15404
15405 (define-public python2-factory-boy
15406 (package-with-python2 python-factory-boy))
15407
15408 (define-public python-translate-toolkit
15409 (package
15410 (name "python-translate-toolkit")
15411 (version "2.1.0")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15416 (sha256
15417 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15418 (build-system python-build-system)
15419 (native-inputs
15420 `(("python-pytest" ,python-pytest)
15421 ("python-sphinx" ,python-sphinx)))
15422 (propagated-inputs
15423 `(("python-babel" ,python-babel)
15424 ("python-beautifulsoup4" ,python-beautifulsoup4)
15425 ("python-chardet" ,python-chardet)
15426 ("python-diff-match-patch" ,python-diff-match-patch)
15427 ("python-levenshtein" ,python-levenshtein)
15428 ("python-lxml" ,python-lxml)
15429 ("python-six" ,python-six)
15430 ("python-vobject" ,python-vobject)
15431 ("python-pyyaml" ,python-pyyaml)))
15432 (arguments
15433 ;; TODO: tests are not run, because they end with
15434 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15435 ;; 'parse_funcs'
15436 ;; during test setup.
15437 `(#:tests? #f))
15438 (home-page "http://toolkit.translatehouse.org")
15439 (synopsis "Tools and API for translation and localization engineering")
15440 (description
15441 "Tools and API for translation and localization engineering. It contains
15442 several utilities, as well as an API for building localization tools.")
15443 (license license:gpl2+)))
15444
15445 (define-public python2-translate-toolkit
15446 (package-with-python2 python-translate-toolkit))
15447
15448 (define-public python-mysqlclient
15449 (package
15450 (name "python-mysqlclient")
15451 (version "1.3.10")
15452 (source
15453 (origin
15454 (method url-fetch)
15455 (uri (pypi-uri "mysqlclient" version))
15456 (sha256
15457 (base32
15458 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
15459 (build-system python-build-system)
15460 (native-inputs
15461 `(("mariadb" ,mariadb)
15462 ("nose" ,python-nose)
15463 ("mock" ,python-mock)
15464 ("py.test" ,python-pytest)))
15465 (inputs
15466 `(("mysql" ,mysql)
15467 ("libz" ,zlib)
15468 ("openssl" ,openssl)))
15469 (home-page "https://github.com/PyMySQL/mysqlclient-python")
15470 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
15471 (description "MySQLdb is an interface to the popular MySQL database server
15472 for Python. The design goals are:
15473 @enumerate
15474 @item Compliance with Python database API version 2.0 [PEP-0249],
15475 @item Thread-safety,
15476 @item Thread-friendliness (threads will not block each other).
15477 @end enumerate")
15478 (license license:gpl2)))
15479
15480 (define-public python2-mysqlclient
15481 (package-with-python2 python-mysqlclient))
15482
15483 (define-public python-hiredis
15484 (package
15485 (name "python-hiredis")
15486 (version "0.2.0")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "hiredis" version))
15491 (sha256
15492 (base32
15493 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
15494 (build-system python-build-system)
15495 (arguments
15496 ;; no tests
15497 `(#:tests? #f))
15498 (home-page "https://github.com/redis/hiredis-py")
15499 (synopsis "Python extension that wraps protocol parsing code in hiredis")
15500 (description "Python-hiredis is a python extension that wraps protocol
15501 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
15502 (license license:bsd-3)))
15503
15504 (define-public python2-hiredis
15505 (package-with-python2 python-hiredis))
15506
15507 (define-public python-fakeredis
15508 (package
15509 (name "python-fakeredis")
15510 (version "0.8.2")
15511 (source
15512 (origin
15513 (method url-fetch)
15514 (uri (pypi-uri "fakeredis" version))
15515 (sha256
15516 (base32
15517 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15518 (build-system python-build-system)
15519 (arguments
15520 ;; no tests
15521 `(#:tests? #f))
15522 (home-page "https://github.com/jamesls/fakeredis")
15523 (synopsis "Fake implementation of redis API for testing purposes")
15524 (description "Fakeredis is a pure python implementation of the redis-py
15525 python client that simulates talking to a redis server. This was created for a
15526 single purpose: to write unittests. Setting up redis is not hard, but many time
15527 you want to write unittests that do not talk to an external server (such as
15528 redis). This module now allows tests to simply use this module as a reasonable
15529 substitute for redis.")
15530 (license license:bsd-3)))
15531
15532 (define-public python2-fakeredis
15533 (package-with-python2 python-fakeredis))
15534
15535 (define-public python-behave-web-api
15536 (package
15537 (name "python-behave-web-api")
15538 (version "1.0.6")
15539 (source
15540 (origin
15541 (method url-fetch)
15542 (uri (pypi-uri "behave-web-api" version))
15543 (sha256
15544 (base32
15545 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15546 (build-system python-build-system)
15547 (arguments
15548 `(#:phases
15549 (modify-phases %standard-phases
15550 (add-after 'unpack 'fix-dependencies
15551 (lambda _
15552 (substitute* "setup.py"
15553 (("'wheel'") "") ; We don't use it.
15554 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15555 (propagated-inputs
15556 `(("behave" ,behave)
15557 ("python-requests" ,python-requests)))
15558 (home-page "https://github.com/jefersondaniel/behave-web-api")
15559 (synopsis "Provides testing for JSON APIs with Behave for Python")
15560 (description "This package provides testing utility modules for testing
15561 JSON APIs with Behave.")
15562 (license license:expat)))
15563
15564 (define-public python2-behave-web-api
15565 (package-with-python2 python-behave-web-api))
15566
15567 (define-public python-flask-script
15568 (package
15569 (name "python-flask-script")
15570 (version "2.0.5")
15571 (source
15572 (origin
15573 (method url-fetch)
15574 (uri (pypi-uri "Flask-Script" version))
15575 (sha256
15576 (base32
15577 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15578 (build-system python-build-system)
15579 (propagated-inputs
15580 `(("python-flask" ,python-flask)
15581 ("python-argcomplete" ,python-argcomplete)
15582 ("python-werkzeug" ,python-werkzeug)))
15583 (native-inputs
15584 `(("python-pytest" ,python-pytest)))
15585 (home-page
15586 "http://github.com/smurfix/flask-script")
15587 (synopsis "Scripting support for Flask")
15588 (description "The Flask-Script extension provides support for writing
15589 external scripts in Flask. This includes running a development server,
15590 a customised Python shell, scripts to set up your database, cronjobs,
15591 and other command-line tasks that belong outside the web application
15592 itself.")
15593 (license license:bsd-3)))
15594
15595 (define-public python2-flask-script
15596 (package-with-python2 python-flask-script))
15597
15598 (define-public python-flask-migrate
15599 (package
15600 (name "python-flask-migrate")
15601 (version "2.0.3")
15602 (source
15603 (origin
15604 (method url-fetch)
15605 (uri (pypi-uri "Flask-Migrate" version))
15606 (sha256
15607 (base32
15608 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15609 (build-system python-build-system)
15610 (propagated-inputs
15611 `(("python-flask" ,python-flask)
15612 ("python-alembic" ,python-alembic)
15613 ("python-sqlalchemy" ,python-sqlalchemy)
15614 ("python-flask-script" ,python-flask-script)
15615 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15616 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15617 (synopsis "SQLAlchemy database migrations for Flask programs using
15618 Alembic")
15619 (description "This package contains SQLAlchemy database migration tools
15620 for Flask programs that are using @code{python-alembic}.")
15621 (license license:expat)))
15622
15623 (define-public python2-flask-migrate
15624 (package-with-python2 python-flask-migrate))
15625
15626 (define-public python-packaging
15627 (package
15628 (name "python-packaging")
15629 (version "16.8")
15630 (source
15631 (origin
15632 (method url-fetch)
15633 (uri (pypi-uri "packaging" version))
15634 (sha256
15635 (base32
15636 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15637 (build-system python-build-system)
15638 (native-inputs
15639 `(("python-pretend" ,python-pretend)
15640 ("python-pytest" ,python-pytest)))
15641 (propagated-inputs
15642 `(("python-pyparsing" ,python-pyparsing)
15643 ("python-six" ,python-six)))
15644 (home-page "https://github.com/pypa/packaging")
15645 (synopsis "Core utilities for Python packages")
15646 (description "Packaging is a Python module for dealing with Python packages.
15647 It offers an interface for working with package versions, names, and dependency
15648 information.")
15649 ;; From 'LICENSE': This software is made available under the terms of
15650 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15651 ;; Contributions to this software is made under the terms of *both* these
15652 ;; licenses.
15653 (license (list license:asl2.0 license:bsd-2))))
15654
15655 (define-public python2-packaging
15656 (package-with-python2 python-packaging))
15657
15658 (define-public python-sql
15659 (package
15660 (name "python-sql")
15661 (version "0.9")
15662 (source
15663 (origin
15664 (method url-fetch)
15665 (uri (pypi-uri "python-sql" version))
15666 (sha256
15667 (base32
15668 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15669 (build-system python-build-system)
15670 (home-page "https://python-sql.tryton.org/")
15671 (synopsis "Library to write SQL queries in a pythonic way")
15672 (description "@code{python-sql} is a library to write SQL queries, that
15673 transforms idiomatic python function calls to well-formed SQL queries.")
15674 (license license:bsd-3)))
15675
15676 (define-public python2-sql
15677 (package-with-python2 python-sql))
15678
15679 (define-public python-genshi
15680 (package
15681 (name "python-genshi")
15682 (version "0.7")
15683 (source
15684 (origin
15685 (method url-fetch)
15686 (uri (string-append
15687 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15688 version ".tar.gz"))
15689 (patches
15690 (search-patches
15691 ;; The first 4 patches are in the master branch upstream.
15692 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15693 ;; The last 2 are NOT in any branch.
15694 ;; They were sent as attachments to a ticket opened at
15695 ;; https://genshi.edgewall.org/ticket/602#no1
15696 "python-genshi-stripping-of-unsafe-script-tags.patch"
15697 "python-genshi-disable-speedups-on-python-3.3.patch"
15698 "python-genshi-isstring-helper.patch"
15699 "python-genshi-add-support-for-python-3.4-AST.patch"
15700 "python-genshi-fix-tests-on-python-3.5.patch"
15701 "python-genshi-buildable-on-python-2.7.patch"))
15702 (sha256
15703 (base32
15704 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15705 (build-system python-build-system)
15706 (home-page "https://genshi.edgewall.org/")
15707 (synopsis "Toolkit for generation of output for the web")
15708 (description "Genshi is a Python library that provides an integrated set
15709 of components for parsing, generating, and processing HTML, XML or other
15710 textual content for output generation on the web.")
15711 (license license:bsd-3)))
15712
15713 ;; The linter here claims that patch file names should start with the package
15714 ;; name. But, in this case the patches are inherited from python-genshi with
15715 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15716 (define-public python2-genshi
15717 (package-with-python2 python-genshi))
15718
15719 (define-public python-relatorio
15720 (package
15721 (name "python-relatorio")
15722 (version "0.6.4")
15723 (source
15724 (origin
15725 (method url-fetch)
15726 (uri (pypi-uri "relatorio" version))
15727 (sha256
15728 (base32
15729 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15730 (build-system python-build-system)
15731 (propagated-inputs
15732 `(("python-lxml" ,python-lxml)
15733 ("python-genshi" ,python-genshi)))
15734 (home-page "https://relatorio.tryton.org/")
15735 (synopsis "Templating library able to output ODT and PDF files")
15736 (description "Relatorio is a templating library which provides a way to
15737 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15738 for more filetypes can be easily added by creating plugins for them.")
15739 (license license:gpl3+)))
15740
15741 (define-public python2-relatorio
15742 (package-with-python2 python-relatorio))
15743
15744 (define-public python-radon
15745 (package
15746 (name "python-radon")
15747 (version "1.5.0")
15748 (source
15749 (origin
15750 (method url-fetch)
15751 (uri (pypi-uri "radon" version))
15752 (sha256
15753 (base32
15754 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15755 (build-system python-build-system)
15756 (propagated-inputs
15757 `(("python-colorama" ,python-colorama)
15758 ("python-flake8-polyfill" ,python-flake8-polyfill)
15759 ("python-mando" ,python-mando-0.3.1)))
15760 (native-inputs
15761 `(("python-flake8" ,python-flake8)
15762 ("python-tox" ,python-tox)
15763 ("python-pytest" ,python-pytest)
15764 ("python-paramunittest" ,python-paramunittest)))
15765 (home-page "https://radon.readthedocs.org/")
15766 (synopsis "Code Metrics in Python")
15767 (description "Radon is a Python tool which computes various code metrics.
15768 Supported metrics are:
15769 @itemize @bullet
15770 @item raw metrics: SLOC, comment lines, blank lines, &c.
15771 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15772 @item Halstead metrics (all of them)
15773 @item the Maintainability Index (a Visual Studio metric)
15774 @end itemize")
15775 (license license:expat)))
15776
15777 (define-public python2-radon
15778 (package-with-python2 python-radon))
15779
15780 (define-public python-sure
15781 (package
15782 (name "python-sure")
15783 (version "1.4.6")
15784 (source
15785 (origin
15786 (method url-fetch)
15787 (uri (pypi-uri "sure" version))
15788 (sha256
15789 (base32
15790 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15791 (build-system python-build-system)
15792 (propagated-inputs
15793 `(("python-mock" ,python-mock)
15794 ("python-six" ,python-six)))
15795 (native-inputs
15796 `(("python-nose" ,python-nose)))
15797 (home-page "https://github.com/gabrielfalcao/sure")
15798 (synopsis "Automated testing library in python for python")
15799 (description
15800 "Sure is a python library that leverages a DSL for writing assertions.
15801 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15802 (license license:gpl3+)))
15803
15804 (define-public python2-sure
15805 (package-with-python2 python-sure))
15806
15807 (define-public python2-couleur
15808 ;; This package does not seem to support python3 at all, hence,
15809 ;; only the python2 variant definition is provided.
15810 (package
15811 (name "python2-couleur")
15812 (version "0.6.2")
15813 (source
15814 (origin
15815 (method url-fetch)
15816 (uri (pypi-uri "couleur" version))
15817 (sha256
15818 (base32
15819 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15820 (build-system python-build-system)
15821 (arguments
15822 `(#:python ,python-2))
15823 (home-page "https://github.com/gabrielfalcao/couleur")
15824 (synopsis
15825 "ANSI terminal tool for python, colored shell and other handy fancy features")
15826 (description
15827 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15828 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15829 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15830 ;; https://github.com/gabrielfalcao/couleur/issues/11
15831 (license license:lgpl3+)))
15832
15833 (define-public python-misaka
15834 (package
15835 (name "python-misaka")
15836 (version "2.1.0")
15837 (source
15838 (origin
15839 (method url-fetch)
15840 (uri (pypi-uri "misaka" version))
15841 (sha256
15842 (base32
15843 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15844 (build-system python-build-system)
15845 (arguments
15846 `(;; Line 37 of setup.py calls self.run_command('develop')
15847 ;; in the 'check' phase. This command seems to be trying
15848 ;; to write to
15849 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15850 ;; for which it does not have the permission to write.
15851 #:tests? #f))
15852 (propagated-inputs
15853 `(("python-cffi" ,python-cffi)))
15854 (home-page "https://github.com/FSX/misaka")
15855 (synopsis "Python binding for Hoedown")
15856 (description
15857 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15858 library written in C. It features a fast HTML renderer and functionality to make custom
15859 renderers (e.g. man pages or LaTeX).")
15860 (license license:expat)))
15861
15862 (define-public python2-misaka
15863 (package-with-python2 python-misaka))
15864
15865 (define-public python2-steadymark
15866 ;; This is forced into being a python2 only variant
15867 ;; due to its dependence on couleur that has no support
15868 ;; for python3
15869 (package
15870 (name "python2-steadymark")
15871 (version "0.7.3")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (pypi-uri "steadymark" version))
15876 (sha256
15877 (base32
15878 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15879 (build-system python-build-system)
15880 (native-inputs
15881 `(("python-couleur" ,python2-couleur)
15882 ("python-sure" ,python2-sure)
15883 ("python-misaka" ,python2-misaka)))
15884 (arguments
15885 `(#:python ,python-2
15886 #:phases
15887 (modify-phases %standard-phases
15888 (add-before 'build 'patch-setup-py
15889 (lambda _
15890 ;; Update requirements from dependency==version
15891 ;; to dependency>=version
15892 (substitute* "setup.py"
15893 (("==") ">="))
15894 #t)))))
15895 (home-page "https://github.com/gabrielfalcao/steadymark")
15896 (synopsis "Markdown-based test runner for python")
15897 (description
15898 "@code{Steadymark} allows documentation to be written in github-flavoured
15899 markdown. The documentation may contain snippets of code surrounded by python
15900 code blocks and @code{Steadymark} will find these snippets and run them, making
15901 sure that there are no old malfunctional examples in the documentation examples.")
15902 (license license:expat)))
15903
15904 (define-public python-nose-randomly
15905 (package
15906 (name "python-nose-randomly")
15907 (version "1.2.5")
15908 (source
15909 (origin
15910 (method url-fetch)
15911 (uri (pypi-uri "nose-randomly" version))
15912 (sha256
15913 (base32
15914 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15915 (build-system python-build-system)
15916 (native-inputs
15917 `(("python-nose" ,python-nose)
15918 ("python-numpy" ,python-numpy)))
15919 (home-page "https://github.com/adamchainz/nose-randomly")
15920 (synopsis
15921 "Nose plugin to randomly order tests and control random.seed")
15922 (description
15923 "This is a @code{Nose} plugin to randomly order tests which can be quite
15924 powerful in discovering hidden flaws in the tests themselves, while helping to
15925 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15926 by resetting it to a repeatable number for each test, enabling the tests to
15927 create data based on random numbers and yet remain repeatable.")
15928 (license license:bsd-3)))
15929
15930 (define-public python2-nose-randomly
15931 (package-with-python2 python-nose-randomly))
15932
15933 (define-public python-jsonpointer
15934 (package
15935 (name "python-jsonpointer")
15936 (version "1.10")
15937 (source
15938 (origin
15939 (method url-fetch)
15940 (uri (pypi-uri "jsonpointer" version))
15941 (sha256
15942 (base32
15943 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15944 (build-system python-build-system)
15945 (home-page "https://github.com/stefankoegl/python-json-pointer")
15946 (synopsis "Identify specific nodes in a JSON document")
15947 (description "@code{jsonpointer} allows you to access specific nodes
15948 by path in a JSON document (see RFC 6901).")
15949 (license license:bsd-3)))
15950
15951 (define-public python2-jsonpointer
15952 (package-with-python2 python-jsonpointer))
15953
15954 (define-public python-jsonpatch
15955 (package
15956 (name "python-jsonpatch")
15957 (version "1.16")
15958 (source
15959 (origin
15960 (method url-fetch)
15961 ;; pypi version lacks tests.js
15962 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15963 "archive/v" version ".tar.gz"))
15964 (file-name (string-append name "-" version ".tar.gz"))
15965 (sha256
15966 (base32
15967 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15968 (build-system python-build-system)
15969 (native-inputs
15970 `(("python-jsonpointer" ,python-jsonpointer)))
15971 (home-page "https://github.com/stefankoegl/python-json-patch")
15972 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15973 (description "@code{jsonpatch} is a library and program that allows
15974 applying JSON Patches according to RFC 6902.")
15975 (license license:bsd-3)))
15976
15977 (define-public python2-jsonpatch
15978 (package-with-python2 python-jsonpatch))
15979
15980 (define-public python-jsonpatch-0.4
15981 (package (inherit python-jsonpatch)
15982 (name "python-jsonpatch")
15983 (version "0.4")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15988 "archive/v" version ".tar.gz"))
15989 (file-name (string-append name "-" version ".tar.gz"))
15990 (sha256
15991 (base32
15992 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15993
15994 (define-public python2-jsonpatch-0.4
15995 (package-with-python2 python-jsonpatch-0.4))
15996
15997 (define-public python-rfc3987
15998 (package
15999 (name "python-rfc3987")
16000 (version "1.3.7")
16001 (source
16002 (origin
16003 (method url-fetch)
16004 (uri (pypi-uri "rfc3987" version))
16005 (sha256
16006 (base32
16007 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16008 (build-system python-build-system)
16009 (home-page "http://pypi.python.org/pypi/rfc3987")
16010 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16011 (description "@code{rfc3987} provides routines for parsing and
16012 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16013 (license license:gpl3+)))
16014
16015 (define-public python2-rfc3987
16016 (package-with-python2 python-rfc3987))
16017
16018 (define-public python-validate-email
16019 (package
16020 (name "python-validate-email")
16021 (version "1.3")
16022 (source
16023 (origin
16024 (method url-fetch)
16025 (uri (pypi-uri "validate_email" version))
16026 (sha256
16027 (base32
16028 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16029 (build-system python-build-system)
16030 (home-page "http://github.com/syrusakbary/validate_email")
16031 (synopsis "Verifies if an email address is valid and really exists")
16032 (description "@code{validate_email} can be used to verify if an email
16033 address is valid and really exists.")
16034 (license license:lgpl3+)))
16035
16036 (define-public python2-validate-email
16037 (package-with-python2 python-validate-email))
16038
16039 (define-public python-flex
16040 (package
16041 (name "python-flex")
16042 (version "6.10.0")
16043 (source
16044 (origin
16045 (method url-fetch)
16046 (uri (pypi-uri "flex" version))
16047 (sha256
16048 (base32
16049 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16050 (build-system python-build-system)
16051 (propagated-inputs
16052 `(("python-click" ,python-click)
16053 ("python-iso8601" ,python-iso8601)
16054 ("python-jsonpointer" ,python-jsonpointer)
16055 ("python-pyyaml" ,python-pyyaml)
16056 ("python-requests" ,python-requests)
16057 ("python-rfc3987" ,python-rfc3987)
16058 ("python-six" ,python-six)
16059 ("python-validate-email" ,python-validate-email)))
16060 (home-page "https://github.com/pipermerriam/flex")
16061 (synopsis "Validates Swagger schemata")
16062 (description "@code{flex} can be used to validate Swagger schemata.")
16063 (license license:bsd-3)))
16064
16065 (define-public python2-flex
16066 (package-with-python2 python-flex))
16067
16068 (define-public python-marshmallow
16069 (package
16070 (name "python-marshmallow")
16071 (version "3.0.0b3")
16072 (source
16073 (origin
16074 (method url-fetch)
16075 (uri (pypi-uri "marshmallow" version))
16076 (sha256
16077 (base32
16078 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
16079 (build-system python-build-system)
16080 (propagated-inputs
16081 `(("python-dateutil" ,python-dateutil)
16082 ("python-simplejson" ,python-simplejson)))
16083 (native-inputs
16084 `(("python-pytest-3.0" ,python-pytest-3.0)
16085 ("python-pytz" ,python-pytz)))
16086 (home-page "https://github.com/marshmallow-code/marshmallow")
16087 (synopsis "Convert complex datatypes to and from native
16088 Python datatypes.")
16089 (description "@code{marshmallow} provides a library for converting
16090 complex datatypes to and from native Python datatypes.")
16091 (license license:expat)))
16092
16093 (define-public python2-marshmallow
16094 (package-with-python2 python-marshmallow))
16095
16096 (define-public python-bottle
16097 (package
16098 (name "python-bottle")
16099 (version "0.12.13")
16100 (source
16101 (origin
16102 (method url-fetch)
16103 (uri (pypi-uri "bottle" version))
16104 (sha256
16105 (base32
16106 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
16107 (build-system python-build-system)
16108 (home-page "http://bottlepy.org/")
16109 (synopsis "WSGI framework for small web-applications.")
16110 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
16111 (license license:expat)))
16112
16113 (define-public python2-bottle
16114 (package-with-python2 python-bottle))
16115
16116 (define-public python-apispec
16117 (package
16118 (name "python-apispec")
16119 (version "0.25.3")
16120 (source
16121 (origin
16122 (method url-fetch)
16123 (uri (pypi-uri "apispec" version))
16124 (sha256
16125 (base32
16126 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16127 (build-system python-build-system)
16128 (propagated-inputs
16129 `(("python-pyyaml" ,python-pyyaml)))
16130 (native-inputs
16131 `(("python-pytest-3.0" ,python-pytest-3.0)
16132 ("python-flask" ,python-flask)
16133 ("python-marshmallow" ,python-marshmallow)
16134 ("python-tornado" ,python-tornado)
16135 ("python-bottle" ,python-bottle)
16136 ("python-mock" ,python-mock)))
16137 (home-page "https://github.com/marshmallow-code/apispec")
16138 (synopsis "Swagger 2.0 API specification generator")
16139 (description "@code{python-apispec} is a pluggable API specification
16140 generator. Currently supports the OpenAPI specification (f.k.a.
16141 Swagger 2.0).")
16142 (license license:expat)))
16143
16144 (define-public python2-apispec
16145 (package-with-python2 python-apispec))
16146
16147 (define-public python-flasgger
16148 (package
16149 (name "python-flasgger")
16150 (version "0.6.3")
16151 (source
16152 (origin
16153 (method url-fetch)
16154 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
16155 version ".tar.gz"))
16156 (file-name (string-append name "-" version ".tar.gz"))
16157 (sha256
16158 (base32
16159 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
16160 (build-system python-build-system)
16161 (arguments
16162 `(#:phases
16163 (modify-phases %standard-phases
16164 (replace 'check
16165 (lambda* (#:key inputs outputs #:allow-other-keys)
16166 (substitute* "Makefile"
16167 (("flake8 flasgger --ignore=F403")
16168 "flake8 flasgger --ignore=E731,F403"))
16169 (setenv "PYTHONPATH" (string-append (getcwd)
16170 ":"
16171 (getenv "PYTHONPATH")))
16172 (zero? (system* "py.test")))))))
16173 (propagated-inputs
16174 `(("python-flask" ,python-flask)
16175 ("python-pyyaml" ,python-pyyaml)
16176 ("python-jsonschema" ,python-jsonschema)
16177 ("python-mistune" ,python-mistune)
16178 ("python-six" ,python-six)))
16179 (native-inputs
16180 `(("python-decorator" ,python-decorator)
16181 ("python-flake8" ,python-flake8)
16182 ("python-flask-restful" ,python-flask-restful)
16183 ("python-flex" ,python-flex)
16184 ("python-pytest-3.0" ,python-pytest-3.0)
16185 ("python-pytest-cov" ,python-pytest-cov)
16186 ("python-marshmallow" ,python-marshmallow)
16187 ("python-apispec" ,python-apispec)))
16188 (home-page "https://github.com/rochacbruno/flasgger/")
16189 (synopsis "Extract Swagger specs from your Flask project")
16190 (description "@code{python-flasgger} allows extracting Swagger specs
16191 from your Flask project. It is a fork of Flask-Swagger.")
16192 (license license:expat)))
16193
16194 (define-public python2-flasgger
16195 (package-with-python2 python-flasgger))
16196
16197 (define-public python-swagger-spec-validator
16198 (package
16199 (name "python-swagger-spec-validator")
16200 (version "2.1.0")
16201 (source
16202 (origin
16203 (method url-fetch)
16204 (uri (pypi-uri "swagger-spec-validator" version))
16205 (sha256
16206 (base32
16207 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
16208 (build-system python-build-system)
16209 (propagated-inputs
16210 `(("python-jsonschema" ,python-jsonschema)
16211 ("python-six" ,python-six)))
16212 (home-page
16213 "http://github.com/Yelp/swagger_spec_validator")
16214 (synopsis "Validation of Swagger specifications")
16215 (description "@code{swagger_spec_validator} provides a library for
16216 validating Swagger API specifications.")
16217 (license license:asl2.0)))
16218
16219 (define-public python2-swagger-spec-validator
16220 (package-with-python2 python-swagger-spec-validator))
16221
16222 (define-public python-apache-libcloud
16223 (package
16224 (name "python-apache-libcloud")
16225 (version "2.0.0")
16226 (source
16227 (origin
16228 (method url-fetch)
16229 (uri (pypi-uri "apache-libcloud" version))
16230 (sha256
16231 (base32
16232 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
16233 (build-system python-build-system)
16234 (arguments
16235 `(#:phases
16236 (modify-phases %standard-phases
16237 (add-after 'unpack 'patch-ssh
16238 (lambda* (#:key inputs #:allow-other-keys)
16239 (substitute* "libcloud/compute/ssh.py"
16240 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16241 "/bin/ssh" "'")))
16242 #t))
16243 (add-after 'unpack 'patch-tests
16244 (lambda _
16245 (substitute* "./libcloud/test/test_file_fixtures.py"
16246 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
16247 (("def _ascii") "def _raw_data(self, method, url, body, headers):
16248 return (httplib.OK,
16249 \"1234abcd\",
16250 {\"test\": \"value\"},
16251 httplib.responses[httplib.OK])
16252 def _ascii"))
16253 (substitute* "libcloud/test/compute/test_ssh_client.py"
16254 (("class ShellOutSSHClientTests")
16255 "@unittest.skip(\"Guix container doesn't have ssh service\")
16256 class ShellOutSSHClientTests")
16257 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16258 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16259 (("'.xF0', '.x90', '.x8D', '.x88'")
16260 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16261 #t)))))
16262 (inputs
16263 `(("openssh" ,openssh)))
16264 (propagated-inputs
16265 `(("python-paramiko" ,python-paramiko)
16266 ("python-requests" ,python-requests)))
16267 (native-inputs
16268 `(("python-lockfile" ,python-lockfile)
16269 ("python-mock" ,python-mock)
16270 ("python-requests-mock" ,python-requests-mock)))
16271 (home-page "https://libcloud.apache.org/")
16272 (synopsis "Unified Cloud API")
16273 (description "@code{libcloud} is a Python library for interacting with
16274 many of the popular cloud service providers using a unified API.")
16275 (license license:asl2.0)))
16276
16277 (define-public python2-apache-libcloud
16278 (package-with-python2 python-apache-libcloud))
16279
16280 (define-public python-smmap2
16281 (package
16282 (name "python-smmap2")
16283 (version "2.0.3")
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "smmap2" version))
16288 (sha256
16289 (base32
16290 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
16291 (build-system python-build-system)
16292 (native-inputs
16293 `(("python-nosexcover" ,python-nosexcover)))
16294 (home-page "https://github.com/Byron/smmap")
16295 (synopsis "Python sliding window memory map manager")
16296 (description "@code{smmap2} is a pure Python implementation of a sliding
16297 window memory map manager.")
16298 (license license:bsd-3)))
16299
16300 (define-public python2-smmap2
16301 (package-with-python2 python-smmap2))
16302
16303 (define-public python-regex
16304 (package
16305 (name "python-regex")
16306 (version "2017.06.07")
16307 (source (origin
16308 (method url-fetch)
16309 (uri (pypi-uri "regex" version))
16310 (sha256
16311 (base32
16312 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
16313 (build-system python-build-system)
16314 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16315 (synopsis "Alternative regular expression module")
16316 (description "This regular expression implementation is backwards-
16317 compatible with the standard @code{re} module, but offers additional
16318 functionality like full case-folding for case-insensitive matches in Unicode.")
16319 (license license:psfl)))
16320
16321 (define-public python2-regex
16322 (package-with-python2 python-regex))
16323
16324 (define-public python2-pyopengl
16325 (package
16326 (name "python2-pyopengl")
16327 (version "3.1.0")
16328 (source
16329 (origin
16330 (method url-fetch)
16331 (uri (pypi-uri "PyOpenGL" version))
16332 (sha256
16333 (base32
16334 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
16335 (arguments
16336 `(#:python ,python-2))
16337 (build-system python-build-system)
16338 (home-page "http://pyopengl.sourceforge.net")
16339 (synopsis "Standard OpenGL bindings for Python")
16340 (description
16341 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16342 related APIs. The binding is created using the standard @code{ctypes}
16343 library.")
16344 (license license:bsd-3)))
16345
16346 (define-public python-rencode
16347 (package
16348 (name "python-rencode")
16349 (version "1.0.3")
16350 (source
16351 (origin
16352 (method url-fetch)
16353 (uri (pypi-uri "rencode" version))
16354 (sha256
16355 (base32
16356 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
16357 (build-system python-build-system)
16358 (native-inputs `(("pkg-config" ,pkg-config)
16359 ("python-cython", python-cython)))
16360 (home-page "https://github.com/aresch/rencode")
16361 (synopsis "Serialization of heterogeneous data structures")
16362 (description
16363 "The @code{rencode} module is a data structure serialization library,
16364 similar to @code{bencode} from the BitTorrent project. For complex,
16365 heterogeneous data structures with many small elements, r-encoding stake up
16366 significantly less space than b-encodings. This version of rencode is a
16367 complete rewrite in Cython to attempt to increase the performance over the
16368 pure Python module.")
16369 (license license:bsd-3)))
16370
16371 (define-public python2-rencode
16372 (package-with-python2 python-rencode))
16373
16374 (define-public python-xenon
16375 (package
16376 (name "python-xenon")
16377 (version "0.5.1")
16378 (source
16379 (origin
16380 (method url-fetch)
16381 (uri (pypi-uri "xenon" version))
16382 (sha256
16383 (base32
16384 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
16385 (build-system python-build-system)
16386 (native-inputs
16387 `(("python-pyyaml" ,python-pyyaml)
16388 ("python-radon" ,python-radon)
16389 ("python-requests" ,python-requests)
16390 ("python-flake8" ,python-flake8)
16391 ("python-tox" ,python-tox)))
16392 (arguments
16393 `(#:phases
16394 (modify-phases %standard-phases
16395 (add-before 'build 'patch-test-requirements
16396 (lambda* (#:key inputs #:allow-other-keys)
16397 ;; Update requirements from dependency==version to
16398 ;; dependency>=version.
16399 (substitute* "requirements.txt"
16400 (("==") ">=")
16401 ((",<1.5.0") ""))
16402 ;; Remove httpretty dependency for tests.
16403 (substitute* "setup.py"
16404 (("httpretty") ""))
16405 #t)))))
16406 (home-page "https://xenon.readthedocs.org/")
16407 (synopsis "Monitor code metrics for Python on your CI server")
16408 (description
16409 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16410 Ideally, @code{xenon} is run every time code is committed. Through command
16411 line options, various thresholds can be set for the complexity of code. It
16412 will fail (i.e. it will exit with a non-zero exit code) when any of these
16413 requirements is not met.")
16414 (license license:expat)))
16415
16416 (define-public python2-xenon
16417 (package-with-python2 python-xenon))
16418
16419 (define-public python-flask-principal
16420 (package
16421 (name "python-flask-principal")
16422 (version "0.4.0")
16423 (source
16424 (origin
16425 (method url-fetch)
16426 (uri (pypi-uri "Flask-Principal" version))
16427 (sha256
16428 (base32
16429 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
16430 (build-system python-build-system)
16431 (propagated-inputs
16432 `(("python-blinker" ,python-blinker)))
16433 (native-inputs
16434 `(("python-flask" ,python-flask)
16435 ("python-nose" ,python-nose)))
16436 (home-page "http://packages.python.org/Flask-Principal/")
16437 (synopsis "Identity management for Flask")
16438 (description "@code{flask_principal} is a identity management library for
16439 Flask. It supports managing both authentication and authorization data in a
16440 thread-local variable.")
16441 (license license:expat)))
16442
16443 (define-public python2-flask-principal
16444 (package-with-python2 python-flask-principal))
16445
16446 (define-public python-flask-httpauth
16447 (package
16448 (name "python-flask-httpauth")
16449 (version "3.2.3")
16450 (source
16451 (origin
16452 (method url-fetch)
16453 (uri (pypi-uri "Flask-HTTPAuth" version))
16454 (sha256
16455 (base32
16456 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
16457 (build-system python-build-system)
16458 (native-inputs
16459 `(("python-flask" ,python-flask)))
16460 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
16461 (synopsis "Basic and Digest HTTP authentication for Flask routes")
16462 (description "@code{flask_httpauth} provides Basic and Digest HTTP
16463 authentication for Flask routes.")
16464 (license license:expat)))
16465
16466 (define-public python2-flask-httpauth
16467 (package-with-python2 python-flask-httpauth))
16468
16469 (define-public python-pysocks
16470 (package
16471 (name "python-pysocks")
16472 (version "1.6.7")
16473 (source
16474 (origin
16475 (method url-fetch)
16476 (uri (pypi-uri "PySocks" version))
16477 (sha256
16478 (base32
16479 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
16480 (build-system python-build-system)
16481 (arguments `(#:tests? #f))
16482 (home-page "https://github.com/Anorov/PySocks")
16483 (synopsis "SOCKS client module")
16484 (description "@code{pysocks} is an updated and semi-actively maintained
16485 version of @code{SocksiPy} with bug fixes and extra features.")
16486 (license license:bsd-3)))
16487
16488 (define-public python2-pysocks
16489 (package-with-python2 python-pysocks))
16490
16491 (define-public python-pyaes
16492 (package
16493 (name "python-pyaes")
16494 (version "1.6.0")
16495 (source
16496 (origin
16497 (method url-fetch)
16498 (uri (pypi-uri "pyaes" version))
16499 (sha256
16500 (base32
16501 "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"))))
16502 (build-system python-build-system)
16503 (home-page "https://github.com/ricmoo/pyaes")
16504 (synopsis "Implementation of AES in Python")
16505 (description "This package contains a pure-Python implementation of the
16506 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
16507 ECB and OFB).")
16508 (license license:expat)))
16509
16510 (define-public python2-pyaes
16511 (package-with-python2 python-pyaes))
16512
16513 (define-public python-uritemplate
16514 (package
16515 (name "python-uritemplate")
16516 (version "3.0.0")
16517 (source
16518 (origin
16519 (method url-fetch)
16520 (uri (pypi-uri "uritemplate" version))
16521 (sha256
16522 (base32
16523 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
16524 (build-system python-build-system)
16525 (home-page "https://uritemplate.readthedocs.org")
16526 (synopsis "Library to deal with URI Templates")
16527 (description "@code{uritemplate} provides Python library to deal with URI
16528 Templates.")
16529 (license license:bsd-2)))
16530
16531 (define-public python2-uritemplate
16532 (package-with-python2 python-uritemplate))
16533
16534 (define-public python-pydiff
16535 (package
16536 (name "python-pydiff")
16537 (version "0.2")
16538 (source
16539 (origin
16540 (method url-fetch)
16541 (uri (pypi-uri "pydiff" version))
16542 (sha256
16543 (base32
16544 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16545 (build-system python-build-system)
16546 (home-page "https://github.com/myint/pydiff")
16547 (synopsis "Library to diff two Python files at the bytecode level")
16548 (description
16549 "@code{pydiff} makes it easy to look for actual code changes while
16550 ignoring formatting changes.")
16551 (license license:expat)))
16552
16553 (define-public python2-pydiff
16554 (package-with-python2 python-pydiff))
16555
16556 (define-public python-nose-timer
16557 (package
16558 (name "python-nose-timer")
16559 (version "0.7.0")
16560 (source
16561 (origin
16562 (method url-fetch)
16563 (uri (pypi-uri "nose-timer" version))
16564 (patches
16565 (search-patches
16566 ;; This patch will not be needed in the next version.
16567 ;; It is taken from the master branch.
16568 "python-nose-timer-drop-ordereddict.patch"))
16569 (sha256
16570 (base32
16571 "1s32ymsnby8lz2qk55ifj9zi50dqcg6swnj5cz2rmwxg2jsslsxp"))))
16572 (build-system python-build-system)
16573 (propagated-inputs
16574 `(("python-nose" ,python-nose)
16575 ("python-termcolor" ,python-termcolor)))
16576 (home-page "https://github.com/mahmoudimus/nose-timer")
16577 (synopsis "Timer plugin for nosetests")
16578 (description "Shows how much time was needed to run individual tests.")
16579 (license license:expat)))
16580
16581 (define-public python2-nose-timer
16582 (package-with-python2 python-nose-timer))
16583
16584 (define-public python-tqdm
16585 (package
16586 (name "python-tqdm")
16587 (version "4.15.0")
16588 (source
16589 (origin
16590 (method url-fetch)
16591 (uri (pypi-uri "tqdm" version))
16592 (sha256
16593 (base32
16594 "0lwrmby8qz23gvqwkpivfrv4q8nfh90cz9ml6slwvwmcxxsdrhbf"))))
16595 (build-system python-build-system)
16596 (native-inputs
16597 `(("python-flake8" ,python-flake8)
16598 ("python-nose" ,python-nose)
16599 ("python-nose-timer" ,python-nose-timer)
16600 ("python-coverage" ,python-coverage)
16601 ("python-virtualenv" ,python-virtualenv)))
16602 (home-page "https://github.com/tqdm/tqdm")
16603 (synopsis "Fast, extensible progress meter")
16604 (description
16605 "Make loops show a progress bar on the console by just wrapping any
16606 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16607 design and layout.")
16608 (license (list license:mpl2.0 license:expat))))
16609
16610 (define-public python2-tqdm
16611 (package-with-python2 python-tqdm))
16612
16613 (define-public python-pkginfo
16614 (package
16615 (name "python-pkginfo")
16616 (version "1.4.1")
16617 (source
16618 (origin
16619 (method url-fetch)
16620 (uri (pypi-uri "pkginfo" version))
16621 (sha256
16622 (base32
16623 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
16624 (build-system python-build-system)
16625 (arguments
16626 ;; The tests are broken upstream.
16627 '(#:tests? #f))
16628 (home-page
16629 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16630 (synopsis
16631 "Query metadatdata from sdists, bdists, and installed packages")
16632 (description
16633 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16634 source distriubtion (an sdist) or a binary distribution (e.g., created by
16635 running bdist_egg). It can also query the EGG-INFO directory of an installed
16636 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16637 created by running @code{python setup.py develop}).")
16638 (license license:expat)))
16639
16640 (define-public python2-pkginfo
16641 (package-with-python2 python-pkginfo))
16642
16643 (define-public python-twine
16644 (package
16645 (name "python-twine")
16646 (version "1.9.1")
16647 (source
16648 (origin
16649 (method url-fetch)
16650 (uri (pypi-uri "twine" version))
16651 (sha256
16652 (base32
16653 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
16654 (build-system python-build-system)
16655 (propagated-inputs
16656 `(("python-tqdm" ,python-tqdm)
16657 ("python-pkginfo", python-pkginfo)
16658 ("python-requests" ,python-requests)
16659 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16660 (home-page "https://github.com/pypa/twine")
16661 (synopsis "Collection of utilities for interacting with PyPI")
16662 (description
16663 "@code{twine} currently supports registering projects and uploading
16664 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16665 their files and supports any packaging format (including wheels).")
16666 (license license:asl2.0)))
16667
16668 (define-public python2-twine
16669 (package-with-python2 python-twine))
16670
16671 (define-public python-linecache2
16672 (package
16673 (name "python-linecache2")
16674 (version "1.0.0")
16675 (source
16676 (origin
16677 (method url-fetch)
16678 (uri (pypi-uri "linecache2" version))
16679 (sha256
16680 (base32
16681 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16682 (build-system python-build-system)
16683 (arguments
16684 `(;; The tests depend on unittest2, and our version is a bit too old.
16685 #:tests? #f))
16686 (native-inputs
16687 `(("python-pbr" ,python-pbr)))
16688 (home-page
16689 "https://github.com/testing-cabal/linecache2")
16690 (synopsis "Backports of the linecache module")
16691 (description
16692 "The linecache module allows one to get any line from any file, while
16693 attempting to optimize internally, using a cache, the common case where many
16694 lines are read from a single file.")
16695 (license license:psfl)))
16696
16697 (define-public python2-linecache2
16698 (package-with-python2 python-linecache2))
16699
16700 (define-public python-traceback2
16701 (package
16702 (name "python-traceback2")
16703 (version "1.4.0")
16704 (source
16705 (origin
16706 (method url-fetch)
16707 (uri (pypi-uri "traceback2" version))
16708 (sha256
16709 (base32
16710 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16711 (build-system python-build-system)
16712 (arguments
16713 `(;; python-traceback2 and python-unittest2 depend on one another.
16714 #:tests? #f))
16715 (native-inputs
16716 `(("python-pbr" ,python-pbr)))
16717 (propagated-inputs
16718 `(("python-linecache2" ,python-linecache2)))
16719 (home-page
16720 "https://github.com/testing-cabal/traceback2")
16721 (synopsis "Backports of the traceback module")
16722 (description
16723 "This module provides a standard interface to extract, format and print
16724 stack traces of Python programs. It exactly mimics the behavior of the Python
16725 interpreter when it prints a stack trace.")
16726 (license license:psfl)))
16727
16728 (define-public python2-traceback2
16729 (package-with-python2 python-traceback2))